mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 05:00:39 +00:00
[TableGen] more helpful error message in MapTableEmitter
Differential Revision: http://reviews.llvm.org/D17275 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b738b28f97
commit
5dae380620
@ -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