diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-03-25 16:58:48 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-03-25 16:58:48 +0000 |
commit | a5695aa2c93dec00bfeb7eed1ff6d62858699ba7 (patch) | |
tree | 536edf3d5f2df8ca541b5757200960e4953e5522 /gcc/ada/gcc-interface/decl.c | |
parent | fb88e1dd28570359af09327bb65ac8de5fcc9fe8 (diff) | |
download | gcc-a5695aa2c93dec00bfeb7eed1ff6d62858699ba7.zip gcc-a5695aa2c93dec00bfeb7eed1ff6d62858699ba7.tar.gz gcc-a5695aa2c93dec00bfeb7eed1ff6d62858699ba7.tar.bz2 |
utils.c (add_parallel_type): Take a TYPE instead of a DECL and adjust.
* gcc-interface/utils.c (add_parallel_type): Take a TYPE instead of a
DECL and adjust. Move around.
(has_parallel_type): New predicate.
(rest_of_record_type_compilation): Return early if the type already
has a parallel type.
* gcc-interface/gigi.h (add_parallel_type): Adjust.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes.
From-SVN: r185779
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index a3320ed..2139fbd 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1779,7 +1779,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) if (debug_info_p && Is_Packed_Array_Type (gnat_entity) && present_gnu_tree (Original_Array_Type (gnat_entity))) - add_parallel_type (TYPE_STUB_DECL (gnu_type), + add_parallel_type (gnu_type, gnat_to_gnu_type (Original_Array_Type (gnat_entity))); @@ -1854,7 +1854,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) { /* Make the original array type a parallel type. */ if (present_gnu_tree (Original_Array_Type (gnat_entity))) - add_parallel_type (TYPE_STUB_DECL (gnu_type), + add_parallel_type (gnu_type, gnat_to_gnu_type (Original_Array_Type (gnat_entity))); @@ -2637,7 +2637,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) } finish_record_type (gnu_bound_rec, gnu_field_list, 0, true); - add_parallel_type (TYPE_STUB_DECL (gnu_type), gnu_bound_rec); + add_parallel_type (gnu_type, gnu_bound_rec); } /* If this is a packed array type, make the original array type a @@ -2647,7 +2647,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) { if (Is_Packed_Array_Type (gnat_entity) && present_gnu_tree (Original_Array_Type (gnat_entity))) - add_parallel_type (TYPE_STUB_DECL (gnu_type), + add_parallel_type (gnu_type, gnat_to_gnu_type (Original_Array_Type (gnat_entity))); else @@ -2655,7 +2655,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) tree gnu_base_decl = gnat_to_gnu_entity (Etype (gnat_entity), NULL_TREE, 0); if (!DECL_ARTIFICIAL (gnu_base_decl)) - add_parallel_type (TYPE_STUB_DECL (gnu_type), + add_parallel_type (gnu_type, TREE_TYPE (TREE_TYPE (gnu_base_decl))); } } @@ -3529,8 +3529,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) 0, 0), 0, true); - add_parallel_type (TYPE_STUB_DECL (gnu_type), - gnu_subtype_marker); + add_parallel_type (gnu_type, gnu_subtype_marker); if (definition && TREE_CODE (gnu_size_unit) != INTEGER_CST @@ -6643,7 +6642,7 @@ maybe_pad_type (tree type, tree size, unsigned int align, 0, 0), 0, true); - add_parallel_type (TYPE_STUB_DECL (record), marker); + add_parallel_type (record, marker); if (definition && size && TREE_CODE (size) != INTEGER_CST) TYPE_SIZE_UNIT (marker) |