aboutsummaryrefslogtreecommitdiff
path: root/gcc/sdbout.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-09-24 18:54:38 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-09-24 14:54:38 -0400
commit0dbb7a102fb7de141d7043daedaabe62a5a8465e (patch)
tree34725d61b86dbb0c36c55cadfa707a870a6dc57b /gcc/sdbout.c
parent03d368760cbb45d5af56242d8819bb4357f46655 (diff)
downloadgcc-0dbb7a102fb7de141d7043daedaabe62a5a8465e.zip
gcc-0dbb7a102fb7de141d7043daedaabe62a5a8465e.tar.gz
gcc-0dbb7a102fb7de141d7043daedaabe62a5a8465e.tar.bz2
sdbout.c (sdbout_field_types): Don't emit the types of fields we won't be emitting.
* sdbout.c (sdbout_field_types): Don't emit the types of fields we won't be emitting. From-SVN: r22576
Diffstat (limited to 'gcc/sdbout.c')
-rw-r--r--gcc/sdbout.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 62559a9..791bd75 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -1082,10 +1082,18 @@ sdbout_field_types (type)
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