diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-11-19 14:23:23 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-11-19 14:23:23 +0100 |
commit | 986ad1338d0634b347cf39619964ceb4d4850713 (patch) | |
tree | 64d2caf2fc302726b3cf6921212ed6a3ca42d7d8 /gcc/cgraph.c | |
parent | 1abed66bb0ea21342637f1fabb382d80daae8287 (diff) | |
download | gcc-986ad1338d0634b347cf39619964ceb4d4850713.zip gcc-986ad1338d0634b347cf39619964ceb4d4850713.tar.gz gcc-986ad1338d0634b347cf39619964ceb4d4850713.tar.bz2 |
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
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 02beae9..3e5b846 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; |