From 9d4a6610765c3466642397299271ae904d0d73f9 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Wed, 9 Jan 2013 02:17:13 +0000 Subject: 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 --- lib/TableGen/TGParser.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lib/TableGen') 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; } -- cgit v1.2.3