summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Constant.h7
-rw-r--r--llvm/include/llvm/LLVMContext.h8
-rw-r--r--llvm/include/llvm/Support/IRBuilder.h4
3 files changed, 9 insertions, 10 deletions
diff --git a/llvm/include/llvm/Constant.h b/llvm/include/llvm/Constant.h
index 80c88b623fc..3b3089748e0 100644
--- a/llvm/include/llvm/Constant.h
+++ b/llvm/include/llvm/Constant.h
@@ -135,6 +135,13 @@ public:
"implemented for all constants that have operands!");
assert(0 && "Constants that do not have operands cannot be using 'From'!");
}
+
+ static 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
+ static Constant* getAllOnesValue(const Type* Ty);
};
} // End llvm namespace
diff --git a/llvm/include/llvm/LLVMContext.h b/llvm/include/llvm/LLVMContext.h
index 91312f73a8a..9150e6160ec 100644
--- a/llvm/include/llvm/LLVMContext.h
+++ b/llvm/include/llvm/LLVMContext.h
@@ -65,14 +65,6 @@ public:
LLVMContext();
~LLVMContext();
- // 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);
-
// MDNode accessors
MDNode* getMDNode(Value* const* Vals, unsigned NumVals);
diff --git a/llvm/include/llvm/Support/IRBuilder.h b/llvm/include/llvm/Support/IRBuilder.h
index 223fe028e20..d0535c36040 100644
--- a/llvm/include/llvm/Support/IRBuilder.h
+++ b/llvm/include/llvm/Support/IRBuilder.h
@@ -705,13 +705,13 @@ public:
/// CreateIsNull - Return an i1 value testing if \arg Arg is null.
Value *CreateIsNull(Value *Arg, const char *Name = "") {
- return CreateICmpEQ(Arg, Context.getNullValue(Arg->getType()),
+ return CreateICmpEQ(Arg, Constant::getNullValue(Arg->getType()),
Name);
}
/// CreateIsNotNull - Return an i1 value testing if \arg Arg is not null.
Value *CreateIsNotNull(Value *Arg, const char *Name = "") {
- return CreateICmpNE(Arg, Context.getNullValue(Arg->getType()),
+ return CreateICmpNE(Arg, Constant::getNullValue(Arg->getType()),
Name);
}
OpenPOWER on IntegriCloud