Re: [patch] libiberty: demangle_component for `global {constructors,destructors} keyed to'

Ian Lance Taylor
2009-07-14T14:34:29Z

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> include/
> 2009-07-11 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-11 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.
> + dc = d_make_comp (&di, type == DCT_GLOBAL_CTORS
> + ? DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS
> + : DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS,
> + d_make_name (&di, d_str (&di), strlen (d_str (&di))),
> + NULL);

Format as

dc = d_make_comp (&di,
(type == DCT_GLOBAL_CTORS
? DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS
: DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS),
d_make_name (&di, d_str (&di), strlen (d_str (&di))),
NULL);

This is OK with that change.

I assume you ran the libiberty testsuite.

Thanks.

Ian