diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2020-01-16 17:57:10 -0500 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2020-01-16 18:12:50 -0500 |
| commit | 25b542c61fe364fa86163723b9e35cb7db28bcb4 (patch) | |
| tree | b102c9d65a21bbc473d77987672803665b78c58c /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 9b549f26fab6900b5328c0c6239fd77c7527159c (diff) | |
[OPENMP]Do not emit RTTI descriptor for NVPTX devices.
Need to disable emission of RTTI descriptors for NVPTX devices to be
able to use dynamic classes without unresolved symbols at link stage.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index feb8d000eca3..e347f3b6f7e0 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -5762,7 +5762,9 @@ llvm::Constant *CodeGenModule::GetAddrOfRTTIDescriptor(QualType Ty, // Return a bogus pointer if RTTI is disabled, unless it's for EH. // FIXME: should we even be calling this method if RTTI is disabled // and it's not for EH? - if ((!ForEH && !getLangOpts().RTTI) || getLangOpts().CUDAIsDevice) + if ((!ForEH && !getLangOpts().RTTI) || getLangOpts().CUDAIsDevice || + (getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice && + getTriple().isNVPTX())) return llvm::Constant::getNullValue(Int8PtrTy); if (ForEH && Ty->isObjCObjectPointerType() && |
