summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-26 08:05:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-26 08:57:09 +0100
commit3d63d0c14b1c86f22f73a80e42b84e0256fdf818 (patch)
treedea4bb4808061d729861d038c8fa8ab952c22da1 /bridges
parent4cb9d7d1c49d435d789ede63a89111a6d01260cf (diff)
Adapt __cxxabiv1 for libc++abi
...where it has an additional nonstandard member, at least on Linux x86-64. Not sure whether #if defined _LIBCPPABI_VERSION is the best way to distinguish libc++abi from other C++ runtimes, but #define _LIBCPPABI_VERSION 1002 is what it has in its cxxabi.h. Change-Id: I9edbca27aa2bedbc5b2e996fd5ffcfc2e8eb42d9
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
index 52598629245b..0c9e2c5e0a88 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
@@ -55,9 +55,15 @@ namespace __cxxabiv1
#endif
#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
-// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>:
+// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>,
+// libcxxabi/src/cxa_exception.hpp:
namespace __cxxabiv1 {
struct __cxa_exception {
+#if defined _LIBCPPABI_VERSION // detect libc++abi
+#if defined __LP64__ || LIBCXXABI_ARM_EHABI
+ std::size_t referenceCount;
+#endif
+#endif
std::type_info * exceptionType;
void (* exceptionDestructor)(void *);
std::unexpected_handler unexpectedHandler;