public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/PR98273-gcov-nested-functions)] gcov: Update comments.
@ 2020-12-14 13:01 Martin Liska
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2020-12-14 13:01 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:dc08ee087e645548a83a344fc785ded1aaf42dc0
commit dc08ee087e645548a83a344fc785ded1aaf42dc0
Author: Martin Liska <mliska@suse.cz>
Date: Mon Dec 14 13:07:14 2020 +0100
gcov: Update comments.
Diff:
---
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<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];
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/marxin/heads/PR98273-gcov-nested-functions)] gcov: Update comments.
@ 2020-12-14 16:04 Martin Liska
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2020-12-14 16:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:daad63e7a759ffd90d9208fc8e437fdfb2a07ff2
commit daad63e7a759ffd90d9208fc8e437fdfb2a07ff2
Author: Martin Liska <mliska@suse.cz>
Date: Mon Dec 14 13:07:14 2020 +0100
gcov: Update comments.
gcc/ChangeLog:
* gcov.c (output_json_intermediate_file): Update comments.
Diff:
---
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<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];
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-14 16:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 13:01 [gcc(refs/users/marxin/heads/PR98273-gcov-nested-functions)] gcov: Update comments Martin Liska
2020-12-14 16:04 Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).