[C++ PATCH] clone_function_decl breakup
authorNathan Sidwell <nathan@acm.org>
Tue, 15 Oct 2019 12:27:21 +0000 (12:27 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 15 Oct 2019 12:27:21 +0000 (12:27 +0000)
commitc1d781707eb611d65aa4e1275f246debba557a3d
tree1a2e93191e1711f0cc9b458b772fdc4a8160d619
parenta0a9a3fc22d4d4a38c1d6a31669c926734308745
[C++ PATCH] clone_function_decl breakup

https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01083.html
This patch, from the modules branch, breaks out function cloning from the
method vector updating. We have a new function, build_clones,
which does the building, returning a count of the number of clones
(2 or 3). clone_function_decl separately adds them to the method
vector, if they should be added. I suppose this could have used
FOR_EVERY_CLONE, but I went with the counting scheme.

* class.c (build_clones): Break out of clone_function_decl.  Just
build the clones.
(clone_function_decl): Call build_clones, then maybe add them to
the method vector.

From-SVN: r276998
gcc/cp/ChangeLog
gcc/cp/class.c