[llvm-commits] [llvm] r142514 - /llvm/trunk/lib/TableGen/TGParser.cpp
David Greene
greened at obbligato.org
Wed Oct 19 06:03:45 PDT 2011
Author: greened
Date: Wed Oct 19 08:03:45 2011
New Revision: 142514
URL: http://llvm.org/viewvc/llvm-project?rev=142514&view=rev
Log:
Fix Name Access
Get the Record name by string explicitly to avoid potential asserts.
Modified:
llvm/trunk/lib/TableGen/TGParser.cpp
Modified: llvm/trunk/lib/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TGParser.cpp?rev=142514&r1=142513&r2=142514&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Wed Oct 19 08:03:45 2011
@@ -1686,7 +1686,8 @@
// 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);
More information about the llvm-commits
mailing list