+2020-04-24 Tom Tromey <tom@tromey.com>
+
+ * symtab.h (symbol_get_demangled_name): Don't declare.
+ * symtab.c (symbol_get_demangled_name): Remove.
+ (general_symbol_info::natural_name)
+ (general_symbol_info::demangled_name): Update.
+
2020-04-24 Tom Tromey <tom@tromey.com>
PR rust/25025:
language_specific.demangled_name = name;
}
-/* Return the demangled name of GSYMBOL. */
-
-const char *
-symbol_get_demangled_name (const struct general_symbol_info *gsymbol)
-{
- if (gsymbol->language () == language_ada)
- {
- if (!gsymbol->ada_mangled)
- return NULL;
- /* Fall through. */
- }
-
- return gsymbol->language_specific.demangled_name;
-}
-
\f
/* Initialize the language dependent portion of a symbol
depending upon the language for the symbol. */
case language_objc:
case language_fortran:
case language_rust:
- if (symbol_get_demangled_name (this) != NULL)
- return symbol_get_demangled_name (this);
+ if (language_specific.demangled_name != nullptr)
+ return language_specific.demangled_name;
break;
case language_ada:
return ada_decode_symbol (this);
case language_objc:
case language_fortran:
case language_rust:
- dem_name = symbol_get_demangled_name (this);
+ dem_name = language_specific.demangled_name;
break;
case language_ada:
dem_name = ada_decode_symbol (this);
short section;
};
-extern const char *symbol_get_demangled_name
- (const struct general_symbol_info *);
-
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
/* Return the address of SYM. The MAYBE_COPIED flag must be set on