[PATCH] D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 12 17:29:32 PST 2017
mgrang created this revision.
Herald added a subscriber: JDevlieghere.
This fixes failure in DebugInfo/X86/multiple-aranges.ll uncovered by https://reviews.llvm.org/D39245.
Repository:
rL LLVM
https://reviews.llvm.org/D39950
Files:
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1752,7 +1752,7 @@
}
// Sort the symbols by offset within the section.
- std::sort(
+ std::stable_sort(
List.begin(), List.end(), [&](const SymbolCU &A, const SymbolCU &B) {
unsigned IA = A.Sym ? Asm->OutStreamer->GetSymbolOrder(A.Sym) : 0;
unsigned IB = B.Sym ? Asm->OutStreamer->GetSymbolOrder(B.Sym) : 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39950.122608.patch
Type: text/x-patch
Size: 557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171113/feb4ea33/attachment.bin>
More information about the llvm-commits
mailing list