diff options
author | Martin Liska <mliska@suse.cz> | 2018-08-02 12:17:34 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-08-02 10:17:34 +0000 |
commit | ca498a11887e4d6b6a635db3e7df8b93804a4478 (patch) | |
tree | 69e3f5f121983949527a7f1d201a8582a51beabd /gcc/gcov.c | |
parent | b4f1f01d453a0ca4f05dc78fc3769e6561592c66 (diff) | |
download | gcc-ca498a11887e4d6b6a635db3e7df8b93804a4478.zip gcc-ca498a11887e4d6b6a635db3e7df8b93804a4478.tar.gz gcc-ca498a11887e4d6b6a635db3e7df8b93804a4478.tar.bz2 |
Fix gcov misleading error (PR gcov-profile/86817).
2018-08-02 Martin Liska <mliska@suse.cz>
PR gcov-profile/86817
* gcov.c (process_all_functions): New function.
(main): Call it.
(process_file): Move functions processing to
process_all_functions.
From-SVN: r263248
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -543,6 +543,7 @@ static int process_args (int, char **); static void print_usage (int) ATTRIBUTE_NORETURN; static void print_version (void) ATTRIBUTE_NORETURN; static void process_file (const char *); +static void process_all_functions (void); static void generate_results (const char *); static void create_file_names (const char *); static char *canonicalize_name (const char *); @@ -798,6 +799,7 @@ main (int argc, char **argv) if (flag_intermediate_format || argno == argc - 1) { + process_all_functions (); generate_results (argv[argno]); release_structures (); } @@ -1145,11 +1147,14 @@ process_file (const char *file_name) { create_file_names (file_name); read_graph_file (); - if (functions.empty ()) - return; - read_count_file (); +} +/* Process all functions in all files. */ + +static void +process_all_functions (void) +{ hash_map<function_start_pair_hash, function_info *> fn_map; /* Identify group functions. */ @@ -1226,7 +1231,6 @@ process_file (const char *file_name) if (fn->is_group) fn->lines.resize (fn->end_line - fn->start_line + 1); - solve_flow_graph (fn); if (fn->has_catch) find_exception_blocks (fn); |