[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)
Oliver Stannard via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 29 08:45:51 PST 2025
================
@@ -588,7 +615,8 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy, bool isVariadic,
// Otherwise this is an AAPCS variant.
- if (isEmptyRecord(getContext(), RetTy, true))
+ if (isEmptyRecord(getContext(), RetTy, true) ||
+ getContext().getTypeSize(RetTy) == 0)
----------------
ostannard wrote:
This is needed for the `SortOfEmpty` case, which isn't considered empty, but does have size 0.
https://github.com/llvm/llvm-project/pull/124762
More information about the cfe-commits
mailing list