On 10/28/13 20:57, David Malcolm wrote:
        * cgraph.h (symtab_node_base): Convert to a class;
        add GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"))).
        (cgraph_node): Inherit from symtab_node; add GTY option
        tag ("SYMTAB_FUNCTION").
        (varpool_node): Inherit from symtab_node; add GTY option
        tag ("SYMTAB_VARIABLE").
        (symtab_node_def): Remove.
        (is_a_helper <cgraph_node>::test (symtab_node_def *)): Convert to...
        (is_a_helper <cgraph_node>::test (symtab_node_base *)): ...this.
        (is_a_helper <varpool_node>::test (symtab_node_def *)): Convert to...
        (is_a_helper <varpool_node>::test (symtab_node_base *)): ...this.

        * ipa-ref.h (symtab_node_def): Drop.
        (symtab_node): Change underlying type from symtab_node_def to
        symtab_node_base.
        (const_symtab_node): Likwise.

        * is-a.h: Update examples in comment.

        * symtab.c (symtab_hash): Change symtab_node_def to symtab_node_base.
        (assembler_name_hash): Likewise.

This patch is OK.  Thanks for working on this!

These symtab changes were dependent on having gengtype support for
inheritance, which is now in trunk, so I'm now revisiting these patches.

The above patch hasn't bitrotted, though the autogenerated one that goes
with it needed regenerating.

A new version of the autogenerated patch can be seen at:
http://dmalcolm.fedorapeople.org/gcc/large-patches/eaba9669644c84592ea32be2dcd19ba92beca381-0003-Autogenerated-fixes-of-symbol.-to.patch
Is that new patch OK?  (it's 450KB so one's eyes tend to glaze over
after a while, but FWIW you approved an earlier version of that in:
   http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00730.html
and the test suite for the script that generated the patch can be seen
at:
https://github.com/davidmalcolm/gcc-refactoring-scripts/blob/master/test_refactor_symtab.py
 )
Given it's already approved and hasn't changed in any substantial way, it's OK for the trunk once you get through the bootstrap and regression testing.

jeff


Reply via email to