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 | 7b4f9f8b74cd8f8d476787763ea02030762b00e7 (patch) | |
tree | 1d75f632724874d39fcab0f961b588afe4dbadbd /lib/VMCore/LLVMContextImpl.h | |
parent | 46978976b3ae91ae883561076cacb2b2affc5862 (diff) | |
download | external_llvm-7b4f9f8b74cd8f8d476787763ea02030762b00e7.zip external_llvm-7b4f9f8b74cd8f8d476787763ea02030762b00e7.tar.gz external_llvm-7b4f9f8b74cd8f8d476787763ea02030762b00e7.tar.bz2 |
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/VMCore/LLVMContextImpl.h')
-rw-r--r-- | lib/VMCore/LLVMContextImpl.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h index 21fef39..eea495d 100644 --- a/lib/VMCore/LLVMContextImpl.h +++ b/lib/VMCore/LLVMContextImpl.h @@ -88,7 +88,7 @@ struct ConvertConstantType<ConstantArray, ArrayType> { std::vector<Constant*> C; for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i) C.push_back(cast<Constant>(OldC->getOperand(i))); - Constant *New = NewTy->getContext().getConstantArray(NewTy, C); + Constant *New = ConstantArray::get(NewTy, C); assert(New != OldC && "Didn't replace constant??"); OldC->uncheckedReplaceAllUsesWith(New); OldC->destroyConstant(); // This constant is now dead, destroy it. @@ -459,6 +459,7 @@ class LLVMContextImpl { friend class ConstantInt; friend class ConstantFP; friend class ConstantStruct; + friend class ConstantArray; public: LLVMContextImpl(LLVMContext &C); @@ -468,9 +469,6 @@ public: ConstantAggregateZero *getConstantAggregateZero(const Type *Ty); - Constant *getConstantArray(const ArrayType *Ty, - const std::vector<Constant*> &V); - Constant *getConstantVector(const VectorType *Ty, const std::vector<Constant*> &V); @@ -491,13 +489,7 @@ public: void erase(MDString *M); void erase(MDNode *M); void erase(ConstantAggregateZero *Z); - void erase(ConstantArray *C); void erase(ConstantVector *V); - - // RAUW helpers - - Constant *replaceUsesOfWithOnConstant(ConstantArray *CA, Value *From, - Value *To, Use *U); }; } |