diff options
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 5dc25e9..1e5b55f 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -1694,8 +1694,9 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) { } else { // Otherwise, a def inside a multiclass, add it to the multiclass. for (unsigned i = 0, e = CurMultiClass->DefPrototypes.size(); i != e; ++i) - if (CurMultiClass->DefPrototypes[i]->getName() == CurRec->getName()) { - Error(DefLoc, "def '" + CurRec->getName() + + if (CurMultiClass->DefPrototypes[i]->getNameInit() + == CurRec->getNameInit()) { + Error(DefLoc, "def '" + CurRec->getNameInitAsString() + "' already defined in this multiclass!"); return true; } |