[libunwind] 8ebd226 - [libunwind] Add Unwind-wasm.c to CMakeLists.txt (#67770)
    via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Oct  2 13:48:00 PDT 2023
    
    
  
Author: Heejin Ahn
Date: 2023-10-02T13:47:56-07:00
New Revision: 8ebd226375488426fd834239cb5c51b3ea0c8004
URL: https://github.com/llvm/llvm-project/commit/8ebd226375488426fd834239cb5c51b3ea0c8004
DIFF: https://github.com/llvm/llvm-project/commit/8ebd226375488426fd834239cb5c51b3ea0c8004.diff
LOG: [libunwind] Add Unwind-wasm.c to CMakeLists.txt (#67770)
This was missing when the file was added in
https://github.com/llvm/llvm-project/commit/058222b2316615194c089f2bc68d11341f39d26e.
Also reordered some headers to make LLVM CI and clang-format happy.
Added: 
    
Modified: 
    libunwind/src/CMakeLists.txt
    libunwind/src/Unwind-wasm.c
Removed: 
    
################################################################################
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..f7f39d38b59c181 100644
--- a/libunwind/src/Unwind-wasm.c
+++ b/libunwind/src/Unwind-wasm.c
@@ -10,13 +10,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "config.h"
-#include "unwind.h"
 #include <stdbool.h>
-#include <threads.h>
+
+#include "config.h"
 
 #ifdef __USING_WASM_EXCEPTIONS__
 
+#include "unwind.h"
+#include <threads.h>
+
 _Unwind_Reason_Code __gxx_personality_wasm0(int version, _Unwind_Action actions,
                                             uint64_t exceptionClass,
                                             _Unwind_Exception *unwind_exception,
@@ -118,4 +120,4 @@ _Unwind_GetRegionStart(struct _Unwind_Context *context) {
   return 0;
 }
 
-#endif
+#endif // defined(__USING_WASM_EXCEPTIONS__)
        
    
    
More information about the cfe-commits
mailing list