summaryrefslogtreecommitdiff
path: root/src/cxa_exception.hpp
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2014-04-12 11:56:41 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2014-04-12 11:56:41 +0000
commit7d987c10ce65591536c0f652c19a8dfc13e48d9c (patch)
tree6c9c5977bc0cc5f0b5b6805ee329f884f744fb3b /src/cxa_exception.hpp
parent53138de53276337ad55e2510d566e8ebaeab71d4 (diff)
Code cleanup and re-indent cxa_exception.hpp
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@206108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_exception.hpp')
-rw-r--r--src/cxa_exception.hpp109
1 files changed, 55 insertions, 54 deletions
diff --git a/src/cxa_exception.hpp b/src/cxa_exception.hpp
index 7c78a72..03b7a84 100644
--- a/src/cxa_exception.hpp
+++ b/src/cxa_exception.hpp
@@ -26,98 +26,99 @@ static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC
static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
- struct __cxa_exception {
+struct __cxa_exception {
#if __LP64__
// 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
// __cxa_allocate_exception.
- size_t referenceCount;
+ size_t referenceCount;
#endif
// Manage the exception object itself.
- std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
- std::unexpected_handler unexpectedHandler;
- std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
+ std::type_info *exceptionType;
+ void (*exceptionDestructor)(void *);
+ std::unexpected_handler unexpectedHandler;
+ std::terminate_handler terminateHandler;
+
+ __cxa_exception *nextException;
+
+ int handlerCount;
+
#ifdef __ARM_EABI_UNWINDER__
- __cxa_exception* nextPropagatingException;
- int propagationCount;
+ __cxa_exception* nextPropagatingException;
+ int propagationCount;
#else
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
+ int handlerSwitchValue;
+ const unsigned char *actionRecord;
+ const unsigned char *languageSpecificData;
+ void *catchTemp;
+ void *adjustedPtr;
#endif
#if !__LP64__
// 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;
+ size_t referenceCount;
#endif
-
- _Unwind_Exception unwindHeader;
- };
+
+ _Unwind_Exception unwindHeader;
+};
// http://sourcery.mentor.com/archives/cxx-abi-dev/msg01924.html
- struct __cxa_dependent_exception {
+struct __cxa_dependent_exception {
#if __LP64__
- void* primaryException;
+ void* primaryException;
#endif
- std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
- std::unexpected_handler unexpectedHandler;
- std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
+ std::type_info *exceptionType;
+ void (*exceptionDestructor)(void *);
+ std::unexpected_handler unexpectedHandler;
+ std::terminate_handler terminateHandler;
+
+ __cxa_exception *nextException;
+
+ int handlerCount;
#ifdef __ARM_EABI_UNWINDER__
- __cxa_exception* nextPropagatingException;
- int propagationCount;
+ __cxa_exception* nextPropagatingException;
+ int propagationCount;
#else
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void * catchTemp;
- void *adjustedPtr;
+ int handlerSwitchValue;
+ const unsigned char *actionRecord;
+ const unsigned char *languageSpecificData;
+ void * catchTemp;
+ void *adjustedPtr;
#endif
#if !__LP64__
- void* primaryException;
+ void* primaryException;
#endif
-
- _Unwind_Exception unwindHeader;
- };
-
- struct __cxa_eh_globals {
- __cxa_exception * caughtExceptions;
- unsigned int uncaughtExceptions;
+
+ _Unwind_Exception unwindHeader;
+};
+
+struct __cxa_eh_globals {
+ __cxa_exception * caughtExceptions;
+ unsigned int uncaughtExceptions;
#ifdef __ARM_EABI_UNWINDER__
- __cxa_exception* propagatingExceptions;
+ __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" __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" void * __cxa_allocate_dependent_exception ();
+extern "C" void __cxa_free_dependent_exception (void * dependent_exception);
#pragma GCC visibility pop
-}
+
+} // namespace __cxxabiv1
#endif // _CXA_EXCEPTION_H