mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
Move APInt::operator[] inline.
llvm-svn: 152692
This commit is contained in:
parent
8a2603ad7e
commit
3bb5766d6e
@ -842,7 +842,11 @@ public:
|
||||
|
||||
/// @returns the bit value at bitPosition
|
||||
/// @brief Array-indexing support.
|
||||
bool operator[](unsigned bitPosition) const;
|
||||
bool operator[](unsigned bitPosition) const {
|
||||
assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
|
||||
return (maskBit(bitPosition) &
|
||||
(isSingleWord() ? VAL : pVal[whichWord(bitPosition)])) != 0;
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name Comparison Operators
|
||||
|
@ -484,12 +484,6 @@ APInt APInt::operator-(const APInt& RHS) const {
|
||||
return Result.clearUnusedBits();
|
||||
}
|
||||
|
||||
bool APInt::operator[](unsigned bitPosition) const {
|
||||
assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
|
||||
return (maskBit(bitPosition) &
|
||||
(isSingleWord() ? VAL : pVal[whichWord(bitPosition)])) != 0;
|
||||
}
|
||||
|
||||
bool APInt::EqualSlowCase(const APInt& RHS) const {
|
||||
// Get some facts about the number of bits used in the two operands.
|
||||
unsigned n1 = getActiveBits();
|
||||
|
Loading…
Reference in New Issue
Block a user