[all-commits] [llvm/llvm-project] e6cbba: [libc++abi][WebAssembly] Support Wasm EH

Heejin Ahn via All-commits all-commits at lists.llvm.org
Fri Sep 22 00:34:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6cbba749490a20127359a3fbd05d8db7faef535
      https://github.com/llvm/llvm-project/commit/e6cbba749490a20127359a3fbd05d8db7faef535
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2023-09-22 (Fri, 22 Sep 2023)

  Changed paths:
    M libcxxabi/include/cxxabi.h
    M libcxxabi/src/cxa_exception.cpp
    M libcxxabi/src/cxa_exception.h
    M libcxxabi/src/cxa_personality.cpp

  Log Message:
  -----------
  [libc++abi][WebAssembly] Support Wasm EH

This adds Wasm-specific libc++abi changes to support Wasm exception
handling (https://github.com/WebAssembly/exception-handling).

Wasm EH requires `__USING_WASM_EXCEPTIONS__` to be defined. Wasm EH's
LSDA handling mostly shares that of SjLj EH.
Changes are:
- In Wasm, a destructor returns its argument.
- Wasm EH currently only has one phase (search) that does both search
  and cleanup. So added an additional `set_registers` to support that.

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: D158919

Reviewed By: dschuff, #libc_abi, phosek

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




More information about the All-commits mailing list