[clang] [llvm] [LLVMABI][AARCH64] Handle condtions for ignoring empty types (PR #224476)
Madhur Amilkanthwar via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 17 23:17:25 PDT 2026
================
@@ -94,7 +94,11 @@ ArgInfo AArch64TargetInfo::classifyReturnType(const Type *RetTy,
return ArgInfo::getDirect();
}
- // TODO: Handle empty records and zero-size non-SVE types.
+ TypeSize TySize = RetTy->getSizeInBits();
----------------
madhur13490 wrote:
nit: this and lines 158–161 are now near-identical. A file-local helper would keep them from drifting apart:
```
/// Returns true if \p Ty is an empty record or a zero-sized non-SVE type,
/// which AAPCS64 may pass as nothing.
static bool isEmptyOrZeroSizeNonSVE(const Type *Ty);
```
Also, the return path gets no comment at all, yet "always ignored here, regardless of language mode" is the surprising half of the patch. One line noting the asymmetry with the argument path would earn its keep.
https://github.com/llvm/llvm-project/pull/224476
More information about the cfe-commits
mailing list