Changes in directory llvm/lib/Support:

APInt.cpp updated: 1.85 -> 1.86
---
Log message:

Fix an assertion introduced by my last change to the toString method. We
can't use getZExtValue() to extract the low order bits for each digit. 
Instead, we need to access the low order word directly.


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

 APInt.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.85 llvm/lib/Support/APInt.cpp:1.86
--- llvm/lib/Support/APInt.cpp:1.85     Thu May 17 14:23:02 2007
+++ llvm/lib/Support/APInt.cpp  Fri May 18 19:29:55 2007
@@ -1962,9 +1962,9 @@
       uint64_t mask = radix - 1;
       APInt zero(tmp.getBitWidth(), 0);
       while (tmp.ne(zero)) {
-        unsigned digit = tmp.getZExtValue() & mask;
-        tmp = tmp.lshr(shift);
+        unsigned digit = (tmp.isSingleWord() ? tmp.VAL : tmp.pVal[0]) & mask;
         result.insert(insert_at, digits[digit]);
+        tmp = tmp.lshr(shift);
       }
     }
     return result;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to