Skip to content

Commit 7d29b71

Browse files
committed
use notifyMatchFailure
1 parent d94e2d1 commit 7d29b71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ struct ArithOpToAPFloatConversion final : OpRewritePattern<OpTy> {
5454
PatternRewriter &rewriter) const override {
5555
auto moduleOp = op->template getParentOfType<ModuleOp>();
5656
if (!moduleOp) {
57-
op.emitError("arith op must be contained within a builtin.module");
58-
return failure();
57+
return rewriter.notifyMatchFailure(
58+
op, "arith op must be contained within a builtin.module");
5959
}
6060
// Get APFloat function from runtime library.
6161
FailureOr<Operation *> fn =

0 commit comments

Comments
 (0)