[llvm] r330061 - [DebugInfo] Change std::sort to llvm::sort in response to r327219
Mandeep Singh Grang via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 12:50:51 PDT 2018
Author: mgrang
Date: Fri Apr 13 12:50:51 2018
New Revision: 330061
URL: http://llvm.org/viewvc/llvm-project?rev=330061&view=rev
Log:
[DebugInfo] 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 the comments section in D44363 for a list of all the
required patches.
Modified:
llvm/trunk/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
Modified: llvm/trunk/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp?rev=330061&r1=330060&r2=330061&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp (original)
+++ llvm/trunk/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp Fri Apr 13 12:50:51 2018
@@ -91,7 +91,7 @@ std::vector<uint32_t> DebugStringTableSu
Result.reserve(IdToString.size());
for (const auto &Entry : IdToString)
Result.push_back(Entry.first);
- std::sort(Result.begin(), Result.end());
+ llvm::sort(Result.begin(), Result.end());
return Result;
}
More information about the llvm-commits
mailing list