summaryrefslogtreecommitdiffstats
path: root/lib/libcxxabi/src/cxa_exception.hpp
diff options
context:
space:
mode:
authorrobert <robert@openbsd.org>2018-09-11 18:06:31 +0000
committerrobert <robert@openbsd.org>2018-09-11 18:06:31 +0000
commit8a05a458f6e66ba4e39e97f266f4fbfbbdf85f5b (patch)
treedaa979747ce9e345dc0680933d017c4bb0b5768c /lib/libcxxabi/src/cxa_exception.hpp
parentmerge libunwind 6.0.0; ok patrick@, kettenis@ (diff)
downloadwireguard-openbsd-8a05a458f6e66ba4e39e97f266f4fbfbbdf85f5b.tar.xz
wireguard-openbsd-8a05a458f6e66ba4e39e97f266f4fbfbbdf85f5b.zip
import of libc++abi 6.0.0
Diffstat (limited to 'lib/libcxxabi/src/cxa_exception.hpp')
-rw-r--r--lib/libcxxabi/src/cxa_exception.hpp39
1 files changed, 15 insertions, 24 deletions
diff --git a/lib/libcxxabi/src/cxa_exception.hpp b/lib/libcxxabi/src/cxa_exception.hpp
index 6e68f985389..c8b0fb1678e 100644
--- a/lib/libcxxabi/src/cxa_exception.hpp
+++ b/lib/libcxxabi/src/cxa_exception.hpp
@@ -15,19 +15,17 @@
#define _CXA_EXCEPTION_H
#include <exception> // for std::unexpected_handler and std::terminate_handler
-#include <cxxabi.h>
+#include "cxxabi.h"
#include "unwind.h"
namespace __cxxabiv1 {
-#pragma GCC visibility push(hidden)
-
static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC++\0
static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
-struct __cxa_exception {
-#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
+struct _LIBCXXABI_HIDDEN __cxa_exception {
+#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
// 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
@@ -45,7 +43,7 @@ struct __cxa_exception {
int handlerCount;
-#if LIBCXXABI_ARM_EHABI
+#if defined(_LIBCXXABI_ARM_EHABI)
__cxa_exception* nextPropagatingException;
int propagationCount;
#else
@@ -56,21 +54,20 @@ struct __cxa_exception {
void *adjustedPtr;
#endif
-#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
+#if !defined(__LP64__) && !defined(_LIBCXXABI_ARM_EHABI)
// This is a new field to support C++ 0x exception_ptr.
// For binary compatibility it is placed where the compiler
// previously adding padded to 64-bit align unwindHeader.
size_t referenceCount;
#endif
-
_Unwind_Exception unwindHeader;
};
// http://sourcery.mentor.com/archives/cxx-abi-dev/msg01924.html
// The layout of this structure MUST match the layout of __cxa_exception, with
// primaryException instead of referenceCount.
-struct __cxa_dependent_exception {
-#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
+struct _LIBCXXABI_HIDDEN __cxa_dependent_exception {
+#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
void* primaryException;
#endif
@@ -83,7 +80,7 @@ struct __cxa_dependent_exception {
int handlerCount;
-#if LIBCXXABI_ARM_EHABI
+#if defined(_LIBCXXABI_ARM_EHABI)
__cxa_exception* nextPropagatingException;
int propagationCount;
#else
@@ -94,31 +91,25 @@ struct __cxa_dependent_exception {
void *adjustedPtr;
#endif
-#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
+#if !defined(__LP64__) && !defined(_LIBCXXABI_ARM_EHABI)
void* primaryException;
#endif
-
_Unwind_Exception unwindHeader;
};
-struct __cxa_eh_globals {
+struct _LIBCXXABI_HIDDEN __cxa_eh_globals {
__cxa_exception * caughtExceptions;
unsigned int uncaughtExceptions;
-#if LIBCXXABI_ARM_EHABI
+#if defined(_LIBCXXABI_ARM_EHABI)
__cxa_exception* propagatingExceptions;
#endif
};
-#pragma GCC visibility pop
-#pragma GCC visibility push(default)
-
-extern "C" __cxa_eh_globals * __cxa_get_globals ();
-extern "C" __cxa_eh_globals * __cxa_get_globals_fast ();
-
-extern "C" void * __cxa_allocate_dependent_exception ();
-extern "C" void __cxa_free_dependent_exception (void * dependent_exception);
+extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals ();
+extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals_fast ();
-#pragma GCC visibility pop
+extern "C" _LIBCXXABI_FUNC_VIS void * __cxa_allocate_dependent_exception ();
+extern "C" _LIBCXXABI_FUNC_VIS void __cxa_free_dependent_exception (void * dependent_exception);
} // namespace __cxxabiv1