[llvm] r373514 - [TableGen] Improve error reporting of overlapping definitions (NFC)
Evandro Menezes via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 12:44:54 PDT 2019
Author: evandro
Date: Wed Oct 2 12:44:53 2019
New Revision: 373514
URL: http://llvm.org/viewvc/llvm-project?rev=373514&view=rev
Log:
[TableGen] Improve error reporting of overlapping definitions (NFC)
Modified:
llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenSchedule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenSchedule.cpp?rev=373514&r1=373513&r2=373514&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp Wed Oct 2 12:44:53 2019
@@ -1083,9 +1083,13 @@ void CodeGenSchedModels::createInstRWCla
if (RWD->getValueAsDef("SchedModel") == RWModelDef &&
RWModelDef->getValueAsBit("FullInstRWOverlapCheck")) {
for (Record *Inst : InstDefs) {
- PrintFatalError(InstRWDef->getLoc(), "Overlapping InstRW def " +
- Inst->getName() + " also matches " +
- RWD->getValue("Instrs")->getValue()->getAsString());
+ PrintFatalError
+ (InstRWDef->getLoc(),
+ "Overlapping InstRW definition for \"" +
+ Inst->getName() +
+ "\" also matches previous \"" +
+ RWD->getValue("Instrs")->getValue()->getAsString() +
+ "\".");
}
}
}
@@ -1115,9 +1119,13 @@ void CodeGenSchedModels::createInstRWCla
for (Record *OldRWDef : SchedClasses[OldSCIdx].InstRWs) {
if (OldRWDef->getValueAsDef("SchedModel") == RWModelDef) {
for (Record *InstDef : InstDefs) {
- PrintFatalError(OldRWDef->getLoc(), "Overlapping InstRW def " +
- InstDef->getName() + " also matches " +
- OldRWDef->getValue("Instrs")->getValue()->getAsString());
+ PrintFatalError
+ (InstRWDef->getLoc(),
+ "Overlapping InstRW definition for \"" +
+ InstDef->getName() +
+ "\" also matches previous \"" +
+ OldRWDef->getValue("Instrs")->getValue()->getAsString() +
+ "\".");
}
}
assert(OldRWDef != InstRWDef &&
More information about the llvm-commits
mailing list