Lines Matching defs:RHS

412   void swap(SmallVectorImpl &RHS);
643 SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
645 SmallVectorImpl &operator=(SmallVectorImpl &&RHS);
647 bool operator==(const SmallVectorImpl &RHS) const {
648 if (this->size() != RHS.size()) return false;
649 return std::equal(this->begin(), this->end(), RHS.begin());
651 bool operator!=(const SmallVectorImpl &RHS) const {
652 return !(*this == RHS);
655 bool operator<(const SmallVectorImpl &RHS) const {
657 RHS.begin(), RHS.end());
677 void SmallVectorImpl<T>::swap(SmallVectorImpl<T> &RHS) {
678 if (this == &RHS) return;
681 if (!this->isSmall() && !RHS.isSmall()) {
682 std::swap(this->BeginX, RHS.BeginX);
683 std::swap(this->EndX, RHS.EndX);
684 std::swap(this->CapacityX, RHS.CapacityX);
687 if (RHS.size() > this->capacity())
688 this->grow(RHS.size());
689 if (this->size() > RHS.capacity())
690 RHS.grow(this->size());
694 if (NumShared > RHS.size()) NumShared = RHS.size();
696 std::swap((*this)[i], RHS[i]);
699 if (this->size() > RHS.size()) {
700 size_t EltDiff = this->size() - RHS.size();
701 this->uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end());
702 RHS.setEnd(RHS.end()+EltDiff);
705 } else if (RHS.size() > this->size()) {
706 size_t EltDiff = RHS.size() - this->size();
707 this->uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end());
709 this->destroy_range(RHS.begin()+NumShared, RHS.end());
710 RHS.setEnd(RHS.begin()+NumShared);
716 operator=(const SmallVectorImpl<T> &RHS) {
718 if (this == &RHS) return *this;
722 size_t RHSSize = RHS.size();
728 NewEnd = std::copy(RHS.begin(), RHS.begin()+RHSSize, this->begin());
751 std::copy(RHS.begin(), RHS.begin()+CurSize, this->begin());
755 this->uninitialized_copy(RHS.begin()+CurSize, RHS.end(),
764 SmallVectorImpl<T> &SmallVectorImpl<T>::operator=(SmallVectorImpl<T> &&RHS) {
766 if (this == &RHS) return *this;
768 // If the RHS isn't small, clear this vector and then steal its buffer.
769 if (!RHS.isSmall()) {
772 this->BeginX = RHS.BeginX;
773 this->EndX = RHS.EndX;
774 this->CapacityX = RHS.CapacityX;
775 RHS.resetToSmall();
781 size_t RHSSize = RHS.size();
787 NewEnd = this->move(RHS.begin(), RHS.end(), NewEnd);
793 // Clear the RHS.
794 RHS.clear();
811 this->move(RHS.begin(), RHS.begin()+CurSize, this->begin());
815 this->uninitialized_move(RHS.begin()+CurSize, RHS.end(),
821 RHS.clear();
868 SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(N) {
869 if (!RHS.empty())
870 SmallVectorImpl<T>::operator=(RHS);
873 const SmallVector &operator=(const SmallVector &RHS) {
874 SmallVectorImpl<T>::operator=(RHS);
878 SmallVector(SmallVector &&RHS) : SmallVectorImpl<T>(N) {
879 if (!RHS.empty())
880 SmallVectorImpl<T>::operator=(::std::move(RHS));
883 const SmallVector &operator=(SmallVector &&RHS) {
884 SmallVectorImpl<T>::operator=(::std::move(RHS));
900 swap(llvm::SmallVectorImpl<T> &LHS, llvm::SmallVectorImpl<T> &RHS) {
901 LHS.swap(RHS);
907 swap(llvm::SmallVector<T, N> &LHS, llvm::SmallVector<T, N> &RHS) {
908 LHS.swap(RHS);