c++: Originating and instantiating module
authorNathan Sidwell <nathan@acm.org>
Tue, 8 Dec 2020 20:34:25 +0000 (12:34 -0800)
committerNathan Sidwell <nathan@acm.org>
Tue, 8 Dec 2020 20:38:04 +0000 (12:38 -0800)
commit570c312c03e151477505c8b70b25411e52751ff4
tree1ef81534a0ef09c89cfe29dfcb6f55d873e3ded2
parent4ed1dc1275bba89af92bfc7d97c21b376e4c29c3
c++: Originating and instantiating module

With modules streamed entities have two new properties -- the module
that declares them and the module that instantiates them.  Here
'instantiate' applies to more than just templates -- for instance an
implicit member fn.  These may well be the same module.  This adds the
calls to places that need it.

gcc/cp/
* class.c (layout_class_type): Call set_instantiating_module.
(build_self_reference): Likewise.
* decl.c (grokfndecl): Call set_originating_module.
(grokvardecl): Likewise.
(grokdeclarator): Likewise.
* pt.c (maybe_new_partial_specialization): Call
set_instantiating_module, propagate DECL_MODULE_EXPORT_P.
(lookup_template_class_1): Likewise.
(tsubst_function_decl): Likewise.
(tsubst_decl, instantiate_template_1): Likewise.
(build_template_decl): Propagate module flags.
(tsubst_template_dcl): Likewise.
(finish_concept_definition): Call set_originating_module.
* module.cc (set_instantiating_module, set_originating_module): Stubs.
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/module.cc
gcc/cp/pt.c