summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-13 20:58:05 +0000
committerOwen Anderson <resistor@mac.com>2009-07-13 20:58:05 +0000
commit73c6b7127aff4499e4d6a2edb219685aee178ee1 (patch)
treecabab2668e037a0276156e885bd54d5bd660eabd /include/llvm
parent69fbc7f477c21ce1d8ae5a4aa8a701e47aa2d163 (diff)
downloadllvm-73c6b7127aff4499e4d6a2edb219685aee178ee1.tar.gz
llvm-73c6b7127aff4499e4d6a2edb219685aee178ee1.tar.bz2
llvm-73c6b7127aff4499e4d6a2edb219685aee178ee1.tar.xz
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/llvm')
-rw-r--r--include/llvm/Constant.h5
-rw-r--r--include/llvm/Constants.h11
-rw-r--r--include/llvm/InstrTypes.h6
-rw-r--r--include/llvm/LLVMContext.h6
-rw-r--r--include/llvm/Support/IRBuilder.h6
5 files changed, 11 insertions, 23 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
index 05a6623200..bccd417f07 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 77124d8974..ac0b0fb314 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 9c1f8fc804..eb0b7b6e5b 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 e441d189c2..55eead4621 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 5de33eb2cb..2ef13a789f 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);
}
//===--------------------------------------------------------------------===//