Reword the comment for ConstantInt's getLimitedValue.
authorDan Gohman <gohman@apple.com>
Sat, 20 Dec 2008 17:06:39 +0000 (17:06 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 20 Dec 2008 17:06:39 +0000 (17:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61280 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Constants.h

index 28ebe556cde4165d12302764c791b27bc73e54b0..351e80e176ffde3f73b728b3bc49121f9ee89c41 100644 (file)
@@ -195,9 +195,11 @@ public:
     return Val.getActiveBits() > 64 || Val.getZExtValue() >= Num;
   }
 
-  /// @returns the 64-bit value of this constant if its active bits number is 
-  /// not greater than 64, otherwise, just return the given uint64_t number.
-  /// @brief Get the constant's value if possible.
+  /// getLimitedValue - If the value is smaller than the specified limit,
+  /// return it, otherwise return the limit value.  This causes the value
+  /// to saturate to the limit.
+  /// @returns the min of the value of the constant and the specified value
+  /// @brief Get the constant's value with a saturation limit
   uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const {
     return Val.getLimitedValue(Limit);
   }