diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-24 21:59:21 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-04-28 20:46:49 +0200 |
commit | d170ecc9fcb386bd5f62eb86dd6e411e6fcb4cef (patch) | |
tree | 126711b71773887b2d6093a1d0330504d3a62163 /gcc | |
parent | 336ea18ad7f48d675fce8c97bf3b7a0ee3a5a450 (diff) | |
download | gcc-d170ecc9fcb386bd5f62eb86dd6e411e6fcb4cef.zip gcc-d170ecc9fcb386bd5f62eb86dd6e411e6fcb4cef.tar.gz gcc-d170ecc9fcb386bd5f62eb86dd6e411e6fcb4cef.tar.bz2 |
gcov: Add mode to all gcov_open()
gcc/
* gcov-io.cc (gcov_open): Always use the mode parameter.
* gcov-io.h (gcov_open): Declare it unconditionally.
libgcc/
* libgcov-driver-system.c (gcov_exit_open_gcda_file): Open file for
reading and writing.
* libgcov-util.c (read_gcda_file): Open file for reading.
* libgcov.h (gcov_open): Delete declaration.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gcov-io.cc | 7 | ||||
-rw-r--r-- | gcc/gcov-io.h | 5 |
2 files changed, 1 insertions, 11 deletions
diff --git a/gcc/gcov-io.cc b/gcc/gcov-io.cc index 72c40f8..017a6e3 100644 --- a/gcc/gcov-io.cc +++ b/gcc/gcov-io.cc @@ -89,15 +89,8 @@ from_file (gcov_unsigned_t value) Return zero on failure, non-zero on success. */ GCOV_LINKAGE int -#if IN_LIBGCOV -gcov_open (const char *name) -#else gcov_open (const char *name, int mode) -#endif { -#if IN_LIBGCOV - int mode = 0; -#endif #if GCOV_LOCKED struct flock s_flock; int fd; diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 99ce7db..afe74b0 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -347,15 +347,12 @@ struct gcov_summary functions for writing. Your file may become corrupted if you break these invariants. */ -#if !IN_LIBGCOV -GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/); -#endif - #if !IN_LIBGCOV || defined (IN_GCOV_TOOL) GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t); #endif /* Available everywhere. */ +GCOV_LINKAGE int gcov_open (const char *, int) ATTRIBUTE_HIDDEN; GCOV_LINKAGE int gcov_close (void) ATTRIBUTE_HIDDEN; GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned (void) ATTRIBUTE_HIDDEN; GCOV_LINKAGE gcov_type gcov_read_counter (void) ATTRIBUTE_HIDDEN; |