Commit a30d4514 by Jason Merrill Committed by Jeff Law

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
parent 32acdfaf
...@@ -9077,6 +9077,9 @@ gen_struct_or_union_type_die (type, context_die) ...@@ -9077,6 +9077,9 @@ gen_struct_or_union_type_die (type, context_die)
else else
{ {
add_AT_flag (type_die, DW_AT_declaration, 1); add_AT_flag (type_die, DW_AT_declaration, 1);
/* We can't do this for function-local types, and we don't need to. */
if (TREE_PERMANENT (type))
add_incomplete_type (type); add_incomplete_type (type);
} }
} }
......
...@@ -4439,6 +4439,9 @@ output_type (type, containing_scope) ...@@ -4439,6 +4439,9 @@ output_type (type, containing_scope)
&& TREE_CODE (TYPE_CONTEXT (type)) != METHOD_TYPE)) && TREE_CODE (TYPE_CONTEXT (type)) != METHOD_TYPE))
&& !finalizing) && !finalizing)
{ {
/* We can't do this for function-local types, and we don't need
to. */
if (TREE_PERMANENT (type))
add_incomplete_type (type); add_incomplete_type (type);
return; /* EARLY EXIT! Avoid setting TREE_ASM_WRITTEN. */ return; /* EARLY EXIT! Avoid setting TREE_ASM_WRITTEN. */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment