core: Ditch unused cu__find_struct_by_sname()
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
46f3f37241
commit
0d13bc50ee
33
dwarves.c
33
dwarves.c
|
@ -806,39 +806,6 @@ struct tag *cu__find_enumeration_by_name(const struct cu *cu, const char *name,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
struct tag *cu__find_struct_by_sname(const struct cu *cu, strings_t sname,
|
||||
const int include_decls, type_id_t *idp)
|
||||
{
|
||||
uint32_t id;
|
||||
struct tag *pos;
|
||||
|
||||
if (sname == 0)
|
||||
return NULL;
|
||||
|
||||
cu__for_each_type(cu, id, pos) {
|
||||
struct type *type;
|
||||
|
||||
if (!tag__is_struct(pos))
|
||||
continue;
|
||||
|
||||
type = tag__type(pos);
|
||||
if (type->namespace.name == sname) {
|
||||
if (!type->declaration)
|
||||
goto found;
|
||||
|
||||
if (include_decls)
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
found:
|
||||
if (idp != NULL)
|
||||
*idp = id;
|
||||
return pos;
|
||||
|
||||
}
|
||||
|
||||
struct tag *cu__find_type_by_name(const struct cu *cu, const char *name, const int include_decls, type_id_t *idp)
|
||||
{
|
||||
if (cu == NULL || name == NULL)
|
||||
|
|
|
@ -359,8 +359,6 @@ struct tag *cu__find_enumeration_by_name_and_size(const struct cu *cu, const cha
|
|||
struct tag *cu__find_first_typedef_of_type(const struct cu *cu,
|
||||
const type_id_t type);
|
||||
struct tag *cu__find_function_by_name(const struct cu *cu, const char *name);
|
||||
struct tag *cu__find_struct_by_sname(const struct cu *cu, strings_t sname,
|
||||
const int include_decls, type_id_t *idp);
|
||||
struct function *cu__find_function_at_addr(const struct cu *cu,
|
||||
uint64_t addr);
|
||||
struct tag *cu__function(const struct cu *cu, const uint32_t id);
|
||||
|
|
Loading…
Reference in New Issue