diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-07-06 18:16:01 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-07-06 18:16:01 -0600 |
commit | a30d4514f558378a77b59c199edb02b8808f6619 (patch) | |
tree | c440af33572a93d438bd68e1fd7feb33cd15e92c | |
parent | 32acdfafea5d00466723e6725fc4e391890acdc8 (diff) | |
download | gcc-a30d4514f558378a77b59c199edb02b8808f6619.zip gcc-a30d4514f558378a77b59c199edb02b8808f6619.tar.gz gcc-a30d4514f558378a77b59c199edb02b8808f6619.tar.bz2 |
dwarf2out.c (gen_struct_or_union_type_die): Only remember types on the permanent_obstack.
p
* dwarf2out.c (gen_struct_or_union_type_die): Only remember types
on the permanent_obstack.
* dwarfout.c (output_type): Likewise.
From-SVN: r27969
-rw-r--r-- | gcc/dwarf2out.c | 5 | ||||
-rw-r--r-- | gcc/dwarfout.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8b81267..5c108da 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9077,7 +9077,10 @@ gen_struct_or_union_type_die (type, context_die) else { add_AT_flag (type_die, DW_AT_declaration, 1); - add_incomplete_type (type); + + /* We can't do this for function-local types, and we don't need to. */ + if (TREE_PERMANENT (type)) + add_incomplete_type (type); } } diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 9c419a8..0a30a97 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -4439,7 +4439,10 @@ output_type (type, containing_scope) && TREE_CODE (TYPE_CONTEXT (type)) != METHOD_TYPE)) && !finalizing) { - add_incomplete_type (type); + /* We can't do this for function-local types, and we don't need + to. */ + if (TREE_PERMANENT (type)) + add_incomplete_type (type); return; /* EARLY EXIT! Avoid setting TREE_ASM_WRITTEN. */ } |