[llvm] [ELF] Correctly set the `nvptx` triple from `makeTriple()` (PR #76970)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 10:19:34 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;
----------------
dwblaikie wrote:
Generally the test should go with the patch that introduces the change in behavior. If the change in behavior is unreachable/untestable without some other changes, then they should go together so test coverage is clear (otherwise it's hard to track that the patch did eventually get tested).
Sure - an NFC change would be good - no need to send it for review, you can commit that directly.
https://github.com/llvm/llvm-project/pull/76970
More information about the llvm-commits
mailing list