summaryrefslogtreecommitdiff
path: root/gcc/ipa-ref.h
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-29 18:25:17 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-29 18:25:17 +0000
commit2043dfcce183f27ffe84a339da8b75aec20d3c33 (patch)
tree1448b6640c11838946a37fc6783f028e1f3c26bb /gcc/ipa-ref.h
parent8848375530940e3e32abaf9e3bde2870755d2d34 (diff)
downloadgcc-2043dfcce183f27ffe84a339da8b75aec20d3c33.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-ref.h')
-rw-r--r--gcc/ipa-ref.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h
index e0553bb6609..dc6e238568c 100644
--- a/gcc/ipa-ref.h
+++ b/gcc/ipa-ref.h
@@ -20,9 +20,9 @@ along with GCC; see the file COPYING3. If not see
struct cgraph_node;
struct varpool_node;
-union symtab_node_def;
-typedef union symtab_node_def *symtab_node;
-typedef const union symtab_node_def *const_symtab_node;
+class symtab_node_base;
+typedef symtab_node_base *symtab_node;
+typedef const symtab_node_base *const_symtab_node;
/* How the reference is done. */