[PATCH] D50413: [libunwind][include] Add some missing definitions to <unwind.h>.
Charles Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 8 08:49:05 PDT 2018
cdavis5x updated this revision to Diff 159731.
cdavis5x added a comment.
- Add NetBSD-specific definitions.
- Pull out common declaration of `__personality_routine`.
Repository:
rUNW libunwind
https://reviews.llvm.org/D50413
Files:
include/unwind.h
Index: include/unwind.h
===================================================================
--- include/unwind.h
+++ include/unwind.h
@@ -29,6 +29,32 @@
#define LIBUNWIND_UNAVAIL
#endif
+#if defined(__NetBSD__)
+typedef long _Unwind_Word;
+#else
+typedef uintptr_t _Unwind_Word;
+#endif
+typedef intptr_t _Unwind_Sword;
+typedef uintptr_t _Unwind_Internal_Ptr;
+typedef uint64_t _Unwind_Exception_Class;
+
+typedef intptr_t _sleb128_t;
+typedef uintptr_t _uleb128_t;
+
+#if _LIBUNWIND_ARM_EHABI
+#if defined(__FreeBSD__)
+typedef void *_Unwind_Ptr;
+#elif defined(__linux__)
+typedef unsigned long *_Unwind_Ptr;
+#else
+typedef uintptr_t _Unwind_Ptr;
+#endif
+#elif defined(__NetBSD__)
+typedef void *_Unwind_Ptr;
+#else
+typedef uintptr_t _Unwind_Ptr;
+#endif
+
typedef enum {
_URC_NO_REASON = 0,
_URC_OK = 0,
@@ -111,7 +137,7 @@
_Unwind_Exception* exceptionObject,
struct _Unwind_Context* context);
-typedef _Unwind_Reason_Code (*__personality_routine)
+typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
(_Unwind_State state,
_Unwind_Exception* exceptionObject,
struct _Unwind_Context* context);
@@ -150,13 +176,14 @@
struct _Unwind_Context* context,
void* stop_parameter );
-typedef _Unwind_Reason_Code (*__personality_routine)
+typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
(int version,
_Unwind_Action actions,
uint64_t exceptionClass,
_Unwind_Exception* exceptionObject,
struct _Unwind_Context* context);
#endif
+typedef _Unwind_Personality_Fn __personality_routine;
#ifdef __cplusplus
extern "C" {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50413.159731.patch
Type: text/x-patch
Size: 1627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180808/6ace05ac/attachment.bin>
More information about the llvm-commits
mailing list