Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.

llvm-svn: 135676
This commit is contained in:
Jay Foad committed 2011-07-21 15:15:37 +00:00
1 parent 3aa2f0a064
commit 2f5fc8c67d
5 files changed
+25 -31

No files matched your search

+3 -4
View File
@@ -1352,10 +1352,9 @@ bool BitcodeReader::ParseConstants() {
Elts.push_back(ValueList.getConstantFwdRef(Record[i+1], ElTy));
}
ArrayRef<Constant *> Indices(Elts.begin() + 1, Elts.end());
if (BitCode == bitc::CST_CODE_CE_INBOUNDS_GEP)
V = ConstantExpr::getInBoundsGetElementPtr(Elts[0], Indices);
else
V = ConstantExpr::getGetElementPtr(Elts[0], Indices);
V = ConstantExpr::getGetElementPtr(Elts[0], Indices,
BitCode ==
bitc::CST_CODE_CE_INBOUNDS_GEP);
break;
}
case bitc::CST_CODE_CE_SELECT: // CE_SELECT: [opval#, opval#, opval#]