[clang] [mlir] [CIR] Lower variadic calls in CallConvLowering for x86_64 (PR #213315)

Adam Smith via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 2 21:40:06 PDT 2026


================
@@ -428,15 +502,17 @@ classifyFunction(cir::FuncOp func, const DataLayout &dl,
           << "' (CallConvLowering driver mode 'classification-attr')";
       return std::nullopt;
     }
-    return mlir::abi::test::parseClassificationAttr(
-        attr, [&]() { return func.emitOpError(); });
+    return withReturnVoidness(mlir::abi::test::parseClassificationAttr(
----------------
adams381 wrote:

The only way to reach here is hand-written CIR.  For example, that's how `coerce-vector-to-complex.cir` tests a vector coercion the x86_64 path would refuse to even consider.  There are about 20 other tests that use it.

This PR added a `returnsVoid` field to the classification, because a void return and a return the ABI throws away were previously indistinguishable and needed opposite handling.  The x86_64 classifier fills that field in itself.  The test drivers can't, since neither knows what CIR's void looks like, so the pass fills it in on their behalf.  That's the wrapper.

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


More information about the cfe-commits mailing list