summaryrefslogtreecommitdiffstats
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
commita12f1159729aacff516d9f3fa1d6bc3bea1a49d4 (patch)
tree68d64052ff9b774e36858ed67d02da2343a51e30
parent4bc10c9e7743da7ec4cba17c4003ff04a33c7378 (diff)
downloadbcm5719-llvm-a12f1159729aacff516d9f3fa1d6bc3bea1a49d4.tar.gz
bcm5719-llvm-a12f1159729aacff516d9f3fa1d6bc3bea1a49d4.zip
Reword the comment for ConstantInt's getLimitedValue.
llvm-svn: 61280
-rw-r--r--llvm/include/llvm/Constants.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/include/llvm/Constants.h b/llvm/include/llvm/Constants.h
index 28ebe556cde..351e80e176f 100644
--- a/llvm/include/llvm/Constants.h
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud