This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libiberty patch] Add demangler support for cloned function symbols (PR 40831)


PR 40831 complains that the demangler does not work with the symbols
generated by gcc when it clones a function. This patch adds support
for the ".clone.n" style previously used by gcc, and the ".isra.n",
".constprop.n", and ".part.n" styles currently used. (Are there any
others?)

Comments?

-cary


include/ChangeLog:

        PR 40831
        * demangle.h (enum demangle_component_type): Add
        DEMANGLE_COMPONENT_CLONE, DEMANGLE_COMPONENT_CONSTPROP_CLONE,
        DEMANGLE_COMPONENT_ISRA_CLONE, DEMANGLE_COMPONENT_PART_CLONE.

libiberty/ChangeLog:

        PR 40831
        * cp-demangle.c (struct clone_suffix_list): New type.
        (d_make_comp): Add new component types.
        (cplus_demangle_mangled_name): Check for clone suffixes.
        (d_parmlist): Don't error out if we see '.'.
        (clone_suffixes): New array.
        (d_clone_suffix): New function.
        (d_print_comp): Print info for clone suffixes.
        * testsuite/demangle-expected: Add new testcases.

Attachment: libiberty-clone-dmgl-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]