summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-07-01 16:38:28 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-07-01 16:38:28 +0000
commitaae6f3c95e8daa2d27cb2c0fc5f94b8cafe11bb8 (patch)
treebb7a97183bcb4d28a1cb5dc31eda317af228f05e /llvm/lib/CodeGen/TargetInstrInfo.cpp
parentb77911be0209447f080fd61e72914cb1c559d419 (diff)
downloadbcm5719-llvm-aae6f3c95e8daa2d27cb2c0fc5f94b8cafe11bb8.tar.gz
bcm5719-llvm-aae6f3c95e8daa2d27cb2c0fc5f94b8cafe11bb8.zip
CodeGen: Avoid implicit conversions in TargetInstrInfo, NFC
Avoid implicit conversions from MachineBasicBlock::iterator to MachineInstr* in TargetInstrInfo. llvm-svn: 274361
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp
index 4500e890beb..f221fa1ea5e 100644
--- a/llvm/lib/CodeGen/TargetInstrInfo.cpp
+++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp
@@ -552,7 +552,7 @@ MachineInstr *TargetInstrInfo::foldMemoryOperand(MachineInstr &MI,
storeRegToStackSlot(*MBB, Pos, MO.getReg(), MO.isKill(), FI, RC, TRI);
else
loadRegFromStackSlot(*MBB, Pos, MO.getReg(), FI, RC, TRI);
- return --Pos;
+ return &*--Pos;
}
bool TargetInstrInfo::hasReassociableOperands(
@@ -793,7 +793,7 @@ MachineInstr *TargetInstrInfo::foldMemoryOperand(MachineInstr &MI,
// Fold stackmap/patchpoint.
NewMI = foldPatchpoint(MF, MI, Ops, FrameIndex, *this);
if (NewMI)
- NewMI = MBB.insert(MI, NewMI);
+ NewMI = &*MBB.insert(MI, NewMI);
} else {
// Ask the target to do the actual folding.
NewMI = foldMemoryOperandImpl(MF, MI, Ops, MI, LoadMI, LIS);
OpenPOWER on IntegriCloud