[PATCH 6/7] dwarves: Use tag__delete for enumeration children
Arnaldo Carvalho de Melo <[email protected]> Thu, 18 Jun 2026 14:33:15 -0300
| Newsgroups | org.kernel.vger.dwarves |
|---|---|
| Message-ID | <[email protected]> |
From: Arnaldo Carvalho de Melo <[email protected]> Now that enumeration children can be other tag types like DW_TAG_subprogram, use the generic tag__delete() which handles all tag types, removing the enumerator-specific wrapper. Fixes: a1b3ec41fcc2433d ("dwarf_loader: Initial support for DW_TAG_subprogram in DW_TAG_enumeration") Assisted-by: Claude:claude-opus-4-6-1m Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> --- dwarves.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dwarves.c b/dwarves.c index 2af10588ff2f20c5..90e244afb017d7d2 100644 --- a/dwarves.c +++ b/dwarves.c @@ -1333,11 +1333,6 @@ void type__delete(struct type *type, struct cu *cu) cu__tag_free(cu, type__tag(type)); } -static void enumerator__delete(struct enumerator *enumerator, struct cu *cu) -{ - cu__tag_free(cu, &enumerator->tag); -} - void enumeration__delete(struct type *type, struct cu *cu) { struct enumerator *pos, *n; @@ -1347,7 +1342,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); + tag__delete(&pos->tag, cu); } if (type->suffix_disambiguation) -- 2.54.0