diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-06-30 22:52:52 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-06-30 22:52:52 +0000 |
| commit | e4f5e4f4d1c47f996bb22b21989c3cc32fd9a0cd (patch) | |
| tree | f149f6737d4fe96604d1e16648f1161f5b8dcb35 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
| parent | 9743af6e31eb0699ded017ac1f957a4a6fe78bf6 (diff) | |
| download | bcm5719-llvm-e4f5e4f4d1c47f996bb22b21989c3cc32fd9a0cd.tar.gz bcm5719-llvm-e4f5e4f4d1c47f996bb22b21989c3cc32fd9a0cd.zip | |
CodeGen: Use MachineInstr& in TargetLowering, NFC
This is a mechanical change to make TargetLowering API take MachineInstr&
(instead of MachineInstr*), since the argument is expected to be a valid
MachineInstr. In one case, changed a parameter from MachineInstr* to
MachineBasicBlock::iterator, since it was used as an insertion point.
As a side effect, this removes a bunch of MachineInstr* to
MachineBasicBlock::iterator implicit conversions, a necessary step
toward fixing PR26753.
llvm-svn: 274287
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index a4db08ab534..909d5c78b8b 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1172,9 +1172,10 @@ bool TargetLoweringBase::isLegalRC(const TargetRegisterClass *RC) const { /// Replace/modify any TargetFrameIndex operands with a targte-dependent /// sequence of memory operands that is recognized by PrologEpilogInserter. -MachineBasicBlock* -TargetLoweringBase::emitPatchPoint(MachineInstr *MI, +MachineBasicBlock * +TargetLoweringBase::emitPatchPoint(MachineInstr &InitialMI, MachineBasicBlock *MBB) const { + MachineInstr *MI = &InitialMI; MachineFunction &MF = *MI->getParent()->getParent(); MachineFrameInfo &MFI = *MF.getFrameInfo(); |

