[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

Chris Lattner sabre at nondot.org
Tue Apr 3 23:18:38 PDT 2007



Changes in directory llvm/include/llvm/ADT:

APInt.h updated: 1.62 -> 1.63
---
Log message:

trivial optimization


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

 APInt.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/ADT/APInt.h
diff -u llvm/include/llvm/ADT/APInt.h:1.62 llvm/include/llvm/ADT/APInt.h:1.63
--- llvm/include/llvm/ADT/APInt.h:1.62	Mon Apr  2 23:25:46 2007
+++ llvm/include/llvm/ADT/APInt.h	Wed Apr  4 01:18:21 2007
@@ -278,7 +278,7 @@
   /// This converts the APInt to a boolean value as a test against zero.
   /// @brief Boolean conversion function. 
   inline bool getBoolValue() const {
-    return countLeadingZeros() != BitWidth;
+    return *this != 0;
   }
 
   /// @}






More information about the llvm-commits mailing list