diff options
author | Nick Sarnie <nick.sarnie@intel.com> | 2025-03-28 10:19:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-28 14:19:20 +0000 |
commit | 48b753027382a5815295d6680c7dd407be936c86 (patch) | |
tree | f5a9d6ab54ccceeb39de839a6280bb50ba89df42 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 427725508b084c7aa595312967d74d8888b168b6 (diff) | |
download | llvm-48b753027382a5815295d6680c7dd407be936c86.zip llvm-48b753027382a5815295d6680c7dd407be936c86.tar.gz llvm-48b753027382a5815295d6680c7dd407be936c86.tar.bz2 |
[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 <nick.sarnie@intel.com>
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<TargetOptions>(); TO->Triple = llvm::Triple::normalize(getFrontendOpts().AuxTriple); |