From bc0fe8cb2a6ed9db82b4380e9d4b1837e97ea526 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 2 May 2011 14:37:13 +0200 Subject: lto-section-in.c (lto_input_1_unsigned): Move to lto-streamer.h * lto-section-in.c (lto_input_1_unsigned): Move to lto-streamer.h (lto_section_overrun): New. * lto-section-out.c (append_block): Rename to ... (lto_append_block): ... this one; export. (lto_output_1_stream): Move lto lto-streamer.h (lto_output_data_stream): Update. * lto-streamer.h (lto_section_overrun, lto_append_block): Declare. (lto_output_1_stream, lto_input_1_unsigned): Turn into inline functions. From-SVN: r173247 --- gcc/lto-section-out.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'gcc/lto-section-out.c') diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c index 0e8949a..234d63e 100644 --- a/gcc/lto-section-out.c +++ b/gcc/lto-section-out.c @@ -194,8 +194,8 @@ lto_write_stream (struct lto_output_stream *obs) /* Adds a new block to output stream OBS. */ -static void -append_block (struct lto_output_stream *obs) +void +lto_append_block (struct lto_output_stream *obs) { struct lto_char_ptr_base *new_block; @@ -234,23 +234,6 @@ append_block (struct lto_output_stream *obs) } -/* Write a character to the output block. */ - -void -lto_output_1_stream (struct lto_output_stream *obs, char c) -{ - /* No space left. */ - if (obs->left_in_block == 0) - append_block (obs); - - /* Write the actual character. */ - *obs->current_pointer = c; - obs->current_pointer++; - obs->total_size++; - obs->left_in_block--; -} - - /* Write raw DATA of length LEN to the output block OB. */ void @@ -263,7 +246,7 @@ lto_output_data_stream (struct lto_output_stream *obs, const void *data, /* No space left. */ if (obs->left_in_block == 0) - append_block (obs); + lto_append_block (obs); /* Determine how many bytes to copy in this loop. */ if (len <= obs->left_in_block) -- cgit v1.1