aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-10-03 10:30:10 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-10-03 08:30:10 +0000
commitf2db46026408095de13e9b74659fd06d9c02f7f3 (patch)
tree8fa1a89d2850e78140a6a1c0472e9dd5b6b6d777 /gcc/tree.h
parent784779d47117cf90c1facb844d4845ba7c97bd34 (diff)
downloadgcc-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/tree.h')
-rw-r--r--gcc/tree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 35536f3..a0f24b6 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3041,6 +3041,10 @@ extern vec<tree, va_gc> **decl_debug_args_insert (tree);
#define DECL_CXX_DESTRUCTOR_P(NODE)\
(FUNCTION_DECL_CHECK (NODE)->decl_with_vis.cxx_destructor)
+/* In FUNCTION_DECL, this is set if this function is a lambda function. */
+#define DECL_LAMBDA_FUNCTION(NODE) \
+ (FUNCTION_DECL_CHECK (NODE)->function_decl.lambda_function)
+
/* In FUNCTION_DECL that represent an virtual method this is set when
the method is final. */
#define DECL_FINAL_P(NODE)\