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{ 17# warning exception_ptr not yet implemented 18 fprintf(stderr, "exception_ptr not yet implemented\n"); 19 ::abort(); 20} 21 22exception_ptr::exception_ptr(const exception_ptr& other) noexcept 23 : __ptr_(other.__ptr_) 24{ 25# warning exception_ptr not yet implemented 26 fprintf(stderr, "exception_ptr not yet implemented\n"); 27 ::abort(); 28} 29 30exception_ptr& exception_ptr::operator=(const exception_ptr& other) noexcept 31{ 32# warning exception_ptr not yet implemented 33 fprintf(stderr, "exception_ptr not yet implemented\n"); 34 ::abort(); 35} 36 37nested_exception::nested_exception() noexcept 38 : __ptr_(current_exception()) 39{ 40} 41 42#if !defined(__GLIBCXX__) 43 44nested_exception::~nested_exception() noexcept 45{ 46} 47 48#endif 49 50_LIBCPP_NORETURN 51void 52nested_exception::rethrow_nested() const 53{ 54# warning exception_ptr not yet implemented 55 fprintf(stderr, "exception_ptr not yet implemented\n"); 56 ::abort(); 57#if 0 58 if (__ptr_ == nullptr) 59 terminate(); 60 rethrow_exception(__ptr_); 61#endif // FIXME 62} 63 64exception_ptr current_exception() noexcept 65{ 66# warning exception_ptr not yet implemented 67 fprintf(stderr, "exception_ptr not yet implemented\n"); 68 ::abort(); 69} 70 71_LIBCPP_NORETURN 72void rethrow_exception(exception_ptr p) 73{ 74# warning exception_ptr not yet implemented 75 fprintf(stderr, "exception_ptr not yet implemented\n"); 76 ::abort(); 77} 78 79} // namespace std 80