1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Refined_State Node10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
151 -- Non_Limited_View Node17
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Protected_Entry Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Parent_Subtype Node19
171 -- Size_Check_Code Node19
172 -- Spec_Entity Node19
173 -- Underlying_Full_View Node19
175 -- Component_Type Node20
176 -- Default_Value Node20
177 -- Directly_Designated_Type Node20
178 -- Discriminant_Checking_Func Node20
179 -- Discriminant_Default_Value Node20
180 -- Last_Entity Node20
181 -- Prival_Link Node20
182 -- Register_Exception_Call Node20
183 -- Scalar_Range Node20
185 -- Accept_Address Elist21
186 -- Default_Expr_Function Node21
187 -- Discriminant_Constraint Elist21
188 -- Interface_Name Node21
189 -- Original_Array_Type Node21
190 -- Small_Value Ureal21
192 -- Associated_Storage_Pool Node22
193 -- Component_Size Uint22
194 -- Corresponding_Remote_Type Node22
195 -- Enumeration_Rep_Expr Node22
196 -- Exception_Code Uint22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
248 -- Thunk_Entity Node31
250 -- SPARK_Mode_Pragmas Node32
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
267 -- Note: Flag1-Flag3 are not used, for historical reasons
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
274 -- Is_Potentially_Use_Visible Flag9
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
317 -- In_Package_Body Flag48
319 -- Delay_Subprogram_Descriptors Flag50
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_With_Type Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- Has_Pragma_No_Inline Flag201
487 -- Itype_Printed Flag202
488 -- Has_Pragma_Pure Flag203
489 -- Is_Known_Null Flag204
490 -- Low_Bound_Tested Flag205
491 -- Is_Visible_Formal Flag206
492 -- Known_To_Have_Preelab_Init Flag207
493 -- Must_Have_Preelab_Init Flag208
494 -- Is_Return_Object Flag209
495 -- Elaborate_Body_Desirable Flag210
497 -- Has_Static_Discriminants Flag211
498 -- Has_Pragma_Unreferenced_Objects Flag212
499 -- Requires_Overriding Flag213
501 -- Has_Up_Level_Access Flag215
502 -- Universal_Aliasing Flag216
503 -- Suppress_Value_Tracking_On_Call Flag217
504 -- Is_Primitive Flag218
505 -- Has_Initial_Value Flag219
506 -- Has_Dispatch_Table Flag220
508 -- Has_Pragma_Preelab_Init Flag221
509 -- Used_As_Generic_Actual Flag222
510 -- Is_Descendent_Of_Address Flag223
513 -- Is_Only_Out_Parameter Flag226
514 -- Referenced_As_Out_Parameter Flag227
515 -- Has_Thunks Flag228
516 -- Can_Use_Internal_Rep Flag229
517 -- Has_Pragma_Inline_Always Flag230
519 -- Renamed_In_Spec Flag231
520 -- Has_Invariants Flag232
521 -- Has_Pragma_Unmodified Flag233
522 -- Is_Dispatch_Table_Entity Flag234
523 -- Is_Trivial_Subprogram Flag235
524 -- Warnings_Off_Used Flag236
525 -- Warnings_Off_Used_Unmodified Flag237
526 -- Warnings_Off_Used_Unreferenced Flag238
527 -- OK_To_Reorder_Components Flag239
528 -- Has_Postconditions Flag240
530 -- Optimize_Alignment_Space Flag241
531 -- Optimize_Alignment_Time Flag242
532 -- Overlays_Constant Flag243
533 -- Is_RACW_Stub_Type Flag244
534 -- Is_Private_Primitive Flag245
535 -- Is_Underlying_Record_View Flag246
536 -- OK_To_Rename Flag247
537 -- Has_Inheritable_Invariants Flag248
538 -- Is_Safe_To_Reevaluate Flag249
539 -- Has_Predicates Flag250
541 -- Has_Implicit_Dereference Flag251
542 -- Is_Processed_Transient Flag252
543 -- Has_Anonymous_Master Flag253
544 -- Is_Implementation_Defined Flag254
545 -- Is_Predicate_Function Flag255
546 -- Is_Predicate_Function_M Flag256
547 -- Is_Invariant_Procedure Flag257
548 -- Has_Dynamic_Predicate_Aspect Flag258
549 -- Has_Static_Predicate_Aspect Flag259
550 -- Has_Loop_Entry_Attributes Flag260
552 -- Has_Delayed_Rep_Aspects Flag261
553 -- May_Inherit_Delayed_Rep_Aspects Flag262
582 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
584 -----------------------
585 -- Local subprograms --
586 -----------------------
590 Opt_Nam : Name_Id) return Boolean;
591 -- Determine whether abstract state State has a particular option denoted
592 -- by the name Opt_Nam.
598 function Float_Rep (Id : E) return F is
599 pragma Assert (Is_Floating_Point_Type (Id));
601 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
610 Opt_Nam : Name_Id) return Boolean
612 Par : constant Node_Id := Parent (State);
616 pragma Assert (Ekind (State) = E_Abstract_State);
618 -- States with options appear as extension aggregates in the tree
620 if Nkind (Par) = N_Extension_Aggregate then
621 if Opt_Nam = Name_Part_Of then
622 return Present (Component_Associations (Par));
625 Opt := First (Expressions (Par));
626 while Present (Opt) loop
627 if Chars (Opt) = Opt_Nam then
639 --------------------------------
640 -- Attribute Access Functions --
641 --------------------------------
643 function Abstract_States (Id : E) return L is
645 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
649 function Accept_Address (Id : E) return L is
654 function Access_Disp_Table (Id : E) return L is
656 pragma Assert (Ekind_In (Id, E_Record_Type,
658 return Elist16 (Implementation_Base_Type (Id));
659 end Access_Disp_Table;
661 function Actual_Subtype (Id : E) return E is
664 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
665 or else Is_Formal (Id));
669 function Address_Taken (Id : E) return B is
674 function Alias (Id : E) return E is
677 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
681 function Alignment (Id : E) return U is
683 pragma Assert (Is_Type (Id)
684 or else Is_Formal (Id)
685 or else Ekind_In (Id, E_Loop_Parameter,
692 function Associated_Formal_Package (Id : E) return E is
694 pragma Assert (Ekind (Id) = E_Package);
696 end Associated_Formal_Package;
698 function Associated_Node_For_Itype (Id : E) return N is
701 end Associated_Node_For_Itype;
703 function Associated_Storage_Pool (Id : E) return E is
705 pragma Assert (Is_Access_Type (Id));
706 return Node22 (Root_Type (Id));
707 end Associated_Storage_Pool;
709 function Barrier_Function (Id : E) return N is
711 pragma Assert (Is_Entry (Id));
713 end Barrier_Function;
715 function Block_Node (Id : E) return N is
717 pragma Assert (Ekind (Id) = E_Block);
721 function Body_Entity (Id : E) return E is
723 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
727 function Body_Needed_For_SAL (Id : E) return B is
730 (Ekind (Id) = E_Package
731 or else Is_Subprogram (Id)
732 or else Is_Generic_Unit (Id));
734 end Body_Needed_For_SAL;
736 function C_Pass_By_Copy (Id : E) return B is
738 pragma Assert (Is_Record_Type (Id));
739 return Flag125 (Implementation_Base_Type (Id));
742 function Can_Never_Be_Null (Id : E) return B is
745 end Can_Never_Be_Null;
747 function Checks_May_Be_Suppressed (Id : E) return B is
750 end Checks_May_Be_Suppressed;
752 function Class_Wide_Type (Id : E) return E is
754 pragma Assert (Is_Type (Id));
758 function Cloned_Subtype (Id : E) return E is
760 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
764 function Component_Bit_Offset (Id : E) return U is
766 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
768 end Component_Bit_Offset;
770 function Component_Clause (Id : E) return N is
772 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
774 end Component_Clause;
776 function Component_Size (Id : E) return U is
778 pragma Assert (Is_Array_Type (Id));
779 return Uint22 (Implementation_Base_Type (Id));
782 function Component_Type (Id : E) return E is
784 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
785 return Node20 (Implementation_Base_Type (Id));
788 function Corresponding_Concurrent_Type (Id : E) return E is
790 pragma Assert (Ekind (Id) = E_Record_Type);
792 end Corresponding_Concurrent_Type;
794 function Corresponding_Discriminant (Id : E) return E is
796 pragma Assert (Ekind (Id) = E_Discriminant);
798 end Corresponding_Discriminant;
800 function Corresponding_Equality (Id : E) return E is
803 (Ekind (Id) = E_Function
804 and then not Comes_From_Source (Id)
805 and then Chars (Id) = Name_Op_Ne);
807 end Corresponding_Equality;
809 function Corresponding_Protected_Entry (Id : E) return E is
811 pragma Assert (Ekind (Id) = E_Subprogram_Body);
813 end Corresponding_Protected_Entry;
815 function Corresponding_Record_Type (Id : E) return E is
817 pragma Assert (Is_Concurrent_Type (Id));
819 end Corresponding_Record_Type;
821 function Corresponding_Remote_Type (Id : E) return E is
824 end Corresponding_Remote_Type;
826 function Current_Use_Clause (Id : E) return E is
828 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
830 end Current_Use_Clause;
832 function Current_Value (Id : E) return N is
834 pragma Assert (Ekind (Id) in Object_Kind);
838 function CR_Discriminant (Id : E) return E is
843 function Debug_Info_Off (Id : E) return B is
848 function Debug_Renaming_Link (Id : E) return E is
851 end Debug_Renaming_Link;
853 function Default_Aspect_Component_Value (Id : E) return N is
855 pragma Assert (Is_Array_Type (Id));
857 end Default_Aspect_Component_Value;
859 function Default_Aspect_Value (Id : E) return N is
861 pragma Assert (Is_Scalar_Type (Id));
863 end Default_Aspect_Value;
865 function Default_Expr_Function (Id : E) return E is
867 pragma Assert (Is_Formal (Id));
869 end Default_Expr_Function;
871 function Default_Expressions_Processed (Id : E) return B is
874 end Default_Expressions_Processed;
876 function Default_Value (Id : E) return N is
878 pragma Assert (Is_Formal (Id));
882 function Delay_Cleanups (Id : E) return B is
887 function Delay_Subprogram_Descriptors (Id : E) return B is
890 end Delay_Subprogram_Descriptors;
892 function Delta_Value (Id : E) return R is
894 pragma Assert (Is_Fixed_Point_Type (Id));
898 function Dependent_Instances (Id : E) return L is
900 pragma Assert (Is_Generic_Instance (Id));
902 end Dependent_Instances;
904 function Depends_On_Private (Id : E) return B is
906 pragma Assert (Nkind (Id) in N_Entity);
908 end Depends_On_Private;
910 function Digits_Value (Id : E) return U is
913 (Is_Floating_Point_Type (Id)
914 or else Is_Decimal_Fixed_Point_Type (Id));
918 function Direct_Primitive_Operations (Id : E) return L is
920 pragma Assert (Is_Tagged_Type (Id));
922 end Direct_Primitive_Operations;
924 function Directly_Designated_Type (Id : E) return E is
926 pragma Assert (Is_Access_Type (Id));
928 end Directly_Designated_Type;
930 function Discard_Names (Id : E) return B is
935 function Discriminal (Id : E) return E is
937 pragma Assert (Ekind (Id) = E_Discriminant);
941 function Discriminal_Link (Id : E) return N is
944 end Discriminal_Link;
946 function Discriminant_Checking_Func (Id : E) return E is
948 pragma Assert (Ekind (Id) = E_Component);
950 end Discriminant_Checking_Func;
952 function Discriminant_Constraint (Id : E) return L is
954 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
956 end Discriminant_Constraint;
958 function Discriminant_Default_Value (Id : E) return N is
960 pragma Assert (Ekind (Id) = E_Discriminant);
962 end Discriminant_Default_Value;
964 function Discriminant_Number (Id : E) return U is
966 pragma Assert (Ekind (Id) = E_Discriminant);
968 end Discriminant_Number;
970 function Dispatch_Table_Wrappers (Id : E) return L is
972 pragma Assert (Ekind_In (Id, E_Record_Type,
974 return Elist26 (Implementation_Base_Type (Id));
975 end Dispatch_Table_Wrappers;
977 function DT_Entry_Count (Id : E) return U is
979 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
983 function DT_Offset_To_Top_Func (Id : E) return E is
985 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
987 end DT_Offset_To_Top_Func;
989 function DT_Position (Id : E) return U is
991 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
992 and then Present (DTC_Entity (Id)));
996 function DTC_Entity (Id : E) return E is
998 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1002 function Elaborate_Body_Desirable (Id : E) return B is
1004 pragma Assert (Ekind (Id) = E_Package);
1005 return Flag210 (Id);
1006 end Elaborate_Body_Desirable;
1008 function Elaboration_Entity (Id : E) return E is
1013 Ekind (Id) = E_Package
1015 Is_Generic_Unit (Id));
1017 end Elaboration_Entity;
1019 function Elaboration_Entity_Required (Id : E) return B is
1024 Ekind (Id) = E_Package
1026 Is_Generic_Unit (Id));
1027 return Flag174 (Id);
1028 end Elaboration_Entity_Required;
1030 function Enclosing_Scope (Id : E) return E is
1033 end Enclosing_Scope;
1035 function Entry_Accepted (Id : E) return B is
1037 pragma Assert (Is_Entry (Id));
1038 return Flag152 (Id);
1041 function Entry_Bodies_Array (Id : E) return E is
1044 end Entry_Bodies_Array;
1046 function Entry_Cancel_Parameter (Id : E) return E is
1049 end Entry_Cancel_Parameter;
1051 function Entry_Component (Id : E) return E is
1054 end Entry_Component;
1056 function Entry_Formal (Id : E) return E is
1061 function Entry_Index_Constant (Id : E) return N is
1063 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1065 end Entry_Index_Constant;
1067 function Contract (Id : E) return N is
1070 (Ekind_In (Id, E_Entry,
1076 or else Is_Generic_Subprogram (Id)
1077 or else Is_Subprogram (Id));
1081 function Entry_Parameters_Type (Id : E) return E is
1084 end Entry_Parameters_Type;
1086 function Enum_Pos_To_Rep (Id : E) return E is
1088 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1090 end Enum_Pos_To_Rep;
1092 function Enumeration_Pos (Id : E) return Uint is
1094 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1096 end Enumeration_Pos;
1098 function Enumeration_Rep (Id : E) return U is
1100 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1102 end Enumeration_Rep;
1104 function Enumeration_Rep_Expr (Id : E) return N is
1106 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1108 end Enumeration_Rep_Expr;
1110 function Equivalent_Type (Id : E) return E is
1113 (Ekind_In (Id, E_Class_Wide_Type,
1114 E_Class_Wide_Subtype,
1115 E_Access_Subprogram_Type,
1116 E_Access_Protected_Subprogram_Type,
1117 E_Anonymous_Access_Protected_Subprogram_Type,
1118 E_Access_Subprogram_Type,
1121 end Equivalent_Type;
1123 function Esize (Id : E) return Uint is
1128 function Exception_Code (Id : E) return Uint is
1130 pragma Assert (Ekind (Id) = E_Exception);
1134 function Extra_Accessibility (Id : E) return E is
1137 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1139 end Extra_Accessibility;
1141 function Extra_Accessibility_Of_Result (Id : E) return E is
1143 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1145 end Extra_Accessibility_Of_Result;
1147 function Extra_Constrained (Id : E) return E is
1149 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1151 end Extra_Constrained;
1153 function Extra_Formal (Id : E) return E is
1158 function Extra_Formals (Id : E) return E is
1161 (Is_Overloadable (Id)
1162 or else Ekind_In (Id, E_Entry_Family,
1164 E_Subprogram_Type));
1168 function Can_Use_Internal_Rep (Id : E) return B is
1170 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1171 return Flag229 (Base_Type (Id));
1172 end Can_Use_Internal_Rep;
1174 function Finalization_Master (Id : E) return E is
1176 pragma Assert (Is_Access_Type (Id));
1177 return Node23 (Root_Type (Id));
1178 end Finalization_Master;
1180 function Finalize_Storage_Only (Id : E) return B is
1182 pragma Assert (Is_Type (Id));
1183 return Flag158 (Base_Type (Id));
1184 end Finalize_Storage_Only;
1186 function Finalizer (Id : E) return E is
1188 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1192 function First_Entity (Id : E) return E is
1197 function First_Exit_Statement (Id : E) return N is
1199 pragma Assert (Ekind (Id) = E_Loop);
1201 end First_Exit_Statement;
1203 function First_Index (Id : E) return N is
1205 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1209 function First_Literal (Id : E) return E is
1211 pragma Assert (Is_Enumeration_Type (Id));
1215 function First_Optional_Parameter (Id : E) return E is
1217 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1219 end First_Optional_Parameter;
1221 function First_Private_Entity (Id : E) return E is
1223 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1224 or else Ekind (Id) in Concurrent_Kind);
1226 end First_Private_Entity;
1228 function First_Rep_Item (Id : E) return E is
1233 function Freeze_Node (Id : E) return N is
1238 function From_With_Type (Id : E) return B is
1240 return Flag159 (Id);
1243 function Full_View (Id : E) return E is
1245 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1249 function Generic_Homonym (Id : E) return E is
1251 pragma Assert (Ekind (Id) = E_Generic_Package);
1253 end Generic_Homonym;
1255 function Generic_Renamings (Id : E) return L is
1257 return Elist23 (Id);
1258 end Generic_Renamings;
1260 function Handler_Records (Id : E) return S is
1263 end Handler_Records;
1265 function Has_Aliased_Components (Id : E) return B is
1267 return Flag135 (Implementation_Base_Type (Id));
1268 end Has_Aliased_Components;
1270 function Has_Alignment_Clause (Id : E) return B is
1273 end Has_Alignment_Clause;
1275 function Has_All_Calls_Remote (Id : E) return B is
1278 end Has_All_Calls_Remote;
1280 function Has_Anonymous_Master (Id : E) return B is
1283 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1284 return Flag253 (Id);
1285 end Has_Anonymous_Master;
1287 function Has_Atomic_Components (Id : E) return B is
1289 return Flag86 (Implementation_Base_Type (Id));
1290 end Has_Atomic_Components;
1292 function Has_Biased_Representation (Id : E) return B is
1294 return Flag139 (Id);
1295 end Has_Biased_Representation;
1297 function Has_Completion (Id : E) return B is
1302 function Has_Completion_In_Body (Id : E) return B is
1304 pragma Assert (Is_Type (Id));
1306 end Has_Completion_In_Body;
1308 function Has_Complex_Representation (Id : E) return B is
1310 pragma Assert (Is_Type (Id));
1311 return Flag140 (Implementation_Base_Type (Id));
1312 end Has_Complex_Representation;
1314 function Has_Component_Size_Clause (Id : E) return B is
1316 pragma Assert (Is_Array_Type (Id));
1317 return Flag68 (Implementation_Base_Type (Id));
1318 end Has_Component_Size_Clause;
1320 function Has_Constrained_Partial_View (Id : E) return B is
1322 pragma Assert (Is_Type (Id));
1323 return Flag187 (Id);
1324 end Has_Constrained_Partial_View;
1326 function Has_Controlled_Component (Id : E) return B is
1328 return Flag43 (Base_Type (Id));
1329 end Has_Controlled_Component;
1331 function Has_Contiguous_Rep (Id : E) return B is
1333 return Flag181 (Id);
1334 end Has_Contiguous_Rep;
1336 function Has_Controlling_Result (Id : E) return B is
1339 end Has_Controlling_Result;
1341 function Has_Convention_Pragma (Id : E) return B is
1343 return Flag119 (Id);
1344 end Has_Convention_Pragma;
1346 function Has_Default_Aspect (Id : E) return B is
1348 return Flag39 (Base_Type (Id));
1349 end Has_Default_Aspect;
1351 function Has_Delayed_Aspects (Id : E) return B is
1353 pragma Assert (Nkind (Id) in N_Entity);
1354 return Flag200 (Id);
1355 end Has_Delayed_Aspects;
1357 function Has_Delayed_Freeze (Id : E) return B is
1359 pragma Assert (Nkind (Id) in N_Entity);
1361 end Has_Delayed_Freeze;
1363 function Has_Delayed_Rep_Aspects (Id : E) return B is
1365 pragma Assert (Nkind (Id) in N_Entity);
1366 return Flag261 (Id);
1367 end Has_Delayed_Rep_Aspects;
1369 function Has_Discriminants (Id : E) return B is
1371 pragma Assert (Nkind (Id) in N_Entity);
1373 end Has_Discriminants;
1375 function Has_Dispatch_Table (Id : E) return B is
1377 pragma Assert (Is_Tagged_Type (Id));
1378 return Flag220 (Id);
1379 end Has_Dispatch_Table;
1381 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1383 pragma Assert (Is_Type (Id));
1384 return Flag258 (Id);
1385 end Has_Dynamic_Predicate_Aspect;
1387 function Has_Enumeration_Rep_Clause (Id : E) return B is
1389 pragma Assert (Is_Enumeration_Type (Id));
1391 end Has_Enumeration_Rep_Clause;
1393 function Has_Exit (Id : E) return B is
1398 function Has_External_Tag_Rep_Clause (Id : E) return B is
1400 pragma Assert (Is_Tagged_Type (Id));
1401 return Flag110 (Id);
1402 end Has_External_Tag_Rep_Clause;
1404 function Has_Forward_Instantiation (Id : E) return B is
1406 return Flag175 (Id);
1407 end Has_Forward_Instantiation;
1409 function Has_Fully_Qualified_Name (Id : E) return B is
1411 return Flag173 (Id);
1412 end Has_Fully_Qualified_Name;
1414 function Has_Gigi_Rep_Item (Id : E) return B is
1417 end Has_Gigi_Rep_Item;
1419 function Has_Homonym (Id : E) return B is
1424 function Has_Implicit_Dereference (Id : E) return B is
1426 return Flag251 (Id);
1427 end Has_Implicit_Dereference;
1429 function Has_Independent_Components (Id : E) return B is
1431 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1433 end Has_Independent_Components;
1435 function Has_Inheritable_Invariants (Id : E) return B is
1437 pragma Assert (Is_Type (Id));
1438 return Flag248 (Id);
1439 end Has_Inheritable_Invariants;
1441 function Has_Initial_Value (Id : E) return B is
1443 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1444 return Flag219 (Id);
1445 end Has_Initial_Value;
1447 function Has_Invariants (Id : E) return B is
1449 pragma Assert (Is_Type (Id));
1450 return Flag232 (Id);
1453 function Has_Loop_Entry_Attributes (Id : E) return B is
1455 pragma Assert (Ekind (Id) = E_Loop);
1456 return Flag260 (Id);
1457 end Has_Loop_Entry_Attributes;
1459 function Has_Machine_Radix_Clause (Id : E) return B is
1461 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1463 end Has_Machine_Radix_Clause;
1465 function Has_Master_Entity (Id : E) return B is
1468 end Has_Master_Entity;
1470 function Has_Missing_Return (Id : E) return B is
1472 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1473 return Flag142 (Id);
1474 end Has_Missing_Return;
1476 function Has_Nested_Block_With_Handler (Id : E) return B is
1478 return Flag101 (Id);
1479 end Has_Nested_Block_With_Handler;
1481 function Has_Non_Standard_Rep (Id : E) return B is
1483 return Flag75 (Implementation_Base_Type (Id));
1484 end Has_Non_Standard_Rep;
1486 function Has_Object_Size_Clause (Id : E) return B is
1488 pragma Assert (Is_Type (Id));
1489 return Flag172 (Id);
1490 end Has_Object_Size_Clause;
1492 function Has_Per_Object_Constraint (Id : E) return B is
1494 return Flag154 (Id);
1495 end Has_Per_Object_Constraint;
1497 function Has_Postconditions (Id : E) return B is
1499 pragma Assert (Is_Subprogram (Id));
1500 return Flag240 (Id);
1501 end Has_Postconditions;
1503 function Has_Pragma_Controlled (Id : E) return B is
1505 pragma Assert (Is_Access_Type (Id));
1506 return Flag27 (Implementation_Base_Type (Id));
1507 end Has_Pragma_Controlled;
1509 function Has_Pragma_Elaborate_Body (Id : E) return B is
1511 return Flag150 (Id);
1512 end Has_Pragma_Elaborate_Body;
1514 function Has_Pragma_Inline (Id : E) return B is
1516 return Flag157 (Id);
1517 end Has_Pragma_Inline;
1519 function Has_Pragma_Inline_Always (Id : E) return B is
1521 return Flag230 (Id);
1522 end Has_Pragma_Inline_Always;
1524 function Has_Pragma_No_Inline (Id : E) return B is
1526 return Flag201 (Id);
1527 end Has_Pragma_No_Inline;
1529 function Has_Pragma_Ordered (Id : E) return B is
1531 pragma Assert (Is_Enumeration_Type (Id));
1532 return Flag198 (Implementation_Base_Type (Id));
1533 end Has_Pragma_Ordered;
1535 function Has_Pragma_Pack (Id : E) return B is
1537 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1538 return Flag121 (Implementation_Base_Type (Id));
1539 end Has_Pragma_Pack;
1541 function Has_Pragma_Preelab_Init (Id : E) return B is
1543 return Flag221 (Id);
1544 end Has_Pragma_Preelab_Init;
1546 function Has_Pragma_Pure (Id : E) return B is
1548 return Flag203 (Id);
1549 end Has_Pragma_Pure;
1551 function Has_Pragma_Pure_Function (Id : E) return B is
1553 return Flag179 (Id);
1554 end Has_Pragma_Pure_Function;
1556 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1558 return Flag169 (Id);
1559 end Has_Pragma_Thread_Local_Storage;
1561 function Has_Pragma_Unmodified (Id : E) return B is
1563 return Flag233 (Id);
1564 end Has_Pragma_Unmodified;
1566 function Has_Pragma_Unreferenced (Id : E) return B is
1568 return Flag180 (Id);
1569 end Has_Pragma_Unreferenced;
1571 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1573 pragma Assert (Is_Type (Id));
1574 return Flag212 (Id);
1575 end Has_Pragma_Unreferenced_Objects;
1577 function Has_Predicates (Id : E) return B is
1579 pragma Assert (Is_Type (Id));
1580 return Flag250 (Id);
1583 function Has_Primitive_Operations (Id : E) return B is
1585 pragma Assert (Is_Type (Id));
1586 return Flag120 (Base_Type (Id));
1587 end Has_Primitive_Operations;
1589 function Has_Private_Ancestor (Id : E) return B is
1591 return Flag151 (Id);
1592 end Has_Private_Ancestor;
1594 function Has_Private_Declaration (Id : E) return B is
1596 return Flag155 (Id);
1597 end Has_Private_Declaration;
1599 function Has_Qualified_Name (Id : E) return B is
1601 return Flag161 (Id);
1602 end Has_Qualified_Name;
1604 function Has_RACW (Id : E) return B is
1606 pragma Assert (Ekind (Id) = E_Package);
1607 return Flag214 (Id);
1610 function Has_Record_Rep_Clause (Id : E) return B is
1612 pragma Assert (Is_Record_Type (Id));
1613 return Flag65 (Implementation_Base_Type (Id));
1614 end Has_Record_Rep_Clause;
1616 function Has_Recursive_Call (Id : E) return B is
1618 pragma Assert (Is_Subprogram (Id));
1619 return Flag143 (Id);
1620 end Has_Recursive_Call;
1622 function Has_Size_Clause (Id : E) return B is
1625 end Has_Size_Clause;
1627 function Has_Small_Clause (Id : E) return B is
1630 end Has_Small_Clause;
1632 function Has_Specified_Layout (Id : E) return B is
1634 pragma Assert (Is_Type (Id));
1635 return Flag100 (Implementation_Base_Type (Id));
1636 end Has_Specified_Layout;
1638 function Has_Specified_Stream_Input (Id : E) return B is
1640 pragma Assert (Is_Type (Id));
1641 return Flag190 (Id);
1642 end Has_Specified_Stream_Input;
1644 function Has_Specified_Stream_Output (Id : E) return B is
1646 pragma Assert (Is_Type (Id));
1647 return Flag191 (Id);
1648 end Has_Specified_Stream_Output;
1650 function Has_Specified_Stream_Read (Id : E) return B is
1652 pragma Assert (Is_Type (Id));
1653 return Flag192 (Id);
1654 end Has_Specified_Stream_Read;
1656 function Has_Specified_Stream_Write (Id : E) return B is
1658 pragma Assert (Is_Type (Id));
1659 return Flag193 (Id);
1660 end Has_Specified_Stream_Write;
1662 function Has_Static_Discriminants (Id : E) return B is
1664 pragma Assert (Is_Type (Id));
1665 return Flag211 (Id);
1666 end Has_Static_Discriminants;
1668 function Has_Static_Predicate_Aspect (Id : E) return B is
1670 pragma Assert (Is_Type (Id));
1671 return Flag259 (Id);
1672 end Has_Static_Predicate_Aspect;
1674 function Has_Storage_Size_Clause (Id : E) return B is
1676 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1677 return Flag23 (Implementation_Base_Type (Id));
1678 end Has_Storage_Size_Clause;
1680 function Has_Stream_Size_Clause (Id : E) return B is
1682 return Flag184 (Id);
1683 end Has_Stream_Size_Clause;
1685 function Has_Task (Id : E) return B is
1687 return Flag30 (Base_Type (Id));
1690 function Has_Thunks (Id : E) return B is
1692 return Flag228 (Id);
1695 function Has_Unchecked_Union (Id : E) return B is
1697 return Flag123 (Base_Type (Id));
1698 end Has_Unchecked_Union;
1700 function Has_Unknown_Discriminants (Id : E) return B is
1702 pragma Assert (Is_Type (Id));
1704 end Has_Unknown_Discriminants;
1706 function Has_Up_Level_Access (Id : E) return B is
1709 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1710 return Flag215 (Id);
1711 end Has_Up_Level_Access;
1713 function Has_Volatile_Components (Id : E) return B is
1715 return Flag87 (Implementation_Base_Type (Id));
1716 end Has_Volatile_Components;
1718 function Has_Xref_Entry (Id : E) return B is
1720 return Flag182 (Id);
1723 function Hiding_Loop_Variable (Id : E) return E is
1725 pragma Assert (Ekind (Id) = E_Variable);
1727 end Hiding_Loop_Variable;
1729 function Homonym (Id : E) return E is
1734 function Interface_Alias (Id : E) return E is
1736 pragma Assert (Is_Subprogram (Id));
1738 end Interface_Alias;
1740 function Interfaces (Id : E) return L is
1742 pragma Assert (Is_Record_Type (Id));
1743 return Elist25 (Id);
1746 function In_Package_Body (Id : E) return B is
1749 end In_Package_Body;
1751 function In_Private_Part (Id : E) return B is
1754 end In_Private_Part;
1756 function In_Use (Id : E) return B is
1758 pragma Assert (Nkind (Id) in N_Entity);
1762 function Initialization_Statements (Id : E) return N is
1764 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1766 end Initialization_Statements;
1768 function Inner_Instances (Id : E) return L is
1770 return Elist23 (Id);
1771 end Inner_Instances;
1773 function Interface_Name (Id : E) return N is
1778 function Is_Abstract_Subprogram (Id : E) return B is
1780 pragma Assert (Is_Overloadable (Id));
1782 end Is_Abstract_Subprogram;
1784 function Is_Abstract_Type (Id : E) return B is
1786 pragma Assert (Is_Type (Id));
1787 return Flag146 (Id);
1788 end Is_Abstract_Type;
1790 function Is_Local_Anonymous_Access (Id : E) return B is
1792 pragma Assert (Is_Access_Type (Id));
1793 return Flag194 (Id);
1794 end Is_Local_Anonymous_Access;
1796 function Is_Access_Constant (Id : E) return B is
1798 pragma Assert (Is_Access_Type (Id));
1800 end Is_Access_Constant;
1802 function Is_Ada_2005_Only (Id : E) return B is
1804 return Flag185 (Id);
1805 end Is_Ada_2005_Only;
1807 function Is_Ada_2012_Only (Id : E) return B is
1809 return Flag199 (Id);
1810 end Is_Ada_2012_Only;
1812 function Is_Aliased (Id : E) return B is
1814 pragma Assert (Nkind (Id) in N_Entity);
1818 function Is_AST_Entry (Id : E) return B is
1820 pragma Assert (Is_Entry (Id));
1821 return Flag132 (Id);
1824 function Is_Asynchronous (Id : E) return B is
1826 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1828 end Is_Asynchronous;
1830 function Is_Atomic (Id : E) return B is
1835 function Is_Bit_Packed_Array (Id : E) return B is
1837 return Flag122 (Implementation_Base_Type (Id));
1838 end Is_Bit_Packed_Array;
1840 function Is_Called (Id : E) return B is
1842 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1843 return Flag102 (Id);
1846 function Is_Character_Type (Id : E) return B is
1849 end Is_Character_Type;
1851 function Is_Child_Unit (Id : E) return B is
1856 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1859 end Is_Class_Wide_Equivalent_Type;
1861 function Is_Compilation_Unit (Id : E) return B is
1863 return Flag149 (Id);
1864 end Is_Compilation_Unit;
1866 function Is_Completely_Hidden (Id : E) return B is
1868 pragma Assert (Ekind (Id) = E_Discriminant);
1869 return Flag103 (Id);
1870 end Is_Completely_Hidden;
1872 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1875 end Is_Constr_Subt_For_U_Nominal;
1877 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1879 return Flag141 (Id);
1880 end Is_Constr_Subt_For_UN_Aliased;
1882 function Is_Constrained (Id : E) return B is
1884 pragma Assert (Nkind (Id) in N_Entity);
1888 function Is_Constructor (Id : E) return B is
1893 function Is_Controlled (Id : E) return B is
1895 return Flag42 (Base_Type (Id));
1898 function Is_Controlling_Formal (Id : E) return B is
1900 pragma Assert (Is_Formal (Id));
1902 end Is_Controlling_Formal;
1904 function Is_CPP_Class (Id : E) return B is
1909 function Is_Descendent_Of_Address (Id : E) return B is
1911 pragma Assert (Is_Type (Id));
1912 return Flag223 (Id);
1913 end Is_Descendent_Of_Address;
1915 function Is_Discrim_SO_Function (Id : E) return B is
1917 return Flag176 (Id);
1918 end Is_Discrim_SO_Function;
1920 function Is_Dispatch_Table_Entity (Id : E) return B is
1922 return Flag234 (Id);
1923 end Is_Dispatch_Table_Entity;
1925 function Is_Dispatching_Operation (Id : E) return B is
1927 pragma Assert (Nkind (Id) in N_Entity);
1929 end Is_Dispatching_Operation;
1931 function Is_Eliminated (Id : E) return B is
1933 return Flag124 (Id);
1936 function Is_Entry_Formal (Id : E) return B is
1939 end Is_Entry_Formal;
1941 function Is_Exported (Id : E) return B is
1946 function Is_First_Subtype (Id : E) return B is
1949 end Is_First_Subtype;
1951 function Is_For_Access_Subtype (Id : E) return B is
1953 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1954 return Flag118 (Id);
1955 end Is_For_Access_Subtype;
1957 function Is_Formal_Subprogram (Id : E) return B is
1959 return Flag111 (Id);
1960 end Is_Formal_Subprogram;
1962 function Is_Frozen (Id : E) return B is
1967 function Is_Generic_Actual_Type (Id : E) return B is
1969 pragma Assert (Is_Type (Id));
1971 end Is_Generic_Actual_Type;
1973 function Is_Generic_Instance (Id : E) return B is
1975 return Flag130 (Id);
1976 end Is_Generic_Instance;
1978 function Is_Generic_Type (Id : E) return B is
1980 pragma Assert (Nkind (Id) in N_Entity);
1982 end Is_Generic_Type;
1984 function Is_Hidden (Id : E) return B is
1989 function Is_Hidden_Open_Scope (Id : E) return B is
1991 return Flag171 (Id);
1992 end Is_Hidden_Open_Scope;
1994 function Is_Immediately_Visible (Id : E) return B is
1996 pragma Assert (Nkind (Id) in N_Entity);
1998 end Is_Immediately_Visible;
2000 function Is_Implementation_Defined (Id : E) return B is
2002 return Flag254 (Id);
2003 end Is_Implementation_Defined;
2005 function Is_Imported (Id : E) return B is
2010 function Is_Inlined (Id : E) return B is
2015 function Is_Interface (Id : E) return B is
2017 return Flag186 (Id);
2020 function Is_Instantiated (Id : E) return B is
2022 return Flag126 (Id);
2023 end Is_Instantiated;
2025 function Is_Internal (Id : E) return B is
2027 pragma Assert (Nkind (Id) in N_Entity);
2031 function Is_Interrupt_Handler (Id : E) return B is
2033 pragma Assert (Nkind (Id) in N_Entity);
2035 end Is_Interrupt_Handler;
2037 function Is_Intrinsic_Subprogram (Id : E) return B is
2040 end Is_Intrinsic_Subprogram;
2042 function Is_Invariant_Procedure (Id : E) return B is
2044 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2045 return Flag257 (Id);
2046 end Is_Invariant_Procedure;
2048 function Is_Itype (Id : E) return B is
2053 function Is_Known_Non_Null (Id : E) return B is
2056 end Is_Known_Non_Null;
2058 function Is_Known_Null (Id : E) return B is
2060 return Flag204 (Id);
2063 function Is_Known_Valid (Id : E) return B is
2065 return Flag170 (Id);
2068 function Is_Limited_Composite (Id : E) return B is
2070 return Flag106 (Id);
2071 end Is_Limited_Composite;
2073 function Is_Limited_Interface (Id : E) return B is
2075 return Flag197 (Id);
2076 end Is_Limited_Interface;
2078 function Is_Limited_Record (Id : E) return B is
2081 end Is_Limited_Record;
2083 function Is_Machine_Code_Subprogram (Id : E) return B is
2085 pragma Assert (Is_Subprogram (Id));
2086 return Flag137 (Id);
2087 end Is_Machine_Code_Subprogram;
2089 function Is_Non_Static_Subtype (Id : E) return B is
2091 pragma Assert (Is_Type (Id));
2092 return Flag109 (Id);
2093 end Is_Non_Static_Subtype;
2095 function Is_Null_Init_Proc (Id : E) return B is
2097 pragma Assert (Ekind (Id) = E_Procedure);
2098 return Flag178 (Id);
2099 end Is_Null_Init_Proc;
2101 function Is_Obsolescent (Id : E) return B is
2103 return Flag153 (Id);
2106 function Is_Only_Out_Parameter (Id : E) return B is
2108 pragma Assert (Is_Formal (Id));
2109 return Flag226 (Id);
2110 end Is_Only_Out_Parameter;
2112 function Is_Optional_Parameter (Id : E) return B is
2114 pragma Assert (Is_Formal (Id));
2115 return Flag134 (Id);
2116 end Is_Optional_Parameter;
2118 function Is_Package_Body_Entity (Id : E) return B is
2120 return Flag160 (Id);
2121 end Is_Package_Body_Entity;
2123 function Is_Packed (Id : E) return B is
2125 return Flag51 (Implementation_Base_Type (Id));
2128 function Is_Packed_Array_Type (Id : E) return B is
2130 return Flag138 (Id);
2131 end Is_Packed_Array_Type;
2133 function Is_Potentially_Use_Visible (Id : E) return B is
2135 pragma Assert (Nkind (Id) in N_Entity);
2137 end Is_Potentially_Use_Visible;
2139 function Is_Predicate_Function (Id : E) return B is
2141 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2142 return Flag255 (Id);
2143 end Is_Predicate_Function;
2145 function Is_Predicate_Function_M (Id : E) return B is
2147 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2148 return Flag256 (Id);
2149 end Is_Predicate_Function_M;
2151 function Is_Preelaborated (Id : E) return B is
2154 end Is_Preelaborated;
2156 function Is_Primitive (Id : E) return B is
2159 (Is_Overloadable (Id)
2160 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2161 return Flag218 (Id);
2164 function Is_Primitive_Wrapper (Id : E) return B is
2166 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2167 return Flag195 (Id);
2168 end Is_Primitive_Wrapper;
2170 function Is_Private_Composite (Id : E) return B is
2172 pragma Assert (Is_Type (Id));
2173 return Flag107 (Id);
2174 end Is_Private_Composite;
2176 function Is_Private_Descendant (Id : E) return B is
2179 end Is_Private_Descendant;
2181 function Is_Private_Primitive (Id : E) return B is
2183 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2184 return Flag245 (Id);
2185 end Is_Private_Primitive;
2187 function Is_Processed_Transient (Id : E) return B is
2189 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2190 return Flag252 (Id);
2191 end Is_Processed_Transient;
2193 function Is_Public (Id : E) return B is
2195 pragma Assert (Nkind (Id) in N_Entity);
2199 function Is_Pure (Id : E) return B is
2204 function Is_Pure_Unit_Access_Type (Id : E) return B is
2206 pragma Assert (Is_Access_Type (Id));
2207 return Flag189 (Id);
2208 end Is_Pure_Unit_Access_Type;
2210 function Is_RACW_Stub_Type (Id : E) return B is
2212 pragma Assert (Is_Type (Id));
2213 return Flag244 (Id);
2214 end Is_RACW_Stub_Type;
2216 function Is_Raised (Id : E) return B is
2218 pragma Assert (Ekind (Id) = E_Exception);
2219 return Flag224 (Id);
2222 function Is_Remote_Call_Interface (Id : E) return B is
2225 end Is_Remote_Call_Interface;
2227 function Is_Remote_Types (Id : E) return B is
2230 end Is_Remote_Types;
2232 function Is_Renaming_Of_Object (Id : E) return B is
2234 return Flag112 (Id);
2235 end Is_Renaming_Of_Object;
2237 function Is_Return_Object (Id : E) return B is
2239 return Flag209 (Id);
2240 end Is_Return_Object;
2242 function Is_Safe_To_Reevaluate (Id : E) return B is
2244 return Flag249 (Id);
2245 end Is_Safe_To_Reevaluate;
2247 function Is_Shared_Passive (Id : E) return B is
2250 end Is_Shared_Passive;
2252 function Is_Statically_Allocated (Id : E) return B is
2255 end Is_Statically_Allocated;
2257 function Is_Tag (Id : E) return B is
2259 pragma Assert (Nkind (Id) in N_Entity);
2263 function Is_Tagged_Type (Id : E) return B is
2268 function Is_Thunk (Id : E) return B is
2270 return Flag225 (Id);
2273 function Is_Trivial_Subprogram (Id : E) return B is
2275 return Flag235 (Id);
2276 end Is_Trivial_Subprogram;
2278 function Is_True_Constant (Id : E) return B is
2280 return Flag163 (Id);
2281 end Is_True_Constant;
2283 function Is_Unchecked_Union (Id : E) return B is
2285 return Flag117 (Implementation_Base_Type (Id));
2286 end Is_Unchecked_Union;
2288 function Is_Underlying_Record_View (Id : E) return B is
2290 return Flag246 (Id);
2291 end Is_Underlying_Record_View;
2293 function Is_Unsigned_Type (Id : E) return B is
2295 pragma Assert (Is_Type (Id));
2296 return Flag144 (Id);
2297 end Is_Unsigned_Type;
2299 function Is_Valued_Procedure (Id : E) return B is
2301 pragma Assert (Ekind (Id) = E_Procedure);
2302 return Flag127 (Id);
2303 end Is_Valued_Procedure;
2305 function Is_Visible_Formal (Id : E) return B is
2307 return Flag206 (Id);
2308 end Is_Visible_Formal;
2310 function Is_Visible_Lib_Unit (Id : E) return B is
2312 return Flag116 (Id);
2313 end Is_Visible_Lib_Unit;
2315 function Is_VMS_Exception (Id : E) return B is
2317 return Flag133 (Id);
2318 end Is_VMS_Exception;
2320 function Is_Volatile (Id : E) return B is
2322 pragma Assert (Nkind (Id) in N_Entity);
2324 if Is_Type (Id) then
2325 return Flag16 (Base_Type (Id));
2331 function Itype_Printed (Id : E) return B is
2333 pragma Assert (Is_Itype (Id));
2334 return Flag202 (Id);
2337 function Kill_Elaboration_Checks (Id : E) return B is
2340 end Kill_Elaboration_Checks;
2342 function Kill_Range_Checks (Id : E) return B is
2345 end Kill_Range_Checks;
2347 function Known_To_Have_Preelab_Init (Id : E) return B is
2349 pragma Assert (Is_Type (Id));
2350 return Flag207 (Id);
2351 end Known_To_Have_Preelab_Init;
2353 function Last_Assignment (Id : E) return N is
2355 pragma Assert (Is_Assignable (Id));
2357 end Last_Assignment;
2359 function Last_Entity (Id : E) return E is
2364 function Limited_View (Id : E) return E is
2366 pragma Assert (Ekind (Id) = E_Package);
2370 function Lit_Indexes (Id : E) return E is
2372 pragma Assert (Is_Enumeration_Type (Id));
2376 function Lit_Strings (Id : E) return E is
2378 pragma Assert (Is_Enumeration_Type (Id));
2382 function Low_Bound_Tested (Id : E) return B is
2384 return Flag205 (Id);
2385 end Low_Bound_Tested;
2387 function Machine_Radix_10 (Id : E) return B is
2389 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2391 end Machine_Radix_10;
2393 function Master_Id (Id : E) return E is
2395 pragma Assert (Is_Access_Type (Id));
2399 function Materialize_Entity (Id : E) return B is
2401 return Flag168 (Id);
2402 end Materialize_Entity;
2404 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2406 return Flag262 (Id);
2407 end May_Inherit_Delayed_Rep_Aspects;
2409 function Mechanism (Id : E) return M is
2411 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2412 return UI_To_Int (Uint8 (Id));
2415 function Modulus (Id : E) return Uint is
2417 pragma Assert (Is_Modular_Integer_Type (Id));
2418 return Uint17 (Base_Type (Id));
2421 function Must_Be_On_Byte_Boundary (Id : E) return B is
2423 pragma Assert (Is_Type (Id));
2424 return Flag183 (Id);
2425 end Must_Be_On_Byte_Boundary;
2427 function Must_Have_Preelab_Init (Id : E) return B is
2429 pragma Assert (Is_Type (Id));
2430 return Flag208 (Id);
2431 end Must_Have_Preelab_Init;
2433 function Needs_Debug_Info (Id : E) return B is
2435 return Flag147 (Id);
2436 end Needs_Debug_Info;
2438 function Needs_No_Actuals (Id : E) return B is
2441 (Is_Overloadable (Id)
2442 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2444 end Needs_No_Actuals;
2446 function Never_Set_In_Source (Id : E) return B is
2448 return Flag115 (Id);
2449 end Never_Set_In_Source;
2451 function Next_Inlined_Subprogram (Id : E) return E is
2454 end Next_Inlined_Subprogram;
2456 function No_Pool_Assigned (Id : E) return B is
2458 pragma Assert (Is_Access_Type (Id));
2459 return Flag131 (Root_Type (Id));
2460 end No_Pool_Assigned;
2462 function No_Return (Id : E) return B is
2464 return Flag113 (Id);
2467 function No_Strict_Aliasing (Id : E) return B is
2469 pragma Assert (Is_Access_Type (Id));
2470 return Flag136 (Base_Type (Id));
2471 end No_Strict_Aliasing;
2473 function Non_Binary_Modulus (Id : E) return B is
2475 pragma Assert (Is_Type (Id));
2476 return Flag58 (Base_Type (Id));
2477 end Non_Binary_Modulus;
2479 function Non_Limited_View (Id : E) return E is
2481 pragma Assert (Ekind (Id) in Incomplete_Kind);
2483 end Non_Limited_View;
2485 function Nonzero_Is_True (Id : E) return B is
2487 pragma Assert (Root_Type (Id) = Standard_Boolean);
2488 return Flag162 (Base_Type (Id));
2489 end Nonzero_Is_True;
2491 function Normalized_First_Bit (Id : E) return U is
2493 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2495 end Normalized_First_Bit;
2497 function Normalized_Position (Id : E) return U is
2499 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2501 end Normalized_Position;
2503 function Normalized_Position_Max (Id : E) return U is
2505 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2507 end Normalized_Position_Max;
2509 function OK_To_Rename (Id : E) return B is
2511 pragma Assert (Ekind (Id) = E_Variable);
2512 return Flag247 (Id);
2515 function OK_To_Reorder_Components (Id : E) return B is
2517 pragma Assert (Is_Record_Type (Id));
2518 return Flag239 (Base_Type (Id));
2519 end OK_To_Reorder_Components;
2521 function Optimize_Alignment_Space (Id : E) return B is
2524 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2525 return Flag241 (Id);
2526 end Optimize_Alignment_Space;
2528 function Optimize_Alignment_Time (Id : E) return B is
2531 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2532 return Flag242 (Id);
2533 end Optimize_Alignment_Time;
2535 function Original_Access_Type (Id : E) return E is
2537 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2539 end Original_Access_Type;
2541 function Original_Array_Type (Id : E) return E is
2543 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2545 end Original_Array_Type;
2547 function Original_Record_Component (Id : E) return E is
2549 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2551 end Original_Record_Component;
2553 function Overlays_Constant (Id : E) return B is
2555 return Flag243 (Id);
2556 end Overlays_Constant;
2558 function Overridden_Operation (Id : E) return E is
2561 end Overridden_Operation;
2563 function Package_Instantiation (Id : E) return N is
2565 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2567 end Package_Instantiation;
2569 function Packed_Array_Type (Id : E) return E is
2571 pragma Assert (Is_Array_Type (Id));
2573 end Packed_Array_Type;
2575 function Parent_Subtype (Id : E) return E is
2577 pragma Assert (Is_Record_Type (Id));
2578 return Node19 (Base_Type (Id));
2581 function Postcondition_Proc (Id : E) return E is
2583 pragma Assert (Ekind (Id) = E_Procedure);
2585 end Postcondition_Proc;
2587 function PPC_Wrapper (Id : E) return E is
2589 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2593 function Prival (Id : E) return E is
2595 pragma Assert (Is_Protected_Component (Id));
2599 function Prival_Link (Id : E) return E is
2601 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2605 function Private_Dependents (Id : E) return L is
2607 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2608 return Elist18 (Id);
2609 end Private_Dependents;
2611 function Private_View (Id : E) return N is
2613 pragma Assert (Is_Private_Type (Id));
2617 function Protected_Body_Subprogram (Id : E) return E is
2619 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2621 end Protected_Body_Subprogram;
2623 function Protected_Formal (Id : E) return E is
2625 pragma Assert (Is_Formal (Id));
2627 end Protected_Formal;
2629 function Protection_Object (Id : E) return E is
2632 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2634 end Protection_Object;
2636 function Reachable (Id : E) return B is
2641 function Referenced (Id : E) return B is
2643 return Flag156 (Id);
2646 function Referenced_As_LHS (Id : E) return B is
2649 end Referenced_As_LHS;
2651 function Referenced_As_Out_Parameter (Id : E) return B is
2653 return Flag227 (Id);
2654 end Referenced_As_Out_Parameter;
2656 function Refined_State (Id : E) return N is
2658 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2662 function Refinement_Constituents (Id : E) return L is
2664 pragma Assert (Ekind (Id) = E_Abstract_State);
2666 end Refinement_Constituents;
2668 function Register_Exception_Call (Id : E) return N is
2670 pragma Assert (Ekind (Id) = E_Exception);
2672 end Register_Exception_Call;
2674 function Related_Array_Object (Id : E) return E is
2676 pragma Assert (Is_Array_Type (Id));
2678 end Related_Array_Object;
2680 function Related_Expression (Id : E) return N is
2682 pragma Assert (Ekind (Id) in Type_Kind
2683 or else Ekind_In (Id, E_Constant, E_Variable));
2685 end Related_Expression;
2687 function Related_Instance (Id : E) return E is
2689 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2691 end Related_Instance;
2693 function Related_Type (Id : E) return E is
2695 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2699 function Relative_Deadline_Variable (Id : E) return E is
2701 pragma Assert (Is_Task_Type (Id));
2702 return Node26 (Implementation_Base_Type (Id));
2703 end Relative_Deadline_Variable;
2705 function Renamed_Entity (Id : E) return N is
2710 function Renamed_In_Spec (Id : E) return B is
2712 pragma Assert (Ekind (Id) = E_Package);
2713 return Flag231 (Id);
2714 end Renamed_In_Spec;
2716 function Renamed_Object (Id : E) return N is
2721 function Renaming_Map (Id : E) return U is
2726 function Requires_Overriding (Id : E) return B is
2728 pragma Assert (Is_Overloadable (Id));
2729 return Flag213 (Id);
2730 end Requires_Overriding;
2732 function Return_Present (Id : E) return B is
2737 function Return_Applies_To (Id : E) return N is
2740 end Return_Applies_To;
2742 function Returns_By_Ref (Id : E) return B is
2747 function Reverse_Bit_Order (Id : E) return B is
2749 pragma Assert (Is_Record_Type (Id));
2750 return Flag164 (Base_Type (Id));
2751 end Reverse_Bit_Order;
2753 function Reverse_Storage_Order (Id : E) return B is
2755 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2756 return Flag93 (Base_Type (Id));
2757 end Reverse_Storage_Order;
2759 function RM_Size (Id : E) return U is
2761 pragma Assert (Is_Type (Id));
2765 function Scalar_Range (Id : E) return N is
2770 function Scale_Value (Id : E) return U is
2775 function Scope_Depth_Value (Id : E) return U is
2778 end Scope_Depth_Value;
2780 function Sec_Stack_Needed_For_Return (Id : E) return B is
2782 return Flag167 (Id);
2783 end Sec_Stack_Needed_For_Return;
2785 function Shadow_Entities (Id : E) return S is
2787 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2789 end Shadow_Entities;
2791 function Shared_Var_Procs_Instance (Id : E) return E is
2793 pragma Assert (Ekind (Id) = E_Variable);
2795 end Shared_Var_Procs_Instance;
2797 function Size_Check_Code (Id : E) return N is
2799 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2801 end Size_Check_Code;
2803 function Size_Depends_On_Discriminant (Id : E) return B is
2805 return Flag177 (Id);
2806 end Size_Depends_On_Discriminant;
2808 function Size_Known_At_Compile_Time (Id : E) return B is
2811 end Size_Known_At_Compile_Time;
2813 function Small_Value (Id : E) return R is
2815 pragma Assert (Is_Fixed_Point_Type (Id));
2816 return Ureal21 (Id);
2819 function SPARK_Mode_Pragmas (Id : E) return N is
2822 (Ekind_In (Id, E_Function, -- subprogram variants
2824 E_Generic_Procedure,
2828 Ekind_In (Id, E_Generic_Package, -- package variants
2832 end SPARK_Mode_Pragmas;
2834 function Spec_Entity (Id : E) return E is
2836 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2840 function Static_Predicate (Id : E) return S is
2842 pragma Assert (Is_Discrete_Type (Id));
2844 end Static_Predicate;
2846 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2848 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2850 end Status_Flag_Or_Transient_Decl;
2852 function Storage_Size_Variable (Id : E) return E is
2854 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2855 return Node15 (Implementation_Base_Type (Id));
2856 end Storage_Size_Variable;
2858 function Static_Elaboration_Desired (Id : E) return B is
2860 pragma Assert (Ekind (Id) = E_Package);
2862 end Static_Elaboration_Desired;
2864 function Static_Initialization (Id : E) return N is
2867 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2869 end Static_Initialization;
2871 function Stored_Constraint (Id : E) return L is
2874 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2875 return Elist23 (Id);
2876 end Stored_Constraint;
2878 function Strict_Alignment (Id : E) return B is
2880 return Flag145 (Implementation_Base_Type (Id));
2881 end Strict_Alignment;
2883 function String_Literal_Length (Id : E) return U is
2886 end String_Literal_Length;
2888 function String_Literal_Low_Bound (Id : E) return N is
2891 end String_Literal_Low_Bound;
2893 function Subprograms_For_Type (Id : E) return E is
2895 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2897 end Subprograms_For_Type;
2899 function Suppress_Elaboration_Warnings (Id : E) return B is
2901 return Flag148 (Id);
2902 end Suppress_Elaboration_Warnings;
2904 function Suppress_Initialization (Id : E) return B is
2906 pragma Assert (Is_Type (Id));
2907 return Flag105 (Id);
2908 end Suppress_Initialization;
2910 function Suppress_Style_Checks (Id : E) return B is
2912 return Flag165 (Id);
2913 end Suppress_Style_Checks;
2915 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2917 return Flag217 (Id);
2918 end Suppress_Value_Tracking_On_Call;
2920 function Task_Body_Procedure (Id : E) return N is
2922 pragma Assert (Ekind (Id) in Task_Kind);
2924 end Task_Body_Procedure;
2926 function Thunk_Entity (Id : E) return E is
2928 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2929 and then Is_Thunk (Id));
2933 function Treat_As_Volatile (Id : E) return B is
2936 end Treat_As_Volatile;
2938 function Underlying_Full_View (Id : E) return E is
2940 pragma Assert (Ekind (Id) in Private_Kind);
2942 end Underlying_Full_View;
2944 function Underlying_Record_View (Id : E) return E is
2947 end Underlying_Record_View;
2949 function Universal_Aliasing (Id : E) return B is
2951 pragma Assert (Is_Type (Id));
2952 return Flag216 (Implementation_Base_Type (Id));
2953 end Universal_Aliasing;
2955 function Unset_Reference (Id : E) return N is
2958 end Unset_Reference;
2960 function Used_As_Generic_Actual (Id : E) return B is
2962 return Flag222 (Id);
2963 end Used_As_Generic_Actual;
2965 function Uses_Lock_Free (Id : E) return B is
2967 pragma Assert (Is_Protected_Type (Id));
2968 return Flag188 (Id);
2971 function Uses_Sec_Stack (Id : E) return B is
2976 function Warnings_Off (Id : E) return B is
2981 function Warnings_Off_Used (Id : E) return B is
2983 return Flag236 (Id);
2984 end Warnings_Off_Used;
2986 function Warnings_Off_Used_Unmodified (Id : E) return B is
2988 return Flag237 (Id);
2989 end Warnings_Off_Used_Unmodified;
2991 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2993 return Flag238 (Id);
2994 end Warnings_Off_Used_Unreferenced;
2996 function Wrapped_Entity (Id : E) return E is
2998 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2999 and then Is_Primitive_Wrapper (Id));
3003 function Was_Hidden (Id : E) return B is
3005 return Flag196 (Id);
3008 ------------------------------
3009 -- Classification Functions --
3010 ------------------------------
3012 function Is_Access_Type (Id : E) return B is
3014 return Ekind (Id) in Access_Kind;
3017 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3019 return Ekind (Id) in Access_Protected_Kind;
3020 end Is_Access_Protected_Subprogram_Type;
3022 function Is_Access_Subprogram_Type (Id : E) return B is
3024 return Ekind (Id) in Access_Subprogram_Kind;
3025 end Is_Access_Subprogram_Type;
3027 function Is_Aggregate_Type (Id : E) return B is
3029 return Ekind (Id) in Aggregate_Kind;
3030 end Is_Aggregate_Type;
3032 function Is_Array_Type (Id : E) return B is
3034 return Ekind (Id) in Array_Kind;
3037 function Is_Assignable (Id : E) return B is
3039 return Ekind (Id) in Assignable_Kind;
3042 function Is_Class_Wide_Type (Id : E) return B is
3044 return Ekind (Id) in Class_Wide_Kind;
3045 end Is_Class_Wide_Type;
3047 function Is_Composite_Type (Id : E) return B is
3049 return Ekind (Id) in Composite_Kind;
3050 end Is_Composite_Type;
3052 function Is_Concurrent_Body (Id : E) return B is
3054 return Ekind (Id) in
3055 Concurrent_Body_Kind;
3056 end Is_Concurrent_Body;
3058 function Is_Concurrent_Record_Type (Id : E) return B is
3061 end Is_Concurrent_Record_Type;
3063 function Is_Concurrent_Type (Id : E) return B is
3065 return Ekind (Id) in Concurrent_Kind;
3066 end Is_Concurrent_Type;
3068 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3070 return Ekind (Id) in
3071 Decimal_Fixed_Point_Kind;
3072 end Is_Decimal_Fixed_Point_Type;
3074 function Is_Digits_Type (Id : E) return B is
3076 return Ekind (Id) in Digits_Kind;
3079 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3081 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3082 end Is_Discrete_Or_Fixed_Point_Type;
3084 function Is_Discrete_Type (Id : E) return B is
3086 return Ekind (Id) in Discrete_Kind;
3087 end Is_Discrete_Type;
3089 function Is_Elementary_Type (Id : E) return B is
3091 return Ekind (Id) in Elementary_Kind;
3092 end Is_Elementary_Type;
3094 function Is_Entry (Id : E) return B is
3096 return Ekind (Id) in Entry_Kind;
3099 function Is_Enumeration_Type (Id : E) return B is
3101 return Ekind (Id) in
3103 end Is_Enumeration_Type;
3105 function Is_Fixed_Point_Type (Id : E) return B is
3107 return Ekind (Id) in
3109 end Is_Fixed_Point_Type;
3111 function Is_Floating_Point_Type (Id : E) return B is
3113 return Ekind (Id) in Float_Kind;
3114 end Is_Floating_Point_Type;
3116 function Is_Formal (Id : E) return B is
3118 return Ekind (Id) in Formal_Kind;
3121 function Is_Formal_Object (Id : E) return B is
3123 return Ekind (Id) in Formal_Object_Kind;
3124 end Is_Formal_Object;
3126 function Is_Generic_Subprogram (Id : E) return B is
3128 return Ekind (Id) in Generic_Subprogram_Kind;
3129 end Is_Generic_Subprogram;
3131 function Is_Generic_Unit (Id : E) return B is
3133 return Ekind (Id) in Generic_Unit_Kind;
3134 end Is_Generic_Unit;
3136 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3138 return Ekind (Id) in
3139 Incomplete_Or_Private_Kind;
3140 end Is_Incomplete_Or_Private_Type;
3142 function Is_Incomplete_Type (Id : E) return B is
3144 return Ekind (Id) in
3146 end Is_Incomplete_Type;
3148 function Is_Integer_Type (Id : E) return B is
3150 return Ekind (Id) in Integer_Kind;
3151 end Is_Integer_Type;
3153 function Is_Modular_Integer_Type (Id : E) return B is
3155 return Ekind (Id) in
3156 Modular_Integer_Kind;
3157 end Is_Modular_Integer_Type;
3159 function Is_Named_Number (Id : E) return B is
3161 return Ekind (Id) in Named_Kind;
3162 end Is_Named_Number;
3164 function Is_Numeric_Type (Id : E) return B is
3166 return Ekind (Id) in Numeric_Kind;
3167 end Is_Numeric_Type;
3169 function Is_Object (Id : E) return B is
3171 return Ekind (Id) in Object_Kind;
3174 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3176 return Ekind (Id) in
3177 Ordinary_Fixed_Point_Kind;
3178 end Is_Ordinary_Fixed_Point_Type;
3180 function Is_Overloadable (Id : E) return B is
3182 return Ekind (Id) in Overloadable_Kind;
3183 end Is_Overloadable;
3185 function Is_Private_Type (Id : E) return B is
3187 return Ekind (Id) in Private_Kind;
3188 end Is_Private_Type;
3190 function Is_Protected_Type (Id : E) return B is
3192 return Ekind (Id) in Protected_Kind;
3193 end Is_Protected_Type;
3195 function Is_Real_Type (Id : E) return B is
3197 return Ekind (Id) in Real_Kind;
3200 function Is_Record_Type (Id : E) return B is
3202 return Ekind (Id) in Record_Kind;
3205 function Is_Scalar_Type (Id : E) return B is
3207 return Ekind (Id) in Scalar_Kind;
3210 function Is_Signed_Integer_Type (Id : E) return B is
3212 return Ekind (Id) in Signed_Integer_Kind;
3213 end Is_Signed_Integer_Type;
3215 function Is_Subprogram (Id : E) return B is
3217 return Ekind (Id) in Subprogram_Kind;
3220 function Is_Task_Type (Id : E) return B is
3222 return Ekind (Id) in Task_Kind;
3225 function Is_Type (Id : E) return B is
3227 return Ekind (Id) in Type_Kind;
3230 ------------------------------
3231 -- Attribute Set Procedures --
3232 ------------------------------
3234 -- Note: in many of these set procedures an "obvious" assertion is missing.
3235 -- The reason for this is that in many cases, a field is set before the
3236 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3237 -- it is possible to add assertions that specifically include the E_Void
3238 -- possibility, but in some cases, we just omit the assertions.
3240 procedure Set_Abstract_States (Id : E; V : L) is
3242 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3243 Set_Elist25 (Id, V);
3244 end Set_Abstract_States;
3246 procedure Set_Accept_Address (Id : E; V : L) is
3248 Set_Elist21 (Id, V);
3249 end Set_Accept_Address;
3251 procedure Set_Access_Disp_Table (Id : E; V : L) is
3253 pragma Assert (Ekind (Id) = E_Record_Type
3254 and then Id = Implementation_Base_Type (Id));
3255 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3256 Set_Elist16 (Id, V);
3257 end Set_Access_Disp_Table;
3259 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3262 end Set_Associated_Formal_Package;
3264 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3267 end Set_Associated_Node_For_Itype;
3269 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3271 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3273 end Set_Associated_Storage_Pool;
3275 procedure Set_Actual_Subtype (Id : E; V : E) is
3278 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3279 or else Is_Formal (Id));
3281 end Set_Actual_Subtype;
3283 procedure Set_Address_Taken (Id : E; V : B := True) is
3285 Set_Flag104 (Id, V);
3286 end Set_Address_Taken;
3288 procedure Set_Alias (Id : E; V : E) is
3291 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3295 procedure Set_Alignment (Id : E; V : U) is
3297 pragma Assert (Is_Type (Id)
3298 or else Is_Formal (Id)
3299 or else Ekind_In (Id, E_Loop_Parameter,
3306 procedure Set_Barrier_Function (Id : E; V : N) is
3308 pragma Assert (Is_Entry (Id));
3310 end Set_Barrier_Function;
3312 procedure Set_Block_Node (Id : E; V : N) is
3314 pragma Assert (Ekind (Id) = E_Block);
3318 procedure Set_Body_Entity (Id : E; V : E) is
3320 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3322 end Set_Body_Entity;
3324 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3327 (Ekind (Id) = E_Package
3328 or else Is_Subprogram (Id)
3329 or else Is_Generic_Unit (Id));
3331 end Set_Body_Needed_For_SAL;
3333 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3335 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3336 Set_Flag125 (Id, V);
3337 end Set_C_Pass_By_Copy;
3339 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3342 end Set_Can_Never_Be_Null;
3344 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3347 end Set_Checks_May_Be_Suppressed;
3349 procedure Set_Class_Wide_Type (Id : E; V : E) is
3351 pragma Assert (Is_Type (Id));
3353 end Set_Class_Wide_Type;
3355 procedure Set_Cloned_Subtype (Id : E; V : E) is
3357 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3359 end Set_Cloned_Subtype;
3361 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3363 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3365 end Set_Component_Bit_Offset;
3367 procedure Set_Component_Clause (Id : E; V : N) is
3369 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3371 end Set_Component_Clause;
3373 procedure Set_Component_Size (Id : E; V : U) is
3375 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3377 end Set_Component_Size;
3379 procedure Set_Component_Type (Id : E; V : E) is
3381 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3383 end Set_Component_Type;
3385 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3388 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3390 end Set_Corresponding_Concurrent_Type;
3392 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3394 pragma Assert (Ekind (Id) = E_Discriminant);
3396 end Set_Corresponding_Discriminant;
3398 procedure Set_Corresponding_Equality (Id : E; V : E) is
3401 (Ekind (Id) = E_Function
3402 and then not Comes_From_Source (Id)
3403 and then Chars (Id) = Name_Op_Ne);
3405 end Set_Corresponding_Equality;
3407 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3409 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3411 end Set_Corresponding_Protected_Entry;
3413 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3415 pragma Assert (Is_Concurrent_Type (Id));
3417 end Set_Corresponding_Record_Type;
3419 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3422 end Set_Corresponding_Remote_Type;
3424 procedure Set_Current_Use_Clause (Id : E; V : E) is
3426 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3428 end Set_Current_Use_Clause;
3430 procedure Set_Current_Value (Id : E; V : N) is
3432 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3434 end Set_Current_Value;
3436 procedure Set_CR_Discriminant (Id : E; V : E) is
3439 end Set_CR_Discriminant;
3441 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3443 Set_Flag166 (Id, V);
3444 end Set_Debug_Info_Off;
3446 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3449 end Set_Debug_Renaming_Link;
3451 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3453 pragma Assert (Is_Array_Type (Id));
3455 end Set_Default_Aspect_Component_Value;
3457 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3459 pragma Assert (Is_Scalar_Type (Id));
3461 end Set_Default_Aspect_Value;
3463 procedure Set_Default_Expr_Function (Id : E; V : E) is
3465 pragma Assert (Is_Formal (Id));
3467 end Set_Default_Expr_Function;
3469 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3471 Set_Flag108 (Id, V);
3472 end Set_Default_Expressions_Processed;
3474 procedure Set_Default_Value (Id : E; V : N) is
3476 pragma Assert (Is_Formal (Id));
3478 end Set_Default_Value;
3480 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3484 or else Is_Task_Type (Id)
3485 or else Ekind (Id) = E_Block);
3486 Set_Flag114 (Id, V);
3487 end Set_Delay_Cleanups;
3489 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3492 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3495 end Set_Delay_Subprogram_Descriptors;
3497 procedure Set_Delta_Value (Id : E; V : R) is
3499 pragma Assert (Is_Fixed_Point_Type (Id));
3500 Set_Ureal18 (Id, V);
3501 end Set_Delta_Value;
3503 procedure Set_Dependent_Instances (Id : E; V : L) is
3505 pragma Assert (Is_Generic_Instance (Id));
3507 end Set_Dependent_Instances;
3509 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3511 pragma Assert (Nkind (Id) in N_Entity);
3513 end Set_Depends_On_Private;
3515 procedure Set_Digits_Value (Id : E; V : U) is
3518 (Is_Floating_Point_Type (Id)
3519 or else Is_Decimal_Fixed_Point_Type (Id));
3521 end Set_Digits_Value;
3523 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3526 end Set_Directly_Designated_Type;
3528 procedure Set_Discard_Names (Id : E; V : B := True) is
3531 end Set_Discard_Names;
3533 procedure Set_Discriminal (Id : E; V : E) is
3535 pragma Assert (Ekind (Id) = E_Discriminant);
3537 end Set_Discriminal;
3539 procedure Set_Discriminal_Link (Id : E; V : E) is
3542 end Set_Discriminal_Link;
3544 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3546 pragma Assert (Ekind (Id) = E_Component);
3548 end Set_Discriminant_Checking_Func;
3550 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3552 pragma Assert (Nkind (Id) in N_Entity);
3553 Set_Elist21 (Id, V);
3554 end Set_Discriminant_Constraint;
3556 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3559 end Set_Discriminant_Default_Value;
3561 procedure Set_Discriminant_Number (Id : E; V : U) is
3564 end Set_Discriminant_Number;
3566 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3568 pragma Assert (Ekind (Id) = E_Record_Type
3569 and then Id = Implementation_Base_Type (Id));
3570 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3571 Set_Elist26 (Id, V);
3572 end Set_Dispatch_Table_Wrappers;
3574 procedure Set_DT_Entry_Count (Id : E; V : U) is
3576 pragma Assert (Ekind (Id) = E_Component);
3578 end Set_DT_Entry_Count;
3580 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3582 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3584 end Set_DT_Offset_To_Top_Func;
3586 procedure Set_DT_Position (Id : E; V : U) is
3588 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3590 end Set_DT_Position;
3592 procedure Set_DTC_Entity (Id : E; V : E) is
3594 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3598 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3600 pragma Assert (Ekind (Id) = E_Package);
3601 Set_Flag210 (Id, V);
3602 end Set_Elaborate_Body_Desirable;
3604 procedure Set_Elaboration_Entity (Id : E; V : E) is
3609 Ekind (Id) = E_Package
3611 Is_Generic_Unit (Id));
3613 end Set_Elaboration_Entity;
3615 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3620 Ekind (Id) = E_Package
3622 Is_Generic_Unit (Id));
3623 Set_Flag174 (Id, V);
3624 end Set_Elaboration_Entity_Required;
3626 procedure Set_Enclosing_Scope (Id : E; V : E) is
3629 end Set_Enclosing_Scope;
3631 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3633 pragma Assert (Is_Entry (Id));
3634 Set_Flag152 (Id, V);
3635 end Set_Entry_Accepted;
3637 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3640 end Set_Entry_Bodies_Array;
3642 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3645 end Set_Entry_Cancel_Parameter;
3647 procedure Set_Entry_Component (Id : E; V : E) is
3650 end Set_Entry_Component;
3652 procedure Set_Entry_Formal (Id : E; V : E) is
3655 end Set_Entry_Formal;
3657 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3659 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3661 end Set_Entry_Index_Constant;
3663 procedure Set_Contract (Id : E; V : N) is
3666 (Ekind_In (Id, E_Entry,
3673 or else Is_Generic_Subprogram (Id)
3674 or else Is_Subprogram (Id));
3678 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3681 end Set_Entry_Parameters_Type;
3683 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3685 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3687 end Set_Enum_Pos_To_Rep;
3689 procedure Set_Enumeration_Pos (Id : E; V : U) is
3691 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3693 end Set_Enumeration_Pos;
3695 procedure Set_Enumeration_Rep (Id : E; V : U) is
3697 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3699 end Set_Enumeration_Rep;
3701 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3703 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3705 end Set_Enumeration_Rep_Expr;
3707 procedure Set_Equivalent_Type (Id : E; V : E) is
3710 (Ekind_In (Id, E_Class_Wide_Type,
3711 E_Class_Wide_Subtype,
3712 E_Access_Protected_Subprogram_Type,
3713 E_Anonymous_Access_Protected_Subprogram_Type,
3714 E_Access_Subprogram_Type,
3717 end Set_Equivalent_Type;
3719 procedure Set_Esize (Id : E; V : U) is
3724 procedure Set_Exception_Code (Id : E; V : U) is
3726 pragma Assert (Ekind (Id) = E_Exception);
3728 end Set_Exception_Code;
3730 procedure Set_Extra_Accessibility (Id : E; V : E) is
3733 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3735 end Set_Extra_Accessibility;
3737 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3739 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3741 end Set_Extra_Accessibility_Of_Result;
3743 procedure Set_Extra_Constrained (Id : E; V : E) is
3745 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3747 end Set_Extra_Constrained;
3749 procedure Set_Extra_Formal (Id : E; V : E) is
3752 end Set_Extra_Formal;
3754 procedure Set_Extra_Formals (Id : E; V : E) is
3757 (Is_Overloadable (Id)
3758 or else Ekind_In (Id, E_Entry_Family,
3760 E_Subprogram_Type));
3762 end Set_Extra_Formals;
3764 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3767 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3768 Set_Flag229 (Id, V);
3769 end Set_Can_Use_Internal_Rep;
3771 procedure Set_Finalization_Master (Id : E; V : E) is
3773 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3775 end Set_Finalization_Master;
3777 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3779 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3780 Set_Flag158 (Id, V);
3781 end Set_Finalize_Storage_Only;
3783 procedure Set_Finalizer (Id : E; V : E) is
3785 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3789 procedure Set_First_Entity (Id : E; V : E) is
3792 end Set_First_Entity;
3794 procedure Set_First_Exit_Statement (Id : E; V : N) is
3796 pragma Assert (Ekind (Id) = E_Loop);
3798 end Set_First_Exit_Statement;
3800 procedure Set_First_Index (Id : E; V : N) is
3802 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3804 end Set_First_Index;
3806 procedure Set_First_Literal (Id : E; V : E) is
3808 pragma Assert (Is_Enumeration_Type (Id));
3810 end Set_First_Literal;
3812 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3814 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3816 end Set_First_Optional_Parameter;
3818 procedure Set_First_Private_Entity (Id : E; V : E) is
3820 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3821 or else Ekind (Id) in Concurrent_Kind);
3823 end Set_First_Private_Entity;
3825 procedure Set_First_Rep_Item (Id : E; V : N) is
3828 end Set_First_Rep_Item;
3830 procedure Set_Float_Rep (Id : E; V : F) is
3831 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3833 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3836 procedure Set_Freeze_Node (Id : E; V : N) is
3839 end Set_Freeze_Node;
3841 procedure Set_From_With_Type (Id : E; V : B := True) is
3845 or else Ekind (Id) = E_Package);
3846 Set_Flag159 (Id, V);
3847 end Set_From_With_Type;
3849 procedure Set_Full_View (Id : E; V : E) is
3851 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3855 procedure Set_Generic_Homonym (Id : E; V : E) is
3858 end Set_Generic_Homonym;
3860 procedure Set_Generic_Renamings (Id : E; V : L) is
3862 Set_Elist23 (Id, V);
3863 end Set_Generic_Renamings;
3865 procedure Set_Handler_Records (Id : E; V : S) is
3868 end Set_Handler_Records;
3870 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3872 pragma Assert (Id = Base_Type (Id));
3873 Set_Flag135 (Id, V);
3874 end Set_Has_Aliased_Components;
3876 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3879 end Set_Has_Alignment_Clause;
3881 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3884 end Set_Has_All_Calls_Remote;
3886 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3889 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3890 Set_Flag253 (Id, V);
3891 end Set_Has_Anonymous_Master;
3893 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3895 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3897 end Set_Has_Atomic_Components;
3899 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3902 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3903 Set_Flag139 (Id, V);
3904 end Set_Has_Biased_Representation;
3906 procedure Set_Has_Completion (Id : E; V : B := True) is
3909 end Set_Has_Completion;
3911 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3913 pragma Assert (Is_Type (Id));
3915 end Set_Has_Completion_In_Body;
3917 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3919 pragma Assert (Ekind (Id) = E_Record_Type);
3920 Set_Flag140 (Id, V);
3921 end Set_Has_Complex_Representation;
3923 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3925 pragma Assert (Ekind (Id) = E_Array_Type);
3927 end Set_Has_Component_Size_Clause;
3929 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3931 pragma Assert (Is_Type (Id));
3932 Set_Flag187 (Id, V);
3933 end Set_Has_Constrained_Partial_View;
3935 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3937 Set_Flag181 (Id, V);
3938 end Set_Has_Contiguous_Rep;
3940 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3942 pragma Assert (Id = Base_Type (Id));
3944 end Set_Has_Controlled_Component;
3946 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3949 end Set_Has_Controlling_Result;
3951 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3953 Set_Flag119 (Id, V);
3954 end Set_Has_Convention_Pragma;
3956 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3959 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3960 and then Is_Base_Type (Id));
3962 end Set_Has_Default_Aspect;
3964 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3966 pragma Assert (Nkind (Id) in N_Entity);
3967 Set_Flag200 (Id, V);
3968 end Set_Has_Delayed_Aspects;
3970 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3972 pragma Assert (Nkind (Id) in N_Entity);
3974 end Set_Has_Delayed_Freeze;
3976 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
3978 pragma Assert (Nkind (Id) in N_Entity);
3979 Set_Flag261 (Id, V);
3980 end Set_Has_Delayed_Rep_Aspects;
3982 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3984 pragma Assert (Nkind (Id) in N_Entity);
3986 end Set_Has_Discriminants;
3988 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3990 pragma Assert (Ekind (Id) = E_Record_Type
3991 and then Is_Tagged_Type (Id));
3992 Set_Flag220 (Id, V);
3993 end Set_Has_Dispatch_Table;
3995 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3997 pragma Assert (Is_Type (Id));
3998 Set_Flag258 (Id, V);
3999 end Set_Has_Dynamic_Predicate_Aspect;
4001 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4003 pragma Assert (Is_Enumeration_Type (Id));
4005 end Set_Has_Enumeration_Rep_Clause;
4007 procedure Set_Has_Exit (Id : E; V : B := True) is
4012 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4014 pragma Assert (Is_Tagged_Type (Id));
4015 Set_Flag110 (Id, V);
4016 end Set_Has_External_Tag_Rep_Clause;
4018 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4020 Set_Flag175 (Id, V);
4021 end Set_Has_Forward_Instantiation;
4023 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4025 Set_Flag173 (Id, V);
4026 end Set_Has_Fully_Qualified_Name;
4028 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4031 end Set_Has_Gigi_Rep_Item;
4033 procedure Set_Has_Homonym (Id : E; V : B := True) is
4036 end Set_Has_Homonym;
4038 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4040 Set_Flag251 (Id, V);
4041 end Set_Has_Implicit_Dereference;
4043 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4045 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4047 end Set_Has_Independent_Components;
4049 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4051 pragma Assert (Is_Type (Id));
4052 Set_Flag248 (Id, V);
4053 end Set_Has_Inheritable_Invariants;
4055 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4057 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4058 Set_Flag219 (Id, V);
4059 end Set_Has_Initial_Value;
4061 procedure Set_Has_Invariants (Id : E; V : B := True) is
4063 pragma Assert (Is_Type (Id));
4064 Set_Flag232 (Id, V);
4065 end Set_Has_Invariants;
4067 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4069 pragma Assert (Ekind (Id) = E_Loop);
4070 Set_Flag260 (Id, V);
4071 end Set_Has_Loop_Entry_Attributes;
4073 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4075 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4077 end Set_Has_Machine_Radix_Clause;
4079 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4082 end Set_Has_Master_Entity;
4084 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4086 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4087 Set_Flag142 (Id, V);
4088 end Set_Has_Missing_Return;
4090 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4092 Set_Flag101 (Id, V);
4093 end Set_Has_Nested_Block_With_Handler;
4095 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4097 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4098 Set_Flag215 (Id, V);
4099 end Set_Has_Up_Level_Access;
4101 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4103 pragma Assert (Id = Base_Type (Id));
4105 end Set_Has_Non_Standard_Rep;
4107 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4109 pragma Assert (Is_Type (Id));
4110 Set_Flag172 (Id, V);
4111 end Set_Has_Object_Size_Clause;
4113 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4115 Set_Flag154 (Id, V);
4116 end Set_Has_Per_Object_Constraint;
4118 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4120 pragma Assert (Is_Subprogram (Id));
4121 Set_Flag240 (Id, V);
4122 end Set_Has_Postconditions;
4124 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4126 pragma Assert (Is_Access_Type (Id));
4127 Set_Flag27 (Base_Type (Id), V);
4128 end Set_Has_Pragma_Controlled;
4130 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4132 Set_Flag150 (Id, V);
4133 end Set_Has_Pragma_Elaborate_Body;
4135 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4137 Set_Flag157 (Id, V);
4138 end Set_Has_Pragma_Inline;
4140 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4142 Set_Flag230 (Id, V);
4143 end Set_Has_Pragma_Inline_Always;
4145 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4147 Set_Flag201 (Id, V);
4148 end Set_Has_Pragma_No_Inline;
4150 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4152 pragma Assert (Is_Enumeration_Type (Id));
4153 pragma Assert (Id = Base_Type (Id));
4154 Set_Flag198 (Id, V);
4155 end Set_Has_Pragma_Ordered;
4157 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4159 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4160 pragma Assert (Id = Base_Type (Id));
4161 Set_Flag121 (Id, V);
4162 end Set_Has_Pragma_Pack;
4164 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4166 Set_Flag221 (Id, V);
4167 end Set_Has_Pragma_Preelab_Init;
4169 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4171 Set_Flag203 (Id, V);
4172 end Set_Has_Pragma_Pure;
4174 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4176 Set_Flag179 (Id, V);
4177 end Set_Has_Pragma_Pure_Function;
4179 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4181 Set_Flag169 (Id, V);
4182 end Set_Has_Pragma_Thread_Local_Storage;
4184 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4186 Set_Flag233 (Id, V);
4187 end Set_Has_Pragma_Unmodified;
4189 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4191 Set_Flag180 (Id, V);
4192 end Set_Has_Pragma_Unreferenced;
4194 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4196 pragma Assert (Is_Type (Id));
4197 Set_Flag212 (Id, V);
4198 end Set_Has_Pragma_Unreferenced_Objects;
4200 procedure Set_Has_Predicates (Id : E; V : B := True) is
4202 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4203 Set_Flag250 (Id, V);
4204 end Set_Has_Predicates;
4206 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4208 pragma Assert (Id = Base_Type (Id));
4209 Set_Flag120 (Id, V);
4210 end Set_Has_Primitive_Operations;
4212 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4214 pragma Assert (Is_Type (Id));
4215 Set_Flag151 (Id, V);
4216 end Set_Has_Private_Ancestor;
4218 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4220 Set_Flag155 (Id, V);
4221 end Set_Has_Private_Declaration;
4223 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4225 Set_Flag161 (Id, V);
4226 end Set_Has_Qualified_Name;
4228 procedure Set_Has_RACW (Id : E; V : B := True) is
4230 pragma Assert (Ekind (Id) = E_Package);
4231 Set_Flag214 (Id, V);
4234 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4236 pragma Assert (Id = Base_Type (Id));
4238 end Set_Has_Record_Rep_Clause;
4240 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4242 pragma Assert (Is_Subprogram (Id));
4243 Set_Flag143 (Id, V);
4244 end Set_Has_Recursive_Call;
4246 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4249 end Set_Has_Size_Clause;
4251 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4254 end Set_Has_Small_Clause;
4256 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4258 pragma Assert (Id = Base_Type (Id));
4259 Set_Flag100 (Id, V);
4260 end Set_Has_Specified_Layout;
4262 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4264 pragma Assert (Is_Type (Id));
4265 Set_Flag190 (Id, V);
4266 end Set_Has_Specified_Stream_Input;
4268 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4270 pragma Assert (Is_Type (Id));
4271 Set_Flag191 (Id, V);
4272 end Set_Has_Specified_Stream_Output;
4274 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4276 pragma Assert (Is_Type (Id));
4277 Set_Flag192 (Id, V);
4278 end Set_Has_Specified_Stream_Read;
4280 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4282 pragma Assert (Is_Type (Id));
4283 Set_Flag193 (Id, V);
4284 end Set_Has_Specified_Stream_Write;
4286 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4288 Set_Flag211 (Id, V);
4289 end Set_Has_Static_Discriminants;
4291 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4293 pragma Assert (Is_Type (Id));
4294 Set_Flag259 (Id, V);
4295 end Set_Has_Static_Predicate_Aspect;
4297 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4299 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4300 pragma Assert (Id = Base_Type (Id));
4302 end Set_Has_Storage_Size_Clause;
4304 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4306 pragma Assert (Is_Elementary_Type (Id));
4307 Set_Flag184 (Id, V);
4308 end Set_Has_Stream_Size_Clause;
4310 procedure Set_Has_Task (Id : E; V : B := True) is
4312 pragma Assert (Id = Base_Type (Id));
4316 procedure Set_Has_Thunks (Id : E; V : B := True) is
4318 pragma Assert (Is_Tag (Id));
4319 Set_Flag228 (Id, V);
4322 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4324 pragma Assert (Id = Base_Type (Id));
4325 Set_Flag123 (Id, V);
4326 end Set_Has_Unchecked_Union;
4328 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4330 pragma Assert (Is_Type (Id));
4332 end Set_Has_Unknown_Discriminants;
4334 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4336 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4338 end Set_Has_Volatile_Components;
4340 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4342 Set_Flag182 (Id, V);
4343 end Set_Has_Xref_Entry;
4345 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4347 pragma Assert (Ekind (Id) = E_Variable);
4349 end Set_Hiding_Loop_Variable;
4351 procedure Set_Homonym (Id : E; V : E) is
4353 pragma Assert (Id /= V);
4357 procedure Set_Interface_Alias (Id : E; V : E) is
4361 and then Is_Hidden (Id)
4362 and then (Ekind_In (Id, E_Procedure, E_Function)));
4364 end Set_Interface_Alias;
4366 procedure Set_Interfaces (Id : E; V : L) is
4368 pragma Assert (Is_Record_Type (Id));
4369 Set_Elist25 (Id, V);
4372 procedure Set_In_Package_Body (Id : E; V : B := True) is
4375 end Set_In_Package_Body;
4377 procedure Set_In_Private_Part (Id : E; V : B := True) is
4380 end Set_In_Private_Part;
4382 procedure Set_In_Use (Id : E; V : B := True) is
4384 pragma Assert (Nkind (Id) in N_Entity);
4388 procedure Set_Initialization_Statements (Id : E; V : N) is
4390 -- Tolerate an E_Void entity since this can be called while resolving
4391 -- an aggregate used as the initialization expression for an object
4392 -- declaration, and this occurs before the Ekind for the object is set.
4394 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4396 end Set_Initialization_Statements;
4398 procedure Set_Inner_Instances (Id : E; V : L) is
4400 Set_Elist23 (Id, V);
4401 end Set_Inner_Instances;
4403 procedure Set_Interface_Name (Id : E; V : N) is
4406 end Set_Interface_Name;
4408 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4410 pragma Assert (Is_Overloadable (Id));
4412 end Set_Is_Abstract_Subprogram;
4414 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4416 pragma Assert (Is_Type (Id));
4417 Set_Flag146 (Id, V);
4418 end Set_Is_Abstract_Type;
4420 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4422 pragma Assert (Is_Access_Type (Id));
4423 Set_Flag194 (Id, V);
4424 end Set_Is_Local_Anonymous_Access;
4426 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4428 pragma Assert (Is_Access_Type (Id));
4430 end Set_Is_Access_Constant;
4432 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4434 Set_Flag185 (Id, V);
4435 end Set_Is_Ada_2005_Only;
4437 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4439 Set_Flag199 (Id, V);
4440 end Set_Is_Ada_2012_Only;
4442 procedure Set_Is_Aliased (Id : E; V : B := True) is
4444 pragma Assert (Nkind (Id) in N_Entity);
4448 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4450 pragma Assert (Is_Entry (Id));
4451 Set_Flag132 (Id, V);
4452 end Set_Is_AST_Entry;
4454 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4457 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4459 end Set_Is_Asynchronous;
4461 procedure Set_Is_Atomic (Id : E; V : B := True) is
4466 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4468 pragma Assert ((not V)
4469 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4470 Set_Flag122 (Id, V);
4471 end Set_Is_Bit_Packed_Array;
4473 procedure Set_Is_Called (Id : E; V : B := True) is
4475 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4476 Set_Flag102 (Id, V);
4479 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4482 end Set_Is_Character_Type;
4484 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4487 end Set_Is_Child_Unit;
4489 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4492 end Set_Is_Class_Wide_Equivalent_Type;
4494 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4496 Set_Flag149 (Id, V);
4497 end Set_Is_Compilation_Unit;
4499 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4501 pragma Assert (Ekind (Id) = E_Discriminant);
4502 Set_Flag103 (Id, V);
4503 end Set_Is_Completely_Hidden;
4505 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4508 end Set_Is_Concurrent_Record_Type;
4510 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4513 end Set_Is_Constr_Subt_For_U_Nominal;
4515 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4517 Set_Flag141 (Id, V);
4518 end Set_Is_Constr_Subt_For_UN_Aliased;
4520 procedure Set_Is_Constrained (Id : E; V : B := True) is
4522 pragma Assert (Nkind (Id) in N_Entity);
4524 end Set_Is_Constrained;
4526 procedure Set_Is_Constructor (Id : E; V : B := True) is
4529 end Set_Is_Constructor;
4531 procedure Set_Is_Controlled (Id : E; V : B := True) is
4533 pragma Assert (Id = Base_Type (Id));
4535 end Set_Is_Controlled;
4537 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4539 pragma Assert (Is_Formal (Id));
4541 end Set_Is_Controlling_Formal;
4543 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4546 end Set_Is_CPP_Class;
4548 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4550 pragma Assert (Is_Type (Id));
4551 Set_Flag223 (Id, V);
4552 end Set_Is_Descendent_Of_Address;
4554 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4556 Set_Flag176 (Id, V);
4557 end Set_Is_Discrim_SO_Function;
4559 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4561 Set_Flag234 (Id, V);
4562 end Set_Is_Dispatch_Table_Entity;
4564 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4569 Is_Overloadable (Id)
4571 Ekind (Id) = E_Subprogram_Type);
4574 end Set_Is_Dispatching_Operation;
4576 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4578 Set_Flag124 (Id, V);
4579 end Set_Is_Eliminated;
4581 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4584 end Set_Is_Entry_Formal;
4586 procedure Set_Is_Exported (Id : E; V : B := True) is
4589 end Set_Is_Exported;
4591 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4594 end Set_Is_First_Subtype;
4596 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4598 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4599 Set_Flag118 (Id, V);
4600 end Set_Is_For_Access_Subtype;
4602 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4604 Set_Flag111 (Id, V);
4605 end Set_Is_Formal_Subprogram;
4607 procedure Set_Is_Frozen (Id : E; V : B := True) is
4609 pragma Assert (Nkind (Id) in N_Entity);
4613 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4615 pragma Assert (Is_Type (Id));
4617 end Set_Is_Generic_Actual_Type;
4619 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4621 Set_Flag130 (Id, V);
4622 end Set_Is_Generic_Instance;
4624 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4626 pragma Assert (Nkind (Id) in N_Entity);
4628 end Set_Is_Generic_Type;
4630 procedure Set_Is_Hidden (Id : E; V : B := True) is
4635 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4637 Set_Flag171 (Id, V);
4638 end Set_Is_Hidden_Open_Scope;
4640 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4642 pragma Assert (Nkind (Id) in N_Entity);
4644 end Set_Is_Immediately_Visible;
4646 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4648 Set_Flag254 (Id, V);
4649 end Set_Is_Implementation_Defined;
4651 procedure Set_Is_Imported (Id : E; V : B := True) is
4654 end Set_Is_Imported;
4656 procedure Set_Is_Inlined (Id : E; V : B := True) is
4661 procedure Set_Is_Interface (Id : E; V : B := True) is
4663 pragma Assert (Is_Record_Type (Id));
4664 Set_Flag186 (Id, V);
4665 end Set_Is_Interface;
4667 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4669 Set_Flag126 (Id, V);
4670 end Set_Is_Instantiated;
4672 procedure Set_Is_Internal (Id : E; V : B := True) is
4674 pragma Assert (Nkind (Id) in N_Entity);
4676 end Set_Is_Internal;
4678 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4680 pragma Assert (Nkind (Id) in N_Entity);
4682 end Set_Is_Interrupt_Handler;
4684 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4687 end Set_Is_Intrinsic_Subprogram;
4689 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4691 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4692 Set_Flag257 (Id, V);
4693 end Set_Is_Invariant_Procedure;
4695 procedure Set_Is_Itype (Id : E; V : B := True) is
4700 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4703 end Set_Is_Known_Non_Null;
4705 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4707 Set_Flag204 (Id, V);
4708 end Set_Is_Known_Null;
4710 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4712 Set_Flag170 (Id, V);
4713 end Set_Is_Known_Valid;
4715 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4717 pragma Assert (Is_Type (Id));
4718 Set_Flag106 (Id, V);
4719 end Set_Is_Limited_Composite;
4721 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4723 pragma Assert (Is_Interface (Id));
4724 Set_Flag197 (Id, V);
4725 end Set_Is_Limited_Interface;
4727 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4730 end Set_Is_Limited_Record;
4732 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4734 pragma Assert (Is_Subprogram (Id));
4735 Set_Flag137 (Id, V);
4736 end Set_Is_Machine_Code_Subprogram;
4738 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4740 pragma Assert (Is_Type (Id));
4741 Set_Flag109 (Id, V);
4742 end Set_Is_Non_Static_Subtype;
4744 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4746 pragma Assert (Ekind (Id) = E_Procedure);
4747 Set_Flag178 (Id, V);
4748 end Set_Is_Null_Init_Proc;
4750 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4752 Set_Flag153 (Id, V);
4753 end Set_Is_Obsolescent;
4755 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4757 pragma Assert (Ekind (Id) = E_Out_Parameter);
4758 Set_Flag226 (Id, V);
4759 end Set_Is_Only_Out_Parameter;
4761 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4763 pragma Assert (Is_Formal (Id));
4764 Set_Flag134 (Id, V);
4765 end Set_Is_Optional_Parameter;
4767 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4769 Set_Flag160 (Id, V);
4770 end Set_Is_Package_Body_Entity;
4772 procedure Set_Is_Packed (Id : E; V : B := True) is
4774 pragma Assert (Id = Base_Type (Id));
4778 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4780 Set_Flag138 (Id, V);
4781 end Set_Is_Packed_Array_Type;
4783 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4785 pragma Assert (Nkind (Id) in N_Entity);
4787 end Set_Is_Potentially_Use_Visible;
4789 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4791 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4792 Set_Flag255 (Id, V);
4793 end Set_Is_Predicate_Function;
4795 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4797 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4798 Set_Flag256 (Id, V);
4799 end Set_Is_Predicate_Function_M;
4801 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4804 end Set_Is_Preelaborated;
4806 procedure Set_Is_Primitive (Id : E; V : B := True) is
4809 (Is_Overloadable (Id)
4810 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4811 Set_Flag218 (Id, V);
4812 end Set_Is_Primitive;
4814 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4816 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4817 Set_Flag195 (Id, V);
4818 end Set_Is_Primitive_Wrapper;
4820 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4822 pragma Assert (Is_Type (Id));
4823 Set_Flag107 (Id, V);
4824 end Set_Is_Private_Composite;
4826 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4829 end Set_Is_Private_Descendant;
4831 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4833 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4834 Set_Flag245 (Id, V);
4835 end Set_Is_Private_Primitive;
4837 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4839 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4840 Set_Flag252 (Id, V);
4841 end Set_Is_Processed_Transient;
4843 procedure Set_Is_Public (Id : E; V : B := True) is
4845 pragma Assert (Nkind (Id) in N_Entity);
4849 procedure Set_Is_Pure (Id : E; V : B := True) is
4854 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4856 pragma Assert (Is_Access_Type (Id));
4857 Set_Flag189 (Id, V);
4858 end Set_Is_Pure_Unit_Access_Type;
4860 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4862 pragma Assert (Is_Type (Id));
4863 Set_Flag244 (Id, V);
4864 end Set_Is_RACW_Stub_Type;
4866 procedure Set_Is_Raised (Id : E; V : B := True) is
4868 pragma Assert (Ekind (Id) = E_Exception);
4869 Set_Flag224 (Id, V);
4872 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4875 end Set_Is_Remote_Call_Interface;
4877 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4880 end Set_Is_Remote_Types;
4882 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4884 Set_Flag112 (Id, V);
4885 end Set_Is_Renaming_Of_Object;
4887 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4889 Set_Flag209 (Id, V);
4890 end Set_Is_Return_Object;
4892 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4894 pragma Assert (Ekind (Id) = E_Variable);
4895 Set_Flag249 (Id, V);
4896 end Set_Is_Safe_To_Reevaluate;
4898 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4901 end Set_Is_Shared_Passive;
4903 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4907 or else Ekind_In (Id, E_Exception,
4912 end Set_Is_Statically_Allocated;
4914 procedure Set_Is_Tag (Id : E; V : B := True) is
4916 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4920 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4923 end Set_Is_Tagged_Type;
4925 procedure Set_Is_Thunk (Id : E; V : B := True) is
4927 pragma Assert (Is_Subprogram (Id));
4928 Set_Flag225 (Id, V);
4931 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4933 Set_Flag235 (Id, V);
4934 end Set_Is_Trivial_Subprogram;
4936 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4938 Set_Flag163 (Id, V);
4939 end Set_Is_True_Constant;
4941 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4943 pragma Assert (Id = Base_Type (Id));
4944 Set_Flag117 (Id, V);
4945 end Set_Is_Unchecked_Union;
4947 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4949 pragma Assert (Ekind (Id) = E_Record_Type);
4950 Set_Flag246 (Id, V);
4951 end Set_Is_Underlying_Record_View;
4953 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4955 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4956 Set_Flag144 (Id, V);
4957 end Set_Is_Unsigned_Type;
4959 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4961 pragma Assert (Ekind (Id) = E_Procedure);
4962 Set_Flag127 (Id, V);
4963 end Set_Is_Valued_Procedure;
4965 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4967 Set_Flag206 (Id, V);
4968 end Set_Is_Visible_Formal;
4970 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4972 Set_Flag116 (Id, V);
4973 end Set_Is_Visible_Lib_Unit;
4975 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4977 pragma Assert (Ekind (Id) = E_Exception);
4978 Set_Flag133 (Id, V);
4979 end Set_Is_VMS_Exception;
4981 procedure Set_Is_Volatile (Id : E; V : B := True) is
4983 pragma Assert (Nkind (Id) in N_Entity);
4985 end Set_Is_Volatile;
4987 procedure Set_Itype_Printed (Id : E; V : B := True) is
4989 pragma Assert (Is_Itype (Id));
4990 Set_Flag202 (Id, V);
4991 end Set_Itype_Printed;
4993 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4996 end Set_Kill_Elaboration_Checks;
4998 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5001 end Set_Kill_Range_Checks;
5003 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5005 pragma Assert (Is_Type (Id));
5006 Set_Flag207 (Id, V);
5007 end Set_Known_To_Have_Preelab_Init;
5009 procedure Set_Last_Assignment (Id : E; V : N) is
5011 pragma Assert (Is_Assignable (Id));
5013 end Set_Last_Assignment;
5015 procedure Set_Last_Entity (Id : E; V : E) is
5018 end Set_Last_Entity;
5020 procedure Set_Limited_View (Id : E; V : E) is
5022 pragma Assert (Ekind (Id) = E_Package);
5024 end Set_Limited_View;
5026 procedure Set_Lit_Indexes (Id : E; V : E) is
5028 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5030 end Set_Lit_Indexes;
5032 procedure Set_Lit_Strings (Id : E; V : E) is
5034 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5036 end Set_Lit_Strings;
5038 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5040 pragma Assert (Is_Formal (Id));
5041 Set_Flag205 (Id, V);
5042 end Set_Low_Bound_Tested;
5044 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5046 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5048 end Set_Machine_Radix_10;
5050 procedure Set_Master_Id (Id : E; V : E) is
5052 pragma Assert (Is_Access_Type (Id));
5056 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5058 Set_Flag168 (Id, V);
5059 end Set_Materialize_Entity;
5061 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5063 Set_Flag262 (Id, V);
5064 end Set_May_Inherit_Delayed_Rep_Aspects;
5066 procedure Set_Mechanism (Id : E; V : M) is
5068 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5069 Set_Uint8 (Id, UI_From_Int (V));
5072 procedure Set_Modulus (Id : E; V : U) is
5074 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5078 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5080 pragma Assert (Is_Type (Id));
5081 Set_Flag183 (Id, V);
5082 end Set_Must_Be_On_Byte_Boundary;
5084 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5086 pragma Assert (Is_Type (Id));
5087 Set_Flag208 (Id, V);
5088 end Set_Must_Have_Preelab_Init;
5090 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5092 Set_Flag147 (Id, V);
5093 end Set_Needs_Debug_Info;
5095 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5098 (Is_Overloadable (Id)
5099 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5101 end Set_Needs_No_Actuals;
5103 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5105 Set_Flag115 (Id, V);
5106 end Set_Never_Set_In_Source;
5108 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5111 end Set_Next_Inlined_Subprogram;
5113 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5115 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5116 Set_Flag131 (Id, V);
5117 end Set_No_Pool_Assigned;
5119 procedure Set_No_Return (Id : E; V : B := True) is
5122 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5123 Set_Flag113 (Id, V);
5126 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5128 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5129 Set_Flag136 (Id, V);
5130 end Set_No_Strict_Aliasing;
5132 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5134 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5136 end Set_Non_Binary_Modulus;
5138 procedure Set_Non_Limited_View (Id : E; V : E) is
5140 pragma Assert (Ekind (Id) in Incomplete_Kind);
5142 end Set_Non_Limited_View;
5144 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5147 (Root_Type (Id) = Standard_Boolean
5148 and then Ekind (Id) = E_Enumeration_Type);
5149 Set_Flag162 (Id, V);
5150 end Set_Nonzero_Is_True;
5152 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5154 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5156 end Set_Normalized_First_Bit;
5158 procedure Set_Normalized_Position (Id : E; V : U) is
5160 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5162 end Set_Normalized_Position;
5164 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5166 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5168 end Set_Normalized_Position_Max;
5170 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5172 pragma Assert (Ekind (Id) = E_Variable);
5173 Set_Flag247 (Id, V);
5174 end Set_OK_To_Rename;
5176 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5179 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5180 Set_Flag239 (Id, V);
5181 end Set_OK_To_Reorder_Components;
5183 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5186 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5187 Set_Flag241 (Id, V);
5188 end Set_Optimize_Alignment_Space;
5190 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5193 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5194 Set_Flag242 (Id, V);
5195 end Set_Optimize_Alignment_Time;
5197 procedure Set_Original_Access_Type (Id : E; V : E) is
5199 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5201 end Set_Original_Access_Type;
5203 procedure Set_Original_Array_Type (Id : E; V : E) is
5205 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5207 end Set_Original_Array_Type;
5209 procedure Set_Original_Record_Component (Id : E; V : E) is
5211 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5213 end Set_Original_Record_Component;
5215 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5217 Set_Flag243 (Id, V);
5218 end Set_Overlays_Constant;
5220 procedure Set_Overridden_Operation (Id : E; V : E) is
5223 end Set_Overridden_Operation;
5225 procedure Set_Package_Instantiation (Id : E; V : N) is
5227 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5229 end Set_Package_Instantiation;
5231 procedure Set_Packed_Array_Type (Id : E; V : E) is
5233 pragma Assert (Is_Array_Type (Id));
5235 end Set_Packed_Array_Type;
5237 procedure Set_Parent_Subtype (Id : E; V : E) is
5239 pragma Assert (Ekind (Id) = E_Record_Type);
5241 end Set_Parent_Subtype;
5243 procedure Set_Postcondition_Proc (Id : E; V : E) is
5245 pragma Assert (Ekind (Id) = E_Procedure);
5247 end Set_Postcondition_Proc;
5249 procedure Set_PPC_Wrapper (Id : E; V : E) is
5251 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5253 end Set_PPC_Wrapper;
5255 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5257 pragma Assert (Is_Tagged_Type (Id));
5258 Set_Elist10 (Id, V);
5259 end Set_Direct_Primitive_Operations;
5261 procedure Set_Prival (Id : E; V : E) is
5263 pragma Assert (Is_Protected_Component (Id));
5267 procedure Set_Prival_Link (Id : E; V : E) is
5269 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5271 end Set_Prival_Link;
5273 procedure Set_Private_Dependents (Id : E; V : L) is
5275 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5276 Set_Elist18 (Id, V);
5277 end Set_Private_Dependents;
5279 procedure Set_Private_View (Id : E; V : N) is
5281 pragma Assert (Is_Private_Type (Id));
5283 end Set_Private_View;
5285 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5287 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5289 end Set_Protected_Body_Subprogram;
5291 procedure Set_Protected_Formal (Id : E; V : E) is
5293 pragma Assert (Is_Formal (Id));
5295 end Set_Protected_Formal;
5297 procedure Set_Protection_Object (Id : E; V : E) is
5299 pragma Assert (Ekind_In (Id, E_Entry,
5304 end Set_Protection_Object;
5306 procedure Set_Reachable (Id : E; V : B := True) is
5311 procedure Set_Referenced (Id : E; V : B := True) is
5313 Set_Flag156 (Id, V);
5316 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5319 end Set_Referenced_As_LHS;
5321 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5323 Set_Flag227 (Id, V);
5324 end Set_Referenced_As_Out_Parameter;
5326 procedure Set_Refined_State (Id : E; V : E) is
5328 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5330 end Set_Refined_State;
5332 procedure Set_Refinement_Constituents (Id : E; V : L) is
5334 pragma Assert (Ekind (Id) = E_Abstract_State);
5336 end Set_Refinement_Constituents;
5338 procedure Set_Register_Exception_Call (Id : E; V : N) is
5340 pragma Assert (Ekind (Id) = E_Exception);
5342 end Set_Register_Exception_Call;
5344 procedure Set_Related_Array_Object (Id : E; V : E) is
5346 pragma Assert (Is_Array_Type (Id));
5348 end Set_Related_Array_Object;
5350 procedure Set_Related_Expression (Id : E; V : N) is
5352 pragma Assert (Ekind (Id) in Type_Kind
5353 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5355 end Set_Related_Expression;
5357 procedure Set_Related_Instance (Id : E; V : E) is
5359 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5361 end Set_Related_Instance;
5363 procedure Set_Related_Type (Id : E; V : E) is
5365 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5367 end Set_Related_Type;
5369 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5371 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5373 end Set_Relative_Deadline_Variable;
5375 procedure Set_Renamed_Entity (Id : E; V : N) is
5378 end Set_Renamed_Entity;
5380 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5382 pragma Assert (Ekind (Id) = E_Package);
5383 Set_Flag231 (Id, V);
5384 end Set_Renamed_In_Spec;
5386 procedure Set_Renamed_Object (Id : E; V : N) is
5389 end Set_Renamed_Object;
5391 procedure Set_Renaming_Map (Id : E; V : U) is
5394 end Set_Renaming_Map;
5396 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5398 pragma Assert (Is_Overloadable (Id));
5399 Set_Flag213 (Id, V);
5400 end Set_Requires_Overriding;
5402 procedure Set_Return_Present (Id : E; V : B := True) is
5405 end Set_Return_Present;
5407 procedure Set_Return_Applies_To (Id : E; V : N) is
5410 end Set_Return_Applies_To;
5412 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5415 end Set_Returns_By_Ref;
5417 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5420 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5421 Set_Flag164 (Id, V);
5422 end Set_Reverse_Bit_Order;
5424 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5428 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5430 end Set_Reverse_Storage_Order;
5432 procedure Set_RM_Size (Id : E; V : U) is
5434 pragma Assert (Is_Type (Id));
5438 procedure Set_Scalar_Range (Id : E; V : N) is
5441 end Set_Scalar_Range;
5443 procedure Set_Scale_Value (Id : E; V : U) is
5446 end Set_Scale_Value;
5448 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5450 pragma Assert (not Is_Record_Type (Id));
5452 end Set_Scope_Depth_Value;
5454 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5456 Set_Flag167 (Id, V);
5457 end Set_Sec_Stack_Needed_For_Return;
5459 procedure Set_Shadow_Entities (Id : E; V : S) is
5461 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5463 end Set_Shadow_Entities;
5465 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5467 pragma Assert (Ekind (Id) = E_Variable);
5469 end Set_Shared_Var_Procs_Instance;
5471 procedure Set_Size_Check_Code (Id : E; V : N) is
5473 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5475 end Set_Size_Check_Code;
5477 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5479 Set_Flag177 (Id, V);
5480 end Set_Size_Depends_On_Discriminant;
5482 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5485 end Set_Size_Known_At_Compile_Time;
5487 procedure Set_Small_Value (Id : E; V : R) is
5489 pragma Assert (Is_Fixed_Point_Type (Id));
5490 Set_Ureal21 (Id, V);
5491 end Set_Small_Value;
5493 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5496 (Ekind_In (Id, E_Function, -- subprogram variants
5498 E_Generic_Procedure,
5502 Ekind_In (Id, E_Generic_Package, -- package variants
5507 end Set_SPARK_Mode_Pragmas;
5509 procedure Set_Spec_Entity (Id : E; V : E) is
5511 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5513 end Set_Spec_Entity;
5515 procedure Set_Static_Predicate (Id : E; V : S) is
5518 (Ekind_In (Id, E_Enumeration_Subtype,
5519 E_Modular_Integer_Subtype,
5520 E_Signed_Integer_Subtype)
5521 and then Has_Predicates (Id));
5523 end Set_Static_Predicate;
5525 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5527 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5529 end Set_Status_Flag_Or_Transient_Decl;
5531 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5533 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5534 pragma Assert (Id = Base_Type (Id));
5536 end Set_Storage_Size_Variable;
5538 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5540 pragma Assert (Ekind (Id) = E_Package);
5542 end Set_Static_Elaboration_Desired;
5544 procedure Set_Static_Initialization (Id : E; V : N) is
5547 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5549 end Set_Static_Initialization;
5551 procedure Set_Stored_Constraint (Id : E; V : L) is
5553 pragma Assert (Nkind (Id) in N_Entity);
5554 Set_Elist23 (Id, V);
5555 end Set_Stored_Constraint;
5557 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5559 pragma Assert (Id = Base_Type (Id));
5560 Set_Flag145 (Id, V);
5561 end Set_Strict_Alignment;
5563 procedure Set_String_Literal_Length (Id : E; V : U) is
5565 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5567 end Set_String_Literal_Length;
5569 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5571 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5573 end Set_String_Literal_Low_Bound;
5575 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5577 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5579 end Set_Subprograms_For_Type;
5581 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5583 Set_Flag148 (Id, V);
5584 end Set_Suppress_Elaboration_Warnings;
5586 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5588 pragma Assert (Is_Type (Id));
5589 Set_Flag105 (Id, V);
5590 end Set_Suppress_Initialization;
5592 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5594 Set_Flag165 (Id, V);
5595 end Set_Suppress_Style_Checks;
5597 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5599 Set_Flag217 (Id, V);
5600 end Set_Suppress_Value_Tracking_On_Call;
5602 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5604 pragma Assert (Ekind (Id) in Task_Kind);
5606 end Set_Task_Body_Procedure;
5608 procedure Set_Thunk_Entity (Id : E; V : E) is
5610 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5611 and then Is_Thunk (Id));
5613 end Set_Thunk_Entity;
5615 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5618 end Set_Treat_As_Volatile;
5620 procedure Set_Underlying_Full_View (Id : E; V : E) is
5622 pragma Assert (Ekind (Id) in Private_Kind);
5624 end Set_Underlying_Full_View;
5626 procedure Set_Underlying_Record_View (Id : E; V : E) is
5628 pragma Assert (Ekind (Id) = E_Record_Type);
5630 end Set_Underlying_Record_View;
5632 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5634 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5635 Set_Flag216 (Id, V);
5636 end Set_Universal_Aliasing;
5638 procedure Set_Unset_Reference (Id : E; V : N) is
5641 end Set_Unset_Reference;
5643 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5645 Set_Flag222 (Id, V);
5646 end Set_Used_As_Generic_Actual;
5648 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5650 pragma Assert (Ekind (Id) = E_Protected_Type);
5651 Set_Flag188 (Id, V);
5652 end Set_Uses_Lock_Free;
5654 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5657 end Set_Uses_Sec_Stack;
5659 procedure Set_Warnings_Off (Id : E; V : B := True) is
5662 end Set_Warnings_Off;
5664 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5666 Set_Flag236 (Id, V);
5667 end Set_Warnings_Off_Used;
5669 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5671 Set_Flag237 (Id, V);
5672 end Set_Warnings_Off_Used_Unmodified;
5674 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5676 Set_Flag238 (Id, V);
5677 end Set_Warnings_Off_Used_Unreferenced;
5679 procedure Set_Was_Hidden (Id : E; V : B := True) is
5681 Set_Flag196 (Id, V);
5684 procedure Set_Wrapped_Entity (Id : E; V : E) is
5686 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5687 and then Is_Primitive_Wrapper (Id));
5689 end Set_Wrapped_Entity;
5691 -----------------------------------
5692 -- Field Initialization Routines --
5693 -----------------------------------
5695 procedure Init_Alignment (Id : E) is
5697 Set_Uint14 (Id, Uint_0);
5700 procedure Init_Alignment (Id : E; V : Int) is
5702 Set_Uint14 (Id, UI_From_Int (V));
5705 procedure Init_Component_Bit_Offset (Id : E) is
5707 Set_Uint11 (Id, No_Uint);
5708 end Init_Component_Bit_Offset;
5710 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5712 Set_Uint11 (Id, UI_From_Int (V));
5713 end Init_Component_Bit_Offset;
5715 procedure Init_Component_Size (Id : E) is
5717 Set_Uint22 (Id, Uint_0);
5718 end Init_Component_Size;
5720 procedure Init_Component_Size (Id : E; V : Int) is
5722 Set_Uint22 (Id, UI_From_Int (V));
5723 end Init_Component_Size;
5725 procedure Init_Digits_Value (Id : E) is
5727 Set_Uint17 (Id, Uint_0);
5728 end Init_Digits_Value;
5730 procedure Init_Digits_Value (Id : E; V : Int) is
5732 Set_Uint17 (Id, UI_From_Int (V));
5733 end Init_Digits_Value;
5735 procedure Init_Esize (Id : E) is
5737 Set_Uint12 (Id, Uint_0);
5740 procedure Init_Esize (Id : E; V : Int) is
5742 Set_Uint12 (Id, UI_From_Int (V));
5745 procedure Init_Normalized_First_Bit (Id : E) is
5747 Set_Uint8 (Id, No_Uint);
5748 end Init_Normalized_First_Bit;
5750 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5752 Set_Uint8 (Id, UI_From_Int (V));
5753 end Init_Normalized_First_Bit;
5755 procedure Init_Normalized_Position (Id : E) is
5757 Set_Uint14 (Id, No_Uint);
5758 end Init_Normalized_Position;
5760 procedure Init_Normalized_Position (Id : E; V : Int) is
5762 Set_Uint14 (Id, UI_From_Int (V));
5763 end Init_Normalized_Position;
5765 procedure Init_Normalized_Position_Max (Id : E) is
5767 Set_Uint10 (Id, No_Uint);
5768 end Init_Normalized_Position_Max;
5770 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5772 Set_Uint10 (Id, UI_From_Int (V));
5773 end Init_Normalized_Position_Max;
5775 procedure Init_RM_Size (Id : E) is
5777 Set_Uint13 (Id, Uint_0);
5780 procedure Init_RM_Size (Id : E; V : Int) is
5782 Set_Uint13 (Id, UI_From_Int (V));
5785 -----------------------------
5786 -- Init_Component_Location --
5787 -----------------------------
5789 procedure Init_Component_Location (Id : E) is
5791 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5792 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5793 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5794 Set_Uint12 (Id, Uint_0); -- Esize
5795 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5796 end Init_Component_Location;
5798 ----------------------------
5799 -- Init_Object_Size_Align --
5800 ----------------------------
5802 procedure Init_Object_Size_Align (Id : E) is
5804 Set_Uint12 (Id, Uint_0); -- Esize
5805 Set_Uint14 (Id, Uint_0); -- Alignment
5806 end Init_Object_Size_Align;
5812 procedure Init_Size (Id : E; V : Int) is
5814 pragma Assert (not Is_Object (Id));
5815 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5816 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5819 ---------------------
5820 -- Init_Size_Align --
5821 ---------------------
5823 procedure Init_Size_Align (Id : E) is
5825 pragma Assert (not Is_Object (Id));
5826 Set_Uint12 (Id, Uint_0); -- Esize
5827 Set_Uint13 (Id, Uint_0); -- RM_Size
5828 Set_Uint14 (Id, Uint_0); -- Alignment
5829 end Init_Size_Align;
5831 ----------------------------------------------
5832 -- Type Representation Attribute Predicates --
5833 ----------------------------------------------
5835 function Known_Alignment (E : Entity_Id) return B is
5837 return Uint14 (E) /= Uint_0
5838 and then Uint14 (E) /= No_Uint;
5839 end Known_Alignment;
5841 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5843 return Uint11 (E) /= No_Uint;
5844 end Known_Component_Bit_Offset;
5846 function Known_Component_Size (E : Entity_Id) return B is
5848 return Uint22 (Base_Type (E)) /= Uint_0
5849 and then Uint22 (Base_Type (E)) /= No_Uint;
5850 end Known_Component_Size;
5852 function Known_Esize (E : Entity_Id) return B is
5854 return Uint12 (E) /= Uint_0
5855 and then Uint12 (E) /= No_Uint;
5858 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5860 return Uint8 (E) /= No_Uint;
5861 end Known_Normalized_First_Bit;
5863 function Known_Normalized_Position (E : Entity_Id) return B is
5865 return Uint14 (E) /= No_Uint;
5866 end Known_Normalized_Position;
5868 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5870 return Uint10 (E) /= No_Uint;
5871 end Known_Normalized_Position_Max;
5873 function Known_RM_Size (E : Entity_Id) return B is
5875 return Uint13 (E) /= No_Uint
5876 and then (Uint13 (E) /= Uint_0
5877 or else Is_Discrete_Type (E)
5878 or else Is_Fixed_Point_Type (E));
5881 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5883 return Uint11 (E) /= No_Uint
5884 and then Uint11 (E) >= Uint_0;
5885 end Known_Static_Component_Bit_Offset;
5887 function Known_Static_Component_Size (E : Entity_Id) return B is
5889 return Uint22 (Base_Type (E)) > Uint_0;
5890 end Known_Static_Component_Size;
5892 function Known_Static_Esize (E : Entity_Id) return B is
5894 return Uint12 (E) > Uint_0
5895 and then not Is_Generic_Type (E);
5896 end Known_Static_Esize;
5898 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5900 return Uint8 (E) /= No_Uint
5901 and then Uint8 (E) >= Uint_0;
5902 end Known_Static_Normalized_First_Bit;
5904 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5906 return Uint14 (E) /= No_Uint
5907 and then Uint14 (E) >= Uint_0;
5908 end Known_Static_Normalized_Position;
5910 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5912 return Uint10 (E) /= No_Uint
5913 and then Uint10 (E) >= Uint_0;
5914 end Known_Static_Normalized_Position_Max;
5916 function Known_Static_RM_Size (E : Entity_Id) return B is
5918 return (Uint13 (E) > Uint_0
5919 or else Is_Discrete_Type (E)
5920 or else Is_Fixed_Point_Type (E))
5921 and then not Is_Generic_Type (E);
5922 end Known_Static_RM_Size;
5924 function Unknown_Alignment (E : Entity_Id) return B is
5926 return Uint14 (E) = Uint_0
5927 or else Uint14 (E) = No_Uint;
5928 end Unknown_Alignment;
5930 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5932 return Uint11 (E) = No_Uint;
5933 end Unknown_Component_Bit_Offset;
5935 function Unknown_Component_Size (E : Entity_Id) return B is
5937 return Uint22 (Base_Type (E)) = Uint_0
5939 Uint22 (Base_Type (E)) = No_Uint;
5940 end Unknown_Component_Size;
5942 function Unknown_Esize (E : Entity_Id) return B is
5944 return Uint12 (E) = No_Uint
5946 Uint12 (E) = Uint_0;
5949 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5951 return Uint8 (E) = No_Uint;
5952 end Unknown_Normalized_First_Bit;
5954 function Unknown_Normalized_Position (E : Entity_Id) return B is
5956 return Uint14 (E) = No_Uint;
5957 end Unknown_Normalized_Position;
5959 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5961 return Uint10 (E) = No_Uint;
5962 end Unknown_Normalized_Position_Max;
5964 function Unknown_RM_Size (E : Entity_Id) return B is
5966 return (Uint13 (E) = Uint_0
5967 and then not Is_Discrete_Type (E)
5968 and then not Is_Fixed_Point_Type (E))
5969 or else Uint13 (E) = No_Uint;
5970 end Unknown_RM_Size;
5972 --------------------
5973 -- Address_Clause --
5974 --------------------
5976 function Address_Clause (Id : E) return N is
5978 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
5985 function Aft_Value (Id : E) return U is
5987 Delta_Val : Ureal := Delta_Value (Id);
5989 while Delta_Val < Ureal_Tenth loop
5990 Delta_Val := Delta_Val * Ureal_10;
5991 Result := Result + 1;
5994 return UI_From_Int (Result);
5997 ----------------------
5998 -- Alignment_Clause --
5999 ----------------------
6001 function Alignment_Clause (Id : E) return N is
6003 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6004 end Alignment_Clause;
6010 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6012 if Last_Entity (V) = Empty then
6013 Set_First_Entity (Id => V, V => Id);
6015 Set_Next_Entity (Last_Entity (V), Id);
6018 Set_Next_Entity (Id, Empty);
6020 Set_Last_Entity (Id => V, V => Id);
6027 function Base_Type (Id : E) return E is
6029 if Is_Base_Type (Id) then
6032 pragma Assert (Is_Type (Id));
6037 -------------------------
6038 -- Component_Alignment --
6039 -------------------------
6041 -- Component Alignment is encoded using two flags, Flag128/129 as
6042 -- follows. Note that both flags False = Align_Default, so that the
6043 -- default initialization of flags to False initializes component
6044 -- alignment to the default value as required.
6046 -- Flag128 Flag129 Value
6047 -- ------- ------- -----
6048 -- False False Calign_Default
6049 -- False True Calign_Component_Size
6050 -- True False Calign_Component_Size_4
6051 -- True True Calign_Storage_Unit
6053 function Component_Alignment (Id : E) return C is
6054 BT : constant Node_Id := Base_Type (Id);
6057 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6059 if Flag128 (BT) then
6060 if Flag129 (BT) then
6061 return Calign_Storage_Unit;
6063 return Calign_Component_Size_4;
6067 if Flag129 (BT) then
6068 return Calign_Component_Size;
6070 return Calign_Default;
6073 end Component_Alignment;
6075 ----------------------
6076 -- Declaration_Node --
6077 ----------------------
6079 function Declaration_Node (Id : E) return N is
6083 if Ekind (Id) = E_Incomplete_Type
6084 and then Present (Full_View (Id))
6086 P := Parent (Full_View (Id));
6092 if Nkind (P) /= N_Selected_Component
6093 and then Nkind (P) /= N_Expanded_Name
6095 not (Nkind (P) = N_Defining_Program_Unit_Name
6096 and then Is_Child_Unit (Id))
6103 end Declaration_Node;
6105 ---------------------
6106 -- Designated_Type --
6107 ---------------------
6109 function Designated_Type (Id : E) return E is
6113 Desig_Type := Directly_Designated_Type (Id);
6115 if Ekind (Desig_Type) = E_Incomplete_Type
6116 and then Present (Full_View (Desig_Type))
6118 return Full_View (Desig_Type);
6120 elsif Is_Class_Wide_Type (Desig_Type)
6121 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6122 and then Present (Full_View (Etype (Desig_Type)))
6123 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6125 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6130 end Designated_Type;
6132 ----------------------
6133 -- Entry_Index_Type --
6134 ----------------------
6136 function Entry_Index_Type (Id : E) return N is
6138 pragma Assert (Ekind (Id) = E_Entry_Family);
6139 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6140 end Entry_Index_Type;
6142 ---------------------
6143 -- First_Component --
6144 ---------------------
6146 function First_Component (Id : E) return E is
6151 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6153 Comp_Id := First_Entity (Id);
6154 while Present (Comp_Id) loop
6155 exit when Ekind (Comp_Id) = E_Component;
6156 Comp_Id := Next_Entity (Comp_Id);
6160 end First_Component;
6162 -------------------------------------
6163 -- First_Component_Or_Discriminant --
6164 -------------------------------------
6166 function First_Component_Or_Discriminant (Id : E) return E is
6171 (Is_Record_Type (Id)
6172 or else Is_Incomplete_Or_Private_Type (Id)
6173 or else Has_Discriminants (Id));
6175 Comp_Id := First_Entity (Id);
6176 while Present (Comp_Id) loop
6177 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6178 Comp_Id := Next_Entity (Comp_Id);
6182 end First_Component_Or_Discriminant;
6188 function First_Formal (Id : E) return E is
6193 (Is_Overloadable (Id)
6194 or else Ekind_In (Id, E_Entry_Family,
6196 E_Subprogram_Type));
6198 if Ekind (Id) = E_Enumeration_Literal then
6202 Formal := First_Entity (Id);
6204 if Present (Formal) and then Is_Formal (Formal) then
6212 ------------------------------
6213 -- First_Formal_With_Extras --
6214 ------------------------------
6216 function First_Formal_With_Extras (Id : E) return E is
6221 (Is_Overloadable (Id)
6222 or else Ekind_In (Id, E_Entry_Family,
6224 E_Subprogram_Type));
6226 if Ekind (Id) = E_Enumeration_Literal then
6230 Formal := First_Entity (Id);
6232 if Present (Formal) and then Is_Formal (Formal) then
6235 return Extra_Formals (Id); -- Empty if no extra formals
6238 end First_Formal_With_Extras;
6240 -------------------------------------
6241 -- Get_Attribute_Definition_Clause --
6242 -------------------------------------
6244 function Get_Attribute_Definition_Clause
6246 Id : Attribute_Id) return Node_Id
6251 N := First_Rep_Item (E);
6252 while Present (N) loop
6253 if Nkind (N) = N_Attribute_Definition_Clause
6254 and then Get_Attribute_Id (Chars (N)) = Id
6263 end Get_Attribute_Definition_Clause;
6269 function Get_Full_View (T : Entity_Id) return Entity_Id is
6271 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6272 return Full_View (T);
6274 elsif Is_Class_Wide_Type (T)
6275 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6276 and then Present (Full_View (Root_Type (T)))
6278 return Class_Wide_Type (Full_View (Root_Type (T)));
6289 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6290 Is_CDG : constant Boolean :=
6291 Id = Pragma_Abstract_State or else
6292 Id = Pragma_Depends or else
6293 Id = Pragma_Global or else
6294 Id = Pragma_Initializes or else
6295 Id = Pragma_Refined_Depends or else
6296 Id = Pragma_Refined_Global or else
6297 Id = Pragma_Refined_State;
6298 Is_CTC : constant Boolean :=
6299 Id = Pragma_Contract_Cases or else
6300 Id = Pragma_Test_Case;
6301 Is_PPC : constant Boolean :=
6302 Id = Pragma_Precondition or else
6303 Id = Pragma_Postcondition;
6305 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6311 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6312 -- extracted from their specialized list.
6315 Items := Contract (E);
6321 Item := Classifications (Items);
6324 Item := Contract_Test_Cases (Items);
6327 Item := Pre_Post_Conditions (Items);
6333 Item := First_Rep_Item (E);
6336 while Present (Item) loop
6337 if Nkind (Item) = N_Pragma
6338 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6342 -- All nodes in N_Contract are chained using Next_Pragma
6344 elsif In_Contract then
6345 Item := Next_Pragma (Item);
6350 Next_Rep_Item (Item);
6357 --------------------------------------
6358 -- Get_Record_Representation_Clause --
6359 --------------------------------------
6361 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6365 N := First_Rep_Item (E);
6366 while Present (N) loop
6367 if Nkind (N) = N_Record_Representation_Clause then
6375 end Get_Record_Representation_Clause;
6377 ------------------------
6378 -- Has_Attach_Handler --
6379 ------------------------
6381 function Has_Attach_Handler (Id : E) return B is
6385 pragma Assert (Is_Protected_Type (Id));
6387 Ritem := First_Rep_Item (Id);
6388 while Present (Ritem) loop
6389 if Nkind (Ritem) = N_Pragma
6390 and then Pragma_Name (Ritem) = Name_Attach_Handler
6394 Next_Rep_Item (Ritem);
6399 end Has_Attach_Handler;
6405 function Has_Entries (Id : E) return B is
6409 pragma Assert (Is_Concurrent_Type (Id));
6411 Ent := First_Entity (Id);
6412 while Present (Ent) loop
6413 if Is_Entry (Ent) then
6417 Ent := Next_Entity (Ent);
6423 ----------------------------
6424 -- Has_Foreign_Convention --
6425 ----------------------------
6427 function Has_Foreign_Convention (Id : E) return B is
6429 -- While regular Intrinsics such as the Standard operators fit in the
6430 -- "Ada" convention, those with an Interface_Name materialize GCC
6431 -- builtin imports for which Ada special treatments shouldn't apply.
6433 return Convention (Id) in Foreign_Convention
6434 or else (Convention (Id) = Convention_Intrinsic
6435 and then Present (Interface_Name (Id)));
6436 end Has_Foreign_Convention;
6438 ---------------------------
6439 -- Has_Interrupt_Handler --
6440 ---------------------------
6442 function Has_Interrupt_Handler (Id : E) return B is
6446 pragma Assert (Is_Protected_Type (Id));
6448 Ritem := First_Rep_Item (Id);
6449 while Present (Ritem) loop
6450 if Nkind (Ritem) = N_Pragma
6451 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6455 Next_Rep_Item (Ritem);
6460 end Has_Interrupt_Handler;
6462 -----------------------------
6463 -- Has_Null_Abstract_State --
6464 -----------------------------
6466 function Has_Null_Abstract_State (Id : E) return B is
6468 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6471 Present (Abstract_States (Id))
6472 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6473 end Has_Null_Abstract_State;
6475 --------------------
6476 -- Has_Unmodified --
6477 --------------------
6479 function Has_Unmodified (E : Entity_Id) return Boolean is
6481 if Has_Pragma_Unmodified (E) then
6483 elsif Warnings_Off (E) then
6484 Set_Warnings_Off_Used_Unmodified (E);
6491 ---------------------
6492 -- Has_Unreferenced --
6493 ---------------------
6495 function Has_Unreferenced (E : Entity_Id) return Boolean is
6497 if Has_Pragma_Unreferenced (E) then
6499 elsif Warnings_Off (E) then
6500 Set_Warnings_Off_Used_Unreferenced (E);
6505 end Has_Unreferenced;
6507 ----------------------
6508 -- Has_Warnings_Off --
6509 ----------------------
6511 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6513 if Warnings_Off (E) then
6514 Set_Warnings_Off_Used (E);
6519 end Has_Warnings_Off;
6521 ------------------------------
6522 -- Implementation_Base_Type --
6523 ------------------------------
6525 function Implementation_Base_Type (Id : E) return E is
6530 Bastyp := Base_Type (Id);
6532 if Is_Incomplete_Or_Private_Type (Bastyp) then
6533 Imptyp := Underlying_Type (Bastyp);
6535 -- If we have an implementation type, then just return it,
6536 -- otherwise we return the Base_Type anyway. This can only
6537 -- happen in error situations and should avoid some error bombs.
6539 if Present (Imptyp) then
6540 return Base_Type (Imptyp);
6548 end Implementation_Base_Type;
6550 -------------------------
6551 -- Invariant_Procedure --
6552 -------------------------
6554 function Invariant_Procedure (Id : E) return E is
6558 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6560 if No (Subprograms_For_Type (Id)) then
6564 S := Subprograms_For_Type (Id);
6565 while Present (S) loop
6566 if Is_Invariant_Procedure (S) then
6569 S := Subprograms_For_Type (S);
6575 end Invariant_Procedure;
6581 -- Global flag table allowing rapid computation of this function
6583 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6584 (E_Enumeration_Subtype |
6586 E_Signed_Integer_Subtype |
6587 E_Modular_Integer_Subtype |
6588 E_Floating_Point_Subtype |
6589 E_Ordinary_Fixed_Point_Subtype |
6590 E_Decimal_Fixed_Point_Subtype |
6595 E_Record_Subtype_With_Private |
6596 E_Limited_Private_Subtype |
6598 E_Protected_Subtype |
6600 E_String_Literal_Subtype |
6601 E_Class_Wide_Subtype => False,
6604 function Is_Base_Type (Id : E) return Boolean is
6606 return Entity_Is_Base_Type (Ekind (Id));
6609 ---------------------
6610 -- Is_Boolean_Type --
6611 ---------------------
6613 function Is_Boolean_Type (Id : E) return B is
6615 return Root_Type (Id) = Standard_Boolean;
6616 end Is_Boolean_Type;
6618 ------------------------
6619 -- Is_Constant_Object --
6620 ------------------------
6622 function Is_Constant_Object (Id : E) return B is
6623 K : constant Entity_Kind := Ekind (Id);
6626 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6627 end Is_Constant_Object;
6629 --------------------
6630 -- Is_Discriminal --
6631 --------------------
6633 function Is_Discriminal (Id : E) return B is
6635 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6636 and then Present (Discriminal_Link (Id)));
6639 ----------------------
6640 -- Is_Dynamic_Scope --
6641 ----------------------
6643 function Is_Dynamic_Scope (Id : E) return B is
6646 Ekind (Id) = E_Block
6648 Ekind (Id) = E_Function
6650 Ekind (Id) = E_Procedure
6652 Ekind (Id) = E_Subprogram_Body
6654 Ekind (Id) = E_Task_Type
6656 (Ekind (Id) = E_Limited_Private_Type
6657 and then Present (Full_View (Id))
6658 and then Ekind (Full_View (Id)) = E_Task_Type)
6660 Ekind (Id) = E_Entry
6662 Ekind (Id) = E_Entry_Family
6664 Ekind (Id) = E_Return_Statement;
6665 end Is_Dynamic_Scope;
6667 --------------------
6668 -- Is_Entity_Name --
6669 --------------------
6671 function Is_Entity_Name (N : Node_Id) return Boolean is
6672 Kind : constant Node_Kind := Nkind (N);
6675 -- Identifiers, operator symbols, expanded names are entity names
6677 return Kind = N_Identifier
6678 or else Kind = N_Operator_Symbol
6679 or else Kind = N_Expanded_Name
6681 -- Attribute references are entity names if they refer to an entity.
6682 -- Note that we don't do this by testing for the presence of the
6683 -- Entity field in the N_Attribute_Reference node, since it may not
6684 -- have been set yet.
6686 or else (Kind = N_Attribute_Reference
6687 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6690 -----------------------
6691 -- Is_External_State --
6692 -----------------------
6694 function Is_External_State (Id : E) return B is
6697 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6698 end Is_External_State;
6704 function Is_Finalizer (Id : E) return B is
6706 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6709 ---------------------
6710 -- Is_Ghost_Entity --
6711 ---------------------
6713 function Is_Ghost_Entity (Id : E) return B is
6715 if Present (Id) and then Ekind (Id) = E_Variable then
6716 return Convention (Id) = Convention_Ghost;
6718 return Is_Ghost_Subprogram (Id);
6720 end Is_Ghost_Entity;
6722 -------------------------
6723 -- Is_Ghost_Subprogram --
6724 -------------------------
6726 function Is_Ghost_Subprogram (Id : E) return B is
6728 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6729 return Convention (Id) = Convention_Ghost;
6733 end Is_Ghost_Subprogram;
6735 -------------------------
6736 -- Is_Input_Only_State --
6737 -------------------------
6739 function Is_Input_Only_State (Id : E) return B is
6742 Ekind (Id) = E_Abstract_State
6743 and then Has_Option (Id, Name_Input_Only);
6744 end Is_Input_Only_State;
6746 ---------------------------
6747 -- Is_Non_Volatile_State --
6748 ---------------------------
6750 function Is_Non_Volatile_State (Id : E) return B is
6753 Ekind (Id) = E_Abstract_State
6754 and then Has_Option (Id, Name_Non_Volatile);
6755 end Is_Non_Volatile_State;
6761 function Is_Null_State (Id : E) return B is
6764 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6767 ---------------------
6768 -- Is_Output_State --
6769 ---------------------
6771 function Is_Output_Only_State (Id : E) return B is
6774 Ekind (Id) = E_Abstract_State
6775 and then Has_Option (Id, Name_Output_Only);
6776 end Is_Output_Only_State;
6778 -----------------------------------
6779 -- Is_Package_Or_Generic_Package --
6780 -----------------------------------
6782 function Is_Package_Or_Generic_Package (Id : E) return B is
6784 return Ekind_In (Id, E_Generic_Package, E_Package);
6785 end Is_Package_Or_Generic_Package;
6791 function Is_Prival (Id : E) return B is
6793 return (Ekind_In (Id, E_Constant, E_Variable)
6794 and then Present (Prival_Link (Id)));
6797 ----------------------------
6798 -- Is_Protected_Component --
6799 ----------------------------
6801 function Is_Protected_Component (Id : E) return B is
6803 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6804 end Is_Protected_Component;
6806 ----------------------------
6807 -- Is_Protected_Interface --
6808 ----------------------------
6810 function Is_Protected_Interface (Id : E) return B is
6811 Typ : constant Entity_Id := Base_Type (Id);
6813 if not Is_Interface (Typ) then
6815 elsif Is_Class_Wide_Type (Typ) then
6816 return Is_Protected_Interface (Etype (Typ));
6818 return Protected_Present (Type_Definition (Parent (Typ)));
6820 end Is_Protected_Interface;
6822 ------------------------------
6823 -- Is_Protected_Record_Type --
6824 ------------------------------
6826 function Is_Protected_Record_Type (Id : E) return B is
6829 Is_Concurrent_Record_Type (Id)
6830 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6831 end Is_Protected_Record_Type;
6833 --------------------------------
6834 -- Is_Standard_Character_Type --
6835 --------------------------------
6837 function Is_Standard_Character_Type (Id : E) return B is
6839 if Is_Type (Id) then
6841 R : constant Entity_Id := Root_Type (Id);
6844 R = Standard_Character
6846 R = Standard_Wide_Character
6848 R = Standard_Wide_Wide_Character;
6854 end Is_Standard_Character_Type;
6856 --------------------
6857 -- Is_String_Type --
6858 --------------------
6860 function Is_String_Type (Id : E) return B is
6862 return Ekind (Id) in String_Kind
6863 or else (Is_Array_Type (Id)
6864 and then Id /= Any_Composite
6865 and then Number_Dimensions (Id) = 1
6866 and then Is_Character_Type (Component_Type (Id)));
6869 -------------------------------
6870 -- Is_Synchronized_Interface --
6871 -------------------------------
6873 function Is_Synchronized_Interface (Id : E) return B is
6874 Typ : constant Entity_Id := Base_Type (Id);
6877 if not Is_Interface (Typ) then
6880 elsif Is_Class_Wide_Type (Typ) then
6881 return Is_Synchronized_Interface (Etype (Typ));
6884 return Protected_Present (Type_Definition (Parent (Typ)))
6885 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6886 or else Task_Present (Type_Definition (Parent (Typ)));
6888 end Is_Synchronized_Interface;
6890 -----------------------
6891 -- Is_Task_Interface --
6892 -----------------------
6894 function Is_Task_Interface (Id : E) return B is
6895 Typ : constant Entity_Id := Base_Type (Id);
6897 if not Is_Interface (Typ) then
6899 elsif Is_Class_Wide_Type (Typ) then
6900 return Is_Task_Interface (Etype (Typ));
6902 return Task_Present (Type_Definition (Parent (Typ)));
6904 end Is_Task_Interface;
6906 -------------------------
6907 -- Is_Task_Record_Type --
6908 -------------------------
6910 function Is_Task_Record_Type (Id : E) return B is
6913 Is_Concurrent_Record_Type (Id)
6914 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6915 end Is_Task_Record_Type;
6917 ------------------------
6918 -- Is_Wrapper_Package --
6919 ------------------------
6921 function Is_Wrapper_Package (Id : E) return B is
6923 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6924 end Is_Wrapper_Package;
6930 function Last_Formal (Id : E) return E is
6935 (Is_Overloadable (Id)
6936 or else Ekind_In (Id, E_Entry_Family,
6938 E_Subprogram_Type));
6940 if Ekind (Id) = E_Enumeration_Literal then
6944 Formal := First_Formal (Id);
6946 if Present (Formal) then
6947 while Present (Next_Formal (Formal)) loop
6948 Formal := Next_Formal (Formal);
6956 function Model_Emin_Value (Id : E) return Uint is
6958 return Machine_Emin_Value (Id);
6959 end Model_Emin_Value;
6961 -------------------------
6962 -- Model_Epsilon_Value --
6963 -------------------------
6965 function Model_Epsilon_Value (Id : E) return Ureal is
6966 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6968 return Radix ** (1 - Model_Mantissa_Value (Id));
6969 end Model_Epsilon_Value;
6971 --------------------------
6972 -- Model_Mantissa_Value --
6973 --------------------------
6975 function Model_Mantissa_Value (Id : E) return Uint is
6977 return Machine_Mantissa_Value (Id);
6978 end Model_Mantissa_Value;
6980 -----------------------
6981 -- Model_Small_Value --
6982 -----------------------
6984 function Model_Small_Value (Id : E) return Ureal is
6985 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6987 return Radix ** (Model_Emin_Value (Id) - 1);
6988 end Model_Small_Value;
6990 ------------------------
6991 -- Machine_Emax_Value --
6992 ------------------------
6994 function Machine_Emax_Value (Id : E) return Uint is
6995 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6998 case Float_Rep (Id) is
7001 when 1 .. 6 => return Uint_128;
7002 when 7 .. 15 => return 2**10;
7003 when 16 .. 33 => return 2**14;
7004 when others => return No_Uint;
7009 when 1 .. 9 => return 2**7 - 1;
7010 when 10 .. 15 => return 2**10 - 1;
7011 when others => return No_Uint;
7015 return Uint_2 ** Uint_7 - Uint_1;
7017 end Machine_Emax_Value;
7019 ------------------------
7020 -- Machine_Emin_Value --
7021 ------------------------
7023 function Machine_Emin_Value (Id : E) return Uint is
7025 case Float_Rep (Id) is
7026 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7027 when VAX_Native => return -Machine_Emax_Value (Id);
7028 when AAMP => return -Machine_Emax_Value (Id);
7030 end Machine_Emin_Value;
7032 ----------------------------
7033 -- Machine_Mantissa_Value --
7034 ----------------------------
7036 function Machine_Mantissa_Value (Id : E) return Uint is
7037 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7040 case Float_Rep (Id) is
7043 when 1 .. 6 => return Uint_24;
7044 when 7 .. 15 => return UI_From_Int (53);
7045 when 16 .. 18 => return Uint_64;
7046 when 19 .. 33 => return UI_From_Int (113);
7047 when others => return No_Uint;
7052 when 1 .. 6 => return Uint_24;
7053 when 7 .. 9 => return UI_From_Int (56);
7054 when 10 .. 15 => return UI_From_Int (53);
7055 when others => return No_Uint;
7060 when 1 .. 6 => return Uint_24;
7061 when 7 .. 9 => return UI_From_Int (40);
7062 when others => return No_Uint;
7065 end Machine_Mantissa_Value;
7067 -------------------------
7068 -- Machine_Radix_Value --
7069 -------------------------
7071 function Machine_Radix_Value (Id : E) return U is
7073 case Float_Rep (Id) is
7074 when IEEE_Binary | VAX_Native | AAMP =>
7077 end Machine_Radix_Value;
7079 --------------------
7080 -- Next_Component --
7081 --------------------
7083 function Next_Component (Id : E) return E is
7087 Comp_Id := Next_Entity (Id);
7088 while Present (Comp_Id) loop
7089 exit when Ekind (Comp_Id) = E_Component;
7090 Comp_Id := Next_Entity (Comp_Id);
7096 ------------------------------------
7097 -- Next_Component_Or_Discriminant --
7098 ------------------------------------
7100 function Next_Component_Or_Discriminant (Id : E) return E is
7104 Comp_Id := Next_Entity (Id);
7105 while Present (Comp_Id) loop
7106 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7107 Comp_Id := Next_Entity (Comp_Id);
7111 end Next_Component_Or_Discriminant;
7113 -----------------------
7114 -- Next_Discriminant --
7115 -----------------------
7117 -- This function actually implements both Next_Discriminant and
7118 -- Next_Stored_Discriminant by making sure that the Discriminant
7119 -- returned is of the same variety as Id.
7121 function Next_Discriminant (Id : E) return E is
7123 -- Derived Tagged types with private extensions look like this...
7125 -- E_Discriminant d1
7126 -- E_Discriminant d2
7128 -- E_Discriminant d1
7129 -- E_Discriminant d2
7132 -- so it is critical not to go past the leading discriminants
7137 pragma Assert (Ekind (Id) = E_Discriminant);
7140 D := Next_Entity (D);
7142 or else (Ekind (D) /= E_Discriminant
7143 and then not Is_Itype (D))
7148 exit when Ekind (D) = E_Discriminant
7149 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7153 end Next_Discriminant;
7159 function Next_Formal (Id : E) return E is
7163 -- Follow the chain of declared entities as long as the kind of the
7164 -- entity corresponds to a formal parameter. Skip internal entities
7165 -- that may have been created for implicit subtypes, in the process
7166 -- of analyzing default expressions.
7170 P := Next_Entity (P);
7172 if No (P) or else Is_Formal (P) then
7174 elsif not Is_Internal (P) then
7180 -----------------------------
7181 -- Next_Formal_With_Extras --
7182 -----------------------------
7184 function Next_Formal_With_Extras (Id : E) return E is
7186 if Present (Extra_Formal (Id)) then
7187 return Extra_Formal (Id);
7189 return Next_Formal (Id);
7191 end Next_Formal_With_Extras;
7197 function Next_Index (Id : Node_Id) return Node_Id is
7206 function Next_Literal (Id : E) return E is
7208 pragma Assert (Nkind (Id) in N_Entity);
7212 ------------------------------
7213 -- Next_Stored_Discriminant --
7214 ------------------------------
7216 function Next_Stored_Discriminant (Id : E) return E is
7218 -- See comment in Next_Discriminant
7220 return Next_Discriminant (Id);
7221 end Next_Stored_Discriminant;
7223 -----------------------
7224 -- Number_Dimensions --
7225 -----------------------
7227 function Number_Dimensions (Id : E) return Pos is
7232 if Ekind (Id) in String_Kind then
7237 T := First_Index (Id);
7238 while Present (T) loop
7245 end Number_Dimensions;
7247 --------------------
7248 -- Number_Entries --
7249 --------------------
7251 function Number_Entries (Id : E) return Nat is
7256 pragma Assert (Is_Concurrent_Type (Id));
7259 Ent := First_Entity (Id);
7260 while Present (Ent) loop
7261 if Is_Entry (Ent) then
7265 Ent := Next_Entity (Ent);
7271 --------------------
7272 -- Number_Formals --
7273 --------------------
7275 function Number_Formals (Id : E) return Pos is
7281 Formal := First_Formal (Id);
7282 while Present (Formal) loop
7284 Formal := Next_Formal (Formal);
7290 --------------------
7291 -- Parameter_Mode --
7292 --------------------
7294 function Parameter_Mode (Id : E) return Formal_Kind is
7299 ------------------------
7300 -- Predicate_Function --
7301 ------------------------
7303 function Predicate_Function (Id : E) return E is
7308 pragma Assert (Is_Type (Id));
7310 -- If type is private and has a completion, predicate may be defined
7311 -- on the full view.
7313 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7314 T := Full_View (Id);
7319 if No (Subprograms_For_Type (T)) then
7323 S := Subprograms_For_Type (T);
7324 while Present (S) loop
7325 if Is_Predicate_Function (S) then
7328 S := Subprograms_For_Type (S);
7334 end Predicate_Function;
7336 --------------------------
7337 -- Predicate_Function_M --
7338 --------------------------
7340 function Predicate_Function_M (Id : E) return E is
7345 pragma Assert (Is_Type (Id));
7347 -- If type is private and has a completion, predicate may be defined
7348 -- on the full view.
7350 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7351 T := Full_View (Id);
7356 if No (Subprograms_For_Type (T)) then
7360 S := Subprograms_For_Type (T);
7361 while Present (S) loop
7362 if Is_Predicate_Function_M (S) then
7365 S := Subprograms_For_Type (S);
7371 end Predicate_Function_M;
7373 -------------------------
7374 -- Present_In_Rep_Item --
7375 -------------------------
7377 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7381 Ritem := First_Rep_Item (E);
7383 while Present (Ritem) loop
7388 Next_Rep_Item (Ritem);
7392 end Present_In_Rep_Item;
7394 --------------------------
7395 -- Primitive_Operations --
7396 --------------------------
7398 function Primitive_Operations (Id : E) return L is
7400 if Is_Concurrent_Type (Id) then
7401 if Present (Corresponding_Record_Type (Id)) then
7402 return Direct_Primitive_Operations
7403 (Corresponding_Record_Type (Id));
7405 -- If expansion is disabled the corresponding record type is absent,
7406 -- but if the type has ancestors it may have primitive operations.
7408 elsif Is_Tagged_Type (Id) then
7409 return Direct_Primitive_Operations (Id);
7415 return Direct_Primitive_Operations (Id);
7417 end Primitive_Operations;
7419 ---------------------
7420 -- Record_Rep_Item --
7421 ---------------------
7423 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7425 Set_Next_Rep_Item (N, First_Rep_Item (E));
7426 Set_First_Rep_Item (E, N);
7427 end Record_Rep_Item;
7433 function Root_Type (Id : E) return E is
7437 pragma Assert (Nkind (Id) in N_Entity);
7439 T := Base_Type (Id);
7441 if Ekind (T) = E_Class_Wide_Type then
7453 -- Following test catches some error cases resulting from
7456 elsif No (Etyp) then
7457 Check_Error_Detected;
7460 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7463 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7469 -- Return if there is a circularity in the inheritance chain. This
7470 -- happens in some error situations and we do not want to get
7471 -- stuck in this loop.
7473 if T = Base_Type (Id) then
7480 ---------------------
7481 -- Safe_Emax_Value --
7482 ---------------------
7484 function Safe_Emax_Value (Id : E) return Uint is
7486 return Machine_Emax_Value (Id);
7487 end Safe_Emax_Value;
7489 ----------------------
7490 -- Safe_First_Value --
7491 ----------------------
7493 function Safe_First_Value (Id : E) return Ureal is
7495 return -Safe_Last_Value (Id);
7496 end Safe_First_Value;
7498 ---------------------
7499 -- Safe_Last_Value --
7500 ---------------------
7502 function Safe_Last_Value (Id : E) return Ureal is
7503 Radix : constant Uint := Machine_Radix_Value (Id);
7504 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7505 Emax : constant Uint := Safe_Emax_Value (Id);
7506 Significand : constant Uint := Radix ** Mantissa - 1;
7507 Exponent : constant Uint := Emax - Mantissa;
7513 (Num => Significand * 2 ** (Exponent mod 4),
7514 Den => -Exponent / 4,
7520 (Num => Significand,
7524 end Safe_Last_Value;
7530 function Scope_Depth (Id : E) return Uint is
7535 while Is_Record_Type (Scop) loop
7536 Scop := Scope (Scop);
7539 return Scope_Depth_Value (Scop);
7542 ---------------------
7543 -- Scope_Depth_Set --
7544 ---------------------
7546 function Scope_Depth_Set (Id : E) return B is
7548 return not Is_Record_Type (Id)
7549 and then Field22 (Id) /= Union_Id (Empty);
7550 end Scope_Depth_Set;
7552 -----------------------------
7553 -- Set_Component_Alignment --
7554 -----------------------------
7556 -- Component Alignment is encoded using two flags, Flag128/129 as
7557 -- follows. Note that both flags False = Align_Default, so that the
7558 -- default initialization of flags to False initializes component
7559 -- alignment to the default value as required.
7561 -- Flag128 Flag129 Value
7562 -- ------- ------- -----
7563 -- False False Calign_Default
7564 -- False True Calign_Component_Size
7565 -- True False Calign_Component_Size_4
7566 -- True True Calign_Storage_Unit
7568 procedure Set_Component_Alignment (Id : E; V : C) is
7570 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7571 and then Is_Base_Type (Id));
7574 when Calign_Default =>
7575 Set_Flag128 (Id, False);
7576 Set_Flag129 (Id, False);
7578 when Calign_Component_Size =>
7579 Set_Flag128 (Id, False);
7580 Set_Flag129 (Id, True);
7582 when Calign_Component_Size_4 =>
7583 Set_Flag128 (Id, True);
7584 Set_Flag129 (Id, False);
7586 when Calign_Storage_Unit =>
7587 Set_Flag128 (Id, True);
7588 Set_Flag129 (Id, True);
7590 end Set_Component_Alignment;
7592 -----------------------------
7593 -- Set_Invariant_Procedure --
7594 -----------------------------
7596 procedure Set_Invariant_Procedure (Id : E; V : E) is
7600 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7602 S := Subprograms_For_Type (Id);
7603 Set_Subprograms_For_Type (Id, V);
7604 Set_Subprograms_For_Type (V, S);
7606 -- Check for duplicate entry
7608 while Present (S) loop
7609 if Is_Invariant_Procedure (S) then
7610 raise Program_Error;
7612 S := Subprograms_For_Type (S);
7615 end Set_Invariant_Procedure;
7617 ----------------------------
7618 -- Set_Predicate_Function --
7619 ----------------------------
7621 procedure Set_Predicate_Function (Id : E; V : E) is
7625 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7627 S := Subprograms_For_Type (Id);
7628 Set_Subprograms_For_Type (Id, V);
7629 Set_Subprograms_For_Type (V, S);
7631 while Present (S) loop
7632 if Is_Predicate_Function (S) then
7633 raise Program_Error;
7635 S := Subprograms_For_Type (S);
7638 end Set_Predicate_Function;
7640 ------------------------------
7641 -- Set_Predicate_Function_M --
7642 ------------------------------
7644 procedure Set_Predicate_Function_M (Id : E; V : E) is
7648 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7650 S := Subprograms_For_Type (Id);
7651 Set_Subprograms_For_Type (Id, V);
7652 Set_Subprograms_For_Type (V, S);
7654 -- Check for duplicates
7656 while Present (S) loop
7657 if Is_Predicate_Function_M (S) then
7658 raise Program_Error;
7660 S := Subprograms_For_Type (S);
7663 end Set_Predicate_Function_M;
7669 function Size_Clause (Id : E) return N is
7671 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7674 ------------------------
7675 -- Stream_Size_Clause --
7676 ------------------------
7678 function Stream_Size_Clause (Id : E) return N is
7680 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7681 end Stream_Size_Clause;
7687 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7693 Kind := E_Access_Subtype;
7697 Kind := E_Array_Subtype;
7699 when E_Class_Wide_Type |
7700 E_Class_Wide_Subtype =>
7701 Kind := E_Class_Wide_Subtype;
7703 when E_Decimal_Fixed_Point_Type |
7704 E_Decimal_Fixed_Point_Subtype =>
7705 Kind := E_Decimal_Fixed_Point_Subtype;
7707 when E_Ordinary_Fixed_Point_Type |
7708 E_Ordinary_Fixed_Point_Subtype =>
7709 Kind := E_Ordinary_Fixed_Point_Subtype;
7711 when E_Private_Type |
7712 E_Private_Subtype =>
7713 Kind := E_Private_Subtype;
7715 when E_Limited_Private_Type |
7716 E_Limited_Private_Subtype =>
7717 Kind := E_Limited_Private_Subtype;
7719 when E_Record_Type_With_Private |
7720 E_Record_Subtype_With_Private =>
7721 Kind := E_Record_Subtype_With_Private;
7723 when E_Record_Type |
7725 Kind := E_Record_Subtype;
7727 when E_String_Type |
7729 Kind := E_String_Subtype;
7731 when Enumeration_Kind =>
7732 Kind := E_Enumeration_Subtype;
7735 Kind := E_Floating_Point_Subtype;
7737 when Signed_Integer_Kind =>
7738 Kind := E_Signed_Integer_Subtype;
7740 when Modular_Integer_Kind =>
7741 Kind := E_Modular_Integer_Subtype;
7743 when Protected_Kind =>
7744 Kind := E_Protected_Subtype;
7747 Kind := E_Task_Subtype;
7751 raise Program_Error;
7757 ---------------------
7758 -- Type_High_Bound --
7759 ---------------------
7761 function Type_High_Bound (Id : E) return Node_Id is
7762 Rng : constant Node_Id := Scalar_Range (Id);
7764 if Nkind (Rng) = N_Subtype_Indication then
7765 return High_Bound (Range_Expression (Constraint (Rng)));
7767 return High_Bound (Rng);
7769 end Type_High_Bound;
7771 --------------------
7772 -- Type_Low_Bound --
7773 --------------------
7775 function Type_Low_Bound (Id : E) return Node_Id is
7776 Rng : constant Node_Id := Scalar_Range (Id);
7778 if Nkind (Rng) = N_Subtype_Indication then
7779 return Low_Bound (Range_Expression (Constraint (Rng)));
7781 return Low_Bound (Rng);
7785 ---------------------
7786 -- Underlying_Type --
7787 ---------------------
7789 function Underlying_Type (Id : E) return E is
7791 -- For record_with_private the underlying type is always the direct
7792 -- full view. Never try to take the full view of the parent it
7793 -- doesn't make sense.
7795 if Ekind (Id) = E_Record_Type_With_Private then
7796 return Full_View (Id);
7798 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7800 -- If we have an incomplete or private type with a full view,
7801 -- then we return the Underlying_Type of this full view
7803 if Present (Full_View (Id)) then
7804 if Id = Full_View (Id) then
7806 -- Previous error in declaration
7811 return Underlying_Type (Full_View (Id));
7814 -- If we have an incomplete entity that comes from the limited
7815 -- view then we return the Underlying_Type of its non-limited
7818 elsif From_With_Type (Id)
7819 and then Present (Non_Limited_View (Id))
7821 return Underlying_Type (Non_Limited_View (Id));
7823 -- Otherwise check for the case where we have a derived type or
7824 -- subtype, and if so get the Underlying_Type of the parent type.
7826 elsif Etype (Id) /= Id then
7827 return Underlying_Type (Etype (Id));
7829 -- Otherwise we have an incomplete or private type that has
7830 -- no full view, which means that we have not encountered the
7831 -- completion, so return Empty to indicate the underlying type
7832 -- is not yet known.
7838 -- For non-incomplete, non-private types, return the type itself
7839 -- Also for entities that are not types at all return the entity
7845 end Underlying_Type;
7851 function Vax_Float (Id : E) return B is
7853 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7856 ------------------------
7857 -- Write_Entity_Flags --
7858 ------------------------
7860 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7862 procedure W (Flag_Name : String; Flag : Boolean);
7863 -- Write out given flag if it is set
7869 procedure W (Flag_Name : String; Flag : Boolean) is
7873 Write_Str (Flag_Name);
7874 Write_Str (" = True");
7879 -- Start of processing for Write_Entity_Flags
7882 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7883 and then Is_Base_Type (Id)
7886 Write_Str ("Component_Alignment = ");
7888 case Component_Alignment (Id) is
7889 when Calign_Default =>
7890 Write_Str ("Calign_Default");
7892 when Calign_Component_Size =>
7893 Write_Str ("Calign_Component_Size");
7895 when Calign_Component_Size_4 =>
7896 Write_Str ("Calign_Component_Size_4");
7898 when Calign_Storage_Unit =>
7899 Write_Str ("Calign_Storage_Unit");
7905 W ("Address_Taken", Flag104 (Id));
7906 W ("Body_Needed_For_SAL", Flag40 (Id));
7907 W ("C_Pass_By_Copy", Flag125 (Id));
7908 W ("Can_Never_Be_Null", Flag38 (Id));
7909 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7910 W ("Debug_Info_Off", Flag166 (Id));
7911 W ("Default_Expressions_Processed", Flag108 (Id));
7912 W ("Delay_Cleanups", Flag114 (Id));
7913 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7914 W ("Depends_On_Private", Flag14 (Id));
7915 W ("Discard_Names", Flag88 (Id));
7916 W ("Elaboration_Entity_Required", Flag174 (Id));
7917 W ("Elaborate_Body_Desirable", Flag210 (Id));
7918 W ("Entry_Accepted", Flag152 (Id));
7919 W ("Can_Use_Internal_Rep", Flag229 (Id));
7920 W ("Finalize_Storage_Only", Flag158 (Id));
7921 W ("From_With_Type", Flag159 (Id));
7922 W ("Has_Aliased_Components", Flag135 (Id));
7923 W ("Has_Alignment_Clause", Flag46 (Id));
7924 W ("Has_All_Calls_Remote", Flag79 (Id));
7925 W ("Has_Anonymous_Master", Flag253 (Id));
7926 W ("Has_Atomic_Components", Flag86 (Id));
7927 W ("Has_Biased_Representation", Flag139 (Id));
7928 W ("Has_Completion", Flag26 (Id));
7929 W ("Has_Completion_In_Body", Flag71 (Id));
7930 W ("Has_Complex_Representation", Flag140 (Id));
7931 W ("Has_Component_Size_Clause", Flag68 (Id));
7932 W ("Has_Contiguous_Rep", Flag181 (Id));
7933 W ("Has_Controlled_Component", Flag43 (Id));
7934 W ("Has_Controlling_Result", Flag98 (Id));
7935 W ("Has_Convention_Pragma", Flag119 (Id));
7936 W ("Has_Default_Aspect", Flag39 (Id));
7937 W ("Has_Delayed_Aspects", Flag200 (Id));
7938 W ("Has_Delayed_Freeze", Flag18 (Id));
7939 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
7940 W ("Has_Discriminants", Flag5 (Id));
7941 W ("Has_Dispatch_Table", Flag220 (Id));
7942 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7943 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7944 W ("Has_Exit", Flag47 (Id));
7945 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7946 W ("Has_Forward_Instantiation", Flag175 (Id));
7947 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7948 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7949 W ("Has_Homonym", Flag56 (Id));
7950 W ("Has_Implicit_Dereference", Flag251 (Id));
7951 W ("Has_Inheritable_Invariants", Flag248 (Id));
7952 W ("Has_Initial_Value", Flag219 (Id));
7953 W ("Has_Invariants", Flag232 (Id));
7954 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7955 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7956 W ("Has_Master_Entity", Flag21 (Id));
7957 W ("Has_Missing_Return", Flag142 (Id));
7958 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7959 W ("Has_Non_Standard_Rep", Flag75 (Id));
7960 W ("Has_Object_Size_Clause", Flag172 (Id));
7961 W ("Has_Per_Object_Constraint", Flag154 (Id));
7962 W ("Has_Postconditions", Flag240 (Id));
7963 W ("Has_Pragma_Controlled", Flag27 (Id));
7964 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7965 W ("Has_Pragma_Inline", Flag157 (Id));
7966 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7967 W ("Has_Pragma_No_Inline", Flag201 (Id));
7968 W ("Has_Pragma_Ordered", Flag198 (Id));
7969 W ("Has_Pragma_Pack", Flag121 (Id));
7970 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7971 W ("Has_Pragma_Pure", Flag203 (Id));
7972 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7973 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7974 W ("Has_Pragma_Unmodified", Flag233 (Id));
7975 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7976 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7977 W ("Has_Predicates", Flag250 (Id));
7978 W ("Has_Primitive_Operations", Flag120 (Id));
7979 W ("Has_Private_Ancestor", Flag151 (Id));
7980 W ("Has_Private_Declaration", Flag155 (Id));
7981 W ("Has_Qualified_Name", Flag161 (Id));
7982 W ("Has_RACW", Flag214 (Id));
7983 W ("Has_Record_Rep_Clause", Flag65 (Id));
7984 W ("Has_Recursive_Call", Flag143 (Id));
7985 W ("Has_Size_Clause", Flag29 (Id));
7986 W ("Has_Small_Clause", Flag67 (Id));
7987 W ("Has_Specified_Layout", Flag100 (Id));
7988 W ("Has_Specified_Stream_Input", Flag190 (Id));
7989 W ("Has_Specified_Stream_Output", Flag191 (Id));
7990 W ("Has_Specified_Stream_Read", Flag192 (Id));
7991 W ("Has_Specified_Stream_Write", Flag193 (Id));
7992 W ("Has_Static_Discriminants", Flag211 (Id));
7993 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7994 W ("Has_Storage_Size_Clause", Flag23 (Id));
7995 W ("Has_Stream_Size_Clause", Flag184 (Id));
7996 W ("Has_Task", Flag30 (Id));
7997 W ("Has_Thunks", Flag228 (Id));
7998 W ("Has_Unchecked_Union", Flag123 (Id));
7999 W ("Has_Unknown_Discriminants", Flag72 (Id));
8000 W ("Has_Up_Level_Access", Flag215 (Id));
8001 W ("Has_Volatile_Components", Flag87 (Id));
8002 W ("Has_Xref_Entry", Flag182 (Id));
8003 W ("In_Package_Body", Flag48 (Id));
8004 W ("In_Private_Part", Flag45 (Id));
8005 W ("In_Use", Flag8 (Id));
8006 W ("Is_AST_Entry", Flag132 (Id));
8007 W ("Is_Abstract_Subprogram", Flag19 (Id));
8008 W ("Is_Abstract_Type", Flag146 (Id));
8009 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8010 W ("Is_Access_Constant", Flag69 (Id));
8011 W ("Is_Ada_2005_Only", Flag185 (Id));
8012 W ("Is_Ada_2012_Only", Flag199 (Id));
8013 W ("Is_Aliased", Flag15 (Id));
8014 W ("Is_Asynchronous", Flag81 (Id));
8015 W ("Is_Atomic", Flag85 (Id));
8016 W ("Is_Bit_Packed_Array", Flag122 (Id));
8017 W ("Is_CPP_Class", Flag74 (Id));
8018 W ("Is_Called", Flag102 (Id));
8019 W ("Is_Character_Type", Flag63 (Id));
8020 W ("Is_Child_Unit", Flag73 (Id));
8021 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8022 W ("Is_Compilation_Unit", Flag149 (Id));
8023 W ("Is_Completely_Hidden", Flag103 (Id));
8024 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8025 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8026 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8027 W ("Is_Constrained", Flag12 (Id));
8028 W ("Is_Constructor", Flag76 (Id));
8029 W ("Is_Controlled", Flag42 (Id));
8030 W ("Is_Controlling_Formal", Flag97 (Id));
8031 W ("Is_Descendent_Of_Address", Flag223 (Id));
8032 W ("Is_Discrim_SO_Function", Flag176 (Id));
8033 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8034 W ("Is_Dispatching_Operation", Flag6 (Id));
8035 W ("Is_Eliminated", Flag124 (Id));
8036 W ("Is_Entry_Formal", Flag52 (Id));
8037 W ("Is_Exported", Flag99 (Id));
8038 W ("Is_First_Subtype", Flag70 (Id));
8039 W ("Is_For_Access_Subtype", Flag118 (Id));
8040 W ("Is_Formal_Subprogram", Flag111 (Id));
8041 W ("Is_Frozen", Flag4 (Id));
8042 W ("Is_Generic_Actual_Type", Flag94 (Id));
8043 W ("Is_Generic_Instance", Flag130 (Id));
8044 W ("Is_Generic_Type", Flag13 (Id));
8045 W ("Is_Hidden", Flag57 (Id));
8046 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8047 W ("Is_Immediately_Visible", Flag7 (Id));
8048 W ("Is_Implementation_Defined", Flag254 (Id));
8049 W ("Is_Imported", Flag24 (Id));
8050 W ("Is_Inlined", Flag11 (Id));
8051 W ("Is_Instantiated", Flag126 (Id));
8052 W ("Is_Interface", Flag186 (Id));
8053 W ("Is_Internal", Flag17 (Id));
8054 W ("Is_Interrupt_Handler", Flag89 (Id));
8055 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8056 W ("Is_Invariant_Procedure", Flag257 (Id));
8057 W ("Is_Itype", Flag91 (Id));
8058 W ("Is_Known_Non_Null", Flag37 (Id));
8059 W ("Is_Known_Null", Flag204 (Id));
8060 W ("Is_Known_Valid", Flag170 (Id));
8061 W ("Is_Limited_Composite", Flag106 (Id));
8062 W ("Is_Limited_Interface", Flag197 (Id));
8063 W ("Is_Limited_Record", Flag25 (Id));
8064 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8065 W ("Is_Non_Static_Subtype", Flag109 (Id));
8066 W ("Is_Null_Init_Proc", Flag178 (Id));
8067 W ("Is_Obsolescent", Flag153 (Id));
8068 W ("Is_Only_Out_Parameter", Flag226 (Id));
8069 W ("Is_Optional_Parameter", Flag134 (Id));
8070 W ("Is_Package_Body_Entity", Flag160 (Id));
8071 W ("Is_Packed", Flag51 (Id));
8072 W ("Is_Packed_Array_Type", Flag138 (Id));
8073 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8074 W ("Is_Predicate_Function", Flag255 (Id));
8075 W ("Is_Predicate_Function_M", Flag256 (Id));
8076 W ("Is_Preelaborated", Flag59 (Id));
8077 W ("Is_Primitive", Flag218 (Id));
8078 W ("Is_Primitive_Wrapper", Flag195 (Id));
8079 W ("Is_Private_Composite", Flag107 (Id));
8080 W ("Is_Private_Descendant", Flag53 (Id));
8081 W ("Is_Private_Primitive", Flag245 (Id));
8082 W ("Is_Processed_Transient", Flag252 (Id));
8083 W ("Is_Public", Flag10 (Id));
8084 W ("Is_Pure", Flag44 (Id));
8085 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8086 W ("Is_RACW_Stub_Type", Flag244 (Id));
8087 W ("Is_Raised", Flag224 (Id));
8088 W ("Is_Remote_Call_Interface", Flag62 (Id));
8089 W ("Is_Remote_Types", Flag61 (Id));
8090 W ("Is_Renaming_Of_Object", Flag112 (Id));
8091 W ("Is_Return_Object", Flag209 (Id));
8092 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8093 W ("Is_Shared_Passive", Flag60 (Id));
8094 W ("Is_Statically_Allocated", Flag28 (Id));
8095 W ("Is_Tag", Flag78 (Id));
8096 W ("Is_Tagged_Type", Flag55 (Id));
8097 W ("Is_Thunk", Flag225 (Id));
8098 W ("Is_Trivial_Subprogram", Flag235 (Id));
8099 W ("Is_True_Constant", Flag163 (Id));
8100 W ("Is_Unchecked_Union", Flag117 (Id));
8101 W ("Is_Underlying_Record_View", Flag246 (Id));
8102 W ("Is_Unsigned_Type", Flag144 (Id));
8103 W ("Is_VMS_Exception", Flag133 (Id));
8104 W ("Is_Valued_Procedure", Flag127 (Id));
8105 W ("Is_Visible_Formal", Flag206 (Id));
8106 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8107 W ("Is_Volatile", Flag16 (Id));
8108 W ("Itype_Printed", Flag202 (Id));
8109 W ("Kill_Elaboration_Checks", Flag32 (Id));
8110 W ("Kill_Range_Checks", Flag33 (Id));
8111 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8112 W ("Low_Bound_Tested", Flag205 (Id));
8113 W ("Machine_Radix_10", Flag84 (Id));
8114 W ("Materialize_Entity", Flag168 (Id));
8115 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8116 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8117 W ("Must_Have_Preelab_Init", Flag208 (Id));
8118 W ("Needs_Debug_Info", Flag147 (Id));
8119 W ("Needs_No_Actuals", Flag22 (Id));
8120 W ("Never_Set_In_Source", Flag115 (Id));
8121 W ("No_Pool_Assigned", Flag131 (Id));
8122 W ("No_Return", Flag113 (Id));
8123 W ("No_Strict_Aliasing", Flag136 (Id));
8124 W ("Non_Binary_Modulus", Flag58 (Id));
8125 W ("Nonzero_Is_True", Flag162 (Id));
8126 W ("OK_To_Rename", Flag247 (Id));
8127 W ("OK_To_Reorder_Components", Flag239 (Id));
8128 W ("Optimize_Alignment_Space", Flag241 (Id));
8129 W ("Optimize_Alignment_Time", Flag242 (Id));
8130 W ("Overlays_Constant", Flag243 (Id));
8131 W ("Reachable", Flag49 (Id));
8132 W ("Referenced", Flag156 (Id));
8133 W ("Referenced_As_LHS", Flag36 (Id));
8134 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8135 W ("Renamed_In_Spec", Flag231 (Id));
8136 W ("Requires_Overriding", Flag213 (Id));
8137 W ("Return_Present", Flag54 (Id));
8138 W ("Returns_By_Ref", Flag90 (Id));
8139 W ("Reverse_Bit_Order", Flag164 (Id));
8140 W ("Reverse_Storage_Order", Flag93 (Id));
8141 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8142 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8143 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8144 W ("Static_Elaboration_Desired", Flag77 (Id));
8145 W ("Strict_Alignment", Flag145 (Id));
8146 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8147 W ("Suppress_Initialization", Flag105 (Id));
8148 W ("Suppress_Style_Checks", Flag165 (Id));
8149 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8150 W ("Treat_As_Volatile", Flag41 (Id));
8151 W ("Universal_Aliasing", Flag216 (Id));
8152 W ("Used_As_Generic_Actual", Flag222 (Id));
8153 W ("Uses_Sec_Stack", Flag95 (Id));
8154 W ("Warnings_Off", Flag96 (Id));
8155 W ("Warnings_Off_Used", Flag236 (Id));
8156 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8157 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8158 W ("Was_Hidden", Flag196 (Id));
8159 end Write_Entity_Flags;
8161 -----------------------
8162 -- Write_Entity_Info --
8163 -----------------------
8165 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8167 procedure Write_Attribute (Which : String; Nam : E);
8168 -- Write attribute value with given string name
8170 procedure Write_Kind (Id : Entity_Id);
8171 -- Write Ekind field of entity
8173 ---------------------
8174 -- Write_Attribute --
8175 ---------------------
8177 procedure Write_Attribute (Which : String; Nam : E) is
8181 Write_Int (Int (Nam));
8183 Write_Name (Chars (Nam));
8185 end Write_Attribute;
8191 procedure Write_Kind (Id : Entity_Id) is
8192 K : constant String := Entity_Kind'Image (Ekind (Id));
8196 Write_Str (" Kind ");
8198 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8199 Write_Str ("TAGGED ");
8202 Write_Str (K (3 .. K'Length));
8205 if Is_Type (Id) and then Depends_On_Private (Id) then
8206 Write_Str ("Depends_On_Private ");
8210 -- Start of processing for Write_Entity_Info
8214 Write_Attribute ("Name ", Id);
8215 Write_Int (Int (Id));
8219 Write_Attribute (" Type ", Etype (Id));
8221 Write_Attribute (" Scope ", Scope (Id));
8226 when Discrete_Kind =>
8227 Write_Str ("Bounds: Id = ");
8229 if Present (Scalar_Range (Id)) then
8230 Write_Int (Int (Type_Low_Bound (Id)));
8231 Write_Str (" .. Id = ");
8232 Write_Int (Int (Type_High_Bound (Id)));
8234 Write_Str ("Empty");
8245 (" Component Type ", Component_Type (Id));
8248 Write_Str (" Indexes ");
8250 Index := First_Index (Id);
8251 while Present (Index) loop
8252 Write_Attribute (" ", Etype (Index));
8253 Index := Next_Index (Index);
8261 (" Directly Designated Type ",
8262 Directly_Designated_Type (Id));
8265 when Overloadable_Kind =>
8266 if Present (Homonym (Id)) then
8267 Write_Str (" Homonym ");
8268 Write_Name (Chars (Homonym (Id)));
8270 Write_Int (Int (Homonym (Id)));
8277 if Ekind (Scope (Id)) in Record_Kind then
8279 " Original_Record_Component ",
8280 Original_Record_Component (Id));
8281 Write_Int (Int (Original_Record_Component (Id)));
8285 when others => null;
8287 end Write_Entity_Info;
8289 -----------------------
8290 -- Write_Field6_Name --
8291 -----------------------
8293 procedure Write_Field6_Name (Id : Entity_Id) is
8294 pragma Warnings (Off, Id);
8296 Write_Str ("First_Rep_Item");
8297 end Write_Field6_Name;
8299 -----------------------
8300 -- Write_Field7_Name --
8301 -----------------------
8303 procedure Write_Field7_Name (Id : Entity_Id) is
8304 pragma Warnings (Off, Id);
8306 Write_Str ("Freeze_Node");
8307 end Write_Field7_Name;
8309 -----------------------
8310 -- Write_Field8_Name --
8311 -----------------------
8313 procedure Write_Field8_Name (Id : Entity_Id) is
8317 Write_Str ("Associated_Node_For_Itype");
8320 Write_Str ("Dependent_Instances");
8323 Write_Str ("First_Exit_Statement");
8326 Write_Str ("Hiding_Loop_Variable");
8330 E_Subprogram_Body =>
8331 Write_Str ("Mechanism");
8335 Write_Str ("Normalized_First_Bit");
8338 Write_Str ("Postcondition_Proc");
8340 when E_Abstract_State =>
8341 Write_Str ("Refinement_Constituents");
8343 when E_Return_Statement =>
8344 Write_Str ("Return_Applies_To");
8347 Write_Str ("Field8??");
8349 end Write_Field8_Name;
8351 -----------------------
8352 -- Write_Field9_Name --
8353 -----------------------
8355 procedure Write_Field9_Name (Id : Entity_Id) is
8359 Write_Str ("Class_Wide_Type");
8362 Write_Str ("Current_Value");
8365 E_Generic_Function |
8367 E_Generic_Procedure |
8370 Write_Str ("Renaming_Map");
8373 Write_Str ("Field9??");
8375 end Write_Field9_Name;
8377 ------------------------
8378 -- Write_Field10_Name --
8379 ------------------------
8381 procedure Write_Field10_Name (Id : Entity_Id) is
8384 when Class_Wide_Kind |
8390 Write_Str ("Direct_Primitive_Operations");
8393 Write_Str ("Float_Rep");
8395 when E_In_Parameter |
8397 Write_Str ("Discriminal_Link");
8403 Write_Str ("Handler_Records");
8407 Write_Str ("Normalized_Position_Max");
8409 when E_Abstract_State |
8411 Write_Str ("Refined_State");
8414 Write_Str ("Field10??");
8416 end Write_Field10_Name;
8418 ------------------------
8419 -- Write_Field11_Name --
8420 ------------------------
8422 procedure Write_Field11_Name (Id : Entity_Id) is
8426 Write_Str ("Block_Node");
8430 Write_Str ("Component_Bit_Offset");
8433 Write_Str ("Entry_Component");
8435 when E_Enumeration_Literal =>
8436 Write_Str ("Enumeration_Pos");
8440 Write_Str ("Full_View");
8442 when E_Generic_Package =>
8443 Write_Str ("Generic_Homonym");
8449 Write_Str ("Protected_Body_Subprogram");
8452 Write_Str ("Field11??");
8454 end Write_Field11_Name;
8456 ------------------------
8457 -- Write_Field12_Name --
8458 ------------------------
8460 procedure Write_Field12_Name (Id : Entity_Id) is
8464 Write_Str ("Associated_Formal_Package");
8467 Write_Str ("Barrier_Function");
8469 when E_Enumeration_Literal =>
8470 Write_Str ("Enumeration_Rep");
8478 E_In_Out_Parameter |
8482 Write_Str ("Esize");
8486 Write_Str ("Next_Inlined_Subprogram");
8489 Write_Str ("Field12??");
8491 end Write_Field12_Name;
8493 ------------------------
8494 -- Write_Field13_Name --
8495 ------------------------
8497 procedure Write_Field13_Name (Id : Entity_Id) is
8502 Write_Str ("Component_Clause");
8505 Write_Str ("Elaboration_Entity");
8509 Generic_Unit_Kind =>
8510 Write_Str ("Elaboration_Entity");
8514 Write_Str ("Extra_Accessibility");
8517 Write_Str ("RM_Size");
8520 Write_Str ("Field13??");
8522 end Write_Field13_Name;
8524 -----------------------
8525 -- Write_Field14_Name --
8526 -----------------------
8528 procedure Write_Field14_Name (Id : Entity_Id) is
8537 Write_Str ("Alignment");
8541 Write_Str ("First_Optional_Parameter");
8545 Write_Str ("Normalized_Position");
8548 E_Generic_Package =>
8549 Write_Str ("Shadow_Entities");
8552 Write_Str ("Field14??");
8554 end Write_Field14_Name;
8556 ------------------------
8557 -- Write_Field15_Name --
8558 ------------------------
8560 procedure Write_Field15_Name (Id : Entity_Id) is
8563 when E_Discriminant =>
8564 Write_Str ("Discriminant_Number");
8567 Write_Str ("DT_Entry_Count");
8571 Write_Str ("DT_Position");
8573 when E_Protected_Type =>
8574 Write_Str ("Entry_Bodies_Array");
8577 Write_Str ("Entry_Parameters_Type");
8580 Write_Str ("Extra_Formal");
8582 when Enumeration_Kind =>
8583 Write_Str ("Lit_Indexes");
8587 Write_Str ("Related_Instance");
8589 when Decimal_Fixed_Point_Kind =>
8590 Write_Str ("Scale_Value");
8594 Write_Str ("Status_Flag_Or_Transient_Decl");
8598 Write_Str ("Storage_Size_Variable");
8600 when E_String_Literal_Subtype =>
8601 Write_Str ("String_Literal_Low_Bound");
8604 Write_Str ("Field15??");
8606 end Write_Field15_Name;
8608 ------------------------
8609 -- Write_Field16_Name --
8610 ------------------------
8612 procedure Write_Field16_Name (Id : Entity_Id) is
8615 when E_Record_Type |
8616 E_Record_Type_With_Private =>
8617 Write_Str ("Access_Disp_Table");
8619 when E_Record_Subtype |
8620 E_Class_Wide_Subtype =>
8621 Write_Str ("Cloned_Subtype");
8625 Write_Str ("DTC_Entity");
8628 Write_Str ("Entry_Formal");
8633 Write_Str ("First_Private_Entity");
8635 when Enumeration_Kind =>
8636 Write_Str ("Lit_Strings");
8638 when E_String_Literal_Subtype =>
8639 Write_Str ("String_Literal_Length");
8643 Write_Str ("Unset_Reference");
8646 Write_Str ("Field16??");
8648 end Write_Field16_Name;
8650 ------------------------
8651 -- Write_Field17_Name --
8652 ------------------------
8654 procedure Write_Field17_Name (Id : Entity_Id) is
8659 E_Generic_In_Out_Parameter |
8661 Write_Str ("Actual_Subtype");
8664 Write_Str ("Digits_Value");
8666 when E_Discriminant =>
8667 Write_Str ("Discriminal");
8676 E_Generic_Function |
8678 E_Generic_Procedure |
8686 E_Return_Statement |
8688 E_Subprogram_Type =>
8689 Write_Str ("First_Entity");
8692 Write_Str ("First_Index");
8694 when Enumeration_Kind =>
8695 Write_Str ("First_Literal");
8698 Write_Str ("Master_Id");
8700 when Modular_Integer_Kind =>
8701 Write_Str ("Modulus");
8703 when E_Incomplete_Type =>
8704 Write_Str ("Non_Limited_View");
8706 when E_Incomplete_Subtype =>
8707 if From_With_Type (Id) then
8708 Write_Str ("Non_Limited_View");
8712 Write_Str ("Prival");
8715 Write_Str ("Field17??");
8717 end Write_Field17_Name;
8719 ------------------------
8720 -- Write_Field18_Name --
8721 ------------------------
8723 procedure Write_Field18_Name (Id : Entity_Id) is
8726 when E_Enumeration_Literal |
8730 Write_Str ("Alias");
8732 when E_Record_Type =>
8733 Write_Str ("Corresponding_Concurrent_Type");
8735 when E_Subprogram_Body =>
8736 Write_Str ("Corresponding_Protected_Entry");
8738 when Concurrent_Kind =>
8739 Write_Str ("Corresponding_Record_Type");
8744 Write_Str ("Enclosing_Scope");
8746 when E_Entry_Index_Parameter =>
8747 Write_Str ("Entry_Index_Constant");
8749 when E_Class_Wide_Subtype |
8750 E_Access_Protected_Subprogram_Type |
8751 E_Anonymous_Access_Protected_Subprogram_Type |
8752 E_Access_Subprogram_Type |
8754 Write_Str ("Equivalent_Type");
8756 when Fixed_Point_Kind =>
8757 Write_Str ("Delta_Value");
8759 when Incomplete_Or_Private_Kind |
8761 Write_Str ("Private_Dependents");
8764 Write_Str ("Renamed_Object");
8768 E_Generic_Function |
8769 E_Generic_Procedure |
8770 E_Generic_Package =>
8771 Write_Str ("Renamed_Entity");
8774 Write_Str ("Field18??");
8776 end Write_Field18_Name;
8778 -----------------------
8779 -- Write_Field19_Name --
8780 -----------------------
8782 procedure Write_Field19_Name (Id : Entity_Id) is
8786 E_Generic_Package =>
8787 Write_Str ("Body_Entity");
8789 when E_Discriminant =>
8790 Write_Str ("Corresponding_Discriminant");
8793 Write_Str ("Default_Aspect_Value");
8795 when E_Array_Type =>
8796 Write_Str ("Default_Component_Value");
8798 when E_Record_Type =>
8799 Write_Str ("Parent_Subtype");
8803 Write_Str ("Size_Check_Code");
8805 when E_Package_Body |
8807 Write_Str ("Spec_Entity");
8809 when Private_Kind =>
8810 Write_Str ("Underlying_Full_View");
8812 when E_Function | E_Operator | E_Subprogram_Type =>
8813 Write_Str ("Extra_Accessibility_Of_Result");
8816 Write_Str ("Field19??");
8818 end Write_Field19_Name;
8820 -----------------------
8821 -- Write_Field20_Name --
8822 -----------------------
8824 procedure Write_Field20_Name (Id : Entity_Id) is
8828 Write_Str ("Component_Type");
8830 when E_In_Parameter |
8831 E_Generic_In_Parameter =>
8832 Write_Str ("Default_Value");
8835 Write_Str ("Directly_Designated_Type");
8838 Write_Str ("Discriminant_Checking_Func");
8840 when E_Discriminant =>
8841 Write_Str ("Discriminant_Default_Value");
8850 E_Generic_Function |
8852 E_Generic_Procedure |
8860 E_Return_Statement |
8862 E_Subprogram_Type =>
8863 Write_Str ("Last_Entity");
8867 Write_Str ("Prival_Link");
8870 Write_Str ("Scalar_Range");
8873 Write_Str ("Register_Exception_Call");
8876 Write_Str ("Field20??");
8878 end Write_Field20_Name;
8880 -----------------------
8881 -- Write_Field21_Name --
8882 -----------------------
8884 procedure Write_Field21_Name (Id : Entity_Id) is
8888 Write_Str ("Accept_Address");
8890 when E_In_Parameter =>
8891 Write_Str ("Default_Expr_Function");
8893 when Concurrent_Kind |
8894 Incomplete_Or_Private_Kind |
8898 Write_Str ("Discriminant_Constraint");
8903 E_Generic_Function |
8905 E_Generic_Procedure |
8907 Write_Str ("Interface_Name");
8910 Modular_Integer_Kind =>
8911 Write_Str ("Original_Array_Type");
8913 when Fixed_Point_Kind =>
8914 Write_Str ("Small_Value");
8917 Write_Str ("Field21??");
8919 end Write_Field21_Name;
8921 -----------------------
8922 -- Write_Field22_Name --
8923 -----------------------
8925 procedure Write_Field22_Name (Id : Entity_Id) is
8929 Write_Str ("Associated_Storage_Pool");
8932 Write_Str ("Component_Size");
8934 when E_Record_Type =>
8935 Write_Str ("Corresponding_Remote_Type");
8939 Write_Str ("Original_Record_Component");
8941 when E_Enumeration_Literal =>
8942 Write_Str ("Enumeration_Rep_Expr");
8945 Write_Str ("Exception_Code");
8947 when E_Record_Type_With_Private |
8948 E_Record_Subtype_With_Private |
8951 E_Limited_Private_Type |
8952 E_Limited_Private_Subtype =>
8953 Write_Str ("Private_View");
8956 Write_Str ("Protected_Formal");
8966 E_Generic_Function |
8967 E_Generic_Procedure |
8970 E_Return_Statement |
8973 Write_Str ("Scope_Depth_Value");
8976 Write_Str ("Shared_Var_Procs_Instance");
8979 Write_Str ("Field22??");
8981 end Write_Field22_Name;
8983 ------------------------
8984 -- Write_Field23_Name --
8985 ------------------------
8987 procedure Write_Field23_Name (Id : Entity_Id) is
8990 when E_Discriminant =>
8991 Write_Str ("CR_Discriminant");
8994 Write_Str ("Entry_Cancel_Parameter");
8996 when E_Enumeration_Type =>
8997 Write_Str ("Enum_Pos_To_Rep");
9001 Write_Str ("Extra_Constrained");
9004 Write_Str ("Finalization_Master");
9006 when E_Generic_Function |
9008 E_Generic_Procedure =>
9009 Write_Str ("Inner_Instances");
9012 Write_Str ("Packed_Array_Type");
9015 Write_Str ("Protection_Object");
9017 when Concurrent_Kind |
9018 Incomplete_Or_Private_Kind |
9022 Write_Str ("Stored_Constraint");
9026 if Present (Scope (Id))
9027 and then Is_Protected_Type (Scope (Id))
9029 Write_Str ("Protection_Object");
9031 Write_Str ("Generic_Renamings");
9035 if Is_Generic_Instance (Id) then
9036 Write_Str ("Generic_Renamings");
9038 Write_Str ("Limited_View");
9042 Write_Str ("Field23??");
9044 end Write_Field23_Name;
9046 ------------------------
9047 -- Write_Field24_Name --
9048 ------------------------
9050 procedure Write_Field24_Name (Id : Entity_Id) is
9056 Write_Str ("Related_Expression");
9064 Generic_Subprogram_Kind |
9066 Write_Str ("Contract");
9069 Write_Str ("Field24???");
9071 end Write_Field24_Name;
9073 ------------------------
9074 -- Write_Field25_Name --
9075 ------------------------
9077 procedure Write_Field25_Name (Id : Entity_Id) is
9081 Write_Str ("Abstract_States");
9084 Write_Str ("Debug_Renaming_Link");
9087 Write_Str ("DT_Offset_To_Top_Func");
9091 Write_Str ("Interface_Alias");
9093 when E_Record_Type |
9095 E_Record_Type_With_Private |
9096 E_Record_Subtype_With_Private =>
9097 Write_Str ("Interfaces");
9101 Write_Str ("Related_Array_Object");
9104 Write_Str ("Task_Body_Procedure");
9108 Write_Str ("PPC_Wrapper");
9110 when E_Enumeration_Subtype |
9111 E_Modular_Integer_Subtype |
9112 E_Signed_Integer_Subtype =>
9113 Write_Str ("Static_Predicate");
9116 Write_Str ("Field25??");
9118 end Write_Field25_Name;
9120 ------------------------
9121 -- Write_Field26_Name --
9122 ------------------------
9124 procedure Write_Field26_Name (Id : Entity_Id) is
9127 when E_Record_Type |
9128 E_Record_Type_With_Private =>
9129 Write_Str ("Dispatch_Table_Wrappers");
9131 when E_In_Out_Parameter |
9134 Write_Str ("Last_Assignment");
9136 when E_Access_Subprogram_Type =>
9137 Write_Str ("Original_Access_Type");
9139 when E_Generic_Package |
9141 Write_Str ("Package_Instantiation");
9145 Write_Str ("Related_Type");
9148 Write_Str ("Relative_Deadline_Variable");
9152 Write_Str ("Overridden_Operation");
9155 Write_Str ("Field26??");
9157 end Write_Field26_Name;
9159 ------------------------
9160 -- Write_Field27_Name --
9161 ------------------------
9163 procedure Write_Field27_Name (Id : Entity_Id) is
9168 Write_Str ("Current_Use_Clause");
9173 Write_Str ("Related_Type");
9177 Write_Str ("Wrapped_Entity");
9180 Write_Str ("Field27??");
9182 end Write_Field27_Name;
9184 ------------------------
9185 -- Write_Field28_Name --
9186 ------------------------
9188 procedure Write_Field28_Name (Id : Entity_Id) is
9196 E_Subprogram_Type =>
9197 Write_Str ("Extra_Formals");
9201 Write_Str ("Finalizer");
9205 Write_Str ("Initialization_Statements");
9207 when E_Record_Type =>
9208 Write_Str ("Underlying_Record_View");
9211 Write_Str ("Field28??");
9213 end Write_Field28_Name;
9215 ------------------------
9216 -- Write_Field29_Name --
9217 ------------------------
9219 procedure Write_Field29_Name (Id : Entity_Id) is
9223 Write_Str ("Subprograms_For_Type");
9226 Write_Str ("Field29??");
9228 end Write_Field29_Name;
9230 ------------------------
9231 -- Write_Field30_Name --
9232 ------------------------
9234 procedure Write_Field30_Name (Id : Entity_Id) is
9238 Write_Str ("Corresponding_Equality");
9241 Write_Str ("Static_Initialization");
9244 Write_Str ("Field30??");
9246 end Write_Field30_Name;
9248 ------------------------
9249 -- Write_Field31_Name --
9250 ------------------------
9252 procedure Write_Field31_Name (Id : Entity_Id) is
9257 Write_Str ("Thunk_Entity");
9260 Write_Str ("Field31??");
9262 end Write_Field31_Name;
9264 ------------------------
9265 -- Write_Field32_Name --
9266 ------------------------
9268 procedure Write_Field32_Name (Id : Entity_Id) is
9272 E_Generic_Function |
9274 E_Generic_Procedure |
9278 E_Subprogram_Body =>
9279 Write_Str ("SPARK_Mode_Pragmas");
9282 Write_Str ("Field32??");
9284 end Write_Field32_Name;
9286 ------------------------
9287 -- Write_Field33_Name --
9288 ------------------------
9290 procedure Write_Field33_Name (Id : Entity_Id) is
9294 Write_Str ("Field33??");
9296 end Write_Field33_Name;
9298 ------------------------
9299 -- Write_Field34_Name --
9300 ------------------------
9302 procedure Write_Field34_Name (Id : Entity_Id) is
9306 Write_Str ("Field34??");
9308 end Write_Field34_Name;
9310 ------------------------
9311 -- Write_Field35_Name --
9312 ------------------------
9314 procedure Write_Field35_Name (Id : Entity_Id) is
9318 Write_Str ("Field35??");
9320 end Write_Field35_Name;
9322 -------------------------
9323 -- Iterator Procedures --
9324 -------------------------
9326 procedure Proc_Next_Component (N : in out Node_Id) is
9328 N := Next_Component (N);
9329 end Proc_Next_Component;
9331 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9333 N := Next_Entity (N);
9334 while Present (N) loop
9335 exit when Ekind_In (N, E_Component, E_Discriminant);
9336 N := Next_Entity (N);
9338 end Proc_Next_Component_Or_Discriminant;
9340 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9342 N := Next_Discriminant (N);
9343 end Proc_Next_Discriminant;
9345 procedure Proc_Next_Formal (N : in out Node_Id) is
9347 N := Next_Formal (N);
9348 end Proc_Next_Formal;
9350 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9352 N := Next_Formal_With_Extras (N);
9353 end Proc_Next_Formal_With_Extras;
9355 procedure Proc_Next_Index (N : in out Node_Id) is
9357 N := Next_Index (N);
9358 end Proc_Next_Index;
9360 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9362 N := Next_Inlined_Subprogram (N);
9363 end Proc_Next_Inlined_Subprogram;
9365 procedure Proc_Next_Literal (N : in out Node_Id) is
9367 N := Next_Literal (N);
9368 end Proc_Next_Literal;
9370 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9372 N := Next_Stored_Discriminant (N);
9373 end Proc_Next_Stored_Discriminant;