mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Remove the old functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -874,8 +874,8 @@ private:
|
||||
// values. The new range should be placed immediately before NewI, move any
|
||||
// intermediate ranges up.
|
||||
assert(NewI != I && "Inconsistent iterators");
|
||||
std::copy(llvm::next(I), NewI, I);
|
||||
*llvm::prior(NewI)
|
||||
std::copy(std::next(I), NewI, I);
|
||||
*std::prev(NewI)
|
||||
= LiveRange::Segment(DefVNI->def, NewIdx.getDeadSlot(), DefVNI);
|
||||
}
|
||||
|
||||
@ -920,7 +920,7 @@ private:
|
||||
if (I == E || !SlotIndex::isSameInstr(I->start, OldIdx)) {
|
||||
// No def, search for the new kill.
|
||||
// This can never be an early clobber kill since there is no def.
|
||||
llvm::prior(I)->end = findLastUseBefore(Reg).getRegSlot();
|
||||
std::prev(I)->end = findLastUseBefore(Reg).getRegSlot();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -956,7 +956,7 @@ private:
|
||||
|
||||
// DefVNI is a dead def. It may have been moved across other values in LR,
|
||||
// so move I up to NewI. Slide [NewI;I) down one position.
|
||||
std::copy_backward(NewI, I, llvm::next(I));
|
||||
std::copy_backward(NewI, I, std::next(I));
|
||||
*NewI = LiveRange::Segment(DefVNI->def, NewIdx.getDeadSlot(), DefVNI);
|
||||
}
|
||||
|
||||
@ -968,11 +968,11 @@ private:
|
||||
"No RegMask at OldIdx.");
|
||||
*RI = NewIdx.getRegSlot();
|
||||
assert((RI == LIS.RegMaskSlots.begin() ||
|
||||
SlotIndex::isEarlierInstr(*llvm::prior(RI), *RI)) &&
|
||||
"Cannot move regmask instruction above another call");
|
||||
assert((llvm::next(RI) == LIS.RegMaskSlots.end() ||
|
||||
SlotIndex::isEarlierInstr(*RI, *llvm::next(RI))) &&
|
||||
"Cannot move regmask instruction below another call");
|
||||
SlotIndex::isEarlierInstr(*std::prev(RI), *RI)) &&
|
||||
"Cannot move regmask instruction above another call");
|
||||
assert((std::next(RI) == LIS.RegMaskSlots.end() ||
|
||||
SlotIndex::isEarlierInstr(*RI, *std::next(RI))) &&
|
||||
"Cannot move regmask instruction below another call");
|
||||
}
|
||||
|
||||
// Return the last use of reg between NewIdx and OldIdx.
|
||||
@ -1125,7 +1125,7 @@ LiveIntervals::repairIntervalsInRange(MachineBasicBlock *MBB,
|
||||
if (LII->end.isDead()) {
|
||||
SlotIndex prevStart;
|
||||
if (LII != LI.begin())
|
||||
prevStart = llvm::prior(LII)->start;
|
||||
prevStart = std::prev(LII)->start;
|
||||
|
||||
// FIXME: This could be more efficient if there was a
|
||||
// removeSegment method that returned an iterator.
|
||||
|
Reference in New Issue
Block a user