diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-21 15:15:37 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-21 15:15:37 +0000 |
commit | 2f5fc8c67d9c7220a3fe8940c00aa274cedbbaf0 (patch) | |
tree | bd988632ab5b18c31d84d5faedec05c0f574377c /llvm/lib/AsmParser | |
parent | 3aa2f0a064f511fd5469f83032ee74ffc92d2258 (diff) | |
download | bcm5719-llvm-2f5fc8c67d9c7220a3fe8940c00aa274cedbbaf0.tar.gz bcm5719-llvm-2f5fc8c67d9c7220a3fe8940c00aa274cedbbaf0.zip |
Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.
llvm-svn: 135676
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 32993f73acb..4b20d03006f 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -2278,9 +2278,8 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { (Value**)(Elts.data() + 1), Elts.size() - 1)) return Error(ID.Loc, "invalid indices for getelementptr"); - ID.ConstantVal = InBounds ? - ConstantExpr::getInBoundsGetElementPtr(Elts[0], Indices) : - ConstantExpr::getGetElementPtr(Elts[0], Indices); + ID.ConstantVal = ConstantExpr::getGetElementPtr(Elts[0], Indices, + InBounds); } else if (Opc == Instruction::Select) { if (Elts.size() != 3) return Error(ID.Loc, "expected three operands to select"); |