diff options
author | Nathan Sidwell <nathan@acm.org> | 2022-06-09 08:14:31 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2022-06-10 12:32:22 -0700 |
commit | e6d369bbdb4eb5f03eec233ef9905013a735fd71 (patch) | |
tree | ae76fb667433af3f913283f40d041fe763026afe /gcc/d/expr.cc | |
parent | 1eff4872d2e57c481f7218d25eecbfba647504e1 (diff) | |
download | gcc-e6d369bbdb4eb5f03eec233ef9905013a735fd71.zip gcc-e6d369bbdb4eb5f03eec233ef9905013a735fd71.tar.gz gcc-e6d369bbdb4eb5f03eec233ef9905013a735fd71.tar.bz2 |
c++: Add a late-writing step for modules
To add a module initializer optimization, we need to defer finishing writing
out the module file until the end of determining the dynamic initializers.
This is achieved by passing some saved-state from the main module writing
to a new function that completes it.
This patch merely adds the skeleton of that state and move things around,
allowing the finalization of the ELF file to be postponed. None of the
contents writing is moved, or the init optimization added.
gcc/cp/
* cp-tree.h (fini_modules): Add some parameters.
(finish_module_processing): Return an opaque pointer.
* decl2.cc (c_parse_final_cleanups): Propagate a cookie from
finish_module_processing to fini_modules.
* module.cc (struct module_processing_cookie): New.
(finish_module_processing): Return a heap-allocated cookie.
(late_finish_module): New. Finish out the module writing.
(fini_modules): Adjust.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions