diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:27:15 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:27:15 +0000 | 
| commit | 67a71b3184ce20a901e874d0ee25e01397dd87ef (patch) | |
| tree | 836a05cff50ca46176117b86029f061fa4db54f0 /lib/Support/APInt.cpp | |
| parent | 6fe5c7aa327e188b7176daa5595bbf075a6b94df (diff) | |
Notes
Diffstat (limited to 'lib/Support/APInt.cpp')
| -rw-r--r-- | lib/Support/APInt.cpp | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 3bce3f3ed3f3..6a6384aa3f43 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -2344,13 +2344,21 @@ APInt::tcExtractBit(const integerPart *parts, unsigned int bit)           & ((integerPart) 1 << bit % integerPartWidth)) != 0;  } -/* Set the given bit of a bignum.  */ +/* Set the given bit of a bignum. */  void  APInt::tcSetBit(integerPart *parts, unsigned int bit)  {    parts[bit / integerPartWidth] |= (integerPart) 1 << (bit % integerPartWidth);  } +/* Clears the given bit of a bignum. */ +void +APInt::tcClearBit(integerPart *parts, unsigned int bit) +{ +  parts[bit / integerPartWidth] &= +    ~((integerPart) 1 << (bit % integerPartWidth)); +} +  /* Returns the bit number of the least significant set bit of a     number.  If the input number has no bits set -1U is returned.  */  unsigned int  | 
