[libcxx-commits] [libunwind] [libcxx] [libcxxabi] [libunwind][libcxx][libcxxabi] Fix Exception Handling build for wasm (PR #79667)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 29 08:23:42 PST 2024


================
@@ -36,7 +36,12 @@ struct __cxa_exception;
 _LIBCPP_OVERRIDABLE_FUNC_VIS __cxa_exception* __cxa_init_primary_exception(
     void*,
     std::type_info*,
-    void(
+#  if defined(__USING_WASM_EXCEPTIONS__)
----------------
ldionne wrote:

Let's introduce a typedef name for this function pointer type. Then we can do something like

```c++
#ifdef __USING_WASM_EXCEPTIONS__
using _ExceptionDtor = something;
#else
using _ExceptionDtor = something-else;
#endif
```

and that should be more readable than the current approach.

https://github.com/llvm/llvm-project/pull/79667


More information about the libcxx-commits mailing list