[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 28 11:01:35 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)
----------------
efriedma-quic wrote:

Does this change actually have any effect?

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


More information about the cfe-commits mailing list