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

John McCall via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 10 01:25:16 PST 2024


================
@@ -800,7 +800,9 @@ static ABIArgInfo classifyExpandedType(SwiftAggLowering &lowering,
   if (lowering.empty()) {
     return ABIArgInfo::getIgnore();
   } else if (lowering.shouldPassIndirectly(forReturn)) {
-    return ABIArgInfo::getIndirect(alignmentForIndirect, /*byval*/ false);
+    return ABIArgInfo::getIndirect(alignmentForIndirect,
+                                   /*AddrSpace*/ 0,
+                                   /*byval*/ false);
----------------
rjmccall wrote:

Swift should use the general rules for the target.  Note that `forReturn` indicates whether we have an argument (false) or a return value (true).

This site is for types that are passed indirectly because they're too large; the site below is for types that are non-trivial.

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


More information about the cfe-commits mailing list