Avoid extra work in global_symbol_searcher::expand_symtabs
authorTom Tromey <tromey@adacore.com>
Mon, 6 Dec 2021 19:20:28 +0000 (12:20 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 7 Dec 2021 18:12:12 +0000 (11:12 -0700)
commitc5a9fcdfeea5e961b8f73417c213fa570c8affb6
tree380f7224b155f21b5e1142a494790618b9d83fb8
parent4281b0c8fcb19325496094491ce1e046a6401a36
Avoid extra work in global_symbol_searcher::expand_symtabs

I noticed that global_symbol_searcher::expand_symtabs always passes a
file matcher to expand_symtabs_matching.  However, if 'filenames' is
empty, then this always returns true.  It's slightly more efficient to
pass a null file matcher in this case, because that lets the "quick"
symbol implementations skip any filename checks.

Regression tested on x86-64 Fedora 34.
gdb/symtab.c