From 3ff11828fee01a913684befb71becfff6b8a626d Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 25 Jun 2021 09:56:00 -0300 Subject: [PATCH] core: enumeration__emit_definitions() doesn't need a 'cu' argument With the conversion of ->name members to plain char strings, no need to use 'cu' to get the old string_t index and find the per-cu string table. Signed-off-by: Arnaldo Carvalho de Melo --- dwarves_emit.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dwarves_emit.c b/dwarves_emit.c index 7c13535..5bf7946 100644 --- a/dwarves_emit.c +++ b/dwarves_emit.c @@ -70,7 +70,7 @@ static struct type *type_emissions__find_fwd_decl(const struct type_emissions *e return NULL; } -static int enumeration__emit_definitions(struct tag *tag, struct cu *cu, +static int enumeration__emit_definitions(struct tag *tag, struct type_emissions *emissions, const struct conf_fprintf *conf, FILE *fp) @@ -154,12 +154,10 @@ static int typedef__emit_definitions(struct tag *tdef, struct cu *cu, if (type__name(ctype) == NULL) { fputs("typedef ", fp); conf.suffix = type__name(def); - enumeration__emit_definitions(type, cu, emissions, - &conf, fp); + enumeration__emit_definitions(type, emissions, &conf, fp); goto out; } else - enumeration__emit_definitions(type, cu, emissions, - &conf, fp); + enumeration__emit_definitions(type, emissions, &conf, fp); } break; case DW_TAG_structure_type: @@ -248,8 +246,7 @@ next_indirection: struct conf_fprintf conf = { .suffix = NULL, }; - return enumeration__emit_definitions(type, cu, emissions, - &conf, fp); + return enumeration__emit_definitions(type, emissions, &conf, fp); } break; case DW_TAG_structure_type: