]> git.ipfire.org Git - thirdparty/gcc.git/commit
Convert symtab, cgraph and varpool nodes into a real class hierarchy
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 29 Oct 2013 18:25:17 +0000 (18:25 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 29 Oct 2013 18:25:17 +0000 (18:25 +0000)
commita3bfa8b80c84f097b684b5ba7851ceb81642ccd3
tree1448b6640c11838946a37fc6783f028e1f3c26bb
parentc960732f0526add82cdf51879ee1b97c221feb08
Convert symtab, cgraph and varpool nodes into a real class hierarchy

This is the handwritten part of the patch; automated part to follow.

* cgraph.h (symtab_node_base): Convert to a class;
add GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"))), and take
chain_next/prev from symtab_node_def.
(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.

From-SVN: r204170
gcc/ChangeLog
gcc/cgraph.h
gcc/ipa-ref.h
gcc/is-a.h
gcc/symtab.c