Remove APInt::extractBit since it is already implemented via operator[]. Change tests for extractBit to test operator[].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman
2013-12-13 22:00:19 +00:00
parent 5c9e0e52da
commit cadf450e17
3 changed files with 4 additions and 15 deletions

View File

@ -607,14 +607,6 @@ void APInt::flipBit(unsigned bitPosition) {
else setBit(bitPosition);
}
bool APInt::extractBit(unsigned bitPosition) const {
assert(bitPosition < BitWidth && "Out of the bit-width range!");
if (isSingleWord())
return VAL & maskBit(bitPosition);
else
return pVal[whichWord(bitPosition)] & maskBit(bitPosition);
}
unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) {
assert(!str.empty() && "Invalid string length");
assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 ||