diff options
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 4970d173455..cbbd40a931c 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1751,7 +1751,7 @@ output_function (struct cgraph_node *node) basic_block bb; struct output_block *ob; - function = node->symbol.decl; + function = node->decl; fn = DECL_STRUCT_FUNCTION (function); ob = create_output_block (LTO_section_function_body); @@ -1910,8 +1910,8 @@ lto_output_toplevel_asms (void) static void copy_function (struct cgraph_node *node) { - tree function = node->symbol.decl; - struct lto_file_decl_data *file_data = node->symbol.lto_file_data; + tree function = node->decl; + struct lto_file_decl_data *file_data = node->lto_file_data; struct lto_output_stream *output_stream = XCNEW (struct lto_output_stream); const char *data; size_t len; @@ -1938,7 +1938,7 @@ copy_function (struct cgraph_node *node) /* Copy decls. */ in_state = - lto_get_function_in_decl_state (node->symbol.lto_file_data, function); + lto_get_function_in_decl_state (node->lto_file_data, function); gcc_assert (in_state); for (i = 0; i < LTO_N_DECL_STREAMS; i++) @@ -1986,21 +1986,21 @@ lto_output (void) cgraph_node *node = dyn_cast <cgraph_node> (snode); if (node && lto_symtab_encoder_encode_body_p (encoder, node) - && !node->symbol.alias) + && !node->alias) { #ifdef ENABLE_CHECKING - gcc_assert (!bitmap_bit_p (output, DECL_UID (node->symbol.decl))); - bitmap_set_bit (output, DECL_UID (node->symbol.decl)); + gcc_assert (!bitmap_bit_p (output, DECL_UID (node->decl))); + bitmap_set_bit (output, DECL_UID (node->decl)); #endif decl_state = lto_new_out_decl_state (); lto_push_out_decl_state (decl_state); - if (gimple_has_body_p (node->symbol.decl) || !flag_wpa) + if (gimple_has_body_p (node->decl) || !flag_wpa) output_function (node); else copy_function (node); gcc_assert (lto_get_out_decl_state () == decl_state); lto_pop_out_decl_state (); - lto_record_function_out_decl_state (node->symbol.decl, decl_state); + lto_record_function_out_decl_state (node->decl, decl_state); } } @@ -2232,10 +2232,10 @@ write_symbol (struct streamer_tree_cache_d *cache, /* When something is defined, it should have node attached. */ gcc_assert (alias || TREE_CODE (t) != VAR_DECL - || varpool_get_node (t)->symbol.definition); + || varpool_get_node (t)->definition); gcc_assert (alias || TREE_CODE (t) != FUNCTION_DECL || (cgraph_get_node (t) - && cgraph_get_node (t)->symbol.definition)); + && cgraph_get_node (t)->definition)); } /* Imitate what default_elf_asm_output_external do. @@ -2299,7 +2299,7 @@ output_symbol_p (symtab_node node) and devirtualization. We do not want to see them in symbol table as references unless they are really used. */ cnode = dyn_cast <cgraph_node> (node); - if (cnode && (!node->symbol.definition || DECL_EXTERNAL (cnode->symbol.decl)) + if (cnode && (!node->definition || DECL_EXTERNAL (cnode->decl)) && cnode->callers) return true; @@ -2307,18 +2307,18 @@ output_symbol_p (symtab_node node) part of the compilation unit until they are used by folding. Some symbols, like references to external construction vtables can not be referred to at all. We decide this at can_refer_decl_in_current_unit_p. */ - if (!node->symbol.definition || DECL_EXTERNAL (node->symbol.decl)) + if (!node->definition || DECL_EXTERNAL (node->decl)) { int i; struct ipa_ref *ref; - for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list, + for (i = 0; ipa_ref_list_referring_iterate (&node->ref_list, i, ref); i++) { if (ref->use == IPA_REF_ALIAS) continue; if (is_a <cgraph_node> (ref->referring)) return true; - if (!DECL_EXTERNAL (ref->referring->symbol.decl)) + if (!DECL_EXTERNAL (ref->referring->decl)) return true; } return false; @@ -2354,18 +2354,18 @@ produce_symtab (struct output_block *ob) { symtab_node node = lsei_node (lsei); - if (!output_symbol_p (node) || DECL_EXTERNAL (node->symbol.decl)) + if (!output_symbol_p (node) || DECL_EXTERNAL (node->decl)) continue; - write_symbol (cache, &stream, node->symbol.decl, seen, false); + write_symbol (cache, &stream, node->decl, seen, false); } for (lsei = lsei_start (encoder); !lsei_end_p (lsei); lsei_next (&lsei)) { symtab_node node = lsei_node (lsei); - if (!output_symbol_p (node) || !DECL_EXTERNAL (node->symbol.decl)) + if (!output_symbol_p (node) || !DECL_EXTERNAL (node->decl)) continue; - write_symbol (cache, &stream, node->symbol.decl, seen, false); + write_symbol (cache, &stream, node->decl, seen, false); } lto_write_stream (&stream); |