remove unnecessary casts; NFCI
authorSanjay Patel <spatel@rotateright.com>
Sat, 13 Jun 2015 15:06:33 +0000 (15:06 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 13 Jun 2015 15:06:33 +0000 (15:06 +0000)
llvm-svn: 239678

llvm/lib/CodeGen/MachineCombiner.cpp

index 230c74f..9af7a65 100644 (file)
@@ -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();