Commit 9de41e57 by Aldy Hernandez

Revert incorrect merging of debug-early branch.

From-SVN: r214914
parent c5a36850
......@@ -10308,10 +10308,7 @@ c_write_global_declarations_1 (tree globals)
while (reconsider);
for (decl = globals; decl; decl = DECL_CHAIN (decl))
{
check_global_declaration_1 (decl);
debug_hooks->global_decl (decl, /*early=*/true);
}
check_global_declaration_1 (decl);
}
/* A subroutine of c_write_global_declarations Emit debug information for each
......@@ -10323,7 +10320,7 @@ c_write_global_declarations_2 (tree globals)
tree decl;
for (decl = globals; decl ; decl = DECL_CHAIN (decl))
debug_hooks->global_decl (decl, /*early=*/false);
debug_hooks->global_decl (decl);
}
/* Callback to collect a source_ref from a DECL. */
......
......@@ -3859,7 +3859,7 @@ do_namespace_alias (tree alias, tree name_space)
/* Emit debug info for namespace alias. */
if (!building_stmt_list_p ())
(*debug_hooks->global_decl) (alias, /*early=*/false);
(*debug_hooks->global_decl) (alias);
}
/* Like pushdecl, only it places X in the current namespace,
......
......@@ -325,7 +325,7 @@ static int dbxout_symbol_location (tree, tree, const char *, rtx);
static void dbxout_symbol_name (tree, const char *, int);
static void dbxout_common_name (tree, const char *, stab_code_type);
static const char *dbxout_common_check (tree, int *);
static void dbxout_global_decl (tree, bool);
static void dbxout_global_decl (tree);
static void dbxout_type_decl (tree, int);
static void dbxout_handle_pch (unsigned);
static void debug_free_queue (void);
......@@ -1320,7 +1320,7 @@ dbxout_function_decl (tree decl)
/* Debug information for a global DECL. Called from toplev.c after
compilation proper has finished. */
static void
dbxout_global_decl (tree decl, bool early ATTRIBUTE_UNUSED)
dbxout_global_decl (tree decl)
{
if (TREE_CODE (decl) == VAR_DECL && !DECL_EXTERNAL (decl))
{
......
......@@ -43,7 +43,7 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
debug_nothing_tree, /* begin_function */
debug_nothing_int, /* end_function */
debug_nothing_tree, /* function_decl */
debug_nothing_tree_bool, /* global_decl */
debug_nothing_tree, /* global_decl */
debug_nothing_tree_int, /* type_decl */
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
......@@ -71,12 +71,6 @@ debug_nothing_tree (tree decl ATTRIBUTE_UNUSED)
}
void
debug_nothing_tree_bool (tree decl ATTRIBUTE_UNUSED,
bool early ATTRIBUTE_UNUSED)
{
}
void
debug_nothing_tree_tree (tree t1 ATTRIBUTE_UNUSED,
tree t2 ATTRIBUTE_UNUSED)
{
......
......@@ -93,11 +93,8 @@ struct gcc_debug_hooks
void (* function_decl) (tree decl);
/* Debug information for a global DECL. Called from toplev.c after
compilation proper has finished. EARLY is true if global_decl()
is being called early on in the compilation process (i.e., before
cgraph information is available and before code is
generated). */
void (* global_decl) (tree decl, bool early);
compilation proper has finished. */
void (* global_decl) (tree decl);
/* Debug information for a type DECL. Called from toplev.c after
compilation proper, also from various language front ends to
......@@ -159,7 +156,6 @@ extern void debug_nothing_int_charstar_int_bool (unsigned int, const char *,
extern void debug_nothing_int (unsigned int);
extern void debug_nothing_int_int (unsigned int, unsigned int);
extern void debug_nothing_tree (tree);
extern void debug_nothing_tree_bool (tree, bool);
extern void debug_nothing_tree_tree (tree, tree);
extern void debug_nothing_tree_int (tree, int);
extern void debug_nothing_tree_tree_tree_bool (tree, tree, tree, bool);
......@@ -191,8 +187,6 @@ extern void dwarf2out_switch_text_section (void);
const char *remap_debug_filename (const char *);
void add_debug_prefix_map (const char *);
extern void dwarf2out_early_decl (tree);
/* For -fdump-go-spec. */
extern const struct gcc_debug_hooks *
......
......@@ -4693,7 +4693,7 @@ gfc_emit_parameter_debug_info (gfc_symbol *sym)
TREE_TYPE (decl),
sym->attr.dimension,
false, false);
debug_hooks->global_decl (decl, /*early=*/false);
debug_hooks->global_decl (decl);
}
......
......@@ -496,9 +496,9 @@ go_function_decl (tree decl)
/* A global variable decl. */
static void
go_global_decl (tree decl, bool early)
go_global_decl (tree decl)
{
real_debug_hooks->global_decl (decl, early);
real_debug_hooks->global_decl (decl);
go_decl (decl);
}
......
......@@ -1093,7 +1093,7 @@ lto_write_globals (void)
varpool_node *vnode;
FOR_EACH_DEFINED_VARIABLE (vnode)
if (!decl_function_context (vnode->decl))
debug_hooks->global_decl (vnode->decl, /*early=*/false);
debug_hooks->global_decl (vnode->decl);
}
static tree
......
......@@ -119,7 +119,7 @@ static void sdbout_begin_block (unsigned int, unsigned int);
static void sdbout_end_block (unsigned int, unsigned int);
static void sdbout_source_line (unsigned int, const char *, int, bool);
static void sdbout_end_epilogue (unsigned int, const char *);
static void sdbout_global_decl (tree, bool);
static void sdbout_global_decl (tree);
static void sdbout_begin_prologue (unsigned int, const char *);
static void sdbout_end_prologue (unsigned int, const char *);
static void sdbout_begin_function (tree);
......@@ -142,6 +142,7 @@ static void sdbout_field_types (tree);
static void sdbout_one_type (tree);
static void sdbout_parms (tree);
static void sdbout_reg_parms (tree);
static void sdbout_global_decl (tree);
/* Random macros describing parts of SDB data. */
......@@ -1421,7 +1422,7 @@ sdbout_reg_parms (tree parms)
after compilation proper has finished. */
static void
sdbout_global_decl (tree decl, bool early ATTRIBUTE_UNUSED)
sdbout_global_decl (tree decl)
{
if (TREE_CODE (decl) == VAR_DECL
&& !DECL_EXTERNAL (decl)
......
......@@ -532,7 +532,7 @@ emit_debug_global_declarations (tree *vec, int len)
timevar_push (TV_SYMOUT);
for (i = 0; i < len; i++)
debug_hooks->global_decl (vec[i], /*early=*/false);
debug_hooks->global_decl (vec[i]);
timevar_pop (TV_SYMOUT);
}
......
......@@ -5032,10 +5032,6 @@ free_lang_data_in_decl (tree decl)
{
gcc_assert (DECL_P (decl));
/* Early dumping of DECLs before we lose language data. */
if (debug_info_level > DINFO_LEVEL_NONE)
dwarf2out_early_decl (decl);
/* Give the FE a chance to remove its own data first. */
lang_hooks.free_lang_data (decl);
......@@ -5634,7 +5630,8 @@ free_lang_data (void)
unsigned i;
/* If we are the LTO frontend we have freed lang-specific data already. */
if (in_lto_p)
if (in_lto_p
|| !flag_generate_lto)
return 0;
/* Allocate and assign alias sets to the standard integer types
......
......@@ -163,7 +163,7 @@ static void vmsdbgout_begin_epilogue (unsigned int, const char *);
static void vmsdbgout_end_epilogue (unsigned int, const char *);
static void vmsdbgout_begin_function (tree);
static void vmsdbgout_decl (tree);
static void vmsdbgout_global_decl (tree, bool);
static void vmsdbgout_global_decl (tree);
static void vmsdbgout_type_decl (tree, int);
static void vmsdbgout_abstract_function (tree);
......@@ -1510,10 +1510,10 @@ vmsdbgout_decl (tree decl)
/* Not implemented in VMS Debug. */
static void
vmsdbgout_global_decl (tree decl, bool early)
vmsdbgout_global_decl (tree decl)
{
if (write_symbols == VMS_AND_DWARF2_DEBUG)
(*dwarf2_debug_hooks.global_decl) (decl, early);
(*dwarf2_debug_hooks.global_decl) (decl);
}
/* Not implemented in VMS Debug. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment