summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
authorMandeep Singh Grang <mgrang@codeaurora.org>2018-04-05 21:52:24 +0000
committerMandeep Singh Grang <mgrang@codeaurora.org>2018-04-05 21:52:24 +0000
commitf3555650bd5219bf30cab707ff2e1d6da5628cd3 (patch)
treee3639d29518621a22ca4cb556a2f1d9f67804775 /llvm/lib/IR/AsmWriter.cpp
parentc9c3a004ae06cbbf4a8bd9724ccf0a6272e83ac6 (diff)
downloadbcm5719-llvm-f3555650bd5219bf30cab707ff2e1d6da5628cd3.tar.gz
bcm5719-llvm-f3555650bd5219bf30cab707ff2e1d6da5628cd3.zip
[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
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 88ef6067311..ad5c92bfdf9 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -195,7 +195,7 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F,
!isa<GlobalVariable>(V) && !isa<Function>(V) && !isa<BasicBlock>(V);
if (auto *BA = dyn_cast<BlockAddress>(V))
ID = OM.lookup(BA->getBasicBlock()).first;
- std::sort(List.begin(), List.end(), [&](const Entry &L, const Entry &R) {
+ llvm::sort(List.begin(), List.end(), [&](const Entry &L, const Entry &R) {
const Use *LU = L.first;
const Use *RU = R.first;
if (LU == RU)
OpenPOWER on IntegriCloud