aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
AgeCommit message (Collapse)AuthorFilesLines
2002-07-09cp-demangle.c (demangle_identifier): Support extended Unicode characters.Jason Merrill1-1/+39
* cp-demangle.c (demangle_identifier): Support extended Unicode characters. From-SVN: r55354
2002-07-09cp-demangle.c (demangle_v3_with_details): Wrap in !defined IN_GLIBCPP_V3.Kaveh R. Ghazi1-1/+1
* cp-demangle.c (demangle_v3_with_details): Wrap in !defined IN_GLIBCPP_V3. From-SVN: r55335
2002-07-02re PR c++/7112 (Regression: ICE on C++ code involving templates and sizeof)Mark Mitchell1-7/+30
PR c++/7112 * g++.dg/template/sizeof2.C: New test. PR c++/7112 * mangle.c (write_expression): Add mangling for sizeof when applied to a type. * operators.def: Remove stale comment. * cp-demangle.c (demangle_operator_name): Add type_arg parameter. Set it for the "st" operator. (demangle_expression): Handle expressions with types as arguments. From-SVN: r55169
2002-04-01cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3.Phil Edwards1-3/+5
2002-04-01 Phil Edwards <pme@gcc.gnu.org> * cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3. (is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_ctor): Conditionally not compile if IN_GLIBCPP_V3 defined. * dyn-string.c: Also allow IN_GLIBCPP_V3 to change allocation scheme. From-SVN: r51708
2002-03-30cp-demangle.c (java_demangle_v3): Don't try to release "demangled" if it is ↵Bryce McKinlay1-1/+5
NULL. * cp-demangle.c (java_demangle_v3): Don't try to release "demangled" if it is NULL. From-SVN: r51594
2002-03-12cp-demangle.c: Add libgcc exception to cp-demangle.c copyright notice.Mark Mitchell1-1/+10
* cp-demangle.c: Add libgcc exception to cp-demangle.c copyright notice. From-SVN: r50679
2002-02-05demangle.h (cplus_demangle_v3): Add "options" parm.Jason Merrill1-18/+5
* demangle.h (cplus_demangle_v3): Add "options" parm. (cplus_demangle_v3_type): Remove prototype. (DMGL_VERBOSE): New macro. (DMGL_TYPES): New macro. * cplus-dem.c (flags): Add DMGL_VERBOSE (cplus_demangle_v3_p): Remove. (demangle_it): Add DMGL_TYPES to passed flags. * cp-demangle.c (cplus_demangle_v3_all): Remove. (cplus_demangle_v3_type): Remove. (cplus_demangle_v3): Add options parm. * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle. From-SVN: r49525
2002-02-02cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2.H.J. Lu1-7/+33
2002-02-02 H.J. Lu (hjl@gnu.org) * cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2. (cplus_demangle_v3_all): New. (cplus_demangle_v3): Call cplus_demangle_v3_all. (cplus_demangle_v3_type): Call cplus_demangle_v3_all. * cplus-dem.c (cplus_demangle_v3_p): New function pointer. Initialized to cplus_demangle_v3. (cplus_demangle_with_style): Call cplus_demangle_v3_p instead of cplus_demangle_v3. (main): Set cplus_demangle_v3_p to cplus_demangle_v3_type for command line symbol. * testsuite/regress-demangle: Pass the mangled name at the command line. From-SVN: r49456
2002-02-01cp-demangle.c (cp_demangle_type): Call demangling_new with DMGL_GNU_V3.H.J. Lu1-1/+1
2002-02-01 H.J. Lu <hjl@gnu.org> * cp-demangle.c (cp_demangle_type): Call demangling_new with DMGL_GNU_V3. From-SVN: r49409
2002-02-01cp-demangle.c: Revert yesterday's change.Phil Edwards1-8/+9
2002-01-31 Phil Edwards <pme@gcc.gnu.org> * cp-demangle.c: Revert yesterday's change. From-SVN: r49386
2002-01-31cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2.Phil Edwards1-9/+8
2002-01-30 Phil Edwards <pme@gcc.gnu.org> * cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2. (cplus_demangle_v3): Mimic __cxa_demangle and fall back on cp_demangle_type. * testsuite/demangle-expected: New gnu-v3 test. From-SVN: r49353
2002-01-02gcc.c (default_compilers): Const-ify.Kaveh R. Ghazi1-1/+1
* gcc.c (default_compilers): Const-ify. * mips-tdump.c (stab_names): Likewise. * mips-tfile.c (map_coff_types, map_coff_storage, map_coff_sym_type, map_coff_derived_type, stabs_symbol, pseudo_ops_t, pseudo_ops): Likewise. * protoize.c (default_include): Likewise f: * com.c (clear_binding_level): Const-ify. (ffecom_arglist_expr_): Likewise. * info.c (ffeinfo_types_): Don't needlessly zero init. * lex.c (ffelex_hash_kludge): Const-ify. java: * parse.y (src_parse_roots): Don't needlessly zero init. libiberty: * cp-demangle.c (long_options): Const-ify. * cplus-dem.c (long_options): Likewise. From-SVN: r48485
2001-10-07demangle.h (demangler_engine): Const-ify.Kaveh R. Ghazi1-3/+3
include: * demangle.h (demangler_engine): Const-ify. * libiberty.h (buildargv): Likewise. libiberty: * argv.c (buildargv, tests, main): Const-ify. * cp-demangle.c (operator_code): Likewise. * cplus-dem.c (optable, libiberty_demanglers, cplus_demangle_set_style, cplus_demangle_name_to_style, print_demangler_list): Likewise. * hashtab.c (higher_prime_number): Likewise. * strcasecmp.c (charmap): Likewise. * strerror.c (error_info, strerror, main): Likewise. * strncasecmp.c (charmap): Likewise. * strsignal.c (signal_info): Likewise. From-SVN: r46060
2001-08-07cp-demangle.c (demangle_special_name): "GR" -> "reference temporary for".Jason Merrill1-4/+20
* cp-demangle.c (demangle_special_name): "GR" -> "reference temporary for". From-SVN: r44694
2001-05-08cp-demangle.c (demangle_v3_with_details, [...]): Use K+R style function ↵Zack Weinberg1-3/+6
definition. * cp-demangle.c (demangle_v3_with_details, is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor): Use K+R style function definition. * ternary.c: Use K+R style function definitions. Use PTR, not void *. Make arguments constant where possible. * demangle.h: Use PARAMS for all prototypes. * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *. Make arguments constant where possible. From-SVN: r41910
2001-03-23mangle.c (write_discriminator): Use `_0' for discriminator 1, not `_'.Jakub Jelinek1-6/+2
* mangle.c (write_discriminator): Use `_0' for discriminator 1, not `_'. * cp-demangle.c (demangle_discriminator): `_0' is discriminator #1, `_' not followed by a digit is invalid. From-SVN: r40795
2001-03-22cp-demangle.c (string_list_delete): Don't forget to free the actual contents ↵Jim Blandy1-1/+1
of the string. * cp-demangle.c (string_list_delete): Don't forget to free the actual contents of the string. From-SVN: r40744
2001-03-21cp-demangle.c (struct demangling_def): New fields: is_constructor and ↵Jim Blandy1-6/+114
is_destructor. * cp-demangle.c (struct demangling_def): New fields: is_constructor and is_destructor. (demangling_new): Initialize them. (demangle_ctor_dtor_name): Set them, if we detect a constructor or destructor. (demangle_v3_with_details, is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor): New functions. From-SVN: r40713
2001-02-02Add support for Java demangling under the v3 ABI:Bryce McKinlay1-15/+168
* cp-demangle.c (NAMESPACE_SEPARATOR): New define. (struct demangling_def): Add `style' field. (demangling_new): New parameter `style'. Set it in demangling_t. (demangle_prefix): Use NAMESPACE_SEPARATOR. (demangle_type_ptr): Don't emit pointer symbol if doing Java output. (cp_demangle): New parameter `style'. Pass it to demangling_new(). (main): Call cp_demangle with extra parameter. (java_demangle_v3): New function. (java_builtin_type_names): New. Table of primitive type names used for Java demangling. (demangle_builtin_type): Look up in java_builtin_type_names if doing Java output. * cplus-dem.c (cplus_demangle): Use java_demangle_v3 to do Java demangling. (long_options): Remove obsolete `java' option. (main): Remove explicit handling of `java' option. Instead, pass style parameter in cplus_demangle flags as gdb does. * testsuite/demangle.expected: Add some Java test cases. From-SVN: r39399
2000-12-05cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangled name before ↵Jason Merrill1-2/+10
allocating the dyn_string. * cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangled name before allocating the dyn_string. From-SVN: r38043
2000-12-04cp-demangle.c: s/new_abi/v3/.Jason Merrill1-4/+4
* cp-demangle.c: s/new_abi/v3/. * cplus-dem.c: Likewise. (current_demangling_style): Now auto_demangling. (cplus_demangle): Try v3 demangling if AUTO_DEMANGLING. (main): Use standard symbol chars for auto_demangling. From-SVN: r38002
2000-10-22cp-demangle.c (string_list_def): Add caret_position and comments.Alex Samuel1-173/+273
* cp-demangle.c (string_list_def): Add caret_position and comments. (result_caret_pos): New macro. (result_append_string): Rename to... (result_add_string): ... this, and insert at caret position. Rename throughout. (result_append): Rename to... (result_add): ... this, and insert at caret position. Rename throughout. (result_append_char): Rename to... (result_add_char): ... this, and insert at caret position. Rename throughout. (result_append_space): Remove. (string_list_new): Initialize caret position. (result_add_separated_char): Use caret position. (result_get_caret): New funtion. (result_set_caret): Likewise. (result_shift_caret): Likewise. (result_previous_char_is_space): Likewise. (substitution_start): Use caret position. (substitution_add): Likewise. (demangling_new): Initialize caret position. (demangle_encoding): Use caret position. (demanglin_nested_name): Put CV qualifiers after name. (demangle_type_ptr): Use switch statement. Handle pointers to arrays. Don't use result_append_space. Use caret position. (demangle_type): Emit CV qualifiers after underlying type. Adjust call to demangle_array_type. (demangle_array_type): Add parameter to handle pointers to arrays. From-SVN: r37011
2000-09-08* cp-demangle.c: Fix copyright banner.Alex Samuel1-1/+3
From-SVN: r36271
2000-09-07cp-demangle.c (status_allocation_failed): Rearrange whitespace.Alex Samuel1-5/+26
* cp-demangle.c (status_allocation_failed): Rearrange whitespace. (demangle_type): Handle substitution candidates correctly in the face of special substitutions. From-SVN: r36228
2000-09-05cp-demangle.c (demangle_encoding): Rename variable.Alex Samuel1-73/+97
* cp-demangle.c (demangle_encoding): Rename variable. (demangle_name): Rename parameter. Handle return type suppression. (demangle_nested_name): Rename parameter. (demangle_prefix): Likewise. Change return type suppression. (demangle_unqualified_name): Add parameter. Flag constructors and conversion operators. (demangle_special_name): Fix comment. (demangle_type): Rename variable. (demangle_bare_function_type): Check for missing return type and parameter. (demangle_class_enum_type): Rename parameter. (demangle_discriminator): Fix misspelling in comment. From-SVN: r36168
2000-09-05cp-demangle.c (demangle_template_arg): Eat an `E' after an <expression>.Alex Samuel1-0/+1
* cp-demangle.c (demangle_template_arg): Eat an `E' after an <expression>. From-SVN: r36153
2000-09-05cp-demangle.c (demangle_type_ptr): Increment position past pointer and ↵Alex Samuel1-0/+6
reference characters. * cp-demangle.c (demangle_type_ptr): Increment position past pointer and reference characters. From-SVN: r36151
2000-09-05cp-demangle.c (demangle_nv_offset): New function.Alex Samuel1-51/+161
* cp-demangle.c (demangle_nv_offset): New function. (demangle_v_offset): Likewise. (demangle_call_offset): Likewise. (demangle_special_name): Update thunk demangling to comply with ABI changes. From-SVN: r36150
2000-09-05In include:Alex Samuel1-143/+220
* dyn-string.h: Adjust formatting. (dyn_string_insert_char): New macro. New declaration. In libiberty: * cp-demangle.c (ANONYMOUS_NAMESPACE_PREFIX): New macro. (substitution_def): Remove template_parm_number. (NOT_TEMPLATE_PARM): Remove. (result_insert_string): New macro. (result_insert): Likewise. (result_insert_char): Likewise. (substitution_add): Remove last parameter. Don't store template parm number. (BFT_NO_RETURN_TYPE): Define as NULL. (demangle_encoding): Adjust call to demangle_bare_function_type. (demangle_name): Adjust substitution. Adjust call to substitution_add. (demangle_prefix): Adjust call to substitution_add. (demangle_identifier): Handle anonymous namespaces. (demangle_operator_name): Change demangling of vendor-extended operator to match ABI changes. (demangle_type_ptr): Change parameters. Make recursive. Handle substitutions here. (demangle_type): Adjust calls to demangle_template_param, substitution_add, and demangle_type_ptr. Fix substitution of templated types. (demangle_function_type): Change parameter to a pointer. (demangle_bare_function_type): Likewise. Adjust insertion point. (demangle_template_param): Remove last parameter. (demangle_expr_primary): Remove unused variable. Adjust call to demangle_template_param. (is_mangled_char): Accept `$' and `.'. * cplus-dem.c (gnu_new_abi_symbol_characters): Add '$' and '.'. * dyn-string.c (dyn_string_insert_char): New function. From-SVN: r36148
2000-08-28cp-demangle.c (demangle_name): Initialize template_p in local name case.Alex Samuel1-20/+20
* cp-demangle.c (demangle_name): Initialize template_p in local name case. Don't re-add substitutions as candidates. (demangle_nested_name): Use <unqualified-name>. (demangle_prefix): Likewise. Don't add template names as substitution candidates twice, or re-add a substitution or the last prefix component. (demangle_local_name): Adjust output format. From-SVN: r36014
2000-08-25cp-demangle.c (result_add_separated_char): Change parameter to int.Alex Samuel1-59/+67
* cp-demangle.c (result_add_separated_char): Change parameter to int. (substitution_add): Don't check for duplicates. Check if previously allocated size is zero. (demangle_name): Remove duplicate check for std substitution. Clear template flag appropriately. (demangle_prefix): Remove argument to demangle_substitution. Don't check that template flag is already set. (demangle_operator_name): Add pt operator. (demangle_type): Don't treat r as built-in type. Remove argument to demangle_substitution. Fix substitution candidate mechanics. Handle <template-template-parm>s. Improve comments. (demangle_template_param): Don't handle template arg lists here. (demangle_substitution): Remove parameter. (print_usage): Remove extra fprintf option. From-SVN: r35995
2000-08-23cp-demangle.c (result_close_template_list): Remove function.Alex Samuel1-18/+67
* cp-demangle.c (result_close_template_list): Remove function. (result_add_separated_char): New function. (result_open_template_list): New macro. (result_close_template_list): Likewise. (demangle_prefix): Don't set template_p if the prefix ends with a ctor name. (demangle_type_ptr): Remove duplicate RETURN_IF_ERROR. (demangle_type): Check for template args after substitution. (demangle_template_args): Use result_open_template_list. From-SVN: r35915
2000-07-23cp-demangle.c (demangle_ctor_dtor_name): Remove not-in-charge allocating ↵Alex Samuel1-15/+34
ctor mangling. * cp-demangle.c (demangle_ctor_dtor_name): Remove not-in-charge allocating ctor mangling. (demangle_array_type): Handle empty and non-constant array length. From-SVN: r35210
2000-07-23* cp-demangle.c, mkstemps.c: #include <sys/types.h>.Michael Sokolov1-0/+2
From-SVN: r35198
2000-07-21Warning fixes:Kaveh R. Ghazi1-3/+3
* cp-demangle.c (cp_demangle_type): Wrap in IN_LIBGCC2. * setenv.c (setenv): Initialize variable `ep'. * sigsetmask.c (abort): Prototype. * vasprintf.c: Include config.h. Check ANSI_PROTOTYPES, not __STDC__ for stdarg.h include. (int_vasprintf): Prototype. (checkit): Prototype. Use VPARAMS/ANSI_PROTOTYPES/VA_START in definition. Cast `global_total_width' in comparison. (main): Prototype. Return a value. * vfork.c (fork): Prototype. * xexit.c: Include config.h. From-SVN: r35178
2000-06-30in libiberty/ChangeLog:Alex Samuel1-32/+31
* cp-demangle.c (demangle_encoding): Accept no substitutions. (demangle_name): Handle <substitution> followed by <unqualified-template-name>. (demangle_type): Follow special substitutions with <class-enum-type> (demangle_subtitution): Set template_p for special substitutions. (main): Fix typos. in gcc/cp/ChangeLog: * mangle.c (find_substitution): Use same_type_p. (write_encoding): Don't check for substitutions. in libio/ChangeLog: * libioP.h (VTABLE_LABEL): Update for new vtable mangling. * stdstrbufs.cc (filebuf_vtable): Likewise. (stdiobuf_vtable): Likewise. From-SVN: r34811
2000-06-28cp-demangle.c (demangle_special_name): Swap base and derived class when ↵Alex Samuel1-4/+23
demangling construction vtables. * cp-demangle.c (demangle_special_name): Swap base and derived class when demangling construction vtables. From-SVN: r34751
2000-06-23in include/ChangeLog:Alex Samuel1-248/+622
* 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
2000-06-09cp-demangle.c (demangle_operator_name): Add spaces before names beginning ↵Zack Weinberg1-7/+23
with a letter... * cp-demangle.c (demangle_operator_name): Add spaces before names beginning with a letter: delete, delete[], new, new[], sizeof. (demangle_special_name): Handle TF <type> and TJ <type>. From-SVN: r34477
2000-06-08* cp-demangle.c (template_arg_list_new): Revert previous PARAMS patch.Philippe De Muyter1-1/+1
From-SVN: r34455
2000-06-08cp-demangle.c (stdio.h): File included unconditionaly.Philippe De Muyter1-3/+1
* cp-demangle.c (stdio.h): File included unconditionaly. (template_arg_list_new): Parameter list is PARAMS ((void)), not (). * dyn-string.c (stdio.h): File included. * partition.c (partition_print): No `&' needed to take the address of a function. From-SVN: r34450
2000-06-07configure.in (ac_libiberty_warn_cflags): Add -pedantic.Kaveh R. Ghazi1-4/+4
libiberty: * configure.in (ac_libiberty_warn_cflags): Add -pedantic. * choose-temp.c (try, choose_temp_base, make_temp_file): Constify. * cp-demangle.c (demangle_char): Change parameter from char to int. (demangle_expression, demangle_expr_primary): Remove extra semi-colon in prototype. * dyn-string.c (dyn_string_append_char): Change parameter from char to int. * memcmp.c (memcmp): Constify. * mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with __extension__. * partition.c (elem_compare): Prototype. Don't cast away const-ness. * setenv.c (setenv): Use braces to avoid ambiguous `else'. include: * demangle.h (demangling_styles): Remove trailing comma in enum. * dyn-string.h (dyn_string_append_char): Change parameter from char to int. From-SVN: r34447
2000-06-07Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h.Kaveh R. Ghazi1-8/+11
* Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h. * cp-demangle.c: Include demangle.h. (template_arg_list_new): DeANSIfy. (cp_demangle): Make static and add prototype. (operator_code, operators): Constify. (demangle_operator_name): Likewise for variables `p1', `p2' and `p'. From-SVN: r34446
2000-06-05cp-demangle.c (demangle_prefix): Cast argument to isdigit to unsigned char.Alex Samuel1-7/+8
* cp-demangle.c (demangle_prefix): Cast argument to isdigit to unsigned char. (demangle_unqualified_name): Likewise. (demangle_number_literally): Likewise. (demangle_type): Likewise. (demangle_substitution): Likewise. (is_mangled_char): Likewise, for isalnum. From-SVN: r34411
2000-06-05In include,Alex Samuel1-0/+2997
* dyn-string.h: Move here from gcc/dyn-string.h. Add new functions. * demangle.h (DMGL_GNU_NEW_ABI): New macro. (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. (current_demangling_style): Add gnu_new_abi_demangling. (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro. (GNU_NEW_ABI_DEMANGLING): Likewise. (cplus_demangle_new_abi): New declaration. In libiberty, * Makefile.in (CFILES): Add cp-demangle.c and dyn-string.c. (REQUIRED_OFILES): Add cp-demangle.o and dyn-string.o. (cp-demangle.o): New dependency. (dyn-string.o): Likewise. * dyn-string.c: Move here from gcc/dyn-string.c. Add new functions. * cplus-dem.c (libiberty_demanglers): Add initializer for new-ABI demangler. (cplus_demangle): Call cplus_demangle_new_abi if in new-ABI demangling mode. (gnu_new_abi_symbol_characters): New function. (main): Use gnu_new_abi_symbol_characters. * cp-demangle.c: New file. * cp-demangle.c: New file. From-SVN: r34397