[Core] Fix unstable sort for unordered atoms.

llvm-svn: 191867
This commit is contained in:
Michael J. Spencer
2013-10-03 01:26:48 +00:00
parent fb7a0b8943
commit cf80ed03bc

View File

@@ -527,7 +527,7 @@ void LayoutPass::perform(MutableFile &mergedFile) {
});
// sort the atoms
std::sort(atomRange.begin(), atomRange.end(), _compareAtoms);
std::stable_sort(atomRange.begin(), atomRange.end(), _compareAtoms);
DEBUG({
llvm::dbgs() << "sorted atoms:\n";