[PATCH] D50413: [libunwind][include] Add some missing definitions to <unwind.h>.

Charles Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 7 15:49:49 PDT 2018


cdavis5x created this revision.
cdavis5x added reviewers: mstorsjo, rnk, compnerd, smeenai.
Herald added subscribers: cfe-commits, chrib, christof, krytarowski.

Add these declarations which should be present in `<unwind.h>`,
but aren't. Not that it matters, since most of the time we'll be using
Clang's `<unwind.h>` anyway.


Repository:
  rUNW libunwind

https://reviews.llvm.org/D50413

Files:
  include/unwind.h


Index: include/unwind.h
===================================================================
--- include/unwind.h
+++ include/unwind.h
@@ -25,6 +25,26 @@
 #define LIBUNWIND_UNAVAIL
 #endif
 
+typedef uintptr_t _Unwind_Word;
+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
+#else
+typedef uintptr_t _Unwind_Ptr;
+#endif
+
 typedef enum {
   _URC_NO_REASON = 0,
   _URC_OK = 0,
@@ -107,10 +127,11 @@
        _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);
+typedef _Unwind_Personality_Fn __personality_routine;
 #else
 struct _Unwind_Context;   // opaque
 struct _Unwind_Exception; // forward declaration
@@ -142,12 +163,13 @@
      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);
+typedef _Unwind_Personality_Fn __personality_routine;
 #endif
 
 #ifdef __cplusplus


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50413.159609.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180807/d1d9dbc1/attachment.bin>


More information about the llvm-commits mailing list