sdbout.c (sdbout_field_types): Don't emit the types of fields we won't be emitting.
authorJason Merrill <jason@yorick.cygnus.com>
Thu, 24 Sep 1998 18:54:38 +0000 (18:54 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 24 Sep 1998 18:54:38 +0000 (14:54 -0400)
* sdbout.c (sdbout_field_types): Don't emit the types of fields we
won't be emitting.

From-SVN: r22576

gcc/ChangeLog
gcc/sdbout.c

index ce01df371f31b8754c083501bc6cffff8b59d1ab..ea3ff4f5cdf648deb4619d449255d8e67d9cfeb4 100644 (file)
@@ -1,3 +1,8 @@
+Thu Sep 24 18:53:20 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * sdbout.c (sdbout_field_types): Don't emit the types of fields we
+       won't be emitting.
+
 Thu Sep 24 17:05:30 1998  Nick Clifton  <nickc@cygnus.com>
 
        * config/arm/arm.md (insv): Add comment.  In CONST_INT case, and
 Thu Sep 24 17:05:30 1998  Nick Clifton  <nickc@cygnus.com>
 
        * config/arm/arm.md (insv): Add comment.  In CONST_INT case, and
index 62559a93acffd8f84bf3871ac5d35366d55d828a..791bd75a57896d0035ccf01b6e6a50409e9701f8 100644 (file)
@@ -1082,10 +1082,18 @@ sdbout_field_types (type)
   tree tail;
 
   for (tail = TYPE_FIELDS (type); tail; tail = TREE_CHAIN (tail))
   tree tail;
 
   for (tail = TYPE_FIELDS (type); tail; tail = TREE_CHAIN (tail))
-    if (POINTER_TYPE_P (TREE_TYPE (tail)))
-      sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
-    else
-      sdbout_one_type (TREE_TYPE (tail));
+    /* This condition should match the one for emitting the actual members
+       below.  */
+    if (TREE_CODE (tail) == FIELD_DECL
+       && DECL_NAME (tail) != 0
+       && TREE_CODE (DECL_SIZE (tail)) == INTEGER_CST
+       && TREE_CODE (DECL_FIELD_BITPOS (tail)) == INTEGER_CST)
+      {
+       if (POINTER_TYPE_P (TREE_TYPE (tail)))
+         sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
+       else
+         sdbout_one_type (TREE_TYPE (tail));
+      }
 }
 
 /* Use this to put out the top level defined record and union types
 }
 
 /* Use this to put out the top level defined record and union types