diff options
author | Nathan Sidwell <nathan@acm.org> | 2022-06-10 05:22:21 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2022-06-10 09:27:40 -0700 |
commit | c08ba00487c44c4e363f23bb1652f1d0cb6831c2 (patch) | |
tree | bc98d94e3d94c3eab70e1713a407590528346f22 /libgomp/allocator.c | |
parent | 1459b55d24ce6508330690bf4c932f7a5218c9f3 (diff) | |
download | gcc-c08ba00487c44c4e363f23bb1652f1d0cb6831c2.zip gcc-c08ba00487c44c4e363f23bb1652f1d0cb6831c2.tar.gz gcc-c08ba00487c44c4e363f23bb1652f1d0cb6831c2.tar.bz2 |
c++: Adjust module initializer calling emission
We special-case emitting the calls of module initializer functions. It's
simpler to just emit a static fn do do that, and add it onto the front of
the global init fn chain. We can also move the calculation of the set of
initializers to call to the point of use.
gcc/cp/
* cp-tree.h (module_has_import_init): Rename to ...
(module_determined_import_inits): ... here.
* decl2.cc (start_objects): Do not handle module initializers
here.
(c_parse_final_cleanups): Generate a separate module
initializer calling function and add it to the list. Shrink
the c-lang region.
* module.cc (num_init_calls_needed): Delete.
(module_has_import_init): Rename to ...
(module_determined_import_inits): ... here. Do the
calculation here ...
(finish_module_processing): ... rather than here.
(module_add_import_initializers): Reformat.
gcc/testsuite/
* g++.dg/modules/init-3_a.C: New.
* g++.dg/modules/init-3_b.C: New.
* g++.dg/modules/init-3_c.C: New.
Diffstat (limited to 'libgomp/allocator.c')
0 files changed, 0 insertions, 0 deletions