diff options
author | Diego Novillo <dnovillo@google.com> | 2008-06-10 18:33:12 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2008-06-10 18:33:12 +0000 |
commit | c98604fa3cd9009c0d99c8cdda05ad3c06b08ca0 (patch) | |
tree | 032d93ce4ed0ca4cd46c810d38f4fb65c897adda | |
parent | b2af22c13f7028b20890ac6efd5b670703f20191 (diff) |
2008-06-10 Diego Novillo <dnovillo@google.com>
* lto-function-out.c (output_type_ref, output_expr_operand,
lto_static_init, output_function): Fix merge problems.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto-streamer@136635 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.lto | 5 | ||||
-rw-r--r-- | gcc/lto-function-out.c | 30 |
2 files changed, 29 insertions, 6 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index 47fdd6912a7..deab6dfe4ce 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,4 +1,9 @@ 2008-06-10 Diego Novillo <dnovillo@google.com> + + * lto-function-out.c (output_type_ref, output_expr_operand, + lto_static_init, output_function): Fix merge problems. + +2008-06-10 Diego Novillo <dnovillo@google.com> Ollie Wild <aaw@google.com> Merge with lto. diff --git a/gcc/lto-function-out.c b/gcc/lto-function-out.c index 3c2e0a50c89..6e240aadbca 100644 --- a/gcc/lto-function-out.c +++ b/gcc/lto-function-out.c @@ -635,7 +635,7 @@ static void output_type_ref (struct output_block *ob, tree node) { LTO_DEBUG_TOKEN ("type_ref"); - lto_output_type_ref_index (ob->decl_state, ob->main_stream, node); + output_type_ref_1 (ob, node); } @@ -1087,8 +1087,17 @@ output_expr_operand (struct output_block *ob, tree expr) case VAR_DECL: if (TREE_STATIC (expr) || DECL_EXTERNAL (expr)) { + /* Static or extern VAR_DECLs. */ + unsigned int index; + bool new; output_record_start (ob, NULL, NULL, LTO_var_decl1); - lto_output_var_decl_index (ob->decl_state, ob->main_stream, expr); + + new = lto_output_decl_index (ob->main_stream, + ob->decl_state->var_decl_hash_table, + &ob->decl_state->next_var_decl_index, + expr, &index); + if (new) + VEC_safe_push (tree, heap, ob->decl_state->var_decls, expr); } else { @@ -1121,8 +1130,18 @@ output_expr_operand (struct output_block *ob, tree expr) break; case NAMESPACE_DECL: - output_record_start (ob, NULL, NULL, tag); - lto_output_namespace_decl_index (ob->decl_state, ob->main_stream, expr); + { + unsigned int index; + bool new; + output_record_start (ob, NULL, NULL, tag); + + new = lto_output_decl_index (ob->main_stream, + ob->decl_state->namespace_decl_hash_table, + &ob->decl_state->next_namespace_decl_index, + expr, &index); + if (new) + VEC_safe_push (tree, heap, ob->decl_state->namespace_decls, expr); + } break; case PARM_DECL: @@ -2139,7 +2158,6 @@ lto_static_init (void) RESET_BIT (lto_types_needed_for, RESX_EXPR); RESET_BIT (lto_types_needed_for, SSA_NAME); RESET_BIT (lto_types_needed_for, VAR_DECL); - RESET_BIT (lto_types_needed_for, RESULT_DECL); RESET_BIT (lto_types_needed_for, TREE_LIST); RESET_BIT (lto_types_needed_for, TREE_VEC); RESET_BIT (lto_types_needed_for, TYPE_DECL); @@ -2262,7 +2280,7 @@ output_function (struct cgraph_node* node) else if (TYPE_P (context)) { output_record_start (ob, NULL, NULL, LTO_type); - lto_output_type_ref_index (ob->decl_state, ob->main_stream, context); + output_type_ref_1 (ob, context); LTO_DEBUG_UNDENT (); } else |