static file_and_directory find_file_and_directory (struct die_info *die,
struct dwarf2_cu *cu);
-static htab_up allocate_signatured_type_table (struct objfile *objfile);
+static htab_up allocate_signatured_type_table ();
-static htab_up allocate_dwo_unit_table (struct objfile *objfile);
+static htab_up allocate_dwo_unit_table ();
static struct dwo_unit *lookup_dwo_unit_in_dwp
(struct dwarf2_per_objfile *dwarf2_per_objfile,
gdb_assert (dwarf2_per_objfile->all_type_units.empty ());
dwarf2_per_objfile->all_type_units.reserve (elements / 3);
- htab_up sig_types_hash = allocate_signatured_type_table (objfile);
+ htab_up sig_types_hash = allocate_signatured_type_table ();
for (offset_type i = 0; i < elements; i += 3)
{
gdb_assert (dwarf2_per_objfile->all_type_units.empty ());
dwarf2_per_objfile->all_type_units.reserve (map.tu_count);
- htab_up sig_types_hash = allocate_signatured_type_table (objfile);
+ htab_up sig_types_hash = allocate_signatured_type_table ();
for (uint32_t i = 0; i < map.tu_count; ++i)
{
/* Allocate a hash table for signatured types. */
static htab_up
-allocate_signatured_type_table (struct objfile *objfile)
+allocate_signatured_type_table ()
{
return htab_up (htab_create_alloc (41,
hash_signatured_type,
if (types_htab == NULL)
{
if (dwo_file)
- types_htab = allocate_dwo_unit_table (objfile);
+ types_htab = allocate_dwo_unit_table ();
else
- types_htab = allocate_signatured_type_table (objfile);
+ types_htab = allocate_signatured_type_table ();
}
if (dwo_file)
{
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
- struct objfile *objfile = dwarf2_per_objfile->objfile;
struct dwo_file *dwo_file;
struct dwo_unit find_dwo_entry, *dwo_entry;
struct signatured_type find_sig_entry, *sig_entry;
/* If TU skeletons have been removed then we may not have read in any
TUs yet. */
if (dwarf2_per_objfile->signatured_types == NULL)
- {
- dwarf2_per_objfile->signatured_types
- = allocate_signatured_type_table (objfile);
- }
+ dwarf2_per_objfile->signatured_types = allocate_signatured_type_table ();
/* We only ever need to read in one copy of a signatured type.
Use the global signatured_types array to do our own comdat-folding
{
struct dwarf2_per_objfile *dwarf2_per_objfile
= cu->per_cu->dwarf2_per_objfile;
- struct objfile *objfile = dwarf2_per_objfile->objfile;
struct dwp_file *dwp_file = get_dwp_file (dwarf2_per_objfile);
struct dwo_unit *dwo_entry;
struct signatured_type find_sig_entry, *sig_entry;
/* If TU skeletons have been removed then we may not have read in any
TUs yet. */
if (dwarf2_per_objfile->signatured_types == NULL)
- {
- dwarf2_per_objfile->signatured_types
- = allocate_signatured_type_table (objfile);
- }
+ dwarf2_per_objfile->signatured_types = allocate_signatured_type_table ();
find_sig_entry.signature = sig;
slot = htab_find_slot (dwarf2_per_objfile->signatured_types.get (),
/* Allocate a hash table for type unit groups. */
static htab_up
-allocate_type_unit_groups_table (struct objfile *objfile)
+allocate_type_unit_groups_table ()
{
return htab_up (htab_create_alloc (3,
hash_type_unit_group,
struct type_unit_group type_unit_group_for_lookup;
if (dwarf2_per_objfile->type_unit_groups == NULL)
- {
- dwarf2_per_objfile->type_unit_groups =
- allocate_type_unit_groups_table (dwarf2_per_objfile->objfile);
- }
+ dwarf2_per_objfile->type_unit_groups = allocate_type_unit_groups_table ();
/* Do we need to create a new group, or can we use an existing one? */
/* If this TU doesn't exist in the global table, add it and read it in. */
if (dwarf2_per_objfile->signatured_types == NULL)
- {
- dwarf2_per_objfile->signatured_types
- = allocate_signatured_type_table (dwarf2_per_objfile->objfile);
- }
+ dwarf2_per_objfile->signatured_types = allocate_signatured_type_table ();
find_entry.signature = dwo_unit->signature;
slot = htab_find_slot (dwarf2_per_objfile->signatured_types.get (),
/* Allocate a hash table for DWO files. */
static htab_up
-allocate_dwo_file_hash_table (struct objfile *objfile)
+allocate_dwo_file_hash_table ()
{
auto delete_dwo_file = [] (void *item)
{
void **slot;
if (dwarf2_per_objfile->dwo_files == NULL)
- dwarf2_per_objfile->dwo_files
- = allocate_dwo_file_hash_table (dwarf2_per_objfile->objfile);
+ dwarf2_per_objfile->dwo_files = allocate_dwo_file_hash_table ();
find_entry.dwo_name = dwo_name;
find_entry.comp_dir = comp_dir;
There is one of these tables for each of CUs,TUs for each DWO file. */
static htab_up
-allocate_dwo_unit_table (struct objfile *objfile)
+allocate_dwo_unit_table ()
{
/* Start out with a pretty small number.
Generally DWO files contain only one CU and maybe some TUs. */
continue;
if (cus_htab == NULL)
- cus_htab = allocate_dwo_unit_table (objfile);
+ cus_htab = allocate_dwo_unit_table ();
dwo_unit = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct dwo_unit);
*dwo_unit = read_unit;
/* Allocate a hash table for dwp_file loaded CUs/TUs. */
static htab_up
-allocate_dwp_loaded_cutus_table (struct objfile *objfile)
+allocate_dwp_loaded_cutus_table ()
{
return htab_up (htab_create_alloc (3,
hash_dwp_loaded_cutus,
dwarf2_locate_v2_dwp_sections,
dwp_file.get ());
- dwp_file->loaded_cus = allocate_dwp_loaded_cutus_table (objfile);
- dwp_file->loaded_tus = allocate_dwp_loaded_cutus_table (objfile);
+ dwp_file->loaded_cus = allocate_dwp_loaded_cutus_table ();
+ dwp_file->loaded_tus = allocate_dwp_loaded_cutus_table ();
if (dwarf_read_debug)
{