aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/LLVMContext.h4
-rw-r--r--lib/VMCore/LLVMContext.cpp8
2 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h
index 128175c566..76b0ac8177 100644
--- a/include/llvm/LLVMContext.h
+++ b/include/llvm/LLVMContext.h
@@ -66,12 +66,14 @@ public:
// ConstantInt accessors
ConstantInt* getConstantIntTrue();
ConstantInt* getConstantIntFalse();
+ Constant* getConstantInt(const Type* Ty, uint64_t V,
+ bool isSigned = false);
ConstantInt* getConstantInt(const IntegerType* Ty, uint64_t V,
bool isSigned = false);
ConstantInt* getConstantIntSigned(const IntegerType* Ty, int64_t V);
ConstantInt* getConstantInt(const APInt& V);
Constant* getConstantInt(const Type* Ty, const APInt& V);
- ConstantInt* getAllOnesConstantInt(const Type* Ty);
+ ConstantInt* getConstantIntAllOnesValue(const Type* Ty);
// ConstantPointerNull accessors
ConstantPointerNull* getConstantPointerNull(const PointerType* T);
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp
index fd69c4c93f..6af6ff65eb 100644
--- a/lib/VMCore/LLVMContext.cpp
+++ b/lib/VMCore/LLVMContext.cpp
@@ -53,6 +53,12 @@ ConstantInt* LLVMContext::getConstantIntFalse() {
return ConstantInt::getFalse();
}
+Constant* LLVMContext::getConstantInt(const Type* Ty, uint64_t V,
+ bool isSigned) {
+ return ConstantInt::get(Ty, V, isSigned);
+}
+
+
ConstantInt* LLVMContext::getConstantInt(const IntegerType* Ty, uint64_t V,
bool isSigned) {
return ConstantInt::get(Ty, V, isSigned);
@@ -71,7 +77,7 @@ Constant* LLVMContext::getConstantInt(const Type* Ty, const APInt& V) {
return ConstantInt::get(Ty, V);
}
-ConstantInt* LLVMContext::getAllOnesConstantInt(const Type* Ty) {
+ConstantInt* LLVMContext::getConstantIntAllOnesValue(const Type* Ty) {
return ConstantInt::getAllOnesValue(Ty);
}