Skip to content

Commit

Permalink
[mlir][drr] Make error easier to understand
Browse files Browse the repository at this point in the history
Changes error from
  error: referencing unbound symbol ''
to
  error: raw string not supported as argument
  • Loading branch information
jpienaar committed Aug 10, 2020
1 parent f5fdb61 commit 4b211b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mlir/tools/mlir-tblgen/RewriterGen.cpp
Expand Up @@ -734,6 +734,8 @@ std::string PatternEmitter::handleLocationDirective(DagNode tree) {

std::string PatternEmitter::handleOpArgument(DagLeaf leaf,
StringRef patArgName) {
if (leaf.isStringAttr())
PrintFatalError(loc, "raw string not supported as argument");
if (leaf.isConstantAttr()) {
auto constAttr = leaf.getAsConstantAttr();
return handleConstantAttr(constAttr.getAttribute(),
Expand Down

0 comments on commit 4b211b9

Please sign in to comment.