[llvm-commits] [llvm] r171937 - /llvm/trunk/lib/TableGen/TGParser.cpp
Sean Silva
silvas at purdue.edu
Tue Jan 8 18:17:13 PST 2013
Author: silvas
Date: Tue Jan 8 20:17:13 2013
New Revision: 171937
URL: http://llvm.org/viewvc/llvm-project?rev=171937&view=rev
Log:
tblgen: Reuse function that is 2 lines above.
Modified:
llvm/trunk/lib/TableGen/TGParser.cpp
Modified: llvm/trunk/lib/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TGParser.cpp?rev=171937&r1=171936&r2=171937&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Tue Jan 8 20:17:13 2013
@@ -456,18 +456,9 @@
}
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;
}
More information about the llvm-commits
mailing list