================
@@ -752,10 +780,13 @@ RValue ARMABIInfo::EmitVAArg(CodeGenFunction &CGF,
Address VAListAddr,
CharUnits SlotSize = CharUnits::fromQuantity(4);
// Empty records are ignored for parameter passing purposes.
- if (isEmptyRecord(getContext(), Ty, true))
+ uint64_t Size = getContext().getTypeSize(Ty);
+ bool IsEmpty = isEmptyRecord(getContext(), Ty, true);
+ if ((IsEmpty || Size == 0) && shouldIgnoreEmptyArg(Ty))
return Slot.asRValue();
- CharUnits TySize = getContext().getTypeSizeInChars(Ty);
+ CharUnits TySize =
+ std::max(getContext().getTypeSizeInChars(Ty),
CharUnits::fromQuantity(1));
----------------
efriedma-quic wrote:
If we get here, we know the size isn't zero, I think?
https://github.com/llvm/llvm-project/pull/124762
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits