summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-07 21:01:46 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-07 21:01:46 +0000
commita075603c78f6520dcd415bf785bc952da5e25cb0 (patch)
treeed6cecc568776bc8f00902152f345d61a361cfa0 /gcc/lto-streamer-out.c
parent825a7fb9aa8ce23af99bd42fed146b99c65f9d61 (diff)
downloadgcc-a075603c78f6520dcd415bf785bc952da5e25cb0.tar.gz
2010-03-07 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 157264 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@157266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index b5fc3e26c20..f375282beac 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1978,6 +1978,8 @@ output_unreferenced_globals (cgraph_node_set set)
if (TREE_CODE (var) == VAR_DECL)
{
+ struct varpool_node *alias;
+
/* Output the object in order to output references used in the
initialization. */
lto_output_tree (ob, var, true);
@@ -1985,6 +1987,17 @@ output_unreferenced_globals (cgraph_node_set set)
/* If it is public we also need a reference to the object itself. */
if (TREE_PUBLIC (var))
lto_output_tree_ref (ob, var);
+
+ /* Also output any extra_name aliases for this variable. */
+ for (alias = vnode->extra_name; alias; alias = alias->next)
+ {
+ lto_output_tree (ob, alias->decl, true);
+ output_record_start (ob, LTO_var_decl_alias);
+ lto_output_var_decl_index (ob->decl_state, ob->main_stream,
+ alias->decl);
+ lto_output_var_decl_index (ob->decl_state, ob->main_stream,
+ var);
+ }
}
}