[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:26 PDT 2026
================
@@ -144,12 +148,25 @@ ArgInfo AArch64TargetInfo::classifyArgumentType(
RecordArgABI::RAA_DirectInMemory);
}
+ // Empty records:
+ // AAPCS64 does not say that empty records are ignored as arguments,
+ // but other compilers do so in certain situations, and we copy that behavior.
+ // Those situations are in fact language-mode-specific, which seems really
+ // unfortunate, but it's something we just have to accept. If this doesn't
+ // apply, just fall through to the standard argument-handling path.
+ // Darwin overrides the psABI here to ignore all empty records in all modes.
----------------
madhur13490 wrote:
nit: this sentence explains the isDarwinPCS() check on line 162, but it's sitting five lines above the size computation. Reads better moved down next to the branch it describes.
https://github.com/llvm/llvm-project/pull/224476
More information about the cfe-commits
mailing list