[llvm-commits] CVS: llvm/lib/Support/APInt.cpp

Reid Spencer reid at x10sys.com
Wed Apr 11 06:00:21 PDT 2007



Changes in directory llvm/lib/Support:

APInt.cpp updated: 1.75 -> 1.76
---
Log message:

Fix an approximate calculation in an assertion not to give false negatives.


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

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


Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.75 llvm/lib/Support/APInt.cpp:1.76
--- llvm/lib/Support/APInt.cpp:1.75	Tue Mar 20 23:34:37 2007
+++ llvm/lib/Support/APInt.cpp	Wed Apr 11 08:00:04 2007
@@ -1726,7 +1726,7 @@
   assert(slen <= numbits || radix != 2 && "Insufficient bit width");
   assert(slen*3 <= numbits || radix != 8 && "Insufficient bit width");
   assert(slen*4 <= numbits || radix != 16 && "Insufficient bit width");
-  assert((slen*64)/20 <= numbits || radix != 10 && "Insufficient bit width");
+  assert((slen*64)/22 <= numbits || radix != 10 && "Insufficient bit width");
 
   // Allocate memory
   if (!isSingleWord())






More information about the llvm-commits mailing list