[llvm] [ELF] Correctly set the `nvptx` triple from `makeTriple()` (PR #76970)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 09:33:32 PST 2024
================
@@ -1349,6 +1349,13 @@ template <class ELFT> Triple::ArchType ELFObjectFile<ELFT>::getArch() const {
return Triple::UnknownArch;
}
+ case ELF::EM_CUDA: {
+ if (EF.getHeader().e_ident[ELF::EI_CLASS] == ELF::ELFCLASS32)
+ return Triple::nvptx;
+ else
+ return Triple::nvptx64;
----------------
jhuber6 wrote:
There's a test for this now in https://github.com/llvm/llvm-project/pull/76992. I can do the style NFC if needed.
https://github.com/llvm/llvm-project/pull/76970
More information about the llvm-commits
mailing list