This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: remove a dead field from cplus_struct_type
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 21 Nov 2012 11:06:53 -0700
- Subject: FYI: remove a dead field from cplus_struct_type
I'm checking this in as obvious.
struct cplus_struct_type has a field that is never set.
This patch removes it.
Tested by rebuilding.
Tom
2012-11-21 Tom Tromey <tromey@redhat.com>
* gdbtypes.h (struct cplus_struct_type) <localtype_ptr>: Remove
field.
(TYPE_LOCALTYPE_PTR, TYPE_LOCALTYPE_FILE, TYPE_LOCALTYPE_LINE):
Remove.
* c-typeprint.c (c_type_print_base): Update.
Index: c-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-typeprint.c,v
retrieving revision 1.86
diff -u -r1.86 c-typeprint.c
--- c-typeprint.c 12 Nov 2012 17:37:36 -0000 1.86
+++ c-typeprint.c 21 Nov 2012 18:06:03 -0000
@@ -1308,12 +1308,6 @@
}
fprintfi_filtered (level, stream, "}");
-
- if (TYPE_LOCALTYPE_PTR (type) && show >= 0)
- fprintfi_filtered (level,
- stream, _(" (Local at %s:%d)\n"),
- TYPE_LOCALTYPE_FILE (type),
- TYPE_LOCALTYPE_LINE (type));
}
do_cleanups (local_cleanups);
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.174
diff -u -r1.174 gdbtypes.h
--- gdbtypes.h 12 Nov 2012 17:37:36 -0000 1.174
+++ gdbtypes.h 21 Nov 2012 18:06:03 -0000
@@ -853,15 +853,6 @@
}
*fn_fieldlists;
- /* Pointer to information about enclosing scope, if this is a
- local type. If it is not a local type, this is NULL. */
- struct local_type_info
- {
- char *file;
- int line;
- }
- *localtype_ptr;
-
/* typedefs defined inside this class. TYPEDEF_FIELD points to an array of
TYPEDEF_FIELD_COUNT elements. */
struct typedef_field
@@ -1226,10 +1217,6 @@
#define TYPE_FN_FIELD_VIRTUAL_P(thisfn, n) ((thisfn)[n].voffset > 1)
#define TYPE_FN_FIELD_STATIC_P(thisfn, n) ((thisfn)[n].voffset == VOFFSET_STATIC)
-#define TYPE_LOCALTYPE_PTR(thistype) (TYPE_CPLUS_SPECIFIC(thistype)->localtype_ptr)
-#define TYPE_LOCALTYPE_FILE(thistype) (TYPE_CPLUS_SPECIFIC(thistype)->localtype_ptr->file)
-#define TYPE_LOCALTYPE_LINE(thistype) (TYPE_CPLUS_SPECIFIC(thistype)->localtype_ptr->line)
-
#define TYPE_TYPEDEF_FIELD_ARRAY(thistype) \
TYPE_CPLUS_SPECIFIC (thistype)->typedef_field
#define TYPE_TYPEDEF_FIELD(thistype, n) \