[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
================
@@ -1202,6 +1249,17 @@ void CallOp::print(OpAsmPrinter &p) {
auto callee = getCallee();
bool isDirect = callee.has_value();
+ LLVMFunctionType calleeType;
+ bool isVarArg;
+
+ std::optional<LLVMFunctionType> optionalCalleeType = getCalleeType();
+ if (optionalCalleeType.has_value()) {
+ calleeType = *optionalCalleeType;
+ isVarArg = calleeType.isVarArg();
+ } else {
+ isVarArg = false;
+ }
----------------
Dinistro wrote:
```suggestion
bool isVarArg = false;
if (std::optional<LLVMFunctionType> optionalCalleeType = getCalleeType()) {
calleeType = *optionalCalleeType;
isVarArg = calleeType.isVarArg();
}
```
https://github.com/llvm/llvm-project/pull/67274
More information about the Mlir-commits
mailing list