summaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 26e20107b19..136dc723d2e 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -940,8 +940,6 @@ static status_t cp_demangle
PARAMS ((const char *, dyn_string_t, int));
static status_t cp_demangle_type
PARAMS ((const char*, dyn_string_t));
-static char* cplus_demangle_v3_all
- PARAMS ((const char*, int));
/* When passed to demangle_bare_function_type, indicates that the
function's return type is not encoded before its parameter types. */
@@ -3687,26 +3685,13 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
If the demangling failes, returns NULL. */
char *
-cplus_demangle_v3 (mangled)
+cplus_demangle_v3 (mangled, options)
const char* mangled;
-{
- return cplus_demangle_v3_all (mangled, 0);
-}
-
-char *
-cplus_demangle_v3_type (mangled)
- const char* mangled;
-{
- return cplus_demangle_v3_all (mangled, 1);
-}
-
-static char *
-cplus_demangle_v3_all (mangled, type)
- const char* mangled;
- int type;
+ int options;
{
dyn_string_t demangled;
status_t status;
+ int type = !!(options & DMGL_TYPES);
if (mangled[0] == '_' && mangled[1] == 'Z')
/* It is not a type. */
@@ -3718,6 +3703,8 @@ cplus_demangle_v3_all (mangled, type)
return NULL;
}
+ flag_verbose = !!(options & DMGL_VERBOSE);
+
/* Create a dyn_string to hold the demangled name. */
demangled = dyn_string_new (0);
/* Attempt the demangling. */