[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

Alex Voicu via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 7 04:18:10 PST 2025


================
@@ -814,7 +816,10 @@ static ABIArgInfo classifyType(CodeGenModule &CGM, CanQualType type,
     auto &layout = CGM.getContext().getASTRecordLayout(record);
 
     if (mustPassRecordIndirectly(CGM, record))
-      return ABIArgInfo::getIndirect(layout.getAlignment(), /*byval*/ false);
+      return ABIArgInfo::getIndirect(
+          layout.getAlignment(),
+          /*AddrSpace*/ CGM.getContext().getTargetAddressSpace(LangAS::Default),
+          /*byval*/ false);
----------------
AlexVlx wrote:

Reworked altogether.

https://github.com/llvm/llvm-project/pull/114062


More information about the cfe-commits mailing list