[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
// Exception Handling support header (exception_ptr class) for -*- C++ -*-
|
|
|
|
|
2009-02-04 00:44:53 +01:00
|
|
|
// Copyright (C) 2008, 2009 Free Software Foundation
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
//
|
|
|
|
// This file is part of GCC.
|
|
|
|
//
|
|
|
|
// GCC is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
2009-04-09 17:00:19 +02:00
|
|
|
// the Free Software Foundation; either version 3, or (at your option)
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
// any later version.
|
|
|
|
//
|
|
|
|
// GCC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
2009-04-09 17:00:19 +02:00
|
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
// permissions described in the GCC Runtime Library Exception, version
|
|
|
|
// 3.1, as published by the Free Software Foundation.
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// You should have received a copy of the GNU General Public License and
|
|
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
|
|
|
/** @file exception_ptr.h
|
|
|
|
* This is an internal header file, included by other headers and the
|
|
|
|
* implementation. You should not attempt to use it directly.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _EXCEPTION_PTR_H
|
|
|
|
#define _EXCEPTION_PTR_H
|
|
|
|
|
|
|
|
#pragma GCC visibility push(default)
|
|
|
|
|
|
|
|
#include <bits/c++config.h>
|
2009-02-04 00:44:53 +01:00
|
|
|
#include <exception_defines.h>
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
|
|
|
#if !defined(_GLIBCXX_ATOMIC_BUILTINS_4)
|
|
|
|
# error This platform does not support exception propagation.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern "C++" {
|
|
|
|
|
|
|
|
namespace std
|
|
|
|
{
|
2009-02-21 01:45:21 +01:00
|
|
|
/**
|
|
|
|
* @addtogroup exceptions
|
|
|
|
* @{
|
|
|
|
*/
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
namespace __exception_ptr
|
|
|
|
{
|
|
|
|
class exception_ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
using __exception_ptr::exception_ptr;
|
|
|
|
|
2009-11-09 23:09:30 +01:00
|
|
|
/** Obtain an exception_ptr to the currently handled exception. If there
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
* is none, or the currently handled exception is foreign, return the null
|
|
|
|
* value.
|
|
|
|
*/
|
|
|
|
exception_ptr current_exception() throw();
|
|
|
|
|
2009-11-09 23:09:30 +01:00
|
|
|
/// Throw the object pointed to by the exception_ptr.
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__));
|
|
|
|
|
|
|
|
namespace __exception_ptr
|
|
|
|
{
|
2009-11-09 23:09:30 +01:00
|
|
|
/**
|
|
|
|
* @brief An opaque pointer to an arbitrary exception.
|
|
|
|
* @ingroup exceptions
|
|
|
|
*/
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
class exception_ptr
|
|
|
|
{
|
|
|
|
void* _M_exception_object;
|
|
|
|
|
|
|
|
explicit exception_ptr(void* __e) throw();
|
|
|
|
|
|
|
|
void _M_addref() throw();
|
|
|
|
void _M_release() throw();
|
|
|
|
|
* eh_type.cc (__cxa_current_exception_type) Mark throw().
* unwind-cxx.h (__cxa_get_globals, __cxa_get_globals_fast): Mark const.
(__cxa_get_exception_ptr): Mark pure.
(__cxa_bad_cast, __cxa_bad_typeid): Mark noreturn
(__terminate): Makr throw ().
* exception (terminate): Mark throw().
(uncaught_exception): Mark pure.
* eh_ptr.cc (_M_safe_bool_dummy): Mark throw().
* guard.cc (__cxa_guard_abort, __cxa_guard_release): Mark throw().
* eh_terminate.cc (__terminate, terminate): Mark throw().
* vec.cc (__cxa_vec_cleanup): Mark throw().
* cxxabi.h (__cxa_vec_cleanup, __cxa_guard_release, __cxa_guard_abort): Mark throw ().
(__cxa_pure_virtual): Mark noreturn.
(__cxa_current_exception_type): Mark throw and pure.
* exception_ptr.h (operator ==, !=, _M_get, !, ==,
__cxa_exception_type): Mark pure.
(_M_safe_bool_dummy): Mark pure and const.
From-SVN: r146331
2009-04-19 00:18:21 +02:00
|
|
|
void *_M_get() const throw() __attribute__ ((__pure__));
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
|
|
|
friend exception_ptr std::current_exception() throw();
|
|
|
|
friend void std::rethrow_exception(exception_ptr);
|
|
|
|
|
|
|
|
public:
|
|
|
|
exception_ptr() throw();
|
|
|
|
|
|
|
|
exception_ptr(const exception_ptr&) throw();
|
|
|
|
|
|
|
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
2010-06-06 15:27:23 +02:00
|
|
|
exception_ptr(nullptr_t) throw()
|
|
|
|
: _M_exception_object(0)
|
|
|
|
{ }
|
|
|
|
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
exception_ptr(exception_ptr&& __o) throw()
|
2009-02-21 01:45:21 +01:00
|
|
|
: _M_exception_object(__o._M_exception_object)
|
|
|
|
{ __o._M_exception_object = 0; }
|
2010-06-06 15:27:23 +02:00
|
|
|
#else
|
|
|
|
typedef void (exception_ptr::*__safe_bool)();
|
|
|
|
|
|
|
|
// For construction from nullptr or 0.
|
|
|
|
exception_ptr(__safe_bool) throw();
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
#endif
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
exception_ptr&
|
|
|
|
operator=(const exception_ptr&) throw();
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
|
|
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
2009-02-21 01:45:21 +01:00
|
|
|
exception_ptr&
|
|
|
|
operator=(exception_ptr&& __o) throw()
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
{
|
2009-06-16 23:24:41 +02:00
|
|
|
exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
~exception_ptr() throw();
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
void
|
|
|
|
swap(exception_ptr&) throw();
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
2009-06-03 12:37:20 +02:00
|
|
|
#ifdef _GLIBCXX_EH_PTR_COMPAT
|
|
|
|
// Retained for compatibility with CXXABI_1.3.
|
2010-06-06 15:27:23 +02:00
|
|
|
void _M_safe_bool_dummy() throw() __attribute__ ((__const__));
|
* eh_type.cc (__cxa_current_exception_type) Mark throw().
* unwind-cxx.h (__cxa_get_globals, __cxa_get_globals_fast): Mark const.
(__cxa_get_exception_ptr): Mark pure.
(__cxa_bad_cast, __cxa_bad_typeid): Mark noreturn
(__terminate): Makr throw ().
* exception (terminate): Mark throw().
(uncaught_exception): Mark pure.
* eh_ptr.cc (_M_safe_bool_dummy): Mark throw().
* guard.cc (__cxa_guard_abort, __cxa_guard_release): Mark throw().
* eh_terminate.cc (__terminate, terminate): Mark throw().
* vec.cc (__cxa_vec_cleanup): Mark throw().
* cxxabi.h (__cxa_vec_cleanup, __cxa_guard_release, __cxa_guard_abort): Mark throw ().
(__cxa_pure_virtual): Mark noreturn.
(__cxa_current_exception_type): Mark throw and pure.
* exception_ptr.h (operator ==, !=, _M_get, !, ==,
__cxa_exception_type): Mark pure.
(_M_safe_bool_dummy): Mark pure and const.
From-SVN: r146331
2009-04-19 00:18:21 +02:00
|
|
|
bool operator!() const throw() __attribute__ ((__pure__));
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
operator __safe_bool() const throw();
|
2009-06-03 12:37:20 +02:00
|
|
|
#endif
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
2010-06-06 15:27:23 +02:00
|
|
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
|
|
|
explicit operator bool() const
|
|
|
|
{ return _M_exception_object; }
|
|
|
|
#endif
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
friend bool
|
2009-11-09 23:09:30 +01:00
|
|
|
operator==(const exception_ptr&, const exception_ptr&) throw()
|
|
|
|
__attribute__ ((__pure__));
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
const type_info*
|
* eh_type.cc (__cxa_current_exception_type) Mark throw().
* unwind-cxx.h (__cxa_get_globals, __cxa_get_globals_fast): Mark const.
(__cxa_get_exception_ptr): Mark pure.
(__cxa_bad_cast, __cxa_bad_typeid): Mark noreturn
(__terminate): Makr throw ().
* exception (terminate): Mark throw().
(uncaught_exception): Mark pure.
* eh_ptr.cc (_M_safe_bool_dummy): Mark throw().
* guard.cc (__cxa_guard_abort, __cxa_guard_release): Mark throw().
* eh_terminate.cc (__terminate, terminate): Mark throw().
* vec.cc (__cxa_vec_cleanup): Mark throw().
* cxxabi.h (__cxa_vec_cleanup, __cxa_guard_release, __cxa_guard_abort): Mark throw ().
(__cxa_pure_virtual): Mark noreturn.
(__cxa_current_exception_type): Mark throw and pure.
* exception_ptr.h (operator ==, !=, _M_get, !, ==,
__cxa_exception_type): Mark pure.
(_M_safe_bool_dummy): Mark pure and const.
From-SVN: r146331
2009-04-19 00:18:21 +02:00
|
|
|
__cxa_exception_type() const throw() __attribute__ ((__pure__));
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
};
|
|
|
|
|
2009-11-09 23:09:30 +01:00
|
|
|
bool
|
|
|
|
operator==(const exception_ptr&, const exception_ptr&) throw()
|
|
|
|
__attribute__ ((__pure__));
|
|
|
|
|
|
|
|
bool
|
|
|
|
operator!=(const exception_ptr&, const exception_ptr&) throw()
|
|
|
|
__attribute__ ((__pure__));
|
2010-06-06 15:27:23 +02:00
|
|
|
|
|
|
|
inline void
|
|
|
|
swap(exception_ptr& __lhs, exception_ptr& __rhs)
|
|
|
|
{ __lhs.swap(__rhs); }
|
|
|
|
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
} // namespace __exception_ptr
|
|
|
|
|
|
|
|
|
2009-11-09 23:09:30 +01:00
|
|
|
/// Obtain an exception_ptr pointing to a copy of the supplied object.
|
2009-02-21 01:45:21 +01:00
|
|
|
template<typename _Ex>
|
|
|
|
exception_ptr
|
|
|
|
copy_exception(_Ex __ex) throw()
|
|
|
|
{
|
|
|
|
__try
|
|
|
|
{
|
2009-08-10 20:24:47 +02:00
|
|
|
#ifdef __EXCEPTIONS
|
2009-02-21 01:45:21 +01:00
|
|
|
throw __ex;
|
2009-08-10 20:24:47 +02:00
|
|
|
#endif
|
2009-02-21 01:45:21 +01:00
|
|
|
}
|
|
|
|
__catch(...)
|
|
|
|
{
|
2009-08-10 20:24:47 +02:00
|
|
|
return current_exception();
|
2009-02-21 01:45:21 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-07 03:05:38 +02:00
|
|
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
|
|
|
// 1130. copy_exception name misleading
|
|
|
|
/// Obtain an exception_ptr pointing to a copy of the supplied object.
|
|
|
|
template<typename _Ex>
|
|
|
|
exception_ptr
|
|
|
|
make_exception_ptr(_Ex __ex) throw()
|
|
|
|
{ return std::copy_exception<_Ex>(__ex); }
|
|
|
|
|
2009-02-21 01:45:21 +01:00
|
|
|
// @} group exceptions
|
[multiple changes]
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
2008-08-23 Sebastian Redl <sebastian.redl@getdesigned.at>
Add (again) exception propagation support as per N2179. Feature is
available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
* libsupc++/exception_ptr.h (exception_ptr, current_exception,
copy_exception, rethrow_exception): New file, implement exception
propagation.
* libsupc++/eh_ptr.cc (exception_ptr, current_exception,
rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
* libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
__cxa_free_dependent_exception, __get_dependent_exception_from_ue,
__GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
__gxx_dependent_exception_class, __get_object_from_ue,
__get_object_from_ambiguous_exception): Add.
(__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
(__is_gxx_exception_class): Handle dependent exceptions.
* libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
* libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
* libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
* libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
__cxa_free_dependent_exception): Add.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
counting.
* libsupc++/exception: Conditionally include exception_ptr.h.
* libsupc++/Makefile.am: Register new files.
* libsupc++/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Add new symbols.
* testsuite/18_support/exception_ptr/current_exception.cc: Test the
core functionality of current_exception().
* testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
core functionality of rethrow_exception().
* testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
exception objects during exception propagation.
From-SVN: r139509
2008-08-23 13:28:30 +02:00
|
|
|
} // namespace std
|
|
|
|
|
|
|
|
} // extern "C++"
|
|
|
|
|
|
|
|
#pragma GCC visibility pop
|
|
|
|
|
|
|
|
#endif
|