This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Special casing dtors?


Tom Tromey wrote:

I re-read this whole thread this evening, and as far as I can tell,
the original cleanup patch is ok.  Early in the thread, Keith said
he'd send a new one that also removed get_destructor_fn_field.
Keith, could you do that?

I've attached it.


Keith

ChangeLog
2009-04-24  Keith Seitz  <keiths@redhat.com>

	* gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
	* gdbtypes.c (get_destructor_fn_field): Likewise.

Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.162
diff -u -p -r1.162 gdbtypes.c
--- gdbtypes.c	10 Apr 2009 03:36:32 -0000	1.162
+++ gdbtypes.c	24 Apr 2009 17:50:53 -0000
@@ -1334,34 +1334,6 @@ get_vptr_fieldno (struct type *type, str
     }
 }
 
-/* Find the method and field indices for the destructor in class type T.
-   Return 1 if the destructor was found, otherwise, return 0.  */
-
-int
-get_destructor_fn_field (struct type *t, 
-			 int *method_indexp, 
-			 int *field_indexp)
-{
-  int i;
-
-  for (i = 0; i < TYPE_NFN_FIELDS (t); i++)
-    {
-      int j;
-      struct fn_field *f = TYPE_FN_FIELDLIST1 (t, i);
-
-      for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++)
-	{
-	  if (is_destructor_name (TYPE_FN_FIELD_PHYSNAME (f, j)) != 0)
-	    {
-	      *method_indexp = i;
-	      *field_indexp = j;
-	      return 1;
-	    }
-	}
-    }
-  return 0;
-}
-
 static void
 stub_noname_complaint (void)
 {
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.100
diff -u -p -r1.100 gdbtypes.h
--- gdbtypes.h	26 Mar 2009 01:27:45 -0000	1.100
+++ gdbtypes.h	24 Apr 2009 17:50:53 -0000
@@ -1201,8 +1201,6 @@ extern struct type *lookup_template_type
 
 extern int get_vptr_fieldno (struct type *, struct type **);
 
-extern int get_destructor_fn_field (struct type *, int *, int *);
-
 extern int get_discrete_bounds (struct type *, LONGEST *, LONGEST *);
 
 extern int is_ancestor (struct type *, struct type *);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]