Changes in directory llvm/include/llvm/ADT:
APInt.h updated: 1.63 -> 1.64 --- Log message: add a method --- Diffs of the changes: (+7 -0) APInt.h | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.63 llvm/include/llvm/ADT/APInt.h:1.64 --- llvm/include/llvm/ADT/APInt.h:1.63 Wed Apr 4 01:18:21 2007 +++ llvm/include/llvm/ADT/APInt.h Tue Apr 10 01:43:18 2007 @@ -281,6 +281,13 @@ return *this != 0; } + /// getLimitedValue - Return this value, or return all ones if it is too large + /// to return. + uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { + return (getActiveBits() > 64 || getZExtValue() > Limit) ? + Limit : getZExtValue(); + } + /// @} /// @name Value Generators /// @{ _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits