Allocate dwp_file with new
This adds a constructor and initializer to dwp_file and changes it to
be allocated with "new". This removes a bit of manual refcount
management.
Tested by the buildbot.
gdb/ChangeLog
2018-05-18 Tom Tromey <tom@tromey.com>
* dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
unique_ptr.
* dwarf2read.c (struct dwp_file): Add constructor and
initializers.
(open_and_init_dwp_file): Return a unique_ptr.
(dwarf2_per_objfile, create_dwp_hash_table)
(create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
(lookup_dwo_unit_in_dwp): Update.
(open_and_init_dwp_file, get_dwp_file): Update.