This recommits r294707 with additional fixes. The main difference is libc++ now correctly builds without any ABI library. exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294730 91177308-0d34-0410-b5e6-96231b3b80d8
81 lines
1.8 KiB
C++
81 lines
1.8 KiB
C++
// -*- 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.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
namespace std {
|
|
|
|
exception_ptr::~exception_ptr() _NOEXCEPT
|
|
{
|
|
# warning exception_ptr not yet implemented
|
|
fprintf(stderr, "exception_ptr not yet implemented\n");
|
|
::abort();
|
|
}
|
|
|
|
exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
|
|
: __ptr_(other.__ptr_)
|
|
{
|
|
# warning exception_ptr not yet implemented
|
|
fprintf(stderr, "exception_ptr not yet implemented\n");
|
|
::abort();
|
|
}
|
|
|
|
exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
|
|
{
|
|
# warning exception_ptr not yet implemented
|
|
fprintf(stderr, "exception_ptr not yet implemented\n");
|
|
::abort();
|
|
}
|
|
|
|
nested_exception::nested_exception() _NOEXCEPT
|
|
: __ptr_(current_exception())
|
|
{
|
|
}
|
|
|
|
#if !defined(__GLIBCXX__)
|
|
|
|
nested_exception::~nested_exception() _NOEXCEPT
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
_LIBCPP_NORETURN
|
|
void
|
|
nested_exception::rethrow_nested() const
|
|
{
|
|
# warning exception_ptr not yet implemented
|
|
fprintf(stderr, "exception_ptr not yet implemented\n");
|
|
::abort();
|
|
#if 0
|
|
if (__ptr_ == nullptr)
|
|
terminate();
|
|
rethrow_exception(__ptr_);
|
|
#endif // FIXME
|
|
}
|
|
|
|
exception_ptr current_exception() _NOEXCEPT
|
|
{
|
|
# warning exception_ptr not yet implemented
|
|
fprintf(stderr, "exception_ptr not yet implemented\n");
|
|
::abort();
|
|
}
|
|
|
|
_LIBCPP_NORETURN
|
|
void rethrow_exception(exception_ptr p)
|
|
{
|
|
# warning exception_ptr not yet implemented
|
|
fprintf(stderr, "exception_ptr not yet implemented\n");
|
|
::abort();
|
|
}
|
|
|
|
} // namespace std
|