From 7b4f9f8b74cd8f8d476787763ea02030762b00e7 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 28 Jul 2009 18:32:17 +0000 Subject: Change ConstantArray to 2.5 API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/LLVMContextImpl.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/VMCore/LLVMContextImpl.h') 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 { std::vector C; for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i) C.push_back(cast(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 &V); - Constant *getConstantVector(const VectorType *Ty, const std::vector &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); }; } -- cgit v1.1