[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

Longsheng Mou via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 13 02:00:50 PST 2024


================
@@ -2989,6 +2989,11 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction &CGF,
   // an 8 byte boundary.
 
   uint64_t SizeInBytes = (CGF.getContext().getTypeSize(Ty) + 7) / 8;
+
+  if (isEmptyRecord(CGF.getContext(), Ty, true)) {
+    SizeInBytes = 0;
+  }
+
----------------
CoTinker wrote:

done

https://github.com/llvm/llvm-project/pull/77907


More information about the cfe-commits mailing list