d: Don't generate per-module wrapper for calling DSO constructor/destructor.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 14 Mar 2021 17:11:14 +0000 (18:11 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 28 Mar 2021 12:47:35 +0000 (14:47 +0200)
commit65c001bfaf778e83ded451f94d2a0da528758dd8
tree04d037e0ee151f92d1f9c47e2405ca8fe2fac994
parentd21001c793e97d88013d05226a8ea93a149726b1
d: Don't generate per-module wrapper for calling DSO constructor/destructor.

The static constructor/destructor list only ever has one function to
call in it, so mark the gdc.dso_ctor and gdc.dso_dtor functions as
static ctor/dtor directly instead.

gcc/d/ChangeLog:

* config-lang.in (gtfiles): Remove modules.cc.
* modules.cc (struct module_info): Remove GTY marker.
(static_ctor_list): Remove variable.
(static_dtor_list): Remove variable.
(register_moduleinfo): Directly set DECL_STATIC_CONSTRUCTOR on
dso_ctor, and DECL_STATIC_DESTRUCTOR on dso_dtor.
(d_finish_compilation): Remove static ctor/dtor handling.

gcc/testsuite/ChangeLog:

* gdc.dg/gdc270a.d: Removed.
* gdc.dg/gdc270b.d: Removed.
gcc/d/config-lang.in
gcc/d/modules.cc
gcc/testsuite/gdc.dg/gdc270a.d [deleted file]
gcc/testsuite/gdc.dg/gdc270b.d [deleted file]