summaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-06-30 10:43:08 -0700
committerNathan Sidwell <nathan@acm.org>2020-06-30 10:50:05 -0700
commitcc3ae9f5c4c0d449045b39250edab189d0e573d1 (patch)
treeb073381c1d94b3973e8ab53886b4f4e11ad26a85 /libcc1
parentfe03543bfb8c88c3feb8076b5ff1690dc3903878 (diff)
c++: Tweak function cloning names
On the modules branch I need to expose an intermediate step of the function cloning, but before that it'd be nice to rationalize the names somewhat, now that we also use that API for copying the equality operator. Jason's recent patch caused me some pain by altering the same code. I can only blame myself for not pushing some bits sooner. Anyway, this patch makes the newly renamed copy_fndecl_with_name static, and adds a wrapper copy_operator_fn, that takes an operator code. The cdtor cloning functions are renamed to explicitly note they expect cdtors. A followup patch will move some of the logic from copy_fndecl_with_name to build_cdtor_clones. gcc/cp/ * cp-tree.h (copy_fndecl_with_name): Rename to ... (copy_operatorn_fn): ... this. Change arg type. (clone_function_decl): Rename to ... (clone_cdtor): ... this. * class.c (copy_fndecl_with_name): Make static. (copy_operator_fn): New wrapper. (build_clones): Rename to ... (build_cdtor_clones): ... this. (clone_function_decl): Rename to ... (clone_cdtor): ... this. Adjust build_clones calls. (clone_constructors_and_destructors): Adjust clone_function_decl calls. * method.c (implicitly_declare_fn): Adjust copy_fndecl_with_name call. (lazily_declare_fn): Adjust clone_function_decl call. * pt.c (tsubst_function_decl): Likewise. (instantiate_template_1): Likewise. libcc1/ * libcp1plugin.cc (plugin_build_decl): Adjust clone_function_decl call.
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/libcp1plugin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
index 00449f43b52..01aecf00735 100644
--- a/libcc1/libcp1plugin.cc
+++ b/libcc1/libcp1plugin.cc
@@ -1552,7 +1552,7 @@ plugin_build_decl (cc1_plugin::connection *self,
reversal. */
tree save = DECL_CHAIN (decl);
DECL_CHAIN (decl) = NULL_TREE;
- clone_function_decl (decl, /*update_methods=*/true);
+ clone_cdtor (decl, /*update_methods=*/true);
gcc_assert (TYPE_FIELDS (current_class_type) == decl);
TYPE_FIELDS (current_class_type)
= nreverse (TYPE_FIELDS (current_class_type));