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:
Arnaldo Carvalho de Melo 2021-06-25 09:56:00 -03:00
parent 2fae84e2f7
commit 45ec63ed20
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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);