mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 09:44:57 +08:00
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:
parent
1abed66bb0
commit
986ad1338d
@ -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.
|
||||
|
32
gcc/cgraph.c
32
gcc/cgraph.c
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user