Remove some explicit memory management from dwarf2read.c
authorTom Tromey <tromey@adacore.com>
Thu, 31 Oct 2019 16:31:28 +0000 (10:31 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 8 Jan 2020 18:17:18 +0000 (11:17 -0700)
commit43816ebc335481c99808c4fdfffb9ea3f510b19a
tree8e5885cd646c1453ff6390e227b3640081cad869
parent915808f652b63746052b1ef59403650b45a30e4f
Remove some explicit memory management from dwarf2read.c

I noticed a few spots in dwarf2read.c that could be improved by moving
to unique_xmalloc_ptr or, in one case, std::vector.

gdb/ChangeLog
2020-01-08  Tom Tromey  <tromey@adacore.com>

* dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
(dwarf2_compute_name, open_dwo_file): Likewise.
(process_enumeration_scope): Use std::vector.
(guess_partial_die_structure_name): Use unique_xmalloc_ptr.
(partial_die_info::fixup, dwarf2_start_subfile)
(guess_full_die_structure_name, dwarf2_name): Likewise.
(determine_prefix): Update.
(guess_full_die_structure_name): Make return type const.
(partial_die_full_name): Return unique_xmalloc_ptr.
(DW_FIELD_ALLOC_CHUNK): Remove.

Change-Id: I1cb278c608041ef36ef1f77c7e7565c921038d08
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.023716 seconds and 4 git commands to generate.