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).
This commit is contained in:
Fangrui Song 2021-02-11 22:53:56 -08:00
parent b32fa1751f
commit 0fd7c31a09
1 changed files with 1 additions and 1 deletions

View File

@ -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;