Re: [RFA 29/42] Move the symbol lists to buildsym_compunit

Simon Marchi
2018-07-10T03:38:44Z

On 2018-05-23 12:58 AM, Tom Tromey wrote:
> @@ -1551,26 +1556,27 @@ augment_type_symtab (void)
> complaint (&symfile_complaints,
> _("Line numbers recorded in a type symtab"));
>
> - if (file_symbols != NULL)
> + if (*get_file_symbols () != NULL)
> {
> struct block *block = BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK);
>
> /* First mark any symbols without a specified symtab as belonging
> to the primary symtab. */
> - set_missing_symtab (file_symbols, cust);
> + set_missing_symtab (buildsym_compunit->m_file_symbols, cust);
>
> - dict_add_pending (BLOCK_DICT (block), file_symbols);
> + dict_add_pending (BLOCK_DICT (block), buildsym_compunit->m_file_symbols);
> }

I find it a bit odd to use get_file_symbols () in the "if" but
buildsym_compunit->m_file_symbols later. I guess it would make
sense for what will eventually become a method of buildsym_compunit
to access the field directly.

The same occurs at different places, with different fields.

Otherwise, LGTM considering Keith's comments.

Simon