explicit free_cached_comp_units (dwarf2_per_objfile *per_objfile)
: m_per_objfile (per_objfile)
{
- /* The destructor frees all cached comp units, including ones currently
- cached, so check that there are no currently cached comp units. */
- gdb_assert (m_per_objfile->nr_of_cus () == 0);
}
~free_cached_comp_units ()
/* Free all cached compilation units. */
void remove_all_cus ();
- /* Return the number of cached compilation units. */
- size_t nr_of_cus () const
- {
- return m_dwarf2_cus.size ();
- }
-
/* Increase the age counter on each CU compilation unit and free
any that are too old. */
void age_comp_units ();