diff options
author | David Greene <greened@obbligato.org> | 2011-10-19 13:03:45 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-19 13:03:45 +0000 |
commit | 2c49fbb32c5f042ecf64ac415f1a628100951a44 (patch) | |
tree | 4dfbe4f2e903deb48420ed2fea48cbfcbba15fa0 /lib/TableGen/TGParser.cpp | |
parent | 7efe93625183a52733c23adc02c5c9c4337a7970 (diff) |
Fix Name Access
Get the Record name by string explicitly to avoid potential asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index e913bce705..5dc25e9827 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -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); |