Commit d10ee722 by Nathan Sidwell Committed by Nathan Sidwell

gcov-tool.c (gcov_list): Declare here.

	gcc/
	* gcov-tool.c (gcov_list): Declare here.
	(set_gcov_list): Remove.
	(gcov_output_files): Set gcov_list directly.

	libgcc/
	* libgcov-driver.c (set_gcov_list): Remove.
	(gcov_list): Make non-static in GCOV_TOOL.
	* libgcov.h (GCOV_TOOL_LINKAGE): Remove unused #define.

From-SVN: r212931
parent da03858b
2014-07-23 Nathan Sidwell <nathan@acm.org>
* gcov-tool.c (gcov_list): Declare here.
(set_gcov_list): Remove.
(gcov_output_files): Set gcov_list directly.
2014-07-23 Host Schirmeier <horst@schirmeier.com> 2014-07-23 Host Schirmeier <horst@schirmeier.com>
* doc/invoke.texi: -O3 enables -ftree-loop-distribute-patterns. * doc/invoke.texi: -O3 enables -ftree-loop-distribute-patterns.
......
...@@ -38,12 +38,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -38,12 +38,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <ftw.h> #include <ftw.h>
#include <getopt.h> #include <getopt.h>
extern struct gcov_info *gcov_list;
extern int gcov_profile_merge (struct gcov_info*, struct gcov_info*, int, int); extern int gcov_profile_merge (struct gcov_info*, struct gcov_info*, int, int);
extern int gcov_profile_normalize (struct gcov_info*, gcov_type); extern int gcov_profile_normalize (struct gcov_info*, gcov_type);
extern int gcov_profile_scale (struct gcov_info*, float, int, int); extern int gcov_profile_scale (struct gcov_info*, float, int, int);
extern struct gcov_info* gcov_read_profile_dir (const char*, int); extern struct gcov_info* gcov_read_profile_dir (const char*, int);
extern void gcov_exit (void); extern void gcov_exit (void);
extern void set_gcov_list (struct gcov_info *);
extern void gcov_set_verbose (void); extern void gcov_set_verbose (void);
/* Set to verbose output mode. */ /* Set to verbose output mode. */
...@@ -109,7 +110,7 @@ gcov_output_files (const char *out, struct gcov_info *profile) ...@@ -109,7 +110,7 @@ gcov_output_files (const char *out, struct gcov_info *profile)
if (ret) if (ret)
fatal_error ("Cannot change directory to %s", out); fatal_error ("Cannot change directory to %s", out);
set_gcov_list (profile); gcov_list = profile;
gcov_exit (); gcov_exit ();
ret = chdir (pwd); ret = chdir (pwd);
......
2014-07-23 Nathan Sidwell <nathan@acm.org>
* libgcov-driver.c (set_gcov_list): Remove.
(gcov_list): Make non-static in GCOV_TOOL.
* libgcov.h (GCOV_TOOL_LINKAGE): Remove unused #define.
2014-07-17 John David Anglin <danglin@gcc.gnu.org> 2014-07-17 John David Anglin <danglin@gcc.gnu.org>
* config/pa/linux-atomic.c (__sync_lock_release_4): New. * config/pa/linux-atomic.c (__sync_lock_release_4): New.
......
...@@ -54,7 +54,6 @@ extern void gcov_exit (void) ATTRIBUTE_HIDDEN; ...@@ -54,7 +54,6 @@ extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
extern void set_gcov_dump_complete (void) ATTRIBUTE_HIDDEN; extern void set_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
extern void reset_gcov_dump_complete (void) ATTRIBUTE_HIDDEN; extern void reset_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
extern int get_gcov_dump_complete (void) ATTRIBUTE_HIDDEN; extern int get_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
extern void set_gcov_list (struct gcov_info *) ATTRIBUTE_HIDDEN;
struct gcov_fn_buffer struct gcov_fn_buffer
{ {
...@@ -71,14 +70,11 @@ struct gcov_summary_buffer ...@@ -71,14 +70,11 @@ struct gcov_summary_buffer
}; };
/* Chain of per-object gcov structures. */ /* Chain of per-object gcov structures. */
static struct gcov_info *gcov_list; #ifndef IN_GCOV_TOOL
/* We need to expose this static variable when compiling for gcov-tool. */
/* Set the head of gcov_list. */ static
void #endif
set_gcov_list (struct gcov_info *head) struct gcov_info *gcov_list;
{
gcov_list = head;
}
/* Size of the longest file name. */ /* Size of the longest file name. */
/* We need to expose this static variable when compiling for gcov-tool. */ /* We need to expose this static variable when compiling for gcov-tool. */
......
...@@ -111,12 +111,9 @@ typedef unsigned gcov_position_t; ...@@ -111,12 +111,9 @@ typedef unsigned gcov_position_t;
#define L_gcov_merge_ior 1 #define L_gcov_merge_ior 1
#define L_gcov_merge_time_profile 1 #define L_gcov_merge_time_profile 1
/* Make certian internal functions/variables in libgcov available for
gcov-tool access. */
#define GCOV_TOOL_LINKAGE
extern gcov_type gcov_read_counter_mem (); extern gcov_type gcov_read_counter_mem ();
extern unsigned gcov_get_merge_weight (); extern unsigned gcov_get_merge_weight ();
extern struct gcov_info *gcov_list;
#endif /* !IN_GCOV_TOOL */ #endif /* !IN_GCOV_TOOL */
......
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