aboutsummaryrefslogtreecommitdiff
path: root/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorSean Silva <silvas@purdue.edu>2013-01-09 02:17:13 +0000
committerSean Silva <silvas@purdue.edu>2013-01-09 02:17:13 +0000
commit9d4a6610765c3466642397299271ae904d0d73f9 (patch)
tree8e7525a9d649cd3824633ac4fddd5bb547f02f20 /lib/TableGen/TGParser.cpp
parent36febfd70e1a28d6008d45a753da4c75fd994140 (diff)
tblgen: Reuse function that is 2 lines above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r--lib/TableGen/TGParser.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp
index a600a13aff..b106700942 100644
--- a/lib/TableGen/TGParser.cpp
+++ b/lib/TableGen/TGParser.cpp
@@ -456,18 +456,9 @@ MultiClass *TGParser::ParseMultiClassID() {
}
Record *TGParser::ParseDefmID() {
- if (Lex.getCode() != tgtok::Id) {
- TokError("expected multiclass name");
- return 0;
- }
-
- MultiClass *MC = MultiClasses[Lex.getCurStrVal()];
- if (MC == 0) {
- TokError("Couldn't find multiclass '" + Lex.getCurStrVal() + "'");
+ MultiClass *MC = ParseMultiClassID();
+ if (!MC)
return 0;
- }
-
- Lex.Lex();
return &MC->Rec;
}