[Mlir-commits] [mlir] [mlir][EmitC] Create a pass to add a reflection map to a class (PR #205464)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Jul 15 00:12:15 PDT 2026
================
----------------
banach-space wrote:
> How would I check for the match failure?
You don't :)
We know that the pass is run, that's implicit from the `RUN` line:
```mlir
// RUN: mlir-opt -split-input-file --mlgo-add-reflection-map="field-attr-name=emitc.field_ref
```
If the IR does not change and the test does not "crash" (it does not, otherwise `RUN` would fail), then it follows that a "match failure" took place. There is just no other option. However, it's more idiomatic to say "it bails out" rather than "match failure", because:
* The "class" Op would still be matched, but
* The pattern bails out as there are no fields.
https://github.com/llvm/llvm-project/pull/205464
More information about the Mlir-commits
mailing list