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
73 -- Associated_Entity Node37
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Part_Of_Constituents Elist9
92 -- 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 -- Debug_Renaming_Link Node25
219 -- DT_Offset_To_Top_Func Node25
220 -- Interface_Alias Node25
221 -- Interfaces Elist25
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 -- Encapsulating_State Node32
257 -- SPARK_Pragma Node32
258 -- No_Tagged_Streams_Pragma Node32
260 -- Linker_Section_Pragma Node33
261 -- SPARK_Aux_Pragma Node33
265 -- 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_Entity (Id : E) return E is
759 end Associated_Entity;
761 function Associated_Formal_Package (Id : E) return E is
763 pragma Assert (Ekind (Id) = E_Package);
765 end Associated_Formal_Package;
767 function Associated_Node_For_Itype (Id : E) return N is
770 end Associated_Node_For_Itype;
772 function Associated_Storage_Pool (Id : E) return E is
774 pragma Assert (Is_Access_Type (Id));
775 return Node22 (Root_Type (Id));
776 end Associated_Storage_Pool;
778 function Barrier_Function (Id : E) return N is
780 pragma Assert (Is_Entry (Id));
782 end Barrier_Function;
784 function Block_Node (Id : E) return N is
786 pragma Assert (Ekind (Id) = E_Block);
790 function Body_Entity (Id : E) return E is
792 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
796 function Body_Needed_For_SAL (Id : E) return B is
799 (Ekind (Id) = E_Package
800 or else Is_Subprogram (Id)
801 or else Is_Generic_Unit (Id));
803 end Body_Needed_For_SAL;
805 function Body_References (Id : E) return L is
807 pragma Assert (Ekind (Id) = E_Abstract_State);
811 function BIP_Initialization_Call (Id : E) return N is
813 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
815 end BIP_Initialization_Call;
817 function C_Pass_By_Copy (Id : E) return B is
819 pragma Assert (Is_Record_Type (Id));
820 return Flag125 (Implementation_Base_Type (Id));
823 function Can_Never_Be_Null (Id : E) return B is
826 end Can_Never_Be_Null;
828 function Checks_May_Be_Suppressed (Id : E) return B is
831 end Checks_May_Be_Suppressed;
833 function Class_Wide_Type (Id : E) return E is
835 pragma Assert (Is_Type (Id));
839 function Cloned_Subtype (Id : E) return E is
841 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
845 function Component_Bit_Offset (Id : E) return U is
847 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
849 end Component_Bit_Offset;
851 function Component_Clause (Id : E) return N is
853 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
855 end Component_Clause;
857 function Component_Size (Id : E) return U is
859 pragma Assert (Is_Array_Type (Id));
860 return Uint22 (Implementation_Base_Type (Id));
863 function Component_Type (Id : E) return E is
865 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
866 return Node20 (Implementation_Base_Type (Id));
869 function Corresponding_Concurrent_Type (Id : E) return E is
871 pragma Assert (Ekind (Id) = E_Record_Type);
873 end Corresponding_Concurrent_Type;
875 function Corresponding_Discriminant (Id : E) return E is
877 pragma Assert (Ekind (Id) = E_Discriminant);
879 end Corresponding_Discriminant;
881 function Corresponding_Equality (Id : E) return E is
884 (Ekind (Id) = E_Function
885 and then not Comes_From_Source (Id)
886 and then Chars (Id) = Name_Op_Ne);
888 end Corresponding_Equality;
890 function Corresponding_Protected_Entry (Id : E) return E is
892 pragma Assert (Ekind (Id) = E_Subprogram_Body);
894 end Corresponding_Protected_Entry;
896 function Corresponding_Record_Type (Id : E) return E is
898 pragma Assert (Is_Concurrent_Type (Id));
900 end Corresponding_Record_Type;
902 function Corresponding_Remote_Type (Id : E) return E is
905 end Corresponding_Remote_Type;
907 function Current_Use_Clause (Id : E) return E is
909 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
911 end Current_Use_Clause;
913 function Current_Value (Id : E) return N is
915 pragma Assert (Ekind (Id) in Object_Kind);
919 function CR_Discriminant (Id : E) return E is
924 function Debug_Info_Off (Id : E) return B is
929 function Debug_Renaming_Link (Id : E) return E is
932 end Debug_Renaming_Link;
934 function Default_Aspect_Component_Value (Id : E) return N is
936 pragma Assert (Is_Array_Type (Id));
937 return Node19 (Base_Type (Id));
938 end Default_Aspect_Component_Value;
940 function Default_Aspect_Value (Id : E) return N is
942 pragma Assert (Is_Scalar_Type (Id));
943 return Node19 (Base_Type (Id));
944 end Default_Aspect_Value;
946 function Default_Expr_Function (Id : E) return E is
948 pragma Assert (Is_Formal (Id));
950 end Default_Expr_Function;
952 function Default_Expressions_Processed (Id : E) return B is
955 end Default_Expressions_Processed;
957 function Default_Value (Id : E) return N is
959 pragma Assert (Is_Formal (Id));
963 function Delay_Cleanups (Id : E) return B is
968 function Delay_Subprogram_Descriptors (Id : E) return B is
971 end Delay_Subprogram_Descriptors;
973 function Delta_Value (Id : E) return R is
975 pragma Assert (Is_Fixed_Point_Type (Id));
979 function Dependent_Instances (Id : E) return L is
981 pragma Assert (Is_Generic_Instance (Id));
983 end Dependent_Instances;
985 function Depends_On_Private (Id : E) return B is
987 pragma Assert (Nkind (Id) in N_Entity);
989 end Depends_On_Private;
991 function Derived_Type_Link (Id : E) return E is
993 pragma Assert (Is_Type (Id));
994 return Node31 (Base_Type (Id));
995 end Derived_Type_Link;
997 function Digits_Value (Id : E) return U is
1000 (Is_Floating_Point_Type (Id)
1001 or else Is_Decimal_Fixed_Point_Type (Id));
1005 function Direct_Primitive_Operations (Id : E) return L is
1007 pragma Assert (Is_Tagged_Type (Id));
1008 return Elist10 (Id);
1009 end Direct_Primitive_Operations;
1011 function Directly_Designated_Type (Id : E) return E is
1013 pragma Assert (Is_Access_Type (Id));
1015 end Directly_Designated_Type;
1017 function Discard_Names (Id : E) return B is
1022 function Discriminal (Id : E) return E is
1024 pragma Assert (Ekind (Id) = E_Discriminant);
1028 function Discriminal_Link (Id : E) return N is
1031 end Discriminal_Link;
1033 function Discriminant_Checking_Func (Id : E) return E is
1035 pragma Assert (Ekind (Id) = E_Component);
1037 end Discriminant_Checking_Func;
1039 function Discriminant_Constraint (Id : E) return L is
1041 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1042 return Elist21 (Id);
1043 end Discriminant_Constraint;
1045 function Discriminant_Default_Value (Id : E) return N is
1047 pragma Assert (Ekind (Id) = E_Discriminant);
1049 end Discriminant_Default_Value;
1051 function Discriminant_Number (Id : E) return U is
1053 pragma Assert (Ekind (Id) = E_Discriminant);
1055 end Discriminant_Number;
1057 function Dispatch_Table_Wrappers (Id : E) return L is
1059 pragma Assert (Ekind_In (Id, E_Record_Type,
1061 return Elist26 (Implementation_Base_Type (Id));
1062 end Dispatch_Table_Wrappers;
1064 function DT_Entry_Count (Id : E) return U is
1066 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1070 function DT_Offset_To_Top_Func (Id : E) return E is
1072 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1074 end DT_Offset_To_Top_Func;
1076 function DT_Position (Id : E) return U is
1078 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1079 and then Present (DTC_Entity (Id)));
1083 function DTC_Entity (Id : E) return E is
1085 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1089 function Elaborate_Body_Desirable (Id : E) return B is
1091 pragma Assert (Ekind (Id) = E_Package);
1092 return Flag210 (Id);
1093 end Elaborate_Body_Desirable;
1095 function Elaboration_Entity (Id : E) return E is
1100 Ekind (Id) = E_Package
1102 Is_Generic_Unit (Id));
1104 end Elaboration_Entity;
1106 function Elaboration_Entity_Required (Id : E) return B is
1111 Ekind (Id) = E_Package
1113 Is_Generic_Unit (Id));
1114 return Flag174 (Id);
1115 end Elaboration_Entity_Required;
1117 function Encapsulating_State (Id : E) return N is
1119 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1121 end Encapsulating_State;
1123 function Enclosing_Scope (Id : E) return E is
1126 end Enclosing_Scope;
1128 function Entry_Accepted (Id : E) return B is
1130 pragma Assert (Is_Entry (Id));
1131 return Flag152 (Id);
1134 function Entry_Bodies_Array (Id : E) return E is
1137 end Entry_Bodies_Array;
1139 function Entry_Cancel_Parameter (Id : E) return E is
1142 end Entry_Cancel_Parameter;
1144 function Entry_Component (Id : E) return E is
1147 end Entry_Component;
1149 function Entry_Formal (Id : E) return E is
1154 function Entry_Index_Constant (Id : E) return N is
1156 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1158 end Entry_Index_Constant;
1160 function Contains_Ignored_Ghost_Code (Id : E) return B is
1163 (Ekind_In (Id, E_Block,
1167 E_Generic_Procedure,
1171 E_Subprogram_Body));
1172 return Flag279 (Id);
1173 end Contains_Ignored_Ghost_Code;
1175 function Contract (Id : E) return N is
1178 (Ekind_In (Id, E_Entry,
1186 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1190 function Entry_Parameters_Type (Id : E) return E is
1193 end Entry_Parameters_Type;
1195 function Enum_Pos_To_Rep (Id : E) return E is
1197 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1199 end Enum_Pos_To_Rep;
1201 function Enumeration_Pos (Id : E) return Uint is
1203 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1205 end Enumeration_Pos;
1207 function Enumeration_Rep (Id : E) return U is
1209 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1211 end Enumeration_Rep;
1213 function Enumeration_Rep_Expr (Id : E) return N is
1215 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1217 end Enumeration_Rep_Expr;
1219 function Equivalent_Type (Id : E) return E is
1222 (Ekind_In (Id, E_Class_Wide_Type,
1223 E_Class_Wide_Subtype,
1224 E_Access_Subprogram_Type,
1225 E_Access_Protected_Subprogram_Type,
1226 E_Anonymous_Access_Protected_Subprogram_Type,
1227 E_Access_Subprogram_Type,
1230 end Equivalent_Type;
1232 function Esize (Id : E) return Uint is
1237 function Extra_Accessibility (Id : E) return E is
1240 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1242 end Extra_Accessibility;
1244 function Extra_Accessibility_Of_Result (Id : E) return E is
1246 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1248 end Extra_Accessibility_Of_Result;
1250 function Extra_Constrained (Id : E) return E is
1252 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1254 end Extra_Constrained;
1256 function Extra_Formal (Id : E) return E is
1261 function Extra_Formals (Id : E) return E is
1264 (Is_Overloadable (Id)
1265 or else Ekind_In (Id, E_Entry_Family,
1267 E_Subprogram_Type));
1271 function Can_Use_Internal_Rep (Id : E) return B is
1273 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1274 return Flag229 (Base_Type (Id));
1275 end Can_Use_Internal_Rep;
1277 function Finalization_Master (Id : E) return E is
1279 pragma Assert (Is_Access_Type (Id));
1280 return Node23 (Root_Type (Id));
1281 end Finalization_Master;
1283 function Finalize_Storage_Only (Id : E) return B is
1285 pragma Assert (Is_Type (Id));
1286 return Flag158 (Base_Type (Id));
1287 end Finalize_Storage_Only;
1289 function Finalizer (Id : E) return E is
1291 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1295 function First_Entity (Id : E) return E is
1300 function First_Exit_Statement (Id : E) return N is
1302 pragma Assert (Ekind (Id) = E_Loop);
1304 end First_Exit_Statement;
1306 function First_Index (Id : E) return N is
1308 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1312 function First_Literal (Id : E) return E is
1314 pragma Assert (Is_Enumeration_Type (Id));
1318 function First_Private_Entity (Id : E) return E is
1320 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1321 or else Ekind (Id) in Concurrent_Kind);
1323 end First_Private_Entity;
1325 function First_Rep_Item (Id : E) return E is
1330 function Freeze_Node (Id : E) return N is
1335 function From_Limited_With (Id : E) return B is
1337 return Flag159 (Id);
1338 end From_Limited_With;
1340 function Full_View (Id : E) return E is
1342 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1346 function Generic_Homonym (Id : E) return E is
1348 pragma Assert (Ekind (Id) = E_Generic_Package);
1350 end Generic_Homonym;
1352 function Generic_Renamings (Id : E) return L is
1354 return Elist23 (Id);
1355 end Generic_Renamings;
1357 function Handler_Records (Id : E) return S is
1360 end Handler_Records;
1362 function Has_Aliased_Components (Id : E) return B is
1364 return Flag135 (Implementation_Base_Type (Id));
1365 end Has_Aliased_Components;
1367 function Has_Alignment_Clause (Id : E) return B is
1370 end Has_Alignment_Clause;
1372 function Has_All_Calls_Remote (Id : E) return B is
1375 end Has_All_Calls_Remote;
1377 function Has_Anonymous_Master (Id : E) return B is
1380 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1381 return Flag253 (Id);
1382 end Has_Anonymous_Master;
1384 function Has_Atomic_Components (Id : E) return B is
1386 return Flag86 (Implementation_Base_Type (Id));
1387 end Has_Atomic_Components;
1389 function Has_Biased_Representation (Id : E) return B is
1391 return Flag139 (Id);
1392 end Has_Biased_Representation;
1394 function Has_Completion (Id : E) return B is
1399 function Has_Completion_In_Body (Id : E) return B is
1401 pragma Assert (Is_Type (Id));
1403 end Has_Completion_In_Body;
1405 function Has_Complex_Representation (Id : E) return B is
1407 pragma Assert (Is_Type (Id));
1408 return Flag140 (Implementation_Base_Type (Id));
1409 end Has_Complex_Representation;
1411 function Has_Component_Size_Clause (Id : E) return B is
1413 pragma Assert (Is_Array_Type (Id));
1414 return Flag68 (Implementation_Base_Type (Id));
1415 end Has_Component_Size_Clause;
1417 function Has_Constrained_Partial_View (Id : E) return B is
1419 pragma Assert (Is_Type (Id));
1420 return Flag187 (Id);
1421 end Has_Constrained_Partial_View;
1423 function Has_Controlled_Component (Id : E) return B is
1425 return Flag43 (Base_Type (Id));
1426 end Has_Controlled_Component;
1428 function Has_Contiguous_Rep (Id : E) return B is
1430 return Flag181 (Id);
1431 end Has_Contiguous_Rep;
1433 function Has_Controlling_Result (Id : E) return B is
1436 end Has_Controlling_Result;
1438 function Has_Convention_Pragma (Id : E) return B is
1440 return Flag119 (Id);
1441 end Has_Convention_Pragma;
1443 function Has_Default_Aspect (Id : E) return B is
1445 return Flag39 (Base_Type (Id));
1446 end Has_Default_Aspect;
1448 function Has_Default_Init_Cond (Id : E) return B is
1451 end Has_Default_Init_Cond;
1453 function Has_Delayed_Aspects (Id : E) return B is
1455 pragma Assert (Nkind (Id) in N_Entity);
1456 return Flag200 (Id);
1457 end Has_Delayed_Aspects;
1459 function Has_Delayed_Freeze (Id : E) return B is
1461 pragma Assert (Nkind (Id) in N_Entity);
1463 end Has_Delayed_Freeze;
1465 function Has_Delayed_Rep_Aspects (Id : E) return B is
1467 pragma Assert (Nkind (Id) in N_Entity);
1468 return Flag261 (Id);
1469 end Has_Delayed_Rep_Aspects;
1471 function Has_Discriminants (Id : E) return B is
1473 pragma Assert (Nkind (Id) in N_Entity);
1475 end Has_Discriminants;
1477 function Has_Dispatch_Table (Id : E) return B is
1479 pragma Assert (Is_Tagged_Type (Id));
1480 return Flag220 (Id);
1481 end Has_Dispatch_Table;
1483 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1485 pragma Assert (Is_Type (Id));
1486 return Flag258 (Id);
1487 end Has_Dynamic_Predicate_Aspect;
1489 function Has_Enumeration_Rep_Clause (Id : E) return B is
1491 pragma Assert (Is_Enumeration_Type (Id));
1493 end Has_Enumeration_Rep_Clause;
1495 function Has_Exit (Id : E) return B is
1500 function Has_Expanded_Contract (Id : E) return B is
1502 pragma Assert (Is_Subprogram (Id));
1503 return Flag240 (Id);
1504 end Has_Expanded_Contract;
1506 function Has_Forward_Instantiation (Id : E) return B is
1508 return Flag175 (Id);
1509 end Has_Forward_Instantiation;
1511 function Has_Fully_Qualified_Name (Id : E) return B is
1513 return Flag173 (Id);
1514 end Has_Fully_Qualified_Name;
1516 function Has_Gigi_Rep_Item (Id : E) return B is
1519 end Has_Gigi_Rep_Item;
1521 function Has_Homonym (Id : E) return B is
1526 function Has_Implicit_Dereference (Id : E) return B is
1528 return Flag251 (Id);
1529 end Has_Implicit_Dereference;
1531 function Has_Independent_Components (Id : E) return B is
1533 return Flag34 (Implementation_Base_Type (Id));
1534 end Has_Independent_Components;
1536 function Has_Inheritable_Invariants (Id : E) return B is
1538 pragma Assert (Is_Type (Id));
1539 return Flag248 (Id);
1540 end Has_Inheritable_Invariants;
1542 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1544 pragma Assert (Is_Type (Id));
1545 return Flag133 (Id);
1546 end Has_Inherited_Default_Init_Cond;
1548 function Has_Initial_Value (Id : E) return B is
1550 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1551 return Flag219 (Id);
1552 end Has_Initial_Value;
1554 function Has_Invariants (Id : E) return B is
1556 pragma Assert (Is_Type (Id));
1557 return Flag232 (Id);
1560 function Has_Loop_Entry_Attributes (Id : E) return B is
1562 pragma Assert (Ekind (Id) = E_Loop);
1563 return Flag260 (Id);
1564 end Has_Loop_Entry_Attributes;
1566 function Has_Machine_Radix_Clause (Id : E) return B is
1568 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1570 end Has_Machine_Radix_Clause;
1572 function Has_Master_Entity (Id : E) return B is
1575 end Has_Master_Entity;
1577 function Has_Missing_Return (Id : E) return B is
1579 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1580 return Flag142 (Id);
1581 end Has_Missing_Return;
1583 function Has_Nested_Block_With_Handler (Id : E) return B is
1585 return Flag101 (Id);
1586 end Has_Nested_Block_With_Handler;
1588 function Has_Nested_Subprogram (Id : E) return B is
1590 pragma Assert (Is_Subprogram (Id));
1591 return Flag282 (Id);
1592 end Has_Nested_Subprogram;
1594 function Has_Non_Standard_Rep (Id : E) return B is
1596 return Flag75 (Implementation_Base_Type (Id));
1597 end Has_Non_Standard_Rep;
1599 function Has_Object_Size_Clause (Id : E) return B is
1601 pragma Assert (Is_Type (Id));
1602 return Flag172 (Id);
1603 end Has_Object_Size_Clause;
1605 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1607 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1608 return Flag110 (Id);
1609 end Has_Out_Or_In_Out_Parameter;
1611 function Has_Per_Object_Constraint (Id : E) return B is
1613 return Flag154 (Id);
1614 end Has_Per_Object_Constraint;
1616 function Has_Pragma_Controlled (Id : E) return B is
1618 pragma Assert (Is_Access_Type (Id));
1619 return Flag27 (Implementation_Base_Type (Id));
1620 end Has_Pragma_Controlled;
1622 function Has_Pragma_Elaborate_Body (Id : E) return B is
1624 return Flag150 (Id);
1625 end Has_Pragma_Elaborate_Body;
1627 function Has_Pragma_Inline (Id : E) return B is
1629 return Flag157 (Id);
1630 end Has_Pragma_Inline;
1632 function Has_Pragma_Inline_Always (Id : E) return B is
1634 return Flag230 (Id);
1635 end Has_Pragma_Inline_Always;
1637 function Has_Pragma_No_Inline (Id : E) return B is
1639 return Flag201 (Id);
1640 end Has_Pragma_No_Inline;
1642 function Has_Pragma_Ordered (Id : E) return B is
1644 pragma Assert (Is_Enumeration_Type (Id));
1645 return Flag198 (Implementation_Base_Type (Id));
1646 end Has_Pragma_Ordered;
1648 function Has_Pragma_Pack (Id : E) return B is
1650 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1651 return Flag121 (Implementation_Base_Type (Id));
1652 end Has_Pragma_Pack;
1654 function Has_Pragma_Preelab_Init (Id : E) return B is
1656 return Flag221 (Id);
1657 end Has_Pragma_Preelab_Init;
1659 function Has_Pragma_Pure (Id : E) return B is
1661 return Flag203 (Id);
1662 end Has_Pragma_Pure;
1664 function Has_Pragma_Pure_Function (Id : E) return B is
1666 return Flag179 (Id);
1667 end Has_Pragma_Pure_Function;
1669 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1671 return Flag169 (Id);
1672 end Has_Pragma_Thread_Local_Storage;
1674 function Has_Pragma_Unmodified (Id : E) return B is
1676 return Flag233 (Id);
1677 end Has_Pragma_Unmodified;
1679 function Has_Pragma_Unreferenced (Id : E) return B is
1681 return Flag180 (Id);
1682 end Has_Pragma_Unreferenced;
1684 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1686 pragma Assert (Is_Type (Id));
1687 return Flag212 (Id);
1688 end Has_Pragma_Unreferenced_Objects;
1690 function Has_Predicates (Id : E) return B is
1692 pragma Assert (Is_Type (Id));
1693 return Flag250 (Id);
1696 function Has_Primitive_Operations (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1699 return Flag120 (Base_Type (Id));
1700 end Has_Primitive_Operations;
1702 function Has_Private_Ancestor (Id : E) return B is
1704 return Flag151 (Id);
1705 end Has_Private_Ancestor;
1707 function Has_Private_Declaration (Id : E) return B is
1709 return Flag155 (Id);
1710 end Has_Private_Declaration;
1712 function Has_Protected (Id : E) return B is
1714 return Flag271 (Base_Type (Id));
1717 function Has_Qualified_Name (Id : E) return B is
1719 return Flag161 (Id);
1720 end Has_Qualified_Name;
1722 function Has_RACW (Id : E) return B is
1724 pragma Assert (Ekind (Id) = E_Package);
1725 return Flag214 (Id);
1728 function Has_Record_Rep_Clause (Id : E) return B is
1730 pragma Assert (Is_Record_Type (Id));
1731 return Flag65 (Implementation_Base_Type (Id));
1732 end Has_Record_Rep_Clause;
1734 function Has_Recursive_Call (Id : E) return B is
1736 pragma Assert (Is_Subprogram (Id));
1737 return Flag143 (Id);
1738 end Has_Recursive_Call;
1740 function Has_Shift_Operator (Id : E) return B is
1742 pragma Assert (Is_Integer_Type (Id));
1743 return Flag267 (Base_Type (Id));
1744 end Has_Shift_Operator;
1746 function Has_Size_Clause (Id : E) return B is
1749 end Has_Size_Clause;
1751 function Has_Small_Clause (Id : E) return B is
1754 end Has_Small_Clause;
1756 function Has_Specified_Layout (Id : E) return B is
1758 pragma Assert (Is_Type (Id));
1759 return Flag100 (Implementation_Base_Type (Id));
1760 end Has_Specified_Layout;
1762 function Has_Specified_Stream_Input (Id : E) return B is
1764 pragma Assert (Is_Type (Id));
1765 return Flag190 (Id);
1766 end Has_Specified_Stream_Input;
1768 function Has_Specified_Stream_Output (Id : E) return B is
1770 pragma Assert (Is_Type (Id));
1771 return Flag191 (Id);
1772 end Has_Specified_Stream_Output;
1774 function Has_Specified_Stream_Read (Id : E) return B is
1776 pragma Assert (Is_Type (Id));
1777 return Flag192 (Id);
1778 end Has_Specified_Stream_Read;
1780 function Has_Specified_Stream_Write (Id : E) return B is
1782 pragma Assert (Is_Type (Id));
1783 return Flag193 (Id);
1784 end Has_Specified_Stream_Write;
1786 function Has_Static_Discriminants (Id : E) return B is
1788 pragma Assert (Is_Type (Id));
1789 return Flag211 (Id);
1790 end Has_Static_Discriminants;
1792 function Has_Static_Predicate (Id : E) return B is
1794 pragma Assert (Is_Type (Id));
1795 return Flag269 (Id);
1796 end Has_Static_Predicate;
1798 function Has_Static_Predicate_Aspect (Id : E) return B is
1800 pragma Assert (Is_Type (Id));
1801 return Flag259 (Id);
1802 end Has_Static_Predicate_Aspect;
1804 function Has_Storage_Size_Clause (Id : E) return B is
1806 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1807 return Flag23 (Implementation_Base_Type (Id));
1808 end Has_Storage_Size_Clause;
1810 function Has_Stream_Size_Clause (Id : E) return B is
1812 return Flag184 (Id);
1813 end Has_Stream_Size_Clause;
1815 function Has_Task (Id : E) return B is
1817 return Flag30 (Base_Type (Id));
1820 function Has_Thunks (Id : E) return B is
1822 return Flag228 (Id);
1825 function Has_Unchecked_Union (Id : E) return B is
1827 return Flag123 (Base_Type (Id));
1828 end Has_Unchecked_Union;
1830 function Has_Unknown_Discriminants (Id : E) return B is
1832 pragma Assert (Is_Type (Id));
1834 end Has_Unknown_Discriminants;
1836 function Has_Uplevel_Reference (Id : E) return B is
1838 return Flag215 (Id);
1839 end Has_Uplevel_Reference;
1841 function Has_Visible_Refinement (Id : E) return B is
1843 pragma Assert (Ekind (Id) = E_Abstract_State);
1844 return Flag263 (Id);
1845 end Has_Visible_Refinement;
1847 function Has_Volatile_Components (Id : E) return B is
1849 return Flag87 (Implementation_Base_Type (Id));
1850 end Has_Volatile_Components;
1852 function Has_Xref_Entry (Id : E) return B is
1854 return Flag182 (Id);
1857 function Hiding_Loop_Variable (Id : E) return E is
1859 pragma Assert (Ekind (Id) = E_Variable);
1861 end Hiding_Loop_Variable;
1863 function Homonym (Id : E) return E is
1868 function Import_Pragma (Id : E) return E is
1870 pragma Assert (Is_Subprogram (Id));
1874 function Interface_Alias (Id : E) return E is
1876 pragma Assert (Is_Subprogram (Id));
1878 end Interface_Alias;
1880 function Interfaces (Id : E) return L is
1882 pragma Assert (Is_Record_Type (Id));
1883 return Elist25 (Id);
1886 function In_Package_Body (Id : E) return B is
1889 end In_Package_Body;
1891 function In_Private_Part (Id : E) return B is
1894 end In_Private_Part;
1896 function In_Use (Id : E) return B is
1898 pragma Assert (Nkind (Id) in N_Entity);
1902 function Initialization_Statements (Id : E) return N is
1904 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1906 end Initialization_Statements;
1908 function Inner_Instances (Id : E) return L is
1910 return Elist23 (Id);
1911 end Inner_Instances;
1913 function Interface_Name (Id : E) return N is
1918 function Is_Abstract_Subprogram (Id : E) return B is
1920 pragma Assert (Is_Overloadable (Id));
1922 end Is_Abstract_Subprogram;
1924 function Is_Abstract_Type (Id : E) return B is
1926 pragma Assert (Is_Type (Id));
1927 return Flag146 (Id);
1928 end Is_Abstract_Type;
1930 function Is_Local_Anonymous_Access (Id : E) return B is
1932 pragma Assert (Is_Access_Type (Id));
1933 return Flag194 (Id);
1934 end Is_Local_Anonymous_Access;
1936 function Is_Access_Constant (Id : E) return B is
1938 pragma Assert (Is_Access_Type (Id));
1940 end Is_Access_Constant;
1942 function Is_Ada_2005_Only (Id : E) return B is
1944 return Flag185 (Id);
1945 end Is_Ada_2005_Only;
1947 function Is_Ada_2012_Only (Id : E) return B is
1949 return Flag199 (Id);
1950 end Is_Ada_2012_Only;
1952 function Is_Aliased (Id : E) return B is
1954 pragma Assert (Nkind (Id) in N_Entity);
1958 function Is_Asynchronous (Id : E) return B is
1960 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1962 end Is_Asynchronous;
1964 function Is_Atomic (Id : E) return B is
1969 function Is_Bit_Packed_Array (Id : E) return B is
1971 return Flag122 (Implementation_Base_Type (Id));
1972 end Is_Bit_Packed_Array;
1974 function Is_Called (Id : E) return B is
1976 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1977 return Flag102 (Id);
1980 function Is_Character_Type (Id : E) return B is
1983 end Is_Character_Type;
1985 function Is_Checked_Ghost_Entity (Id : E) return B is
1987 pragma Assert (Nkind (Id) in N_Entity);
1988 return Flag277 (Id);
1989 end Is_Checked_Ghost_Entity;
1991 function Is_Child_Unit (Id : E) return B is
1996 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1999 end Is_Class_Wide_Equivalent_Type;
2001 function Is_Compilation_Unit (Id : E) return B is
2003 return Flag149 (Id);
2004 end Is_Compilation_Unit;
2006 function Is_Completely_Hidden (Id : E) return B is
2008 pragma Assert (Ekind (Id) = E_Discriminant);
2009 return Flag103 (Id);
2010 end Is_Completely_Hidden;
2012 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2015 end Is_Constr_Subt_For_U_Nominal;
2017 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2019 return Flag141 (Id);
2020 end Is_Constr_Subt_For_UN_Aliased;
2022 function Is_Constrained (Id : E) return B is
2024 pragma Assert (Nkind (Id) in N_Entity);
2028 function Is_Constructor (Id : E) return B is
2033 function Is_Controlled (Id : E) return B is
2035 return Flag42 (Base_Type (Id));
2038 function Is_Controlling_Formal (Id : E) return B is
2040 pragma Assert (Is_Formal (Id));
2042 end Is_Controlling_Formal;
2044 function Is_CPP_Class (Id : E) return B is
2049 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2051 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2052 return Flag132 (Id);
2053 end Is_Default_Init_Cond_Procedure;
2055 function Is_Descendent_Of_Address (Id : E) return B is
2057 return Flag223 (Id);
2058 end Is_Descendent_Of_Address;
2060 function Is_Discrim_SO_Function (Id : E) return B is
2062 return Flag176 (Id);
2063 end Is_Discrim_SO_Function;
2065 function Is_Discriminant_Check_Function (Id : E) return B is
2067 return Flag264 (Id);
2068 end Is_Discriminant_Check_Function;
2070 function Is_Dispatch_Table_Entity (Id : E) return B is
2072 return Flag234 (Id);
2073 end Is_Dispatch_Table_Entity;
2075 function Is_Dispatching_Operation (Id : E) return B is
2077 pragma Assert (Nkind (Id) in N_Entity);
2079 end Is_Dispatching_Operation;
2081 function Is_Eliminated (Id : E) return B is
2083 return Flag124 (Id);
2086 function Is_Entry_Formal (Id : E) return B is
2089 end Is_Entry_Formal;
2091 function Is_Exported (Id : E) return B is
2096 function Is_First_Subtype (Id : E) return B is
2099 end Is_First_Subtype;
2101 function Is_For_Access_Subtype (Id : E) return B is
2103 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2104 return Flag118 (Id);
2105 end Is_For_Access_Subtype;
2107 function Is_Formal_Subprogram (Id : E) return B is
2109 return Flag111 (Id);
2110 end Is_Formal_Subprogram;
2112 function Is_Frozen (Id : E) return B is
2117 function Is_Generic_Actual_Subprogram (Id : E) return B is
2119 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2120 return Flag274 (Id);
2121 end Is_Generic_Actual_Subprogram;
2123 function Is_Generic_Actual_Type (Id : E) return B is
2125 pragma Assert (Is_Type (Id));
2127 end Is_Generic_Actual_Type;
2129 function Is_Generic_Instance (Id : E) return B is
2131 return Flag130 (Id);
2132 end Is_Generic_Instance;
2134 function Is_Generic_Type (Id : E) return B is
2136 pragma Assert (Nkind (Id) in N_Entity);
2138 end Is_Generic_Type;
2140 function Is_Hidden (Id : E) return B is
2145 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2148 end Is_Hidden_Non_Overridden_Subpgm;
2150 function Is_Hidden_Open_Scope (Id : E) return B is
2152 return Flag171 (Id);
2153 end Is_Hidden_Open_Scope;
2155 function Is_Ignored_Ghost_Entity (Id : E) return B is
2157 pragma Assert (Nkind (Id) in N_Entity);
2158 return Flag278 (Id);
2159 end Is_Ignored_Ghost_Entity;
2161 function Is_Immediately_Visible (Id : E) return B is
2163 pragma Assert (Nkind (Id) in N_Entity);
2165 end Is_Immediately_Visible;
2167 function Is_Implementation_Defined (Id : E) return B is
2169 return Flag254 (Id);
2170 end Is_Implementation_Defined;
2172 function Is_Imported (Id : E) return B is
2177 function Is_Independent (Id : E) return B is
2179 return Flag268 (Id);
2182 function Is_Inlined (Id : E) return B is
2187 function Is_Inlined_Always (Id : E) return B is
2189 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2191 end Is_Inlined_Always;
2193 function Is_Interface (Id : E) return B is
2195 return Flag186 (Id);
2198 function Is_Instantiated (Id : E) return B is
2200 return Flag126 (Id);
2201 end Is_Instantiated;
2203 function Is_Internal (Id : E) return B is
2205 pragma Assert (Nkind (Id) in N_Entity);
2209 function Is_Interrupt_Handler (Id : E) return B is
2211 pragma Assert (Nkind (Id) in N_Entity);
2213 end Is_Interrupt_Handler;
2215 function Is_Intrinsic_Subprogram (Id : E) return B is
2218 end Is_Intrinsic_Subprogram;
2220 function Is_Invariant_Procedure (Id : E) return B is
2222 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2223 return Flag257 (Id);
2224 end Is_Invariant_Procedure;
2226 function Is_Itype (Id : E) return B is
2231 function Is_Known_Non_Null (Id : E) return B is
2234 end Is_Known_Non_Null;
2236 function Is_Known_Null (Id : E) return B is
2238 return Flag204 (Id);
2241 function Is_Known_Valid (Id : E) return B is
2243 return Flag170 (Id);
2246 function Is_Limited_Composite (Id : E) return B is
2248 return Flag106 (Id);
2249 end Is_Limited_Composite;
2251 function Is_Limited_Interface (Id : E) return B is
2253 return Flag197 (Id);
2254 end Is_Limited_Interface;
2256 function Is_Limited_Record (Id : E) return B is
2259 end Is_Limited_Record;
2261 function Is_Machine_Code_Subprogram (Id : E) return B is
2263 pragma Assert (Is_Subprogram (Id));
2264 return Flag137 (Id);
2265 end Is_Machine_Code_Subprogram;
2267 function Is_Non_Static_Subtype (Id : E) return B is
2269 pragma Assert (Is_Type (Id));
2270 return Flag109 (Id);
2271 end Is_Non_Static_Subtype;
2273 function Is_Null_Init_Proc (Id : E) return B is
2275 pragma Assert (Ekind (Id) = E_Procedure);
2276 return Flag178 (Id);
2277 end Is_Null_Init_Proc;
2279 function Is_Obsolescent (Id : E) return B is
2281 return Flag153 (Id);
2284 function Is_Only_Out_Parameter (Id : E) return B is
2286 pragma Assert (Is_Formal (Id));
2287 return Flag226 (Id);
2288 end Is_Only_Out_Parameter;
2290 function Is_Package_Body_Entity (Id : E) return B is
2292 return Flag160 (Id);
2293 end Is_Package_Body_Entity;
2295 function Is_Packed (Id : E) return B is
2297 return Flag51 (Implementation_Base_Type (Id));
2300 function Is_Packed_Array_Impl_Type (Id : E) return B is
2302 return Flag138 (Id);
2303 end Is_Packed_Array_Impl_Type;
2305 function Is_Potentially_Use_Visible (Id : E) return B is
2307 pragma Assert (Nkind (Id) in N_Entity);
2309 end Is_Potentially_Use_Visible;
2311 function Is_Predicate_Function (Id : E) return B is
2313 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2314 return Flag255 (Id);
2315 end Is_Predicate_Function;
2317 function Is_Predicate_Function_M (Id : E) return B is
2319 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2320 return Flag256 (Id);
2321 end Is_Predicate_Function_M;
2323 function Is_Preelaborated (Id : E) return B is
2326 end Is_Preelaborated;
2328 function Is_Primitive (Id : E) return B is
2331 (Is_Overloadable (Id)
2332 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2333 return Flag218 (Id);
2336 function Is_Primitive_Wrapper (Id : E) return B is
2338 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2339 return Flag195 (Id);
2340 end Is_Primitive_Wrapper;
2342 function Is_Private_Composite (Id : E) return B is
2344 pragma Assert (Is_Type (Id));
2345 return Flag107 (Id);
2346 end Is_Private_Composite;
2348 function Is_Private_Descendant (Id : E) return B is
2351 end Is_Private_Descendant;
2353 function Is_Private_Primitive (Id : E) return B is
2355 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2356 return Flag245 (Id);
2357 end Is_Private_Primitive;
2359 function Is_Processed_Transient (Id : E) return B is
2361 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2362 return Flag252 (Id);
2363 end Is_Processed_Transient;
2365 function Is_Public (Id : E) return B is
2367 pragma Assert (Nkind (Id) in N_Entity);
2371 function Is_Pure (Id : E) return B is
2376 function Is_Pure_Unit_Access_Type (Id : E) return B is
2378 pragma Assert (Is_Access_Type (Id));
2379 return Flag189 (Id);
2380 end Is_Pure_Unit_Access_Type;
2382 function Is_RACW_Stub_Type (Id : E) return B is
2384 pragma Assert (Is_Type (Id));
2385 return Flag244 (Id);
2386 end Is_RACW_Stub_Type;
2388 function Is_Raised (Id : E) return B is
2390 pragma Assert (Ekind (Id) = E_Exception);
2391 return Flag224 (Id);
2394 function Is_Remote_Call_Interface (Id : E) return B is
2397 end Is_Remote_Call_Interface;
2399 function Is_Remote_Types (Id : E) return B is
2402 end Is_Remote_Types;
2404 function Is_Renaming_Of_Object (Id : E) return B is
2406 return Flag112 (Id);
2407 end Is_Renaming_Of_Object;
2409 function Is_Return_Object (Id : E) return B is
2411 return Flag209 (Id);
2412 end Is_Return_Object;
2414 function Is_Safe_To_Reevaluate (Id : E) return B is
2416 return Flag249 (Id);
2417 end Is_Safe_To_Reevaluate;
2419 function Is_Shared_Passive (Id : E) return B is
2422 end Is_Shared_Passive;
2424 function Is_Static_Type (Id : E) return B is
2426 return Flag281 (Id);
2429 function Is_Statically_Allocated (Id : E) return B is
2432 end Is_Statically_Allocated;
2434 function Is_Tag (Id : E) return B is
2436 pragma Assert (Nkind (Id) in N_Entity);
2440 function Is_Tagged_Type (Id : E) return B is
2445 function Is_Thunk (Id : E) return B is
2447 return Flag225 (Id);
2450 function Is_Trivial_Subprogram (Id : E) return B is
2452 return Flag235 (Id);
2453 end Is_Trivial_Subprogram;
2455 function Is_True_Constant (Id : E) return B is
2457 return Flag163 (Id);
2458 end Is_True_Constant;
2460 function Is_Unchecked_Union (Id : E) return B is
2462 return Flag117 (Implementation_Base_Type (Id));
2463 end Is_Unchecked_Union;
2465 function Is_Underlying_Record_View (Id : E) return B is
2467 return Flag246 (Id);
2468 end Is_Underlying_Record_View;
2470 function Is_Unimplemented (Id : E) return B is
2472 return Flag284 (Id);
2473 end Is_Unimplemented;
2475 function Is_Unsigned_Type (Id : E) return B is
2477 pragma Assert (Is_Type (Id));
2478 return Flag144 (Id);
2479 end Is_Unsigned_Type;
2481 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2483 return Flag283 (Id);
2484 end Is_Uplevel_Referenced_Entity;
2486 function Is_Valued_Procedure (Id : E) return B is
2488 pragma Assert (Ekind (Id) = E_Procedure);
2489 return Flag127 (Id);
2490 end Is_Valued_Procedure;
2492 function Is_Visible_Formal (Id : E) return B is
2494 return Flag206 (Id);
2495 end Is_Visible_Formal;
2497 function Is_Visible_Lib_Unit (Id : E) return B is
2499 return Flag116 (Id);
2500 end Is_Visible_Lib_Unit;
2502 function Is_Volatile (Id : E) return B is
2504 pragma Assert (Nkind (Id) in N_Entity);
2506 if Is_Type (Id) then
2507 return Flag16 (Base_Type (Id));
2513 function Itype_Printed (Id : E) return B is
2515 pragma Assert (Is_Itype (Id));
2516 return Flag202 (Id);
2519 function Kill_Elaboration_Checks (Id : E) return B is
2522 end Kill_Elaboration_Checks;
2524 function Kill_Range_Checks (Id : E) return B is
2527 end Kill_Range_Checks;
2529 function Known_To_Have_Preelab_Init (Id : E) return B is
2531 pragma Assert (Is_Type (Id));
2532 return Flag207 (Id);
2533 end Known_To_Have_Preelab_Init;
2535 function Last_Aggregate_Assignment (Id : E) return N is
2537 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2539 end Last_Aggregate_Assignment;
2541 function Last_Assignment (Id : E) return N is
2543 pragma Assert (Is_Assignable (Id));
2545 end Last_Assignment;
2547 function Last_Entity (Id : E) return E is
2552 function Limited_View (Id : E) return E is
2554 pragma Assert (Ekind (Id) = E_Package);
2558 function Linker_Section_Pragma (Id : E) return N is
2561 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2563 end Linker_Section_Pragma;
2565 function Lit_Indexes (Id : E) return E is
2567 pragma Assert (Is_Enumeration_Type (Id));
2571 function Lit_Strings (Id : E) return E is
2573 pragma Assert (Is_Enumeration_Type (Id));
2577 function Low_Bound_Tested (Id : E) return B is
2579 return Flag205 (Id);
2580 end Low_Bound_Tested;
2582 function Machine_Radix_10 (Id : E) return B is
2584 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2586 end Machine_Radix_10;
2588 function Master_Id (Id : E) return E is
2590 pragma Assert (Is_Access_Type (Id));
2594 function Materialize_Entity (Id : E) return B is
2596 return Flag168 (Id);
2597 end Materialize_Entity;
2599 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2601 return Flag262 (Id);
2602 end May_Inherit_Delayed_Rep_Aspects;
2604 function Mechanism (Id : E) return M is
2606 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2607 return UI_To_Int (Uint8 (Id));
2610 function Modulus (Id : E) return Uint is
2612 pragma Assert (Is_Modular_Integer_Type (Id));
2613 return Uint17 (Base_Type (Id));
2616 function Must_Be_On_Byte_Boundary (Id : E) return B is
2618 pragma Assert (Is_Type (Id));
2619 return Flag183 (Id);
2620 end Must_Be_On_Byte_Boundary;
2622 function Must_Have_Preelab_Init (Id : E) return B is
2624 pragma Assert (Is_Type (Id));
2625 return Flag208 (Id);
2626 end Must_Have_Preelab_Init;
2628 function Needs_Debug_Info (Id : E) return B is
2630 return Flag147 (Id);
2631 end Needs_Debug_Info;
2633 function Needs_No_Actuals (Id : E) return B is
2636 (Is_Overloadable (Id)
2637 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2639 end Needs_No_Actuals;
2641 function Never_Set_In_Source (Id : E) return B is
2643 return Flag115 (Id);
2644 end Never_Set_In_Source;
2646 function Next_Inlined_Subprogram (Id : E) return E is
2649 end Next_Inlined_Subprogram;
2651 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2653 pragma Assert (Is_Discrete_Type (Id));
2654 return Flag276 (Id);
2655 end No_Dynamic_Predicate_On_Actual;
2657 function No_Pool_Assigned (Id : E) return B is
2659 pragma Assert (Is_Access_Type (Id));
2660 return Flag131 (Root_Type (Id));
2661 end No_Pool_Assigned;
2663 function No_Predicate_On_Actual (Id : E) return Boolean is
2665 pragma Assert (Is_Discrete_Type (Id));
2666 return Flag275 (Id);
2667 end No_Predicate_On_Actual;
2669 function No_Return (Id : E) return B is
2671 return Flag113 (Id);
2674 function No_Strict_Aliasing (Id : E) return B is
2676 pragma Assert (Is_Access_Type (Id));
2677 return Flag136 (Base_Type (Id));
2678 end No_Strict_Aliasing;
2680 function No_Tagged_Streams_Pragma (Id : E) return N is
2682 pragma Assert (Is_Tagged_Type (Id));
2684 end No_Tagged_Streams_Pragma;
2686 function Non_Binary_Modulus (Id : E) return B is
2688 pragma Assert (Is_Type (Id));
2689 return Flag58 (Base_Type (Id));
2690 end Non_Binary_Modulus;
2692 function Non_Limited_View (Id : E) return E is
2695 (Ekind (Id) in Incomplete_Kind
2697 Ekind (Id) in Class_Wide_Kind
2699 Ekind (Id) = E_Abstract_State);
2701 end Non_Limited_View;
2703 function Nonzero_Is_True (Id : E) return B is
2705 pragma Assert (Root_Type (Id) = Standard_Boolean);
2706 return Flag162 (Base_Type (Id));
2707 end Nonzero_Is_True;
2709 function Normalized_First_Bit (Id : E) return U is
2711 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2713 end Normalized_First_Bit;
2715 function Normalized_Position (Id : E) return U is
2717 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2719 end Normalized_Position;
2721 function Normalized_Position_Max (Id : E) return U is
2723 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2725 end Normalized_Position_Max;
2727 function OK_To_Rename (Id : E) return B is
2729 pragma Assert (Ekind (Id) = E_Variable);
2730 return Flag247 (Id);
2733 function OK_To_Reorder_Components (Id : E) return B is
2735 pragma Assert (Is_Record_Type (Id));
2736 return Flag239 (Base_Type (Id));
2737 end OK_To_Reorder_Components;
2739 function Optimize_Alignment_Space (Id : E) return B is
2742 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2743 return Flag241 (Id);
2744 end Optimize_Alignment_Space;
2746 function Optimize_Alignment_Time (Id : E) return B is
2749 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2750 return Flag242 (Id);
2751 end Optimize_Alignment_Time;
2753 function Original_Access_Type (Id : E) return E is
2755 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2757 end Original_Access_Type;
2759 function Original_Array_Type (Id : E) return E is
2761 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2763 end Original_Array_Type;
2765 function Original_Record_Component (Id : E) return E is
2767 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2769 end Original_Record_Component;
2771 function Overlays_Constant (Id : E) return B is
2773 return Flag243 (Id);
2774 end Overlays_Constant;
2776 function Overridden_Operation (Id : E) return E is
2779 end Overridden_Operation;
2781 function Package_Instantiation (Id : E) return N is
2783 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2785 end Package_Instantiation;
2787 function Packed_Array_Impl_Type (Id : E) return E is
2789 pragma Assert (Is_Array_Type (Id));
2791 end Packed_Array_Impl_Type;
2793 function Parent_Subtype (Id : E) return E is
2795 pragma Assert (Is_Record_Type (Id));
2796 return Node19 (Base_Type (Id));
2799 function Part_Of_Constituents (Id : E) return L is
2801 pragma Assert (Ekind (Id) = E_Abstract_State);
2803 end Part_Of_Constituents;
2805 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2807 pragma Assert (Is_Type (Id));
2808 return Flag280 (Id);
2809 end Partial_View_Has_Unknown_Discr;
2811 function Pending_Access_Types (Id : E) return L is
2813 pragma Assert (Is_Type (Id));
2814 return Elist15 (Id);
2815 end Pending_Access_Types;
2817 function Postconditions_Proc (Id : E) return E is
2819 pragma Assert (Ekind_In (Id, E_Entry,
2824 end Postconditions_Proc;
2826 function PPC_Wrapper (Id : E) return E is
2828 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2832 function Prival (Id : E) return E is
2834 pragma Assert (Is_Protected_Component (Id));
2838 function Prival_Link (Id : E) return E is
2840 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2844 function Private_Dependents (Id : E) return L is
2846 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2847 return Elist18 (Id);
2848 end Private_Dependents;
2850 function Private_View (Id : E) return N is
2852 pragma Assert (Is_Private_Type (Id));
2856 function Protected_Body_Subprogram (Id : E) return E is
2858 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2860 end Protected_Body_Subprogram;
2862 function Protected_Formal (Id : E) return E is
2864 pragma Assert (Is_Formal (Id));
2866 end Protected_Formal;
2868 function Protection_Object (Id : E) return E is
2871 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2873 end Protection_Object;
2875 function Reachable (Id : E) return B is
2880 function Referenced (Id : E) return B is
2882 return Flag156 (Id);
2885 function Referenced_As_LHS (Id : E) return B is
2888 end Referenced_As_LHS;
2890 function Referenced_As_Out_Parameter (Id : E) return B is
2892 return Flag227 (Id);
2893 end Referenced_As_Out_Parameter;
2895 function Refinement_Constituents (Id : E) return L is
2897 pragma Assert (Ekind (Id) = E_Abstract_State);
2899 end Refinement_Constituents;
2901 function Register_Exception_Call (Id : E) return N is
2903 pragma Assert (Ekind (Id) = E_Exception);
2905 end Register_Exception_Call;
2907 function Related_Array_Object (Id : E) return E is
2909 pragma Assert (Is_Array_Type (Id));
2911 end Related_Array_Object;
2913 function Related_Expression (Id : E) return N is
2915 pragma Assert (Ekind (Id) in Type_Kind
2916 or else Ekind_In (Id, E_Constant, E_Variable));
2918 end Related_Expression;
2920 function Related_Instance (Id : E) return E is
2922 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2924 end Related_Instance;
2926 function Related_Type (Id : E) return E is
2928 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2932 function Relative_Deadline_Variable (Id : E) return E is
2934 pragma Assert (Is_Task_Type (Id));
2935 return Node28 (Implementation_Base_Type (Id));
2936 end Relative_Deadline_Variable;
2938 function Renamed_Entity (Id : E) return N is
2943 function Renamed_In_Spec (Id : E) return B is
2945 pragma Assert (Ekind (Id) = E_Package);
2946 return Flag231 (Id);
2947 end Renamed_In_Spec;
2949 function Renamed_Object (Id : E) return N is
2954 function Renaming_Map (Id : E) return U is
2959 function Requires_Overriding (Id : E) return B is
2961 pragma Assert (Is_Overloadable (Id));
2962 return Flag213 (Id);
2963 end Requires_Overriding;
2965 function Return_Present (Id : E) return B is
2970 function Return_Applies_To (Id : E) return N is
2973 end Return_Applies_To;
2975 function Returns_By_Ref (Id : E) return B is
2980 function Returns_Limited_View (Id : E) return B is
2982 pragma Assert (Ekind (Id) = E_Function);
2983 return Flag134 (Id);
2984 end Returns_Limited_View;
2986 function Reverse_Bit_Order (Id : E) return B is
2988 pragma Assert (Is_Record_Type (Id));
2989 return Flag164 (Base_Type (Id));
2990 end Reverse_Bit_Order;
2992 function Reverse_Storage_Order (Id : E) return B is
2994 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2995 return Flag93 (Base_Type (Id));
2996 end Reverse_Storage_Order;
2998 function RM_Size (Id : E) return U is
3000 pragma Assert (Is_Type (Id));
3004 function Scalar_Range (Id : E) return N is
3009 function Scale_Value (Id : E) return U is
3014 function Scope_Depth_Value (Id : E) return U is
3017 end Scope_Depth_Value;
3019 function Sec_Stack_Needed_For_Return (Id : E) return B is
3021 return Flag167 (Id);
3022 end Sec_Stack_Needed_For_Return;
3024 function Shadow_Entities (Id : E) return S is
3026 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3028 end Shadow_Entities;
3030 function Shared_Var_Procs_Instance (Id : E) return E is
3032 pragma Assert (Ekind (Id) = E_Variable);
3034 end Shared_Var_Procs_Instance;
3036 function Size_Check_Code (Id : E) return N is
3038 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3040 end Size_Check_Code;
3042 function Size_Depends_On_Discriminant (Id : E) return B is
3044 return Flag177 (Id);
3045 end Size_Depends_On_Discriminant;
3047 function Size_Known_At_Compile_Time (Id : E) return B is
3050 end Size_Known_At_Compile_Time;
3052 function Small_Value (Id : E) return R is
3054 pragma Assert (Is_Fixed_Point_Type (Id));
3055 return Ureal21 (Id);
3058 function SPARK_Aux_Pragma (Id : E) return N is
3061 (Ekind_In (Id, E_Generic_Package, -- package variants
3065 end SPARK_Aux_Pragma;
3067 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3070 (Ekind_In (Id, E_Generic_Package, -- package variants
3073 return Flag266 (Id);
3074 end SPARK_Aux_Pragma_Inherited;
3076 function SPARK_Pragma (Id : E) return N is
3079 (Ekind_In (Id, E_Function, -- subprogram variants
3081 E_Generic_Procedure,
3085 Ekind_In (Id, E_Generic_Package, -- package variants
3091 function SPARK_Pragma_Inherited (Id : E) return B is
3094 (Ekind_In (Id, E_Function, -- subprogram variants
3096 E_Generic_Procedure,
3100 Ekind_In (Id, E_Generic_Package, -- package variants
3103 return Flag265 (Id);
3104 end SPARK_Pragma_Inherited;
3106 function Spec_Entity (Id : E) return E is
3108 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3112 function SSO_Set_High_By_Default (Id : E) return B is
3114 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3115 return Flag273 (Base_Type (Id));
3116 end SSO_Set_High_By_Default;
3118 function SSO_Set_Low_By_Default (Id : E) return B is
3120 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3121 return Flag272 (Base_Type (Id));
3122 end SSO_Set_Low_By_Default;
3124 function Static_Discrete_Predicate (Id : E) return S is
3126 pragma Assert (Is_Discrete_Type (Id));
3128 end Static_Discrete_Predicate;
3130 function Static_Real_Or_String_Predicate (Id : E) return N is
3132 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3134 end Static_Real_Or_String_Predicate;
3136 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3138 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3140 end Status_Flag_Or_Transient_Decl;
3142 function Storage_Size_Variable (Id : E) return E is
3144 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3145 return Node26 (Implementation_Base_Type (Id));
3146 end Storage_Size_Variable;
3148 function Static_Elaboration_Desired (Id : E) return B is
3150 pragma Assert (Ekind (Id) = E_Package);
3152 end Static_Elaboration_Desired;
3154 function Static_Initialization (Id : E) return N is
3157 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3159 end Static_Initialization;
3161 function Stored_Constraint (Id : E) return L is
3164 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3165 return Elist23 (Id);
3166 end Stored_Constraint;
3168 function Stores_Attribute_Old_Prefix (Id : E) return B is
3170 return Flag270 (Id);
3171 end Stores_Attribute_Old_Prefix;
3173 function Strict_Alignment (Id : E) return B is
3175 return Flag145 (Implementation_Base_Type (Id));
3176 end Strict_Alignment;
3178 function String_Literal_Length (Id : E) return U is
3181 end String_Literal_Length;
3183 function String_Literal_Low_Bound (Id : E) return N is
3186 end String_Literal_Low_Bound;
3188 function Subprograms_For_Type (Id : E) return E is
3190 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3192 end Subprograms_For_Type;
3194 function Subps_Index (Id : E) return U is
3196 pragma Assert (Is_Subprogram (Id));
3200 function Suppress_Elaboration_Warnings (Id : E) return B is
3202 return Flag148 (Id);
3203 end Suppress_Elaboration_Warnings;
3205 function Suppress_Initialization (Id : E) return B is
3207 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3208 return Flag105 (Id);
3209 end Suppress_Initialization;
3211 function Suppress_Style_Checks (Id : E) return B is
3213 return Flag165 (Id);
3214 end Suppress_Style_Checks;
3216 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3218 return Flag217 (Id);
3219 end Suppress_Value_Tracking_On_Call;
3221 function Task_Body_Procedure (Id : E) return N is
3223 pragma Assert (Ekind (Id) in Task_Kind);
3225 end Task_Body_Procedure;
3227 function Thunk_Entity (Id : E) return E is
3229 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3230 and then Is_Thunk (Id));
3234 function Treat_As_Volatile (Id : E) return B is
3237 end Treat_As_Volatile;
3239 function Underlying_Full_View (Id : E) return E is
3241 pragma Assert (Ekind (Id) in Private_Kind);
3243 end Underlying_Full_View;
3245 function Underlying_Record_View (Id : E) return E is
3248 end Underlying_Record_View;
3250 function Universal_Aliasing (Id : E) return B is
3252 pragma Assert (Is_Type (Id));
3253 return Flag216 (Implementation_Base_Type (Id));
3254 end Universal_Aliasing;
3256 function Unset_Reference (Id : E) return N is
3259 end Unset_Reference;
3261 function Used_As_Generic_Actual (Id : E) return B is
3263 return Flag222 (Id);
3264 end Used_As_Generic_Actual;
3266 function Uses_Lock_Free (Id : E) return B is
3268 pragma Assert (Is_Protected_Type (Id));
3269 return Flag188 (Id);
3272 function Uses_Sec_Stack (Id : E) return B is
3277 function Warnings_Off (Id : E) return B is
3282 function Warnings_Off_Used (Id : E) return B is
3284 return Flag236 (Id);
3285 end Warnings_Off_Used;
3287 function Warnings_Off_Used_Unmodified (Id : E) return B is
3289 return Flag237 (Id);
3290 end Warnings_Off_Used_Unmodified;
3292 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3294 return Flag238 (Id);
3295 end Warnings_Off_Used_Unreferenced;
3297 function Wrapped_Entity (Id : E) return E is
3299 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3300 and then Is_Primitive_Wrapper (Id));
3304 function Was_Hidden (Id : E) return B is
3306 return Flag196 (Id);
3309 ------------------------------
3310 -- Classification Functions --
3311 ------------------------------
3313 function Is_Access_Type (Id : E) return B is
3315 return Ekind (Id) in Access_Kind;
3318 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3320 return Ekind (Id) in Access_Protected_Kind;
3321 end Is_Access_Protected_Subprogram_Type;
3323 function Is_Access_Subprogram_Type (Id : E) return B is
3325 return Ekind (Id) in Access_Subprogram_Kind;
3326 end Is_Access_Subprogram_Type;
3328 function Is_Aggregate_Type (Id : E) return B is
3330 return Ekind (Id) in Aggregate_Kind;
3331 end Is_Aggregate_Type;
3333 function Is_Array_Type (Id : E) return B is
3335 return Ekind (Id) in Array_Kind;
3338 function Is_Assignable (Id : E) return B is
3340 return Ekind (Id) in Assignable_Kind;
3343 function Is_Class_Wide_Type (Id : E) return B is
3345 return Ekind (Id) in Class_Wide_Kind;
3346 end Is_Class_Wide_Type;
3348 function Is_Composite_Type (Id : E) return B is
3350 return Ekind (Id) in Composite_Kind;
3351 end Is_Composite_Type;
3353 function Is_Concurrent_Body (Id : E) return B is
3355 return Ekind (Id) in
3356 Concurrent_Body_Kind;
3357 end Is_Concurrent_Body;
3359 function Is_Concurrent_Record_Type (Id : E) return B is
3362 end Is_Concurrent_Record_Type;
3364 function Is_Concurrent_Type (Id : E) return B is
3366 return Ekind (Id) in Concurrent_Kind;
3367 end Is_Concurrent_Type;
3369 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3371 return Ekind (Id) in
3372 Decimal_Fixed_Point_Kind;
3373 end Is_Decimal_Fixed_Point_Type;
3375 function Is_Digits_Type (Id : E) return B is
3377 return Ekind (Id) in Digits_Kind;
3380 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3382 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3383 end Is_Discrete_Or_Fixed_Point_Type;
3385 function Is_Discrete_Type (Id : E) return B is
3387 return Ekind (Id) in Discrete_Kind;
3388 end Is_Discrete_Type;
3390 function Is_Elementary_Type (Id : E) return B is
3392 return Ekind (Id) in Elementary_Kind;
3393 end Is_Elementary_Type;
3395 function Is_Entry (Id : E) return B is
3397 return Ekind (Id) in Entry_Kind;
3400 function Is_Enumeration_Type (Id : E) return B is
3402 return Ekind (Id) in
3404 end Is_Enumeration_Type;
3406 function Is_Fixed_Point_Type (Id : E) return B is
3408 return Ekind (Id) in
3410 end Is_Fixed_Point_Type;
3412 function Is_Floating_Point_Type (Id : E) return B is
3414 return Ekind (Id) in Float_Kind;
3415 end Is_Floating_Point_Type;
3417 function Is_Formal (Id : E) return B is
3419 return Ekind (Id) in Formal_Kind;
3422 function Is_Formal_Object (Id : E) return B is
3424 return Ekind (Id) in Formal_Object_Kind;
3425 end Is_Formal_Object;
3427 function Is_Generic_Subprogram (Id : E) return B is
3429 return Ekind (Id) in Generic_Subprogram_Kind;
3430 end Is_Generic_Subprogram;
3432 function Is_Generic_Unit (Id : E) return B is
3434 return Ekind (Id) in Generic_Unit_Kind;
3435 end Is_Generic_Unit;
3437 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3439 return Ekind (Id) in
3440 Incomplete_Or_Private_Kind;
3441 end Is_Incomplete_Or_Private_Type;
3443 function Is_Incomplete_Type (Id : E) return B is
3445 return Ekind (Id) in
3447 end Is_Incomplete_Type;
3449 function Is_Integer_Type (Id : E) return B is
3451 return Ekind (Id) in Integer_Kind;
3452 end Is_Integer_Type;
3454 function Is_Modular_Integer_Type (Id : E) return B is
3456 return Ekind (Id) in
3457 Modular_Integer_Kind;
3458 end Is_Modular_Integer_Type;
3460 function Is_Named_Number (Id : E) return B is
3462 return Ekind (Id) in Named_Kind;
3463 end Is_Named_Number;
3465 function Is_Numeric_Type (Id : E) return B is
3467 return Ekind (Id) in Numeric_Kind;
3468 end Is_Numeric_Type;
3470 function Is_Object (Id : E) return B is
3472 return Ekind (Id) in Object_Kind;
3475 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3477 return Ekind (Id) in
3478 Ordinary_Fixed_Point_Kind;
3479 end Is_Ordinary_Fixed_Point_Type;
3481 function Is_Overloadable (Id : E) return B is
3483 return Ekind (Id) in Overloadable_Kind;
3484 end Is_Overloadable;
3486 function Is_Private_Type (Id : E) return B is
3488 return Ekind (Id) in Private_Kind;
3489 end Is_Private_Type;
3491 function Is_Protected_Type (Id : E) return B is
3493 return Ekind (Id) in Protected_Kind;
3494 end Is_Protected_Type;
3496 function Is_Real_Type (Id : E) return B is
3498 return Ekind (Id) in Real_Kind;
3501 function Is_Record_Type (Id : E) return B is
3503 return Ekind (Id) in Record_Kind;
3506 function Is_Scalar_Type (Id : E) return B is
3508 return Ekind (Id) in Scalar_Kind;
3511 function Is_Signed_Integer_Type (Id : E) return B is
3513 return Ekind (Id) in Signed_Integer_Kind;
3514 end Is_Signed_Integer_Type;
3516 function Is_Subprogram (Id : E) return B is
3518 return Ekind (Id) in Subprogram_Kind;
3521 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3523 return Ekind (Id) in Subprogram_Kind
3525 Ekind (Id) in Generic_Subprogram_Kind;
3526 end Is_Subprogram_Or_Generic_Subprogram;
3528 function Is_Task_Type (Id : E) return B is
3530 return Ekind (Id) in Task_Kind;
3533 function Is_Type (Id : E) return B is
3535 return Ekind (Id) in Type_Kind;
3538 ------------------------------
3539 -- Attribute Set Procedures --
3540 ------------------------------
3542 -- Note: in many of these set procedures an "obvious" assertion is missing.
3543 -- The reason for this is that in many cases, a field is set before the
3544 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3545 -- it is possible to add assertions that specifically include the E_Void
3546 -- possibility, but in some cases, we just omit the assertions.
3548 procedure Set_Abstract_States (Id : E; V : L) is
3550 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3551 Set_Elist25 (Id, V);
3552 end Set_Abstract_States;
3554 procedure Set_Accept_Address (Id : E; V : L) is
3556 Set_Elist21 (Id, V);
3557 end Set_Accept_Address;
3559 procedure Set_Access_Disp_Table (Id : E; V : L) is
3561 pragma Assert (Ekind (Id) = E_Record_Type
3562 and then Id = Implementation_Base_Type (Id));
3563 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3564 Set_Elist16 (Id, V);
3565 end Set_Access_Disp_Table;
3567 procedure Set_Associated_Entity (Id : E; V : E) is
3570 end Set_Associated_Entity;
3572 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3575 end Set_Associated_Formal_Package;
3577 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3580 end Set_Associated_Node_For_Itype;
3582 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3584 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3586 end Set_Associated_Storage_Pool;
3588 procedure Set_Activation_Record_Component (Id : E; V : E) is
3590 pragma Assert (Ekind_In (Id, E_Constant,
3597 end Set_Activation_Record_Component;
3599 procedure Set_Actual_Subtype (Id : E; V : E) is
3602 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3603 or else Is_Formal (Id));
3605 end Set_Actual_Subtype;
3607 procedure Set_Address_Taken (Id : E; V : B := True) is
3609 Set_Flag104 (Id, V);
3610 end Set_Address_Taken;
3612 procedure Set_Alias (Id : E; V : E) is
3615 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3619 procedure Set_Alignment (Id : E; V : U) is
3621 pragma Assert (Is_Type (Id)
3622 or else Is_Formal (Id)
3623 or else Ekind_In (Id, E_Loop_Parameter,
3630 procedure Set_Barrier_Function (Id : E; V : N) is
3632 pragma Assert (Is_Entry (Id));
3634 end Set_Barrier_Function;
3636 procedure Set_Block_Node (Id : E; V : N) is
3638 pragma Assert (Ekind (Id) = E_Block);
3642 procedure Set_Body_Entity (Id : E; V : E) is
3644 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3646 end Set_Body_Entity;
3648 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3651 (Ekind (Id) = E_Package
3652 or else Is_Subprogram (Id)
3653 or else Is_Generic_Unit (Id));
3655 end Set_Body_Needed_For_SAL;
3657 procedure Set_Body_References (Id : E; V : L) is
3659 pragma Assert (Ekind (Id) = E_Abstract_State);
3660 Set_Elist16 (Id, V);
3661 end Set_Body_References;
3663 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3665 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3667 end Set_BIP_Initialization_Call;
3669 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3671 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3672 Set_Flag125 (Id, V);
3673 end Set_C_Pass_By_Copy;
3675 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3678 end Set_Can_Never_Be_Null;
3680 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3683 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3684 Set_Flag229 (Id, V);
3685 end Set_Can_Use_Internal_Rep;
3687 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3690 end Set_Checks_May_Be_Suppressed;
3692 procedure Set_Class_Wide_Type (Id : E; V : E) is
3694 pragma Assert (Is_Type (Id));
3696 end Set_Class_Wide_Type;
3698 procedure Set_Cloned_Subtype (Id : E; V : E) is
3700 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3702 end Set_Cloned_Subtype;
3704 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3706 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3708 end Set_Component_Bit_Offset;
3710 procedure Set_Component_Clause (Id : E; V : N) is
3712 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3714 end Set_Component_Clause;
3716 procedure Set_Component_Size (Id : E; V : U) is
3718 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3720 end Set_Component_Size;
3722 procedure Set_Component_Type (Id : E; V : E) is
3724 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3726 end Set_Component_Type;
3728 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3731 (Ekind_In (Id, E_Block,
3735 E_Generic_Procedure,
3739 E_Subprogram_Body));
3740 Set_Flag279 (Id, V);
3741 end Set_Contains_Ignored_Ghost_Code;
3743 procedure Set_Contract (Id : E; V : N) is
3746 (Ekind_In (Id, E_Entry,
3754 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3758 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3761 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3763 end Set_Corresponding_Concurrent_Type;
3765 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3767 pragma Assert (Ekind (Id) = E_Discriminant);
3769 end Set_Corresponding_Discriminant;
3771 procedure Set_Corresponding_Equality (Id : E; V : E) is
3774 (Ekind (Id) = E_Function
3775 and then not Comes_From_Source (Id)
3776 and then Chars (Id) = Name_Op_Ne);
3778 end Set_Corresponding_Equality;
3780 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3782 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3784 end Set_Corresponding_Protected_Entry;
3786 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3788 pragma Assert (Is_Concurrent_Type (Id));
3790 end Set_Corresponding_Record_Type;
3792 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3795 end Set_Corresponding_Remote_Type;
3797 procedure Set_Current_Use_Clause (Id : E; V : E) is
3799 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3801 end Set_Current_Use_Clause;
3803 procedure Set_Current_Value (Id : E; V : N) is
3805 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3807 end Set_Current_Value;
3809 procedure Set_CR_Discriminant (Id : E; V : E) is
3812 end Set_CR_Discriminant;
3814 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3816 Set_Flag166 (Id, V);
3817 end Set_Debug_Info_Off;
3819 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3822 end Set_Debug_Renaming_Link;
3824 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3826 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3828 end Set_Default_Aspect_Component_Value;
3830 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3832 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3834 end Set_Default_Aspect_Value;
3836 procedure Set_Default_Expr_Function (Id : E; V : E) is
3838 pragma Assert (Is_Formal (Id));
3840 end Set_Default_Expr_Function;
3842 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3844 Set_Flag108 (Id, V);
3845 end Set_Default_Expressions_Processed;
3847 procedure Set_Default_Value (Id : E; V : N) is
3849 pragma Assert (Is_Formal (Id));
3851 end Set_Default_Value;
3853 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3857 or else Is_Task_Type (Id)
3858 or else Ekind (Id) = E_Block);
3859 Set_Flag114 (Id, V);
3860 end Set_Delay_Cleanups;
3862 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3865 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3868 end Set_Delay_Subprogram_Descriptors;
3870 procedure Set_Delta_Value (Id : E; V : R) is
3872 pragma Assert (Is_Fixed_Point_Type (Id));
3873 Set_Ureal18 (Id, V);
3874 end Set_Delta_Value;
3876 procedure Set_Dependent_Instances (Id : E; V : L) is
3878 pragma Assert (Is_Generic_Instance (Id));
3880 end Set_Dependent_Instances;
3882 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3884 pragma Assert (Nkind (Id) in N_Entity);
3886 end Set_Depends_On_Private;
3888 procedure Set_Derived_Type_Link (Id : E; V : E) is
3890 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3892 end Set_Derived_Type_Link;
3894 procedure Set_Digits_Value (Id : E; V : U) is
3897 (Is_Floating_Point_Type (Id)
3898 or else Is_Decimal_Fixed_Point_Type (Id));
3900 end Set_Digits_Value;
3902 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3905 end Set_Directly_Designated_Type;
3907 procedure Set_Discard_Names (Id : E; V : B := True) is
3910 end Set_Discard_Names;
3912 procedure Set_Discriminal (Id : E; V : E) is
3914 pragma Assert (Ekind (Id) = E_Discriminant);
3916 end Set_Discriminal;
3918 procedure Set_Discriminal_Link (Id : E; V : E) is
3921 end Set_Discriminal_Link;
3923 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3925 pragma Assert (Ekind (Id) = E_Component);
3927 end Set_Discriminant_Checking_Func;
3929 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3931 pragma Assert (Nkind (Id) in N_Entity);
3932 Set_Elist21 (Id, V);
3933 end Set_Discriminant_Constraint;
3935 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3938 end Set_Discriminant_Default_Value;
3940 procedure Set_Discriminant_Number (Id : E; V : U) is
3943 end Set_Discriminant_Number;
3945 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3947 pragma Assert (Ekind (Id) = E_Record_Type
3948 and then Id = Implementation_Base_Type (Id));
3949 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3950 Set_Elist26 (Id, V);
3951 end Set_Dispatch_Table_Wrappers;
3953 procedure Set_DT_Entry_Count (Id : E; V : U) is
3955 pragma Assert (Ekind (Id) = E_Component);
3957 end Set_DT_Entry_Count;
3959 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3961 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3963 end Set_DT_Offset_To_Top_Func;
3965 procedure Set_DT_Position (Id : E; V : U) is
3967 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3969 end Set_DT_Position;
3971 procedure Set_DTC_Entity (Id : E; V : E) is
3973 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3977 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3979 pragma Assert (Ekind (Id) = E_Package);
3980 Set_Flag210 (Id, V);
3981 end Set_Elaborate_Body_Desirable;
3983 procedure Set_Elaboration_Entity (Id : E; V : E) is
3988 Ekind (Id) = E_Package
3990 Is_Generic_Unit (Id));
3992 end Set_Elaboration_Entity;
3994 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3999 Ekind (Id) = E_Package
4001 Is_Generic_Unit (Id));
4002 Set_Flag174 (Id, V);
4003 end Set_Elaboration_Entity_Required;
4005 procedure Set_Encapsulating_State (Id : E; V : E) is
4007 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4009 end Set_Encapsulating_State;
4011 procedure Set_Enclosing_Scope (Id : E; V : E) is
4014 end Set_Enclosing_Scope;
4016 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4018 pragma Assert (Is_Entry (Id));
4019 Set_Flag152 (Id, V);
4020 end Set_Entry_Accepted;
4022 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4025 end Set_Entry_Bodies_Array;
4027 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4030 end Set_Entry_Cancel_Parameter;
4032 procedure Set_Entry_Component (Id : E; V : E) is
4035 end Set_Entry_Component;
4037 procedure Set_Entry_Formal (Id : E; V : E) is
4040 end Set_Entry_Formal;
4042 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4044 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4046 end Set_Entry_Index_Constant;
4048 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4051 end Set_Entry_Parameters_Type;
4053 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4055 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4057 end Set_Enum_Pos_To_Rep;
4059 procedure Set_Enumeration_Pos (Id : E; V : U) is
4061 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4063 end Set_Enumeration_Pos;
4065 procedure Set_Enumeration_Rep (Id : E; V : U) is
4067 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4069 end Set_Enumeration_Rep;
4071 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4073 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4075 end Set_Enumeration_Rep_Expr;
4077 procedure Set_Equivalent_Type (Id : E; V : E) is
4080 (Ekind_In (Id, E_Class_Wide_Type,
4081 E_Class_Wide_Subtype,
4082 E_Access_Protected_Subprogram_Type,
4083 E_Anonymous_Access_Protected_Subprogram_Type,
4084 E_Access_Subprogram_Type,
4087 end Set_Equivalent_Type;
4089 procedure Set_Esize (Id : E; V : U) is
4094 procedure Set_Extra_Accessibility (Id : E; V : E) is
4097 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4099 end Set_Extra_Accessibility;
4101 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4103 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4105 end Set_Extra_Accessibility_Of_Result;
4107 procedure Set_Extra_Constrained (Id : E; V : E) is
4109 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4111 end Set_Extra_Constrained;
4113 procedure Set_Extra_Formal (Id : E; V : E) is
4116 end Set_Extra_Formal;
4118 procedure Set_Extra_Formals (Id : E; V : E) is
4121 (Is_Overloadable (Id)
4122 or else Ekind_In (Id, E_Entry_Family,
4124 E_Subprogram_Type));
4126 end Set_Extra_Formals;
4128 procedure Set_Finalization_Master (Id : E; V : E) is
4130 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4132 end Set_Finalization_Master;
4134 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4136 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4137 Set_Flag158 (Id, V);
4138 end Set_Finalize_Storage_Only;
4140 procedure Set_Finalizer (Id : E; V : E) is
4142 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4146 procedure Set_First_Entity (Id : E; V : E) is
4149 end Set_First_Entity;
4151 procedure Set_First_Exit_Statement (Id : E; V : N) is
4153 pragma Assert (Ekind (Id) = E_Loop);
4155 end Set_First_Exit_Statement;
4157 procedure Set_First_Index (Id : E; V : N) is
4159 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4161 end Set_First_Index;
4163 procedure Set_First_Literal (Id : E; V : E) is
4165 pragma Assert (Is_Enumeration_Type (Id));
4167 end Set_First_Literal;
4169 procedure Set_First_Private_Entity (Id : E; V : E) is
4171 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4172 or else Ekind (Id) in Concurrent_Kind);
4174 end Set_First_Private_Entity;
4176 procedure Set_First_Rep_Item (Id : E; V : N) is
4179 end Set_First_Rep_Item;
4181 procedure Set_Float_Rep (Id : E; V : F) is
4182 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4184 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4187 procedure Set_Freeze_Node (Id : E; V : N) is
4190 end Set_Freeze_Node;
4192 procedure Set_From_Limited_With (Id : E; V : B := True) is
4195 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4196 Set_Flag159 (Id, V);
4197 end Set_From_Limited_With;
4199 procedure Set_Full_View (Id : E; V : E) is
4201 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4205 procedure Set_Generic_Homonym (Id : E; V : E) is
4208 end Set_Generic_Homonym;
4210 procedure Set_Generic_Renamings (Id : E; V : L) is
4212 Set_Elist23 (Id, V);
4213 end Set_Generic_Renamings;
4215 procedure Set_Handler_Records (Id : E; V : S) is
4218 end Set_Handler_Records;
4220 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4222 pragma Assert (Id = Base_Type (Id));
4223 Set_Flag135 (Id, V);
4224 end Set_Has_Aliased_Components;
4226 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4229 end Set_Has_Alignment_Clause;
4231 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4234 end Set_Has_All_Calls_Remote;
4236 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4239 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4240 Set_Flag253 (Id, V);
4241 end Set_Has_Anonymous_Master;
4243 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4245 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4247 end Set_Has_Atomic_Components;
4249 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4252 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4253 Set_Flag139 (Id, V);
4254 end Set_Has_Biased_Representation;
4256 procedure Set_Has_Completion (Id : E; V : B := True) is
4259 end Set_Has_Completion;
4261 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4263 pragma Assert (Is_Type (Id));
4265 end Set_Has_Completion_In_Body;
4267 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4269 pragma Assert (Ekind (Id) = E_Record_Type);
4270 Set_Flag140 (Id, V);
4271 end Set_Has_Complex_Representation;
4273 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4275 pragma Assert (Ekind (Id) = E_Array_Type);
4277 end Set_Has_Component_Size_Clause;
4279 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4281 pragma Assert (Is_Type (Id));
4282 Set_Flag187 (Id, V);
4283 end Set_Has_Constrained_Partial_View;
4285 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4287 Set_Flag181 (Id, V);
4288 end Set_Has_Contiguous_Rep;
4290 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4292 pragma Assert (Id = Base_Type (Id));
4294 end Set_Has_Controlled_Component;
4296 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4299 end Set_Has_Controlling_Result;
4301 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4303 Set_Flag119 (Id, V);
4304 end Set_Has_Convention_Pragma;
4306 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4309 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4310 and then Is_Base_Type (Id));
4312 end Set_Has_Default_Aspect;
4314 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4316 pragma Assert (Is_Type (Id));
4318 end Set_Has_Default_Init_Cond;
4320 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4322 pragma Assert (Nkind (Id) in N_Entity);
4323 Set_Flag200 (Id, V);
4324 end Set_Has_Delayed_Aspects;
4326 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4328 pragma Assert (Nkind (Id) in N_Entity);
4330 end Set_Has_Delayed_Freeze;
4332 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4334 pragma Assert (Nkind (Id) in N_Entity);
4335 Set_Flag261 (Id, V);
4336 end Set_Has_Delayed_Rep_Aspects;
4338 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4340 pragma Assert (Nkind (Id) in N_Entity);
4342 end Set_Has_Discriminants;
4344 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4346 pragma Assert (Ekind (Id) = E_Record_Type
4347 and then Is_Tagged_Type (Id));
4348 Set_Flag220 (Id, V);
4349 end Set_Has_Dispatch_Table;
4351 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4353 pragma Assert (Is_Type (Id));
4354 Set_Flag258 (Id, V);
4355 end Set_Has_Dynamic_Predicate_Aspect;
4357 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4359 pragma Assert (Is_Enumeration_Type (Id));
4361 end Set_Has_Enumeration_Rep_Clause;
4363 procedure Set_Has_Exit (Id : E; V : B := True) is
4368 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4370 pragma Assert (Ekind_In (Id, E_Entry,
4374 Set_Flag240 (Id, V);
4375 end Set_Has_Expanded_Contract;
4377 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4379 Set_Flag175 (Id, V);
4380 end Set_Has_Forward_Instantiation;
4382 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4384 Set_Flag173 (Id, V);
4385 end Set_Has_Fully_Qualified_Name;
4387 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4390 end Set_Has_Gigi_Rep_Item;
4392 procedure Set_Has_Homonym (Id : E; V : B := True) is
4395 end Set_Has_Homonym;
4397 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4399 Set_Flag251 (Id, V);
4400 end Set_Has_Implicit_Dereference;
4402 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4404 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4406 end Set_Has_Independent_Components;
4408 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4410 pragma Assert (Is_Type (Id));
4411 Set_Flag248 (Id, V);
4412 end Set_Has_Inheritable_Invariants;
4414 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4416 pragma Assert (Is_Type (Id));
4417 Set_Flag133 (Id, V);
4418 end Set_Has_Inherited_Default_Init_Cond;
4420 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4422 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4423 Set_Flag219 (Id, V);
4424 end Set_Has_Initial_Value;
4426 procedure Set_Has_Invariants (Id : E; V : B := True) is
4428 pragma Assert (Is_Type (Id));
4429 Set_Flag232 (Id, V);
4430 end Set_Has_Invariants;
4432 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4434 pragma Assert (Ekind (Id) = E_Loop);
4435 Set_Flag260 (Id, V);
4436 end Set_Has_Loop_Entry_Attributes;
4438 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4440 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4442 end Set_Has_Machine_Radix_Clause;
4444 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4447 end Set_Has_Master_Entity;
4449 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4451 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4452 Set_Flag142 (Id, V);
4453 end Set_Has_Missing_Return;
4455 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4457 Set_Flag101 (Id, V);
4458 end Set_Has_Nested_Block_With_Handler;
4460 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4462 pragma Assert (Is_Subprogram (Id));
4463 Set_Flag282 (Id, V);
4464 end Set_Has_Nested_Subprogram;
4466 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4468 pragma Assert (Id = Base_Type (Id));
4470 end Set_Has_Non_Standard_Rep;
4472 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4474 pragma Assert (Is_Type (Id));
4475 Set_Flag172 (Id, V);
4476 end Set_Has_Object_Size_Clause;
4478 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4480 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4481 Set_Flag110 (Id, V);
4482 end Set_Has_Out_Or_In_Out_Parameter;
4484 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4486 Set_Flag154 (Id, V);
4487 end Set_Has_Per_Object_Constraint;
4489 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4491 pragma Assert (Is_Access_Type (Id));
4492 Set_Flag27 (Base_Type (Id), V);
4493 end Set_Has_Pragma_Controlled;
4495 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4497 Set_Flag150 (Id, V);
4498 end Set_Has_Pragma_Elaborate_Body;
4500 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4502 Set_Flag157 (Id, V);
4503 end Set_Has_Pragma_Inline;
4505 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4507 Set_Flag230 (Id, V);
4508 end Set_Has_Pragma_Inline_Always;
4510 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4512 Set_Flag201 (Id, V);
4513 end Set_Has_Pragma_No_Inline;
4515 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4517 pragma Assert (Is_Enumeration_Type (Id));
4518 pragma Assert (Id = Base_Type (Id));
4519 Set_Flag198 (Id, V);
4520 end Set_Has_Pragma_Ordered;
4522 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4524 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4525 pragma Assert (Id = Base_Type (Id));
4526 Set_Flag121 (Id, V);
4527 end Set_Has_Pragma_Pack;
4529 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4531 Set_Flag221 (Id, V);
4532 end Set_Has_Pragma_Preelab_Init;
4534 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4536 Set_Flag203 (Id, V);
4537 end Set_Has_Pragma_Pure;
4539 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4541 Set_Flag179 (Id, V);
4542 end Set_Has_Pragma_Pure_Function;
4544 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4546 Set_Flag169 (Id, V);
4547 end Set_Has_Pragma_Thread_Local_Storage;
4549 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4551 Set_Flag233 (Id, V);
4552 end Set_Has_Pragma_Unmodified;
4554 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4556 Set_Flag180 (Id, V);
4557 end Set_Has_Pragma_Unreferenced;
4559 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4561 pragma Assert (Is_Type (Id));
4562 Set_Flag212 (Id, V);
4563 end Set_Has_Pragma_Unreferenced_Objects;
4565 procedure Set_Has_Predicates (Id : E; V : B := True) is
4567 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4568 Set_Flag250 (Id, V);
4569 end Set_Has_Predicates;
4571 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4573 pragma Assert (Id = Base_Type (Id));
4574 Set_Flag120 (Id, V);
4575 end Set_Has_Primitive_Operations;
4577 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4579 pragma Assert (Is_Type (Id));
4580 Set_Flag151 (Id, V);
4581 end Set_Has_Private_Ancestor;
4583 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4585 Set_Flag155 (Id, V);
4586 end Set_Has_Private_Declaration;
4588 procedure Set_Has_Protected (Id : E; V : B := True) is
4590 Set_Flag271 (Id, V);
4591 end Set_Has_Protected;
4593 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4595 Set_Flag161 (Id, V);
4596 end Set_Has_Qualified_Name;
4598 procedure Set_Has_RACW (Id : E; V : B := True) is
4600 pragma Assert (Ekind (Id) = E_Package);
4601 Set_Flag214 (Id, V);
4604 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4606 pragma Assert (Id = Base_Type (Id));
4608 end Set_Has_Record_Rep_Clause;
4610 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4612 pragma Assert (Is_Subprogram (Id));
4613 Set_Flag143 (Id, V);
4614 end Set_Has_Recursive_Call;
4616 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4618 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4619 Set_Flag267 (Id, V);
4620 end Set_Has_Shift_Operator;
4622 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4625 end Set_Has_Size_Clause;
4627 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4630 end Set_Has_Small_Clause;
4632 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4634 pragma Assert (Id = Base_Type (Id));
4635 Set_Flag100 (Id, V);
4636 end Set_Has_Specified_Layout;
4638 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4640 pragma Assert (Is_Type (Id));
4641 Set_Flag190 (Id, V);
4642 end Set_Has_Specified_Stream_Input;
4644 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4646 pragma Assert (Is_Type (Id));
4647 Set_Flag191 (Id, V);
4648 end Set_Has_Specified_Stream_Output;
4650 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4652 pragma Assert (Is_Type (Id));
4653 Set_Flag192 (Id, V);
4654 end Set_Has_Specified_Stream_Read;
4656 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4658 pragma Assert (Is_Type (Id));
4659 Set_Flag193 (Id, V);
4660 end Set_Has_Specified_Stream_Write;
4662 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4664 Set_Flag211 (Id, V);
4665 end Set_Has_Static_Discriminants;
4667 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4669 pragma Assert (Is_Type (Id));
4670 Set_Flag269 (Id, V);
4671 end Set_Has_Static_Predicate;
4673 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4675 pragma Assert (Is_Type (Id));
4676 Set_Flag259 (Id, V);
4677 end Set_Has_Static_Predicate_Aspect;
4679 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4681 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4682 pragma Assert (Id = Base_Type (Id));
4684 end Set_Has_Storage_Size_Clause;
4686 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4688 pragma Assert (Is_Elementary_Type (Id));
4689 Set_Flag184 (Id, V);
4690 end Set_Has_Stream_Size_Clause;
4692 procedure Set_Has_Task (Id : E; V : B := True) is
4694 pragma Assert (Id = Base_Type (Id));
4698 procedure Set_Has_Thunks (Id : E; V : B := True) is
4700 pragma Assert (Is_Tag (Id));
4701 Set_Flag228 (Id, V);
4704 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4706 pragma Assert (Id = Base_Type (Id));
4707 Set_Flag123 (Id, V);
4708 end Set_Has_Unchecked_Union;
4710 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4712 pragma Assert (Is_Type (Id));
4714 end Set_Has_Unknown_Discriminants;
4716 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4718 Set_Flag215 (Id, V);
4719 end Set_Has_Uplevel_Reference;
4721 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4723 pragma Assert (Ekind (Id) = E_Abstract_State);
4724 Set_Flag263 (Id, V);
4725 end Set_Has_Visible_Refinement;
4727 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4729 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4731 end Set_Has_Volatile_Components;
4733 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4735 Set_Flag182 (Id, V);
4736 end Set_Has_Xref_Entry;
4738 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4740 pragma Assert (Ekind (Id) = E_Variable);
4742 end Set_Hiding_Loop_Variable;
4744 procedure Set_Homonym (Id : E; V : E) is
4746 pragma Assert (Id /= V);
4750 procedure Set_Import_Pragma (Id : E; V : E) is
4752 pragma Assert (Is_Subprogram (Id));
4754 end Set_Import_Pragma;
4756 procedure Set_Interface_Alias (Id : E; V : E) is
4760 and then Is_Hidden (Id)
4761 and then (Ekind_In (Id, E_Procedure, E_Function)));
4763 end Set_Interface_Alias;
4765 procedure Set_Interfaces (Id : E; V : L) is
4767 pragma Assert (Is_Record_Type (Id));
4768 Set_Elist25 (Id, V);
4771 procedure Set_In_Package_Body (Id : E; V : B := True) is
4774 end Set_In_Package_Body;
4776 procedure Set_In_Private_Part (Id : E; V : B := True) is
4779 end Set_In_Private_Part;
4781 procedure Set_In_Use (Id : E; V : B := True) is
4783 pragma Assert (Nkind (Id) in N_Entity);
4787 procedure Set_Initialization_Statements (Id : E; V : N) is
4789 -- Tolerate an E_Void entity since this can be called while resolving
4790 -- an aggregate used as the initialization expression for an object
4791 -- declaration, and this occurs before the Ekind for the object is set.
4793 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4795 end Set_Initialization_Statements;
4797 procedure Set_Inner_Instances (Id : E; V : L) is
4799 Set_Elist23 (Id, V);
4800 end Set_Inner_Instances;
4802 procedure Set_Interface_Name (Id : E; V : N) is
4805 end Set_Interface_Name;
4807 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4809 pragma Assert (Is_Overloadable (Id));
4811 end Set_Is_Abstract_Subprogram;
4813 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4815 pragma Assert (Is_Type (Id));
4816 Set_Flag146 (Id, V);
4817 end Set_Is_Abstract_Type;
4819 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4821 pragma Assert (Is_Access_Type (Id));
4822 Set_Flag194 (Id, V);
4823 end Set_Is_Local_Anonymous_Access;
4825 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4827 pragma Assert (Is_Access_Type (Id));
4829 end Set_Is_Access_Constant;
4831 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4833 Set_Flag185 (Id, V);
4834 end Set_Is_Ada_2005_Only;
4836 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4838 Set_Flag199 (Id, V);
4839 end Set_Is_Ada_2012_Only;
4841 procedure Set_Is_Aliased (Id : E; V : B := True) is
4843 pragma Assert (Nkind (Id) in N_Entity);
4847 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4850 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4852 end Set_Is_Asynchronous;
4854 procedure Set_Is_Atomic (Id : E; V : B := True) is
4859 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4861 pragma Assert ((not V)
4862 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4863 Set_Flag122 (Id, V);
4864 end Set_Is_Bit_Packed_Array;
4866 procedure Set_Is_Called (Id : E; V : B := True) is
4868 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4869 Set_Flag102 (Id, V);
4872 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4875 end Set_Is_Character_Type;
4877 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4879 pragma Assert (Is_Formal (Id)
4880 or else Is_Object (Id)
4881 or else Is_Package_Or_Generic_Package (Id)
4882 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4883 or else Is_Type (Id)
4884 or else Ekind (Id) = E_Abstract_State
4885 or else Ekind (Id) = E_Component
4886 or else Ekind (Id) = E_Discriminant
4887 or else Ekind (Id) = E_Exception
4888 or else Ekind (Id) = E_Package_Body
4889 or else Ekind (Id) = E_Subprogram_Body
4891 -- Allow this attribute to appear on non-analyzed entities
4893 or else Ekind (Id) = E_Void);
4894 Set_Flag277 (Id, V);
4895 end Set_Is_Checked_Ghost_Entity;
4897 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4900 end Set_Is_Child_Unit;
4902 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4905 end Set_Is_Class_Wide_Equivalent_Type;
4907 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4909 Set_Flag149 (Id, V);
4910 end Set_Is_Compilation_Unit;
4912 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4914 pragma Assert (Ekind (Id) = E_Discriminant);
4915 Set_Flag103 (Id, V);
4916 end Set_Is_Completely_Hidden;
4918 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4921 end Set_Is_Concurrent_Record_Type;
4923 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4926 end Set_Is_Constr_Subt_For_U_Nominal;
4928 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4930 Set_Flag141 (Id, V);
4931 end Set_Is_Constr_Subt_For_UN_Aliased;
4933 procedure Set_Is_Constrained (Id : E; V : B := True) is
4935 pragma Assert (Nkind (Id) in N_Entity);
4937 end Set_Is_Constrained;
4939 procedure Set_Is_Constructor (Id : E; V : B := True) is
4942 end Set_Is_Constructor;
4944 procedure Set_Is_Controlled (Id : E; V : B := True) is
4946 pragma Assert (Id = Base_Type (Id));
4948 end Set_Is_Controlled;
4950 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4952 pragma Assert (Is_Formal (Id));
4954 end Set_Is_Controlling_Formal;
4956 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4959 end Set_Is_CPP_Class;
4961 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4963 pragma Assert (Ekind (Id) = E_Procedure);
4964 Set_Flag132 (Id, V);
4965 end Set_Is_Default_Init_Cond_Procedure;
4967 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4969 pragma Assert (Is_Type (Id));
4970 Set_Flag223 (Id, V);
4971 end Set_Is_Descendent_Of_Address;
4973 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4975 Set_Flag176 (Id, V);
4976 end Set_Is_Discrim_SO_Function;
4978 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4980 Set_Flag264 (Id, V);
4981 end Set_Is_Discriminant_Check_Function;
4983 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4985 Set_Flag234 (Id, V);
4986 end Set_Is_Dispatch_Table_Entity;
4988 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4993 Is_Overloadable (Id)
4995 Ekind (Id) = E_Subprogram_Type);
4998 end Set_Is_Dispatching_Operation;
5000 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5002 Set_Flag124 (Id, V);
5003 end Set_Is_Eliminated;
5005 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5008 end Set_Is_Entry_Formal;
5010 procedure Set_Is_Exported (Id : E; V : B := True) is
5013 end Set_Is_Exported;
5015 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5018 end Set_Is_First_Subtype;
5020 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5022 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5023 Set_Flag118 (Id, V);
5024 end Set_Is_For_Access_Subtype;
5026 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5028 Set_Flag111 (Id, V);
5029 end Set_Is_Formal_Subprogram;
5031 procedure Set_Is_Frozen (Id : E; V : B := True) is
5033 pragma Assert (Nkind (Id) in N_Entity);
5037 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5039 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5040 Set_Flag274 (Id, V);
5041 end Set_Is_Generic_Actual_Subprogram;
5043 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5045 pragma Assert (Is_Type (Id));
5047 end Set_Is_Generic_Actual_Type;
5049 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5051 Set_Flag130 (Id, V);
5052 end Set_Is_Generic_Instance;
5054 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5056 pragma Assert (Nkind (Id) in N_Entity);
5058 end Set_Is_Generic_Type;
5060 procedure Set_Is_Hidden (Id : E; V : B := True) is
5065 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5067 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5069 end Set_Is_Hidden_Non_Overridden_Subpgm;
5071 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5073 Set_Flag171 (Id, V);
5074 end Set_Is_Hidden_Open_Scope;
5076 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5078 pragma Assert (Is_Formal (Id)
5079 or else Is_Object (Id)
5080 or else Is_Package_Or_Generic_Package (Id)
5081 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5082 or else Is_Type (Id)
5083 or else Ekind (Id) = E_Abstract_State
5084 or else Ekind (Id) = E_Component
5085 or else Ekind (Id) = E_Discriminant
5086 or else Ekind (Id) = E_Exception
5087 or else Ekind (Id) = E_Package_Body
5088 or else Ekind (Id) = E_Subprogram_Body
5090 -- Allow this attribute to appear on non-analyzed entities
5092 or else Ekind (Id) = E_Void);
5093 Set_Flag278 (Id, V);
5094 end Set_Is_Ignored_Ghost_Entity;
5096 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5098 pragma Assert (Nkind (Id) in N_Entity);
5100 end Set_Is_Immediately_Visible;
5102 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5104 Set_Flag254 (Id, V);
5105 end Set_Is_Implementation_Defined;
5107 procedure Set_Is_Imported (Id : E; V : B := True) is
5110 end Set_Is_Imported;
5112 procedure Set_Is_Independent (Id : E; V : B := True) is
5114 Set_Flag268 (Id, V);
5115 end Set_Is_Independent;
5117 procedure Set_Is_Inlined (Id : E; V : B := True) is
5122 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5124 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5126 end Set_Is_Inlined_Always;
5128 procedure Set_Is_Interface (Id : E; V : B := True) is
5130 pragma Assert (Is_Record_Type (Id));
5131 Set_Flag186 (Id, V);
5132 end Set_Is_Interface;
5134 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5136 Set_Flag126 (Id, V);
5137 end Set_Is_Instantiated;
5139 procedure Set_Is_Internal (Id : E; V : B := True) is
5141 pragma Assert (Nkind (Id) in N_Entity);
5143 end Set_Is_Internal;
5145 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5147 pragma Assert (Nkind (Id) in N_Entity);
5149 end Set_Is_Interrupt_Handler;
5151 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5154 end Set_Is_Intrinsic_Subprogram;
5156 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5158 pragma Assert (Ekind (Id) = E_Procedure);
5159 Set_Flag257 (Id, V);
5160 end Set_Is_Invariant_Procedure;
5162 procedure Set_Is_Itype (Id : E; V : B := True) is
5167 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5170 end Set_Is_Known_Non_Null;
5172 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5174 Set_Flag204 (Id, V);
5175 end Set_Is_Known_Null;
5177 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5179 Set_Flag170 (Id, V);
5180 end Set_Is_Known_Valid;
5182 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5184 pragma Assert (Is_Type (Id));
5185 Set_Flag106 (Id, V);
5186 end Set_Is_Limited_Composite;
5188 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5190 pragma Assert (Is_Interface (Id));
5191 Set_Flag197 (Id, V);
5192 end Set_Is_Limited_Interface;
5194 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5197 end Set_Is_Limited_Record;
5199 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5201 pragma Assert (Is_Subprogram (Id));
5202 Set_Flag137 (Id, V);
5203 end Set_Is_Machine_Code_Subprogram;
5205 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5207 pragma Assert (Is_Type (Id));
5208 Set_Flag109 (Id, V);
5209 end Set_Is_Non_Static_Subtype;
5211 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5213 pragma Assert (Ekind (Id) = E_Procedure);
5214 Set_Flag178 (Id, V);
5215 end Set_Is_Null_Init_Proc;
5217 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5219 Set_Flag153 (Id, V);
5220 end Set_Is_Obsolescent;
5222 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5224 pragma Assert (Ekind (Id) = E_Out_Parameter);
5225 Set_Flag226 (Id, V);
5226 end Set_Is_Only_Out_Parameter;
5228 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5230 Set_Flag160 (Id, V);
5231 end Set_Is_Package_Body_Entity;
5233 procedure Set_Is_Packed (Id : E; V : B := True) is
5235 pragma Assert (Id = Base_Type (Id));
5239 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5241 Set_Flag138 (Id, V);
5242 end Set_Is_Packed_Array_Impl_Type;
5244 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5246 pragma Assert (Nkind (Id) in N_Entity);
5248 end Set_Is_Potentially_Use_Visible;
5250 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5252 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5253 Set_Flag255 (Id, V);
5254 end Set_Is_Predicate_Function;
5256 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5258 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5259 Set_Flag256 (Id, V);
5260 end Set_Is_Predicate_Function_M;
5262 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5265 end Set_Is_Preelaborated;
5267 procedure Set_Is_Primitive (Id : E; V : B := True) is
5270 (Is_Overloadable (Id)
5271 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5272 Set_Flag218 (Id, V);
5273 end Set_Is_Primitive;
5275 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5277 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5278 Set_Flag195 (Id, V);
5279 end Set_Is_Primitive_Wrapper;
5281 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5283 pragma Assert (Is_Type (Id));
5284 Set_Flag107 (Id, V);
5285 end Set_Is_Private_Composite;
5287 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5290 end Set_Is_Private_Descendant;
5292 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5294 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5295 Set_Flag245 (Id, V);
5296 end Set_Is_Private_Primitive;
5298 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5300 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5301 Set_Flag252 (Id, V);
5302 end Set_Is_Processed_Transient;
5304 procedure Set_Is_Public (Id : E; V : B := True) is
5306 pragma Assert (Nkind (Id) in N_Entity);
5310 procedure Set_Is_Pure (Id : E; V : B := True) is
5315 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5317 pragma Assert (Is_Access_Type (Id));
5318 Set_Flag189 (Id, V);
5319 end Set_Is_Pure_Unit_Access_Type;
5321 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5323 pragma Assert (Is_Type (Id));
5324 Set_Flag244 (Id, V);
5325 end Set_Is_RACW_Stub_Type;
5327 procedure Set_Is_Raised (Id : E; V : B := True) is
5329 pragma Assert (Ekind (Id) = E_Exception);
5330 Set_Flag224 (Id, V);
5333 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5336 end Set_Is_Remote_Call_Interface;
5338 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5341 end Set_Is_Remote_Types;
5343 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5345 Set_Flag112 (Id, V);
5346 end Set_Is_Renaming_Of_Object;
5348 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5350 Set_Flag209 (Id, V);
5351 end Set_Is_Return_Object;
5353 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5355 pragma Assert (Ekind (Id) = E_Variable);
5356 Set_Flag249 (Id, V);
5357 end Set_Is_Safe_To_Reevaluate;
5359 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5362 end Set_Is_Shared_Passive;
5364 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5366 pragma Assert (Is_Type (Id));
5367 Set_Flag281 (Id, V);
5368 end Set_Is_Static_Type;
5370 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5374 or else Ekind_In (Id, E_Exception,
5379 end Set_Is_Statically_Allocated;
5381 procedure Set_Is_Tag (Id : E; V : B := True) is
5383 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5387 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5390 end Set_Is_Tagged_Type;
5392 procedure Set_Is_Thunk (Id : E; V : B := True) is
5394 pragma Assert (Is_Subprogram (Id));
5395 Set_Flag225 (Id, V);
5398 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5400 Set_Flag235 (Id, V);
5401 end Set_Is_Trivial_Subprogram;
5403 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5405 Set_Flag163 (Id, V);
5406 end Set_Is_True_Constant;
5408 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5410 pragma Assert (Id = Base_Type (Id));
5411 Set_Flag117 (Id, V);
5412 end Set_Is_Unchecked_Union;
5414 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5416 pragma Assert (Ekind (Id) = E_Record_Type);
5417 Set_Flag246 (Id, V);
5418 end Set_Is_Underlying_Record_View;
5420 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5422 Set_Flag284 (Id, V);
5423 end Set_Is_Unimplemented;
5425 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5427 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5428 Set_Flag144 (Id, V);
5429 end Set_Is_Unsigned_Type;
5431 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5434 (Ekind_In (Id, E_Constant, E_Variable)
5435 or else Is_Formal (Id)
5436 or else Is_Type (Id));
5437 Set_Flag283 (Id, V);
5438 end Set_Is_Uplevel_Referenced_Entity;
5440 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5442 pragma Assert (Ekind (Id) = E_Procedure);
5443 Set_Flag127 (Id, V);
5444 end Set_Is_Valued_Procedure;
5446 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5448 Set_Flag206 (Id, V);
5449 end Set_Is_Visible_Formal;
5451 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5453 Set_Flag116 (Id, V);
5454 end Set_Is_Visible_Lib_Unit;
5456 procedure Set_Is_Volatile (Id : E; V : B := True) is
5458 pragma Assert (Nkind (Id) in N_Entity);
5460 end Set_Is_Volatile;
5462 procedure Set_Itype_Printed (Id : E; V : B := True) is
5464 pragma Assert (Is_Itype (Id));
5465 Set_Flag202 (Id, V);
5466 end Set_Itype_Printed;
5468 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5471 end Set_Kill_Elaboration_Checks;
5473 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5476 end Set_Kill_Range_Checks;
5478 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5480 pragma Assert (Is_Type (Id));
5481 Set_Flag207 (Id, V);
5482 end Set_Known_To_Have_Preelab_Init;
5484 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5486 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5488 end Set_Last_Aggregate_Assignment;
5490 procedure Set_Last_Assignment (Id : E; V : N) is
5492 pragma Assert (Is_Assignable (Id));
5494 end Set_Last_Assignment;
5496 procedure Set_Last_Entity (Id : E; V : E) is
5499 end Set_Last_Entity;
5501 procedure Set_Limited_View (Id : E; V : E) is
5503 pragma Assert (Ekind (Id) = E_Package);
5505 end Set_Limited_View;
5507 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5509 pragma Assert (Is_Type (Id)
5510 or else Ekind_In (Id, E_Constant, E_Variable)
5511 or else Is_Subprogram (Id));
5513 end Set_Linker_Section_Pragma;
5515 procedure Set_Lit_Indexes (Id : E; V : E) is
5517 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5519 end Set_Lit_Indexes;
5521 procedure Set_Lit_Strings (Id : E; V : E) is
5523 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5525 end Set_Lit_Strings;
5527 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5529 pragma Assert (Is_Formal (Id));
5530 Set_Flag205 (Id, V);
5531 end Set_Low_Bound_Tested;
5533 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5535 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5537 end Set_Machine_Radix_10;
5539 procedure Set_Master_Id (Id : E; V : E) is
5541 pragma Assert (Is_Access_Type (Id));
5545 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5547 Set_Flag168 (Id, V);
5548 end Set_Materialize_Entity;
5550 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5552 Set_Flag262 (Id, V);
5553 end Set_May_Inherit_Delayed_Rep_Aspects;
5555 procedure Set_Mechanism (Id : E; V : M) is
5557 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5558 Set_Uint8 (Id, UI_From_Int (V));
5561 procedure Set_Modulus (Id : E; V : U) is
5563 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5567 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5569 pragma Assert (Is_Type (Id));
5570 Set_Flag183 (Id, V);
5571 end Set_Must_Be_On_Byte_Boundary;
5573 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5575 pragma Assert (Is_Type (Id));
5576 Set_Flag208 (Id, V);
5577 end Set_Must_Have_Preelab_Init;
5579 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5581 Set_Flag147 (Id, V);
5582 end Set_Needs_Debug_Info;
5584 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5587 (Is_Overloadable (Id)
5588 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5590 end Set_Needs_No_Actuals;
5592 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5594 Set_Flag115 (Id, V);
5595 end Set_Never_Set_In_Source;
5597 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5600 end Set_Next_Inlined_Subprogram;
5602 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5604 pragma Assert (Is_Discrete_Type (Id));
5605 Set_Flag276 (Id, V);
5606 end Set_No_Dynamic_Predicate_On_Actual;
5608 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5610 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5611 Set_Flag131 (Id, V);
5612 end Set_No_Pool_Assigned;
5614 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5616 pragma Assert (Is_Discrete_Type (Id));
5617 Set_Flag275 (Id, V);
5618 end Set_No_Predicate_On_Actual;
5620 procedure Set_No_Return (Id : E; V : B := True) is
5623 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5624 Set_Flag113 (Id, V);
5627 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5629 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5630 Set_Flag136 (Id, V);
5631 end Set_No_Strict_Aliasing;
5633 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5635 pragma Assert (Is_Tagged_Type (Id));
5637 end Set_No_Tagged_Streams_Pragma;
5639 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5641 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5643 end Set_Non_Binary_Modulus;
5645 procedure Set_Non_Limited_View (Id : E; V : E) is
5648 (Ekind (Id) in Incomplete_Kind
5649 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
5651 end Set_Non_Limited_View;
5653 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5656 (Root_Type (Id) = Standard_Boolean
5657 and then Ekind (Id) = E_Enumeration_Type);
5658 Set_Flag162 (Id, V);
5659 end Set_Nonzero_Is_True;
5661 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5663 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5665 end Set_Normalized_First_Bit;
5667 procedure Set_Normalized_Position (Id : E; V : U) is
5669 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5671 end Set_Normalized_Position;
5673 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5675 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5677 end Set_Normalized_Position_Max;
5679 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5681 pragma Assert (Ekind (Id) = E_Variable);
5682 Set_Flag247 (Id, V);
5683 end Set_OK_To_Rename;
5685 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5688 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5689 Set_Flag239 (Id, V);
5690 end Set_OK_To_Reorder_Components;
5692 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5695 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5696 Set_Flag241 (Id, V);
5697 end Set_Optimize_Alignment_Space;
5699 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5702 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5703 Set_Flag242 (Id, V);
5704 end Set_Optimize_Alignment_Time;
5706 procedure Set_Original_Access_Type (Id : E; V : E) is
5708 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5710 end Set_Original_Access_Type;
5712 procedure Set_Original_Array_Type (Id : E; V : E) is
5714 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5716 end Set_Original_Array_Type;
5718 procedure Set_Original_Record_Component (Id : E; V : E) is
5720 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5722 end Set_Original_Record_Component;
5724 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5726 Set_Flag243 (Id, V);
5727 end Set_Overlays_Constant;
5729 procedure Set_Overridden_Operation (Id : E; V : E) is
5732 end Set_Overridden_Operation;
5734 procedure Set_Package_Instantiation (Id : E; V : N) is
5736 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5738 end Set_Package_Instantiation;
5740 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5742 pragma Assert (Is_Array_Type (Id));
5744 end Set_Packed_Array_Impl_Type;
5746 procedure Set_Parent_Subtype (Id : E; V : E) is
5748 pragma Assert (Ekind (Id) = E_Record_Type);
5750 end Set_Parent_Subtype;
5752 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5754 pragma Assert (Ekind (Id) = E_Abstract_State);
5756 end Set_Part_Of_Constituents;
5758 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5760 pragma Assert (Is_Type (Id));
5761 Set_Flag280 (Id, V);
5762 end Set_Partial_View_Has_Unknown_Discr;
5764 procedure Set_Pending_Access_Types (Id : E; V : L) is
5766 pragma Assert (Is_Type (Id));
5767 Set_Elist15 (Id, V);
5768 end Set_Pending_Access_Types;
5770 procedure Set_Postconditions_Proc (Id : E; V : E) is
5772 pragma Assert (Ekind_In (Id, E_Entry,
5777 end Set_Postconditions_Proc;
5779 procedure Set_PPC_Wrapper (Id : E; V : E) is
5781 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5783 end Set_PPC_Wrapper;
5785 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5787 pragma Assert (Is_Tagged_Type (Id));
5788 Set_Elist10 (Id, V);
5789 end Set_Direct_Primitive_Operations;
5791 procedure Set_Prival (Id : E; V : E) is
5793 pragma Assert (Is_Protected_Component (Id));
5797 procedure Set_Prival_Link (Id : E; V : E) is
5799 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5801 end Set_Prival_Link;
5803 procedure Set_Private_Dependents (Id : E; V : L) is
5805 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5806 Set_Elist18 (Id, V);
5807 end Set_Private_Dependents;
5809 procedure Set_Private_View (Id : E; V : N) is
5811 pragma Assert (Is_Private_Type (Id));
5813 end Set_Private_View;
5815 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5817 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5819 end Set_Protected_Body_Subprogram;
5821 procedure Set_Protected_Formal (Id : E; V : E) is
5823 pragma Assert (Is_Formal (Id));
5825 end Set_Protected_Formal;
5827 procedure Set_Protection_Object (Id : E; V : E) is
5829 pragma Assert (Ekind_In (Id, E_Entry,
5834 end Set_Protection_Object;
5836 procedure Set_Reachable (Id : E; V : B := True) is
5841 procedure Set_Referenced (Id : E; V : B := True) is
5843 Set_Flag156 (Id, V);
5846 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5849 end Set_Referenced_As_LHS;
5851 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5853 Set_Flag227 (Id, V);
5854 end Set_Referenced_As_Out_Parameter;
5856 procedure Set_Refinement_Constituents (Id : E; V : L) is
5858 pragma Assert (Ekind (Id) = E_Abstract_State);
5860 end Set_Refinement_Constituents;
5862 procedure Set_Register_Exception_Call (Id : E; V : N) is
5864 pragma Assert (Ekind (Id) = E_Exception);
5866 end Set_Register_Exception_Call;
5868 procedure Set_Related_Array_Object (Id : E; V : E) is
5870 pragma Assert (Is_Array_Type (Id));
5872 end Set_Related_Array_Object;
5874 procedure Set_Related_Expression (Id : E; V : N) is
5876 pragma Assert (Ekind (Id) in Type_Kind
5877 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5879 end Set_Related_Expression;
5881 procedure Set_Related_Instance (Id : E; V : E) is
5883 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5885 end Set_Related_Instance;
5887 procedure Set_Related_Type (Id : E; V : E) is
5889 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5891 end Set_Related_Type;
5893 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5895 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5897 end Set_Relative_Deadline_Variable;
5899 procedure Set_Renamed_Entity (Id : E; V : N) is
5902 end Set_Renamed_Entity;
5904 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5906 pragma Assert (Ekind (Id) = E_Package);
5907 Set_Flag231 (Id, V);
5908 end Set_Renamed_In_Spec;
5910 procedure Set_Renamed_Object (Id : E; V : N) is
5913 end Set_Renamed_Object;
5915 procedure Set_Renaming_Map (Id : E; V : U) is
5918 end Set_Renaming_Map;
5920 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5922 pragma Assert (Is_Overloadable (Id));
5923 Set_Flag213 (Id, V);
5924 end Set_Requires_Overriding;
5926 procedure Set_Return_Present (Id : E; V : B := True) is
5929 end Set_Return_Present;
5931 procedure Set_Return_Applies_To (Id : E; V : N) is
5934 end Set_Return_Applies_To;
5936 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5939 end Set_Returns_By_Ref;
5941 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5943 pragma Assert (Ekind (Id) = E_Function);
5944 Set_Flag134 (Id, V);
5945 end Set_Returns_Limited_View;
5947 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5950 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5951 Set_Flag164 (Id, V);
5952 end Set_Reverse_Bit_Order;
5954 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5958 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5960 end Set_Reverse_Storage_Order;
5962 procedure Set_RM_Size (Id : E; V : U) is
5964 pragma Assert (Is_Type (Id));
5968 procedure Set_Scalar_Range (Id : E; V : N) is
5971 end Set_Scalar_Range;
5973 procedure Set_Scale_Value (Id : E; V : U) is
5976 end Set_Scale_Value;
5978 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5980 pragma Assert (not Is_Record_Type (Id));
5982 end Set_Scope_Depth_Value;
5984 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5986 Set_Flag167 (Id, V);
5987 end Set_Sec_Stack_Needed_For_Return;
5989 procedure Set_Shadow_Entities (Id : E; V : S) is
5991 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5993 end Set_Shadow_Entities;
5995 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5997 pragma Assert (Ekind (Id) = E_Variable);
5999 end Set_Shared_Var_Procs_Instance;
6001 procedure Set_Size_Check_Code (Id : E; V : N) is
6003 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6005 end Set_Size_Check_Code;
6007 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6009 Set_Flag177 (Id, V);
6010 end Set_Size_Depends_On_Discriminant;
6012 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6015 end Set_Size_Known_At_Compile_Time;
6017 procedure Set_Small_Value (Id : E; V : R) is
6019 pragma Assert (Is_Fixed_Point_Type (Id));
6020 Set_Ureal21 (Id, V);
6021 end Set_Small_Value;
6023 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6026 (Ekind_In (Id, E_Generic_Package, -- package variants
6031 end Set_SPARK_Aux_Pragma;
6033 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6036 (Ekind_In (Id, E_Generic_Package, -- package variants
6040 Set_Flag266 (Id, V);
6041 end Set_SPARK_Aux_Pragma_Inherited;
6043 procedure Set_SPARK_Pragma (Id : E; V : N) is
6046 (Ekind_In (Id, E_Function, -- subprogram variants
6048 E_Generic_Procedure,
6052 Ekind_In (Id, E_Generic_Package, -- package variants
6057 end Set_SPARK_Pragma;
6059 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6062 (Ekind_In (Id, E_Function, -- subprogram variants
6064 E_Generic_Procedure,
6068 Ekind_In (Id, E_Generic_Package, -- package variants
6072 Set_Flag265 (Id, V);
6073 end Set_SPARK_Pragma_Inherited;
6075 procedure Set_Spec_Entity (Id : E; V : E) is
6077 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6079 end Set_Spec_Entity;
6081 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6085 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6086 Set_Flag273 (Id, V);
6087 end Set_SSO_Set_High_By_Default;
6089 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6093 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6094 Set_Flag272 (Id, V);
6095 end Set_SSO_Set_Low_By_Default;
6097 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6099 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6101 end Set_Static_Discrete_Predicate;
6103 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6105 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6106 and then Has_Predicates (Id));
6108 end Set_Static_Real_Or_String_Predicate;
6110 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6112 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6114 end Set_Status_Flag_Or_Transient_Decl;
6116 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6118 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6119 pragma Assert (Id = Base_Type (Id));
6121 end Set_Storage_Size_Variable;
6123 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6125 pragma Assert (Ekind (Id) = E_Package);
6127 end Set_Static_Elaboration_Desired;
6129 procedure Set_Static_Initialization (Id : E; V : N) is
6132 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6134 end Set_Static_Initialization;
6136 procedure Set_Stored_Constraint (Id : E; V : L) is
6138 pragma Assert (Nkind (Id) in N_Entity);
6139 Set_Elist23 (Id, V);
6140 end Set_Stored_Constraint;
6142 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6144 pragma Assert (Ekind (Id) = E_Constant);
6145 Set_Flag270 (Id, V);
6146 end Set_Stores_Attribute_Old_Prefix;
6148 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6150 pragma Assert (Id = Base_Type (Id));
6151 Set_Flag145 (Id, V);
6152 end Set_Strict_Alignment;
6154 procedure Set_String_Literal_Length (Id : E; V : U) is
6156 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6158 end Set_String_Literal_Length;
6160 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6162 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6164 end Set_String_Literal_Low_Bound;
6166 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6168 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6170 end Set_Subprograms_For_Type;
6172 procedure Set_Subps_Index (Id : E; V : U) is
6174 pragma Assert (Is_Subprogram (Id));
6176 end Set_Subps_Index;
6178 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6180 Set_Flag148 (Id, V);
6181 end Set_Suppress_Elaboration_Warnings;
6183 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6185 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6186 Set_Flag105 (Id, V);
6187 end Set_Suppress_Initialization;
6189 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6191 Set_Flag165 (Id, V);
6192 end Set_Suppress_Style_Checks;
6194 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6196 Set_Flag217 (Id, V);
6197 end Set_Suppress_Value_Tracking_On_Call;
6199 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6201 pragma Assert (Ekind (Id) in Task_Kind);
6203 end Set_Task_Body_Procedure;
6205 procedure Set_Thunk_Entity (Id : E; V : E) is
6207 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6208 and then Is_Thunk (Id));
6210 end Set_Thunk_Entity;
6212 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6215 end Set_Treat_As_Volatile;
6217 procedure Set_Underlying_Full_View (Id : E; V : E) is
6219 pragma Assert (Ekind (Id) in Private_Kind);
6221 end Set_Underlying_Full_View;
6223 procedure Set_Underlying_Record_View (Id : E; V : E) is
6225 pragma Assert (Ekind (Id) = E_Record_Type);
6227 end Set_Underlying_Record_View;
6229 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6231 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6232 Set_Flag216 (Id, V);
6233 end Set_Universal_Aliasing;
6235 procedure Set_Unset_Reference (Id : E; V : N) is
6238 end Set_Unset_Reference;
6240 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6242 Set_Flag222 (Id, V);
6243 end Set_Used_As_Generic_Actual;
6245 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6247 pragma Assert (Ekind (Id) = E_Protected_Type);
6248 Set_Flag188 (Id, V);
6249 end Set_Uses_Lock_Free;
6251 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6254 end Set_Uses_Sec_Stack;
6256 procedure Set_Warnings_Off (Id : E; V : B := True) is
6259 end Set_Warnings_Off;
6261 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6263 Set_Flag236 (Id, V);
6264 end Set_Warnings_Off_Used;
6266 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6268 Set_Flag237 (Id, V);
6269 end Set_Warnings_Off_Used_Unmodified;
6271 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6273 Set_Flag238 (Id, V);
6274 end Set_Warnings_Off_Used_Unreferenced;
6276 procedure Set_Was_Hidden (Id : E; V : B := True) is
6278 Set_Flag196 (Id, V);
6281 procedure Set_Wrapped_Entity (Id : E; V : E) is
6283 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6284 and then Is_Primitive_Wrapper (Id));
6286 end Set_Wrapped_Entity;
6288 -----------------------------------
6289 -- Field Initialization Routines --
6290 -----------------------------------
6292 procedure Init_Alignment (Id : E) is
6294 Set_Uint14 (Id, Uint_0);
6297 procedure Init_Alignment (Id : E; V : Int) is
6299 Set_Uint14 (Id, UI_From_Int (V));
6302 procedure Init_Component_Bit_Offset (Id : E) is
6304 Set_Uint11 (Id, No_Uint);
6305 end Init_Component_Bit_Offset;
6307 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6309 Set_Uint11 (Id, UI_From_Int (V));
6310 end Init_Component_Bit_Offset;
6312 procedure Init_Component_Size (Id : E) is
6314 Set_Uint22 (Id, Uint_0);
6315 end Init_Component_Size;
6317 procedure Init_Component_Size (Id : E; V : Int) is
6319 Set_Uint22 (Id, UI_From_Int (V));
6320 end Init_Component_Size;
6322 procedure Init_Digits_Value (Id : E) is
6324 Set_Uint17 (Id, Uint_0);
6325 end Init_Digits_Value;
6327 procedure Init_Digits_Value (Id : E; V : Int) is
6329 Set_Uint17 (Id, UI_From_Int (V));
6330 end Init_Digits_Value;
6332 procedure Init_Esize (Id : E) is
6334 Set_Uint12 (Id, Uint_0);
6337 procedure Init_Esize (Id : E; V : Int) is
6339 Set_Uint12 (Id, UI_From_Int (V));
6342 procedure Init_Normalized_First_Bit (Id : E) is
6344 Set_Uint8 (Id, No_Uint);
6345 end Init_Normalized_First_Bit;
6347 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6349 Set_Uint8 (Id, UI_From_Int (V));
6350 end Init_Normalized_First_Bit;
6352 procedure Init_Normalized_Position (Id : E) is
6354 Set_Uint14 (Id, No_Uint);
6355 end Init_Normalized_Position;
6357 procedure Init_Normalized_Position (Id : E; V : Int) is
6359 Set_Uint14 (Id, UI_From_Int (V));
6360 end Init_Normalized_Position;
6362 procedure Init_Normalized_Position_Max (Id : E) is
6364 Set_Uint10 (Id, No_Uint);
6365 end Init_Normalized_Position_Max;
6367 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6369 Set_Uint10 (Id, UI_From_Int (V));
6370 end Init_Normalized_Position_Max;
6372 procedure Init_RM_Size (Id : E) is
6374 Set_Uint13 (Id, Uint_0);
6377 procedure Init_RM_Size (Id : E; V : Int) is
6379 Set_Uint13 (Id, UI_From_Int (V));
6382 -----------------------------
6383 -- Init_Component_Location --
6384 -----------------------------
6386 procedure Init_Component_Location (Id : E) is
6388 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6389 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6390 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6391 Set_Uint12 (Id, Uint_0); -- Esize
6392 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6393 end Init_Component_Location;
6395 ----------------------------
6396 -- Init_Object_Size_Align --
6397 ----------------------------
6399 procedure Init_Object_Size_Align (Id : E) is
6401 Set_Uint12 (Id, Uint_0); -- Esize
6402 Set_Uint14 (Id, Uint_0); -- Alignment
6403 end Init_Object_Size_Align;
6409 procedure Init_Size (Id : E; V : Int) is
6411 pragma Assert (not Is_Object (Id));
6412 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6413 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6416 ---------------------
6417 -- Init_Size_Align --
6418 ---------------------
6420 procedure Init_Size_Align (Id : E) is
6422 pragma Assert (not Is_Object (Id));
6423 Set_Uint12 (Id, Uint_0); -- Esize
6424 Set_Uint13 (Id, Uint_0); -- RM_Size
6425 Set_Uint14 (Id, Uint_0); -- Alignment
6426 end Init_Size_Align;
6428 ----------------------------------------------
6429 -- Type Representation Attribute Predicates --
6430 ----------------------------------------------
6432 function Known_Alignment (E : Entity_Id) return B is
6434 return Uint14 (E) /= Uint_0
6435 and then Uint14 (E) /= No_Uint;
6436 end Known_Alignment;
6438 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6440 return Uint11 (E) /= No_Uint;
6441 end Known_Component_Bit_Offset;
6443 function Known_Component_Size (E : Entity_Id) return B is
6445 return Uint22 (Base_Type (E)) /= Uint_0
6446 and then Uint22 (Base_Type (E)) /= No_Uint;
6447 end Known_Component_Size;
6449 function Known_Esize (E : Entity_Id) return B is
6451 return Uint12 (E) /= Uint_0
6452 and then Uint12 (E) /= No_Uint;
6455 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6457 return Uint8 (E) /= No_Uint;
6458 end Known_Normalized_First_Bit;
6460 function Known_Normalized_Position (E : Entity_Id) return B is
6462 return Uint14 (E) /= No_Uint;
6463 end Known_Normalized_Position;
6465 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6467 return Uint10 (E) /= No_Uint;
6468 end Known_Normalized_Position_Max;
6470 function Known_RM_Size (E : Entity_Id) return B is
6472 return Uint13 (E) /= No_Uint
6473 and then (Uint13 (E) /= Uint_0
6474 or else Is_Discrete_Type (E)
6475 or else Is_Fixed_Point_Type (E));
6478 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6480 return Uint11 (E) /= No_Uint
6481 and then Uint11 (E) >= Uint_0;
6482 end Known_Static_Component_Bit_Offset;
6484 function Known_Static_Component_Size (E : Entity_Id) return B is
6486 return Uint22 (Base_Type (E)) > Uint_0;
6487 end Known_Static_Component_Size;
6489 function Known_Static_Esize (E : Entity_Id) return B is
6491 return Uint12 (E) > Uint_0
6492 and then not Is_Generic_Type (E);
6493 end Known_Static_Esize;
6495 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6497 return Uint8 (E) /= No_Uint
6498 and then Uint8 (E) >= Uint_0;
6499 end Known_Static_Normalized_First_Bit;
6501 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6503 return Uint14 (E) /= No_Uint
6504 and then Uint14 (E) >= Uint_0;
6505 end Known_Static_Normalized_Position;
6507 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6509 return Uint10 (E) /= No_Uint
6510 and then Uint10 (E) >= Uint_0;
6511 end Known_Static_Normalized_Position_Max;
6513 function Known_Static_RM_Size (E : Entity_Id) return B is
6515 return (Uint13 (E) > Uint_0
6516 or else Is_Discrete_Type (E)
6517 or else Is_Fixed_Point_Type (E))
6518 and then not Is_Generic_Type (E);
6519 end Known_Static_RM_Size;
6521 function Unknown_Alignment (E : Entity_Id) return B is
6523 return Uint14 (E) = Uint_0
6524 or else Uint14 (E) = No_Uint;
6525 end Unknown_Alignment;
6527 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6529 return Uint11 (E) = No_Uint;
6530 end Unknown_Component_Bit_Offset;
6532 function Unknown_Component_Size (E : Entity_Id) return B is
6534 return Uint22 (Base_Type (E)) = Uint_0
6536 Uint22 (Base_Type (E)) = No_Uint;
6537 end Unknown_Component_Size;
6539 function Unknown_Esize (E : Entity_Id) return B is
6541 return Uint12 (E) = No_Uint
6543 Uint12 (E) = Uint_0;
6546 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6548 return Uint8 (E) = No_Uint;
6549 end Unknown_Normalized_First_Bit;
6551 function Unknown_Normalized_Position (E : Entity_Id) return B is
6553 return Uint14 (E) = No_Uint;
6554 end Unknown_Normalized_Position;
6556 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6558 return Uint10 (E) = No_Uint;
6559 end Unknown_Normalized_Position_Max;
6561 function Unknown_RM_Size (E : Entity_Id) return B is
6563 return (Uint13 (E) = Uint_0
6564 and then not Is_Discrete_Type (E)
6565 and then not Is_Fixed_Point_Type (E))
6566 or else Uint13 (E) = No_Uint;
6567 end Unknown_RM_Size;
6569 --------------------
6570 -- Address_Clause --
6571 --------------------
6573 function Address_Clause (Id : E) return N is
6575 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6582 function Aft_Value (Id : E) return U is
6584 Delta_Val : Ureal := Delta_Value (Id);
6586 while Delta_Val < Ureal_Tenth loop
6587 Delta_Val := Delta_Val * Ureal_10;
6588 Result := Result + 1;
6591 return UI_From_Int (Result);
6594 ----------------------
6595 -- Alignment_Clause --
6596 ----------------------
6598 function Alignment_Clause (Id : E) return N is
6600 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6601 end Alignment_Clause;
6607 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6609 if Last_Entity (V) = Empty then
6610 Set_First_Entity (Id => V, V => Id);
6612 Set_Next_Entity (Last_Entity (V), Id);
6615 Set_Next_Entity (Id, Empty);
6617 Set_Last_Entity (Id => V, V => Id);
6624 function Base_Type (Id : E) return E is
6626 if Is_Base_Type (Id) then
6629 pragma Assert (Is_Type (Id));
6634 -------------------------
6635 -- Component_Alignment --
6636 -------------------------
6638 -- Component Alignment is encoded using two flags, Flag128/129 as
6639 -- follows. Note that both flags False = Align_Default, so that the
6640 -- default initialization of flags to False initializes component
6641 -- alignment to the default value as required.
6643 -- Flag128 Flag129 Value
6644 -- ------- ------- -----
6645 -- False False Calign_Default
6646 -- False True Calign_Component_Size
6647 -- True False Calign_Component_Size_4
6648 -- True True Calign_Storage_Unit
6650 function Component_Alignment (Id : E) return C is
6651 BT : constant Node_Id := Base_Type (Id);
6654 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6656 if Flag128 (BT) then
6657 if Flag129 (BT) then
6658 return Calign_Storage_Unit;
6660 return Calign_Component_Size_4;
6664 if Flag129 (BT) then
6665 return Calign_Component_Size;
6667 return Calign_Default;
6670 end Component_Alignment;
6672 ----------------------
6673 -- Declaration_Node --
6674 ----------------------
6676 function Declaration_Node (Id : E) return N is
6680 if Ekind (Id) = E_Incomplete_Type
6681 and then Present (Full_View (Id))
6683 P := Parent (Full_View (Id));
6689 if Nkind (P) /= N_Selected_Component
6690 and then Nkind (P) /= N_Expanded_Name
6692 not (Nkind (P) = N_Defining_Program_Unit_Name
6693 and then Is_Child_Unit (Id))
6700 end Declaration_Node;
6702 ---------------------------------
6703 -- Default_Init_Cond_Procedure --
6704 ---------------------------------
6706 function Default_Init_Cond_Procedure (Id : E) return E is
6712 and then (Has_Default_Init_Cond (Id)
6713 or Has_Inherited_Default_Init_Cond (Id)));
6715 S := Subprograms_For_Type (Id);
6716 while Present (S) loop
6717 if Is_Default_Init_Cond_Procedure (S) then
6721 S := Subprograms_For_Type (S);
6725 end Default_Init_Cond_Procedure;
6727 ---------------------
6728 -- Designated_Type --
6729 ---------------------
6731 function Designated_Type (Id : E) return E is
6735 Desig_Type := Directly_Designated_Type (Id);
6737 if Ekind (Desig_Type) = E_Incomplete_Type
6738 and then Present (Full_View (Desig_Type))
6740 return Full_View (Desig_Type);
6742 elsif Is_Class_Wide_Type (Desig_Type)
6743 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6744 and then Present (Full_View (Etype (Desig_Type)))
6745 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6747 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6752 end Designated_Type;
6754 ----------------------
6755 -- Entry_Index_Type --
6756 ----------------------
6758 function Entry_Index_Type (Id : E) return N is
6760 pragma Assert (Ekind (Id) = E_Entry_Family);
6761 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6762 end Entry_Index_Type;
6764 ---------------------
6765 -- First_Component --
6766 ---------------------
6768 function First_Component (Id : E) return E is
6773 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6775 Comp_Id := First_Entity (Id);
6776 while Present (Comp_Id) loop
6777 exit when Ekind (Comp_Id) = E_Component;
6778 Comp_Id := Next_Entity (Comp_Id);
6782 end First_Component;
6784 -------------------------------------
6785 -- First_Component_Or_Discriminant --
6786 -------------------------------------
6788 function First_Component_Or_Discriminant (Id : E) return E is
6793 (Is_Record_Type (Id)
6794 or else Is_Incomplete_Or_Private_Type (Id)
6795 or else Has_Discriminants (Id));
6797 Comp_Id := First_Entity (Id);
6798 while Present (Comp_Id) loop
6799 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6800 Comp_Id := Next_Entity (Comp_Id);
6804 end First_Component_Or_Discriminant;
6810 function First_Formal (Id : E) return E is
6815 (Is_Generic_Subprogram (Id)
6816 or else Is_Overloadable (Id)
6817 or else Ekind_In (Id, E_Entry_Family,
6819 E_Subprogram_Type));
6821 if Ekind (Id) = E_Enumeration_Literal then
6825 Formal := First_Entity (Id);
6827 -- The first/next entity chain of a generic subprogram contains all
6828 -- generic formal parameters, followed by the formal parameters. Go
6829 -- directly to the parameters by skipping the formal part.
6831 if Is_Generic_Subprogram (Id) then
6832 while Present (Formal) and then not Is_Formal (Formal) loop
6833 Next_Entity (Formal);
6837 if Present (Formal) and then Is_Formal (Formal) then
6845 ------------------------------
6846 -- First_Formal_With_Extras --
6847 ------------------------------
6849 function First_Formal_With_Extras (Id : E) return E is
6854 (Is_Generic_Subprogram (Id)
6855 or else Is_Overloadable (Id)
6856 or else Ekind_In (Id, E_Entry_Family,
6858 E_Subprogram_Type));
6860 if Ekind (Id) = E_Enumeration_Literal then
6864 Formal := First_Entity (Id);
6866 -- The first/next entity chain of a generic subprogram contains all
6867 -- generic formal parameters, followed by the formal parameters. Go
6868 -- directly to the parameters by skipping the formal part.
6870 if Is_Generic_Subprogram (Id) then
6871 while Present (Formal) and then not Is_Formal (Formal) loop
6872 Next_Entity (Formal);
6876 if Present (Formal) and then Is_Formal (Formal) then
6879 return Extra_Formals (Id); -- Empty if no extra formals
6882 end First_Formal_With_Extras;
6884 -------------------------------------
6885 -- Get_Attribute_Definition_Clause --
6886 -------------------------------------
6888 function Get_Attribute_Definition_Clause
6890 Id : Attribute_Id) return Node_Id
6895 N := First_Rep_Item (E);
6896 while Present (N) loop
6897 if Nkind (N) = N_Attribute_Definition_Clause
6898 and then Get_Attribute_Id (Chars (N)) = Id
6907 end Get_Attribute_Definition_Clause;
6913 function Get_Full_View (T : Entity_Id) return Entity_Id is
6915 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6916 return Full_View (T);
6918 elsif Is_Class_Wide_Type (T)
6919 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6920 and then Present (Full_View (Root_Type (T)))
6922 return Class_Wide_Type (Full_View (Root_Type (T)));
6933 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6934 Is_CDG : constant Boolean :=
6935 Id = Pragma_Abstract_State or else
6936 Id = Pragma_Async_Readers or else
6937 Id = Pragma_Async_Writers or else
6938 Id = Pragma_Depends or else
6939 Id = Pragma_Effective_Reads or else
6940 Id = Pragma_Effective_Writes or else
6941 Id = Pragma_Extensions_Visible or else
6942 Id = Pragma_Global or else
6943 Id = Pragma_Initial_Condition or else
6944 Id = Pragma_Initializes or else
6945 Id = Pragma_Part_Of or else
6946 Id = Pragma_Refined_Depends or else
6947 Id = Pragma_Refined_Global or else
6948 Id = Pragma_Refined_State;
6949 Is_CTC : constant Boolean :=
6950 Id = Pragma_Contract_Cases or else
6951 Id = Pragma_Test_Case;
6952 Is_PPC : constant Boolean :=
6953 Id = Pragma_Precondition or else
6954 Id = Pragma_Postcondition or else
6955 Id = Pragma_Refined_Post;
6957 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6963 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6964 -- extracted from their specialized list.
6967 Items := Contract (E);
6973 Item := Classifications (Items);
6976 Item := Contract_Test_Cases (Items);
6979 Item := Pre_Post_Conditions (Items);
6985 Item := First_Rep_Item (E);
6988 while Present (Item) loop
6989 if Nkind (Item) = N_Pragma
6990 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6994 -- All nodes in N_Contract are chained using Next_Pragma
6996 elsif In_Contract then
6997 Item := Next_Pragma (Item);
7002 Next_Rep_Item (Item);
7009 --------------------------------------
7010 -- Get_Record_Representation_Clause --
7011 --------------------------------------
7013 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7017 N := First_Rep_Item (E);
7018 while Present (N) loop
7019 if Nkind (N) = N_Record_Representation_Clause then
7027 end Get_Record_Representation_Clause;
7029 ------------------------
7030 -- Has_Attach_Handler --
7031 ------------------------
7033 function Has_Attach_Handler (Id : E) return B is
7037 pragma Assert (Is_Protected_Type (Id));
7039 Ritem := First_Rep_Item (Id);
7040 while Present (Ritem) loop
7041 if Nkind (Ritem) = N_Pragma
7042 and then Pragma_Name (Ritem) = Name_Attach_Handler
7046 Next_Rep_Item (Ritem);
7051 end Has_Attach_Handler;
7057 function Has_Entries (Id : E) return B is
7061 pragma Assert (Is_Concurrent_Type (Id));
7063 Ent := First_Entity (Id);
7064 while Present (Ent) loop
7065 if Is_Entry (Ent) then
7069 Ent := Next_Entity (Ent);
7075 ----------------------------
7076 -- Has_Foreign_Convention --
7077 ----------------------------
7079 function Has_Foreign_Convention (Id : E) return B is
7081 -- While regular Intrinsics such as the Standard operators fit in the
7082 -- "Ada" convention, those with an Interface_Name materialize GCC
7083 -- builtin imports for which Ada special treatments shouldn't apply.
7085 return Convention (Id) in Foreign_Convention
7086 or else (Convention (Id) = Convention_Intrinsic
7087 and then Present (Interface_Name (Id)));
7088 end Has_Foreign_Convention;
7090 ---------------------------
7091 -- Has_Interrupt_Handler --
7092 ---------------------------
7094 function Has_Interrupt_Handler (Id : E) return B is
7098 pragma Assert (Is_Protected_Type (Id));
7100 Ritem := First_Rep_Item (Id);
7101 while Present (Ritem) loop
7102 if Nkind (Ritem) = N_Pragma
7103 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7107 Next_Rep_Item (Ritem);
7112 end Has_Interrupt_Handler;
7114 --------------------------
7115 -- Has_Non_Limited_View --
7116 --------------------------
7118 function Has_Non_Limited_View (Id : E) return B is
7120 return (Ekind (Id) in Incomplete_Kind
7121 or else Ekind (Id) in Class_Wide_Kind
7122 or else Ekind (Id) = E_Abstract_State)
7123 and then Present (Non_Limited_View (Id));
7124 end Has_Non_Limited_View;
7126 -----------------------------
7127 -- Has_Non_Null_Refinement --
7128 -----------------------------
7130 function Has_Non_Null_Refinement (Id : E) return B is
7132 -- "Refinement" is a concept applicable only to abstract states
7134 pragma Assert (Ekind (Id) = E_Abstract_State);
7136 if Has_Visible_Refinement (Id) then
7137 pragma Assert (Present (Refinement_Constituents (Id)));
7139 -- For a refinement to be non-null, the first constituent must be
7140 -- anything other than null.
7143 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7147 end Has_Non_Null_Refinement;
7149 -----------------------------
7150 -- Has_Null_Abstract_State --
7151 -----------------------------
7153 function Has_Null_Abstract_State (Id : E) return B is
7155 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7158 Present (Abstract_States (Id))
7159 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7160 end Has_Null_Abstract_State;
7162 -------------------------
7163 -- Has_Null_Refinement --
7164 -------------------------
7166 function Has_Null_Refinement (Id : E) return B is
7168 -- "Refinement" is a concept applicable only to abstract states
7170 pragma Assert (Ekind (Id) = E_Abstract_State);
7172 if Has_Visible_Refinement (Id) then
7173 pragma Assert (Present (Refinement_Constituents (Id)));
7175 -- For a refinement to be null, the state's sole constituent must be
7179 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7183 end Has_Null_Refinement;
7185 --------------------
7186 -- Has_Unmodified --
7187 --------------------
7189 function Has_Unmodified (E : Entity_Id) return Boolean is
7191 if Has_Pragma_Unmodified (E) then
7193 elsif Warnings_Off (E) then
7194 Set_Warnings_Off_Used_Unmodified (E);
7201 ---------------------
7202 -- Has_Unreferenced --
7203 ---------------------
7205 function Has_Unreferenced (E : Entity_Id) return Boolean is
7207 if Has_Pragma_Unreferenced (E) then
7209 elsif Warnings_Off (E) then
7210 Set_Warnings_Off_Used_Unreferenced (E);
7215 end Has_Unreferenced;
7217 ----------------------
7218 -- Has_Warnings_Off --
7219 ----------------------
7221 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7223 if Warnings_Off (E) then
7224 Set_Warnings_Off_Used (E);
7229 end Has_Warnings_Off;
7231 ------------------------------
7232 -- Implementation_Base_Type --
7233 ------------------------------
7235 function Implementation_Base_Type (Id : E) return E is
7240 Bastyp := Base_Type (Id);
7242 if Is_Incomplete_Or_Private_Type (Bastyp) then
7243 Imptyp := Underlying_Type (Bastyp);
7245 -- If we have an implementation type, then just return it,
7246 -- otherwise we return the Base_Type anyway. This can only
7247 -- happen in error situations and should avoid some error bombs.
7249 if Present (Imptyp) then
7250 return Base_Type (Imptyp);
7258 end Implementation_Base_Type;
7260 -------------------------
7261 -- Invariant_Procedure --
7262 -------------------------
7264 function Invariant_Procedure (Id : E) return E is
7268 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7270 if No (Subprograms_For_Type (Id)) then
7274 S := Subprograms_For_Type (Id);
7275 while Present (S) loop
7276 if Is_Invariant_Procedure (S) then
7279 S := Subprograms_For_Type (S);
7285 end Invariant_Procedure;
7291 -- Global flag table allowing rapid computation of this function
7293 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7294 (E_Enumeration_Subtype |
7296 E_Signed_Integer_Subtype |
7297 E_Modular_Integer_Subtype |
7298 E_Floating_Point_Subtype |
7299 E_Ordinary_Fixed_Point_Subtype |
7300 E_Decimal_Fixed_Point_Subtype |
7305 E_Record_Subtype_With_Private |
7306 E_Limited_Private_Subtype |
7308 E_Protected_Subtype |
7310 E_String_Literal_Subtype |
7311 E_Class_Wide_Subtype => False,
7314 function Is_Base_Type (Id : E) return Boolean is
7316 return Entity_Is_Base_Type (Ekind (Id));
7319 ---------------------
7320 -- Is_Boolean_Type --
7321 ---------------------
7323 function Is_Boolean_Type (Id : E) return B is
7325 return Root_Type (Id) = Standard_Boolean;
7326 end Is_Boolean_Type;
7328 ------------------------
7329 -- Is_Constant_Object --
7330 ------------------------
7332 function Is_Constant_Object (Id : E) return B is
7333 K : constant Entity_Kind := Ekind (Id);
7336 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7337 end Is_Constant_Object;
7339 --------------------
7340 -- Is_Discriminal --
7341 --------------------
7343 function Is_Discriminal (Id : E) return B is
7345 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7346 and then Present (Discriminal_Link (Id)));
7349 ----------------------
7350 -- Is_Dynamic_Scope --
7351 ----------------------
7353 function Is_Dynamic_Scope (Id : E) return B is
7356 Ekind (Id) = E_Block
7358 Ekind (Id) = E_Function
7360 Ekind (Id) = E_Procedure
7362 Ekind (Id) = E_Subprogram_Body
7364 Ekind (Id) = E_Task_Type
7366 (Ekind (Id) = E_Limited_Private_Type
7367 and then Present (Full_View (Id))
7368 and then Ekind (Full_View (Id)) = E_Task_Type)
7370 Ekind (Id) = E_Entry
7372 Ekind (Id) = E_Entry_Family
7374 Ekind (Id) = E_Return_Statement;
7375 end Is_Dynamic_Scope;
7377 --------------------
7378 -- Is_Entity_Name --
7379 --------------------
7381 function Is_Entity_Name (N : Node_Id) return Boolean is
7382 Kind : constant Node_Kind := Nkind (N);
7385 -- Identifiers, operator symbols, expanded names are entity names
7387 return Kind = N_Identifier
7388 or else Kind = N_Operator_Symbol
7389 or else Kind = N_Expanded_Name
7391 -- Attribute references are entity names if they refer to an entity.
7392 -- Note that we don't do this by testing for the presence of the
7393 -- Entity field in the N_Attribute_Reference node, since it may not
7394 -- have been set yet.
7396 or else (Kind = N_Attribute_Reference
7397 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7400 -----------------------
7401 -- Is_External_State --
7402 -----------------------
7404 function Is_External_State (Id : E) return B is
7407 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7408 end Is_External_State;
7414 function Is_Finalizer (Id : E) return B is
7416 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7423 function Is_Null_State (Id : E) return B is
7426 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7429 ---------------------
7430 -- Is_Packed_Array --
7431 ---------------------
7433 function Is_Packed_Array (Id : E) return B is
7435 return Is_Array_Type (Id) and then Is_Packed (Id);
7436 end Is_Packed_Array;
7438 -----------------------------------
7439 -- Is_Package_Or_Generic_Package --
7440 -----------------------------------
7442 function Is_Package_Or_Generic_Package (Id : E) return B is
7444 return Ekind_In (Id, E_Generic_Package, E_Package);
7445 end Is_Package_Or_Generic_Package;
7451 function Is_Prival (Id : E) return B is
7453 return (Ekind_In (Id, E_Constant, E_Variable)
7454 and then Present (Prival_Link (Id)));
7457 ----------------------------
7458 -- Is_Protected_Component --
7459 ----------------------------
7461 function Is_Protected_Component (Id : E) return B is
7463 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7464 end Is_Protected_Component;
7466 ----------------------------
7467 -- Is_Protected_Interface --
7468 ----------------------------
7470 function Is_Protected_Interface (Id : E) return B is
7471 Typ : constant Entity_Id := Base_Type (Id);
7473 if not Is_Interface (Typ) then
7475 elsif Is_Class_Wide_Type (Typ) then
7476 return Is_Protected_Interface (Etype (Typ));
7478 return Protected_Present (Type_Definition (Parent (Typ)));
7480 end Is_Protected_Interface;
7482 ------------------------------
7483 -- Is_Protected_Record_Type --
7484 ------------------------------
7486 function Is_Protected_Record_Type (Id : E) return B is
7489 Is_Concurrent_Record_Type (Id)
7490 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7491 end Is_Protected_Record_Type;
7493 --------------------------------
7494 -- Is_Standard_Character_Type --
7495 --------------------------------
7497 function Is_Standard_Character_Type (Id : E) return B is
7499 if Is_Type (Id) then
7501 R : constant Entity_Id := Root_Type (Id);
7504 R = Standard_Character
7506 R = Standard_Wide_Character
7508 R = Standard_Wide_Wide_Character;
7514 end Is_Standard_Character_Type;
7516 -----------------------------
7517 -- Is_Standard_String_Type --
7518 -----------------------------
7520 function Is_Standard_String_Type (Id : E) return B is
7522 if Is_Type (Id) then
7524 R : constant Entity_Id := Root_Type (Id);
7529 R = Standard_Wide_String
7531 R = Standard_Wide_Wide_String;
7537 end Is_Standard_String_Type;
7539 --------------------
7540 -- Is_String_Type --
7541 --------------------
7543 function Is_String_Type (Id : E) return B is
7545 return Is_Array_Type (Id)
7546 and then Id /= Any_Composite
7547 and then Number_Dimensions (Id) = 1
7548 and then Is_Character_Type (Component_Type (Id));
7551 -------------------------------
7552 -- Is_Synchronized_Interface --
7553 -------------------------------
7555 function Is_Synchronized_Interface (Id : E) return B is
7556 Typ : constant Entity_Id := Base_Type (Id);
7559 if not Is_Interface (Typ) then
7562 elsif Is_Class_Wide_Type (Typ) then
7563 return Is_Synchronized_Interface (Etype (Typ));
7566 return Protected_Present (Type_Definition (Parent (Typ)))
7567 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7568 or else Task_Present (Type_Definition (Parent (Typ)));
7570 end Is_Synchronized_Interface;
7572 -----------------------
7573 -- Is_Task_Interface --
7574 -----------------------
7576 function Is_Task_Interface (Id : E) return B is
7577 Typ : constant Entity_Id := Base_Type (Id);
7579 if not Is_Interface (Typ) then
7581 elsif Is_Class_Wide_Type (Typ) then
7582 return Is_Task_Interface (Etype (Typ));
7584 return Task_Present (Type_Definition (Parent (Typ)));
7586 end Is_Task_Interface;
7588 -------------------------
7589 -- Is_Task_Record_Type --
7590 -------------------------
7592 function Is_Task_Record_Type (Id : E) return B is
7595 Is_Concurrent_Record_Type (Id)
7596 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7597 end Is_Task_Record_Type;
7599 ------------------------
7600 -- Is_Wrapper_Package --
7601 ------------------------
7603 function Is_Wrapper_Package (Id : E) return B is
7605 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7606 end Is_Wrapper_Package;
7612 function Last_Formal (Id : E) return E is
7617 (Is_Overloadable (Id)
7618 or else Ekind_In (Id, E_Entry_Family,
7620 E_Subprogram_Type));
7622 if Ekind (Id) = E_Enumeration_Literal then
7626 Formal := First_Formal (Id);
7628 if Present (Formal) then
7629 while Present (Next_Formal (Formal)) loop
7630 Formal := Next_Formal (Formal);
7638 function Model_Emin_Value (Id : E) return Uint is
7640 return Machine_Emin_Value (Id);
7641 end Model_Emin_Value;
7643 -------------------------
7644 -- Model_Epsilon_Value --
7645 -------------------------
7647 function Model_Epsilon_Value (Id : E) return Ureal is
7648 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7650 return Radix ** (1 - Model_Mantissa_Value (Id));
7651 end Model_Epsilon_Value;
7653 --------------------------
7654 -- Model_Mantissa_Value --
7655 --------------------------
7657 function Model_Mantissa_Value (Id : E) return Uint is
7659 return Machine_Mantissa_Value (Id);
7660 end Model_Mantissa_Value;
7662 -----------------------
7663 -- Model_Small_Value --
7664 -----------------------
7666 function Model_Small_Value (Id : E) return Ureal is
7667 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7669 return Radix ** (Model_Emin_Value (Id) - 1);
7670 end Model_Small_Value;
7672 ------------------------
7673 -- Machine_Emax_Value --
7674 ------------------------
7676 function Machine_Emax_Value (Id : E) return Uint is
7677 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7680 case Float_Rep (Id) is
7683 when 1 .. 6 => return Uint_128;
7684 when 7 .. 15 => return 2**10;
7685 when 16 .. 33 => return 2**14;
7686 when others => return No_Uint;
7690 return Uint_2 ** Uint_7 - Uint_1;
7692 end Machine_Emax_Value;
7694 ------------------------
7695 -- Machine_Emin_Value --
7696 ------------------------
7698 function Machine_Emin_Value (Id : E) return Uint is
7700 case Float_Rep (Id) is
7701 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7702 when AAMP => return -Machine_Emax_Value (Id);
7704 end Machine_Emin_Value;
7706 ----------------------------
7707 -- Machine_Mantissa_Value --
7708 ----------------------------
7710 function Machine_Mantissa_Value (Id : E) return Uint is
7711 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7714 case Float_Rep (Id) is
7717 when 1 .. 6 => return Uint_24;
7718 when 7 .. 15 => return UI_From_Int (53);
7719 when 16 .. 18 => return Uint_64;
7720 when 19 .. 33 => return UI_From_Int (113);
7721 when others => return No_Uint;
7726 when 1 .. 6 => return Uint_24;
7727 when 7 .. 9 => return UI_From_Int (40);
7728 when others => return No_Uint;
7731 end Machine_Mantissa_Value;
7733 -------------------------
7734 -- Machine_Radix_Value --
7735 -------------------------
7737 function Machine_Radix_Value (Id : E) return U is
7739 case Float_Rep (Id) is
7740 when IEEE_Binary | AAMP =>
7743 end Machine_Radix_Value;
7745 --------------------
7746 -- Next_Component --
7747 --------------------
7749 function Next_Component (Id : E) return E is
7753 Comp_Id := Next_Entity (Id);
7754 while Present (Comp_Id) loop
7755 exit when Ekind (Comp_Id) = E_Component;
7756 Comp_Id := Next_Entity (Comp_Id);
7762 ------------------------------------
7763 -- Next_Component_Or_Discriminant --
7764 ------------------------------------
7766 function Next_Component_Or_Discriminant (Id : E) return E is
7770 Comp_Id := Next_Entity (Id);
7771 while Present (Comp_Id) loop
7772 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7773 Comp_Id := Next_Entity (Comp_Id);
7777 end Next_Component_Or_Discriminant;
7779 -----------------------
7780 -- Next_Discriminant --
7781 -----------------------
7783 -- This function actually implements both Next_Discriminant and
7784 -- Next_Stored_Discriminant by making sure that the Discriminant
7785 -- returned is of the same variety as Id.
7787 function Next_Discriminant (Id : E) return E is
7789 -- Derived Tagged types with private extensions look like this...
7791 -- E_Discriminant d1
7792 -- E_Discriminant d2
7794 -- E_Discriminant d1
7795 -- E_Discriminant d2
7798 -- so it is critical not to go past the leading discriminants
7803 pragma Assert (Ekind (Id) = E_Discriminant);
7806 D := Next_Entity (D);
7808 or else (Ekind (D) /= E_Discriminant
7809 and then not Is_Itype (D))
7814 exit when Ekind (D) = E_Discriminant
7815 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7819 end Next_Discriminant;
7825 function Next_Formal (Id : E) return E is
7829 -- Follow the chain of declared entities as long as the kind of the
7830 -- entity corresponds to a formal parameter. Skip internal entities
7831 -- that may have been created for implicit subtypes, in the process
7832 -- of analyzing default expressions.
7838 if No (P) or else Is_Formal (P) then
7840 elsif not Is_Internal (P) then
7846 -----------------------------
7847 -- Next_Formal_With_Extras --
7848 -----------------------------
7850 function Next_Formal_With_Extras (Id : E) return E is
7852 if Present (Extra_Formal (Id)) then
7853 return Extra_Formal (Id);
7855 return Next_Formal (Id);
7857 end Next_Formal_With_Extras;
7863 function Next_Index (Id : Node_Id) return Node_Id is
7872 function Next_Literal (Id : E) return E is
7874 pragma Assert (Nkind (Id) in N_Entity);
7878 ------------------------------
7879 -- Next_Stored_Discriminant --
7880 ------------------------------
7882 function Next_Stored_Discriminant (Id : E) return E is
7884 -- See comment in Next_Discriminant
7886 return Next_Discriminant (Id);
7887 end Next_Stored_Discriminant;
7889 -----------------------
7890 -- Number_Dimensions --
7891 -----------------------
7893 function Number_Dimensions (Id : E) return Pos is
7898 if Ekind (Id) = E_String_Literal_Subtype then
7903 T := First_Index (Id);
7904 while Present (T) loop
7911 end Number_Dimensions;
7913 --------------------
7914 -- Number_Entries --
7915 --------------------
7917 function Number_Entries (Id : E) return Nat is
7922 pragma Assert (Is_Concurrent_Type (Id));
7925 Ent := First_Entity (Id);
7926 while Present (Ent) loop
7927 if Is_Entry (Ent) then
7931 Ent := Next_Entity (Ent);
7937 --------------------
7938 -- Number_Formals --
7939 --------------------
7941 function Number_Formals (Id : E) return Pos is
7947 Formal := First_Formal (Id);
7948 while Present (Formal) loop
7950 Formal := Next_Formal (Formal);
7956 --------------------
7957 -- Parameter_Mode --
7958 --------------------
7960 function Parameter_Mode (Id : E) return Formal_Kind is
7965 ------------------------
7966 -- Predicate_Function --
7967 ------------------------
7969 function Predicate_Function (Id : E) return E is
7974 pragma Assert (Is_Type (Id));
7976 -- If type is private and has a completion, predicate may be defined
7977 -- on the full view.
7979 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7980 T := Full_View (Id);
7985 if No (Subprograms_For_Type (T)) then
7989 S := Subprograms_For_Type (T);
7990 while Present (S) loop
7991 if Is_Predicate_Function (S) then
7994 S := Subprograms_For_Type (S);
8000 end Predicate_Function;
8002 --------------------------
8003 -- Predicate_Function_M --
8004 --------------------------
8006 function Predicate_Function_M (Id : E) return E is
8011 pragma Assert (Is_Type (Id));
8013 -- If type is private and has a completion, predicate may be defined
8014 -- on the full view.
8016 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8017 T := Full_View (Id);
8022 if No (Subprograms_For_Type (T)) then
8026 S := Subprograms_For_Type (T);
8027 while Present (S) loop
8028 if Is_Predicate_Function_M (S) then
8031 S := Subprograms_For_Type (S);
8037 end Predicate_Function_M;
8039 -------------------------
8040 -- Present_In_Rep_Item --
8041 -------------------------
8043 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8047 Ritem := First_Rep_Item (E);
8049 while Present (Ritem) loop
8054 Next_Rep_Item (Ritem);
8058 end Present_In_Rep_Item;
8060 --------------------------
8061 -- Primitive_Operations --
8062 --------------------------
8064 function Primitive_Operations (Id : E) return L is
8066 if Is_Concurrent_Type (Id) then
8067 if Present (Corresponding_Record_Type (Id)) then
8068 return Direct_Primitive_Operations
8069 (Corresponding_Record_Type (Id));
8071 -- If expansion is disabled the corresponding record type is absent,
8072 -- but if the type has ancestors it may have primitive operations.
8074 elsif Is_Tagged_Type (Id) then
8075 return Direct_Primitive_Operations (Id);
8081 return Direct_Primitive_Operations (Id);
8083 end Primitive_Operations;
8085 ---------------------
8086 -- Record_Rep_Item --
8087 ---------------------
8089 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8091 Set_Next_Rep_Item (N, First_Rep_Item (E));
8092 Set_First_Rep_Item (E, N);
8093 end Record_Rep_Item;
8099 function Root_Type (Id : E) return E is
8103 pragma Assert (Nkind (Id) in N_Entity);
8105 T := Base_Type (Id);
8107 if Ekind (T) = E_Class_Wide_Type then
8119 -- Following test catches some error cases resulting from
8122 elsif No (Etyp) then
8123 Check_Error_Detected;
8126 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8129 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8135 -- Return if there is a circularity in the inheritance chain. This
8136 -- happens in some error situations and we do not want to get
8137 -- stuck in this loop.
8139 if T = Base_Type (Id) then
8146 ---------------------
8147 -- Safe_Emax_Value --
8148 ---------------------
8150 function Safe_Emax_Value (Id : E) return Uint is
8152 return Machine_Emax_Value (Id);
8153 end Safe_Emax_Value;
8155 ----------------------
8156 -- Safe_First_Value --
8157 ----------------------
8159 function Safe_First_Value (Id : E) return Ureal is
8161 return -Safe_Last_Value (Id);
8162 end Safe_First_Value;
8164 ---------------------
8165 -- Safe_Last_Value --
8166 ---------------------
8168 function Safe_Last_Value (Id : E) return Ureal is
8169 Radix : constant Uint := Machine_Radix_Value (Id);
8170 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8171 Emax : constant Uint := Safe_Emax_Value (Id);
8172 Significand : constant Uint := Radix ** Mantissa - 1;
8173 Exponent : constant Uint := Emax - Mantissa;
8179 (Num => Significand * 2 ** (Exponent mod 4),
8180 Den => -Exponent / 4,
8185 (Num => Significand,
8189 end Safe_Last_Value;
8195 function Scope_Depth (Id : E) return Uint is
8200 while Is_Record_Type (Scop) loop
8201 Scop := Scope (Scop);
8204 return Scope_Depth_Value (Scop);
8207 ---------------------
8208 -- Scope_Depth_Set --
8209 ---------------------
8211 function Scope_Depth_Set (Id : E) return B is
8213 return not Is_Record_Type (Id)
8214 and then Field22 (Id) /= Union_Id (Empty);
8215 end Scope_Depth_Set;
8217 -----------------------------
8218 -- Set_Component_Alignment --
8219 -----------------------------
8221 -- Component Alignment is encoded using two flags, Flag128/129 as
8222 -- follows. Note that both flags False = Align_Default, so that the
8223 -- default initialization of flags to False initializes component
8224 -- alignment to the default value as required.
8226 -- Flag128 Flag129 Value
8227 -- ------- ------- -----
8228 -- False False Calign_Default
8229 -- False True Calign_Component_Size
8230 -- True False Calign_Component_Size_4
8231 -- True True Calign_Storage_Unit
8233 procedure Set_Component_Alignment (Id : E; V : C) is
8235 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8236 and then Is_Base_Type (Id));
8239 when Calign_Default =>
8240 Set_Flag128 (Id, False);
8241 Set_Flag129 (Id, False);
8243 when Calign_Component_Size =>
8244 Set_Flag128 (Id, False);
8245 Set_Flag129 (Id, True);
8247 when Calign_Component_Size_4 =>
8248 Set_Flag128 (Id, True);
8249 Set_Flag129 (Id, False);
8251 when Calign_Storage_Unit =>
8252 Set_Flag128 (Id, True);
8253 Set_Flag129 (Id, True);
8255 end Set_Component_Alignment;
8257 -------------------------------------
8258 -- Set_Default_Init_Cond_Procedure --
8259 -------------------------------------
8261 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8266 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8268 Has_Inherited_Default_Init_Cond (Id)));
8270 S := Subprograms_For_Type (Id);
8271 Set_Subprograms_For_Type (Id, V);
8272 Set_Subprograms_For_Type (V, S);
8274 -- Check for a duplicate procedure
8276 while Present (S) loop
8277 if Is_Default_Init_Cond_Procedure (S) then
8278 raise Program_Error;
8281 S := Subprograms_For_Type (S);
8283 end Set_Default_Init_Cond_Procedure;
8285 -----------------------------
8286 -- Set_Invariant_Procedure --
8287 -----------------------------
8289 procedure Set_Invariant_Procedure (Id : E; V : E) is
8293 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8295 S := Subprograms_For_Type (Id);
8296 Set_Subprograms_For_Type (Id, V);
8297 Set_Subprograms_For_Type (V, S);
8299 -- Check for duplicate entry
8301 while Present (S) loop
8302 if Is_Invariant_Procedure (S) then
8303 raise Program_Error;
8305 S := Subprograms_For_Type (S);
8308 end Set_Invariant_Procedure;
8310 ----------------------------
8311 -- Set_Predicate_Function --
8312 ----------------------------
8314 procedure Set_Predicate_Function (Id : E; V : E) is
8318 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8320 S := Subprograms_For_Type (Id);
8321 Set_Subprograms_For_Type (Id, V);
8322 Set_Subprograms_For_Type (V, S);
8324 while Present (S) loop
8325 if Is_Predicate_Function (S) then
8326 raise Program_Error;
8328 S := Subprograms_For_Type (S);
8331 end Set_Predicate_Function;
8333 ------------------------------
8334 -- Set_Predicate_Function_M --
8335 ------------------------------
8337 procedure Set_Predicate_Function_M (Id : E; V : E) is
8341 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8343 S := Subprograms_For_Type (Id);
8344 Set_Subprograms_For_Type (Id, V);
8345 Set_Subprograms_For_Type (V, S);
8347 -- Check for duplicates
8349 while Present (S) loop
8350 if Is_Predicate_Function_M (S) then
8351 raise Program_Error;
8353 S := Subprograms_For_Type (S);
8356 end Set_Predicate_Function_M;
8362 function Size_Clause (Id : E) return N is
8364 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8367 ------------------------
8368 -- Stream_Size_Clause --
8369 ------------------------
8371 function Stream_Size_Clause (Id : E) return N is
8373 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8374 end Stream_Size_Clause;
8380 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8386 Kind := E_Access_Subtype;
8390 Kind := E_Array_Subtype;
8392 when E_Class_Wide_Type |
8393 E_Class_Wide_Subtype =>
8394 Kind := E_Class_Wide_Subtype;
8396 when E_Decimal_Fixed_Point_Type |
8397 E_Decimal_Fixed_Point_Subtype =>
8398 Kind := E_Decimal_Fixed_Point_Subtype;
8400 when E_Ordinary_Fixed_Point_Type |
8401 E_Ordinary_Fixed_Point_Subtype =>
8402 Kind := E_Ordinary_Fixed_Point_Subtype;
8404 when E_Private_Type |
8405 E_Private_Subtype =>
8406 Kind := E_Private_Subtype;
8408 when E_Limited_Private_Type |
8409 E_Limited_Private_Subtype =>
8410 Kind := E_Limited_Private_Subtype;
8412 when E_Record_Type_With_Private |
8413 E_Record_Subtype_With_Private =>
8414 Kind := E_Record_Subtype_With_Private;
8416 when E_Record_Type |
8418 Kind := E_Record_Subtype;
8420 when Enumeration_Kind =>
8421 Kind := E_Enumeration_Subtype;
8424 Kind := E_Floating_Point_Subtype;
8426 when Signed_Integer_Kind =>
8427 Kind := E_Signed_Integer_Subtype;
8429 when Modular_Integer_Kind =>
8430 Kind := E_Modular_Integer_Subtype;
8432 when Protected_Kind =>
8433 Kind := E_Protected_Subtype;
8436 Kind := E_Task_Subtype;
8440 raise Program_Error;
8446 ---------------------
8447 -- Type_High_Bound --
8448 ---------------------
8450 function Type_High_Bound (Id : E) return Node_Id is
8451 Rng : constant Node_Id := Scalar_Range (Id);
8453 if Nkind (Rng) = N_Subtype_Indication then
8454 return High_Bound (Range_Expression (Constraint (Rng)));
8456 return High_Bound (Rng);
8458 end Type_High_Bound;
8460 --------------------
8461 -- Type_Low_Bound --
8462 --------------------
8464 function Type_Low_Bound (Id : E) return Node_Id is
8465 Rng : constant Node_Id := Scalar_Range (Id);
8467 if Nkind (Rng) = N_Subtype_Indication then
8468 return Low_Bound (Range_Expression (Constraint (Rng)));
8470 return Low_Bound (Rng);
8474 ---------------------
8475 -- Underlying_Type --
8476 ---------------------
8478 function Underlying_Type (Id : E) return E is
8480 -- For record_with_private the underlying type is always the direct
8481 -- full view. Never try to take the full view of the parent it
8482 -- doesn't make sense.
8484 if Ekind (Id) = E_Record_Type_With_Private then
8485 return Full_View (Id);
8487 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8489 -- If we have an incomplete or private type with a full view,
8490 -- then we return the Underlying_Type of this full view.
8492 if Present (Full_View (Id)) then
8493 if Id = Full_View (Id) then
8495 -- Previous error in declaration
8500 return Underlying_Type (Full_View (Id));
8503 -- If we have a private type with an underlying full view, then we
8504 -- return the Underlying_Type of this underlying full view.
8506 elsif Ekind (Id) in Private_Kind
8507 and then Present (Underlying_Full_View (Id))
8509 return Underlying_Type (Underlying_Full_View (Id));
8511 -- If we have an incomplete entity that comes from the limited
8512 -- view then we return the Underlying_Type of its non-limited
8515 elsif From_Limited_With (Id)
8516 and then Present (Non_Limited_View (Id))
8518 return Underlying_Type (Non_Limited_View (Id));
8520 -- Otherwise check for the case where we have a derived type or
8521 -- subtype, and if so get the Underlying_Type of the parent type.
8523 elsif Etype (Id) /= Id then
8524 return Underlying_Type (Etype (Id));
8526 -- Otherwise we have an incomplete or private type that has
8527 -- no full view, which means that we have not encountered the
8528 -- completion, so return Empty to indicate the underlying type
8529 -- is not yet known.
8535 -- For non-incomplete, non-private types, return the type itself Also
8536 -- for entities that are not types at all return the entity itself.
8541 end Underlying_Type;
8543 ------------------------
8544 -- Write_Entity_Flags --
8545 ------------------------
8547 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8549 procedure W (Flag_Name : String; Flag : Boolean);
8550 -- Write out given flag if it is set
8556 procedure W (Flag_Name : String; Flag : Boolean) is
8560 Write_Str (Flag_Name);
8561 Write_Str (" = True");
8566 -- Start of processing for Write_Entity_Flags
8569 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8570 and then Is_Base_Type (Id)
8573 Write_Str ("Component_Alignment = ");
8575 case Component_Alignment (Id) is
8576 when Calign_Default =>
8577 Write_Str ("Calign_Default");
8579 when Calign_Component_Size =>
8580 Write_Str ("Calign_Component_Size");
8582 when Calign_Component_Size_4 =>
8583 Write_Str ("Calign_Component_Size_4");
8585 when Calign_Storage_Unit =>
8586 Write_Str ("Calign_Storage_Unit");
8592 W ("Address_Taken", Flag104 (Id));
8593 W ("Body_Needed_For_SAL", Flag40 (Id));
8594 W ("C_Pass_By_Copy", Flag125 (Id));
8595 W ("Can_Never_Be_Null", Flag38 (Id));
8596 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8597 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8598 W ("Debug_Info_Off", Flag166 (Id));
8599 W ("Default_Expressions_Processed", Flag108 (Id));
8600 W ("Delay_Cleanups", Flag114 (Id));
8601 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8602 W ("Depends_On_Private", Flag14 (Id));
8603 W ("Discard_Names", Flag88 (Id));
8604 W ("Elaboration_Entity_Required", Flag174 (Id));
8605 W ("Elaborate_Body_Desirable", Flag210 (Id));
8606 W ("Entry_Accepted", Flag152 (Id));
8607 W ("Can_Use_Internal_Rep", Flag229 (Id));
8608 W ("Finalize_Storage_Only", Flag158 (Id));
8609 W ("From_Limited_With", Flag159 (Id));
8610 W ("Has_Aliased_Components", Flag135 (Id));
8611 W ("Has_Alignment_Clause", Flag46 (Id));
8612 W ("Has_All_Calls_Remote", Flag79 (Id));
8613 W ("Has_Anonymous_Master", Flag253 (Id));
8614 W ("Has_Atomic_Components", Flag86 (Id));
8615 W ("Has_Biased_Representation", Flag139 (Id));
8616 W ("Has_Completion", Flag26 (Id));
8617 W ("Has_Completion_In_Body", Flag71 (Id));
8618 W ("Has_Complex_Representation", Flag140 (Id));
8619 W ("Has_Component_Size_Clause", Flag68 (Id));
8620 W ("Has_Contiguous_Rep", Flag181 (Id));
8621 W ("Has_Controlled_Component", Flag43 (Id));
8622 W ("Has_Controlling_Result", Flag98 (Id));
8623 W ("Has_Convention_Pragma", Flag119 (Id));
8624 W ("Has_Default_Aspect", Flag39 (Id));
8625 W ("Has_Default_Init_Cond", Flag3 (Id));
8626 W ("Has_Delayed_Aspects", Flag200 (Id));
8627 W ("Has_Delayed_Freeze", Flag18 (Id));
8628 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8629 W ("Has_Discriminants", Flag5 (Id));
8630 W ("Has_Dispatch_Table", Flag220 (Id));
8631 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8632 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8633 W ("Has_Exit", Flag47 (Id));
8634 W ("Has_Expanded_Contract", Flag240 (Id));
8635 W ("Has_Forward_Instantiation", Flag175 (Id));
8636 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8637 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8638 W ("Has_Homonym", Flag56 (Id));
8639 W ("Has_Implicit_Dereference", Flag251 (Id));
8640 W ("Has_Independent_Components", Flag34 (Id));
8641 W ("Has_Inheritable_Invariants", Flag248 (Id));
8642 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8643 W ("Has_Initial_Value", Flag219 (Id));
8644 W ("Has_Invariants", Flag232 (Id));
8645 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8646 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8647 W ("Has_Master_Entity", Flag21 (Id));
8648 W ("Has_Missing_Return", Flag142 (Id));
8649 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8650 W ("Has_Nested_Subprogram", Flag282 (Id));
8651 W ("Has_Non_Standard_Rep", Flag75 (Id));
8652 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8653 W ("Has_Object_Size_Clause", Flag172 (Id));
8654 W ("Has_Per_Object_Constraint", Flag154 (Id));
8655 W ("Has_Pragma_Controlled", Flag27 (Id));
8656 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8657 W ("Has_Pragma_Inline", Flag157 (Id));
8658 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8659 W ("Has_Pragma_No_Inline", Flag201 (Id));
8660 W ("Has_Pragma_Ordered", Flag198 (Id));
8661 W ("Has_Pragma_Pack", Flag121 (Id));
8662 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8663 W ("Has_Pragma_Pure", Flag203 (Id));
8664 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8665 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8666 W ("Has_Pragma_Unmodified", Flag233 (Id));
8667 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8668 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8669 W ("Has_Predicates", Flag250 (Id));
8670 W ("Has_Primitive_Operations", Flag120 (Id));
8671 W ("Has_Private_Ancestor", Flag151 (Id));
8672 W ("Has_Private_Declaration", Flag155 (Id));
8673 W ("Has_Protected", Flag271 (Id));
8674 W ("Has_Qualified_Name", Flag161 (Id));
8675 W ("Has_RACW", Flag214 (Id));
8676 W ("Has_Record_Rep_Clause", Flag65 (Id));
8677 W ("Has_Recursive_Call", Flag143 (Id));
8678 W ("Has_Shift_Operator", Flag267 (Id));
8679 W ("Has_Size_Clause", Flag29 (Id));
8680 W ("Has_Small_Clause", Flag67 (Id));
8681 W ("Has_Specified_Layout", Flag100 (Id));
8682 W ("Has_Specified_Stream_Input", Flag190 (Id));
8683 W ("Has_Specified_Stream_Output", Flag191 (Id));
8684 W ("Has_Specified_Stream_Read", Flag192 (Id));
8685 W ("Has_Specified_Stream_Write", Flag193 (Id));
8686 W ("Has_Static_Discriminants", Flag211 (Id));
8687 W ("Has_Static_Predicate", Flag269 (Id));
8688 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8689 W ("Has_Storage_Size_Clause", Flag23 (Id));
8690 W ("Has_Stream_Size_Clause", Flag184 (Id));
8691 W ("Has_Task", Flag30 (Id));
8692 W ("Has_Thunks", Flag228 (Id));
8693 W ("Has_Unchecked_Union", Flag123 (Id));
8694 W ("Has_Unknown_Discriminants", Flag72 (Id));
8695 W ("Has_Uplevel_Reference", Flag215 (Id));
8696 W ("Has_Visible_Refinement", Flag263 (Id));
8697 W ("Has_Volatile_Components", Flag87 (Id));
8698 W ("Has_Xref_Entry", Flag182 (Id));
8699 W ("In_Package_Body", Flag48 (Id));
8700 W ("In_Private_Part", Flag45 (Id));
8701 W ("In_Use", Flag8 (Id));
8702 W ("Is_Abstract_Subprogram", Flag19 (Id));
8703 W ("Is_Abstract_Type", Flag146 (Id));
8704 W ("Is_Access_Constant", Flag69 (Id));
8705 W ("Is_Ada_2005_Only", Flag185 (Id));
8706 W ("Is_Ada_2012_Only", Flag199 (Id));
8707 W ("Is_Aliased", Flag15 (Id));
8708 W ("Is_Asynchronous", Flag81 (Id));
8709 W ("Is_Atomic", Flag85 (Id));
8710 W ("Is_Bit_Packed_Array", Flag122 (Id));
8711 W ("Is_CPP_Class", Flag74 (Id));
8712 W ("Is_Called", Flag102 (Id));
8713 W ("Is_Character_Type", Flag63 (Id));
8714 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8715 W ("Is_Child_Unit", Flag73 (Id));
8716 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8717 W ("Is_Compilation_Unit", Flag149 (Id));
8718 W ("Is_Completely_Hidden", Flag103 (Id));
8719 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8720 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8721 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8722 W ("Is_Constrained", Flag12 (Id));
8723 W ("Is_Constructor", Flag76 (Id));
8724 W ("Is_Controlled", Flag42 (Id));
8725 W ("Is_Controlling_Formal", Flag97 (Id));
8726 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8727 W ("Is_Descendent_Of_Address", Flag223 (Id));
8728 W ("Is_Discrim_SO_Function", Flag176 (Id));
8729 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8730 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8731 W ("Is_Dispatching_Operation", Flag6 (Id));
8732 W ("Is_Eliminated", Flag124 (Id));
8733 W ("Is_Entry_Formal", Flag52 (Id));
8734 W ("Is_Exported", Flag99 (Id));
8735 W ("Is_First_Subtype", Flag70 (Id));
8736 W ("Is_For_Access_Subtype", Flag118 (Id));
8737 W ("Is_Formal_Subprogram", Flag111 (Id));
8738 W ("Is_Frozen", Flag4 (Id));
8739 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8740 W ("Is_Generic_Actual_Type", Flag94 (Id));
8741 W ("Is_Generic_Instance", Flag130 (Id));
8742 W ("Is_Generic_Type", Flag13 (Id));
8743 W ("Is_Hidden", Flag57 (Id));
8744 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8745 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8746 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8747 W ("Is_Immediately_Visible", Flag7 (Id));
8748 W ("Is_Implementation_Defined", Flag254 (Id));
8749 W ("Is_Imported", Flag24 (Id));
8750 W ("Is_Independent", Flag268 (Id));
8751 W ("Is_Inlined", Flag11 (Id));
8752 W ("Is_Inlined_Always", Flag1 (Id));
8753 W ("Is_Instantiated", Flag126 (Id));
8754 W ("Is_Interface", Flag186 (Id));
8755 W ("Is_Internal", Flag17 (Id));
8756 W ("Is_Interrupt_Handler", Flag89 (Id));
8757 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8758 W ("Is_Invariant_Procedure", Flag257 (Id));
8759 W ("Is_Itype", Flag91 (Id));
8760 W ("Is_Known_Non_Null", Flag37 (Id));
8761 W ("Is_Known_Null", Flag204 (Id));
8762 W ("Is_Known_Valid", Flag170 (Id));
8763 W ("Is_Limited_Composite", Flag106 (Id));
8764 W ("Is_Limited_Interface", Flag197 (Id));
8765 W ("Is_Limited_Record", Flag25 (Id));
8766 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8767 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8768 W ("Is_Non_Static_Subtype", Flag109 (Id));
8769 W ("Is_Null_Init_Proc", Flag178 (Id));
8770 W ("Is_Obsolescent", Flag153 (Id));
8771 W ("Is_Only_Out_Parameter", Flag226 (Id));
8772 W ("Is_Package_Body_Entity", Flag160 (Id));
8773 W ("Is_Packed", Flag51 (Id));
8774 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8775 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8776 W ("Is_Predicate_Function", Flag255 (Id));
8777 W ("Is_Predicate_Function_M", Flag256 (Id));
8778 W ("Is_Preelaborated", Flag59 (Id));
8779 W ("Is_Primitive", Flag218 (Id));
8780 W ("Is_Primitive_Wrapper", Flag195 (Id));
8781 W ("Is_Private_Composite", Flag107 (Id));
8782 W ("Is_Private_Descendant", Flag53 (Id));
8783 W ("Is_Private_Primitive", Flag245 (Id));
8784 W ("Is_Processed_Transient", Flag252 (Id));
8785 W ("Is_Public", Flag10 (Id));
8786 W ("Is_Pure", Flag44 (Id));
8787 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8788 W ("Is_RACW_Stub_Type", Flag244 (Id));
8789 W ("Is_Raised", Flag224 (Id));
8790 W ("Is_Remote_Call_Interface", Flag62 (Id));
8791 W ("Is_Remote_Types", Flag61 (Id));
8792 W ("Is_Renaming_Of_Object", Flag112 (Id));
8793 W ("Is_Return_Object", Flag209 (Id));
8794 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8795 W ("Is_Shared_Passive", Flag60 (Id));
8796 W ("Is_Static_Type", Flag281 (Id));
8797 W ("Is_Statically_Allocated", Flag28 (Id));
8798 W ("Is_Tag", Flag78 (Id));
8799 W ("Is_Tagged_Type", Flag55 (Id));
8800 W ("Is_Thunk", Flag225 (Id));
8801 W ("Is_Trivial_Subprogram", Flag235 (Id));
8802 W ("Is_True_Constant", Flag163 (Id));
8803 W ("Is_Unchecked_Union", Flag117 (Id));
8804 W ("Is_Underlying_Record_View", Flag246 (Id));
8805 W ("Is_Unimplemented", Flag284 (Id));
8806 W ("Is_Unsigned_Type", Flag144 (Id));
8807 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
8808 W ("Is_Valued_Procedure", Flag127 (Id));
8809 W ("Is_Visible_Formal", Flag206 (Id));
8810 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8811 W ("Is_Volatile", Flag16 (Id));
8812 W ("Itype_Printed", Flag202 (Id));
8813 W ("Kill_Elaboration_Checks", Flag32 (Id));
8814 W ("Kill_Range_Checks", Flag33 (Id));
8815 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8816 W ("Low_Bound_Tested", Flag205 (Id));
8817 W ("Machine_Radix_10", Flag84 (Id));
8818 W ("Materialize_Entity", Flag168 (Id));
8819 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8820 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8821 W ("Must_Have_Preelab_Init", Flag208 (Id));
8822 W ("Needs_Debug_Info", Flag147 (Id));
8823 W ("Needs_No_Actuals", Flag22 (Id));
8824 W ("Never_Set_In_Source", Flag115 (Id));
8825 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8826 W ("No_Pool_Assigned", Flag131 (Id));
8827 W ("No_Predicate_On_actual", Flag275 (Id));
8828 W ("No_Return", Flag113 (Id));
8829 W ("No_Strict_Aliasing", Flag136 (Id));
8830 W ("Non_Binary_Modulus", Flag58 (Id));
8831 W ("Nonzero_Is_True", Flag162 (Id));
8832 W ("OK_To_Rename", Flag247 (Id));
8833 W ("OK_To_Reorder_Components", Flag239 (Id));
8834 W ("Optimize_Alignment_Space", Flag241 (Id));
8835 W ("Optimize_Alignment_Time", Flag242 (Id));
8836 W ("Overlays_Constant", Flag243 (Id));
8837 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8838 W ("Reachable", Flag49 (Id));
8839 W ("Referenced", Flag156 (Id));
8840 W ("Referenced_As_LHS", Flag36 (Id));
8841 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8842 W ("Renamed_In_Spec", Flag231 (Id));
8843 W ("Requires_Overriding", Flag213 (Id));
8844 W ("Return_Present", Flag54 (Id));
8845 W ("Returns_By_Ref", Flag90 (Id));
8846 W ("Returns_Limited_View", Flag134 (Id));
8847 W ("Reverse_Bit_Order", Flag164 (Id));
8848 W ("Reverse_Storage_Order", Flag93 (Id));
8849 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8850 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8851 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8852 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8853 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8854 W ("SSO_Set_High_By_Default", Flag273 (Id));
8855 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8856 W ("Static_Elaboration_Desired", Flag77 (Id));
8857 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8858 W ("Strict_Alignment", Flag145 (Id));
8859 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8860 W ("Suppress_Initialization", Flag105 (Id));
8861 W ("Suppress_Style_Checks", Flag165 (Id));
8862 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8863 W ("Treat_As_Volatile", Flag41 (Id));
8864 W ("Universal_Aliasing", Flag216 (Id));
8865 W ("Used_As_Generic_Actual", Flag222 (Id));
8866 W ("Uses_Sec_Stack", Flag95 (Id));
8867 W ("Warnings_Off", Flag96 (Id));
8868 W ("Warnings_Off_Used", Flag236 (Id));
8869 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8870 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8871 W ("Was_Hidden", Flag196 (Id));
8872 end Write_Entity_Flags;
8874 -----------------------
8875 -- Write_Entity_Info --
8876 -----------------------
8878 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8880 procedure Write_Attribute (Which : String; Nam : E);
8881 -- Write attribute value with given string name
8883 procedure Write_Kind (Id : Entity_Id);
8884 -- Write Ekind field of entity
8886 ---------------------
8887 -- Write_Attribute --
8888 ---------------------
8890 procedure Write_Attribute (Which : String; Nam : E) is
8894 Write_Int (Int (Nam));
8896 Write_Name (Chars (Nam));
8898 end Write_Attribute;
8904 procedure Write_Kind (Id : Entity_Id) is
8905 K : constant String := Entity_Kind'Image (Ekind (Id));
8909 Write_Str (" Kind ");
8911 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8912 Write_Str ("TAGGED ");
8915 Write_Str (K (3 .. K'Length));
8918 if Is_Type (Id) and then Depends_On_Private (Id) then
8919 Write_Str ("Depends_On_Private ");
8923 -- Start of processing for Write_Entity_Info
8927 Write_Attribute ("Name ", Id);
8928 Write_Int (Int (Id));
8932 Write_Attribute (" Type ", Etype (Id));
8934 Write_Attribute (" Scope ", Scope (Id));
8939 when Discrete_Kind =>
8940 Write_Str ("Bounds: Id = ");
8942 if Present (Scalar_Range (Id)) then
8943 Write_Int (Int (Type_Low_Bound (Id)));
8944 Write_Str (" .. Id = ");
8945 Write_Int (Int (Type_High_Bound (Id)));
8947 Write_Str ("Empty");
8958 (" Component Type ", Component_Type (Id));
8961 Write_Str (" Indexes ");
8963 Index := First_Index (Id);
8964 while Present (Index) loop
8965 Write_Attribute (" ", Etype (Index));
8966 Index := Next_Index (Index);
8974 (" Directly Designated Type ",
8975 Directly_Designated_Type (Id));
8978 when Overloadable_Kind =>
8979 if Present (Homonym (Id)) then
8980 Write_Str (" Homonym ");
8981 Write_Name (Chars (Homonym (Id)));
8983 Write_Int (Int (Homonym (Id)));
8990 if Ekind (Scope (Id)) in Record_Kind then
8992 " Original_Record_Component ",
8993 Original_Record_Component (Id));
8994 Write_Int (Int (Original_Record_Component (Id)));
8998 when others => null;
9000 end Write_Entity_Info;
9002 -----------------------
9003 -- Write_Field6_Name --
9004 -----------------------
9006 procedure Write_Field6_Name (Id : Entity_Id) is
9007 pragma Unreferenced (Id);
9009 Write_Str ("First_Rep_Item");
9010 end Write_Field6_Name;
9012 -----------------------
9013 -- Write_Field7_Name --
9014 -----------------------
9016 procedure Write_Field7_Name (Id : Entity_Id) is
9017 pragma Unreferenced (Id);
9019 Write_Str ("Freeze_Node");
9020 end Write_Field7_Name;
9022 -----------------------
9023 -- Write_Field8_Name --
9024 -----------------------
9026 procedure Write_Field8_Name (Id : Entity_Id) is
9030 Write_Str ("Associated_Node_For_Itype");
9033 Write_Str ("Dependent_Instances");
9036 Write_Str ("First_Exit_Statement");
9039 Write_Str ("Hiding_Loop_Variable");
9043 E_Subprogram_Body =>
9044 Write_Str ("Mechanism");
9048 Write_Str ("Normalized_First_Bit");
9050 when E_Abstract_State =>
9051 Write_Str ("Refinement_Constituents");
9053 when E_Return_Statement =>
9054 Write_Str ("Return_Applies_To");
9057 Write_Str ("Field8??");
9059 end Write_Field8_Name;
9061 -----------------------
9062 -- Write_Field9_Name --
9063 -----------------------
9065 procedure Write_Field9_Name (Id : Entity_Id) is
9069 Write_Str ("Class_Wide_Type");
9072 Write_Str ("Current_Value");
9074 when E_Abstract_State =>
9075 Write_Str ("Part_Of_Constituents");
9078 E_Generic_Function |
9080 E_Generic_Procedure |
9083 Write_Str ("Renaming_Map");
9086 Write_Str ("Field9??");
9088 end Write_Field9_Name;
9090 ------------------------
9091 -- Write_Field10_Name --
9092 ------------------------
9094 procedure Write_Field10_Name (Id : Entity_Id) is
9097 when Class_Wide_Kind |
9103 Write_Str ("Direct_Primitive_Operations");
9105 when E_In_Parameter |
9107 Write_Str ("Discriminal_Link");
9110 Write_Str ("Float_Rep");
9116 Write_Str ("Handler_Records");
9120 Write_Str ("Normalized_Position_Max");
9123 Write_Str ("Field10??");
9125 end Write_Field10_Name;
9127 ------------------------
9128 -- Write_Field11_Name --
9129 ------------------------
9131 procedure Write_Field11_Name (Id : Entity_Id) is
9135 Write_Str ("Block_Node");
9139 Write_Str ("Component_Bit_Offset");
9142 Write_Str ("Entry_Component");
9144 when E_Enumeration_Literal =>
9145 Write_Str ("Enumeration_Pos");
9149 Write_Str ("Full_View");
9151 when E_Generic_Package =>
9152 Write_Str ("Generic_Homonym");
9158 Write_Str ("Protected_Body_Subprogram");
9161 Write_Str ("Field11??");
9163 end Write_Field11_Name;
9165 ------------------------
9166 -- Write_Field12_Name --
9167 ------------------------
9169 procedure Write_Field12_Name (Id : Entity_Id) is
9173 Write_Str ("Associated_Formal_Package");
9176 Write_Str ("Barrier_Function");
9178 when E_Enumeration_Literal =>
9179 Write_Str ("Enumeration_Rep");
9187 E_In_Out_Parameter |
9191 Write_Str ("Esize");
9195 Write_Str ("Next_Inlined_Subprogram");
9198 Write_Str ("Field12??");
9200 end Write_Field12_Name;
9202 ------------------------
9203 -- Write_Field13_Name --
9204 ------------------------
9206 procedure Write_Field13_Name (Id : Entity_Id) is
9211 Write_Str ("Component_Clause");
9214 Write_Str ("Elaboration_Entity");
9218 Generic_Unit_Kind =>
9219 Write_Str ("Elaboration_Entity");
9223 Write_Str ("Extra_Accessibility");
9226 Write_Str ("RM_Size");
9229 Write_Str ("Field13??");
9231 end Write_Field13_Name;
9233 -----------------------
9234 -- Write_Field14_Name --
9235 -----------------------
9237 procedure Write_Field14_Name (Id : Entity_Id) is
9246 Write_Str ("Alignment");
9250 Write_Str ("Normalized_Position");
9256 Write_Str ("Postconditions_Proc");
9258 when E_Generic_Package |
9260 Write_Str ("Shadow_Entities");
9263 Write_Str ("Field14??");
9265 end Write_Field14_Name;
9267 ------------------------
9268 -- Write_Field15_Name --
9269 ------------------------
9271 procedure Write_Field15_Name (Id : Entity_Id) is
9274 when E_Discriminant =>
9275 Write_Str ("Discriminant_Number");
9278 Write_Str ("DT_Entry_Count");
9282 Write_Str ("DT_Position");
9285 Write_Str ("Entry_Parameters_Type");
9288 Write_Str ("Extra_Formal");
9291 Write_Str ("Pending_Access_Types");
9295 Write_Str ("Related_Instance");
9299 Write_Str ("Status_Flag_Or_Transient_Decl");
9302 Write_Str ("Field15??");
9304 end Write_Field15_Name;
9306 ------------------------
9307 -- Write_Field16_Name --
9308 ------------------------
9310 procedure Write_Field16_Name (Id : Entity_Id) is
9313 when E_Record_Type |
9314 E_Record_Type_With_Private =>
9315 Write_Str ("Access_Disp_Table");
9317 when E_Abstract_State =>
9318 Write_Str ("Body_References");
9320 when E_Record_Subtype |
9321 E_Class_Wide_Subtype =>
9322 Write_Str ("Cloned_Subtype");
9326 Write_Str ("DTC_Entity");
9329 Write_Str ("Entry_Formal");
9334 Write_Str ("First_Private_Entity");
9336 when Enumeration_Kind =>
9337 Write_Str ("Lit_Strings");
9339 when Decimal_Fixed_Point_Kind =>
9340 Write_Str ("Scale_Value");
9342 when E_String_Literal_Subtype =>
9343 Write_Str ("String_Literal_Length");
9347 Write_Str ("Unset_Reference");
9350 Write_Str ("Field16??");
9352 end Write_Field16_Name;
9354 ------------------------
9355 -- Write_Field17_Name --
9356 ------------------------
9358 procedure Write_Field17_Name (Id : Entity_Id) is
9363 E_Generic_In_Out_Parameter |
9365 Write_Str ("Actual_Subtype");
9368 Write_Str ("Digits_Value");
9370 when E_Discriminant =>
9371 Write_Str ("Discriminal");
9380 E_Generic_Function |
9382 E_Generic_Procedure |
9390 E_Return_Statement |
9392 E_Subprogram_Type =>
9393 Write_Str ("First_Entity");
9396 Write_Str ("First_Index");
9398 when Enumeration_Kind =>
9399 Write_Str ("First_Literal");
9402 Write_Str ("Master_Id");
9404 when Modular_Integer_Kind =>
9405 Write_Str ("Modulus");
9407 when E_Incomplete_Subtype =>
9408 if From_Limited_With (Id) then
9409 Write_Str ("Non_Limited_View");
9413 Write_Str ("Prival");
9416 Write_Str ("Field17??");
9418 end Write_Field17_Name;
9420 ------------------------
9421 -- Write_Field18_Name --
9422 ------------------------
9424 procedure Write_Field18_Name (Id : Entity_Id) is
9427 when E_Enumeration_Literal |
9431 Write_Str ("Alias");
9433 when E_Record_Type =>
9434 Write_Str ("Corresponding_Concurrent_Type");
9436 when E_Subprogram_Body =>
9437 Write_Str ("Corresponding_Protected_Entry");
9439 when Concurrent_Kind =>
9440 Write_Str ("Corresponding_Record_Type");
9445 Write_Str ("Enclosing_Scope");
9447 when E_Entry_Index_Parameter =>
9448 Write_Str ("Entry_Index_Constant");
9450 when E_Class_Wide_Subtype |
9451 E_Access_Protected_Subprogram_Type |
9452 E_Anonymous_Access_Protected_Subprogram_Type |
9453 E_Access_Subprogram_Type |
9455 Write_Str ("Equivalent_Type");
9457 when Fixed_Point_Kind =>
9458 Write_Str ("Delta_Value");
9460 when Enumeration_Kind =>
9461 Write_Str ("Lit_Indexes");
9463 when Incomplete_Or_Private_Kind |
9465 Write_Str ("Private_Dependents");
9468 Write_Str ("Renamed_Object");
9472 E_Generic_Function |
9473 E_Generic_Procedure |
9474 E_Generic_Package =>
9475 Write_Str ("Renamed_Entity");
9477 when E_String_Literal_Subtype =>
9478 Write_Str ("String_Literal_Low_Bound");
9481 Write_Str ("Field18??");
9483 end Write_Field18_Name;
9485 -----------------------
9486 -- Write_Field19_Name --
9487 -----------------------
9489 procedure Write_Field19_Name (Id : Entity_Id) is
9493 E_Generic_Package =>
9494 Write_Str ("Body_Entity");
9496 when E_Discriminant =>
9497 Write_Str ("Corresponding_Discriminant");
9500 Write_Str ("Default_Aspect_Value");
9502 when E_Abstract_State |
9504 E_Incomplete_Type =>
9505 Write_Str ("Non_Limited_View");
9507 when E_Array_Type =>
9508 Write_Str ("Default_Component_Value");
9510 when E_Protected_Type =>
9511 Write_Str ("Entry_Bodies_Array");
9515 E_Subprogram_Type =>
9516 Write_Str ("Extra_Accessibility_Of_Result");
9518 when E_Record_Type =>
9519 Write_Str ("Parent_Subtype");
9523 Write_Str ("Size_Check_Code");
9525 when E_Package_Body |
9527 Write_Str ("Spec_Entity");
9529 when Private_Kind =>
9530 Write_Str ("Underlying_Full_View");
9533 Write_Str ("Field19??");
9535 end Write_Field19_Name;
9537 -----------------------
9538 -- Write_Field20_Name --
9539 -----------------------
9541 procedure Write_Field20_Name (Id : Entity_Id) is
9545 Write_Str ("Component_Type");
9547 when E_In_Parameter |
9548 E_Generic_In_Parameter =>
9549 Write_Str ("Default_Value");
9552 Write_Str ("Directly_Designated_Type");
9555 Write_Str ("Discriminant_Checking_Func");
9557 when E_Discriminant =>
9558 Write_Str ("Discriminant_Default_Value");
9567 E_Generic_Function |
9569 E_Generic_Procedure |
9577 E_Return_Statement |
9579 E_Subprogram_Type =>
9580 Write_Str ("Last_Entity");
9584 Write_Str ("Prival_Link");
9587 Write_Str ("Scalar_Range");
9590 Write_Str ("Register_Exception_Call");
9593 Write_Str ("Field20??");
9595 end Write_Field20_Name;
9597 -----------------------
9598 -- Write_Field21_Name --
9599 -----------------------
9601 procedure Write_Field21_Name (Id : Entity_Id) is
9605 Write_Str ("Accept_Address");
9607 when E_In_Parameter =>
9608 Write_Str ("Default_Expr_Function");
9610 when Concurrent_Kind |
9611 Incomplete_Or_Private_Kind |
9615 Write_Str ("Discriminant_Constraint");
9620 E_Generic_Function |
9622 E_Generic_Procedure |
9624 Write_Str ("Interface_Name");
9627 Modular_Integer_Kind =>
9628 Write_Str ("Original_Array_Type");
9630 when Fixed_Point_Kind =>
9631 Write_Str ("Small_Value");
9634 Write_Str ("Field21??");
9636 end Write_Field21_Name;
9638 -----------------------
9639 -- Write_Field22_Name --
9640 -----------------------
9642 procedure Write_Field22_Name (Id : Entity_Id) is
9646 Write_Str ("Associated_Storage_Pool");
9649 Write_Str ("Component_Size");
9651 when E_Record_Type =>
9652 Write_Str ("Corresponding_Remote_Type");
9656 Write_Str ("Original_Record_Component");
9658 when E_Enumeration_Literal =>
9659 Write_Str ("Enumeration_Rep_Expr");
9661 when E_Record_Type_With_Private |
9662 E_Record_Subtype_With_Private |
9665 E_Limited_Private_Type |
9666 E_Limited_Private_Subtype =>
9667 Write_Str ("Private_View");
9670 Write_Str ("Protected_Formal");
9680 E_Generic_Function |
9681 E_Generic_Procedure |
9684 E_Return_Statement |
9687 Write_Str ("Scope_Depth_Value");
9690 Write_Str ("Shared_Var_Procs_Instance");
9693 Write_Str ("Field22??");
9695 end Write_Field22_Name;
9697 ------------------------
9698 -- Write_Field23_Name --
9699 ------------------------
9701 procedure Write_Field23_Name (Id : Entity_Id) is
9704 when E_Discriminant =>
9705 Write_Str ("CR_Discriminant");
9708 Write_Str ("Entry_Cancel_Parameter");
9710 when E_Enumeration_Type =>
9711 Write_Str ("Enum_Pos_To_Rep");
9715 Write_Str ("Extra_Constrained");
9718 Write_Str ("Finalization_Master");
9720 when E_Generic_Function |
9722 E_Generic_Procedure =>
9723 Write_Str ("Inner_Instances");
9726 Write_Str ("Packed_Array_Impl_Type");
9729 Write_Str ("Protection_Object");
9731 when Concurrent_Kind |
9732 Incomplete_Or_Private_Kind |
9736 Write_Str ("Stored_Constraint");
9740 if Present (Scope (Id))
9741 and then Is_Protected_Type (Scope (Id))
9743 Write_Str ("Protection_Object");
9745 Write_Str ("Generic_Renamings");
9749 if Is_Generic_Instance (Id) then
9750 Write_Str ("Generic_Renamings");
9752 Write_Str ("Limited_View");
9756 Write_Str ("Field23??");
9758 end Write_Field23_Name;
9760 ------------------------
9761 -- Write_Field24_Name --
9762 ------------------------
9764 procedure Write_Field24_Name (Id : Entity_Id) is
9770 Write_Str ("Related_Expression");
9775 Write_Str ("Subps_Index");
9778 Write_Str ("Field24???");
9780 end Write_Field24_Name;
9782 ------------------------
9783 -- Write_Field25_Name --
9784 ------------------------
9786 procedure Write_Field25_Name (Id : Entity_Id) is
9789 when E_Generic_Package |
9791 Write_Str ("Abstract_States");
9794 Write_Str ("Debug_Renaming_Link");
9797 Write_Str ("DT_Offset_To_Top_Func");
9801 Write_Str ("Interface_Alias");
9803 when E_Record_Type |
9805 E_Record_Type_With_Private |
9806 E_Record_Subtype_With_Private =>
9807 Write_Str ("Interfaces");
9811 Write_Str ("Related_Array_Object");
9814 Write_Str ("Task_Body_Procedure");
9818 Write_Str ("PPC_Wrapper");
9820 when Discrete_Kind =>
9821 Write_Str ("Static_Discrete_Predicate");
9824 Write_Str ("Static_Real_Or_String_Predicate");
9827 Write_Str ("Field25??");
9829 end Write_Field25_Name;
9831 ------------------------
9832 -- Write_Field26_Name --
9833 ------------------------
9835 procedure Write_Field26_Name (Id : Entity_Id) is
9838 when E_Record_Type |
9839 E_Record_Type_With_Private =>
9840 Write_Str ("Dispatch_Table_Wrappers");
9842 when E_In_Out_Parameter |
9845 Write_Str ("Last_Assignment");
9849 Write_Str ("Overridden_Operation");
9851 when E_Generic_Package |
9853 Write_Str ("Package_Instantiation");
9857 Write_Str ("Related_Type");
9861 Write_Str ("Storage_Size_Variable");
9864 Write_Str ("Field26??");
9866 end Write_Field26_Name;
9868 ------------------------
9869 -- Write_Field27_Name --
9870 ------------------------
9872 procedure Write_Field27_Name (Id : Entity_Id) is
9877 Write_Str ("Current_Use_Clause");
9882 Write_Str ("Related_Type");
9886 Write_Str ("Wrapped_Entity");
9889 Write_Str ("Field27??");
9891 end Write_Field27_Name;
9893 ------------------------
9894 -- Write_Field28_Name --
9895 ------------------------
9897 procedure Write_Field28_Name (Id : Entity_Id) is
9905 E_Subprogram_Type =>
9906 Write_Str ("Extra_Formals");
9910 Write_Str ("Finalizer");
9914 Write_Str ("Initialization_Statements");
9916 when E_Access_Subprogram_Type =>
9917 Write_Str ("Original_Access_Type");
9920 Write_Str ("Relative_Deadline_Variable");
9922 when E_Record_Type =>
9923 Write_Str ("Underlying_Record_View");
9926 Write_Str ("Field28??");
9928 end Write_Field28_Name;
9930 ------------------------
9931 -- Write_Field29_Name --
9932 ------------------------
9934 procedure Write_Field29_Name (Id : Entity_Id) is
9939 Write_Str ("BIP_Initialization_Call");
9942 Write_Str ("Subprograms_For_Type");
9945 Write_Str ("Field29??");
9947 end Write_Field29_Name;
9949 ------------------------
9950 -- Write_Field30_Name --
9951 ------------------------
9953 procedure Write_Field30_Name (Id : Entity_Id) is
9957 Write_Str ("Corresponding_Equality");
9961 Write_Str ("Last_Aggregate_Assignment");
9964 Write_Str ("Static_Initialization");
9967 Write_Str ("Field30??");
9969 end Write_Field30_Name;
9971 ------------------------
9972 -- Write_Field31_Name --
9973 ------------------------
9975 procedure Write_Field31_Name (Id : Entity_Id) is
9980 Write_Str ("Thunk_Entity");
9983 Write_Str ("Derived_Type_Link");
9987 E_In_Out_Parameter |
9991 Write_Str ("Activation_Record_Component");
9994 Write_Str ("Field31??");
9996 end Write_Field31_Name;
9998 ------------------------
9999 -- Write_Field32_Name --
10000 ------------------------
10002 procedure Write_Field32_Name (Id : Entity_Id) is
10005 when E_Abstract_State |
10008 Write_Str ("Encapsulating_State");
10011 E_Generic_Function |
10012 E_Generic_Package |
10013 E_Generic_Procedure |
10017 E_Subprogram_Body =>
10018 Write_Str ("SPARK_Pragma");
10021 Write_Str ("No_Tagged_Streams_Pragma");
10024 Write_Str ("Field32??");
10026 end Write_Field32_Name;
10028 ------------------------
10029 -- Write_Field33_Name --
10030 ------------------------
10032 procedure Write_Field33_Name (Id : Entity_Id) is
10035 when E_Generic_Package |
10038 Write_Str ("SPARK_Aux_Pragma");
10044 Write_Str ("Linker_Section_Pragma");
10047 Write_Str ("Field33??");
10049 end Write_Field33_Name;
10051 ------------------------
10052 -- Write_Field34_Name --
10053 ------------------------
10055 procedure Write_Field34_Name (Id : Entity_Id) is
10060 E_Generic_Package |
10063 E_Subprogram_Body |
10066 Generic_Subprogram_Kind |
10068 Write_Str ("Contract");
10071 Write_Str ("Field34??");
10073 end Write_Field34_Name;
10075 ------------------------
10076 -- Write_Field35_Name --
10077 ------------------------
10079 procedure Write_Field35_Name (Id : Entity_Id) is
10082 when Subprogram_Kind =>
10083 Write_Str ("Import_Pragma");
10086 Write_Str ("Field35??");
10088 end Write_Field35_Name;
10090 ------------------------
10091 -- Write_Field36_Name --
10092 ------------------------
10094 procedure Write_Field36_Name (Id : Entity_Id) is
10098 Write_Str ("Field36??");
10100 end Write_Field36_Name;
10102 ------------------------
10103 -- Write_Field37_Name --
10104 ------------------------
10106 procedure Write_Field37_Name (Id : Entity_Id) is
10107 pragma Unreferenced (Id);
10109 Write_Str ("Associated_Entity");
10110 end Write_Field37_Name;
10112 ------------------------
10113 -- Write_Field38_Name --
10114 ------------------------
10116 procedure Write_Field38_Name (Id : Entity_Id) is
10120 Write_Str ("Field38??");
10122 end Write_Field38_Name;
10124 ------------------------
10125 -- Write_Field39_Name --
10126 ------------------------
10128 procedure Write_Field39_Name (Id : Entity_Id) is
10132 Write_Str ("Field39??");
10134 end Write_Field39_Name;
10136 ------------------------
10137 -- Write_Field40_Name --
10138 ------------------------
10140 procedure Write_Field40_Name (Id : Entity_Id) is
10144 Write_Str ("Field40??");
10146 end Write_Field40_Name;
10148 ------------------------
10149 -- Write_Field41_Name --
10150 ------------------------
10152 procedure Write_Field41_Name (Id : Entity_Id) is
10156 Write_Str ("Field41??");
10158 end Write_Field41_Name;
10160 -------------------------
10161 -- Iterator Procedures --
10162 -------------------------
10164 procedure Proc_Next_Component (N : in out Node_Id) is
10166 N := Next_Component (N);
10167 end Proc_Next_Component;
10169 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10171 N := Next_Entity (N);
10172 while Present (N) loop
10173 exit when Ekind_In (N, E_Component, E_Discriminant);
10174 N := Next_Entity (N);
10176 end Proc_Next_Component_Or_Discriminant;
10178 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10180 N := Next_Discriminant (N);
10181 end Proc_Next_Discriminant;
10183 procedure Proc_Next_Formal (N : in out Node_Id) is
10185 N := Next_Formal (N);
10186 end Proc_Next_Formal;
10188 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10190 N := Next_Formal_With_Extras (N);
10191 end Proc_Next_Formal_With_Extras;
10193 procedure Proc_Next_Index (N : in out Node_Id) is
10195 N := Next_Index (N);
10196 end Proc_Next_Index;
10198 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10200 N := Next_Inlined_Subprogram (N);
10201 end Proc_Next_Inlined_Subprogram;
10203 procedure Proc_Next_Literal (N : in out Node_Id) is
10205 N := Next_Literal (N);
10206 end Proc_Next_Literal;
10208 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10210 N := Next_Stored_Discriminant (N);
10211 end Proc_Next_Stored_Discriminant;