================
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const 
VarDecl *D) {
     LangAS AS;
     if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS))
       return AS;
+    if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV())
----------------
sarnex wrote:

BTW codegen already does the right thing because of 
[this](https://github.com/llvm/llvm-project/blob/10bef367a5643bc41d0172b02e080645c68f821a/clang/lib/CodeGen/CodeGenModule.cpp#L5394)
 code in GetGlobalConstantAddressSpace, and `CodeGenOpenCL/str_literals.cl` 
already locks it down, so the OpenCL part of my change is basically NFC.

https://github.com/llvm/llvm-project/pull/134399
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to