Remove "keep" parameter from cutu_reader constructor
cutu_reader has a "keep" parameter, which is used to decide what to do
with a new CU when the reader is destroyed. Most code does not try to
preserve the CU, so this patch removes this parameter and instead adds
a new method that users can call to preserve the CU on the chain.
gdb/ChangeLog
2020-02-08 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (class cutu_reader) <cutu_reader,
init_tu_and_read_dwo_dies>: Remove "keep" parameter.
<keep>: Declare method.
<m_keep>: Remove member.
<~cutu_reader>: Remove.
(cutu_reader::init_tu_and_read_dwo_dies): Update.
(cutu_reader::cutu_reader): Update.
(cutu_reader::keep): Rename from ~cutu_reader.
(process_psymtab_comp_unit, build_type_psymtabs_1)
(process_skeletonless_type_unit, load_partial_comp_unit)
(load_full_comp_unit, dwarf2_read_addr_index)
(read_signatured_type): Update.
Change-Id: I859b1c64313569d76d46317c14e9b077ebc3a27b