Commit ca498a11 by Martin Liska Committed by Martin Liska

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
parent b4f1f01d
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.
2018-08-02 Thomas Preud'homme <thomas.preudhomme@linaro.org> 2018-08-02 Thomas Preud'homme <thomas.preudhomme@linaro.org>
PR target/85434 PR target/85434
......
...@@ -543,6 +543,7 @@ static int process_args (int, char **); ...@@ -543,6 +543,7 @@ static int process_args (int, char **);
static void print_usage (int) ATTRIBUTE_NORETURN; static void print_usage (int) ATTRIBUTE_NORETURN;
static void print_version (void) ATTRIBUTE_NORETURN; static void print_version (void) ATTRIBUTE_NORETURN;
static void process_file (const char *); static void process_file (const char *);
static void process_all_functions (void);
static void generate_results (const char *); static void generate_results (const char *);
static void create_file_names (const char *); static void create_file_names (const char *);
static char *canonicalize_name (const char *); static char *canonicalize_name (const char *);
...@@ -798,6 +799,7 @@ main (int argc, char **argv) ...@@ -798,6 +799,7 @@ main (int argc, char **argv)
if (flag_intermediate_format || argno == argc - 1) if (flag_intermediate_format || argno == argc - 1)
{ {
process_all_functions ();
generate_results (argv[argno]); generate_results (argv[argno]);
release_structures (); release_structures ();
} }
...@@ -1145,11 +1147,14 @@ process_file (const char *file_name) ...@@ -1145,11 +1147,14 @@ process_file (const char *file_name)
{ {
create_file_names (file_name); create_file_names (file_name);
read_graph_file (); read_graph_file ();
if (functions.empty ())
return;
read_count_file (); 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; hash_map<function_start_pair_hash, function_info *> fn_map;
/* Identify group functions. */ /* Identify group functions. */
...@@ -1226,7 +1231,6 @@ process_file (const char *file_name) ...@@ -1226,7 +1231,6 @@ process_file (const char *file_name)
if (fn->is_group) if (fn->is_group)
fn->lines.resize (fn->end_line - fn->start_line + 1); fn->lines.resize (fn->end_line - fn->start_line + 1);
solve_flow_graph (fn); solve_flow_graph (fn);
if (fn->has_catch) if (fn->has_catch)
find_exception_blocks (fn); find_exception_blocks (fn);
......
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