From f3555650bd5219bf30cab707ff2e1d6da5628cd3 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Grang Date: Thu, 5 Apr 2018 21:52:24 +0000 Subject: [IR] Change std::sort to llvm::sort in response to r327219 r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer D44363 for a list of all the required patches. llvm-svn: 329353 --- llvm/lib/IR/Attributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/IR/Attributes.cpp') diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index b6c16a8a10c..bd2e6e241f5 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -655,7 +655,7 @@ AttributeSetNode *AttributeSetNode::get(LLVMContext &C, FoldingSetNodeID ID; SmallVector SortedAttrs(Attrs.begin(), Attrs.end()); - std::sort(SortedAttrs.begin(), SortedAttrs.end()); + llvm::sort(SortedAttrs.begin(), SortedAttrs.end()); for (const auto Attr : SortedAttrs) Attr.Profile(ID); -- cgit v1.2.3