gdb: Convert language la_get_symbol_name_matcher field to a method
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 1 Jun 2020 10:46:54 +0000 (11:46 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 17 Jun 2020 08:25:09 +0000 (09:25 +0100)
This commit changes the language_data::la_get_symbol_name_matcher
function pointer member variable into a member function of
language_defn.

There should be no user visible changes after this commit.

Before this commit access to the la_get_symbol_name_matcher function
pointer was through the get_symbol_name_matcher function, which looked
something like this (is pseudo-code):

  <return-type>
  get_symbol_name_matcher (language_defn *lang, <other args>)
  {
    if (current_language == ada)
      current_language->la_get_symbol_name_matcher (<other args>);
    else
      lang->la_get_symbol_name_matcher (<other args>);
  }

In this commit I moved the get_symbol_name_matcher as a non-virtual
function in the language_defn base class, I then add a new virtual
method that is only used from within get_symbol_name_matcher, this can
then be overridden by specific languages as needed.  So we now have:

  class language_defn
  {
    <return-type> get_symbol_name_matcher (<args>)
    {
      if (current_language == ada)
        return current_language->get_symbol_name_matcher_inner (<args>);
      else
        return this->get_symbol_name_matcher_inner (<args>);
    }

    virtual <return-type> get_symbol_name_matcher_inner (<args>)
    {
        ....
    }
  }

gdb/ChangeLog:

* ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
(ada_language_data): Delete la_get_symbol_name_matcher
initializer.
(language_defn::get_symbol_name_matcher_inner): New member
function.
* c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
initializer.
(cplus_language_data): Likewise.
(cplus_language::get_symbol_name_matcher_inner): New member
function.
(asm_language_data): Delete la_get_symbol_name_matcher initializer.
(minimal_language_data): Likewise.
* cp-support.h (cp_get_symbol_name_matcher): Update header comment.
* d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
initializer.
* dictionary.c (iter_match_first_hashed): Update call to
get_symbol_name_matcher.
(iter_match_next_hashed): Likewise.
(iter_match_next_linear): Likewise.
* dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
* f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
initializer.
(f_language::get_symbol_name_matcher_inner): New member function.
* go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
initializer.
* language.c (default_symbol_name_matcher): Update header comment,
make static.
(language_defn::get_symbol_name_matcher): New definition.
(language_defn::get_symbol_name_matcher_inner): Likewise.
(get_symbol_name_matcher): Delete.
(unknown_language_data): Delete la_get_symbol_name_matcher
initializer.
(auto_language_data): Likewise.
* language.h (language_data): Delete la_get_symbol_name_matcher
field.
(language_defn::get_symbol_name_matcher): New member function.
(language_defn::get_symbol_name_matcher_inner): Likewise.
(default_symbol_name_matcher): Delete declaration.
* linespec.c (find_methods): Update call to
get_symbol_name_matcher.
* m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
initializer.
* minsyms.c (lookup_minimal_symbol): Update call to
get_symbol_name_matcher.
(iterate_over_minimal_symbols): Likewise.
* objc-lang.c (objc_language_data): Delete
la_get_symbol_name_matcher initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
* psymtab.c (psymbol_name_matches): Update call to
get_symbol_name_matcher.
* rust-lang.c (rust_language_data): Delete
la_get_symbol_name_matcher initializer.
* symtab.c (symbol_matches_search_name): Update call to
get_symbol_name_matcher.
(compare_symbol_name): Likewise.

20 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/c-lang.c
gdb/cp-support.h
gdb/d-lang.c
gdb/dictionary.c
gdb/dwarf2/read.c
gdb/f-lang.c
gdb/go-lang.c
gdb/language.c
gdb/language.h
gdb/linespec.c
gdb/m2-lang.c
gdb/minsyms.c
gdb/objc-lang.c
gdb/opencl-lang.c
gdb/p-lang.c
gdb/psymtab.c
gdb/rust-lang.c
gdb/symtab.c

index ae93dd6ed6de492dc6231b082d3426e2faf92dde..0cb660fa812d09de33d2ef317322a9afd52cf787 100644 (file)
@@ -1,3 +1,62 @@
+2020-06-17  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
+       (ada_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       (language_defn::get_symbol_name_matcher_inner): New member
+       function.
+       * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       (cplus_language_data): Likewise.
+       (cplus_language::get_symbol_name_matcher_inner): New member
+       function.
+       (asm_language_data): Delete la_get_symbol_name_matcher initializer.
+       (minimal_language_data): Likewise.
+       * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
+       * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       * dictionary.c (iter_match_first_hashed): Update call to
+       get_symbol_name_matcher.
+       (iter_match_next_hashed): Likewise.
+       (iter_match_next_linear): Likewise.
+       * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
+       * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       (f_language::get_symbol_name_matcher_inner): New member function.
+       * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       * language.c (default_symbol_name_matcher): Update header comment,
+       make static.
+       (language_defn::get_symbol_name_matcher): New definition.
+       (language_defn::get_symbol_name_matcher_inner): Likewise.
+       (get_symbol_name_matcher): Delete.
+       (unknown_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       (auto_language_data): Likewise.
+       * language.h (language_data): Delete la_get_symbol_name_matcher
+       field.
+       (language_defn::get_symbol_name_matcher): New member function.
+       (language_defn::get_symbol_name_matcher_inner): Likewise.
+       (default_symbol_name_matcher): Delete declaration.
+       * linespec.c (find_methods): Update call to
+       get_symbol_name_matcher.
+       * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
+       initializer.
+       * minsyms.c (lookup_minimal_symbol): Update call to
+       get_symbol_name_matcher.
+       (iterate_over_minimal_symbols): Likewise.
+       * objc-lang.c (objc_language_data): Delete
+       la_get_symbol_name_matcher initializer.
+       * opencl-lang.c (opencl_language_data): Likewise.
+       * p-lang.c (pascal_language_data): Likewise.
+       * psymtab.c (psymbol_name_matches): Update call to
+       get_symbol_name_matcher.
+       * rust-lang.c (rust_language_data): Delete
+       la_get_symbol_name_matcher initializer.
+       * symtab.c (symbol_matches_search_name): Update call to
+       get_symbol_name_matcher.
+       (compare_symbol_name): Likewise.
+
 2020-06-17  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * ada-lang.c (ada_language_data): Delete la_compute_program
index 5caa1716b78be79c14b7d73d1e5f13cdcc904b63..c91597e6406607ac45d3ec40fd3ef4c57d2b05fa 100644 (file)
@@ -13862,7 +13862,7 @@ literal_symbol_name_matcher (const char *symbol_search_name,
     return false;
 }
 
-/* Implement the "la_get_symbol_name_matcher" language_defn method for
+/* Implement the "get_symbol_name_matcher" language_defn method for
    Ada.  */
 
 static symbol_name_matcher_ftype *
@@ -13920,7 +13920,6 @@ extern const struct language_data ada_language_data =
   ada_get_gdb_completer_word_break_characters,
   ada_collect_symbol_completion_matches,
   ada_watch_location_expression,
-  ada_get_symbol_name_matcher, /* la_get_symbol_name_matcher */
   &ada_varobj_ops,
   ada_is_string_type,
   "(...)"                      /* la_struct_too_deep_ellipsis */
@@ -14105,6 +14104,15 @@ public:
   {
     ada_print_type (type, varstring, stream, show, level, flags);
   }
+
+protected:
+  /* See language.h.  */
+
+  symbol_name_matcher_ftype *get_symbol_name_matcher_inner
+       (const lookup_name_info &lookup_name) const override
+  {
+    return ada_get_symbol_name_matcher (lookup_name);
+  }
 };
 
 /* Single instance of the Ada language class.  */
index 9d72c0e324b238d1b5aec6d92cd3894994f6a81e..8edab0779e81fb65c7ed27c81510fb02d0f3b627 100644 (file)
@@ -917,7 +917,6 @@ extern const struct language_data c_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &c_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
@@ -1032,7 +1031,6 @@ extern const struct language_data cplus_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  cp_get_symbol_name_matcher,
   &cplus_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
@@ -1184,6 +1182,16 @@ public:
   {
     return cp_class_name_from_physname (physname);
   }
+
+protected:
+
+  /* See language.h.  */
+
+  symbol_name_matcher_ftype *get_symbol_name_matcher_inner
+       (const lookup_name_info &lookup_name) const override
+  {
+    return cp_get_symbol_name_matcher (lookup_name);
+  }
 };
 
 /* The single instance of the C++ language class.  */
@@ -1225,7 +1233,6 @@ extern const struct language_data asm_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
@@ -1295,7 +1302,6 @@ extern const struct language_data minimal_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 7c948b212cbaeeb5453f2b64a5ee7b3cb6ca41c5..d031ad9a096b3c9e588002d4fc34ae8263224d79 100644 (file)
@@ -127,8 +127,7 @@ extern struct type *cp_lookup_rtti_type (const char *name,
    "function" or "bar::function" in all namespaces is possible.  */
 extern unsigned int cp_search_name_hash (const char *search_name);
 
-/* Implement the "la_get_symbol_name_matcher" language_defn method for
-   C++.  */
+/* Implement the "get_symbol_name_matcher" language_defn method for C++.  */
 extern symbol_name_matcher_ftype *cp_get_symbol_name_matcher
   (const lookup_name_info &lookup_name);
 
index ad16f991dd375e8aedada1b4d96cb2595d9c9d18..4842d4b9d6923e77703c479a4494e89da7c9d1cb 100644 (file)
@@ -160,7 +160,6 @@ extern const struct language_data d_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index da44946a98c09762863b794fa97e8cdd07743a28..c94a49ee3737467e60275980eaa671ee7713b30a 100644 (file)
@@ -584,7 +584,7 @@ iter_match_first_hashed (const struct dictionary *dict,
   unsigned int hash_index = (name.search_name_hash (lang->la_language)
                             % DICT_HASHED_NBUCKETS (dict));
   symbol_name_matcher_ftype *matches_name
-    = get_symbol_name_matcher (lang, name);
+    = lang->get_symbol_name_matcher (name);
   struct symbol *sym;
 
   DICT_ITERATOR_DICT (iterator) = dict;
@@ -612,7 +612,7 @@ iter_match_next_hashed (const lookup_name_info &name,
 {
   const language_defn *lang = DICT_LANGUAGE (DICT_ITERATOR_DICT (iterator));
   symbol_name_matcher_ftype *matches_name
-    = get_symbol_name_matcher (lang, name);
+    = lang->get_symbol_name_matcher (name);
   struct symbol *next;
 
   for (next = DICT_ITERATOR_CURRENT (iterator)->hash_next;
@@ -828,7 +828,7 @@ iter_match_next_linear (const lookup_name_info &name,
   const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
   const language_defn *lang = DICT_LANGUAGE (dict);
   symbol_name_matcher_ftype *matches_name
-    = get_symbol_name_matcher (lang, name);
+    = lang->get_symbol_name_matcher (name);
 
   int i, nsyms = DICT_LINEAR_NSYMS (dict);
   struct symbol *sym, *retval = NULL;
index d15eba9462c41d24b94fb02bf52600b29e3878bf..34915be8da7abb9f74998a4c6ad03a9a3c6ab52f 100644 (file)
@@ -4097,7 +4097,7 @@ dw2_expand_symtabs_matching_symbol
 
       const language_defn *lang = language_def (lang_e);
       symbol_name_matcher_ftype *name_matcher
-       = get_symbol_name_matcher (lang, lookup_name_without_params);
+       = lang->get_symbol_name_matcher (lookup_name_without_params);
 
       name_and_matcher key {
          name_matcher,
index d748db82e4ff33c1f4c0fe2a6f685423f51760cc..42e6c988f3d96d3fd79f8ddfe1ab6a6dba8c0ec6 100644 (file)
@@ -620,7 +620,6 @@ extern const struct language_data f_language_data =
   f_word_break_characters,
   f_collect_symbol_completion_matches,
   c_watch_location_expression,
-  cp_get_symbol_name_matcher,  /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   f_is_string_type_p,
   "(...)"                      /* la_struct_too_deep_ellipsis */
@@ -699,6 +698,16 @@ public:
   {
     f_print_type (type, varstring, stream, show, level, flags);
   }
+
+protected:
+
+  /* See language.h.  */
+
+  symbol_name_matcher_ftype *get_symbol_name_matcher_inner
+       (const lookup_name_info &lookup_name) const override
+  {
+    return cp_get_symbol_name_matcher (lookup_name);
+  }
 };
 
 /* Single instance of the Fortran language class.  */
index 9196cd3c52bea692a5ef5ccb7628165e3f380f9e..661cabbe54cd0adb88cc0b26b40857fea03e63eb 100644 (file)
@@ -545,7 +545,6 @@ extern const struct language_data go_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   go_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 2b2584f49768996d846428bb296ee15972a1caa8..363481bc9d50feadb1ecd6714a1a3f1fecbd7f90 100644 (file)
@@ -622,9 +622,10 @@ language_defn::print_array_index (struct type *index_type, LONGEST index,
   fprintf_filtered (stream, "] = ");
 }
 
-/* See language.h.  */
+/* The default implementation of the get_symbol_name_matcher_inner method
+   from the language_defn class.  Matches with strncmp_iw.  */
 
-bool
+static bool
 default_symbol_name_matcher (const char *symbol_search_name,
                             const lookup_name_info &lookup_name,
                             completion_match_result *comp_match_res)
@@ -649,6 +650,31 @@ default_symbol_name_matcher (const char *symbol_search_name,
 
 /* See language.h.  */
 
+symbol_name_matcher_ftype *
+language_defn::get_symbol_name_matcher
+       (const lookup_name_info &lookup_name) const
+{
+  /* If currently in Ada mode, and the lookup name is wrapped in
+     '<...>', hijack all symbol name comparisons using the Ada
+     matcher, which handles the verbatim matching.  */
+  if (current_language->la_language == language_ada
+      && lookup_name.ada ().verbatim_p ())
+    return current_language->get_symbol_name_matcher_inner (lookup_name);
+
+  return this->get_symbol_name_matcher_inner (lookup_name);
+}
+
+/* See language.h.  */
+
+symbol_name_matcher_ftype *
+language_defn::get_symbol_name_matcher_inner
+       (const lookup_name_info &lookup_name) const
+{
+  return default_symbol_name_matcher;
+}
+
+/* See language.h.  */
+
 bool
 default_is_string_type_p (struct type *type)
 {
@@ -661,24 +687,6 @@ default_is_string_type_p (struct type *type)
   return (type->code ()  == TYPE_CODE_STRING);
 }
 
-/* See language.h.  */
-
-symbol_name_matcher_ftype *
-get_symbol_name_matcher (const language_defn *lang,
-                        const lookup_name_info &lookup_name)
-{
-  /* If currently in Ada mode, and the lookup name is wrapped in
-     '<...>', hijack all symbol name comparisons using the Ada
-     matcher, which handles the verbatim matching.  */
-  if (current_language->la_language == language_ada
-      && lookup_name.ada ().verbatim_p ())
-    return current_language->la_get_symbol_name_matcher (lookup_name);
-
-  if (lang->la_get_symbol_name_matcher != nullptr)
-    return lang->la_get_symbol_name_matcher (lookup_name);
-  return default_symbol_name_matcher;
-}
-
 /* Define the language that is no language.  */
 
 static int
@@ -774,7 +782,6 @@ extern const struct language_data unknown_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   default_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
@@ -848,7 +855,6 @@ extern const struct language_data auto_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   default_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 523a7a923beb3b5db93f799c8e77deec59c73cac..7e5837fdef37a908c93fb0a015031bf08f0b9f4c 100644 (file)
@@ -338,19 +338,6 @@ struct language_data
     gdb::unique_xmalloc_ptr<char> (*la_watch_location_expression)
          (struct type *type, CORE_ADDR addr);
 
-    /* Return a pointer to the function that should be used to match a
-       symbol name against LOOKUP_NAME, according to this language's
-       rules.  The matching algorithm depends on LOOKUP_NAME.  For
-       example, on Ada, the matching algorithm depends on the symbol
-       name (wild/full/verbatim matching), and on whether we're doing
-       a normal lookup or a completion match lookup.
-
-       This field may be NULL, in which case
-       default_symbol_name_matcher is used to perform the
-       matching.  */
-    symbol_name_matcher_ftype *(*la_get_symbol_name_matcher)
-      (const lookup_name_info &);
-
     /* Various operations on varobj.  */
     const struct lang_varobj_ops *la_varobj_ops;
 
@@ -443,6 +430,20 @@ struct language_defn : language_data
     return ::iterate_over_symbols (block, name, domain, callback);
   }
 
+  /* Return a pointer to the function that should be used to match a
+     symbol name against LOOKUP_NAME, according to this language's
+     rules.  The matching algorithm depends on LOOKUP_NAME.  For
+     example, on Ada, the matching algorithm depends on the symbol
+     name (wild/full/verbatim matching), and on whether we're doing
+     a normal lookup or a completion match lookup.
+
+     As Ada wants to capture symbol matching for all languages in some
+     cases, then this method is a non-overridable interface.  Languages
+     should override GET_SYMBOL_NAME_MATCHER_INNER if they need to.  */
+
+  symbol_name_matcher_ftype *get_symbol_name_matcher
+       (const lookup_name_info &lookup_name) const;
+
   /* If this language allows compilation from the gdb command line, then
      this method will return an instance of struct gcc_context appropriate
      to the language.  If compilation for this language is generally
@@ -530,6 +531,14 @@ struct language_defn : language_data
 
   /* List of all known languages.  */
   static const struct language_defn *languages[nr_languages];
+
+protected:
+
+  /* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method.
+     See that method for a description of the arguments.  */
+
+  virtual symbol_name_matcher_ftype *get_symbol_name_matcher_inner
+         (const lookup_name_info &lookup_name) const;
 };
 
 /* Pointer to the language_defn for our current language.  This pointer
@@ -698,13 +707,6 @@ void c_get_string (struct value *value,
                   int *length, struct type **char_type,
                   const char **charset);
 
-/* The default implementation of la_symbol_name_matcher.  Matches with
-   strncmp_iw.  */
-extern bool default_symbol_name_matcher
-  (const char *symbol_search_name,
-   const lookup_name_info &lookup_name,
-   completion_match_result *comp_match_res);
-
 /* Get LANG's symbol_name_matcher method for LOOKUP_NAME.  Returns
    default_symbol_name_matcher if not set.  LANG is used as a hint;
    the function may ignore it depending on the current language and
index ddca05b3dbf6d0419a2676fc147da5cce65c593e..4a634e3aff98e3240d2eb0486e16a68f9729f08c 100644 (file)
@@ -1232,7 +1232,7 @@ find_methods (struct type *t, enum language t_lang, const char *name,
       int method_counter;
       lookup_name_info lookup_name (name, symbol_name_match_type::FULL);
       symbol_name_matcher_ftype *symbol_name_compare
-       = get_symbol_name_matcher (language_def (t_lang), lookup_name);
+       = language_def (t_lang)->get_symbol_name_matcher (lookup_name);
 
       t = check_typedef (t);
 
index 87bf1eb63d58935e8ccc0d99bc6ab1d56971cb6f..9245ebbeeae9cc2606ed3b97415f414dddc0be2b 100644 (file)
@@ -379,7 +379,6 @@ extern const struct language_data m2_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   m2_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 47c6f0bc0cd895f19b61e8cdd51dec4b2bc31427..f4a2544eb1901ecd9162ff2427c35458710102be 100644 (file)
@@ -363,8 +363,8 @@ lookup_minimal_symbol (const char *name, const char *sfile,
                       % MINIMAL_SYMBOL_HASH_SIZE);
 
                  symbol_name_matcher_ftype *match
-                   = get_symbol_name_matcher (language_def (lang),
-                                              lookup_name);
+                   = language_def (lang)->get_symbol_name_matcher
+                                                       (lookup_name);
                  struct minimal_symbol **msymbol_demangled_hash
                    = objfile->per_bfd->msymbol_demangled_hash;
 
@@ -507,7 +507,7 @@ iterate_over_minimal_symbols
       enum language lang = (enum language) liter;
       const language_defn *lang_def = language_def (lang);
       symbol_name_matcher_ftype *name_match
-       = get_symbol_name_matcher (lang_def, lookup_name);
+       = lang_def->get_symbol_name_matcher (lookup_name);
 
       unsigned int hash
        = lookup_name.search_name_hash (lang) % MINIMAL_SYMBOL_HASH_SIZE;
index 8b23c557984ad7bc63b84767d161b3a00a265d4e..9a77f6cb96d8b8d3b503e00ca2491a5f85be11e5 100644 (file)
@@ -354,7 +354,6 @@ extern const struct language_data objc_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 00f88c60373a1de5ca63cf8f64b558ed2d8a08bf..377c550d5a68c9c3b00dcd514115b37c283c80b9 100644 (file)
@@ -1033,7 +1033,6 @@ extern const struct language_data opencl_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   c_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 869c89e926a6f1260e9e20638ba65d408f403765..189617afc06da60b5d5178919e3ea3e49ee5198e 100644 (file)
@@ -410,7 +410,6 @@ extern const struct language_data pascal_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
-  NULL,                                /* la_compare_symbol_for_completion */
   &default_varobj_ops,
   pascal_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index 5960c593fcfc24d4c3b904ecec269c62630dcf99..47e31aab61e09d810639d1f9ee146e42952a74db 100644 (file)
@@ -557,7 +557,7 @@ psymbol_name_matches (partial_symbol *psym,
 {
   const language_defn *lang = language_def (psym->ginfo.language ());
   symbol_name_matcher_ftype *name_match
-    = get_symbol_name_matcher (lang, lookup_name);
+    = lang->get_symbol_name_matcher (lookup_name);
   return name_match (psym->ginfo.search_name (), lookup_name, NULL);
 }
 
index 296bfe1dcf7afce844c989b8a730734605d8c260..3f187bdea50579eef530c0bb0d5a026eb387eb36 100644 (file)
@@ -2065,7 +2065,6 @@ extern const struct language_data rust_language_data =
   default_word_break_characters,
   default_collect_symbol_completion_matches,
   rust_watch_location_expression,
-  NULL,                                /* la_get_symbol_name_matcher */
   &default_varobj_ops,
   rust_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
index b255cc7232737070b4df14febe9b8cf9b42d58ba..ec0d94b87dd71f4888a5e1bf4d4ffc29a83699d8 100644 (file)
@@ -1016,7 +1016,7 @@ symbol_matches_search_name (const struct general_symbol_info *gsymbol,
                            const lookup_name_info &name)
 {
   symbol_name_matcher_ftype *name_match
-    = get_symbol_name_matcher (language_def (gsymbol->language ()), name);
+    = language_def (gsymbol->language ())->get_symbol_name_matcher (name);
   return name_match (gsymbol->search_name (), name, NULL);
 }
 
@@ -5258,7 +5258,7 @@ compare_symbol_name (const char *symbol_name, language symbol_language,
   const language_defn *lang = language_def (symbol_language);
 
   symbol_name_matcher_ftype *name_match
-    = get_symbol_name_matcher (lang, lookup_name);
+    = lang->get_symbol_name_matcher (lookup_name);
 
   return name_match (symbol_name, lookup_name, &match_res);
 }
This page took 0.051035 seconds and 4 git commands to generate.