aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2022-06-08 11:25:14 -0700
committerNathan Sidwell <nathan@acm.org>2022-06-09 06:22:15 -0700
commit97b81fb036342d32d2c80c0d5f3844406e06d3ae (patch)
treed6bcd572bd672afa46957b50f5b241bb3811b01b /gcc/expr.cc
parent209de00fdb9da90a727337d6e752ea583a11d982 (diff)
downloadgcc-97b81fb036342d32d2c80c0d5f3844406e06d3ae.zip
gcc-97b81fb036342d32d2c80c0d5f3844406e06d3ae.tar.gz
gcc-97b81fb036342d32d2c80c0d5f3844406e06d3ae.tar.bz2
c++: Better module initializer code
Every module interface needs to emit a global initializer, but it might have nothing to init. In those cases, there's no need for any idempotency boolean to be emitted. gcc/cp * cp-tree.h (module_initializer_kind): Replace with ... (module_global_init_needed, module_has_import_inits): ... these. * decl2.cc (start_objects): Add has_body parm. Reorganize module initializer creation. (generate_ctor_or_dtor_function): Adjust. (c_parse_final_cleanups): Adjust. (vtv_start_verification_constructor_init_function): Adjust. * module.cc (module_initializer_kind): Replace with ... (module_global_init_needed, module_has_import_inits): ... these. gcc/testsuite/ * g++.dg/modules/init-2_a.C: Check no idempotency. * g++.dg/modules/init-2_b.C: Check idempotency.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions