[llvm-commits] [llvm] r158446 - /llvm/trunk/lib/Target/Mips/MipsLongBranch.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Thu Jun 14 05:29:48 PDT 2012
Author: chapuni
Date: Thu Jun 14 07:29:48 2012
New Revision: 158446
URL: http://llvm.org/viewvc/llvm-project?rev=158446&view=rev
Log:
MipsLongBranch.cpp: Tweak llvm::next() to appease msvc.
Modified:
llvm/trunk/lib/Target/Mips/MipsLongBranch.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsLongBranch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsLongBranch.cpp?rev=158446&r1=158445&r2=158446&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsLongBranch.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsLongBranch.cpp Thu Jun 14 07:29:48 2012
@@ -129,7 +129,7 @@
(!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 @@
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 @@
// 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 @@
// 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);
More information about the llvm-commits
mailing list