From fd5866f6aad7336f7a2b59578b9deef81383ea3b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 21 Jun 2019 14:10:15 -0400 Subject: dwarf2read: Get rid of VEC (dwarf2_section_info_def) This patch removes uses of VEC (dwarf2_section_info_def) in favor of std::vector. The conversion is relatively straightforward, no function changes are intended. gdb/ChangeLog: * dwarf2read.h (dwarf2_section_info_def): Remove. (DEF_VEC_O (dwarf2_section_info_def)): Remove. * dwarf2read.c (struct dwo_sections) : Change type to std::vector. (struct dwo_file) <~dwo_file>: Remove. (dwarf2_per_objfile::~dwarf2_per_objfile): Don't manually free types field. (dwarf2_per_objfile::locate_sections): Adjust to std::vector. (dwarf2_read_debug_names): Likewise. (create_debug_types_hash_table): Change parameter type to array_view, adjust code accordingly. (dwarf2_locate_dwo_sections): Adjust to std::vector. (partial_die_info::fixup): Likewise. (determine_prefix): Likewise. * dwarf-index-write.c (write_psymtabs_to_index): Adjust. --- gdb/dwarf-index-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/dwarf-index-write.c') diff --git a/gdb/dwarf-index-write.c b/gdb/dwarf-index-write.c index 9979ae4..3f5862a 100644 --- a/gdb/dwarf-index-write.c +++ b/gdb/dwarf-index-write.c @@ -1638,7 +1638,7 @@ write_psymtabs_to_index (struct dwarf2_per_objfile *dwarf2_per_objfile, if (dwarf2_per_objfile->using_index) error (_("Cannot use an index to create the index")); - if (VEC_length (dwarf2_section_info_def, dwarf2_per_objfile->types) > 1) + if (dwarf2_per_objfile->types.size () > 1) error (_("Cannot make an index when the file has multiple .debug_types sections")); if (!objfile->partial_symtabs->psymtabs -- cgit v1.1