}
-struct addrmap *
-addrmap_create_mutable (struct obstack *obstack)
-{
- return new (obstack) struct addrmap_mutable (obstack);
-}
-
/* See addrmap.h. */
void
/* Create mutable addrmap. */
struct obstack temp_obstack;
obstack_init (&temp_obstack);
- struct addrmap *map = addrmap_create_mutable (&temp_obstack);
+ struct addrmap_mutable *map
+ = new (&temp_obstack) addrmap_mutable (&temp_obstack);
SELF_CHECK (map != nullptr);
/* Check initial state. */
};
-/* Create a mutable address map which maps every address to NULL.
- Allocate entries in OBSTACK. */
-struct addrmap *addrmap_create_mutable (struct obstack *obstack);
-
/* Dump the addrmap to OUTFILE. If PAYLOAD is non-NULL, only dump any
components that map to PAYLOAD. (If PAYLOAD is NULL, the entire
map is dumped.) */
m_pending_addrmap_interesting = true;
if (m_pending_addrmap == nullptr)
- m_pending_addrmap = addrmap_create_mutable (&m_pending_addrmap_obstack);
+ m_pending_addrmap
+ = (new (&m_pending_addrmap_obstack) addrmap_mutable
+ (&m_pending_addrmap_obstack));
m_pending_addrmap->set_empty (start, end_inclusive, block);
}
/* The mutable address map for the compilation unit whose symbols
we're currently reading. The symtabs' shared blockvector will
point to a fixed copy of this. */
- struct addrmap *m_pending_addrmap = nullptr;
+ struct addrmap_mutable *m_pending_addrmap = nullptr;
/* The obstack on which we allocate pending_addrmap.
If pending_addrmap is NULL, this is uninitialized; otherwise, it is
dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
struct gdbarch *gdbarch = objfile->arch ();
const gdb_byte *iter, *end;
- struct addrmap *mutable_map;
+ struct addrmap_mutable *mutable_map;
CORE_ADDR baseaddr;
auto_obstack temp_obstack;
- mutable_map = addrmap_create_mutable (&temp_obstack);
+ mutable_map = new (&temp_obstack) addrmap_mutable (&temp_obstack);
iter = index->address_table.data ();
end = iter + index->address_table.size ();
dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
auto_obstack temp_obstack;
- addrmap *mutable_map = addrmap_create_mutable (&temp_obstack);
+ addrmap_mutable *mutable_map
+ = new (&temp_obstack) addrmap_mutable (&temp_obstack);
if (read_addrmap_from_aranges (per_objfile, section, mutable_map))
per_bfd->index_addrmap = mutable_map->create_fixed (&per_bfd->obstack);
xcalloc, xfree)),
m_index (new cooked_index),
m_addrmap_storage (),
- m_addrmap (addrmap_create_mutable (&m_addrmap_storage))
+ m_addrmap (new (&m_addrmap_storage) addrmap_mutable (&m_addrmap_storage))
{
}
}
/* Return the mutable addrmap that is currently being created. */
- addrmap *get_addrmap ()
+ addrmap_mutable *get_addrmap ()
{
return m_addrmap;
}
/* Storage for the writeable addrmap. */
auto_obstack m_addrmap_storage;
/* A writeable addrmap being constructed by this scanner. */
- addrmap *m_addrmap;
+ addrmap_mutable *m_addrmap;
};
/* An instance of this is created to index a CU. */
m_per_cu (per_cu),
m_language (language),
m_obstack (),
- m_die_range_map (addrmap_create_mutable (&m_obstack))
+ m_die_range_map (new (&m_obstack) addrmap_mutable (&m_obstack))
{
}