[llvm-objdump] Print method name from debug info in disassembly output.
authorJordan Rupprecht <rupprecht@google.com>
Fri, 21 Feb 2020 23:30:51 +0000 (15:30 -0800)
committerJordan Rupprecht <rupprecht@google.com>
Fri, 21 Feb 2020 23:30:51 +0000 (15:30 -0800)
commit266877a2a8b2d1939f3b08fcfb711890fefc96e3
treeb426be1364c670682521b5ae2128afd7577c561a
parent0050e8f0cf5782217ebd78fa2b58be3aa9f8d9e2
[llvm-objdump] Print method name from debug info in disassembly output.

Summary:
GNU objdump prints the method name in disassembly output, and upon further investigation this seems to come from debug info, not the symbol table.

Some additional refactoring is necessary to make this work even when the line number is 0/the filename is unknown. The added test case includes a note for this scenario.

See http://llvm.org/PR41341 for more info.

Reviewers: dblaikie, MaskRay, jhenderson

Reviewed By: MaskRay

Subscribers: ormris, jvesely, aprantl, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74507
llvm/test/tools/llvm-objdump/AMDGPU/source-lines.ll
llvm/test/tools/llvm-objdump/Hexagon/source-interleave-hexagon.ll
llvm/test/tools/llvm-objdump/X86/source-interleave-function-from-debug.test [new file with mode: 0644]
llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.test
llvm/test/tools/llvm-objdump/embedded-source.test
llvm/tools/llvm-objdump/llvm-objdump.cpp