]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gcov-io.c
Add gcov-tool: an offline gcda profile processing tool Support.
[thirdparty/gcc.git] / gcc / gcov-io.c
index 547276fbcf0b732ed02163d8d57c677b846e5021..c2cd170522c5e41b8dec8dbed65ba518f5521d95 100644 (file)
@@ -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.  */