https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/67770
>From 3277e2c8058c5d9b0afcc073d711646ebbf7ed62 Mon Sep 17 00:00:00 2001 From: Heejin Ahn <ahee...@gmail.com> Date: Thu, 28 Sep 2023 23:43:26 -0700 Subject: [PATCH 1/4] [libunwind] Add Unwind-wasm.c to CMakeLists.txt This was missing when the file was added. --- libunwind/src/CMakeLists.txt | 1 + libunwind/src/Unwind-wasm.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt index 452d988c3726b5e..abb019b88ebabd7 100644 --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -16,6 +16,7 @@ set(LIBUNWIND_C_SOURCES UnwindLevel1.c UnwindLevel1-gcc-ext.c Unwind-sjlj.c + Unwind-wasm.c ) set_source_files_properties(${LIBUNWIND_C_SOURCES} PROPERTIES diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c index 35f2f9aeab08048..47c79b0d14d37b7 100644 --- a/libunwind/src/Unwind-wasm.c +++ b/libunwind/src/Unwind-wasm.c @@ -10,12 +10,13 @@ // //===----------------------------------------------------------------------===// +#ifdef __USING_WASM_EXCEPTIONS__ + #include "config.h" #include "unwind.h" #include <stdbool.h> #include <threads.h> -#ifdef __USING_WASM_EXCEPTIONS__ _Unwind_Reason_Code __gxx_personality_wasm0(int version, _Unwind_Action actions, uint64_t exceptionClass, >From 784fd43b2a58b55d838afce420c04598e3e37efa Mon Sep 17 00:00:00 2001 From: Heejin Ahn <ahee...@gmail.com> Date: Fri, 29 Sep 2023 00:01:54 -0700 Subject: [PATCH 2/4] Remove newline --- libunwind/src/Unwind-wasm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c index 47c79b0d14d37b7..96af603d666128a 100644 --- a/libunwind/src/Unwind-wasm.c +++ b/libunwind/src/Unwind-wasm.c @@ -17,7 +17,6 @@ #include <stdbool.h> #include <threads.h> - _Unwind_Reason_Code __gxx_personality_wasm0(int version, _Unwind_Action actions, uint64_t exceptionClass, _Unwind_Exception *unwind_exception, >From 921cad7d2db034cdc9f6c80e6dcbad614661fac8 Mon Sep 17 00:00:00 2001 From: Heejin Ahn <ahee...@gmail.com> Date: Fri, 29 Sep 2023 11:20:45 -0700 Subject: [PATCH 3/4] File needs to have at least one declaration --- libunwind/src/Unwind-wasm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c index 96af603d666128a..efbc0762f6349f9 100644 --- a/libunwind/src/Unwind-wasm.c +++ b/libunwind/src/Unwind-wasm.c @@ -10,12 +10,12 @@ // //===----------------------------------------------------------------------===// -#ifdef __USING_WASM_EXCEPTIONS__ - -#include "config.h" -#include "unwind.h" #include <stdbool.h> #include <threads.h> +#include "config.h" +#include "unwind.h" + +#ifdef __USING_WASM_EXCEPTIONS__ _Unwind_Reason_Code __gxx_personality_wasm0(int version, _Unwind_Action actions, uint64_t exceptionClass, @@ -118,4 +118,4 @@ _Unwind_GetRegionStart(struct _Unwind_Context *context) { return 0; } -#endif +#endif // defined(__USING_WASM_EXCEPTIONS__) >From 66b224100087cbfb46ee5acf76c34afa9553c119 Mon Sep 17 00:00:00 2001 From: Heejin Ahn <ahee...@gmail.com> Date: Fri, 29 Sep 2023 11:38:38 -0700 Subject: [PATCH 4/4] Make clang-format happy --- libunwind/src/Unwind-wasm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c index efbc0762f6349f9..403a381fc1d96b7 100644 --- a/libunwind/src/Unwind-wasm.c +++ b/libunwind/src/Unwind-wasm.c @@ -12,6 +12,7 @@ #include <stdbool.h> #include <threads.h> + #include "config.h" #include "unwind.h" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits