[llvm-commits] [llvm] r77459 - /llvm/trunk/lib/AsmParser/LLParser.cpp
Dan Gohman
gohman at apple.com
Wed Jul 29 08:58:42 PDT 2009
Author: djg
Date: Wed Jul 29 10:58:36 2009
New Revision: 77459
URL: http://llvm.org/viewvc/llvm-project?rev=77459&view=rev
Log:
Minor code simplification.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=77459&r1=77458&r2=77459&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Wed Jul 29 10:58:36 2009
@@ -2078,8 +2078,7 @@
bool InBounds = false;
Lex.Lex();
if (Opc == Instruction::GetElementPtr)
- if (EatIfPresent(lltok::kw_inbounds))
- InBounds = true;
+ InBounds = EatIfPresent(lltok::kw_inbounds);
if (ParseToken(lltok::lparen, "expected '(' in constantexpr") ||
ParseGlobalValueVector(Elts) ||
ParseToken(lltok::rparen, "expected ')' in constantexpr"))
@@ -3413,10 +3412,8 @@
/// ::= 'getelementptr' 'inbounds'? TypeAndValue (',' TypeAndValue)*
bool LLParser::ParseGetElementPtr(Instruction *&Inst, PerFunctionState &PFS) {
Value *Ptr, *Val; LocTy Loc, EltLoc;
- bool InBounds = false;
- if (EatIfPresent(lltok::kw_inbounds))
- InBounds = true;
+ bool InBounds = EatIfPresent(lltok::kw_inbounds);
if (ParseTypeAndValue(Ptr, Loc, PFS)) return true;
More information about the llvm-commits
mailing list