[clang] [llvm] [clang][SPARC] Match zero-size struct lowering with GCC's (PR #217065)
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 15 04:07:12 PST 2026
================
@@ -420,12 +435,11 @@ ABIArgInfo SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit,
CoerceBuilder CB(VMContext, getDataLayout(), IsVarArg);
CB.addStruct(0, StrTy);
+
// All structs, even empty ones, should take up a register argument slot,
// so pin the minimum struct size to one bit.
- CB.pad(llvm::alignTo(
- std::max(CB.DL.getTypeSizeInBits(StrTy).getKnownMinValue(), uint64_t(1)),
- 64));
- RegOffset += PaddingSlots + CB.Size / 64;
----------------
s-barannikov wrote:
Not sure where why did this have to go?
https://github.com/llvm/llvm-project/pull/217065
More information about the cfe-commits
mailing list