From: Sean Silva Date: Wed, 9 Jan 2013 02:17:13 +0000 (+0000) Subject: tblgen: Reuse function that is 2 lines above. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9d4a6610765c3466642397299271ae904d0d73f9;p=oota-llvm.git 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 --- diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index a600a13aff7..b1067009426 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; }