diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-28 18:32:17 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-28 18:32:17 +0000 |
commit | 1fd7096407d5e598ed3366a1141548e71273f1c5 (patch) | |
tree | 1d75f632724874d39fcab0f961b588afe4dbadbd /lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 8e7c38e17b4c3eef8c079004f01329b7bd2bb24a (diff) |
Change ConstantArray to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 2c4aab1dfd..117a8758d0 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -288,7 +288,7 @@ void BitcodeReaderValueList::ResolveConstantForwardRefs() { // Make the new constant. Constant *NewC; if (ConstantArray *UserCA = dyn_cast<ConstantArray>(UserC)) { - NewC = Context.getConstantArray(UserCA->getType(), &NewOps[0], + NewC = ConstantArray::get(UserCA->getType(), &NewOps[0], NewOps.size()); } else if (ConstantStruct *UserCS = dyn_cast<ConstantStruct>(UserC)) { NewC = ConstantStruct::get(&NewOps[0], NewOps.size(), @@ -930,7 +930,7 @@ bool BitcodeReader::ParseConstants() { const Type *EltTy = ATy->getElementType(); for (unsigned i = 0; i != Size; ++i) Elts.push_back(ValueList.getConstantFwdRef(Record[i], EltTy)); - V = Context.getConstantArray(ATy, Elts); + V = ConstantArray::get(ATy, Elts); } else if (const VectorType *VTy = dyn_cast<VectorType>(CurTy)) { const Type *EltTy = VTy->getElementType(); for (unsigned i = 0; i != Size; ++i) @@ -952,7 +952,7 @@ bool BitcodeReader::ParseConstants() { std::vector<Constant*> Elts; for (unsigned i = 0; i != Size; ++i) Elts.push_back(ConstantInt::get(EltTy, Record[i])); - V = Context.getConstantArray(ATy, Elts); + V = ConstantArray::get(ATy, Elts); break; } case bitc::CST_CODE_CSTRING: { // CSTRING: [values] @@ -967,7 +967,7 @@ bool BitcodeReader::ParseConstants() { for (unsigned i = 0; i != Size; ++i) Elts.push_back(ConstantInt::get(EltTy, Record[i])); Elts.push_back(Context.getNullValue(EltTy)); - V = Context.getConstantArray(ATy, Elts); + V = ConstantArray::get(ATy, Elts); break; } case bitc::CST_CODE_CE_BINOP: { // CE_BINOP: [opcode, opval, opval] |