core: enumeration__calc_prefix doesn't need a 'cu' argument
With the conversion of ->name members to plain char strings, no need to use 'cu' to get the old string_t index and find the per-cu string table. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2fae84e2f7
commit
45ec63ed20
|
@ -1706,7 +1706,7 @@ static int strcommon(const char *a, const char *b)
|
|||
return i;
|
||||
}
|
||||
|
||||
void enumeration__calc_prefix(struct type *enumeration, const struct cu *cu)
|
||||
void enumeration__calc_prefix(struct type *enumeration)
|
||||
{
|
||||
if (enumeration->member_prefix)
|
||||
return;
|
||||
|
@ -1743,13 +1743,13 @@ void enumerations__calc_prefix(struct list_head *enumerations)
|
|||
struct tag_cu_node *pos;
|
||||
|
||||
list_for_each_entry(pos, enumerations, node)
|
||||
enumeration__calc_prefix(tag__type(pos->tc.tag), pos->tc.cu);
|
||||
enumeration__calc_prefix(tag__type(pos->tc.tag));
|
||||
}
|
||||
|
||||
const char *enumeration__prefix(struct type *enumeration, const struct cu *cu)
|
||||
{
|
||||
if (!enumeration->member_prefix)
|
||||
enumeration__calc_prefix(enumeration, cu);
|
||||
enumeration__calc_prefix(enumeration);
|
||||
|
||||
return enumeration->member_prefix;
|
||||
}
|
||||
|
@ -1757,7 +1757,7 @@ const char *enumeration__prefix(struct type *enumeration, const struct cu *cu)
|
|||
uint16_t enumeration__prefix_len(struct type *enumeration, const struct cu *cu)
|
||||
{
|
||||
if (!enumeration->member_prefix)
|
||||
enumeration__calc_prefix(enumeration, cu);
|
||||
enumeration__calc_prefix(enumeration);
|
||||
|
||||
return enumeration->member_prefix_len;
|
||||
}
|
||||
|
|
|
@ -1087,7 +1087,7 @@ struct class_member *type__find_member_by_name(const struct type *type, const ch
|
|||
uint32_t type__nr_members_of_type(const struct type *type, const type_id_t oftype);
|
||||
struct class_member *type__last_member(struct type *type);
|
||||
|
||||
void enumeration__calc_prefix(struct type *type, const struct cu *cu);
|
||||
void enumeration__calc_prefix(struct type *type);
|
||||
const char *enumeration__prefix(struct type *type, const struct cu *cu);
|
||||
uint16_t enumeration__prefix_len(struct type *type, const struct cu *cu);
|
||||
int enumeration__max_entry_name_len(struct type *type, const struct cu *cu);
|
||||
|
|
Loading…
Reference in New Issue