[mlir][IR][NFC] `Listener::notifyMatchFailure` returns `void` (#80704)
There are two `notifyMatchFailure` methods: one in the rewriter and one in the listener. The one in the rewriter notifies the listener and returns "failure" for convenience. The one in the listener should not return anything; it is just a notification. It can currently be abused to return "success" from the rewriter function. That would be a violation of the rewriter API rules. Also make sure that the listener is always notified about match failures, not just with `NDEBUG`. The current implementation is consistent: one `notifyMatchFailure` overload notifies only in debug mode and another one notifies all the time.
Loading
Please sign in to comment