From 48b753027382a5815295d6680c7dd407be936c86 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Fri, 28 Mar 2025 10:19:20 -0400 Subject: [clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (#126956) I'm adding support for SPIR-V, so let's consolidate these checks. --------- Signed-off-by: Sarnie, Nick --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 96ab4dd..5dbd50b 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -843,7 +843,7 @@ static void setVisibilityFromDLLStorageClass(const clang::LangOptions &LO, static bool isStackProtectorOn(const LangOptions &LangOpts, const llvm::Triple &Triple, clang::LangOptions::StackProtectorMode Mode) { - if (Triple.isAMDGPU() || Triple.isNVPTX()) + if (Triple.isGPU()) return false; return LangOpts.getStackProtector() == Mode; } -- cgit v1.1