[Mlir-commits] [mlir] [mlir][linalg] Fix crashes in parser on linalg ops without operands (PR #97944)
Felix Schneider
llvmlistbot at llvm.org
Sun Jul 7 04:21:08 PDT 2024
================
@@ -1356,8 +1356,10 @@ ParseResult MapOp::parse(OpAsmParser &parser, OperationState &result) {
return failure();
if (payloadOpName.has_value()) {
- addBodyWithPayloadOp(parser, result, payloadOpName.value(), payloadOpAttrs,
- ArrayRef(result.operands).drop_back());
+ if (!result.operands.empty())
----------------
ubfx wrote:
> I don't know if it will work, but maybe we can get a better error message than:
Passing an empty `ArrayRef` unfortunately doesn't work, because during creation of the region, the Element Type of the respective tensor is needed.
But adding an empty region improves the error message.
https://github.com/llvm/llvm-project/pull/97944
More information about the Mlir-commits
mailing list