From 3baf459d85855934a326ef7e6a4dc4de3f3c8056 Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Sun, 19 Apr 2009 13:52:03 -0400 Subject: toplev.c (compile_file): Move call to coverage_finish ... * toplev.c (compile_file): Move call to coverage_finish ... * cgraphunit.c (ipa_passes): ... here. Call cgraph_process_new_functions. * ipa-utils.c (get_base_var): Handle CONSTRUCTOR. * Makefile.in (cgraphunit.o): Add dependency on COVERAGE_H. From-SVN: r146354 --- gcc/cgraphunit.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/cgraphunit.c') diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 859eadd..a99b7df 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -134,6 +134,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-iterator.h" #include "tree-pass.h" #include "output.h" +#include "coverage.h" static void cgraph_expand_all_functions (void); static void cgraph_mark_functions_to_output (void); @@ -978,6 +979,8 @@ cgraph_finalize_compilation_unit (void) cgraph_analyze_functions (); timevar_pop (TV_CGRAPH); } + + /* Figure out what functions we want to assemble. */ static void @@ -1238,6 +1241,15 @@ ipa_passes (void) gimple_register_cfg_hooks (); bitmap_obstack_initialize (NULL); execute_ipa_pass_list (all_ipa_passes); + + /* Generate coverage variables and constructors. */ + coverage_finish (); + + /* Process new functions added. */ + set_cfun (NULL); + current_function_decl = NULL; + cgraph_process_new_functions (); + bitmap_obstack_release (NULL); } -- cgit v1.1