[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:55 PDT 2023


================
@@ -1301,14 +1378,51 @@ ParseResult CallOp::parse(OpAsmParser &parser, OperationState &result) {
       parser.parseOptionalAttrDict(result.attributes))
     return failure();
 
+  bool isVarArg = parser.parseOptionalKeyword("vararg").succeeded();
+  if (isVarArg) {
+    if (parser.parseLParen().failed() ||
----------------
ftynse wrote:

IMO, explicit `.failed()` makes this more readable than the "true-means-error" convention that was originally borrowed from LLVM and is only used in MLIR parsers.

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


More information about the Mlir-commits mailing list