diff --git a/dwarves.c b/dwarves.c index 2b913c6..d78ce2e 100644 --- a/dwarves.c +++ b/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) diff --git a/dwarves.h b/dwarves.h index 88a754c..ea2a88a 100644 --- a/dwarves.h +++ b/dwarves.h @@ -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);