OSDN Git Service

* cgraph.c (cgraph_remove_node): Clear the hash table slot.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jul 2003 15:13:35 +0000 (15:13 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jul 2003 15:13:35 +0000 (15:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69562 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraph.c

index 1162471..5aeacaf 100644 (file)
@@ -1,3 +1,7 @@
+Fri Jul 18 17:05:57 CEST 2003  Jan Hubicka  <jh@suse.cz>
+
+       * cgraph.c (cgraph_remove_node): Clear the hash table slot.
+
 2003-07-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/11087
index 5caa6f3..bc53269 100644 (file)
@@ -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.  */
 }