]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gdbtypes.c (get_destructor_fn_field): Return obvious destructors
authorDaniel Jacobowitz <drow@false.org>
Fri, 1 Nov 2002 16:26:09 +0000 (16:26 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 1 Nov 2002 16:26:09 +0000 (16:26 +0000)
based on method name.

gdb/ChangeLog.cplus
gdb/gdbtypes.c

index c2283bf7a652de61335130f0782186089285292f..a55ce94fe30326cdc61231e02bad995515fd3ba3 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-01  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdbtypes.c (get_destructor_fn_field): Return obvious destructors
+       based on method name.
+
 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
 
        * c-typeprint.c (c_type_print_modifier_before): New function.
index 5f0d4fe36493c510cae45a610496494ced38abf8..8dfbed08d964e4858162a162e0b5f2f8b10ccfe4 100644 (file)
@@ -1311,6 +1311,13 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
       int j;
       struct fn_field *f = TYPE_FN_FIELDLIST1 (t, i);
 
+      if (TYPE_FN_FIELDLIST_NAME (t, i)[0] == '~')
+       {
+         *method_indexp = i;
+         *field_indexp = 0;
+         return 1;
+       }
+
       for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++)
        {
          if (is_destructor_name (TYPE_FN_FIELD_PHYSNAME (f, j)) != 0)