diff options
| author | River Riddle <riverriddle@google.com> | 2019-11-12 11:57:47 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-11-12 11:59:19 -0800 |
| commit | 626e1fd95e626c47154c5fe5d546f3d36b39e319 (patch) | |
| tree | 5b2172eb1f88ed79c97bae056456b95b45332eca /mlir/test/lib/TestDialect/TestDialect.h | |
| parent | aa9dc9446e21b0de1389d460a41867ade7bc4683 (diff) | |
| download | bcm5719-llvm-626e1fd95e626c47154c5fe5d546f3d36b39e319.tar.gz bcm5719-llvm-626e1fd95e626c47154c5fe5d546f3d36b39e319.zip | |
Add an option to print an operation if a diagnostic is emitted on it
It is often helpful to inspect the operation that the error/warning/remark/etc. originated from, especially in the context of debugging or in the case of a verifier failure. This change adds an option 'mlir-print-op-on-diagnostic' that attaches the operation as a note to any diagnostic that is emitted on it via Operation::emit(Error|Warning|Remark). In the case of an error, the operation is printed in the generic form.
PiperOrigin-RevId: 280021438
Diffstat (limited to 'mlir/test/lib/TestDialect/TestDialect.h')
| -rw-r--r-- | mlir/test/lib/TestDialect/TestDialect.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mlir/test/lib/TestDialect/TestDialect.h b/mlir/test/lib/TestDialect/TestDialect.h index 5be1c108f23..f10b9845680 100644 --- a/mlir/test/lib/TestDialect/TestDialect.h +++ b/mlir/test/lib/TestDialect/TestDialect.h @@ -42,13 +42,14 @@ public: /// Get the canonical string name of the dialect. static StringRef getDialectName() { return "test"; } - LogicalResult verifyRegionArgAttribute(Operation *, unsigned regionIndex, + LogicalResult verifyOperationAttribute(Operation *op, + NamedAttribute namedAttr) override; + LogicalResult verifyRegionArgAttribute(Operation *op, unsigned regionIndex, unsigned argIndex, - NamedAttribute) override; - - LogicalResult verifyRegionResultAttribute(Operation *, unsigned regionIndex, + NamedAttribute namedAttr) override; + LogicalResult verifyRegionResultAttribute(Operation *op, unsigned regionIndex, unsigned resultIndex, - NamedAttribute) override; + NamedAttribute namedAttr) override; }; #define GET_OP_CLASSES |

