sdbout.c (sdbout_one_type): Use TYPE_VALUES for enums, not TYPE_FIELDS.
authorDJ Delorie <dj@redhat.com>
Fri, 16 Apr 2004 18:40:04 +0000 (14:40 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Fri, 16 Apr 2004 18:40:04 +0000 (14:40 -0400)
* sdbout.c (sdbout_one_type): Use TYPE_VALUES for enums, not
TYPE_FIELDS.
(sdbout_finish): Don't free deferred_global_decls; it's GC'd.

From-SVN: r80761

gcc/ChangeLog
gcc/sdbout.c

index cdcf138060e24eca1984d215a7940116fbf8d88b..f4b2872942dbaa856742d4d0b241d1dd3dba5381 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-16  DJ Delorie  <dj@redhat.com>
+
+       * sdbout.c (sdbout_one_type): Use TYPE_VALUES for enums, not
+       TYPE_FIELDS.
+       (sdbout_finish): Don't free deferred_global_decls; it's GC'd.
+
 2004-04-16  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.md: Remove unnecessary declarations for asm_out_file.
index a6dda21568500d55658ef41a7c65464c6c76f94c..b93ab779712138323cd50a1dfea4dc43ea79bf64 100644 (file)
@@ -1186,7 +1186,7 @@ sdbout_one_type (tree type)
 
        if (TREE_CODE (type) == ENUMERAL_TYPE)
          {
-           for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
+           for (tem = TYPE_VALUES (type); tem; tem = TREE_CHAIN (tem))
              if (host_integerp (TREE_VALUE (tem), 0))
                {
                  PUT_SDB_DEF (IDENTIFIER_POINTER (TREE_PURPOSE (tem)));
@@ -1479,8 +1479,6 @@ sdbout_finish (const char *main_filename ATTRIBUTE_UNUSED)
 
   for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_global_decls); i++)
     sdbout_symbol (VARRAY_TREE (deferred_global_decls, i), 0);
-
-  VARRAY_FREE (deferred_global_decls);
 }
 
 /* Describe the beginning of an internal block within a function.