+/* The default implementation of la_print_typedef. */
+void default_print_typedef (struct type *type, struct symbol *new_symbol,
+ struct ui_file *stream);
+
+/* Default name hashing function. */
+
+/* Produce an unsigned hash value from SEARCH_NAME that is consistent
+ with strcmp_iw, strcmp, and, at least on Ada symbols, wild_match.
+ That is, two identifiers equivalent according to any of those three
+ comparison operators hash to the same value. */
+extern unsigned int default_search_name_hash (const char *search_name);
+
+void c_get_string (struct value *value,
+ gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
+ 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
+ LOOKUP_NAME. Specifically, if the current language is Ada, this
+ may return an Ada matcher regardless of LANG. */
+symbol_name_matcher_ftype *get_symbol_name_matcher
+ (const language_defn *lang, const lookup_name_info &lookup_name);
+
+/* The languages supported by GDB. */
+
+extern const struct language_defn auto_language_defn;
+extern const struct language_defn unknown_language_defn;
+extern const struct language_defn minimal_language_defn;
+
+extern const struct language_defn ada_language_defn;
+extern const struct language_defn asm_language_defn;
+extern const struct language_defn c_language_defn;
+extern const struct language_defn cplus_language_defn;
+extern const struct language_defn d_language_defn;
+extern const struct language_defn f_language_defn;
+extern const struct language_defn go_language_defn;
+extern const struct language_defn m2_language_defn;
+extern const struct language_defn objc_language_defn;
+extern const struct language_defn opencl_language_defn;
+extern const struct language_defn pascal_language_defn;
+extern const struct language_defn rust_language_defn;
+
+/* Save the current language and restore it upon destruction. */
+
+class scoped_restore_current_language
+{
+public:
+
+ explicit scoped_restore_current_language ()
+ : m_lang (current_language->la_language)
+ {
+ }
+
+ ~scoped_restore_current_language ()
+ {
+ set_language (m_lang);
+ }
+
+ scoped_restore_current_language (const scoped_restore_current_language &)
+ = delete;
+ scoped_restore_current_language &operator=
+ (const scoped_restore_current_language &) = delete;
+
+private:
+
+ enum language m_lang;
+};
+
+/* If language_mode is language_mode_auto,
+ then switch current language to the language of SYM
+ and restore current language upon destruction.
+
+ Else do nothing. */
+
+class scoped_switch_to_sym_language_if_auto
+{
+public:
+
+ explicit scoped_switch_to_sym_language_if_auto (const struct symbol *sym)
+ {
+ if (language_mode == language_mode_auto)
+ {
+ m_lang = current_language->la_language;
+ m_switched = true;
+ set_language (SYMBOL_LANGUAGE (sym));
+ }
+ else
+ {
+ m_switched = false;
+ /* Assign to m_lang to silence a GCC warning. See
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635. */
+ m_lang = language_unknown;
+ }
+ }
+
+ ~scoped_switch_to_sym_language_if_auto ()
+ {
+ if (m_switched)
+ set_language (m_lang);
+ }
+
+ DISABLE_COPY_AND_ASSIGN (scoped_switch_to_sym_language_if_auto);
+
+private:
+ bool m_switched;
+ enum language m_lang;
+};
+