aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDmitry Neverov <dmitry.neverov@jetbrains.com>2024-05-06 17:09:18 +0200
committerTom Tromey <tromey@adacore.com>2024-05-17 08:02:29 -0600
commit5d0e1642037299741331fa6e76f68c0b1180b9e5 (patch)
tree9d54496e83f14cf691f26f24d6187e856fe27c89 /gdb
parent3a0fae312983989a33608d924ff902d7b78e8ec1 (diff)
downloadgdb-5d0e1642037299741331fa6e76f68c0b1180b9e5.zip
gdb-5d0e1642037299741331fa6e76f68c0b1180b9e5.tar.gz
gdb-5d0e1642037299741331fa6e76f68c0b1180b9e5.tar.bz2
gdb/symtab: reuse last segment lookup name info by creating it outside the loop
Diffstat (limited to 'gdb')
-rw-r--r--gdb/dwarf2/read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index e2f010b..a49ade9 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -16643,6 +16643,9 @@ cooked_index_functions::expand_symtabs_matching
= lookup_name_without_params.split_name (lang);
std::string last_name (name_vec.back ());
+ lookup_name_info last_segment_lookup_name (
+ last_name, symbol_name_match_type::FULL, completing, true);
+
for (const cooked_index_entry *entry : table->find (last_name,
completing))
{
@@ -16702,9 +16705,6 @@ cooked_index_functions::expand_symtabs_matching
if (entry->lang != language_unknown)
{
const language_defn *lang_def = language_def (entry->lang);
- lookup_name_info last_segment_lookup_name (
- last_name.data (), symbol_name_match_type::FULL,
- false, true);
symbol_name_matcher_ftype *name_matcher
= lang_def->get_symbol_name_matcher
(last_segment_lookup_name);