From da0e61ca4c21755befa47e19eb1fa1a2f9b62cfe Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 10 Apr 2007 06:44:12 +0000 Subject: [PATCH] getLimitedValue now just forward to APInt's getLimitedValue. Mark it const. llvm-svn: 35861 --- include/llvm/Constants.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index e09fc84c929..0659f3b5133 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -189,9 +189,8 @@ public: /// @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. - uint64_t getLimitedValue(uint64_t Limit) { - return (Val.getActiveBits() > 64 || Val.getZExtValue() > Limit) ? - Limit : Val.getZExtValue(); + uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { + return Val.getLimitedValue(Limit); } /// @returns the value for an integer constant of the given type that has all