Remove some usages of get_dwarf2_per_objfile
This patch removes some usages of get_dwarf2_per_objfile, where we can
get hold of the dwarf2_per_objfile object in a simpler way. For
example, it's simpler (and slightly less work) to pass
dwarf2_per_objfile and get the objfile from it than to pass the objfile
and call get_dwarf2_per_objfile.
Ideally, get_dwarf2_per_objfile should only be used in the entry points
of the dwarf2 code, where we receive an objfile.
gdb/ChangeLog:
* dwarf2read.c (create_cus_from_index_list): Replace objfile arg
with dwarf2_per_objfile.
(create_cus_from_index): Likewise.
(create_signatured_type_table_from_index): Likewise.
(dwarf2_read_index): Likewise.
(dwarf2_initialize_objfile): Likewise.
(dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
per_cu rather than get_dwarf2_per_objfile.