diff options
author | Arthur Eubanks <aeubanks@google.com> | 2024-03-21 15:48:35 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 14:48:35 -0700 |
commit | b19bf3e888f95c35bf641cd0eee18a8da702f6fe (patch) | |
tree | 4c044c879094a846b4b2ea922bea1e187f1879bf /clang/lib | |
parent | cde54df39cab3a1d60a3e1862ab341609bee3cc3 (diff) | |
download | llvm-b19bf3e888f95c35bf641cd0eee18a8da702f6fe.zip llvm-b19bf3e888f95c35bf641cd0eee18a8da702f6fe.tar.gz llvm-b19bf3e888f95c35bf641cd0eee18a8da702f6fe.tar.bz2 |
[clang][SPIRV] Don't warn on -mcmodel (#86039)
The code model doesn't affect the sub-compilation, so don't check it.
Followup to #70740.
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/ToolChains/Clang.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index bc9cc8c..86a287d 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -5863,8 +5863,8 @@ 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()) { - // NVPTX/AMDGPU does not care about the code model and will accept + } else if (Triple.isNVPTX() || Triple.isAMDGPU() || Triple.isSPIRV()) { + // NVPTX/AMDGPU/SPIRV does not care about the code model and will accept // whatever works for the host. Ok = true; } else if (Triple.isSPARC64()) { |