diff mbox

remove language_specific.mangled_lang

Message ID m31tekepdd.fsf@sspiff.org
State New
Headers show

Commit Message

Doug Evans Aug. 30, 2015, 4:02 p.m. UTC
Hi.

It's unlikely we'll ever put anything more into this struct
so this patch just deletes it and moves its only member up
into the containing union.

2015-08-30  Doug Evans  <xdje42@gmail.com>

	* symtab.h (general_symbol_info) <mangled_lang>: Delete struct,
	move only member demangled_name up.  All uses updated.

Comments

Doug Evans Sept. 19, 2015, 5:33 a.m. UTC | #1
Doug Evans <xdje42@gmail.com> writes:
> Hi.
>
> It's unlikely we'll ever put anything more into this struct
> so this patch just deletes it and moves its only member up
> into the containing union.
>
> 2015-08-30  Doug Evans  <xdje42@gmail.com>
>
> 	* symtab.h (general_symbol_info) <mangled_lang>: Delete struct,
> 	move only member demangled_name up.  All uses updated.

Committed.
diff mbox

Patch

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 7e6b6dc..f146ff7 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1414,7 +1414,7 @@  ada_decode_symbol (const struct general_symbol_info *arg)
 {
   struct general_symbol_info *gsymbol = (struct general_symbol_info *) arg;
   const char **resultp =
-    &gsymbol->language_specific.mangled_lang.demangled_name;
+    &gsymbol->language_specific.demangled_name;
 
   if (!gsymbol->ada_mangled)
     {
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 1ba691e..7d1052c 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -596,11 +596,11 @@  symbol_set_demangled_name (struct general_symbol_info *gsymbol,
       else
 	{
 	  gsymbol->ada_mangled = 1;
-	  gsymbol->language_specific.mangled_lang.demangled_name = name;
+	  gsymbol->language_specific.demangled_name = name;
 	}
     }
   else
-    gsymbol->language_specific.mangled_lang.demangled_name = name;
+    gsymbol->language_specific.demangled_name = name;
 }
 
 /* Return the demangled name of GSYMBOL.  */
@@ -615,7 +615,7 @@  symbol_get_demangled_name (const struct general_symbol_info *gsymbol)
       /* Fall through.  */
     }
 
-  return gsymbol->language_specific.mangled_lang.demangled_name;
+  return gsymbol->language_specific.demangled_name;
 }
 
 
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 4ff8ae7..64650b7 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -137,11 +137,7 @@  struct general_symbol_info
 
     /* This is used by languages which wish to store a demangled name.
        currently used by Ada, C++, Java, and Objective C.  */
-    struct mangled_lang
-    {
-      const char *demangled_name;
-    }
-    mangled_lang;
+    const char *demangled_name;
   }
   language_specific;