gdb: Add constructor to struct cu_partial_die_info
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 17 May 2019 21:30:34 +0000 (22:30 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 18 May 2019 08:46:29 +0000 (09:46 +0100)
commit122cf0f2d93ae6f7a53e8dd643ebb068b79df9cf
treef847775f48a0f8d6b73962681f766e1330c4ce6c
parent3e2cf42fe5c305ebb5a4a69427a37e950385ea60
gdb: Add constructor to struct cu_partial_die_info

Adds a constructor to 'struct cu_partial_die_info' and disables the
default constructor, preventing partially initialised instances from
being created.

Update 'find_partial_die' to return a const struct.

Users of 'find_partial_die' are updated to take account of the above
two changes.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* dwarf2read.c (struct cu_partial_die_info): Add constructor,
delete default constructor.
(find_partial_die): Update to return const struct.
(partial_die_parent_scope): Move variable declaration into scope
of its use and change its type to auto.
(guess_partial_die_structure_name): Likewise.
(partial_die_info::fixup): Likewise.
gdb/ChangeLog
gdb/dwarf2read.c