aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <werquinigo@nvidia.com>2025-09-19 14:14:20 -0400
committerGitHub <noreply@github.com>2025-09-19 14:14:20 -0400
commit9ba844eb3a21d461c3adc7add7691a076c6992fc (patch)
tree9c1d763aba5970a732a8f90a9b363cb1c61fd962 /llvm/lib/Object/ELFObjectFile.cpp
parentfc73ef42c92bf50547d5a069e98459a4a5615872 (diff)
downloadllvm-9ba844eb3a21d461c3adc7add7691a076c6992fc.zip
llvm-9ba844eb3a21d461c3adc7add7691a076c6992fc.tar.gz
llvm-9ba844eb3a21d461c3adc7add7691a076c6992fc.tar.bz2
[ELF][LLDB] Add an nvsass triple (#159459)
When handling CUDA ELF files via objdump or LLDB, the ELF parser in LLVM needs to distinguish if an ELF file is sass or not, which requires a triple for sass to exist in llvm. This patch includes all the necessary changes for LLDB and objdump to correctly identify these files with the correct triple.
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ELFObjectFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp
index f9fda23..f083efe 100644
--- a/llvm/lib/Object/ELFObjectFile.cpp
+++ b/llvm/lib/Object/ELFObjectFile.cpp
@@ -438,7 +438,7 @@ std::optional<StringRef> ELFObjectFileBase::tryGetCPUName() const {
case ELF::EM_AMDGPU:
return getAMDGPUCPUName();
case ELF::EM_CUDA:
- return getNVPTXCPUName();
+ return getCUDACPUName();
case ELF::EM_PPC:
case ELF::EM_PPC64:
return StringRef("future");
@@ -620,7 +620,7 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
}
}
-StringRef ELFObjectFileBase::getNVPTXCPUName() const {
+StringRef ELFObjectFileBase::getCUDACPUName() const {
assert(getEMachine() == ELF::EM_CUDA);
unsigned SM = getEIdentABIVersion() == ELF::ELFABIVERSION_CUDA_V1
? getPlatformFlags() & ELF::EF_CUDA_SM