mirror of git://gcc.gnu.org/git/gcc.git
Enable the array descr language hook for all DWARF versions
* dwarf2out.c (gen_type_die_with_usage): Enable the array lang-hook even when (dwarf_version < 3 && dwarf_strict). (gen_descr_array_die): Do not output DW_AT_data_locationn, DW_AT_associated, DW_AT_allocated and DW_AT_byte_stride DWARF attributes when (dwarf_version < 3 && dwarf_strict). From-SVN: r218824
This commit is contained in:
parent
616743a89d
commit
de8143caad
|
|
@ -1,3 +1,11 @@
|
||||||
|
2014-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
|
||||||
|
|
||||||
|
* dwarf2out.c (gen_type_die_with_usage): Enable the array lang-hook
|
||||||
|
even when (dwarf_version < 3 && dwarf_strict).
|
||||||
|
(gen_descr_array_die): Do not output DW_AT_data_locationn,
|
||||||
|
DW_AT_associated, DW_AT_allocated and DW_AT_byte_stride DWARF
|
||||||
|
attributes when (dwarf_version < 3 && dwarf_strict).
|
||||||
|
|
||||||
2014-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
|
2014-12-17 Pierre-Marie de Rodat <derodat@adacore.com>
|
||||||
|
|
||||||
* dwarf2out.h (enum array_descr_ordering): New.
|
* dwarf2out.h (enum array_descr_ordering): New.
|
||||||
|
|
|
||||||
|
|
@ -17480,15 +17480,19 @@ gen_descr_array_type_die (tree type, struct array_descr_info *info,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->data_location)
|
if (dwarf_version >= 3 || !dwarf_strict)
|
||||||
add_descr_info_field (array_die, DW_AT_data_location, info->data_location,
|
{
|
||||||
info->base_decl);
|
if (info->data_location)
|
||||||
if (info->associated)
|
add_descr_info_field (array_die, DW_AT_data_location,
|
||||||
add_descr_info_field (array_die, DW_AT_associated, info->associated,
|
info->data_location,
|
||||||
info->base_decl);
|
info->base_decl);
|
||||||
if (info->allocated)
|
if (info->associated)
|
||||||
add_descr_info_field (array_die, DW_AT_allocated, info->allocated,
|
add_descr_info_field (array_die, DW_AT_associated, info->associated,
|
||||||
info->base_decl);
|
info->base_decl);
|
||||||
|
if (info->allocated)
|
||||||
|
add_descr_info_field (array_die, DW_AT_allocated, info->allocated,
|
||||||
|
info->base_decl);
|
||||||
|
}
|
||||||
|
|
||||||
add_gnat_descriptive_type_attribute (array_die, type, context_die);
|
add_gnat_descriptive_type_attribute (array_die, type, context_die);
|
||||||
|
|
||||||
|
|
@ -17519,10 +17523,13 @@ gen_descr_array_type_die (tree type, struct array_descr_info *info,
|
||||||
add_descr_info_field (subrange_die, DW_AT_upper_bound,
|
add_descr_info_field (subrange_die, DW_AT_upper_bound,
|
||||||
info->dimen[dim].upper_bound,
|
info->dimen[dim].upper_bound,
|
||||||
info->base_decl);
|
info->base_decl);
|
||||||
if (info->dimen[dim].stride)
|
if (dwarf_version >= 3 || !dwarf_strict)
|
||||||
add_descr_info_field (subrange_die, DW_AT_byte_stride,
|
{
|
||||||
info->dimen[dim].stride,
|
if (info->dimen[dim].stride)
|
||||||
info->base_decl);
|
add_descr_info_field (subrange_die, DW_AT_byte_stride,
|
||||||
|
info->dimen[dim].stride,
|
||||||
|
info->base_decl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_type_die (info->element_type, context_die);
|
gen_type_die (info->element_type, context_die);
|
||||||
|
|
@ -20120,8 +20127,7 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
|
||||||
|
|
||||||
/* If this is an array type with hidden descriptor, handle it first. */
|
/* If this is an array type with hidden descriptor, handle it first. */
|
||||||
if (!TREE_ASM_WRITTEN (type)
|
if (!TREE_ASM_WRITTEN (type)
|
||||||
&& lang_hooks.types.get_array_descr_info
|
&& lang_hooks.types.get_array_descr_info)
|
||||||
&& (dwarf_version >= 3 || !dwarf_strict))
|
|
||||||
{
|
{
|
||||||
memset (&info, 0, sizeof (info));
|
memset (&info, 0, sizeof (info));
|
||||||
if (lang_hooks.types.get_array_descr_info (type, &info))
|
if (lang_hooks.types.get_array_descr_info (type, &info))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue