diff options
author | Bob Duff <duff@adacore.com> | 2021-06-04 08:13:23 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-08 13:34:23 +0000 |
commit | 8de68eb37c7275735a8deb78f44fe6535b9462ec (patch) | |
tree | 7e9051ca7a37b9839d585862f2ae50ff47501f3d /gcc/ada/gcc-interface | |
parent | 4d743233ad29c03b5c65cfaf802d7c91f7fcc32c (diff) | |
download | gcc-8de68eb37c7275735a8deb78f44fe6535b9462ec.zip gcc-8de68eb37c7275735a8deb78f44fe6535b9462ec.tar.gz gcc-8de68eb37c7275735a8deb78f44fe6535b9462ec.tar.bz2 |
[Ada] Remove Unknown_ functions
gcc/ada/
* einfo-utils.ads, einfo-utils.adb (Unknown_Alignment,
Unknown_Component_Bit_Offset, Unknown_Component_Size,
Unknown_Esize, Unknown_Normalized_First_Bit,
Unknown_Normalized_Position, Unknown_Normalized_Position_Max,
Unknown_RM_Size): Remove these functions.
* exp_pakd.adb, exp_util.adb, fe.h, freeze.adb, layout.adb,
repinfo.adb, sem_ch13.adb, sem_ch3.adb, sem_util.adb: Remove
calls to these functions; do "not Known_..." instead.
* gcc-interface/decl.c, gcc-interface/trans.c
(Unknown_Alignment, Unknown_Component_Size, Unknown_Esize,
Unknown_RM_Size): Remove calls to these functions; do
"!Known_..." instead.
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 24 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 6 |
2 files changed, 15 insertions, 15 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 6fc94dd..b09e20d 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -444,7 +444,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) /* The RM size must be specified for all discrete and fixed-point types. */ gcc_assert (!(Is_In_Discrete_Or_Fixed_Point_Kind (kind) - && Unknown_RM_Size (gnat_entity))); + && !Known_RM_Size (gnat_entity))); /* If we get here, it means we have not yet done anything with this entity. If we are not defining it, it must be a type or an entity that is defined @@ -2324,7 +2324,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) /* If Component_Size is not already specified, annotate it with the size of the component. */ - if (Unknown_Component_Size (gnat_entity)) + if (!Known_Component_Size (gnat_entity)) Set_Component_Size (gnat_entity, annotate_value (TYPE_SIZE (comp_type))); @@ -4369,7 +4369,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) set_rm_size (RM_Size (gnat_entity), gnu_type, gnat_entity); /* Back-annotate the alignment of the type if not already set. */ - if (Unknown_Alignment (gnat_entity)) + if (!Known_Alignment (gnat_entity)) { unsigned int double_align, align; bool is_capped_double, align_clause; @@ -4395,7 +4395,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) } /* Likewise for the size, if any. */ - if (Unknown_Esize (gnat_entity) && TYPE_SIZE (gnu_type)) + if (!Known_Esize (gnat_entity) && TYPE_SIZE (gnu_type)) { tree gnu_size = TYPE_SIZE (gnu_type); @@ -4428,7 +4428,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) /* If there is neither size clause nor representation clause, the sizes need to be adjusted. */ - if (Unknown_RM_Size (gnat_entity) + if (!Known_RM_Size (gnat_entity) && !VOID_TYPE_P (gnu_type) && (!TYPE_FIELDS (gnu_type) || integer_zerop (bit_position (TYPE_FIELDS (gnu_type))))) @@ -4448,7 +4448,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) Set_Esize (gnat_entity, annotate_value (gnu_size)); /* Tagged types are Strict_Alignment so RM_Size = Esize. */ - if (Unknown_RM_Size (gnat_entity)) + if (!Known_RM_Size (gnat_entity)) Set_RM_Size (gnat_entity, Esize (gnat_entity)); } @@ -4458,7 +4458,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) } /* Likewise for the RM size, if any. */ - if (Unknown_RM_Size (gnat_entity) && TYPE_SIZE (gnu_type)) + if (!Known_RM_Size (gnat_entity) && TYPE_SIZE (gnu_type)) Set_RM_Size (gnat_entity, annotate_value (rm_size (gnu_type))); /* If we are at global level, GCC applied variable_size to the size but @@ -4723,11 +4723,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) && !TYPE_IS_DUMMY_P (TREE_TYPE (gnu_decl)) && Present (gnat_annotate_type)) { - if (Unknown_Alignment (gnat_entity)) + if (!Known_Alignment (gnat_entity)) Set_Alignment (gnat_entity, Alignment (gnat_annotate_type)); - if (Unknown_Esize (gnat_entity)) + if (!Known_Esize (gnat_entity)) Set_Esize (gnat_entity, Esize (gnat_annotate_type)); - if (Unknown_RM_Size (gnat_entity)) + if (!Known_RM_Size (gnat_entity)) Set_RM_Size (gnat_entity, RM_Size (gnat_annotate_type)); } @@ -8686,7 +8686,7 @@ annotate_object (Entity_Id gnat_entity, tree gnu_type, tree size, bool by_ref) gnu_type = TREE_TYPE (gnu_type); } - if (Unknown_Esize (gnat_entity)) + if (!Known_Esize (gnat_entity)) { if (TREE_CODE (gnu_type) == RECORD_TYPE && TYPE_CONTAINS_TEMPLATE_P (gnu_type)) @@ -8698,7 +8698,7 @@ annotate_object (Entity_Id gnat_entity, tree gnu_type, tree size, bool by_ref) Set_Esize (gnat_entity, annotate_value (size)); } - if (Unknown_Alignment (gnat_entity)) + if (!Known_Alignment (gnat_entity)) Set_Alignment (gnat_entity, UI_From_Int (TYPE_ALIGN (gnu_type) / BITS_PER_UNIT)); } diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 6a7424f..8f8bc70 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -9273,13 +9273,13 @@ process_freeze_entity (Node_Id gnat_node) gnu_new = gnat_to_gnu_entity (full_view, NULL_TREE, true); /* Propagate back-annotations from full view to partial view. */ - if (Unknown_Alignment (gnat_entity)) + if (!Known_Alignment (gnat_entity)) Set_Alignment (gnat_entity, Alignment (full_view)); - if (Unknown_Esize (gnat_entity)) + if (!Known_Esize (gnat_entity)) Set_Esize (gnat_entity, Esize (full_view)); - if (Unknown_RM_Size (gnat_entity)) + if (!Known_RM_Size (gnat_entity)) Set_RM_Size (gnat_entity, RM_Size (full_view)); /* The above call may have defined this entity (the simplest example |