xref: /freebsd/contrib/llvm-project/clang/lib/Headers/unwind.h (revision 81ad626541db97eb356e2c1d4a20eb2a26a766ab)
10b57cec5SDimitry Andric /*===---- unwind.h - Stack unwinding ----------------------------------------===
20b57cec5SDimitry Andric  *
30b57cec5SDimitry Andric  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric  * See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric  *
70b57cec5SDimitry Andric  *===-----------------------------------------------------------------------===
80b57cec5SDimitry Andric  */
90b57cec5SDimitry Andric 
100b57cec5SDimitry Andric /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric #ifndef __CLANG_UNWIND_H
130b57cec5SDimitry Andric #define __CLANG_UNWIND_H
140b57cec5SDimitry Andric 
150b57cec5SDimitry Andric #if defined(__APPLE__) && __has_include_next(<unwind.h>)
160b57cec5SDimitry Andric /* Darwin (from 11.x on) provide an unwind.h. If that's available,
170b57cec5SDimitry Andric  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
180b57cec5SDimitry Andric  * so define that around the include.*/
190b57cec5SDimitry Andric # ifndef _GNU_SOURCE
200b57cec5SDimitry Andric #  define _SHOULD_UNDEFINE_GNU_SOURCE
210b57cec5SDimitry Andric #  define _GNU_SOURCE
220b57cec5SDimitry Andric # endif
230b57cec5SDimitry Andric // libunwind's unwind.h reflects the current visibility.  However, Mozilla
240b57cec5SDimitry Andric // builds with -fvisibility=hidden and relies on gcc's unwind.h to reset the
250b57cec5SDimitry Andric // visibility to default and export its contents.  gcc also allows users to
260b57cec5SDimitry Andric // override its override by #defining HIDE_EXPORTS (but note, this only obeys
270b57cec5SDimitry Andric // the user's -fvisibility setting; it doesn't hide any exports on its own).  We
280b57cec5SDimitry Andric // imitate gcc's header here:
290b57cec5SDimitry Andric # ifdef HIDE_EXPORTS
300b57cec5SDimitry Andric #  include_next <unwind.h>
310b57cec5SDimitry Andric # else
320b57cec5SDimitry Andric #  pragma GCC visibility push(default)
330b57cec5SDimitry Andric #  include_next <unwind.h>
340b57cec5SDimitry Andric #  pragma GCC visibility pop
350b57cec5SDimitry Andric # endif
360b57cec5SDimitry Andric # ifdef _SHOULD_UNDEFINE_GNU_SOURCE
370b57cec5SDimitry Andric #  undef _GNU_SOURCE
380b57cec5SDimitry Andric #  undef _SHOULD_UNDEFINE_GNU_SOURCE
390b57cec5SDimitry Andric # endif
400b57cec5SDimitry Andric #else
410b57cec5SDimitry Andric 
420b57cec5SDimitry Andric #include <stdint.h>
430b57cec5SDimitry Andric 
440b57cec5SDimitry Andric #ifdef __cplusplus
450b57cec5SDimitry Andric extern "C" {
460b57cec5SDimitry Andric #endif
470b57cec5SDimitry Andric 
480b57cec5SDimitry Andric /* It is a bit strange for a header to play with the visibility of the
490b57cec5SDimitry Andric    symbols it declares, but this matches gcc's behavior and some programs
500b57cec5SDimitry Andric    depend on it */
510b57cec5SDimitry Andric #ifndef HIDE_EXPORTS
520b57cec5SDimitry Andric #pragma GCC visibility push(default)
530b57cec5SDimitry Andric #endif
540b57cec5SDimitry Andric 
550b57cec5SDimitry Andric typedef uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__)));
560b57cec5SDimitry Andric typedef intptr_t _Unwind_Sword __attribute__((__mode__(__unwind_word__)));
570b57cec5SDimitry Andric typedef uintptr_t _Unwind_Ptr;
580b57cec5SDimitry Andric typedef uintptr_t _Unwind_Internal_Ptr;
590b57cec5SDimitry Andric typedef uint64_t _Unwind_Exception_Class;
600b57cec5SDimitry Andric 
610b57cec5SDimitry Andric typedef intptr_t _sleb128_t;
620b57cec5SDimitry Andric typedef uintptr_t _uleb128_t;
630b57cec5SDimitry Andric 
640b57cec5SDimitry Andric struct _Unwind_Context;
65*81ad6265SDimitry Andric #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
66*81ad6265SDimitry Andric                           defined(__ARM_DWARF_EH__) || defined(__SEH__))
670b57cec5SDimitry Andric struct _Unwind_Control_Block;
680b57cec5SDimitry Andric typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */
690b57cec5SDimitry Andric #else
700b57cec5SDimitry Andric struct _Unwind_Exception;
710b57cec5SDimitry Andric typedef struct _Unwind_Exception _Unwind_Exception;
720b57cec5SDimitry Andric #endif
730b57cec5SDimitry Andric typedef enum {
740b57cec5SDimitry Andric   _URC_NO_REASON = 0,
750b57cec5SDimitry Andric #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
76*81ad6265SDimitry Andric     !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
770b57cec5SDimitry Andric   _URC_OK = 0, /* used by ARM EHABI */
780b57cec5SDimitry Andric #endif
790b57cec5SDimitry Andric   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
800b57cec5SDimitry Andric 
810b57cec5SDimitry Andric   _URC_FATAL_PHASE2_ERROR = 2,
820b57cec5SDimitry Andric   _URC_FATAL_PHASE1_ERROR = 3,
830b57cec5SDimitry Andric   _URC_NORMAL_STOP = 4,
840b57cec5SDimitry Andric 
850b57cec5SDimitry Andric   _URC_END_OF_STACK = 5,
860b57cec5SDimitry Andric   _URC_HANDLER_FOUND = 6,
870b57cec5SDimitry Andric   _URC_INSTALL_CONTEXT = 7,
880b57cec5SDimitry Andric   _URC_CONTINUE_UNWIND = 8,
890b57cec5SDimitry Andric #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
90*81ad6265SDimitry Andric     !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
910b57cec5SDimitry Andric   _URC_FAILURE = 9 /* used by ARM EHABI */
920b57cec5SDimitry Andric #endif
930b57cec5SDimitry Andric } _Unwind_Reason_Code;
940b57cec5SDimitry Andric 
950b57cec5SDimitry Andric typedef enum {
960b57cec5SDimitry Andric   _UA_SEARCH_PHASE = 1,
970b57cec5SDimitry Andric   _UA_CLEANUP_PHASE = 2,
980b57cec5SDimitry Andric 
990b57cec5SDimitry Andric   _UA_HANDLER_FRAME = 4,
1000b57cec5SDimitry Andric   _UA_FORCE_UNWIND = 8,
1010b57cec5SDimitry Andric   _UA_END_OF_STACK = 16 /* gcc extension to C++ ABI */
1020b57cec5SDimitry Andric } _Unwind_Action;
1030b57cec5SDimitry Andric 
1040b57cec5SDimitry Andric typedef void (*_Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code,
1050b57cec5SDimitry Andric                                              _Unwind_Exception *);
1060b57cec5SDimitry Andric 
107*81ad6265SDimitry Andric #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \
108*81ad6265SDimitry Andric                           defined(__ARM_DWARF_EH__) || defined(__SEH__))
1090b57cec5SDimitry Andric typedef struct _Unwind_Control_Block _Unwind_Control_Block;
1100b57cec5SDimitry Andric typedef uint32_t _Unwind_EHT_Header;
1110b57cec5SDimitry Andric 
1120b57cec5SDimitry Andric struct _Unwind_Control_Block {
1130b57cec5SDimitry Andric   uint64_t exception_class;
1140b57cec5SDimitry Andric   void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
1150b57cec5SDimitry Andric   /* unwinder cache (private fields for the unwinder's use) */
1160b57cec5SDimitry Andric   struct {
1170b57cec5SDimitry Andric     uint32_t reserved1; /* forced unwind stop function, 0 if not forced */
1180b57cec5SDimitry Andric     uint32_t reserved2; /* personality routine */
1190b57cec5SDimitry Andric     uint32_t reserved3; /* callsite */
1200b57cec5SDimitry Andric     uint32_t reserved4; /* forced unwind stop argument */
1210b57cec5SDimitry Andric     uint32_t reserved5;
1220b57cec5SDimitry Andric   } unwinder_cache;
1230b57cec5SDimitry Andric   /* propagation barrier cache (valid after phase 1) */
1240b57cec5SDimitry Andric   struct {
1250b57cec5SDimitry Andric     uint32_t sp;
1260b57cec5SDimitry Andric     uint32_t bitpattern[5];
1270b57cec5SDimitry Andric   } barrier_cache;
1280b57cec5SDimitry Andric   /* cleanup cache (preserved over cleanup) */
1290b57cec5SDimitry Andric   struct {
1300b57cec5SDimitry Andric     uint32_t bitpattern[4];
1310b57cec5SDimitry Andric   } cleanup_cache;
1320b57cec5SDimitry Andric   /* personality cache (for personality's benefit) */
1330b57cec5SDimitry Andric   struct {
1340b57cec5SDimitry Andric     uint32_t fnstart;         /* function start address */
1350b57cec5SDimitry Andric     _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
1360b57cec5SDimitry Andric     uint32_t additional;      /* additional data */
1370b57cec5SDimitry Andric     uint32_t reserved1;
1380b57cec5SDimitry Andric   } pr_cache;
1390b57cec5SDimitry Andric   long long int : 0; /* force alignment of next item to 8-byte boundary */
1400b57cec5SDimitry Andric } __attribute__((__aligned__(8)));
1410b57cec5SDimitry Andric #else
1420b57cec5SDimitry Andric struct _Unwind_Exception {
1430b57cec5SDimitry Andric   _Unwind_Exception_Class exception_class;
1440b57cec5SDimitry Andric   _Unwind_Exception_Cleanup_Fn exception_cleanup;
1450b57cec5SDimitry Andric #if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__)
1460b57cec5SDimitry Andric   _Unwind_Word private_[6];
1470b57cec5SDimitry Andric #else
1480b57cec5SDimitry Andric   _Unwind_Word private_1;
1490b57cec5SDimitry Andric   _Unwind_Word private_2;
1500b57cec5SDimitry Andric #endif
1510b57cec5SDimitry Andric   /* The Itanium ABI requires that _Unwind_Exception objects are "double-word
1520b57cec5SDimitry Andric    * aligned".  GCC has interpreted this to mean "use the maximum useful
1530b57cec5SDimitry Andric    * alignment for the target"; so do we. */
1540b57cec5SDimitry Andric } __attribute__((__aligned__));
1550b57cec5SDimitry Andric #endif
1560b57cec5SDimitry Andric 
1570b57cec5SDimitry Andric typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)(int, _Unwind_Action,
1580b57cec5SDimitry Andric                                                _Unwind_Exception_Class,
1590b57cec5SDimitry Andric                                                _Unwind_Exception *,
1600b57cec5SDimitry Andric                                                struct _Unwind_Context *,
1610b57cec5SDimitry Andric                                                void *);
1620b57cec5SDimitry Andric 
1630b57cec5SDimitry Andric typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)(int, _Unwind_Action,
1640b57cec5SDimitry Andric                                                       _Unwind_Exception_Class,
1650b57cec5SDimitry Andric                                                       _Unwind_Exception *,
1660b57cec5SDimitry Andric                                                       struct _Unwind_Context *);
1670b57cec5SDimitry Andric typedef _Unwind_Personality_Fn __personality_routine;
1680b57cec5SDimitry Andric 
1690b57cec5SDimitry Andric typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *,
1700b57cec5SDimitry Andric                                                 void *);
1710b57cec5SDimitry Andric 
172*81ad6265SDimitry Andric #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) ||                \
173*81ad6265SDimitry Andric                           defined(__ARM_DWARF_EH__) || defined(__SEH__))
1740b57cec5SDimitry Andric typedef enum {
1750b57cec5SDimitry Andric   _UVRSC_CORE = 0,        /* integer register */
1760b57cec5SDimitry Andric   _UVRSC_VFP = 1,         /* vfp */
1770b57cec5SDimitry Andric   _UVRSC_WMMXD = 3,       /* Intel WMMX data register */
1780eae32dcSDimitry Andric   _UVRSC_WMMXC = 4,       /* Intel WMMX control register */
1790eae32dcSDimitry Andric   _UVRSC_PSEUDO = 5       /* Special purpose pseudo register */
1800b57cec5SDimitry Andric } _Unwind_VRS_RegClass;
1810b57cec5SDimitry Andric 
1820b57cec5SDimitry Andric typedef enum {
1830b57cec5SDimitry Andric   _UVRSD_UINT32 = 0,
1840b57cec5SDimitry Andric   _UVRSD_VFPX = 1,
1850b57cec5SDimitry Andric   _UVRSD_UINT64 = 3,
1860b57cec5SDimitry Andric   _UVRSD_FLOAT = 4,
1870b57cec5SDimitry Andric   _UVRSD_DOUBLE = 5
1880b57cec5SDimitry Andric } _Unwind_VRS_DataRepresentation;
1890b57cec5SDimitry Andric 
1900b57cec5SDimitry Andric typedef enum {
1910b57cec5SDimitry Andric   _UVRSR_OK = 0,
1920b57cec5SDimitry Andric   _UVRSR_NOT_IMPLEMENTED = 1,
1930b57cec5SDimitry Andric   _UVRSR_FAILED = 2
1940b57cec5SDimitry Andric } _Unwind_VRS_Result;
1950b57cec5SDimitry Andric 
1960b57cec5SDimitry Andric typedef uint32_t _Unwind_State;
1970b57cec5SDimitry Andric #define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
1980b57cec5SDimitry Andric #define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
1990b57cec5SDimitry Andric #define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
2000b57cec5SDimitry Andric #define _US_ACTION_MASK           ((_Unwind_State)3)
2010b57cec5SDimitry Andric #define _US_FORCE_UNWIND          ((_Unwind_State)8)
2020b57cec5SDimitry Andric 
2030b57cec5SDimitry Andric _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
2040b57cec5SDimitry Andric   _Unwind_VRS_RegClass __regclass,
2050b57cec5SDimitry Andric   uint32_t __regno,
2060b57cec5SDimitry Andric   _Unwind_VRS_DataRepresentation __representation,
2070b57cec5SDimitry Andric   void *__valuep);
2080b57cec5SDimitry Andric 
2090b57cec5SDimitry Andric _Unwind_VRS_Result _Unwind_VRS_Set(struct _Unwind_Context *__context,
2100b57cec5SDimitry Andric   _Unwind_VRS_RegClass __regclass,
2110b57cec5SDimitry Andric   uint32_t __regno,
2120b57cec5SDimitry Andric   _Unwind_VRS_DataRepresentation __representation,
2130b57cec5SDimitry Andric   void *__valuep);
2140b57cec5SDimitry Andric 
2150b57cec5SDimitry Andric static __inline__
2160b57cec5SDimitry Andric _Unwind_Word _Unwind_GetGR(struct _Unwind_Context *__context, int __index) {
2170b57cec5SDimitry Andric   _Unwind_Word __value;
2180b57cec5SDimitry Andric   _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
2190b57cec5SDimitry Andric   return __value;
2200b57cec5SDimitry Andric }
2210b57cec5SDimitry Andric 
2220b57cec5SDimitry Andric static __inline__
2230b57cec5SDimitry Andric void _Unwind_SetGR(struct _Unwind_Context *__context, int __index,
2240b57cec5SDimitry Andric                    _Unwind_Word __value) {
2250b57cec5SDimitry Andric   _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
2260b57cec5SDimitry Andric }
2270b57cec5SDimitry Andric 
2280b57cec5SDimitry Andric static __inline__
2290b57cec5SDimitry Andric _Unwind_Word _Unwind_GetIP(struct _Unwind_Context *__context) {
2300b57cec5SDimitry Andric   _Unwind_Word __ip = _Unwind_GetGR(__context, 15);
2310b57cec5SDimitry Andric   return __ip & ~(_Unwind_Word)(0x1); /* Remove thumb mode bit. */
2320b57cec5SDimitry Andric }
2330b57cec5SDimitry Andric 
2340b57cec5SDimitry Andric static __inline__
2350b57cec5SDimitry Andric void _Unwind_SetIP(struct _Unwind_Context *__context, _Unwind_Word __value) {
2360b57cec5SDimitry Andric   _Unwind_Word __thumb_mode_bit = _Unwind_GetGR(__context, 15) & 0x1;
2370b57cec5SDimitry Andric   _Unwind_SetGR(__context, 15, __value | __thumb_mode_bit);
2380b57cec5SDimitry Andric }
2390b57cec5SDimitry Andric #else
2400b57cec5SDimitry Andric _Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int);
2410b57cec5SDimitry Andric void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word);
2420b57cec5SDimitry Andric 
2430b57cec5SDimitry Andric _Unwind_Word _Unwind_GetIP(struct _Unwind_Context *);
2440b57cec5SDimitry Andric void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word);
2450b57cec5SDimitry Andric #endif
2460b57cec5SDimitry Andric 
2470b57cec5SDimitry Andric 
2480b57cec5SDimitry Andric _Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *);
2490b57cec5SDimitry Andric 
2500b57cec5SDimitry Andric _Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *);
2510b57cec5SDimitry Andric 
2520b57cec5SDimitry Andric _Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *);
2530b57cec5SDimitry Andric 
2540b57cec5SDimitry Andric void *_Unwind_GetLanguageSpecificData(struct _Unwind_Context *);
2550b57cec5SDimitry Andric 
2560b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *);
2570b57cec5SDimitry Andric 
2580b57cec5SDimitry Andric /* DWARF EH functions; currently not available on Darwin/ARM */
2590b57cec5SDimitry Andric #if !defined(__APPLE__) || !defined(__arm__)
2600b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *);
2610b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn,
2620b57cec5SDimitry Andric                                          void *);
2630b57cec5SDimitry Andric void _Unwind_DeleteException(_Unwind_Exception *);
2640b57cec5SDimitry Andric void _Unwind_Resume(_Unwind_Exception *);
2650b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *);
2660b57cec5SDimitry Andric 
2670b57cec5SDimitry Andric #endif
2680b57cec5SDimitry Andric 
2690b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
2700b57cec5SDimitry Andric 
2710b57cec5SDimitry Andric /* setjmp(3)/longjmp(3) stuff */
2720b57cec5SDimitry Andric typedef struct SjLj_Function_Context *_Unwind_FunctionContext_t;
2730b57cec5SDimitry Andric 
2740b57cec5SDimitry Andric void _Unwind_SjLj_Register(_Unwind_FunctionContext_t);
2750b57cec5SDimitry Andric void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t);
2760b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *);
2770b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *,
2780b57cec5SDimitry Andric                                               _Unwind_Stop_Fn, void *);
2790b57cec5SDimitry Andric void _Unwind_SjLj_Resume(_Unwind_Exception *);
2800b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *);
2810b57cec5SDimitry Andric 
2820b57cec5SDimitry Andric void *_Unwind_FindEnclosingFunction(void *);
2830b57cec5SDimitry Andric 
2840b57cec5SDimitry Andric #ifdef __APPLE__
2850b57cec5SDimitry Andric 
2860b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
2870b57cec5SDimitry Andric     __attribute__((__unavailable__));
2880b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
2890b57cec5SDimitry Andric     __attribute__((__unavailable__));
2900b57cec5SDimitry Andric 
2910b57cec5SDimitry Andric /* Darwin-specific functions */
2920b57cec5SDimitry Andric void __register_frame(const void *);
2930b57cec5SDimitry Andric void __deregister_frame(const void *);
2940b57cec5SDimitry Andric 
2950b57cec5SDimitry Andric struct dwarf_eh_bases {
2960b57cec5SDimitry Andric   uintptr_t tbase;
2970b57cec5SDimitry Andric   uintptr_t dbase;
2980b57cec5SDimitry Andric   uintptr_t func;
2990b57cec5SDimitry Andric };
3000b57cec5SDimitry Andric void *_Unwind_Find_FDE(const void *, struct dwarf_eh_bases *);
3010b57cec5SDimitry Andric 
3020b57cec5SDimitry Andric void __register_frame_info_bases(const void *, void *, void *, void *)
3030b57cec5SDimitry Andric   __attribute__((__unavailable__));
3040b57cec5SDimitry Andric void __register_frame_info(const void *, void *) __attribute__((__unavailable__));
3050b57cec5SDimitry Andric void __register_frame_info_table_bases(const void *, void*, void *, void *)
3060b57cec5SDimitry Andric   __attribute__((__unavailable__));
3070b57cec5SDimitry Andric void __register_frame_info_table(const void *, void *)
3080b57cec5SDimitry Andric   __attribute__((__unavailable__));
3090b57cec5SDimitry Andric void __register_frame_table(const void *) __attribute__((__unavailable__));
3100b57cec5SDimitry Andric void __deregister_frame_info(const void *) __attribute__((__unavailable__));
3110b57cec5SDimitry Andric void __deregister_frame_info_bases(const void *)__attribute__((__unavailable__));
3120b57cec5SDimitry Andric 
3130b57cec5SDimitry Andric #else
3140b57cec5SDimitry Andric 
3150b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *);
3160b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
3170b57cec5SDimitry Andric 
3180b57cec5SDimitry Andric #endif
3190b57cec5SDimitry Andric 
3200b57cec5SDimitry Andric 
3210b57cec5SDimitry Andric #ifndef HIDE_EXPORTS
3220b57cec5SDimitry Andric #pragma GCC visibility pop
3230b57cec5SDimitry Andric #endif
3240b57cec5SDimitry Andric 
3250b57cec5SDimitry Andric #ifdef __cplusplus
3260b57cec5SDimitry Andric }
3270b57cec5SDimitry Andric #endif
3280b57cec5SDimitry Andric 
3290b57cec5SDimitry Andric #endif
3300b57cec5SDimitry Andric 
3310b57cec5SDimitry Andric #endif /* __CLANG_UNWIND_H */
332