diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-03-03 12:38:20 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-03-03 12:45:32 -0800 |
commit | c390c5df71bbc95627c8e5e649a3161091239fd9 (patch) | |
tree | db107ec94a89ca234e0f18a178cda7adf8be4c89 /gcc/tree-pretty-print.c | |
parent | 49df367b17995c54fabe5bca290eede7dfab05b3 (diff) | |
download | gcc-c390c5df71bbc95627c8e5e649a3161091239fd9.zip gcc-c390c5df71bbc95627c8e5e649a3161091239fd9.tar.gz gcc-c390c5df71bbc95627c8e5e649a3161091239fd9.tar.bz2 |
c++: Defer cloning to post-loading [PR 99170]
It turns out that cloning can cause use to load things. Specifically when
checking paramter shadows (this is avoidable), and also the delete
operator of a deleting dtor (not avoidable). Doing that in the middle of
loading is a bad thing. This defers it to a post-load worklist. If it
causes more loading at that point there is no problem, as we've completed
the first set of loads, bar this bit of cleanup.
Again, this doesn't fix 99170, but is a step towards a solution.
PR c++/99170
gcc/cp/
* module.cc (post_load_decls): New.
(lazy_snum, recursive_lazy): Move earlier.
(module_state::read_cluster): Push cloning onto post_load_decls.
(post_load_processing): New. Do the cloning here.
(module_state::read_inits): Call post_load_processing.
(module_state::read_language): Likewise.
(lazy_load_binding, lazy_load_specializations): Likewise
(lazy_load_members): Likewise
Diffstat (limited to 'gcc/tree-pretty-print.c')
0 files changed, 0 insertions, 0 deletions