aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-12-14 13:07:14 +0100
committerMartin Liska <mliska@suse.cz>2020-12-14 17:04:51 +0100
commitca086b8b8bb3995f369a523e92db4bf0cb763194 (patch)
tree6dabe14263d17919c44622417ae59bd5d81ac2c1 /gcc/gcov.c
parenta21ec1de4e512e2aa26f8cb8e45f5ef98788b203 (diff)
downloadgcc-ca086b8b8bb3995f369a523e92db4bf0cb763194.zip
gcc-ca086b8b8bb3995f369a523e92db4bf0cb763194.tar.gz
gcc-ca086b8b8bb3995f369a523e92db4bf0cb763194.tar.bz2
gcov: Update comments.
gcc/ChangeLog: * gcov.c (output_json_intermediate_file): Update comments.
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r--gcc/gcov.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 36938bd..daa1266 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<line_info> lines;
/* Next function. */
@@ -1172,7 +1172,7 @@ output_json_intermediate_file (json::array *json_files, source_info *src)
vector<function_info *> *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<function_info *>::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<line_info> &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];