summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2013-10-17 03:57:41 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2013-10-17 03:57:41 +0000
commit839f7f23c0a652e2b799345fc3112ae0c5a03098 (patch)
tree3485778143389971ca5c00f932f0a99d1c0398c7 /include
parent6dc154019d5f0997d7df1d9e9f3ba1425396dcd8 (diff)
unwinder: conditionalise availability
__attribute__ (( unavailable )) is for Apple specific builds. Create a macro to conditionalise the usage of the macro. This is to aid in porting the unwinder to other platforms. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@192868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/unwind.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/include/unwind.h b/include/unwind.h
index bd791da..4372dca 100644
--- a/include/unwind.h
+++ b/include/unwind.h
@@ -17,6 +17,12 @@
#include <stdint.h>
#include <stddef.h>
+#if defined(__APPLE__)
+#define LIBUNWIND_AVAIL __attribute__ (( unavailable ))
+#else
+#define LIBUNWIND_AVAIL
+#endif
+
typedef enum {
_URC_NO_REASON = 0,
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
@@ -181,28 +187,28 @@ extern void *_Unwind_FindEnclosingFunction(void *pc);
// Mac OS X does not support text-rel and data-rel addressing so these functions
// are unimplemented
extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *context)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *context)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
// Mac OS X 10.4 and 10.5 had implementations of these functions in
// libgcc_s.dylib, but they never worked.
/// These functions are no longer available on Mac OS X.
extern void __register_frame_info_bases(const void *fde, void *ob, void *tb,
- void *db) __attribute__((unavailable));
+ void *db) LIBUNWIND_AVAIL;
extern void __register_frame_info(const void *fde, void *ob)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
extern void __register_frame_info_table_bases(const void *fde, void *ob,
void *tb, void *db)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
extern void __register_frame_info_table(const void *fde, void *ob)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
extern void __register_frame_table(const void *fde)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
extern void *__deregister_frame_info(const void *fde)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
extern void *__deregister_frame_info_bases(const void *fde)
- __attribute__((unavailable));
+ LIBUNWIND_AVAIL;
#ifdef __cplusplus
}