[PATCH] D77449: [MLIR] Cleanup mlir-tblgen error messages for custom assembly formats.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 4 00:52:44 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/tools/mlir-tblgen/OpFormatGen.cpp:1383
+                       "', is not buildable and a buildable type cannot " +
+                       "be inferred from other types.  Suggest adding a " +
+                       "type constraint to the operation or adding a " +
----------------
stephenneuendorffer wrote:
> rriddle wrote:
> > If we are going to have suggestions, they should likely be notes instead of lumped together with the error message.
> This is in Tablegen, which doesn't have the normal reporting infrastructure.  Are you suggesting changing that?
Notes are a builtin concept, we just need to use DK_Note as the message type when printing the message to the source manager. We could add an optional Twine for a note diagnostic to the emitError function.

https://github.com/llvm/llvm-project/blob/62f3a9650a9f289a07a5f480764fb655178c2334/mlir/tools/mlir-tblgen/OpFormatGen.cpp#L1092



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77449/new/

https://reviews.llvm.org/D77449





More information about the llvm-commits mailing list