summaryrefslogtreecommitdiffstats
path: root/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-12 18:23:49 +0000
committerChris Lattner <sabre@nondot.org>2007-01-12 18:23:49 +0000
commit05b30d840a321e46972323517208ed9c8480802f (patch)
tree272c258b4c6c7a96ed6ed8ab2618d0297da90931 /lib/Support/ConstantRange.cpp
parent28783c3384857d876e37612051ae9c32a11d20ce (diff)
downloadexternal_llvm-05b30d840a321e46972323517208ed9c8480802f.zip
external_llvm-05b30d840a321e46972323517208ed9c8480802f.tar.gz
external_llvm-05b30d840a321e46972323517208ed9c8480802f.tar.bz2
remove unneeded special cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ConstantRange.cpp')
-rw-r--r--lib/Support/ConstantRange.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index 7a34420..08edf65 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -31,8 +31,6 @@
using namespace llvm;
static ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) {
- if (Ty == Type::Int1Ty)
- return ConstantInt::getTrue();
if (Ty->isInteger()) {
if (isSigned) {
// Calculate 011111111111111...
@@ -48,8 +46,6 @@ 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::Int1Ty)
- return ConstantInt::getFalse();
if (Ty->isInteger()) {
if (isSigned) {
// Calculate 1111111111000000000000
@@ -63,9 +59,6 @@ static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) {
return 0;
}
static ConstantInt *Next(ConstantInt *CI) {
- if (CI->getType() == Type::Int1Ty)
- return ConstantInt::get(Type::Int1Ty, !CI->getZExtValue());
-
Constant *Result = ConstantExpr::getAdd(CI,
ConstantInt::get(CI->getType(), 1));
return cast<ConstantInt>(Result);