diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-06-14 12:29:48 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-06-14 12:29:48 +0000 |
commit | f1ece226125c9e8b0d0311cab7266391743da29b (patch) | |
tree | cdda3148a0a041d55968935d358232725d4ad32f /lib/Target/Mips/MipsLongBranch.cpp | |
parent | a1c7367a5bed459acc88e3ea2a482b4b5dac942a (diff) | |
download | external_llvm-f1ece226125c9e8b0d0311cab7266391743da29b.zip external_llvm-f1ece226125c9e8b0d0311cab7266391743da29b.tar.gz external_llvm-f1ece226125c9e8b0d0311cab7266391743da29b.tar.bz2 |
MipsLongBranch.cpp: Tweak llvm::next() to appease msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsLongBranch.cpp')
-rw-r--r-- | lib/Target/Mips/MipsLongBranch.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/Mips/MipsLongBranch.cpp b/lib/Target/Mips/MipsLongBranch.cpp index 92b5772..978c49a 100644 --- a/lib/Target/Mips/MipsLongBranch.cpp +++ b/lib/Target/Mips/MipsLongBranch.cpp @@ -129,7 +129,7 @@ void MipsLongBranch::splitMBB(MachineBasicBlock *MBB) { (!LastBr->isConditionalBranch() && !LastBr->isUnconditionalBranch())) return; - ReverseIter FirstBr = getNonDebugInstr(next(LastBr), End); + ReverseIter FirstBr = getNonDebugInstr(llvm::next(LastBr), End); // MBB has only one branch instruction if FirstBr is not a branch // instruction. @@ -149,7 +149,7 @@ void MipsLongBranch::splitMBB(MachineBasicBlock *MBB) { NewMBB->removeSuccessor(Tgt); MBB->addSuccessor(NewMBB); MBB->addSuccessor(Tgt); - MF->insert(next(MachineFunction::iterator(MBB)), NewMBB); + MF->insert(llvm::next(MachineFunction::iterator(MBB)), NewMBB); NewMBB->splice(NewMBB->end(), MBB, (++LastBr).base(), MBB->end()); } @@ -319,10 +319,12 @@ void MipsLongBranch::expandToLongBranch(MBBInfo &I) { // addiu $at, $at, %lo($tgt) // jr $at // nop - I.Size += (addLongBranch(*MBB, next(Iter(I.Br)), Tgt, DL, true) - 1) * 4; + I.Size += (addLongBranch(*MBB, llvm::next(Iter(I.Br)), Tgt, DL, true) + - 1) * 4; // Remove branch and clear InsideBundle bit of the next instruction. - next(MachineBasicBlock::instr_iterator(I.Br))->setIsInsideBundle(false); + llvm::next(MachineBasicBlock::instr_iterator(I.Br)) + ->setIsInsideBundle(false); I.Br->eraseFromParent(); return; } @@ -346,7 +348,7 @@ void MipsLongBranch::expandToLongBranch(MBBInfo &I) { // FallThrough: MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB->getBasicBlock()); - MF->insert(next(MachineFunction::iterator(MBB)), NewMBB); + MF->insert(llvm::next(MachineFunction::iterator(MBB)), NewMBB); MBB->removeSuccessor(Tgt); MBB->addSuccessor(NewMBB); NewMBB->addSuccessor(Tgt); |