diff options
Diffstat (limited to 'gcc/gcov-io.c')
-rw-r--r-- | gcc/gcov-io.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c index 547276f..c2cd170 100644 --- a/gcc/gcov-io.c +++ b/gcc/gcov-io.c @@ -64,7 +64,11 @@ GCOV_LINKAGE struct gcov_var } gcov_var; /* Save the current position in the gcov file. */ -static inline gcov_position_t +/* We need to expose this function when compiling for gcov-tool. */ +#ifndef IN_GCOV_TOOL +static inline +#endif +gcov_position_t gcov_position (void) { gcov_nonruntime_assert (gcov_var.mode > 0); @@ -72,7 +76,11 @@ gcov_position (void) } /* Return nonzero if the error flag is set. */ -static inline int +/* We need to expose this function when compiling for gcov-tool. */ +#ifndef IN_GCOV_TOOL +static inline +#endif +int gcov_is_error (void) { return gcov_var.file ? gcov_var.error : 1; @@ -557,11 +565,13 @@ gcov_read_counter (void) return value; } +/* We need to expose the below function when compiling for gcov-tool. */ + +#if !IN_LIBGCOV || defined (IN_GCOV_TOOL) /* Read string from coverage file. Returns a pointer to a static buffer, or NULL on empty string. You must copy the string before calling another gcov function. */ -#if !IN_LIBGCOV GCOV_LINKAGE const char * gcov_read_string (void) { @@ -642,7 +652,9 @@ gcov_read_summary (struct gcov_summary *summary) } } -#if !IN_LIBGCOV +/* We need to expose the below function when compiling for gcov-tool. */ + +#if !IN_LIBGCOV || defined (IN_GCOV_TOOL) /* Reset to a known position. BASE should have been obtained from gcov_position, LENGTH should be a record length. */ |