1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#include <stdio.h>
11#include <stdlib.h>
12
13namespace std {
14
15exception_ptr::~exception_ptr() noexcept {
16#warning exception_ptr not yet implemented
17  fprintf(stderr, "exception_ptr not yet implemented\n");
18  ::abort();
19}
20
21exception_ptr::exception_ptr(const exception_ptr& other) noexcept : __ptr_(other.__ptr_) {
22#warning exception_ptr not yet implemented
23  fprintf(stderr, "exception_ptr not yet implemented\n");
24  ::abort();
25}
26
27exception_ptr& exception_ptr::operator=(const exception_ptr& other) noexcept {
28#warning exception_ptr not yet implemented
29  fprintf(stderr, "exception_ptr not yet implemented\n");
30  ::abort();
31}
32
33exception_ptr exception_ptr::__from_native_exception_pointer(void *__e) noexcept {
34#warning exception_ptr not yet implemented
35  fprintf(stderr, "exception_ptr not yet implemented\n");
36  ::abort();
37}
38
39nested_exception::nested_exception() noexcept : __ptr_(current_exception()) {}
40
41#if !defined(__GLIBCXX__)
42
43nested_exception::~nested_exception() noexcept {}
44
45#endif
46
47_LIBCPP_NORETURN void nested_exception::rethrow_nested() const {
48#warning exception_ptr not yet implemented
49  fprintf(stderr, "exception_ptr not yet implemented\n");
50  ::abort();
51#if 0
52  if (__ptr_ == nullptr)
53      terminate();
54  rethrow_exception(__ptr_);
55#endif // FIXME
56}
57
58exception_ptr current_exception() noexcept {
59#warning exception_ptr not yet implemented
60  fprintf(stderr, "exception_ptr not yet implemented\n");
61  ::abort();
62}
63
64_LIBCPP_NORETURN void rethrow_exception(exception_ptr p) {
65#warning exception_ptr not yet implemented
66  fprintf(stderr, "exception_ptr not yet implemented\n");
67  ::abort();
68}
69
70} // namespace std
71