summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-12-15 01:48:48 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1998-12-15 01:48:48 +0000
commit5ef8d04df96498c4e03c55d8f124108c034b5e69 (patch)
treefbd03e2591e0f9efd2aa1681f25057a0fd97234a /gcc
parent61438fd7780987b02db23df7f262f2d29a4247d2 (diff)
downloadppe42-gcc-5ef8d04df96498c4e03c55d8f124108c034b5e69.tar.gz
ppe42-gcc-5ef8d04df96498c4e03c55d8f124108c034b5e69.zip
* dwarf2out.c (gen_struct_or_union_type_die): Check AGGREGATE_TYPE_P
instead of TREE_CODE_CLASS == 't'. (gen_type_die): Likewise. (scope_die_for): Ignore FUNCTION_TYPE "scopes". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24319 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dwarf2out.c14
2 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f56cbc37e32..4d7e9072011 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Tue Dec 15 01:45:26 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * dwarf2out.c (gen_struct_or_union_type_die): Check AGGREGATE_TYPE_P
+ instead of TREE_CODE_CLASS == 't'.
+ (gen_type_die): Likewise.
+ (scope_die_for): Ignore FUNCTION_TYPE "scopes".
+
Mon Dec 14 16:23:27 1998 Jim Wilson <wilson@cygnus.com>
* real.c (endian): Disable last change unless
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 8f99206f133..3c59c3f14a9 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7559,7 +7559,7 @@ push_decl_scope (scope)
subtype. In such a case, we need to search the decl_scope_table to
find the parent of this subtype. */
- if (TREE_CODE_CLASS (TREE_CODE (scope)) == 't')
+ if (AGGREGATE_TYPE_P (scope))
containing_scope = TYPE_CONTEXT (scope);
else
containing_scope = NULL_TREE;
@@ -7611,6 +7611,12 @@ scope_die_for (t, context_die)
if (containing_scope && TREE_CODE (containing_scope) == NAMESPACE_DECL)
containing_scope = NULL_TREE;
+ /* Ignore function type "scopes" from the C frontend. They mean that
+ a tagged type is local to a parmlist of a function declarator, but
+ that isn't useful to DWARF. */
+ if (containing_scope && TREE_CODE (containing_scope) == FUNCTION_TYPE)
+ containing_scope = NULL_TREE;
+
/* Function-local tags and functions get stuck in limbo until they are
fixed up by decls_for_scope. */
if (context_die == NULL && containing_scope != NULL_TREE
@@ -8838,7 +8844,7 @@ gen_struct_or_union_type_die (type, context_die)
return;
if (TYPE_CONTEXT (type) != NULL_TREE
- && TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't')
+ && AGGREGATE_TYPE_P (TYPE_CONTEXT (type)))
nested = 1;
scope_die = scope_die_for (type, context_die);
@@ -9051,7 +9057,7 @@ gen_type_die (type, context_die)
/* If this is a nested type whose containing class hasn't been
written out yet, writing it out will cover this one, too. */
if (TYPE_CONTEXT (type)
- && TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't'
+ && AGGREGATE_TYPE_P (TYPE_CONTEXT (type))
&& ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type)))
{
gen_type_die (TYPE_CONTEXT (type), context_die);
@@ -9070,7 +9076,7 @@ gen_type_die (type, context_die)
gen_struct_or_union_type_die (type, context_die);
if (TYPE_CONTEXT (type)
- && TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't'
+ && AGGREGATE_TYPE_P (TYPE_CONTEXT (type))
&& ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type)))
pop_decl_scope ();
OpenPOWER on IntegriCloud