1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2014, 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
89 -- Part_Of_Constituents Elist9
92 -- Encapsulating_State Node10
93 -- Direct_Primitive_Operations Elist10
94 -- Discriminal_Link Node10
95 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
96 -- Handler_Records List10
97 -- Normalized_Position_Max Uint10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Last_Aggregate_Assignment Node11
105 -- Protected_Body_Subprogram Node11
108 -- Barrier_Function Node12
109 -- Enumeration_Rep Uint12
111 -- Next_Inlined_Subprogram Node12
113 -- Component_Clause Node13
114 -- Elaboration_Entity Node13
115 -- Extra_Accessibility Node13
119 -- First_Optional_Parameter Node14
120 -- Normalized_Position Uint14
121 -- Shadow_Entities List14
123 -- Discriminant_Number Uint15
124 -- DT_Position Uint15
125 -- DT_Entry_Count Uint15
126 -- Entry_Bodies_Array Node15
127 -- Entry_Parameters_Type Node15
128 -- Extra_Formal Node15
129 -- Lit_Indexes Node15
130 -- Related_Instance Node15
131 -- Status_Flag_Or_Transient_Decl Node15
132 -- Scale_Value Uint15
133 -- Storage_Size_Variable Node15
134 -- String_Literal_Low_Bound Node15
136 -- Access_Disp_Table Elist16
137 -- Body_References Elist16
138 -- Cloned_Subtype Node16
140 -- Entry_Formal Node16
141 -- First_Private_Entity Node16
142 -- Lit_Strings Node16
143 -- String_Literal_Length Uint16
144 -- Unset_Reference Node16
146 -- Actual_Subtype Node17
147 -- Digits_Value Uint17
148 -- Discriminal Node17
149 -- First_Entity Node17
150 -- First_Index Node17
151 -- First_Literal Node17
154 -- Non_Limited_View Node17
158 -- Corresponding_Concurrent_Type Node18
159 -- Corresponding_Protected_Entry Node18
160 -- Corresponding_Record_Type Node18
161 -- Delta_Value Ureal18
162 -- Enclosing_Scope Node18
163 -- Equivalent_Type Node18
164 -- Private_Dependents Elist18
165 -- Renamed_Entity Node18
166 -- Renamed_Object Node18
168 -- Body_Entity Node19
169 -- Corresponding_Discriminant Node19
170 -- Default_Aspect_Component_Value Node19
171 -- Default_Aspect_Value Node19
172 -- Extra_Accessibility_Of_Result Node19
173 -- Parent_Subtype Node19
174 -- Size_Check_Code Node19
175 -- Spec_Entity Node19
176 -- Underlying_Full_View Node19
178 -- Component_Type Node20
179 -- Default_Value Node20
180 -- Directly_Designated_Type Node20
181 -- Discriminant_Checking_Func Node20
182 -- Discriminant_Default_Value Node20
183 -- Last_Entity Node20
184 -- Prival_Link Node20
185 -- Register_Exception_Call Node20
186 -- Scalar_Range Node20
188 -- Accept_Address Elist21
189 -- Default_Expr_Function Node21
190 -- Discriminant_Constraint Elist21
191 -- Interface_Name Node21
192 -- Original_Array_Type Node21
193 -- Small_Value Ureal21
195 -- Associated_Storage_Pool Node22
196 -- Component_Size Uint22
197 -- Corresponding_Remote_Type Node22
198 -- Enumeration_Rep_Expr Node22
199 -- Exception_Code Uint22
200 -- Original_Record_Component Node22
201 -- Private_View Node22
202 -- Protected_Formal Node22
203 -- Scope_Depth_Value Uint22
204 -- Shared_Var_Procs_Instance Node22
206 -- CR_Discriminant Node23
207 -- Entry_Cancel_Parameter Node23
208 -- Enum_Pos_To_Rep Node23
209 -- Extra_Constrained Node23
210 -- Finalization_Master Node23
211 -- Generic_Renamings Elist23
212 -- Inner_Instances Elist23
213 -- Limited_View Node23
214 -- Packed_Array_Type Node23
215 -- Protection_Object Node23
216 -- Stored_Constraint Elist23
218 -- Related_Expression Node24
220 -- Interface_Alias Node25
221 -- Interfaces Elist25
222 -- Debug_Renaming_Link Node25
223 -- DT_Offset_To_Top_Func Node25
224 -- PPC_Wrapper Node25
225 -- Related_Array_Object Node25
226 -- Static_Predicate List25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Original_Access_Type Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Relative_Deadline_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
242 -- Initialization_Statements Node28
243 -- Underlying_Record_View Node28
245 -- BIP_Initialization_Call Node29
246 -- Subprograms_For_Type Node29
248 -- Corresponding_Equality Node30
249 -- Static_Initialization Node30
251 -- Thunk_Entity Node31
253 -- SPARK_Pragma Node32
255 -- Linker_Section_Pragma Node33
256 -- SPARK_Aux_Pragma Node33
260 -- Import_Pragma Node35
262 ---------------------------------------------
263 -- Usage of Flags in Defining Entity Nodes --
264 ---------------------------------------------
266 -- All flags are unique, there is no overlaying, so each flag is physically
267 -- present in every entity. However, for many of the flags, it only makes
268 -- sense for them to be set true for certain subsets of entity kinds. See
269 -- the spec of Einfo for further details.
272 -- Has_Discriminants Flag5
273 -- Is_Dispatching_Operation Flag6
274 -- Is_Immediately_Visible Flag7
276 -- Is_Potentially_Use_Visible Flag9
280 -- Is_Constrained Flag12
281 -- Is_Generic_Type Flag13
282 -- Depends_On_Private Flag14
284 -- Is_Volatile Flag16
285 -- Is_Internal Flag17
286 -- Has_Delayed_Freeze Flag18
287 -- Is_Abstract_Subprogram Flag19
288 -- Is_Concurrent_Record_Type Flag20
290 -- Has_Master_Entity Flag21
291 -- Needs_No_Actuals Flag22
292 -- Has_Storage_Size_Clause Flag23
293 -- Is_Imported Flag24
294 -- Is_Limited_Record Flag25
295 -- Has_Completion Flag26
296 -- Has_Pragma_Controlled Flag27
297 -- Is_Statically_Allocated Flag28
298 -- Has_Size_Clause Flag29
301 -- Checks_May_Be_Suppressed Flag31
302 -- Kill_Elaboration_Checks Flag32
303 -- Kill_Range_Checks Flag33
304 -- Has_Independent_Components Flag34
305 -- Is_Class_Wide_Equivalent_Type Flag35
306 -- Referenced_As_LHS Flag36
307 -- Is_Known_Non_Null Flag37
308 -- Can_Never_Be_Null Flag38
309 -- Has_Default_Aspect Flag39
310 -- Body_Needed_For_SAL Flag40
312 -- Treat_As_Volatile Flag41
313 -- Is_Controlled Flag42
314 -- Has_Controlled_Component Flag43
316 -- In_Private_Part Flag45
317 -- Has_Alignment_Clause Flag46
319 -- In_Package_Body Flag48
321 -- Delay_Subprogram_Descriptors Flag50
324 -- Is_Entry_Formal Flag52
325 -- Is_Private_Descendant Flag53
326 -- Return_Present Flag54
327 -- Is_Tagged_Type Flag55
328 -- Has_Homonym Flag56
330 -- Non_Binary_Modulus Flag58
331 -- Is_Preelaborated Flag59
332 -- Is_Shared_Passive Flag60
334 -- Is_Remote_Types Flag61
335 -- Is_Remote_Call_Interface Flag62
336 -- Is_Character_Type Flag63
337 -- Is_Intrinsic_Subprogram Flag64
338 -- Has_Record_Rep_Clause Flag65
339 -- Has_Enumeration_Rep_Clause Flag66
340 -- Has_Small_Clause Flag67
341 -- Has_Component_Size_Clause Flag68
342 -- Is_Access_Constant Flag69
343 -- Is_First_Subtype Flag70
345 -- Has_Completion_In_Body Flag71
346 -- Has_Unknown_Discriminants Flag72
347 -- Is_Child_Unit Flag73
348 -- Is_CPP_Class Flag74
349 -- Has_Non_Standard_Rep Flag75
350 -- Is_Constructor Flag76
351 -- Static_Elaboration_Desired Flag77
353 -- Has_All_Calls_Remote Flag79
354 -- Is_Constr_Subt_For_U_Nominal Flag80
356 -- Is_Asynchronous Flag81
357 -- Has_Gigi_Rep_Item Flag82
358 -- Has_Machine_Radix_Clause Flag83
359 -- Machine_Radix_10 Flag84
361 -- Has_Atomic_Components Flag86
362 -- Has_Volatile_Components Flag87
363 -- Discard_Names Flag88
364 -- Is_Interrupt_Handler Flag89
365 -- Returns_By_Ref Flag90
368 -- Size_Known_At_Compile_Time Flag92
369 -- Reverse_Storage_Order Flag93
370 -- Is_Generic_Actual_Type Flag94
371 -- Uses_Sec_Stack Flag95
372 -- Warnings_Off Flag96
373 -- Is_Controlling_Formal Flag97
374 -- Has_Controlling_Result Flag98
375 -- Is_Exported Flag99
376 -- Has_Specified_Layout Flag100
378 -- Has_Nested_Block_With_Handler Flag101
380 -- Is_Completely_Hidden Flag103
381 -- Address_Taken Flag104
382 -- Suppress_Initialization Flag105
383 -- Is_Limited_Composite Flag106
384 -- Is_Private_Composite Flag107
385 -- Default_Expressions_Processed Flag108
386 -- Is_Non_Static_Subtype Flag109
388 -- Is_Formal_Subprogram Flag111
389 -- Is_Renaming_Of_Object Flag112
391 -- Delay_Cleanups Flag114
392 -- Never_Set_In_Source Flag115
393 -- Is_Visible_Lib_Unit Flag116
394 -- Is_Unchecked_Union Flag117
395 -- Is_For_Access_Subtype Flag118
396 -- Has_Convention_Pragma Flag119
397 -- Has_Primitive_Operations Flag120
399 -- Has_Pragma_Pack Flag121
400 -- Is_Bit_Packed_Array Flag122
401 -- Has_Unchecked_Union Flag123
402 -- Is_Eliminated Flag124
403 -- C_Pass_By_Copy Flag125
404 -- Is_Instantiated Flag126
405 -- Is_Valued_Procedure Flag127
406 -- (used for Component_Alignment) Flag128
407 -- (used for Component_Alignment) Flag129
408 -- Is_Generic_Instance Flag130
410 -- No_Pool_Assigned Flag131
411 -- Is_AST_Entry Flag132
412 -- Is_VMS_Exception Flag133
413 -- Is_Optional_Parameter Flag134
414 -- Has_Aliased_Components Flag135
415 -- No_Strict_Aliasing Flag136
416 -- Is_Machine_Code_Subprogram Flag137
417 -- Is_Packed_Array_Type Flag138
418 -- Has_Biased_Representation Flag139
419 -- Has_Complex_Representation Flag140
421 -- Is_Constr_Subt_For_UN_Aliased Flag141
422 -- Has_Missing_Return Flag142
423 -- Has_Recursive_Call Flag143
424 -- Is_Unsigned_Type Flag144
425 -- Strict_Alignment Flag145
426 -- Is_Abstract_Type Flag146
427 -- Needs_Debug_Info Flag147
428 -- Suppress_Elaboration_Warnings Flag148
429 -- Is_Compilation_Unit Flag149
430 -- Has_Pragma_Elaborate_Body Flag150
432 -- Has_Private_Ancestor Flag151
433 -- Entry_Accepted Flag152
434 -- Is_Obsolescent Flag153
435 -- Has_Per_Object_Constraint Flag154
436 -- Has_Private_Declaration Flag155
437 -- Referenced Flag156
438 -- Has_Pragma_Inline Flag157
439 -- Finalize_Storage_Only Flag158
440 -- From_Limited_With Flag159
441 -- Is_Package_Body_Entity Flag160
443 -- Has_Qualified_Name Flag161
444 -- Nonzero_Is_True Flag162
445 -- Is_True_Constant Flag163
446 -- Reverse_Bit_Order Flag164
447 -- Suppress_Style_Checks Flag165
448 -- Debug_Info_Off Flag166
449 -- Sec_Stack_Needed_For_Return Flag167
450 -- Materialize_Entity Flag168
451 -- Has_Pragma_Thread_Local_Storage Flag169
452 -- Is_Known_Valid Flag170
454 -- Is_Hidden_Open_Scope Flag171
455 -- Has_Object_Size_Clause Flag172
456 -- Has_Fully_Qualified_Name Flag173
457 -- Elaboration_Entity_Required Flag174
458 -- Has_Forward_Instantiation Flag175
459 -- Is_Discrim_SO_Function Flag176
460 -- Size_Depends_On_Discriminant Flag177
461 -- Is_Null_Init_Proc Flag178
462 -- Has_Pragma_Pure_Function Flag179
463 -- Has_Pragma_Unreferenced Flag180
465 -- Has_Contiguous_Rep Flag181
466 -- Has_Xref_Entry Flag182
467 -- Must_Be_On_Byte_Boundary Flag183
468 -- Has_Stream_Size_Clause Flag184
469 -- Is_Ada_2005_Only Flag185
470 -- Is_Interface Flag186
471 -- Has_Constrained_Partial_View Flag187
472 -- Uses_Lock_Free Flag188
473 -- Is_Pure_Unit_Access_Type Flag189
474 -- Has_Specified_Stream_Input Flag190
476 -- Has_Specified_Stream_Output Flag191
477 -- Has_Specified_Stream_Read Flag192
478 -- Has_Specified_Stream_Write Flag193
479 -- Is_Local_Anonymous_Access Flag194
480 -- Is_Primitive_Wrapper Flag195
481 -- Was_Hidden Flag196
482 -- Is_Limited_Interface Flag197
483 -- Has_Pragma_Ordered Flag198
484 -- Is_Ada_2012_Only Flag199
486 -- Has_Delayed_Aspects Flag200
487 -- Has_Pragma_No_Inline Flag201
488 -- Itype_Printed Flag202
489 -- Has_Pragma_Pure Flag203
490 -- Is_Known_Null Flag204
491 -- Low_Bound_Tested Flag205
492 -- Is_Visible_Formal Flag206
493 -- Known_To_Have_Preelab_Init Flag207
494 -- Must_Have_Preelab_Init Flag208
495 -- Is_Return_Object Flag209
496 -- Elaborate_Body_Desirable Flag210
498 -- Has_Static_Discriminants Flag211
499 -- Has_Pragma_Unreferenced_Objects Flag212
500 -- Requires_Overriding Flag213
502 -- Has_Up_Level_Access Flag215
503 -- Universal_Aliasing Flag216
504 -- Suppress_Value_Tracking_On_Call Flag217
505 -- Is_Primitive Flag218
506 -- Has_Initial_Value Flag219
507 -- Has_Dispatch_Table Flag220
509 -- Has_Pragma_Preelab_Init Flag221
510 -- Used_As_Generic_Actual Flag222
511 -- Is_Descendent_Of_Address Flag223
514 -- Is_Only_Out_Parameter Flag226
515 -- Referenced_As_Out_Parameter Flag227
516 -- Has_Thunks Flag228
517 -- Can_Use_Internal_Rep Flag229
518 -- Has_Pragma_Inline_Always Flag230
520 -- Renamed_In_Spec Flag231
521 -- Has_Invariants Flag232
522 -- Has_Pragma_Unmodified Flag233
523 -- Is_Dispatch_Table_Entity Flag234
524 -- Is_Trivial_Subprogram Flag235
525 -- Warnings_Off_Used Flag236
526 -- Warnings_Off_Used_Unmodified Flag237
527 -- Warnings_Off_Used_Unreferenced Flag238
528 -- OK_To_Reorder_Components Flag239
529 -- Has_Postconditions Flag240
531 -- Optimize_Alignment_Space Flag241
532 -- Optimize_Alignment_Time Flag242
533 -- Overlays_Constant Flag243
534 -- Is_RACW_Stub_Type Flag244
535 -- Is_Private_Primitive Flag245
536 -- Is_Underlying_Record_View Flag246
537 -- OK_To_Rename Flag247
538 -- Has_Inheritable_Invariants Flag248
539 -- Is_Safe_To_Reevaluate Flag249
540 -- Has_Predicates Flag250
542 -- Has_Implicit_Dereference Flag251
543 -- Is_Processed_Transient Flag252
544 -- Has_Anonymous_Master Flag253
545 -- Is_Implementation_Defined Flag254
546 -- Is_Predicate_Function Flag255
547 -- Is_Predicate_Function_M Flag256
548 -- Is_Invariant_Procedure Flag257
549 -- Has_Dynamic_Predicate_Aspect Flag258
550 -- Has_Static_Predicate_Aspect Flag259
551 -- Has_Loop_Entry_Attributes Flag260
553 -- Has_Delayed_Rep_Aspects Flag261
554 -- May_Inherit_Delayed_Rep_Aspects Flag262
555 -- Has_Visible_Refinement Flag263
556 -- Is_Discriminant_Check_Function Flag264
557 -- SPARK_Pragma_Inherited Flag265
558 -- SPARK_Aux_Pragma_Inherited Flag266
559 -- Has_Shift_Operator Flag267
560 -- Is_Independent Flag268
589 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
591 -----------------------
592 -- Local subprograms --
593 -----------------------
596 (State_Id : Entity_Id;
597 Option_Nam : Name_Id) return Boolean;
598 -- Determine whether abstract state State_Id has particular option denoted
599 -- by the name Option_Nam.
605 function Float_Rep (Id : E) return F is
606 pragma Assert (Is_Floating_Point_Type (Id));
608 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
616 (State_Id : Entity_Id;
617 Option_Nam : Name_Id) return Boolean
619 Decl : constant Node_Id := Parent (State_Id);
624 pragma Assert (Ekind (State_Id) = E_Abstract_State);
626 -- The declaration of abstract states with options appear as an
627 -- extension aggregate. If this is not the case, the option is not
630 if Nkind (Decl) /= N_Extension_Aggregate then
636 Opt := First (Expressions (Decl));
637 while Present (Opt) loop
639 -- Currently the only simple option allowed is External
641 if Nkind (Opt) = N_Identifier
642 and then Chars (Opt) = Name_External
643 and then Chars (Opt) = Option_Nam
651 -- Complex options with various specifiers
653 Opt := First (Component_Associations (Decl));
654 while Present (Opt) loop
655 Opt_Nam := First (Choices (Opt));
657 if Nkind (Opt_Nam) = N_Identifier
658 and then Chars (Opt_Nam) = Option_Nam
669 --------------------------------
670 -- Attribute Access Functions --
671 --------------------------------
673 function Abstract_States (Id : E) return L is
675 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
679 function Accept_Address (Id : E) return L is
684 function Access_Disp_Table (Id : E) return L is
686 pragma Assert (Ekind_In (Id, E_Record_Type,
688 return Elist16 (Implementation_Base_Type (Id));
689 end Access_Disp_Table;
691 function Actual_Subtype (Id : E) return E is
694 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
695 or else Is_Formal (Id));
699 function Address_Taken (Id : E) return B is
704 function Alias (Id : E) return E is
707 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
711 function Alignment (Id : E) return U is
713 pragma Assert (Is_Type (Id)
714 or else Is_Formal (Id)
715 or else Ekind_In (Id, E_Loop_Parameter,
722 function Associated_Formal_Package (Id : E) return E is
724 pragma Assert (Ekind (Id) = E_Package);
726 end Associated_Formal_Package;
728 function Associated_Node_For_Itype (Id : E) return N is
731 end Associated_Node_For_Itype;
733 function Associated_Storage_Pool (Id : E) return E is
735 pragma Assert (Is_Access_Type (Id));
736 return Node22 (Root_Type (Id));
737 end Associated_Storage_Pool;
739 function Barrier_Function (Id : E) return N is
741 pragma Assert (Is_Entry (Id));
743 end Barrier_Function;
745 function Block_Node (Id : E) return N is
747 pragma Assert (Ekind (Id) = E_Block);
751 function Body_Entity (Id : E) return E is
753 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
757 function Body_Needed_For_SAL (Id : E) return B is
760 (Ekind (Id) = E_Package
761 or else Is_Subprogram (Id)
762 or else Is_Generic_Unit (Id));
764 end Body_Needed_For_SAL;
766 function Body_References (Id : E) return L is
768 pragma Assert (Ekind (Id) = E_Abstract_State);
772 function BIP_Initialization_Call (Id : E) return N is
774 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
776 end BIP_Initialization_Call;
778 function C_Pass_By_Copy (Id : E) return B is
780 pragma Assert (Is_Record_Type (Id));
781 return Flag125 (Implementation_Base_Type (Id));
784 function Can_Never_Be_Null (Id : E) return B is
787 end Can_Never_Be_Null;
789 function Checks_May_Be_Suppressed (Id : E) return B is
792 end Checks_May_Be_Suppressed;
794 function Class_Wide_Type (Id : E) return E is
796 pragma Assert (Is_Type (Id));
800 function Cloned_Subtype (Id : E) return E is
802 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
806 function Component_Bit_Offset (Id : E) return U is
808 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
810 end Component_Bit_Offset;
812 function Component_Clause (Id : E) return N is
814 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
816 end Component_Clause;
818 function Component_Size (Id : E) return U is
820 pragma Assert (Is_Array_Type (Id));
821 return Uint22 (Implementation_Base_Type (Id));
824 function Component_Type (Id : E) return E is
826 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
827 return Node20 (Implementation_Base_Type (Id));
830 function Corresponding_Concurrent_Type (Id : E) return E is
832 pragma Assert (Ekind (Id) = E_Record_Type);
834 end Corresponding_Concurrent_Type;
836 function Corresponding_Discriminant (Id : E) return E is
838 pragma Assert (Ekind (Id) = E_Discriminant);
840 end Corresponding_Discriminant;
842 function Corresponding_Equality (Id : E) return E is
845 (Ekind (Id) = E_Function
846 and then not Comes_From_Source (Id)
847 and then Chars (Id) = Name_Op_Ne);
849 end Corresponding_Equality;
851 function Corresponding_Protected_Entry (Id : E) return E is
853 pragma Assert (Ekind (Id) = E_Subprogram_Body);
855 end Corresponding_Protected_Entry;
857 function Corresponding_Record_Type (Id : E) return E is
859 pragma Assert (Is_Concurrent_Type (Id));
861 end Corresponding_Record_Type;
863 function Corresponding_Remote_Type (Id : E) return E is
866 end Corresponding_Remote_Type;
868 function Current_Use_Clause (Id : E) return E is
870 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
872 end Current_Use_Clause;
874 function Current_Value (Id : E) return N is
876 pragma Assert (Ekind (Id) in Object_Kind);
880 function CR_Discriminant (Id : E) return E is
885 function Debug_Info_Off (Id : E) return B is
890 function Debug_Renaming_Link (Id : E) return E is
893 end Debug_Renaming_Link;
895 function Default_Aspect_Component_Value (Id : E) return N is
897 pragma Assert (Is_Array_Type (Id));
898 return Node19 (Base_Type (Id));
899 end Default_Aspect_Component_Value;
901 function Default_Aspect_Value (Id : E) return N is
903 pragma Assert (Is_Scalar_Type (Id));
904 return Node19 (Base_Type (Id));
905 end Default_Aspect_Value;
907 function Default_Expr_Function (Id : E) return E is
909 pragma Assert (Is_Formal (Id));
911 end Default_Expr_Function;
913 function Default_Expressions_Processed (Id : E) return B is
916 end Default_Expressions_Processed;
918 function Default_Value (Id : E) return N is
920 pragma Assert (Is_Formal (Id));
924 function Delay_Cleanups (Id : E) return B is
929 function Delay_Subprogram_Descriptors (Id : E) return B is
932 end Delay_Subprogram_Descriptors;
934 function Delta_Value (Id : E) return R is
936 pragma Assert (Is_Fixed_Point_Type (Id));
940 function Dependent_Instances (Id : E) return L is
942 pragma Assert (Is_Generic_Instance (Id));
944 end Dependent_Instances;
946 function Depends_On_Private (Id : E) return B is
948 pragma Assert (Nkind (Id) in N_Entity);
950 end Depends_On_Private;
952 function Digits_Value (Id : E) return U is
955 (Is_Floating_Point_Type (Id)
956 or else Is_Decimal_Fixed_Point_Type (Id));
960 function Direct_Primitive_Operations (Id : E) return L is
962 pragma Assert (Is_Tagged_Type (Id));
964 end Direct_Primitive_Operations;
966 function Directly_Designated_Type (Id : E) return E is
968 pragma Assert (Is_Access_Type (Id));
970 end Directly_Designated_Type;
972 function Discard_Names (Id : E) return B is
977 function Discriminal (Id : E) return E is
979 pragma Assert (Ekind (Id) = E_Discriminant);
983 function Discriminal_Link (Id : E) return N is
986 end Discriminal_Link;
988 function Discriminant_Checking_Func (Id : E) return E is
990 pragma Assert (Ekind (Id) = E_Component);
992 end Discriminant_Checking_Func;
994 function Discriminant_Constraint (Id : E) return L is
996 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
998 end Discriminant_Constraint;
1000 function Discriminant_Default_Value (Id : E) return N is
1002 pragma Assert (Ekind (Id) = E_Discriminant);
1004 end Discriminant_Default_Value;
1006 function Discriminant_Number (Id : E) return U is
1008 pragma Assert (Ekind (Id) = E_Discriminant);
1010 end Discriminant_Number;
1012 function Dispatch_Table_Wrappers (Id : E) return L is
1014 pragma Assert (Ekind_In (Id, E_Record_Type,
1016 return Elist26 (Implementation_Base_Type (Id));
1017 end Dispatch_Table_Wrappers;
1019 function DT_Entry_Count (Id : E) return U is
1021 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1025 function DT_Offset_To_Top_Func (Id : E) return E is
1027 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1029 end DT_Offset_To_Top_Func;
1031 function DT_Position (Id : E) return U is
1033 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1034 and then Present (DTC_Entity (Id)));
1038 function DTC_Entity (Id : E) return E is
1040 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1044 function Elaborate_Body_Desirable (Id : E) return B is
1046 pragma Assert (Ekind (Id) = E_Package);
1047 return Flag210 (Id);
1048 end Elaborate_Body_Desirable;
1050 function Elaboration_Entity (Id : E) return E is
1055 Ekind (Id) = E_Package
1057 Is_Generic_Unit (Id));
1059 end Elaboration_Entity;
1061 function Elaboration_Entity_Required (Id : E) return B is
1066 Ekind (Id) = E_Package
1068 Is_Generic_Unit (Id));
1069 return Flag174 (Id);
1070 end Elaboration_Entity_Required;
1072 function Encapsulating_State (Id : E) return N is
1074 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1076 end Encapsulating_State;
1078 function Enclosing_Scope (Id : E) return E is
1081 end Enclosing_Scope;
1083 function Entry_Accepted (Id : E) return B is
1085 pragma Assert (Is_Entry (Id));
1086 return Flag152 (Id);
1089 function Entry_Bodies_Array (Id : E) return E is
1092 end Entry_Bodies_Array;
1094 function Entry_Cancel_Parameter (Id : E) return E is
1097 end Entry_Cancel_Parameter;
1099 function Entry_Component (Id : E) return E is
1102 end Entry_Component;
1104 function Entry_Formal (Id : E) return E is
1109 function Entry_Index_Constant (Id : E) return N is
1111 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1113 end Entry_Index_Constant;
1115 function Contract (Id : E) return N is
1118 (Ekind_In (Id, E_Entry,
1125 or else Is_Generic_Subprogram (Id)
1126 or else Is_Subprogram (Id));
1130 function Entry_Parameters_Type (Id : E) return E is
1133 end Entry_Parameters_Type;
1135 function Enum_Pos_To_Rep (Id : E) return E is
1137 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1139 end Enum_Pos_To_Rep;
1141 function Enumeration_Pos (Id : E) return Uint is
1143 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1145 end Enumeration_Pos;
1147 function Enumeration_Rep (Id : E) return U is
1149 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1151 end Enumeration_Rep;
1153 function Enumeration_Rep_Expr (Id : E) return N is
1155 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1157 end Enumeration_Rep_Expr;
1159 function Equivalent_Type (Id : E) return E is
1162 (Ekind_In (Id, E_Class_Wide_Type,
1163 E_Class_Wide_Subtype,
1164 E_Access_Subprogram_Type,
1165 E_Access_Protected_Subprogram_Type,
1166 E_Anonymous_Access_Protected_Subprogram_Type,
1167 E_Access_Subprogram_Type,
1170 end Equivalent_Type;
1172 function Esize (Id : E) return Uint is
1177 function Exception_Code (Id : E) return Uint is
1179 pragma Assert (Ekind (Id) = E_Exception);
1183 function Extra_Accessibility (Id : E) return E is
1186 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1188 end Extra_Accessibility;
1190 function Extra_Accessibility_Of_Result (Id : E) return E is
1192 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1194 end Extra_Accessibility_Of_Result;
1196 function Extra_Constrained (Id : E) return E is
1198 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1200 end Extra_Constrained;
1202 function Extra_Formal (Id : E) return E is
1207 function Extra_Formals (Id : E) return E is
1210 (Is_Overloadable (Id)
1211 or else Ekind_In (Id, E_Entry_Family,
1213 E_Subprogram_Type));
1217 function Can_Use_Internal_Rep (Id : E) return B is
1219 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1220 return Flag229 (Base_Type (Id));
1221 end Can_Use_Internal_Rep;
1223 function Finalization_Master (Id : E) return E is
1225 pragma Assert (Is_Access_Type (Id));
1226 return Node23 (Root_Type (Id));
1227 end Finalization_Master;
1229 function Finalize_Storage_Only (Id : E) return B is
1231 pragma Assert (Is_Type (Id));
1232 return Flag158 (Base_Type (Id));
1233 end Finalize_Storage_Only;
1235 function Finalizer (Id : E) return E is
1237 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1241 function First_Entity (Id : E) return E is
1246 function First_Exit_Statement (Id : E) return N is
1248 pragma Assert (Ekind (Id) = E_Loop);
1250 end First_Exit_Statement;
1252 function First_Index (Id : E) return N is
1254 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1258 function First_Literal (Id : E) return E is
1260 pragma Assert (Is_Enumeration_Type (Id));
1264 function First_Optional_Parameter (Id : E) return E is
1266 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1268 end First_Optional_Parameter;
1270 function First_Private_Entity (Id : E) return E is
1272 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1273 or else Ekind (Id) in Concurrent_Kind);
1275 end First_Private_Entity;
1277 function First_Rep_Item (Id : E) return E is
1282 function Freeze_Node (Id : E) return N is
1287 function From_Limited_With (Id : E) return B is
1289 return Flag159 (Id);
1290 end From_Limited_With;
1292 function Full_View (Id : E) return E is
1294 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1298 function Generic_Homonym (Id : E) return E is
1300 pragma Assert (Ekind (Id) = E_Generic_Package);
1302 end Generic_Homonym;
1304 function Generic_Renamings (Id : E) return L is
1306 return Elist23 (Id);
1307 end Generic_Renamings;
1309 function Handler_Records (Id : E) return S is
1312 end Handler_Records;
1314 function Has_Aliased_Components (Id : E) return B is
1316 return Flag135 (Implementation_Base_Type (Id));
1317 end Has_Aliased_Components;
1319 function Has_Alignment_Clause (Id : E) return B is
1322 end Has_Alignment_Clause;
1324 function Has_All_Calls_Remote (Id : E) return B is
1327 end Has_All_Calls_Remote;
1329 function Has_Anonymous_Master (Id : E) return B is
1332 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1333 return Flag253 (Id);
1334 end Has_Anonymous_Master;
1336 function Has_Atomic_Components (Id : E) return B is
1338 return Flag86 (Implementation_Base_Type (Id));
1339 end Has_Atomic_Components;
1341 function Has_Biased_Representation (Id : E) return B is
1343 return Flag139 (Id);
1344 end Has_Biased_Representation;
1346 function Has_Completion (Id : E) return B is
1351 function Has_Completion_In_Body (Id : E) return B is
1353 pragma Assert (Is_Type (Id));
1355 end Has_Completion_In_Body;
1357 function Has_Complex_Representation (Id : E) return B is
1359 pragma Assert (Is_Type (Id));
1360 return Flag140 (Implementation_Base_Type (Id));
1361 end Has_Complex_Representation;
1363 function Has_Component_Size_Clause (Id : E) return B is
1365 pragma Assert (Is_Array_Type (Id));
1366 return Flag68 (Implementation_Base_Type (Id));
1367 end Has_Component_Size_Clause;
1369 function Has_Constrained_Partial_View (Id : E) return B is
1371 pragma Assert (Is_Type (Id));
1372 return Flag187 (Id);
1373 end Has_Constrained_Partial_View;
1375 function Has_Controlled_Component (Id : E) return B is
1377 return Flag43 (Base_Type (Id));
1378 end Has_Controlled_Component;
1380 function Has_Contiguous_Rep (Id : E) return B is
1382 return Flag181 (Id);
1383 end Has_Contiguous_Rep;
1385 function Has_Controlling_Result (Id : E) return B is
1388 end Has_Controlling_Result;
1390 function Has_Convention_Pragma (Id : E) return B is
1392 return Flag119 (Id);
1393 end Has_Convention_Pragma;
1395 function Has_Default_Aspect (Id : E) return B is
1397 return Flag39 (Base_Type (Id));
1398 end Has_Default_Aspect;
1400 function Has_Delayed_Aspects (Id : E) return B is
1402 pragma Assert (Nkind (Id) in N_Entity);
1403 return Flag200 (Id);
1404 end Has_Delayed_Aspects;
1406 function Has_Delayed_Freeze (Id : E) return B is
1408 pragma Assert (Nkind (Id) in N_Entity);
1410 end Has_Delayed_Freeze;
1412 function Has_Delayed_Rep_Aspects (Id : E) return B is
1414 pragma Assert (Nkind (Id) in N_Entity);
1415 return Flag261 (Id);
1416 end Has_Delayed_Rep_Aspects;
1418 function Has_Discriminants (Id : E) return B is
1420 pragma Assert (Nkind (Id) in N_Entity);
1422 end Has_Discriminants;
1424 function Has_Dispatch_Table (Id : E) return B is
1426 pragma Assert (Is_Tagged_Type (Id));
1427 return Flag220 (Id);
1428 end Has_Dispatch_Table;
1430 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1432 pragma Assert (Is_Type (Id));
1433 return Flag258 (Id);
1434 end Has_Dynamic_Predicate_Aspect;
1436 function Has_Enumeration_Rep_Clause (Id : E) return B is
1438 pragma Assert (Is_Enumeration_Type (Id));
1440 end Has_Enumeration_Rep_Clause;
1442 function Has_Exit (Id : E) return B is
1447 function Has_Forward_Instantiation (Id : E) return B is
1449 return Flag175 (Id);
1450 end Has_Forward_Instantiation;
1452 function Has_Fully_Qualified_Name (Id : E) return B is
1454 return Flag173 (Id);
1455 end Has_Fully_Qualified_Name;
1457 function Has_Gigi_Rep_Item (Id : E) return B is
1460 end Has_Gigi_Rep_Item;
1462 function Has_Homonym (Id : E) return B is
1467 function Has_Implicit_Dereference (Id : E) return B is
1469 return Flag251 (Id);
1470 end Has_Implicit_Dereference;
1472 function Has_Independent_Components (Id : E) return B is
1474 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1475 return Flag34 (Base_Type (Id));
1476 end Has_Independent_Components;
1478 function Has_Inheritable_Invariants (Id : E) return B is
1480 pragma Assert (Is_Type (Id));
1481 return Flag248 (Id);
1482 end Has_Inheritable_Invariants;
1484 function Has_Initial_Value (Id : E) return B is
1486 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1487 return Flag219 (Id);
1488 end Has_Initial_Value;
1490 function Has_Invariants (Id : E) return B is
1492 pragma Assert (Is_Type (Id));
1493 return Flag232 (Id);
1496 function Has_Loop_Entry_Attributes (Id : E) return B is
1498 pragma Assert (Ekind (Id) = E_Loop);
1499 return Flag260 (Id);
1500 end Has_Loop_Entry_Attributes;
1502 function Has_Machine_Radix_Clause (Id : E) return B is
1504 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1506 end Has_Machine_Radix_Clause;
1508 function Has_Master_Entity (Id : E) return B is
1511 end Has_Master_Entity;
1513 function Has_Missing_Return (Id : E) return B is
1515 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1516 return Flag142 (Id);
1517 end Has_Missing_Return;
1519 function Has_Nested_Block_With_Handler (Id : E) return B is
1521 return Flag101 (Id);
1522 end Has_Nested_Block_With_Handler;
1524 function Has_Non_Standard_Rep (Id : E) return B is
1526 return Flag75 (Implementation_Base_Type (Id));
1527 end Has_Non_Standard_Rep;
1529 function Has_Object_Size_Clause (Id : E) return B is
1531 pragma Assert (Is_Type (Id));
1532 return Flag172 (Id);
1533 end Has_Object_Size_Clause;
1535 function Has_Per_Object_Constraint (Id : E) return B is
1537 return Flag154 (Id);
1538 end Has_Per_Object_Constraint;
1540 function Has_Postconditions (Id : E) return B is
1542 pragma Assert (Is_Subprogram (Id));
1543 return Flag240 (Id);
1544 end Has_Postconditions;
1546 function Has_Pragma_Controlled (Id : E) return B is
1548 pragma Assert (Is_Access_Type (Id));
1549 return Flag27 (Implementation_Base_Type (Id));
1550 end Has_Pragma_Controlled;
1552 function Has_Pragma_Elaborate_Body (Id : E) return B is
1554 return Flag150 (Id);
1555 end Has_Pragma_Elaborate_Body;
1557 function Has_Pragma_Inline (Id : E) return B is
1559 return Flag157 (Id);
1560 end Has_Pragma_Inline;
1562 function Has_Pragma_Inline_Always (Id : E) return B is
1564 return Flag230 (Id);
1565 end Has_Pragma_Inline_Always;
1567 function Has_Pragma_No_Inline (Id : E) return B is
1569 return Flag201 (Id);
1570 end Has_Pragma_No_Inline;
1572 function Has_Pragma_Ordered (Id : E) return B is
1574 pragma Assert (Is_Enumeration_Type (Id));
1575 return Flag198 (Implementation_Base_Type (Id));
1576 end Has_Pragma_Ordered;
1578 function Has_Pragma_Pack (Id : E) return B is
1580 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1581 return Flag121 (Implementation_Base_Type (Id));
1582 end Has_Pragma_Pack;
1584 function Has_Pragma_Preelab_Init (Id : E) return B is
1586 return Flag221 (Id);
1587 end Has_Pragma_Preelab_Init;
1589 function Has_Pragma_Pure (Id : E) return B is
1591 return Flag203 (Id);
1592 end Has_Pragma_Pure;
1594 function Has_Pragma_Pure_Function (Id : E) return B is
1596 return Flag179 (Id);
1597 end Has_Pragma_Pure_Function;
1599 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1601 return Flag169 (Id);
1602 end Has_Pragma_Thread_Local_Storage;
1604 function Has_Pragma_Unmodified (Id : E) return B is
1606 return Flag233 (Id);
1607 end Has_Pragma_Unmodified;
1609 function Has_Pragma_Unreferenced (Id : E) return B is
1611 return Flag180 (Id);
1612 end Has_Pragma_Unreferenced;
1614 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1616 pragma Assert (Is_Type (Id));
1617 return Flag212 (Id);
1618 end Has_Pragma_Unreferenced_Objects;
1620 function Has_Predicates (Id : E) return B is
1622 pragma Assert (Is_Type (Id));
1623 return Flag250 (Id);
1626 function Has_Primitive_Operations (Id : E) return B is
1628 pragma Assert (Is_Type (Id));
1629 return Flag120 (Base_Type (Id));
1630 end Has_Primitive_Operations;
1632 function Has_Private_Ancestor (Id : E) return B is
1634 return Flag151 (Id);
1635 end Has_Private_Ancestor;
1637 function Has_Private_Declaration (Id : E) return B is
1639 return Flag155 (Id);
1640 end Has_Private_Declaration;
1642 function Has_Qualified_Name (Id : E) return B is
1644 return Flag161 (Id);
1645 end Has_Qualified_Name;
1647 function Has_RACW (Id : E) return B is
1649 pragma Assert (Ekind (Id) = E_Package);
1650 return Flag214 (Id);
1653 function Has_Record_Rep_Clause (Id : E) return B is
1655 pragma Assert (Is_Record_Type (Id));
1656 return Flag65 (Implementation_Base_Type (Id));
1657 end Has_Record_Rep_Clause;
1659 function Has_Recursive_Call (Id : E) return B is
1661 pragma Assert (Is_Subprogram (Id));
1662 return Flag143 (Id);
1663 end Has_Recursive_Call;
1665 function Has_Shift_Operator (Id : E) return B is
1667 pragma Assert (Is_Integer_Type (Id));
1668 return Flag267 (Base_Type (Id));
1669 end Has_Shift_Operator;
1671 function Has_Size_Clause (Id : E) return B is
1674 end Has_Size_Clause;
1676 function Has_Small_Clause (Id : E) return B is
1679 end Has_Small_Clause;
1681 function Has_Specified_Layout (Id : E) return B is
1683 pragma Assert (Is_Type (Id));
1684 return Flag100 (Implementation_Base_Type (Id));
1685 end Has_Specified_Layout;
1687 function Has_Specified_Stream_Input (Id : E) return B is
1689 pragma Assert (Is_Type (Id));
1690 return Flag190 (Id);
1691 end Has_Specified_Stream_Input;
1693 function Has_Specified_Stream_Output (Id : E) return B is
1695 pragma Assert (Is_Type (Id));
1696 return Flag191 (Id);
1697 end Has_Specified_Stream_Output;
1699 function Has_Specified_Stream_Read (Id : E) return B is
1701 pragma Assert (Is_Type (Id));
1702 return Flag192 (Id);
1703 end Has_Specified_Stream_Read;
1705 function Has_Specified_Stream_Write (Id : E) return B is
1707 pragma Assert (Is_Type (Id));
1708 return Flag193 (Id);
1709 end Has_Specified_Stream_Write;
1711 function Has_Static_Discriminants (Id : E) return B is
1713 pragma Assert (Is_Type (Id));
1714 return Flag211 (Id);
1715 end Has_Static_Discriminants;
1717 function Has_Static_Predicate_Aspect (Id : E) return B is
1719 pragma Assert (Is_Type (Id));
1720 return Flag259 (Id);
1721 end Has_Static_Predicate_Aspect;
1723 function Has_Storage_Size_Clause (Id : E) return B is
1725 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1726 return Flag23 (Implementation_Base_Type (Id));
1727 end Has_Storage_Size_Clause;
1729 function Has_Stream_Size_Clause (Id : E) return B is
1731 return Flag184 (Id);
1732 end Has_Stream_Size_Clause;
1734 function Has_Task (Id : E) return B is
1736 return Flag30 (Base_Type (Id));
1739 function Has_Thunks (Id : E) return B is
1741 return Flag228 (Id);
1744 function Has_Unchecked_Union (Id : E) return B is
1746 return Flag123 (Base_Type (Id));
1747 end Has_Unchecked_Union;
1749 function Has_Unknown_Discriminants (Id : E) return B is
1751 pragma Assert (Is_Type (Id));
1753 end Has_Unknown_Discriminants;
1755 function Has_Up_Level_Access (Id : E) return B is
1758 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1759 return Flag215 (Id);
1760 end Has_Up_Level_Access;
1762 function Has_Visible_Refinement (Id : E) return B is
1764 pragma Assert (Ekind (Id) = E_Abstract_State);
1765 return Flag263 (Id);
1766 end Has_Visible_Refinement;
1768 function Has_Volatile_Components (Id : E) return B is
1770 return Flag87 (Implementation_Base_Type (Id));
1771 end Has_Volatile_Components;
1773 function Has_Xref_Entry (Id : E) return B is
1775 return Flag182 (Id);
1778 function Hiding_Loop_Variable (Id : E) return E is
1780 pragma Assert (Ekind (Id) = E_Variable);
1782 end Hiding_Loop_Variable;
1784 function Homonym (Id : E) return E is
1789 function Import_Pragma (Id : E) return E is
1791 pragma Assert (Is_Subprogram (Id));
1795 function Interface_Alias (Id : E) return E is
1797 pragma Assert (Is_Subprogram (Id));
1799 end Interface_Alias;
1801 function Interfaces (Id : E) return L is
1803 pragma Assert (Is_Record_Type (Id));
1804 return Elist25 (Id);
1807 function In_Package_Body (Id : E) return B is
1810 end In_Package_Body;
1812 function In_Private_Part (Id : E) return B is
1815 end In_Private_Part;
1817 function In_Use (Id : E) return B is
1819 pragma Assert (Nkind (Id) in N_Entity);
1823 function Initialization_Statements (Id : E) return N is
1825 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1827 end Initialization_Statements;
1829 function Inner_Instances (Id : E) return L is
1831 return Elist23 (Id);
1832 end Inner_Instances;
1834 function Interface_Name (Id : E) return N is
1839 function Is_Abstract_Subprogram (Id : E) return B is
1841 pragma Assert (Is_Overloadable (Id));
1843 end Is_Abstract_Subprogram;
1845 function Is_Abstract_Type (Id : E) return B is
1847 pragma Assert (Is_Type (Id));
1848 return Flag146 (Id);
1849 end Is_Abstract_Type;
1851 function Is_Local_Anonymous_Access (Id : E) return B is
1853 pragma Assert (Is_Access_Type (Id));
1854 return Flag194 (Id);
1855 end Is_Local_Anonymous_Access;
1857 function Is_Access_Constant (Id : E) return B is
1859 pragma Assert (Is_Access_Type (Id));
1861 end Is_Access_Constant;
1863 function Is_Ada_2005_Only (Id : E) return B is
1865 return Flag185 (Id);
1866 end Is_Ada_2005_Only;
1868 function Is_Ada_2012_Only (Id : E) return B is
1870 return Flag199 (Id);
1871 end Is_Ada_2012_Only;
1873 function Is_Aliased (Id : E) return B is
1875 pragma Assert (Nkind (Id) in N_Entity);
1879 function Is_AST_Entry (Id : E) return B is
1881 pragma Assert (Is_Entry (Id));
1882 return Flag132 (Id);
1885 function Is_Asynchronous (Id : E) return B is
1887 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1889 end Is_Asynchronous;
1891 function Is_Atomic (Id : E) return B is
1896 function Is_Bit_Packed_Array (Id : E) return B is
1898 return Flag122 (Implementation_Base_Type (Id));
1899 end Is_Bit_Packed_Array;
1901 function Is_Called (Id : E) return B is
1903 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1904 return Flag102 (Id);
1907 function Is_Character_Type (Id : E) return B is
1910 end Is_Character_Type;
1912 function Is_Child_Unit (Id : E) return B is
1917 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1920 end Is_Class_Wide_Equivalent_Type;
1922 function Is_Compilation_Unit (Id : E) return B is
1924 return Flag149 (Id);
1925 end Is_Compilation_Unit;
1927 function Is_Completely_Hidden (Id : E) return B is
1929 pragma Assert (Ekind (Id) = E_Discriminant);
1930 return Flag103 (Id);
1931 end Is_Completely_Hidden;
1933 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1936 end Is_Constr_Subt_For_U_Nominal;
1938 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1940 return Flag141 (Id);
1941 end Is_Constr_Subt_For_UN_Aliased;
1943 function Is_Constrained (Id : E) return B is
1945 pragma Assert (Nkind (Id) in N_Entity);
1949 function Is_Constructor (Id : E) return B is
1954 function Is_Controlled (Id : E) return B is
1956 return Flag42 (Base_Type (Id));
1959 function Is_Controlling_Formal (Id : E) return B is
1961 pragma Assert (Is_Formal (Id));
1963 end Is_Controlling_Formal;
1965 function Is_CPP_Class (Id : E) return B is
1970 function Is_Descendent_Of_Address (Id : E) return B is
1972 return Flag223 (Id);
1973 end Is_Descendent_Of_Address;
1975 function Is_Discrim_SO_Function (Id : E) return B is
1977 return Flag176 (Id);
1978 end Is_Discrim_SO_Function;
1980 function Is_Discriminant_Check_Function (Id : E) return B is
1982 return Flag264 (Id);
1983 end Is_Discriminant_Check_Function;
1985 function Is_Dispatch_Table_Entity (Id : E) return B is
1987 return Flag234 (Id);
1988 end Is_Dispatch_Table_Entity;
1990 function Is_Dispatching_Operation (Id : E) return B is
1992 pragma Assert (Nkind (Id) in N_Entity);
1994 end Is_Dispatching_Operation;
1996 function Is_Eliminated (Id : E) return B is
1998 return Flag124 (Id);
2001 function Is_Entry_Formal (Id : E) return B is
2004 end Is_Entry_Formal;
2006 function Is_Exported (Id : E) return B is
2011 function Is_First_Subtype (Id : E) return B is
2014 end Is_First_Subtype;
2016 function Is_For_Access_Subtype (Id : E) return B is
2018 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2019 return Flag118 (Id);
2020 end Is_For_Access_Subtype;
2022 function Is_Formal_Subprogram (Id : E) return B is
2024 return Flag111 (Id);
2025 end Is_Formal_Subprogram;
2027 function Is_Frozen (Id : E) return B is
2032 function Is_Generic_Actual_Type (Id : E) return B is
2034 pragma Assert (Is_Type (Id));
2036 end Is_Generic_Actual_Type;
2038 function Is_Generic_Instance (Id : E) return B is
2040 return Flag130 (Id);
2041 end Is_Generic_Instance;
2043 function Is_Generic_Type (Id : E) return B is
2045 pragma Assert (Nkind (Id) in N_Entity);
2047 end Is_Generic_Type;
2049 function Is_Hidden (Id : E) return B is
2054 function Is_Hidden_Open_Scope (Id : E) return B is
2056 return Flag171 (Id);
2057 end Is_Hidden_Open_Scope;
2059 function Is_Immediately_Visible (Id : E) return B is
2061 pragma Assert (Nkind (Id) in N_Entity);
2063 end Is_Immediately_Visible;
2065 function Is_Implementation_Defined (Id : E) return B is
2067 return Flag254 (Id);
2068 end Is_Implementation_Defined;
2070 function Is_Imported (Id : E) return B is
2075 function Is_Independent (Id : E) return B is
2077 pragma Assert (Ekind (Id) = E_Component);
2078 return Flag268 (Id);
2081 function Is_Inlined (Id : E) return B is
2086 function Is_Interface (Id : E) return B is
2088 return Flag186 (Id);
2091 function Is_Instantiated (Id : E) return B is
2093 return Flag126 (Id);
2094 end Is_Instantiated;
2096 function Is_Internal (Id : E) return B is
2098 pragma Assert (Nkind (Id) in N_Entity);
2102 function Is_Interrupt_Handler (Id : E) return B is
2104 pragma Assert (Nkind (Id) in N_Entity);
2106 end Is_Interrupt_Handler;
2108 function Is_Intrinsic_Subprogram (Id : E) return B is
2111 end Is_Intrinsic_Subprogram;
2113 function Is_Invariant_Procedure (Id : E) return B is
2115 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2116 return Flag257 (Id);
2117 end Is_Invariant_Procedure;
2119 function Is_Itype (Id : E) return B is
2124 function Is_Known_Non_Null (Id : E) return B is
2127 end Is_Known_Non_Null;
2129 function Is_Known_Null (Id : E) return B is
2131 return Flag204 (Id);
2134 function Is_Known_Valid (Id : E) return B is
2136 return Flag170 (Id);
2139 function Is_Limited_Composite (Id : E) return B is
2141 return Flag106 (Id);
2142 end Is_Limited_Composite;
2144 function Is_Limited_Interface (Id : E) return B is
2146 return Flag197 (Id);
2147 end Is_Limited_Interface;
2149 function Is_Limited_Record (Id : E) return B is
2152 end Is_Limited_Record;
2154 function Is_Machine_Code_Subprogram (Id : E) return B is
2156 pragma Assert (Is_Subprogram (Id));
2157 return Flag137 (Id);
2158 end Is_Machine_Code_Subprogram;
2160 function Is_Non_Static_Subtype (Id : E) return B is
2162 pragma Assert (Is_Type (Id));
2163 return Flag109 (Id);
2164 end Is_Non_Static_Subtype;
2166 function Is_Null_Init_Proc (Id : E) return B is
2168 pragma Assert (Ekind (Id) = E_Procedure);
2169 return Flag178 (Id);
2170 end Is_Null_Init_Proc;
2172 function Is_Obsolescent (Id : E) return B is
2174 return Flag153 (Id);
2177 function Is_Only_Out_Parameter (Id : E) return B is
2179 pragma Assert (Is_Formal (Id));
2180 return Flag226 (Id);
2181 end Is_Only_Out_Parameter;
2183 function Is_Optional_Parameter (Id : E) return B is
2185 pragma Assert (Is_Formal (Id));
2186 return Flag134 (Id);
2187 end Is_Optional_Parameter;
2189 function Is_Package_Body_Entity (Id : E) return B is
2191 return Flag160 (Id);
2192 end Is_Package_Body_Entity;
2194 function Is_Packed (Id : E) return B is
2196 return Flag51 (Implementation_Base_Type (Id));
2199 function Is_Packed_Array_Type (Id : E) return B is
2201 return Flag138 (Id);
2202 end Is_Packed_Array_Type;
2204 function Is_Potentially_Use_Visible (Id : E) return B is
2206 pragma Assert (Nkind (Id) in N_Entity);
2208 end Is_Potentially_Use_Visible;
2210 function Is_Predicate_Function (Id : E) return B is
2212 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2213 return Flag255 (Id);
2214 end Is_Predicate_Function;
2216 function Is_Predicate_Function_M (Id : E) return B is
2218 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2219 return Flag256 (Id);
2220 end Is_Predicate_Function_M;
2222 function Is_Preelaborated (Id : E) return B is
2225 end Is_Preelaborated;
2227 function Is_Primitive (Id : E) return B is
2230 (Is_Overloadable (Id)
2231 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2232 return Flag218 (Id);
2235 function Is_Primitive_Wrapper (Id : E) return B is
2237 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2238 return Flag195 (Id);
2239 end Is_Primitive_Wrapper;
2241 function Is_Private_Composite (Id : E) return B is
2243 pragma Assert (Is_Type (Id));
2244 return Flag107 (Id);
2245 end Is_Private_Composite;
2247 function Is_Private_Descendant (Id : E) return B is
2250 end Is_Private_Descendant;
2252 function Is_Private_Primitive (Id : E) return B is
2254 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2255 return Flag245 (Id);
2256 end Is_Private_Primitive;
2258 function Is_Processed_Transient (Id : E) return B is
2260 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2261 return Flag252 (Id);
2262 end Is_Processed_Transient;
2264 function Is_Public (Id : E) return B is
2266 pragma Assert (Nkind (Id) in N_Entity);
2270 function Is_Pure (Id : E) return B is
2275 function Is_Pure_Unit_Access_Type (Id : E) return B is
2277 pragma Assert (Is_Access_Type (Id));
2278 return Flag189 (Id);
2279 end Is_Pure_Unit_Access_Type;
2281 function Is_RACW_Stub_Type (Id : E) return B is
2283 pragma Assert (Is_Type (Id));
2284 return Flag244 (Id);
2285 end Is_RACW_Stub_Type;
2287 function Is_Raised (Id : E) return B is
2289 pragma Assert (Ekind (Id) = E_Exception);
2290 return Flag224 (Id);
2293 function Is_Remote_Call_Interface (Id : E) return B is
2296 end Is_Remote_Call_Interface;
2298 function Is_Remote_Types (Id : E) return B is
2301 end Is_Remote_Types;
2303 function Is_Renaming_Of_Object (Id : E) return B is
2305 return Flag112 (Id);
2306 end Is_Renaming_Of_Object;
2308 function Is_Return_Object (Id : E) return B is
2310 return Flag209 (Id);
2311 end Is_Return_Object;
2313 function Is_Safe_To_Reevaluate (Id : E) return B is
2315 return Flag249 (Id);
2316 end Is_Safe_To_Reevaluate;
2318 function Is_Shared_Passive (Id : E) return B is
2321 end Is_Shared_Passive;
2323 function Is_Statically_Allocated (Id : E) return B is
2326 end Is_Statically_Allocated;
2328 function Is_Tag (Id : E) return B is
2330 pragma Assert (Nkind (Id) in N_Entity);
2334 function Is_Tagged_Type (Id : E) return B is
2339 function Is_Thunk (Id : E) return B is
2341 return Flag225 (Id);
2344 function Is_Trivial_Subprogram (Id : E) return B is
2346 return Flag235 (Id);
2347 end Is_Trivial_Subprogram;
2349 function Is_True_Constant (Id : E) return B is
2351 return Flag163 (Id);
2352 end Is_True_Constant;
2354 function Is_Unchecked_Union (Id : E) return B is
2356 return Flag117 (Implementation_Base_Type (Id));
2357 end Is_Unchecked_Union;
2359 function Is_Underlying_Record_View (Id : E) return B is
2361 return Flag246 (Id);
2362 end Is_Underlying_Record_View;
2364 function Is_Unsigned_Type (Id : E) return B is
2366 pragma Assert (Is_Type (Id));
2367 return Flag144 (Id);
2368 end Is_Unsigned_Type;
2370 function Is_Valued_Procedure (Id : E) return B is
2372 pragma Assert (Ekind (Id) = E_Procedure);
2373 return Flag127 (Id);
2374 end Is_Valued_Procedure;
2376 function Is_Visible_Formal (Id : E) return B is
2378 return Flag206 (Id);
2379 end Is_Visible_Formal;
2381 function Is_Visible_Lib_Unit (Id : E) return B is
2383 return Flag116 (Id);
2384 end Is_Visible_Lib_Unit;
2386 function Is_VMS_Exception (Id : E) return B is
2388 return Flag133 (Id);
2389 end Is_VMS_Exception;
2391 function Is_Volatile (Id : E) return B is
2393 pragma Assert (Nkind (Id) in N_Entity);
2395 if Is_Type (Id) then
2396 return Flag16 (Base_Type (Id));
2402 function Itype_Printed (Id : E) return B is
2404 pragma Assert (Is_Itype (Id));
2405 return Flag202 (Id);
2408 function Kill_Elaboration_Checks (Id : E) return B is
2411 end Kill_Elaboration_Checks;
2413 function Kill_Range_Checks (Id : E) return B is
2416 end Kill_Range_Checks;
2418 function Known_To_Have_Preelab_Init (Id : E) return B is
2420 pragma Assert (Is_Type (Id));
2421 return Flag207 (Id);
2422 end Known_To_Have_Preelab_Init;
2424 function Last_Aggregate_Assignment (Id : E) return N is
2426 pragma Assert (Ekind (Id) = E_Variable);
2428 end Last_Aggregate_Assignment;
2430 function Last_Assignment (Id : E) return N is
2432 pragma Assert (Is_Assignable (Id));
2434 end Last_Assignment;
2436 function Last_Entity (Id : E) return E is
2441 function Limited_View (Id : E) return E is
2443 pragma Assert (Ekind (Id) = E_Package);
2447 function Linker_Section_Pragma (Id : E) return N is
2450 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2452 end Linker_Section_Pragma;
2454 function Lit_Indexes (Id : E) return E is
2456 pragma Assert (Is_Enumeration_Type (Id));
2460 function Lit_Strings (Id : E) return E is
2462 pragma Assert (Is_Enumeration_Type (Id));
2466 function Low_Bound_Tested (Id : E) return B is
2468 return Flag205 (Id);
2469 end Low_Bound_Tested;
2471 function Machine_Radix_10 (Id : E) return B is
2473 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2475 end Machine_Radix_10;
2477 function Master_Id (Id : E) return E is
2479 pragma Assert (Is_Access_Type (Id));
2483 function Materialize_Entity (Id : E) return B is
2485 return Flag168 (Id);
2486 end Materialize_Entity;
2488 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2490 return Flag262 (Id);
2491 end May_Inherit_Delayed_Rep_Aspects;
2493 function Mechanism (Id : E) return M is
2495 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2496 return UI_To_Int (Uint8 (Id));
2499 function Modulus (Id : E) return Uint is
2501 pragma Assert (Is_Modular_Integer_Type (Id));
2502 return Uint17 (Base_Type (Id));
2505 function Must_Be_On_Byte_Boundary (Id : E) return B is
2507 pragma Assert (Is_Type (Id));
2508 return Flag183 (Id);
2509 end Must_Be_On_Byte_Boundary;
2511 function Must_Have_Preelab_Init (Id : E) return B is
2513 pragma Assert (Is_Type (Id));
2514 return Flag208 (Id);
2515 end Must_Have_Preelab_Init;
2517 function Needs_Debug_Info (Id : E) return B is
2519 return Flag147 (Id);
2520 end Needs_Debug_Info;
2522 function Needs_No_Actuals (Id : E) return B is
2525 (Is_Overloadable (Id)
2526 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2528 end Needs_No_Actuals;
2530 function Never_Set_In_Source (Id : E) return B is
2532 return Flag115 (Id);
2533 end Never_Set_In_Source;
2535 function Next_Inlined_Subprogram (Id : E) return E is
2538 end Next_Inlined_Subprogram;
2540 function No_Pool_Assigned (Id : E) return B is
2542 pragma Assert (Is_Access_Type (Id));
2543 return Flag131 (Root_Type (Id));
2544 end No_Pool_Assigned;
2546 function No_Return (Id : E) return B is
2548 return Flag113 (Id);
2551 function No_Strict_Aliasing (Id : E) return B is
2553 pragma Assert (Is_Access_Type (Id));
2554 return Flag136 (Base_Type (Id));
2555 end No_Strict_Aliasing;
2557 function Non_Binary_Modulus (Id : E) return B is
2559 pragma Assert (Is_Type (Id));
2560 return Flag58 (Base_Type (Id));
2561 end Non_Binary_Modulus;
2563 function Non_Limited_View (Id : E) return E is
2566 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2568 end Non_Limited_View;
2570 function Nonzero_Is_True (Id : E) return B is
2572 pragma Assert (Root_Type (Id) = Standard_Boolean);
2573 return Flag162 (Base_Type (Id));
2574 end Nonzero_Is_True;
2576 function Normalized_First_Bit (Id : E) return U is
2578 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2580 end Normalized_First_Bit;
2582 function Normalized_Position (Id : E) return U is
2584 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2586 end Normalized_Position;
2588 function Normalized_Position_Max (Id : E) return U is
2590 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2592 end Normalized_Position_Max;
2594 function OK_To_Rename (Id : E) return B is
2596 pragma Assert (Ekind (Id) = E_Variable);
2597 return Flag247 (Id);
2600 function OK_To_Reorder_Components (Id : E) return B is
2602 pragma Assert (Is_Record_Type (Id));
2603 return Flag239 (Base_Type (Id));
2604 end OK_To_Reorder_Components;
2606 function Optimize_Alignment_Space (Id : E) return B is
2609 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2610 return Flag241 (Id);
2611 end Optimize_Alignment_Space;
2613 function Optimize_Alignment_Time (Id : E) return B is
2616 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2617 return Flag242 (Id);
2618 end Optimize_Alignment_Time;
2620 function Original_Access_Type (Id : E) return E is
2622 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2624 end Original_Access_Type;
2626 function Original_Array_Type (Id : E) return E is
2628 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2630 end Original_Array_Type;
2632 function Original_Record_Component (Id : E) return E is
2634 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2636 end Original_Record_Component;
2638 function Overlays_Constant (Id : E) return B is
2640 return Flag243 (Id);
2641 end Overlays_Constant;
2643 function Overridden_Operation (Id : E) return E is
2646 end Overridden_Operation;
2648 function Package_Instantiation (Id : E) return N is
2650 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2652 end Package_Instantiation;
2654 function Packed_Array_Type (Id : E) return E is
2656 pragma Assert (Is_Array_Type (Id));
2658 end Packed_Array_Type;
2660 function Parent_Subtype (Id : E) return E is
2662 pragma Assert (Is_Record_Type (Id));
2663 return Node19 (Base_Type (Id));
2666 function Part_Of_Constituents (Id : E) return L is
2668 pragma Assert (Ekind (Id) = E_Abstract_State);
2670 end Part_Of_Constituents;
2672 function Postcondition_Proc (Id : E) return E is
2674 pragma Assert (Ekind (Id) = E_Procedure);
2676 end Postcondition_Proc;
2678 function PPC_Wrapper (Id : E) return E is
2680 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2684 function Prival (Id : E) return E is
2686 pragma Assert (Is_Protected_Component (Id));
2690 function Prival_Link (Id : E) return E is
2692 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2696 function Private_Dependents (Id : E) return L is
2698 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2699 return Elist18 (Id);
2700 end Private_Dependents;
2702 function Private_View (Id : E) return N is
2704 pragma Assert (Is_Private_Type (Id));
2708 function Protected_Body_Subprogram (Id : E) return E is
2710 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2712 end Protected_Body_Subprogram;
2714 function Protected_Formal (Id : E) return E is
2716 pragma Assert (Is_Formal (Id));
2718 end Protected_Formal;
2720 function Protection_Object (Id : E) return E is
2723 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2725 end Protection_Object;
2727 function Reachable (Id : E) return B is
2732 function Referenced (Id : E) return B is
2734 return Flag156 (Id);
2737 function Referenced_As_LHS (Id : E) return B is
2740 end Referenced_As_LHS;
2742 function Referenced_As_Out_Parameter (Id : E) return B is
2744 return Flag227 (Id);
2745 end Referenced_As_Out_Parameter;
2747 function Refinement_Constituents (Id : E) return L is
2749 pragma Assert (Ekind (Id) = E_Abstract_State);
2751 end Refinement_Constituents;
2753 function Register_Exception_Call (Id : E) return N is
2755 pragma Assert (Ekind (Id) = E_Exception);
2757 end Register_Exception_Call;
2759 function Related_Array_Object (Id : E) return E is
2761 pragma Assert (Is_Array_Type (Id));
2763 end Related_Array_Object;
2765 function Related_Expression (Id : E) return N is
2767 pragma Assert (Ekind (Id) in Type_Kind
2768 or else Ekind_In (Id, E_Constant, E_Variable));
2770 end Related_Expression;
2772 function Related_Instance (Id : E) return E is
2774 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2776 end Related_Instance;
2778 function Related_Type (Id : E) return E is
2780 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2784 function Relative_Deadline_Variable (Id : E) return E is
2786 pragma Assert (Is_Task_Type (Id));
2787 return Node26 (Implementation_Base_Type (Id));
2788 end Relative_Deadline_Variable;
2790 function Renamed_Entity (Id : E) return N is
2795 function Renamed_In_Spec (Id : E) return B is
2797 pragma Assert (Ekind (Id) = E_Package);
2798 return Flag231 (Id);
2799 end Renamed_In_Spec;
2801 function Renamed_Object (Id : E) return N is
2806 function Renaming_Map (Id : E) return U is
2811 function Requires_Overriding (Id : E) return B is
2813 pragma Assert (Is_Overloadable (Id));
2814 return Flag213 (Id);
2815 end Requires_Overriding;
2817 function Return_Present (Id : E) return B is
2822 function Return_Applies_To (Id : E) return N is
2825 end Return_Applies_To;
2827 function Returns_By_Ref (Id : E) return B is
2832 function Reverse_Bit_Order (Id : E) return B is
2834 pragma Assert (Is_Record_Type (Id));
2835 return Flag164 (Base_Type (Id));
2836 end Reverse_Bit_Order;
2838 function Reverse_Storage_Order (Id : E) return B is
2840 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2841 return Flag93 (Base_Type (Id));
2842 end Reverse_Storage_Order;
2844 function RM_Size (Id : E) return U is
2846 pragma Assert (Is_Type (Id));
2850 function Scalar_Range (Id : E) return N is
2855 function Scale_Value (Id : E) return U is
2860 function Scope_Depth_Value (Id : E) return U is
2863 end Scope_Depth_Value;
2865 function Sec_Stack_Needed_For_Return (Id : E) return B is
2867 return Flag167 (Id);
2868 end Sec_Stack_Needed_For_Return;
2870 function Shadow_Entities (Id : E) return S is
2872 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2874 end Shadow_Entities;
2876 function Shared_Var_Procs_Instance (Id : E) return E is
2878 pragma Assert (Ekind (Id) = E_Variable);
2880 end Shared_Var_Procs_Instance;
2882 function Size_Check_Code (Id : E) return N is
2884 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2886 end Size_Check_Code;
2888 function Size_Depends_On_Discriminant (Id : E) return B is
2890 return Flag177 (Id);
2891 end Size_Depends_On_Discriminant;
2893 function Size_Known_At_Compile_Time (Id : E) return B is
2896 end Size_Known_At_Compile_Time;
2898 function Small_Value (Id : E) return R is
2900 pragma Assert (Is_Fixed_Point_Type (Id));
2901 return Ureal21 (Id);
2904 function SPARK_Aux_Pragma (Id : E) return N is
2907 (Ekind_In (Id, E_Generic_Package, -- package variants
2911 end SPARK_Aux_Pragma;
2913 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2916 (Ekind_In (Id, E_Generic_Package, -- package variants
2919 return Flag266 (Id);
2920 end SPARK_Aux_Pragma_Inherited;
2922 function SPARK_Pragma (Id : E) return N is
2925 (Ekind_In (Id, E_Function, -- subprogram variants
2927 E_Generic_Procedure,
2931 Ekind_In (Id, E_Generic_Package, -- package variants
2937 function SPARK_Pragma_Inherited (Id : E) return B is
2940 (Ekind_In (Id, E_Function, -- subprogram variants
2942 E_Generic_Procedure,
2946 Ekind_In (Id, E_Generic_Package, -- package variants
2949 return Flag265 (Id);
2950 end SPARK_Pragma_Inherited;
2952 function Spec_Entity (Id : E) return E is
2954 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2958 function Static_Predicate (Id : E) return S is
2960 pragma Assert (Is_Discrete_Type (Id));
2962 end Static_Predicate;
2964 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2966 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2968 end Status_Flag_Or_Transient_Decl;
2970 function Storage_Size_Variable (Id : E) return E is
2972 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2973 return Node15 (Implementation_Base_Type (Id));
2974 end Storage_Size_Variable;
2976 function Static_Elaboration_Desired (Id : E) return B is
2978 pragma Assert (Ekind (Id) = E_Package);
2980 end Static_Elaboration_Desired;
2982 function Static_Initialization (Id : E) return N is
2985 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2987 end Static_Initialization;
2989 function Stored_Constraint (Id : E) return L is
2992 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2993 return Elist23 (Id);
2994 end Stored_Constraint;
2996 function Strict_Alignment (Id : E) return B is
2998 return Flag145 (Implementation_Base_Type (Id));
2999 end Strict_Alignment;
3001 function String_Literal_Length (Id : E) return U is
3004 end String_Literal_Length;
3006 function String_Literal_Low_Bound (Id : E) return N is
3009 end String_Literal_Low_Bound;
3011 function Subprograms_For_Type (Id : E) return E is
3013 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3015 end Subprograms_For_Type;
3017 function Suppress_Elaboration_Warnings (Id : E) return B is
3019 return Flag148 (Id);
3020 end Suppress_Elaboration_Warnings;
3022 function Suppress_Initialization (Id : E) return B is
3024 pragma Assert (Is_Type (Id));
3025 return Flag105 (Id);
3026 end Suppress_Initialization;
3028 function Suppress_Style_Checks (Id : E) return B is
3030 return Flag165 (Id);
3031 end Suppress_Style_Checks;
3033 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3035 return Flag217 (Id);
3036 end Suppress_Value_Tracking_On_Call;
3038 function Task_Body_Procedure (Id : E) return N is
3040 pragma Assert (Ekind (Id) in Task_Kind);
3042 end Task_Body_Procedure;
3044 function Thunk_Entity (Id : E) return E is
3046 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3047 and then Is_Thunk (Id));
3051 function Treat_As_Volatile (Id : E) return B is
3054 end Treat_As_Volatile;
3056 function Underlying_Full_View (Id : E) return E is
3058 pragma Assert (Ekind (Id) in Private_Kind);
3060 end Underlying_Full_View;
3062 function Underlying_Record_View (Id : E) return E is
3065 end Underlying_Record_View;
3067 function Universal_Aliasing (Id : E) return B is
3069 pragma Assert (Is_Type (Id));
3070 return Flag216 (Implementation_Base_Type (Id));
3071 end Universal_Aliasing;
3073 function Unset_Reference (Id : E) return N is
3076 end Unset_Reference;
3078 function Used_As_Generic_Actual (Id : E) return B is
3080 return Flag222 (Id);
3081 end Used_As_Generic_Actual;
3083 function Uses_Lock_Free (Id : E) return B is
3085 pragma Assert (Is_Protected_Type (Id));
3086 return Flag188 (Id);
3089 function Uses_Sec_Stack (Id : E) return B is
3094 function Warnings_Off (Id : E) return B is
3099 function Warnings_Off_Used (Id : E) return B is
3101 return Flag236 (Id);
3102 end Warnings_Off_Used;
3104 function Warnings_Off_Used_Unmodified (Id : E) return B is
3106 return Flag237 (Id);
3107 end Warnings_Off_Used_Unmodified;
3109 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3111 return Flag238 (Id);
3112 end Warnings_Off_Used_Unreferenced;
3114 function Wrapped_Entity (Id : E) return E is
3116 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3117 and then Is_Primitive_Wrapper (Id));
3121 function Was_Hidden (Id : E) return B is
3123 return Flag196 (Id);
3126 ------------------------------
3127 -- Classification Functions --
3128 ------------------------------
3130 function Is_Access_Type (Id : E) return B is
3132 return Ekind (Id) in Access_Kind;
3135 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3137 return Ekind (Id) in Access_Protected_Kind;
3138 end Is_Access_Protected_Subprogram_Type;
3140 function Is_Access_Subprogram_Type (Id : E) return B is
3142 return Ekind (Id) in Access_Subprogram_Kind;
3143 end Is_Access_Subprogram_Type;
3145 function Is_Aggregate_Type (Id : E) return B is
3147 return Ekind (Id) in Aggregate_Kind;
3148 end Is_Aggregate_Type;
3150 function Is_Array_Type (Id : E) return B is
3152 return Ekind (Id) in Array_Kind;
3155 function Is_Assignable (Id : E) return B is
3157 return Ekind (Id) in Assignable_Kind;
3160 function Is_Class_Wide_Type (Id : E) return B is
3162 return Ekind (Id) in Class_Wide_Kind;
3163 end Is_Class_Wide_Type;
3165 function Is_Composite_Type (Id : E) return B is
3167 return Ekind (Id) in Composite_Kind;
3168 end Is_Composite_Type;
3170 function Is_Concurrent_Body (Id : E) return B is
3172 return Ekind (Id) in
3173 Concurrent_Body_Kind;
3174 end Is_Concurrent_Body;
3176 function Is_Concurrent_Record_Type (Id : E) return B is
3179 end Is_Concurrent_Record_Type;
3181 function Is_Concurrent_Type (Id : E) return B is
3183 return Ekind (Id) in Concurrent_Kind;
3184 end Is_Concurrent_Type;
3186 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3188 return Ekind (Id) in
3189 Decimal_Fixed_Point_Kind;
3190 end Is_Decimal_Fixed_Point_Type;
3192 function Is_Digits_Type (Id : E) return B is
3194 return Ekind (Id) in Digits_Kind;
3197 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3199 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3200 end Is_Discrete_Or_Fixed_Point_Type;
3202 function Is_Discrete_Type (Id : E) return B is
3204 return Ekind (Id) in Discrete_Kind;
3205 end Is_Discrete_Type;
3207 function Is_Elementary_Type (Id : E) return B is
3209 return Ekind (Id) in Elementary_Kind;
3210 end Is_Elementary_Type;
3212 function Is_Entry (Id : E) return B is
3214 return Ekind (Id) in Entry_Kind;
3217 function Is_Enumeration_Type (Id : E) return B is
3219 return Ekind (Id) in
3221 end Is_Enumeration_Type;
3223 function Is_Fixed_Point_Type (Id : E) return B is
3225 return Ekind (Id) in
3227 end Is_Fixed_Point_Type;
3229 function Is_Floating_Point_Type (Id : E) return B is
3231 return Ekind (Id) in Float_Kind;
3232 end Is_Floating_Point_Type;
3234 function Is_Formal (Id : E) return B is
3236 return Ekind (Id) in Formal_Kind;
3239 function Is_Formal_Object (Id : E) return B is
3241 return Ekind (Id) in Formal_Object_Kind;
3242 end Is_Formal_Object;
3244 function Is_Generic_Subprogram (Id : E) return B is
3246 return Ekind (Id) in Generic_Subprogram_Kind;
3247 end Is_Generic_Subprogram;
3249 function Is_Generic_Unit (Id : E) return B is
3251 return Ekind (Id) in Generic_Unit_Kind;
3252 end Is_Generic_Unit;
3254 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3256 return Ekind (Id) in
3257 Incomplete_Or_Private_Kind;
3258 end Is_Incomplete_Or_Private_Type;
3260 function Is_Incomplete_Type (Id : E) return B is
3262 return Ekind (Id) in
3264 end Is_Incomplete_Type;
3266 function Is_Integer_Type (Id : E) return B is
3268 return Ekind (Id) in Integer_Kind;
3269 end Is_Integer_Type;
3271 function Is_Modular_Integer_Type (Id : E) return B is
3273 return Ekind (Id) in
3274 Modular_Integer_Kind;
3275 end Is_Modular_Integer_Type;
3277 function Is_Named_Number (Id : E) return B is
3279 return Ekind (Id) in Named_Kind;
3280 end Is_Named_Number;
3282 function Is_Numeric_Type (Id : E) return B is
3284 return Ekind (Id) in Numeric_Kind;
3285 end Is_Numeric_Type;
3287 function Is_Object (Id : E) return B is
3289 return Ekind (Id) in Object_Kind;
3292 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3294 return Ekind (Id) in
3295 Ordinary_Fixed_Point_Kind;
3296 end Is_Ordinary_Fixed_Point_Type;
3298 function Is_Overloadable (Id : E) return B is
3300 return Ekind (Id) in Overloadable_Kind;
3301 end Is_Overloadable;
3303 function Is_Private_Type (Id : E) return B is
3305 return Ekind (Id) in Private_Kind;
3306 end Is_Private_Type;
3308 function Is_Protected_Type (Id : E) return B is
3310 return Ekind (Id) in Protected_Kind;
3311 end Is_Protected_Type;
3313 function Is_Real_Type (Id : E) return B is
3315 return Ekind (Id) in Real_Kind;
3318 function Is_Record_Type (Id : E) return B is
3320 return Ekind (Id) in Record_Kind;
3323 function Is_Scalar_Type (Id : E) return B is
3325 return Ekind (Id) in Scalar_Kind;
3328 function Is_Signed_Integer_Type (Id : E) return B is
3330 return Ekind (Id) in Signed_Integer_Kind;
3331 end Is_Signed_Integer_Type;
3333 function Is_Subprogram (Id : E) return B is
3335 return Ekind (Id) in Subprogram_Kind;
3338 function Is_Task_Type (Id : E) return B is
3340 return Ekind (Id) in Task_Kind;
3343 function Is_Type (Id : E) return B is
3345 return Ekind (Id) in Type_Kind;
3348 ------------------------------
3349 -- Attribute Set Procedures --
3350 ------------------------------
3352 -- Note: in many of these set procedures an "obvious" assertion is missing.
3353 -- The reason for this is that in many cases, a field is set before the
3354 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3355 -- it is possible to add assertions that specifically include the E_Void
3356 -- possibility, but in some cases, we just omit the assertions.
3358 procedure Set_Abstract_States (Id : E; V : L) is
3360 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3361 Set_Elist25 (Id, V);
3362 end Set_Abstract_States;
3364 procedure Set_Accept_Address (Id : E; V : L) is
3366 Set_Elist21 (Id, V);
3367 end Set_Accept_Address;
3369 procedure Set_Access_Disp_Table (Id : E; V : L) is
3371 pragma Assert (Ekind (Id) = E_Record_Type
3372 and then Id = Implementation_Base_Type (Id));
3373 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3374 Set_Elist16 (Id, V);
3375 end Set_Access_Disp_Table;
3377 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3380 end Set_Associated_Formal_Package;
3382 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3385 end Set_Associated_Node_For_Itype;
3387 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3389 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3391 end Set_Associated_Storage_Pool;
3393 procedure Set_Actual_Subtype (Id : E; V : E) is
3396 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3397 or else Is_Formal (Id));
3399 end Set_Actual_Subtype;
3401 procedure Set_Address_Taken (Id : E; V : B := True) is
3403 Set_Flag104 (Id, V);
3404 end Set_Address_Taken;
3406 procedure Set_Alias (Id : E; V : E) is
3409 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3413 procedure Set_Alignment (Id : E; V : U) is
3415 pragma Assert (Is_Type (Id)
3416 or else Is_Formal (Id)
3417 or else Ekind_In (Id, E_Loop_Parameter,
3424 procedure Set_Barrier_Function (Id : E; V : N) is
3426 pragma Assert (Is_Entry (Id));
3428 end Set_Barrier_Function;
3430 procedure Set_Block_Node (Id : E; V : N) is
3432 pragma Assert (Ekind (Id) = E_Block);
3436 procedure Set_Body_Entity (Id : E; V : E) is
3438 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3440 end Set_Body_Entity;
3442 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3445 (Ekind (Id) = E_Package
3446 or else Is_Subprogram (Id)
3447 or else Is_Generic_Unit (Id));
3449 end Set_Body_Needed_For_SAL;
3451 procedure Set_Body_References (Id : E; V : L) is
3453 pragma Assert (Ekind (Id) = E_Abstract_State);
3454 Set_Elist16 (Id, V);
3455 end Set_Body_References;
3457 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3459 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3461 end Set_BIP_Initialization_Call;
3463 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3465 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3466 Set_Flag125 (Id, V);
3467 end Set_C_Pass_By_Copy;
3469 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3472 end Set_Can_Never_Be_Null;
3474 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3477 end Set_Checks_May_Be_Suppressed;
3479 procedure Set_Class_Wide_Type (Id : E; V : E) is
3481 pragma Assert (Is_Type (Id));
3483 end Set_Class_Wide_Type;
3485 procedure Set_Cloned_Subtype (Id : E; V : E) is
3487 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3489 end Set_Cloned_Subtype;
3491 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3493 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3495 end Set_Component_Bit_Offset;
3497 procedure Set_Component_Clause (Id : E; V : N) is
3499 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3501 end Set_Component_Clause;
3503 procedure Set_Component_Size (Id : E; V : U) is
3505 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3507 end Set_Component_Size;
3509 procedure Set_Component_Type (Id : E; V : E) is
3511 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3513 end Set_Component_Type;
3515 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3518 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3520 end Set_Corresponding_Concurrent_Type;
3522 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3524 pragma Assert (Ekind (Id) = E_Discriminant);
3526 end Set_Corresponding_Discriminant;
3528 procedure Set_Corresponding_Equality (Id : E; V : E) is
3531 (Ekind (Id) = E_Function
3532 and then not Comes_From_Source (Id)
3533 and then Chars (Id) = Name_Op_Ne);
3535 end Set_Corresponding_Equality;
3537 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3539 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3541 end Set_Corresponding_Protected_Entry;
3543 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3545 pragma Assert (Is_Concurrent_Type (Id));
3547 end Set_Corresponding_Record_Type;
3549 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3552 end Set_Corresponding_Remote_Type;
3554 procedure Set_Current_Use_Clause (Id : E; V : E) is
3556 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3558 end Set_Current_Use_Clause;
3560 procedure Set_Current_Value (Id : E; V : N) is
3562 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3564 end Set_Current_Value;
3566 procedure Set_CR_Discriminant (Id : E; V : E) is
3569 end Set_CR_Discriminant;
3571 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3573 Set_Flag166 (Id, V);
3574 end Set_Debug_Info_Off;
3576 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3579 end Set_Debug_Renaming_Link;
3581 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3583 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3585 end Set_Default_Aspect_Component_Value;
3587 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3589 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3591 end Set_Default_Aspect_Value;
3593 procedure Set_Default_Expr_Function (Id : E; V : E) is
3595 pragma Assert (Is_Formal (Id));
3597 end Set_Default_Expr_Function;
3599 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3601 Set_Flag108 (Id, V);
3602 end Set_Default_Expressions_Processed;
3604 procedure Set_Default_Value (Id : E; V : N) is
3606 pragma Assert (Is_Formal (Id));
3608 end Set_Default_Value;
3610 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3614 or else Is_Task_Type (Id)
3615 or else Ekind (Id) = E_Block);
3616 Set_Flag114 (Id, V);
3617 end Set_Delay_Cleanups;
3619 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3622 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3625 end Set_Delay_Subprogram_Descriptors;
3627 procedure Set_Delta_Value (Id : E; V : R) is
3629 pragma Assert (Is_Fixed_Point_Type (Id));
3630 Set_Ureal18 (Id, V);
3631 end Set_Delta_Value;
3633 procedure Set_Dependent_Instances (Id : E; V : L) is
3635 pragma Assert (Is_Generic_Instance (Id));
3637 end Set_Dependent_Instances;
3639 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3641 pragma Assert (Nkind (Id) in N_Entity);
3643 end Set_Depends_On_Private;
3645 procedure Set_Digits_Value (Id : E; V : U) is
3648 (Is_Floating_Point_Type (Id)
3649 or else Is_Decimal_Fixed_Point_Type (Id));
3651 end Set_Digits_Value;
3653 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3656 end Set_Directly_Designated_Type;
3658 procedure Set_Discard_Names (Id : E; V : B := True) is
3661 end Set_Discard_Names;
3663 procedure Set_Discriminal (Id : E; V : E) is
3665 pragma Assert (Ekind (Id) = E_Discriminant);
3667 end Set_Discriminal;
3669 procedure Set_Discriminal_Link (Id : E; V : E) is
3672 end Set_Discriminal_Link;
3674 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3676 pragma Assert (Ekind (Id) = E_Component);
3678 end Set_Discriminant_Checking_Func;
3680 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3682 pragma Assert (Nkind (Id) in N_Entity);
3683 Set_Elist21 (Id, V);
3684 end Set_Discriminant_Constraint;
3686 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3689 end Set_Discriminant_Default_Value;
3691 procedure Set_Discriminant_Number (Id : E; V : U) is
3694 end Set_Discriminant_Number;
3696 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3698 pragma Assert (Ekind (Id) = E_Record_Type
3699 and then Id = Implementation_Base_Type (Id));
3700 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3701 Set_Elist26 (Id, V);
3702 end Set_Dispatch_Table_Wrappers;
3704 procedure Set_DT_Entry_Count (Id : E; V : U) is
3706 pragma Assert (Ekind (Id) = E_Component);
3708 end Set_DT_Entry_Count;
3710 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3712 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3714 end Set_DT_Offset_To_Top_Func;
3716 procedure Set_DT_Position (Id : E; V : U) is
3718 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3720 end Set_DT_Position;
3722 procedure Set_DTC_Entity (Id : E; V : E) is
3724 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3728 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3730 pragma Assert (Ekind (Id) = E_Package);
3731 Set_Flag210 (Id, V);
3732 end Set_Elaborate_Body_Desirable;
3734 procedure Set_Elaboration_Entity (Id : E; V : E) is
3739 Ekind (Id) = E_Package
3741 Is_Generic_Unit (Id));
3743 end Set_Elaboration_Entity;
3745 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3750 Ekind (Id) = E_Package
3752 Is_Generic_Unit (Id));
3753 Set_Flag174 (Id, V);
3754 end Set_Elaboration_Entity_Required;
3756 procedure Set_Encapsulating_State (Id : E; V : E) is
3758 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3760 end Set_Encapsulating_State;
3762 procedure Set_Enclosing_Scope (Id : E; V : E) is
3765 end Set_Enclosing_Scope;
3767 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3769 pragma Assert (Is_Entry (Id));
3770 Set_Flag152 (Id, V);
3771 end Set_Entry_Accepted;
3773 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3776 end Set_Entry_Bodies_Array;
3778 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3781 end Set_Entry_Cancel_Parameter;
3783 procedure Set_Entry_Component (Id : E; V : E) is
3786 end Set_Entry_Component;
3788 procedure Set_Entry_Formal (Id : E; V : E) is
3791 end Set_Entry_Formal;
3793 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3795 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3797 end Set_Entry_Index_Constant;
3799 procedure Set_Contract (Id : E; V : N) is
3802 (Ekind_In (Id, E_Entry,
3810 or else Is_Generic_Subprogram (Id)
3811 or else Is_Subprogram (Id));
3815 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3818 end Set_Entry_Parameters_Type;
3820 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3822 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3824 end Set_Enum_Pos_To_Rep;
3826 procedure Set_Enumeration_Pos (Id : E; V : U) is
3828 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3830 end Set_Enumeration_Pos;
3832 procedure Set_Enumeration_Rep (Id : E; V : U) is
3834 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3836 end Set_Enumeration_Rep;
3838 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3840 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3842 end Set_Enumeration_Rep_Expr;
3844 procedure Set_Equivalent_Type (Id : E; V : E) is
3847 (Ekind_In (Id, E_Class_Wide_Type,
3848 E_Class_Wide_Subtype,
3849 E_Access_Protected_Subprogram_Type,
3850 E_Anonymous_Access_Protected_Subprogram_Type,
3851 E_Access_Subprogram_Type,
3854 end Set_Equivalent_Type;
3856 procedure Set_Esize (Id : E; V : U) is
3861 procedure Set_Exception_Code (Id : E; V : U) is
3863 pragma Assert (Ekind (Id) = E_Exception);
3865 end Set_Exception_Code;
3867 procedure Set_Extra_Accessibility (Id : E; V : E) is
3870 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3872 end Set_Extra_Accessibility;
3874 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3876 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3878 end Set_Extra_Accessibility_Of_Result;
3880 procedure Set_Extra_Constrained (Id : E; V : E) is
3882 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3884 end Set_Extra_Constrained;
3886 procedure Set_Extra_Formal (Id : E; V : E) is
3889 end Set_Extra_Formal;
3891 procedure Set_Extra_Formals (Id : E; V : E) is
3894 (Is_Overloadable (Id)
3895 or else Ekind_In (Id, E_Entry_Family,
3897 E_Subprogram_Type));
3899 end Set_Extra_Formals;
3901 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3904 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3905 Set_Flag229 (Id, V);
3906 end Set_Can_Use_Internal_Rep;
3908 procedure Set_Finalization_Master (Id : E; V : E) is
3910 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3912 end Set_Finalization_Master;
3914 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3916 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3917 Set_Flag158 (Id, V);
3918 end Set_Finalize_Storage_Only;
3920 procedure Set_Finalizer (Id : E; V : E) is
3922 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3926 procedure Set_First_Entity (Id : E; V : E) is
3929 end Set_First_Entity;
3931 procedure Set_First_Exit_Statement (Id : E; V : N) is
3933 pragma Assert (Ekind (Id) = E_Loop);
3935 end Set_First_Exit_Statement;
3937 procedure Set_First_Index (Id : E; V : N) is
3939 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3941 end Set_First_Index;
3943 procedure Set_First_Literal (Id : E; V : E) is
3945 pragma Assert (Is_Enumeration_Type (Id));
3947 end Set_First_Literal;
3949 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3951 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3953 end Set_First_Optional_Parameter;
3955 procedure Set_First_Private_Entity (Id : E; V : E) is
3957 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3958 or else Ekind (Id) in Concurrent_Kind);
3960 end Set_First_Private_Entity;
3962 procedure Set_First_Rep_Item (Id : E; V : N) is
3965 end Set_First_Rep_Item;
3967 procedure Set_Float_Rep (Id : E; V : F) is
3968 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3970 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3973 procedure Set_Freeze_Node (Id : E; V : N) is
3976 end Set_Freeze_Node;
3978 procedure Set_From_Limited_With (Id : E; V : B := True) is
3981 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3982 Set_Flag159 (Id, V);
3983 end Set_From_Limited_With;
3985 procedure Set_Full_View (Id : E; V : E) is
3987 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3991 procedure Set_Generic_Homonym (Id : E; V : E) is
3994 end Set_Generic_Homonym;
3996 procedure Set_Generic_Renamings (Id : E; V : L) is
3998 Set_Elist23 (Id, V);
3999 end Set_Generic_Renamings;
4001 procedure Set_Handler_Records (Id : E; V : S) is
4004 end Set_Handler_Records;
4006 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4008 pragma Assert (Id = Base_Type (Id));
4009 Set_Flag135 (Id, V);
4010 end Set_Has_Aliased_Components;
4012 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4015 end Set_Has_Alignment_Clause;
4017 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4020 end Set_Has_All_Calls_Remote;
4022 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4025 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4026 Set_Flag253 (Id, V);
4027 end Set_Has_Anonymous_Master;
4029 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4031 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4033 end Set_Has_Atomic_Components;
4035 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4038 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4039 Set_Flag139 (Id, V);
4040 end Set_Has_Biased_Representation;
4042 procedure Set_Has_Completion (Id : E; V : B := True) is
4045 end Set_Has_Completion;
4047 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4049 pragma Assert (Is_Type (Id));
4051 end Set_Has_Completion_In_Body;
4053 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4055 pragma Assert (Ekind (Id) = E_Record_Type);
4056 Set_Flag140 (Id, V);
4057 end Set_Has_Complex_Representation;
4059 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4061 pragma Assert (Ekind (Id) = E_Array_Type);
4063 end Set_Has_Component_Size_Clause;
4065 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4067 pragma Assert (Is_Type (Id));
4068 Set_Flag187 (Id, V);
4069 end Set_Has_Constrained_Partial_View;
4071 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4073 Set_Flag181 (Id, V);
4074 end Set_Has_Contiguous_Rep;
4076 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4078 pragma Assert (Id = Base_Type (Id));
4080 end Set_Has_Controlled_Component;
4082 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4085 end Set_Has_Controlling_Result;
4087 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4089 Set_Flag119 (Id, V);
4090 end Set_Has_Convention_Pragma;
4092 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4095 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4096 and then Is_Base_Type (Id));
4098 end Set_Has_Default_Aspect;
4100 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4102 pragma Assert (Nkind (Id) in N_Entity);
4103 Set_Flag200 (Id, V);
4104 end Set_Has_Delayed_Aspects;
4106 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4108 pragma Assert (Nkind (Id) in N_Entity);
4110 end Set_Has_Delayed_Freeze;
4112 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4114 pragma Assert (Nkind (Id) in N_Entity);
4115 Set_Flag261 (Id, V);
4116 end Set_Has_Delayed_Rep_Aspects;
4118 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4120 pragma Assert (Nkind (Id) in N_Entity);
4122 end Set_Has_Discriminants;
4124 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4126 pragma Assert (Ekind (Id) = E_Record_Type
4127 and then Is_Tagged_Type (Id));
4128 Set_Flag220 (Id, V);
4129 end Set_Has_Dispatch_Table;
4131 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4133 pragma Assert (Is_Type (Id));
4134 Set_Flag258 (Id, V);
4135 end Set_Has_Dynamic_Predicate_Aspect;
4137 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4139 pragma Assert (Is_Enumeration_Type (Id));
4141 end Set_Has_Enumeration_Rep_Clause;
4143 procedure Set_Has_Exit (Id : E; V : B := True) is
4148 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4150 Set_Flag175 (Id, V);
4151 end Set_Has_Forward_Instantiation;
4153 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4155 Set_Flag173 (Id, V);
4156 end Set_Has_Fully_Qualified_Name;
4158 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4161 end Set_Has_Gigi_Rep_Item;
4163 procedure Set_Has_Homonym (Id : E; V : B := True) is
4166 end Set_Has_Homonym;
4168 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4170 Set_Flag251 (Id, V);
4171 end Set_Has_Implicit_Dereference;
4173 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4175 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4176 and then Is_Base_Type (Id));
4178 end Set_Has_Independent_Components;
4180 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4182 pragma Assert (Is_Type (Id));
4183 Set_Flag248 (Id, V);
4184 end Set_Has_Inheritable_Invariants;
4186 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4188 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4189 Set_Flag219 (Id, V);
4190 end Set_Has_Initial_Value;
4192 procedure Set_Has_Invariants (Id : E; V : B := True) is
4194 pragma Assert (Is_Type (Id));
4195 Set_Flag232 (Id, V);
4196 end Set_Has_Invariants;
4198 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4200 pragma Assert (Ekind (Id) = E_Loop);
4201 Set_Flag260 (Id, V);
4202 end Set_Has_Loop_Entry_Attributes;
4204 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4206 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4208 end Set_Has_Machine_Radix_Clause;
4210 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4213 end Set_Has_Master_Entity;
4215 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4217 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4218 Set_Flag142 (Id, V);
4219 end Set_Has_Missing_Return;
4221 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4223 Set_Flag101 (Id, V);
4224 end Set_Has_Nested_Block_With_Handler;
4226 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4228 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4229 Set_Flag215 (Id, V);
4230 end Set_Has_Up_Level_Access;
4232 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4234 pragma Assert (Id = Base_Type (Id));
4236 end Set_Has_Non_Standard_Rep;
4238 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4240 pragma Assert (Is_Type (Id));
4241 Set_Flag172 (Id, V);
4242 end Set_Has_Object_Size_Clause;
4244 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4246 Set_Flag154 (Id, V);
4247 end Set_Has_Per_Object_Constraint;
4249 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4251 pragma Assert (Is_Subprogram (Id));
4252 Set_Flag240 (Id, V);
4253 end Set_Has_Postconditions;
4255 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4257 pragma Assert (Is_Access_Type (Id));
4258 Set_Flag27 (Base_Type (Id), V);
4259 end Set_Has_Pragma_Controlled;
4261 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4263 Set_Flag150 (Id, V);
4264 end Set_Has_Pragma_Elaborate_Body;
4266 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4268 Set_Flag157 (Id, V);
4269 end Set_Has_Pragma_Inline;
4271 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4273 Set_Flag230 (Id, V);
4274 end Set_Has_Pragma_Inline_Always;
4276 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4278 Set_Flag201 (Id, V);
4279 end Set_Has_Pragma_No_Inline;
4281 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4283 pragma Assert (Is_Enumeration_Type (Id));
4284 pragma Assert (Id = Base_Type (Id));
4285 Set_Flag198 (Id, V);
4286 end Set_Has_Pragma_Ordered;
4288 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4290 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4291 pragma Assert (Id = Base_Type (Id));
4292 Set_Flag121 (Id, V);
4293 end Set_Has_Pragma_Pack;
4295 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4297 Set_Flag221 (Id, V);
4298 end Set_Has_Pragma_Preelab_Init;
4300 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4302 Set_Flag203 (Id, V);
4303 end Set_Has_Pragma_Pure;
4305 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4307 Set_Flag179 (Id, V);
4308 end Set_Has_Pragma_Pure_Function;
4310 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4312 Set_Flag169 (Id, V);
4313 end Set_Has_Pragma_Thread_Local_Storage;
4315 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4317 Set_Flag233 (Id, V);
4318 end Set_Has_Pragma_Unmodified;
4320 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4322 Set_Flag180 (Id, V);
4323 end Set_Has_Pragma_Unreferenced;
4325 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4327 pragma Assert (Is_Type (Id));
4328 Set_Flag212 (Id, V);
4329 end Set_Has_Pragma_Unreferenced_Objects;
4331 procedure Set_Has_Predicates (Id : E; V : B := True) is
4333 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4334 Set_Flag250 (Id, V);
4335 end Set_Has_Predicates;
4337 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4339 pragma Assert (Id = Base_Type (Id));
4340 Set_Flag120 (Id, V);
4341 end Set_Has_Primitive_Operations;
4343 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4345 pragma Assert (Is_Type (Id));
4346 Set_Flag151 (Id, V);
4347 end Set_Has_Private_Ancestor;
4349 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4351 Set_Flag155 (Id, V);
4352 end Set_Has_Private_Declaration;
4354 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4356 Set_Flag161 (Id, V);
4357 end Set_Has_Qualified_Name;
4359 procedure Set_Has_RACW (Id : E; V : B := True) is
4361 pragma Assert (Ekind (Id) = E_Package);
4362 Set_Flag214 (Id, V);
4365 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4367 pragma Assert (Id = Base_Type (Id));
4369 end Set_Has_Record_Rep_Clause;
4371 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4373 pragma Assert (Is_Subprogram (Id));
4374 Set_Flag143 (Id, V);
4375 end Set_Has_Recursive_Call;
4377 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4379 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4380 Set_Flag267 (Id, V);
4381 end Set_Has_Shift_Operator;
4383 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4386 end Set_Has_Size_Clause;
4388 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4391 end Set_Has_Small_Clause;
4393 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4395 pragma Assert (Id = Base_Type (Id));
4396 Set_Flag100 (Id, V);
4397 end Set_Has_Specified_Layout;
4399 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4401 pragma Assert (Is_Type (Id));
4402 Set_Flag190 (Id, V);
4403 end Set_Has_Specified_Stream_Input;
4405 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4407 pragma Assert (Is_Type (Id));
4408 Set_Flag191 (Id, V);
4409 end Set_Has_Specified_Stream_Output;
4411 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4413 pragma Assert (Is_Type (Id));
4414 Set_Flag192 (Id, V);
4415 end Set_Has_Specified_Stream_Read;
4417 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4419 pragma Assert (Is_Type (Id));
4420 Set_Flag193 (Id, V);
4421 end Set_Has_Specified_Stream_Write;
4423 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4425 Set_Flag211 (Id, V);
4426 end Set_Has_Static_Discriminants;
4428 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4430 pragma Assert (Is_Type (Id));
4431 Set_Flag259 (Id, V);
4432 end Set_Has_Static_Predicate_Aspect;
4434 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4436 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4437 pragma Assert (Id = Base_Type (Id));
4439 end Set_Has_Storage_Size_Clause;
4441 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4443 pragma Assert (Is_Elementary_Type (Id));
4444 Set_Flag184 (Id, V);
4445 end Set_Has_Stream_Size_Clause;
4447 procedure Set_Has_Task (Id : E; V : B := True) is
4449 pragma Assert (Id = Base_Type (Id));
4453 procedure Set_Has_Thunks (Id : E; V : B := True) is
4455 pragma Assert (Is_Tag (Id));
4456 Set_Flag228 (Id, V);
4459 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4461 pragma Assert (Id = Base_Type (Id));
4462 Set_Flag123 (Id, V);
4463 end Set_Has_Unchecked_Union;
4465 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4467 pragma Assert (Is_Type (Id));
4469 end Set_Has_Unknown_Discriminants;
4471 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4473 pragma Assert (Ekind (Id) = E_Abstract_State);
4474 Set_Flag263 (Id, V);
4475 end Set_Has_Visible_Refinement;
4477 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4479 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4481 end Set_Has_Volatile_Components;
4483 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4485 Set_Flag182 (Id, V);
4486 end Set_Has_Xref_Entry;
4488 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4490 pragma Assert (Ekind (Id) = E_Variable);
4492 end Set_Hiding_Loop_Variable;
4494 procedure Set_Homonym (Id : E; V : E) is
4496 pragma Assert (Id /= V);
4500 procedure Set_Import_Pragma (Id : E; V : E) is
4502 pragma Assert (Is_Subprogram (Id));
4504 end Set_Import_Pragma;
4506 procedure Set_Interface_Alias (Id : E; V : E) is
4510 and then Is_Hidden (Id)
4511 and then (Ekind_In (Id, E_Procedure, E_Function)));
4513 end Set_Interface_Alias;
4515 procedure Set_Interfaces (Id : E; V : L) is
4517 pragma Assert (Is_Record_Type (Id));
4518 Set_Elist25 (Id, V);
4521 procedure Set_In_Package_Body (Id : E; V : B := True) is
4524 end Set_In_Package_Body;
4526 procedure Set_In_Private_Part (Id : E; V : B := True) is
4529 end Set_In_Private_Part;
4531 procedure Set_In_Use (Id : E; V : B := True) is
4533 pragma Assert (Nkind (Id) in N_Entity);
4537 procedure Set_Initialization_Statements (Id : E; V : N) is
4539 -- Tolerate an E_Void entity since this can be called while resolving
4540 -- an aggregate used as the initialization expression for an object
4541 -- declaration, and this occurs before the Ekind for the object is set.
4543 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4545 end Set_Initialization_Statements;
4547 procedure Set_Inner_Instances (Id : E; V : L) is
4549 Set_Elist23 (Id, V);
4550 end Set_Inner_Instances;
4552 procedure Set_Interface_Name (Id : E; V : N) is
4555 end Set_Interface_Name;
4557 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4559 pragma Assert (Is_Overloadable (Id));
4561 end Set_Is_Abstract_Subprogram;
4563 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4565 pragma Assert (Is_Type (Id));
4566 Set_Flag146 (Id, V);
4567 end Set_Is_Abstract_Type;
4569 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4571 pragma Assert (Is_Access_Type (Id));
4572 Set_Flag194 (Id, V);
4573 end Set_Is_Local_Anonymous_Access;
4575 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4577 pragma Assert (Is_Access_Type (Id));
4579 end Set_Is_Access_Constant;
4581 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4583 Set_Flag185 (Id, V);
4584 end Set_Is_Ada_2005_Only;
4586 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4588 Set_Flag199 (Id, V);
4589 end Set_Is_Ada_2012_Only;
4591 procedure Set_Is_Aliased (Id : E; V : B := True) is
4593 pragma Assert (Nkind (Id) in N_Entity);
4597 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4599 pragma Assert (Is_Entry (Id));
4600 Set_Flag132 (Id, V);
4601 end Set_Is_AST_Entry;
4603 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4606 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4608 end Set_Is_Asynchronous;
4610 procedure Set_Is_Atomic (Id : E; V : B := True) is
4615 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4617 pragma Assert ((not V)
4618 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4619 Set_Flag122 (Id, V);
4620 end Set_Is_Bit_Packed_Array;
4622 procedure Set_Is_Called (Id : E; V : B := True) is
4624 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4625 Set_Flag102 (Id, V);
4628 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4631 end Set_Is_Character_Type;
4633 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4636 end Set_Is_Child_Unit;
4638 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4641 end Set_Is_Class_Wide_Equivalent_Type;
4643 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4645 Set_Flag149 (Id, V);
4646 end Set_Is_Compilation_Unit;
4648 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4650 pragma Assert (Ekind (Id) = E_Discriminant);
4651 Set_Flag103 (Id, V);
4652 end Set_Is_Completely_Hidden;
4654 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4657 end Set_Is_Concurrent_Record_Type;
4659 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4662 end Set_Is_Constr_Subt_For_U_Nominal;
4664 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4666 Set_Flag141 (Id, V);
4667 end Set_Is_Constr_Subt_For_UN_Aliased;
4669 procedure Set_Is_Constrained (Id : E; V : B := True) is
4671 pragma Assert (Nkind (Id) in N_Entity);
4673 end Set_Is_Constrained;
4675 procedure Set_Is_Constructor (Id : E; V : B := True) is
4678 end Set_Is_Constructor;
4680 procedure Set_Is_Controlled (Id : E; V : B := True) is
4682 pragma Assert (Id = Base_Type (Id));
4684 end Set_Is_Controlled;
4686 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4688 pragma Assert (Is_Formal (Id));
4690 end Set_Is_Controlling_Formal;
4692 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4695 end Set_Is_CPP_Class;
4697 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4699 pragma Assert (Is_Type (Id));
4700 Set_Flag223 (Id, V);
4701 end Set_Is_Descendent_Of_Address;
4703 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4705 Set_Flag176 (Id, V);
4706 end Set_Is_Discrim_SO_Function;
4708 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4710 Set_Flag264 (Id, V);
4711 end Set_Is_Discriminant_Check_Function;
4713 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4715 Set_Flag234 (Id, V);
4716 end Set_Is_Dispatch_Table_Entity;
4718 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4723 Is_Overloadable (Id)
4725 Ekind (Id) = E_Subprogram_Type);
4728 end Set_Is_Dispatching_Operation;
4730 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4732 Set_Flag124 (Id, V);
4733 end Set_Is_Eliminated;
4735 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4738 end Set_Is_Entry_Formal;
4740 procedure Set_Is_Exported (Id : E; V : B := True) is
4743 end Set_Is_Exported;
4745 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4748 end Set_Is_First_Subtype;
4750 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4752 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4753 Set_Flag118 (Id, V);
4754 end Set_Is_For_Access_Subtype;
4756 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4758 Set_Flag111 (Id, V);
4759 end Set_Is_Formal_Subprogram;
4761 procedure Set_Is_Frozen (Id : E; V : B := True) is
4763 pragma Assert (Nkind (Id) in N_Entity);
4767 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4769 pragma Assert (Is_Type (Id));
4771 end Set_Is_Generic_Actual_Type;
4773 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4775 Set_Flag130 (Id, V);
4776 end Set_Is_Generic_Instance;
4778 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4780 pragma Assert (Nkind (Id) in N_Entity);
4782 end Set_Is_Generic_Type;
4784 procedure Set_Is_Hidden (Id : E; V : B := True) is
4789 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4791 Set_Flag171 (Id, V);
4792 end Set_Is_Hidden_Open_Scope;
4794 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4796 pragma Assert (Nkind (Id) in N_Entity);
4798 end Set_Is_Immediately_Visible;
4800 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4802 Set_Flag254 (Id, V);
4803 end Set_Is_Implementation_Defined;
4805 procedure Set_Is_Imported (Id : E; V : B := True) is
4808 end Set_Is_Imported;
4810 procedure Set_Is_Independent (Id : E; V : B := True) is
4812 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4813 Set_Flag268 (Id, V);
4814 end Set_Is_Independent;
4816 procedure Set_Is_Inlined (Id : E; V : B := True) is
4821 procedure Set_Is_Interface (Id : E; V : B := True) is
4823 pragma Assert (Is_Record_Type (Id));
4824 Set_Flag186 (Id, V);
4825 end Set_Is_Interface;
4827 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4829 Set_Flag126 (Id, V);
4830 end Set_Is_Instantiated;
4832 procedure Set_Is_Internal (Id : E; V : B := True) is
4834 pragma Assert (Nkind (Id) in N_Entity);
4836 end Set_Is_Internal;
4838 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4840 pragma Assert (Nkind (Id) in N_Entity);
4842 end Set_Is_Interrupt_Handler;
4844 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4847 end Set_Is_Intrinsic_Subprogram;
4849 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4851 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4852 Set_Flag257 (Id, V);
4853 end Set_Is_Invariant_Procedure;
4855 procedure Set_Is_Itype (Id : E; V : B := True) is
4860 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4863 end Set_Is_Known_Non_Null;
4865 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4867 Set_Flag204 (Id, V);
4868 end Set_Is_Known_Null;
4870 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4872 Set_Flag170 (Id, V);
4873 end Set_Is_Known_Valid;
4875 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4877 pragma Assert (Is_Type (Id));
4878 Set_Flag106 (Id, V);
4879 end Set_Is_Limited_Composite;
4881 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4883 pragma Assert (Is_Interface (Id));
4884 Set_Flag197 (Id, V);
4885 end Set_Is_Limited_Interface;
4887 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4890 end Set_Is_Limited_Record;
4892 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4894 pragma Assert (Is_Subprogram (Id));
4895 Set_Flag137 (Id, V);
4896 end Set_Is_Machine_Code_Subprogram;
4898 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4900 pragma Assert (Is_Type (Id));
4901 Set_Flag109 (Id, V);
4902 end Set_Is_Non_Static_Subtype;
4904 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4906 pragma Assert (Ekind (Id) = E_Procedure);
4907 Set_Flag178 (Id, V);
4908 end Set_Is_Null_Init_Proc;
4910 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4912 Set_Flag153 (Id, V);
4913 end Set_Is_Obsolescent;
4915 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4917 pragma Assert (Ekind (Id) = E_Out_Parameter);
4918 Set_Flag226 (Id, V);
4919 end Set_Is_Only_Out_Parameter;
4921 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4923 pragma Assert (Is_Formal (Id));
4924 Set_Flag134 (Id, V);
4925 end Set_Is_Optional_Parameter;
4927 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4929 Set_Flag160 (Id, V);
4930 end Set_Is_Package_Body_Entity;
4932 procedure Set_Is_Packed (Id : E; V : B := True) is
4934 pragma Assert (Id = Base_Type (Id));
4938 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4940 Set_Flag138 (Id, V);
4941 end Set_Is_Packed_Array_Type;
4943 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4945 pragma Assert (Nkind (Id) in N_Entity);
4947 end Set_Is_Potentially_Use_Visible;
4949 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4951 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4952 Set_Flag255 (Id, V);
4953 end Set_Is_Predicate_Function;
4955 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4957 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4958 Set_Flag256 (Id, V);
4959 end Set_Is_Predicate_Function_M;
4961 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4964 end Set_Is_Preelaborated;
4966 procedure Set_Is_Primitive (Id : E; V : B := True) is
4969 (Is_Overloadable (Id)
4970 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4971 Set_Flag218 (Id, V);
4972 end Set_Is_Primitive;
4974 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4976 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4977 Set_Flag195 (Id, V);
4978 end Set_Is_Primitive_Wrapper;
4980 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4982 pragma Assert (Is_Type (Id));
4983 Set_Flag107 (Id, V);
4984 end Set_Is_Private_Composite;
4986 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4989 end Set_Is_Private_Descendant;
4991 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4993 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4994 Set_Flag245 (Id, V);
4995 end Set_Is_Private_Primitive;
4997 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4999 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5000 Set_Flag252 (Id, V);
5001 end Set_Is_Processed_Transient;
5003 procedure Set_Is_Public (Id : E; V : B := True) is
5005 pragma Assert (Nkind (Id) in N_Entity);
5009 procedure Set_Is_Pure (Id : E; V : B := True) is
5014 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5016 pragma Assert (Is_Access_Type (Id));
5017 Set_Flag189 (Id, V);
5018 end Set_Is_Pure_Unit_Access_Type;
5020 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5022 pragma Assert (Is_Type (Id));
5023 Set_Flag244 (Id, V);
5024 end Set_Is_RACW_Stub_Type;
5026 procedure Set_Is_Raised (Id : E; V : B := True) is
5028 pragma Assert (Ekind (Id) = E_Exception);
5029 Set_Flag224 (Id, V);
5032 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5035 end Set_Is_Remote_Call_Interface;
5037 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5040 end Set_Is_Remote_Types;
5042 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5044 Set_Flag112 (Id, V);
5045 end Set_Is_Renaming_Of_Object;
5047 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5049 Set_Flag209 (Id, V);
5050 end Set_Is_Return_Object;
5052 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5054 pragma Assert (Ekind (Id) = E_Variable);
5055 Set_Flag249 (Id, V);
5056 end Set_Is_Safe_To_Reevaluate;
5058 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5061 end Set_Is_Shared_Passive;
5063 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5067 or else Ekind_In (Id, E_Exception,
5072 end Set_Is_Statically_Allocated;
5074 procedure Set_Is_Tag (Id : E; V : B := True) is
5076 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5080 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5083 end Set_Is_Tagged_Type;
5085 procedure Set_Is_Thunk (Id : E; V : B := True) is
5087 pragma Assert (Is_Subprogram (Id));
5088 Set_Flag225 (Id, V);
5091 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5093 Set_Flag235 (Id, V);
5094 end Set_Is_Trivial_Subprogram;
5096 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5098 Set_Flag163 (Id, V);
5099 end Set_Is_True_Constant;
5101 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5103 pragma Assert (Id = Base_Type (Id));
5104 Set_Flag117 (Id, V);
5105 end Set_Is_Unchecked_Union;
5107 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5109 pragma Assert (Ekind (Id) = E_Record_Type);
5110 Set_Flag246 (Id, V);
5111 end Set_Is_Underlying_Record_View;
5113 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5115 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5116 Set_Flag144 (Id, V);
5117 end Set_Is_Unsigned_Type;
5119 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5121 pragma Assert (Ekind (Id) = E_Procedure);
5122 Set_Flag127 (Id, V);
5123 end Set_Is_Valued_Procedure;
5125 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5127 Set_Flag206 (Id, V);
5128 end Set_Is_Visible_Formal;
5130 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5132 Set_Flag116 (Id, V);
5133 end Set_Is_Visible_Lib_Unit;
5135 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5137 pragma Assert (Ekind (Id) = E_Exception);
5138 Set_Flag133 (Id, V);
5139 end Set_Is_VMS_Exception;
5141 procedure Set_Is_Volatile (Id : E; V : B := True) is
5143 pragma Assert (Nkind (Id) in N_Entity);
5145 end Set_Is_Volatile;
5147 procedure Set_Itype_Printed (Id : E; V : B := True) is
5149 pragma Assert (Is_Itype (Id));
5150 Set_Flag202 (Id, V);
5151 end Set_Itype_Printed;
5153 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5156 end Set_Kill_Elaboration_Checks;
5158 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5161 end Set_Kill_Range_Checks;
5163 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5165 pragma Assert (Is_Type (Id));
5166 Set_Flag207 (Id, V);
5167 end Set_Known_To_Have_Preelab_Init;
5169 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5171 pragma Assert (Ekind (Id) = E_Variable);
5173 end Set_Last_Aggregate_Assignment;
5175 procedure Set_Last_Assignment (Id : E; V : N) is
5177 pragma Assert (Is_Assignable (Id));
5179 end Set_Last_Assignment;
5181 procedure Set_Last_Entity (Id : E; V : E) is
5184 end Set_Last_Entity;
5186 procedure Set_Limited_View (Id : E; V : E) is
5188 pragma Assert (Ekind (Id) = E_Package);
5190 end Set_Limited_View;
5192 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5194 pragma Assert (Is_Type (Id)
5195 or else Ekind_In (Id, E_Constant, E_Variable)
5196 or else Is_Subprogram (Id));
5198 end Set_Linker_Section_Pragma;
5200 procedure Set_Lit_Indexes (Id : E; V : E) is
5202 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5204 end Set_Lit_Indexes;
5206 procedure Set_Lit_Strings (Id : E; V : E) is
5208 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5210 end Set_Lit_Strings;
5212 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5214 pragma Assert (Is_Formal (Id));
5215 Set_Flag205 (Id, V);
5216 end Set_Low_Bound_Tested;
5218 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5220 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5222 end Set_Machine_Radix_10;
5224 procedure Set_Master_Id (Id : E; V : E) is
5226 pragma Assert (Is_Access_Type (Id));
5230 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5232 Set_Flag168 (Id, V);
5233 end Set_Materialize_Entity;
5235 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5237 Set_Flag262 (Id, V);
5238 end Set_May_Inherit_Delayed_Rep_Aspects;
5240 procedure Set_Mechanism (Id : E; V : M) is
5242 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5243 Set_Uint8 (Id, UI_From_Int (V));
5246 procedure Set_Modulus (Id : E; V : U) is
5248 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5252 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5254 pragma Assert (Is_Type (Id));
5255 Set_Flag183 (Id, V);
5256 end Set_Must_Be_On_Byte_Boundary;
5258 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5260 pragma Assert (Is_Type (Id));
5261 Set_Flag208 (Id, V);
5262 end Set_Must_Have_Preelab_Init;
5264 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5266 Set_Flag147 (Id, V);
5267 end Set_Needs_Debug_Info;
5269 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5272 (Is_Overloadable (Id)
5273 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5275 end Set_Needs_No_Actuals;
5277 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5279 Set_Flag115 (Id, V);
5280 end Set_Never_Set_In_Source;
5282 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5285 end Set_Next_Inlined_Subprogram;
5287 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5289 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5290 Set_Flag131 (Id, V);
5291 end Set_No_Pool_Assigned;
5293 procedure Set_No_Return (Id : E; V : B := True) is
5296 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5297 Set_Flag113 (Id, V);
5300 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5302 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5303 Set_Flag136 (Id, V);
5304 end Set_No_Strict_Aliasing;
5306 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5308 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5310 end Set_Non_Binary_Modulus;
5312 procedure Set_Non_Limited_View (Id : E; V : E) is
5315 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5317 end Set_Non_Limited_View;
5319 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5322 (Root_Type (Id) = Standard_Boolean
5323 and then Ekind (Id) = E_Enumeration_Type);
5324 Set_Flag162 (Id, V);
5325 end Set_Nonzero_Is_True;
5327 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5329 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5331 end Set_Normalized_First_Bit;
5333 procedure Set_Normalized_Position (Id : E; V : U) is
5335 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5337 end Set_Normalized_Position;
5339 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5341 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5343 end Set_Normalized_Position_Max;
5345 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5347 pragma Assert (Ekind (Id) = E_Variable);
5348 Set_Flag247 (Id, V);
5349 end Set_OK_To_Rename;
5351 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5354 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5355 Set_Flag239 (Id, V);
5356 end Set_OK_To_Reorder_Components;
5358 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5361 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5362 Set_Flag241 (Id, V);
5363 end Set_Optimize_Alignment_Space;
5365 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5368 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5369 Set_Flag242 (Id, V);
5370 end Set_Optimize_Alignment_Time;
5372 procedure Set_Original_Access_Type (Id : E; V : E) is
5374 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5376 end Set_Original_Access_Type;
5378 procedure Set_Original_Array_Type (Id : E; V : E) is
5380 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5382 end Set_Original_Array_Type;
5384 procedure Set_Original_Record_Component (Id : E; V : E) is
5386 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5388 end Set_Original_Record_Component;
5390 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5392 Set_Flag243 (Id, V);
5393 end Set_Overlays_Constant;
5395 procedure Set_Overridden_Operation (Id : E; V : E) is
5398 end Set_Overridden_Operation;
5400 procedure Set_Package_Instantiation (Id : E; V : N) is
5402 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5404 end Set_Package_Instantiation;
5406 procedure Set_Packed_Array_Type (Id : E; V : E) is
5408 pragma Assert (Is_Array_Type (Id));
5410 end Set_Packed_Array_Type;
5412 procedure Set_Parent_Subtype (Id : E; V : E) is
5414 pragma Assert (Ekind (Id) = E_Record_Type);
5416 end Set_Parent_Subtype;
5418 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5420 pragma Assert (Ekind (Id) = E_Abstract_State);
5422 end Set_Part_Of_Constituents;
5424 procedure Set_Postcondition_Proc (Id : E; V : E) is
5426 pragma Assert (Ekind (Id) = E_Procedure);
5428 end Set_Postcondition_Proc;
5430 procedure Set_PPC_Wrapper (Id : E; V : E) is
5432 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5434 end Set_PPC_Wrapper;
5436 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5438 pragma Assert (Is_Tagged_Type (Id));
5439 Set_Elist10 (Id, V);
5440 end Set_Direct_Primitive_Operations;
5442 procedure Set_Prival (Id : E; V : E) is
5444 pragma Assert (Is_Protected_Component (Id));
5448 procedure Set_Prival_Link (Id : E; V : E) is
5450 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5452 end Set_Prival_Link;
5454 procedure Set_Private_Dependents (Id : E; V : L) is
5456 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5457 Set_Elist18 (Id, V);
5458 end Set_Private_Dependents;
5460 procedure Set_Private_View (Id : E; V : N) is
5462 pragma Assert (Is_Private_Type (Id));
5464 end Set_Private_View;
5466 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5468 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5470 end Set_Protected_Body_Subprogram;
5472 procedure Set_Protected_Formal (Id : E; V : E) is
5474 pragma Assert (Is_Formal (Id));
5476 end Set_Protected_Formal;
5478 procedure Set_Protection_Object (Id : E; V : E) is
5480 pragma Assert (Ekind_In (Id, E_Entry,
5485 end Set_Protection_Object;
5487 procedure Set_Reachable (Id : E; V : B := True) is
5492 procedure Set_Referenced (Id : E; V : B := True) is
5494 Set_Flag156 (Id, V);
5497 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5500 end Set_Referenced_As_LHS;
5502 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5504 Set_Flag227 (Id, V);
5505 end Set_Referenced_As_Out_Parameter;
5507 procedure Set_Refinement_Constituents (Id : E; V : L) is
5509 pragma Assert (Ekind (Id) = E_Abstract_State);
5511 end Set_Refinement_Constituents;
5513 procedure Set_Register_Exception_Call (Id : E; V : N) is
5515 pragma Assert (Ekind (Id) = E_Exception);
5517 end Set_Register_Exception_Call;
5519 procedure Set_Related_Array_Object (Id : E; V : E) is
5521 pragma Assert (Is_Array_Type (Id));
5523 end Set_Related_Array_Object;
5525 procedure Set_Related_Expression (Id : E; V : N) is
5527 pragma Assert (Ekind (Id) in Type_Kind
5528 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5530 end Set_Related_Expression;
5532 procedure Set_Related_Instance (Id : E; V : E) is
5534 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5536 end Set_Related_Instance;
5538 procedure Set_Related_Type (Id : E; V : E) is
5540 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5542 end Set_Related_Type;
5544 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5546 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5548 end Set_Relative_Deadline_Variable;
5550 procedure Set_Renamed_Entity (Id : E; V : N) is
5553 end Set_Renamed_Entity;
5555 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5557 pragma Assert (Ekind (Id) = E_Package);
5558 Set_Flag231 (Id, V);
5559 end Set_Renamed_In_Spec;
5561 procedure Set_Renamed_Object (Id : E; V : N) is
5564 end Set_Renamed_Object;
5566 procedure Set_Renaming_Map (Id : E; V : U) is
5569 end Set_Renaming_Map;
5571 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5573 pragma Assert (Is_Overloadable (Id));
5574 Set_Flag213 (Id, V);
5575 end Set_Requires_Overriding;
5577 procedure Set_Return_Present (Id : E; V : B := True) is
5580 end Set_Return_Present;
5582 procedure Set_Return_Applies_To (Id : E; V : N) is
5585 end Set_Return_Applies_To;
5587 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5590 end Set_Returns_By_Ref;
5592 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5595 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5596 Set_Flag164 (Id, V);
5597 end Set_Reverse_Bit_Order;
5599 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5603 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5605 end Set_Reverse_Storage_Order;
5607 procedure Set_RM_Size (Id : E; V : U) is
5609 pragma Assert (Is_Type (Id));
5613 procedure Set_Scalar_Range (Id : E; V : N) is
5616 end Set_Scalar_Range;
5618 procedure Set_Scale_Value (Id : E; V : U) is
5621 end Set_Scale_Value;
5623 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5625 pragma Assert (not Is_Record_Type (Id));
5627 end Set_Scope_Depth_Value;
5629 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5631 Set_Flag167 (Id, V);
5632 end Set_Sec_Stack_Needed_For_Return;
5634 procedure Set_Shadow_Entities (Id : E; V : S) is
5636 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5638 end Set_Shadow_Entities;
5640 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5642 pragma Assert (Ekind (Id) = E_Variable);
5644 end Set_Shared_Var_Procs_Instance;
5646 procedure Set_Size_Check_Code (Id : E; V : N) is
5648 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5650 end Set_Size_Check_Code;
5652 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5654 Set_Flag177 (Id, V);
5655 end Set_Size_Depends_On_Discriminant;
5657 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5660 end Set_Size_Known_At_Compile_Time;
5662 procedure Set_Small_Value (Id : E; V : R) is
5664 pragma Assert (Is_Fixed_Point_Type (Id));
5665 Set_Ureal21 (Id, V);
5666 end Set_Small_Value;
5668 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5671 (Ekind_In (Id, E_Generic_Package, -- package variants
5676 end Set_SPARK_Aux_Pragma;
5678 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5681 (Ekind_In (Id, E_Generic_Package, -- package variants
5685 Set_Flag266 (Id, V);
5686 end Set_SPARK_Aux_Pragma_Inherited;
5688 procedure Set_SPARK_Pragma (Id : E; V : N) is
5691 (Ekind_In (Id, E_Function, -- subprogram variants
5693 E_Generic_Procedure,
5697 Ekind_In (Id, E_Generic_Package, -- package variants
5702 end Set_SPARK_Pragma;
5704 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5707 (Ekind_In (Id, E_Function, -- subprogram variants
5709 E_Generic_Procedure,
5713 Ekind_In (Id, E_Generic_Package, -- package variants
5717 Set_Flag265 (Id, V);
5718 end Set_SPARK_Pragma_Inherited;
5720 procedure Set_Spec_Entity (Id : E; V : E) is
5722 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5724 end Set_Spec_Entity;
5726 procedure Set_Static_Predicate (Id : E; V : S) is
5729 (Ekind_In (Id, E_Enumeration_Subtype,
5730 E_Modular_Integer_Subtype,
5731 E_Signed_Integer_Subtype)
5732 and then Has_Predicates (Id));
5734 end Set_Static_Predicate;
5736 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5738 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5740 end Set_Status_Flag_Or_Transient_Decl;
5742 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5744 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5745 pragma Assert (Id = Base_Type (Id));
5747 end Set_Storage_Size_Variable;
5749 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5751 pragma Assert (Ekind (Id) = E_Package);
5753 end Set_Static_Elaboration_Desired;
5755 procedure Set_Static_Initialization (Id : E; V : N) is
5758 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5760 end Set_Static_Initialization;
5762 procedure Set_Stored_Constraint (Id : E; V : L) is
5764 pragma Assert (Nkind (Id) in N_Entity);
5765 Set_Elist23 (Id, V);
5766 end Set_Stored_Constraint;
5768 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5770 pragma Assert (Id = Base_Type (Id));
5771 Set_Flag145 (Id, V);
5772 end Set_Strict_Alignment;
5774 procedure Set_String_Literal_Length (Id : E; V : U) is
5776 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5778 end Set_String_Literal_Length;
5780 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5782 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5784 end Set_String_Literal_Low_Bound;
5786 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5788 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5790 end Set_Subprograms_For_Type;
5792 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5794 Set_Flag148 (Id, V);
5795 end Set_Suppress_Elaboration_Warnings;
5797 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5799 pragma Assert (Is_Type (Id));
5800 Set_Flag105 (Id, V);
5801 end Set_Suppress_Initialization;
5803 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5805 Set_Flag165 (Id, V);
5806 end Set_Suppress_Style_Checks;
5808 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5810 Set_Flag217 (Id, V);
5811 end Set_Suppress_Value_Tracking_On_Call;
5813 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5815 pragma Assert (Ekind (Id) in Task_Kind);
5817 end Set_Task_Body_Procedure;
5819 procedure Set_Thunk_Entity (Id : E; V : E) is
5821 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5822 and then Is_Thunk (Id));
5824 end Set_Thunk_Entity;
5826 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5829 end Set_Treat_As_Volatile;
5831 procedure Set_Underlying_Full_View (Id : E; V : E) is
5833 pragma Assert (Ekind (Id) in Private_Kind);
5835 end Set_Underlying_Full_View;
5837 procedure Set_Underlying_Record_View (Id : E; V : E) is
5839 pragma Assert (Ekind (Id) = E_Record_Type);
5841 end Set_Underlying_Record_View;
5843 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5845 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5846 Set_Flag216 (Id, V);
5847 end Set_Universal_Aliasing;
5849 procedure Set_Unset_Reference (Id : E; V : N) is
5852 end Set_Unset_Reference;
5854 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5856 Set_Flag222 (Id, V);
5857 end Set_Used_As_Generic_Actual;
5859 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5861 pragma Assert (Ekind (Id) = E_Protected_Type);
5862 Set_Flag188 (Id, V);
5863 end Set_Uses_Lock_Free;
5865 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5868 end Set_Uses_Sec_Stack;
5870 procedure Set_Warnings_Off (Id : E; V : B := True) is
5873 end Set_Warnings_Off;
5875 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5877 Set_Flag236 (Id, V);
5878 end Set_Warnings_Off_Used;
5880 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5882 Set_Flag237 (Id, V);
5883 end Set_Warnings_Off_Used_Unmodified;
5885 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5887 Set_Flag238 (Id, V);
5888 end Set_Warnings_Off_Used_Unreferenced;
5890 procedure Set_Was_Hidden (Id : E; V : B := True) is
5892 Set_Flag196 (Id, V);
5895 procedure Set_Wrapped_Entity (Id : E; V : E) is
5897 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5898 and then Is_Primitive_Wrapper (Id));
5900 end Set_Wrapped_Entity;
5902 -----------------------------------
5903 -- Field Initialization Routines --
5904 -----------------------------------
5906 procedure Init_Alignment (Id : E) is
5908 Set_Uint14 (Id, Uint_0);
5911 procedure Init_Alignment (Id : E; V : Int) is
5913 Set_Uint14 (Id, UI_From_Int (V));
5916 procedure Init_Component_Bit_Offset (Id : E) is
5918 Set_Uint11 (Id, No_Uint);
5919 end Init_Component_Bit_Offset;
5921 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5923 Set_Uint11 (Id, UI_From_Int (V));
5924 end Init_Component_Bit_Offset;
5926 procedure Init_Component_Size (Id : E) is
5928 Set_Uint22 (Id, Uint_0);
5929 end Init_Component_Size;
5931 procedure Init_Component_Size (Id : E; V : Int) is
5933 Set_Uint22 (Id, UI_From_Int (V));
5934 end Init_Component_Size;
5936 procedure Init_Digits_Value (Id : E) is
5938 Set_Uint17 (Id, Uint_0);
5939 end Init_Digits_Value;
5941 procedure Init_Digits_Value (Id : E; V : Int) is
5943 Set_Uint17 (Id, UI_From_Int (V));
5944 end Init_Digits_Value;
5946 procedure Init_Esize (Id : E) is
5948 Set_Uint12 (Id, Uint_0);
5951 procedure Init_Esize (Id : E; V : Int) is
5953 Set_Uint12 (Id, UI_From_Int (V));
5956 procedure Init_Normalized_First_Bit (Id : E) is
5958 Set_Uint8 (Id, No_Uint);
5959 end Init_Normalized_First_Bit;
5961 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5963 Set_Uint8 (Id, UI_From_Int (V));
5964 end Init_Normalized_First_Bit;
5966 procedure Init_Normalized_Position (Id : E) is
5968 Set_Uint14 (Id, No_Uint);
5969 end Init_Normalized_Position;
5971 procedure Init_Normalized_Position (Id : E; V : Int) is
5973 Set_Uint14 (Id, UI_From_Int (V));
5974 end Init_Normalized_Position;
5976 procedure Init_Normalized_Position_Max (Id : E) is
5978 Set_Uint10 (Id, No_Uint);
5979 end Init_Normalized_Position_Max;
5981 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5983 Set_Uint10 (Id, UI_From_Int (V));
5984 end Init_Normalized_Position_Max;
5986 procedure Init_RM_Size (Id : E) is
5988 Set_Uint13 (Id, Uint_0);
5991 procedure Init_RM_Size (Id : E; V : Int) is
5993 Set_Uint13 (Id, UI_From_Int (V));
5996 -----------------------------
5997 -- Init_Component_Location --
5998 -----------------------------
6000 procedure Init_Component_Location (Id : E) is
6002 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6003 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6004 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6005 Set_Uint12 (Id, Uint_0); -- Esize
6006 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6007 end Init_Component_Location;
6009 ----------------------------
6010 -- Init_Object_Size_Align --
6011 ----------------------------
6013 procedure Init_Object_Size_Align (Id : E) is
6015 Set_Uint12 (Id, Uint_0); -- Esize
6016 Set_Uint14 (Id, Uint_0); -- Alignment
6017 end Init_Object_Size_Align;
6023 procedure Init_Size (Id : E; V : Int) is
6025 pragma Assert (not Is_Object (Id));
6026 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6027 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6030 ---------------------
6031 -- Init_Size_Align --
6032 ---------------------
6034 procedure Init_Size_Align (Id : E) is
6036 pragma Assert (not Is_Object (Id));
6037 Set_Uint12 (Id, Uint_0); -- Esize
6038 Set_Uint13 (Id, Uint_0); -- RM_Size
6039 Set_Uint14 (Id, Uint_0); -- Alignment
6040 end Init_Size_Align;
6042 ----------------------------------------------
6043 -- Type Representation Attribute Predicates --
6044 ----------------------------------------------
6046 function Known_Alignment (E : Entity_Id) return B is
6048 return Uint14 (E) /= Uint_0
6049 and then Uint14 (E) /= No_Uint;
6050 end Known_Alignment;
6052 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6054 return Uint11 (E) /= No_Uint;
6055 end Known_Component_Bit_Offset;
6057 function Known_Component_Size (E : Entity_Id) return B is
6059 return Uint22 (Base_Type (E)) /= Uint_0
6060 and then Uint22 (Base_Type (E)) /= No_Uint;
6061 end Known_Component_Size;
6063 function Known_Esize (E : Entity_Id) return B is
6065 return Uint12 (E) /= Uint_0
6066 and then Uint12 (E) /= No_Uint;
6069 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6071 return Uint8 (E) /= No_Uint;
6072 end Known_Normalized_First_Bit;
6074 function Known_Normalized_Position (E : Entity_Id) return B is
6076 return Uint14 (E) /= No_Uint;
6077 end Known_Normalized_Position;
6079 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6081 return Uint10 (E) /= No_Uint;
6082 end Known_Normalized_Position_Max;
6084 function Known_RM_Size (E : Entity_Id) return B is
6086 return Uint13 (E) /= No_Uint
6087 and then (Uint13 (E) /= Uint_0
6088 or else Is_Discrete_Type (E)
6089 or else Is_Fixed_Point_Type (E));
6092 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6094 return Uint11 (E) /= No_Uint
6095 and then Uint11 (E) >= Uint_0;
6096 end Known_Static_Component_Bit_Offset;
6098 function Known_Static_Component_Size (E : Entity_Id) return B is
6100 return Uint22 (Base_Type (E)) > Uint_0;
6101 end Known_Static_Component_Size;
6103 function Known_Static_Esize (E : Entity_Id) return B is
6105 return Uint12 (E) > Uint_0
6106 and then not Is_Generic_Type (E);
6107 end Known_Static_Esize;
6109 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6111 return Uint8 (E) /= No_Uint
6112 and then Uint8 (E) >= Uint_0;
6113 end Known_Static_Normalized_First_Bit;
6115 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6117 return Uint14 (E) /= No_Uint
6118 and then Uint14 (E) >= Uint_0;
6119 end Known_Static_Normalized_Position;
6121 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6123 return Uint10 (E) /= No_Uint
6124 and then Uint10 (E) >= Uint_0;
6125 end Known_Static_Normalized_Position_Max;
6127 function Known_Static_RM_Size (E : Entity_Id) return B is
6129 return (Uint13 (E) > Uint_0
6130 or else Is_Discrete_Type (E)
6131 or else Is_Fixed_Point_Type (E))
6132 and then not Is_Generic_Type (E);
6133 end Known_Static_RM_Size;
6135 function Unknown_Alignment (E : Entity_Id) return B is
6137 return Uint14 (E) = Uint_0
6138 or else Uint14 (E) = No_Uint;
6139 end Unknown_Alignment;
6141 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6143 return Uint11 (E) = No_Uint;
6144 end Unknown_Component_Bit_Offset;
6146 function Unknown_Component_Size (E : Entity_Id) return B is
6148 return Uint22 (Base_Type (E)) = Uint_0
6150 Uint22 (Base_Type (E)) = No_Uint;
6151 end Unknown_Component_Size;
6153 function Unknown_Esize (E : Entity_Id) return B is
6155 return Uint12 (E) = No_Uint
6157 Uint12 (E) = Uint_0;
6160 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6162 return Uint8 (E) = No_Uint;
6163 end Unknown_Normalized_First_Bit;
6165 function Unknown_Normalized_Position (E : Entity_Id) return B is
6167 return Uint14 (E) = No_Uint;
6168 end Unknown_Normalized_Position;
6170 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6172 return Uint10 (E) = No_Uint;
6173 end Unknown_Normalized_Position_Max;
6175 function Unknown_RM_Size (E : Entity_Id) return B is
6177 return (Uint13 (E) = Uint_0
6178 and then not Is_Discrete_Type (E)
6179 and then not Is_Fixed_Point_Type (E))
6180 or else Uint13 (E) = No_Uint;
6181 end Unknown_RM_Size;
6183 --------------------
6184 -- Address_Clause --
6185 --------------------
6187 function Address_Clause (Id : E) return N is
6189 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6196 function Aft_Value (Id : E) return U is
6198 Delta_Val : Ureal := Delta_Value (Id);
6200 while Delta_Val < Ureal_Tenth loop
6201 Delta_Val := Delta_Val * Ureal_10;
6202 Result := Result + 1;
6205 return UI_From_Int (Result);
6208 ----------------------
6209 -- Alignment_Clause --
6210 ----------------------
6212 function Alignment_Clause (Id : E) return N is
6214 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6215 end Alignment_Clause;
6221 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6223 if Last_Entity (V) = Empty then
6224 Set_First_Entity (Id => V, V => Id);
6226 Set_Next_Entity (Last_Entity (V), Id);
6229 Set_Next_Entity (Id, Empty);
6231 Set_Last_Entity (Id => V, V => Id);
6238 function Base_Type (Id : E) return E is
6240 if Is_Base_Type (Id) then
6243 pragma Assert (Is_Type (Id));
6248 -------------------------
6249 -- Component_Alignment --
6250 -------------------------
6252 -- Component Alignment is encoded using two flags, Flag128/129 as
6253 -- follows. Note that both flags False = Align_Default, so that the
6254 -- default initialization of flags to False initializes component
6255 -- alignment to the default value as required.
6257 -- Flag128 Flag129 Value
6258 -- ------- ------- -----
6259 -- False False Calign_Default
6260 -- False True Calign_Component_Size
6261 -- True False Calign_Component_Size_4
6262 -- True True Calign_Storage_Unit
6264 function Component_Alignment (Id : E) return C is
6265 BT : constant Node_Id := Base_Type (Id);
6268 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6270 if Flag128 (BT) then
6271 if Flag129 (BT) then
6272 return Calign_Storage_Unit;
6274 return Calign_Component_Size_4;
6278 if Flag129 (BT) then
6279 return Calign_Component_Size;
6281 return Calign_Default;
6284 end Component_Alignment;
6286 ----------------------
6287 -- Declaration_Node --
6288 ----------------------
6290 function Declaration_Node (Id : E) return N is
6294 if Ekind (Id) = E_Incomplete_Type
6295 and then Present (Full_View (Id))
6297 P := Parent (Full_View (Id));
6303 if Nkind (P) /= N_Selected_Component
6304 and then Nkind (P) /= N_Expanded_Name
6306 not (Nkind (P) = N_Defining_Program_Unit_Name
6307 and then Is_Child_Unit (Id))
6314 end Declaration_Node;
6316 ---------------------
6317 -- Designated_Type --
6318 ---------------------
6320 function Designated_Type (Id : E) return E is
6324 Desig_Type := Directly_Designated_Type (Id);
6326 if Ekind (Desig_Type) = E_Incomplete_Type
6327 and then Present (Full_View (Desig_Type))
6329 return Full_View (Desig_Type);
6331 elsif Is_Class_Wide_Type (Desig_Type)
6332 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6333 and then Present (Full_View (Etype (Desig_Type)))
6334 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6336 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6341 end Designated_Type;
6343 ----------------------
6344 -- Entry_Index_Type --
6345 ----------------------
6347 function Entry_Index_Type (Id : E) return N is
6349 pragma Assert (Ekind (Id) = E_Entry_Family);
6350 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6351 end Entry_Index_Type;
6353 ---------------------
6354 -- First_Component --
6355 ---------------------
6357 function First_Component (Id : E) return E is
6362 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6364 Comp_Id := First_Entity (Id);
6365 while Present (Comp_Id) loop
6366 exit when Ekind (Comp_Id) = E_Component;
6367 Comp_Id := Next_Entity (Comp_Id);
6371 end First_Component;
6373 -------------------------------------
6374 -- First_Component_Or_Discriminant --
6375 -------------------------------------
6377 function First_Component_Or_Discriminant (Id : E) return E is
6382 (Is_Record_Type (Id)
6383 or else Is_Incomplete_Or_Private_Type (Id)
6384 or else Has_Discriminants (Id));
6386 Comp_Id := First_Entity (Id);
6387 while Present (Comp_Id) loop
6388 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6389 Comp_Id := Next_Entity (Comp_Id);
6393 end First_Component_Or_Discriminant;
6399 function First_Formal (Id : E) return E is
6404 (Is_Overloadable (Id)
6405 or else Ekind_In (Id, E_Entry_Family,
6407 E_Subprogram_Type));
6409 if Ekind (Id) = E_Enumeration_Literal then
6413 Formal := First_Entity (Id);
6415 if Present (Formal) and then Is_Formal (Formal) then
6423 ------------------------------
6424 -- First_Formal_With_Extras --
6425 ------------------------------
6427 function First_Formal_With_Extras (Id : E) return E is
6432 (Is_Overloadable (Id)
6433 or else Ekind_In (Id, E_Entry_Family,
6435 E_Subprogram_Type));
6437 if Ekind (Id) = E_Enumeration_Literal then
6441 Formal := First_Entity (Id);
6443 if Present (Formal) and then Is_Formal (Formal) then
6446 return Extra_Formals (Id); -- Empty if no extra formals
6449 end First_Formal_With_Extras;
6451 -------------------------------------
6452 -- Get_Attribute_Definition_Clause --
6453 -------------------------------------
6455 function Get_Attribute_Definition_Clause
6457 Id : Attribute_Id) return Node_Id
6462 N := First_Rep_Item (E);
6463 while Present (N) loop
6464 if Nkind (N) = N_Attribute_Definition_Clause
6465 and then Get_Attribute_Id (Chars (N)) = Id
6474 end Get_Attribute_Definition_Clause;
6480 function Get_Full_View (T : Entity_Id) return Entity_Id is
6482 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6483 return Full_View (T);
6485 elsif Is_Class_Wide_Type (T)
6486 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6487 and then Present (Full_View (Root_Type (T)))
6489 return Class_Wide_Type (Full_View (Root_Type (T)));
6500 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6501 Is_CDG : constant Boolean :=
6502 Id = Pragma_Abstract_State or else
6503 Id = Pragma_Async_Readers or else
6504 Id = Pragma_Async_Writers or else
6505 Id = Pragma_Depends or else
6506 Id = Pragma_Effective_Reads or else
6507 Id = Pragma_Effective_Writes or else
6508 Id = Pragma_Global or else
6509 Id = Pragma_Initial_Condition or else
6510 Id = Pragma_Initializes or else
6511 Id = Pragma_Part_Of or else
6512 Id = Pragma_Refined_Depends or else
6513 Id = Pragma_Refined_Global or else
6514 Id = Pragma_Refined_State;
6515 Is_CTC : constant Boolean :=
6516 Id = Pragma_Contract_Cases or else
6517 Id = Pragma_Test_Case;
6518 Is_PPC : constant Boolean :=
6519 Id = Pragma_Precondition or else
6520 Id = Pragma_Postcondition or else
6521 Id = Pragma_Refined_Post;
6523 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6529 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6530 -- extracted from their specialized list.
6533 Items := Contract (E);
6539 Item := Classifications (Items);
6542 Item := Contract_Test_Cases (Items);
6545 Item := Pre_Post_Conditions (Items);
6551 Item := First_Rep_Item (E);
6554 while Present (Item) loop
6555 if Nkind (Item) = N_Pragma
6556 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6560 -- All nodes in N_Contract are chained using Next_Pragma
6562 elsif In_Contract then
6563 Item := Next_Pragma (Item);
6568 Next_Rep_Item (Item);
6575 --------------------------------------
6576 -- Get_Record_Representation_Clause --
6577 --------------------------------------
6579 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6583 N := First_Rep_Item (E);
6584 while Present (N) loop
6585 if Nkind (N) = N_Record_Representation_Clause then
6593 end Get_Record_Representation_Clause;
6595 ------------------------
6596 -- Has_Attach_Handler --
6597 ------------------------
6599 function Has_Attach_Handler (Id : E) return B is
6603 pragma Assert (Is_Protected_Type (Id));
6605 Ritem := First_Rep_Item (Id);
6606 while Present (Ritem) loop
6607 if Nkind (Ritem) = N_Pragma
6608 and then Pragma_Name (Ritem) = Name_Attach_Handler
6612 Next_Rep_Item (Ritem);
6617 end Has_Attach_Handler;
6623 function Has_Entries (Id : E) return B is
6627 pragma Assert (Is_Concurrent_Type (Id));
6629 Ent := First_Entity (Id);
6630 while Present (Ent) loop
6631 if Is_Entry (Ent) then
6635 Ent := Next_Entity (Ent);
6641 ----------------------------
6642 -- Has_Foreign_Convention --
6643 ----------------------------
6645 function Has_Foreign_Convention (Id : E) return B is
6647 -- While regular Intrinsics such as the Standard operators fit in the
6648 -- "Ada" convention, those with an Interface_Name materialize GCC
6649 -- builtin imports for which Ada special treatments shouldn't apply.
6651 return Convention (Id) in Foreign_Convention
6652 or else (Convention (Id) = Convention_Intrinsic
6653 and then Present (Interface_Name (Id)));
6654 end Has_Foreign_Convention;
6656 ---------------------------
6657 -- Has_Interrupt_Handler --
6658 ---------------------------
6660 function Has_Interrupt_Handler (Id : E) return B is
6664 pragma Assert (Is_Protected_Type (Id));
6666 Ritem := First_Rep_Item (Id);
6667 while Present (Ritem) loop
6668 if Nkind (Ritem) = N_Pragma
6669 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6673 Next_Rep_Item (Ritem);
6678 end Has_Interrupt_Handler;
6680 -----------------------------
6681 -- Has_Non_Null_Refinement --
6682 -----------------------------
6684 function Has_Non_Null_Refinement (Id : E) return B is
6686 -- "Refinement" is a concept applicable only to abstract states
6688 pragma Assert (Ekind (Id) = E_Abstract_State);
6690 if Has_Visible_Refinement (Id) then
6691 pragma Assert (Present (Refinement_Constituents (Id)));
6693 -- For a refinement to be non-null, the first constituent must be
6694 -- anything other than null.
6697 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6701 end Has_Non_Null_Refinement;
6703 -----------------------------
6704 -- Has_Null_Abstract_State --
6705 -----------------------------
6707 function Has_Null_Abstract_State (Id : E) return B is
6709 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6712 Present (Abstract_States (Id))
6713 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6714 end Has_Null_Abstract_State;
6716 -------------------------
6717 -- Has_Null_Refinement --
6718 -------------------------
6720 function Has_Null_Refinement (Id : E) return B is
6722 -- "Refinement" is a concept applicable only to abstract states
6724 pragma Assert (Ekind (Id) = E_Abstract_State);
6726 if Has_Visible_Refinement (Id) then
6727 pragma Assert (Present (Refinement_Constituents (Id)));
6729 -- For a refinement to be null, the state's sole constituent must be
6733 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6737 end Has_Null_Refinement;
6739 --------------------
6740 -- Has_Unmodified --
6741 --------------------
6743 function Has_Unmodified (E : Entity_Id) return Boolean is
6745 if Has_Pragma_Unmodified (E) then
6747 elsif Warnings_Off (E) then
6748 Set_Warnings_Off_Used_Unmodified (E);
6755 ---------------------
6756 -- Has_Unreferenced --
6757 ---------------------
6759 function Has_Unreferenced (E : Entity_Id) return Boolean is
6761 if Has_Pragma_Unreferenced (E) then
6763 elsif Warnings_Off (E) then
6764 Set_Warnings_Off_Used_Unreferenced (E);
6769 end Has_Unreferenced;
6771 ----------------------
6772 -- Has_Warnings_Off --
6773 ----------------------
6775 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6777 if Warnings_Off (E) then
6778 Set_Warnings_Off_Used (E);
6783 end Has_Warnings_Off;
6785 ------------------------------
6786 -- Implementation_Base_Type --
6787 ------------------------------
6789 function Implementation_Base_Type (Id : E) return E is
6794 Bastyp := Base_Type (Id);
6796 if Is_Incomplete_Or_Private_Type (Bastyp) then
6797 Imptyp := Underlying_Type (Bastyp);
6799 -- If we have an implementation type, then just return it,
6800 -- otherwise we return the Base_Type anyway. This can only
6801 -- happen in error situations and should avoid some error bombs.
6803 if Present (Imptyp) then
6804 return Base_Type (Imptyp);
6812 end Implementation_Base_Type;
6814 -------------------------
6815 -- Invariant_Procedure --
6816 -------------------------
6818 function Invariant_Procedure (Id : E) return E is
6822 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6824 if No (Subprograms_For_Type (Id)) then
6828 S := Subprograms_For_Type (Id);
6829 while Present (S) loop
6830 if Is_Invariant_Procedure (S) then
6833 S := Subprograms_For_Type (S);
6839 end Invariant_Procedure;
6845 -- Global flag table allowing rapid computation of this function
6847 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6848 (E_Enumeration_Subtype |
6850 E_Signed_Integer_Subtype |
6851 E_Modular_Integer_Subtype |
6852 E_Floating_Point_Subtype |
6853 E_Ordinary_Fixed_Point_Subtype |
6854 E_Decimal_Fixed_Point_Subtype |
6859 E_Record_Subtype_With_Private |
6860 E_Limited_Private_Subtype |
6862 E_Protected_Subtype |
6864 E_String_Literal_Subtype |
6865 E_Class_Wide_Subtype => False,
6868 function Is_Base_Type (Id : E) return Boolean is
6870 return Entity_Is_Base_Type (Ekind (Id));
6873 ---------------------
6874 -- Is_Boolean_Type --
6875 ---------------------
6877 function Is_Boolean_Type (Id : E) return B is
6879 return Root_Type (Id) = Standard_Boolean;
6880 end Is_Boolean_Type;
6882 ------------------------
6883 -- Is_Constant_Object --
6884 ------------------------
6886 function Is_Constant_Object (Id : E) return B is
6887 K : constant Entity_Kind := Ekind (Id);
6890 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6891 end Is_Constant_Object;
6893 --------------------
6894 -- Is_Discriminal --
6895 --------------------
6897 function Is_Discriminal (Id : E) return B is
6899 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6900 and then Present (Discriminal_Link (Id)));
6903 ----------------------
6904 -- Is_Dynamic_Scope --
6905 ----------------------
6907 function Is_Dynamic_Scope (Id : E) return B is
6910 Ekind (Id) = E_Block
6912 Ekind (Id) = E_Function
6914 Ekind (Id) = E_Procedure
6916 Ekind (Id) = E_Subprogram_Body
6918 Ekind (Id) = E_Task_Type
6920 (Ekind (Id) = E_Limited_Private_Type
6921 and then Present (Full_View (Id))
6922 and then Ekind (Full_View (Id)) = E_Task_Type)
6924 Ekind (Id) = E_Entry
6926 Ekind (Id) = E_Entry_Family
6928 Ekind (Id) = E_Return_Statement;
6929 end Is_Dynamic_Scope;
6931 --------------------
6932 -- Is_Entity_Name --
6933 --------------------
6935 function Is_Entity_Name (N : Node_Id) return Boolean is
6936 Kind : constant Node_Kind := Nkind (N);
6939 -- Identifiers, operator symbols, expanded names are entity names
6941 return Kind = N_Identifier
6942 or else Kind = N_Operator_Symbol
6943 or else Kind = N_Expanded_Name
6945 -- Attribute references are entity names if they refer to an entity.
6946 -- Note that we don't do this by testing for the presence of the
6947 -- Entity field in the N_Attribute_Reference node, since it may not
6948 -- have been set yet.
6950 or else (Kind = N_Attribute_Reference
6951 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6954 -----------------------
6955 -- Is_External_State --
6956 -----------------------
6958 function Is_External_State (Id : E) return B is
6961 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6962 end Is_External_State;
6968 function Is_Finalizer (Id : E) return B is
6970 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6973 ---------------------
6974 -- Is_Ghost_Entity --
6975 ---------------------
6977 -- Note: coding below allows for ghost variables. They are not currently
6978 -- implemented, so we will always get False for variables, but that is
6979 -- expected to change in the future.
6981 function Is_Ghost_Entity (Id : E) return B is
6983 if Present (Id) and then Ekind (Id) = E_Variable then
6984 return Convention (Id) = Convention_Ghost;
6986 return Is_Ghost_Subprogram (Id);
6988 end Is_Ghost_Entity;
6990 -------------------------
6991 -- Is_Ghost_Subprogram --
6992 -------------------------
6994 function Is_Ghost_Subprogram (Id : E) return B is
6996 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6997 return Convention (Id) = Convention_Ghost;
7001 end Is_Ghost_Subprogram;
7007 function Is_Null_State (Id : E) return B is
7010 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7013 -----------------------------------
7014 -- Is_Package_Or_Generic_Package --
7015 -----------------------------------
7017 function Is_Package_Or_Generic_Package (Id : E) return B is
7019 return Ekind_In (Id, E_Generic_Package, E_Package);
7020 end Is_Package_Or_Generic_Package;
7026 function Is_Prival (Id : E) return B is
7028 return (Ekind_In (Id, E_Constant, E_Variable)
7029 and then Present (Prival_Link (Id)));
7032 ----------------------------
7033 -- Is_Protected_Component --
7034 ----------------------------
7036 function Is_Protected_Component (Id : E) return B is
7038 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7039 end Is_Protected_Component;
7041 ----------------------------
7042 -- Is_Protected_Interface --
7043 ----------------------------
7045 function Is_Protected_Interface (Id : E) return B is
7046 Typ : constant Entity_Id := Base_Type (Id);
7048 if not Is_Interface (Typ) then
7050 elsif Is_Class_Wide_Type (Typ) then
7051 return Is_Protected_Interface (Etype (Typ));
7053 return Protected_Present (Type_Definition (Parent (Typ)));
7055 end Is_Protected_Interface;
7057 ------------------------------
7058 -- Is_Protected_Record_Type --
7059 ------------------------------
7061 function Is_Protected_Record_Type (Id : E) return B is
7064 Is_Concurrent_Record_Type (Id)
7065 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7066 end Is_Protected_Record_Type;
7068 --------------------------------
7069 -- Is_Standard_Character_Type --
7070 --------------------------------
7072 function Is_Standard_Character_Type (Id : E) return B is
7074 if Is_Type (Id) then
7076 R : constant Entity_Id := Root_Type (Id);
7079 R = Standard_Character
7081 R = Standard_Wide_Character
7083 R = Standard_Wide_Wide_Character;
7089 end Is_Standard_Character_Type;
7091 --------------------
7092 -- Is_String_Type --
7093 --------------------
7095 function Is_String_Type (Id : E) return B is
7097 return Ekind (Id) in String_Kind
7098 or else (Is_Array_Type (Id)
7099 and then Id /= Any_Composite
7100 and then Number_Dimensions (Id) = 1
7101 and then Is_Character_Type (Component_Type (Id)));
7104 -------------------------------
7105 -- Is_Synchronized_Interface --
7106 -------------------------------
7108 function Is_Synchronized_Interface (Id : E) return B is
7109 Typ : constant Entity_Id := Base_Type (Id);
7112 if not Is_Interface (Typ) then
7115 elsif Is_Class_Wide_Type (Typ) then
7116 return Is_Synchronized_Interface (Etype (Typ));
7119 return Protected_Present (Type_Definition (Parent (Typ)))
7120 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7121 or else Task_Present (Type_Definition (Parent (Typ)));
7123 end Is_Synchronized_Interface;
7125 -----------------------
7126 -- Is_Task_Interface --
7127 -----------------------
7129 function Is_Task_Interface (Id : E) return B is
7130 Typ : constant Entity_Id := Base_Type (Id);
7132 if not Is_Interface (Typ) then
7134 elsif Is_Class_Wide_Type (Typ) then
7135 return Is_Task_Interface (Etype (Typ));
7137 return Task_Present (Type_Definition (Parent (Typ)));
7139 end Is_Task_Interface;
7141 -------------------------
7142 -- Is_Task_Record_Type --
7143 -------------------------
7145 function Is_Task_Record_Type (Id : E) return B is
7148 Is_Concurrent_Record_Type (Id)
7149 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7150 end Is_Task_Record_Type;
7152 ------------------------
7153 -- Is_Wrapper_Package --
7154 ------------------------
7156 function Is_Wrapper_Package (Id : E) return B is
7158 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7159 end Is_Wrapper_Package;
7165 function Last_Formal (Id : E) return E is
7170 (Is_Overloadable (Id)
7171 or else Ekind_In (Id, E_Entry_Family,
7173 E_Subprogram_Type));
7175 if Ekind (Id) = E_Enumeration_Literal then
7179 Formal := First_Formal (Id);
7181 if Present (Formal) then
7182 while Present (Next_Formal (Formal)) loop
7183 Formal := Next_Formal (Formal);
7191 function Model_Emin_Value (Id : E) return Uint is
7193 return Machine_Emin_Value (Id);
7194 end Model_Emin_Value;
7196 -------------------------
7197 -- Model_Epsilon_Value --
7198 -------------------------
7200 function Model_Epsilon_Value (Id : E) return Ureal is
7201 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7203 return Radix ** (1 - Model_Mantissa_Value (Id));
7204 end Model_Epsilon_Value;
7206 --------------------------
7207 -- Model_Mantissa_Value --
7208 --------------------------
7210 function Model_Mantissa_Value (Id : E) return Uint is
7212 return Machine_Mantissa_Value (Id);
7213 end Model_Mantissa_Value;
7215 -----------------------
7216 -- Model_Small_Value --
7217 -----------------------
7219 function Model_Small_Value (Id : E) return Ureal is
7220 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7222 return Radix ** (Model_Emin_Value (Id) - 1);
7223 end Model_Small_Value;
7225 ------------------------
7226 -- Machine_Emax_Value --
7227 ------------------------
7229 function Machine_Emax_Value (Id : E) return Uint is
7230 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7233 case Float_Rep (Id) is
7236 when 1 .. 6 => return Uint_128;
7237 when 7 .. 15 => return 2**10;
7238 when 16 .. 33 => return 2**14;
7239 when others => return No_Uint;
7244 when 1 .. 9 => return 2**7 - 1;
7245 when 10 .. 15 => return 2**10 - 1;
7246 when others => return No_Uint;
7250 return Uint_2 ** Uint_7 - Uint_1;
7252 end Machine_Emax_Value;
7254 ------------------------
7255 -- Machine_Emin_Value --
7256 ------------------------
7258 function Machine_Emin_Value (Id : E) return Uint is
7260 case Float_Rep (Id) is
7261 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7262 when VAX_Native => return -Machine_Emax_Value (Id);
7263 when AAMP => return -Machine_Emax_Value (Id);
7265 end Machine_Emin_Value;
7267 ----------------------------
7268 -- Machine_Mantissa_Value --
7269 ----------------------------
7271 function Machine_Mantissa_Value (Id : E) return Uint is
7272 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7275 case Float_Rep (Id) is
7278 when 1 .. 6 => return Uint_24;
7279 when 7 .. 15 => return UI_From_Int (53);
7280 when 16 .. 18 => return Uint_64;
7281 when 19 .. 33 => return UI_From_Int (113);
7282 when others => return No_Uint;
7287 when 1 .. 6 => return Uint_24;
7288 when 7 .. 9 => return UI_From_Int (56);
7289 when 10 .. 15 => return UI_From_Int (53);
7290 when others => return No_Uint;
7295 when 1 .. 6 => return Uint_24;
7296 when 7 .. 9 => return UI_From_Int (40);
7297 when others => return No_Uint;
7300 end Machine_Mantissa_Value;
7302 -------------------------
7303 -- Machine_Radix_Value --
7304 -------------------------
7306 function Machine_Radix_Value (Id : E) return U is
7308 case Float_Rep (Id) is
7309 when IEEE_Binary | VAX_Native | AAMP =>
7312 end Machine_Radix_Value;
7314 --------------------
7315 -- Next_Component --
7316 --------------------
7318 function Next_Component (Id : E) return E is
7322 Comp_Id := Next_Entity (Id);
7323 while Present (Comp_Id) loop
7324 exit when Ekind (Comp_Id) = E_Component;
7325 Comp_Id := Next_Entity (Comp_Id);
7331 ------------------------------------
7332 -- Next_Component_Or_Discriminant --
7333 ------------------------------------
7335 function Next_Component_Or_Discriminant (Id : E) return E is
7339 Comp_Id := Next_Entity (Id);
7340 while Present (Comp_Id) loop
7341 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7342 Comp_Id := Next_Entity (Comp_Id);
7346 end Next_Component_Or_Discriminant;
7348 -----------------------
7349 -- Next_Discriminant --
7350 -----------------------
7352 -- This function actually implements both Next_Discriminant and
7353 -- Next_Stored_Discriminant by making sure that the Discriminant
7354 -- returned is of the same variety as Id.
7356 function Next_Discriminant (Id : E) return E is
7358 -- Derived Tagged types with private extensions look like this...
7360 -- E_Discriminant d1
7361 -- E_Discriminant d2
7363 -- E_Discriminant d1
7364 -- E_Discriminant d2
7367 -- so it is critical not to go past the leading discriminants
7372 pragma Assert (Ekind (Id) = E_Discriminant);
7375 D := Next_Entity (D);
7377 or else (Ekind (D) /= E_Discriminant
7378 and then not Is_Itype (D))
7383 exit when Ekind (D) = E_Discriminant
7384 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7388 end Next_Discriminant;
7394 function Next_Formal (Id : E) return E is
7398 -- Follow the chain of declared entities as long as the kind of the
7399 -- entity corresponds to a formal parameter. Skip internal entities
7400 -- that may have been created for implicit subtypes, in the process
7401 -- of analyzing default expressions.
7405 P := Next_Entity (P);
7407 if No (P) or else Is_Formal (P) then
7409 elsif not Is_Internal (P) then
7415 -----------------------------
7416 -- Next_Formal_With_Extras --
7417 -----------------------------
7419 function Next_Formal_With_Extras (Id : E) return E is
7421 if Present (Extra_Formal (Id)) then
7422 return Extra_Formal (Id);
7424 return Next_Formal (Id);
7426 end Next_Formal_With_Extras;
7432 function Next_Index (Id : Node_Id) return Node_Id is
7441 function Next_Literal (Id : E) return E is
7443 pragma Assert (Nkind (Id) in N_Entity);
7447 ------------------------------
7448 -- Next_Stored_Discriminant --
7449 ------------------------------
7451 function Next_Stored_Discriminant (Id : E) return E is
7453 -- See comment in Next_Discriminant
7455 return Next_Discriminant (Id);
7456 end Next_Stored_Discriminant;
7458 -----------------------
7459 -- Number_Dimensions --
7460 -----------------------
7462 function Number_Dimensions (Id : E) return Pos is
7467 if Ekind (Id) in String_Kind then
7472 T := First_Index (Id);
7473 while Present (T) loop
7480 end Number_Dimensions;
7482 --------------------
7483 -- Number_Entries --
7484 --------------------
7486 function Number_Entries (Id : E) return Nat is
7491 pragma Assert (Is_Concurrent_Type (Id));
7494 Ent := First_Entity (Id);
7495 while Present (Ent) loop
7496 if Is_Entry (Ent) then
7500 Ent := Next_Entity (Ent);
7506 --------------------
7507 -- Number_Formals --
7508 --------------------
7510 function Number_Formals (Id : E) return Pos is
7516 Formal := First_Formal (Id);
7517 while Present (Formal) loop
7519 Formal := Next_Formal (Formal);
7525 --------------------
7526 -- Parameter_Mode --
7527 --------------------
7529 function Parameter_Mode (Id : E) return Formal_Kind is
7534 ------------------------
7535 -- Predicate_Function --
7536 ------------------------
7538 function Predicate_Function (Id : E) return E is
7543 pragma Assert (Is_Type (Id));
7545 -- If type is private and has a completion, predicate may be defined
7546 -- on the full view.
7548 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7549 T := Full_View (Id);
7554 if No (Subprograms_For_Type (T)) then
7558 S := Subprograms_For_Type (T);
7559 while Present (S) loop
7560 if Is_Predicate_Function (S) then
7563 S := Subprograms_For_Type (S);
7569 end Predicate_Function;
7571 --------------------------
7572 -- Predicate_Function_M --
7573 --------------------------
7575 function Predicate_Function_M (Id : E) return E is
7580 pragma Assert (Is_Type (Id));
7582 -- If type is private and has a completion, predicate may be defined
7583 -- on the full view.
7585 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7586 T := Full_View (Id);
7591 if No (Subprograms_For_Type (T)) then
7595 S := Subprograms_For_Type (T);
7596 while Present (S) loop
7597 if Is_Predicate_Function_M (S) then
7600 S := Subprograms_For_Type (S);
7606 end Predicate_Function_M;
7608 -------------------------
7609 -- Present_In_Rep_Item --
7610 -------------------------
7612 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7616 Ritem := First_Rep_Item (E);
7618 while Present (Ritem) loop
7623 Next_Rep_Item (Ritem);
7627 end Present_In_Rep_Item;
7629 --------------------------
7630 -- Primitive_Operations --
7631 --------------------------
7633 function Primitive_Operations (Id : E) return L is
7635 if Is_Concurrent_Type (Id) then
7636 if Present (Corresponding_Record_Type (Id)) then
7637 return Direct_Primitive_Operations
7638 (Corresponding_Record_Type (Id));
7640 -- If expansion is disabled the corresponding record type is absent,
7641 -- but if the type has ancestors it may have primitive operations.
7643 elsif Is_Tagged_Type (Id) then
7644 return Direct_Primitive_Operations (Id);
7650 return Direct_Primitive_Operations (Id);
7652 end Primitive_Operations;
7654 ---------------------
7655 -- Record_Rep_Item --
7656 ---------------------
7658 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7660 Set_Next_Rep_Item (N, First_Rep_Item (E));
7661 Set_First_Rep_Item (E, N);
7662 end Record_Rep_Item;
7668 function Root_Type (Id : E) return E is
7672 pragma Assert (Nkind (Id) in N_Entity);
7674 T := Base_Type (Id);
7676 if Ekind (T) = E_Class_Wide_Type then
7688 -- Following test catches some error cases resulting from
7691 elsif No (Etyp) then
7692 Check_Error_Detected;
7695 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7698 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7704 -- Return if there is a circularity in the inheritance chain. This
7705 -- happens in some error situations and we do not want to get
7706 -- stuck in this loop.
7708 if T = Base_Type (Id) then
7715 ---------------------
7716 -- Safe_Emax_Value --
7717 ---------------------
7719 function Safe_Emax_Value (Id : E) return Uint is
7721 return Machine_Emax_Value (Id);
7722 end Safe_Emax_Value;
7724 ----------------------
7725 -- Safe_First_Value --
7726 ----------------------
7728 function Safe_First_Value (Id : E) return Ureal is
7730 return -Safe_Last_Value (Id);
7731 end Safe_First_Value;
7733 ---------------------
7734 -- Safe_Last_Value --
7735 ---------------------
7737 function Safe_Last_Value (Id : E) return Ureal is
7738 Radix : constant Uint := Machine_Radix_Value (Id);
7739 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7740 Emax : constant Uint := Safe_Emax_Value (Id);
7741 Significand : constant Uint := Radix ** Mantissa - 1;
7742 Exponent : constant Uint := Emax - Mantissa;
7748 (Num => Significand * 2 ** (Exponent mod 4),
7749 Den => -Exponent / 4,
7755 (Num => Significand,
7759 end Safe_Last_Value;
7765 function Scope_Depth (Id : E) return Uint is
7770 while Is_Record_Type (Scop) loop
7771 Scop := Scope (Scop);
7774 return Scope_Depth_Value (Scop);
7777 ---------------------
7778 -- Scope_Depth_Set --
7779 ---------------------
7781 function Scope_Depth_Set (Id : E) return B is
7783 return not Is_Record_Type (Id)
7784 and then Field22 (Id) /= Union_Id (Empty);
7785 end Scope_Depth_Set;
7787 -----------------------------
7788 -- Set_Component_Alignment --
7789 -----------------------------
7791 -- Component Alignment is encoded using two flags, Flag128/129 as
7792 -- follows. Note that both flags False = Align_Default, so that the
7793 -- default initialization of flags to False initializes component
7794 -- alignment to the default value as required.
7796 -- Flag128 Flag129 Value
7797 -- ------- ------- -----
7798 -- False False Calign_Default
7799 -- False True Calign_Component_Size
7800 -- True False Calign_Component_Size_4
7801 -- True True Calign_Storage_Unit
7803 procedure Set_Component_Alignment (Id : E; V : C) is
7805 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7806 and then Is_Base_Type (Id));
7809 when Calign_Default =>
7810 Set_Flag128 (Id, False);
7811 Set_Flag129 (Id, False);
7813 when Calign_Component_Size =>
7814 Set_Flag128 (Id, False);
7815 Set_Flag129 (Id, True);
7817 when Calign_Component_Size_4 =>
7818 Set_Flag128 (Id, True);
7819 Set_Flag129 (Id, False);
7821 when Calign_Storage_Unit =>
7822 Set_Flag128 (Id, True);
7823 Set_Flag129 (Id, True);
7825 end Set_Component_Alignment;
7827 -----------------------------
7828 -- Set_Invariant_Procedure --
7829 -----------------------------
7831 procedure Set_Invariant_Procedure (Id : E; V : E) is
7835 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7837 S := Subprograms_For_Type (Id);
7838 Set_Subprograms_For_Type (Id, V);
7839 Set_Subprograms_For_Type (V, S);
7841 -- Check for duplicate entry
7843 while Present (S) loop
7844 if Is_Invariant_Procedure (S) then
7845 raise Program_Error;
7847 S := Subprograms_For_Type (S);
7850 end Set_Invariant_Procedure;
7852 ----------------------------
7853 -- Set_Predicate_Function --
7854 ----------------------------
7856 procedure Set_Predicate_Function (Id : E; V : E) is
7860 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7862 S := Subprograms_For_Type (Id);
7863 Set_Subprograms_For_Type (Id, V);
7864 Set_Subprograms_For_Type (V, S);
7866 while Present (S) loop
7867 if Is_Predicate_Function (S) then
7868 raise Program_Error;
7870 S := Subprograms_For_Type (S);
7873 end Set_Predicate_Function;
7875 ------------------------------
7876 -- Set_Predicate_Function_M --
7877 ------------------------------
7879 procedure Set_Predicate_Function_M (Id : E; V : E) is
7883 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7885 S := Subprograms_For_Type (Id);
7886 Set_Subprograms_For_Type (Id, V);
7887 Set_Subprograms_For_Type (V, S);
7889 -- Check for duplicates
7891 while Present (S) loop
7892 if Is_Predicate_Function_M (S) then
7893 raise Program_Error;
7895 S := Subprograms_For_Type (S);
7898 end Set_Predicate_Function_M;
7904 function Size_Clause (Id : E) return N is
7906 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7909 ------------------------
7910 -- Stream_Size_Clause --
7911 ------------------------
7913 function Stream_Size_Clause (Id : E) return N is
7915 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7916 end Stream_Size_Clause;
7922 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7928 Kind := E_Access_Subtype;
7932 Kind := E_Array_Subtype;
7934 when E_Class_Wide_Type |
7935 E_Class_Wide_Subtype =>
7936 Kind := E_Class_Wide_Subtype;
7938 when E_Decimal_Fixed_Point_Type |
7939 E_Decimal_Fixed_Point_Subtype =>
7940 Kind := E_Decimal_Fixed_Point_Subtype;
7942 when E_Ordinary_Fixed_Point_Type |
7943 E_Ordinary_Fixed_Point_Subtype =>
7944 Kind := E_Ordinary_Fixed_Point_Subtype;
7946 when E_Private_Type |
7947 E_Private_Subtype =>
7948 Kind := E_Private_Subtype;
7950 when E_Limited_Private_Type |
7951 E_Limited_Private_Subtype =>
7952 Kind := E_Limited_Private_Subtype;
7954 when E_Record_Type_With_Private |
7955 E_Record_Subtype_With_Private =>
7956 Kind := E_Record_Subtype_With_Private;
7958 when E_Record_Type |
7960 Kind := E_Record_Subtype;
7962 when E_String_Type |
7964 Kind := E_String_Subtype;
7966 when Enumeration_Kind =>
7967 Kind := E_Enumeration_Subtype;
7970 Kind := E_Floating_Point_Subtype;
7972 when Signed_Integer_Kind =>
7973 Kind := E_Signed_Integer_Subtype;
7975 when Modular_Integer_Kind =>
7976 Kind := E_Modular_Integer_Subtype;
7978 when Protected_Kind =>
7979 Kind := E_Protected_Subtype;
7982 Kind := E_Task_Subtype;
7986 raise Program_Error;
7992 ---------------------
7993 -- Type_High_Bound --
7994 ---------------------
7996 function Type_High_Bound (Id : E) return Node_Id is
7997 Rng : constant Node_Id := Scalar_Range (Id);
7999 if Nkind (Rng) = N_Subtype_Indication then
8000 return High_Bound (Range_Expression (Constraint (Rng)));
8002 return High_Bound (Rng);
8004 end Type_High_Bound;
8006 --------------------
8007 -- Type_Low_Bound --
8008 --------------------
8010 function Type_Low_Bound (Id : E) return Node_Id is
8011 Rng : constant Node_Id := Scalar_Range (Id);
8013 if Nkind (Rng) = N_Subtype_Indication then
8014 return Low_Bound (Range_Expression (Constraint (Rng)));
8016 return Low_Bound (Rng);
8020 ---------------------
8021 -- Underlying_Type --
8022 ---------------------
8024 function Underlying_Type (Id : E) return E is
8026 -- For record_with_private the underlying type is always the direct
8027 -- full view. Never try to take the full view of the parent it
8028 -- doesn't make sense.
8030 if Ekind (Id) = E_Record_Type_With_Private then
8031 return Full_View (Id);
8033 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8035 -- If we have an incomplete or private type with a full view,
8036 -- then we return the Underlying_Type of this full view
8038 if Present (Full_View (Id)) then
8039 if Id = Full_View (Id) then
8041 -- Previous error in declaration
8046 return Underlying_Type (Full_View (Id));
8049 -- If we have an incomplete entity that comes from the limited
8050 -- view then we return the Underlying_Type of its non-limited
8053 elsif From_Limited_With (Id)
8054 and then Present (Non_Limited_View (Id))
8056 return Underlying_Type (Non_Limited_View (Id));
8058 -- Otherwise check for the case where we have a derived type or
8059 -- subtype, and if so get the Underlying_Type of the parent type.
8061 elsif Etype (Id) /= Id then
8062 return Underlying_Type (Etype (Id));
8064 -- Otherwise we have an incomplete or private type that has
8065 -- no full view, which means that we have not encountered the
8066 -- completion, so return Empty to indicate the underlying type
8067 -- is not yet known.
8073 -- For non-incomplete, non-private types, return the type itself
8074 -- Also for entities that are not types at all return the entity
8080 end Underlying_Type;
8086 function Vax_Float (Id : E) return B is
8088 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8091 ------------------------
8092 -- Write_Entity_Flags --
8093 ------------------------
8095 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8097 procedure W (Flag_Name : String; Flag : Boolean);
8098 -- Write out given flag if it is set
8104 procedure W (Flag_Name : String; Flag : Boolean) is
8108 Write_Str (Flag_Name);
8109 Write_Str (" = True");
8114 -- Start of processing for Write_Entity_Flags
8117 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8118 and then Is_Base_Type (Id)
8121 Write_Str ("Component_Alignment = ");
8123 case Component_Alignment (Id) is
8124 when Calign_Default =>
8125 Write_Str ("Calign_Default");
8127 when Calign_Component_Size =>
8128 Write_Str ("Calign_Component_Size");
8130 when Calign_Component_Size_4 =>
8131 Write_Str ("Calign_Component_Size_4");
8133 when Calign_Storage_Unit =>
8134 Write_Str ("Calign_Storage_Unit");
8140 W ("Address_Taken", Flag104 (Id));
8141 W ("Body_Needed_For_SAL", Flag40 (Id));
8142 W ("C_Pass_By_Copy", Flag125 (Id));
8143 W ("Can_Never_Be_Null", Flag38 (Id));
8144 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8145 W ("Debug_Info_Off", Flag166 (Id));
8146 W ("Default_Expressions_Processed", Flag108 (Id));
8147 W ("Delay_Cleanups", Flag114 (Id));
8148 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8149 W ("Depends_On_Private", Flag14 (Id));
8150 W ("Discard_Names", Flag88 (Id));
8151 W ("Elaboration_Entity_Required", Flag174 (Id));
8152 W ("Elaborate_Body_Desirable", Flag210 (Id));
8153 W ("Entry_Accepted", Flag152 (Id));
8154 W ("Can_Use_Internal_Rep", Flag229 (Id));
8155 W ("Finalize_Storage_Only", Flag158 (Id));
8156 W ("From_Limited_With", Flag159 (Id));
8157 W ("Has_Aliased_Components", Flag135 (Id));
8158 W ("Has_Alignment_Clause", Flag46 (Id));
8159 W ("Has_All_Calls_Remote", Flag79 (Id));
8160 W ("Has_Anonymous_Master", Flag253 (Id));
8161 W ("Has_Atomic_Components", Flag86 (Id));
8162 W ("Has_Biased_Representation", Flag139 (Id));
8163 W ("Has_Completion", Flag26 (Id));
8164 W ("Has_Completion_In_Body", Flag71 (Id));
8165 W ("Has_Complex_Representation", Flag140 (Id));
8166 W ("Has_Component_Size_Clause", Flag68 (Id));
8167 W ("Has_Contiguous_Rep", Flag181 (Id));
8168 W ("Has_Controlled_Component", Flag43 (Id));
8169 W ("Has_Controlling_Result", Flag98 (Id));
8170 W ("Has_Convention_Pragma", Flag119 (Id));
8171 W ("Has_Default_Aspect", Flag39 (Id));
8172 W ("Has_Delayed_Aspects", Flag200 (Id));
8173 W ("Has_Delayed_Freeze", Flag18 (Id));
8174 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8175 W ("Has_Discriminants", Flag5 (Id));
8176 W ("Has_Dispatch_Table", Flag220 (Id));
8177 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8178 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8179 W ("Has_Exit", Flag47 (Id));
8180 W ("Has_Forward_Instantiation", Flag175 (Id));
8181 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8182 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8183 W ("Has_Homonym", Flag56 (Id));
8184 W ("Has_Implicit_Dereference", Flag251 (Id));
8185 W ("Has_Independent_Components", Flag34 (Id));
8186 W ("Has_Inheritable_Invariants", Flag248 (Id));
8187 W ("Has_Initial_Value", Flag219 (Id));
8188 W ("Has_Invariants", Flag232 (Id));
8189 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8190 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8191 W ("Has_Master_Entity", Flag21 (Id));
8192 W ("Has_Missing_Return", Flag142 (Id));
8193 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8194 W ("Has_Non_Standard_Rep", Flag75 (Id));
8195 W ("Has_Object_Size_Clause", Flag172 (Id));
8196 W ("Has_Per_Object_Constraint", Flag154 (Id));
8197 W ("Has_Postconditions", Flag240 (Id));
8198 W ("Has_Pragma_Controlled", Flag27 (Id));
8199 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8200 W ("Has_Pragma_Inline", Flag157 (Id));
8201 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8202 W ("Has_Pragma_No_Inline", Flag201 (Id));
8203 W ("Has_Pragma_Ordered", Flag198 (Id));
8204 W ("Has_Pragma_Pack", Flag121 (Id));
8205 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8206 W ("Has_Pragma_Pure", Flag203 (Id));
8207 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8208 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8209 W ("Has_Pragma_Unmodified", Flag233 (Id));
8210 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8211 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8212 W ("Has_Predicates", Flag250 (Id));
8213 W ("Has_Primitive_Operations", Flag120 (Id));
8214 W ("Has_Private_Ancestor", Flag151 (Id));
8215 W ("Has_Private_Declaration", Flag155 (Id));
8216 W ("Has_Qualified_Name", Flag161 (Id));
8217 W ("Has_RACW", Flag214 (Id));
8218 W ("Has_Record_Rep_Clause", Flag65 (Id));
8219 W ("Has_Recursive_Call", Flag143 (Id));
8220 W ("Has_Shift_Operator", Flag267 (Id));
8221 W ("Has_Size_Clause", Flag29 (Id));
8222 W ("Has_Small_Clause", Flag67 (Id));
8223 W ("Has_Specified_Layout", Flag100 (Id));
8224 W ("Has_Specified_Stream_Input", Flag190 (Id));
8225 W ("Has_Specified_Stream_Output", Flag191 (Id));
8226 W ("Has_Specified_Stream_Read", Flag192 (Id));
8227 W ("Has_Specified_Stream_Write", Flag193 (Id));
8228 W ("Has_Static_Discriminants", Flag211 (Id));
8229 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8230 W ("Has_Storage_Size_Clause", Flag23 (Id));
8231 W ("Has_Stream_Size_Clause", Flag184 (Id));
8232 W ("Has_Task", Flag30 (Id));
8233 W ("Has_Thunks", Flag228 (Id));
8234 W ("Has_Unchecked_Union", Flag123 (Id));
8235 W ("Has_Unknown_Discriminants", Flag72 (Id));
8236 W ("Has_Up_Level_Access", Flag215 (Id));
8237 W ("Has_Visible_Refinement", Flag263 (Id));
8238 W ("Has_Volatile_Components", Flag87 (Id));
8239 W ("Has_Xref_Entry", Flag182 (Id));
8240 W ("In_Package_Body", Flag48 (Id));
8241 W ("In_Private_Part", Flag45 (Id));
8242 W ("In_Use", Flag8 (Id));
8243 W ("Is_AST_Entry", Flag132 (Id));
8244 W ("Is_Abstract_Subprogram", Flag19 (Id));
8245 W ("Is_Abstract_Type", Flag146 (Id));
8246 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8247 W ("Is_Access_Constant", Flag69 (Id));
8248 W ("Is_Ada_2005_Only", Flag185 (Id));
8249 W ("Is_Ada_2012_Only", Flag199 (Id));
8250 W ("Is_Aliased", Flag15 (Id));
8251 W ("Is_Asynchronous", Flag81 (Id));
8252 W ("Is_Atomic", Flag85 (Id));
8253 W ("Is_Bit_Packed_Array", Flag122 (Id));
8254 W ("Is_CPP_Class", Flag74 (Id));
8255 W ("Is_Called", Flag102 (Id));
8256 W ("Is_Character_Type", Flag63 (Id));
8257 W ("Is_Child_Unit", Flag73 (Id));
8258 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8259 W ("Is_Compilation_Unit", Flag149 (Id));
8260 W ("Is_Completely_Hidden", Flag103 (Id));
8261 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8262 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8263 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8264 W ("Is_Constrained", Flag12 (Id));
8265 W ("Is_Constructor", Flag76 (Id));
8266 W ("Is_Controlled", Flag42 (Id));
8267 W ("Is_Controlling_Formal", Flag97 (Id));
8268 W ("Is_Descendent_Of_Address", Flag223 (Id));
8269 W ("Is_Discrim_SO_Function", Flag176 (Id));
8270 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8271 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8272 W ("Is_Dispatching_Operation", Flag6 (Id));
8273 W ("Is_Eliminated", Flag124 (Id));
8274 W ("Is_Entry_Formal", Flag52 (Id));
8275 W ("Is_Exported", Flag99 (Id));
8276 W ("Is_First_Subtype", Flag70 (Id));
8277 W ("Is_For_Access_Subtype", Flag118 (Id));
8278 W ("Is_Formal_Subprogram", Flag111 (Id));
8279 W ("Is_Frozen", Flag4 (Id));
8280 W ("Is_Generic_Actual_Type", Flag94 (Id));
8281 W ("Is_Generic_Instance", Flag130 (Id));
8282 W ("Is_Generic_Type", Flag13 (Id));
8283 W ("Is_Hidden", Flag57 (Id));
8284 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8285 W ("Is_Immediately_Visible", Flag7 (Id));
8286 W ("Is_Implementation_Defined", Flag254 (Id));
8287 W ("Is_Imported", Flag24 (Id));
8288 W ("Is_Independent", Flag268 (Id));
8289 W ("Is_Inlined", Flag11 (Id));
8290 W ("Is_Instantiated", Flag126 (Id));
8291 W ("Is_Interface", Flag186 (Id));
8292 W ("Is_Internal", Flag17 (Id));
8293 W ("Is_Interrupt_Handler", Flag89 (Id));
8294 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8295 W ("Is_Invariant_Procedure", Flag257 (Id));
8296 W ("Is_Itype", Flag91 (Id));
8297 W ("Is_Known_Non_Null", Flag37 (Id));
8298 W ("Is_Known_Null", Flag204 (Id));
8299 W ("Is_Known_Valid", Flag170 (Id));
8300 W ("Is_Limited_Composite", Flag106 (Id));
8301 W ("Is_Limited_Interface", Flag197 (Id));
8302 W ("Is_Limited_Record", Flag25 (Id));
8303 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8304 W ("Is_Non_Static_Subtype", Flag109 (Id));
8305 W ("Is_Null_Init_Proc", Flag178 (Id));
8306 W ("Is_Obsolescent", Flag153 (Id));
8307 W ("Is_Only_Out_Parameter", Flag226 (Id));
8308 W ("Is_Optional_Parameter", Flag134 (Id));
8309 W ("Is_Package_Body_Entity", Flag160 (Id));
8310 W ("Is_Packed", Flag51 (Id));
8311 W ("Is_Packed_Array_Type", Flag138 (Id));
8312 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8313 W ("Is_Predicate_Function", Flag255 (Id));
8314 W ("Is_Predicate_Function_M", Flag256 (Id));
8315 W ("Is_Preelaborated", Flag59 (Id));
8316 W ("Is_Primitive", Flag218 (Id));
8317 W ("Is_Primitive_Wrapper", Flag195 (Id));
8318 W ("Is_Private_Composite", Flag107 (Id));
8319 W ("Is_Private_Descendant", Flag53 (Id));
8320 W ("Is_Private_Primitive", Flag245 (Id));
8321 W ("Is_Processed_Transient", Flag252 (Id));
8322 W ("Is_Public", Flag10 (Id));
8323 W ("Is_Pure", Flag44 (Id));
8324 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8325 W ("Is_RACW_Stub_Type", Flag244 (Id));
8326 W ("Is_Raised", Flag224 (Id));
8327 W ("Is_Remote_Call_Interface", Flag62 (Id));
8328 W ("Is_Remote_Types", Flag61 (Id));
8329 W ("Is_Renaming_Of_Object", Flag112 (Id));
8330 W ("Is_Return_Object", Flag209 (Id));
8331 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8332 W ("Is_Shared_Passive", Flag60 (Id));
8333 W ("Is_Statically_Allocated", Flag28 (Id));
8334 W ("Is_Tag", Flag78 (Id));
8335 W ("Is_Tagged_Type", Flag55 (Id));
8336 W ("Is_Thunk", Flag225 (Id));
8337 W ("Is_Trivial_Subprogram", Flag235 (Id));
8338 W ("Is_True_Constant", Flag163 (Id));
8339 W ("Is_Unchecked_Union", Flag117 (Id));
8340 W ("Is_Underlying_Record_View", Flag246 (Id));
8341 W ("Is_Unsigned_Type", Flag144 (Id));
8342 W ("Is_VMS_Exception", Flag133 (Id));
8343 W ("Is_Valued_Procedure", Flag127 (Id));
8344 W ("Is_Visible_Formal", Flag206 (Id));
8345 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8346 W ("Is_Volatile", Flag16 (Id));
8347 W ("Itype_Printed", Flag202 (Id));
8348 W ("Kill_Elaboration_Checks", Flag32 (Id));
8349 W ("Kill_Range_Checks", Flag33 (Id));
8350 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8351 W ("Low_Bound_Tested", Flag205 (Id));
8352 W ("Machine_Radix_10", Flag84 (Id));
8353 W ("Materialize_Entity", Flag168 (Id));
8354 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8355 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8356 W ("Must_Have_Preelab_Init", Flag208 (Id));
8357 W ("Needs_Debug_Info", Flag147 (Id));
8358 W ("Needs_No_Actuals", Flag22 (Id));
8359 W ("Never_Set_In_Source", Flag115 (Id));
8360 W ("No_Pool_Assigned", Flag131 (Id));
8361 W ("No_Return", Flag113 (Id));
8362 W ("No_Strict_Aliasing", Flag136 (Id));
8363 W ("Non_Binary_Modulus", Flag58 (Id));
8364 W ("Nonzero_Is_True", Flag162 (Id));
8365 W ("OK_To_Rename", Flag247 (Id));
8366 W ("OK_To_Reorder_Components", Flag239 (Id));
8367 W ("Optimize_Alignment_Space", Flag241 (Id));
8368 W ("Optimize_Alignment_Time", Flag242 (Id));
8369 W ("Overlays_Constant", Flag243 (Id));
8370 W ("Reachable", Flag49 (Id));
8371 W ("Referenced", Flag156 (Id));
8372 W ("Referenced_As_LHS", Flag36 (Id));
8373 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8374 W ("Renamed_In_Spec", Flag231 (Id));
8375 W ("Requires_Overriding", Flag213 (Id));
8376 W ("Return_Present", Flag54 (Id));
8377 W ("Returns_By_Ref", Flag90 (Id));
8378 W ("Reverse_Bit_Order", Flag164 (Id));
8379 W ("Reverse_Storage_Order", Flag93 (Id));
8380 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8381 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8382 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8383 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8384 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8385 W ("Static_Elaboration_Desired", Flag77 (Id));
8386 W ("Strict_Alignment", Flag145 (Id));
8387 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8388 W ("Suppress_Initialization", Flag105 (Id));
8389 W ("Suppress_Style_Checks", Flag165 (Id));
8390 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8391 W ("Treat_As_Volatile", Flag41 (Id));
8392 W ("Universal_Aliasing", Flag216 (Id));
8393 W ("Used_As_Generic_Actual", Flag222 (Id));
8394 W ("Uses_Sec_Stack", Flag95 (Id));
8395 W ("Warnings_Off", Flag96 (Id));
8396 W ("Warnings_Off_Used", Flag236 (Id));
8397 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8398 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8399 W ("Was_Hidden", Flag196 (Id));
8400 end Write_Entity_Flags;
8402 -----------------------
8403 -- Write_Entity_Info --
8404 -----------------------
8406 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8408 procedure Write_Attribute (Which : String; Nam : E);
8409 -- Write attribute value with given string name
8411 procedure Write_Kind (Id : Entity_Id);
8412 -- Write Ekind field of entity
8414 ---------------------
8415 -- Write_Attribute --
8416 ---------------------
8418 procedure Write_Attribute (Which : String; Nam : E) is
8422 Write_Int (Int (Nam));
8424 Write_Name (Chars (Nam));
8426 end Write_Attribute;
8432 procedure Write_Kind (Id : Entity_Id) is
8433 K : constant String := Entity_Kind'Image (Ekind (Id));
8437 Write_Str (" Kind ");
8439 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8440 Write_Str ("TAGGED ");
8443 Write_Str (K (3 .. K'Length));
8446 if Is_Type (Id) and then Depends_On_Private (Id) then
8447 Write_Str ("Depends_On_Private ");
8451 -- Start of processing for Write_Entity_Info
8455 Write_Attribute ("Name ", Id);
8456 Write_Int (Int (Id));
8460 Write_Attribute (" Type ", Etype (Id));
8462 Write_Attribute (" Scope ", Scope (Id));
8467 when Discrete_Kind =>
8468 Write_Str ("Bounds: Id = ");
8470 if Present (Scalar_Range (Id)) then
8471 Write_Int (Int (Type_Low_Bound (Id)));
8472 Write_Str (" .. Id = ");
8473 Write_Int (Int (Type_High_Bound (Id)));
8475 Write_Str ("Empty");
8486 (" Component Type ", Component_Type (Id));
8489 Write_Str (" Indexes ");
8491 Index := First_Index (Id);
8492 while Present (Index) loop
8493 Write_Attribute (" ", Etype (Index));
8494 Index := Next_Index (Index);
8502 (" Directly Designated Type ",
8503 Directly_Designated_Type (Id));
8506 when Overloadable_Kind =>
8507 if Present (Homonym (Id)) then
8508 Write_Str (" Homonym ");
8509 Write_Name (Chars (Homonym (Id)));
8511 Write_Int (Int (Homonym (Id)));
8518 if Ekind (Scope (Id)) in Record_Kind then
8520 " Original_Record_Component ",
8521 Original_Record_Component (Id));
8522 Write_Int (Int (Original_Record_Component (Id)));
8526 when others => null;
8528 end Write_Entity_Info;
8530 -----------------------
8531 -- Write_Field6_Name --
8532 -----------------------
8534 procedure Write_Field6_Name (Id : Entity_Id) is
8535 pragma Warnings (Off, Id);
8537 Write_Str ("First_Rep_Item");
8538 end Write_Field6_Name;
8540 -----------------------
8541 -- Write_Field7_Name --
8542 -----------------------
8544 procedure Write_Field7_Name (Id : Entity_Id) is
8545 pragma Warnings (Off, Id);
8547 Write_Str ("Freeze_Node");
8548 end Write_Field7_Name;
8550 -----------------------
8551 -- Write_Field8_Name --
8552 -----------------------
8554 procedure Write_Field8_Name (Id : Entity_Id) is
8558 Write_Str ("Associated_Node_For_Itype");
8561 Write_Str ("Dependent_Instances");
8564 Write_Str ("First_Exit_Statement");
8567 Write_Str ("Hiding_Loop_Variable");
8571 E_Subprogram_Body =>
8572 Write_Str ("Mechanism");
8576 Write_Str ("Normalized_First_Bit");
8579 Write_Str ("Postcondition_Proc");
8581 when E_Abstract_State =>
8582 Write_Str ("Refinement_Constituents");
8584 when E_Return_Statement =>
8585 Write_Str ("Return_Applies_To");
8588 Write_Str ("Field8??");
8590 end Write_Field8_Name;
8592 -----------------------
8593 -- Write_Field9_Name --
8594 -----------------------
8596 procedure Write_Field9_Name (Id : Entity_Id) is
8600 Write_Str ("Class_Wide_Type");
8603 Write_Str ("Current_Value");
8605 when E_Abstract_State =>
8606 Write_Str ("Part_Of_Constituents");
8609 E_Generic_Function |
8611 E_Generic_Procedure |
8614 Write_Str ("Renaming_Map");
8617 Write_Str ("Field9??");
8619 end Write_Field9_Name;
8621 ------------------------
8622 -- Write_Field10_Name --
8623 ------------------------
8625 procedure Write_Field10_Name (Id : Entity_Id) is
8628 when E_Abstract_State |
8630 Write_Str ("Encapsulating_State");
8632 when Class_Wide_Kind |
8638 Write_Str ("Direct_Primitive_Operations");
8641 Write_Str ("Float_Rep");
8643 when E_In_Parameter |
8645 Write_Str ("Discriminal_Link");
8651 Write_Str ("Handler_Records");
8655 Write_Str ("Normalized_Position_Max");
8658 Write_Str ("Field10??");
8660 end Write_Field10_Name;
8662 ------------------------
8663 -- Write_Field11_Name --
8664 ------------------------
8666 procedure Write_Field11_Name (Id : Entity_Id) is
8670 Write_Str ("Block_Node");
8674 Write_Str ("Component_Bit_Offset");
8677 Write_Str ("Entry_Component");
8679 when E_Enumeration_Literal =>
8680 Write_Str ("Enumeration_Pos");
8684 Write_Str ("Full_View");
8686 when E_Generic_Package =>
8687 Write_Str ("Generic_Homonym");
8690 Write_Str ("Last_Aggregate_Assignment");
8696 Write_Str ("Protected_Body_Subprogram");
8699 Write_Str ("Field11??");
8701 end Write_Field11_Name;
8703 ------------------------
8704 -- Write_Field12_Name --
8705 ------------------------
8707 procedure Write_Field12_Name (Id : Entity_Id) is
8711 Write_Str ("Associated_Formal_Package");
8714 Write_Str ("Barrier_Function");
8716 when E_Enumeration_Literal =>
8717 Write_Str ("Enumeration_Rep");
8725 E_In_Out_Parameter |
8729 Write_Str ("Esize");
8733 Write_Str ("Next_Inlined_Subprogram");
8736 Write_Str ("Field12??");
8738 end Write_Field12_Name;
8740 ------------------------
8741 -- Write_Field13_Name --
8742 ------------------------
8744 procedure Write_Field13_Name (Id : Entity_Id) is
8749 Write_Str ("Component_Clause");
8752 Write_Str ("Elaboration_Entity");
8756 Generic_Unit_Kind =>
8757 Write_Str ("Elaboration_Entity");
8761 Write_Str ("Extra_Accessibility");
8764 Write_Str ("RM_Size");
8767 Write_Str ("Field13??");
8769 end Write_Field13_Name;
8771 -----------------------
8772 -- Write_Field14_Name --
8773 -----------------------
8775 procedure Write_Field14_Name (Id : Entity_Id) is
8784 Write_Str ("Alignment");
8788 Write_Str ("First_Optional_Parameter");
8792 Write_Str ("Normalized_Position");
8795 E_Generic_Package =>
8796 Write_Str ("Shadow_Entities");
8799 Write_Str ("Field14??");
8801 end Write_Field14_Name;
8803 ------------------------
8804 -- Write_Field15_Name --
8805 ------------------------
8807 procedure Write_Field15_Name (Id : Entity_Id) is
8810 when E_Discriminant =>
8811 Write_Str ("Discriminant_Number");
8814 Write_Str ("DT_Entry_Count");
8818 Write_Str ("DT_Position");
8820 when E_Protected_Type =>
8821 Write_Str ("Entry_Bodies_Array");
8824 Write_Str ("Entry_Parameters_Type");
8827 Write_Str ("Extra_Formal");
8829 when Enumeration_Kind =>
8830 Write_Str ("Lit_Indexes");
8834 Write_Str ("Related_Instance");
8836 when Decimal_Fixed_Point_Kind =>
8837 Write_Str ("Scale_Value");
8841 Write_Str ("Status_Flag_Or_Transient_Decl");
8845 Write_Str ("Storage_Size_Variable");
8847 when E_String_Literal_Subtype =>
8848 Write_Str ("String_Literal_Low_Bound");
8851 Write_Str ("Field15??");
8853 end Write_Field15_Name;
8855 ------------------------
8856 -- Write_Field16_Name --
8857 ------------------------
8859 procedure Write_Field16_Name (Id : Entity_Id) is
8862 when E_Record_Type |
8863 E_Record_Type_With_Private =>
8864 Write_Str ("Access_Disp_Table");
8866 when E_Abstract_State =>
8867 Write_Str ("Body_References");
8869 when E_Record_Subtype |
8870 E_Class_Wide_Subtype =>
8871 Write_Str ("Cloned_Subtype");
8875 Write_Str ("DTC_Entity");
8878 Write_Str ("Entry_Formal");
8883 Write_Str ("First_Private_Entity");
8885 when Enumeration_Kind =>
8886 Write_Str ("Lit_Strings");
8888 when E_String_Literal_Subtype =>
8889 Write_Str ("String_Literal_Length");
8893 Write_Str ("Unset_Reference");
8896 Write_Str ("Field16??");
8898 end Write_Field16_Name;
8900 ------------------------
8901 -- Write_Field17_Name --
8902 ------------------------
8904 procedure Write_Field17_Name (Id : Entity_Id) is
8909 E_Generic_In_Out_Parameter |
8911 Write_Str ("Actual_Subtype");
8914 Write_Str ("Digits_Value");
8916 when E_Discriminant =>
8917 Write_Str ("Discriminal");
8926 E_Generic_Function |
8928 E_Generic_Procedure |
8936 E_Return_Statement |
8938 E_Subprogram_Type =>
8939 Write_Str ("First_Entity");
8942 Write_Str ("First_Index");
8944 when Enumeration_Kind =>
8945 Write_Str ("First_Literal");
8948 Write_Str ("Master_Id");
8950 when Modular_Integer_Kind =>
8951 Write_Str ("Modulus");
8953 when E_Abstract_State |
8954 E_Incomplete_Type =>
8955 Write_Str ("Non_Limited_View");
8957 when E_Incomplete_Subtype =>
8958 if From_Limited_With (Id) then
8959 Write_Str ("Non_Limited_View");
8963 Write_Str ("Prival");
8966 Write_Str ("Field17??");
8968 end Write_Field17_Name;
8970 ------------------------
8971 -- Write_Field18_Name --
8972 ------------------------
8974 procedure Write_Field18_Name (Id : Entity_Id) is
8977 when E_Enumeration_Literal |
8981 Write_Str ("Alias");
8983 when E_Record_Type =>
8984 Write_Str ("Corresponding_Concurrent_Type");
8986 when E_Subprogram_Body =>
8987 Write_Str ("Corresponding_Protected_Entry");
8989 when Concurrent_Kind =>
8990 Write_Str ("Corresponding_Record_Type");
8995 Write_Str ("Enclosing_Scope");
8997 when E_Entry_Index_Parameter =>
8998 Write_Str ("Entry_Index_Constant");
9000 when E_Class_Wide_Subtype |
9001 E_Access_Protected_Subprogram_Type |
9002 E_Anonymous_Access_Protected_Subprogram_Type |
9003 E_Access_Subprogram_Type |
9005 Write_Str ("Equivalent_Type");
9007 when Fixed_Point_Kind =>
9008 Write_Str ("Delta_Value");
9010 when Incomplete_Or_Private_Kind |
9012 Write_Str ("Private_Dependents");
9015 Write_Str ("Renamed_Object");
9019 E_Generic_Function |
9020 E_Generic_Procedure |
9021 E_Generic_Package =>
9022 Write_Str ("Renamed_Entity");
9025 Write_Str ("Field18??");
9027 end Write_Field18_Name;
9029 -----------------------
9030 -- Write_Field19_Name --
9031 -----------------------
9033 procedure Write_Field19_Name (Id : Entity_Id) is
9037 E_Generic_Package =>
9038 Write_Str ("Body_Entity");
9040 when E_Discriminant =>
9041 Write_Str ("Corresponding_Discriminant");
9044 Write_Str ("Default_Aspect_Value");
9046 when E_Array_Type =>
9047 Write_Str ("Default_Component_Value");
9049 when E_Record_Type =>
9050 Write_Str ("Parent_Subtype");
9054 Write_Str ("Size_Check_Code");
9056 when E_Package_Body |
9058 Write_Str ("Spec_Entity");
9060 when Private_Kind =>
9061 Write_Str ("Underlying_Full_View");
9063 when E_Function | E_Operator | E_Subprogram_Type =>
9064 Write_Str ("Extra_Accessibility_Of_Result");
9067 Write_Str ("Field19??");
9069 end Write_Field19_Name;
9071 -----------------------
9072 -- Write_Field20_Name --
9073 -----------------------
9075 procedure Write_Field20_Name (Id : Entity_Id) is
9079 Write_Str ("Component_Type");
9081 when E_In_Parameter |
9082 E_Generic_In_Parameter =>
9083 Write_Str ("Default_Value");
9086 Write_Str ("Directly_Designated_Type");
9089 Write_Str ("Discriminant_Checking_Func");
9091 when E_Discriminant =>
9092 Write_Str ("Discriminant_Default_Value");
9101 E_Generic_Function |
9103 E_Generic_Procedure |
9111 E_Return_Statement |
9113 E_Subprogram_Type =>
9114 Write_Str ("Last_Entity");
9118 Write_Str ("Prival_Link");
9121 Write_Str ("Scalar_Range");
9124 Write_Str ("Register_Exception_Call");
9127 Write_Str ("Field20??");
9129 end Write_Field20_Name;
9131 -----------------------
9132 -- Write_Field21_Name --
9133 -----------------------
9135 procedure Write_Field21_Name (Id : Entity_Id) is
9139 Write_Str ("Accept_Address");
9141 when E_In_Parameter =>
9142 Write_Str ("Default_Expr_Function");
9144 when Concurrent_Kind |
9145 Incomplete_Or_Private_Kind |
9149 Write_Str ("Discriminant_Constraint");
9154 E_Generic_Function |
9156 E_Generic_Procedure |
9158 Write_Str ("Interface_Name");
9161 Modular_Integer_Kind =>
9162 Write_Str ("Original_Array_Type");
9164 when Fixed_Point_Kind =>
9165 Write_Str ("Small_Value");
9168 Write_Str ("Field21??");
9170 end Write_Field21_Name;
9172 -----------------------
9173 -- Write_Field22_Name --
9174 -----------------------
9176 procedure Write_Field22_Name (Id : Entity_Id) is
9180 Write_Str ("Associated_Storage_Pool");
9183 Write_Str ("Component_Size");
9185 when E_Record_Type =>
9186 Write_Str ("Corresponding_Remote_Type");
9190 Write_Str ("Original_Record_Component");
9192 when E_Enumeration_Literal =>
9193 Write_Str ("Enumeration_Rep_Expr");
9196 Write_Str ("Exception_Code");
9198 when E_Record_Type_With_Private |
9199 E_Record_Subtype_With_Private |
9202 E_Limited_Private_Type |
9203 E_Limited_Private_Subtype =>
9204 Write_Str ("Private_View");
9207 Write_Str ("Protected_Formal");
9217 E_Generic_Function |
9218 E_Generic_Procedure |
9221 E_Return_Statement |
9224 Write_Str ("Scope_Depth_Value");
9227 Write_Str ("Shared_Var_Procs_Instance");
9230 Write_Str ("Field22??");
9232 end Write_Field22_Name;
9234 ------------------------
9235 -- Write_Field23_Name --
9236 ------------------------
9238 procedure Write_Field23_Name (Id : Entity_Id) is
9241 when E_Discriminant =>
9242 Write_Str ("CR_Discriminant");
9245 Write_Str ("Entry_Cancel_Parameter");
9247 when E_Enumeration_Type =>
9248 Write_Str ("Enum_Pos_To_Rep");
9252 Write_Str ("Extra_Constrained");
9255 Write_Str ("Finalization_Master");
9257 when E_Generic_Function |
9259 E_Generic_Procedure =>
9260 Write_Str ("Inner_Instances");
9263 Write_Str ("Packed_Array_Type");
9266 Write_Str ("Protection_Object");
9268 when Concurrent_Kind |
9269 Incomplete_Or_Private_Kind |
9273 Write_Str ("Stored_Constraint");
9277 if Present (Scope (Id))
9278 and then Is_Protected_Type (Scope (Id))
9280 Write_Str ("Protection_Object");
9282 Write_Str ("Generic_Renamings");
9286 if Is_Generic_Instance (Id) then
9287 Write_Str ("Generic_Renamings");
9289 Write_Str ("Limited_View");
9293 Write_Str ("Field23??");
9295 end Write_Field23_Name;
9297 ------------------------
9298 -- Write_Field24_Name --
9299 ------------------------
9301 procedure Write_Field24_Name (Id : Entity_Id) is
9307 Write_Str ("Related_Expression");
9310 Write_Str ("Field24???");
9312 end Write_Field24_Name;
9314 ------------------------
9315 -- Write_Field25_Name --
9316 ------------------------
9318 procedure Write_Field25_Name (Id : Entity_Id) is
9321 when E_Generic_Package |
9323 Write_Str ("Abstract_States");
9326 Write_Str ("Debug_Renaming_Link");
9329 Write_Str ("DT_Offset_To_Top_Func");
9333 Write_Str ("Interface_Alias");
9335 when E_Record_Type |
9337 E_Record_Type_With_Private |
9338 E_Record_Subtype_With_Private =>
9339 Write_Str ("Interfaces");
9343 Write_Str ("Related_Array_Object");
9346 Write_Str ("Task_Body_Procedure");
9350 Write_Str ("PPC_Wrapper");
9352 when E_Enumeration_Subtype |
9353 E_Modular_Integer_Subtype |
9354 E_Signed_Integer_Subtype =>
9355 Write_Str ("Static_Predicate");
9358 Write_Str ("Field25??");
9360 end Write_Field25_Name;
9362 ------------------------
9363 -- Write_Field26_Name --
9364 ------------------------
9366 procedure Write_Field26_Name (Id : Entity_Id) is
9369 when E_Record_Type |
9370 E_Record_Type_With_Private =>
9371 Write_Str ("Dispatch_Table_Wrappers");
9373 when E_In_Out_Parameter |
9376 Write_Str ("Last_Assignment");
9378 when E_Access_Subprogram_Type =>
9379 Write_Str ("Original_Access_Type");
9381 when E_Generic_Package |
9383 Write_Str ("Package_Instantiation");
9387 Write_Str ("Related_Type");
9390 Write_Str ("Relative_Deadline_Variable");
9394 Write_Str ("Overridden_Operation");
9397 Write_Str ("Field26??");
9399 end Write_Field26_Name;
9401 ------------------------
9402 -- Write_Field27_Name --
9403 ------------------------
9405 procedure Write_Field27_Name (Id : Entity_Id) is
9410 Write_Str ("Current_Use_Clause");
9415 Write_Str ("Related_Type");
9419 Write_Str ("Wrapped_Entity");
9422 Write_Str ("Field27??");
9424 end Write_Field27_Name;
9426 ------------------------
9427 -- Write_Field28_Name --
9428 ------------------------
9430 procedure Write_Field28_Name (Id : Entity_Id) is
9438 E_Subprogram_Type =>
9439 Write_Str ("Extra_Formals");
9443 Write_Str ("Finalizer");
9447 Write_Str ("Initialization_Statements");
9449 when E_Record_Type =>
9450 Write_Str ("Underlying_Record_View");
9453 Write_Str ("Field28??");
9455 end Write_Field28_Name;
9457 ------------------------
9458 -- Write_Field29_Name --
9459 ------------------------
9461 procedure Write_Field29_Name (Id : Entity_Id) is
9466 Write_Str ("BIP_Initialization_Call");
9469 Write_Str ("Subprograms_For_Type");
9472 Write_Str ("Field29??");
9474 end Write_Field29_Name;
9476 ------------------------
9477 -- Write_Field30_Name --
9478 ------------------------
9480 procedure Write_Field30_Name (Id : Entity_Id) is
9484 Write_Str ("Corresponding_Equality");
9487 Write_Str ("Static_Initialization");
9490 Write_Str ("Field30??");
9492 end Write_Field30_Name;
9494 ------------------------
9495 -- Write_Field31_Name --
9496 ------------------------
9498 procedure Write_Field31_Name (Id : Entity_Id) is
9503 Write_Str ("Thunk_Entity");
9506 Write_Str ("Field31??");
9508 end Write_Field31_Name;
9510 ------------------------
9511 -- Write_Field32_Name --
9512 ------------------------
9514 procedure Write_Field32_Name (Id : Entity_Id) is
9518 E_Generic_Function |
9520 E_Generic_Procedure |
9524 E_Subprogram_Body =>
9525 Write_Str ("SPARK_Pragma");
9528 Write_Str ("Field32??");
9530 end Write_Field32_Name;
9532 ------------------------
9533 -- Write_Field33_Name --
9534 ------------------------
9536 procedure Write_Field33_Name (Id : Entity_Id) is
9539 when E_Generic_Package |
9542 Write_Str ("SPARK_Aux_Pragma");
9548 Write_Str ("Linker_Section_Pragma");
9551 Write_Str ("Field33??");
9553 end Write_Field33_Name;
9555 ------------------------
9556 -- Write_Field34_Name --
9557 ------------------------
9559 procedure Write_Field34_Name (Id : Entity_Id) is
9569 Generic_Subprogram_Kind |
9571 Write_Str ("Contract");
9574 Write_Str ("Field34??");
9576 end Write_Field34_Name;
9578 ------------------------
9579 -- Write_Field35_Name --
9580 ------------------------
9582 procedure Write_Field35_Name (Id : Entity_Id) is
9585 when Subprogram_Kind =>
9586 Write_Str ("Import_Pragma");
9588 Write_Str ("Field35??");
9590 end Write_Field35_Name;
9592 -------------------------
9593 -- Iterator Procedures --
9594 -------------------------
9596 procedure Proc_Next_Component (N : in out Node_Id) is
9598 N := Next_Component (N);
9599 end Proc_Next_Component;
9601 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9603 N := Next_Entity (N);
9604 while Present (N) loop
9605 exit when Ekind_In (N, E_Component, E_Discriminant);
9606 N := Next_Entity (N);
9608 end Proc_Next_Component_Or_Discriminant;
9610 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9612 N := Next_Discriminant (N);
9613 end Proc_Next_Discriminant;
9615 procedure Proc_Next_Formal (N : in out Node_Id) is
9617 N := Next_Formal (N);
9618 end Proc_Next_Formal;
9620 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9622 N := Next_Formal_With_Extras (N);
9623 end Proc_Next_Formal_With_Extras;
9625 procedure Proc_Next_Index (N : in out Node_Id) is
9627 N := Next_Index (N);
9628 end Proc_Next_Index;
9630 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9632 N := Next_Inlined_Subprogram (N);
9633 end Proc_Next_Inlined_Subprogram;
9635 procedure Proc_Next_Literal (N : in out Node_Id) is
9637 N := Next_Literal (N);
9638 end Proc_Next_Literal;
9640 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9642 N := Next_Stored_Discriminant (N);
9643 end Proc_Next_Stored_Discriminant;