2008-04-28 Ollie Wild <aaw@google.com>
* lto-tags.h (enum LTO_tags): Add LTO_namespace_decl.
* lto-tree-tags.def (LTO_namespace_decl): New tag.
* lto-section-out.c (lto_get_out_decl_state): Initialize
out_state->namespace_decl_hash_table.
(produce_asm_for_decls): Write assembly for namespace declarations.
* lto-section-out.h (struct lto_out_decl_state): Add
namespace_decl_hash_table, next_namespace_decl_index, and
namespace_decls.
* lto-section.h (struct lto_decl_header): Add num_namespace_decls.
* lto-function-out.c (output_expr_operand): Add NAMESPACE_DECL case.
(lto_static_init): Clear lto_flags_needed_for and lto_types_needed_for
entries for NAMESPACE_DECL.
(output_constructors_and_inits): Output initializer if
DECL_CONTEXT (var) is not a FUNCTION_DECL.
* dwarf2out.c (lto_namespacedecl_ref): New function.
* dwarf2out.h (lto_namespacedecl_ref): New function.
2008-04-28 Ollie Wild <aaw@google.com>
* lto.c (lto_read_namespace_DIE): New function.
(lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
NAMESPACE_DECL DIE's.
(lto_resolve_namespacedecl_ref): New function.
* lto.h (lto_resolve_namespacedecl_ref): New function.
* lto-section-in.c (lto_read_decls): Read namespace declarations.
* lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
and num_namespace_decls.
* lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
* lto-lang.c (lto_init_ts): New function.
(LANG_HOOKS_INIT_TS): Set as lto_init_ts.