aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
commit4fe16d607d11e29d742208894909733f5ad01f8f (patch)
treea669ba57373e87d31c3af6f301fe4a61f773f4b3 /lib/Support/ConstantRange.cpp
parent34dceb47573b0aedd188b5e72bb848ba29a4960f (diff)
downloadexternal_llvm-4fe16d607d11e29d742208894909733f5ad01f8f.zip
external_llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.gz
external_llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.bz2
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ConstantRange.cpp')
-rw-r--r--lib/Support/ConstantRange.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index 1d49e22..6c2dce0 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -31,7 +31,7 @@
using namespace llvm;
static ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) {
- if (Ty == Type::BoolTy)
+ if (Ty == Type::Int1Ty)
return ConstantInt::getTrue();
if (Ty->isInteger()) {
if (isSigned) {
@@ -48,7 +48,7 @@ static ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) {
// Static constructor to create the minimum constant for an integral type...
static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) {
- if (Ty == Type::BoolTy)
+ if (Ty == Type::Int1Ty)
return ConstantInt::getFalse();
if (Ty->isInteger()) {
if (isSigned) {
@@ -63,7 +63,7 @@ static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) {
return 0;
}
static ConstantInt *Next(ConstantInt *CI) {
- if (CI->getType() == Type::BoolTy)
+ if (CI->getType() == Type::Int1Ty)
return ConstantInt::get(!CI->getBoolValue());
Constant *Result = ConstantExpr::getAdd(CI,
@@ -205,7 +205,7 @@ ConstantInt *ConstantRange::getSingleElement() const {
///
uint64_t ConstantRange::getSetSize() const {
if (isEmptySet()) return 0;
- if (getType() == Type::BoolTy) {
+ if (getType() == Type::Int1Ty) {
if (Lower != Upper) // One of T or F in the set...
return 1;
return 2; // Must be full set...