]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Hoist language-finding in expand_symtabs_matching
authorTom Tromey <tom@tromey.com>
Sat, 8 Feb 2025 02:14:35 +0000 (19:14 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 20 Feb 2025 01:11:24 +0000 (18:11 -0700)
commitd08ab84d89035ed1ef489fc230756fa7779255a7
tree7bd0ed2019945cf84794e83859bd8d0b5c28298e
parentc91f9c8c0a28149b8da39b4403444afa45c9ffff
Hoist language-finding in expand_symtabs_matching

Right now, cooked_index_functions::expand_symtabs_matching computes
the language for each component of a split name, using the language of
the corresponding entry.

Instead, I think that we want to do all the comparisons using the
final entry's language.  I don't think there's a way to trigger bad
behavior here right now, but with another series I'm working on, we
end up with some entries whose language can't reliably be determined;
and in this case using the final entry's language avoids issues.

I suspect we could also dispense with the per-segment name-matcher
lookup as well.
gdb/dwarf2/read.c