================
@@ -1648,6 +1648,8 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI) {
   // Add type for sret argument.
   if (IRFunctionArgs.hasSRetArg()) {
     QualType Ret = FI.getReturnType();
+    if (CGM.getLangOpts().OpenCL)
+      Ret = getContext().getAddrSpaceQualType(Ret, LangAS::opencl_private);
     unsigned AddressSpace = CGM.getTypes().getTargetAddressSpace(Ret);
----------------
AlexVlx wrote:
That's a reasonable expectation but it's not handled at the moment, and it 
appears that people just gave up on it and relied on the terrible 
PrivateIsDefault AS maps. I'm not really adding much functionality here, just 
ensuring that we can safely survive moving away from that.

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

Reply via email to