summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-04 19:59:42 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-04 19:59:42 +0000
commitc40a5c1bcab61ccba2eb00e32f2d808d400aaa27 (patch)
tree419e75c475a0f56792c605edf3b589a11b340fb7 /gcc/lto-streamer-out.c
parent55b15e30ecdf81b8c640da376469a9f92e8d1eb7 (diff)
downloadgcc-c40a5c1bcab61ccba2eb00e32f2d808d400aaa27.tar.gz
gcc/
2013-12-04 Tobias Burnus <burnus@net-b.de> PR debug/37132 * lto-streamer.h (LTO_tags): Add LTO_namelist_decl_ref. * tree.def (NAMELIST_DECL): Add. * tree.h (NAMELIST_DECL_ASSOCIATED_DECL): New macro. * tree.c (initialize_tree_contains_struct): Add asserts for it. * dwarf2out.c (gen_namelist_decl): New function. (gen_decl_die, dwarf2out_decl): Call it. (dwarf2out_imported_module_or_decl_1): Handle NAMELIST_DECL. * lto-streamer-in.c (lto_input_tree_ref): Handle NAMELIST_DECL. (lto_input_tree_ref, lto_input_tree_1): Update lto_tag_check_range call. * lto-streamer-out.c (lto_output_tree_ref): Handle * NAMELIST_DECL. gcc/fortran 2013-12-04 Tobias Burnus <burnus@net-b.de> PR debug/37132 * trans-decl.c (generate_namelist_decl, create_module_nml_decl): New static functions. (gfc_generate_module_vars, generate_local_vars): Call them. (gfc_trans_use_stmts): Handle namelists for debug genertion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 3135f008a22..e99424e28a9 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -54,6 +54,8 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
+static void lto_write_tree (struct output_block*, tree, bool);
+
/* Clear the line info stored in DATA_IN. */
static void
@@ -252,6 +254,21 @@ lto_output_tree_ref (struct output_block *ob, tree expr)
lto_output_type_decl_index (ob->decl_state, ob->main_stream, expr);
break;
+ case NAMELIST_DECL:
+ {
+ unsigned i;
+ tree value, tmp;
+
+ streamer_write_record_start (ob, LTO_namelist_decl_ref);
+ stream_write_tree (ob, DECL_NAME (expr), true);
+ tmp = NAMELIST_DECL_ASSOCIATED_DECL (expr);
+ gcc_assert (tmp != NULL_TREE);
+ streamer_write_uhwi (ob, CONSTRUCTOR_ELTS (tmp)->length());
+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (tmp), i, value)
+ lto_output_var_decl_index (ob->decl_state, ob->main_stream, value);
+ break;
+ }
+
case NAMESPACE_DECL:
streamer_write_record_start (ob, LTO_namespace_decl_ref);
lto_output_namespace_decl_index (ob->decl_state, ob->main_stream, expr);