[PATCH] D17275: [TableGen] more helpful error message in MapTableEmitter
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 10:57:03 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL263148: [TableGen] more helpful error message in MapTableEmitter (authored by nha).
Changed prior to commit:
http://reviews.llvm.org/D17275?vs=48008&id=50311#toc
Repository:
rL LLVM
http://reviews.llvm.org/D17275
Files:
llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
Index: llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
+++ llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
@@ -337,10 +337,20 @@
}
if (MatchFound) {
- if (MatchInstr) // Already had a match
+ if (MatchInstr) {
+ // Already had a match
// Error if multiple matches are found for a column.
+ std::string KeyValueStr;
+ for (Init *Value : KeyValue) {
+ if (!KeyValueStr.empty())
+ KeyValueStr += ", ";
+ KeyValueStr += Value->getAsString();
+ }
+
PrintFatalError("Multiple matches found for `" + KeyInstr->getName() +
- "', for the relation `" + InstrMapDesc.getName());
+ "', for the relation `" + InstrMapDesc.getName() + "', row fields [" +
+ KeyValueStr + "], column `" + CurValueCol->getAsString() + "'");
+ }
MatchInstr = CurInstr;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17275.50311.patch
Type: text/x-patch
Size: 1009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/f4231e93/attachment.bin>
More information about the llvm-commits
mailing list