Author: Pravin Jagtap Date: 2023-10-31T18:07:40+05:30 New Revision: ab1c97b6510c4ce4643469191080a16b4007244d
URL: https://github.com/llvm/llvm-project/commit/ab1c97b6510c4ce4643469191080a16b4007244d DIFF: https://github.com/llvm/llvm-project/commit/ab1c97b6510c4ce4643469191080a16b4007244d.diff LOG: [AMDGPU] Accept/Ignore any -mcmodel arguments. (#70760) Authored-by: Pravin Jagtap <pravin.jag...@amd.com> Added: Modified: clang/lib/Driver/ToolChains/Clang.cpp Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index fb90fcd033b1ac3..79f7fba22570746 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -5743,9 +5743,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } else if (Triple.getArch() == llvm::Triple::x86_64) { Ok = llvm::is_contained({"small", "kernel", "medium", "large", "tiny"}, CM); - } else if (Triple.isNVPTX()) { - // NVPTX does not care about the code model and will accept whatever works - // for the host. + } else if (Triple.isNVPTX() || Triple.isAMDGPU()) { + // NVPTX/AMDGPU does not care about the code model and will accept + // whatever works for the host. Ok = true; } if (Ok) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits