summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/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
commit542964f55b2dce5703c9dd88496fde4f7ebf89b6 (patch)
tree07d5e88789ee8f5f61159e1ec2def506545fe52a /llvm/lib/Analysis/ConstantRange.cpp
parentbd23db9968ac7583431836ffcf9957f8e38c1aea (diff)
downloadbcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.tar.gz
bcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.zip
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
Diffstat (limited to 'llvm/lib/Analysis/ConstantRange.cpp')
-rw-r--r--llvm/lib/Analysis/ConstantRange.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ConstantRange.cpp b/llvm/lib/Analysis/ConstantRange.cpp
index 1d49e224725..6c2dce03aa5 100644
--- a/llvm/lib/Analysis/ConstantRange.cpp
+++ b/llvm/lib/Analysis/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...
OpenPOWER on IntegriCloud