[APInt] Use getWord to shorten some code. NFC

llvm-svn: 303236
This commit is contained in:
Craig Topper 2017-05-17 06:45:30 +00:00
parent b3a505940b
commit 9bb8a6b59f

View File

@ -1067,9 +1067,7 @@ public:
/// \returns the bit value at bitPosition
bool operator[](unsigned bitPosition) const {
assert(bitPosition < getBitWidth() && "Bit position out of bounds!");
return (maskBit(bitPosition) &
(isSingleWord() ? U.VAL : U.pVal[whichWord(bitPosition)])) !=
0;
return (maskBit(bitPosition) & getWord(bitPosition)) != 0;
}
/// @}