diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-02 05:49:40 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-02 05:49:40 +0000 |
commit | 1e91919ac1853e2a1296f96407894fbc9964d37a (patch) | |
tree | 31e9fb22e5af96948d2ad66eb0cb797439e62ddc /llvm/lib/Support/APInt.cpp | |
parent | 351d9b01b9d4cf14c2d296f88b898a71446a882a (diff) | |
download | bcm5719-llvm-1e91919ac1853e2a1296f96407894fbc9964d37a.tar.gz bcm5719-llvm-1e91919ac1853e2a1296f96407894fbc9964d37a.zip |
[APInt] Move the setBit and clearBit methods inline.
This makes setBit/clearBit more consistent with setBits which is already inlined.
llvm-svn: 301900
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 7103007d8ca..e01e6f5e79f 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -392,13 +392,6 @@ int APInt::compareSigned(const APInt& RHS) const { return tcCompare(pVal, RHS.pVal, getNumWords()); } -void APInt::setBit(unsigned bitPosition) { - if (isSingleWord()) - VAL |= maskBit(bitPosition); - else - pVal[whichWord(bitPosition)] |= maskBit(bitPosition); -} - void APInt::setBitsSlowCase(unsigned loBit, unsigned hiBit) { unsigned loWord = whichWord(loBit); unsigned hiWord = whichWord(hiBit); @@ -426,15 +419,6 @@ void APInt::setBitsSlowCase(unsigned loBit, unsigned hiBit) { pVal[word] = WORD_MAX; } -/// Set the given bit to 0 whose position is given as "bitPosition". -/// @brief Set a given bit to 0. -void APInt::clearBit(unsigned bitPosition) { - if (isSingleWord()) - VAL &= ~maskBit(bitPosition); - else - pVal[whichWord(bitPosition)] &= ~maskBit(bitPosition); -} - /// @brief Toggle every bit to its opposite value. void APInt::flipAllBitsSlowCase() { tcComplement(pVal, getNumWords()); |