diff options
author | Jan Hubicka <jh@suse.cz> | 2010-05-12 15:49:34 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-05-12 13:49:34 +0000 |
commit | b34fd25c83e4a098405b5d520a260fb3ac32b14e (patch) | |
tree | 8ecab4363a29f5b524dad95f3f7d8676be43b1c6 /gcc/lto-symtab.c | |
parent | 49f19b1cfcccac7b821d14db46afeb323f56a87d (diff) | |
download | gcc-b34fd25c83e4a098405b5d520a260fb3ac32b14e.tar.gz |
cgraph.h (struct varpool_node): Add aux.
* cgraph.h (struct varpool_node): Add aux.
* varasm.c (find_decl_and_mark_needed): Force output of varpool nodes.
* varpool.c (varpool_remove_node): Do not remove initializer.
(varpool_reset_queue): Export.
(varpool_finalize_decl): Volatile vars are forced to be output.
* lto-symtab.c (lto_varpool_replace_node): Clear out initializer of
replaced decl.
* ipa.c (enqueue_cgraph_node, enqueue_varpool_node,
process_references, varpool_can_remove_if_no_refs): New functions.
(cgraph_remove_unreachable_nodes): Handle variables too.
From-SVN: r159321
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r-- | gcc/lto-symtab.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index f8349cf763f..f8a244cbeec 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -291,6 +291,9 @@ lto_varpool_replace_node (struct varpool_node *vnode, prevailing_node = prevailing_node->extra_name; ipa_clone_refering (NULL, prevailing_node, &vnode->ref_list); + /* Be sure we can garbage collect the initializer. */ + if (DECL_INITIAL (vnode->decl)) + DECL_INITIAL (vnode->decl) = error_mark_node; /* Finally remove the replaced node. */ varpool_remove_node (vnode); } |