Make load_cu return the loaded dwarf2_cu
In a subsequent patch, the dwarf2_per_cu_data::cu link will be removed.
dwarf2_cu objects will instead need to be looked up from a per-objfile
map, using the dwarf2_per_cu_data object as the key.
To make it easier for some callers, this patch makes load_cu return the
dwarf2_cu it creates. If the caller needs to use the created dwarf2_cu,
it will have it available right away, rather than having to do a map
lookup.
At the same time, this allows changing queue_and_load_all_dwo_tus to
take a dwarf2_cu instead of a dwarf2_per_cu_data.
gdb/ChangeLog:
* dwarf2/read.c (load_cu): Return dwarf2_cu.
(dw2_do_instantiate_symtab): Update.
(queue_and_load_all_dwo_tus): Change parameter from
dwarf2_per_cu_data to dwarf2_cu.
(dwarf2_fetch_die_loc_sect_off): Update.
(dwarf2_fetch_constant_bytes): Update.
(dwarf2_fetch_die_type_sect_off): Update.
Change-Id: I8a04c5d1b8cc661b8203f97999258ba8e04e1765