Change dwarf2_per_objfile::type_unit_groups to htab_up
authorTom Tromey <tom@tromey.com>
Sat, 8 Feb 2020 20:40:54 +0000 (13:40 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 8 Feb 2020 20:43:24 +0000 (13:43 -0700)
commiteaa5fa8b291fed6f97c315680953ca94d4eafb72
tree988c21327e662e1da916c2ebd8e9463b8c2ad438
parentb0b6a9878a472438a6fe2e93be819546efc5033a
Change dwarf2_per_objfile::type_unit_groups to htab_up

This changes dwarf2_per_objfile::type_unit_groups to be an htab_up,
again allowing us to move the memory used by the hash table from the
objfile obstack to the heap.

2020-02-08  Tom Tromey  <tom@tromey.com>

* dwarf2/read.c (allocate_type_unit_groups_table): Return
htab_up.  Don't allocate on obstack.
(get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
* dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
Change type to htab_up.

Change-Id: Ia045df0ff3ec30aac813da5a9a2314a607ef7ec8
gdb/ChangeLog
gdb/dwarf2/read.c
gdb/dwarf2/read.h