mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[TableGen] more helpful error message in MapTableEmitter
Differential Revision: http://reviews.llvm.org/D17275 llvm-svn: 263148
This commit is contained in:
parent
93e85e1cbb
commit
8e5624582d
@ -337,10 +337,20 @@ Record *MapTableEmitter::getInstrForColumn(Record *KeyInstr,
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user