Re: [RFA 05/15] Simplify calls to init_psymbol_list

Tom Tromey
2018-09-23T21:12:22Z

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

>> void
>> init_psymbol_list (struct objfile *objfile, int total_symbols)
>> {
>> - /* Free any previously allocated psymbol lists. */
>> - objfile->global_psymbols.clear ();
>> - objfile->static_psymbols.clear ();
>> + if (objfile->global_psymbols.capacity () == 0
>> + && objfile->static_psymbols.capacity () == 0)
>> + return;

Simon> Hmm, isn't the condition backwards?

Yep.

Simon> Would LGTM with the condition fixed (assuming I am not the one being confused)
Simon> or removed.

I've fixed it locally.

Tom