+2012-06-02 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * symtab.c (symbol_demangled_name): New variable `dem_name'. Use
+ it to optimize resolution of demangled name.
+
2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure.ac (development): Define new variable.
const char *
symbol_demangled_name (const struct general_symbol_info *gsymbol)
{
+ const char *dem_name = NULL;
+
switch (gsymbol->language)
{
case language_cplus:
case language_java:
case language_objc:
case language_fortran:
- if (symbol_get_demangled_name (gsymbol) != NULL)
- return symbol_get_demangled_name (gsymbol);
+ dem_name = symbol_get_demangled_name (gsymbol);
break;
case language_ada:
- if (symbol_get_demangled_name (gsymbol) != NULL)
- return symbol_get_demangled_name (gsymbol);
- else
- return ada_decode_symbol (gsymbol);
+ dem_name = symbol_get_demangled_name (gsymbol);
+ if (dem_name == NULL)
+ dem_name = ada_decode_symbol (gsymbol);
break;
default:
break;
}
- return NULL;
+ return dem_name;
}
/* Return the search name of a symbol---generally the demangled or