aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-07-17 10:02:36 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2018-07-17 10:02:36 +0000
commit8e93ce66b268e7b213d8d11c7f7b08856c4a2162 (patch)
tree6a1cd47e5fd62c1b5247eb23a9c167ba592ae259 /gcc/ada/gcc-interface/utils.c
parent10c6ce7884b1d19a9b85ccf64ac74e44eb7e6623 (diff)
downloadgcc-8e93ce66b268e7b213d8d11c7f7b08856c4a2162.zip
gcc-8e93ce66b268e7b213d8d11c7f7b08856c4a2162.tar.gz
gcc-8e93ce66b268e7b213d8d11c7f7b08856c4a2162.tar.bz2
decl.c (choices_to_gnu): Rename parameters.
* gcc-interface/decl.c (choices_to_gnu): Rename parameters. Deal with an operand of Character type. Factor out range generation to the end. Check that the bounds are literals and convert them to the type of the operand before building the ranges. * gcc-interface/utils.c (make_dummy_type): Minor tweak. (make_packable_type): Propagate TYPE_DEBUG_TYPE. (maybe_pad_type): Likewise. From-SVN: r262812
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index a162069..cc1fe77 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -391,15 +391,13 @@ make_dummy_type (Entity_Id gnat_type)
SET_DUMMY_NODE (gnat_equiv, gnu_type);
- /* Create a debug type so that debug info consumers only see an unspecified
- type. */
+ /* Create a debug type so that debuggers only see an unspecified type. */
if (Needs_Debug_Info (gnat_type))
{
debug_type = make_node (LANG_TYPE);
- SET_TYPE_DEBUG_TYPE (gnu_type, debug_type);
-
TYPE_NAME (debug_type) = TYPE_NAME (gnu_type);
TYPE_ARTIFICIAL (debug_type) = TYPE_ARTIFICIAL (gnu_type);
+ SET_TYPE_DEBUG_TYPE (gnu_type, debug_type);
}
return gnu_type;
@@ -1073,7 +1071,9 @@ 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 (TYPE_STUB_DECL (type))
+ if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ 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),
DECL_PARALLEL_TYPE (TYPE_STUB_DECL (type)));
@@ -1417,7 +1417,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
}
if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
- SET_TYPE_DEBUG_TYPE (record, type);
+ SET_TYPE_DEBUG_TYPE (record, maybe_debug_type (type));
/* Unless debugging information isn't being written for the input type,
write a record that shows what we are a subtype of and also make a