[clang] [OpenMP] Prevent AMDGPU from overriding visibility on DT_nohost variables (PR #68264)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 5 08:31:06 PDT 2023
================
@@ -308,12 +308,13 @@ static bool requiresAMDGPUProtectedVisibility(const Decl *D,
if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility)
return false;
- return D->hasAttr<OpenCLKernelAttr>() ||
- (isa<FunctionDecl>(D) && D->hasAttr<CUDAGlobalAttr>()) ||
- (isa<VarDecl>(D) &&
- (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>() ||
- cast<VarDecl>(D)->getType()->isCUDADeviceBuiltinSurfaceType() ||
- cast<VarDecl>(D)->getType()->isCUDADeviceBuiltinTextureType()));
+ return !D->hasAttr<OMPDeclareTargetDeclAttr>() &&
----------------
jhuber6 wrote:
Not here, above there's an extra line. I'll fix that before I land, not worth force pushing.
https://github.com/llvm/llvm-project/pull/68264
More information about the cfe-commits
mailing list