Fix Record Name Reference

Get the record name though the init to avoid an assert.

llvm-svn: 149153
This commit is contained in:
David Greene 2012-01-28 00:03:24 +00:00
parent a6958c6c4e
commit ebb006fc3d
1 changed files with 1 additions and 1 deletions

View File

@ -1775,7 +1775,7 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) {
// Top-level def definition.
// Ensure redefinition doesn't happen.
if (Records.getDef(CurRec->getName())) {
if (Records.getDef(CurRec->getNameInitAsString())) {
Error(DefLoc, "def '" + CurRec->getNameInitAsString()
+ "' already defined");
return true;