From af7ec975870f92245f1f1484ac80a1e2db6a0afa 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Constants.h | 5 +++++ include/llvm/LLVMContext.h | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 442472a..a3bd551 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -448,6 +448,11 @@ class ConstantVector : public Constant { protected: ConstantVector(const VectorType *T, const std::vector &Val); public: + // ConstantVector accessors + static Constant* get(const VectorType* T, const std::vector& V); + static Constant* get(const std::vector& V); + static Constant* get(Constant* const* Vals, unsigned NumVals); + /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant); diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index 03de906..de118aa 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -59,6 +59,7 @@ class LLVMContext { friend class ConstantFP; friend class ConstantStruct; friend class ConstantArray; + friend class ConstantVector; public: LLVMContext(); ~LLVMContext(); @@ -160,12 +161,6 @@ public: /// Constant* getConstantExprSizeOf(const Type* Ty); - // ConstantVector accessors - Constant* getConstantVector(const VectorType* T, - const std::vector& V); - Constant* getConstantVector(const std::vector& V); - Constant* getConstantVector(Constant* const* Vals, unsigned NumVals); - // MDNode accessors MDNode* getMDNode(Value* const* Vals, unsigned NumVals); @@ -211,7 +206,6 @@ public: void erase(MDString *M); void erase(MDNode *M); void erase(ConstantAggregateZero *Z); - void erase(ConstantVector *V); }; /// FOR BACKWARDS COMPATIBILITY - Returns a global context. -- cgit v1.1