]> granicus.if.org Git - clang/commitdiff
[XRay] Change std::sort to llvm::sort in response to r327219
authorMandeep Singh Grang <mgrang@codeaurora.org>
Mon, 23 Apr 2018 00:49:25 +0000 (00:49 +0000)
committerMandeep Singh Grang <mgrang@codeaurora.org>
Mon, 23 Apr 2018 00:49:25 +0000 (00:49 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330561 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/XRayArgs.cpp

index 5caeffc9d6e2cf0130db0e01c8d4665cc6d79699..1d5850b55983b76f4a39d9b1ab7c66f72d6ef3d3 100644 (file)
@@ -163,7 +163,7 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {
       }
 
     // Then we want to sort and unique the modes we've collected.
-    std::sort(Modes.begin(), Modes.end());
+    llvm::sort(Modes.begin(), Modes.end());
     Modes.erase(std::unique(Modes.begin(), Modes.end()), Modes.end());
   }
 }