Remove DWARF queue-related globals
This removes some queue-related globals from the DWARF reader, in
favor of a new member on dwarf2_per_objfile. Globals must be avoided
in this code, because they prevent multi-threading the reader.
gdb/ChangeLog
2020-02-08 Tom Tromey <tom@tromey.com>
* dwarf2/read.h (struct dwarf2_queue_item): Move from
dwarf2/read.c. Remove "next" member. Add constructor ntad
destructor.
(struct dwarf2_per_objfile) <queue>: New member.
* dwarf2/read.c (struct dwarf2_queue_item): Move to
dwarf2/read.h.
(dwarf2_queue, dwarf2_queue_tail): Remove.
(class dwarf2_queue_guard): Add parameter to constructor. Use
DISABLE_COPY_AND_ASSIGN.
<m_per_objfile>: New member.
<~dwarf2_queue_guard>: Rewrite.
(dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
Update.
(~dwarf2_queue_item): New.
Change-Id: Ied1f6ff3691352a66c4709b0b2cba0588f49f79a