Skip to content

Commit

Permalink
Fix Name Access
Browse files Browse the repository at this point in the history
Get the Record name as a string explicitly to avoid asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142517 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
greened committed Oct 19, 2011
1 parent 69a2394 commit 22dde7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/TableGen/TGParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2021,8 +2021,9 @@ bool TGParser::ResolveMulticlassDef(MultiClass &MC,
if (CurMultiClass) {
for (unsigned i = 0, e = CurMultiClass->DefPrototypes.size();
i != e; ++i)
if (CurMultiClass->DefPrototypes[i]->getName() == CurRec->getName())
return Error(DefmPrefixLoc, "defm '" + CurRec->getName() +
if (CurMultiClass->DefPrototypes[i]->getNameInit()
== CurRec->getNameInit())
return Error(DefmPrefixLoc, "defm '" + CurRec->getNameInitAsString() +
"' already defined in this multiclass!");
CurMultiClass->DefPrototypes.push_back(CurRec);

Expand Down

0 comments on commit 22dde7e

Please sign in to comment.