[llvm-commits] [llvm] r142516 - /llvm/trunk/lib/TableGen/TGParser.cpp
David Greene
greened at obbligato.org
Wed Oct 19 06:03:58 PDT 2011
Author: greened
Date: Wed Oct 19 08:03:58 2011
New Revision: 142516
URL: http://llvm.org/viewvc/llvm-project?rev=142516&view=rev
Log:
Fix Name Access
Get the Record name as a string explicitly to avoid 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=142516&r1=142515&r2=142516&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Wed Oct 19 08:03:58 2011
@@ -1747,7 +1747,8 @@
if (!CurRec->getValues().empty() ||
!CurRec->getSuperClasses().empty() ||
!CurRec->getTemplateArgs().empty())
- return TokError("Class '" + CurRec->getName() + "' already defined");
+ return TokError("Class '" + CurRec->getNameInitAsString()
+ + "' already defined");
} else {
// If this is the first reference to this class, create and add it.
CurRec = new Record(Lex.getCurStrVal(), Lex.getLoc(), Records);
More information about the llvm-commits
mailing list