aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-08-23 18:20:14 -0700
committerHeejin Ahn <aheejin@gmail.com>2023-09-22 00:35:37 -0700
commit058222b2316615194c089f2bc68d11341f39d26e (patch)
tree2a03c53f0fcfd2b855b16b25ab4876b9150d493c /llvm/lib/Transforms
parente6cbba749490a20127359a3fbd05d8db7faef535 (diff)
downloadllvm-058222b2316615194c089f2bc68d11341f39d26e.zip
llvm-058222b2316615194c089f2bc68d11341f39d26e.tar.gz
llvm-058222b2316615194c089f2bc68d11341f39d26e.tar.bz2
[libunwind][WebAssembly] Support Wasm EH
This adds Wasm-specific libunwind port to support Wasm exception handling (https://github.com/WebAssembly/exception-handling). Wasm EH requires `__USING_WASM_EXCEPTIONS__` to be defined. This adds `Unwind-wasm.c`, which defines libunwind APIs for Wasm. This also adds a `thread_local` struct of type `_Unwind_LandingPadContext`, which serves as a medium for input/output data between the user code and the personality function. How all these work is explained in https://github.com/WebAssembly/tool-conventions/blob/main/EHScheme.md. (The doc is old and "You Shouldn't Prune Unreachable Resumes" section doesn't apply anymore, but otherwise it should be good) The bulk of these changes was added back in Mar 2020 in https://github.com/emscripten-core/emscripten/pull/10577 to emscripten repo and has been used ever since. Now we'd like to upstream this so that other toolchains that don't use emscripten libraries, e.g., WASI, can use this too. Companion patch: D158918 Reviewed By: dschuff, #libunwind, phosek Differential Revision: https://reviews.llvm.org/D158919
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions