Skip to content

Commit

Permalink
DebugInfo/Symbolize: Use stable_sort
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
MaskRay committed Feb 12, 2021
1 parent b32fa17 commit 0fd7c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 0fd7c31

Please sign in to comment.