[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 21 13:44:42 PDT 2024


================
@@ -5804,7 +5804,7 @@ 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() || Triple.isAMDGPU()) {
+    } else if (Triple.isNVPTX() || Triple.isAMDGPU() || Triple.isSPIRV()) {
       // NVPTX/AMDGPU does not care about the code model and will accept
----------------
MaskRay wrote:

Should the comment be updated?

https://github.com/llvm/llvm-project/pull/86039


More information about the cfe-commits mailing list