size_t where_offset);
static void
-maybe_canonicalize_type(Dwarf_Die* die,
+maybe_canonicalize_type(const Dwarf_Die* die,
read_context& ctxt);
static uint64_t
///
/// @return true iff a canonical DIE was found for @p die.
bool
- get_canonical_die(Dwarf_Die *die,
+ get_canonical_die(const Dwarf_Die *die,
Dwarf_Die &canonical_die,
size_t where,
bool die_as_type) const
: const_cast<read_context*>(this)->canonical_decl_die_offsets_.
get_container(source);
- Dwarf_Off die_offset = dwarf_dieoffset(die);
+ Dwarf_Off die_offset = dwarf_dieoffset(const_cast<Dwarf_Die*>(die));
if (Dwarf_Off canonical_die_offset =
get_canonical_die_offset(canonical_dies, die_offset))
{
///
/// @return the artifact found.
type_or_decl_base_sptr
- lookup_artifact_from_die(Dwarf_Die *die, bool die_as_type = false) const
+ lookup_artifact_from_die(const Dwarf_Die *die, bool die_as_type = false) const
{
Dwarf_Die equiv_die;
if (!get_or_compute_canonical_die(die, equiv_die, /*where=*/0, die_as_type))
/// @return the type associated to the DIE or NULL if no type is
/// associated to the DIE.
type_base_sptr
- lookup_type_from_die(Dwarf_Die* die) const
+ lookup_type_from_die(const Dwarf_Die* die) const
{
type_or_decl_base_sptr artifact =
lookup_artifact_from_die(die, /*die_as_type=*/true);
/// @param die the type DIE to schedule for late type
/// canonicalization.
void
- schedule_type_for_late_canonicalization(Dwarf_Die *die)
+ schedule_type_for_late_canonicalization(const Dwarf_Die *die)
{
Dwarf_Off o;
die_source source;
///
/// @param ctxt the @ref read_context to use.
static void
-maybe_canonicalize_type(Dwarf_Die *die, read_context& ctxt)
+maybe_canonicalize_type(const Dwarf_Die *die, read_context& ctxt)
{
die_source source;
ABG_ASSERT(ctxt.get_die_source(die, source));
- size_t die_offset = dwarf_dieoffset(die);
+ size_t die_offset = dwarf_dieoffset(const_cast<Dwarf_Die*>(die));
type_base_sptr t = ctxt.lookup_type_from_die(die);
if (!t)