cxxabi.h: Make all declarations have default visibility.

* libsupc++/cxxabi.h: Make all declarations have default
	visibility.
	* libsupc++/exception: Likewise.
	* libsupc++/new: Likewise.
	* libsupc++/typeinfo: Likewise.
	* libsupc++/unwind-cxx.h: Likewise.
	* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Put it into
	the __cxxabiv1 namespace.
	(__cxa_free_exception): Likewise.
	* libsupc++/eh_aux_runtime.cc (__cxa_bad_cast): Likewise.
	(__cxa_bad_typeid): Likewise.
	* libsupc++/eh_catch.cc (__cxa_begin_catch): Likewise.
	(__cxa_end_catch): Likewise.
	* libsupc++/eh_globals.cc (__cxa_get_globals_fast): Likewise.
	(__cxa_get_globals): Likewise.
	* libsupc++/eh_throw.cc (__cxa_throw): Likewise.
	(__cxa_rethrow): Likewise.
	* libsupc++/pure.cc (__cxa_pure_virtual): Likewise.
	* libsupc++/eh_type.cc: Include <cxxabi.h>.

From-SVN: r85463
This commit is contained in:
Mark Mitchell 2004-08-03 06:45:54 +00:00 committed by Mark Mitchell
parent aeb732c12e
commit 723acbd5fa
13 changed files with 54 additions and 12 deletions

View file

@ -1,5 +1,25 @@
2004-08-02 Mark Mitchell <mark@codesourcery.com>
* libsupc++/cxxabi.h: Make all declarations have default
visibility.
* libsupc++/exception: Likewise.
* libsupc++/new: Likewise.
* libsupc++/typeinfo: Likewise.
* libsupc++/unwind-cxx.h: Likewise.
* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Put it into
the __cxxabiv1 namespace.
(__cxa_free_exception): Likewise.
* libsupc++/eh_aux_runtime.cc (__cxa_bad_cast): Likewise.
(__cxa_bad_typeid): Likewise.
* libsupc++/eh_catch.cc (__cxa_begin_catch): Likewise.
(__cxa_end_catch): Likewise.
* libsupc++/eh_globals.cc (__cxa_get_globals_fast): Likewise.
(__cxa_get_globals): Likewise.
* libsupc++/eh_throw.cc (__cxa_throw): Likewise.
(__cxa_rethrow): Likewise.
* libsupc++/pure.cc (__cxa_pure_virtual): Likewise.
* libsupc++/eh_type.cc: Include <cxxabi.h>.
* Makefile.am (hosted_source): Add libmath and testsuite.
(SUBDIRS): Remove them.
* acinclude.m4: (GLIBCXX_ENABLED_HOSTED): Default to freestanding

View file

@ -42,6 +42,8 @@
#ifndef _CXXABI_H
#define _CXXABI_H 1
#pragma GCC visibility push(default)
#include <stddef.h>
#include <bits/cxxabi_tweaks.h>
@ -523,4 +525,6 @@ namespace abi = __cxxabiv1;
#endif // __cplusplus
#pragma GCC visibility pop
#endif // __CXXABI_H

View file

@ -107,7 +107,7 @@ emergency_mutex_init ()
extern "C" void *
__cxa_allocate_exception(std::size_t thrown_size) throw()
__cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) throw()
{
void *ret;
@ -154,7 +154,7 @@ __cxa_allocate_exception(std::size_t thrown_size) throw()
extern "C" void
__cxa_free_exception(void *vptr) throw()
__cxxabiv1::__cxa_free_exception(void *vptr) throw()
{
char *ptr = (char *) vptr;
if (ptr >= &emergency_buffer[0][0]

View file

@ -35,7 +35,7 @@
#include "exception_defines.h"
extern "C" void
__cxa_bad_cast ()
__cxxabiv1::__cxa_bad_cast ()
{
#ifdef __EXCEPTIONS
throw std::bad_cast();
@ -45,7 +45,7 @@ __cxa_bad_cast ()
}
extern "C" void
__cxa_bad_typeid ()
__cxxabiv1::__cxa_bad_typeid ()
{
#ifdef __EXCEPTIONS
throw std::bad_typeid();

View file

@ -35,7 +35,7 @@ using namespace __cxxabiv1;
extern "C" void *
__cxa_begin_catch (void *exc_obj_in) throw()
__cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
{
_Unwind_Exception *exceptionObject
= reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
@ -82,7 +82,7 @@ __cxa_begin_catch (void *exc_obj_in) throw()
extern "C" void
__cxa_end_catch ()
__cxxabiv1::__cxa_end_catch ()
{
__cxa_eh_globals *globals = __cxa_get_globals_fast ();
__cxa_exception *header = globals->caughtExceptions;

View file

@ -69,7 +69,7 @@ get_globals_init_once ()
#endif
extern "C" __cxa_eh_globals *
__cxa_get_globals_fast () throw()
__cxxabiv1::__cxa_get_globals_fast () throw()
{
#if __GTHREADS
if (use_thread_key)
@ -82,7 +82,7 @@ __cxa_get_globals_fast () throw()
}
extern "C" __cxa_eh_globals *
__cxa_get_globals () throw()
__cxxabiv1::__cxa_get_globals () throw()
{
#if __GTHREADS
__cxa_eh_globals *g;

View file

@ -31,7 +31,6 @@
#include <bits/c++config.h>
#include "unwind-cxx.h"
using namespace __cxxabiv1;
@ -56,7 +55,8 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
extern "C" void
__cxa_throw (void *obj, std::type_info *tinfo, void (*dest) (void *))
__cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo,
void (*dest) (void *))
{
__cxa_exception *header = __get_exception_header_from_obj (obj);
header->exceptionType = tinfo;
@ -81,7 +81,7 @@ __cxa_throw (void *obj, std::type_info *tinfo, void (*dest) (void *))
}
extern "C" void
__cxa_rethrow ()
__cxxabiv1::__cxa_rethrow ()
{
__cxa_eh_globals *globals = __cxa_get_globals ();
__cxa_exception *header = globals->caughtExceptions;

View file

@ -29,6 +29,7 @@
#include <typeinfo>
#include <cxxabi.h>
#include "unwind-cxx.h"
namespace __cxxabiv1

View file

@ -37,6 +37,8 @@
#ifndef __EXCEPTION__
#define __EXCEPTION__
#pragma GCC visibility push(default)
extern "C++" {
namespace std
@ -117,4 +119,6 @@ namespace __gnu_cxx
} // extern "C++"
#pragma GCC visibility pop
#endif

View file

@ -41,6 +41,8 @@
#include <cstddef>
#include <exception>
#pragma GCC visibility push(default)
extern "C++" {
namespace std
@ -98,4 +100,6 @@ inline void operator delete[](void*, void*) throw() { }
//@}
} // extern "C++"
#pragma GCC visibility pop
#endif

View file

@ -28,6 +28,7 @@
// the GNU General Public License.
#include <bits/c++config.h>
#include <cxxabi.h>
#include "unwind-cxx.h"
#if _GLIBCXX_HOSTED
@ -48,7 +49,7 @@
#endif
extern "C" void
__cxa_pure_virtual (void)
__cxxabiv1::__cxa_pure_virtual (void)
{
writestr ("pure virtual method called\n");
std::terminate ();

View file

@ -37,6 +37,8 @@
#include <exception>
#pragma GCC visibility push(default)
extern "C++" {
namespace __cxxabiv1
@ -152,5 +154,7 @@ namespace std
};
} // namespace std
#pragma GCC visibility pop
} // extern "C++"
#endif

View file

@ -40,6 +40,8 @@
#include <cstddef>
#include "unwind.h"
#pragma GCC visibility push(default)
namespace __cxxabiv1
{
@ -168,4 +170,6 @@ __get_exception_header_from_ue (_Unwind_Exception *exc)
} /* namespace __cxxabiv1 */
#pragma GCC visibility pop
#endif // _UNWIND_CXX_H