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

Tom Tromey
2018-07-12T04:34:02Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

>> @@ -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));

Simon> Here, you might as well write two separate asserts.

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

Simon> Otherwise, LGTM.

I made this change.

Tom