aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/inc
diff options
context:
space:
mode:
authorAlex Samuel <samuel@codesourcery.com>2000-06-23 03:58:44 +0000
committerAlex Samuel <samuel@gcc.gnu.org>2000-06-23 03:58:44 +0000
commit051664b06948af35f87a68332931d5edb5d33f76 (patch)
tree05629f3ad35fc30f6e539559e8930fae5517a8a0 /gcc/cp/inc
parent31f8e4f306e9ef25c534afb1601fb9547801ae90 (diff)
downloadgcc-051664b06948af35f87a68332931d5edb5d33f76.zip
gcc-051664b06948af35f87a68332931d5edb5d33f76.tar.gz
gcc-051664b06948af35f87a68332931d5edb5d33f76.tar.bz2
in include/ChangeLog:
* dyn-string.h (dyn_string_init, dyn_string_new, dyn_string_delete, dyn_string_release, dyn_string_resize, dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr, dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, dyn_string_append_char, dyn_string_substring_dyn_string_eq): Define as same name with __cxa_ prepended, if IN_LIBGCC2. (dyn_string_init, dyn_string_copy, dyn_string_copy_cstr, dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, dyn_string_append_char, dyn_string_substring): Change return type to int. in libiberty/ChangeLog: * cp-demangle.c: Don't include ctype.h. (IS_DIGIT): New macro. (IS_ALPHA): Likewise. Use IS_DIGIT and IS_ALPHA throughout instead of isdigit and isalpanum. (demangling_def): Make name and next const pointers. (STATUS_ALLOCATION_FAILED): New status code. (dyn_string_append_space): Handle failure in dyn_string_append_char. (int_to_dyn_string): Likewise. Change return value to status_t. (string_list_new): Handle failure of dyn_string_init. (result_close_template_list): Change return type to status_t. Handle failure in dyn_string_append. (result_push): Change return value to status_t. Handle failure in string_list_new. Handle failure of result_push throughout. (substitution_add): Change return value to status_t. Handle dyn_string failures. Handle failure of substitution_add throughout. (template_arg_list_new): Return NULL on allocation failure. (result_append_string): Return STATUS_ALLOCATION_FAILED on error. Handle error result throughout. (result_append): Likewise. (result_append_char): Likewise. (result_append_space): Likewise. (demangling_new): Make argument a const pointer. Handle allocation failures. (demangle_template_args): Handle failure in template_arg_list_new and result_close_template_list. (demangle_discriminator): Return if int_to_dyn_string fails. (cp_demangle): Likewise. (cp_demangle_type): New function. (cplus_demangle_new_abi): Don't call dyn_string_delete. Abort on memory allocation failure. (main): Likewise. * dyn-string.c (RETURN_ON_ALLOCATION_FAILURE): Define if IN_LIBGCC2. (dyn_string_init): Change return value to int. Handle RETURN_ON_ALLOCATION_FAILURE case. (dyn_string_new): Handle RETURN_ON_ALLOCATION_FAILURE case. (dyn_string_release): Delete the dyn_string. (dyn_string_resize): Handle RETURN_ON_ALLOCATION_FAILURE case. (dyn_string_copy): Change return type to int. (dyn_string_copy_cstr): Likewise. (dyn_string_prepend): Likewise. (dyn_string_prepend_cstr): Likewise. (dyn_string_insert): Likewise. (dyn_string_insert_cstr): Likewise. (dyn_string_append): Likewise. (dyn_string_append_cstr): Likewise. (dyn_string_append_char): Likewise. (dyn_string_substring): Likewise. in gcc/cp/ChangeLog: * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. (cp-demangle.o): New rule. (dyn-string.o): Likewise. * inc/cxxabi.h (__cxa_demangle): New declaration. From-SVN: r34657
Diffstat (limited to 'gcc/cp/inc')
-rw-r--r--gcc/cp/inc/cxxabi.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/inc/cxxabi.h b/gcc/cp/inc/cxxabi.h
index ad918c4..8987b6d 100644
--- a/gcc/cp/inc/cxxabi.h
+++ b/gcc/cp/inc/cxxabi.h
@@ -459,6 +459,14 @@ void __cxa_vec_delete (void *__array_address,
__SIZE_TYPE__ __padding_size,
void (*__destructor) (void *));
+/* demangling routines */
+
+extern "C"
+char *__cxa_demangle (const char *__mangled_name,
+ char *__output_buffer,
+ __SIZE_TYPE__ *__length,
+ int *__status);
+
} /* namespace __cxxabiv1 */
/* User programs should use the alias `abi'. */