Changes in directory llvm/include/llvm:
Constants.h updated: 1.110 -> 1.111 --- Log message: Correct the description of ConstantInt::isValueValidForType. --- Diffs of the changes: (+5 -3) Constants.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.110 llvm/include/llvm/Constants.h:1.111 --- llvm/include/llvm/Constants.h:1.110 Mon Dec 18 19:28:19 2006 +++ llvm/include/llvm/Constants.h Mon Dec 18 19:34:39 2006 @@ -181,9 +181,11 @@ /// This static method returns true if the type Ty is big enough to /// represent the value V. This can be used to avoid having the get method - /// assert when V is larger than Ty can represent. Note that values are - /// always treated as unsigned so if the intention is to represent a signed - /// type, you must do the conversion first. + /// assert when V is larger than Ty can represent. Note that there are two + /// versions of this method, one for unsigned and one for signed integers. + /// Although ConstantInt canonicalizes everything to an unsigned integer, + /// the signed version avoids callers having to convert a signed quantity + /// to the appropriate unsigned type before calling the method. /// @returns true if V is a valid value for type Ty /// @brief Determine if the value is in range for the given type. static bool isValueValidForType(const Type *Ty, uint64_t V); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits