diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-09 19:40:45 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-09 19:40:45 +0000 |
commit | 5ec1568c9c57c3bba3e1c37558c6aebb3a45c108 (patch) | |
tree | 953b450f242a7305064d6843fa39137e2d8553e4 /llvm/lib/CodeGen/MachineLoopInfo.cpp | |
parent | 6ac07fd228ff7437376ae85f6b5bb87aff864672 (diff) | |
download | bcm5719-llvm-5ec1568c9c57c3bba3e1c37558c6aebb3a45c108.tar.gz bcm5719-llvm-5ec1568c9c57c3bba3e1c37558c6aebb3a45c108.zip |
CodeGen: Continue removing ilist iterator implicit conversions
llvm-svn: 249884
Diffstat (limited to 'llvm/lib/CodeGen/MachineLoopInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineLoopInfo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp index e19e6e30a01..2f5c9e05cc7 100644 --- a/llvm/lib/CodeGen/MachineLoopInfo.cpp +++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp @@ -51,11 +51,11 @@ MachineBasicBlock *MachineLoop::getTopBlock() { MachineBasicBlock *TopMBB = getHeader(); MachineFunction::iterator Begin = TopMBB->getParent()->begin(); if (TopMBB != Begin) { - MachineBasicBlock *PriorMBB = std::prev(MachineFunction::iterator(TopMBB)); + MachineBasicBlock *PriorMBB = &*std::prev(TopMBB->getIterator()); while (contains(PriorMBB)) { TopMBB = PriorMBB; if (TopMBB == Begin) break; - PriorMBB = std::prev(MachineFunction::iterator(TopMBB)); + PriorMBB = &*std::prev(TopMBB->getIterator()); } } return TopMBB; @@ -65,11 +65,12 @@ MachineBasicBlock *MachineLoop::getBottomBlock() { MachineBasicBlock *BotMBB = getHeader(); MachineFunction::iterator End = BotMBB->getParent()->end(); if (BotMBB != std::prev(End)) { - MachineBasicBlock *NextMBB = std::next(MachineFunction::iterator(BotMBB)); + MachineBasicBlock *NextMBB = &*std::next(BotMBB->getIterator()); while (contains(NextMBB)) { BotMBB = NextMBB; - if (BotMBB == std::next(MachineFunction::iterator(BotMBB))) break; - NextMBB = std::next(MachineFunction::iterator(BotMBB)); + if (BotMBB == &*std::next(BotMBB->getIterator())) + break; + NextMBB = &*std::next(BotMBB->getIterator()); } } return BotMBB; |