]> granicus.if.org Git - clang/commitdiff
Headers: fix _Unwind_{G,S}etGR for non-EHABI targets
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 27 Jul 2017 21:56:25 +0000 (21:56 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 27 Jul 2017 21:56:25 +0000 (21:56 +0000)
The EHABI definition was being inlined into the users even when EHABI
was not in use.  Adjust the condition to ensure that the right version
is defined.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309327 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/unwind.h

index cbdd505f6c1c891faa03cb994f128d33b0d56977..e94b00b57c268c782de29faaf350b5f7468c1c42 100644 (file)
@@ -177,8 +177,7 @@ typedef _Unwind_Personality_Fn __personality_routine;
 typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *,
                                                 void *);
 
-#if defined(__arm__) && !defined(__APPLE__)
-
+#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH___))
 typedef enum {
   _UVRSC_CORE = 0,        /* integer register */
   _UVRSC_VFP = 1,         /* vfp */
@@ -200,14 +199,12 @@ 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,