diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-25 14:37:13 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-25 14:37:13 +0000 |
commit | 7a0272bc705d810229126bdfc171d9e919ad7805 (patch) | |
tree | 5db63bc9feaeb83a783e203c848ec4ff823b477e /gcc/sdbout.c | |
parent | f2bfaeea1d2610e47e862b8e88412e6647e07d82 (diff) | |
download | gcc-7a0272bc705d810229126bdfc171d9e919ad7805.tar.gz |
Fix nightly testing i386-coff libstdc++ build failure.
* sdbout.c (sdbout_one_type): Don't look at TYPE_BINFO field of enums.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sdbout.c')
-rw-r--r-- | gcc/sdbout.c | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/gcc/sdbout.c b/gcc/sdbout.c index 791bd75a578..1823155cea5 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -1206,34 +1206,41 @@ sdbout_one_type (type) /* Print out the base class information with fields named after the types they hold. */ - if (TYPE_BINFO (type) - && TYPE_BINFO_BASETYPES (type)) - n_baseclasses = TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (type)); - for (i = 0; i < n_baseclasses; i++) + /* This is only relevent to aggregate types. TYPE_BINFO is used + for other purposes in an ENUMERAL_TYPE, so we must exclude that + case. */ + if (TREE_CODE (type) != ENUMERAL_TYPE) { - tree child = TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (type)), i); - tree child_type = BINFO_TYPE (child); - tree child_type_name; - if (TYPE_NAME (child_type) == 0) - continue; - if (TREE_CODE (TYPE_NAME (child_type)) == IDENTIFIER_NODE) - child_type_name = TYPE_NAME (child_type); - else if (TREE_CODE (TYPE_NAME (child_type)) == TYPE_DECL) + if (TYPE_BINFO (type) + && TYPE_BINFO_BASETYPES (type)) + n_baseclasses = TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (type)); + for (i = 0; i < n_baseclasses; i++) { - child_type_name = DECL_NAME (TYPE_NAME (child_type)); - if (child_type_name && template_name_p (child_type_name)) - child_type_name - = DECL_ASSEMBLER_NAME (TYPE_NAME (child_type)); - } - else - continue; + tree child = TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (type)), + i); + tree child_type = BINFO_TYPE (child); + tree child_type_name; + if (TYPE_NAME (child_type) == 0) + continue; + if (TREE_CODE (TYPE_NAME (child_type)) == IDENTIFIER_NODE) + child_type_name = TYPE_NAME (child_type); + else if (TREE_CODE (TYPE_NAME (child_type)) == TYPE_DECL) + { + child_type_name = DECL_NAME (TYPE_NAME (child_type)); + if (child_type_name && template_name_p (child_type_name)) + child_type_name + = DECL_ASSEMBLER_NAME (TYPE_NAME (child_type)); + } + else + continue; - CONTIN; - PUT_SDB_DEF (IDENTIFIER_POINTER (child_type_name)); - PUT_SDB_INT_VAL (TREE_INT_CST_LOW (BINFO_OFFSET (child))); - PUT_SDB_SCL (member_scl); - sdbout_type (BINFO_TYPE (child)); - PUT_SDB_ENDEF; + CONTIN; + PUT_SDB_DEF (IDENTIFIER_POINTER (child_type_name)); + PUT_SDB_INT_VAL (TREE_INT_CST_LOW (BINFO_OFFSET (child))); + PUT_SDB_SCL (member_scl); + sdbout_type (BINFO_TYPE (child)); + PUT_SDB_ENDEF; + } } /* output the individual fields */ |