summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-29 15:58:36 +0000
committerDan Gohman <gohman@apple.com>2009-07-29 15:58:36 +0000
commit16cbbe43d80387bf1dfa580b6c3ae7a352f91a7c (patch)
treecb394201c62d08903b70d976c20b1b45f3caa5d7 /llvm/lib
parent72b1f24bd271ae1e703480a2825c3e1544b6a579 (diff)
downloadbcm5719-llvm-16cbbe43d80387bf1dfa580b6c3ae7a352f91a7c.tar.gz
bcm5719-llvm-16cbbe43d80387bf1dfa580b6c3ae7a352f91a7c.zip
Minor code simplification.
llvm-svn: 77459
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 36f714b38e3..c96ee9e233f 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud