diff options
| author | Dan Gohman <gohman@apple.com> | 2008-02-13 22:09:18 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-02-13 22:09:18 +0000 |
| commit | 7649127ec152e226d761845983ba91e69712d7da (patch) | |
| tree | 63af0b79feb95009a665f8c69053d2e528748eb7 /include | |
| parent | 23067dfeac422d3991690997a9c6a92e11945c48 (diff) | |
Rename APInt's isPositive to isNonNegative, to reflect what it
actually does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/llvm/ADT/APInt.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 8fa1f950bc..6d4b926cef 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -232,16 +232,17 @@ public: } /// This tests the high bit of the APInt to determine if it is unset. - /// @brief Determine if this APInt Value is positive (not negative). - bool isPositive() const { + /// @brief Determine if this APInt Value is non-negative (>= 0) + bool isNonNegative() const { return !isNegative(); } - /// This tests if the value of this APInt is strictly positive (> 0). - /// @returns true if this APInt is Positive and not zero. - /// @brief Determine if this APInt Value is strictly positive. + /// This tests if the value of this APInt is positive (> 0). Note + /// that 0 is not a positive value. + /// @returns true if this APInt is positive. + /// @brief Determine if this APInt Value is positive. inline bool isStrictlyPositive() const { - return isPositive() && (*this) != 0; + return isNonNegative() && (*this) != 0; } /// This checks to see if the value has all bits of the APInt are set or not. |
