From 2c7b50c15c147ee4a34be096ea19501432fe195c Mon Sep 17 00:00:00 2001 From: hubicka Date: Mon, 10 May 2010 16:26:26 +0000 Subject: [PATCH] * lto-stramer-out.c (produce_asm_for_decls): Correct accidentally commited change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159234 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/lto-streamer-out.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4b9a65d099..9fce27e6d7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2010-05-10 Jan Hubicka + * lto-stramer-out.c (produce_asm_for_decls): Correct accidentally commited change. + +2010-05-10 Jan Hubicka + * passes.c (ipa_write_summaries_1, ipa_write_optimization_summaries): Allocate encoders. * lto-section-out.c (lto_new_out_decl_state): Do not allocate it here. diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 86f2c73aac9..ede7c71b5da 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -2505,7 +2505,6 @@ produce_asm_for_decls (cgraph_node_set set, varpool_node_set vset) fn_out_state = VEC_index (lto_out_decl_state_ptr, lto_function_decl_states, idx); lto_output_decl_state_refs (ob, decl_state_stream, fn_out_state); - lto_delete_out_decl_state (fn_out_state); } lto_write_stream (decl_state_stream); free(decl_state_stream); @@ -2522,6 +2521,12 @@ produce_asm_for_decls (cgraph_node_set set, varpool_node_set vset) lto_write_options (); /* Deallocate memory and clean up. */ + for (idx = 0; idx < num_fns; idx++) + { + fn_out_state = + VEC_index (lto_out_decl_state_ptr, lto_function_decl_states, idx); + lto_delete_out_decl_state (fn_out_state); + } lto_cgraph_encoder_delete (ob->decl_state->cgraph_node_encoder); lto_varpool_encoder_delete (ob->decl_state->varpool_node_encoder); VEC_free (lto_out_decl_state_ptr, heap, lto_function_decl_states); -- 2.11.0