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 | 4b5e207bf24ea9799547a0634acaf7398b32897c (patch) | |
tree | 4abb1a538b5c1bb7d2c718bc1868348446d5c1f2 /lib/AsmParser | |
parent | b60e851c03970291086966b3610be9485e1eec85 (diff) |
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.cpp | 5 |
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"); |