aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-06-06 16:38:49 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-06-06 16:38:49 +0000
commit103c63aeb9b6bb856ff8a34b7e35d0dc7ab9bf83 (patch)
treecd362ecde7373e378f1d9a95a1254c3695dd5541 /gcc/cp
parent051ffad528a782b867004c729a01a1db696ec82f (diff)
downloadgcc-103c63aeb9b6bb856ff8a34b7e35d0dc7ab9bf83.zip
gcc-103c63aeb9b6bb856ff8a34b7e35d0dc7ab9bf83.tar.gz
gcc-103c63aeb9b6bb856ff8a34b7e35d0dc7ab9bf83.tar.bz2
eh-common.h (EH_ALLOC_SIZE, [...]): New #defines.
gcc: * eh-common.h (EH_ALLOC_SIZE, EH_ALLOC_ALIGN): New #defines. (eh_context): Add alloc_mask and alloc_buffer emergency fallback space. * libgcc2.c (__eh_alloc): Moved from cp/exception.cc. Fallback on emergency eh_context buffer, if malloc fails. (__eh_free): Moved from cp/exception.cc. Release to emergency eh_context buffer, if appropriate. gcc/cp: * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c From-SVN: r34429
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/exception.cc27
2 files changed, 8 insertions, 23 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 949f4c8..198ff67 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
+
2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
* search.c (maybe_suppress_debug_info): Don't check
diff --git a/gcc/cp/exception.cc b/gcc/cp/exception.cc
index 9263bfe..1ffd762 100644
--- a/gcc/cp/exception.cc
+++ b/gcc/cp/exception.cc
@@ -118,6 +118,10 @@ struct cp_eh_info
extern "C" cp_eh_info **__get_eh_info (); // actually void **
+/* Exception allocate and free, defined in libgcc2. */
+extern "C" void *__eh_alloc(size_t);
+extern "C" void __eh_free();
+
/* Is P the type_info node for a pointer of some kind? */
extern bool __is_pointer (void *);
@@ -159,29 +163,6 @@ __start_cp_handler (void)
return p;
}
-/* Allocate a buffer for a cp_eh_info and an exception object of size SIZE,
- and return a pointer to the beginning of the object's space. */
-
-extern "C" void * malloc (size_t);
-extern "C" void *
-__eh_alloc (size_t size)
-{
- void *p = malloc (size);
- if (p == 0)
- terminate ();
- return p;
-}
-
-/* Free the memory for an cp_eh_info and associated exception, given
- a pointer to the cp_eh_info. */
-
-extern "C" void free (void *);
-extern "C" void
-__eh_free (void *p)
-{
- free (p);
-}
-
extern "C" int __throw_type_match_rtti_2 (const void *, const void *,
void *, void **);