summaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-out.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-15 14:22:37 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-15 14:22:37 +0000
commit07de37ab2d16376cb96b93ad7a7b26fa71905055 (patch)
tree29792e758bcfc639546baec2d11f930c80e0612b /gcc/tree-streamer-out.c
parent017f22df20c4581f644b66af1639fdd7317e3578 (diff)
downloadgcc-07de37ab2d16376cb96b93ad7a7b26fa71905055.tar.gz
2012-10-15 Richard Biener <rguenther@suse.de>
* data-streamer.h (bp_pack_string_with_length): New function. (bp_pack_string): Likewise. (bp_unpack_indexed_string): Likewise. (bp_unpack_string): Likewise. * data-streamer-out.c (bp_pack_string_with_length): Likewise. (bp_pack_string): Likewise. * data-streamer-in.c (bp_unpack_indexed_string): Likewise. (bp_unpack_string): Likewise. * tree-streamer-out.c (pack_ts_translation_unit_decl_value_fields): Pack TRANSLATION_UNIT_LANGUAGE here, not ... (write_ts_translation_unit_decl_tree_pointers): ... here. Remove. (streamer_pack_tree_bitfields): Adjust. (streamer_write_tree_body): Likewise. * tree-streamer-in.c (unpack_ts_translation_unit_decl_value_fields): Unpack TRANSLATION_UNIT_LANGUAGE here, not ... (lto_input_ts_translation_unit_decl_tree_pointers): ... here. Remove. (unpack_value_fields): Adjust. (streamer_read_tree_body): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192460 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r--gcc/tree-streamer-out.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index cb2ccf47a46..dcde16951d9 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -316,8 +316,10 @@ pack_ts_block_value_fields (struct output_block *ob,
of expression EXPR into bitpack BP. */
static void
-pack_ts_translation_unit_decl_value_fields (struct bitpack_d *bp ATTRIBUTE_UNUSED, tree expr ATTRIBUTE_UNUSED)
+pack_ts_translation_unit_decl_value_fields (struct output_block *ob,
+ struct bitpack_d *bp, tree expr)
{
+ bp_pack_string (ob, bp, TRANSLATION_UNIT_LANGUAGE (expr), true);
}
/* Pack a TS_TARGET_OPTION tree in EXPR to BP. */
@@ -402,7 +404,7 @@ streamer_pack_tree_bitfields (struct output_block *ob,
pack_ts_block_value_fields (ob, bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TRANSLATION_UNIT_DECL))
- pack_ts_translation_unit_decl_value_fields (bp, expr);
+ pack_ts_translation_unit_decl_value_fields (ob, bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION))
pack_ts_target_option (bp, expr);
@@ -819,16 +821,6 @@ write_ts_constructor_tree_pointers (struct output_block *ob, tree expr,
}
}
-/* Write a TS_TRANSLATION_UNIT_DECL tree in EXPR to OB. */
-
-static void
-write_ts_translation_unit_decl_tree_pointers (struct output_block *ob,
- tree expr)
-{
- streamer_write_string (ob, ob->main_stream,
- TRANSLATION_UNIT_LANGUAGE (expr), true);
-}
-
/* Write all pointer fields in EXPR to output block OB. If REF_P is true,
the leaves of EXPR are emitted as references. */
@@ -889,9 +881,6 @@ streamer_write_tree_body (struct output_block *ob, tree expr, bool ref_p)
if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR))
write_ts_constructor_tree_pointers (ob, expr, ref_p);
-
- if (CODE_CONTAINS_STRUCT (code, TS_TRANSLATION_UNIT_DECL))
- write_ts_translation_unit_decl_tree_pointers (ob, expr);
}