This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 7/7] GCOV: remove typedef of coverage_t.


gcc/ChangeLog:

2017-11-09  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct coverage_info): Remove typedef of coverage_t.
	(struct source_info): Likewise.
	(add_branch_counts): Likewise.
	(add_line_counts): Likewise.
	(function_summary): Likewise.
	(output_intermediate_line): Likewise.
	(generate_results): Likewise.
---
 gcc/gcov.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gcc/gcov.c b/gcc/gcov.c
index 0e5ae8110ad..0669fd9deab 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -294,7 +294,7 @@ struct function_line_start_cmp
 
 /* Describes coverage of a file or function.  */
 
-typedef struct coverage_info
+struct coverage_info
 {
   int lines;
   int lines_executed;
@@ -307,7 +307,7 @@ typedef struct coverage_info
   int calls_executed;
 
   char *name;
-} coverage_t;
+};
 
 /* Describes a file mentioned in the block graph.  Contains an array
    of line info.  */
@@ -329,7 +329,7 @@ struct source_info
   /* Vector of line information.  */
   vector<line_info> lines;
 
-  coverage_t coverage;
+  coverage_info coverage;
 
   /* Functions in this source file.  These are in ascending line
      number order.  */
@@ -533,10 +533,10 @@ static void read_graph_file (void);
 static int read_count_file (void);
 static void solve_flow_graph (function_info *);
 static void find_exception_blocks (function_info *);
-static void add_branch_counts (coverage_t *, const arc_info *);
-static void add_line_counts (coverage_t *, function_info *);
+static void add_branch_counts (coverage_info *, const arc_info *);
+static void add_line_counts (coverage_info *, function_info *);
 static void executed_summary (unsigned, unsigned);
-static void function_summary (const coverage_t *, const char *);
+static void function_summary (const coverage_info *, const char *);
 static const char *format_gcov (gcov_type, gcov_type, int);
 static void accumulate_line_counts (source_info *);
 static void output_gcov_file (const char *, source_info *);
@@ -968,8 +968,8 @@ output_intermediate_line (FILE *f, line_info *line, unsigned line_num)
 	if (!(*it)->is_unconditional && !(*it)->is_call_non_return)
 	  {
 	    const char *branch_type;
-	    /* branch:<line_num>,<branch_coverage_type>
-	       branch_coverage_type
+	    /* branch:<line_num>,<branch_coverage_infoype>
+	       branch_coverage_infoype
 	       : notexec (Branch not executed)
 	       : taken (Branch executed and taken)
 	       : nottaken (Branch executed, but not taken)
@@ -1234,7 +1234,7 @@ generate_results (const char *file_name)
        it != functions.end (); it++)
     {
       function_info *fn = *it;
-      coverage_t coverage;
+      coverage_info coverage;
 
       memset (&coverage, 0, sizeof (coverage));
       coverage.name = flag_demangled_names ? fn->demangled_name : fn->name;
@@ -2072,7 +2072,7 @@ find_exception_blocks (function_info *fn)
 /* Increment totals in COVERAGE according to arc ARC.  */
 
 static void
-add_branch_counts (coverage_t *coverage, const arc_info *arc)
+add_branch_counts (coverage_info *coverage, const arc_info *arc)
 {
   if (arc->is_call_non_return)
     {
@@ -2184,7 +2184,7 @@ executed_summary (unsigned lines, unsigned executed)
 /* Output summary info for a function or file.  */
 
 static void
-function_summary (const coverage_t *coverage, const char *title)
+function_summary (const coverage_info *coverage, const char *title)
 {
   fnotice (stdout, "%s '%s'\n", title, coverage->name);
   executed_summary (coverage->lines, coverage->lines_executed);
@@ -2421,7 +2421,7 @@ mangle_name (char const *base, char *ptr)
    the appropriate basic block.  */
 
 static void
-add_line_counts (coverage_t *coverage, function_info *fn)
+add_line_counts (coverage_info *coverage, function_info *fn)
 {
   bool has_any_line = false;
   /* Scan each basic block.  */
-- 
2.14.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]