Changes in directory llvm/include/llvm/ADT:
APInt.h updated: 1.15 -> 1.16 --- Log message: Add a dump() method for debugging. --- Diffs of the changes: (+7 -2) APInt.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.15 llvm/include/llvm/ADT/APInt.h:1.16 --- llvm/include/llvm/ADT/APInt.h:1.15 Tue Feb 20 02:43:42 2007 +++ llvm/include/llvm/ADT/APInt.h Tue Feb 20 21:56:12 2007 @@ -128,12 +128,17 @@ void fromString(uint32_t numBits, const char *StrStart, uint32_t slen, uint8_t radix); +#ifndef NDEBUG + /// @brief debug method + void dump() const; +#endif + +public: /// @brief An internal division function for dividing APInts. static void divide(const APInt LHS, uint32_t lhsWords, const APInt &RHS, uint32_t rhsWords, APInt *Quotient, APInt *Remainder); -public: /// @brief Create a new APInt of numBits bit-width, and initialized as val. APInt(uint32_t numBits, uint64_t val); @@ -412,7 +417,7 @@ /// computations to see how "wide" the value is. /// @brief Compute the number of active bits in the value inline uint32_t getActiveBits() const { - return getNumWords() * APINT_BITS_PER_WORD - countLeadingZeros(); + return BitWidth - countLeadingZeros(); } /// @returns a uint64_t value from this APInt. If this APInt contains a single _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits