@@ -2444,8 +2444,7 @@ symbol_table::finalize_compilation_unit (void)
locally scoped symbols. */
struct cgraph_node *cnode;
FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
- if (!decl_function_context (cnode->decl))
- (*debug_hooks->early_global_decl) (cnode->decl);
+ (*debug_hooks->early_global_decl) (cnode->decl);
/* Clean up anything that needs cleaning up after initial debug
generation. */
@@ -18792,6 +18792,18 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
parameters so they can be augmented with location
information later. */
remove_AT (subr_die, DW_AT_declaration);
+
+ /* gen_formal_types_die could have created nameless DIEs for
+ the formal parameters when generating an object's
+ members. Remove if early dumping; they will be shortly
+ recreated correctly. If we're not early dumping, we
+ should've already removed them and should have actual
+ named parameters. */
+ if (early_dwarf_dumping)
+ {
+ remove_AT (subr_die, DW_AT_object_pointer);
+ remove_child_TAG (subr_die, DW_TAG_formal_parameter);
+ }
}
/* Make a specification pointing to the previously built
declaration. */