[WebAssembly] Generate unreachable after __stack_chk_fail

Authored by aheejin on Jul 8 2020, 12:59 AM.


[WebAssembly] Generate unreachable after __stack_chk_fail

__stack_chk_fail does not return, but unreachable was not generated
following call __stack_chk_fail. This had a possibility to generate an
invalid binary for functions with a return type, because
__stack_chk_fail's return type is void and call __stack_chk_fail can
be the last instruction in the function whose return type is non-void.
Generating unreachable after it makes sure CFGStackify's
fixEndsAtEndOfFunction handles it correctly.

Reviewed By: tlively

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