diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-10 16:33:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-10 16:33:06 +0000 |
commit | 2b4c23438838034ee2a812f3cb094a9742b272f6 (patch) | |
tree | ca218ece325bf0f2ae159c063e10e5b70f249446 /include/llvm/ADT/APInt.h | |
parent | 0aa37f472a920d8d8e8b6340db29f69641770749 (diff) | |
download | llvm-2b4c23438838034ee2a812f3cb094a9742b272f6.tar.gz llvm-2b4c23438838034ee2a812f3cb094a9742b272f6.tar.bz2 llvm-2b4c23438838034ee2a812f3cb094a9742b272f6.tar.xz |
fix a comment bug Reid noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APInt.h')
-rw-r--r-- | include/llvm/ADT/APInt.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index c514d24bcf..d9470ee3c8 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -281,8 +281,9 @@ public: return *this != 0; } - /// getLimitedValue - Return this value, or return all ones if it is too large - /// to return. + /// getLimitedValue - If this value is smaller than the specified limit, + /// return it, otherwise return the limit value. This causes the value + /// to saturate to the limit. uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { return (getActiveBits() > 64 || getZExtValue() > Limit) ? Limit : getZExtValue(); |