diff options
author | Fangrui Song <maskray@google.com> | 2020-03-05 14:18:38 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-03-05 18:05:28 -0800 |
commit | 71e2ca6e32105b35aeadeab25010e8f999c47c23 (patch) | |
tree | 15d77b93e99d73016288b5fe10367f7bc8f70d1f /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 467969161d94336cb0f091dff22bee403de71ffa (diff) | |
download | llvm-71e2ca6e32105b35aeadeab25010e8f999c47c23.zip llvm-71e2ca6e32105b35aeadeab25010e8f999c47c23.tar.gz llvm-71e2ca6e32105b35aeadeab25010e8f999c47c23.tar.bz2 |
[llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:`
The new behavior matches GNU objdump. A pair of angle brackets makes tests slightly easier.
`.foo:` is not unique and thus cannot be used in a `CHECK-LABEL:` directive.
Without `-LABEL`, the CHECK line can match the `Disassembly of section`
line and causes the next `CHECK-NEXT:` to fail.
```
Disassembly of section .foo:
0000000000001634 .foo:
```
Bdragon: <> has metalinguistic connotation. it just "feels right"
Reviewed By: rupprecht
Differential Revision: https://reviews.llvm.org/D75713
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 4675bd5..1d0ec43 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -1372,7 +1372,7 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj, outs() << format(Is64Bits ? "%016" PRIx64 " " : "%08" PRIx64 " ", SectionAddr + Start + VMAAdjustment); - outs() << SymbolName << ":\n"; + outs() << '<' << SymbolName << ">:\n"; // Don't print raw contents of a virtual section. A virtual section // doesn't have any contents in the file. |