diff options
author | Nathan Sidwell <nathan@acm.org> | 2022-06-09 11:18:19 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2022-06-14 07:57:36 -0700 |
commit | e8609768fbbc1ec650fe245cb45ee6d893ade3d7 (patch) | |
tree | 798f89f4fab1132a892b639ffcbacec44a4ac901 /gcc/cp/cp-tree.h | |
parent | 8f6c317b3a16350698f3c9e0accb43a9b4acb4ae (diff) | |
download | gcc-e8609768fbbc1ec650fe245cb45ee6d893ade3d7.zip gcc-e8609768fbbc1ec650fe245cb45ee6d893ade3d7.tar.gz gcc-e8609768fbbc1ec650fe245cb45ee6d893ade3d7.tar.bz2 |
c++: Elide calls to NOP module initializers
gcc/cp
* cp-tree.h (fini_modules): Add has_inits parm.
* decl2.cc (c_parse_final_cleanups): Check for
inits, adjust fini_modules flags.
* module.cc (module_state): Rename call_init_p to
active_init_p.
(module_state::write_config): Write active_init.
(module_state::read_config): Read it.
(module_determine_import_inits): Clear active_init_p
of covered inits.
(late_finish_module): Add has_init parm. Record it.
(fini_modules): Adjust.
gcc/testsuite/
* g++.dg/modules/init-2_a.C: Adjust.
* g++.dg/modules/init-2_c.C: Adjust.
* g++.dg/modules/init-2_d.C: New.
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 60d7b20..2fde4f8 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -7209,7 +7209,7 @@ extern void import_module (module_state *, location_t, bool export_p, extern void declare_module (module_state *, location_t, bool export_p, tree attr, cpp_reader *); extern void init_modules (cpp_reader *); -extern void fini_modules (cpp_reader *, void *cookie); +extern void fini_modules (cpp_reader *, void *cookie, bool); extern void maybe_check_all_macros (cpp_reader *); extern void *finish_module_processing (cpp_reader *); extern char const *module_name (unsigned, bool header_ok); |