[Mlir-commits] [mlir] [MLIR][LLVM] Add vararg support in LLVM::LLVMFuncOp (PR #67274)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Tue Sep 26 00:20:54 PDT 2023


================
@@ -1148,14 +1201,8 @@ LogicalResult CallOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
   if (!funcType)
     return emitOpError("callee does not have a functional type: ") << fnType;
 
-  // Indirect variadic function calls are not supported since the translation to
-  // LLVM IR reconstructs the LLVM function type from the argument and result
-  // types. An additional type attribute that stores the LLVM function type
-  // would be needed to distinguish normal and variadic function arguments.
-  // TODO: Support indirect calls to variadic function pointers.
-  if (isIndirect && funcType.isVarArg())
-    return emitOpError()
-           << "indirect calls to variadic functions are not supported";
+  if (funcType.isVarArg() && !getCalleeType().has_value())
+    return emitOpError() << "Missing callee type attribute for vararg call";
----------------
ftynse wrote:

Also nit: don't start error messages with a capital.

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


More information about the Mlir-commits mailing list