• Home
  • Raw
  • Download

Lines Matching refs:RHS

166 void SmallPtrSetImplBase::CopyFrom(const SmallPtrSetImplBase &RHS) {  in CopyFrom()  argument
167 assert(&RHS != this && "Self-copy should be handled by the caller."); in CopyFrom()
169 if (isSmall() && RHS.isSmall()) in CopyFrom()
170 assert(CurArraySize == RHS.CurArraySize && in CopyFrom()
174 if (RHS.isSmall()) { in CopyFrom()
179 } else if (CurArraySize != RHS.CurArraySize) { in CopyFrom()
181 CurArray = (const void**)malloc(sizeof(void*) * RHS.CurArraySize); in CopyFrom()
184 sizeof(void*) * RHS.CurArraySize); in CopyFrom()
192 CopyHelper(RHS); in CopyFrom()
195 void SmallPtrSetImplBase::CopyHelper(const SmallPtrSetImplBase &RHS) { in CopyHelper() argument
197 CurArraySize = RHS.CurArraySize; in CopyHelper()
200 std::copy(RHS.CurArray, RHS.EndPointer(), CurArray); in CopyHelper()
202 NumNonEmpty = RHS.NumNonEmpty; in CopyHelper()
203 NumTombstones = RHS.NumTombstones; in CopyHelper()
207 SmallPtrSetImplBase &&RHS) { in MoveFrom() argument
210 MoveHelper(SmallSize, std::move(RHS)); in MoveFrom()
214 SmallPtrSetImplBase &&RHS) { in MoveHelper() argument
215 assert(&RHS != this && "Self-move should be handled by the caller."); in MoveHelper()
217 if (RHS.isSmall()) { in MoveHelper()
220 std::copy(RHS.CurArray, RHS.CurArray + RHS.NumNonEmpty, CurArray); in MoveHelper()
222 CurArray = RHS.CurArray; in MoveHelper()
223 RHS.CurArray = RHS.SmallArray; in MoveHelper()
227 CurArraySize = RHS.CurArraySize; in MoveHelper()
228 NumNonEmpty = RHS.NumNonEmpty; in MoveHelper()
229 NumTombstones = RHS.NumTombstones; in MoveHelper()
232 RHS.CurArraySize = SmallSize; in MoveHelper()
233 assert(RHS.CurArray == RHS.SmallArray); in MoveHelper()
234 RHS.NumNonEmpty = 0; in MoveHelper()
235 RHS.NumTombstones = 0; in MoveHelper()
238 void SmallPtrSetImplBase::swap(SmallPtrSetImplBase &RHS) { in swap() argument
239 if (this == &RHS) return; in swap()
242 if (!this->isSmall() && !RHS.isSmall()) { in swap()
243 std::swap(this->CurArray, RHS.CurArray); in swap()
244 std::swap(this->CurArraySize, RHS.CurArraySize); in swap()
245 std::swap(this->NumNonEmpty, RHS.NumNonEmpty); in swap()
246 std::swap(this->NumTombstones, RHS.NumTombstones); in swap()
254 if (!this->isSmall() && RHS.isSmall()) { in swap()
255 assert(RHS.CurArray == RHS.SmallArray); in swap()
256 std::copy(RHS.CurArray, RHS.CurArray + RHS.NumNonEmpty, this->SmallArray); in swap()
257 std::swap(RHS.CurArraySize, this->CurArraySize); in swap()
258 std::swap(this->NumNonEmpty, RHS.NumNonEmpty); in swap()
259 std::swap(this->NumTombstones, RHS.NumTombstones); in swap()
260 RHS.CurArray = this->CurArray; in swap()
267 if (this->isSmall() && !RHS.isSmall()) { in swap()
270 RHS.SmallArray); in swap()
271 std::swap(RHS.CurArraySize, this->CurArraySize); in swap()
272 std::swap(RHS.NumNonEmpty, this->NumNonEmpty); in swap()
273 std::swap(RHS.NumTombstones, this->NumTombstones); in swap()
274 this->CurArray = RHS.CurArray; in swap()
275 RHS.CurArray = RHS.SmallArray; in swap()
280 assert(this->isSmall() && RHS.isSmall()); in swap()
281 unsigned MinNonEmpty = std::min(this->NumNonEmpty, RHS.NumNonEmpty); in swap()
283 RHS.SmallArray); in swap()
287 RHS.SmallArray + MinNonEmpty); in swap()
289 std::copy(RHS.SmallArray + MinNonEmpty, RHS.SmallArray + RHS.NumNonEmpty, in swap()
292 assert(this->CurArraySize == RHS.CurArraySize); in swap()
293 std::swap(this->NumNonEmpty, RHS.NumNonEmpty); in swap()
294 std::swap(this->NumTombstones, RHS.NumTombstones); in swap()