diff --git a/libunwind/include/libunwind.modulemap b/libunwind/include/libunwind.modulemap --- a/libunwind/include/libunwind.modulemap +++ b/libunwind/include/libunwind.modulemap @@ -6,5 +6,8 @@ module unwind [system] { header "__libunwind_config.h" header "unwind.h" + header "unwind_arm_ehabi.h" + header "unwind_itanium.h" + export * } diff --git a/libunwind/include/unwind.h b/libunwind/include/unwind.h --- a/libunwind/include/unwind.h +++ b/libunwind/include/unwind.h @@ -56,9 +56,9 @@ typedef struct _Unwind_Context _Unwind_Context; // opaque #if defined(_LIBUNWIND_ARM_EHABI) -#include "unwind_arm_ehabi.h" +#include #else -#include "unwind_itanium.h" +#include #endif typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) diff --git a/libunwind/include/unwind_arm_ehabi.h b/libunwind/include/unwind_arm_ehabi.h --- a/libunwind/include/unwind_arm_ehabi.h +++ b/libunwind/include/unwind_arm_ehabi.h @@ -13,6 +13,12 @@ #ifndef __ARM_EHABI_UNWIND_H__ #define __ARM_EHABI_UNWIND_H__ +#include <__libunwind_config.h> + +#ifdef _LIBUNWIND_ARM_EHABI + +#include + typedef uint32_t _Unwind_State; static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; @@ -167,4 +173,6 @@ } #endif +#endif // _LIBUNWIND_ARM_EHABI + #endif // __ARM_EHABI_UNWIND_H__ diff --git a/libunwind/include/unwind_itanium.h b/libunwind/include/unwind_itanium.h --- a/libunwind/include/unwind_itanium.h +++ b/libunwind/include/unwind_itanium.h @@ -13,6 +13,12 @@ #ifndef __ITANIUM_UNWIND_H__ #define __ITANIUM_UNWIND_H__ +#include <__libunwind_config.h> + +#ifndef _LIBUNWIND_ARM_EHABI + +#include + struct _Unwind_Context; // opaque struct _Unwind_Exception; // forward declaration typedef struct _Unwind_Exception _Unwind_Exception; @@ -73,4 +79,6 @@ } #endif +#endif // !_LIBUNWIND_ARM_EHABI + #endif // __ITANIUM_UNWIND_H__