1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Fix Name Access

Get the Record name by string explicitly to avoid potential asserts.

llvm-svn: 142514
This commit is contained in:
David Greene 2011-10-19 13:03:45 +00:00
parent 3d92f7b8df
commit 9647006543

View File

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