================
@@ -536,6 +536,8 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, 
llvm::ArrayType *AType,
     CodeGen::CodeGenModule &CGM = CGF.CGM;
     ConstantEmitter Emitter(CGF);
     LangAS AS = ArrayQTy.getAddressSpace();
+    if (CGF.getLangOpts().OpenCL)
+      AS = LangAS::opencl_constant;
----------------
efriedma-quic wrote:

That's true as far as it goes, but I'd prefer to make this a bit more general...

It looks like there's an existing GetGlobalConstantAddressSpace() which 
computes what we want here?

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

Reply via email to