From 969c1a317d2533e676124ee656a5c1c911a22293 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 9 Oct 2015 16:54:54 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249852 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp b/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp index 2499b2c8875..9310ac4a44a 100644 --- a/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp +++ b/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp @@ -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; -- 2.34.1