================ @@ -307,7 +307,12 @@ AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadic, // 0. if (IsEmpty && Size == 0) return ABIArgInfo::getIgnore(); - return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext())); + // An empty struct can have size greater than one byte if alignment is + // involved. + // When size <= 64, we still hold it by i8 in IR and lowering to registers. + // When Size > 64, just fall through to avoid va_list out of sync. ---------------- rjmccall wrote:
Yes, I intended that as a suggestion for the comment, and you're welcome to include it verbatim. I agree with Eli that I'd like to understand why we need to have this `i8` carve-out. https://github.com/llvm/llvm-project/pull/72197 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits