diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2025-02-10 11:54:57 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2025-02-11 10:10:31 -0500 |
commit | 6c6492e7d34cf563a840d26d44b67e41763dcaa4 (patch) | |
tree | 8912cd3baa974e5c5d76b0b13f72ef8bd3286bfd | |
parent | 83c30fcc4d10fa3783199379e358a884a64f8688 (diff) | |
download | binutils-6c6492e7d34cf563a840d26d44b67e41763dcaa4.zip binutils-6c6492e7d34cf563a840d26d44b67e41763dcaa4.tar.gz binutils-6c6492e7d34cf563a840d26d44b67e41763dcaa4.tar.bz2 |
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 <tom@tromey.com>
-rw-r--r-- | gdb/dwarf2/cooked-index.c | 3 | ||||
-rw-r--r-- | gdb/dwarf2/cooked-index.h | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index e09be98..0aaa405 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<cooked_index_shard_up> &&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 8c2cc76..43ac953 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<std::unique_ptr<cooked_index_shard>>; - cooked_index (dwarf2_per_objfile *per_objfile, std::unique_ptr<cooked_index_worker> &&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<cooked_index_shard_up> &&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<cooked_index_shard_up> 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 |