core: enumeration__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:
parent
33e44f5295
commit
6340cb4627
|
@ -308,7 +308,7 @@ static int create_new_enumeration(struct cu *cu, const struct btf_type *tp, uint
|
|||
|
||||
return 0;
|
||||
out_free:
|
||||
enumeration__delete(enumeration, cu);
|
||||
enumeration__delete(enumeration);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ static int create_new_enumeration(struct ctf *ctf, void *ptr,
|
|||
|
||||
return (vlen * sizeof(*ep));
|
||||
out_free:
|
||||
enumeration__delete(enumeration, ctf->priv);
|
||||
enumeration__delete(enumeration);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
@ -1417,7 +1417,7 @@ static struct tag *die__create_new_enumeration(Dwarf_Die *die, struct cu *cu, st
|
|||
out:
|
||||
return &enumeration->namespace.tag;
|
||||
out_delete:
|
||||
enumeration__delete(enumeration, cu);
|
||||
enumeration__delete(enumeration);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ void tag__delete(struct tag *tag, struct cu *cu)
|
|||
case DW_TAG_structure_type:
|
||||
class__delete(tag__class(tag)); break;
|
||||
case DW_TAG_enumeration_type:
|
||||
enumeration__delete(tag__type(tag), cu); break;
|
||||
enumeration__delete(tag__type(tag)); break;
|
||||
case DW_TAG_subroutine_type:
|
||||
ftype__delete(tag__ftype(tag), cu); break;
|
||||
case DW_TAG_subprogram:
|
||||
|
@ -1129,12 +1129,12 @@ void type__delete(struct type *type)
|
|||
free(type);
|
||||
}
|
||||
|
||||
static void enumerator__delete(struct enumerator *enumerator, struct cu *cu)
|
||||
static void enumerator__delete(struct enumerator *enumerator)
|
||||
{
|
||||
free(enumerator);
|
||||
}
|
||||
|
||||
void enumeration__delete(struct type *type, struct cu *cu)
|
||||
void enumeration__delete(struct type *type)
|
||||
{
|
||||
struct enumerator *pos, *n;
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ void enumeration__delete(struct type *type, struct cu *cu)
|
|||
|
||||
type__for_each_enumerator_safe_reverse(type, pos, n) {
|
||||
list_del_init(&pos->tag.node);
|
||||
enumerator__delete(pos, cu);
|
||||
enumerator__delete(pos);
|
||||
}
|
||||
|
||||
free(type);
|
||||
|
|
|
@ -1284,7 +1284,7 @@ static inline const char *enumerator__name(const struct enumerator *enumerator)
|
|||
return enumerator->name;
|
||||
}
|
||||
|
||||
void enumeration__delete(struct type *type, struct cu *cu);
|
||||
void enumeration__delete(struct type *type);
|
||||
void enumeration__add(struct type *type, struct enumerator *enumerator);
|
||||
size_t enumeration__fprintf(const struct tag *tag_enum,
|
||||
const struct conf_fprintf *conf, FILE *fp);
|
||||
|
|
Loading…
Reference in New Issue