Commit f11cd829 by Richard Biener Committed by Richard Biener

passes.c (rest_of_decl_compilation): Guard early_global_decl call with !seen_error ().

2015-08-27  Richard Biener  <rguenther@suse.de>

	* passes.c (rest_of_decl_compilation): Guard early_global_decl
	call with !seen_error ().
	* cgraphunit.c (symbol_table::finalize_compilation_unit): Move
	early debug generation and finish...
	(symbol_table::compile): ... here to put it after a !seen_error ()
	guard.

From-SVN: r227258
parent a98e4e62
2015-08-27 Richard Biener <rguenther@suse.de>
* passes.c (rest_of_decl_compilation): Guard early_global_decl
call with !seen_error ().
* cgraphunit.c (symbol_table::finalize_compilation_unit): Move
early debug generation and finish...
(symbol_table::compile): ... here to put it after a !seen_error ()
guard.
2015-08-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit on
......
......@@ -2314,6 +2314,16 @@ symbol_table::compile (void)
symtab_node::verify_symtab_nodes ();
#endif
/* Emit early debug for reachable functions, and by consequence,
locally scoped symbols. */
struct cgraph_node *cnode;
FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
(*debug_hooks->early_global_decl) (cnode->decl);
/* Clean up anything that needs cleaning up after initial debug
generation. */
(*debug_hooks->early_finish) ();
timevar_push (TV_CGRAPHOPT);
if (pre_ipa_mem_report)
{
......@@ -2482,16 +2492,6 @@ symbol_table::finalize_compilation_unit (void)
/* Gimplify and lower thunks. */
analyze_functions (/*first_time=*/false);
/* Emit early debug for reachable functions, and by consequence,
locally scoped symbols. */
struct cgraph_node *cnode;
FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
(*debug_hooks->early_global_decl) (cnode->decl);
/* Clean up anything that needs cleaning up after initial debug
generation. */
(*debug_hooks->early_finish) ();
/* Finally drive the pass manager. */
compile ();
......
......@@ -318,7 +318,10 @@ rest_of_decl_compilation (tree decl,
&& !decl_function_context (decl)
&& !current_function_decl
&& DECL_SOURCE_LOCATION (decl) != BUILTINS_LOCATION
&& !decl_type_context (decl))
&& !decl_type_context (decl)
/* Avoid confusing the debug information machinery when there are
errors. */
&& !seen_error ())
(*debug_hooks->early_global_decl) (decl);
}
......
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