]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: use term "shard" instead of "index"
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 12 Feb 2025 15:52:51 +0000 (10:52 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 14 Feb 2025 18:17:35 +0000 (13:17 -0500)
A bit more changes as in 8e745eac7db3 ("gdb/dwarf: rename
cooked_index::m_vector to m_shards").  I think it's clearer if the term
"index" is reserved for the whole thing, while "shard" or "index shard"
are used for the parts.

Change-Id: I457bb0016a70f3f9918f4a3c3977262a7801705b
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/cooked-index.h
gdb/dwarf2/read.c

index b7a38b8367dee2b4c572d6cc63d651bcd3292483..4ab1adbe05e1142f40349d4308a80f7c3ae4c3d7 100644 (file)
@@ -400,7 +400,7 @@ public:
                           cooked_index_entry_ref parent_entry,
                           dwarf2_per_cu_data *per_cu)
   {
-    return m_index->add (die_offset, tag, flags, per_cu->lang (),
+    return m_shard->add (die_offset, tag, flags, per_cu->lang (),
                         name, parent_entry, per_cu);
   }
 
@@ -408,8 +408,8 @@ public:
      then transfer ownership of the index to the caller.  */
   std::unique_ptr<cooked_index_shard> release ()
   {
-    m_index->install_addrmap (&m_addrmap);
-    return std::move (m_index);
+    m_shard->install_addrmap (&m_addrmap);
+    return std::move (m_shard);
   }
 
   /* Return the mutable addrmap that is currently being created.  */
@@ -445,7 +445,7 @@ private:
   /* A hash table of cutu_reader objects.  */
   htab_up m_reader_hash;
   /* The index shard that is being constructed.  */
-  std::unique_ptr<cooked_index_shard> m_index;
+  std::unique_ptr<cooked_index_shard> m_shard;
 
   /* Parent map for each CU that is read.  */
   parent_map m_parent_map;
index 6bd9c4ddd70f92e381b6fdba34539ca20113a8ec..9b10c7fb8f5a8de38b286729bc04eb34ce90b7ae 100644 (file)
@@ -3640,7 +3640,7 @@ cooked_index_storage::cooked_index_storage ()
                                      eq_cutu_reader,
                                      htab_delete_entry<cutu_reader>,
                                      xcalloc, xfree)),
-    m_index (new cooked_index_shard)
+    m_shard (new cooked_index_shard)
 {
 }
 
@@ -4204,18 +4204,19 @@ cooked_index_debug_info::done_reading ()
 {
   /* Only handle the scanning results here.  Complaints and exceptions
      can only be dealt with on the main thread.  */
-  std::vector<std::unique_ptr<cooked_index_shard>> indexes;
+  std::vector<std::unique_ptr<cooked_index_shard>> shards;
+
   for (auto &one_result : m_results)
     {
-      indexes.push_back (std::move (std::get<0> (one_result)));
+      shards.push_back (std::move (std::get<0> (one_result)));
       m_all_parents_map.add_map (std::get<3> (one_result));
     }
 
   /* This has to wait until we read the CUs, we need the list of DWOs.  */
   process_skeletonless_type_units (m_per_objfile, &m_index_storage);
 
-  indexes.push_back (m_index_storage.release ());
-  indexes.shrink_to_fit ();
+  shards.push_back (m_index_storage.release ());
+  shards.shrink_to_fit ();
 
   m_all_parents_map.add_map (m_index_storage.release_parent_map ());
 
@@ -4223,7 +4224,7 @@ cooked_index_debug_info::done_reading ()
   cooked_index *table
     = (gdb::checked_static_cast<cooked_index *>
        (per_bfd->index_table.get ()));
-  table->set_contents (std::move (indexes), &m_warnings,
+  table->set_contents (std::move (shards), &m_warnings,
                       &m_all_parents_map);
 }