diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-29 15:58:36 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-29 15:58:36 +0000 |
commit | dcb40a3c1c747c88c4e634e34d1b4d7533a86ada (patch) | |
tree | 5ec1f0e82086052bd812499b6b063e8e622dc69d /lib/AsmParser | |
parent | efbf178082ef50e0e44532076a945bb7981958f1 (diff) | |
download | external_llvm-dcb40a3c1c747c88c4e634e34d1b4d7533a86ada.zip external_llvm-dcb40a3c1c747c88c4e634e34d1b4d7533a86ada.tar.gz external_llvm-dcb40a3c1c747c88c4e634e34d1b4d7533a86ada.tar.bz2 |
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 36f714b..c96ee9e 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2078,8 +2078,7 @@ bool LLParser::ParseValID(ValID &ID) { 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 @@ bool LLParser::ParseGetResult(Instruction *&Inst, PerFunctionState &PFS) { /// ::= '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; |