diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineCombiner.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index 230c74fcc1e..9af7a65ca41 100644 --- a/llvm/lib/CodeGen/MachineCombiner.cpp +++ b/llvm/lib/CodeGen/MachineCombiner.cpp @@ -373,8 +373,7 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) { InstrIdxForVirtReg) && preservesResourceLen(MBB, BlockTrace, InsInstrs, DelInstrs))) { for (auto *InstrPtr : InsInstrs) - MBB->insert((MachineBasicBlock::iterator) & MI, - (MachineInstr *)InstrPtr); + MBB->insert((MachineBasicBlock::iterator) &MI, InstrPtr); for (auto *InstrPtr : DelInstrs) InstrPtr->eraseFromParentAndMarkDBGValuesForRemoval(); @@ -390,7 +389,7 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) { // use for them. for (auto *InstrPtr : InsInstrs) { MachineFunction *MF = MBB->getParent(); - MF->DeleteMachineInstr((MachineInstr *)InstrPtr); + MF->DeleteMachineInstr(InstrPtr); } } InstrIdxForVirtReg.clear(); |