Commit 47503a49 by Richard Biener Committed by Richard Biener

lto-streamer-out.c (DFS::DFS_write_tree_body): Stream DECL_EXTERNALs in BLOCKs as non-references.

2014-08-19  Richard Biener  <rguenther@suse.de>

	* lto-streamer-out.c (DFS::DFS_write_tree_body): Stream
	DECL_EXTERNALs in BLOCKs as non-references.
	* tree-streamer-out.c (streamer_write_chain): Likewise.

From-SVN: r214135
parent 21c924ac
2014-08-19 Richard Biener <rguenther@suse.de>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Stream
DECL_EXTERNALs in BLOCKs as non-references.
* tree-streamer-out.c (streamer_write_chain): Likewise.
2014-08-19 Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Anna Tikhonova <anna.tikhonova@intel.com>
......
......@@ -648,9 +648,13 @@ DFS::DFS_write_tree_body (struct output_block *ob,
if (CODE_CONTAINS_STRUCT (code, TS_BLOCK))
{
for (tree t = BLOCK_VARS (expr); t; t = TREE_CHAIN (t))
/* ??? FIXME. See also streamer_write_chain. */
if (!(VAR_OR_FUNCTION_DECL_P (t)
&& DECL_EXTERNAL (t)))
if (VAR_OR_FUNCTION_DECL_P (t)
&& DECL_EXTERNAL (t))
/* We have to stream externals in the block chain as
non-references. See also
tree-streamer-out.c:streamer_write_chain. */
DFS_write_tree (ob, expr_state, t, ref_p, false, single_p);
else
DFS_follow_tree_edge (t);
DFS_follow_tree_edge (BLOCK_SUPERCONTEXT (expr));
......
......@@ -524,11 +524,11 @@ streamer_write_chain (struct output_block *ob, tree t, bool ref_p)
/* We avoid outputting external vars or functions by reference
to the global decls section as we do not want to have them
enter decl merging. This is, of course, only for the call
for streaming BLOCK_VARS, but other callers are safe. */
/* ??? FIXME wrt SCC streaming. Drop these for now. */
for streaming BLOCK_VARS, but other callers are safe.
See also lto-streamer-out.c:DFS_write_tree_body. */
if (VAR_OR_FUNCTION_DECL_P (t)
&& DECL_EXTERNAL (t))
; /* stream_write_tree_shallow_non_ref (ob, t, ref_p); */
stream_write_tree_shallow_non_ref (ob, t, ref_p);
else
stream_write_tree (ob, t, ref_p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment