Currently, when Wasm EH is used with Emscripten SjLj, Emscripten SjLj
cannot handle invoke instructions - it assumes all invokes have been
lowered away with Emscripten EH. But in Wasm EH they are lowered in
instruction selection, so they are still present in the IR stage. This
happens when
- Wasm EH and Emscripten SjLj are used together
- A function that calls setjmp uses exceptions, i.e., has invokes
We were already erroring out with an assertion failure in this case, but
this CL makes it error out more properly with a valid error message.
Wasm EH + Wasm SjLj will not have this restrictions. (it will have
another restriction though, e.g., setjmp cannot be called within
catch. But why would anyone do that..)