diff options
author | Tom Tromey <tromey@adacore.com> | 2024-08-26 12:12:57 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-08-28 14:14:43 -0600 |
commit | 5a06416ebf9087b0cd20e54c2da58f7b57c6e6a8 (patch) | |
tree | 8e5c0a09f4c57fa33718db2393c06d572356e874 /gdb/dwarf2 | |
parent | a253bea8995323201b016fe477280c1782688ab4 (diff) | |
download | gdb-5a06416ebf9087b0cd20e54c2da58f7b57c6e6a8.zip gdb-5a06416ebf9087b0cd20e54c2da58f7b57c6e6a8.tar.gz gdb-5a06416ebf9087b0cd20e54c2da58f7b57c6e6a8.tar.bz2 |
Don't check dwarf2_name in process_enumeration_scope
I noticed that process_enumeration_scope checks the result of
dwarf2_name. However, this isn't needed, because new_symbol does the
same check. This patch removes the unnecessary code.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 6ef4737..6c503c6 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -13286,7 +13286,6 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) if (die->child != NULL) { struct die_info *child_die; - const char *name; child_die = die->child; while (child_die && child_die->tag) @@ -13296,11 +13295,7 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) process_die (child_die, cu); } else - { - name = dwarf2_name (child_die, cu); - if (name) - new_symbol (child_die, this_type, cu); - } + new_symbol (child_die, this_type, cu); child_die = child_die->sibling; } |