CodeGen: Start removing implicit conversions to/from list iterators, NFC
[oota-llvm.git] / include / llvm / CodeGen / MachineBasicBlock.h
index 8ebc8bd02cb4f92a1ecd32b50e3b88430a7916a4..07fa3f603d7fb4c4c00b2e933bbaedc5d1015002 100644 (file)
@@ -181,7 +181,7 @@ public:
     Ty &operator*() const { return *MII; }
     Ty *operator->() const { return &operator*(); }
 
-    operator Ty*() const { return MII; }
+    operator Ty *() const { return MII.getNodePtrUnchecked(); }
 
     bool operator==(const bundle_iterator &X) const {
       return MII == X.MII;
@@ -600,7 +600,7 @@ public:
   /// remove_instr to remove individual instructions from a bundle.
   MachineInstr *remove(MachineInstr *I) {
     assert(!I->isBundled() && "Cannot remove bundled instructions");
-    return Insts.remove(I);
+    return Insts.remove(instr_iterator(I));
   }
 
   /// Remove the possibly bundled instruction from the instruction list