This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:`
ClosedPublic

Authored by MaskRay on Mar 5 2020, 3:54 PM.

Details

Summary

The new behavior matches GNU objdump. A pair of angle brackets makes tests slightly easier.

.foo: is not unique and thus cannot be 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

Diff Detail

Event Timeline

MaskRay created this revision.Mar 5 2020, 3:54 PM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay added a comment.EditedMar 5 2020, 3:55 PM

There are a large number of tests which need to be fixed. I'll not add them in the review.

As an example:

diff --git a/llvm/test/MC/ELF/relax-arith2.s b/llvm/test/MC/ELF/relax-arith2.s
index ac71a678bc4..9a1153b350d 100644
--- a/llvm/test/MC/ELF/relax-arith2.s
+++ b/llvm/test/MC/ELF/relax-arith2.s
@@ -24,7 +24,7 @@ bar:
 
 // CHECK:      Disassembly of section and:
 // CHECK-EMPTY:
-// CHECK-NEXT: and:
+// CHECK-NEXT: <and>:
 // CHECK-NEXT:   0: 66 83 e3 7f                   andw $127, %bx
 // CHECK-NEXT:   4: 66 83 24 25 00 00 00 00 00    andw $0, 0
 // CHECK-NEXT:   d: 83 e3 01                      andl $1, %ebx
rupprecht accepted this revision.Mar 5 2020, 4:12 PM
This revision is now accepted and ready to land.Mar 5 2020, 4:12 PM
MaskRay updated this revision to Diff 248636.Mar 5 2020, 5:38 PM

Update tests

This revision was automatically updated to reflect the committed changes.