mirror-llvm-project/libunwind/include
Demetrius Kanios 1d4e04f7a7
[WebAssembly] Call EH personality function instead of Unwind_CallPersonality (#209282)
On Wasm, it's not currently possibly to change which `personality` is
attached to a given IR function. This is primarily because no matter
what `personality` is attached, codegen creates a call to a
`Unwind_CallPersonality` wrapper hard-coded to call c++abi's
personality.

In order to allow alternative personalities without introducing bloat at
each personality call site, this PR adjusts the ABI of the personality
on Wasm. `Unwind_CallPersonality` is moved to `libcxxabi` under the name
`__gxx_wasm_personality_v0`, with the "real" personality code renamed
`__gxx_personality_imp` and called by `__gxx_wasm_personality_v0` (after
resetting the landing pad context).

The signature of EH personalities on Wasm is now `int personality(void*
exception_object)` (where the int return is `_Unwind_Reason_Code` and
the `void*` is `_Unwind_Exception*`), and personalities are expected to
`__wasm_lpad_context.selector = 0;`.

Based on #175202
2026-07-28 20:05:45 -07:00
..
mach-o [libunwind][arm64e] Mach-O Support unwinding PAuth_LR frames (#202772) 2026-07-24 14:17:11 -07:00
__libunwind_config.h [runtimes] LLVM 24 version bumps (#211262) 2026-07-22 12:38:40 -04:00
CMakeLists.txt [runtimes] Modernize installation targets (#171677) 2025-12-11 09:09:37 -05:00
libunwind.h [libunwind][NFC] Typo fixes & comments corrections & code style changes. (#174565) 2026-01-24 13:45:50 +00:00
libunwind.modulemap
unwind.h [WebAssembly] Call EH personality function instead of Unwind_CallPersonality (#209282) 2026-07-28 20:05:45 -07:00
unwind_arm_ehabi.h [libc++] Enable -Wmissing-prototypes (#116261) 2025-12-16 11:25:07 +01:00
unwind_itanium.h [libunwind][NFC] Typo fixes & comments corrections & code style changes. (#174565) 2026-01-24 13:45:50 +00:00
unwind_wasm.h [WebAssembly] Call EH personality function instead of Unwind_CallPersonality (#209282) 2026-07-28 20:05:45 -07:00