diff options
author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-02-25 19:52:34 +0000 |
---|---|---|
committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-02-25 19:52:34 +0000 |
commit | 46d02dee65d2ffa2682edb8abd929655b8412ace (patch) | |
tree | 2ab32e7faaf2790cc3cd38e61c5ca7351580d83a | |
parent | fabe1b3b7d4bbd34a43f11f4caac0114c3cad933 (diff) | |
download | bcm5719-llvm-46d02dee65d2ffa2682edb8abd929655b8412ace.tar.gz bcm5719-llvm-46d02dee65d2ffa2682edb8abd929655b8412ace.zip |
[DebugInfo] Stable sort symbols to remove non-deterministic ordering
Summary: This fixes failure in DebugInfo/X86/multiple-aranges.ll uncovered by D39245.
Reviewers: rafael, echristo, probinson
Reviewed By: probinson
Subscribers: probinson, llvm-commits, JDevlieghere
Tags: #debug-info
Differential Revision: https://reviews.llvm.org/D39950
llvm-svn: 326056
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 6b50fb94d0e..7985908f377 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1780,7 +1780,7 @@ void DwarfDebug::emitDebugARanges() { } // 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; |