From 9497d69fc0eeca8682cc09360fb822ced6b4670f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 29 Mar 2023 13:51:13 -0600 Subject: Remove language_demangle I noticed that language_demangle shadows the global "current_language". When I went to fix this, though, I then saw that language_demangle is only called in two places, and has a comment saying it should be removed. This patch removes it. Note that the NULL check in language_demangle is not needed by either of the existing callers. Regression tested on x86-64 Fedora 36. Approved-By: Simon Marchi --- gdb/gdb-demangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/gdb-demangle.c') diff --git a/gdb/gdb-demangle.c b/gdb/gdb-demangle.c index 3af3182..4bcdd98 100644 --- a/gdb/gdb-demangle.c +++ b/gdb/gdb-demangle.c @@ -202,7 +202,7 @@ demangle_command (const char *args, int from_tty) lang = current_language; gdb::unique_xmalloc_ptr demangled - = language_demangle (lang, name, DMGL_ANSI | DMGL_PARAMS); + = lang->demangle_symbol (name, DMGL_ANSI | DMGL_PARAMS); if (demangled != NULL) gdb_printf ("%s\n", demangled.get ()); else -- cgit v1.1