summaryrefslogtreecommitdiffstats
path: root/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
index 39939ab6be72..015cda1c00e5 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx
@@ -68,6 +68,21 @@ typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
struct __cxa_exception
{
#if __LP64__
+#if 0
+ // This is a new field added with LLVM 11
+ // <https://github.com/llvm/llvm-project/commit/f2a436058fcbc11291e73badb44e243f61046183>
+ // "[libcxxabi] Insert padding in __cxa_exception struct for compatibility". The HACK in
+ // fillUnoException (bridges/source/cpp_uno/gcc3_macosx_x86-64/except.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 "#if 0" here and drop the hack
+ // in fillUnoException.
+
+ // 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
+
// This is a new field to support C++ 0x exception_ptr.
// For binary compatibility it is at the start of this
// struct which is prepended to the object thrown in