From 472ca566f917ce9aadb3950b5e65cc212fcbbb0b Mon Sep 17 00:00:00 2001 From: rguenth Date: Fri, 8 Aug 2014 12:55:31 +0000 Subject: 2014-08-08 Richard Biener * lto-streamer.h (struct lto_input_block): Make it a class with a constructor. (LTO_INIT_INPUT_BLOCK, LTO_INIT_INPUT_BLOCK_PTR): Remove. (struct lto_function_header, struct lto_simple_header, struct lto_simple_header_with_strings, struct lto_decl_header, struct lto_function_header): Make a simple inheritance hieararchy. Remove unused fields. (struct lto_asm_header): Remove. * lto-streamer-out.c (produce_asm): Adjust. (lto_output_toplevel_asms): Likewise. (produce_asm_for_decls): Likewise. * lto-section-out.c (lto_destroy_simple_output_block): Likewise. * data-streamer-in.c (string_for_index): Likewise. * ipa-inline-analysis.c (inline_read_section): Likewise. * ipa-prop.c (ipa_prop_read_section): Likewise. (read_replacements_section): Likewise. * lto-cgraph.c (input_cgraph_opt_section): Likewise. * lto-section-in.c (lto_create_simple_input_block): Likewise. (lto_destroy_simple_input_block): Likewise. * lto-streamer-in.c (lto_read_body_or_constructor): Likewise. (lto_input_toplevel_asms): Likewise. lto/ * lto.c (lto_read_decls): Adjust for lto_input_block changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213759 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/lto-section-in.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gcc/lto-section-in.c') diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c index d88776398ba..5623706be3e 100644 --- a/gcc/lto-section-in.c +++ b/gcc/lto-section-in.c @@ -227,19 +227,13 @@ lto_create_simple_input_block (struct lto_file_decl_data *file_data, const struct lto_simple_header * header = (const struct lto_simple_header *) data; - struct lto_input_block* ib_main; int main_offset = sizeof (struct lto_simple_header); if (!data) return NULL; - ib_main = XNEW (struct lto_input_block); - *datar = data; - LTO_INIT_INPUT_BLOCK_PTR (ib_main, data + main_offset, - 0, header->main_size); - - return ib_main; + return new lto_input_block (data + main_offset, header->main_size); } @@ -255,7 +249,7 @@ lto_destroy_simple_input_block (struct lto_file_decl_data *file_data, struct lto_input_block *ib, const char *data, size_t len) { - free (ib); + delete ib; lto_free_section_data (file_data, section_type, NULL, data, len); } -- cgit v1.2.1