[lld] r191867 - [Core] Fix unstable sort for unordered atoms.
Michael J. Spencer
bigcheesegs at gmail.com
Wed Oct 2 18:26:49 PDT 2013
Author: mspencer
Date: Wed Oct 2 20:26:48 2013
New Revision: 191867
URL: http://llvm.org/viewvc/llvm-project?rev=191867&view=rev
Log:
[Core] Fix unstable sort for unordered atoms.
Modified:
lld/trunk/lib/Passes/LayoutPass.cpp
Modified: lld/trunk/lib/Passes/LayoutPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=191867&r1=191866&r2=191867&view=diff
==============================================================================
--- lld/trunk/lib/Passes/LayoutPass.cpp (original)
+++ lld/trunk/lib/Passes/LayoutPass.cpp Wed Oct 2 20:26:48 2013
@@ -527,7 +527,7 @@ void LayoutPass::perform(MutableFile &me
});
// sort the atoms
- std::sort(atomRange.begin(), atomRange.end(), _compareAtoms);
+ std::stable_sort(atomRange.begin(), atomRange.end(), _compareAtoms);
DEBUG({
llvm::dbgs() << "sorted atoms:\n";
More information about the llvm-commits
mailing list