summaryrefslogtreecommitdiffstats
path: root/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-10 07:43:08 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-10 07:43:08 +0000
commit8dcdeaeb35500dd309cf2ff315dd829501798027 (patch)
tree71a024602be7d4b685780ed3c3f8e3fdda26b6bb /libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
parent6677999e174b862eb17da64449bd04fba644e28f (diff)
downloadbcm5719-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_glibcxx.ipp')
-rw-r--r--libcxx/src/support/runtime/exception_pointer_glibcxx.ipp74
1 files changed, 0 insertions, 74 deletions
diff --git a/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp b/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
deleted file mode 100644
index 30bd6b61f08..00000000000
--- a/libcxx/src/support/runtime/exception_pointer_glibcxx.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.
-//
-//===----------------------------------------------------------------------===//
-
-// libsupc++ does not implement the dependent EH ABI and the functionality
-// it uses to implement std::exception_ptr (which it declares as an alias of
-// std::__exception_ptr::exception_ptr) is not directly exported to clients. So
-// we have little choice but to hijack std::__exception_ptr::exception_ptr's
-// (which fortunately has the same layout as our std::exception_ptr) copy
-// constructor, assignment operator and destructor (which are part of its
-// stable ABI), and its rethrow_exception(std::__exception_ptr::exception_ptr)
-// function.
-
-namespace __exception_ptr
-{
-
-struct exception_ptr
-{
- void* __ptr_;
-
- exception_ptr(const exception_ptr&) _NOEXCEPT;
- exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;
- ~exception_ptr() _NOEXCEPT;
-};
-
-}
-
-_LIBCPP_NORETURN void rethrow_exception(__exception_ptr::exception_ptr);
-
-exception_ptr::~exception_ptr() _NOEXCEPT
-{
- reinterpret_cast<__exception_ptr::exception_ptr*>(this)->~exception_ptr();
-}
-
-exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
- : __ptr_(other.__ptr_)
-{
- new (reinterpret_cast<void*>(this)) __exception_ptr::exception_ptr(
- reinterpret_cast<const __exception_ptr::exception_ptr&>(other));
-}
-
-exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
-{
- *reinterpret_cast<__exception_ptr::exception_ptr*>(this) =
- reinterpret_cast<const __exception_ptr::exception_ptr&>(other);
- return *this;
-}
-
-nested_exception::nested_exception() _NOEXCEPT
- : __ptr_(current_exception())
-{
-}
-
-
-_LIBCPP_NORETURN
-void
-nested_exception::rethrow_nested() const
-{
- if (__ptr_ == nullptr)
- terminate();
- rethrow_exception(__ptr_);
-}
-
-_LIBCPP_NORETURN
-void rethrow_exception(exception_ptr p)
-{
- rethrow_exception(reinterpret_cast<__exception_ptr::exception_ptr&>(p));
-}
OpenPOWER on IntegriCloud