mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11: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:
@ -603,7 +603,7 @@ SUnit *ResourcePriorityQueue::pop() {
|
||||
std::vector<SUnit *>::iterator Best = Queue.begin();
|
||||
if (!DisableDFASched) {
|
||||
signed BestCost = SUSchedulingCost(*Best);
|
||||
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 (SUSchedulingCost(*I) > BestCost) {
|
||||
@ -614,14 +614,14 @@ SUnit *ResourcePriorityQueue::pop() {
|
||||
}
|
||||
// Use default TD scheduling mechanism.
|
||||
else {
|
||||
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();
|
||||
@ -633,7 +633,7 @@ SUnit *ResourcePriorityQueue::pop() {
|
||||
void ResourcePriorityQueue::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