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
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 179f069..ebe4cec 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -435,7 +435,7 @@
                 BasePtr->getType())->getElementType()->isSized()) {
             for (unsigned i = 0; i != GEPOperands.size(); ++i)
               if (!isa<ConstantInt>(GEPOperands[i]) || 
-                  GEPOperands[i]->getType() == Type::BoolTy)
+                  GEPOperands[i]->getType() == Type::Int1Ty)
                 GEPOperands[i] =
                   Constant::getNullValue(GEPOperands[i]->getType());
             int64_t Offset =
@@ -610,14 +610,14 @@
     if (GEP1Ops.size() > MinOperands) {
       for (unsigned i = FirstConstantOper; i != MaxOperands; ++i)
         if (isa<ConstantInt>(GEP1Ops[i]) && 
-            GEP1Ops[i]->getType() != Type::BoolTy &&
+            GEP1Ops[i]->getType() != Type::Int1Ty &&
             !cast<Constant>(GEP1Ops[i])->isNullValue()) {
           // Yup, there's a constant in the tail.  Set all variables to
           // constants in the GEP instruction to make it suiteable for
           // TargetData::getIndexedOffset.
           for (i = 0; i != MaxOperands; ++i)
             if (!isa<ConstantInt>(GEP1Ops[i]) ||
-                GEP1Ops[i]->getType() == Type::BoolTy)
+                GEP1Ops[i]->getType() == Type::Int1Ty)
               GEP1Ops[i] = Constant::getNullValue(GEP1Ops[i]->getType());
           // Okay, now get the offset.  This is the relative offset for the full
           // instruction.
@@ -670,7 +670,7 @@
     const Value *Op2 = i < GEP2Ops.size() ? GEP2Ops[i] : 0;
     // If they are equal, use a zero index...
     if (Op1 == Op2 && BasePtr1Ty == BasePtr2Ty) {
-      if (!isa<ConstantInt>(Op1) || Op1->getType() == Type::BoolTy)
+      if (!isa<ConstantInt>(Op1) || Op1->getType() == Type::Int1Ty)
         GEP1Ops[i] = GEP2Ops[i] = Constant::getNullValue(Op1->getType());
       // Otherwise, just keep the constants we have.
     } else {
diff --git a/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp
index 1d49e22..6c2dce0 100644
--- a/lib/Analysis/ConstantRange.cpp
+++ b/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 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 @@
   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 @@
 ///
 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...
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 9fcbf8c..ad16acc 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -1930,7 +1930,7 @@
       dyn_cast_or_null<ConstantInt>(EvaluateExpression(Cond, PHIVal));
 
     // Couldn't symbolically evaluate.
-    if (!CondVal || CondVal->getType() != Type::BoolTy) return UnknownValue;
+    if (!CondVal || CondVal->getType() != Type::Int1Ty) return UnknownValue;
 
     if (CondVal->getBoolValue() == ExitWhen) {
       ConstantEvolutionLoopExitValue[PN] = PHIVal;