[clang] [llvm] [LLVMABI][AARCH64] Handle conditions for ignoring empty types (PR #224476)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 03:15:21 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,
----------------
smithp35 wrote:

AFAIK Darwin uses a modified version of the AAPCS. The only public document that I know of is https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Pass-arguments-to-functions-correctly 

> Functions may ignore parameters that contain empty struct types. This behavior applies to the GNU extension in C and, where permitted by the language, in C++. The AArch64 documentation doesn’t address the issue of empty structures as parameters, but Apple chose this path for its implementation.

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


More information about the llvm-commits mailing list