summaryrefslogtreecommitdiff
path: root/gcc/lto-opts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-07-30 12:14:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-07-30 12:14:58 +0000
commitf6bcdb5e058773874be9c63386cdbc3b9ff1581e (patch)
tree17ed7ba165f1d2672b9045df3792853564446f62 /gcc/lto-opts.c
parent93a87598b928f58f9e467bea8c718c5e2c91e498 (diff)
lto-streamer.h (lto_write_data): New function.
2014-07-30 Richard Biener <rguenther@suse.de> * lto-streamer.h (lto_write_data): New function. * langhooks.c (lhd_append_data): Do not free block. * lto-section-out.c (lto_write_data): New function writing raw data to the current section. (lto_write_stream): Adjust for langhook semantic change. (lto_destroy_simple_output_block): Write header directly. * lto-opts.c (lto_write_options): Write options directly. * lto-streamer-out.c (produce_asm): Write heaeder directly. (lto_output_toplevel_asms): Likewise. (copy_function_or_variable): Copy data directly. (write_global_references): Output index table directly. (lto_output_decl_state_refs): Likewise. (write_symbol): Write data directly. (produce_symtab): Adjust. (produce_asm_for_decls): Output header and refs directly. lto/ * lto-object.c (lto_obj_append_data): Do not free block. From-SVN: r213253
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r--gcc/lto-opts.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c
index 06796d62a3e..986fb971071 100644
--- a/gcc/lto-opts.c
+++ b/gcc/lto-opts.c
@@ -67,7 +67,6 @@ append_to_collect_gcc_options (struct obstack *ob,
void
lto_write_options (void)
{
- struct lto_output_stream stream;
char *section_name;
struct obstack temporary_obstack;
unsigned int i, j;
@@ -76,7 +75,6 @@ lto_write_options (void)
section_name = lto_get_section_name (LTO_section_opts, NULL, NULL);
lto_begin_section (section_name, false);
- memset (&stream, 0, sizeof (stream));
obstack_init (&temporary_obstack);
@@ -170,9 +168,7 @@ lto_write_options (void)
}
obstack_grow (&temporary_obstack, "\0", 1);
args = XOBFINISH (&temporary_obstack, char *);
- lto_output_data_stream (&stream, args, strlen (args) + 1);
-
- lto_write_stream (&stream);
+ lto_write_data (args, strlen (args) + 1);
lto_end_section ();
obstack_free (&temporary_obstack, NULL);