[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)
Longsheng Mou via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 21 19:04:21 PDT 2024
================
@@ -1069,6 +1069,10 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction &CGF,
auto TypeInfo = getContext().getTypeInfoInChars(Ty);
+ // Empty records are ignored for parameter passing purposes on non-Windows.
+ if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true))
+ return CGF.CreateMemTemp(Ty);
----------------
CoTinker wrote:
classifyArgumentType in X86_32 need CCState parameter, but we can not get it in this scope, because the CCState is temporarily calculated in X86_32ABIInfo::computeInfo.
https://github.com/llvm/llvm-project/pull/86075
More information about the cfe-commits
mailing list