}
void
-cooked_index::set_contents (std::vector<cooked_index_shard_up> &&vec,
+cooked_index::set_contents (std::vector<cooked_index_shard_up> &&shards,
deferred_warnings *warn,
const parent_map_map *parent_maps)
{
- gdb_assert (m_vector.empty ());
- m_vector = std::move (vec);
+ gdb_assert (m_shards.empty ());
+ m_shards = std::move (shards);
m_state->set (cooked_state::MAIN_AVAILABLE);
m_state->set (cooked_state::CACHE_DONE);
});
- for (auto &idx : m_vector)
+ for (auto &shard : m_shards)
{
- auto this_index = idx.get ();
- finalizers.add_task ([=] () { this_index->finalize (parent_maps); });
+ auto this_shard = shard.get ();
+ finalizers.add_task ([=] () { this_shard->finalize (parent_maps); });
}
finalizers.start ();
{
/* Ensure that the address maps are ready. */
wait (cooked_state::MAIN_AVAILABLE, true);
- for (const auto &index : m_vector)
+ for (const auto &shard : m_shards)
{
- dwarf2_per_cu_data *result = index->lookup (addr);
+ dwarf2_per_cu_data *result = shard->lookup (addr);
if (result != nullptr)
return result;
}
/* Ensure that the address maps are ready. */
wait (cooked_state::MAIN_AVAILABLE, true);
std::vector<const addrmap *> result;
- for (const auto &index : m_vector)
- result.push_back (index->m_addrmap);
+ for (const auto &shard : m_shards)
+ result.push_back (shard->m_addrmap);
return result;
}
{
wait (cooked_state::FINALIZED, true);
std::vector<cooked_index_shard::range> result_range;
- result_range.reserve (m_vector.size ());
- for (auto &entry : m_vector)
- result_range.push_back (entry->find (name, completing));
+ result_range.reserve (m_shards.size ());
+ for (auto &shard : m_shards)
+ result_range.push_back (shard->find (name, completing));
return range (std::move (result_range));
}
cooked_index::get_main () const
{
const cooked_index_entry *best_entry = nullptr;
- for (const auto &index : m_vector)
+ for (const auto &shard : m_shards)
{
- const cooked_index_entry *entry = index->get_main ();
+ const cooked_index_entry *entry = shard->get_main ();
/* Choose the first "main" we see. We only do this for names
not requiring canonicalization. At this point in the process
names might not have been canonicalized. However, currently,
{
wait (cooked_state::FINALIZED, true);
std::vector<cooked_index_shard::range> result_range;
- result_range.reserve (m_vector.size ());
- for (auto &entry : m_vector)
- result_range.push_back (entry->all_entries ());
+ result_range.reserve (m_shards.size ());
+ for (auto &shard : m_shards)
+ result_range.push_back (shard->all_entries ());
return range (std::move (result_range));
}
/* The vector of cooked_index objects. This is stored because the
entries are stored on the obstacks in those objects. */
- std::vector<cooked_index_shard_up> m_vector;
+ std::vector<cooked_index_shard_up> m_shards;
/* This tracks the current state. When this is nullptr, it means
that the state is CACHE_DONE -- it's important to note that only