diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-13 20:58:05 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-13 20:58:05 +0000 |
commit | 035d41d6c7abc88fc6be5f7f4eb8fe959fe97323 (patch) | |
tree | cabab2668e037a0276156e885bd54d5bd660eabd /include | |
parent | db888429829c0151ddca4cbcc60db6b5c9f01fd1 (diff) | |
download | external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.zip external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.tar.gz external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.tar.bz2 |
Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Constant.h | 5 | ||||
-rw-r--r-- | include/llvm/Constants.h | 11 | ||||
-rw-r--r-- | include/llvm/InstrTypes.h | 6 | ||||
-rw-r--r-- | include/llvm/LLVMContext.h | 6 | ||||
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 6 |
5 files changed, 11 insertions, 23 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 05a6623..bccd417 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -60,11 +60,6 @@ protected: void destroyConstantImpl(); public: - /// Static constructor to get a '-1' constant. This supports integers and - /// vectors. - /// - static Constant *getAllOnesValue(const Type *Ty); - /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. virtual bool isNullValue() const = 0; diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 77124d8..ac0b0fb 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -227,11 +227,6 @@ public: return Val.getLimitedValue(Limit); } - /// @returns the value for an integer constant of the given type that has all - /// its bits set to true. - /// @brief Get the all ones value - static ConstantInt *getAllOnesValue(const Type *Ty); - /// @brief Methods to support type inquiry through isa, cast, and dyn_cast. static inline bool classof(const ConstantInt *) { return true; } static bool classof(const Value *V) { @@ -487,11 +482,6 @@ public: inline const VectorType *getType() const { return reinterpret_cast<const VectorType*>(Value::getType()); } - - /// @returns the value for a vector integer constant of the given type that - /// has all its bits set to true. - /// @brief Get the all ones value - static ConstantVector *getAllOnesValue(const VectorType *Ty); /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. This always returns false because zero vectors are always @@ -702,7 +692,6 @@ public: /// ConstantExpr::get* - Return some common constants without having to /// specify the full Instruction::OPCODE identifier. /// - static Constant *getNot(Constant *C); static Constant *getAdd(Constant *C1, Constant *C2); static Constant *getFAdd(Constant *C1, Constant *C2); static Constant *getSub(Constant *C1, Constant *C2); diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 9c1f8fc..eb0b7b6 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -214,9 +214,11 @@ public: static BinaryOperator *CreateFNeg(LLVMContext &Context, Value *Op, const std::string &Name, BasicBlock *InsertAtEnd); - static BinaryOperator *CreateNot(Value *Op, const std::string &Name = "", + static BinaryOperator *CreateNot(LLVMContext &Context, + Value *Op, const std::string &Name = "", Instruction *InsertBefore = 0); - static BinaryOperator *CreateNot(Value *Op, const std::string &Name, + static BinaryOperator *CreateNot(LLVMContext &Context, + Value *Op, const std::string &Name, BasicBlock *InsertAtEnd); /// isNeg, isFNeg, isNot - Check if the given Value is a diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index e441d18..55eead4 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -58,6 +58,10 @@ public: // Constant accessors Constant* getNullValue(const Type* Ty); + + /// @returns the value for an integer constant of the given type that has all + /// its bits set to true. + /// @brief Get the all ones value Constant* getAllOnesValue(const Type* Ty); // UndefValue accessors @@ -73,7 +77,6 @@ public: ConstantInt* getConstantIntSigned(const IntegerType* Ty, int64_t V); ConstantInt* getConstantInt(const APInt& V); Constant* getConstantInt(const Type* Ty, const APInt& V); - ConstantInt* getConstantIntAllOnesValue(const Type* Ty); // ConstantPointerNull accessors ConstantPointerNull* getConstantPointerNull(const PointerType* T); @@ -188,7 +191,6 @@ public: const std::vector<Constant*>& V); Constant* getConstantVector(const std::vector<Constant*>& V); Constant* getConstantVector(Constant* const* Vals, unsigned NumVals); - ConstantVector* getConstantVectorAllOnesValue(const VectorType* Ty); // MDNode accessors MDNode* getMDNode(Value* const* Vals, unsigned NumVals); diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 5de33eb..2ef13a7 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -311,17 +311,17 @@ public: Value *CreateNeg(Value *V, const char *Name = "") { if (Constant *VC = dyn_cast<Constant>(V)) return Folder.CreateNeg(VC); - return Insert(BinaryOperator::CreateNeg(getGlobalContext(), V), Name); + return Insert(BinaryOperator::CreateNeg(Context, V), Name); } Value *CreateFNeg(Value *V, const char *Name = "") { if (Constant *VC = dyn_cast<Constant>(V)) return Folder.CreateFNeg(VC); - return Insert(BinaryOperator::CreateFNeg(getGlobalContext(), V), Name); + return Insert(BinaryOperator::CreateFNeg(Context, V), Name); } Value *CreateNot(Value *V, const char *Name = "") { if (Constant *VC = dyn_cast<Constant>(V)) return Folder.CreateNot(VC); - return Insert(BinaryOperator::CreateNot(V), Name); + return Insert(BinaryOperator::CreateNot(Context, V), Name); } //===--------------------------------------------------------------------===// |