> This patch is the handwritten part of the conversion of these types > to C++; it requires the followup patch, which is autogenerated. > > It converts: > struct symtab_node_base > to: > class symtab_node_base > > and converts: > struct cgraph_node > to: > struct cgraph_node : public symtab_node_base > and: > struct varpool_node > to: > class varpool_node : public symtab_node_base > > dropping the symtab_node_def union.
Yep, incrementally we should continue with the grand renaming retiring symtab_node_base and getting things symmetric. > > * 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! Honza