@@ -332,15 +332,15 @@ static void PlaceBlockMarker(MachineBasicBlock &MBB, MachineFunction &MF,
332332 return ;
333333
334334 assert (&MBB != &MF.front () && " Header blocks shouldn't have predecessors" );
335- MachineBasicBlock *LayoutPred = &*prev (MachineFunction::iterator (&MBB));
335+ MachineBasicBlock *LayoutPred = &*std:: prev (MachineFunction::iterator (&MBB));
336336
337337 // If the nearest common dominator is inside a more deeply nested context,
338338 // walk out to the nearest scope which isn't more deeply nested.
339339 for (MachineFunction::iterator I (LayoutPred), E (Header); I != E; --I) {
340340 if (MachineBasicBlock *ScopeTop = ScopeTops[I->getNumber ()]) {
341341 if (ScopeTop->getNumber () > Header->getNumber ()) {
342342 // Skip over an intervening scope.
343- I = next (MachineFunction::iterator (ScopeTop));
343+ I = std:: next (MachineFunction::iterator (ScopeTop));
344344 } else {
345345 // We found a scope level at an appropriate depth.
346346 Header = ScopeTop;
@@ -369,10 +369,11 @@ static void PlaceBlockMarker(MachineBasicBlock &MBB, MachineFunction &MF,
369369 // Otherwise, insert the BLOCK as late in Header as we can, but before the
370370 // beginning of the local expression tree and any nested BLOCKs.
371371 InsertPos = Header->getFirstTerminator ();
372- while (InsertPos != Header->begin () && IsChild (*prev (InsertPos), MFI) &&
373- prev (InsertPos)->getOpcode () != WebAssembly::LOOP &&
374- prev (InsertPos)->getOpcode () != WebAssembly::END_BLOCK &&
375- prev (InsertPos)->getOpcode () != WebAssembly::END_LOOP)
372+ while (InsertPos != Header->begin () &&
373+ IsChild (*std::prev (InsertPos), MFI) &&
374+ std::prev (InsertPos)->getOpcode () != WebAssembly::LOOP &&
375+ std::prev (InsertPos)->getOpcode () != WebAssembly::END_BLOCK &&
376+ std::prev (InsertPos)->getOpcode () != WebAssembly::END_LOOP)
376377 --InsertPos;
377378 }
378379
@@ -406,13 +407,13 @@ static void PlaceLoopMarker(
406407 // The operand of a LOOP is the first block after the loop. If the loop is the
407408 // bottom of the function, insert a dummy block at the end.
408409 MachineBasicBlock *Bottom = LoopBottom (Loop);
409- auto Iter = next (MachineFunction::iterator (Bottom));
410+ auto Iter = std:: next (MachineFunction::iterator (Bottom));
410411 if (Iter == MF.end ()) {
411412 MachineBasicBlock *Label = MF.CreateMachineBasicBlock ();
412413 // Give it a fake predecessor so that AsmPrinter prints its label.
413414 Label->addSuccessor (Label);
414415 MF.push_back (Label);
415- Iter = next (MachineFunction::iterator (Bottom));
416+ Iter = std:: next (MachineFunction::iterator (Bottom));
416417 }
417418 MachineBasicBlock *AfterLoop = &*Iter;
418419
0 commit comments