diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-02-10 07:43:08 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-02-10 07:43:08 +0000 |
| commit | 8dcdeaeb35500dd309cf2ff315dd829501798027 (patch) | |
| tree | 71a024602be7d4b685780ed3c3f8e3fdda26b6bb /libcxx/src/support/runtime/exception_pointer_cxxabi.ipp | |
| parent | 6677999e174b862eb17da64449bd04fba644e28f (diff) | |
| download | bcm5719-llvm-8dcdeaeb35500dd309cf2ff315dd829501798027.tar.gz bcm5719-llvm-8dcdeaeb35500dd309cf2ff315dd829501798027.zip | |
Revert "Split exception.cpp and new.cpp implementation into different files for different runtimes."
The compiler-rt CMake configuration needs some tweaking before this can land.
llvm-svn: 294727
Diffstat (limited to 'libcxx/src/support/runtime/exception_pointer_cxxabi.ipp')
| -rw-r--r-- | libcxx/src/support/runtime/exception_pointer_cxxabi.ipp | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp b/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp deleted file mode 100644 index dfac8648c49..00000000000 --- a/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp +++ /dev/null @@ -1,74 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef HAVE_DEPENDENT_EH_ABI -#error this header may only be used with libc++abi or libcxxrt -#endif - -namespace std { - -exception_ptr::~exception_ptr() _NOEXCEPT { - __cxa_decrement_exception_refcount(__ptr_); -} - -exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT - : __ptr_(other.__ptr_) -{ - __cxa_increment_exception_refcount(__ptr_); -} - -exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT -{ - if (__ptr_ != other.__ptr_) - { - __cxa_increment_exception_refcount(other.__ptr_); - __cxa_decrement_exception_refcount(__ptr_); - __ptr_ = other.__ptr_; - } - return *this; -} - -nested_exception::nested_exception() _NOEXCEPT - : __ptr_(current_exception()) -{ -} - -nested_exception::~nested_exception() _NOEXCEPT -{ -} - -_LIBCPP_NORETURN -void -nested_exception::rethrow_nested() const -{ - if (__ptr_ == nullptr) - terminate(); - rethrow_exception(__ptr_); -} - -exception_ptr current_exception() _NOEXCEPT -{ - // be nicer if there was a constructor that took a ptr, then - // this whole function would be just: - // return exception_ptr(__cxa_current_primary_exception()); - exception_ptr ptr; - ptr.__ptr_ = __cxa_current_primary_exception(); - return ptr; -} - -_LIBCPP_NORETURN -void rethrow_exception(exception_ptr p) -{ - __cxa_rethrow_primary_exception(p.__ptr_); - // if p.__ptr_ is NULL, above returns so we terminate - terminate(); -} - -} // namespace std |

