[pushed] Make demangled_name_entry::language not a bitfield

Sourceware to Gerrit sync (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Tue Oct 22 20:38:00 GMT 2019


Sourceware to Gerrit sync has submitted this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/221
......................................................................

Make demangled_name_entry::language not a bitfield

Having it as a bitfield causes extra work, and this is not memory-sensitive.
Furthermore, once https://sourceware.org/ml/gdb-patches/2019-10/msg00812.html
lands, the bitfield won't even save any memory at all.

gdb/ChangeLog:

2019-10-22  Christian Biesinger  <cbiesinger@google.com>

	* symtab.c (struct demangled_name_entry) <language>: Change from
	bitfield to regular variable.

Change-Id: I4ea31d1cfcbe0f09a09bd058cd304862308dc388
---
M gdb/ChangeLog
M gdb/symtab.c
2 files changed, 6 insertions(+), 1 deletion(-)


diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8255a85..9cd38a3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-10-22  Christian Biesinger  <cbiesinger@google.com>
 
+	* symtab.c (struct demangled_name_entry) <language>: Change from
+	bitfield to regular variable.
+
+2019-10-22  Christian Biesinger  <cbiesinger@google.com>
+
 	* symtab.c (struct demangled_name_entry): Add a constructor.
 	(free_demangled_name_entry): New function to call the destructor
 	for demangled_name_entry.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index ed55cec..0a87fec 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -719,7 +719,7 @@
     : mangled (mangled_name) {}
 
   gdb::string_view mangled;
-  ENUM_BITFIELD(language) language : LANGUAGE_BITS;
+  enum language language;
   char demangled[1];
 };
 



More information about the Gdb-patches mailing list