From 53b6a169e453a2a91d3713ca16fa089853c670a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Fri, 21 Jul 2023 16:50:10 +0200 Subject: [SPIR-V] Add SPIR-V logical triple. Clang implements SPIR-V with both Physical32 and Physical64 addressing models. This commit adds a new triple value for the Logical addressing model. Differential Revision: https://reviews.llvm.org/D155978 --- clang/lib/Frontend/CompilerInvocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 51644e8..73a3d31 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4143,7 +4143,8 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, // Validate options for HLSL if (Opts.HLSL) { - bool SupportedTarget = T.getArch() == llvm::Triple::dxil && + bool SupportedTarget = (T.getArch() == llvm::Triple::dxil || + T.getArch() == llvm::Triple::spirv) && T.getOS() == llvm::Triple::ShaderModel; if (!SupportedTarget) Diags.Report(diag::err_drv_hlsl_unsupported_target) << T.str(); -- cgit v1.1