[Mlir-commits] [mlir] 4b211b9 - [mlir][drr] Make error easier to understand
Jacques Pienaar
llvmlistbot at llvm.org
Sun Aug 9 18:02:20 PDT 2020
Author: Jacques Pienaar
Date: 2020-08-09T18:02:08-07:00
New Revision: 4b211b94d71386d249e2004c817a9bb659634c2b
URL: https://github.com/llvm/llvm-project/commit/4b211b94d71386d249e2004c817a9bb659634c2b
DIFF: https://github.com/llvm/llvm-project/commit/4b211b94d71386d249e2004c817a9bb659634c2b.diff
LOG: [mlir][drr] Make error easier to understand
Changes error from
error: referencing unbound symbol ''
to
error: raw string not supported as argument
Added:
Modified:
mlir/tools/mlir-tblgen/RewriterGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp
index fc67ec4b8c17..5025ee5216dd 100644
--- a/mlir/tools/mlir-tblgen/RewriterGen.cpp
+++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp
@@ -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(),
More information about the Mlir-commits
mailing list