Rename BoolTy as Int1Ty. Patch by Sheng Zhou.

llvm-svn: 33076
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index c1944db..ce30477 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -710,7 +710,7 @@
   // If there is a comparison against null, we will insert a global bool to
   // keep track of whether the global was initialized yet or not.
   GlobalVariable *InitBool =
-    new GlobalVariable(Type::BoolTy, false, GlobalValue::InternalLinkage,
+    new GlobalVariable(Type::Int1Ty, false, GlobalValue::InternalLinkage,
                        ConstantInt::getFalse(), GV->getName()+".init");
   bool InitBoolUsed = false;
 
@@ -1139,13 +1139,13 @@
 /// values ever stored into GV are its initializer and OtherVal.
 static void ShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal) {
   // Create the new global, initializing it to false.
-  GlobalVariable *NewGV = new GlobalVariable(Type::BoolTy, false,
+  GlobalVariable *NewGV = new GlobalVariable(Type::Int1Ty, false,
          GlobalValue::InternalLinkage, ConstantInt::getFalse(),
                                              GV->getName()+".b");
   GV->getParent()->getGlobalList().insert(GV, NewGV);
 
   Constant *InitVal = GV->getInitializer();
-  assert(InitVal->getType() != Type::BoolTy && "No reason to shrink to bool!");
+  assert(InitVal->getType() != Type::Int1Ty && "No reason to shrink to bool!");
 
   // If initialized to zero and storing one into the global, we can use a cast
   // instead of a select to synthesize the desired value.
@@ -1341,7 +1341,7 @@
       // Otherwise, if the global was not a boolean, we can shrink it to be a
       // boolean.
       if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))
-        if (GV->getType()->getElementType() != Type::BoolTy &&
+        if (GV->getType()->getElementType() != Type::Int1Ty &&
             !GV->getType()->getElementType()->isFloatingPoint() &&
             !GS.HasPHIUser) {
           DOUT << "   *** SHRINKING TO BOOL: " << *GV;
@@ -1801,7 +1801,7 @@
             dyn_cast<ConstantInt>(getVal(Values, BI->getCondition()));
 
           // Cannot determine.
-          if (!Cond || Cond->getType() != Type::BoolTy) 
+          if (!Cond || Cond->getType() != Type::Int1Ty) 
             return false;  
           NewBB = BI->getSuccessor(!Cond->getBoolValue());          
         }
diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
index ab6ee23..a7da282c 100644
--- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -223,7 +223,7 @@
 
   // bool __llvm_sjljeh_is_longjmp_exception()
   IsLJException = M.getOrInsertFunction("__llvm_sjljeh_is_longjmp_exception",
-                                        Type::BoolTy, (Type *)0);
+                                        Type::Int1Ty, (Type *)0);
 
   // int __llvm_sjljeh_get_longjmp_value()
   GetLJValue = M.getOrInsertFunction("__llvm_sjljeh_get_longjmp_value",
diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 483c5702..d2ab638 100644
--- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -940,7 +940,7 @@
           cast<Constant>(IC->getOperand(1))->isNullValue())
         continue;
     } else if (CastInst *CI = dyn_cast<CastInst>(User))
-      if (CI->getType() == Type::BoolTy)
+      if (CI->getType() == Type::Int1Ty)
         continue;
     // Unknown instruction.
     return false;