[llvm-commits] [llvm] r61280 - /llvm/trunk/include/llvm/Constants.h

Dan Gohman gohman at apple.com
Sat Dec 20 09:06:40 PST 2008


Author: djg
Date: Sat Dec 20 11:06:39 2008
New Revision: 61280

URL: http://llvm.org/viewvc/llvm-project?rev=61280&view=rev
Log:
Reword the comment for ConstantInt's getLimitedValue.

Modified:
    llvm/trunk/include/llvm/Constants.h

Modified: llvm/trunk/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=61280&r1=61279&r2=61280&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Sat Dec 20 11:06:39 2008
@@ -195,9 +195,11 @@
     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);
   }





More information about the llvm-commits mailing list