OSDN Git Service

[WebAssembly] Simplify iterator navigations (NFC)
[android-x86/external-llvm.git] / lib / Target / WebAssembly / WebAssemblyLateEHPrepare.cpp
index d4612b8..6cda1cc 100644 (file)
@@ -132,7 +132,7 @@ bool WebAssemblyLateEHPrepare::removeUnnecessaryUnreachables(
       // another BB that should eventually lead to an unreachable. Delete it
       // because throw itself is a terminator, and also delete successors if
       // any.
-      MBB.erase(std::next(MachineBasicBlock::iterator(MI)), MBB.end());
+      MBB.erase(std::next(MI.getIterator()), MBB.end());
       SmallVector<MachineBasicBlock *, 8> Succs(MBB.succ_begin(),
                                                 MBB.succ_end());
       for (auto *Succ : Succs)