1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

add a method

llvm-svn: 35860
This commit is contained in:
Chris Lattner 2007-04-10 06:43:18 +00:00
parent 3bbd376057
commit 9359e7f928

View File

@ -281,6 +281,13 @@ public:
return *this != 0;
}
/// getLimitedValue - Return this value, or return all ones if it is too large
/// to return.
uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const {
return (getActiveBits() > 64 || getZExtValue() > Limit) ?
Limit : getZExtValue();
}
/// @}
/// @name Value Generators
/// @{