Commit 723acbd5 by Mark Mitchell Committed by Mark Mitchell

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
parent aeb732c1
2004-08-02 Mark Mitchell <mark@codesourcery.com> 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. * Makefile.am (hosted_source): Add libmath and testsuite.
(SUBDIRS): Remove them. (SUBDIRS): Remove them.
* acinclude.m4: (GLIBCXX_ENABLED_HOSTED): Default to freestanding * acinclude.m4: (GLIBCXX_ENABLED_HOSTED): Default to freestanding
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#ifndef _CXXABI_H #ifndef _CXXABI_H
#define _CXXABI_H 1 #define _CXXABI_H 1
#pragma GCC visibility push(default)
#include <stddef.h> #include <stddef.h>
#include <bits/cxxabi_tweaks.h> #include <bits/cxxabi_tweaks.h>
...@@ -523,4 +525,6 @@ namespace abi = __cxxabiv1; ...@@ -523,4 +525,6 @@ namespace abi = __cxxabiv1;
#endif // __cplusplus #endif // __cplusplus
#pragma GCC visibility pop
#endif // __CXXABI_H #endif // __CXXABI_H
...@@ -107,7 +107,7 @@ emergency_mutex_init () ...@@ -107,7 +107,7 @@ emergency_mutex_init ()
extern "C" void * extern "C" void *
__cxa_allocate_exception(std::size_t thrown_size) throw() __cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) throw()
{ {
void *ret; void *ret;
...@@ -154,7 +154,7 @@ __cxa_allocate_exception(std::size_t thrown_size) throw() ...@@ -154,7 +154,7 @@ __cxa_allocate_exception(std::size_t thrown_size) throw()
extern "C" void extern "C" void
__cxa_free_exception(void *vptr) throw() __cxxabiv1::__cxa_free_exception(void *vptr) throw()
{ {
char *ptr = (char *) vptr; char *ptr = (char *) vptr;
if (ptr >= &emergency_buffer[0][0] if (ptr >= &emergency_buffer[0][0]
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "exception_defines.h" #include "exception_defines.h"
extern "C" void extern "C" void
__cxa_bad_cast () __cxxabiv1::__cxa_bad_cast ()
{ {
#ifdef __EXCEPTIONS #ifdef __EXCEPTIONS
throw std::bad_cast(); throw std::bad_cast();
...@@ -45,7 +45,7 @@ __cxa_bad_cast () ...@@ -45,7 +45,7 @@ __cxa_bad_cast ()
} }
extern "C" void extern "C" void
__cxa_bad_typeid () __cxxabiv1::__cxa_bad_typeid ()
{ {
#ifdef __EXCEPTIONS #ifdef __EXCEPTIONS
throw std::bad_typeid(); throw std::bad_typeid();
......
...@@ -35,7 +35,7 @@ using namespace __cxxabiv1; ...@@ -35,7 +35,7 @@ using namespace __cxxabiv1;
extern "C" void * extern "C" void *
__cxa_begin_catch (void *exc_obj_in) throw() __cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
{ {
_Unwind_Exception *exceptionObject _Unwind_Exception *exceptionObject
= reinterpret_cast <_Unwind_Exception *>(exc_obj_in); = reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
...@@ -82,7 +82,7 @@ __cxa_begin_catch (void *exc_obj_in) throw() ...@@ -82,7 +82,7 @@ __cxa_begin_catch (void *exc_obj_in) throw()
extern "C" void extern "C" void
__cxa_end_catch () __cxxabiv1::__cxa_end_catch ()
{ {
__cxa_eh_globals *globals = __cxa_get_globals_fast (); __cxa_eh_globals *globals = __cxa_get_globals_fast ();
__cxa_exception *header = globals->caughtExceptions; __cxa_exception *header = globals->caughtExceptions;
......
...@@ -69,7 +69,7 @@ get_globals_init_once () ...@@ -69,7 +69,7 @@ get_globals_init_once ()
#endif #endif
extern "C" __cxa_eh_globals * extern "C" __cxa_eh_globals *
__cxa_get_globals_fast () throw() __cxxabiv1::__cxa_get_globals_fast () throw()
{ {
#if __GTHREADS #if __GTHREADS
if (use_thread_key) if (use_thread_key)
...@@ -82,7 +82,7 @@ __cxa_get_globals_fast () throw() ...@@ -82,7 +82,7 @@ __cxa_get_globals_fast () throw()
} }
extern "C" __cxa_eh_globals * extern "C" __cxa_eh_globals *
__cxa_get_globals () throw() __cxxabiv1::__cxa_get_globals () throw()
{ {
#if __GTHREADS #if __GTHREADS
__cxa_eh_globals *g; __cxa_eh_globals *g;
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <bits/c++config.h> #include <bits/c++config.h>
#include "unwind-cxx.h" #include "unwind-cxx.h"
using namespace __cxxabiv1; using namespace __cxxabiv1;
...@@ -56,7 +55,8 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc) ...@@ -56,7 +55,8 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
extern "C" void 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); __cxa_exception *header = __get_exception_header_from_obj (obj);
header->exceptionType = tinfo; header->exceptionType = tinfo;
...@@ -81,7 +81,7 @@ __cxa_throw (void *obj, std::type_info *tinfo, void (*dest) (void *)) ...@@ -81,7 +81,7 @@ __cxa_throw (void *obj, std::type_info *tinfo, void (*dest) (void *))
} }
extern "C" void extern "C" void
__cxa_rethrow () __cxxabiv1::__cxa_rethrow ()
{ {
__cxa_eh_globals *globals = __cxa_get_globals (); __cxa_eh_globals *globals = __cxa_get_globals ();
__cxa_exception *header = globals->caughtExceptions; __cxa_exception *header = globals->caughtExceptions;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <typeinfo> #include <typeinfo>
#include <cxxabi.h>
#include "unwind-cxx.h" #include "unwind-cxx.h"
namespace __cxxabiv1 namespace __cxxabiv1
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#ifndef __EXCEPTION__ #ifndef __EXCEPTION__
#define __EXCEPTION__ #define __EXCEPTION__
#pragma GCC visibility push(default)
extern "C++" { extern "C++" {
namespace std namespace std
...@@ -117,4 +119,6 @@ namespace __gnu_cxx ...@@ -117,4 +119,6 @@ namespace __gnu_cxx
} // extern "C++" } // extern "C++"
#pragma GCC visibility pop
#endif #endif
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
#include <cstddef> #include <cstddef>
#include <exception> #include <exception>
#pragma GCC visibility push(default)
extern "C++" { extern "C++" {
namespace std namespace std
...@@ -98,4 +100,6 @@ inline void operator delete[](void*, void*) throw() { } ...@@ -98,4 +100,6 @@ inline void operator delete[](void*, void*) throw() { }
//@} //@}
} // extern "C++" } // extern "C++"
#pragma GCC visibility pop
#endif #endif
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
// the GNU General Public License. // the GNU General Public License.
#include <bits/c++config.h> #include <bits/c++config.h>
#include <cxxabi.h>
#include "unwind-cxx.h" #include "unwind-cxx.h"
#if _GLIBCXX_HOSTED #if _GLIBCXX_HOSTED
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
#endif #endif
extern "C" void extern "C" void
__cxa_pure_virtual (void) __cxxabiv1::__cxa_pure_virtual (void)
{ {
writestr ("pure virtual method called\n"); writestr ("pure virtual method called\n");
std::terminate (); std::terminate ();
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include <exception> #include <exception>
#pragma GCC visibility push(default)
extern "C++" { extern "C++" {
namespace __cxxabiv1 namespace __cxxabiv1
...@@ -152,5 +154,7 @@ namespace std ...@@ -152,5 +154,7 @@ namespace std
}; };
} // namespace std } // namespace std
#pragma GCC visibility pop
} // extern "C++" } // extern "C++"
#endif #endif
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#include <cstddef> #include <cstddef>
#include "unwind.h" #include "unwind.h"
#pragma GCC visibility push(default)
namespace __cxxabiv1 namespace __cxxabiv1
{ {
...@@ -168,4 +170,6 @@ __get_exception_header_from_ue (_Unwind_Exception *exc) ...@@ -168,4 +170,6 @@ __get_exception_header_from_ue (_Unwind_Exception *exc)
} /* namespace __cxxabiv1 */ } /* namespace __cxxabiv1 */
#pragma GCC visibility pop
#endif // _UNWIND_CXX_H #endif // _UNWIND_CXX_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment