summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
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/Bitcode
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/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 910987a472d..e8e8c2a7b6f 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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#]
OpenPOWER on IntegriCloud