aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-20 17:06:39 +0000
committerDan Gohman <gohman@apple.com>2008-12-20 17:06:39 +0000
commitedf22b97d0d525ed4ec89eda1708c24c45c54b57 (patch)
treec0c91a41e420c31ad0ac00f2078372bcee0fa6bb /include
parent9dce873c1af959d635f1a8dd4ae2ccb5ac62584d (diff)
downloadexternal_llvm-edf22b97d0d525ed4ec89eda1708c24c45c54b57.zip
external_llvm-edf22b97d0d525ed4ec89eda1708c24c45c54b57.tar.gz
external_llvm-edf22b97d0d525ed4ec89eda1708c24c45c54b57.tar.bz2
Reword the comment for ConstantInt's getLimitedValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 28ebe55..351e80e 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -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);
}