From ca086b8b8bb3995f369a523e92db4bf0cb763194 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 14 Dec 2020 13:07:14 +0100 Subject: [PATCH] gcov: Update comments. gcc/ChangeLog: * gcov.c (output_json_intermediate_file): Update comments. --- gcc/gcov.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/gcov.c b/gcc/gcov.c index 36938bd0fce..daa1266db86 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -293,7 +293,7 @@ public: /* Index of source file where the function is defined. */ unsigned src; - /* Vector of line information. */ + /* Vector of line information (used only for group functions). */ vector lines; /* Next function. */ @@ -1172,7 +1172,7 @@ output_json_intermediate_file (json::array *json_files, source_info *src) vector *fns = src->get_functions_at_location (line_num); if (fns != NULL) - /* Print first group functions that begin on the line. */ + /* Print info for all group functions that begin on the line. */ for (vector::iterator it2 = fns->begin (); it2 != fns->end (); it2++) { @@ -1180,6 +1180,7 @@ output_json_intermediate_file (json::array *json_files, source_info *src) last_non_group_fn = *it2; vector &lines = (*it2)->lines; + /* The LINES array is allocated only for group functions. */ for (unsigned i = 0; i < lines.size (); i++) { line_info *line = &lines[i]; -- 2.30.2