diff options
author | Martin Liska <mliska@suse.cz> | 2018-10-03 10:30:10 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-10-03 08:30:10 +0000 |
commit | f2db46026408095de13e9b74659fd06d9c02f7f3 (patch) | |
tree | 8fa1a89d2850e78140a6a1c0472e9dd5b6b6d777 /gcc/coverage.c | |
parent | 784779d47117cf90c1facb844d4845ba7c97bd34 (diff) | |
download | gcc-f2db46026408095de13e9b74659fd06d9c02f7f3.zip gcc-f2db46026408095de13e9b74659fd06d9c02f7f3.tar.gz gcc-f2db46026408095de13e9b74659fd06d9c02f7f3.tar.bz2 |
Properly mark lambdas in GCOV (PR gcov-profile/86109).
2018-10-03 Martin Liska <mliska@suse.cz>
PR gcov-profile/86109
* coverage.c (coverage_begin_function): Do not
mark lambdas as artificial.
* tree-core.h (struct GTY): Remove tm_clone_flag
and introduce new lambda_function.
* tree.h (DECL_LAMBDA_FUNCTION): New macro.
2018-10-03 Martin Liska <mliska@suse.cz>
PR gcov-profile/86109
* parser.c (cp_parser_lambda_declarator_opt):
Set DECL_LAMBDA_FUNCTION for lambdas.
2018-10-03 Martin Liska <mliska@suse.cz>
PR gcov-profile/86109
* g++.dg/gcov/pr86109.C: New test.
From-SVN: r264806
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r-- | gcc/coverage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c index 701460c..599a3bb 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -630,7 +630,8 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum) gcov_write_string (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl) - && !DECL_FUNCTION_VERSIONED (current_function_decl)); + && !DECL_FUNCTION_VERSIONED (current_function_decl) + && !DECL_LAMBDA_FUNCTION (current_function_decl)); gcov_write_filename (xloc.file); gcov_write_unsigned (xloc.line); gcov_write_unsigned (xloc.column); |