diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-02-26 08:10:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-02-26 08:57:09 +0100 |
commit | 1e161eb96e4ed72e43c158253069f974fff5b36f (patch) | |
tree | 2be871f8b1dfda24803c7f81b0eca48f4f4c4e94 /bridges/source | |
parent | 3d63d0c14b1c86f22f73a80e42b84e0256fdf818 (diff) |
Use config_cxxabi.h to check for __*class_type_info
...as needed e.g. when building on Linux with clang -stdlib=libc++ against
libc++abi
Change-Id: I1f6f5ebcf5410c65453549ecea77581ccdaabc17
Diffstat (limited to 'bridges/source')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx | 75 |
1 files changed, 61 insertions, 14 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 0c9e2c5e0a88..bac7ef6fec15 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx @@ -33,25 +33,72 @@ #include "uno/any2.h" #include "uno/mapping.h" -#ifdef _LIBCPP_VERSION +#if !HAVE_CXXABI_H_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +class __class_type_info: public std::type_info { +public: + explicit __class_type_info(char const * n): type_info(n) {} + ~__class_type_info() override; +}; +} +#endif -namespace __cxxabiv1 -{ - struct __class_type_info : public std::type_info - { - explicit __class_type_info( const char *__n ) : type_info( __n ) { } - virtual ~__class_type_info(); - }; +#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +class __si_class_type_info: public __class_type_info { +public: + __class_type_info const * __base_type; + explicit __si_class_type_info( + char const * n, __class_type_info const *base): + __class_type_info(n), __base_type(base) {} + ~__si_class_type_info() override; +}; +} +#endif - struct __si_class_type_info : public __class_type_info - { - explicit __si_class_type_info( const char *__n, const __class_type_info *__b ) : - __class_type_info( __n ), __base_type( __b ) { } - virtual ~__si_class_type_info(); - const __class_type_info *__base_type; +#if !HAVE_CXXABI_H_BASE_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +struct __base_class_type_info { + __class_type_info const * __base_type; +#if defined _GLIBCXX_LLP64 + long long __offset_flags; +#else + long __offset_flags; +#endif + enum __offset_flags_masks { + __virtual_mask = 0x1, + __public_mask = 0x2, + __offset_shift = 8 }; +}; } +#endif +#if !HAVE_CXXABI_H_VMI_CLASS_TYPE_INFO +// <https://mentorembedded.github.io/cxx-abi/abi.html>, +// libstdc++-v3/libsupc++/cxxabi.h: +namespace __cxxabiv1 { +class __vmi_class_type_info: public __class_type_info { +public: + unsigned int __flags; + unsigned int __base_count; + __base_class_type_info __base_info[1]; + enum __flags_masks { + __non_diamond_repeat_mask = 0x1, + __diamond_shaped_mask = 0x2, + __flags_unknown_mask = 0x10 + }; + explicit __vmi_class_type_info(char const * n, int flags): + __class_type_info(n), __flags(flags), __base_count(0) {} + ~__vmi_class_type_info() override; +}; +} #endif #if !HAVE_CXXABI_H_CXA_EH_GLOBALS |