aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-06-04 18:22:17 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-12 12:50:57 +0000
commit58d32c72ca0156b0267a9b36b91b414cab8978f2 (patch)
tree51b15e14a84852a7baed1d67dc6fe7fad1844a89 /gcc/ada/gcc-interface/utils.c
parent3ccd5d7192603e0ed6d0020658291b7c96f5651b (diff)
downloadgcc-58d32c72ca0156b0267a9b36b91b414cab8978f2.zip
gcc-58d32c72ca0156b0267a9b36b91b414cab8978f2.tar.gz
gcc-58d32c72ca0156b0267a9b36b91b414cab8978f2.tar.bz2
[Ada] Use GNAT encodings only when -fgnat-encodings=all is specified
gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Add a parallel type only when -fgnat-encodings=all is specified. <E_Array_Type>: Use the PAT name and special suffixes only when -fgnat-encodings=all is specified. <E_Array_Subtype>: Build a special type for debugging purposes only when -fgnat-encodings=all is specified. Add a parallel type or use the PAT name only when -fgnat-encodings=all is specified. <E_Record_Type>: Generate debug info for the inner record types only when -fgnat-encodings=all is specified. <E_Record_Subtype>: Use a debug type for an artificial subtype only except when -fgnat-encodings=all is specified. (elaborate_expression_1): Reset need_for_debug when possible only except when -fgnat-encodings=all is specified. (components_to_record): Use XV encodings for variable size only when -fgnat-encodings=all is specified. (associate_original_type_to_packed_array): Add a parallel type only when -fgnat-encodings=all is specified. * gcc-interface/misc.c (gnat_get_array_descr_info): Do not return full information only when -fgnat-encodings=all is specified. * gcc-interface/utils.c (make_packable_type): Add a parallel type only when -fgnat-encodings=all is specified. (maybe_pad_type): Make the inner type a debug type only except when -fgnat-encodings=all is specified. Create an XVS type for variable size only when -fgnat-encodings=all is specified. (rest_of_record_type_compilation): Add a parallel type only when -fgnat-encodings=all is specified.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 535f4ca..846d20a 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1277,7 +1277,7 @@ make_packable_type (tree type, bool in_record, unsigned int max_align)
finish_record_type (new_type, nreverse (new_field_list), 2, false);
relate_alias_sets (new_type, type, ALIAS_SET_COPY);
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
SET_TYPE_DEBUG_TYPE (new_type, TYPE_DEBUG_TYPE (type));
else if (TYPE_STUB_DECL (type))
SET_DECL_PARALLEL_TYPE (TYPE_STUB_DECL (new_type),
@@ -1610,7 +1610,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
}
/* Make the inner type the debug type of the padded type. */
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
SET_TYPE_DEBUG_TYPE (record, maybe_debug_type (type));
/* Unless debugging information isn't being written for the input type,
@@ -1645,7 +1645,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
/* There is no need to show what we are a subtype of when outputting as
few encodings as possible: regular debugging infomation makes this
redundant. */
- if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
tree marker = make_node (RECORD_TYPE);
tree orig_name = TYPE_IDENTIFIER (type);
@@ -2274,7 +2274,7 @@ rest_of_record_type_compilation (tree record_type)
/* If this record type is of variable size, make a parallel record type that
will tell the debugger how the former is laid out (see exp_dbug.ads). */
- if (var_size && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (var_size && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
tree new_record_type
= make_node (TREE_CODE (record_type) == QUAL_UNION_TYPE