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/CodeGen/CodeGenModule.h | |
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/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 6deb467..46de3d86 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1073,10 +1073,8 @@ public: // Return whether RTTI information should be emitted for this target. bool shouldEmitRTTI(bool ForEH = false) { - return (ForEH || getLangOpts().RTTI) && !getLangOpts().CUDAIsDevice && - !(getLangOpts().OpenMP && getLangOpts().OpenMPIsTargetDevice && - (getTriple().isNVPTX() || getTriple().isAMDGPU() || - getTriple().isSPIRV())); + return (ForEH || getLangOpts().RTTI) && + (!getLangOpts().isTargetDevice() || !getTriple().isGPU()); } /// Get the address of the RTTI descriptor for the given type. |