Changes in directory llvm/include/llvm/ADT:
APInt.h updated: 1.42 -> 1.43 --- Log message: Add isStrictPositive() to APInt to determine if this APInt Value > 0. --- Diffs of the changes: (+6 -0) APInt.h | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.42 llvm/include/llvm/ADT/APInt.h:1.43 --- llvm/include/llvm/ADT/APInt.h:1.42 Tue Mar 13 01:16:26 2007 +++ llvm/include/llvm/ADT/APInt.h Mon Mar 19 00:22:18 2007 @@ -374,6 +374,12 @@ return !isNegative(); } + /// This just tests if the value of this APInt is strictly positive (> 0). + /// @brief Determine if this APInt Value is strictly positive. + inline bool isStrictPositive() const { + return isPositive() && (*this) != 0; + } + /// Arithmetic right-shift this APInt by shiftAmt. /// @brief Arithmetic right-shift function. APInt ashr(uint32_t shiftAmt) const; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits