aboutsummaryrefslogtreecommitdiff
path: root/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-19 13:03:58 +0000
committerDavid Greene <greened@obbligato.org>2011-10-19 13:03:58 +0000
commit69a2394b2dd0136581f1485d69669246fc3b62c5 (patch)
tree23edd0ec003b6cfbe8af03f91ee8c1154d163e58 /lib/TableGen/TGParser.cpp
parent91919cd8166bb60145efe54dd790b98521b4328a (diff)
Fix Name Access
Get the Record name as a string explicitly to avoid asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r--lib/TableGen/TGParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp
index 1e5b55fdf9..b06b8db800 100644
--- a/lib/TableGen/TGParser.cpp
+++ b/lib/TableGen/TGParser.cpp
@@ -1747,7 +1747,8 @@ bool TGParser::ParseClass() {
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);