mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-05 12:53:16 +08:00
gdb: make cooked_index_storage::get_abbrev_table_cache
return a reference
It can never return nullptr, return a reference instead of a pointer. Change-Id: Ibc6f16eb74dc16059152982600ca9f426d7f80a4 Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
c9e2e9992a
commit
27f4421427
@ -377,8 +377,8 @@ class cooked_index_storage
|
||||
DISABLE_COPY_AND_ASSIGN (cooked_index_storage);
|
||||
|
||||
/* Return the current abbrev table_cache. */
|
||||
const abbrev_table_cache *get_abbrev_table_cache () const
|
||||
{ return &m_abbrev_table_cache; }
|
||||
const abbrev_table_cache &get_abbrev_table_cache () const
|
||||
{ return m_abbrev_table_cache; }
|
||||
|
||||
/* Return the DIE reader corresponding to PER_CU. If no such reader
|
||||
has been registered, return NULL. */
|
||||
|
@ -4609,7 +4609,7 @@ process_psymtab_comp_unit (dwarf2_per_cu_data *this_cu,
|
||||
if (reader == nullptr)
|
||||
{
|
||||
cutu_reader new_reader (this_cu, per_objfile, nullptr, nullptr, false,
|
||||
storage->get_abbrev_table_cache ());
|
||||
&storage->get_abbrev_table_cache ());
|
||||
|
||||
if (new_reader.comp_unit_die == nullptr || new_reader.dummy_p)
|
||||
return;
|
||||
@ -16243,7 +16243,7 @@ cooked_indexer::ensure_cu_exists (cutu_reader *reader,
|
||||
if (result == nullptr)
|
||||
{
|
||||
cutu_reader new_reader (per_cu, per_objfile, nullptr, nullptr, false,
|
||||
m_index_storage->get_abbrev_table_cache ());
|
||||
&m_index_storage->get_abbrev_table_cache ());
|
||||
|
||||
if (new_reader.dummy_p || new_reader.comp_unit_die == nullptr
|
||||
|| !new_reader.comp_unit_die->has_children)
|
||||
|
Loading…
Reference in New Issue
Block a user