diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-04 11:23:18 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-04 11:23:18 +0000 |
commit | ae52f82e512d7e2439171c2a575ed170c9438e22 (patch) | |
tree | 8bbabc4c74321f88facd411646c5cf2e47605c23 /gcc/tree-streamer-out.c | |
parent | 74275ad386ba7c3a4fb25955179606da56c87caf (diff) | |
download | gcc-ae52f82e512d7e2439171c2a575ed170c9438e22.tar.gz |
2012-10-04 Richard Guenther <rguenther@suse.de>
PR lto/47788
* tree-streamer-out.c (write_ts_block_tree_pointers): For
inlined functions outer scopes write the ultimate origin
as BLOCK_ABSTRACT_ORIGIN and BLOCK_SOURCE_LOCATION.
Do not stream the fragment chains.
* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Likewise.
* dwarf2out.c (gen_subprogram_die): Handle NULL DECL_INITIAL.
(dwarf2out_decl): Always output DECL_ABSTRACT function decls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r-- | gcc/tree-streamer-out.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 63f7a02d587..4fccd7720d2 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -685,21 +685,32 @@ write_ts_exp_tree_pointers (struct output_block *ob, tree expr, bool ref_p) static void write_ts_block_tree_pointers (struct output_block *ob, tree expr, bool ref_p) { - /* Do not stream BLOCK_SOURCE_LOCATION. We cannot handle debug information - for early inlining so drop it on the floor instead of ICEing in - dwarf2out.c. */ streamer_write_chain (ob, BLOCK_VARS (expr), ref_p); + stream_write_tree (ob, BLOCK_SUPERCONTEXT (expr), ref_p); + + /* Stream BLOCK_ABSTRACT_ORIGIN and BLOCK_SOURCE_LOCATION for + the limited cases we can handle - those that represent inlined + function scopes. For the rest them on the floor instead of ICEing in + dwarf2out.c. */ + if (inlined_function_outer_scope_p (expr)) + { + tree ultimate_origin = block_ultimate_origin (expr); + stream_write_tree (ob, ultimate_origin, ref_p); + lto_output_location (ob, BLOCK_SOURCE_LOCATION (expr)); + } + else + { + stream_write_tree (ob, NULL_TREE, ref_p); + lto_output_location (ob, UNKNOWN_LOCATION); + } /* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information - for early inlining so drop it on the floor instead of ICEing in + for early inlined BLOCKs so drop it on the floor instead of ICEing in dwarf2out.c. */ - stream_write_tree (ob, BLOCK_SUPERCONTEXT (expr), ref_p); - /* Do not stream BLOCK_ABSTRACT_ORIGIN. We cannot handle debug information - for early inlining so drop it on the floor instead of ICEing in - dwarf2out.c. */ - stream_write_tree (ob, BLOCK_FRAGMENT_ORIGIN (expr), ref_p); - stream_write_tree (ob, BLOCK_FRAGMENT_CHAIN (expr), ref_p); + /* BLOCK_FRAGMENT_ORIGIN and BLOCK_FRAGMENT_CHAIN is not live at LTO + streaming time. */ + /* Do not output BLOCK_SUBBLOCKS. Instead on streaming-in this list is re-constructed from BLOCK_SUPERCONTEXT. */ } |