From 4aa3295a655e48bbb065ac1d51bc1eb890cda4dd Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 28 Jul 2009 21:19:26 +0000 Subject: Return ConstantVector to 2.5 API. llvm-svn: 77366 --- llvm/lib/VMCore/LLVMContext.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'llvm/lib/VMCore/LLVMContext.cpp') diff --git a/llvm/lib/VMCore/LLVMContext.cpp b/llvm/lib/VMCore/LLVMContext.cpp index 97857c5dda7..14a891fb906 100644 --- a/llvm/lib/VMCore/LLVMContext.cpp +++ b/llvm/lib/VMCore/LLVMContext.cpp @@ -72,7 +72,7 @@ Constant* LLVMContext::getAllOnesValue(const Type* Ty) { const VectorType* VTy = cast(Ty); Elts.resize(VTy->getNumElements(), getAllOnesValue(VTy->getElementType())); assert(Elts[0] && "Not a vector integer type!"); - return cast(getConstantVector(Elts)); + return cast(ConstantVector::get(Elts)); } // UndefValue accessors. @@ -367,23 +367,6 @@ Constant* LLVMContext::getConstantExprSizeOf(const Type* Ty) { return getConstantExprCast(Instruction::PtrToInt, GEP, Type::Int64Ty); } -// ConstantVector accessors. -Constant* LLVMContext::getConstantVector(const VectorType* T, - const std::vector& V) { - return pImpl->getConstantVector(T, V); -} - -Constant* LLVMContext::getConstantVector(const std::vector& V) { - assert(!V.empty() && "Cannot infer type if V is empty"); - return getConstantVector(getVectorType(V.front()->getType(),V.size()), V); -} - -Constant* LLVMContext::getConstantVector(Constant* const* Vals, - unsigned NumVals) { - // FIXME: make this the primary ctor method. - return getConstantVector(std::vector(Vals, Vals+NumVals)); -} - // MDNode accessors MDNode* LLVMContext::getMDNode(Value* const* Vals, unsigned NumVals) { return pImpl->getMDNode(Vals, NumVals); @@ -488,7 +471,3 @@ void LLVMContext::erase(MDNode *M) { void LLVMContext::erase(ConstantAggregateZero *Z) { pImpl->erase(Z); } - -void LLVMContext::erase(ConstantVector *V) { - pImpl->erase(V); -} -- cgit v1.2.3