================
@@ -2801,6 +2845,19 @@ CIRABIRewriteContext::rewriteVAArg(mlir::Operation 
*vaArgOp,
     return mlir::success();
   }
 
+  // A va_list that is a single pointer walks one buffer of fixed-size slots.
+  auto vaListTy = mlir::cast<cir::PointerType>(valist.getType()).getPointee();
+  if (mlir::isa<cir::PointerType>(vaListTy) && isSlotFetch(ac)) {
+    // A value smaller than its slot would sit right-adjusted on big-endian.
+    if (cirDataLayout.isBigEndian())
+      return reportVAArgNYI(op, "a slot on a big-endian target");
+    builder.setInsertionPoint(op);
+    uint64_t slotSize = ac.directAlign->value();
----------------
andykaylor wrote:

Thanks! This will make my rebase much easier.

https://github.com/llvm/llvm-project/pull/244116
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to