[WebAssembly] Don't modify preds/succs iterators while erasing from them
authorHeejin Ahn <aheejin@gmail.com>
Thu, 4 Oct 2018 21:03:35 +0000 (21:03 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Thu, 4 Oct 2018 21:03:35 +0000 (21:03 +0000)
commitb68d591475f6deb2abdf65c57b633cb89be253cb
treed7f144be134a888bffb17029e38b0cfab547b942
parentaa067cb9fb3ac5771d734296d683a886307a8129
[WebAssembly] Don't modify preds/succs iterators while erasing from them

Summary:
This caused out-of-bound bugs. Found by
`-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D52902

llvm-svn: 343814
llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp