From: Logan Chien Date: Sun, 28 Feb 2016 15:01:42 +0000 (+0000) Subject: Add ARM EHABI-related constants to unwind.h. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5488f28f7bd8a916787e1835bc115f330d9b5fe;p=clang Add ARM EHABI-related constants to unwind.h. Adds a number of constants, defined in the ARM EHABI spec, to the Clang lib/Headers/unwind.h header. This is prerequisite for landing http://reviews.llvm.org/D15781, as previously discussed there. Patch by Timon Van Overveldt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262178 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h index 303d79288a..4f74a34787 100644 --- a/lib/Headers/unwind.h +++ b/lib/Headers/unwind.h @@ -79,6 +79,10 @@ struct _Unwind_Context; struct _Unwind_Exception; typedef enum { _URC_NO_REASON = 0, +#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ + !defined(__ARM_DWARF_EH__) + _URC_OK = 0, /* used by ARM EHABI */ +#endif _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_FATAL_PHASE2_ERROR = 2, @@ -88,7 +92,11 @@ typedef enum { _URC_END_OF_STACK = 5, _URC_HANDLER_FOUND = 6, _URC_INSTALL_CONTEXT = 7, - _URC_CONTINUE_UNWIND = 8 + _URC_CONTINUE_UNWIND = 8, +#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ + !defined(__ARM_DWARF_EH__) + _URC_FAILURE = 9 /* used by ARM EHABI */ +#endif } _Unwind_Reason_Code; typedef enum { @@ -150,6 +158,15 @@ typedef enum { _UVRSR_FAILED = 2 } _Unwind_VRS_Result; +#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__) +typedef uint32_t _Unwind_State; +#define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0) +#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1) +#define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2) +#define _US_ACTION_MASK ((_Unwind_State)3) +#define _US_FORCE_UNWIND ((_Unwind_State)8) +#endif + _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context, _Unwind_VRS_RegClass __regclass, uint32_t __regno,