From 7569e46d3515f93e9911a0c48819db70de3bba4b Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 30 Jun 2021 10:07:14 -0300 Subject: [PATCH] core: namespace__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 --- dwarf_loader.c | 2 +- dwarves.c | 4 ++-- dwarves.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dwarf_loader.c b/dwarf_loader.c index 74ec7bd..384c811 100644 --- a/dwarf_loader.c +++ b/dwarf_loader.c @@ -1167,7 +1167,7 @@ static struct tag *die__create_new_namespace(Dwarf_Die *die, struct cu *cu, stru dwarf_haschildren(die) != 0 && dwarf_child(die, &child) == 0) { if (die__process_namespace(&child, namespace, cu, conf) != 0) { - namespace__delete(namespace, cu); + namespace__delete(namespace); namespace = NULL; } } diff --git a/dwarves.c b/dwarves.c index 29907af..93b2ab8 100644 --- a/dwarves.c +++ b/dwarves.c @@ -283,7 +283,7 @@ const char *base_type__name(const struct base_type *bt, const struct cu *cu, return bf; } -void namespace__delete(struct namespace *space, struct cu *cu) +void namespace__delete(struct namespace *space) { struct tag *pos, *n; @@ -295,7 +295,7 @@ void namespace__delete(struct namespace *space, struct cu *cu) /* Look for nested namespaces */ if (tag__has_namespace(pos)) - namespace__delete(tag__namespace(pos), cu); + namespace__delete(tag__namespace(pos)); tag__delete(pos); } diff --git a/dwarves.h b/dwarves.h index 2448604..cb1ca63 100644 --- a/dwarves.h +++ b/dwarves.h @@ -591,7 +591,7 @@ static inline struct namespace *tag__namespace(const struct tag *tag) return (struct namespace *)tag; } -void namespace__delete(struct namespace *nspace, struct cu *cu); +void namespace__delete(struct namespace *nspace); /** * namespace__for_each_tag - iterate thru all the tags