1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2015, 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 -- Refinement_Constituents Elist8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Part_Of_Constituents Elist9
91 -- Encapsulating_State Node10
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
96 -- Normalized_Position_Max Uint10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- Normalized_Position Uint14
118 -- Postconditions_Proc Node14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Pending_Access_Types Elist15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
130 -- Access_Disp_Table Elist16
131 -- Body_References Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- Scale_Value Uint16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Lit_Indexes Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
162 -- String_Literal_Low_Bound Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Default_Aspect_Component_Value Node19
167 -- Default_Aspect_Value Node19
168 -- Entry_Bodies_Array Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Non_Limited_View Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Impl_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
216 -- Subps_Index Uint24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Discrete_Predicate List25
225 -- Static_Real_Or_String_Predicate Node25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Storage_Size_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Original_Access_Type Node28
242 -- Relative_Deadline_Variable Node28
243 -- Underlying_Record_View Node28
245 -- BIP_Initialization_Call Node29
246 -- Subprograms_For_Type Node29
248 -- Corresponding_Equality Node30
249 -- Last_Aggregate_Assignment Node30
250 -- Static_Initialization Node30
252 -- Derived_Type_Link Node31
253 -- Thunk_Entity Node31
254 -- Activation_Record_Component Node31
256 -- SPARK_Pragma Node32
257 -- No_Tagged_Streams_Pragma Node32
259 -- Linker_Section_Pragma Node33
260 -- SPARK_Aux_Pragma Node33
264 -- Import_Pragma Node35
273 ---------------------------------------------
274 -- Usage of Flags in Defining Entity Nodes --
275 ---------------------------------------------
277 -- All flags are unique, there is no overlaying, so each flag is physically
278 -- present in every entity. However, for many of the flags, it only makes
279 -- sense for them to be set true for certain subsets of entity kinds. See
280 -- the spec of Einfo for further details.
282 -- Is_Inlined_Always Flag1
283 -- Is_Hidden_Non_Overridden_Subpgm Flag2
284 -- Has_Default_Init_Cond Flag3
286 -- Has_Discriminants Flag5
287 -- Is_Dispatching_Operation Flag6
288 -- Is_Immediately_Visible Flag7
290 -- Is_Potentially_Use_Visible Flag9
294 -- Is_Constrained Flag12
295 -- Is_Generic_Type Flag13
296 -- Depends_On_Private Flag14
298 -- Is_Volatile Flag16
299 -- Is_Internal Flag17
300 -- Has_Delayed_Freeze Flag18
301 -- Is_Abstract_Subprogram Flag19
302 -- Is_Concurrent_Record_Type Flag20
304 -- Has_Master_Entity Flag21
305 -- Needs_No_Actuals Flag22
306 -- Has_Storage_Size_Clause Flag23
307 -- Is_Imported Flag24
308 -- Is_Limited_Record Flag25
309 -- Has_Completion Flag26
310 -- Has_Pragma_Controlled Flag27
311 -- Is_Statically_Allocated Flag28
312 -- Has_Size_Clause Flag29
315 -- Checks_May_Be_Suppressed Flag31
316 -- Kill_Elaboration_Checks Flag32
317 -- Kill_Range_Checks Flag33
318 -- Has_Independent_Components Flag34
319 -- Is_Class_Wide_Equivalent_Type Flag35
320 -- Referenced_As_LHS Flag36
321 -- Is_Known_Non_Null Flag37
322 -- Can_Never_Be_Null Flag38
323 -- Has_Default_Aspect Flag39
324 -- Body_Needed_For_SAL Flag40
326 -- Treat_As_Volatile Flag41
327 -- Is_Controlled Flag42
328 -- Has_Controlled_Component Flag43
330 -- In_Private_Part Flag45
331 -- Has_Alignment_Clause Flag46
333 -- In_Package_Body Flag48
335 -- Delay_Subprogram_Descriptors Flag50
338 -- Is_Entry_Formal Flag52
339 -- Is_Private_Descendant Flag53
340 -- Return_Present Flag54
341 -- Is_Tagged_Type Flag55
342 -- Has_Homonym Flag56
344 -- Non_Binary_Modulus Flag58
345 -- Is_Preelaborated Flag59
346 -- Is_Shared_Passive Flag60
348 -- Is_Remote_Types Flag61
349 -- Is_Remote_Call_Interface Flag62
350 -- Is_Character_Type Flag63
351 -- Is_Intrinsic_Subprogram Flag64
352 -- Has_Record_Rep_Clause Flag65
353 -- Has_Enumeration_Rep_Clause Flag66
354 -- Has_Small_Clause Flag67
355 -- Has_Component_Size_Clause Flag68
356 -- Is_Access_Constant Flag69
357 -- Is_First_Subtype Flag70
359 -- Has_Completion_In_Body Flag71
360 -- Has_Unknown_Discriminants Flag72
361 -- Is_Child_Unit Flag73
362 -- Is_CPP_Class Flag74
363 -- Has_Non_Standard_Rep Flag75
364 -- Is_Constructor Flag76
365 -- Static_Elaboration_Desired Flag77
367 -- Has_All_Calls_Remote Flag79
368 -- Is_Constr_Subt_For_U_Nominal Flag80
370 -- Is_Asynchronous Flag81
371 -- Has_Gigi_Rep_Item Flag82
372 -- Has_Machine_Radix_Clause Flag83
373 -- Machine_Radix_10 Flag84
375 -- Has_Atomic_Components Flag86
376 -- Has_Volatile_Components Flag87
377 -- Discard_Names Flag88
378 -- Is_Interrupt_Handler Flag89
379 -- Returns_By_Ref Flag90
382 -- Size_Known_At_Compile_Time Flag92
383 -- Reverse_Storage_Order Flag93
384 -- Is_Generic_Actual_Type Flag94
385 -- Uses_Sec_Stack Flag95
386 -- Warnings_Off Flag96
387 -- Is_Controlling_Formal Flag97
388 -- Has_Controlling_Result Flag98
389 -- Is_Exported Flag99
390 -- Has_Specified_Layout Flag100
392 -- Has_Nested_Block_With_Handler Flag101
394 -- Is_Completely_Hidden Flag103
395 -- Address_Taken Flag104
396 -- Suppress_Initialization Flag105
397 -- Is_Limited_Composite Flag106
398 -- Is_Private_Composite Flag107
399 -- Default_Expressions_Processed Flag108
400 -- Is_Non_Static_Subtype Flag109
401 -- Has_Out_Or_In_Out_Parameter Flag110
403 -- Is_Formal_Subprogram Flag111
404 -- Is_Renaming_Of_Object Flag112
406 -- Delay_Cleanups Flag114
407 -- Never_Set_In_Source Flag115
408 -- Is_Visible_Lib_Unit Flag116
409 -- Is_Unchecked_Union Flag117
410 -- Is_For_Access_Subtype Flag118
411 -- Has_Convention_Pragma Flag119
412 -- Has_Primitive_Operations Flag120
414 -- Has_Pragma_Pack Flag121
415 -- Is_Bit_Packed_Array Flag122
416 -- Has_Unchecked_Union Flag123
417 -- Is_Eliminated Flag124
418 -- C_Pass_By_Copy Flag125
419 -- Is_Instantiated Flag126
420 -- Is_Valued_Procedure Flag127
421 -- (used for Component_Alignment) Flag128
422 -- (used for Component_Alignment) Flag129
423 -- Is_Generic_Instance Flag130
425 -- No_Pool_Assigned Flag131
426 -- Is_Default_Init_Cond_Procedure Flag132
427 -- Has_Inherited_Default_Init_Cond Flag133
428 -- Returns_Limited_View Flag134
429 -- Has_Aliased_Components Flag135
430 -- No_Strict_Aliasing Flag136
431 -- Is_Machine_Code_Subprogram Flag137
432 -- Is_Packed_Array_Impl_Type Flag138
433 -- Has_Biased_Representation Flag139
434 -- Has_Complex_Representation Flag140
436 -- Is_Constr_Subt_For_UN_Aliased Flag141
437 -- Has_Missing_Return Flag142
438 -- Has_Recursive_Call Flag143
439 -- Is_Unsigned_Type Flag144
440 -- Strict_Alignment Flag145
441 -- Is_Abstract_Type Flag146
442 -- Needs_Debug_Info Flag147
443 -- Suppress_Elaboration_Warnings Flag148
444 -- Is_Compilation_Unit Flag149
445 -- Has_Pragma_Elaborate_Body Flag150
447 -- Has_Private_Ancestor Flag151
448 -- Entry_Accepted Flag152
449 -- Is_Obsolescent Flag153
450 -- Has_Per_Object_Constraint Flag154
451 -- Has_Private_Declaration Flag155
452 -- Referenced Flag156
453 -- Has_Pragma_Inline Flag157
454 -- Finalize_Storage_Only Flag158
455 -- From_Limited_With Flag159
456 -- Is_Package_Body_Entity Flag160
458 -- Has_Qualified_Name Flag161
459 -- Nonzero_Is_True Flag162
460 -- Is_True_Constant Flag163
461 -- Reverse_Bit_Order Flag164
462 -- Suppress_Style_Checks Flag165
463 -- Debug_Info_Off Flag166
464 -- Sec_Stack_Needed_For_Return Flag167
465 -- Materialize_Entity Flag168
466 -- Has_Pragma_Thread_Local_Storage Flag169
467 -- Is_Known_Valid Flag170
469 -- Is_Hidden_Open_Scope Flag171
470 -- Has_Object_Size_Clause Flag172
471 -- Has_Fully_Qualified_Name Flag173
472 -- Elaboration_Entity_Required Flag174
473 -- Has_Forward_Instantiation Flag175
474 -- Is_Discrim_SO_Function Flag176
475 -- Size_Depends_On_Discriminant Flag177
476 -- Is_Null_Init_Proc Flag178
477 -- Has_Pragma_Pure_Function Flag179
478 -- Has_Pragma_Unreferenced Flag180
480 -- Has_Contiguous_Rep Flag181
481 -- Has_Xref_Entry Flag182
482 -- Must_Be_On_Byte_Boundary Flag183
483 -- Has_Stream_Size_Clause Flag184
484 -- Is_Ada_2005_Only Flag185
485 -- Is_Interface Flag186
486 -- Has_Constrained_Partial_View Flag187
487 -- Uses_Lock_Free Flag188
488 -- Is_Pure_Unit_Access_Type Flag189
489 -- Has_Specified_Stream_Input Flag190
491 -- Has_Specified_Stream_Output Flag191
492 -- Has_Specified_Stream_Read Flag192
493 -- Has_Specified_Stream_Write Flag193
494 -- Is_Local_Anonymous_Access Flag194
495 -- Is_Primitive_Wrapper Flag195
496 -- Was_Hidden Flag196
497 -- Is_Limited_Interface Flag197
498 -- Has_Pragma_Ordered Flag198
499 -- Is_Ada_2012_Only Flag199
501 -- Has_Delayed_Aspects Flag200
502 -- Has_Pragma_No_Inline Flag201
503 -- Itype_Printed Flag202
504 -- Has_Pragma_Pure Flag203
505 -- Is_Known_Null Flag204
506 -- Low_Bound_Tested Flag205
507 -- Is_Visible_Formal Flag206
508 -- Known_To_Have_Preelab_Init Flag207
509 -- Must_Have_Preelab_Init Flag208
510 -- Is_Return_Object Flag209
511 -- Elaborate_Body_Desirable Flag210
513 -- Has_Static_Discriminants Flag211
514 -- Has_Pragma_Unreferenced_Objects Flag212
515 -- Requires_Overriding Flag213
517 -- Has_Uplevel_Reference Flag215
518 -- Universal_Aliasing Flag216
519 -- Suppress_Value_Tracking_On_Call Flag217
520 -- Is_Primitive Flag218
521 -- Has_Initial_Value Flag219
522 -- Has_Dispatch_Table Flag220
524 -- Has_Pragma_Preelab_Init Flag221
525 -- Used_As_Generic_Actual Flag222
526 -- Is_Descendent_Of_Address Flag223
529 -- Is_Only_Out_Parameter Flag226
530 -- Referenced_As_Out_Parameter Flag227
531 -- Has_Thunks Flag228
532 -- Can_Use_Internal_Rep Flag229
533 -- Has_Pragma_Inline_Always Flag230
535 -- Renamed_In_Spec Flag231
536 -- Has_Invariants Flag232
537 -- Has_Pragma_Unmodified Flag233
538 -- Is_Dispatch_Table_Entity Flag234
539 -- Is_Trivial_Subprogram Flag235
540 -- Warnings_Off_Used Flag236
541 -- Warnings_Off_Used_Unmodified Flag237
542 -- Warnings_Off_Used_Unreferenced Flag238
543 -- OK_To_Reorder_Components Flag239
544 -- Has_Expanded_Contract Flag240
546 -- Optimize_Alignment_Space Flag241
547 -- Optimize_Alignment_Time Flag242
548 -- Overlays_Constant Flag243
549 -- Is_RACW_Stub_Type Flag244
550 -- Is_Private_Primitive Flag245
551 -- Is_Underlying_Record_View Flag246
552 -- OK_To_Rename Flag247
553 -- Has_Inheritable_Invariants Flag248
554 -- Is_Safe_To_Reevaluate Flag249
555 -- Has_Predicates Flag250
557 -- Has_Implicit_Dereference Flag251
558 -- Is_Processed_Transient Flag252
559 -- Has_Anonymous_Master Flag253
560 -- Is_Implementation_Defined Flag254
561 -- Is_Predicate_Function Flag255
562 -- Is_Predicate_Function_M Flag256
563 -- Is_Invariant_Procedure Flag257
564 -- Has_Dynamic_Predicate_Aspect Flag258
565 -- Has_Static_Predicate_Aspect Flag259
566 -- Has_Loop_Entry_Attributes Flag260
568 -- Has_Delayed_Rep_Aspects Flag261
569 -- May_Inherit_Delayed_Rep_Aspects Flag262
570 -- Has_Visible_Refinement Flag263
571 -- Is_Discriminant_Check_Function Flag264
572 -- SPARK_Pragma_Inherited Flag265
573 -- SPARK_Aux_Pragma_Inherited Flag266
574 -- Has_Shift_Operator Flag267
575 -- Is_Independent Flag268
576 -- Has_Static_Predicate Flag269
577 -- Stores_Attribute_Old_Prefix Flag270
579 -- Has_Protected Flag271
580 -- SSO_Set_Low_By_Default Flag272
581 -- SSO_Set_High_By_Default Flag273
582 -- Is_Generic_Actual_Subprogram Flag274
583 -- No_Predicate_On_Actual Flag275
584 -- No_Dynamic_Predicate_On_Actual Flag276
585 -- Is_Checked_Ghost_Entity Flag277
586 -- Is_Ignored_Ghost_Entity Flag278
587 -- Contains_Ignored_Ghost_Code Flag279
588 -- Partial_View_Has_Unknown_Discr Flag280
590 -- Is_Static_Type Flag281
591 -- Has_Nested_Subprogram Flag282
592 -- Is_Uplevel_Referenced_Entity Flag283
593 -- Is_Unimplemented Flag284
612 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
614 -----------------------
615 -- Local subprograms --
616 -----------------------
619 (State_Id : Entity_Id;
620 Option_Nam : Name_Id) return Boolean;
621 -- Determine whether abstract state State_Id has particular option denoted
622 -- by the name Option_Nam.
628 function Float_Rep (Id : E) return F is
629 pragma Assert (Is_Floating_Point_Type (Id));
631 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
639 (State_Id : Entity_Id;
640 Option_Nam : Name_Id) return Boolean
642 Decl : constant Node_Id := Parent (State_Id);
647 pragma Assert (Ekind (State_Id) = E_Abstract_State);
649 -- The declaration of abstract states with options appear as an
650 -- extension aggregate. If this is not the case, the option is not
653 if Nkind (Decl) /= N_Extension_Aggregate then
659 Opt := First (Expressions (Decl));
660 while Present (Opt) loop
662 -- Currently the only simple option allowed is External
664 if Nkind (Opt) = N_Identifier
665 and then Chars (Opt) = Name_External
666 and then Chars (Opt) = Option_Nam
674 -- Complex options with various specifiers
676 Opt := First (Component_Associations (Decl));
677 while Present (Opt) loop
678 Opt_Nam := First (Choices (Opt));
680 if Nkind (Opt_Nam) = N_Identifier
681 and then Chars (Opt_Nam) = Option_Nam
692 --------------------------------
693 -- Attribute Access Functions --
694 --------------------------------
696 function Abstract_States (Id : E) return L is
698 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
702 function Accept_Address (Id : E) return L is
707 function Access_Disp_Table (Id : E) return L is
709 pragma Assert (Ekind_In (Id, E_Record_Type,
711 return Elist16 (Implementation_Base_Type (Id));
712 end Access_Disp_Table;
714 function Activation_Record_Component (Id : E) return E is
716 pragma Assert (Ekind_In (Id, E_Constant,
723 end Activation_Record_Component;
725 function Actual_Subtype (Id : E) return E is
728 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
729 or else Is_Formal (Id));
733 function Address_Taken (Id : E) return B is
738 function Alias (Id : E) return E is
741 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
745 function Alignment (Id : E) return U is
747 pragma Assert (Is_Type (Id)
748 or else Is_Formal (Id)
749 or else Ekind_In (Id, E_Loop_Parameter,
756 function Associated_Formal_Package (Id : E) return E is
758 pragma Assert (Ekind (Id) = E_Package);
760 end Associated_Formal_Package;
762 function Associated_Node_For_Itype (Id : E) return N is
765 end Associated_Node_For_Itype;
767 function Associated_Storage_Pool (Id : E) return E is
769 pragma Assert (Is_Access_Type (Id));
770 return Node22 (Root_Type (Id));
771 end Associated_Storage_Pool;
773 function Barrier_Function (Id : E) return N is
775 pragma Assert (Is_Entry (Id));
777 end Barrier_Function;
779 function Block_Node (Id : E) return N is
781 pragma Assert (Ekind (Id) = E_Block);
785 function Body_Entity (Id : E) return E is
787 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
791 function Body_Needed_For_SAL (Id : E) return B is
794 (Ekind (Id) = E_Package
795 or else Is_Subprogram (Id)
796 or else Is_Generic_Unit (Id));
798 end Body_Needed_For_SAL;
800 function Body_References (Id : E) return L is
802 pragma Assert (Ekind (Id) = E_Abstract_State);
806 function BIP_Initialization_Call (Id : E) return N is
808 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
810 end BIP_Initialization_Call;
812 function C_Pass_By_Copy (Id : E) return B is
814 pragma Assert (Is_Record_Type (Id));
815 return Flag125 (Implementation_Base_Type (Id));
818 function Can_Never_Be_Null (Id : E) return B is
821 end Can_Never_Be_Null;
823 function Checks_May_Be_Suppressed (Id : E) return B is
826 end Checks_May_Be_Suppressed;
828 function Class_Wide_Type (Id : E) return E is
830 pragma Assert (Is_Type (Id));
834 function Cloned_Subtype (Id : E) return E is
836 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
840 function Component_Bit_Offset (Id : E) return U is
842 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
844 end Component_Bit_Offset;
846 function Component_Clause (Id : E) return N is
848 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
850 end Component_Clause;
852 function Component_Size (Id : E) return U is
854 pragma Assert (Is_Array_Type (Id));
855 return Uint22 (Implementation_Base_Type (Id));
858 function Component_Type (Id : E) return E is
860 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
861 return Node20 (Implementation_Base_Type (Id));
864 function Corresponding_Concurrent_Type (Id : E) return E is
866 pragma Assert (Ekind (Id) = E_Record_Type);
868 end Corresponding_Concurrent_Type;
870 function Corresponding_Discriminant (Id : E) return E is
872 pragma Assert (Ekind (Id) = E_Discriminant);
874 end Corresponding_Discriminant;
876 function Corresponding_Equality (Id : E) return E is
879 (Ekind (Id) = E_Function
880 and then not Comes_From_Source (Id)
881 and then Chars (Id) = Name_Op_Ne);
883 end Corresponding_Equality;
885 function Corresponding_Protected_Entry (Id : E) return E is
887 pragma Assert (Ekind (Id) = E_Subprogram_Body);
889 end Corresponding_Protected_Entry;
891 function Corresponding_Record_Type (Id : E) return E is
893 pragma Assert (Is_Concurrent_Type (Id));
895 end Corresponding_Record_Type;
897 function Corresponding_Remote_Type (Id : E) return E is
900 end Corresponding_Remote_Type;
902 function Current_Use_Clause (Id : E) return E is
904 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
906 end Current_Use_Clause;
908 function Current_Value (Id : E) return N is
910 pragma Assert (Ekind (Id) in Object_Kind);
914 function CR_Discriminant (Id : E) return E is
919 function Debug_Info_Off (Id : E) return B is
924 function Debug_Renaming_Link (Id : E) return E is
927 end Debug_Renaming_Link;
929 function Default_Aspect_Component_Value (Id : E) return N is
931 pragma Assert (Is_Array_Type (Id));
932 return Node19 (Base_Type (Id));
933 end Default_Aspect_Component_Value;
935 function Default_Aspect_Value (Id : E) return N is
937 pragma Assert (Is_Scalar_Type (Id));
938 return Node19 (Base_Type (Id));
939 end Default_Aspect_Value;
941 function Default_Expr_Function (Id : E) return E is
943 pragma Assert (Is_Formal (Id));
945 end Default_Expr_Function;
947 function Default_Expressions_Processed (Id : E) return B is
950 end Default_Expressions_Processed;
952 function Default_Value (Id : E) return N is
954 pragma Assert (Is_Formal (Id));
958 function Delay_Cleanups (Id : E) return B is
963 function Delay_Subprogram_Descriptors (Id : E) return B is
966 end Delay_Subprogram_Descriptors;
968 function Delta_Value (Id : E) return R is
970 pragma Assert (Is_Fixed_Point_Type (Id));
974 function Dependent_Instances (Id : E) return L is
976 pragma Assert (Is_Generic_Instance (Id));
978 end Dependent_Instances;
980 function Depends_On_Private (Id : E) return B is
982 pragma Assert (Nkind (Id) in N_Entity);
984 end Depends_On_Private;
986 function Derived_Type_Link (Id : E) return E is
988 pragma Assert (Is_Type (Id));
989 return Node31 (Base_Type (Id));
990 end Derived_Type_Link;
992 function Digits_Value (Id : E) return U is
995 (Is_Floating_Point_Type (Id)
996 or else Is_Decimal_Fixed_Point_Type (Id));
1000 function Direct_Primitive_Operations (Id : E) return L is
1002 pragma Assert (Is_Tagged_Type (Id));
1003 return Elist10 (Id);
1004 end Direct_Primitive_Operations;
1006 function Directly_Designated_Type (Id : E) return E is
1008 pragma Assert (Is_Access_Type (Id));
1010 end Directly_Designated_Type;
1012 function Discard_Names (Id : E) return B is
1017 function Discriminal (Id : E) return E is
1019 pragma Assert (Ekind (Id) = E_Discriminant);
1023 function Discriminal_Link (Id : E) return N is
1026 end Discriminal_Link;
1028 function Discriminant_Checking_Func (Id : E) return E is
1030 pragma Assert (Ekind (Id) = E_Component);
1032 end Discriminant_Checking_Func;
1034 function Discriminant_Constraint (Id : E) return L is
1036 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1037 return Elist21 (Id);
1038 end Discriminant_Constraint;
1040 function Discriminant_Default_Value (Id : E) return N is
1042 pragma Assert (Ekind (Id) = E_Discriminant);
1044 end Discriminant_Default_Value;
1046 function Discriminant_Number (Id : E) return U is
1048 pragma Assert (Ekind (Id) = E_Discriminant);
1050 end Discriminant_Number;
1052 function Dispatch_Table_Wrappers (Id : E) return L is
1054 pragma Assert (Ekind_In (Id, E_Record_Type,
1056 return Elist26 (Implementation_Base_Type (Id));
1057 end Dispatch_Table_Wrappers;
1059 function DT_Entry_Count (Id : E) return U is
1061 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1065 function DT_Offset_To_Top_Func (Id : E) return E is
1067 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1069 end DT_Offset_To_Top_Func;
1071 function DT_Position (Id : E) return U is
1073 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1074 and then Present (DTC_Entity (Id)));
1078 function DTC_Entity (Id : E) return E is
1080 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1084 function Elaborate_Body_Desirable (Id : E) return B is
1086 pragma Assert (Ekind (Id) = E_Package);
1087 return Flag210 (Id);
1088 end Elaborate_Body_Desirable;
1090 function Elaboration_Entity (Id : E) return E is
1095 Ekind (Id) = E_Package
1097 Is_Generic_Unit (Id));
1099 end Elaboration_Entity;
1101 function Elaboration_Entity_Required (Id : E) return B is
1106 Ekind (Id) = E_Package
1108 Is_Generic_Unit (Id));
1109 return Flag174 (Id);
1110 end Elaboration_Entity_Required;
1112 function Encapsulating_State (Id : E) return N is
1114 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1116 end Encapsulating_State;
1118 function Enclosing_Scope (Id : E) return E is
1121 end Enclosing_Scope;
1123 function Entry_Accepted (Id : E) return B is
1125 pragma Assert (Is_Entry (Id));
1126 return Flag152 (Id);
1129 function Entry_Bodies_Array (Id : E) return E is
1132 end Entry_Bodies_Array;
1134 function Entry_Cancel_Parameter (Id : E) return E is
1137 end Entry_Cancel_Parameter;
1139 function Entry_Component (Id : E) return E is
1142 end Entry_Component;
1144 function Entry_Formal (Id : E) return E is
1149 function Entry_Index_Constant (Id : E) return N is
1151 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1153 end Entry_Index_Constant;
1155 function Contains_Ignored_Ghost_Code (Id : E) return B is
1158 (Ekind_In (Id, E_Block,
1162 E_Generic_Procedure,
1166 E_Subprogram_Body));
1167 return Flag279 (Id);
1168 end Contains_Ignored_Ghost_Code;
1170 function Contract (Id : E) return N is
1173 (Ekind_In (Id, E_Entry,
1180 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1184 function Entry_Parameters_Type (Id : E) return E is
1187 end Entry_Parameters_Type;
1189 function Enum_Pos_To_Rep (Id : E) return E is
1191 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1193 end Enum_Pos_To_Rep;
1195 function Enumeration_Pos (Id : E) return Uint is
1197 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1199 end Enumeration_Pos;
1201 function Enumeration_Rep (Id : E) return U is
1203 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1205 end Enumeration_Rep;
1207 function Enumeration_Rep_Expr (Id : E) return N is
1209 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1211 end Enumeration_Rep_Expr;
1213 function Equivalent_Type (Id : E) return E is
1216 (Ekind_In (Id, E_Class_Wide_Type,
1217 E_Class_Wide_Subtype,
1218 E_Access_Subprogram_Type,
1219 E_Access_Protected_Subprogram_Type,
1220 E_Anonymous_Access_Protected_Subprogram_Type,
1221 E_Access_Subprogram_Type,
1224 end Equivalent_Type;
1226 function Esize (Id : E) return Uint is
1231 function Extra_Accessibility (Id : E) return E is
1234 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1236 end Extra_Accessibility;
1238 function Extra_Accessibility_Of_Result (Id : E) return E is
1240 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1242 end Extra_Accessibility_Of_Result;
1244 function Extra_Constrained (Id : E) return E is
1246 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1248 end Extra_Constrained;
1250 function Extra_Formal (Id : E) return E is
1255 function Extra_Formals (Id : E) return E is
1258 (Is_Overloadable (Id)
1259 or else Ekind_In (Id, E_Entry_Family,
1261 E_Subprogram_Type));
1265 function Can_Use_Internal_Rep (Id : E) return B is
1267 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1268 return Flag229 (Base_Type (Id));
1269 end Can_Use_Internal_Rep;
1271 function Finalization_Master (Id : E) return E is
1273 pragma Assert (Is_Access_Type (Id));
1274 return Node23 (Root_Type (Id));
1275 end Finalization_Master;
1277 function Finalize_Storage_Only (Id : E) return B is
1279 pragma Assert (Is_Type (Id));
1280 return Flag158 (Base_Type (Id));
1281 end Finalize_Storage_Only;
1283 function Finalizer (Id : E) return E is
1285 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1289 function First_Entity (Id : E) return E is
1294 function First_Exit_Statement (Id : E) return N is
1296 pragma Assert (Ekind (Id) = E_Loop);
1298 end First_Exit_Statement;
1300 function First_Index (Id : E) return N is
1302 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1306 function First_Literal (Id : E) return E is
1308 pragma Assert (Is_Enumeration_Type (Id));
1312 function First_Private_Entity (Id : E) return E is
1314 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1315 or else Ekind (Id) in Concurrent_Kind);
1317 end First_Private_Entity;
1319 function First_Rep_Item (Id : E) return E is
1324 function Freeze_Node (Id : E) return N is
1329 function From_Limited_With (Id : E) return B is
1331 return Flag159 (Id);
1332 end From_Limited_With;
1334 function Full_View (Id : E) return E is
1336 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1340 function Generic_Homonym (Id : E) return E is
1342 pragma Assert (Ekind (Id) = E_Generic_Package);
1344 end Generic_Homonym;
1346 function Generic_Renamings (Id : E) return L is
1348 return Elist23 (Id);
1349 end Generic_Renamings;
1351 function Handler_Records (Id : E) return S is
1354 end Handler_Records;
1356 function Has_Aliased_Components (Id : E) return B is
1358 return Flag135 (Implementation_Base_Type (Id));
1359 end Has_Aliased_Components;
1361 function Has_Alignment_Clause (Id : E) return B is
1364 end Has_Alignment_Clause;
1366 function Has_All_Calls_Remote (Id : E) return B is
1369 end Has_All_Calls_Remote;
1371 function Has_Anonymous_Master (Id : E) return B is
1374 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1375 return Flag253 (Id);
1376 end Has_Anonymous_Master;
1378 function Has_Atomic_Components (Id : E) return B is
1380 return Flag86 (Implementation_Base_Type (Id));
1381 end Has_Atomic_Components;
1383 function Has_Biased_Representation (Id : E) return B is
1385 return Flag139 (Id);
1386 end Has_Biased_Representation;
1388 function Has_Completion (Id : E) return B is
1393 function Has_Completion_In_Body (Id : E) return B is
1395 pragma Assert (Is_Type (Id));
1397 end Has_Completion_In_Body;
1399 function Has_Complex_Representation (Id : E) return B is
1401 pragma Assert (Is_Type (Id));
1402 return Flag140 (Implementation_Base_Type (Id));
1403 end Has_Complex_Representation;
1405 function Has_Component_Size_Clause (Id : E) return B is
1407 pragma Assert (Is_Array_Type (Id));
1408 return Flag68 (Implementation_Base_Type (Id));
1409 end Has_Component_Size_Clause;
1411 function Has_Constrained_Partial_View (Id : E) return B is
1413 pragma Assert (Is_Type (Id));
1414 return Flag187 (Id);
1415 end Has_Constrained_Partial_View;
1417 function Has_Controlled_Component (Id : E) return B is
1419 return Flag43 (Base_Type (Id));
1420 end Has_Controlled_Component;
1422 function Has_Contiguous_Rep (Id : E) return B is
1424 return Flag181 (Id);
1425 end Has_Contiguous_Rep;
1427 function Has_Controlling_Result (Id : E) return B is
1430 end Has_Controlling_Result;
1432 function Has_Convention_Pragma (Id : E) return B is
1434 return Flag119 (Id);
1435 end Has_Convention_Pragma;
1437 function Has_Default_Aspect (Id : E) return B is
1439 return Flag39 (Base_Type (Id));
1440 end Has_Default_Aspect;
1442 function Has_Default_Init_Cond (Id : E) return B is
1445 end Has_Default_Init_Cond;
1447 function Has_Delayed_Aspects (Id : E) return B is
1449 pragma Assert (Nkind (Id) in N_Entity);
1450 return Flag200 (Id);
1451 end Has_Delayed_Aspects;
1453 function Has_Delayed_Freeze (Id : E) return B is
1455 pragma Assert (Nkind (Id) in N_Entity);
1457 end Has_Delayed_Freeze;
1459 function Has_Delayed_Rep_Aspects (Id : E) return B is
1461 pragma Assert (Nkind (Id) in N_Entity);
1462 return Flag261 (Id);
1463 end Has_Delayed_Rep_Aspects;
1465 function Has_Discriminants (Id : E) return B is
1467 pragma Assert (Nkind (Id) in N_Entity);
1469 end Has_Discriminants;
1471 function Has_Dispatch_Table (Id : E) return B is
1473 pragma Assert (Is_Tagged_Type (Id));
1474 return Flag220 (Id);
1475 end Has_Dispatch_Table;
1477 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1479 pragma Assert (Is_Type (Id));
1480 return Flag258 (Id);
1481 end Has_Dynamic_Predicate_Aspect;
1483 function Has_Enumeration_Rep_Clause (Id : E) return B is
1485 pragma Assert (Is_Enumeration_Type (Id));
1487 end Has_Enumeration_Rep_Clause;
1489 function Has_Exit (Id : E) return B is
1494 function Has_Expanded_Contract (Id : E) return B is
1496 pragma Assert (Is_Subprogram (Id));
1497 return Flag240 (Id);
1498 end Has_Expanded_Contract;
1500 function Has_Forward_Instantiation (Id : E) return B is
1502 return Flag175 (Id);
1503 end Has_Forward_Instantiation;
1505 function Has_Fully_Qualified_Name (Id : E) return B is
1507 return Flag173 (Id);
1508 end Has_Fully_Qualified_Name;
1510 function Has_Gigi_Rep_Item (Id : E) return B is
1513 end Has_Gigi_Rep_Item;
1515 function Has_Homonym (Id : E) return B is
1520 function Has_Implicit_Dereference (Id : E) return B is
1522 return Flag251 (Id);
1523 end Has_Implicit_Dereference;
1525 function Has_Independent_Components (Id : E) return B is
1527 return Flag34 (Implementation_Base_Type (Id));
1528 end Has_Independent_Components;
1530 function Has_Inheritable_Invariants (Id : E) return B is
1532 pragma Assert (Is_Type (Id));
1533 return Flag248 (Id);
1534 end Has_Inheritable_Invariants;
1536 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1538 pragma Assert (Is_Type (Id));
1539 return Flag133 (Id);
1540 end Has_Inherited_Default_Init_Cond;
1542 function Has_Initial_Value (Id : E) return B is
1544 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1545 return Flag219 (Id);
1546 end Has_Initial_Value;
1548 function Has_Invariants (Id : E) return B is
1550 pragma Assert (Is_Type (Id));
1551 return Flag232 (Id);
1554 function Has_Loop_Entry_Attributes (Id : E) return B is
1556 pragma Assert (Ekind (Id) = E_Loop);
1557 return Flag260 (Id);
1558 end Has_Loop_Entry_Attributes;
1560 function Has_Machine_Radix_Clause (Id : E) return B is
1562 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1564 end Has_Machine_Radix_Clause;
1566 function Has_Master_Entity (Id : E) return B is
1569 end Has_Master_Entity;
1571 function Has_Missing_Return (Id : E) return B is
1573 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1574 return Flag142 (Id);
1575 end Has_Missing_Return;
1577 function Has_Nested_Block_With_Handler (Id : E) return B is
1579 return Flag101 (Id);
1580 end Has_Nested_Block_With_Handler;
1582 function Has_Nested_Subprogram (Id : E) return B is
1584 pragma Assert (Is_Subprogram (Id));
1585 return Flag282 (Id);
1586 end Has_Nested_Subprogram;
1588 function Has_Non_Standard_Rep (Id : E) return B is
1590 return Flag75 (Implementation_Base_Type (Id));
1591 end Has_Non_Standard_Rep;
1593 function Has_Object_Size_Clause (Id : E) return B is
1595 pragma Assert (Is_Type (Id));
1596 return Flag172 (Id);
1597 end Has_Object_Size_Clause;
1599 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1601 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1602 return Flag110 (Id);
1603 end Has_Out_Or_In_Out_Parameter;
1605 function Has_Per_Object_Constraint (Id : E) return B is
1607 return Flag154 (Id);
1608 end Has_Per_Object_Constraint;
1610 function Has_Pragma_Controlled (Id : E) return B is
1612 pragma Assert (Is_Access_Type (Id));
1613 return Flag27 (Implementation_Base_Type (Id));
1614 end Has_Pragma_Controlled;
1616 function Has_Pragma_Elaborate_Body (Id : E) return B is
1618 return Flag150 (Id);
1619 end Has_Pragma_Elaborate_Body;
1621 function Has_Pragma_Inline (Id : E) return B is
1623 return Flag157 (Id);
1624 end Has_Pragma_Inline;
1626 function Has_Pragma_Inline_Always (Id : E) return B is
1628 return Flag230 (Id);
1629 end Has_Pragma_Inline_Always;
1631 function Has_Pragma_No_Inline (Id : E) return B is
1633 return Flag201 (Id);
1634 end Has_Pragma_No_Inline;
1636 function Has_Pragma_Ordered (Id : E) return B is
1638 pragma Assert (Is_Enumeration_Type (Id));
1639 return Flag198 (Implementation_Base_Type (Id));
1640 end Has_Pragma_Ordered;
1642 function Has_Pragma_Pack (Id : E) return B is
1644 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1645 return Flag121 (Implementation_Base_Type (Id));
1646 end Has_Pragma_Pack;
1648 function Has_Pragma_Preelab_Init (Id : E) return B is
1650 return Flag221 (Id);
1651 end Has_Pragma_Preelab_Init;
1653 function Has_Pragma_Pure (Id : E) return B is
1655 return Flag203 (Id);
1656 end Has_Pragma_Pure;
1658 function Has_Pragma_Pure_Function (Id : E) return B is
1660 return Flag179 (Id);
1661 end Has_Pragma_Pure_Function;
1663 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1665 return Flag169 (Id);
1666 end Has_Pragma_Thread_Local_Storage;
1668 function Has_Pragma_Unmodified (Id : E) return B is
1670 return Flag233 (Id);
1671 end Has_Pragma_Unmodified;
1673 function Has_Pragma_Unreferenced (Id : E) return B is
1675 return Flag180 (Id);
1676 end Has_Pragma_Unreferenced;
1678 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1680 pragma Assert (Is_Type (Id));
1681 return Flag212 (Id);
1682 end Has_Pragma_Unreferenced_Objects;
1684 function Has_Predicates (Id : E) return B is
1686 pragma Assert (Is_Type (Id));
1687 return Flag250 (Id);
1690 function Has_Primitive_Operations (Id : E) return B is
1692 pragma Assert (Is_Type (Id));
1693 return Flag120 (Base_Type (Id));
1694 end Has_Primitive_Operations;
1696 function Has_Private_Ancestor (Id : E) return B is
1698 return Flag151 (Id);
1699 end Has_Private_Ancestor;
1701 function Has_Private_Declaration (Id : E) return B is
1703 return Flag155 (Id);
1704 end Has_Private_Declaration;
1706 function Has_Protected (Id : E) return B is
1708 return Flag271 (Base_Type (Id));
1711 function Has_Qualified_Name (Id : E) return B is
1713 return Flag161 (Id);
1714 end Has_Qualified_Name;
1716 function Has_RACW (Id : E) return B is
1718 pragma Assert (Ekind (Id) = E_Package);
1719 return Flag214 (Id);
1722 function Has_Record_Rep_Clause (Id : E) return B is
1724 pragma Assert (Is_Record_Type (Id));
1725 return Flag65 (Implementation_Base_Type (Id));
1726 end Has_Record_Rep_Clause;
1728 function Has_Recursive_Call (Id : E) return B is
1730 pragma Assert (Is_Subprogram (Id));
1731 return Flag143 (Id);
1732 end Has_Recursive_Call;
1734 function Has_Shift_Operator (Id : E) return B is
1736 pragma Assert (Is_Integer_Type (Id));
1737 return Flag267 (Base_Type (Id));
1738 end Has_Shift_Operator;
1740 function Has_Size_Clause (Id : E) return B is
1743 end Has_Size_Clause;
1745 function Has_Small_Clause (Id : E) return B is
1748 end Has_Small_Clause;
1750 function Has_Specified_Layout (Id : E) return B is
1752 pragma Assert (Is_Type (Id));
1753 return Flag100 (Implementation_Base_Type (Id));
1754 end Has_Specified_Layout;
1756 function Has_Specified_Stream_Input (Id : E) return B is
1758 pragma Assert (Is_Type (Id));
1759 return Flag190 (Id);
1760 end Has_Specified_Stream_Input;
1762 function Has_Specified_Stream_Output (Id : E) return B is
1764 pragma Assert (Is_Type (Id));
1765 return Flag191 (Id);
1766 end Has_Specified_Stream_Output;
1768 function Has_Specified_Stream_Read (Id : E) return B is
1770 pragma Assert (Is_Type (Id));
1771 return Flag192 (Id);
1772 end Has_Specified_Stream_Read;
1774 function Has_Specified_Stream_Write (Id : E) return B is
1776 pragma Assert (Is_Type (Id));
1777 return Flag193 (Id);
1778 end Has_Specified_Stream_Write;
1780 function Has_Static_Discriminants (Id : E) return B is
1782 pragma Assert (Is_Type (Id));
1783 return Flag211 (Id);
1784 end Has_Static_Discriminants;
1786 function Has_Static_Predicate (Id : E) return B is
1788 pragma Assert (Is_Type (Id));
1789 return Flag269 (Id);
1790 end Has_Static_Predicate;
1792 function Has_Static_Predicate_Aspect (Id : E) return B is
1794 pragma Assert (Is_Type (Id));
1795 return Flag259 (Id);
1796 end Has_Static_Predicate_Aspect;
1798 function Has_Storage_Size_Clause (Id : E) return B is
1800 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1801 return Flag23 (Implementation_Base_Type (Id));
1802 end Has_Storage_Size_Clause;
1804 function Has_Stream_Size_Clause (Id : E) return B is
1806 return Flag184 (Id);
1807 end Has_Stream_Size_Clause;
1809 function Has_Task (Id : E) return B is
1811 return Flag30 (Base_Type (Id));
1814 function Has_Thunks (Id : E) return B is
1816 return Flag228 (Id);
1819 function Has_Unchecked_Union (Id : E) return B is
1821 return Flag123 (Base_Type (Id));
1822 end Has_Unchecked_Union;
1824 function Has_Unknown_Discriminants (Id : E) return B is
1826 pragma Assert (Is_Type (Id));
1828 end Has_Unknown_Discriminants;
1830 function Has_Uplevel_Reference (Id : E) return B is
1832 return Flag215 (Id);
1833 end Has_Uplevel_Reference;
1835 function Has_Visible_Refinement (Id : E) return B is
1837 pragma Assert (Ekind (Id) = E_Abstract_State);
1838 return Flag263 (Id);
1839 end Has_Visible_Refinement;
1841 function Has_Volatile_Components (Id : E) return B is
1843 return Flag87 (Implementation_Base_Type (Id));
1844 end Has_Volatile_Components;
1846 function Has_Xref_Entry (Id : E) return B is
1848 return Flag182 (Id);
1851 function Hiding_Loop_Variable (Id : E) return E is
1853 pragma Assert (Ekind (Id) = E_Variable);
1855 end Hiding_Loop_Variable;
1857 function Homonym (Id : E) return E is
1862 function Import_Pragma (Id : E) return E is
1864 pragma Assert (Is_Subprogram (Id));
1868 function Interface_Alias (Id : E) return E is
1870 pragma Assert (Is_Subprogram (Id));
1872 end Interface_Alias;
1874 function Interfaces (Id : E) return L is
1876 pragma Assert (Is_Record_Type (Id));
1877 return Elist25 (Id);
1880 function In_Package_Body (Id : E) return B is
1883 end In_Package_Body;
1885 function In_Private_Part (Id : E) return B is
1888 end In_Private_Part;
1890 function In_Use (Id : E) return B is
1892 pragma Assert (Nkind (Id) in N_Entity);
1896 function Initialization_Statements (Id : E) return N is
1898 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1900 end Initialization_Statements;
1902 function Inner_Instances (Id : E) return L is
1904 return Elist23 (Id);
1905 end Inner_Instances;
1907 function Interface_Name (Id : E) return N is
1912 function Is_Abstract_Subprogram (Id : E) return B is
1914 pragma Assert (Is_Overloadable (Id));
1916 end Is_Abstract_Subprogram;
1918 function Is_Abstract_Type (Id : E) return B is
1920 pragma Assert (Is_Type (Id));
1921 return Flag146 (Id);
1922 end Is_Abstract_Type;
1924 function Is_Local_Anonymous_Access (Id : E) return B is
1926 pragma Assert (Is_Access_Type (Id));
1927 return Flag194 (Id);
1928 end Is_Local_Anonymous_Access;
1930 function Is_Access_Constant (Id : E) return B is
1932 pragma Assert (Is_Access_Type (Id));
1934 end Is_Access_Constant;
1936 function Is_Ada_2005_Only (Id : E) return B is
1938 return Flag185 (Id);
1939 end Is_Ada_2005_Only;
1941 function Is_Ada_2012_Only (Id : E) return B is
1943 return Flag199 (Id);
1944 end Is_Ada_2012_Only;
1946 function Is_Aliased (Id : E) return B is
1948 pragma Assert (Nkind (Id) in N_Entity);
1952 function Is_Asynchronous (Id : E) return B is
1954 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1956 end Is_Asynchronous;
1958 function Is_Atomic (Id : E) return B is
1963 function Is_Bit_Packed_Array (Id : E) return B is
1965 return Flag122 (Implementation_Base_Type (Id));
1966 end Is_Bit_Packed_Array;
1968 function Is_Called (Id : E) return B is
1970 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1971 return Flag102 (Id);
1974 function Is_Character_Type (Id : E) return B is
1977 end Is_Character_Type;
1979 function Is_Checked_Ghost_Entity (Id : E) return B is
1981 pragma Assert (Nkind (Id) in N_Entity);
1982 return Flag277 (Id);
1983 end Is_Checked_Ghost_Entity;
1985 function Is_Child_Unit (Id : E) return B is
1990 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1993 end Is_Class_Wide_Equivalent_Type;
1995 function Is_Compilation_Unit (Id : E) return B is
1997 return Flag149 (Id);
1998 end Is_Compilation_Unit;
2000 function Is_Completely_Hidden (Id : E) return B is
2002 pragma Assert (Ekind (Id) = E_Discriminant);
2003 return Flag103 (Id);
2004 end Is_Completely_Hidden;
2006 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2009 end Is_Constr_Subt_For_U_Nominal;
2011 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2013 return Flag141 (Id);
2014 end Is_Constr_Subt_For_UN_Aliased;
2016 function Is_Constrained (Id : E) return B is
2018 pragma Assert (Nkind (Id) in N_Entity);
2022 function Is_Constructor (Id : E) return B is
2027 function Is_Controlled (Id : E) return B is
2029 return Flag42 (Base_Type (Id));
2032 function Is_Controlling_Formal (Id : E) return B is
2034 pragma Assert (Is_Formal (Id));
2036 end Is_Controlling_Formal;
2038 function Is_CPP_Class (Id : E) return B is
2043 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2045 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2046 return Flag132 (Id);
2047 end Is_Default_Init_Cond_Procedure;
2049 function Is_Descendent_Of_Address (Id : E) return B is
2051 return Flag223 (Id);
2052 end Is_Descendent_Of_Address;
2054 function Is_Discrim_SO_Function (Id : E) return B is
2056 return Flag176 (Id);
2057 end Is_Discrim_SO_Function;
2059 function Is_Discriminant_Check_Function (Id : E) return B is
2061 return Flag264 (Id);
2062 end Is_Discriminant_Check_Function;
2064 function Is_Dispatch_Table_Entity (Id : E) return B is
2066 return Flag234 (Id);
2067 end Is_Dispatch_Table_Entity;
2069 function Is_Dispatching_Operation (Id : E) return B is
2071 pragma Assert (Nkind (Id) in N_Entity);
2073 end Is_Dispatching_Operation;
2075 function Is_Eliminated (Id : E) return B is
2077 return Flag124 (Id);
2080 function Is_Entry_Formal (Id : E) return B is
2083 end Is_Entry_Formal;
2085 function Is_Exported (Id : E) return B is
2090 function Is_First_Subtype (Id : E) return B is
2093 end Is_First_Subtype;
2095 function Is_For_Access_Subtype (Id : E) return B is
2097 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2098 return Flag118 (Id);
2099 end Is_For_Access_Subtype;
2101 function Is_Formal_Subprogram (Id : E) return B is
2103 return Flag111 (Id);
2104 end Is_Formal_Subprogram;
2106 function Is_Frozen (Id : E) return B is
2111 function Is_Generic_Actual_Subprogram (Id : E) return B is
2113 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2114 return Flag274 (Id);
2115 end Is_Generic_Actual_Subprogram;
2117 function Is_Generic_Actual_Type (Id : E) return B is
2119 pragma Assert (Is_Type (Id));
2121 end Is_Generic_Actual_Type;
2123 function Is_Generic_Instance (Id : E) return B is
2125 return Flag130 (Id);
2126 end Is_Generic_Instance;
2128 function Is_Generic_Type (Id : E) return B is
2130 pragma Assert (Nkind (Id) in N_Entity);
2132 end Is_Generic_Type;
2134 function Is_Hidden (Id : E) return B is
2139 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2142 end Is_Hidden_Non_Overridden_Subpgm;
2144 function Is_Hidden_Open_Scope (Id : E) return B is
2146 return Flag171 (Id);
2147 end Is_Hidden_Open_Scope;
2149 function Is_Ignored_Ghost_Entity (Id : E) return B is
2151 pragma Assert (Nkind (Id) in N_Entity);
2152 return Flag278 (Id);
2153 end Is_Ignored_Ghost_Entity;
2155 function Is_Immediately_Visible (Id : E) return B is
2157 pragma Assert (Nkind (Id) in N_Entity);
2159 end Is_Immediately_Visible;
2161 function Is_Implementation_Defined (Id : E) return B is
2163 return Flag254 (Id);
2164 end Is_Implementation_Defined;
2166 function Is_Imported (Id : E) return B is
2171 function Is_Independent (Id : E) return B is
2173 return Flag268 (Id);
2176 function Is_Inlined (Id : E) return B is
2181 function Is_Inlined_Always (Id : E) return B is
2183 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2185 end Is_Inlined_Always;
2187 function Is_Interface (Id : E) return B is
2189 return Flag186 (Id);
2192 function Is_Instantiated (Id : E) return B is
2194 return Flag126 (Id);
2195 end Is_Instantiated;
2197 function Is_Internal (Id : E) return B is
2199 pragma Assert (Nkind (Id) in N_Entity);
2203 function Is_Interrupt_Handler (Id : E) return B is
2205 pragma Assert (Nkind (Id) in N_Entity);
2207 end Is_Interrupt_Handler;
2209 function Is_Intrinsic_Subprogram (Id : E) return B is
2212 end Is_Intrinsic_Subprogram;
2214 function Is_Invariant_Procedure (Id : E) return B is
2216 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2217 return Flag257 (Id);
2218 end Is_Invariant_Procedure;
2220 function Is_Itype (Id : E) return B is
2225 function Is_Known_Non_Null (Id : E) return B is
2228 end Is_Known_Non_Null;
2230 function Is_Known_Null (Id : E) return B is
2232 return Flag204 (Id);
2235 function Is_Known_Valid (Id : E) return B is
2237 return Flag170 (Id);
2240 function Is_Limited_Composite (Id : E) return B is
2242 return Flag106 (Id);
2243 end Is_Limited_Composite;
2245 function Is_Limited_Interface (Id : E) return B is
2247 return Flag197 (Id);
2248 end Is_Limited_Interface;
2250 function Is_Limited_Record (Id : E) return B is
2253 end Is_Limited_Record;
2255 function Is_Machine_Code_Subprogram (Id : E) return B is
2257 pragma Assert (Is_Subprogram (Id));
2258 return Flag137 (Id);
2259 end Is_Machine_Code_Subprogram;
2261 function Is_Non_Static_Subtype (Id : E) return B is
2263 pragma Assert (Is_Type (Id));
2264 return Flag109 (Id);
2265 end Is_Non_Static_Subtype;
2267 function Is_Null_Init_Proc (Id : E) return B is
2269 pragma Assert (Ekind (Id) = E_Procedure);
2270 return Flag178 (Id);
2271 end Is_Null_Init_Proc;
2273 function Is_Obsolescent (Id : E) return B is
2275 return Flag153 (Id);
2278 function Is_Only_Out_Parameter (Id : E) return B is
2280 pragma Assert (Is_Formal (Id));
2281 return Flag226 (Id);
2282 end Is_Only_Out_Parameter;
2284 function Is_Package_Body_Entity (Id : E) return B is
2286 return Flag160 (Id);
2287 end Is_Package_Body_Entity;
2289 function Is_Packed (Id : E) return B is
2291 return Flag51 (Implementation_Base_Type (Id));
2294 function Is_Packed_Array_Impl_Type (Id : E) return B is
2296 return Flag138 (Id);
2297 end Is_Packed_Array_Impl_Type;
2299 function Is_Potentially_Use_Visible (Id : E) return B is
2301 pragma Assert (Nkind (Id) in N_Entity);
2303 end Is_Potentially_Use_Visible;
2305 function Is_Predicate_Function (Id : E) return B is
2307 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2308 return Flag255 (Id);
2309 end Is_Predicate_Function;
2311 function Is_Predicate_Function_M (Id : E) return B is
2313 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2314 return Flag256 (Id);
2315 end Is_Predicate_Function_M;
2317 function Is_Preelaborated (Id : E) return B is
2320 end Is_Preelaborated;
2322 function Is_Primitive (Id : E) return B is
2325 (Is_Overloadable (Id)
2326 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2327 return Flag218 (Id);
2330 function Is_Primitive_Wrapper (Id : E) return B is
2332 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2333 return Flag195 (Id);
2334 end Is_Primitive_Wrapper;
2336 function Is_Private_Composite (Id : E) return B is
2338 pragma Assert (Is_Type (Id));
2339 return Flag107 (Id);
2340 end Is_Private_Composite;
2342 function Is_Private_Descendant (Id : E) return B is
2345 end Is_Private_Descendant;
2347 function Is_Private_Primitive (Id : E) return B is
2349 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2350 return Flag245 (Id);
2351 end Is_Private_Primitive;
2353 function Is_Processed_Transient (Id : E) return B is
2355 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2356 return Flag252 (Id);
2357 end Is_Processed_Transient;
2359 function Is_Public (Id : E) return B is
2361 pragma Assert (Nkind (Id) in N_Entity);
2365 function Is_Pure (Id : E) return B is
2370 function Is_Pure_Unit_Access_Type (Id : E) return B is
2372 pragma Assert (Is_Access_Type (Id));
2373 return Flag189 (Id);
2374 end Is_Pure_Unit_Access_Type;
2376 function Is_RACW_Stub_Type (Id : E) return B is
2378 pragma Assert (Is_Type (Id));
2379 return Flag244 (Id);
2380 end Is_RACW_Stub_Type;
2382 function Is_Raised (Id : E) return B is
2384 pragma Assert (Ekind (Id) = E_Exception);
2385 return Flag224 (Id);
2388 function Is_Remote_Call_Interface (Id : E) return B is
2391 end Is_Remote_Call_Interface;
2393 function Is_Remote_Types (Id : E) return B is
2396 end Is_Remote_Types;
2398 function Is_Renaming_Of_Object (Id : E) return B is
2400 return Flag112 (Id);
2401 end Is_Renaming_Of_Object;
2403 function Is_Return_Object (Id : E) return B is
2405 return Flag209 (Id);
2406 end Is_Return_Object;
2408 function Is_Safe_To_Reevaluate (Id : E) return B is
2410 return Flag249 (Id);
2411 end Is_Safe_To_Reevaluate;
2413 function Is_Shared_Passive (Id : E) return B is
2416 end Is_Shared_Passive;
2418 function Is_Static_Type (Id : E) return B is
2420 return Flag281 (Id);
2423 function Is_Statically_Allocated (Id : E) return B is
2426 end Is_Statically_Allocated;
2428 function Is_Tag (Id : E) return B is
2430 pragma Assert (Nkind (Id) in N_Entity);
2434 function Is_Tagged_Type (Id : E) return B is
2439 function Is_Thunk (Id : E) return B is
2441 return Flag225 (Id);
2444 function Is_Trivial_Subprogram (Id : E) return B is
2446 return Flag235 (Id);
2447 end Is_Trivial_Subprogram;
2449 function Is_True_Constant (Id : E) return B is
2451 return Flag163 (Id);
2452 end Is_True_Constant;
2454 function Is_Unchecked_Union (Id : E) return B is
2456 return Flag117 (Implementation_Base_Type (Id));
2457 end Is_Unchecked_Union;
2459 function Is_Underlying_Record_View (Id : E) return B is
2461 return Flag246 (Id);
2462 end Is_Underlying_Record_View;
2464 function Is_Unimplemented (Id : E) return B is
2466 return Flag284 (Id);
2467 end Is_Unimplemented;
2469 function Is_Unsigned_Type (Id : E) return B is
2471 pragma Assert (Is_Type (Id));
2472 return Flag144 (Id);
2473 end Is_Unsigned_Type;
2475 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2477 return Flag283 (Id);
2478 end Is_Uplevel_Referenced_Entity;
2480 function Is_Valued_Procedure (Id : E) return B is
2482 pragma Assert (Ekind (Id) = E_Procedure);
2483 return Flag127 (Id);
2484 end Is_Valued_Procedure;
2486 function Is_Visible_Formal (Id : E) return B is
2488 return Flag206 (Id);
2489 end Is_Visible_Formal;
2491 function Is_Visible_Lib_Unit (Id : E) return B is
2493 return Flag116 (Id);
2494 end Is_Visible_Lib_Unit;
2496 function Is_Volatile (Id : E) return B is
2498 pragma Assert (Nkind (Id) in N_Entity);
2500 if Is_Type (Id) then
2501 return Flag16 (Base_Type (Id));
2507 function Itype_Printed (Id : E) return B is
2509 pragma Assert (Is_Itype (Id));
2510 return Flag202 (Id);
2513 function Kill_Elaboration_Checks (Id : E) return B is
2516 end Kill_Elaboration_Checks;
2518 function Kill_Range_Checks (Id : E) return B is
2521 end Kill_Range_Checks;
2523 function Known_To_Have_Preelab_Init (Id : E) return B is
2525 pragma Assert (Is_Type (Id));
2526 return Flag207 (Id);
2527 end Known_To_Have_Preelab_Init;
2529 function Last_Aggregate_Assignment (Id : E) return N is
2531 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2533 end Last_Aggregate_Assignment;
2535 function Last_Assignment (Id : E) return N is
2537 pragma Assert (Is_Assignable (Id));
2539 end Last_Assignment;
2541 function Last_Entity (Id : E) return E is
2546 function Limited_View (Id : E) return E is
2548 pragma Assert (Ekind (Id) = E_Package);
2552 function Linker_Section_Pragma (Id : E) return N is
2555 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2557 end Linker_Section_Pragma;
2559 function Lit_Indexes (Id : E) return E is
2561 pragma Assert (Is_Enumeration_Type (Id));
2565 function Lit_Strings (Id : E) return E is
2567 pragma Assert (Is_Enumeration_Type (Id));
2571 function Low_Bound_Tested (Id : E) return B is
2573 return Flag205 (Id);
2574 end Low_Bound_Tested;
2576 function Machine_Radix_10 (Id : E) return B is
2578 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2580 end Machine_Radix_10;
2582 function Master_Id (Id : E) return E is
2584 pragma Assert (Is_Access_Type (Id));
2588 function Materialize_Entity (Id : E) return B is
2590 return Flag168 (Id);
2591 end Materialize_Entity;
2593 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2595 return Flag262 (Id);
2596 end May_Inherit_Delayed_Rep_Aspects;
2598 function Mechanism (Id : E) return M is
2600 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2601 return UI_To_Int (Uint8 (Id));
2604 function Modulus (Id : E) return Uint is
2606 pragma Assert (Is_Modular_Integer_Type (Id));
2607 return Uint17 (Base_Type (Id));
2610 function Must_Be_On_Byte_Boundary (Id : E) return B is
2612 pragma Assert (Is_Type (Id));
2613 return Flag183 (Id);
2614 end Must_Be_On_Byte_Boundary;
2616 function Must_Have_Preelab_Init (Id : E) return B is
2618 pragma Assert (Is_Type (Id));
2619 return Flag208 (Id);
2620 end Must_Have_Preelab_Init;
2622 function Needs_Debug_Info (Id : E) return B is
2624 return Flag147 (Id);
2625 end Needs_Debug_Info;
2627 function Needs_No_Actuals (Id : E) return B is
2630 (Is_Overloadable (Id)
2631 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2633 end Needs_No_Actuals;
2635 function Never_Set_In_Source (Id : E) return B is
2637 return Flag115 (Id);
2638 end Never_Set_In_Source;
2640 function Next_Inlined_Subprogram (Id : E) return E is
2643 end Next_Inlined_Subprogram;
2645 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2647 pragma Assert (Is_Discrete_Type (Id));
2648 return Flag276 (Id);
2649 end No_Dynamic_Predicate_On_Actual;
2651 function No_Pool_Assigned (Id : E) return B is
2653 pragma Assert (Is_Access_Type (Id));
2654 return Flag131 (Root_Type (Id));
2655 end No_Pool_Assigned;
2657 function No_Predicate_On_Actual (Id : E) return Boolean is
2659 pragma Assert (Is_Discrete_Type (Id));
2660 return Flag275 (Id);
2661 end No_Predicate_On_Actual;
2663 function No_Return (Id : E) return B is
2665 return Flag113 (Id);
2668 function No_Strict_Aliasing (Id : E) return B is
2670 pragma Assert (Is_Access_Type (Id));
2671 return Flag136 (Base_Type (Id));
2672 end No_Strict_Aliasing;
2674 function No_Tagged_Streams_Pragma (Id : E) return N is
2676 pragma Assert (Is_Tagged_Type (Id));
2678 end No_Tagged_Streams_Pragma;
2680 function Non_Binary_Modulus (Id : E) return B is
2682 pragma Assert (Is_Type (Id));
2683 return Flag58 (Base_Type (Id));
2684 end Non_Binary_Modulus;
2686 function Non_Limited_View (Id : E) return E is
2689 (Ekind (Id) in Incomplete_Kind
2691 Ekind (Id) in Class_Wide_Kind
2693 Ekind (Id) = E_Abstract_State);
2695 end Non_Limited_View;
2697 function Nonzero_Is_True (Id : E) return B is
2699 pragma Assert (Root_Type (Id) = Standard_Boolean);
2700 return Flag162 (Base_Type (Id));
2701 end Nonzero_Is_True;
2703 function Normalized_First_Bit (Id : E) return U is
2705 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2707 end Normalized_First_Bit;
2709 function Normalized_Position (Id : E) return U is
2711 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2713 end Normalized_Position;
2715 function Normalized_Position_Max (Id : E) return U is
2717 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2719 end Normalized_Position_Max;
2721 function OK_To_Rename (Id : E) return B is
2723 pragma Assert (Ekind (Id) = E_Variable);
2724 return Flag247 (Id);
2727 function OK_To_Reorder_Components (Id : E) return B is
2729 pragma Assert (Is_Record_Type (Id));
2730 return Flag239 (Base_Type (Id));
2731 end OK_To_Reorder_Components;
2733 function Optimize_Alignment_Space (Id : E) return B is
2736 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2737 return Flag241 (Id);
2738 end Optimize_Alignment_Space;
2740 function Optimize_Alignment_Time (Id : E) return B is
2743 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2744 return Flag242 (Id);
2745 end Optimize_Alignment_Time;
2747 function Original_Access_Type (Id : E) return E is
2749 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2751 end Original_Access_Type;
2753 function Original_Array_Type (Id : E) return E is
2755 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2757 end Original_Array_Type;
2759 function Original_Record_Component (Id : E) return E is
2761 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2763 end Original_Record_Component;
2765 function Overlays_Constant (Id : E) return B is
2767 return Flag243 (Id);
2768 end Overlays_Constant;
2770 function Overridden_Operation (Id : E) return E is
2773 end Overridden_Operation;
2775 function Package_Instantiation (Id : E) return N is
2777 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2779 end Package_Instantiation;
2781 function Packed_Array_Impl_Type (Id : E) return E is
2783 pragma Assert (Is_Array_Type (Id));
2785 end Packed_Array_Impl_Type;
2787 function Parent_Subtype (Id : E) return E is
2789 pragma Assert (Is_Record_Type (Id));
2790 return Node19 (Base_Type (Id));
2793 function Part_Of_Constituents (Id : E) return L is
2795 pragma Assert (Ekind (Id) = E_Abstract_State);
2797 end Part_Of_Constituents;
2799 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2801 pragma Assert (Is_Type (Id));
2802 return Flag280 (Id);
2803 end Partial_View_Has_Unknown_Discr;
2805 function Pending_Access_Types (Id : E) return L is
2807 pragma Assert (Is_Type (Id));
2808 return Elist15 (Id);
2809 end Pending_Access_Types;
2811 function Postconditions_Proc (Id : E) return E is
2813 pragma Assert (Ekind_In (Id, E_Entry,
2818 end Postconditions_Proc;
2820 function PPC_Wrapper (Id : E) return E is
2822 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2826 function Prival (Id : E) return E is
2828 pragma Assert (Is_Protected_Component (Id));
2832 function Prival_Link (Id : E) return E is
2834 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2838 function Private_Dependents (Id : E) return L is
2840 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2841 return Elist18 (Id);
2842 end Private_Dependents;
2844 function Private_View (Id : E) return N is
2846 pragma Assert (Is_Private_Type (Id));
2850 function Protected_Body_Subprogram (Id : E) return E is
2852 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2854 end Protected_Body_Subprogram;
2856 function Protected_Formal (Id : E) return E is
2858 pragma Assert (Is_Formal (Id));
2860 end Protected_Formal;
2862 function Protection_Object (Id : E) return E is
2865 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2867 end Protection_Object;
2869 function Reachable (Id : E) return B is
2874 function Referenced (Id : E) return B is
2876 return Flag156 (Id);
2879 function Referenced_As_LHS (Id : E) return B is
2882 end Referenced_As_LHS;
2884 function Referenced_As_Out_Parameter (Id : E) return B is
2886 return Flag227 (Id);
2887 end Referenced_As_Out_Parameter;
2889 function Refinement_Constituents (Id : E) return L is
2891 pragma Assert (Ekind (Id) = E_Abstract_State);
2893 end Refinement_Constituents;
2895 function Register_Exception_Call (Id : E) return N is
2897 pragma Assert (Ekind (Id) = E_Exception);
2899 end Register_Exception_Call;
2901 function Related_Array_Object (Id : E) return E is
2903 pragma Assert (Is_Array_Type (Id));
2905 end Related_Array_Object;
2907 function Related_Expression (Id : E) return N is
2909 pragma Assert (Ekind (Id) in Type_Kind
2910 or else Ekind_In (Id, E_Constant, E_Variable));
2912 end Related_Expression;
2914 function Related_Instance (Id : E) return E is
2916 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2918 end Related_Instance;
2920 function Related_Type (Id : E) return E is
2922 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2926 function Relative_Deadline_Variable (Id : E) return E is
2928 pragma Assert (Is_Task_Type (Id));
2929 return Node28 (Implementation_Base_Type (Id));
2930 end Relative_Deadline_Variable;
2932 function Renamed_Entity (Id : E) return N is
2937 function Renamed_In_Spec (Id : E) return B is
2939 pragma Assert (Ekind (Id) = E_Package);
2940 return Flag231 (Id);
2941 end Renamed_In_Spec;
2943 function Renamed_Object (Id : E) return N is
2948 function Renaming_Map (Id : E) return U is
2953 function Requires_Overriding (Id : E) return B is
2955 pragma Assert (Is_Overloadable (Id));
2956 return Flag213 (Id);
2957 end Requires_Overriding;
2959 function Return_Present (Id : E) return B is
2964 function Return_Applies_To (Id : E) return N is
2967 end Return_Applies_To;
2969 function Returns_By_Ref (Id : E) return B is
2974 function Returns_Limited_View (Id : E) return B is
2976 pragma Assert (Ekind (Id) = E_Function);
2977 return Flag134 (Id);
2978 end Returns_Limited_View;
2980 function Reverse_Bit_Order (Id : E) return B is
2982 pragma Assert (Is_Record_Type (Id));
2983 return Flag164 (Base_Type (Id));
2984 end Reverse_Bit_Order;
2986 function Reverse_Storage_Order (Id : E) return B is
2988 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2989 return Flag93 (Base_Type (Id));
2990 end Reverse_Storage_Order;
2992 function RM_Size (Id : E) return U is
2994 pragma Assert (Is_Type (Id));
2998 function Scalar_Range (Id : E) return N is
3003 function Scale_Value (Id : E) return U is
3008 function Scope_Depth_Value (Id : E) return U is
3011 end Scope_Depth_Value;
3013 function Sec_Stack_Needed_For_Return (Id : E) return B is
3015 return Flag167 (Id);
3016 end Sec_Stack_Needed_For_Return;
3018 function Shadow_Entities (Id : E) return S is
3020 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3022 end Shadow_Entities;
3024 function Shared_Var_Procs_Instance (Id : E) return E is
3026 pragma Assert (Ekind (Id) = E_Variable);
3028 end Shared_Var_Procs_Instance;
3030 function Size_Check_Code (Id : E) return N is
3032 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3034 end Size_Check_Code;
3036 function Size_Depends_On_Discriminant (Id : E) return B is
3038 return Flag177 (Id);
3039 end Size_Depends_On_Discriminant;
3041 function Size_Known_At_Compile_Time (Id : E) return B is
3044 end Size_Known_At_Compile_Time;
3046 function Small_Value (Id : E) return R is
3048 pragma Assert (Is_Fixed_Point_Type (Id));
3049 return Ureal21 (Id);
3052 function SPARK_Aux_Pragma (Id : E) return N is
3055 (Ekind_In (Id, E_Generic_Package, -- package variants
3059 end SPARK_Aux_Pragma;
3061 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3064 (Ekind_In (Id, E_Generic_Package, -- package variants
3067 return Flag266 (Id);
3068 end SPARK_Aux_Pragma_Inherited;
3070 function SPARK_Pragma (Id : E) return N is
3073 (Ekind_In (Id, E_Function, -- subprogram variants
3075 E_Generic_Procedure,
3079 Ekind_In (Id, E_Generic_Package, -- package variants
3085 function SPARK_Pragma_Inherited (Id : E) return B is
3088 (Ekind_In (Id, E_Function, -- subprogram variants
3090 E_Generic_Procedure,
3094 Ekind_In (Id, E_Generic_Package, -- package variants
3097 return Flag265 (Id);
3098 end SPARK_Pragma_Inherited;
3100 function Spec_Entity (Id : E) return E is
3102 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3106 function SSO_Set_High_By_Default (Id : E) return B is
3108 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3109 return Flag273 (Base_Type (Id));
3110 end SSO_Set_High_By_Default;
3112 function SSO_Set_Low_By_Default (Id : E) return B is
3114 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3115 return Flag272 (Base_Type (Id));
3116 end SSO_Set_Low_By_Default;
3118 function Static_Discrete_Predicate (Id : E) return S is
3120 pragma Assert (Is_Discrete_Type (Id));
3122 end Static_Discrete_Predicate;
3124 function Static_Real_Or_String_Predicate (Id : E) return N is
3126 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3128 end Static_Real_Or_String_Predicate;
3130 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3132 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3134 end Status_Flag_Or_Transient_Decl;
3136 function Storage_Size_Variable (Id : E) return E is
3138 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3139 return Node26 (Implementation_Base_Type (Id));
3140 end Storage_Size_Variable;
3142 function Static_Elaboration_Desired (Id : E) return B is
3144 pragma Assert (Ekind (Id) = E_Package);
3146 end Static_Elaboration_Desired;
3148 function Static_Initialization (Id : E) return N is
3151 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3153 end Static_Initialization;
3155 function Stored_Constraint (Id : E) return L is
3158 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3159 return Elist23 (Id);
3160 end Stored_Constraint;
3162 function Stores_Attribute_Old_Prefix (Id : E) return B is
3164 return Flag270 (Id);
3165 end Stores_Attribute_Old_Prefix;
3167 function Strict_Alignment (Id : E) return B is
3169 return Flag145 (Implementation_Base_Type (Id));
3170 end Strict_Alignment;
3172 function String_Literal_Length (Id : E) return U is
3175 end String_Literal_Length;
3177 function String_Literal_Low_Bound (Id : E) return N is
3180 end String_Literal_Low_Bound;
3182 function Subprograms_For_Type (Id : E) return E is
3184 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3186 end Subprograms_For_Type;
3188 function Subps_Index (Id : E) return U is
3190 pragma Assert (Is_Subprogram (Id));
3194 function Suppress_Elaboration_Warnings (Id : E) return B is
3196 return Flag148 (Id);
3197 end Suppress_Elaboration_Warnings;
3199 function Suppress_Initialization (Id : E) return B is
3201 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3202 return Flag105 (Id);
3203 end Suppress_Initialization;
3205 function Suppress_Style_Checks (Id : E) return B is
3207 return Flag165 (Id);
3208 end Suppress_Style_Checks;
3210 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3212 return Flag217 (Id);
3213 end Suppress_Value_Tracking_On_Call;
3215 function Task_Body_Procedure (Id : E) return N is
3217 pragma Assert (Ekind (Id) in Task_Kind);
3219 end Task_Body_Procedure;
3221 function Thunk_Entity (Id : E) return E is
3223 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3224 and then Is_Thunk (Id));
3228 function Treat_As_Volatile (Id : E) return B is
3231 end Treat_As_Volatile;
3233 function Underlying_Full_View (Id : E) return E is
3235 pragma Assert (Ekind (Id) in Private_Kind);
3237 end Underlying_Full_View;
3239 function Underlying_Record_View (Id : E) return E is
3242 end Underlying_Record_View;
3244 function Universal_Aliasing (Id : E) return B is
3246 pragma Assert (Is_Type (Id));
3247 return Flag216 (Implementation_Base_Type (Id));
3248 end Universal_Aliasing;
3250 function Unset_Reference (Id : E) return N is
3253 end Unset_Reference;
3255 function Used_As_Generic_Actual (Id : E) return B is
3257 return Flag222 (Id);
3258 end Used_As_Generic_Actual;
3260 function Uses_Lock_Free (Id : E) return B is
3262 pragma Assert (Is_Protected_Type (Id));
3263 return Flag188 (Id);
3266 function Uses_Sec_Stack (Id : E) return B is
3271 function Warnings_Off (Id : E) return B is
3276 function Warnings_Off_Used (Id : E) return B is
3278 return Flag236 (Id);
3279 end Warnings_Off_Used;
3281 function Warnings_Off_Used_Unmodified (Id : E) return B is
3283 return Flag237 (Id);
3284 end Warnings_Off_Used_Unmodified;
3286 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3288 return Flag238 (Id);
3289 end Warnings_Off_Used_Unreferenced;
3291 function Wrapped_Entity (Id : E) return E is
3293 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3294 and then Is_Primitive_Wrapper (Id));
3298 function Was_Hidden (Id : E) return B is
3300 return Flag196 (Id);
3303 ------------------------------
3304 -- Classification Functions --
3305 ------------------------------
3307 function Is_Access_Type (Id : E) return B is
3309 return Ekind (Id) in Access_Kind;
3312 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3314 return Ekind (Id) in Access_Protected_Kind;
3315 end Is_Access_Protected_Subprogram_Type;
3317 function Is_Access_Subprogram_Type (Id : E) return B is
3319 return Ekind (Id) in Access_Subprogram_Kind;
3320 end Is_Access_Subprogram_Type;
3322 function Is_Aggregate_Type (Id : E) return B is
3324 return Ekind (Id) in Aggregate_Kind;
3325 end Is_Aggregate_Type;
3327 function Is_Array_Type (Id : E) return B is
3329 return Ekind (Id) in Array_Kind;
3332 function Is_Assignable (Id : E) return B is
3334 return Ekind (Id) in Assignable_Kind;
3337 function Is_Class_Wide_Type (Id : E) return B is
3339 return Ekind (Id) in Class_Wide_Kind;
3340 end Is_Class_Wide_Type;
3342 function Is_Composite_Type (Id : E) return B is
3344 return Ekind (Id) in Composite_Kind;
3345 end Is_Composite_Type;
3347 function Is_Concurrent_Body (Id : E) return B is
3349 return Ekind (Id) in
3350 Concurrent_Body_Kind;
3351 end Is_Concurrent_Body;
3353 function Is_Concurrent_Record_Type (Id : E) return B is
3356 end Is_Concurrent_Record_Type;
3358 function Is_Concurrent_Type (Id : E) return B is
3360 return Ekind (Id) in Concurrent_Kind;
3361 end Is_Concurrent_Type;
3363 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3365 return Ekind (Id) in
3366 Decimal_Fixed_Point_Kind;
3367 end Is_Decimal_Fixed_Point_Type;
3369 function Is_Digits_Type (Id : E) return B is
3371 return Ekind (Id) in Digits_Kind;
3374 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3376 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3377 end Is_Discrete_Or_Fixed_Point_Type;
3379 function Is_Discrete_Type (Id : E) return B is
3381 return Ekind (Id) in Discrete_Kind;
3382 end Is_Discrete_Type;
3384 function Is_Elementary_Type (Id : E) return B is
3386 return Ekind (Id) in Elementary_Kind;
3387 end Is_Elementary_Type;
3389 function Is_Entry (Id : E) return B is
3391 return Ekind (Id) in Entry_Kind;
3394 function Is_Enumeration_Type (Id : E) return B is
3396 return Ekind (Id) in
3398 end Is_Enumeration_Type;
3400 function Is_Fixed_Point_Type (Id : E) return B is
3402 return Ekind (Id) in
3404 end Is_Fixed_Point_Type;
3406 function Is_Floating_Point_Type (Id : E) return B is
3408 return Ekind (Id) in Float_Kind;
3409 end Is_Floating_Point_Type;
3411 function Is_Formal (Id : E) return B is
3413 return Ekind (Id) in Formal_Kind;
3416 function Is_Formal_Object (Id : E) return B is
3418 return Ekind (Id) in Formal_Object_Kind;
3419 end Is_Formal_Object;
3421 function Is_Generic_Subprogram (Id : E) return B is
3423 return Ekind (Id) in Generic_Subprogram_Kind;
3424 end Is_Generic_Subprogram;
3426 function Is_Generic_Unit (Id : E) return B is
3428 return Ekind (Id) in Generic_Unit_Kind;
3429 end Is_Generic_Unit;
3431 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3433 return Ekind (Id) in
3434 Incomplete_Or_Private_Kind;
3435 end Is_Incomplete_Or_Private_Type;
3437 function Is_Incomplete_Type (Id : E) return B is
3439 return Ekind (Id) in
3441 end Is_Incomplete_Type;
3443 function Is_Integer_Type (Id : E) return B is
3445 return Ekind (Id) in Integer_Kind;
3446 end Is_Integer_Type;
3448 function Is_Modular_Integer_Type (Id : E) return B is
3450 return Ekind (Id) in
3451 Modular_Integer_Kind;
3452 end Is_Modular_Integer_Type;
3454 function Is_Named_Number (Id : E) return B is
3456 return Ekind (Id) in Named_Kind;
3457 end Is_Named_Number;
3459 function Is_Numeric_Type (Id : E) return B is
3461 return Ekind (Id) in Numeric_Kind;
3462 end Is_Numeric_Type;
3464 function Is_Object (Id : E) return B is
3466 return Ekind (Id) in Object_Kind;
3469 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3471 return Ekind (Id) in
3472 Ordinary_Fixed_Point_Kind;
3473 end Is_Ordinary_Fixed_Point_Type;
3475 function Is_Overloadable (Id : E) return B is
3477 return Ekind (Id) in Overloadable_Kind;
3478 end Is_Overloadable;
3480 function Is_Private_Type (Id : E) return B is
3482 return Ekind (Id) in Private_Kind;
3483 end Is_Private_Type;
3485 function Is_Protected_Type (Id : E) return B is
3487 return Ekind (Id) in Protected_Kind;
3488 end Is_Protected_Type;
3490 function Is_Real_Type (Id : E) return B is
3492 return Ekind (Id) in Real_Kind;
3495 function Is_Record_Type (Id : E) return B is
3497 return Ekind (Id) in Record_Kind;
3500 function Is_Scalar_Type (Id : E) return B is
3502 return Ekind (Id) in Scalar_Kind;
3505 function Is_Signed_Integer_Type (Id : E) return B is
3507 return Ekind (Id) in Signed_Integer_Kind;
3508 end Is_Signed_Integer_Type;
3510 function Is_Subprogram (Id : E) return B is
3512 return Ekind (Id) in Subprogram_Kind;
3515 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3517 return Ekind (Id) in Subprogram_Kind
3519 Ekind (Id) in Generic_Subprogram_Kind;
3520 end Is_Subprogram_Or_Generic_Subprogram;
3522 function Is_Task_Type (Id : E) return B is
3524 return Ekind (Id) in Task_Kind;
3527 function Is_Type (Id : E) return B is
3529 return Ekind (Id) in Type_Kind;
3532 ------------------------------
3533 -- Attribute Set Procedures --
3534 ------------------------------
3536 -- Note: in many of these set procedures an "obvious" assertion is missing.
3537 -- The reason for this is that in many cases, a field is set before the
3538 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3539 -- it is possible to add assertions that specifically include the E_Void
3540 -- possibility, but in some cases, we just omit the assertions.
3542 procedure Set_Abstract_States (Id : E; V : L) is
3544 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3545 Set_Elist25 (Id, V);
3546 end Set_Abstract_States;
3548 procedure Set_Accept_Address (Id : E; V : L) is
3550 Set_Elist21 (Id, V);
3551 end Set_Accept_Address;
3553 procedure Set_Access_Disp_Table (Id : E; V : L) is
3555 pragma Assert (Ekind (Id) = E_Record_Type
3556 and then Id = Implementation_Base_Type (Id));
3557 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3558 Set_Elist16 (Id, V);
3559 end Set_Access_Disp_Table;
3561 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3564 end Set_Associated_Formal_Package;
3566 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3569 end Set_Associated_Node_For_Itype;
3571 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3573 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3575 end Set_Associated_Storage_Pool;
3577 procedure Set_Activation_Record_Component (Id : E; V : E) is
3579 pragma Assert (Ekind_In (Id, E_Constant,
3586 end Set_Activation_Record_Component;
3588 procedure Set_Actual_Subtype (Id : E; V : E) is
3591 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3592 or else Is_Formal (Id));
3594 end Set_Actual_Subtype;
3596 procedure Set_Address_Taken (Id : E; V : B := True) is
3598 Set_Flag104 (Id, V);
3599 end Set_Address_Taken;
3601 procedure Set_Alias (Id : E; V : E) is
3604 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3608 procedure Set_Alignment (Id : E; V : U) is
3610 pragma Assert (Is_Type (Id)
3611 or else Is_Formal (Id)
3612 or else Ekind_In (Id, E_Loop_Parameter,
3619 procedure Set_Barrier_Function (Id : E; V : N) is
3621 pragma Assert (Is_Entry (Id));
3623 end Set_Barrier_Function;
3625 procedure Set_Block_Node (Id : E; V : N) is
3627 pragma Assert (Ekind (Id) = E_Block);
3631 procedure Set_Body_Entity (Id : E; V : E) is
3633 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3635 end Set_Body_Entity;
3637 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3640 (Ekind (Id) = E_Package
3641 or else Is_Subprogram (Id)
3642 or else Is_Generic_Unit (Id));
3644 end Set_Body_Needed_For_SAL;
3646 procedure Set_Body_References (Id : E; V : L) is
3648 pragma Assert (Ekind (Id) = E_Abstract_State);
3649 Set_Elist16 (Id, V);
3650 end Set_Body_References;
3652 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3654 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3656 end Set_BIP_Initialization_Call;
3658 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3660 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3661 Set_Flag125 (Id, V);
3662 end Set_C_Pass_By_Copy;
3664 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3667 end Set_Can_Never_Be_Null;
3669 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3672 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3673 Set_Flag229 (Id, V);
3674 end Set_Can_Use_Internal_Rep;
3676 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3679 end Set_Checks_May_Be_Suppressed;
3681 procedure Set_Class_Wide_Type (Id : E; V : E) is
3683 pragma Assert (Is_Type (Id));
3685 end Set_Class_Wide_Type;
3687 procedure Set_Cloned_Subtype (Id : E; V : E) is
3689 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3691 end Set_Cloned_Subtype;
3693 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3695 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3697 end Set_Component_Bit_Offset;
3699 procedure Set_Component_Clause (Id : E; V : N) is
3701 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3703 end Set_Component_Clause;
3705 procedure Set_Component_Size (Id : E; V : U) is
3707 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3709 end Set_Component_Size;
3711 procedure Set_Component_Type (Id : E; V : E) is
3713 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3715 end Set_Component_Type;
3717 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3720 (Ekind_In (Id, E_Block,
3724 E_Generic_Procedure,
3728 E_Subprogram_Body));
3729 Set_Flag279 (Id, V);
3730 end Set_Contains_Ignored_Ghost_Code;
3732 procedure Set_Contract (Id : E; V : N) is
3735 (Ekind_In (Id, E_Entry,
3743 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3747 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3750 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3752 end Set_Corresponding_Concurrent_Type;
3754 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3756 pragma Assert (Ekind (Id) = E_Discriminant);
3758 end Set_Corresponding_Discriminant;
3760 procedure Set_Corresponding_Equality (Id : E; V : E) is
3763 (Ekind (Id) = E_Function
3764 and then not Comes_From_Source (Id)
3765 and then Chars (Id) = Name_Op_Ne);
3767 end Set_Corresponding_Equality;
3769 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3771 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3773 end Set_Corresponding_Protected_Entry;
3775 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3777 pragma Assert (Is_Concurrent_Type (Id));
3779 end Set_Corresponding_Record_Type;
3781 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3784 end Set_Corresponding_Remote_Type;
3786 procedure Set_Current_Use_Clause (Id : E; V : E) is
3788 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3790 end Set_Current_Use_Clause;
3792 procedure Set_Current_Value (Id : E; V : N) is
3794 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3796 end Set_Current_Value;
3798 procedure Set_CR_Discriminant (Id : E; V : E) is
3801 end Set_CR_Discriminant;
3803 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3805 Set_Flag166 (Id, V);
3806 end Set_Debug_Info_Off;
3808 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3811 end Set_Debug_Renaming_Link;
3813 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3815 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3817 end Set_Default_Aspect_Component_Value;
3819 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3821 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3823 end Set_Default_Aspect_Value;
3825 procedure Set_Default_Expr_Function (Id : E; V : E) is
3827 pragma Assert (Is_Formal (Id));
3829 end Set_Default_Expr_Function;
3831 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3833 Set_Flag108 (Id, V);
3834 end Set_Default_Expressions_Processed;
3836 procedure Set_Default_Value (Id : E; V : N) is
3838 pragma Assert (Is_Formal (Id));
3840 end Set_Default_Value;
3842 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3846 or else Is_Task_Type (Id)
3847 or else Ekind (Id) = E_Block);
3848 Set_Flag114 (Id, V);
3849 end Set_Delay_Cleanups;
3851 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3854 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3857 end Set_Delay_Subprogram_Descriptors;
3859 procedure Set_Delta_Value (Id : E; V : R) is
3861 pragma Assert (Is_Fixed_Point_Type (Id));
3862 Set_Ureal18 (Id, V);
3863 end Set_Delta_Value;
3865 procedure Set_Dependent_Instances (Id : E; V : L) is
3867 pragma Assert (Is_Generic_Instance (Id));
3869 end Set_Dependent_Instances;
3871 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3873 pragma Assert (Nkind (Id) in N_Entity);
3875 end Set_Depends_On_Private;
3877 procedure Set_Derived_Type_Link (Id : E; V : E) is
3879 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3881 end Set_Derived_Type_Link;
3883 procedure Set_Digits_Value (Id : E; V : U) is
3886 (Is_Floating_Point_Type (Id)
3887 or else Is_Decimal_Fixed_Point_Type (Id));
3889 end Set_Digits_Value;
3891 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3894 end Set_Directly_Designated_Type;
3896 procedure Set_Discard_Names (Id : E; V : B := True) is
3899 end Set_Discard_Names;
3901 procedure Set_Discriminal (Id : E; V : E) is
3903 pragma Assert (Ekind (Id) = E_Discriminant);
3905 end Set_Discriminal;
3907 procedure Set_Discriminal_Link (Id : E; V : E) is
3910 end Set_Discriminal_Link;
3912 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3914 pragma Assert (Ekind (Id) = E_Component);
3916 end Set_Discriminant_Checking_Func;
3918 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3920 pragma Assert (Nkind (Id) in N_Entity);
3921 Set_Elist21 (Id, V);
3922 end Set_Discriminant_Constraint;
3924 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3927 end Set_Discriminant_Default_Value;
3929 procedure Set_Discriminant_Number (Id : E; V : U) is
3932 end Set_Discriminant_Number;
3934 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3936 pragma Assert (Ekind (Id) = E_Record_Type
3937 and then Id = Implementation_Base_Type (Id));
3938 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3939 Set_Elist26 (Id, V);
3940 end Set_Dispatch_Table_Wrappers;
3942 procedure Set_DT_Entry_Count (Id : E; V : U) is
3944 pragma Assert (Ekind (Id) = E_Component);
3946 end Set_DT_Entry_Count;
3948 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3950 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3952 end Set_DT_Offset_To_Top_Func;
3954 procedure Set_DT_Position (Id : E; V : U) is
3956 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3958 end Set_DT_Position;
3960 procedure Set_DTC_Entity (Id : E; V : E) is
3962 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3966 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3968 pragma Assert (Ekind (Id) = E_Package);
3969 Set_Flag210 (Id, V);
3970 end Set_Elaborate_Body_Desirable;
3972 procedure Set_Elaboration_Entity (Id : E; V : E) is
3977 Ekind (Id) = E_Package
3979 Is_Generic_Unit (Id));
3981 end Set_Elaboration_Entity;
3983 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3988 Ekind (Id) = E_Package
3990 Is_Generic_Unit (Id));
3991 Set_Flag174 (Id, V);
3992 end Set_Elaboration_Entity_Required;
3994 procedure Set_Encapsulating_State (Id : E; V : E) is
3996 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3998 end Set_Encapsulating_State;
4000 procedure Set_Enclosing_Scope (Id : E; V : E) is
4003 end Set_Enclosing_Scope;
4005 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4007 pragma Assert (Is_Entry (Id));
4008 Set_Flag152 (Id, V);
4009 end Set_Entry_Accepted;
4011 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4014 end Set_Entry_Bodies_Array;
4016 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4019 end Set_Entry_Cancel_Parameter;
4021 procedure Set_Entry_Component (Id : E; V : E) is
4024 end Set_Entry_Component;
4026 procedure Set_Entry_Formal (Id : E; V : E) is
4029 end Set_Entry_Formal;
4031 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4033 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4035 end Set_Entry_Index_Constant;
4037 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4040 end Set_Entry_Parameters_Type;
4042 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4044 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4046 end Set_Enum_Pos_To_Rep;
4048 procedure Set_Enumeration_Pos (Id : E; V : U) is
4050 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4052 end Set_Enumeration_Pos;
4054 procedure Set_Enumeration_Rep (Id : E; V : U) is
4056 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4058 end Set_Enumeration_Rep;
4060 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4062 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4064 end Set_Enumeration_Rep_Expr;
4066 procedure Set_Equivalent_Type (Id : E; V : E) is
4069 (Ekind_In (Id, E_Class_Wide_Type,
4070 E_Class_Wide_Subtype,
4071 E_Access_Protected_Subprogram_Type,
4072 E_Anonymous_Access_Protected_Subprogram_Type,
4073 E_Access_Subprogram_Type,
4076 end Set_Equivalent_Type;
4078 procedure Set_Esize (Id : E; V : U) is
4083 procedure Set_Extra_Accessibility (Id : E; V : E) is
4086 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4088 end Set_Extra_Accessibility;
4090 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4092 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4094 end Set_Extra_Accessibility_Of_Result;
4096 procedure Set_Extra_Constrained (Id : E; V : E) is
4098 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4100 end Set_Extra_Constrained;
4102 procedure Set_Extra_Formal (Id : E; V : E) is
4105 end Set_Extra_Formal;
4107 procedure Set_Extra_Formals (Id : E; V : E) is
4110 (Is_Overloadable (Id)
4111 or else Ekind_In (Id, E_Entry_Family,
4113 E_Subprogram_Type));
4115 end Set_Extra_Formals;
4117 procedure Set_Finalization_Master (Id : E; V : E) is
4119 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4121 end Set_Finalization_Master;
4123 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4125 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4126 Set_Flag158 (Id, V);
4127 end Set_Finalize_Storage_Only;
4129 procedure Set_Finalizer (Id : E; V : E) is
4131 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4135 procedure Set_First_Entity (Id : E; V : E) is
4138 end Set_First_Entity;
4140 procedure Set_First_Exit_Statement (Id : E; V : N) is
4142 pragma Assert (Ekind (Id) = E_Loop);
4144 end Set_First_Exit_Statement;
4146 procedure Set_First_Index (Id : E; V : N) is
4148 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4150 end Set_First_Index;
4152 procedure Set_First_Literal (Id : E; V : E) is
4154 pragma Assert (Is_Enumeration_Type (Id));
4156 end Set_First_Literal;
4158 procedure Set_First_Private_Entity (Id : E; V : E) is
4160 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4161 or else Ekind (Id) in Concurrent_Kind);
4163 end Set_First_Private_Entity;
4165 procedure Set_First_Rep_Item (Id : E; V : N) is
4168 end Set_First_Rep_Item;
4170 procedure Set_Float_Rep (Id : E; V : F) is
4171 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4173 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4176 procedure Set_Freeze_Node (Id : E; V : N) is
4179 end Set_Freeze_Node;
4181 procedure Set_From_Limited_With (Id : E; V : B := True) is
4184 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4185 Set_Flag159 (Id, V);
4186 end Set_From_Limited_With;
4188 procedure Set_Full_View (Id : E; V : E) is
4190 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4194 procedure Set_Generic_Homonym (Id : E; V : E) is
4197 end Set_Generic_Homonym;
4199 procedure Set_Generic_Renamings (Id : E; V : L) is
4201 Set_Elist23 (Id, V);
4202 end Set_Generic_Renamings;
4204 procedure Set_Handler_Records (Id : E; V : S) is
4207 end Set_Handler_Records;
4209 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4211 pragma Assert (Id = Base_Type (Id));
4212 Set_Flag135 (Id, V);
4213 end Set_Has_Aliased_Components;
4215 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4218 end Set_Has_Alignment_Clause;
4220 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4223 end Set_Has_All_Calls_Remote;
4225 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4228 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4229 Set_Flag253 (Id, V);
4230 end Set_Has_Anonymous_Master;
4232 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4234 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4236 end Set_Has_Atomic_Components;
4238 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4241 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4242 Set_Flag139 (Id, V);
4243 end Set_Has_Biased_Representation;
4245 procedure Set_Has_Completion (Id : E; V : B := True) is
4248 end Set_Has_Completion;
4250 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4252 pragma Assert (Is_Type (Id));
4254 end Set_Has_Completion_In_Body;
4256 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4258 pragma Assert (Ekind (Id) = E_Record_Type);
4259 Set_Flag140 (Id, V);
4260 end Set_Has_Complex_Representation;
4262 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4264 pragma Assert (Ekind (Id) = E_Array_Type);
4266 end Set_Has_Component_Size_Clause;
4268 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4270 pragma Assert (Is_Type (Id));
4271 Set_Flag187 (Id, V);
4272 end Set_Has_Constrained_Partial_View;
4274 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4276 Set_Flag181 (Id, V);
4277 end Set_Has_Contiguous_Rep;
4279 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4281 pragma Assert (Id = Base_Type (Id));
4283 end Set_Has_Controlled_Component;
4285 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4288 end Set_Has_Controlling_Result;
4290 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4292 Set_Flag119 (Id, V);
4293 end Set_Has_Convention_Pragma;
4295 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4298 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4299 and then Is_Base_Type (Id));
4301 end Set_Has_Default_Aspect;
4303 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4305 pragma Assert (Is_Type (Id));
4307 end Set_Has_Default_Init_Cond;
4309 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4311 pragma Assert (Nkind (Id) in N_Entity);
4312 Set_Flag200 (Id, V);
4313 end Set_Has_Delayed_Aspects;
4315 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4317 pragma Assert (Nkind (Id) in N_Entity);
4319 end Set_Has_Delayed_Freeze;
4321 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4323 pragma Assert (Nkind (Id) in N_Entity);
4324 Set_Flag261 (Id, V);
4325 end Set_Has_Delayed_Rep_Aspects;
4327 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4329 pragma Assert (Nkind (Id) in N_Entity);
4331 end Set_Has_Discriminants;
4333 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4335 pragma Assert (Ekind (Id) = E_Record_Type
4336 and then Is_Tagged_Type (Id));
4337 Set_Flag220 (Id, V);
4338 end Set_Has_Dispatch_Table;
4340 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4342 pragma Assert (Is_Type (Id));
4343 Set_Flag258 (Id, V);
4344 end Set_Has_Dynamic_Predicate_Aspect;
4346 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4348 pragma Assert (Is_Enumeration_Type (Id));
4350 end Set_Has_Enumeration_Rep_Clause;
4352 procedure Set_Has_Exit (Id : E; V : B := True) is
4357 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4359 pragma Assert (Ekind_In (Id, E_Entry,
4363 Set_Flag240 (Id, V);
4364 end Set_Has_Expanded_Contract;
4366 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4368 Set_Flag175 (Id, V);
4369 end Set_Has_Forward_Instantiation;
4371 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4373 Set_Flag173 (Id, V);
4374 end Set_Has_Fully_Qualified_Name;
4376 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4379 end Set_Has_Gigi_Rep_Item;
4381 procedure Set_Has_Homonym (Id : E; V : B := True) is
4384 end Set_Has_Homonym;
4386 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4388 Set_Flag251 (Id, V);
4389 end Set_Has_Implicit_Dereference;
4391 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4393 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4395 end Set_Has_Independent_Components;
4397 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4399 pragma Assert (Is_Type (Id));
4400 Set_Flag248 (Id, V);
4401 end Set_Has_Inheritable_Invariants;
4403 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4405 pragma Assert (Is_Type (Id));
4406 Set_Flag133 (Id, V);
4407 end Set_Has_Inherited_Default_Init_Cond;
4409 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4411 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4412 Set_Flag219 (Id, V);
4413 end Set_Has_Initial_Value;
4415 procedure Set_Has_Invariants (Id : E; V : B := True) is
4417 pragma Assert (Is_Type (Id));
4418 Set_Flag232 (Id, V);
4419 end Set_Has_Invariants;
4421 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4423 pragma Assert (Ekind (Id) = E_Loop);
4424 Set_Flag260 (Id, V);
4425 end Set_Has_Loop_Entry_Attributes;
4427 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4429 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4431 end Set_Has_Machine_Radix_Clause;
4433 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4436 end Set_Has_Master_Entity;
4438 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4440 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4441 Set_Flag142 (Id, V);
4442 end Set_Has_Missing_Return;
4444 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4446 Set_Flag101 (Id, V);
4447 end Set_Has_Nested_Block_With_Handler;
4449 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4451 pragma Assert (Is_Subprogram (Id));
4452 Set_Flag282 (Id, V);
4453 end Set_Has_Nested_Subprogram;
4455 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4457 pragma Assert (Id = Base_Type (Id));
4459 end Set_Has_Non_Standard_Rep;
4461 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4463 pragma Assert (Is_Type (Id));
4464 Set_Flag172 (Id, V);
4465 end Set_Has_Object_Size_Clause;
4467 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4469 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4470 Set_Flag110 (Id, V);
4471 end Set_Has_Out_Or_In_Out_Parameter;
4473 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4475 Set_Flag154 (Id, V);
4476 end Set_Has_Per_Object_Constraint;
4478 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4480 pragma Assert (Is_Access_Type (Id));
4481 Set_Flag27 (Base_Type (Id), V);
4482 end Set_Has_Pragma_Controlled;
4484 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4486 Set_Flag150 (Id, V);
4487 end Set_Has_Pragma_Elaborate_Body;
4489 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4491 Set_Flag157 (Id, V);
4492 end Set_Has_Pragma_Inline;
4494 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4496 Set_Flag230 (Id, V);
4497 end Set_Has_Pragma_Inline_Always;
4499 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4501 Set_Flag201 (Id, V);
4502 end Set_Has_Pragma_No_Inline;
4504 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4506 pragma Assert (Is_Enumeration_Type (Id));
4507 pragma Assert (Id = Base_Type (Id));
4508 Set_Flag198 (Id, V);
4509 end Set_Has_Pragma_Ordered;
4511 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4513 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4514 pragma Assert (Id = Base_Type (Id));
4515 Set_Flag121 (Id, V);
4516 end Set_Has_Pragma_Pack;
4518 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4520 Set_Flag221 (Id, V);
4521 end Set_Has_Pragma_Preelab_Init;
4523 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4525 Set_Flag203 (Id, V);
4526 end Set_Has_Pragma_Pure;
4528 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4530 Set_Flag179 (Id, V);
4531 end Set_Has_Pragma_Pure_Function;
4533 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4535 Set_Flag169 (Id, V);
4536 end Set_Has_Pragma_Thread_Local_Storage;
4538 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4540 Set_Flag233 (Id, V);
4541 end Set_Has_Pragma_Unmodified;
4543 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4545 Set_Flag180 (Id, V);
4546 end Set_Has_Pragma_Unreferenced;
4548 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4550 pragma Assert (Is_Type (Id));
4551 Set_Flag212 (Id, V);
4552 end Set_Has_Pragma_Unreferenced_Objects;
4554 procedure Set_Has_Predicates (Id : E; V : B := True) is
4556 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4557 Set_Flag250 (Id, V);
4558 end Set_Has_Predicates;
4560 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4562 pragma Assert (Id = Base_Type (Id));
4563 Set_Flag120 (Id, V);
4564 end Set_Has_Primitive_Operations;
4566 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4568 pragma Assert (Is_Type (Id));
4569 Set_Flag151 (Id, V);
4570 end Set_Has_Private_Ancestor;
4572 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4574 Set_Flag155 (Id, V);
4575 end Set_Has_Private_Declaration;
4577 procedure Set_Has_Protected (Id : E; V : B := True) is
4579 Set_Flag271 (Id, V);
4580 end Set_Has_Protected;
4582 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4584 Set_Flag161 (Id, V);
4585 end Set_Has_Qualified_Name;
4587 procedure Set_Has_RACW (Id : E; V : B := True) is
4589 pragma Assert (Ekind (Id) = E_Package);
4590 Set_Flag214 (Id, V);
4593 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4595 pragma Assert (Id = Base_Type (Id));
4597 end Set_Has_Record_Rep_Clause;
4599 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4601 pragma Assert (Is_Subprogram (Id));
4602 Set_Flag143 (Id, V);
4603 end Set_Has_Recursive_Call;
4605 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4607 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4608 Set_Flag267 (Id, V);
4609 end Set_Has_Shift_Operator;
4611 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4614 end Set_Has_Size_Clause;
4616 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4619 end Set_Has_Small_Clause;
4621 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4623 pragma Assert (Id = Base_Type (Id));
4624 Set_Flag100 (Id, V);
4625 end Set_Has_Specified_Layout;
4627 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4629 pragma Assert (Is_Type (Id));
4630 Set_Flag190 (Id, V);
4631 end Set_Has_Specified_Stream_Input;
4633 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4635 pragma Assert (Is_Type (Id));
4636 Set_Flag191 (Id, V);
4637 end Set_Has_Specified_Stream_Output;
4639 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4641 pragma Assert (Is_Type (Id));
4642 Set_Flag192 (Id, V);
4643 end Set_Has_Specified_Stream_Read;
4645 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4647 pragma Assert (Is_Type (Id));
4648 Set_Flag193 (Id, V);
4649 end Set_Has_Specified_Stream_Write;
4651 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4653 Set_Flag211 (Id, V);
4654 end Set_Has_Static_Discriminants;
4656 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4658 pragma Assert (Is_Type (Id));
4659 Set_Flag269 (Id, V);
4660 end Set_Has_Static_Predicate;
4662 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4664 pragma Assert (Is_Type (Id));
4665 Set_Flag259 (Id, V);
4666 end Set_Has_Static_Predicate_Aspect;
4668 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4670 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4671 pragma Assert (Id = Base_Type (Id));
4673 end Set_Has_Storage_Size_Clause;
4675 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4677 pragma Assert (Is_Elementary_Type (Id));
4678 Set_Flag184 (Id, V);
4679 end Set_Has_Stream_Size_Clause;
4681 procedure Set_Has_Task (Id : E; V : B := True) is
4683 pragma Assert (Id = Base_Type (Id));
4687 procedure Set_Has_Thunks (Id : E; V : B := True) is
4689 pragma Assert (Is_Tag (Id));
4690 Set_Flag228 (Id, V);
4693 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4695 pragma Assert (Id = Base_Type (Id));
4696 Set_Flag123 (Id, V);
4697 end Set_Has_Unchecked_Union;
4699 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4701 pragma Assert (Is_Type (Id));
4703 end Set_Has_Unknown_Discriminants;
4705 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4707 Set_Flag215 (Id, V);
4708 end Set_Has_Uplevel_Reference;
4710 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4712 pragma Assert (Ekind (Id) = E_Abstract_State);
4713 Set_Flag263 (Id, V);
4714 end Set_Has_Visible_Refinement;
4716 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4718 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4720 end Set_Has_Volatile_Components;
4722 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4724 Set_Flag182 (Id, V);
4725 end Set_Has_Xref_Entry;
4727 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4729 pragma Assert (Ekind (Id) = E_Variable);
4731 end Set_Hiding_Loop_Variable;
4733 procedure Set_Homonym (Id : E; V : E) is
4735 pragma Assert (Id /= V);
4739 procedure Set_Import_Pragma (Id : E; V : E) is
4741 pragma Assert (Is_Subprogram (Id));
4743 end Set_Import_Pragma;
4745 procedure Set_Interface_Alias (Id : E; V : E) is
4749 and then Is_Hidden (Id)
4750 and then (Ekind_In (Id, E_Procedure, E_Function)));
4752 end Set_Interface_Alias;
4754 procedure Set_Interfaces (Id : E; V : L) is
4756 pragma Assert (Is_Record_Type (Id));
4757 Set_Elist25 (Id, V);
4760 procedure Set_In_Package_Body (Id : E; V : B := True) is
4763 end Set_In_Package_Body;
4765 procedure Set_In_Private_Part (Id : E; V : B := True) is
4768 end Set_In_Private_Part;
4770 procedure Set_In_Use (Id : E; V : B := True) is
4772 pragma Assert (Nkind (Id) in N_Entity);
4776 procedure Set_Initialization_Statements (Id : E; V : N) is
4778 -- Tolerate an E_Void entity since this can be called while resolving
4779 -- an aggregate used as the initialization expression for an object
4780 -- declaration, and this occurs before the Ekind for the object is set.
4782 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4784 end Set_Initialization_Statements;
4786 procedure Set_Inner_Instances (Id : E; V : L) is
4788 Set_Elist23 (Id, V);
4789 end Set_Inner_Instances;
4791 procedure Set_Interface_Name (Id : E; V : N) is
4794 end Set_Interface_Name;
4796 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4798 pragma Assert (Is_Overloadable (Id));
4800 end Set_Is_Abstract_Subprogram;
4802 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4804 pragma Assert (Is_Type (Id));
4805 Set_Flag146 (Id, V);
4806 end Set_Is_Abstract_Type;
4808 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4810 pragma Assert (Is_Access_Type (Id));
4811 Set_Flag194 (Id, V);
4812 end Set_Is_Local_Anonymous_Access;
4814 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4816 pragma Assert (Is_Access_Type (Id));
4818 end Set_Is_Access_Constant;
4820 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4822 Set_Flag185 (Id, V);
4823 end Set_Is_Ada_2005_Only;
4825 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4827 Set_Flag199 (Id, V);
4828 end Set_Is_Ada_2012_Only;
4830 procedure Set_Is_Aliased (Id : E; V : B := True) is
4832 pragma Assert (Nkind (Id) in N_Entity);
4836 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4839 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4841 end Set_Is_Asynchronous;
4843 procedure Set_Is_Atomic (Id : E; V : B := True) is
4848 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4850 pragma Assert ((not V)
4851 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4852 Set_Flag122 (Id, V);
4853 end Set_Is_Bit_Packed_Array;
4855 procedure Set_Is_Called (Id : E; V : B := True) is
4857 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4858 Set_Flag102 (Id, V);
4861 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4864 end Set_Is_Character_Type;
4866 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4868 pragma Assert (Is_Formal (Id)
4869 or else Is_Object (Id)
4870 or else Is_Package_Or_Generic_Package (Id)
4871 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4872 or else Is_Type (Id)
4873 or else Ekind (Id) = E_Abstract_State
4874 or else Ekind (Id) = E_Component
4875 or else Ekind (Id) = E_Discriminant
4876 or else Ekind (Id) = E_Exception
4877 or else Ekind (Id) = E_Package_Body
4878 or else Ekind (Id) = E_Subprogram_Body
4880 -- Allow this attribute to appear on non-analyzed entities
4882 or else Ekind (Id) = E_Void);
4883 Set_Flag277 (Id, V);
4884 end Set_Is_Checked_Ghost_Entity;
4886 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4889 end Set_Is_Child_Unit;
4891 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4894 end Set_Is_Class_Wide_Equivalent_Type;
4896 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4898 Set_Flag149 (Id, V);
4899 end Set_Is_Compilation_Unit;
4901 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4903 pragma Assert (Ekind (Id) = E_Discriminant);
4904 Set_Flag103 (Id, V);
4905 end Set_Is_Completely_Hidden;
4907 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4910 end Set_Is_Concurrent_Record_Type;
4912 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4915 end Set_Is_Constr_Subt_For_U_Nominal;
4917 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4919 Set_Flag141 (Id, V);
4920 end Set_Is_Constr_Subt_For_UN_Aliased;
4922 procedure Set_Is_Constrained (Id : E; V : B := True) is
4924 pragma Assert (Nkind (Id) in N_Entity);
4926 end Set_Is_Constrained;
4928 procedure Set_Is_Constructor (Id : E; V : B := True) is
4931 end Set_Is_Constructor;
4933 procedure Set_Is_Controlled (Id : E; V : B := True) is
4935 pragma Assert (Id = Base_Type (Id));
4937 end Set_Is_Controlled;
4939 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4941 pragma Assert (Is_Formal (Id));
4943 end Set_Is_Controlling_Formal;
4945 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4948 end Set_Is_CPP_Class;
4950 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4952 pragma Assert (Ekind (Id) = E_Procedure);
4953 Set_Flag132 (Id, V);
4954 end Set_Is_Default_Init_Cond_Procedure;
4956 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4958 pragma Assert (Is_Type (Id));
4959 Set_Flag223 (Id, V);
4960 end Set_Is_Descendent_Of_Address;
4962 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4964 Set_Flag176 (Id, V);
4965 end Set_Is_Discrim_SO_Function;
4967 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4969 Set_Flag264 (Id, V);
4970 end Set_Is_Discriminant_Check_Function;
4972 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4974 Set_Flag234 (Id, V);
4975 end Set_Is_Dispatch_Table_Entity;
4977 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4982 Is_Overloadable (Id)
4984 Ekind (Id) = E_Subprogram_Type);
4987 end Set_Is_Dispatching_Operation;
4989 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4991 Set_Flag124 (Id, V);
4992 end Set_Is_Eliminated;
4994 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4997 end Set_Is_Entry_Formal;
4999 procedure Set_Is_Exported (Id : E; V : B := True) is
5002 end Set_Is_Exported;
5004 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5007 end Set_Is_First_Subtype;
5009 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5011 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5012 Set_Flag118 (Id, V);
5013 end Set_Is_For_Access_Subtype;
5015 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5017 Set_Flag111 (Id, V);
5018 end Set_Is_Formal_Subprogram;
5020 procedure Set_Is_Frozen (Id : E; V : B := True) is
5022 pragma Assert (Nkind (Id) in N_Entity);
5026 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5028 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5029 Set_Flag274 (Id, V);
5030 end Set_Is_Generic_Actual_Subprogram;
5032 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5034 pragma Assert (Is_Type (Id));
5036 end Set_Is_Generic_Actual_Type;
5038 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5040 Set_Flag130 (Id, V);
5041 end Set_Is_Generic_Instance;
5043 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5045 pragma Assert (Nkind (Id) in N_Entity);
5047 end Set_Is_Generic_Type;
5049 procedure Set_Is_Hidden (Id : E; V : B := True) is
5054 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5056 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5058 end Set_Is_Hidden_Non_Overridden_Subpgm;
5060 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5062 Set_Flag171 (Id, V);
5063 end Set_Is_Hidden_Open_Scope;
5065 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5067 pragma Assert (Is_Formal (Id)
5068 or else Is_Object (Id)
5069 or else Is_Package_Or_Generic_Package (Id)
5070 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5071 or else Is_Type (Id)
5072 or else Ekind (Id) = E_Abstract_State
5073 or else Ekind (Id) = E_Component
5074 or else Ekind (Id) = E_Discriminant
5075 or else Ekind (Id) = E_Exception
5076 or else Ekind (Id) = E_Package_Body
5077 or else Ekind (Id) = E_Subprogram_Body
5079 -- Allow this attribute to appear on non-analyzed entities
5081 or else Ekind (Id) = E_Void);
5082 Set_Flag278 (Id, V);
5083 end Set_Is_Ignored_Ghost_Entity;
5085 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5087 pragma Assert (Nkind (Id) in N_Entity);
5089 end Set_Is_Immediately_Visible;
5091 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5093 Set_Flag254 (Id, V);
5094 end Set_Is_Implementation_Defined;
5096 procedure Set_Is_Imported (Id : E; V : B := True) is
5099 end Set_Is_Imported;
5101 procedure Set_Is_Independent (Id : E; V : B := True) is
5103 Set_Flag268 (Id, V);
5104 end Set_Is_Independent;
5106 procedure Set_Is_Inlined (Id : E; V : B := True) is
5111 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5113 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5115 end Set_Is_Inlined_Always;
5117 procedure Set_Is_Interface (Id : E; V : B := True) is
5119 pragma Assert (Is_Record_Type (Id));
5120 Set_Flag186 (Id, V);
5121 end Set_Is_Interface;
5123 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5125 Set_Flag126 (Id, V);
5126 end Set_Is_Instantiated;
5128 procedure Set_Is_Internal (Id : E; V : B := True) is
5130 pragma Assert (Nkind (Id) in N_Entity);
5132 end Set_Is_Internal;
5134 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5136 pragma Assert (Nkind (Id) in N_Entity);
5138 end Set_Is_Interrupt_Handler;
5140 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5143 end Set_Is_Intrinsic_Subprogram;
5145 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5147 pragma Assert (Ekind (Id) = E_Procedure);
5148 Set_Flag257 (Id, V);
5149 end Set_Is_Invariant_Procedure;
5151 procedure Set_Is_Itype (Id : E; V : B := True) is
5156 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5159 end Set_Is_Known_Non_Null;
5161 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5163 Set_Flag204 (Id, V);
5164 end Set_Is_Known_Null;
5166 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5168 Set_Flag170 (Id, V);
5169 end Set_Is_Known_Valid;
5171 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5173 pragma Assert (Is_Type (Id));
5174 Set_Flag106 (Id, V);
5175 end Set_Is_Limited_Composite;
5177 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5179 pragma Assert (Is_Interface (Id));
5180 Set_Flag197 (Id, V);
5181 end Set_Is_Limited_Interface;
5183 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5186 end Set_Is_Limited_Record;
5188 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5190 pragma Assert (Is_Subprogram (Id));
5191 Set_Flag137 (Id, V);
5192 end Set_Is_Machine_Code_Subprogram;
5194 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5196 pragma Assert (Is_Type (Id));
5197 Set_Flag109 (Id, V);
5198 end Set_Is_Non_Static_Subtype;
5200 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5202 pragma Assert (Ekind (Id) = E_Procedure);
5203 Set_Flag178 (Id, V);
5204 end Set_Is_Null_Init_Proc;
5206 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5208 Set_Flag153 (Id, V);
5209 end Set_Is_Obsolescent;
5211 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5213 pragma Assert (Ekind (Id) = E_Out_Parameter);
5214 Set_Flag226 (Id, V);
5215 end Set_Is_Only_Out_Parameter;
5217 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5219 Set_Flag160 (Id, V);
5220 end Set_Is_Package_Body_Entity;
5222 procedure Set_Is_Packed (Id : E; V : B := True) is
5224 pragma Assert (Id = Base_Type (Id));
5228 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5230 Set_Flag138 (Id, V);
5231 end Set_Is_Packed_Array_Impl_Type;
5233 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5235 pragma Assert (Nkind (Id) in N_Entity);
5237 end Set_Is_Potentially_Use_Visible;
5239 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5241 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5242 Set_Flag255 (Id, V);
5243 end Set_Is_Predicate_Function;
5245 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5247 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5248 Set_Flag256 (Id, V);
5249 end Set_Is_Predicate_Function_M;
5251 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5254 end Set_Is_Preelaborated;
5256 procedure Set_Is_Primitive (Id : E; V : B := True) is
5259 (Is_Overloadable (Id)
5260 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5261 Set_Flag218 (Id, V);
5262 end Set_Is_Primitive;
5264 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5266 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5267 Set_Flag195 (Id, V);
5268 end Set_Is_Primitive_Wrapper;
5270 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5272 pragma Assert (Is_Type (Id));
5273 Set_Flag107 (Id, V);
5274 end Set_Is_Private_Composite;
5276 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5279 end Set_Is_Private_Descendant;
5281 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5283 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5284 Set_Flag245 (Id, V);
5285 end Set_Is_Private_Primitive;
5287 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5289 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5290 Set_Flag252 (Id, V);
5291 end Set_Is_Processed_Transient;
5293 procedure Set_Is_Public (Id : E; V : B := True) is
5295 pragma Assert (Nkind (Id) in N_Entity);
5299 procedure Set_Is_Pure (Id : E; V : B := True) is
5304 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5306 pragma Assert (Is_Access_Type (Id));
5307 Set_Flag189 (Id, V);
5308 end Set_Is_Pure_Unit_Access_Type;
5310 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5312 pragma Assert (Is_Type (Id));
5313 Set_Flag244 (Id, V);
5314 end Set_Is_RACW_Stub_Type;
5316 procedure Set_Is_Raised (Id : E; V : B := True) is
5318 pragma Assert (Ekind (Id) = E_Exception);
5319 Set_Flag224 (Id, V);
5322 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5325 end Set_Is_Remote_Call_Interface;
5327 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5330 end Set_Is_Remote_Types;
5332 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5334 Set_Flag112 (Id, V);
5335 end Set_Is_Renaming_Of_Object;
5337 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5339 Set_Flag209 (Id, V);
5340 end Set_Is_Return_Object;
5342 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5344 pragma Assert (Ekind (Id) = E_Variable);
5345 Set_Flag249 (Id, V);
5346 end Set_Is_Safe_To_Reevaluate;
5348 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5351 end Set_Is_Shared_Passive;
5353 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5355 pragma Assert (Is_Type (Id));
5356 Set_Flag281 (Id, V);
5357 end Set_Is_Static_Type;
5359 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5363 or else Ekind_In (Id, E_Exception,
5368 end Set_Is_Statically_Allocated;
5370 procedure Set_Is_Tag (Id : E; V : B := True) is
5372 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5376 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5379 end Set_Is_Tagged_Type;
5381 procedure Set_Is_Thunk (Id : E; V : B := True) is
5383 pragma Assert (Is_Subprogram (Id));
5384 Set_Flag225 (Id, V);
5387 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5389 Set_Flag235 (Id, V);
5390 end Set_Is_Trivial_Subprogram;
5392 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5394 Set_Flag163 (Id, V);
5395 end Set_Is_True_Constant;
5397 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5399 pragma Assert (Id = Base_Type (Id));
5400 Set_Flag117 (Id, V);
5401 end Set_Is_Unchecked_Union;
5403 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5405 pragma Assert (Ekind (Id) = E_Record_Type);
5406 Set_Flag246 (Id, V);
5407 end Set_Is_Underlying_Record_View;
5409 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5411 Set_Flag284 (Id, V);
5412 end Set_Is_Unimplemented;
5414 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5416 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5417 Set_Flag144 (Id, V);
5418 end Set_Is_Unsigned_Type;
5420 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5423 (Ekind_In (Id, E_Constant, E_Variable)
5424 or else Is_Formal (Id)
5425 or else Is_Type (Id));
5426 Set_Flag283 (Id, V);
5427 end Set_Is_Uplevel_Referenced_Entity;
5429 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5431 pragma Assert (Ekind (Id) = E_Procedure);
5432 Set_Flag127 (Id, V);
5433 end Set_Is_Valued_Procedure;
5435 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5437 Set_Flag206 (Id, V);
5438 end Set_Is_Visible_Formal;
5440 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5442 Set_Flag116 (Id, V);
5443 end Set_Is_Visible_Lib_Unit;
5445 procedure Set_Is_Volatile (Id : E; V : B := True) is
5447 pragma Assert (Nkind (Id) in N_Entity);
5449 end Set_Is_Volatile;
5451 procedure Set_Itype_Printed (Id : E; V : B := True) is
5453 pragma Assert (Is_Itype (Id));
5454 Set_Flag202 (Id, V);
5455 end Set_Itype_Printed;
5457 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5460 end Set_Kill_Elaboration_Checks;
5462 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5465 end Set_Kill_Range_Checks;
5467 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5469 pragma Assert (Is_Type (Id));
5470 Set_Flag207 (Id, V);
5471 end Set_Known_To_Have_Preelab_Init;
5473 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5475 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5477 end Set_Last_Aggregate_Assignment;
5479 procedure Set_Last_Assignment (Id : E; V : N) is
5481 pragma Assert (Is_Assignable (Id));
5483 end Set_Last_Assignment;
5485 procedure Set_Last_Entity (Id : E; V : E) is
5488 end Set_Last_Entity;
5490 procedure Set_Limited_View (Id : E; V : E) is
5492 pragma Assert (Ekind (Id) = E_Package);
5494 end Set_Limited_View;
5496 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5498 pragma Assert (Is_Type (Id)
5499 or else Ekind_In (Id, E_Constant, E_Variable)
5500 or else Is_Subprogram (Id));
5502 end Set_Linker_Section_Pragma;
5504 procedure Set_Lit_Indexes (Id : E; V : E) is
5506 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5508 end Set_Lit_Indexes;
5510 procedure Set_Lit_Strings (Id : E; V : E) is
5512 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5514 end Set_Lit_Strings;
5516 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5518 pragma Assert (Is_Formal (Id));
5519 Set_Flag205 (Id, V);
5520 end Set_Low_Bound_Tested;
5522 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5524 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5526 end Set_Machine_Radix_10;
5528 procedure Set_Master_Id (Id : E; V : E) is
5530 pragma Assert (Is_Access_Type (Id));
5534 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5536 Set_Flag168 (Id, V);
5537 end Set_Materialize_Entity;
5539 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5541 Set_Flag262 (Id, V);
5542 end Set_May_Inherit_Delayed_Rep_Aspects;
5544 procedure Set_Mechanism (Id : E; V : M) is
5546 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5547 Set_Uint8 (Id, UI_From_Int (V));
5550 procedure Set_Modulus (Id : E; V : U) is
5552 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5556 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5558 pragma Assert (Is_Type (Id));
5559 Set_Flag183 (Id, V);
5560 end Set_Must_Be_On_Byte_Boundary;
5562 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5564 pragma Assert (Is_Type (Id));
5565 Set_Flag208 (Id, V);
5566 end Set_Must_Have_Preelab_Init;
5568 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5570 Set_Flag147 (Id, V);
5571 end Set_Needs_Debug_Info;
5573 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5576 (Is_Overloadable (Id)
5577 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5579 end Set_Needs_No_Actuals;
5581 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5583 Set_Flag115 (Id, V);
5584 end Set_Never_Set_In_Source;
5586 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5589 end Set_Next_Inlined_Subprogram;
5591 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5593 pragma Assert (Is_Discrete_Type (Id));
5594 Set_Flag276 (Id, V);
5595 end Set_No_Dynamic_Predicate_On_Actual;
5597 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5599 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5600 Set_Flag131 (Id, V);
5601 end Set_No_Pool_Assigned;
5603 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5605 pragma Assert (Is_Discrete_Type (Id));
5606 Set_Flag275 (Id, V);
5607 end Set_No_Predicate_On_Actual;
5609 procedure Set_No_Return (Id : E; V : B := True) is
5612 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5613 Set_Flag113 (Id, V);
5616 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5618 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5619 Set_Flag136 (Id, V);
5620 end Set_No_Strict_Aliasing;
5622 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5624 pragma Assert (Is_Tagged_Type (Id));
5626 end Set_No_Tagged_Streams_Pragma;
5628 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5630 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5632 end Set_Non_Binary_Modulus;
5634 procedure Set_Non_Limited_View (Id : E; V : E) is
5637 (Ekind (Id) in Incomplete_Kind
5638 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
5640 end Set_Non_Limited_View;
5642 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5645 (Root_Type (Id) = Standard_Boolean
5646 and then Ekind (Id) = E_Enumeration_Type);
5647 Set_Flag162 (Id, V);
5648 end Set_Nonzero_Is_True;
5650 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5652 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5654 end Set_Normalized_First_Bit;
5656 procedure Set_Normalized_Position (Id : E; V : U) is
5658 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5660 end Set_Normalized_Position;
5662 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5664 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5666 end Set_Normalized_Position_Max;
5668 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5670 pragma Assert (Ekind (Id) = E_Variable);
5671 Set_Flag247 (Id, V);
5672 end Set_OK_To_Rename;
5674 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5677 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5678 Set_Flag239 (Id, V);
5679 end Set_OK_To_Reorder_Components;
5681 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5684 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5685 Set_Flag241 (Id, V);
5686 end Set_Optimize_Alignment_Space;
5688 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5691 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5692 Set_Flag242 (Id, V);
5693 end Set_Optimize_Alignment_Time;
5695 procedure Set_Original_Access_Type (Id : E; V : E) is
5697 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5699 end Set_Original_Access_Type;
5701 procedure Set_Original_Array_Type (Id : E; V : E) is
5703 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5705 end Set_Original_Array_Type;
5707 procedure Set_Original_Record_Component (Id : E; V : E) is
5709 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5711 end Set_Original_Record_Component;
5713 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5715 Set_Flag243 (Id, V);
5716 end Set_Overlays_Constant;
5718 procedure Set_Overridden_Operation (Id : E; V : E) is
5721 end Set_Overridden_Operation;
5723 procedure Set_Package_Instantiation (Id : E; V : N) is
5725 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5727 end Set_Package_Instantiation;
5729 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5731 pragma Assert (Is_Array_Type (Id));
5733 end Set_Packed_Array_Impl_Type;
5735 procedure Set_Parent_Subtype (Id : E; V : E) is
5737 pragma Assert (Ekind (Id) = E_Record_Type);
5739 end Set_Parent_Subtype;
5741 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5743 pragma Assert (Ekind (Id) = E_Abstract_State);
5745 end Set_Part_Of_Constituents;
5747 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5749 pragma Assert (Is_Type (Id));
5750 Set_Flag280 (Id, V);
5751 end Set_Partial_View_Has_Unknown_Discr;
5753 procedure Set_Pending_Access_Types (Id : E; V : L) is
5755 pragma Assert (Is_Type (Id));
5756 Set_Elist15 (Id, V);
5757 end Set_Pending_Access_Types;
5759 procedure Set_Postconditions_Proc (Id : E; V : E) is
5761 pragma Assert (Ekind_In (Id, E_Entry,
5766 end Set_Postconditions_Proc;
5768 procedure Set_PPC_Wrapper (Id : E; V : E) is
5770 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5772 end Set_PPC_Wrapper;
5774 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5776 pragma Assert (Is_Tagged_Type (Id));
5777 Set_Elist10 (Id, V);
5778 end Set_Direct_Primitive_Operations;
5780 procedure Set_Prival (Id : E; V : E) is
5782 pragma Assert (Is_Protected_Component (Id));
5786 procedure Set_Prival_Link (Id : E; V : E) is
5788 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5790 end Set_Prival_Link;
5792 procedure Set_Private_Dependents (Id : E; V : L) is
5794 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5795 Set_Elist18 (Id, V);
5796 end Set_Private_Dependents;
5798 procedure Set_Private_View (Id : E; V : N) is
5800 pragma Assert (Is_Private_Type (Id));
5802 end Set_Private_View;
5804 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5806 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5808 end Set_Protected_Body_Subprogram;
5810 procedure Set_Protected_Formal (Id : E; V : E) is
5812 pragma Assert (Is_Formal (Id));
5814 end Set_Protected_Formal;
5816 procedure Set_Protection_Object (Id : E; V : E) is
5818 pragma Assert (Ekind_In (Id, E_Entry,
5823 end Set_Protection_Object;
5825 procedure Set_Reachable (Id : E; V : B := True) is
5830 procedure Set_Referenced (Id : E; V : B := True) is
5832 Set_Flag156 (Id, V);
5835 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5838 end Set_Referenced_As_LHS;
5840 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5842 Set_Flag227 (Id, V);
5843 end Set_Referenced_As_Out_Parameter;
5845 procedure Set_Refinement_Constituents (Id : E; V : L) is
5847 pragma Assert (Ekind (Id) = E_Abstract_State);
5849 end Set_Refinement_Constituents;
5851 procedure Set_Register_Exception_Call (Id : E; V : N) is
5853 pragma Assert (Ekind (Id) = E_Exception);
5855 end Set_Register_Exception_Call;
5857 procedure Set_Related_Array_Object (Id : E; V : E) is
5859 pragma Assert (Is_Array_Type (Id));
5861 end Set_Related_Array_Object;
5863 procedure Set_Related_Expression (Id : E; V : N) is
5865 pragma Assert (Ekind (Id) in Type_Kind
5866 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5868 end Set_Related_Expression;
5870 procedure Set_Related_Instance (Id : E; V : E) is
5872 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5874 end Set_Related_Instance;
5876 procedure Set_Related_Type (Id : E; V : E) is
5878 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5880 end Set_Related_Type;
5882 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5884 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5886 end Set_Relative_Deadline_Variable;
5888 procedure Set_Renamed_Entity (Id : E; V : N) is
5891 end Set_Renamed_Entity;
5893 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5895 pragma Assert (Ekind (Id) = E_Package);
5896 Set_Flag231 (Id, V);
5897 end Set_Renamed_In_Spec;
5899 procedure Set_Renamed_Object (Id : E; V : N) is
5902 end Set_Renamed_Object;
5904 procedure Set_Renaming_Map (Id : E; V : U) is
5907 end Set_Renaming_Map;
5909 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5911 pragma Assert (Is_Overloadable (Id));
5912 Set_Flag213 (Id, V);
5913 end Set_Requires_Overriding;
5915 procedure Set_Return_Present (Id : E; V : B := True) is
5918 end Set_Return_Present;
5920 procedure Set_Return_Applies_To (Id : E; V : N) is
5923 end Set_Return_Applies_To;
5925 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5928 end Set_Returns_By_Ref;
5930 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5932 pragma Assert (Ekind (Id) = E_Function);
5933 Set_Flag134 (Id, V);
5934 end Set_Returns_Limited_View;
5936 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5939 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5940 Set_Flag164 (Id, V);
5941 end Set_Reverse_Bit_Order;
5943 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5947 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5949 end Set_Reverse_Storage_Order;
5951 procedure Set_RM_Size (Id : E; V : U) is
5953 pragma Assert (Is_Type (Id));
5957 procedure Set_Scalar_Range (Id : E; V : N) is
5960 end Set_Scalar_Range;
5962 procedure Set_Scale_Value (Id : E; V : U) is
5965 end Set_Scale_Value;
5967 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5969 pragma Assert (not Is_Record_Type (Id));
5971 end Set_Scope_Depth_Value;
5973 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5975 Set_Flag167 (Id, V);
5976 end Set_Sec_Stack_Needed_For_Return;
5978 procedure Set_Shadow_Entities (Id : E; V : S) is
5980 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5982 end Set_Shadow_Entities;
5984 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5986 pragma Assert (Ekind (Id) = E_Variable);
5988 end Set_Shared_Var_Procs_Instance;
5990 procedure Set_Size_Check_Code (Id : E; V : N) is
5992 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5994 end Set_Size_Check_Code;
5996 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5998 Set_Flag177 (Id, V);
5999 end Set_Size_Depends_On_Discriminant;
6001 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6004 end Set_Size_Known_At_Compile_Time;
6006 procedure Set_Small_Value (Id : E; V : R) is
6008 pragma Assert (Is_Fixed_Point_Type (Id));
6009 Set_Ureal21 (Id, V);
6010 end Set_Small_Value;
6012 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6015 (Ekind_In (Id, E_Generic_Package, -- package variants
6020 end Set_SPARK_Aux_Pragma;
6022 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6025 (Ekind_In (Id, E_Generic_Package, -- package variants
6029 Set_Flag266 (Id, V);
6030 end Set_SPARK_Aux_Pragma_Inherited;
6032 procedure Set_SPARK_Pragma (Id : E; V : N) is
6035 (Ekind_In (Id, E_Function, -- subprogram variants
6037 E_Generic_Procedure,
6041 Ekind_In (Id, E_Generic_Package, -- package variants
6046 end Set_SPARK_Pragma;
6048 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6051 (Ekind_In (Id, E_Function, -- subprogram variants
6053 E_Generic_Procedure,
6057 Ekind_In (Id, E_Generic_Package, -- package variants
6061 Set_Flag265 (Id, V);
6062 end Set_SPARK_Pragma_Inherited;
6064 procedure Set_Spec_Entity (Id : E; V : E) is
6066 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6068 end Set_Spec_Entity;
6070 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6074 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6075 Set_Flag273 (Id, V);
6076 end Set_SSO_Set_High_By_Default;
6078 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6082 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6083 Set_Flag272 (Id, V);
6084 end Set_SSO_Set_Low_By_Default;
6086 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6088 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6090 end Set_Static_Discrete_Predicate;
6092 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6094 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6095 and then Has_Predicates (Id));
6097 end Set_Static_Real_Or_String_Predicate;
6099 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6101 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6103 end Set_Status_Flag_Or_Transient_Decl;
6105 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6107 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6108 pragma Assert (Id = Base_Type (Id));
6110 end Set_Storage_Size_Variable;
6112 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6114 pragma Assert (Ekind (Id) = E_Package);
6116 end Set_Static_Elaboration_Desired;
6118 procedure Set_Static_Initialization (Id : E; V : N) is
6121 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6123 end Set_Static_Initialization;
6125 procedure Set_Stored_Constraint (Id : E; V : L) is
6127 pragma Assert (Nkind (Id) in N_Entity);
6128 Set_Elist23 (Id, V);
6129 end Set_Stored_Constraint;
6131 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6133 pragma Assert (Ekind (Id) = E_Constant);
6134 Set_Flag270 (Id, V);
6135 end Set_Stores_Attribute_Old_Prefix;
6137 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6139 pragma Assert (Id = Base_Type (Id));
6140 Set_Flag145 (Id, V);
6141 end Set_Strict_Alignment;
6143 procedure Set_String_Literal_Length (Id : E; V : U) is
6145 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6147 end Set_String_Literal_Length;
6149 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6151 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6153 end Set_String_Literal_Low_Bound;
6155 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6157 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6159 end Set_Subprograms_For_Type;
6161 procedure Set_Subps_Index (Id : E; V : U) is
6163 pragma Assert (Is_Subprogram (Id));
6165 end Set_Subps_Index;
6167 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6169 Set_Flag148 (Id, V);
6170 end Set_Suppress_Elaboration_Warnings;
6172 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6174 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6175 Set_Flag105 (Id, V);
6176 end Set_Suppress_Initialization;
6178 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6180 Set_Flag165 (Id, V);
6181 end Set_Suppress_Style_Checks;
6183 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6185 Set_Flag217 (Id, V);
6186 end Set_Suppress_Value_Tracking_On_Call;
6188 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6190 pragma Assert (Ekind (Id) in Task_Kind);
6192 end Set_Task_Body_Procedure;
6194 procedure Set_Thunk_Entity (Id : E; V : E) is
6196 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6197 and then Is_Thunk (Id));
6199 end Set_Thunk_Entity;
6201 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6204 end Set_Treat_As_Volatile;
6206 procedure Set_Underlying_Full_View (Id : E; V : E) is
6208 pragma Assert (Ekind (Id) in Private_Kind);
6210 end Set_Underlying_Full_View;
6212 procedure Set_Underlying_Record_View (Id : E; V : E) is
6214 pragma Assert (Ekind (Id) = E_Record_Type);
6216 end Set_Underlying_Record_View;
6218 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6220 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6221 Set_Flag216 (Id, V);
6222 end Set_Universal_Aliasing;
6224 procedure Set_Unset_Reference (Id : E; V : N) is
6227 end Set_Unset_Reference;
6229 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6231 Set_Flag222 (Id, V);
6232 end Set_Used_As_Generic_Actual;
6234 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6236 pragma Assert (Ekind (Id) = E_Protected_Type);
6237 Set_Flag188 (Id, V);
6238 end Set_Uses_Lock_Free;
6240 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6243 end Set_Uses_Sec_Stack;
6245 procedure Set_Warnings_Off (Id : E; V : B := True) is
6248 end Set_Warnings_Off;
6250 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6252 Set_Flag236 (Id, V);
6253 end Set_Warnings_Off_Used;
6255 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6257 Set_Flag237 (Id, V);
6258 end Set_Warnings_Off_Used_Unmodified;
6260 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6262 Set_Flag238 (Id, V);
6263 end Set_Warnings_Off_Used_Unreferenced;
6265 procedure Set_Was_Hidden (Id : E; V : B := True) is
6267 Set_Flag196 (Id, V);
6270 procedure Set_Wrapped_Entity (Id : E; V : E) is
6272 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6273 and then Is_Primitive_Wrapper (Id));
6275 end Set_Wrapped_Entity;
6277 -----------------------------------
6278 -- Field Initialization Routines --
6279 -----------------------------------
6281 procedure Init_Alignment (Id : E) is
6283 Set_Uint14 (Id, Uint_0);
6286 procedure Init_Alignment (Id : E; V : Int) is
6288 Set_Uint14 (Id, UI_From_Int (V));
6291 procedure Init_Component_Bit_Offset (Id : E) is
6293 Set_Uint11 (Id, No_Uint);
6294 end Init_Component_Bit_Offset;
6296 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6298 Set_Uint11 (Id, UI_From_Int (V));
6299 end Init_Component_Bit_Offset;
6301 procedure Init_Component_Size (Id : E) is
6303 Set_Uint22 (Id, Uint_0);
6304 end Init_Component_Size;
6306 procedure Init_Component_Size (Id : E; V : Int) is
6308 Set_Uint22 (Id, UI_From_Int (V));
6309 end Init_Component_Size;
6311 procedure Init_Digits_Value (Id : E) is
6313 Set_Uint17 (Id, Uint_0);
6314 end Init_Digits_Value;
6316 procedure Init_Digits_Value (Id : E; V : Int) is
6318 Set_Uint17 (Id, UI_From_Int (V));
6319 end Init_Digits_Value;
6321 procedure Init_Esize (Id : E) is
6323 Set_Uint12 (Id, Uint_0);
6326 procedure Init_Esize (Id : E; V : Int) is
6328 Set_Uint12 (Id, UI_From_Int (V));
6331 procedure Init_Normalized_First_Bit (Id : E) is
6333 Set_Uint8 (Id, No_Uint);
6334 end Init_Normalized_First_Bit;
6336 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6338 Set_Uint8 (Id, UI_From_Int (V));
6339 end Init_Normalized_First_Bit;
6341 procedure Init_Normalized_Position (Id : E) is
6343 Set_Uint14 (Id, No_Uint);
6344 end Init_Normalized_Position;
6346 procedure Init_Normalized_Position (Id : E; V : Int) is
6348 Set_Uint14 (Id, UI_From_Int (V));
6349 end Init_Normalized_Position;
6351 procedure Init_Normalized_Position_Max (Id : E) is
6353 Set_Uint10 (Id, No_Uint);
6354 end Init_Normalized_Position_Max;
6356 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6358 Set_Uint10 (Id, UI_From_Int (V));
6359 end Init_Normalized_Position_Max;
6361 procedure Init_RM_Size (Id : E) is
6363 Set_Uint13 (Id, Uint_0);
6366 procedure Init_RM_Size (Id : E; V : Int) is
6368 Set_Uint13 (Id, UI_From_Int (V));
6371 -----------------------------
6372 -- Init_Component_Location --
6373 -----------------------------
6375 procedure Init_Component_Location (Id : E) is
6377 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6378 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6379 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6380 Set_Uint12 (Id, Uint_0); -- Esize
6381 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6382 end Init_Component_Location;
6384 ----------------------------
6385 -- Init_Object_Size_Align --
6386 ----------------------------
6388 procedure Init_Object_Size_Align (Id : E) is
6390 Set_Uint12 (Id, Uint_0); -- Esize
6391 Set_Uint14 (Id, Uint_0); -- Alignment
6392 end Init_Object_Size_Align;
6398 procedure Init_Size (Id : E; V : Int) is
6400 pragma Assert (not Is_Object (Id));
6401 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6402 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6405 ---------------------
6406 -- Init_Size_Align --
6407 ---------------------
6409 procedure Init_Size_Align (Id : E) is
6411 pragma Assert (not Is_Object (Id));
6412 Set_Uint12 (Id, Uint_0); -- Esize
6413 Set_Uint13 (Id, Uint_0); -- RM_Size
6414 Set_Uint14 (Id, Uint_0); -- Alignment
6415 end Init_Size_Align;
6417 ----------------------------------------------
6418 -- Type Representation Attribute Predicates --
6419 ----------------------------------------------
6421 function Known_Alignment (E : Entity_Id) return B is
6423 return Uint14 (E) /= Uint_0
6424 and then Uint14 (E) /= No_Uint;
6425 end Known_Alignment;
6427 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6429 return Uint11 (E) /= No_Uint;
6430 end Known_Component_Bit_Offset;
6432 function Known_Component_Size (E : Entity_Id) return B is
6434 return Uint22 (Base_Type (E)) /= Uint_0
6435 and then Uint22 (Base_Type (E)) /= No_Uint;
6436 end Known_Component_Size;
6438 function Known_Esize (E : Entity_Id) return B is
6440 return Uint12 (E) /= Uint_0
6441 and then Uint12 (E) /= No_Uint;
6444 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6446 return Uint8 (E) /= No_Uint;
6447 end Known_Normalized_First_Bit;
6449 function Known_Normalized_Position (E : Entity_Id) return B is
6451 return Uint14 (E) /= No_Uint;
6452 end Known_Normalized_Position;
6454 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6456 return Uint10 (E) /= No_Uint;
6457 end Known_Normalized_Position_Max;
6459 function Known_RM_Size (E : Entity_Id) return B is
6461 return Uint13 (E) /= No_Uint
6462 and then (Uint13 (E) /= Uint_0
6463 or else Is_Discrete_Type (E)
6464 or else Is_Fixed_Point_Type (E));
6467 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6469 return Uint11 (E) /= No_Uint
6470 and then Uint11 (E) >= Uint_0;
6471 end Known_Static_Component_Bit_Offset;
6473 function Known_Static_Component_Size (E : Entity_Id) return B is
6475 return Uint22 (Base_Type (E)) > Uint_0;
6476 end Known_Static_Component_Size;
6478 function Known_Static_Esize (E : Entity_Id) return B is
6480 return Uint12 (E) > Uint_0
6481 and then not Is_Generic_Type (E);
6482 end Known_Static_Esize;
6484 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6486 return Uint8 (E) /= No_Uint
6487 and then Uint8 (E) >= Uint_0;
6488 end Known_Static_Normalized_First_Bit;
6490 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6492 return Uint14 (E) /= No_Uint
6493 and then Uint14 (E) >= Uint_0;
6494 end Known_Static_Normalized_Position;
6496 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6498 return Uint10 (E) /= No_Uint
6499 and then Uint10 (E) >= Uint_0;
6500 end Known_Static_Normalized_Position_Max;
6502 function Known_Static_RM_Size (E : Entity_Id) return B is
6504 return (Uint13 (E) > Uint_0
6505 or else Is_Discrete_Type (E)
6506 or else Is_Fixed_Point_Type (E))
6507 and then not Is_Generic_Type (E);
6508 end Known_Static_RM_Size;
6510 function Unknown_Alignment (E : Entity_Id) return B is
6512 return Uint14 (E) = Uint_0
6513 or else Uint14 (E) = No_Uint;
6514 end Unknown_Alignment;
6516 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6518 return Uint11 (E) = No_Uint;
6519 end Unknown_Component_Bit_Offset;
6521 function Unknown_Component_Size (E : Entity_Id) return B is
6523 return Uint22 (Base_Type (E)) = Uint_0
6525 Uint22 (Base_Type (E)) = No_Uint;
6526 end Unknown_Component_Size;
6528 function Unknown_Esize (E : Entity_Id) return B is
6530 return Uint12 (E) = No_Uint
6532 Uint12 (E) = Uint_0;
6535 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6537 return Uint8 (E) = No_Uint;
6538 end Unknown_Normalized_First_Bit;
6540 function Unknown_Normalized_Position (E : Entity_Id) return B is
6542 return Uint14 (E) = No_Uint;
6543 end Unknown_Normalized_Position;
6545 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6547 return Uint10 (E) = No_Uint;
6548 end Unknown_Normalized_Position_Max;
6550 function Unknown_RM_Size (E : Entity_Id) return B is
6552 return (Uint13 (E) = Uint_0
6553 and then not Is_Discrete_Type (E)
6554 and then not Is_Fixed_Point_Type (E))
6555 or else Uint13 (E) = No_Uint;
6556 end Unknown_RM_Size;
6558 --------------------
6559 -- Address_Clause --
6560 --------------------
6562 function Address_Clause (Id : E) return N is
6564 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6571 function Aft_Value (Id : E) return U is
6573 Delta_Val : Ureal := Delta_Value (Id);
6575 while Delta_Val < Ureal_Tenth loop
6576 Delta_Val := Delta_Val * Ureal_10;
6577 Result := Result + 1;
6580 return UI_From_Int (Result);
6583 ----------------------
6584 -- Alignment_Clause --
6585 ----------------------
6587 function Alignment_Clause (Id : E) return N is
6589 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6590 end Alignment_Clause;
6596 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6598 if Last_Entity (V) = Empty then
6599 Set_First_Entity (Id => V, V => Id);
6601 Set_Next_Entity (Last_Entity (V), Id);
6604 Set_Next_Entity (Id, Empty);
6606 Set_Last_Entity (Id => V, V => Id);
6613 function Base_Type (Id : E) return E is
6615 if Is_Base_Type (Id) then
6618 pragma Assert (Is_Type (Id));
6623 -------------------------
6624 -- Component_Alignment --
6625 -------------------------
6627 -- Component Alignment is encoded using two flags, Flag128/129 as
6628 -- follows. Note that both flags False = Align_Default, so that the
6629 -- default initialization of flags to False initializes component
6630 -- alignment to the default value as required.
6632 -- Flag128 Flag129 Value
6633 -- ------- ------- -----
6634 -- False False Calign_Default
6635 -- False True Calign_Component_Size
6636 -- True False Calign_Component_Size_4
6637 -- True True Calign_Storage_Unit
6639 function Component_Alignment (Id : E) return C is
6640 BT : constant Node_Id := Base_Type (Id);
6643 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6645 if Flag128 (BT) then
6646 if Flag129 (BT) then
6647 return Calign_Storage_Unit;
6649 return Calign_Component_Size_4;
6653 if Flag129 (BT) then
6654 return Calign_Component_Size;
6656 return Calign_Default;
6659 end Component_Alignment;
6661 ----------------------
6662 -- Declaration_Node --
6663 ----------------------
6665 function Declaration_Node (Id : E) return N is
6669 if Ekind (Id) = E_Incomplete_Type
6670 and then Present (Full_View (Id))
6672 P := Parent (Full_View (Id));
6678 if Nkind (P) /= N_Selected_Component
6679 and then Nkind (P) /= N_Expanded_Name
6681 not (Nkind (P) = N_Defining_Program_Unit_Name
6682 and then Is_Child_Unit (Id))
6689 end Declaration_Node;
6691 ---------------------------------
6692 -- Default_Init_Cond_Procedure --
6693 ---------------------------------
6695 function Default_Init_Cond_Procedure (Id : E) return E is
6701 and then (Has_Default_Init_Cond (Id)
6702 or Has_Inherited_Default_Init_Cond (Id)));
6704 S := Subprograms_For_Type (Id);
6705 while Present (S) loop
6706 if Is_Default_Init_Cond_Procedure (S) then
6710 S := Subprograms_For_Type (S);
6714 end Default_Init_Cond_Procedure;
6716 ---------------------
6717 -- Designated_Type --
6718 ---------------------
6720 function Designated_Type (Id : E) return E is
6724 Desig_Type := Directly_Designated_Type (Id);
6726 if Ekind (Desig_Type) = E_Incomplete_Type
6727 and then Present (Full_View (Desig_Type))
6729 return Full_View (Desig_Type);
6731 elsif Is_Class_Wide_Type (Desig_Type)
6732 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6733 and then Present (Full_View (Etype (Desig_Type)))
6734 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6736 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6741 end Designated_Type;
6743 ----------------------
6744 -- Entry_Index_Type --
6745 ----------------------
6747 function Entry_Index_Type (Id : E) return N is
6749 pragma Assert (Ekind (Id) = E_Entry_Family);
6750 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6751 end Entry_Index_Type;
6753 ---------------------
6754 -- First_Component --
6755 ---------------------
6757 function First_Component (Id : E) return E is
6762 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6764 Comp_Id := First_Entity (Id);
6765 while Present (Comp_Id) loop
6766 exit when Ekind (Comp_Id) = E_Component;
6767 Comp_Id := Next_Entity (Comp_Id);
6771 end First_Component;
6773 -------------------------------------
6774 -- First_Component_Or_Discriminant --
6775 -------------------------------------
6777 function First_Component_Or_Discriminant (Id : E) return E is
6782 (Is_Record_Type (Id)
6783 or else Is_Incomplete_Or_Private_Type (Id)
6784 or else Has_Discriminants (Id));
6786 Comp_Id := First_Entity (Id);
6787 while Present (Comp_Id) loop
6788 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6789 Comp_Id := Next_Entity (Comp_Id);
6793 end First_Component_Or_Discriminant;
6799 function First_Formal (Id : E) return E is
6804 (Is_Generic_Subprogram (Id)
6805 or else Is_Overloadable (Id)
6806 or else Ekind_In (Id, E_Entry_Family,
6808 E_Subprogram_Type));
6810 if Ekind (Id) = E_Enumeration_Literal then
6814 Formal := First_Entity (Id);
6816 -- The first/next entity chain of a generic subprogram contains all
6817 -- generic formal parameters, followed by the formal parameters. Go
6818 -- directly to the parameters by skipping the formal part.
6820 if Is_Generic_Subprogram (Id) then
6821 while Present (Formal) and then not Is_Formal (Formal) loop
6822 Next_Entity (Formal);
6826 if Present (Formal) and then Is_Formal (Formal) then
6834 ------------------------------
6835 -- First_Formal_With_Extras --
6836 ------------------------------
6838 function First_Formal_With_Extras (Id : E) return E is
6843 (Is_Generic_Subprogram (Id)
6844 or else Is_Overloadable (Id)
6845 or else Ekind_In (Id, E_Entry_Family,
6847 E_Subprogram_Type));
6849 if Ekind (Id) = E_Enumeration_Literal then
6853 Formal := First_Entity (Id);
6855 -- The first/next entity chain of a generic subprogram contains all
6856 -- generic formal parameters, followed by the formal parameters. Go
6857 -- directly to the parameters by skipping the formal part.
6859 if Is_Generic_Subprogram (Id) then
6860 while Present (Formal) and then not Is_Formal (Formal) loop
6861 Next_Entity (Formal);
6865 if Present (Formal) and then Is_Formal (Formal) then
6868 return Extra_Formals (Id); -- Empty if no extra formals
6871 end First_Formal_With_Extras;
6873 -------------------------------------
6874 -- Get_Attribute_Definition_Clause --
6875 -------------------------------------
6877 function Get_Attribute_Definition_Clause
6879 Id : Attribute_Id) return Node_Id
6884 N := First_Rep_Item (E);
6885 while Present (N) loop
6886 if Nkind (N) = N_Attribute_Definition_Clause
6887 and then Get_Attribute_Id (Chars (N)) = Id
6896 end Get_Attribute_Definition_Clause;
6902 function Get_Full_View (T : Entity_Id) return Entity_Id is
6904 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6905 return Full_View (T);
6907 elsif Is_Class_Wide_Type (T)
6908 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6909 and then Present (Full_View (Root_Type (T)))
6911 return Class_Wide_Type (Full_View (Root_Type (T)));
6922 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6923 Is_CDG : constant Boolean :=
6924 Id = Pragma_Abstract_State or else
6925 Id = Pragma_Async_Readers or else
6926 Id = Pragma_Async_Writers or else
6927 Id = Pragma_Depends or else
6928 Id = Pragma_Effective_Reads or else
6929 Id = Pragma_Effective_Writes or else
6930 Id = Pragma_Extensions_Visible or else
6931 Id = Pragma_Global or else
6932 Id = Pragma_Initial_Condition or else
6933 Id = Pragma_Initializes or else
6934 Id = Pragma_Part_Of or else
6935 Id = Pragma_Refined_Depends or else
6936 Id = Pragma_Refined_Global or else
6937 Id = Pragma_Refined_State;
6938 Is_CTC : constant Boolean :=
6939 Id = Pragma_Contract_Cases or else
6940 Id = Pragma_Test_Case;
6941 Is_PPC : constant Boolean :=
6942 Id = Pragma_Precondition or else
6943 Id = Pragma_Postcondition or else
6944 Id = Pragma_Refined_Post;
6946 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6952 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6953 -- extracted from their specialized list.
6956 Items := Contract (E);
6962 Item := Classifications (Items);
6965 Item := Contract_Test_Cases (Items);
6968 Item := Pre_Post_Conditions (Items);
6974 Item := First_Rep_Item (E);
6977 while Present (Item) loop
6978 if Nkind (Item) = N_Pragma
6979 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6983 -- All nodes in N_Contract are chained using Next_Pragma
6985 elsif In_Contract then
6986 Item := Next_Pragma (Item);
6991 Next_Rep_Item (Item);
6998 --------------------------------------
6999 -- Get_Record_Representation_Clause --
7000 --------------------------------------
7002 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7006 N := First_Rep_Item (E);
7007 while Present (N) loop
7008 if Nkind (N) = N_Record_Representation_Clause then
7016 end Get_Record_Representation_Clause;
7018 ------------------------
7019 -- Has_Attach_Handler --
7020 ------------------------
7022 function Has_Attach_Handler (Id : E) return B is
7026 pragma Assert (Is_Protected_Type (Id));
7028 Ritem := First_Rep_Item (Id);
7029 while Present (Ritem) loop
7030 if Nkind (Ritem) = N_Pragma
7031 and then Pragma_Name (Ritem) = Name_Attach_Handler
7035 Next_Rep_Item (Ritem);
7040 end Has_Attach_Handler;
7046 function Has_Entries (Id : E) return B is
7050 pragma Assert (Is_Concurrent_Type (Id));
7052 Ent := First_Entity (Id);
7053 while Present (Ent) loop
7054 if Is_Entry (Ent) then
7058 Ent := Next_Entity (Ent);
7064 ----------------------------
7065 -- Has_Foreign_Convention --
7066 ----------------------------
7068 function Has_Foreign_Convention (Id : E) return B is
7070 -- While regular Intrinsics such as the Standard operators fit in the
7071 -- "Ada" convention, those with an Interface_Name materialize GCC
7072 -- builtin imports for which Ada special treatments shouldn't apply.
7074 return Convention (Id) in Foreign_Convention
7075 or else (Convention (Id) = Convention_Intrinsic
7076 and then Present (Interface_Name (Id)));
7077 end Has_Foreign_Convention;
7079 ---------------------------
7080 -- Has_Interrupt_Handler --
7081 ---------------------------
7083 function Has_Interrupt_Handler (Id : E) return B is
7087 pragma Assert (Is_Protected_Type (Id));
7089 Ritem := First_Rep_Item (Id);
7090 while Present (Ritem) loop
7091 if Nkind (Ritem) = N_Pragma
7092 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7096 Next_Rep_Item (Ritem);
7101 end Has_Interrupt_Handler;
7103 --------------------------
7104 -- Has_Non_Limited_View --
7105 --------------------------
7107 function Has_Non_Limited_View (Id : E) return B is
7109 return (Ekind (Id) in Incomplete_Kind
7110 or else Ekind (Id) in Class_Wide_Kind
7111 or else Ekind (Id) = E_Abstract_State)
7112 and then Present (Non_Limited_View (Id));
7113 end Has_Non_Limited_View;
7115 -----------------------------
7116 -- Has_Non_Null_Refinement --
7117 -----------------------------
7119 function Has_Non_Null_Refinement (Id : E) return B is
7121 -- "Refinement" is a concept applicable only to abstract states
7123 pragma Assert (Ekind (Id) = E_Abstract_State);
7125 if Has_Visible_Refinement (Id) then
7126 pragma Assert (Present (Refinement_Constituents (Id)));
7128 -- For a refinement to be non-null, the first constituent must be
7129 -- anything other than null.
7132 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7136 end Has_Non_Null_Refinement;
7138 -----------------------------
7139 -- Has_Null_Abstract_State --
7140 -----------------------------
7142 function Has_Null_Abstract_State (Id : E) return B is
7144 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7147 Present (Abstract_States (Id))
7148 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7149 end Has_Null_Abstract_State;
7151 -------------------------
7152 -- Has_Null_Refinement --
7153 -------------------------
7155 function Has_Null_Refinement (Id : E) return B is
7157 -- "Refinement" is a concept applicable only to abstract states
7159 pragma Assert (Ekind (Id) = E_Abstract_State);
7161 if Has_Visible_Refinement (Id) then
7162 pragma Assert (Present (Refinement_Constituents (Id)));
7164 -- For a refinement to be null, the state's sole constituent must be
7168 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7172 end Has_Null_Refinement;
7174 --------------------
7175 -- Has_Unmodified --
7176 --------------------
7178 function Has_Unmodified (E : Entity_Id) return Boolean is
7180 if Has_Pragma_Unmodified (E) then
7182 elsif Warnings_Off (E) then
7183 Set_Warnings_Off_Used_Unmodified (E);
7190 ---------------------
7191 -- Has_Unreferenced --
7192 ---------------------
7194 function Has_Unreferenced (E : Entity_Id) return Boolean is
7196 if Has_Pragma_Unreferenced (E) then
7198 elsif Warnings_Off (E) then
7199 Set_Warnings_Off_Used_Unreferenced (E);
7204 end Has_Unreferenced;
7206 ----------------------
7207 -- Has_Warnings_Off --
7208 ----------------------
7210 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7212 if Warnings_Off (E) then
7213 Set_Warnings_Off_Used (E);
7218 end Has_Warnings_Off;
7220 ------------------------------
7221 -- Implementation_Base_Type --
7222 ------------------------------
7224 function Implementation_Base_Type (Id : E) return E is
7229 Bastyp := Base_Type (Id);
7231 if Is_Incomplete_Or_Private_Type (Bastyp) then
7232 Imptyp := Underlying_Type (Bastyp);
7234 -- If we have an implementation type, then just return it,
7235 -- otherwise we return the Base_Type anyway. This can only
7236 -- happen in error situations and should avoid some error bombs.
7238 if Present (Imptyp) then
7239 return Base_Type (Imptyp);
7247 end Implementation_Base_Type;
7249 -------------------------
7250 -- Invariant_Procedure --
7251 -------------------------
7253 function Invariant_Procedure (Id : E) return E is
7257 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7259 if No (Subprograms_For_Type (Id)) then
7263 S := Subprograms_For_Type (Id);
7264 while Present (S) loop
7265 if Is_Invariant_Procedure (S) then
7268 S := Subprograms_For_Type (S);
7274 end Invariant_Procedure;
7280 -- Global flag table allowing rapid computation of this function
7282 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7283 (E_Enumeration_Subtype |
7285 E_Signed_Integer_Subtype |
7286 E_Modular_Integer_Subtype |
7287 E_Floating_Point_Subtype |
7288 E_Ordinary_Fixed_Point_Subtype |
7289 E_Decimal_Fixed_Point_Subtype |
7294 E_Record_Subtype_With_Private |
7295 E_Limited_Private_Subtype |
7297 E_Protected_Subtype |
7299 E_String_Literal_Subtype |
7300 E_Class_Wide_Subtype => False,
7303 function Is_Base_Type (Id : E) return Boolean is
7305 return Entity_Is_Base_Type (Ekind (Id));
7308 ---------------------
7309 -- Is_Boolean_Type --
7310 ---------------------
7312 function Is_Boolean_Type (Id : E) return B is
7314 return Root_Type (Id) = Standard_Boolean;
7315 end Is_Boolean_Type;
7317 ------------------------
7318 -- Is_Constant_Object --
7319 ------------------------
7321 function Is_Constant_Object (Id : E) return B is
7322 K : constant Entity_Kind := Ekind (Id);
7325 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7326 end Is_Constant_Object;
7328 --------------------
7329 -- Is_Discriminal --
7330 --------------------
7332 function Is_Discriminal (Id : E) return B is
7334 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7335 and then Present (Discriminal_Link (Id)));
7338 ----------------------
7339 -- Is_Dynamic_Scope --
7340 ----------------------
7342 function Is_Dynamic_Scope (Id : E) return B is
7345 Ekind (Id) = E_Block
7347 Ekind (Id) = E_Function
7349 Ekind (Id) = E_Procedure
7351 Ekind (Id) = E_Subprogram_Body
7353 Ekind (Id) = E_Task_Type
7355 (Ekind (Id) = E_Limited_Private_Type
7356 and then Present (Full_View (Id))
7357 and then Ekind (Full_View (Id)) = E_Task_Type)
7359 Ekind (Id) = E_Entry
7361 Ekind (Id) = E_Entry_Family
7363 Ekind (Id) = E_Return_Statement;
7364 end Is_Dynamic_Scope;
7366 --------------------
7367 -- Is_Entity_Name --
7368 --------------------
7370 function Is_Entity_Name (N : Node_Id) return Boolean is
7371 Kind : constant Node_Kind := Nkind (N);
7374 -- Identifiers, operator symbols, expanded names are entity names
7376 return Kind = N_Identifier
7377 or else Kind = N_Operator_Symbol
7378 or else Kind = N_Expanded_Name
7380 -- Attribute references are entity names if they refer to an entity.
7381 -- Note that we don't do this by testing for the presence of the
7382 -- Entity field in the N_Attribute_Reference node, since it may not
7383 -- have been set yet.
7385 or else (Kind = N_Attribute_Reference
7386 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7389 -----------------------
7390 -- Is_External_State --
7391 -----------------------
7393 function Is_External_State (Id : E) return B is
7396 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7397 end Is_External_State;
7403 function Is_Finalizer (Id : E) return B is
7405 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7412 function Is_Null_State (Id : E) return B is
7415 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7418 ---------------------
7419 -- Is_Packed_Array --
7420 ---------------------
7422 function Is_Packed_Array (Id : E) return B is
7424 return Is_Array_Type (Id) and then Is_Packed (Id);
7425 end Is_Packed_Array;
7427 -----------------------------------
7428 -- Is_Package_Or_Generic_Package --
7429 -----------------------------------
7431 function Is_Package_Or_Generic_Package (Id : E) return B is
7433 return Ekind_In (Id, E_Generic_Package, E_Package);
7434 end Is_Package_Or_Generic_Package;
7440 function Is_Prival (Id : E) return B is
7442 return (Ekind_In (Id, E_Constant, E_Variable)
7443 and then Present (Prival_Link (Id)));
7446 ----------------------------
7447 -- Is_Protected_Component --
7448 ----------------------------
7450 function Is_Protected_Component (Id : E) return B is
7452 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7453 end Is_Protected_Component;
7455 ----------------------------
7456 -- Is_Protected_Interface --
7457 ----------------------------
7459 function Is_Protected_Interface (Id : E) return B is
7460 Typ : constant Entity_Id := Base_Type (Id);
7462 if not Is_Interface (Typ) then
7464 elsif Is_Class_Wide_Type (Typ) then
7465 return Is_Protected_Interface (Etype (Typ));
7467 return Protected_Present (Type_Definition (Parent (Typ)));
7469 end Is_Protected_Interface;
7471 ------------------------------
7472 -- Is_Protected_Record_Type --
7473 ------------------------------
7475 function Is_Protected_Record_Type (Id : E) return B is
7478 Is_Concurrent_Record_Type (Id)
7479 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7480 end Is_Protected_Record_Type;
7482 --------------------------------
7483 -- Is_Standard_Character_Type --
7484 --------------------------------
7486 function Is_Standard_Character_Type (Id : E) return B is
7488 if Is_Type (Id) then
7490 R : constant Entity_Id := Root_Type (Id);
7493 R = Standard_Character
7495 R = Standard_Wide_Character
7497 R = Standard_Wide_Wide_Character;
7503 end Is_Standard_Character_Type;
7505 -----------------------------
7506 -- Is_Standard_String_Type --
7507 -----------------------------
7509 function Is_Standard_String_Type (Id : E) return B is
7511 if Is_Type (Id) then
7513 R : constant Entity_Id := Root_Type (Id);
7518 R = Standard_Wide_String
7520 R = Standard_Wide_Wide_String;
7526 end Is_Standard_String_Type;
7528 --------------------
7529 -- Is_String_Type --
7530 --------------------
7532 function Is_String_Type (Id : E) return B is
7534 return Is_Array_Type (Id)
7535 and then Id /= Any_Composite
7536 and then Number_Dimensions (Id) = 1
7537 and then Is_Character_Type (Component_Type (Id));
7540 -------------------------------
7541 -- Is_Synchronized_Interface --
7542 -------------------------------
7544 function Is_Synchronized_Interface (Id : E) return B is
7545 Typ : constant Entity_Id := Base_Type (Id);
7548 if not Is_Interface (Typ) then
7551 elsif Is_Class_Wide_Type (Typ) then
7552 return Is_Synchronized_Interface (Etype (Typ));
7555 return Protected_Present (Type_Definition (Parent (Typ)))
7556 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7557 or else Task_Present (Type_Definition (Parent (Typ)));
7559 end Is_Synchronized_Interface;
7561 -----------------------
7562 -- Is_Task_Interface --
7563 -----------------------
7565 function Is_Task_Interface (Id : E) return B is
7566 Typ : constant Entity_Id := Base_Type (Id);
7568 if not Is_Interface (Typ) then
7570 elsif Is_Class_Wide_Type (Typ) then
7571 return Is_Task_Interface (Etype (Typ));
7573 return Task_Present (Type_Definition (Parent (Typ)));
7575 end Is_Task_Interface;
7577 -------------------------
7578 -- Is_Task_Record_Type --
7579 -------------------------
7581 function Is_Task_Record_Type (Id : E) return B is
7584 Is_Concurrent_Record_Type (Id)
7585 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7586 end Is_Task_Record_Type;
7588 ------------------------
7589 -- Is_Wrapper_Package --
7590 ------------------------
7592 function Is_Wrapper_Package (Id : E) return B is
7594 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7595 end Is_Wrapper_Package;
7601 function Last_Formal (Id : E) return E is
7606 (Is_Overloadable (Id)
7607 or else Ekind_In (Id, E_Entry_Family,
7609 E_Subprogram_Type));
7611 if Ekind (Id) = E_Enumeration_Literal then
7615 Formal := First_Formal (Id);
7617 if Present (Formal) then
7618 while Present (Next_Formal (Formal)) loop
7619 Formal := Next_Formal (Formal);
7627 function Model_Emin_Value (Id : E) return Uint is
7629 return Machine_Emin_Value (Id);
7630 end Model_Emin_Value;
7632 -------------------------
7633 -- Model_Epsilon_Value --
7634 -------------------------
7636 function Model_Epsilon_Value (Id : E) return Ureal is
7637 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7639 return Radix ** (1 - Model_Mantissa_Value (Id));
7640 end Model_Epsilon_Value;
7642 --------------------------
7643 -- Model_Mantissa_Value --
7644 --------------------------
7646 function Model_Mantissa_Value (Id : E) return Uint is
7648 return Machine_Mantissa_Value (Id);
7649 end Model_Mantissa_Value;
7651 -----------------------
7652 -- Model_Small_Value --
7653 -----------------------
7655 function Model_Small_Value (Id : E) return Ureal is
7656 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7658 return Radix ** (Model_Emin_Value (Id) - 1);
7659 end Model_Small_Value;
7661 ------------------------
7662 -- Machine_Emax_Value --
7663 ------------------------
7665 function Machine_Emax_Value (Id : E) return Uint is
7666 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7669 case Float_Rep (Id) is
7672 when 1 .. 6 => return Uint_128;
7673 when 7 .. 15 => return 2**10;
7674 when 16 .. 33 => return 2**14;
7675 when others => return No_Uint;
7679 return Uint_2 ** Uint_7 - Uint_1;
7681 end Machine_Emax_Value;
7683 ------------------------
7684 -- Machine_Emin_Value --
7685 ------------------------
7687 function Machine_Emin_Value (Id : E) return Uint is
7689 case Float_Rep (Id) is
7690 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7691 when AAMP => return -Machine_Emax_Value (Id);
7693 end Machine_Emin_Value;
7695 ----------------------------
7696 -- Machine_Mantissa_Value --
7697 ----------------------------
7699 function Machine_Mantissa_Value (Id : E) return Uint is
7700 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7703 case Float_Rep (Id) is
7706 when 1 .. 6 => return Uint_24;
7707 when 7 .. 15 => return UI_From_Int (53);
7708 when 16 .. 18 => return Uint_64;
7709 when 19 .. 33 => return UI_From_Int (113);
7710 when others => return No_Uint;
7715 when 1 .. 6 => return Uint_24;
7716 when 7 .. 9 => return UI_From_Int (40);
7717 when others => return No_Uint;
7720 end Machine_Mantissa_Value;
7722 -------------------------
7723 -- Machine_Radix_Value --
7724 -------------------------
7726 function Machine_Radix_Value (Id : E) return U is
7728 case Float_Rep (Id) is
7729 when IEEE_Binary | AAMP =>
7732 end Machine_Radix_Value;
7734 --------------------
7735 -- Next_Component --
7736 --------------------
7738 function Next_Component (Id : E) return E is
7742 Comp_Id := Next_Entity (Id);
7743 while Present (Comp_Id) loop
7744 exit when Ekind (Comp_Id) = E_Component;
7745 Comp_Id := Next_Entity (Comp_Id);
7751 ------------------------------------
7752 -- Next_Component_Or_Discriminant --
7753 ------------------------------------
7755 function Next_Component_Or_Discriminant (Id : E) return E is
7759 Comp_Id := Next_Entity (Id);
7760 while Present (Comp_Id) loop
7761 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7762 Comp_Id := Next_Entity (Comp_Id);
7766 end Next_Component_Or_Discriminant;
7768 -----------------------
7769 -- Next_Discriminant --
7770 -----------------------
7772 -- This function actually implements both Next_Discriminant and
7773 -- Next_Stored_Discriminant by making sure that the Discriminant
7774 -- returned is of the same variety as Id.
7776 function Next_Discriminant (Id : E) return E is
7778 -- Derived Tagged types with private extensions look like this...
7780 -- E_Discriminant d1
7781 -- E_Discriminant d2
7783 -- E_Discriminant d1
7784 -- E_Discriminant d2
7787 -- so it is critical not to go past the leading discriminants
7792 pragma Assert (Ekind (Id) = E_Discriminant);
7795 D := Next_Entity (D);
7797 or else (Ekind (D) /= E_Discriminant
7798 and then not Is_Itype (D))
7803 exit when Ekind (D) = E_Discriminant
7804 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7808 end Next_Discriminant;
7814 function Next_Formal (Id : E) return E is
7818 -- Follow the chain of declared entities as long as the kind of the
7819 -- entity corresponds to a formal parameter. Skip internal entities
7820 -- that may have been created for implicit subtypes, in the process
7821 -- of analyzing default expressions.
7827 if No (P) or else Is_Formal (P) then
7829 elsif not Is_Internal (P) then
7835 -----------------------------
7836 -- Next_Formal_With_Extras --
7837 -----------------------------
7839 function Next_Formal_With_Extras (Id : E) return E is
7841 if Present (Extra_Formal (Id)) then
7842 return Extra_Formal (Id);
7844 return Next_Formal (Id);
7846 end Next_Formal_With_Extras;
7852 function Next_Index (Id : Node_Id) return Node_Id is
7861 function Next_Literal (Id : E) return E is
7863 pragma Assert (Nkind (Id) in N_Entity);
7867 ------------------------------
7868 -- Next_Stored_Discriminant --
7869 ------------------------------
7871 function Next_Stored_Discriminant (Id : E) return E is
7873 -- See comment in Next_Discriminant
7875 return Next_Discriminant (Id);
7876 end Next_Stored_Discriminant;
7878 -----------------------
7879 -- Number_Dimensions --
7880 -----------------------
7882 function Number_Dimensions (Id : E) return Pos is
7887 if Ekind (Id) = E_String_Literal_Subtype then
7892 T := First_Index (Id);
7893 while Present (T) loop
7900 end Number_Dimensions;
7902 --------------------
7903 -- Number_Entries --
7904 --------------------
7906 function Number_Entries (Id : E) return Nat is
7911 pragma Assert (Is_Concurrent_Type (Id));
7914 Ent := First_Entity (Id);
7915 while Present (Ent) loop
7916 if Is_Entry (Ent) then
7920 Ent := Next_Entity (Ent);
7926 --------------------
7927 -- Number_Formals --
7928 --------------------
7930 function Number_Formals (Id : E) return Pos is
7936 Formal := First_Formal (Id);
7937 while Present (Formal) loop
7939 Formal := Next_Formal (Formal);
7945 --------------------
7946 -- Parameter_Mode --
7947 --------------------
7949 function Parameter_Mode (Id : E) return Formal_Kind is
7954 ------------------------
7955 -- Predicate_Function --
7956 ------------------------
7958 function Predicate_Function (Id : E) return E is
7963 pragma Assert (Is_Type (Id));
7965 -- If type is private and has a completion, predicate may be defined
7966 -- on the full view.
7968 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7969 T := Full_View (Id);
7974 if No (Subprograms_For_Type (T)) then
7978 S := Subprograms_For_Type (T);
7979 while Present (S) loop
7980 if Is_Predicate_Function (S) then
7983 S := Subprograms_For_Type (S);
7989 end Predicate_Function;
7991 --------------------------
7992 -- Predicate_Function_M --
7993 --------------------------
7995 function Predicate_Function_M (Id : E) return E is
8000 pragma Assert (Is_Type (Id));
8002 -- If type is private and has a completion, predicate may be defined
8003 -- on the full view.
8005 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8006 T := Full_View (Id);
8011 if No (Subprograms_For_Type (T)) then
8015 S := Subprograms_For_Type (T);
8016 while Present (S) loop
8017 if Is_Predicate_Function_M (S) then
8020 S := Subprograms_For_Type (S);
8026 end Predicate_Function_M;
8028 -------------------------
8029 -- Present_In_Rep_Item --
8030 -------------------------
8032 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8036 Ritem := First_Rep_Item (E);
8038 while Present (Ritem) loop
8043 Next_Rep_Item (Ritem);
8047 end Present_In_Rep_Item;
8049 --------------------------
8050 -- Primitive_Operations --
8051 --------------------------
8053 function Primitive_Operations (Id : E) return L is
8055 if Is_Concurrent_Type (Id) then
8056 if Present (Corresponding_Record_Type (Id)) then
8057 return Direct_Primitive_Operations
8058 (Corresponding_Record_Type (Id));
8060 -- If expansion is disabled the corresponding record type is absent,
8061 -- but if the type has ancestors it may have primitive operations.
8063 elsif Is_Tagged_Type (Id) then
8064 return Direct_Primitive_Operations (Id);
8070 return Direct_Primitive_Operations (Id);
8072 end Primitive_Operations;
8074 ---------------------
8075 -- Record_Rep_Item --
8076 ---------------------
8078 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8080 Set_Next_Rep_Item (N, First_Rep_Item (E));
8081 Set_First_Rep_Item (E, N);
8082 end Record_Rep_Item;
8088 function Root_Type (Id : E) return E is
8092 pragma Assert (Nkind (Id) in N_Entity);
8094 T := Base_Type (Id);
8096 if Ekind (T) = E_Class_Wide_Type then
8108 -- Following test catches some error cases resulting from
8111 elsif No (Etyp) then
8112 Check_Error_Detected;
8115 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8118 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8124 -- Return if there is a circularity in the inheritance chain. This
8125 -- happens in some error situations and we do not want to get
8126 -- stuck in this loop.
8128 if T = Base_Type (Id) then
8135 ---------------------
8136 -- Safe_Emax_Value --
8137 ---------------------
8139 function Safe_Emax_Value (Id : E) return Uint is
8141 return Machine_Emax_Value (Id);
8142 end Safe_Emax_Value;
8144 ----------------------
8145 -- Safe_First_Value --
8146 ----------------------
8148 function Safe_First_Value (Id : E) return Ureal is
8150 return -Safe_Last_Value (Id);
8151 end Safe_First_Value;
8153 ---------------------
8154 -- Safe_Last_Value --
8155 ---------------------
8157 function Safe_Last_Value (Id : E) return Ureal is
8158 Radix : constant Uint := Machine_Radix_Value (Id);
8159 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8160 Emax : constant Uint := Safe_Emax_Value (Id);
8161 Significand : constant Uint := Radix ** Mantissa - 1;
8162 Exponent : constant Uint := Emax - Mantissa;
8168 (Num => Significand * 2 ** (Exponent mod 4),
8169 Den => -Exponent / 4,
8174 (Num => Significand,
8178 end Safe_Last_Value;
8184 function Scope_Depth (Id : E) return Uint is
8189 while Is_Record_Type (Scop) loop
8190 Scop := Scope (Scop);
8193 return Scope_Depth_Value (Scop);
8196 ---------------------
8197 -- Scope_Depth_Set --
8198 ---------------------
8200 function Scope_Depth_Set (Id : E) return B is
8202 return not Is_Record_Type (Id)
8203 and then Field22 (Id) /= Union_Id (Empty);
8204 end Scope_Depth_Set;
8206 -----------------------------
8207 -- Set_Component_Alignment --
8208 -----------------------------
8210 -- Component Alignment is encoded using two flags, Flag128/129 as
8211 -- follows. Note that both flags False = Align_Default, so that the
8212 -- default initialization of flags to False initializes component
8213 -- alignment to the default value as required.
8215 -- Flag128 Flag129 Value
8216 -- ------- ------- -----
8217 -- False False Calign_Default
8218 -- False True Calign_Component_Size
8219 -- True False Calign_Component_Size_4
8220 -- True True Calign_Storage_Unit
8222 procedure Set_Component_Alignment (Id : E; V : C) is
8224 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8225 and then Is_Base_Type (Id));
8228 when Calign_Default =>
8229 Set_Flag128 (Id, False);
8230 Set_Flag129 (Id, False);
8232 when Calign_Component_Size =>
8233 Set_Flag128 (Id, False);
8234 Set_Flag129 (Id, True);
8236 when Calign_Component_Size_4 =>
8237 Set_Flag128 (Id, True);
8238 Set_Flag129 (Id, False);
8240 when Calign_Storage_Unit =>
8241 Set_Flag128 (Id, True);
8242 Set_Flag129 (Id, True);
8244 end Set_Component_Alignment;
8246 -------------------------------------
8247 -- Set_Default_Init_Cond_Procedure --
8248 -------------------------------------
8250 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8255 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8257 Has_Inherited_Default_Init_Cond (Id)));
8259 S := Subprograms_For_Type (Id);
8260 Set_Subprograms_For_Type (Id, V);
8261 Set_Subprograms_For_Type (V, S);
8263 -- Check for a duplicate procedure
8265 while Present (S) loop
8266 if Is_Default_Init_Cond_Procedure (S) then
8267 raise Program_Error;
8270 S := Subprograms_For_Type (S);
8272 end Set_Default_Init_Cond_Procedure;
8274 -----------------------------
8275 -- Set_Invariant_Procedure --
8276 -----------------------------
8278 procedure Set_Invariant_Procedure (Id : E; V : E) is
8282 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8284 S := Subprograms_For_Type (Id);
8285 Set_Subprograms_For_Type (Id, V);
8286 Set_Subprograms_For_Type (V, S);
8288 -- Check for duplicate entry
8290 while Present (S) loop
8291 if Is_Invariant_Procedure (S) then
8292 raise Program_Error;
8294 S := Subprograms_For_Type (S);
8297 end Set_Invariant_Procedure;
8299 ----------------------------
8300 -- Set_Predicate_Function --
8301 ----------------------------
8303 procedure Set_Predicate_Function (Id : E; V : E) is
8307 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8309 S := Subprograms_For_Type (Id);
8310 Set_Subprograms_For_Type (Id, V);
8311 Set_Subprograms_For_Type (V, S);
8313 while Present (S) loop
8314 if Is_Predicate_Function (S) then
8315 raise Program_Error;
8317 S := Subprograms_For_Type (S);
8320 end Set_Predicate_Function;
8322 ------------------------------
8323 -- Set_Predicate_Function_M --
8324 ------------------------------
8326 procedure Set_Predicate_Function_M (Id : E; V : E) is
8330 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8332 S := Subprograms_For_Type (Id);
8333 Set_Subprograms_For_Type (Id, V);
8334 Set_Subprograms_For_Type (V, S);
8336 -- Check for duplicates
8338 while Present (S) loop
8339 if Is_Predicate_Function_M (S) then
8340 raise Program_Error;
8342 S := Subprograms_For_Type (S);
8345 end Set_Predicate_Function_M;
8351 function Size_Clause (Id : E) return N is
8353 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8356 ------------------------
8357 -- Stream_Size_Clause --
8358 ------------------------
8360 function Stream_Size_Clause (Id : E) return N is
8362 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8363 end Stream_Size_Clause;
8369 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8375 Kind := E_Access_Subtype;
8379 Kind := E_Array_Subtype;
8381 when E_Class_Wide_Type |
8382 E_Class_Wide_Subtype =>
8383 Kind := E_Class_Wide_Subtype;
8385 when E_Decimal_Fixed_Point_Type |
8386 E_Decimal_Fixed_Point_Subtype =>
8387 Kind := E_Decimal_Fixed_Point_Subtype;
8389 when E_Ordinary_Fixed_Point_Type |
8390 E_Ordinary_Fixed_Point_Subtype =>
8391 Kind := E_Ordinary_Fixed_Point_Subtype;
8393 when E_Private_Type |
8394 E_Private_Subtype =>
8395 Kind := E_Private_Subtype;
8397 when E_Limited_Private_Type |
8398 E_Limited_Private_Subtype =>
8399 Kind := E_Limited_Private_Subtype;
8401 when E_Record_Type_With_Private |
8402 E_Record_Subtype_With_Private =>
8403 Kind := E_Record_Subtype_With_Private;
8405 when E_Record_Type |
8407 Kind := E_Record_Subtype;
8409 when Enumeration_Kind =>
8410 Kind := E_Enumeration_Subtype;
8413 Kind := E_Floating_Point_Subtype;
8415 when Signed_Integer_Kind =>
8416 Kind := E_Signed_Integer_Subtype;
8418 when Modular_Integer_Kind =>
8419 Kind := E_Modular_Integer_Subtype;
8421 when Protected_Kind =>
8422 Kind := E_Protected_Subtype;
8425 Kind := E_Task_Subtype;
8429 raise Program_Error;
8435 ---------------------
8436 -- Type_High_Bound --
8437 ---------------------
8439 function Type_High_Bound (Id : E) return Node_Id is
8440 Rng : constant Node_Id := Scalar_Range (Id);
8442 if Nkind (Rng) = N_Subtype_Indication then
8443 return High_Bound (Range_Expression (Constraint (Rng)));
8445 return High_Bound (Rng);
8447 end Type_High_Bound;
8449 --------------------
8450 -- Type_Low_Bound --
8451 --------------------
8453 function Type_Low_Bound (Id : E) return Node_Id is
8454 Rng : constant Node_Id := Scalar_Range (Id);
8456 if Nkind (Rng) = N_Subtype_Indication then
8457 return Low_Bound (Range_Expression (Constraint (Rng)));
8459 return Low_Bound (Rng);
8463 ---------------------
8464 -- Underlying_Type --
8465 ---------------------
8467 function Underlying_Type (Id : E) return E is
8469 -- For record_with_private the underlying type is always the direct
8470 -- full view. Never try to take the full view of the parent it
8471 -- doesn't make sense.
8473 if Ekind (Id) = E_Record_Type_With_Private then
8474 return Full_View (Id);
8476 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8478 -- If we have an incomplete or private type with a full view,
8479 -- then we return the Underlying_Type of this full view.
8481 if Present (Full_View (Id)) then
8482 if Id = Full_View (Id) then
8484 -- Previous error in declaration
8489 return Underlying_Type (Full_View (Id));
8492 -- If we have a private type with an underlying full view, then we
8493 -- return the Underlying_Type of this underlying full view.
8495 elsif Ekind (Id) in Private_Kind
8496 and then Present (Underlying_Full_View (Id))
8498 return Underlying_Type (Underlying_Full_View (Id));
8500 -- If we have an incomplete entity that comes from the limited
8501 -- view then we return the Underlying_Type of its non-limited
8504 elsif From_Limited_With (Id)
8505 and then Present (Non_Limited_View (Id))
8507 return Underlying_Type (Non_Limited_View (Id));
8509 -- Otherwise check for the case where we have a derived type or
8510 -- subtype, and if so get the Underlying_Type of the parent type.
8512 elsif Etype (Id) /= Id then
8513 return Underlying_Type (Etype (Id));
8515 -- Otherwise we have an incomplete or private type that has
8516 -- no full view, which means that we have not encountered the
8517 -- completion, so return Empty to indicate the underlying type
8518 -- is not yet known.
8524 -- For non-incomplete, non-private types, return the type itself Also
8525 -- for entities that are not types at all return the entity itself.
8530 end Underlying_Type;
8532 ------------------------
8533 -- Write_Entity_Flags --
8534 ------------------------
8536 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8538 procedure W (Flag_Name : String; Flag : Boolean);
8539 -- Write out given flag if it is set
8545 procedure W (Flag_Name : String; Flag : Boolean) is
8549 Write_Str (Flag_Name);
8550 Write_Str (" = True");
8555 -- Start of processing for Write_Entity_Flags
8558 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8559 and then Is_Base_Type (Id)
8562 Write_Str ("Component_Alignment = ");
8564 case Component_Alignment (Id) is
8565 when Calign_Default =>
8566 Write_Str ("Calign_Default");
8568 when Calign_Component_Size =>
8569 Write_Str ("Calign_Component_Size");
8571 when Calign_Component_Size_4 =>
8572 Write_Str ("Calign_Component_Size_4");
8574 when Calign_Storage_Unit =>
8575 Write_Str ("Calign_Storage_Unit");
8581 W ("Address_Taken", Flag104 (Id));
8582 W ("Body_Needed_For_SAL", Flag40 (Id));
8583 W ("C_Pass_By_Copy", Flag125 (Id));
8584 W ("Can_Never_Be_Null", Flag38 (Id));
8585 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8586 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8587 W ("Debug_Info_Off", Flag166 (Id));
8588 W ("Default_Expressions_Processed", Flag108 (Id));
8589 W ("Delay_Cleanups", Flag114 (Id));
8590 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8591 W ("Depends_On_Private", Flag14 (Id));
8592 W ("Discard_Names", Flag88 (Id));
8593 W ("Elaboration_Entity_Required", Flag174 (Id));
8594 W ("Elaborate_Body_Desirable", Flag210 (Id));
8595 W ("Entry_Accepted", Flag152 (Id));
8596 W ("Can_Use_Internal_Rep", Flag229 (Id));
8597 W ("Finalize_Storage_Only", Flag158 (Id));
8598 W ("From_Limited_With", Flag159 (Id));
8599 W ("Has_Aliased_Components", Flag135 (Id));
8600 W ("Has_Alignment_Clause", Flag46 (Id));
8601 W ("Has_All_Calls_Remote", Flag79 (Id));
8602 W ("Has_Anonymous_Master", Flag253 (Id));
8603 W ("Has_Atomic_Components", Flag86 (Id));
8604 W ("Has_Biased_Representation", Flag139 (Id));
8605 W ("Has_Completion", Flag26 (Id));
8606 W ("Has_Completion_In_Body", Flag71 (Id));
8607 W ("Has_Complex_Representation", Flag140 (Id));
8608 W ("Has_Component_Size_Clause", Flag68 (Id));
8609 W ("Has_Contiguous_Rep", Flag181 (Id));
8610 W ("Has_Controlled_Component", Flag43 (Id));
8611 W ("Has_Controlling_Result", Flag98 (Id));
8612 W ("Has_Convention_Pragma", Flag119 (Id));
8613 W ("Has_Default_Aspect", Flag39 (Id));
8614 W ("Has_Default_Init_Cond", Flag3 (Id));
8615 W ("Has_Delayed_Aspects", Flag200 (Id));
8616 W ("Has_Delayed_Freeze", Flag18 (Id));
8617 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8618 W ("Has_Discriminants", Flag5 (Id));
8619 W ("Has_Dispatch_Table", Flag220 (Id));
8620 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8621 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8622 W ("Has_Exit", Flag47 (Id));
8623 W ("Has_Expanded_Contract", Flag240 (Id));
8624 W ("Has_Forward_Instantiation", Flag175 (Id));
8625 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8626 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8627 W ("Has_Homonym", Flag56 (Id));
8628 W ("Has_Implicit_Dereference", Flag251 (Id));
8629 W ("Has_Independent_Components", Flag34 (Id));
8630 W ("Has_Inheritable_Invariants", Flag248 (Id));
8631 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8632 W ("Has_Initial_Value", Flag219 (Id));
8633 W ("Has_Invariants", Flag232 (Id));
8634 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8635 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8636 W ("Has_Master_Entity", Flag21 (Id));
8637 W ("Has_Missing_Return", Flag142 (Id));
8638 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8639 W ("Has_Nested_Subprogram", Flag282 (Id));
8640 W ("Has_Non_Standard_Rep", Flag75 (Id));
8641 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8642 W ("Has_Object_Size_Clause", Flag172 (Id));
8643 W ("Has_Per_Object_Constraint", Flag154 (Id));
8644 W ("Has_Pragma_Controlled", Flag27 (Id));
8645 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8646 W ("Has_Pragma_Inline", Flag157 (Id));
8647 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8648 W ("Has_Pragma_No_Inline", Flag201 (Id));
8649 W ("Has_Pragma_Ordered", Flag198 (Id));
8650 W ("Has_Pragma_Pack", Flag121 (Id));
8651 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8652 W ("Has_Pragma_Pure", Flag203 (Id));
8653 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8654 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8655 W ("Has_Pragma_Unmodified", Flag233 (Id));
8656 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8657 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8658 W ("Has_Predicates", Flag250 (Id));
8659 W ("Has_Primitive_Operations", Flag120 (Id));
8660 W ("Has_Private_Ancestor", Flag151 (Id));
8661 W ("Has_Private_Declaration", Flag155 (Id));
8662 W ("Has_Protected", Flag271 (Id));
8663 W ("Has_Qualified_Name", Flag161 (Id));
8664 W ("Has_RACW", Flag214 (Id));
8665 W ("Has_Record_Rep_Clause", Flag65 (Id));
8666 W ("Has_Recursive_Call", Flag143 (Id));
8667 W ("Has_Shift_Operator", Flag267 (Id));
8668 W ("Has_Size_Clause", Flag29 (Id));
8669 W ("Has_Small_Clause", Flag67 (Id));
8670 W ("Has_Specified_Layout", Flag100 (Id));
8671 W ("Has_Specified_Stream_Input", Flag190 (Id));
8672 W ("Has_Specified_Stream_Output", Flag191 (Id));
8673 W ("Has_Specified_Stream_Read", Flag192 (Id));
8674 W ("Has_Specified_Stream_Write", Flag193 (Id));
8675 W ("Has_Static_Discriminants", Flag211 (Id));
8676 W ("Has_Static_Predicate", Flag269 (Id));
8677 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8678 W ("Has_Storage_Size_Clause", Flag23 (Id));
8679 W ("Has_Stream_Size_Clause", Flag184 (Id));
8680 W ("Has_Task", Flag30 (Id));
8681 W ("Has_Thunks", Flag228 (Id));
8682 W ("Has_Unchecked_Union", Flag123 (Id));
8683 W ("Has_Unknown_Discriminants", Flag72 (Id));
8684 W ("Has_Uplevel_Reference", Flag215 (Id));
8685 W ("Has_Visible_Refinement", Flag263 (Id));
8686 W ("Has_Volatile_Components", Flag87 (Id));
8687 W ("Has_Xref_Entry", Flag182 (Id));
8688 W ("In_Package_Body", Flag48 (Id));
8689 W ("In_Private_Part", Flag45 (Id));
8690 W ("In_Use", Flag8 (Id));
8691 W ("Is_Abstract_Subprogram", Flag19 (Id));
8692 W ("Is_Abstract_Type", Flag146 (Id));
8693 W ("Is_Access_Constant", Flag69 (Id));
8694 W ("Is_Ada_2005_Only", Flag185 (Id));
8695 W ("Is_Ada_2012_Only", Flag199 (Id));
8696 W ("Is_Aliased", Flag15 (Id));
8697 W ("Is_Asynchronous", Flag81 (Id));
8698 W ("Is_Atomic", Flag85 (Id));
8699 W ("Is_Bit_Packed_Array", Flag122 (Id));
8700 W ("Is_CPP_Class", Flag74 (Id));
8701 W ("Is_Called", Flag102 (Id));
8702 W ("Is_Character_Type", Flag63 (Id));
8703 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8704 W ("Is_Child_Unit", Flag73 (Id));
8705 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8706 W ("Is_Compilation_Unit", Flag149 (Id));
8707 W ("Is_Completely_Hidden", Flag103 (Id));
8708 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8709 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8710 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8711 W ("Is_Constrained", Flag12 (Id));
8712 W ("Is_Constructor", Flag76 (Id));
8713 W ("Is_Controlled", Flag42 (Id));
8714 W ("Is_Controlling_Formal", Flag97 (Id));
8715 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8716 W ("Is_Descendent_Of_Address", Flag223 (Id));
8717 W ("Is_Discrim_SO_Function", Flag176 (Id));
8718 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8719 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8720 W ("Is_Dispatching_Operation", Flag6 (Id));
8721 W ("Is_Eliminated", Flag124 (Id));
8722 W ("Is_Entry_Formal", Flag52 (Id));
8723 W ("Is_Exported", Flag99 (Id));
8724 W ("Is_First_Subtype", Flag70 (Id));
8725 W ("Is_For_Access_Subtype", Flag118 (Id));
8726 W ("Is_Formal_Subprogram", Flag111 (Id));
8727 W ("Is_Frozen", Flag4 (Id));
8728 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8729 W ("Is_Generic_Actual_Type", Flag94 (Id));
8730 W ("Is_Generic_Instance", Flag130 (Id));
8731 W ("Is_Generic_Type", Flag13 (Id));
8732 W ("Is_Hidden", Flag57 (Id));
8733 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8734 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8735 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8736 W ("Is_Immediately_Visible", Flag7 (Id));
8737 W ("Is_Implementation_Defined", Flag254 (Id));
8738 W ("Is_Imported", Flag24 (Id));
8739 W ("Is_Independent", Flag268 (Id));
8740 W ("Is_Inlined", Flag11 (Id));
8741 W ("Is_Inlined_Always", Flag1 (Id));
8742 W ("Is_Instantiated", Flag126 (Id));
8743 W ("Is_Interface", Flag186 (Id));
8744 W ("Is_Internal", Flag17 (Id));
8745 W ("Is_Interrupt_Handler", Flag89 (Id));
8746 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8747 W ("Is_Invariant_Procedure", Flag257 (Id));
8748 W ("Is_Itype", Flag91 (Id));
8749 W ("Is_Known_Non_Null", Flag37 (Id));
8750 W ("Is_Known_Null", Flag204 (Id));
8751 W ("Is_Known_Valid", Flag170 (Id));
8752 W ("Is_Limited_Composite", Flag106 (Id));
8753 W ("Is_Limited_Interface", Flag197 (Id));
8754 W ("Is_Limited_Record", Flag25 (Id));
8755 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8756 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8757 W ("Is_Non_Static_Subtype", Flag109 (Id));
8758 W ("Is_Null_Init_Proc", Flag178 (Id));
8759 W ("Is_Obsolescent", Flag153 (Id));
8760 W ("Is_Only_Out_Parameter", Flag226 (Id));
8761 W ("Is_Package_Body_Entity", Flag160 (Id));
8762 W ("Is_Packed", Flag51 (Id));
8763 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8764 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8765 W ("Is_Predicate_Function", Flag255 (Id));
8766 W ("Is_Predicate_Function_M", Flag256 (Id));
8767 W ("Is_Preelaborated", Flag59 (Id));
8768 W ("Is_Primitive", Flag218 (Id));
8769 W ("Is_Primitive_Wrapper", Flag195 (Id));
8770 W ("Is_Private_Composite", Flag107 (Id));
8771 W ("Is_Private_Descendant", Flag53 (Id));
8772 W ("Is_Private_Primitive", Flag245 (Id));
8773 W ("Is_Processed_Transient", Flag252 (Id));
8774 W ("Is_Public", Flag10 (Id));
8775 W ("Is_Pure", Flag44 (Id));
8776 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8777 W ("Is_RACW_Stub_Type", Flag244 (Id));
8778 W ("Is_Raised", Flag224 (Id));
8779 W ("Is_Remote_Call_Interface", Flag62 (Id));
8780 W ("Is_Remote_Types", Flag61 (Id));
8781 W ("Is_Renaming_Of_Object", Flag112 (Id));
8782 W ("Is_Return_Object", Flag209 (Id));
8783 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8784 W ("Is_Shared_Passive", Flag60 (Id));
8785 W ("Is_Static_Type", Flag281 (Id));
8786 W ("Is_Statically_Allocated", Flag28 (Id));
8787 W ("Is_Tag", Flag78 (Id));
8788 W ("Is_Tagged_Type", Flag55 (Id));
8789 W ("Is_Thunk", Flag225 (Id));
8790 W ("Is_Trivial_Subprogram", Flag235 (Id));
8791 W ("Is_True_Constant", Flag163 (Id));
8792 W ("Is_Unchecked_Union", Flag117 (Id));
8793 W ("Is_Underlying_Record_View", Flag246 (Id));
8794 W ("Is_Unimplemented", Flag284 (Id));
8795 W ("Is_Unsigned_Type", Flag144 (Id));
8796 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
8797 W ("Is_Valued_Procedure", Flag127 (Id));
8798 W ("Is_Visible_Formal", Flag206 (Id));
8799 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8800 W ("Is_Volatile", Flag16 (Id));
8801 W ("Itype_Printed", Flag202 (Id));
8802 W ("Kill_Elaboration_Checks", Flag32 (Id));
8803 W ("Kill_Range_Checks", Flag33 (Id));
8804 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8805 W ("Low_Bound_Tested", Flag205 (Id));
8806 W ("Machine_Radix_10", Flag84 (Id));
8807 W ("Materialize_Entity", Flag168 (Id));
8808 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8809 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8810 W ("Must_Have_Preelab_Init", Flag208 (Id));
8811 W ("Needs_Debug_Info", Flag147 (Id));
8812 W ("Needs_No_Actuals", Flag22 (Id));
8813 W ("Never_Set_In_Source", Flag115 (Id));
8814 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8815 W ("No_Pool_Assigned", Flag131 (Id));
8816 W ("No_Predicate_On_actual", Flag275 (Id));
8817 W ("No_Return", Flag113 (Id));
8818 W ("No_Strict_Aliasing", Flag136 (Id));
8819 W ("Non_Binary_Modulus", Flag58 (Id));
8820 W ("Nonzero_Is_True", Flag162 (Id));
8821 W ("OK_To_Rename", Flag247 (Id));
8822 W ("OK_To_Reorder_Components", Flag239 (Id));
8823 W ("Optimize_Alignment_Space", Flag241 (Id));
8824 W ("Optimize_Alignment_Time", Flag242 (Id));
8825 W ("Overlays_Constant", Flag243 (Id));
8826 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8827 W ("Reachable", Flag49 (Id));
8828 W ("Referenced", Flag156 (Id));
8829 W ("Referenced_As_LHS", Flag36 (Id));
8830 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8831 W ("Renamed_In_Spec", Flag231 (Id));
8832 W ("Requires_Overriding", Flag213 (Id));
8833 W ("Return_Present", Flag54 (Id));
8834 W ("Returns_By_Ref", Flag90 (Id));
8835 W ("Returns_Limited_View", Flag134 (Id));
8836 W ("Reverse_Bit_Order", Flag164 (Id));
8837 W ("Reverse_Storage_Order", Flag93 (Id));
8838 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8839 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8840 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8841 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8842 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8843 W ("SSO_Set_High_By_Default", Flag273 (Id));
8844 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8845 W ("Static_Elaboration_Desired", Flag77 (Id));
8846 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8847 W ("Strict_Alignment", Flag145 (Id));
8848 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8849 W ("Suppress_Initialization", Flag105 (Id));
8850 W ("Suppress_Style_Checks", Flag165 (Id));
8851 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8852 W ("Treat_As_Volatile", Flag41 (Id));
8853 W ("Universal_Aliasing", Flag216 (Id));
8854 W ("Used_As_Generic_Actual", Flag222 (Id));
8855 W ("Uses_Sec_Stack", Flag95 (Id));
8856 W ("Warnings_Off", Flag96 (Id));
8857 W ("Warnings_Off_Used", Flag236 (Id));
8858 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8859 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8860 W ("Was_Hidden", Flag196 (Id));
8861 end Write_Entity_Flags;
8863 -----------------------
8864 -- Write_Entity_Info --
8865 -----------------------
8867 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8869 procedure Write_Attribute (Which : String; Nam : E);
8870 -- Write attribute value with given string name
8872 procedure Write_Kind (Id : Entity_Id);
8873 -- Write Ekind field of entity
8875 ---------------------
8876 -- Write_Attribute --
8877 ---------------------
8879 procedure Write_Attribute (Which : String; Nam : E) is
8883 Write_Int (Int (Nam));
8885 Write_Name (Chars (Nam));
8887 end Write_Attribute;
8893 procedure Write_Kind (Id : Entity_Id) is
8894 K : constant String := Entity_Kind'Image (Ekind (Id));
8898 Write_Str (" Kind ");
8900 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8901 Write_Str ("TAGGED ");
8904 Write_Str (K (3 .. K'Length));
8907 if Is_Type (Id) and then Depends_On_Private (Id) then
8908 Write_Str ("Depends_On_Private ");
8912 -- Start of processing for Write_Entity_Info
8916 Write_Attribute ("Name ", Id);
8917 Write_Int (Int (Id));
8921 Write_Attribute (" Type ", Etype (Id));
8923 Write_Attribute (" Scope ", Scope (Id));
8928 when Discrete_Kind =>
8929 Write_Str ("Bounds: Id = ");
8931 if Present (Scalar_Range (Id)) then
8932 Write_Int (Int (Type_Low_Bound (Id)));
8933 Write_Str (" .. Id = ");
8934 Write_Int (Int (Type_High_Bound (Id)));
8936 Write_Str ("Empty");
8947 (" Component Type ", Component_Type (Id));
8950 Write_Str (" Indexes ");
8952 Index := First_Index (Id);
8953 while Present (Index) loop
8954 Write_Attribute (" ", Etype (Index));
8955 Index := Next_Index (Index);
8963 (" Directly Designated Type ",
8964 Directly_Designated_Type (Id));
8967 when Overloadable_Kind =>
8968 if Present (Homonym (Id)) then
8969 Write_Str (" Homonym ");
8970 Write_Name (Chars (Homonym (Id)));
8972 Write_Int (Int (Homonym (Id)));
8979 if Ekind (Scope (Id)) in Record_Kind then
8981 " Original_Record_Component ",
8982 Original_Record_Component (Id));
8983 Write_Int (Int (Original_Record_Component (Id)));
8987 when others => null;
8989 end Write_Entity_Info;
8991 -----------------------
8992 -- Write_Field6_Name --
8993 -----------------------
8995 procedure Write_Field6_Name (Id : Entity_Id) is
8996 pragma Warnings (Off, Id);
8998 Write_Str ("First_Rep_Item");
8999 end Write_Field6_Name;
9001 -----------------------
9002 -- Write_Field7_Name --
9003 -----------------------
9005 procedure Write_Field7_Name (Id : Entity_Id) is
9006 pragma Warnings (Off, Id);
9008 Write_Str ("Freeze_Node");
9009 end Write_Field7_Name;
9011 -----------------------
9012 -- Write_Field8_Name --
9013 -----------------------
9015 procedure Write_Field8_Name (Id : Entity_Id) is
9019 Write_Str ("Associated_Node_For_Itype");
9022 Write_Str ("Dependent_Instances");
9025 Write_Str ("First_Exit_Statement");
9028 Write_Str ("Hiding_Loop_Variable");
9032 E_Subprogram_Body =>
9033 Write_Str ("Mechanism");
9037 Write_Str ("Normalized_First_Bit");
9039 when E_Abstract_State =>
9040 Write_Str ("Refinement_Constituents");
9042 when E_Return_Statement =>
9043 Write_Str ("Return_Applies_To");
9046 Write_Str ("Field8??");
9048 end Write_Field8_Name;
9050 -----------------------
9051 -- Write_Field9_Name --
9052 -----------------------
9054 procedure Write_Field9_Name (Id : Entity_Id) is
9058 Write_Str ("Class_Wide_Type");
9061 Write_Str ("Current_Value");
9063 when E_Abstract_State =>
9064 Write_Str ("Part_Of_Constituents");
9067 E_Generic_Function |
9069 E_Generic_Procedure |
9072 Write_Str ("Renaming_Map");
9075 Write_Str ("Field9??");
9077 end Write_Field9_Name;
9079 ------------------------
9080 -- Write_Field10_Name --
9081 ------------------------
9083 procedure Write_Field10_Name (Id : Entity_Id) is
9086 when E_Abstract_State |
9088 Write_Str ("Encapsulating_State");
9090 when Class_Wide_Kind |
9096 Write_Str ("Direct_Primitive_Operations");
9099 Write_Str ("Float_Rep");
9101 when E_In_Parameter |
9103 Write_Str ("Discriminal_Link");
9109 Write_Str ("Handler_Records");
9113 Write_Str ("Normalized_Position_Max");
9116 Write_Str ("Field10??");
9118 end Write_Field10_Name;
9120 ------------------------
9121 -- Write_Field11_Name --
9122 ------------------------
9124 procedure Write_Field11_Name (Id : Entity_Id) is
9128 Write_Str ("Block_Node");
9132 Write_Str ("Component_Bit_Offset");
9135 Write_Str ("Entry_Component");
9137 when E_Enumeration_Literal =>
9138 Write_Str ("Enumeration_Pos");
9142 Write_Str ("Full_View");
9144 when E_Generic_Package =>
9145 Write_Str ("Generic_Homonym");
9151 Write_Str ("Protected_Body_Subprogram");
9154 Write_Str ("Field11??");
9156 end Write_Field11_Name;
9158 ------------------------
9159 -- Write_Field12_Name --
9160 ------------------------
9162 procedure Write_Field12_Name (Id : Entity_Id) is
9166 Write_Str ("Associated_Formal_Package");
9169 Write_Str ("Barrier_Function");
9171 when E_Enumeration_Literal =>
9172 Write_Str ("Enumeration_Rep");
9180 E_In_Out_Parameter |
9184 Write_Str ("Esize");
9188 Write_Str ("Next_Inlined_Subprogram");
9191 Write_Str ("Field12??");
9193 end Write_Field12_Name;
9195 ------------------------
9196 -- Write_Field13_Name --
9197 ------------------------
9199 procedure Write_Field13_Name (Id : Entity_Id) is
9204 Write_Str ("Component_Clause");
9207 Write_Str ("Elaboration_Entity");
9211 Generic_Unit_Kind =>
9212 Write_Str ("Elaboration_Entity");
9216 Write_Str ("Extra_Accessibility");
9219 Write_Str ("RM_Size");
9222 Write_Str ("Field13??");
9224 end Write_Field13_Name;
9226 -----------------------
9227 -- Write_Field14_Name --
9228 -----------------------
9230 procedure Write_Field14_Name (Id : Entity_Id) is
9239 Write_Str ("Alignment");
9243 Write_Str ("Normalized_Position");
9249 Write_Str ("Postconditions_Proc");
9251 when E_Generic_Package |
9253 Write_Str ("Shadow_Entities");
9256 Write_Str ("Field14??");
9258 end Write_Field14_Name;
9260 ------------------------
9261 -- Write_Field15_Name --
9262 ------------------------
9264 procedure Write_Field15_Name (Id : Entity_Id) is
9267 when E_Discriminant =>
9268 Write_Str ("Discriminant_Number");
9271 Write_Str ("DT_Entry_Count");
9275 Write_Str ("DT_Position");
9278 Write_Str ("Entry_Parameters_Type");
9281 Write_Str ("Extra_Formal");
9284 Write_Str ("Pending_Access_Types");
9288 Write_Str ("Related_Instance");
9292 Write_Str ("Status_Flag_Or_Transient_Decl");
9295 Write_Str ("Field15??");
9297 end Write_Field15_Name;
9299 ------------------------
9300 -- Write_Field16_Name --
9301 ------------------------
9303 procedure Write_Field16_Name (Id : Entity_Id) is
9306 when E_Record_Type |
9307 E_Record_Type_With_Private =>
9308 Write_Str ("Access_Disp_Table");
9310 when E_Abstract_State =>
9311 Write_Str ("Body_References");
9313 when E_Record_Subtype |
9314 E_Class_Wide_Subtype =>
9315 Write_Str ("Cloned_Subtype");
9319 Write_Str ("DTC_Entity");
9322 Write_Str ("Entry_Formal");
9327 Write_Str ("First_Private_Entity");
9329 when Enumeration_Kind =>
9330 Write_Str ("Lit_Strings");
9332 when Decimal_Fixed_Point_Kind =>
9333 Write_Str ("Scale_Value");
9335 when E_String_Literal_Subtype =>
9336 Write_Str ("String_Literal_Length");
9340 Write_Str ("Unset_Reference");
9343 Write_Str ("Field16??");
9345 end Write_Field16_Name;
9347 ------------------------
9348 -- Write_Field17_Name --
9349 ------------------------
9351 procedure Write_Field17_Name (Id : Entity_Id) is
9356 E_Generic_In_Out_Parameter |
9358 Write_Str ("Actual_Subtype");
9361 Write_Str ("Digits_Value");
9363 when E_Discriminant =>
9364 Write_Str ("Discriminal");
9373 E_Generic_Function |
9375 E_Generic_Procedure |
9383 E_Return_Statement |
9385 E_Subprogram_Type =>
9386 Write_Str ("First_Entity");
9389 Write_Str ("First_Index");
9391 when Enumeration_Kind =>
9392 Write_Str ("First_Literal");
9395 Write_Str ("Master_Id");
9397 when Modular_Integer_Kind =>
9398 Write_Str ("Modulus");
9400 when E_Incomplete_Subtype =>
9401 if From_Limited_With (Id) then
9402 Write_Str ("Non_Limited_View");
9406 Write_Str ("Prival");
9409 Write_Str ("Field17??");
9411 end Write_Field17_Name;
9413 ------------------------
9414 -- Write_Field18_Name --
9415 ------------------------
9417 procedure Write_Field18_Name (Id : Entity_Id) is
9420 when E_Enumeration_Literal |
9424 Write_Str ("Alias");
9426 when E_Record_Type =>
9427 Write_Str ("Corresponding_Concurrent_Type");
9429 when E_Subprogram_Body =>
9430 Write_Str ("Corresponding_Protected_Entry");
9432 when Concurrent_Kind =>
9433 Write_Str ("Corresponding_Record_Type");
9438 Write_Str ("Enclosing_Scope");
9440 when E_Entry_Index_Parameter =>
9441 Write_Str ("Entry_Index_Constant");
9443 when E_Class_Wide_Subtype |
9444 E_Access_Protected_Subprogram_Type |
9445 E_Anonymous_Access_Protected_Subprogram_Type |
9446 E_Access_Subprogram_Type |
9448 Write_Str ("Equivalent_Type");
9450 when Fixed_Point_Kind =>
9451 Write_Str ("Delta_Value");
9453 when Enumeration_Kind =>
9454 Write_Str ("Lit_Indexes");
9456 when Incomplete_Or_Private_Kind |
9458 Write_Str ("Private_Dependents");
9461 Write_Str ("Renamed_Object");
9465 E_Generic_Function |
9466 E_Generic_Procedure |
9467 E_Generic_Package =>
9468 Write_Str ("Renamed_Entity");
9470 when E_String_Literal_Subtype =>
9471 Write_Str ("String_Literal_Low_Bound");
9474 Write_Str ("Field18??");
9476 end Write_Field18_Name;
9478 -----------------------
9479 -- Write_Field19_Name --
9480 -----------------------
9482 procedure Write_Field19_Name (Id : Entity_Id) is
9486 E_Generic_Package =>
9487 Write_Str ("Body_Entity");
9489 when E_Discriminant =>
9490 Write_Str ("Corresponding_Discriminant");
9493 Write_Str ("Default_Aspect_Value");
9495 when E_Abstract_State |
9497 E_Incomplete_Type =>
9498 Write_Str ("Non_Limited_View");
9500 when E_Array_Type =>
9501 Write_Str ("Default_Component_Value");
9503 when E_Protected_Type =>
9504 Write_Str ("Entry_Bodies_Array");
9508 E_Subprogram_Type =>
9509 Write_Str ("Extra_Accessibility_Of_Result");
9511 when E_Record_Type =>
9512 Write_Str ("Parent_Subtype");
9516 Write_Str ("Size_Check_Code");
9518 when E_Package_Body |
9520 Write_Str ("Spec_Entity");
9522 when Private_Kind =>
9523 Write_Str ("Underlying_Full_View");
9526 Write_Str ("Field19??");
9528 end Write_Field19_Name;
9530 -----------------------
9531 -- Write_Field20_Name --
9532 -----------------------
9534 procedure Write_Field20_Name (Id : Entity_Id) is
9538 Write_Str ("Component_Type");
9540 when E_In_Parameter |
9541 E_Generic_In_Parameter =>
9542 Write_Str ("Default_Value");
9545 Write_Str ("Directly_Designated_Type");
9548 Write_Str ("Discriminant_Checking_Func");
9550 when E_Discriminant =>
9551 Write_Str ("Discriminant_Default_Value");
9560 E_Generic_Function |
9562 E_Generic_Procedure |
9570 E_Return_Statement |
9572 E_Subprogram_Type =>
9573 Write_Str ("Last_Entity");
9577 Write_Str ("Prival_Link");
9580 Write_Str ("Scalar_Range");
9583 Write_Str ("Register_Exception_Call");
9586 Write_Str ("Field20??");
9588 end Write_Field20_Name;
9590 -----------------------
9591 -- Write_Field21_Name --
9592 -----------------------
9594 procedure Write_Field21_Name (Id : Entity_Id) is
9598 Write_Str ("Accept_Address");
9600 when E_In_Parameter =>
9601 Write_Str ("Default_Expr_Function");
9603 when Concurrent_Kind |
9604 Incomplete_Or_Private_Kind |
9608 Write_Str ("Discriminant_Constraint");
9613 E_Generic_Function |
9615 E_Generic_Procedure |
9617 Write_Str ("Interface_Name");
9620 Modular_Integer_Kind =>
9621 Write_Str ("Original_Array_Type");
9623 when Fixed_Point_Kind =>
9624 Write_Str ("Small_Value");
9627 Write_Str ("Field21??");
9629 end Write_Field21_Name;
9631 -----------------------
9632 -- Write_Field22_Name --
9633 -----------------------
9635 procedure Write_Field22_Name (Id : Entity_Id) is
9639 Write_Str ("Associated_Storage_Pool");
9642 Write_Str ("Component_Size");
9644 when E_Record_Type =>
9645 Write_Str ("Corresponding_Remote_Type");
9649 Write_Str ("Original_Record_Component");
9651 when E_Enumeration_Literal =>
9652 Write_Str ("Enumeration_Rep_Expr");
9654 when E_Record_Type_With_Private |
9655 E_Record_Subtype_With_Private |
9658 E_Limited_Private_Type |
9659 E_Limited_Private_Subtype =>
9660 Write_Str ("Private_View");
9663 Write_Str ("Protected_Formal");
9673 E_Generic_Function |
9674 E_Generic_Procedure |
9677 E_Return_Statement |
9680 Write_Str ("Scope_Depth_Value");
9683 Write_Str ("Shared_Var_Procs_Instance");
9686 Write_Str ("Field22??");
9688 end Write_Field22_Name;
9690 ------------------------
9691 -- Write_Field23_Name --
9692 ------------------------
9694 procedure Write_Field23_Name (Id : Entity_Id) is
9697 when E_Discriminant =>
9698 Write_Str ("CR_Discriminant");
9701 Write_Str ("Entry_Cancel_Parameter");
9703 when E_Enumeration_Type =>
9704 Write_Str ("Enum_Pos_To_Rep");
9708 Write_Str ("Extra_Constrained");
9711 Write_Str ("Finalization_Master");
9713 when E_Generic_Function |
9715 E_Generic_Procedure =>
9716 Write_Str ("Inner_Instances");
9719 Write_Str ("Packed_Array_Impl_Type");
9722 Write_Str ("Protection_Object");
9724 when Concurrent_Kind |
9725 Incomplete_Or_Private_Kind |
9729 Write_Str ("Stored_Constraint");
9733 if Present (Scope (Id))
9734 and then Is_Protected_Type (Scope (Id))
9736 Write_Str ("Protection_Object");
9738 Write_Str ("Generic_Renamings");
9742 if Is_Generic_Instance (Id) then
9743 Write_Str ("Generic_Renamings");
9745 Write_Str ("Limited_View");
9749 Write_Str ("Field23??");
9751 end Write_Field23_Name;
9753 ------------------------
9754 -- Write_Field24_Name --
9755 ------------------------
9757 procedure Write_Field24_Name (Id : Entity_Id) is
9763 Write_Str ("Related_Expression");
9768 Write_Str ("Subps_Index");
9771 Write_Str ("Field24???");
9773 end Write_Field24_Name;
9775 ------------------------
9776 -- Write_Field25_Name --
9777 ------------------------
9779 procedure Write_Field25_Name (Id : Entity_Id) is
9782 when E_Generic_Package |
9784 Write_Str ("Abstract_States");
9787 Write_Str ("Debug_Renaming_Link");
9790 Write_Str ("DT_Offset_To_Top_Func");
9794 Write_Str ("Interface_Alias");
9796 when E_Record_Type |
9798 E_Record_Type_With_Private |
9799 E_Record_Subtype_With_Private =>
9800 Write_Str ("Interfaces");
9804 Write_Str ("Related_Array_Object");
9807 Write_Str ("Task_Body_Procedure");
9811 Write_Str ("PPC_Wrapper");
9813 when Discrete_Kind =>
9814 Write_Str ("Static_Discrete_Predicate");
9817 Write_Str ("Static_Real_Or_String_Predicate");
9820 Write_Str ("Field25??");
9822 end Write_Field25_Name;
9824 ------------------------
9825 -- Write_Field26_Name --
9826 ------------------------
9828 procedure Write_Field26_Name (Id : Entity_Id) is
9831 when E_Record_Type |
9832 E_Record_Type_With_Private =>
9833 Write_Str ("Dispatch_Table_Wrappers");
9835 when E_In_Out_Parameter |
9838 Write_Str ("Last_Assignment");
9842 Write_Str ("Overridden_Operation");
9844 when E_Generic_Package |
9846 Write_Str ("Package_Instantiation");
9850 Write_Str ("Related_Type");
9854 Write_Str ("Storage_Size_Variable");
9857 Write_Str ("Field26??");
9859 end Write_Field26_Name;
9861 ------------------------
9862 -- Write_Field27_Name --
9863 ------------------------
9865 procedure Write_Field27_Name (Id : Entity_Id) is
9870 Write_Str ("Current_Use_Clause");
9875 Write_Str ("Related_Type");
9879 Write_Str ("Wrapped_Entity");
9882 Write_Str ("Field27??");
9884 end Write_Field27_Name;
9886 ------------------------
9887 -- Write_Field28_Name --
9888 ------------------------
9890 procedure Write_Field28_Name (Id : Entity_Id) is
9898 E_Subprogram_Type =>
9899 Write_Str ("Extra_Formals");
9903 Write_Str ("Finalizer");
9907 Write_Str ("Initialization_Statements");
9909 when E_Access_Subprogram_Type =>
9910 Write_Str ("Original_Access_Type");
9913 Write_Str ("Relative_Deadline_Variable");
9915 when E_Record_Type =>
9916 Write_Str ("Underlying_Record_View");
9919 Write_Str ("Field28??");
9921 end Write_Field28_Name;
9923 ------------------------
9924 -- Write_Field29_Name --
9925 ------------------------
9927 procedure Write_Field29_Name (Id : Entity_Id) is
9932 Write_Str ("BIP_Initialization_Call");
9935 Write_Str ("Subprograms_For_Type");
9938 Write_Str ("Field29??");
9940 end Write_Field29_Name;
9942 ------------------------
9943 -- Write_Field30_Name --
9944 ------------------------
9946 procedure Write_Field30_Name (Id : Entity_Id) is
9950 Write_Str ("Corresponding_Equality");
9954 Write_Str ("Last_Aggregate_Assignment");
9957 Write_Str ("Static_Initialization");
9960 Write_Str ("Field30??");
9962 end Write_Field30_Name;
9964 ------------------------
9965 -- Write_Field31_Name --
9966 ------------------------
9968 procedure Write_Field31_Name (Id : Entity_Id) is
9973 Write_Str ("Thunk_Entity");
9976 Write_Str ("Derived_Type_Link");
9980 E_In_Out_Parameter |
9984 Write_Str ("Activation_Record_Component");
9987 Write_Str ("Field31??");
9989 end Write_Field31_Name;
9991 ------------------------
9992 -- Write_Field32_Name --
9993 ------------------------
9995 procedure Write_Field32_Name (Id : Entity_Id) is
9999 E_Generic_Function |
10000 E_Generic_Package |
10001 E_Generic_Procedure |
10005 E_Subprogram_Body =>
10006 Write_Str ("SPARK_Pragma");
10009 Write_Str ("No_Tagged_Streams_Pragma");
10012 Write_Str ("Field32??");
10014 end Write_Field32_Name;
10016 ------------------------
10017 -- Write_Field33_Name --
10018 ------------------------
10020 procedure Write_Field33_Name (Id : Entity_Id) is
10023 when E_Generic_Package |
10026 Write_Str ("SPARK_Aux_Pragma");
10032 Write_Str ("Linker_Section_Pragma");
10035 Write_Str ("Field33??");
10037 end Write_Field33_Name;
10039 ------------------------
10040 -- Write_Field34_Name --
10041 ------------------------
10043 procedure Write_Field34_Name (Id : Entity_Id) is
10048 E_Generic_Package |
10051 E_Subprogram_Body |
10053 Generic_Subprogram_Kind |
10055 Write_Str ("Contract");
10058 Write_Str ("Field34??");
10060 end Write_Field34_Name;
10062 ------------------------
10063 -- Write_Field35_Name --
10064 ------------------------
10066 procedure Write_Field35_Name (Id : Entity_Id) is
10069 when Subprogram_Kind =>
10070 Write_Str ("Import_Pragma");
10073 Write_Str ("Field35??");
10075 end Write_Field35_Name;
10077 ------------------------
10078 -- Write_Field36_Name --
10079 ------------------------
10081 procedure Write_Field36_Name (Id : Entity_Id) is
10085 Write_Str ("Field36??");
10087 end Write_Field36_Name;
10089 ------------------------
10090 -- Write_Field37_Name --
10091 ------------------------
10093 procedure Write_Field37_Name (Id : Entity_Id) is
10097 Write_Str ("Field37??");
10099 end Write_Field37_Name;
10101 ------------------------
10102 -- Write_Field38_Name --
10103 ------------------------
10105 procedure Write_Field38_Name (Id : Entity_Id) is
10109 Write_Str ("Field38??");
10111 end Write_Field38_Name;
10113 ------------------------
10114 -- Write_Field39_Name --
10115 ------------------------
10117 procedure Write_Field39_Name (Id : Entity_Id) is
10121 Write_Str ("Field39??");
10123 end Write_Field39_Name;
10125 ------------------------
10126 -- Write_Field40_Name --
10127 ------------------------
10129 procedure Write_Field40_Name (Id : Entity_Id) is
10133 Write_Str ("Field40??");
10135 end Write_Field40_Name;
10137 ------------------------
10138 -- Write_Field41_Name --
10139 ------------------------
10141 procedure Write_Field41_Name (Id : Entity_Id) is
10145 Write_Str ("Field41??");
10147 end Write_Field41_Name;
10149 -------------------------
10150 -- Iterator Procedures --
10151 -------------------------
10153 procedure Proc_Next_Component (N : in out Node_Id) is
10155 N := Next_Component (N);
10156 end Proc_Next_Component;
10158 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10160 N := Next_Entity (N);
10161 while Present (N) loop
10162 exit when Ekind_In (N, E_Component, E_Discriminant);
10163 N := Next_Entity (N);
10165 end Proc_Next_Component_Or_Discriminant;
10167 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10169 N := Next_Discriminant (N);
10170 end Proc_Next_Discriminant;
10172 procedure Proc_Next_Formal (N : in out Node_Id) is
10174 N := Next_Formal (N);
10175 end Proc_Next_Formal;
10177 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10179 N := Next_Formal_With_Extras (N);
10180 end Proc_Next_Formal_With_Extras;
10182 procedure Proc_Next_Index (N : in out Node_Id) is
10184 N := Next_Index (N);
10185 end Proc_Next_Index;
10187 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10189 N := Next_Inlined_Subprogram (N);
10190 end Proc_Next_Inlined_Subprogram;
10192 procedure Proc_Next_Literal (N : in out Node_Id) is
10194 N := Next_Literal (N);
10195 end Proc_Next_Literal;
10197 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10199 N := Next_Stored_Discriminant (N);
10200 end Proc_Next_Stored_Discriminant;