AArch64: Make getNextNode() cleanup in r249764 more clear

After r249764, if you didn't see the full context, it looked like
`std::next(I)` would get the same result as
`++MachineBasicBlock::iterator(I)`.  However, `I` is a `MachineInstr*`
(not a `MachineBasicBlock::iterator`).

Use the `getIterator()` helper I added later (r249782) to make this code
more clear.

llvm-svn: 249852
This commit is contained in:
Duncan P. N. Exon Smith 2015-10-09 16:54:54 +00:00
parent 8f11e1a713
commit 769e1a972d
1 changed files with 2 additions and 2 deletions

View File

@ -118,8 +118,8 @@ struct LDTLSCleanup : public MachineFunctionPass {
// Insert a copy from X0 to TLSBaseAddrReg for later.
MachineInstr *Copy =
BuildMI(*I->getParent(), ++MachineBasicBlock::iterator(I),
I->getDebugLoc(), TII->get(TargetOpcode::COPY), *TLSBaseAddrReg)
BuildMI(*I->getParent(), ++I->getIterator(), I->getDebugLoc(),
TII->get(TargetOpcode::COPY), *TLSBaseAddrReg)
.addReg(AArch64::X0);
return Copy;