[clang] [Clang][OpenMP] Clang adding the addrSpace according to DataLayout fix (PR #65483)
Johannes Doerfert via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 6 07:28:47 PDT 2023
================
@@ -3362,6 +3362,8 @@ Address CGOpenMPRuntimeGPU::getAddressOfLocalVariable(CodeGenFunction &CGF,
break;
case OMPAllocateDeclAttr::OMPLargeCapMemAlloc:
case OMPAllocateDeclAttr::OMPCGroupMemAlloc:
+ if (VD->hasGlobalStorage())
+ AS = getLangASFromTargetAS(CGF.CGM.getModule().getDataLayout().getDefaultGlobalsAddressSpace());
----------------
jdoerfert wrote:
This function is only for globals, so we don't need to check VD after all.
https://github.com/llvm/llvm-project/pull/65483
More information about the cfe-commits
mailing list