aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2007-11-02 07:12:30 -0400
committerDiego Novillo <dnovillo@gcc.gnu.org>2007-11-02 07:12:30 -0400
commitc4e622b658b4cdf6cf75c783aade44f53ce0b4b6 (patch)
treec14fee97147f36fd4337182298671d592eaed5cb /gcc
parentef3b7b176100495d541b40439b1f3b9e672d071d (diff)
downloadgcc-c4e622b658b4cdf6cf75c783aade44f53ce0b4b6.zip
gcc-c4e622b658b4cdf6cf75c783aade44f53ce0b4b6.tar.gz
gcc-c4e622b658b4cdf6cf75c783aade44f53ce0b4b6.tar.bz2
langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR.
* langhooks.h (struct lang_hooks_for_callgraph): Remove third argument from function pointer ANALYZE_EXPR. Update all users. * cgraph.c (debug_cgraph_node): New. (debug_cgraph): New. From-SVN: r129845
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/cgraph.c27
-rw-r--r--gcc/cgraph.h2
-rw-r--r--gcc/cgraphbuild.c7
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/decl2.c3
-rw-r--r--gcc/langhooks-def.h2
-rw-r--r--gcc/langhooks.c3
-rw-r--r--gcc/langhooks.h4
9 files changed, 44 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d164186..af719e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-02 Diego Novillo <dnovillo@google.com>
+
+ * langhooks.h (struct lang_hooks_for_callgraph): Remove third
+ argument from function pointer ANALYZE_EXPR. Update all
+ users.
+ * cgraph.c (debug_cgraph_node): New.
+ (debug_cgraph): New.
+
2007-11-02 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/33648
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index e8ceb13..8c7bc5d 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -657,7 +657,9 @@ cgraph_node_name (struct cgraph_node *node)
const char * const cgraph_availability_names[] =
{"unset", "not_available", "overwrittable", "available", "local"};
-/* Dump given cgraph node. */
+
+/* Dump call graph node NODE to file F. */
+
void
dump_cgraph_node (FILE *f, struct cgraph_node *node)
{
@@ -742,7 +744,17 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, "\n");
}
-/* Dump the callgraph. */
+
+/* Dump call graph node NODE to stderr. */
+
+void
+debug_cgraph_node (struct cgraph_node *node)
+{
+ dump_cgraph_node (stderr, node);
+}
+
+
+/* Dump the callgraph to file F. */
void
dump_cgraph (FILE *f)
@@ -754,7 +766,18 @@ dump_cgraph (FILE *f)
dump_cgraph_node (f, node);
}
+
+/* Dump the call graph to stderr. */
+
+void
+debug_cgraph (void)
+{
+ dump_cgraph (stderr);
+}
+
+
/* Set the DECL_ASSEMBLER_NAME and update cgraph hashtables. */
+
void
change_decl_assembler_name (tree decl, tree name)
{
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 2d6d7c9..baed1a6 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -288,7 +288,9 @@ extern GTY(()) int cgraph_order;
/* In cgraph.c */
void dump_cgraph (FILE *);
+void debug_cgraph (void);
void dump_cgraph_node (FILE *, struct cgraph_node *);
+void debug_cgraph_node (struct cgraph_node *);
void cgraph_insert_node_to_hashtable (struct cgraph_node *node);
void cgraph_remove_edge (struct cgraph_edge *);
void cgraph_remove_node (struct cgraph_node *);
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 1e3e5da..2f8d3b0 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
Called via walk_tree: TP is pointer to tree to be examined. */
static tree
-record_reference (tree *tp, int *walk_subtrees, void *data)
+record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
tree t = *tp;
@@ -46,8 +46,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data)
{
varpool_mark_needed_node (varpool_node (t));
if (lang_hooks.callgraph.analyze_expr)
- return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees,
- data);
+ return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees);
}
break;
@@ -73,7 +72,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data)
}
if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE)
- return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees, data);
+ return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees);
break;
}
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index f57f2f9..8fad915 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4303,7 +4303,7 @@ extern tree cp_build_parm_decl (tree, tree);
extern tree get_guard (tree);
extern tree get_guard_cond (tree);
extern tree set_guard (tree);
-extern tree cxx_callgraph_analyze_expr (tree *, int *, tree);
+extern tree cxx_callgraph_analyze_expr (tree *, int *);
extern void mark_needed (tree);
extern bool decl_needed_p (tree);
extern void note_vague_linkage_fn (tree);
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index db0d9f3..ddc8999 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3026,8 +3026,7 @@ generate_ctor_and_dtor_functions_for_priority (splay_tree_node n, void * data)
Here we must deal with member pointers. */
tree
-cxx_callgraph_analyze_expr (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
- tree from ATTRIBUTE_UNUSED)
+cxx_callgraph_analyze_expr (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED)
{
tree t = *tp;
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index e0bfb67..f55292c 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -69,7 +69,7 @@ extern tree lhd_builtin_function (tree decl);
/* Declarations of default tree inlining hooks. */
extern void lhd_initialize_diagnostics (struct diagnostic_context *);
-extern tree lhd_callgraph_analyze_expr (tree *, int *, tree);
+extern tree lhd_callgraph_analyze_expr (tree *, int *);
/* Declarations for tree gimplification hooks. */
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 6a9a74d..c565daa 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -486,8 +486,7 @@ lhd_print_error_function (diagnostic_context *context, const char *file,
tree
lhd_callgraph_analyze_expr (tree *tp ATTRIBUTE_UNUSED,
- int *walk_subtrees ATTRIBUTE_UNUSED,
- tree decl ATTRIBUTE_UNUSED)
+ int *walk_subtrees ATTRIBUTE_UNUSED)
{
return NULL;
}
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 0efb139..23ecb90 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -43,9 +43,9 @@ struct lang_hooks_for_callgraph
{
/* The node passed is a language-specific tree node. If its contents
are relevant to use of other declarations, mark them. */
- tree (*analyze_expr) (tree *, int *, tree);
+ tree (*analyze_expr) (tree *, int *);
- /* Emmit thunks associated to function. */
+ /* Emit thunks associated to function. */
void (*emit_associated_thunks) (tree);
};