From 14c323cfd66454c65324c4d5b9d9b6a9c5651eca Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Thu, 18 Jul 2024 09:00:09 +0200 Subject: [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. --- clang/lib/CodeGen/CodeGenModule.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.h') 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. -- cgit v1.1