Replace symbol_symtab with symbol::symtab

This turns symbol_symtab into a method on symbol.  It also replaces
symbol_set_symtab with a method.
This commit is contained in:
Tom Tromey 2022-04-17 20:00:59 -06:00
parent bcd6845e2b
commit 4206d69e96
20 changed files with 76 additions and 76 deletions

View file

@ -3681,7 +3681,7 @@ See set/show multiple-symbol."));
struct symtab *symtab = NULL;
if (syms[i].symbol->is_objfile_owned ())
symtab = symbol_symtab (syms[i].symbol);
symtab = syms[i].symbol->symtab ();
if (syms[i].symbol->line () != 0 && symtab != NULL)
{
@ -4712,9 +4712,9 @@ cache_symbol (const char *name, domain_enum domain, struct symbol *sym,
the symbol is local or not, we check the block where we found it
against the global and static blocks of its associated symtab. */
if (sym
&& BLOCKVECTOR_BLOCK (symbol_symtab (sym)->compunit ()->blockvector (),
&& BLOCKVECTOR_BLOCK (sym->symtab ()->compunit ()->blockvector (),
GLOBAL_BLOCK) != block
&& BLOCKVECTOR_BLOCK (symbol_symtab (sym)->compunit ()->blockvector (),
&& BLOCKVECTOR_BLOCK (sym->symtab ()->compunit ()->blockvector (),
STATIC_BLOCK) != block)
return;