summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-08 22:43:26 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-08 22:43:26 +0000
commitd389165c1434ff7ffadeaad3608e8ba2818e7fac (patch)
treec4b4ca37dc6743ba4c0e880b126d9973c31fa0aa /llvm
parentece61624b122aa8a9e08b43e537cdc550c9342c3 (diff)
downloadbcm5719-llvm-d389165c1434ff7ffadeaad3608e8ba2818e7fac.tar.gz
bcm5719-llvm-d389165c1434ff7ffadeaad3608e8ba2818e7fac.zip
AArch64: Stop using MachineInstr::getNextNode()
Stop using `getNextNode()` to get an insertion point (at least, in this one place). Instead, use iterator logic directly. The `getNextNode()` interface isn't actually supposed to work for creating iterators; it's supposed to return `nullptr` (not a real iterator) if this is the last node. It's currently broken and will "happen" to work, but if we ever fix the function, we'll get some strange failures in places like this. llvm-svn: 249764
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp b/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
index 06ff9af37fd..2499b2c8875 100644
--- a/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
+++ b/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
@@ -117,10 +117,10 @@ struct LDTLSCleanup : public MachineFunctionPass {
*TLSBaseAddrReg = RegInfo.createVirtualRegister(&AArch64::GPR64RegClass);
// Insert a copy from X0 to TLSBaseAddrReg for later.
- MachineInstr *Next = I->getNextNode();
- MachineInstr *Copy = BuildMI(*I->getParent(), Next, I->getDebugLoc(),
- TII->get(TargetOpcode::COPY),
- *TLSBaseAddrReg).addReg(AArch64::X0);
+ MachineInstr *Copy =
+ BuildMI(*I->getParent(), ++MachineBasicBlock::iterator(I),
+ I->getDebugLoc(), TII->get(TargetOpcode::COPY), *TLSBaseAddrReg)
+ .addReg(AArch64::X0);
return Copy;
}
OpenPOWER on IntegriCloud