================ @@ -3014,6 +3014,16 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE, /*isNamedArg*/false); + // Empty records are ignored for parameter passing purposes. + if (AI.isIgnore()) { + CharUnits Align = CGF.getContext().getTypeAlignInChars(Ty); + VAListAddr = CGF.Builder.CreateStructGEP(VAListAddr, 2); + llvm::Value *Load = CGF.Builder.CreateLoad(VAListAddr); + llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int32Ty, 0); + Load = CGF.Builder.CreateGEP(CGF.Int8Ty, Load, Offset); + return Address(Load, CGF.ConvertTypeForMem(Ty), Align); ---------------- efriedma-quic wrote:
CGF.CreateMemTemp() https://github.com/llvm/llvm-project/pull/77907 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits