aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-out.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-07-11 18:38:27 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-07-11 16:38:27 +0000
commit69e02b35555e214a8f0c4c026d15b8c67584e208 (patch)
tree506a543d4b9fe4b4ca59144e91bd850e8686d4c6 /gcc/tree-streamer-out.c
parentf790df6be014576524f55670a136eb622e595377 (diff)
downloadgcc-69e02b35555e214a8f0c4c026d15b8c67584e208.zip
gcc-69e02b35555e214a8f0c4c026d15b8c67584e208.tar.gz
gcc-69e02b35555e214a8f0c4c026d15b8c67584e208.tar.bz2
lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream DECL_ORIGINAL_TYPE.
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream DECL_ORIGINAL_TYPE. (DFS::DFS_write_tree_body): Drop hack handling local external decls. (hash_tree): Do not walk DECL_ORIGINAL_TYPE. * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers): Do not walk original type. * tree-streamer-out.c (streamer_write_chain): Drop hack handling external decls. (write_ts_decl_non_common_tree_pointers): Do not stream DECL_ORIGINAL_TYPE * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE. (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE. From-SVN: r262560
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r--gcc/tree-streamer-out.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 8b20f0a..ba57b97 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -494,14 +494,10 @@ 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.
- 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);
- else
- stream_write_tree (ob, t, ref_p);
+ enter decl merging. We should not need to do this anymore because
+ free_lang_data removes them from block scopes. */
+ gcc_assert (!VAR_OR_FUNCTION_DECL_P (t) || !DECL_EXTERNAL (t));
+ stream_write_tree (ob, t, ref_p);
t = TREE_CHAIN (t);
}
@@ -617,11 +613,8 @@ write_ts_decl_common_tree_pointers (struct output_block *ob, tree expr,
pointer fields. */
static void
-write_ts_decl_non_common_tree_pointers (struct output_block *ob, tree expr,
- bool ref_p)
+write_ts_decl_non_common_tree_pointers (struct output_block *, tree, bool)
{
- if (TREE_CODE (expr) == TYPE_DECL)
- stream_write_tree (ob, DECL_ORIGINAL_TYPE (expr), ref_p);
}