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