core: type__delete() doesn't need a 'cu' arg

Since we stopped using per-cu obstacks we don't need it. If we ever
want to use it we can do per thread obstacks.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-06-30 10:07:14 -03:00
parent 0f54ca9c82
commit 33e44f5295
5 changed files with 6 additions and 6 deletions

View File

@ -265,7 +265,7 @@ static int create_new_union(struct cu *cu, const struct btf_type *tp, uint32_t i
return 0;
out_free:
type__delete(un, cu);
type__delete(un);
return -ENOMEM;
}

View File

@ -364,7 +364,7 @@ static int create_new_union(struct ctf *ctf, void *ptr,
return (vlen * member_size);
out_free:
type__delete(un, ctf->priv);
type__delete(un);
return -ENOMEM;
}

View File

@ -1184,7 +1184,7 @@ static struct tag *die__create_new_union(Dwarf_Die *die, struct cu *cu, struct c
dwarf_haschildren(die) != 0 &&
dwarf_child(die, &child) == 0) {
if (die__process_class(&child, utype, cu, conf) != 0) {
type__delete(utype, cu);
type__delete(utype);
utype = NULL;
}
}

View File

@ -121,7 +121,7 @@ void tag__delete(struct tag *tag, struct cu *cu)
switch (tag->tag) {
case DW_TAG_union_type:
type__delete(tag__type(tag), cu); break;
type__delete(tag__type(tag)); break;
case DW_TAG_class_type:
case DW_TAG_structure_type:
class__delete(tag__class(tag)); break;
@ -1120,7 +1120,7 @@ void class__delete(struct class *class)
free(class);
}
void type__delete(struct type *type, struct cu *cu)
void type__delete(struct type *type)
{
if (type == NULL)
return;

View File

@ -980,7 +980,7 @@ static inline struct tag *type__tag(const struct type *type)
return (struct tag *)type;
}
void type__delete(struct type *type, struct cu *cu);
void type__delete(struct type *type);
/**
* type__for_each_tag - iterate thru all the tags