c++: Expose cloning form predicates
A further adjustment of the function cloning. Rather than have
copy_fndecl_with_name deduce whether a particular cdtor needs a
vtt_parm and/or has inherited parms to drop, pass that information in
from the caller. In particular build_cdtor_clones knows when its
building the particular cdtors that might need these. On the modules
branch I need to clone cdtors before the underlying class information
is necessarily complete. There build_cdtor_clones is externally
callable to facilitate that.
gcc/cp/
* class.c (copy_fndecl_with_name): Add additional predicate args, do
not deduce them locally.
(copy_operator_fn): Adjust copy_fndecl_with_name call.
(build_clone): Add vtt and inherited predicate args. Pass through
to copy_fndecl_with_name call.
(build_cdtor_clones): Likewise, pass through to build_clone as
needed.
(build_cdtor): Determine vtt and inherited here.
* cp-tree.h (DECL_NEEDS_CTT_PARM_P): Delete.