aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-07-18 17:13:35 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-07-18 15:13:35 +0000
commit2ee1067b6b1d31e76dacf4cf966c6c51e8a52770 (patch)
treecda6ff30ff20bbbd39a5007dd50f86a19448319d /gcc/cgraph.c
parent580e7bf3a863908c39a9211d6eeb5b6ac7a2e446 (diff)
downloadgcc-2ee1067b6b1d31e76dacf4cf966c6c51e8a52770.zip
gcc-2ee1067b6b1d31e76dacf4cf966c6c51e8a52770.tar.gz
gcc-2ee1067b6b1d31e76dacf4cf966c6c51e8a52770.tar.bz2
* cgraph.c (cgraph_remove_node): Clear the hash table slot.
From-SVN: r69562
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 5caa6f3..bc53269 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -204,6 +204,7 @@ cgraph_remove_edge (struct cgraph_node *caller, struct cgraph_node *callee)
void
cgraph_remove_node (struct cgraph_node *node)
{
+ void **slot;
while (node->callers)
cgraph_remove_edge (node->callers->caller, node);
while (node->callees)
@@ -225,6 +226,11 @@ cgraph_remove_node (struct cgraph_node *node)
if (node->next)
node->next->previous = node->previous;
DECL_SAVED_TREE (node->decl) = NULL;
+ slot =
+ htab_find_slot_with_hash (cgraph_hash, DECL_ASSEMBLER_NAME (node->decl),
+ IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME
+ (node->decl)), 1);
+ htab_clear_slot (cgraph_hash, slot);
/* Do not free the structure itself so the walk over chain can continue. */
}