Commit ef61eb60 by Richard Guenther Committed by Richard Biener

tree.c (free_lang_data_in_type): Do not clear fields dependent on debuginfo level setting.

2011-12-14  Richard Guenther  <rguenther@suse.de>

	* tree.c (free_lang_data_in_type): Do not clear fields
	dependent on debuginfo level setting.
	(find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
	* tree.h (TYPE_STUB_DECL): Properly check that we access
	a type.

From-SVN: r182329
parent d7288dfb
2011-12-14 Richard Guenther <rguenther@suse.de>
* tree.c (free_lang_data_in_type): Do not clear fields
dependent on debuginfo level setting.
(find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
* tree.h (TYPE_STUB_DECL): Properly check that we access
a type.
2011-12-14 Georg-Johann Lay <avr@gjlay.de> 2011-12-14 Georg-Johann Lay <avr@gjlay.de>
PR target/50931 PR target/50931
...@@ -4521,9 +4521,6 @@ free_lang_data_in_type (tree type) ...@@ -4521,9 +4521,6 @@ free_lang_data_in_type (tree type)
&& TREE_CODE (TYPE_CONTEXT (type)) != FUNCTION_DECL && TREE_CODE (TYPE_CONTEXT (type)) != FUNCTION_DECL
&& TREE_CODE (TYPE_CONTEXT (type)) != NAMESPACE_DECL)) && TREE_CODE (TYPE_CONTEXT (type)) != NAMESPACE_DECL))
TYPE_CONTEXT (type) = NULL_TREE; TYPE_CONTEXT (type) = NULL_TREE;
if (debug_info_level < DINFO_LEVEL_TERSE)
TYPE_STUB_DECL (type) = NULL_TREE;
} }
...@@ -4881,7 +4878,7 @@ find_decls_types_r (tree *tp, int *ws, void *data) ...@@ -4881,7 +4878,7 @@ find_decls_types_r (tree *tp, int *ws, void *data)
} }
} }
fld_worklist_push (TREE_CHAIN (t), fld); fld_worklist_push (TYPE_STUB_DECL (t), fld);
*ws = 0; *ws = 0;
} }
else if (TREE_CODE (t) == BLOCK) else if (TREE_CODE (t) == BLOCK)
......
...@@ -2247,7 +2247,7 @@ extern enum machine_mode vector_type_mode (const_tree); ...@@ -2247,7 +2247,7 @@ extern enum machine_mode vector_type_mode (const_tree);
to point back at the TYPE_DECL node. This allows the debug routines to point back at the TYPE_DECL node. This allows the debug routines
to know that the two nodes represent the same type, so that we only to know that the two nodes represent the same type, so that we only
get one debug info record for them. */ get one debug info record for them. */
#define TYPE_STUB_DECL(NODE) TREE_CHAIN (NODE) #define TYPE_STUB_DECL(NODE) (TREE_CHAIN (TYPE_CHECK (NODE)))
/* In a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, it means the type /* In a RECORD_TYPE, UNION_TYPE or QUAL_UNION_TYPE, it means the type
has BLKmode only because it lacks the alignment requirement for has BLKmode only because it lacks the alignment requirement for
......
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