diff options
author | Dominik Adamski <dominik.adamski@amd.com> | 2024-07-18 09:00:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-18 09:00:09 +0200 |
commit | 14c323cfd66454c65324c4d5b9d9b6a9c5651eca (patch) | |
tree | b013640ef6b0de081204dd5e4b5547fe3150760a /clang/lib/CodeGen/CodeGenModule.h | |
parent | 0ce3ea1bfffcbd62195cf07e34477cc7cc5c5009 (diff) | |
download | llvm-14c323cfd66454c65324c4d5b9d9b6a9c5651eca.zip llvm-14c323cfd66454c65324c4d5b9d9b6a9c5651eca.tar.gz llvm-14c323cfd66454c65324c4d5b9d9b6a9c5651eca.tar.bz2 |
[OpenMP][AMDGPU] Do not attach -fcuda-is-device (#99002)
-fcuda-is-device flag is not used for OpenMP offloading for AMD GPUs and
it does not need to be added as clang cc1 option for OpenMP code.
This PR has the same functionality as
https://github.com/llvm/llvm-project/pull/96909 but it doesn't introduce
regression for virtual function support.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index caa3786..657e681 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1010,7 +1010,7 @@ public: bool shouldEmitRTTI(bool ForEH = false) { return (ForEH || getLangOpts().RTTI) && !getLangOpts().CUDAIsDevice && !(getLangOpts().OpenMP && getLangOpts().OpenMPIsTargetDevice && - getTriple().isNVPTX()); + (getTriple().isNVPTX() || getTriple().isAMDGPU())); } /// Get the address of the RTTI descriptor for the given type. |