[Mlir-commits] [mlir] [MLIR][LLVM] Add vararg support in LLVM::LLVMFuncOp (PR #67274)
Christian Ulmann
llvmlistbot at llvm.org
Tue Sep 26 00:07:22 PDT 2023
================
@@ -1262,6 +1325,18 @@ static ParseResult parseCallTypeAndResolveOperands(
if (funcType.getNumResults() != 0)
result.addTypes(funcType.getResults());
+ if (!isVarArg) {
+ Type returnType;
+ if (funcType.getNumResults() == 0)
+ returnType = LLVM::LLVMVoidType::get(result.getContext());
+ else
+ returnType = funcType.getResult(0);
+ result.addAttribute(
+ "callee_type",
+ TypeAttr::get(LLVM::LLVMFunctionType::get(
+ returnType, funcType.getInputs(), /*isVarArg*/ false)));
----------------
Dinistro wrote:
```suggestion
returnType, funcType.getInputs(), /*isVarArg=*/false)));
```
https://github.com/llvm/llvm-project/pull/67274
More information about the Mlir-commits
mailing list