summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-12 16:21:59 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-12 16:21:59 +0000
commit22671757edfaba8b55165cda544c997b1f0f60fb (patch)
treefc25b09495438c43fe8c72dd5a37344a2338dc1a /gcc/cgraphunit.c
parentd405c5a4ca7973b1fef5ce1d15ee058781e684a6 (diff)
downloadgcc-22671757edfaba8b55165cda544c997b1f0f60fb.tar.gz
* cgraph.h (varpool_node_name): Declare.
* cgraphunit.c (process_function_and_variable_attributes): Set force_output flag on used variables. * ipa.c (function_and_variable_visibility): Dump externally visible and needed variables. * varpool.c (varpool_node_name): Export. (decide_is_variable_needed): Check COMDAT for externally visible vars; ignore needed flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 7105e59c5ec..377e4353fdb 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -884,6 +884,7 @@ process_function_and_variable_attributes (struct cgraph_node *first,
if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
{
mark_decl_referenced (decl);
+ vnode->force_output = true;
if (vnode->finalized)
varpool_mark_needed_node (vnode);
}