aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.cc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2022-05-09 04:36:30 -0700
committerNathan Sidwell <nathan@acm.org>2022-05-09 05:48:36 -0700
commitaddedd48e805edcf555c4fef80e531cd7dbf0c45 (patch)
tree6b13364ebdf0ca03946aa41469fd7be7033037b7 /gcc/cp/lambda.cc
parent49e8f813bb5bd08850309166fbfba8a7346cd8c9 (diff)
downloadgcc-addedd48e805edcf555c4fef80e531cd7dbf0c45.zip
gcc-addedd48e805edcf555c4fef80e531cd7dbf0c45.tar.gz
gcc-addedd48e805edcf555c4fef80e531cd7dbf0c45.tar.bz2
[c++][NFC] Rename Attached to Keyed
With modules, certain decls are 'scoped' with another decl. I chose the name 'attached', but that has become something specific in the modules context, so is no longer a good name. The alternative name I considered was 'keyed', but we already had the concept of a key virtual function (from the ABI), which is why I went with 'attached'. However, I think 'keyed' is the less worse name. I think there's less chance of confusion. gcc/cp/ * cp-tree.h (DECL_MODULE_KEYED_DECLS_P): Renamed from DECL_MODULE_ATTACHMENTS_P. (struct lane_decl_base): Rename module_attached_p to module_keyed_decls_p. (maybe_key_decl): Renamed from maybe_attach_decl. * lambda.cc (record_lambda_scope): Adjust. * lex.cc (cxx_dup_lang_specific_decl): Adjust. * module.cc (keyed_map_t, keyed_table): Renamed from attached_map_t, attached_table. (enum merge_kind): Rename MK_attached to MK_keyed. (trees_out::lang_decl_bools): Adjust. (trees_in::lang_decl_bools): Adjust. (trees_in::decl_value): Adjust. (trees_out::get_merge_kind): Adjust. (trees_out::key_mergeable): Adjust. (trees_in::key_mergeable): Adjust. (maybe_key_decl): Rename from maybe_attach_decl. (direct_import): Adjust. (fini_modules): Adjust.
Diffstat (limited to 'gcc/cp/lambda.cc')
-rw-r--r--gcc/cp/lambda.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lambda.cc b/gcc/cp/lambda.cc
index afac53b..0a9f0f8 100644
--- a/gcc/cp/lambda.cc
+++ b/gcc/cp/lambda.cc
@@ -1431,7 +1431,7 @@ record_lambda_scope (tree lambda)
{
tree closure = LAMBDA_EXPR_CLOSURE (lambda);
gcc_checking_assert (closure);
- maybe_attach_decl (lambda_scope, TYPE_NAME (closure));
+ maybe_key_decl (lambda_scope, TYPE_NAME (closure));
}
}