tree.c (need_assembler_name_p): Use cgraph_get_node instead of cgraph_node_for_decl.

* tree.c (need_assembler_name_p): Use cgraph_get_node instead
	of cgraph_node_for_decl.
	* cgraph.h (cgraph_node_for_decl): Remove prototype.
	* cgraph.c (cgraph_node_for_decl): Remove.
	(cgraph_get_node): Just return NULL if !cgraph_hash.

From-SVN: r154329
This commit is contained in:
Jakub Jelinek 2009-11-19 14:23:23 +01:00 committed by Jakub Jelinek
parent 1abed66bb0
commit 986ad1338d
4 changed files with 10 additions and 33 deletions

View File

@ -1,3 +1,11 @@
2009-11-19 Jakub Jelinek <jakub@redhat.com>
* tree.c (need_assembler_name_p): Use cgraph_get_node instead
of cgraph_node_for_decl.
* cgraph.h (cgraph_node_for_decl): Remove prototype.
* cgraph.c (cgraph_node_for_decl): Remove.
(cgraph_get_node): Just return NULL if !cgraph_hash.
2009-11-19 Paul Brook <paul@codesourcery.com>
* config.gcc: Add new ARM --with-fpu options.

View File

@ -406,36 +406,6 @@ hash_node (const void *p)
}
/* Return the cgraph node associated with function DECL. If none
exists, return NULL. */
struct cgraph_node *
cgraph_node_for_decl (tree decl)
{
struct cgraph_node *node;
void **slot;
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
node = NULL;
if (cgraph_hash)
{
struct cgraph_node key;
key.decl = decl;
slot = htab_find_slot (cgraph_hash, &key, NO_INSERT);
if (slot && *slot)
{
node = (struct cgraph_node *) *slot;
if (node->same_body_alias)
node = node->same_body;
}
}
return node;
}
/* Returns nonzero if P1 and P2 are equal. */
static int
@ -594,7 +564,7 @@ cgraph_get_node (tree decl)
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
if (!cgraph_hash)
cgraph_hash = htab_create_ggc (10, hash_node, eq_node, NULL);
return NULL;
key.decl = decl;

View File

@ -425,7 +425,6 @@ struct cgraph_node *cgraph_node (tree);
bool cgraph_same_body_alias (tree, tree);
void cgraph_remove_same_body_alias (struct cgraph_node *);
struct cgraph_node *cgraph_node_for_asm (tree);
struct cgraph_node *cgraph_node_for_decl (tree);
struct cgraph_edge *cgraph_edge (struct cgraph_node *, gimple);
void cgraph_set_call_stmt (struct cgraph_edge *, gimple);
void cgraph_set_call_stmt_including_clones (struct cgraph_node *, gimple, gimple);

View File

@ -4289,7 +4289,7 @@ need_assembler_name_p (tree decl)
return false;
/* Functions represented in the callgraph need an assembler name. */
if (cgraph_node_for_decl (decl) != NULL)
if (cgraph_get_node (decl) != NULL)
return true;
/* Unused and not public functions don't need an assembler name. */