dwarves: Introduce tag__is_tag_type
And comment the difference to tag__is_type: tag__is_type == is this tag derived from the 'type' class? tag__is_tag_type == is this tag a possible type for a tag, i.e. one we will find in struct tag->type? Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
f169bac1cf
commit
d2d07eab08
20
dwarves.h
20
dwarves.h
|
@ -100,6 +100,10 @@ static inline bool tag__has_namespace(const struct tag *self)
|
|||
tag__is_enumeration(self);
|
||||
}
|
||||
|
||||
/**
|
||||
* tag__is_tag_type - is this tag derived from the 'type' class?
|
||||
* @tag - tag queried
|
||||
*/
|
||||
static inline int tag__is_type(const struct tag *self)
|
||||
{
|
||||
return tag__is_union(self) ||
|
||||
|
@ -108,6 +112,22 @@ static inline int tag__is_type(const struct tag *self)
|
|||
tag__is_enumeration(self);
|
||||
}
|
||||
|
||||
/**
|
||||
* tag__is_tag_type - is this one of the possible types for a tag?
|
||||
* @tag - tag queried
|
||||
*/
|
||||
static inline int tag__is_tag_type(const struct tag *self)
|
||||
{
|
||||
return tag__is_type(self) ||
|
||||
tag__is_enumeration(self) ||
|
||||
self->tag == DW_TAG_array_type ||
|
||||
self->tag == DW_TAG_base_type ||
|
||||
self->tag == DW_TAG_const_type ||
|
||||
self->tag == DW_TAG_pointer_type ||
|
||||
self->tag == DW_TAG_subroutine_type ||
|
||||
self->tag == DW_TAG_volatile_type;
|
||||
}
|
||||
|
||||
static inline const char *tag__decl_file(const struct tag *self)
|
||||
{
|
||||
return strings__ptr(strings, self->decl_file);
|
||||
|
|
Loading…
Reference in New Issue