Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r83799
|
|
* testsuite/test-demangle.c: Include <string.h> and <stdlib.h> for
prototypes.
(main): Initialize style.
From-SVN: r79062
|
|
* cp-demangle.h (enum d_builtin_type_print): Add D_PRINT_UNSIGNED,
D_PRINT_UNSIGNED_LONG, D_PRINT_LONG_LONG,
D_PRINT_UNSIGNED_LONG_LONG, D_PRINT_FLOAT.
* cp-demangle.c (cplus_demangle_builtin_types): Change char and
short types to D_PRINT_DEFAULT. Change other integer types to use
new D_PRINT_* values where appropriate. Change float types to
D_PRINT_FLOAT.
(d_print_comp) [LITERAL, LITERAL_NEG]: Handle new D_PRINT_*
values.
* testsuite/demangle-expected: Adjust two test cases.
* cp-demangle.c (d_print_function_type): Print a space before the
parenthesis around the function type in more cases.
* testsuite/demangle-expected: Adjust one test case.
From-SVN: r78421
|
|
* cp-demangle.c (d_print_comp) [UNARY]: Don't emit extra
parentheses around a cast.
* testsuite/demangle-expected: Adjust two test cases to match new
output.
From-SVN: r78416
|
|
CV-qualifier on the top of the stack.
* cp-demangle.c (d_print_comp) [RESTRICT, VOLATILE, CONST]: Don't
push more than one of the same CV-qualifier on the top of the
stack.
(d_print_comp) [ARRAY_TYPE]: If the array itself is CV-qualified,
move the CV-qualifiers to apply to the element type instead.
(d_print_array_type): When checking the modifiers, keep looking
past ones which have been printed already.
* testsuite/demangle-expected: Add three test cases.
From-SVN: r78354
|
|
* cp-demangle.c (d_encoding): When DMGL_PARAMS is not set, strip
CV-qualifiers from D_COMP_LOCAL_NAME right subtree.
* cplus-dem.c (demangle_arm_hp_template): Set DMGL_PARAMS when
demangling template parameters.
* testsuite/test-demangle.c (fail): New static function.
(main): Support new options in input file: --no-params,
--is-v3-ctor, and --is-v3-dtor.
* testsuite/demangle-expected: Add --no-params to most tests, and
add the correct result when parameters are not demangled. Add
some simple tests for V3 constructor/destructor recognition.
From-SVN: r75336
|
|
identifier.
* cp-demangle.c (d_identifier): In Java mode, skip an optional '$'
after the identifier.
* testsuite/demangle-expected: Add test case.
From-SVN: r74885
|
|
Fix for PR c++/13447:
* cp-demangle.c (enum d_comp_type): Add D_COMP_LOCAL_NAME.
(d_dump, d_make_comp): Handle D_COMP_LOCAL_NAME.
(is_ctor_dtor_or_conversion): Handle D_COMP_LOCAL_NAME like
D_COMP_QUAL_NAME.
(is_ctor_or_dtor): Likewise.
(d_local_name): Use D_COMP_LOCAL_NAME rather than
D_COMP_QUAL_NAME.
(d_print_comp) [D_COMP_LOCAL_NAME]: New.
(d_prinT_comp) [D_COMP_TYPED_NAME]: If the left tree is
D_COMP_LOCAL_NAME, pull any qualifiers off its right subtree.
(d_print_mod_list): Handle D_COMP_LOCAL_NAME.
* testsuite/demangle-expected: Add two test cases.
* cp-demangle.c (d_print_function_type): Clear the global modifier
list when printing the modifiers, not just when printing the
function parameters.
* testsuite/demangle-expected: Add two test cases.
From-SVN: r74850
|
|
modifiers.
* cp-demangle.c (d_print_function_type): Print the function
parameters with no modifiers.
* testsuite/demangle-expected: Add test case.
From-SVN: r74652
|
|
* cp-demangle.c (struct d_standard_sub_info): Define.
(d_substitution): Add prefix argument. Change all callers.
Rework handling of standard substitutions to print full name when
qualifying a constructor/destructor, or when DMGL_VERBOSE is set.
* testsuite/demangle-expected: Add test case.
Fix handling of negative literal constants:
* cp-demangle.c (enum d_comp_type): Add D_COMP_LITERAL_NEG.
(d_dump, d_make_comp): Handle D_COMP_LITERAL_NEG.
(d_expr_primary): Use D_COMP_LITERAL_NEG for a negative number.
(d_print_comp): Handle D_COMP_LITERAL_NEG.
* testsuite/demangle-expected: Add test case.
From-SVN: r74632
|
|
* cp-demangle.c (IS_UPPER, IS_LOWER): Define.
(d_last_char): Define new macro.
(d_make_name): Reject an empty name.
(d_prefix, d_unqualified_name, d_type): Use new IS_* macros.
(d_substitution, d_print_identifier): Likewise.
(d_print_comp) [D_COMP_OPERATOR]: Likewise.
(d_print_comp) [D_COMP_TEMPLATE]: Use new d_last_char macro.
(d_print_mod) Use new d_last_char macro.
(d_print_cast): Use new d_last_char macro.
(is_ctor_or_dtor): Don't leak memory.
Fix handling of member function modifiers:
* cp-demangle.c (enum d_comp_type): Add D_COMP_RESTRICT_THIS,
D_COMP_VOLATILE_THIS, and D_COMP_CONST_THIS.
(d_dump): Dump new d_comp_type values.
(d_make_comp): Accept new d_comp_type values.
(has_return_type): Only accept _THIS variants of qualifiers.
(d_encoding): Without DMGL_PARAMS, only remove _THIS variants of
qualifiers.
(d_cv_qualifiers): Add member_fn parameter. Change all callers.
(d_print_comp) [D_COMP_TYPED_NAME]: Rather than removing
qualifiers and printing them at the end, add _THIS qualifiers to
the modifier list.
(d_print_comp) [D_COMP_*_THIS]: New cases.
(d_print_comp) [D_COMP_PTRMEM_TYPE]: Remove special handling of
qualifiers.
(d_print_mod_list): Add suffix parameter. Change all callers.
Keep walking the list even if the current modifier has been
printed.
(d_print_mod): Handle new _THIS qualifiers.
(d_print_function_type): Handle new _THIS qualifiers when deciding
whether to print a parenthesis. Put a space before the
parenthesis in some cases. Call d_print_mod_list again at the
end, passing suffix as 1.
(is_ctor_or_dtor): Look for new _THIS qualifiers.
* testsuite/demangle-expected: Add test case.
Fix for PR gcc/13304:
* cp-demangle.c (d_print_comp) [D_COMP_TEMPLATE]: If the character
before the '<' is itself a '<', insert a space.
(d_print_cast): Likewise.
* testsuite/demangle-expected: Add test case.
Fix for PR gcc/13244:
* cp-demangle.c (d_print_comp) [D_COMP_BINARY]: Wrap an expression
which uses the '>' operator in an extra layer of parens.
* testsuite/demangle-expected: Add test case.
From-SVN: r74290
|
|
result of EDG test case...
* testsuite/demangle-expected: Revert one part of 2003-06-26 patch
to restore expected result of EDG test case to original expected
result.
From-SVN: r74128
|
|
* cp-demangle.c (struct d_print_mod): Add templates field.
(d_make_builtin_type): Check for NULL type.
(d_make_extended_operator): Check for NULL name.
(d_make_ctor, d_make_dtor): Likewise.
(d_mangled_name): Add top_level parameter. Change all callers.
(d_encoding): If DMGL_PARAMS is not set, strip off initial
CV-qualifiers.
(d_type): Check some return values we rely on.
(d_bare_function_type, d_array_type): Likewise.
(d_pointer_to_member_type, d_template_args): Likewise.
(d_add_substitution): Fail if argument is NULL.
(d_print_resize): Check whether buf is NULL.
(d_print_comp): Save current templates list with each modifier.
Don't pass the modifier list down when printing a template.
(d_print_cast): Don't pass the modifier list down when printing a
template.
(d_print_mod_list): Temporarily set templates list while printing
a modifier.
(d_print_mod): Check that buf is not NULL before using it.
(d_print_function_type): Print parens if there is no modifier.
(d_init_info): Permit as many substitutions as there are
characters in the mangled name.
* testsuite/demangle-expected: Add two new test cases.
From-SVN: r73970
|
|
have a template.
* cp-demangle.c (has_return_type): Skip qualifiers when checking
whether we have a template.
* testsuite/demangle-expected: Add four new tests.
From-SVN: r73819
|
|
* testsuite/demangle-expected: Minor changes to match output of
new demangler: adjust whitespace in four tests, and change order
of qualifiers in one test.
From-SVN: r73813
|
|
* testsuite/test-demangle.c (main): Don't pass DMGL_VERBOSE to
cplus_demangle.
From-SVN: r73709
|
|
From-SVN: r73708
|
|
* cplus-dem.c (demangle_template): Register a new Btype only
when needed.
* testsuite/demangle-expected: Add a new test.
From-SVN: r72729
|
|
2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/demangle-expected: Update the expected output of
_GLOBAL__I__Z2fnv.
From-SVN: r72552
|
|
2003-06-26 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/demangle-expected: Add more GNU V3 testcases.
From-SVN: r68540
|
|
PR other/10810
* test-demangle.c (getline): Fix fence-post error.
From-SVN: r67499
|
|
gcc:
* Makefile.in: Remove all references to s-under and underscore.c.
* collect2.c, tlink.c: Change all uses of prepends_underscore
to look directly at USER_LABEL_PREFIX.
gcc/cp:
* Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
* cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
minor adjustments (use version_string, eliminate yet another
duplicate of xmalloc)
libiberty:
* cplus-dem.c: Code code under #ifdef MAIN moved to gcc/cp/cxxfilt.c.
* testsuite/Makefile.in: Adjust for test-demangle.
* testsuite/regress-demangle: Deleted.
* testsuite/test-demangle.c: New file.
* testsuite/demangle-expected: Change \$ to $ throughout, now that
this file is not being read by a shell script.
From-SVN: r57037
|
|
* cp-demangle.c (demangle_identifier): Support extended Unicode
characters.
From-SVN: r55354
|
|
* testsuite/demangle-expected: Add test case for infinite loop in
demangler.
* cplus-dem.c (demangle_arm_hp_template): Stop trying to demangle
if do_type() doesn't make any progress --- prevents an infinite
loop.
From-SVN: r49875
|
|
template parameters.)
2002-02-18 Carlo Wood <carlo@gnu.org>
PR c++/5390
* cplus-dem.c (demangle_integral_value): Accept multi-digit
numbers that do not start with an underscore; This is needed
for integer template parameters. This doesn't break anything
because multi-digit numbers are never followed by a digit.
* testsuite/demangle-expected: Corrected all mangled test
cases with multi-digit template parameters: g++ 2.95.x does
not generate underscores around these parameters.
From-SVN: r49851
|
|
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-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
|
|
2001-12-12 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR other/2719
* cplus-dem.c (consume_count): Treat negative count as an error.
* testsuite/demangle-expected: Added testcase.
From-SVN: r47952
|
|
* 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
|
|
* testsuite/demangle-expected: Add two tests for anonymous
namespaces.
* cplus-dem.c (gnu_special): Handle anonymous namespaces.
From-SVN: r36398
|
|
* testsuite/demangle-expected: Add four tests for type_info
mangling.
* cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
for a non-template non-qualified type_info function or node.
From-SVN: r36301
|
|
2000-08-31 Hans-Peter Nilsson <hp@axis.com>
* testsuite/demangle-expected: Add nine tests for
underscore-after-number followed by five tests for name-signature
delimiter.
2000-07-24 Hans-Peter Nilsson <hp@axis.com>
* cplus-dem.c (work_stuff_copy_to_from): New.
(delete_non_B_K_work_stuff): New.
(delete_work_stuff): New.
(mop_up): Break out work_stuff destruction to delete_work_stuff.
(iterate_demangle_function): New.
(demangle_prefix): Call iterate_demangle_function instead of
demangle_function_name. Leave handling of name-signature
__-delimiters to iterate_demangle_function.
* cplus-dem.c (demangle_integral_value): Strip an optional
following underscore cautiously. Handle negative numbers.
From-SVN: r36086
|
|
* testsuite/regress-demangle (failed test): Show result and
expected output.
From-SVN: r35093
|
|
* cplus-dem.c (INTBUF_SIZE): New macro.
(string_append_template_idx): New function.
(demangle_expression): Likewise.
(demangle_integral_value): Use it.
(demangle_real_value): New function, split out from ...
(demangle_template_value_parm): ... here. Use
string_append_template_idx. Use demangle_real_value.
(demangle_template): Use string_append_template_idx.
(demangle_qualified): Use consume_count_with_underscores.
(get_count): Tweak formatting.
(do_type): Use string_append_template_idx.
From-SVN: r30091
|
|
classes have namespace scope.
* cplus-dem.c (do_type): Handle pointer to member types whose
enclosing classes have namespace scope.
From-SVN: r29901
|
|
* cplus-dem.c (demangle_template_value_parm): Handle
pointers-to-members.
(do_type): Handle template parameters as qualifiers.
From-SVN: r26350
|
|
* testsuite/regress-demangle: New file.
* testsuite/demangle-expected: New file.
* Makefile.in (all, check, installcheck, info, install-info,
clean-info, dvi, install, etags, tags, mostlyclean, clean,
distclean, maintainer-clean, realclean): Depend on corresponding
`-subdir' target.
(all-subdir check-subdir installcheck-subdir info-subdir
install-info-subdir clean-info-subdir dvi-subdir
install-info-subdir etags-subdir mostlyclean-subdir clean-subdir
distclean-subdir maintainer-clean-subdir): New target.
* testsuite/Makefile.in: New file.
* configure: Rebuilt.
* configure.in: Create testsuite/Makefile.
From-SVN: r26205
|