aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorEmma Pilkington <emma.pilkington95@gmail.com>2024-02-01 11:26:42 -0500
committerGitHub <noreply@github.com>2024-02-01 11:26:42 -0500
commit4eb0810922a8d6ad9a32fbf09326166317dc5c08 (patch)
tree286a81abcde4ab4b6aecbee3822f45b3b9bd289d /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentbed3608c22fbd3afbdbc782f04e8c9c6e6e8fa18 (diff)
downloadllvm-4eb0810922a8d6ad9a32fbf09326166317dc5c08.zip
llvm-4eb0810922a8d6ad9a32fbf09326166317dc5c08.tar.gz
llvm-4eb0810922a8d6ad9a32fbf09326166317dc5c08.tar.bz2
[llvm-objdump][AMDGPU] Pass ELF ABIVersion through disassembler (#78907)
Admittedly, its a bit ugly to pass the ABIVersion through onSymbolStart but I'm not sure what a better place for it would be.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index a80f4c2..7f57713 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -913,6 +913,9 @@ DisassemblerTarget::DisassemblerTarget(const Target *TheTarget, ObjectFile &Obj,
if (!DisAsm)
reportError(Obj.getFileName(), "no disassembler for target " + TripleName);
+ if (auto *ELFObj = dyn_cast<ELFObjectFileBase>(&Obj))
+ DisAsm->setABIVersion(ELFObj->getEIdentABIVersion());
+
InstrAnalysis.reset(TheTarget->createMCInstrAnalysis(InstrInfo.get()));
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();