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/Bitcode/Reader | |
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/Bitcode/Reader')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 910987a472..e8e8c2a7b6 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/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#] |