summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-21 15:15:37 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-21 15:15:37 +0000
commit2f5fc8c67d9c7220a3fe8940c00aa274cedbbaf0 (patch)
treebd988632ab5b18c31d84d5faedec05c0f574377c /llvm/lib/AsmParser
parent3aa2f0a064f511fd5469f83032ee74ffc92d2258 (diff)
downloadbcm5719-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.cpp5
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");
OpenPOWER on IntegriCloud