mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +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:
@ -119,12 +119,12 @@ void LatencyPriorityQueue::AdjustPriorityOfUnscheduledPreds(SUnit *SU) {
|
||||
SUnit *LatencyPriorityQueue::pop() {
|
||||
if (empty()) return NULL;
|
||||
std::vector<SUnit *>::iterator Best = Queue.begin();
|
||||
for (std::vector<SUnit *>::iterator I = llvm::next(Queue.begin()),
|
||||
for (std::vector<SUnit *>::iterator I = std::next(Queue.begin()),
|
||||
E = Queue.end(); I != E; ++I)
|
||||
if (Picker(*Best, *I))
|
||||
Best = I;
|
||||
SUnit *V = *Best;
|
||||
if (Best != prior(Queue.end()))
|
||||
if (Best != std::prev(Queue.end()))
|
||||
std::swap(*Best, Queue.back());
|
||||
Queue.pop_back();
|
||||
return V;
|
||||
@ -133,7 +133,7 @@ SUnit *LatencyPriorityQueue::pop() {
|
||||
void LatencyPriorityQueue::remove(SUnit *SU) {
|
||||
assert(!Queue.empty() && "Queue is empty!");
|
||||
std::vector<SUnit *>::iterator I = std::find(Queue.begin(), Queue.end(), SU);
|
||||
if (I != prior(Queue.end()))
|
||||
if (I != std::prev(Queue.end()))
|
||||
std::swap(*I, Queue.back());
|
||||
Queue.pop_back();
|
||||
}
|
||||
|
Reference in New Issue
Block a user