Lines Matching refs:RHS

150   SmallBitVector(const SmallBitVector &RHS) {
151 if (RHS.isSmall())
152 X = RHS.X;
154 switchToLarge(new BitVector(*RHS.getPointer()));
157 SmallBitVector(SmallBitVector &&RHS) : X(RHS.X) {
158 RHS.X = 1;
387 bool anyCommon(const SmallBitVector &RHS) const {
388 if (isSmall() && RHS.isSmall())
389 return (getSmallBits() & RHS.getSmallBits()) != 0;
390 if (!isSmall() && !RHS.isSmall())
391 return getPointer()->anyCommon(*RHS.getPointer());
393 for (unsigned i = 0, e = std::min(size(), RHS.size()); i != e; ++i)
394 if (test(i) && RHS.test(i))
400 bool operator==(const SmallBitVector &RHS) const {
401 if (size() != RHS.size())
404 return getSmallBits() == RHS.getSmallBits();
406 return *getPointer() == *RHS.getPointer();
409 bool operator!=(const SmallBitVector &RHS) const {
410 return !(*this == RHS);
414 SmallBitVector &operator&=(const SmallBitVector &RHS) {
415 resize(std::max(size(), RHS.size()));
417 setSmallBits(getSmallBits() & RHS.getSmallBits());
418 else if (!RHS.isSmall())
419 getPointer()->operator&=(*RHS.getPointer());
421 SmallBitVector Copy = RHS;
428 /// reset - Reset bits that are set in RHS. Same as *this &= ~RHS.
429 SmallBitVector &reset(const SmallBitVector &RHS) {
430 if (isSmall() && RHS.isSmall())
431 setSmallBits(getSmallBits() & ~RHS.getSmallBits());
432 else if (!isSmall() && !RHS.isSmall())
433 getPointer()->reset(*RHS.getPointer());
435 for (unsigned i = 0, e = std::min(size(), RHS.size()); i != e; ++i)
436 if (RHS.test(i))
442 /// test - Check if (This - RHS) is zero.
443 /// This is the same as reset(RHS) and any().
444 bool test(const SmallBitVector &RHS) const {
445 if (isSmall() && RHS.isSmall())
446 return (getSmallBits() & ~RHS.getSmallBits()) != 0;
447 if (!isSmall() && !RHS.isSmall())
448 return getPointer()->test(*RHS.getPointer());
451 for (i = 0, e = std::min(size(), RHS.size()); i != e; ++i)
452 if (test(i) && !RHS.test(i))
462 SmallBitVector &operator|=(const SmallBitVector &RHS) {
463 resize(std::max(size(), RHS.size()));
465 setSmallBits(getSmallBits() | RHS.getSmallBits());
466 else if (!RHS.isSmall())
467 getPointer()->operator|=(*RHS.getPointer());
469 SmallBitVector Copy = RHS;
476 SmallBitVector &operator^=(const SmallBitVector &RHS) {
477 resize(std::max(size(), RHS.size()));
479 setSmallBits(getSmallBits() ^ RHS.getSmallBits());
480 else if (!RHS.isSmall())
481 getPointer()->operator^=(*RHS.getPointer());
483 SmallBitVector Copy = RHS;
491 const SmallBitVector &operator=(const SmallBitVector &RHS) {
493 if (RHS.isSmall())
494 X = RHS.X;
496 switchToLarge(new BitVector(*RHS.getPointer()));
498 if (!RHS.isSmall())
499 *getPointer() = *RHS.getPointer();
502 X = RHS.X;
508 const SmallBitVector &operator=(SmallBitVector &&RHS) {
509 if (this != &RHS) {
511 swap(RHS);
516 void swap(SmallBitVector &RHS) {
517 std::swap(X, RHS.X);
575 operator&(const SmallBitVector &LHS, const SmallBitVector &RHS) {
577 Result &= RHS;
582 operator|(const SmallBitVector &LHS, const SmallBitVector &RHS) {
584 Result |= RHS;
589 operator^(const SmallBitVector &LHS, const SmallBitVector &RHS) {
591 Result ^= RHS;
600 swap(llvm::SmallBitVector &LHS, llvm::SmallBitVector &RHS) {
601 LHS.swap(RHS);