summaryrefslogtreecommitdiffstats
path: root/libcxxabi/include/cxxabi.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-06-25 22:49:13 +0000
committerNico Weber <nicolasweber@gmx.de>2014-06-25 22:49:13 +0000
commitaf5ca95730b887a443bc24c426ca5455b75fccba (patch)
tree3fb250fbb7847be34739a0ed8a66f189812a7864 /libcxxabi/include/cxxabi.h
parent262510a4acd715160c5055e63568ca7476d6ac3f (diff)
downloadbcm5719-llvm-af5ca95730b887a443bc24c426ca5455b75fccba.tar.gz
bcm5719-llvm-af5ca95730b887a443bc24c426ca5455b75fccba.zip
Start landing support for ARM EHABI unwinding.
The new code will be behind a LIBCXXABI_ARM_EHABI define (so that platforms that don't want it can continue using e.g. SJLJ). This commit mostly just adds the LIBCXXABI_ARM_EHABI define. llvm-svn: 211739
Diffstat (limited to 'libcxxabi/include/cxxabi.h')
-rw-r--r--libcxxabi/include/cxxabi.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/libcxxabi/include/cxxabi.h b/libcxxabi/include/cxxabi.h
index 82a7e74b553..867ba72940f 100644
--- a/libcxxabi/include/cxxabi.h
+++ b/libcxxabi/include/cxxabi.h
@@ -21,6 +21,14 @@
#define _LIBCPPABI_VERSION 1001
#define LIBCXXABI_NORETURN __attribute__((noreturn))
+// FIXME: This is also in unwind.h and libunwind.h, can we consolidate?
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \
+ !defined(__ARM_DWARF_EH__) && !defined(__APPLE__)
+#define LIBCXXABI_ARM_EHABI 1
+#else
+#define LIBCXXABI_ARM_EHABI 0
+#endif
+
#ifdef __cplusplus
namespace std {
@@ -44,7 +52,7 @@ extern LIBCXXABI_NORETURN void __cxa_throw(void * thrown_exception,
extern void * __cxa_get_exception_ptr(void * exceptionObject) throw();
extern void * __cxa_begin_catch(void * exceptionObject) throw();
extern void __cxa_end_catch();
-#if __arm__
+#if LIBCXXABI_ARM_EHABI
extern bool __cxa_begin_cleanup(void * exceptionObject) throw();
extern void __cxa_end_cleanup();
#endif
@@ -172,8 +180,8 @@ extern bool __cxa_uncaught_exception() throw();
} // extern "C"
} // namespace __cxxabiv1
-#endif // __cplusplus
-
namespace abi = __cxxabiv1;
+#endif // __cplusplus
+
#endif // __CXXABI_H
OpenPOWER on IntegriCloud