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/Frontend/CompilerInstance.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 4e13b6c..91093d3 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -116,8 +116,7 @@ bool CompilerInstance::createTarget() { // Check whether AuxTarget exists, if not, then create TargetInfo for the // other side of CUDA/OpenMP/SYCL compilation. if (!getAuxTarget() && - (getLangOpts().CUDA || getLangOpts().OpenMPIsTargetDevice || - getLangOpts().SYCLIsDevice) && + (getLangOpts().CUDA || getLangOpts().isTargetDevice()) && !getFrontendOpts().AuxTriple.empty()) { auto TO = std::make_shared(); TO->Triple = llvm::Triple::normalize(getFrontendOpts().AuxTriple); -- cgit v1.1