Commit 4a24ddb9 by Jakub Jelinek Committed by Jakub Jelinek

dwarf2out.c (modified_type_die): Don't add DW_AT_name to DW_TAG_{const,volatile}_type if...

	* dwarf2out.c (modified_type_die): Don't add DW_AT_name to
	DW_TAG_{const,volatile}_type if its DW_AT_type already has the
	same name and isn't the main variant.

From-SVN: r152468
parent 7555009a
2009-10-05 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (modified_type_die): Don't add DW_AT_name to
DW_TAG_{const,volatile}_type if its DW_AT_type already has the
same name and isn't the main variant.
PR debug/41558
* dwarf2out.c (loc_by_reference): Removed.
(dw_loc_list_1): New function.
......@@ -11971,10 +11971,16 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
/* Builtin types don't have a DECL_ORIGINAL_TYPE. For those,
don't output a DW_TAG_typedef, since there isn't one in the
user's program; just attach a DW_AT_name to the type. */
user's program; just attach a DW_AT_name to the type.
Don't attach a DW_AT_name to DW_TAG_const_type or DW_TAG_volatile_type
if the base type already has the same name. */
if (name
&& (TREE_CODE (name) != TYPE_DECL
|| (TREE_TYPE (name) == qualified_type && DECL_NAME (name))))
&& ((TREE_CODE (name) != TYPE_DECL
&& (qualified_type == TYPE_MAIN_VARIANT (type)
|| (!is_const_type && !is_volatile_type)))
|| (TREE_CODE (name) == TYPE_DECL
&& TREE_TYPE (name) == qualified_type
&& DECL_NAME (name))))
{
if (TREE_CODE (name) == TYPE_DECL)
/* Could just call add_name_and_src_coords_attributes here,
......
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