summaryrefslogtreecommitdiff
path: root/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
commit4b5e207bf24ea9799547a0634acaf7398b32897c (patch)
tree4abb1a538b5c1bb7d2c718bc1868348446d5c1f2 /lib/AsmParser
parentb60e851c03970291086966b3610be9485e1eec85 (diff)
downloadllvm-4b5e207bf24ea9799547a0634acaf7398b32897c.tar.gz
llvm-4b5e207bf24ea9799547a0634acaf7398b32897c.tar.bz2
llvm-4b5e207bf24ea9799547a0634acaf7398b32897c.tar.xz
Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 32993f73ac..4b20d03006 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/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");