[llvm] 0fd7c31 - DebugInfo/Symbolize: Use stable_sort
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 22:54:02 PST 2021
Author: Fangrui Song
Date: 2021-02-11T22:53:56-08:00
New Revision: 0fd7c31a098efdfaa5a57dbac6e9c0921b00a999
URL: https://github.com/llvm/llvm-project/commit/0fd7c31a098efdfaa5a57dbac6e9c0921b00a999
DIFF: https://github.com/llvm/llvm-project/commit/0fd7c31a098efdfaa5a57dbac6e9c0921b00a999.diff
LOG: DebugInfo/Symbolize: Use stable_sort
This fixes coff-dwarf.test on some build bots.
The test relies on the sort order and prefers main (StorageClass: External) to .text (StorageClass: Static).
Added:
Modified:
llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
index 52342b27cf20..4a9b119e5dad 100644
--- a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
@@ -74,7 +74,7 @@ SymbolizableObjectFile::create(const object::ObjectFile *Obj,
// Sort by (Addr,Size,Name). If several SymbolDescs share the same Addr,
// pick the one with the largest Size. This helps us avoid symbols with no
// size information (Size=0).
- llvm::sort(SS);
+ llvm::stable_sort(SS);
auto I = SS.begin(), E = SS.end(), J = SS.begin();
while (I != E) {
auto OI = I;
More information about the llvm-commits
mailing list