aboutsummaryrefslogtreecommitdiff
path: root/include/demangle.h
AgeCommit message (Collapse)AuthorFilesLines
2015-07-14Remove trailing spaces in demangle.hH.J. Lu1-2/+2
From-SVN: r225782
2015-07-14Update copyright year in includeH.J. Lu1-3/+2
From-SVN: r225781
2014-09-23demangle.h (DMGL_DLANG): New macro.Iain Buclaw1-2/+9
include/: * demangle.h (DMGL_DLANG): New macro. (DMGL_STYLE_MASK): Add DMGL_DLANG. (demangling_styles): Add dlang_demangling. (DLANG_DEMANGLING_STYLE_STRING): New macro. (DLANG_DEMANGLING): New macro. (dlang_demangle): New prototype. libiberty/: * Makefile.in (CFILES): Add d-demangle.c. (REQUIRED_OFILES): Add d-demangle.o. * cplus-dem.c (libiberty_demanglers): Add dlang_demangling case. (cplus_demangle): Likewise. * d-demangle.c: New file. * testsuite/Makefile.in (really-check): Add check-d-demangle. * testsuite/d-demangle-expected: New file. From-SVN: r215530
2013-12-23re PR c++/41090 (Using static label reference in c++ class constructor ↵Jason Merrill1-0/+8
produces wrong code) PR c++/41090 Add -fdeclone-ctor-dtor. gcc/cp/ * optimize.c (can_alias_cdtor, populate_clone_array): Split out from maybe_clone_body. (maybe_thunk_body): New function. (maybe_clone_body): Call it. * mangle.c (write_mangled_name): Remove code to suppress writing of mangled name for cloned constructor or destructor. (write_special_name_constructor): Handle decloned constructor. (write_special_name_destructor): Handle decloned destructor. * method.c (trivial_fn_p): Handle decloning. * semantics.c (expand_or_defer_fn_1): Clone after setting linkage. gcc/c-family/ * c.opt: Add -fdeclone-ctor-dtor. * c-opts.c (c_common_post_options): Default to on iff -Os. gcc/ * cgraph.h (struct cgraph_node): Add calls_comdat_local. (symtab_comdat_local_p, symtab_in_same_comdat_p): New. * cif-code.def: Add USES_COMDAT_LOCAL. * symtab.c (verify_symtab_base): Make sure we don't refer to a comdat-local symbol from outside its comdat. * cgraph.c (verify_cgraph_node): Likewise. * cgraphunit.c (mark_functions_to_output): Don't mark comdat-locals. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (function_and_variable_visibility): Handle comdat-local fns. * ipa-cp.c (determine_versionability): Don't clone comdat-locals. * ipa-inline-analysis.c (compute_inline_parameters): Update calls_comdat_local. * ipa-inline-transform.c (inline_call): Likewise. (save_inline_function_body): Don't clear DECL_COMDAT_GROUP. * ipa-inline.c (can_inline_edge_p): Check calls_comdat_local. * lto-cgraph.c (input_overwrite_node): Read calls_comdat_local. (lto_output_node): Write it. * symtab.c (symtab_dissolve_same_comdat_group_list): Clear DECL_COMDAT_GROUP for comdat-locals. include/ * demangle.h (enum gnu_v3_ctor_kinds): Added literal gnu_v3_unified_ctor. (enum gnu_v3_ctor_kinds): Added literal gnu_v3_unified_dtor. libiberty/ * cp-demangle.c (cplus_demangle_fill_ctor,cplus_demangle_fill_dtor): Handle unified ctor/dtor. (d_ctor_dtor_name): Handle unified ctor/dtor. From-SVN: r206182
2013-04-03Demangle C++11 ref-qualifier.Jason Merrill1-0/+6
include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_REFERENCE_THIS, DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS. libiberty/ * cp-demangle.c (d_ref_qualifier): New. (d_nested_name, d_function_type): Use it. (d_parmlist): Don't get confused by a ref-qualifier. (cplus_demangle_type): Reorder ref-qualifier. (d_pointer_to_member_type): Likewise. (d_dump): Handle DEMANGLE_COMPONENT_REFERENCE_THIS and DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS. (d_make_comp, has_return_type, d_encoding): Likewise. (d_print_comp, d_print_mod_list, d_print_mod): Likewise. (d_print_function_type, is_ctor_or_dtor): Likewise. From-SVN: r197436
2012-11-09Add C++ attribute abi_tag and -Wabi-tag option.Jason Merrill1-0/+2
gcc/ * attribs.c (lookup_attribute_spec): Handle getting a TREE_LIST. gcc/c-family/ * c.opt (Wabi-tag): New. gcc/cp/ * tree.c (cxx_attribute_table): Add abi_tag attribute. (check_abi_tag_redeclaration, handle_abi_tag_attribute): New. * class.c (find_abi_tags_r, check_abi_tags): New. (check_bases, check_field_decl): Call check_abi_tags. * decl.c (redeclaration_error_message): Call check_abi_tag_redeclaration. * mangle.c (tree_string_cmp, write_abi_tags): New. (write_unqualified_name): Call write_abi_tags. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_TAGGED_NAME. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_TAGGED_NAME. (d_make_comp, d_find_pack, d_print_comp): Likewise. (d_abi_tags): New. (d_name): Call it. From-SVN: r193367
2012-10-08Allow dynamic initialization of thread_locals.Jason Merrill1-0/+3
gcc/cp/ * decl.c: Define tls_aggregates. (expand_static_init): Remove sorry. Add to tls_aggregates. * cp-tree.h: Declare tls_aggregates. * call.c (set_up_extended_ref_temp): Add to tls_aggregates. * decl2.c (var_needs_tls_wrapper): New. (var_defined_without_dynamic_init): New. (get_tls_init_fn, get_tls_wrapper_fn): New. (generate_tls_wrapper, handle_tls_init): New. (cp_write_global_declarations): Call handle_tls_init and enerate_tls_wrapper. * mangle.c (write_guarded_var_name): Split out from.. (mangle_guard_variable): ...here. (mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it. (decl_tls_wrapper_p): New. * semantics.c (finish_id_expression): Replace use of thread_local variable with a call to its wrapper. libiberty/ * cp-demangle.c (d_special_name, d_dump): Handle TH and TW. (d_make_comp, d_print_comp): Likewise. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_TLS_INIT and DEMANGLE_COMPONENT_TLS_WRAPPER. From-SVN: r192211
2012-01-06re PR c++/6057 (expression mangling doesn't work for operator new)Jason Merrill1-0/+5
PR c++/6057 PR c++/48051 PR c++/50855 PR c++/51322 gcc/cp/ * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR, THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and PREDECREMENT_EXPR. (write_template_arg): Fix mangling of class-scope functions and argument packs. (mangle_decl): Update suggested -fabi-version argument. * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR, DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR. * tree.c (dependent_name): No longer static. * cp-tree.h: Declare it. * pt.c (unify): Defer handling of unconverted functions. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and DEMANGLE_COMPONENT_INITIALIZER_LIST. (d_make_comp): Likewise. Allow null right arg for DEMANGLE_COMPONENT_TRINARY_ARG2. (cplus_demangle_operators): Adjust new/delete; add .*, :: and throw. (d_template_args, d_template_arg): Handle 'J' for argument packs. (d_exprlist): Add terminator parm. (d_expression, d_print_comp): Handle initializer lists, nullary expressions, prefix/suffix operators, and new. (d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME and DEMANGLE_COMPONENT_INITIALIZER_LIST. * testsuite/demangle-expected: Add tests. From-SVN: r182970
2011-11-08Merge from transactional-memory branch.Aldy Hernandez1-2/+11
From-SVN: r181154
2011-09-23re PR c++/40831 (g++ generated symbols for cloned function that be demangled.)Cary Coutant1-1/+3
include/ChangeLog: PR 40831 * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_CLONE. libiberty/ChangeLog: PR 40831 * cp-demangle.c (d_make_comp): Add new component type. (cplus_demangle_mangled_name): Check for clone suffixes. (d_parmlist): Don't error out if we see '.'. (d_clone_suffix): New function. (d_print_comp): Print info for clone suffixes. * testsuite/demangle-expected: Add new testcases. From-SVN: r179132
2011-06-13demangle.h (DMGL_RET_POSTFIX): Extend the comment.Jan Kratochvil1-1/+7
include/ * demangle.h (DMGL_RET_POSTFIX): Extend the comment. (DMGL_RET_DROP): New. libiberty/ * cp-demangle.c (d_print_comp) <DEMANGLE_COMPONENT_FUNCTION_TYPE>: Do not pass DMGL_RET_POSTFIX or DMGL_RET_DROP. Support DMGL_RET_DROP. * testsuite/demangle-expected: New testcases for --ret-drop. * testsuite/test-demangle.c: Document --ret-drop in a comment. (main): New variable ret_drop, fill it, call cplus_demangle with it. From-SVN: r175000
2011-01-03Update Copyright years for files modified in 2010.Jakub Jelinek1-1/+1
From-SVN: r168438
2010-02-03re PR c++/12909 (ambiguity in mangling vector types)Jason Merrill1-0/+5
PR c++/12909 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling. From-SVN: r156481
2010-01-11demangle.h (ada_demangle): Add prototype.Tristan Gingold1-0/+3
include/ 2010-01-11 Tristan Gingold <gingold@adacore.com> * demangle.h (ada_demangle): Add prototype. libiberty/ 2010-01-11 Tristan Gingold <gingold@adacore.com> * cplus-dem.c (ada_demangle): Remove prototype. (grow_vect): Removed. (ada_demangle): Rewritten. (cplus_demangle): Fix indentation. * testsuite/demangle-expected: Add tests for Ada. From-SVN: r155804
2009-09-29merge in cxx0x-lambdas-branch@152308Jason Merrill1-0/+14
From-SVN: r152318
2009-09-03update copyright datesAlan Modra1-1/+1
From-SVN: r151359
2009-07-17demangle.h (enum demangle_component_type ↵Jan Kratochvil1-0/+4
<DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>) (enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS>): New. include 2009-07-17 Jan Kratochvil <jan.kratochvil@redhat.com> * demangle.h (enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>) (enum demangle_component_type <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS>): New. libiberty 2009-07-17 Jan Kratochvil <jan.kratochvil@redhat.com> * cp-demangle.c (d_print_comp <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>) (d_print_comp <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS): New. (d_make_comp <DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS>) (d_make_comp <DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS): New. (d_demangle_callback): The variable type is now declared as enum. Replace parser of _GLOBAL_ symbols by a d_make_comp call. From-SVN: r149756
2009-03-17decl.c (grokfndecl): Set DECL_CONTEXT on parms.Jason Merrill1-2/+4
cp/: * decl.c (grokfndecl): Set DECL_CONTEXT on parms. (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms. * pt.c (check_explicit_specialization): Likewise. (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a local specialization. * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name. * decl2.c (parm_index): New fn. * semantics.c (finish_decltype_type): Don't use describable_type. * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR. Give a sorry for unsupported codes rather than crash. Mangle conversions with other than 1 operand. New mangling for PARM_DECL. * operators.def (ALIGNOF_EXPR): Mangle as az. * include/demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_FUNCTION_PARAM. * libiberty/cp-demangle.c (d_make_function_param): new fn. (cplus_demangle_mangled_name): Work around abi v2 bug. (d_expr_primary): Likewise. (cplus_demangle_operators): Add alignof ops. (d_expression): Handle function parameters and conversions with other than 1 operand. (d_print_comp): Handle function parameters. Fix bug with function used in type of function. From-SVN: r144924
2008-12-10re PR c++/35319 (ICE throwing fixed-point types)Jason Merrill1-0/+13
PR c++/35319 * mangle.c (write_builtin_type): Add mangling for decimal floating point and fixed point types. (write_type): Pass FIXED_POINT_TYPE along. * cp-demangle.c (cplus_demangle_type): Support fixed-point types. (d_print_comp, d_dump): Likewise. From-SVN: r142661
2008-10-06PR c++/37376, other mangling issuesJason Merrill1-1/+3
gcc/cp/: PR c++/37376, other mangling issues * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling. (write_member_name): Break out from... (write_expression): ...here. Handle dependent COMPONENT_REF. (write_template_arg): Wrap an argument pack in 'I'/'E'. (write_builtin_type): Update char16/32_t mangling. (write_nested_name, write_prefix): Don't forget template args for typename types. * operators.def: Add ARROW_EXPR, update COMPONENT_REF and EXPR_PACK_EXPANSION. libstdc++-v3/: * config/abi/pre/gnu.ver: Update char16/32_t manglings. include/: * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_PACK_EXPANSION. libiberty/: * cp-demangle.c (struct d_print_info): Add pack_index. (d_dump): Add DEMANGLE_COMPONENT_PACK_EXPANSION. (d_make_comp): Likewise. DEMANGLE_COMPONENT_ARGLIST and DEMANGLE_COMPONENT_TEMPLATE_ARGLIST can have two null args. (cplus_demangle_builtin_types): Add char16/32_t. (cplus_demangle_type): Recognize them. (d_template_args): Handle empty argument packs. (d_template_arg): Handle argument packs. (d_expression): Handle dependent name. (d_index_template_argument): New fn. (d_lookup_template_argument): New fn. (d_find_pack, d_pack_length): New fn. (d_print_subexpr): Split out... (d_print_comp): ...from here. Use d_*_template_argument. Handle empty arg lists. Support pack expansions. * cp-demangle.h (D_BUILTIN_TYPE_COUNT): Increase to 32. From-SVN: r140916
2008-09-09demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_DECLTYPE.Jason Merrill1-1/+3
* include/demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_DECLTYPE. * libiberty/cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_DECLTYPE. (d_make_comp): Likewise. (cplus_demangle_type): Handle decltype and DFP types. (cplus_demangle_operators): Call operator takes 2 args. (cplus_demangle_builtin_types): Add DFP types. (d_exprlist): New fn. (d_expression): Handle parm placeholders, T() and calls. (d_print_comp): Handle decltype, T() and calls. * libiberty/testsuite/demangle-expected: Test the above. From-SVN: r140162
2008-01-27demangle.h (demangle_component_type): Add DEMANGLE_COMPONENT_JAVA_RESOURCE...David Daney1-1/+15
include/ 2008-01-26 David Daney <ddaney@avtrex.com> * demangle.h (demangle_component_type): Add DEMANGLE_COMPONENT_JAVA_RESOURCE, DEMANGLE_COMPONENT_COMPOUND_NAME, and DEMANGLE_COMPONENT_CHARACTER as new enum values. (demangle_component): Add struct s_character to union u. libiberty/ 2008-01-26 David Daney <ddaney@avtrex.com> * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_JAVA_RESOURCE, DEMANGLE_COMPONENT_COMPOUND_NAME, and DEMANGLE_COMPONENT_CHARACTER cases. (d_make_comp): Handle DEMANGLE_COMPONENT_COMPOUND_NAME and DEMANGLE_COMPONENT_JAVA_RESOURCE cases. (d_make_character): New function. (d_java_resource): Same. (d_special_name): Handle "Gr" case. (d_print_comp): Handle DEMANGLE_COMPONENT_JAVA_RESOURCE, DEMANGLE_COMPONENT_COMPOUND_NAME, and DEMANGLE_COMPONENT_CHARACTER cases. * testsuite/demangle-expected: Add test for java resource name mangling. From-SVN: r131883
2007-08-31mangle.c (write_type): Change mangling of rvalue reference from `RR' to `O'.Doug Gregor1-0/+3
2007-08-31 Douglas Gregor <doug.gregor@gmail.com> * mangle.c (write_type): Change mangling of rvalue reference from `RR' to `O'. 2007-08-31 Douglas Gregor <doug.gregor@gmail.com> * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_RVALUE_REFERENCE. 2007-08-31 Douglas Gregor <doug.gregor@gmail.com> * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE. (d_make_comp): Ditto. (cplus_demangle_type): Ditto. (d_print_comp): Ditto. (d_print_mod): Ditto. (d_print_function_type): Ditto. 2007-08-31 Douglas Gregor <doug.gregor@gmail.com> * testsuite/abi/demangle/cxx0x/rref.cc: New. From-SVN: r127999
2007-04-26* demangle.h: Change license to LGPL + exception.Mark Mitchell1-14/+23
From-SVN: r124174
2007-01-29demangle.h: New cplus_demangle_print_callback...Simon Baldwin1-5/+36
include/: * demangle.h: New cplus_demangle_print_callback, cplus_demangle_v3_callback, and java_demangle_v3_callback function prototypes, and demangle_callbackref type definition. libiberty/: * cp-demangle.h (cplus_demangle_operators): External definition suppressed if not building for libstdc++. * cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface to demangling, provides a malloc-less version of __cxa_demangle. (cplus_demangle_print_callback): Public callback version of cplus_demangle_print. (struct d_growable_string): New growable string structure. (d_growable_string_init): New function, provides support for growable strings separate from print info. (d_growable_string_resize): Likewise. (d_growable_string_append_buffer): Likewise. (d_growable_string_callback_adapter):): Likewise. (d_print_init): New print info initialization function. (d_print_error): Macro replace by inline function. (d_print_saw_error): Likewise. (d_append_char): Likewise. (d_append_buffer): Likewise. (d_append_string): New inline function, replaces the d_append_string_constant macro. (d_flush_buffer): New function, flushes buffer to callback. (d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback for unsupported dynamic arrays replaced by alloca(). (d_demangle): Return string length estimating removed. (d_dump): Moved error case handling from call site into function. (d_print_resize): Function removed. (d_print_append_char): Likewise. (d_print_append_buffer): Likewise. (d_print_error): Likewise. (d_print_comp): Added special case handling for Java arrays. (java_demangle_v3): Removed string post-processing for Java arrays, now replaced by special case handling in d_print_comp. (cplus_demangle_v3_callback): Augmented interface to demangling, provides a malloc-less version of cplus_demangle_v3. (java_demangle_v3_callback): Augmented interface to demangling, provides a malloc-less version of java_demangle_v3. From-SVN: r121305
2005-12-11Fixes java/PR9861Terry Laurenzo1-0/+2
From-SVN: r108374
2005-05-25demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.Richard Henderson1-0/+3
include/ * demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_HIDDEN_ALIAS. (d_make_comp, d_print_comp): Likewise. (d_special_name): Generate one. * testsuite/demangle-expected: Add a hidden alias test. From-SVN: r100174
2005-05-10Update the address and phone number of the FSF organization.Nick Clifton1-2/+2
From-SVN: r99518
2005-03-26demangle.h: Remove uses of PARAMS.Gabriel Dos Reis1-36/+34
include/ 2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net> * demangle.h: Remove uses of PARAMS. * libiberty.h (ANSI_PROTOTYPES): Remove guard since ANSI_PROTOTYPES is always assumed. Remove uses of PARAMS throughout. libiberty/ 2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to use ISO C prototype style 2/n. * cp-demangle.h: Remove uses of PARAMS. * cp-demangle.c: Likewise. (d_dump, cplus_demangle_fill_name, cplus_demangle_fill_extended_operator, cplus_demangle_fill_ctor, cplus_demangle_fill_dtor, d_make_empty, d_make_comp, d_make_name, d_make_builtin_type, d_make_operator, d_make_extended_operator, d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub, cplus_demangle_mangled_name, has_return_type, is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name, d_prefix, d_unqualified_name, d_source_name, d_number, d_identifier, d_operator_name, d_special_name, d_call_offset, d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers, d_function_type, d_bare_function_type, d_class_enum_type, d_array_type, d_pointer_to_member_type, d_template_param, d_template_args, d_template_arg, d_expression, d_expr_primary, d_local_name, d_discriminator, d_add_substitution, d_substitution, d_print_resize, d_print_append_char, d_print_append_buffer, d_print_error, cplus_demangle_print, d_print_comp, d_print_java_identifier, d_print_mod_list, d_print_mod, d_print_function_type, d_print_array_type, d_print_expr_op, d_print_cast, cplus_demangle_init_info, d_demangle, __cxa_demangle, cplus_demangle_v3, java_demangle_v3, is_ctor_or_dtor, is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor, print_usage, main): 2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to ISO C prototype style 1/n. * _doprnt.c: Remove conditional #include <varargs.h> on ANSI_PROTOTYPES as the latter is always assumed. (_doprnt, checkit, main): Use ISO C prototype. * alloca.c (find_stack_direction, C_alloca): Use ISO C prototype. * argv.c: Remove conditional #includes on ANSI_PROTOTYPES. (dupargv, freeargv, buildargv, main): Use ISO C prototype. * atexit.c (atexit): Likewise * asprintf.c: Remove conditional include on ANSI_PROTOTYPES. (asprintf): Use ISO C prototype. * basename.c (basename): Likewise * bcmp.c (bcmp): Likewise. * bcopy.c (bcopy): Likewise. * bzero.c (bzero): Likewise. * bsearch.c (bsearch): Likewise. Improve const-correctness. * choose-temp.c (choose_temp_base): Likewise. * calloc.c: Remove conditional #include on ANSI_PROTOTYPES. (calloc): Use ISO C prototype. * clock.c (clock): Likewise. * concat.c: Remove conditional #include on ANSI_PROTOTYPES. (vconcat_length, vconcat_copy, concat_length, concat_copy, concat_copy2, concat, reconcat, main): Use ISO C prototype. * copysign.c (copysign): Likewise. From-SVN: r97085
2004-05-04demangle.h: Do not use C++ reserved keyword typename as parameter for...Andreas Jaeger1-1/+1
* demangle.h: Do not use C++ reserved keyword typename as parameter for cplus_demangle_fill_builtin_type. From-SVN: r81481
2004-01-13demangle.h: Instead of checking ANSI_PROTOTYPES, just include "libiberty.h".Ian Lance Taylor1-6/+1
2004-01-12 Ian Lance Taylor <ian@wasabisystems.com> * demangle.h: Instead of checking ANSI_PROTOTYPES, just include "libiberty.h". From-SVN: r75789
2004-01-13* demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.Ian Lance Taylor1-0/+5
From-SVN: r75783
2004-01-12demangle.h (enum demangle_component_type): Define.Ian Lance Taylor1-2/+364
* demangle.h (enum demangle_component_type): Define. (struct demangle_operator_info): Declare. (struct demangle_builtin_type_info): Declare. (struct demangle_component): Define. (cplus_demangle_fill_component): Declare. (cplus_demangle_fill_name): Declare. (cplus_demangle_fill_builtin_type): Declare. (cplus_demangle_fill_operator): Declare. (cplus_demangle_fill_extended_operator): Declare. (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare. (cplus_demangle_v3_components): Declare. (cplus_demangle_print): Declare. * cp-demangle.c: Include "cp-demangle.h". If IN_GLIBCPP_V3 is defined, rename some functions which are to become static via #define. (CP_STATIC_IF_GLIBCPP_V3): Define. (struct d_operator_info): Move definition to cp-demangle.h, and rename to demangle_operator_info. Change all uses. (enum d_builtin_type_print): Move definition to cp-demangle.h. (struct d_builtin_type_info): Move definition to cp-demangle.h, and rename to demangle_builtin_type_info. Change all uses. (enum d_comp_type): Move definition to include/demangle.h, and rename to demangle_component_type, and change all enums to start with DEMANGLE_COMPONENT_ instead of D_. Change all uses. (struct d_comp): Move definition to include/demangle.h, and rename to demangle_component. Change all uses. (struct d_info): Move definition to cp-demangle.h. (cplus_demangle_fill_name): New function. (cplus_demangle_fill_extended_operator): New function. (cplus_demangle_fill_ctor): New function. (cplus_demangle_fill_dtor): New function. (d_make_empty): Remove type parameter. Change all callers. (d_make_name): Use cplus_demangle_fill_name. (d_make_extended_operator): Use cplus_demangle_fill_extended_operator. (d_make_ctor): Use cplus_demangle_fill_ctor. (d_make_dtor): Use cplus_demangle_fill_dtor. (cplus_demangle_mangled_name): Rename from d_mangled_name. Make non-static by default. Change all callers. (cplus_demangle_operators): Rename from d_operators. Change all uses. Make non-static by default. Add sentinel at end of array. (d_operator_name): Adjust initialization of high for new sentinel in cplus_demangle_operators. (cplus_demangle_builtin_types): Rename from d_builtin_types. Change all uses. Make non-static by default. Change initializer to use D_BUILTIN_TYPE_COUNT instead of magic number 26. (cplus_demangle_type): Rename from d_type. Make non-static by default. Change all callers. (cplus_demangle_init_info): Rename from d_init_info. Make non-static by default. Change all callers. * cp-demangle.h: New file. * cp-demint.c: New file. * Makefile.in: Rebuild dependencies. (CFILES): Add cp-demint.c. (REQUIRED_OFILES): Add cp-demint.o. From-SVN: r75748
2003-07-06demangle.h: Support C++.H.J. Lu1-0/+8
2003-07-06 H.J. Lu <hongjiu.lu@intel.com> * demangle.h: Support C++. From-SVN: r69016
2002-06-25demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.Alan Modra1-2/+2
* demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>. * fibheap.h: Likewise. * hashtab.h: Likewise. * partition.h: Likewise. * sort.h: Likewise. * splay-tree.h: Likewise. From-SVN: r54974
2002-02-05demangle.h (cplus_demangle_v3): Add "options" parm.Jason Merrill1-6/+3
* 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-02demangle.h (cplus_demangle_v3_type): New prototype.H.J. Lu1-0/+5
2002-02-02 H.J. Lu (hjl@gnu.org) * demangle.h (cplus_demangle_v3_type): New prototype. From-SVN: r49455
2001-12-06demangle.h (no_demangling): New.Richard Henderson1-0/+2
* demangle.h (no_demangling): New. (NO_DEMANGLING_STYLE_STRING): New. * cplus-dem.c (libiberty_demanglers): Add no_demangling case. (cplus_demangle): Support no_demangling. From-SVN: r47733
2001-10-07demangle.h (demangler_engine): Const-ify.Kaveh R. Ghazi1-5/+5
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-05-08cp-demangle.c (demangle_v3_with_details, [...]): Use K+R style function ↵Zack Weinberg1-2/+4
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-21demangle.h (enum gnu_v3_constructor_kinds, [...]): New declarations.Jim Blandy1-0/+26
* demangle.h (enum gnu_v3_constructor_kinds, is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds, is_gnu_v3_mangled_dtor): New declarations. From-SVN: r40709
2001-03-14Fix copyright datesNick Clifton1-1/+2
From-SVN: r40469
2001-02-02Add support for Java demangling under the v3 ABI:Bryce McKinlay1-1/+4
* 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-05also tweak commentJason Merrill1-1/+1
From-SVN: r38034
2000-12-04* demangle.h: Change "new_abi" to "v3" everywhere.Richard Henderson1-6/+6
From-SVN: r38020
2000-11-15* demangle.h: Add gnat and java demangle styles.Kenneth Block1-2/+9
From-SVN: r37474
2000-06-07configure.in (ac_libiberty_warn_cflags): Add -pedantic.Kaveh R. Ghazi1-1/+1
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-05In include,Alex Samuel1-20/+30
* 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
2000-05-04demangle.h (demangler_engine): Constify.Kaveh R. Ghazi1-2/+2
include: * demangle.h (demangler_engine): Constify. libiberty: * cplus-dem.c (cplus_demangle_opname, demangle_function_name): Cast the arguments to `islower' to `unsigned char'. (print_demangler_list): Prototype. From-SVN: r33679
2000-04-28* libiberty/cplus-dem.cKenneth Block1-0/+15
(libiberty_demanglers): new table for demangle styles (cplus_demangle_set_style): New function for setting style (cplus_demangle_name_to_style): New function to translate name * include/demangle.h (libiberty_demanglers): new table for different styles (cplus_demangle_set_style): New function for setting style (cplus_demangle_name_to_style): New function to translate name Co-Authored-By: Jason Merrill <jason@casey.cygnus.com> From-SVN: r33525