ipa-reference.c (varpool_removal_hook, [...]): Fix previous patch.
authorJan Hubicka <hubicka@ucw.cz>
Wed, 23 Oct 2019 19:03:42 +0000 (21:03 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 23 Oct 2019 19:03:42 +0000 (19:03 +0000)
* ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix
previous patch.

From-SVN: r277347

gcc/ChangeLog
gcc/ipa-reference.c

index d68bc8a5524bd5179ac54f6e69ac95d540a902d1..d6c0c9ec6ee06cc5ded62cfcaf121706ce483acd 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-23  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix
+       previous patch.
+
 2019-10-23  Jan Hubicka  <hubicka@ucw.cz>
 
        * lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar.
index 1e35438bdd850e677eabe842ed649d80fcfc5f87..87d583fff0fc1e8c5804c0324ca17cceeaa6087d 100644 (file)
@@ -436,9 +436,7 @@ propagate_bits (ipa_reference_global_vars_info_t x_global, struct cgraph_node *x
 static void
 varpool_removal_hook (varpool_node *node, void *)
 {
-  int *id = ipa_reference_vars_map->get (node->decl)
-  if (id)
-    ipa_reference_vars_map->remove (*id);
+  ipa_reference_vars_map->remove (node->decl);
 }
 
 static bool ipa_init_p = false;
@@ -1291,7 +1289,7 @@ ipa_reference_c_finalize (void)
       ipa_ref_opt_sum_summaries = NULL;
       delete ipa_reference_vars_map;
       ipa_reference_vars_map = NULL;
-      symtab->remove_varpool_removal_hook (varpool_node_hooks)
+      symtab->remove_varpool_removal_hook (varpool_node_hooks);
     }
 
   if (ipa_init_p)