diff options
author | Heejin Ahn <aheejin@gmail.com> | 2020-07-08 00:59:21 -0700 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2020-07-08 01:02:05 -0700 |
commit | 7e6793aa33dd61ed9dd531871fce30c1b7978e13 (patch) | |
tree | 82b8f6e3e1f3a2f22f1a882574f433efeefadb76 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 80970ac87574c6d0292894a4a912fa512336f434 (diff) | |
download | llvm-7e6793aa33dd61ed9dd531871fce30c1b7978e13.zip llvm-7e6793aa33dd61ed9dd531871fce30c1b7978e13.tar.gz llvm-7e6793aa33dd61ed9dd531871fce30c1b7978e13.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
0 files changed, 0 insertions, 0 deletions