aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-driver.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-04-18 09:24:20 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-04-18 07:24:20 +0000
commit6397118495f65a03a0d13114cf2c72d4a66f9cb1 (patch)
treeac43d0906533b0c67821043f6ec71cb902f5f12b /libgcc/libgcov-driver.c
parent4c6a5d87fdff2d1fca72789eb0fb1860f463958b (diff)
downloadgcc-6397118495f65a03a0d13114cf2c72d4a66f9cb1.zip
gcc-6397118495f65a03a0d13114cf2c72d4a66f9cb1.tar.gz
gcc-6397118495f65a03a0d13114cf2c72d4a66f9cb1.tar.bz2
Validate that destination gcov file does not exist for gcov-tool (PR gcov-profile/78783).
2017-04-18 Martin Liska <mliska@suse.cz> PR gcov-profile/78783 * libgcov-driver.c (gcov_get_filename): New function. 2017-04-18 Martin Liska <mliska@suse.cz> PR gcov-profile/78783 * gcov-tool.c (gcov_output_files): Validate that destination file is either removed by the tool or by a user. From-SVN: r246961
Diffstat (limited to 'libgcc/libgcov-driver.c')
-rw-r--r--libgcc/libgcov-driver.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index 70fe69f..c3b2fd4 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -852,6 +852,15 @@ gcov_do_dump (struct gcov_info *list, int run_counted)
free (gf.filename);
}
+#if IN_GCOV_TOOL
+const char *
+__attribute__ ((unused))
+gcov_get_filename (struct gcov_info *list)
+{
+ return list->filename;
+}
+#endif
+
#if !IN_GCOV_TOOL
void
__gcov_dump_one (struct gcov_root *root)