[llvm-objdump] Print target address with evaluateMemoryOperandAddress()
authorFangrui Song <maskray@google.com>
Thu, 23 Apr 2020 23:06:07 +0000 (16:06 -0700)
committerFangrui Song <maskray@google.com>
Mon, 27 Apr 2020 16:43:51 +0000 (09:43 -0700)
commit3c9c9c1768fdca3fb06c96cc982d9fd240689a1b
treee55338516adcdedff51ac8ff113cf465ebd11177
parent5c03beefa720bddb3e3f53c595a76bce7ad50f37
[llvm-objdump] Print target address with evaluateMemoryOperandAddress()

D63847 added `MCInstrAnalysis::evaluateMemoryOperandAddress()`. This patch
leverages the feature to print the target addresses for evaluable instructions.

```
-400a: movl 4080(%rip), %eax
+400a: movl 4080(%rip), %eax  # 5000 <data1>
```

This patch also deletes `MIA->isCall(Inst) || MIA->isUnconditionalBranch(Inst) || MIA->isConditionalBranch(Inst)`
which is used to guard `MCInstrAnalysis::evaluateBranch()`

Reviewed By: jhenderson, skan

Differential Revision: https://reviews.llvm.org/D78776
llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
llvm/test/MC/X86/tlsdesc-64.s
llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-references.yaml
llvm/tools/llvm-objdump/llvm-objdump.cpp