c++: template and clone fns for modules
authorNathan Sidwell <nathan@acm.org>
Tue, 8 Dec 2020 18:38:10 +0000 (10:38 -0800)
committerNathan Sidwell <nathan@acm.org>
Tue, 8 Dec 2020 18:41:15 +0000 (10:41 -0800)
commitdded5f78ccb785520804444871a7b6ca4b735370
treece07f49d461a256bf322fa2e9be7ad3bf439905b
parent5312fa0fd95aab112abe40f2a5cdb70a76e89fbf
c++: template and clone fns for modules

We need to expose build_cdtor_clones, it fortunately has the desired
API -- gosh, how did that happen? :) The template machinery will need
to cache path-of-instantiation information, so add two more fields to
the tinst_level struct.  I also had to adjust the
match_mergeable_specialization API since adding it, so including that
change too.

gcc/cp/
* cp-tree.h (struct tinst_level): Add path & visible fields.
(build_cdtor_clones): Declare.
(match_mergeable_specialization): Use a spec_entry, add insert parm.
* class.c (build_cdtor_clones): Externalize.
* pt.c (push_tinst_level_loc): Clear new fields.
(match_mergeable_specialization): Adjust API.
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/pt.c