[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp

Reid Spencer reid at x10sys.com
Tue Feb 27 15:27:43 PST 2007



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.223 -> 1.224
---
Log message:

Remove some redundancy.


---
Diffs of the changes:  (+1 -4)

 Constants.cpp |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.223 llvm/lib/VMCore/Constants.cpp:1.224
--- llvm/lib/VMCore/Constants.cpp:1.223	Tue Feb 27 01:57:53 2007
+++ llvm/lib/VMCore/Constants.cpp	Tue Feb 27 17:27:26 2007
@@ -115,10 +115,7 @@
 // Static constructor to create an integral constant with all bits set
 ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) {
   if (const IntegerType* ITy = dyn_cast<IntegerType>(Ty))
-    if (ITy->getBitWidth() == 1)
-      return ConstantInt::getTrue();
-    else
-      return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth()));
+    return ConstantInt::get(Ty, APInt::getAllOnesValue(ITy->getBitWidth()));
   return 0;
 }
 






More information about the llvm-commits mailing list