aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-11-19 14:23:23 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-11-19 14:23:23 +0100
commit986ad1338d0634b347cf39619964ceb4d4850713 (patch)
tree64d2caf2fc302726b3cf6921212ed6a3ca42d7d8 /gcc
parent1abed66bb0ea21342637f1fabb382d80daae8287 (diff)
downloadgcc-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')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/cgraph.c32
-rw-r--r--gcc/cgraph.h1
-rw-r--r--gcc/tree.c2
4 files changed, 10 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0521114..dec2c34 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
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;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 02c087d..e09a858 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -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);
diff --git a/gcc/tree.c b/gcc/tree.c
index 3bfb527..df24eb4 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -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. */