================ @@ -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; if (llvm::Constant *C = Emitter.tryEmitForInitializer(ExprToVisit, AS, ArrayQTy)) { auto GV = new llvm::GlobalVariable( ---------------- svenvh wrote:
It seems to have worked indeed, but we should probably adjust the address space of `ArrayQTy` everywhere then? I'll upload a new revision to do so. 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