From: Simon Marchi Date: Mon, 10 Feb 2025 16:54:57 +0000 (-0500) Subject: gdb/dwarf: remove cooked_index::vec_type X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c6492e7d34cf563a840d26d44b67e41763dcaa4;p=thirdparty%2Fbinutils-gdb.git gdb/dwarf: remove cooked_index::vec_type I find this typedef to be confusing. The name is a bit too generic, so it's not clear what it represents. When using the typedef for a cooked_index_shard unique pointer, I think that spelling out the vector type is not overly long. Change-Id: I99fdab5cd925c37c3835b466ce40ec9c1ec7209d Approved-By: Tom Tromey --- diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index e09be98ea8e..0aaa405ec1a 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -647,7 +647,8 @@ cooked_index::wait (cooked_state desired_state, bool allow_quit) } void -cooked_index::set_contents (vec_type &&vec, deferred_warnings *warn, +cooked_index::set_contents (std::vector &&vec, + deferred_warnings *warn, const parent_map_map *parent_maps) { gdb_assert (m_vector.empty ()); diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h index 8c2cc76fee1..43ac9531251 100644 --- a/gdb/dwarf2/cooked-index.h +++ b/gdb/dwarf2/cooked-index.h @@ -626,11 +626,6 @@ protected: class cooked_index : public dwarf_scanner_base { public: - - /* A convenience typedef for the vector that is contained in this - object. */ - using vec_type = std::vector>; - cooked_index (dwarf2_per_objfile *per_objfile, std::unique_ptr &&worker); ~cooked_index () override; @@ -646,7 +641,8 @@ public: PARENT_MAPS is used when resolving pending parent links. PARENT_MAPS may be NULL if there are no IS_PARENT_DEFERRED entries in VEC. */ - void set_contents (vec_type &&vec, deferred_warnings *warn, + void set_contents (std::vector &&vec, + deferred_warnings *warn, const parent_map_map *parent_maps); /* A range over a vector of subranges. */ @@ -714,7 +710,7 @@ private: /* The vector of cooked_index objects. This is stored because the entries are stored on the obstacks in those objects. */ - vec_type m_vector; + std::vector m_vector; /* This tracks the current state. When this is nullptr, it means that the state is CACHE_DONE -- it's important to note that only