dwarf_loader: Follow const types too in class_member__cache_byte_size
In the same fashion as DW_TAG_volatile_type, as we need to get to the DW_TAG_base_type at the end of the chain. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
68bac65d2e
commit
ca6dc1446c
|
@ -1927,7 +1927,7 @@ static int class_member__cache_byte_size(struct tag *self, struct cu *cu,
|
|||
if (member->bitfield_size != 0) {
|
||||
struct tag *type = tag__follow_typedef(&member->tag, cu);
|
||||
check_volatile:
|
||||
if (tag__is_volatile(type)) {
|
||||
if (tag__is_volatile(type) || tag__is_const(type)) {
|
||||
type = tag__follow_typedef(type, cu);
|
||||
goto check_volatile;
|
||||
}
|
||||
|
|
|
@ -359,6 +359,11 @@ static inline int tag__is_union(const struct tag *self)
|
|||
return self->tag == DW_TAG_union_type;
|
||||
}
|
||||
|
||||
static inline int tag__is_const(const struct tag *self)
|
||||
{
|
||||
return self->tag == DW_TAG_const_type;
|
||||
}
|
||||
|
||||
static inline bool tag__is_variable(const struct tag *self)
|
||||
{
|
||||
return self->tag == DW_TAG_variable;
|
||||
|
|
Loading…
Reference in New Issue