Lines Matching refs:Cur
249 static Field *getNext(Field *Cur) {
250 return static_cast<Field *>(Cur->Scratch);
294 auto spliceFromQueue = [&](AlignmentQueue *Queue, Field *Last, Field *Cur) {
295 assert(Last ? Queue->getNext(Last) == Cur : Queue->Head == Cur);
297 // If we're removing Cur from a non-initial position, splice it out
300 Last->Scratch = Cur->Scratch;
302 // If Cur was the last field in the list, we need to update MinSize.
305 if (!Cur->Scratch)
310 if (auto NewHead = Queue->getNext(Cur))
327 // Helper function to splice Cur out of the given queue and add it
329 auto addToLayout = [&](AlignmentQueue *Queue, Field *Last, Field *Cur,
331 assert(Offset == alignTo(LastEnd, Cur->Alignment));
334 spliceFromQueue(Queue, Last, Cur);
336 // Add Cur to the layout.
337 Layout.push_back(*Cur);
362 for (Field *Cur = Queue->Head, *Last = nullptr; true;
363 Last = Cur, Cur = Queue->getNext(Cur)) {
364 assert(Cur && "didn't find a match in queue despite its MinSize");
365 if (Cur->Size <= MaxViableSize)
366 return addToLayout(Queue, Last, Cur, StartOffset);