diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 7c1c54c..a634901 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2471,10 +2471,12 @@ struct GTY(()) lang_decl_min { union lang_decl_u2 { /* In a FUNCTION_DECL for which DECL_THUNK_P holds, this is THUNK_VIRTUAL_OFFSET. + In a VAR_DECL for which DECL_HAS_VALUE_EXPR_P holds, + this is DECL_CAPTURED_VARIABLE. Otherwise this is DECL_ACCESS. */ tree GTY ((tag ("0"))) access; - /* For VAR_DECL in function, this is DECL_DISCRIMINATOR. */ + /* For TREE_STATIC VAR_DECL in function, this is DECL_DISCRIMINATOR. */ int GTY ((tag ("1"))) discriminator; } GTY ((desc ("%0.u.base.u2sel"))) u2; }; @@ -3240,6 +3242,10 @@ extern void decl_shadowed_for_var_insert (tree, tree); (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_FIELD_OR_FUNCTION_DECL_CHECK (NODE)) \ ->u.min.template_info) +/* For a lambda capture proxy, its captured variable. */ +#define DECL_CAPTURED_VARIABLE(NODE) \ + (LANG_DECL_U2_CHECK (NODE, 0)->access) + /* For a VAR_DECL, indicates that the variable is actually a non-static data member of anonymous union that has been promoted to variable status. */ @@ -6793,7 +6799,7 @@ extern tree lambda_function (tree); extern void apply_deduced_return_type (tree, tree); extern tree add_capture (tree, tree, tree, bool, bool); extern tree add_default_capture (tree, tree, tree); -extern tree build_capture_proxy (tree); +extern tree build_capture_proxy (tree, tree); extern void insert_capture_proxy (tree); extern void insert_pending_capture_proxies (void); extern bool is_capture_proxy (tree); |