diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-12-04 02:14:41 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-12-04 02:14:41 +0000 |
commit | 77a304b28be4b50a508298d6a0e40ee9d4bb3ccd (patch) | |
tree | 5658445ec8889962474dd6c8be1a585fc7795b3f /src/cxa_exception.cpp | |
parent | 4c91e387a7e126a1f3c9706df4f2c65f350859b0 (diff) |
c++abi: whitespace adjustment
Cleanup some code with clang-format to make the following change easier to
identify material difference. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@254690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_exception.cpp')
-rw-r--r-- | src/cxa_exception.cpp | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/src/cxa_exception.cpp b/src/cxa_exception.cpp index 068152b..0767ab4 100644 --- a/src/cxa_exception.cpp +++ b/src/cxa_exception.cpp @@ -156,7 +156,7 @@ extern "C" { // object. Zero-fill the object. If memory can't be allocated, call // std::terminate. Return a pointer to the memory to be used for the // user's exception object. -void * __cxa_allocate_exception (size_t thrown_size) throw() { +void *__cxa_allocate_exception(size_t thrown_size) throw() { size_t actual_size = cxa_exception_size_from_exception_thrown_size(thrown_size); __cxa_exception* exception_header = static_cast<__cxa_exception*>(do_malloc(actual_size)); if (NULL == exception_header) @@ -167,7 +167,7 @@ void * __cxa_allocate_exception (size_t thrown_size) throw() { // Free a __cxa_exception object allocated with __cxa_allocate_exception. -void __cxa_free_exception (void * thrown_object) throw() { +void __cxa_free_exception(void *thrown_object) throw() { do_free(cxa_exception_from_thrown_object(thrown_object)); } @@ -219,9 +219,8 @@ will call terminate, assuming that there was no handler for the exception. */ LIBCXXABI_NORETURN -void -__cxa_throw(void* thrown_object, std::type_info* tinfo, void (*dest)(void*)) -{ +void __cxa_throw(void *thrown_object, std::type_info *tinfo, + void (*dest)(void *)) { __cxa_eh_globals *globals = __cxa_get_globals(); __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); @@ -253,9 +252,7 @@ The adjusted pointer is computed by the personality routine during phase 1 Requires: exception is native */ -void* -__cxa_get_exception_ptr(void* unwind_exception) throw() -{ +void *__cxa_get_exception_ptr(void *unwind_exception) throw() { #if LIBCXXABI_ARM_EHABI return reinterpret_cast<void*>( static_cast<_Unwind_Control_Block*>(unwind_exception)->barrier_cache.bitpattern[0]); @@ -270,9 +267,7 @@ __cxa_get_exception_ptr(void* unwind_exception) throw() The routine to be called before the cleanup. This will save __cxa_exception in __cxa_eh_globals, so that __cxa_end_cleanup() can recover later. */ -bool -__cxa_begin_cleanup(void* unwind_arg) throw () -{ +bool __cxa_begin_cleanup(void *unwind_arg) throw() { _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(unwind_arg); __cxa_eh_globals* globals = __cxa_get_globals(); __cxa_exception* exception_header = @@ -443,8 +438,7 @@ For a foreign exception: * If it has been rethrown, there is nothing to do. * Otherwise delete the exception and pop the catch stack to empty. */ -void __cxa_end_catch() -{ +void __cxa_end_catch() { static_assert(sizeof(__cxa_exception) == sizeof(__cxa_dependent_exception), "sizeof(__cxa_exception) must be equal to " "sizeof(__cxa_dependent_exception)"); @@ -521,7 +515,7 @@ void __cxa_end_catch() // Note: exception_header may be masquerading as a __cxa_dependent_exception // and that's ok. exceptionType is there too. // However watch out for foreign exceptions. Return null for them. -std::type_info * __cxa_current_exception_type() { +std::type_info *__cxa_current_exception_type() { // get the current exception __cxa_eh_globals *globals = __cxa_get_globals_fast(); if (NULL == globals) @@ -547,9 +541,7 @@ If the exception is native: and that's ok. */ LIBCXXABI_NORETURN -void -__cxa_rethrow() -{ +void __cxa_rethrow() { __cxa_eh_globals* globals = __cxa_get_globals(); __cxa_exception* exception_header = globals->caughtExceptions; if (NULL == exception_header) @@ -594,9 +586,7 @@ __cxa_rethrow() Requires: If thrown_object is not NULL, it is a native exception. */ -void -__cxa_increment_exception_refcount(void* thrown_object) throw() -{ +void __cxa_increment_exception_refcount(void *thrown_object) throw() { if (thrown_object != NULL ) { __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); @@ -612,9 +602,7 @@ __cxa_increment_exception_refcount(void* thrown_object) throw() Requires: If thrown_object is not NULL, it is a native exception. */ -void -__cxa_decrement_exception_refcount(void* thrown_object) throw() -{ +void __cxa_decrement_exception_refcount(void *thrown_object) throw() { if (thrown_object != NULL ) { __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object); @@ -637,9 +625,7 @@ __cxa_decrement_exception_refcount(void* thrown_object) throw() been no exceptions thrown, ever, on this thread, we can return NULL without the need to allocate the exception-handling globals. */ -void* -__cxa_current_primary_exception() throw() -{ +void *__cxa_current_primary_exception() throw() { // get the current exception __cxa_eh_globals* globals = __cxa_get_globals_fast(); if (NULL == globals) |