================
@@ -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);
----------------
arsenm wrote:
This seems like extra steps around directly calling
getContext().getTargetAddressSpace(LangAS::opencl_private)
But more importantly, I would expect this to have been handled by the target
API lowering code. The language wouldn't factor in
https://github.com/llvm/llvm-project/pull/113930
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits