[WebAssembly] Use llvm utility functions in EH/SjLj
This uses `changeToCall` and `changeToInvokeAndSplitBasicBlock` from `lib/Transforms/Utils`, replacing the custom logic. One difference of those functions from our previous logic is they delete the original `CallInst`/`InvokeInst`, which makes them tricky to use while iterating through instructions/BBs. So this CL gathers the candidate calls first and run them through `changeToInvokeAndSplitBasicBlock` later. Also this renames some variables. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D116620
Loading
Please register or sign in to comment