diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx b/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx index e3dc9b5872a7..10495582dcc0 100644 --- a/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_AARCH64_ABI_HXX -#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_AARCH64_ABI_HXX +#pragma once #include <sal/config.h> @@ -71,6 +70,20 @@ namespace __cxxabiv1 { struct __cxa_exception { #if defined _LIBCPPABI_VERSION // detect libc++abi #if defined __LP64__ || LIBCXXABI_ARM_EHABI +#ifdef MACOSX // on arm64 + // This is a new field added with LLVM 10 + // <https://github.com/llvm/llvm-project/commit/674ec1eb16678b8addc02a4b0534ab383d22fa77> + // "[libcxxabi] Insert padding in __cxa_exception struct for compatibility". For non-MACOSX, + // the HACK in call (bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx) tries to find out at + // runtime whether a __cxa_exception has this member. Once we can be sure that we only run + // against new libcxxabi that has this member, we can drop the "#ifdef MACOSX" here and drop the + // hack in call. + + // Now _Unwind_Exception is marked with __attribute__((aligned)), + // which implies __cxa_exception is also aligned. Insert padding + // in the beginning of the struct, rather than before unwindHeader. + void *reserve; +#endif std::size_t referenceCount; #endif #endif @@ -102,7 +115,7 @@ struct __cxa_eh_globals { #if !HAVE_CXXABI_H_CXA_GET_GLOBALS namespace __cxxabiv1 { -extern "C" __cxa_eh_globals * __cxa_get_globals() throw(); +extern "C" __cxa_eh_globals * __cxa_get_globals() noexcept; } #endif @@ -141,6 +154,4 @@ ReturnKind getReturnKind(typelib_TypeDescription const * type); } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |