[PATCH] D52902: [WebAssembly] Don't modify preds/succs iterators while erasing from them
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 4 13:42:07 PDT 2018
dschuff added inline comments.
================
Comment at: lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp:94
MachineBasicBlock *MBB = WL.pop_back_val();
+ SmallVector<MachineBasicBlock *, 4> Preds, Succs;
for (auto *Pred : MBB->predecessors())
----------------
Could you just copy the Predecessors in the constructor, the way you do with `WL`?
Repository:
rL LLVM
https://reviews.llvm.org/D52902
More information about the llvm-commits
mailing list