[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 6 00:23:49 PST 2025
================
@@ -21,9 +21,12 @@ ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const {
// Records with non-trivial destructors/copy-constructors should not be
// passed by value.
if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
- return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
+ return getNaturalAlignIndirect(
+ Ty, getContext().getTargetAddressSpace(LangAS::Default),
+ RAA == CGCXXABI::RAA_DirectInMemory);
- return getNaturalAlignIndirect(Ty);
+ return getNaturalAlignIndirect(
+ Ty, getContext().getTargetAddressSpace(LangAS::Default));
----------------
arsenm wrote:
This should be getAllocaAddrSpace like the rest of the get*Indirect contexts?
https://github.com/llvm/llvm-project/pull/114062
More information about the cfe-commits
mailing list