Re: [RFA 22/42] Move current_subfile to buildsym_compunit

Simon Marchi
2018-07-10T01:52:28Z

> @@ -901,8 +902,10 @@ void
> push_subfile ()
> {
> gdb_assert (buildsym_compunit != nullptr);
> - gdb_assert (! (current_subfile == NULL || current_subfile->name == NULL));
> - buildsym_compunit->m_subfile_stack.push_back (current_subfile->name);
> + gdb_assert (! (buildsym_compunit->m_current_subfile == NULL
> + || buildsym_compunit->m_current_subfile->name == NULL));

Here, you might as well write two separate asserts.

gdb_assert (buildsym_compunit->m_current_subfile != NULL);
gdb_assert (buildsym_compunit->m_current_subfile->name != NULL);

Otherwise, LGTM.

Simon