/* Write the GIMPLE representation to a file stream.
- Copyright 2009 Free Software Foundation, Inc.
+ Copyright 2009, 2010 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
Re-implemented by Diego Novillo <dnovillo@google.com>
if (section_type == LTO_section_function_body)
{
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fn));
- if (name[0] == '*')
- name++;
section_name = lto_get_section_name (section_type, name);
}
else
lto_output_bitpack (ob->main_stream, bp);
bitpack_delete (bp);
+ /* Output current IL state of the function. */
+ output_uleb128 (ob, fn->curr_properties);
+
/* Output the static chain and non-local goto save area. */
lto_output_tree_ref (ob, fn->static_chain_decl);
lto_output_tree_ref (ob, fn->nonlocal_goto_save_area);
{
tree var = vnode->decl;
- if (TREE_CODE (var) == VAR_DECL && TREE_PUBLIC (var))
- lto_output_tree_ref (ob, var);
+ if (TREE_CODE (var) == VAR_DECL)
+ {
+ /* Output the object in order to output references used in the
+ initialization. */
+ lto_output_tree (ob, var, true);
+
+ /* If it is public we also need a reference to the object itself. */
+ if (TREE_PUBLIC (var))
+ lto_output_tree_ref (ob, var);
+ }
}
output_zero (ob);
const char *data;
size_t len;
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (function));
- char *section_name;
+ char *section_name =
+ lto_get_section_name (LTO_section_function_body, name);
size_t i, j;
struct lto_in_decl_state *in_state;
- struct lto_out_decl_state *out_state;
-
- if (name[0] == '*')
- name++;
- section_name =
- lto_get_section_name (LTO_section_function_body, name);
- out_state = lto_get_out_decl_state ();
+ struct lto_out_decl_state *out_state = lto_get_out_decl_state ();
lto_begin_section (section_name, !flag_wpa);
free (section_name);