[clang] fix: compatible C++ empty record with align UB with gcc (PR #72197)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 20 12:39:33 PST 2023
================
@@ -307,7 +307,13 @@ 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 for compatible,
----------------
efriedma-quic wrote:
For compatibility with what?
https://github.com/llvm/llvm-project/pull/72197
More information about the cfe-commits
mailing list