summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog17
-rw-r--r--libgcc/libgcov-driver.c32
-rw-r--r--libgcc/libgcov-interface.c7
3 files changed, 18 insertions, 38 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index f74aeb43a95..3878903c663 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,8 +1,21 @@
+2014-07-25 Nathan Sidwell <nathan@acm.org>
+
+ * libgcov-driver.c (set_gcov_dump_complete,
+ reset_gcov_dump_complete, get_gcov_dump_complete): Remove global
+ functions polluting user's namespace.
+ (gcov_exit): Set variable directly.
+ (gcov_clear): Reset variable directly.
+ * libgcov-interface.c (get_gcov_dymp_complete,
+ reset_gov_dump_complete): Remove declarations.
+ (__gcov_reset, __gcov_dump): Don't call them.
+
2014-07-24 DJ Delorie <dj@redhat.com>
* config/i386/cygming-crtbegin.c (deregister_frame_fn): Newly public.
- (__gcc_deregister_frame): Move logic to detect deregister function to...
- (__gcc_register_frame): here, so it's consistent with the register logic.
+ (__gcc_deregister_frame): Move logic to detect deregister function
+ to ...
+ (__gcc_register_frame): here, so it's consistent with the register
+ logic.
2014-07-23 Nathan Sidwell <nathan@acm.org>
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index cf38f527344..f47f2b85e6a 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -51,9 +51,6 @@ static int gcov_error (const char *, ...);
/* The following functions can be called from outside of this file. */
extern void gcov_clear (void) ATTRIBUTE_HIDDEN;
extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
-extern void set_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
-extern void reset_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
-extern int get_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
struct gcov_fn_buffer
{
@@ -86,32 +83,6 @@ size_t gcov_max_filename = 0;
/* Flag when the profile has already been dumped via __gcov_dump(). */
static int gcov_dump_complete;
-/* A global function that get the vaule of gcov_dump_complete. */
-
-int
-get_gcov_dump_complete (void)
-{
- return gcov_dump_complete;
-}
-
-/* A global functino that set the vaule of gcov_dump_complete. Will
- be used in __gcov_dump() in libgcov-interface.c. */
-
-void
-set_gcov_dump_complete (void)
-{
- gcov_dump_complete = 1;
-}
-
-/* A global functino that set the vaule of gcov_dump_complete. Will
- be used in __gcov_reset() in libgcov-interface.c. */
-
-void
-reset_gcov_dump_complete (void)
-{
- gcov_dump_complete = 0;
-}
-
static struct gcov_fn_buffer *
free_fn_data (const struct gcov_info *gi_ptr, struct gcov_fn_buffer *buffer,
unsigned limit)
@@ -795,6 +766,8 @@ gcov_exit (void)
if (gcov_dump_complete)
return;
+ gcov_dump_complete = 1;
+
crc32 = gcov_exit_compute_summary (&this_prg);
allocate_filename_struct (&gf);
@@ -818,6 +791,7 @@ gcov_clear (void)
{
const struct gcov_info *gi_ptr;
+ gcov_dump_complete = 0;
for (gi_ptr = gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
{
unsigned f_ix;
diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c
index 7f831f2ef24..a1a91f2567c 100644
--- a/libgcc/libgcov-interface.c
+++ b/libgcc/libgcov-interface.c
@@ -44,8 +44,6 @@ void __gcov_dump (void) {}
extern void gcov_clear (void) ATTRIBUTE_HIDDEN;
extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
-extern void set_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
-extern void reset_gcov_dump_complete (void) ATTRIBUTE_HIDDEN;
#ifdef L_gcov_flush
@@ -95,9 +93,6 @@ void
__gcov_reset (void)
{
gcov_clear ();
- /* Re-enable dumping to support collecting profile in multiple regions
- of interest. */
- reset_gcov_dump_complete ();
}
#endif /* L_gcov_reset */
@@ -111,8 +106,6 @@ void
__gcov_dump (void)
{
gcov_exit ();
- /* Prevent profile from being dumped a second time on application exit. */
- set_gcov_dump_complete ();
}
#endif /* L_gcov_dump */