summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/FunctionSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/FunctionSupport.cpp')
-rw-r--r--mlir/lib/IR/FunctionSupport.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlir/lib/IR/FunctionSupport.cpp b/mlir/lib/IR/FunctionSupport.cpp
index aa9965e89d1..d1ba2d30fa1 100644
--- a/mlir/lib/IR/FunctionSupport.cpp
+++ b/mlir/lib/IR/FunctionSupport.cpp
@@ -183,9 +183,8 @@ mlir::impl::parseFunctionLikeOp(OpAsmParser &parser, OperationState &result,
<< (errorMessage.empty() ? "" : ": ") << errorMessage;
// If function attributes are present, parse them.
- if (succeeded(parser.parseOptionalKeyword("attributes")))
- if (parser.parseOptionalAttrDict(result.attributes))
- return failure();
+ if (parser.parseOptionalAttrDictWithKeyword(result.attributes))
+ return failure();
// Add the attributes to the function arguments.
SmallString<8> attrNameBuf;
OpenPOWER on IntegriCloud