diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-19 13:23:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-19 13:23:23 +0000 |
commit | 3808c1b8f13faa146aa233f4d9218cc0dbc11e15 (patch) | |
tree | 64d2caf2fc302726b3cf6921212ed6a3ca42d7d8 /gcc/cgraph.c | |
parent | 639cb7b789a54bf78d6ae5e2644450f5eb1837a6 (diff) | |
download | gcc-3808c1b8f13faa146aa233f4d9218cc0dbc11e15.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 02beae92469..3e5b8466d8c 100644 --- a/gcc/cgraph.c +++ b/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; |