aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
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/cp-tree.h
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/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 663fe7a..10ecab7 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1734,9 +1734,9 @@ check_constraint_info (tree t)
(DECL_LANG_SPECIFIC (DECL_MODULE_CHECK (NODE))->u.base.module_entity_p)
/* DECL that has attached decls for ODR-relatedness. */
-#define DECL_MODULE_ATTACHMENTS_P(NODE) \
+#define DECL_MODULE_KEYED_DECLS_P(NODE) \
(DECL_LANG_SPECIFIC (TREE_CHECK2(NODE,FUNCTION_DECL,VAR_DECL))\
- ->u.base.module_attached_p)
+ ->u.base.module_keyed_decls_p)
/* Whether this is an exported DECL. Held on any decl that can appear
at namespace scope (function, var, type, template, const or
@@ -2836,8 +2836,8 @@ struct GTY(()) lang_decl_base {
unsigned module_import_p : 1; /* from an import */
unsigned module_entity_p : 1; /* is in the entitity ary &
hash. */
- /* VAR_DECL or FUNCTION_DECL has attached decls. */
- unsigned module_attached_p : 1;
+ /* VAR_DECL or FUNCTION_DECL has keyed decls. */
+ unsigned module_keyed_decls_p : 1;
/* 12 spare bits. */
};
@@ -7196,7 +7196,7 @@ extern unsigned get_importing_module (tree, bool = false) ATTRIBUTE_PURE;
/* Where current instance of the decl got declared/defined/instantiated. */
extern void set_instantiating_module (tree);
extern void set_defining_module (tree);
-extern void maybe_attach_decl (tree ctx, tree decl);
+extern void maybe_key_decl (tree ctx, tree decl);
extern void mangle_module (int m, bool include_partition);
extern void mangle_module_fini ();