summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ExpandPseudo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-07-12 03:18:50 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-07-12 03:18:50 +0000
commit7b4c18e8f38a0139e1f2ece643df9f7c21246b39 (patch)
tree219505b2f5c6f43af05c1c1f45aeeffa54774d4b /llvm/lib/Target/X86/X86ExpandPseudo.cpp
parent99933f1b51d314d4eb7813f59911e14ecc07d4ff (diff)
downloadbcm5719-llvm-7b4c18e8f38a0139e1f2ece643df9f7c21246b39.tar.gz
bcm5719-llvm-7b4c18e8f38a0139e1f2ece643df9f7c21246b39.zip
X86: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIterator to MachineInstr*, mainly by preferring MachineInstr& over MachineInstr* and using range-based for loops. llvm-svn: 275149
Diffstat (limited to 'llvm/lib/Target/X86/X86ExpandPseudo.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ExpandPseudo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ExpandPseudo.cpp b/llvm/lib/Target/X86/X86ExpandPseudo.cpp
index 5ff35f7a112..093fed7276f 100644
--- a/llvm/lib/Target/X86/X86ExpandPseudo.cpp
+++ b/llvm/lib/Target/X86/X86ExpandPseudo.cpp
@@ -134,8 +134,8 @@ bool X86ExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
.addReg(JumpTarget.getReg(), RegState::Kill);
}
- MachineInstr *NewMI = std::prev(MBBI);
- NewMI->copyImplicitOps(*MBBI->getParent()->getParent(), *MBBI);
+ MachineInstr &NewMI = *std::prev(MBBI);
+ NewMI.copyImplicitOps(*MBBI->getParent()->getParent(), *MBBI);
// Delete the pseudo instruction TCRETURN.
MBB.erase(MBBI);
OpenPOWER on IntegriCloud