mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
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
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user