mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[llvm-objdump/mac] Print symbols at the same address deterministically
By using stable_sort. Added a test case which previously failed when expensive checks were enabled. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D105240
This commit is contained in:
parent
e735ac1e0d
commit
69e52cdafc
@ -0,0 +1,14 @@
|
||||
# RUN: llvm-mc %s --triple x86_64-apple-darwin -filetype=obj -o %t.o
|
||||
# RUN: llvm-objdump --macho -d %t.o | FileCheck %s
|
||||
|
||||
_foo:
|
||||
_bar:
|
||||
_baz:
|
||||
_qux:
|
||||
nop
|
||||
|
||||
## Ensure symbols with the same address are printed in a deterministic order
|
||||
# CHECK: _foo
|
||||
# CHECK-NEXT: _bar
|
||||
# CHECK-NEXT: _baz
|
||||
# CHECK-NEXT: _qux
|
@ -7318,7 +7318,7 @@ static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF,
|
||||
BaseSegmentAddress);
|
||||
|
||||
// Sort the symbols by address, just in case they didn't come in that way.
|
||||
llvm::sort(Symbols, SymbolSorter());
|
||||
llvm::stable_sort(Symbols, SymbolSorter());
|
||||
|
||||
// Build a data in code table that is sorted on by the address of each entry.
|
||||
uint64_t BaseAddress = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user