1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include <sal/config.h>
16 #define __USING_WASM_EXCEPTIONS__
19 #include <bridges/emscriptencxxabi/cxxabi.hxx>
20 #include <config_cxxabi.h>
21 #include <typelib/typedescription.h>
23 #include <uno/mapping.h>
25 // <https://github.com/emscripten-core/emscripten/>, system/lib/libcxxabi/src/private_typeinfo.h:
28 class _LIBCXXABI_TYPE_VIS __shim_type_info
: public std::type_info
31 /*MODIFIED:*/ __shim_type_info(char const* name
)
35 _LIBCXXABI_HIDDEN
virtual ~__shim_type_info();
37 _LIBCXXABI_HIDDEN
virtual void noop1() const;
38 _LIBCXXABI_HIDDEN
virtual void noop2() const;
39 _LIBCXXABI_HIDDEN
virtual bool can_catch(const __shim_type_info
* thrown_type
,
40 void*& adjustedPtr
) const = 0;
44 #if !HAVE_CXXABI_H_CLASS_TYPE_INFO
45 // <https://github.com/emscripten-core/emscripten/>, system/lib/libcxxabi/src/private_typeinfo.h:
48 class _LIBCXXABI_TYPE_VIS __class_type_info
: public __shim_type_info
51 /*MODIFIED:*/ __class_type_info(char const* name
)
52 : __shim_type_info(name
)
55 _LIBCXXABI_HIDDEN
virtual ~__class_type_info();
57 _LIBCXXABI_HIDDEN
void process_static_type_above_dst(void /*MODIFIED: __dynamic_cast_info*/*,
58 const void*, const void*, int) const;
59 _LIBCXXABI_HIDDEN
void process_static_type_below_dst(void /*MODIFIED: __dynamic_cast_info*/*,
60 const void*, int) const;
61 _LIBCXXABI_HIDDEN
void process_found_base_class(void /*MODIFIED: __dynamic_cast_info*/*, void*,
63 _LIBCXXABI_HIDDEN
virtual void search_above_dst(void /*MODIFIED: __dynamic_cast_info*/*,
64 const void*, const void*, int, bool) const;
65 _LIBCXXABI_HIDDEN
virtual void search_below_dst(void /*MODIFIED: __dynamic_cast_info*/*,
66 const void*, int, bool) const;
67 _LIBCXXABI_HIDDEN
virtual bool can_catch(const __shim_type_info
*, void*&) const;
68 _LIBCXXABI_HIDDEN
virtual void
69 has_unambiguous_public_base(void /*MODIFIED: __dynamic_cast_info*/*, void*, int) const;
74 #if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO
75 // <https://mentorembedded.github.io/cxx-abi/abi.html>,
76 // libstdc++-v3/libsupc++/cxxabi.h:
79 class _LIBCXXABI_TYPE_VIS __si_class_type_info
: public __class_type_info
82 const __class_type_info
* __base_type
;
84 /*MODIFIED:*/ __si_class_type_info(char const* name
)
85 : __class_type_info(name
)
88 _LIBCXXABI_HIDDEN
virtual ~__si_class_type_info();
90 _LIBCXXABI_HIDDEN
virtual void search_above_dst(void /*MODIFIED: __dynamic_cast_info*/*,
91 const void*, const void*, int, bool) const;
92 _LIBCXXABI_HIDDEN
virtual void search_below_dst(void /*MODIFIED: __dynamic_cast_info*/*,
93 const void*, int, bool) const;
94 _LIBCXXABI_HIDDEN
virtual void
95 has_unambiguous_public_base(void /*MODIFIED: __dynamic_cast_info*/*, void*, int) const;
100 #if !HAVE_CXXABI_H_CXA_EH_GLOBALS
101 // <https://github.com/emscripten-core/emscripten/>, system/lib/libcxxabi/src/cxa_exception.h:
104 struct __cxa_eh_globals
106 __cxa_exception
* caughtExceptions
;
107 unsigned int uncaughtExceptions
;
108 #if defined _LIBCXXABI_ARM_EHABI
109 __cxa_exception
* propagatingExceptions
;
115 #if !HAVE_CXXABI_H_CXA_GET_GLOBALS
116 // <https://github.com/emscripten-core/emscripten/>, system/lib/libcxxabi/src/cxa_exception.h:
119 extern "C" __cxa_eh_globals
* __cxa_get_globals();
125 enum class StructKind
135 StructKind
getKind(typelib_CompoundTypeDescription
const* type
);
137 void mapException(__cxxabiv1::__cxa_exception
* exception
, std::type_info
const* type
, uno_Any
* any
,
138 uno_Mapping
* mapping
);
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */