[llvm-commits] [llvm] r115739 - /llvm/trunk/utils/TableGen/TGParser.cpp
Chris Lattner
sabre at nondot.org
Tue Oct 5 21:31:40 PDT 2010
Author: lattner
Date: Tue Oct 5 23:31:40 2010
New Revision: 115739
URL: http://llvm.org/viewvc/llvm-project?rev=115739&view=rev
Log:
cleanups
Modified:
llvm/trunk/utils/TableGen/TGParser.cpp
Modified: llvm/trunk/utils/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGParser.cpp?rev=115739&r1=115738&r2=115739&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/TGParser.cpp (original)
+++ llvm/trunk/utils/TableGen/TGParser.cpp Tue Oct 5 23:31:40 2010
@@ -1028,8 +1028,13 @@
break;
}
case tgtok::CodeFragment:
- R = new CodeInit(Lex.getCurStrVal()); Lex.Lex(); break;
- case tgtok::question: R = new UnsetInit(); Lex.Lex(); break;
+ R = new CodeInit(Lex.getCurStrVal());
+ Lex.Lex();
+ break;
+ case tgtok::question:
+ R = new UnsetInit();
+ Lex.Lex();
+ break;
case tgtok::Id: {
SMLoc NameLoc = Lex.getLoc();
std::string Name = Lex.getCurStrVal();
@@ -1209,13 +1214,11 @@
}
Init *Operator = 0;
- if (Lex.getCode() == tgtok::Id) {
+ if (Lex.getCode() == tgtok::Id)
Operator = ParseIDValue(CurRec);
- if (Operator == 0) return 0;
- } else {
+ else
Operator = ParseOperation(CurRec);
- if (Operator == 0) return 0;
- }
+ if (Operator == 0) return 0;
// If the operator name is present, parse it.
std::string OperatorName;
@@ -1241,7 +1244,6 @@
Lex.Lex(); // eat the ')'
return new DagInit(Operator, OperatorName, DagArgs);
- break;
}
case tgtok::XCar:
@@ -1258,7 +1260,6 @@
case tgtok::XForEach:
case tgtok::XSubst: { // Value ::= !ternop '(' Value ',' Value ',' Value ')'
return ParseOperation(CurRec);
- break;
}
}
More information about the llvm-commits
mailing list