1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Refinement_Constituents Elist8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Part_Of_Constituents Elist9
91 -- Encapsulating_State Node10
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
96 -- Normalized_Position_Max Uint10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- Normalized_Position Uint14
118 -- Postconditions_Proc Node14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Pending_Access_Types Elist15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
130 -- Access_Disp_Table Elist16
131 -- Body_References Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- Scale_Value Uint16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
153 -- Corresponding_Concurrent_Type Node18
154 -- Corresponding_Protected_Entry Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Lit_Indexes Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
163 -- String_Literal_Low_Bound Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Entry_Bodies_Array Node19
170 -- Extra_Accessibility_Of_Result 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 -- Uplevel_References Elist24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Discrete_Predicate List25
225 -- Static_Real_Or_String_Predicate Node25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Storage_Size_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Original_Access_Type Node28
242 -- Relative_Deadline_Variable Node28
243 -- Underlying_Record_View Node28
245 -- BIP_Initialization_Call Node29
246 -- Subprograms_For_Type Node29
248 -- Corresponding_Equality Node30
249 -- Last_Aggregate_Assignment Node30
250 -- Static_Initialization Node30
252 -- Derived_Type_Link Node31
253 -- Thunk_Entity Node31
255 -- SPARK_Pragma Node32
256 -- No_Tagged_Streams_Pragma Node32
258 -- Linker_Section_Pragma Node33
259 -- SPARK_Aux_Pragma Node33
263 -- Import_Pragma Node35
265 ---------------------------------------------
266 -- Usage of Flags in Defining Entity Nodes --
267 ---------------------------------------------
269 -- All flags are unique, there is no overlaying, so each flag is physically
270 -- present in every entity. However, for many of the flags, it only makes
271 -- sense for them to be set true for certain subsets of entity kinds. See
272 -- the spec of Einfo for further details.
274 -- Is_Inlined_Always Flag1
275 -- Is_Hidden_Non_Overridden_Subpgm Flag2
276 -- Has_Default_Init_Cond Flag3
278 -- Has_Discriminants Flag5
279 -- Is_Dispatching_Operation Flag6
280 -- Is_Immediately_Visible Flag7
282 -- Is_Potentially_Use_Visible Flag9
286 -- Is_Constrained Flag12
287 -- Is_Generic_Type Flag13
288 -- Depends_On_Private Flag14
290 -- Is_Volatile Flag16
291 -- Is_Internal Flag17
292 -- Has_Delayed_Freeze Flag18
293 -- Is_Abstract_Subprogram Flag19
294 -- Is_Concurrent_Record_Type Flag20
296 -- Has_Master_Entity Flag21
297 -- Needs_No_Actuals Flag22
298 -- Has_Storage_Size_Clause Flag23
299 -- Is_Imported Flag24
300 -- Is_Limited_Record Flag25
301 -- Has_Completion Flag26
302 -- Has_Pragma_Controlled Flag27
303 -- Is_Statically_Allocated Flag28
304 -- Has_Size_Clause Flag29
307 -- Checks_May_Be_Suppressed Flag31
308 -- Kill_Elaboration_Checks Flag32
309 -- Kill_Range_Checks Flag33
310 -- Has_Independent_Components Flag34
311 -- Is_Class_Wide_Equivalent_Type Flag35
312 -- Referenced_As_LHS Flag36
313 -- Is_Known_Non_Null Flag37
314 -- Can_Never_Be_Null Flag38
315 -- Has_Default_Aspect Flag39
316 -- Body_Needed_For_SAL Flag40
318 -- Treat_As_Volatile Flag41
319 -- Is_Controlled Flag42
320 -- Has_Controlled_Component Flag43
322 -- In_Private_Part Flag45
323 -- Has_Alignment_Clause Flag46
325 -- In_Package_Body Flag48
327 -- Delay_Subprogram_Descriptors Flag50
330 -- Is_Entry_Formal Flag52
331 -- Is_Private_Descendant Flag53
332 -- Return_Present Flag54
333 -- Is_Tagged_Type Flag55
334 -- Has_Homonym Flag56
336 -- Non_Binary_Modulus Flag58
337 -- Is_Preelaborated Flag59
338 -- Is_Shared_Passive Flag60
340 -- Is_Remote_Types Flag61
341 -- Is_Remote_Call_Interface Flag62
342 -- Is_Character_Type Flag63
343 -- Is_Intrinsic_Subprogram Flag64
344 -- Has_Record_Rep_Clause Flag65
345 -- Has_Enumeration_Rep_Clause Flag66
346 -- Has_Small_Clause Flag67
347 -- Has_Component_Size_Clause Flag68
348 -- Is_Access_Constant Flag69
349 -- Is_First_Subtype Flag70
351 -- Has_Completion_In_Body Flag71
352 -- Has_Unknown_Discriminants Flag72
353 -- Is_Child_Unit Flag73
354 -- Is_CPP_Class Flag74
355 -- Has_Non_Standard_Rep Flag75
356 -- Is_Constructor Flag76
357 -- Static_Elaboration_Desired Flag77
359 -- Has_All_Calls_Remote Flag79
360 -- Is_Constr_Subt_For_U_Nominal Flag80
362 -- Is_Asynchronous Flag81
363 -- Has_Gigi_Rep_Item Flag82
364 -- Has_Machine_Radix_Clause Flag83
365 -- Machine_Radix_10 Flag84
367 -- Has_Atomic_Components Flag86
368 -- Has_Volatile_Components Flag87
369 -- Discard_Names Flag88
370 -- Is_Interrupt_Handler Flag89
371 -- Returns_By_Ref Flag90
374 -- Size_Known_At_Compile_Time Flag92
375 -- Reverse_Storage_Order Flag93
376 -- Is_Generic_Actual_Type Flag94
377 -- Uses_Sec_Stack Flag95
378 -- Warnings_Off Flag96
379 -- Is_Controlling_Formal Flag97
380 -- Has_Controlling_Result Flag98
381 -- Is_Exported Flag99
382 -- Has_Specified_Layout Flag100
384 -- Has_Nested_Block_With_Handler Flag101
386 -- Is_Completely_Hidden Flag103
387 -- Address_Taken Flag104
388 -- Suppress_Initialization Flag105
389 -- Is_Limited_Composite Flag106
390 -- Is_Private_Composite Flag107
391 -- Default_Expressions_Processed Flag108
392 -- Is_Non_Static_Subtype Flag109
393 -- Has_Out_Or_In_Out_Parameter Flag110
395 -- Is_Formal_Subprogram Flag111
396 -- Is_Renaming_Of_Object Flag112
398 -- Delay_Cleanups Flag114
399 -- Never_Set_In_Source Flag115
400 -- Is_Visible_Lib_Unit Flag116
401 -- Is_Unchecked_Union Flag117
402 -- Is_For_Access_Subtype Flag118
403 -- Has_Convention_Pragma Flag119
404 -- Has_Primitive_Operations Flag120
406 -- Has_Pragma_Pack Flag121
407 -- Is_Bit_Packed_Array Flag122
408 -- Has_Unchecked_Union Flag123
409 -- Is_Eliminated Flag124
410 -- C_Pass_By_Copy Flag125
411 -- Is_Instantiated Flag126
412 -- Is_Valued_Procedure Flag127
413 -- (used for Component_Alignment) Flag128
414 -- (used for Component_Alignment) Flag129
415 -- Is_Generic_Instance Flag130
417 -- No_Pool_Assigned Flag131
418 -- Is_Default_Init_Cond_Procedure Flag132
419 -- Has_Inherited_Default_Init_Cond Flag133
420 -- Returns_Limited_View Flag134
421 -- Has_Aliased_Components Flag135
422 -- No_Strict_Aliasing Flag136
423 -- Is_Machine_Code_Subprogram Flag137
424 -- Is_Packed_Array_Impl_Type Flag138
425 -- Has_Biased_Representation Flag139
426 -- Has_Complex_Representation Flag140
428 -- Is_Constr_Subt_For_UN_Aliased Flag141
429 -- Has_Missing_Return Flag142
430 -- Has_Recursive_Call Flag143
431 -- Is_Unsigned_Type Flag144
432 -- Strict_Alignment Flag145
433 -- Is_Abstract_Type Flag146
434 -- Needs_Debug_Info Flag147
435 -- Suppress_Elaboration_Warnings Flag148
436 -- Is_Compilation_Unit Flag149
437 -- Has_Pragma_Elaborate_Body Flag150
439 -- Has_Private_Ancestor Flag151
440 -- Entry_Accepted Flag152
441 -- Is_Obsolescent Flag153
442 -- Has_Per_Object_Constraint Flag154
443 -- Has_Private_Declaration Flag155
444 -- Referenced Flag156
445 -- Has_Pragma_Inline Flag157
446 -- Finalize_Storage_Only Flag158
447 -- From_Limited_With Flag159
448 -- Is_Package_Body_Entity Flag160
450 -- Has_Qualified_Name Flag161
451 -- Nonzero_Is_True Flag162
452 -- Is_True_Constant Flag163
453 -- Reverse_Bit_Order Flag164
454 -- Suppress_Style_Checks Flag165
455 -- Debug_Info_Off Flag166
456 -- Sec_Stack_Needed_For_Return Flag167
457 -- Materialize_Entity Flag168
458 -- Has_Pragma_Thread_Local_Storage Flag169
459 -- Is_Known_Valid Flag170
461 -- Is_Hidden_Open_Scope Flag171
462 -- Has_Object_Size_Clause Flag172
463 -- Has_Fully_Qualified_Name Flag173
464 -- Elaboration_Entity_Required Flag174
465 -- Has_Forward_Instantiation Flag175
466 -- Is_Discrim_SO_Function Flag176
467 -- Size_Depends_On_Discriminant Flag177
468 -- Is_Null_Init_Proc Flag178
469 -- Has_Pragma_Pure_Function Flag179
470 -- Has_Pragma_Unreferenced Flag180
472 -- Has_Contiguous_Rep Flag181
473 -- Has_Xref_Entry Flag182
474 -- Must_Be_On_Byte_Boundary Flag183
475 -- Has_Stream_Size_Clause Flag184
476 -- Is_Ada_2005_Only Flag185
477 -- Is_Interface Flag186
478 -- Has_Constrained_Partial_View Flag187
479 -- Uses_Lock_Free Flag188
480 -- Is_Pure_Unit_Access_Type Flag189
481 -- Has_Specified_Stream_Input Flag190
483 -- Has_Specified_Stream_Output Flag191
484 -- Has_Specified_Stream_Read Flag192
485 -- Has_Specified_Stream_Write Flag193
486 -- Is_Local_Anonymous_Access Flag194
487 -- Is_Primitive_Wrapper Flag195
488 -- Was_Hidden Flag196
489 -- Is_Limited_Interface Flag197
490 -- Has_Pragma_Ordered Flag198
491 -- Is_Ada_2012_Only Flag199
493 -- Has_Delayed_Aspects Flag200
494 -- Has_Pragma_No_Inline Flag201
495 -- Itype_Printed Flag202
496 -- Has_Pragma_Pure Flag203
497 -- Is_Known_Null Flag204
498 -- Low_Bound_Tested Flag205
499 -- Is_Visible_Formal Flag206
500 -- Known_To_Have_Preelab_Init Flag207
501 -- Must_Have_Preelab_Init Flag208
502 -- Is_Return_Object Flag209
503 -- Elaborate_Body_Desirable Flag210
505 -- Has_Static_Discriminants Flag211
506 -- Has_Pragma_Unreferenced_Objects Flag212
507 -- Requires_Overriding Flag213
509 -- Has_Uplevel_Reference Flag215
510 -- Universal_Aliasing Flag216
511 -- Suppress_Value_Tracking_On_Call Flag217
512 -- Is_Primitive Flag218
513 -- Has_Initial_Value Flag219
514 -- Has_Dispatch_Table Flag220
516 -- Has_Pragma_Preelab_Init Flag221
517 -- Used_As_Generic_Actual Flag222
518 -- Is_Descendent_Of_Address Flag223
521 -- Is_Only_Out_Parameter Flag226
522 -- Referenced_As_Out_Parameter Flag227
523 -- Has_Thunks Flag228
524 -- Can_Use_Internal_Rep Flag229
525 -- Has_Pragma_Inline_Always Flag230
527 -- Renamed_In_Spec Flag231
528 -- Has_Invariants Flag232
529 -- Has_Pragma_Unmodified Flag233
530 -- Is_Dispatch_Table_Entity Flag234
531 -- Is_Trivial_Subprogram Flag235
532 -- Warnings_Off_Used Flag236
533 -- Warnings_Off_Used_Unmodified Flag237
534 -- Warnings_Off_Used_Unreferenced Flag238
535 -- OK_To_Reorder_Components Flag239
536 -- Has_Expanded_Contract Flag240
538 -- Optimize_Alignment_Space Flag241
539 -- Optimize_Alignment_Time Flag242
540 -- Overlays_Constant Flag243
541 -- Is_RACW_Stub_Type Flag244
542 -- Is_Private_Primitive Flag245
543 -- Is_Underlying_Record_View Flag246
544 -- OK_To_Rename Flag247
545 -- Has_Inheritable_Invariants Flag248
546 -- Is_Safe_To_Reevaluate Flag249
547 -- Has_Predicates Flag250
549 -- Has_Implicit_Dereference Flag251
550 -- Is_Processed_Transient Flag252
551 -- Has_Anonymous_Master Flag253
552 -- Is_Implementation_Defined Flag254
553 -- Is_Predicate_Function Flag255
554 -- Is_Predicate_Function_M Flag256
555 -- Is_Invariant_Procedure Flag257
556 -- Has_Dynamic_Predicate_Aspect Flag258
557 -- Has_Static_Predicate_Aspect Flag259
558 -- Has_Loop_Entry_Attributes Flag260
560 -- Has_Delayed_Rep_Aspects Flag261
561 -- May_Inherit_Delayed_Rep_Aspects Flag262
562 -- Has_Visible_Refinement Flag263
563 -- Is_Discriminant_Check_Function Flag264
564 -- SPARK_Pragma_Inherited Flag265
565 -- SPARK_Aux_Pragma_Inherited Flag266
566 -- Has_Shift_Operator Flag267
567 -- Is_Independent Flag268
568 -- Has_Static_Predicate Flag269
569 -- Stores_Attribute_Old_Prefix Flag270
571 -- Has_Protected Flag271
572 -- SSO_Set_Low_By_Default Flag272
573 -- SSO_Set_High_By_Default Flag273
574 -- Is_Generic_Actual_Subprogram Flag274
575 -- No_Predicate_On_Actual Flag275
576 -- No_Dynamic_Predicate_On_Actual Flag276
577 -- Is_Checked_Ghost_Entity Flag277
578 -- Is_Ignored_Ghost_Entity Flag278
579 -- Contains_Ignored_Ghost_Code Flag279
580 -- Partial_View_Has_Unknown_Discr Flag280
582 -- Is_Static_Type Flag281
583 -- Has_Nested_Subprogram Flag282
584 -- Uplevel_Reference_Noted Flag283
590 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
592 -----------------------
593 -- Local subprograms --
594 -----------------------
597 (State_Id : Entity_Id;
598 Option_Nam : Name_Id) return Boolean;
599 -- Determine whether abstract state State_Id has particular option denoted
600 -- by the name Option_Nam.
606 function Float_Rep (Id : E) return F is
607 pragma Assert (Is_Floating_Point_Type (Id));
609 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
617 (State_Id : Entity_Id;
618 Option_Nam : Name_Id) return Boolean
620 Decl : constant Node_Id := Parent (State_Id);
625 pragma Assert (Ekind (State_Id) = E_Abstract_State);
627 -- The declaration of abstract states with options appear as an
628 -- extension aggregate. If this is not the case, the option is not
631 if Nkind (Decl) /= N_Extension_Aggregate then
637 Opt := First (Expressions (Decl));
638 while Present (Opt) loop
640 -- Currently the only simple option allowed is External
642 if Nkind (Opt) = N_Identifier
643 and then Chars (Opt) = Name_External
644 and then Chars (Opt) = Option_Nam
652 -- Complex options with various specifiers
654 Opt := First (Component_Associations (Decl));
655 while Present (Opt) loop
656 Opt_Nam := First (Choices (Opt));
658 if Nkind (Opt_Nam) = N_Identifier
659 and then Chars (Opt_Nam) = Option_Nam
670 --------------------------------
671 -- Attribute Access Functions --
672 --------------------------------
674 function Abstract_States (Id : E) return L is
676 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
680 function Accept_Address (Id : E) return L is
685 function Access_Disp_Table (Id : E) return L is
687 pragma Assert (Ekind_In (Id, E_Record_Type,
689 return Elist16 (Implementation_Base_Type (Id));
690 end Access_Disp_Table;
692 function Actual_Subtype (Id : E) return E is
695 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
696 or else Is_Formal (Id));
700 function Address_Taken (Id : E) return B is
705 function Alias (Id : E) return E is
708 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
712 function Alignment (Id : E) return U is
714 pragma Assert (Is_Type (Id)
715 or else Is_Formal (Id)
716 or else Ekind_In (Id, E_Loop_Parameter,
723 function Associated_Formal_Package (Id : E) return E is
725 pragma Assert (Ekind (Id) = E_Package);
727 end Associated_Formal_Package;
729 function Associated_Node_For_Itype (Id : E) return N is
732 end Associated_Node_For_Itype;
734 function Associated_Storage_Pool (Id : E) return E is
736 pragma Assert (Is_Access_Type (Id));
737 return Node22 (Root_Type (Id));
738 end Associated_Storage_Pool;
740 function Barrier_Function (Id : E) return N is
742 pragma Assert (Is_Entry (Id));
744 end Barrier_Function;
746 function Block_Node (Id : E) return N is
748 pragma Assert (Ekind (Id) = E_Block);
752 function Body_Entity (Id : E) return E is
754 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
758 function Body_Needed_For_SAL (Id : E) return B is
761 (Ekind (Id) = E_Package
762 or else Is_Subprogram (Id)
763 or else Is_Generic_Unit (Id));
765 end Body_Needed_For_SAL;
767 function Body_References (Id : E) return L is
769 pragma Assert (Ekind (Id) = E_Abstract_State);
773 function BIP_Initialization_Call (Id : E) return N is
775 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
777 end BIP_Initialization_Call;
779 function C_Pass_By_Copy (Id : E) return B is
781 pragma Assert (Is_Record_Type (Id));
782 return Flag125 (Implementation_Base_Type (Id));
785 function Can_Never_Be_Null (Id : E) return B is
788 end Can_Never_Be_Null;
790 function Checks_May_Be_Suppressed (Id : E) return B is
793 end Checks_May_Be_Suppressed;
795 function Class_Wide_Type (Id : E) return E is
797 pragma Assert (Is_Type (Id));
801 function Cloned_Subtype (Id : E) return E is
803 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
807 function Component_Bit_Offset (Id : E) return U is
809 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
811 end Component_Bit_Offset;
813 function Component_Clause (Id : E) return N is
815 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
817 end Component_Clause;
819 function Component_Size (Id : E) return U is
821 pragma Assert (Is_Array_Type (Id));
822 return Uint22 (Implementation_Base_Type (Id));
825 function Component_Type (Id : E) return E is
827 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
828 return Node20 (Implementation_Base_Type (Id));
831 function Corresponding_Concurrent_Type (Id : E) return E is
833 pragma Assert (Ekind (Id) = E_Record_Type);
835 end Corresponding_Concurrent_Type;
837 function Corresponding_Discriminant (Id : E) return E is
839 pragma Assert (Ekind (Id) = E_Discriminant);
841 end Corresponding_Discriminant;
843 function Corresponding_Equality (Id : E) return E is
846 (Ekind (Id) = E_Function
847 and then not Comes_From_Source (Id)
848 and then Chars (Id) = Name_Op_Ne);
850 end Corresponding_Equality;
852 function Corresponding_Protected_Entry (Id : E) return E is
854 pragma Assert (Ekind (Id) = E_Subprogram_Body);
856 end Corresponding_Protected_Entry;
858 function Corresponding_Record_Type (Id : E) return E is
860 pragma Assert (Is_Concurrent_Type (Id));
862 end Corresponding_Record_Type;
864 function Corresponding_Remote_Type (Id : E) return E is
867 end Corresponding_Remote_Type;
869 function Current_Use_Clause (Id : E) return E is
871 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
873 end Current_Use_Clause;
875 function Current_Value (Id : E) return N is
877 pragma Assert (Ekind (Id) in Object_Kind);
881 function CR_Discriminant (Id : E) return E is
886 function Debug_Info_Off (Id : E) return B is
891 function Debug_Renaming_Link (Id : E) return E is
894 end Debug_Renaming_Link;
896 function Default_Aspect_Component_Value (Id : E) return N is
898 pragma Assert (Is_Array_Type (Id));
899 return Node19 (Base_Type (Id));
900 end Default_Aspect_Component_Value;
902 function Default_Aspect_Value (Id : E) return N is
904 pragma Assert (Is_Scalar_Type (Id));
905 return Node19 (Base_Type (Id));
906 end Default_Aspect_Value;
908 function Default_Expr_Function (Id : E) return E is
910 pragma Assert (Is_Formal (Id));
912 end Default_Expr_Function;
914 function Default_Expressions_Processed (Id : E) return B is
917 end Default_Expressions_Processed;
919 function Default_Value (Id : E) return N is
921 pragma Assert (Is_Formal (Id));
925 function Delay_Cleanups (Id : E) return B is
930 function Delay_Subprogram_Descriptors (Id : E) return B is
933 end Delay_Subprogram_Descriptors;
935 function Delta_Value (Id : E) return R is
937 pragma Assert (Is_Fixed_Point_Type (Id));
941 function Dependent_Instances (Id : E) return L is
943 pragma Assert (Is_Generic_Instance (Id));
945 end Dependent_Instances;
947 function Depends_On_Private (Id : E) return B is
949 pragma Assert (Nkind (Id) in N_Entity);
951 end Depends_On_Private;
953 function Derived_Type_Link (Id : E) return E is
955 pragma Assert (Is_Type (Id));
956 return Node31 (Base_Type (Id));
957 end Derived_Type_Link;
959 function Digits_Value (Id : E) return U is
962 (Is_Floating_Point_Type (Id)
963 or else Is_Decimal_Fixed_Point_Type (Id));
967 function Direct_Primitive_Operations (Id : E) return L is
969 pragma Assert (Is_Tagged_Type (Id));
971 end Direct_Primitive_Operations;
973 function Directly_Designated_Type (Id : E) return E is
975 pragma Assert (Is_Access_Type (Id));
977 end Directly_Designated_Type;
979 function Discard_Names (Id : E) return B is
984 function Discriminal (Id : E) return E is
986 pragma Assert (Ekind (Id) = E_Discriminant);
990 function Discriminal_Link (Id : E) return N is
993 end Discriminal_Link;
995 function Discriminant_Checking_Func (Id : E) return E is
997 pragma Assert (Ekind (Id) = E_Component);
999 end Discriminant_Checking_Func;
1001 function Discriminant_Constraint (Id : E) return L is
1003 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1004 return Elist21 (Id);
1005 end Discriminant_Constraint;
1007 function Discriminant_Default_Value (Id : E) return N is
1009 pragma Assert (Ekind (Id) = E_Discriminant);
1011 end Discriminant_Default_Value;
1013 function Discriminant_Number (Id : E) return U is
1015 pragma Assert (Ekind (Id) = E_Discriminant);
1017 end Discriminant_Number;
1019 function Dispatch_Table_Wrappers (Id : E) return L is
1021 pragma Assert (Ekind_In (Id, E_Record_Type,
1023 return Elist26 (Implementation_Base_Type (Id));
1024 end Dispatch_Table_Wrappers;
1026 function DT_Entry_Count (Id : E) return U is
1028 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1032 function DT_Offset_To_Top_Func (Id : E) return E is
1034 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1036 end DT_Offset_To_Top_Func;
1038 function DT_Position (Id : E) return U is
1040 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1041 and then Present (DTC_Entity (Id)));
1045 function DTC_Entity (Id : E) return E is
1047 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1051 function Elaborate_Body_Desirable (Id : E) return B is
1053 pragma Assert (Ekind (Id) = E_Package);
1054 return Flag210 (Id);
1055 end Elaborate_Body_Desirable;
1057 function Elaboration_Entity (Id : E) return E is
1062 Ekind (Id) = E_Package
1064 Is_Generic_Unit (Id));
1066 end Elaboration_Entity;
1068 function Elaboration_Entity_Required (Id : E) return B is
1073 Ekind (Id) = E_Package
1075 Is_Generic_Unit (Id));
1076 return Flag174 (Id);
1077 end Elaboration_Entity_Required;
1079 function Encapsulating_State (Id : E) return N is
1081 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1083 end Encapsulating_State;
1085 function Enclosing_Scope (Id : E) return E is
1088 end Enclosing_Scope;
1090 function Entry_Accepted (Id : E) return B is
1092 pragma Assert (Is_Entry (Id));
1093 return Flag152 (Id);
1096 function Entry_Bodies_Array (Id : E) return E is
1099 end Entry_Bodies_Array;
1101 function Entry_Cancel_Parameter (Id : E) return E is
1104 end Entry_Cancel_Parameter;
1106 function Entry_Component (Id : E) return E is
1109 end Entry_Component;
1111 function Entry_Formal (Id : E) return E is
1116 function Entry_Index_Constant (Id : E) return N is
1118 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1120 end Entry_Index_Constant;
1122 function Contains_Ignored_Ghost_Code (Id : E) return B is
1125 (Ekind_In (Id, E_Block,
1129 E_Generic_Procedure,
1133 E_Subprogram_Body));
1134 return Flag279 (Id);
1135 end Contains_Ignored_Ghost_Code;
1137 function Contract (Id : E) return N is
1140 (Ekind_In (Id, E_Entry,
1147 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1151 function Entry_Parameters_Type (Id : E) return E is
1154 end Entry_Parameters_Type;
1156 function Enum_Pos_To_Rep (Id : E) return E is
1158 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1160 end Enum_Pos_To_Rep;
1162 function Enumeration_Pos (Id : E) return Uint is
1164 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1166 end Enumeration_Pos;
1168 function Enumeration_Rep (Id : E) return U is
1170 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1172 end Enumeration_Rep;
1174 function Enumeration_Rep_Expr (Id : E) return N is
1176 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1178 end Enumeration_Rep_Expr;
1180 function Equivalent_Type (Id : E) return E is
1183 (Ekind_In (Id, E_Class_Wide_Type,
1184 E_Class_Wide_Subtype,
1185 E_Access_Subprogram_Type,
1186 E_Access_Protected_Subprogram_Type,
1187 E_Anonymous_Access_Protected_Subprogram_Type,
1188 E_Access_Subprogram_Type,
1191 end Equivalent_Type;
1193 function Esize (Id : E) return Uint is
1198 function Extra_Accessibility (Id : E) return E is
1201 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1203 end Extra_Accessibility;
1205 function Extra_Accessibility_Of_Result (Id : E) return E is
1207 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1209 end Extra_Accessibility_Of_Result;
1211 function Extra_Constrained (Id : E) return E is
1213 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1215 end Extra_Constrained;
1217 function Extra_Formal (Id : E) return E is
1222 function Extra_Formals (Id : E) return E is
1225 (Is_Overloadable (Id)
1226 or else Ekind_In (Id, E_Entry_Family,
1228 E_Subprogram_Type));
1232 function Can_Use_Internal_Rep (Id : E) return B is
1234 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1235 return Flag229 (Base_Type (Id));
1236 end Can_Use_Internal_Rep;
1238 function Finalization_Master (Id : E) return E is
1240 pragma Assert (Is_Access_Type (Id));
1241 return Node23 (Root_Type (Id));
1242 end Finalization_Master;
1244 function Finalize_Storage_Only (Id : E) return B is
1246 pragma Assert (Is_Type (Id));
1247 return Flag158 (Base_Type (Id));
1248 end Finalize_Storage_Only;
1250 function Finalizer (Id : E) return E is
1252 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1256 function First_Entity (Id : E) return E is
1261 function First_Exit_Statement (Id : E) return N is
1263 pragma Assert (Ekind (Id) = E_Loop);
1265 end First_Exit_Statement;
1267 function First_Index (Id : E) return N is
1269 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1273 function First_Literal (Id : E) return E is
1275 pragma Assert (Is_Enumeration_Type (Id));
1279 function First_Private_Entity (Id : E) return E is
1281 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1282 or else Ekind (Id) in Concurrent_Kind);
1284 end First_Private_Entity;
1286 function First_Rep_Item (Id : E) return E is
1291 function Freeze_Node (Id : E) return N is
1296 function From_Limited_With (Id : E) return B is
1298 return Flag159 (Id);
1299 end From_Limited_With;
1301 function Full_View (Id : E) return E is
1303 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1307 function Generic_Homonym (Id : E) return E is
1309 pragma Assert (Ekind (Id) = E_Generic_Package);
1311 end Generic_Homonym;
1313 function Generic_Renamings (Id : E) return L is
1315 return Elist23 (Id);
1316 end Generic_Renamings;
1318 function Handler_Records (Id : E) return S is
1321 end Handler_Records;
1323 function Has_Aliased_Components (Id : E) return B is
1325 return Flag135 (Implementation_Base_Type (Id));
1326 end Has_Aliased_Components;
1328 function Has_Alignment_Clause (Id : E) return B is
1331 end Has_Alignment_Clause;
1333 function Has_All_Calls_Remote (Id : E) return B is
1336 end Has_All_Calls_Remote;
1338 function Has_Anonymous_Master (Id : E) return B is
1341 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1342 return Flag253 (Id);
1343 end Has_Anonymous_Master;
1345 function Has_Atomic_Components (Id : E) return B is
1347 return Flag86 (Implementation_Base_Type (Id));
1348 end Has_Atomic_Components;
1350 function Has_Biased_Representation (Id : E) return B is
1352 return Flag139 (Id);
1353 end Has_Biased_Representation;
1355 function Has_Completion (Id : E) return B is
1360 function Has_Completion_In_Body (Id : E) return B is
1362 pragma Assert (Is_Type (Id));
1364 end Has_Completion_In_Body;
1366 function Has_Complex_Representation (Id : E) return B is
1368 pragma Assert (Is_Type (Id));
1369 return Flag140 (Implementation_Base_Type (Id));
1370 end Has_Complex_Representation;
1372 function Has_Component_Size_Clause (Id : E) return B is
1374 pragma Assert (Is_Array_Type (Id));
1375 return Flag68 (Implementation_Base_Type (Id));
1376 end Has_Component_Size_Clause;
1378 function Has_Constrained_Partial_View (Id : E) return B is
1380 pragma Assert (Is_Type (Id));
1381 return Flag187 (Id);
1382 end Has_Constrained_Partial_View;
1384 function Has_Controlled_Component (Id : E) return B is
1386 return Flag43 (Base_Type (Id));
1387 end Has_Controlled_Component;
1389 function Has_Contiguous_Rep (Id : E) return B is
1391 return Flag181 (Id);
1392 end Has_Contiguous_Rep;
1394 function Has_Controlling_Result (Id : E) return B is
1397 end Has_Controlling_Result;
1399 function Has_Convention_Pragma (Id : E) return B is
1401 return Flag119 (Id);
1402 end Has_Convention_Pragma;
1404 function Has_Default_Aspect (Id : E) return B is
1406 return Flag39 (Base_Type (Id));
1407 end Has_Default_Aspect;
1409 function Has_Default_Init_Cond (Id : E) return B is
1412 end Has_Default_Init_Cond;
1414 function Has_Delayed_Aspects (Id : E) return B is
1416 pragma Assert (Nkind (Id) in N_Entity);
1417 return Flag200 (Id);
1418 end Has_Delayed_Aspects;
1420 function Has_Delayed_Freeze (Id : E) return B is
1422 pragma Assert (Nkind (Id) in N_Entity);
1424 end Has_Delayed_Freeze;
1426 function Has_Delayed_Rep_Aspects (Id : E) return B is
1428 pragma Assert (Nkind (Id) in N_Entity);
1429 return Flag261 (Id);
1430 end Has_Delayed_Rep_Aspects;
1432 function Has_Discriminants (Id : E) return B is
1434 pragma Assert (Nkind (Id) in N_Entity);
1436 end Has_Discriminants;
1438 function Has_Dispatch_Table (Id : E) return B is
1440 pragma Assert (Is_Tagged_Type (Id));
1441 return Flag220 (Id);
1442 end Has_Dispatch_Table;
1444 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1446 pragma Assert (Is_Type (Id));
1447 return Flag258 (Id);
1448 end Has_Dynamic_Predicate_Aspect;
1450 function Has_Enumeration_Rep_Clause (Id : E) return B is
1452 pragma Assert (Is_Enumeration_Type (Id));
1454 end Has_Enumeration_Rep_Clause;
1456 function Has_Exit (Id : E) return B is
1461 function Has_Expanded_Contract (Id : E) return B is
1463 pragma Assert (Is_Subprogram (Id));
1464 return Flag240 (Id);
1465 end Has_Expanded_Contract;
1467 function Has_Forward_Instantiation (Id : E) return B is
1469 return Flag175 (Id);
1470 end Has_Forward_Instantiation;
1472 function Has_Fully_Qualified_Name (Id : E) return B is
1474 return Flag173 (Id);
1475 end Has_Fully_Qualified_Name;
1477 function Has_Gigi_Rep_Item (Id : E) return B is
1480 end Has_Gigi_Rep_Item;
1482 function Has_Homonym (Id : E) return B is
1487 function Has_Implicit_Dereference (Id : E) return B is
1489 return Flag251 (Id);
1490 end Has_Implicit_Dereference;
1492 function Has_Independent_Components (Id : E) return B is
1494 return Flag34 (Implementation_Base_Type (Id));
1495 end Has_Independent_Components;
1497 function Has_Inheritable_Invariants (Id : E) return B is
1499 pragma Assert (Is_Type (Id));
1500 return Flag248 (Id);
1501 end Has_Inheritable_Invariants;
1503 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1505 pragma Assert (Is_Type (Id));
1506 return Flag133 (Id);
1507 end Has_Inherited_Default_Init_Cond;
1509 function Has_Initial_Value (Id : E) return B is
1511 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1512 return Flag219 (Id);
1513 end Has_Initial_Value;
1515 function Has_Invariants (Id : E) return B is
1517 pragma Assert (Is_Type (Id));
1518 return Flag232 (Id);
1521 function Has_Loop_Entry_Attributes (Id : E) return B is
1523 pragma Assert (Ekind (Id) = E_Loop);
1524 return Flag260 (Id);
1525 end Has_Loop_Entry_Attributes;
1527 function Has_Machine_Radix_Clause (Id : E) return B is
1529 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1531 end Has_Machine_Radix_Clause;
1533 function Has_Master_Entity (Id : E) return B is
1536 end Has_Master_Entity;
1538 function Has_Missing_Return (Id : E) return B is
1540 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1541 return Flag142 (Id);
1542 end Has_Missing_Return;
1544 function Has_Nested_Block_With_Handler (Id : E) return B is
1546 return Flag101 (Id);
1547 end Has_Nested_Block_With_Handler;
1549 function Has_Nested_Subprogram (Id : E) return B is
1551 pragma Assert (Is_Subprogram (Id));
1552 return Flag282 (Id);
1553 end Has_Nested_Subprogram;
1555 function Has_Non_Standard_Rep (Id : E) return B is
1557 return Flag75 (Implementation_Base_Type (Id));
1558 end Has_Non_Standard_Rep;
1560 function Has_Object_Size_Clause (Id : E) return B is
1562 pragma Assert (Is_Type (Id));
1563 return Flag172 (Id);
1564 end Has_Object_Size_Clause;
1566 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1568 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1569 return Flag110 (Id);
1570 end Has_Out_Or_In_Out_Parameter;
1572 function Has_Per_Object_Constraint (Id : E) return B is
1574 return Flag154 (Id);
1575 end Has_Per_Object_Constraint;
1577 function Has_Pragma_Controlled (Id : E) return B is
1579 pragma Assert (Is_Access_Type (Id));
1580 return Flag27 (Implementation_Base_Type (Id));
1581 end Has_Pragma_Controlled;
1583 function Has_Pragma_Elaborate_Body (Id : E) return B is
1585 return Flag150 (Id);
1586 end Has_Pragma_Elaborate_Body;
1588 function Has_Pragma_Inline (Id : E) return B is
1590 return Flag157 (Id);
1591 end Has_Pragma_Inline;
1593 function Has_Pragma_Inline_Always (Id : E) return B is
1595 return Flag230 (Id);
1596 end Has_Pragma_Inline_Always;
1598 function Has_Pragma_No_Inline (Id : E) return B is
1600 return Flag201 (Id);
1601 end Has_Pragma_No_Inline;
1603 function Has_Pragma_Ordered (Id : E) return B is
1605 pragma Assert (Is_Enumeration_Type (Id));
1606 return Flag198 (Implementation_Base_Type (Id));
1607 end Has_Pragma_Ordered;
1609 function Has_Pragma_Pack (Id : E) return B is
1611 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1612 return Flag121 (Implementation_Base_Type (Id));
1613 end Has_Pragma_Pack;
1615 function Has_Pragma_Preelab_Init (Id : E) return B is
1617 return Flag221 (Id);
1618 end Has_Pragma_Preelab_Init;
1620 function Has_Pragma_Pure (Id : E) return B is
1622 return Flag203 (Id);
1623 end Has_Pragma_Pure;
1625 function Has_Pragma_Pure_Function (Id : E) return B is
1627 return Flag179 (Id);
1628 end Has_Pragma_Pure_Function;
1630 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1632 return Flag169 (Id);
1633 end Has_Pragma_Thread_Local_Storage;
1635 function Has_Pragma_Unmodified (Id : E) return B is
1637 return Flag233 (Id);
1638 end Has_Pragma_Unmodified;
1640 function Has_Pragma_Unreferenced (Id : E) return B is
1642 return Flag180 (Id);
1643 end Has_Pragma_Unreferenced;
1645 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag212 (Id);
1649 end Has_Pragma_Unreferenced_Objects;
1651 function Has_Predicates (Id : E) return B is
1653 pragma Assert (Is_Type (Id));
1654 return Flag250 (Id);
1657 function Has_Primitive_Operations (Id : E) return B is
1659 pragma Assert (Is_Type (Id));
1660 return Flag120 (Base_Type (Id));
1661 end Has_Primitive_Operations;
1663 function Has_Private_Ancestor (Id : E) return B is
1665 return Flag151 (Id);
1666 end Has_Private_Ancestor;
1668 function Has_Private_Declaration (Id : E) return B is
1670 return Flag155 (Id);
1671 end Has_Private_Declaration;
1673 function Has_Protected (Id : E) return B is
1675 return Flag271 (Base_Type (Id));
1678 function Has_Qualified_Name (Id : E) return B is
1680 return Flag161 (Id);
1681 end Has_Qualified_Name;
1683 function Has_RACW (Id : E) return B is
1685 pragma Assert (Ekind (Id) = E_Package);
1686 return Flag214 (Id);
1689 function Has_Record_Rep_Clause (Id : E) return B is
1691 pragma Assert (Is_Record_Type (Id));
1692 return Flag65 (Implementation_Base_Type (Id));
1693 end Has_Record_Rep_Clause;
1695 function Has_Recursive_Call (Id : E) return B is
1697 pragma Assert (Is_Subprogram (Id));
1698 return Flag143 (Id);
1699 end Has_Recursive_Call;
1701 function Has_Shift_Operator (Id : E) return B is
1703 pragma Assert (Is_Integer_Type (Id));
1704 return Flag267 (Base_Type (Id));
1705 end Has_Shift_Operator;
1707 function Has_Size_Clause (Id : E) return B is
1710 end Has_Size_Clause;
1712 function Has_Small_Clause (Id : E) return B is
1715 end Has_Small_Clause;
1717 function Has_Specified_Layout (Id : E) return B is
1719 pragma Assert (Is_Type (Id));
1720 return Flag100 (Implementation_Base_Type (Id));
1721 end Has_Specified_Layout;
1723 function Has_Specified_Stream_Input (Id : E) return B is
1725 pragma Assert (Is_Type (Id));
1726 return Flag190 (Id);
1727 end Has_Specified_Stream_Input;
1729 function Has_Specified_Stream_Output (Id : E) return B is
1731 pragma Assert (Is_Type (Id));
1732 return Flag191 (Id);
1733 end Has_Specified_Stream_Output;
1735 function Has_Specified_Stream_Read (Id : E) return B is
1737 pragma Assert (Is_Type (Id));
1738 return Flag192 (Id);
1739 end Has_Specified_Stream_Read;
1741 function Has_Specified_Stream_Write (Id : E) return B is
1743 pragma Assert (Is_Type (Id));
1744 return Flag193 (Id);
1745 end Has_Specified_Stream_Write;
1747 function Has_Static_Discriminants (Id : E) return B is
1749 pragma Assert (Is_Type (Id));
1750 return Flag211 (Id);
1751 end Has_Static_Discriminants;
1753 function Has_Static_Predicate (Id : E) return B is
1755 pragma Assert (Is_Type (Id));
1756 return Flag269 (Id);
1757 end Has_Static_Predicate;
1759 function Has_Static_Predicate_Aspect (Id : E) return B is
1761 pragma Assert (Is_Type (Id));
1762 return Flag259 (Id);
1763 end Has_Static_Predicate_Aspect;
1765 function Has_Storage_Size_Clause (Id : E) return B is
1767 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1768 return Flag23 (Implementation_Base_Type (Id));
1769 end Has_Storage_Size_Clause;
1771 function Has_Stream_Size_Clause (Id : E) return B is
1773 return Flag184 (Id);
1774 end Has_Stream_Size_Clause;
1776 function Has_Task (Id : E) return B is
1778 return Flag30 (Base_Type (Id));
1781 function Has_Thunks (Id : E) return B is
1783 return Flag228 (Id);
1786 function Has_Unchecked_Union (Id : E) return B is
1788 return Flag123 (Base_Type (Id));
1789 end Has_Unchecked_Union;
1791 function Has_Unknown_Discriminants (Id : E) return B is
1793 pragma Assert (Is_Type (Id));
1795 end Has_Unknown_Discriminants;
1797 function Has_Uplevel_Reference (Id : E) return B is
1799 return Flag215 (Id);
1800 end Has_Uplevel_Reference;
1802 function Has_Visible_Refinement (Id : E) return B is
1804 pragma Assert (Ekind (Id) = E_Abstract_State);
1805 return Flag263 (Id);
1806 end Has_Visible_Refinement;
1808 function Has_Volatile_Components (Id : E) return B is
1810 return Flag87 (Implementation_Base_Type (Id));
1811 end Has_Volatile_Components;
1813 function Has_Xref_Entry (Id : E) return B is
1815 return Flag182 (Id);
1818 function Hiding_Loop_Variable (Id : E) return E is
1820 pragma Assert (Ekind (Id) = E_Variable);
1822 end Hiding_Loop_Variable;
1824 function Homonym (Id : E) return E is
1829 function Import_Pragma (Id : E) return E is
1831 pragma Assert (Is_Subprogram (Id));
1835 function Interface_Alias (Id : E) return E is
1837 pragma Assert (Is_Subprogram (Id));
1839 end Interface_Alias;
1841 function Interfaces (Id : E) return L is
1843 pragma Assert (Is_Record_Type (Id));
1844 return Elist25 (Id);
1847 function In_Package_Body (Id : E) return B is
1850 end In_Package_Body;
1852 function In_Private_Part (Id : E) return B is
1855 end In_Private_Part;
1857 function In_Use (Id : E) return B is
1859 pragma Assert (Nkind (Id) in N_Entity);
1863 function Initialization_Statements (Id : E) return N is
1865 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1867 end Initialization_Statements;
1869 function Inner_Instances (Id : E) return L is
1871 return Elist23 (Id);
1872 end Inner_Instances;
1874 function Interface_Name (Id : E) return N is
1879 function Is_Abstract_Subprogram (Id : E) return B is
1881 pragma Assert (Is_Overloadable (Id));
1883 end Is_Abstract_Subprogram;
1885 function Is_Abstract_Type (Id : E) return B is
1887 pragma Assert (Is_Type (Id));
1888 return Flag146 (Id);
1889 end Is_Abstract_Type;
1891 function Is_Local_Anonymous_Access (Id : E) return B is
1893 pragma Assert (Is_Access_Type (Id));
1894 return Flag194 (Id);
1895 end Is_Local_Anonymous_Access;
1897 function Is_Access_Constant (Id : E) return B is
1899 pragma Assert (Is_Access_Type (Id));
1901 end Is_Access_Constant;
1903 function Is_Ada_2005_Only (Id : E) return B is
1905 return Flag185 (Id);
1906 end Is_Ada_2005_Only;
1908 function Is_Ada_2012_Only (Id : E) return B is
1910 return Flag199 (Id);
1911 end Is_Ada_2012_Only;
1913 function Is_Aliased (Id : E) return B is
1915 pragma Assert (Nkind (Id) in N_Entity);
1919 function Is_Asynchronous (Id : E) return B is
1921 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1923 end Is_Asynchronous;
1925 function Is_Atomic (Id : E) return B is
1930 function Is_Bit_Packed_Array (Id : E) return B is
1932 return Flag122 (Implementation_Base_Type (Id));
1933 end Is_Bit_Packed_Array;
1935 function Is_Called (Id : E) return B is
1937 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1938 return Flag102 (Id);
1941 function Is_Character_Type (Id : E) return B is
1944 end Is_Character_Type;
1946 function Is_Checked_Ghost_Entity (Id : E) return B is
1948 pragma Assert (Nkind (Id) in N_Entity);
1949 return Flag277 (Id);
1950 end Is_Checked_Ghost_Entity;
1952 function Is_Child_Unit (Id : E) return B is
1957 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1960 end Is_Class_Wide_Equivalent_Type;
1962 function Is_Compilation_Unit (Id : E) return B is
1964 return Flag149 (Id);
1965 end Is_Compilation_Unit;
1967 function Is_Completely_Hidden (Id : E) return B is
1969 pragma Assert (Ekind (Id) = E_Discriminant);
1970 return Flag103 (Id);
1971 end Is_Completely_Hidden;
1973 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1976 end Is_Constr_Subt_For_U_Nominal;
1978 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1980 return Flag141 (Id);
1981 end Is_Constr_Subt_For_UN_Aliased;
1983 function Is_Constrained (Id : E) return B is
1985 pragma Assert (Nkind (Id) in N_Entity);
1989 function Is_Constructor (Id : E) return B is
1994 function Is_Controlled (Id : E) return B is
1996 return Flag42 (Base_Type (Id));
1999 function Is_Controlling_Formal (Id : E) return B is
2001 pragma Assert (Is_Formal (Id));
2003 end Is_Controlling_Formal;
2005 function Is_CPP_Class (Id : E) return B is
2010 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2012 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2013 return Flag132 (Id);
2014 end Is_Default_Init_Cond_Procedure;
2016 function Is_Descendent_Of_Address (Id : E) return B is
2018 return Flag223 (Id);
2019 end Is_Descendent_Of_Address;
2021 function Is_Discrim_SO_Function (Id : E) return B is
2023 return Flag176 (Id);
2024 end Is_Discrim_SO_Function;
2026 function Is_Discriminant_Check_Function (Id : E) return B is
2028 return Flag264 (Id);
2029 end Is_Discriminant_Check_Function;
2031 function Is_Dispatch_Table_Entity (Id : E) return B is
2033 return Flag234 (Id);
2034 end Is_Dispatch_Table_Entity;
2036 function Is_Dispatching_Operation (Id : E) return B is
2038 pragma Assert (Nkind (Id) in N_Entity);
2040 end Is_Dispatching_Operation;
2042 function Is_Eliminated (Id : E) return B is
2044 return Flag124 (Id);
2047 function Is_Entry_Formal (Id : E) return B is
2050 end Is_Entry_Formal;
2052 function Is_Exported (Id : E) return B is
2057 function Is_First_Subtype (Id : E) return B is
2060 end Is_First_Subtype;
2062 function Is_For_Access_Subtype (Id : E) return B is
2064 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2065 return Flag118 (Id);
2066 end Is_For_Access_Subtype;
2068 function Is_Formal_Subprogram (Id : E) return B is
2070 return Flag111 (Id);
2071 end Is_Formal_Subprogram;
2073 function Is_Frozen (Id : E) return B is
2078 function Is_Generic_Actual_Subprogram (Id : E) return B is
2080 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2081 return Flag274 (Id);
2082 end Is_Generic_Actual_Subprogram;
2084 function Is_Generic_Actual_Type (Id : E) return B is
2086 pragma Assert (Is_Type (Id));
2088 end Is_Generic_Actual_Type;
2090 function Is_Generic_Instance (Id : E) return B is
2092 return Flag130 (Id);
2093 end Is_Generic_Instance;
2095 function Is_Generic_Type (Id : E) return B is
2097 pragma Assert (Nkind (Id) in N_Entity);
2099 end Is_Generic_Type;
2101 function Is_Hidden (Id : E) return B is
2106 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2109 end Is_Hidden_Non_Overridden_Subpgm;
2111 function Is_Hidden_Open_Scope (Id : E) return B is
2113 return Flag171 (Id);
2114 end Is_Hidden_Open_Scope;
2116 function Is_Ignored_Ghost_Entity (Id : E) return B is
2118 pragma Assert (Nkind (Id) in N_Entity);
2119 return Flag278 (Id);
2120 end Is_Ignored_Ghost_Entity;
2122 function Is_Immediately_Visible (Id : E) return B is
2124 pragma Assert (Nkind (Id) in N_Entity);
2126 end Is_Immediately_Visible;
2128 function Is_Implementation_Defined (Id : E) return B is
2130 return Flag254 (Id);
2131 end Is_Implementation_Defined;
2133 function Is_Imported (Id : E) return B is
2138 function Is_Independent (Id : E) return B is
2140 return Flag268 (Id);
2143 function Is_Inlined (Id : E) return B is
2148 function Is_Inlined_Always (Id : E) return B is
2150 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2152 end Is_Inlined_Always;
2154 function Is_Interface (Id : E) return B is
2156 return Flag186 (Id);
2159 function Is_Instantiated (Id : E) return B is
2161 return Flag126 (Id);
2162 end Is_Instantiated;
2164 function Is_Internal (Id : E) return B is
2166 pragma Assert (Nkind (Id) in N_Entity);
2170 function Is_Interrupt_Handler (Id : E) return B is
2172 pragma Assert (Nkind (Id) in N_Entity);
2174 end Is_Interrupt_Handler;
2176 function Is_Intrinsic_Subprogram (Id : E) return B is
2179 end Is_Intrinsic_Subprogram;
2181 function Is_Invariant_Procedure (Id : E) return B is
2183 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2184 return Flag257 (Id);
2185 end Is_Invariant_Procedure;
2187 function Is_Itype (Id : E) return B is
2192 function Is_Known_Non_Null (Id : E) return B is
2195 end Is_Known_Non_Null;
2197 function Is_Known_Null (Id : E) return B is
2199 return Flag204 (Id);
2202 function Is_Known_Valid (Id : E) return B is
2204 return Flag170 (Id);
2207 function Is_Limited_Composite (Id : E) return B is
2209 return Flag106 (Id);
2210 end Is_Limited_Composite;
2212 function Is_Limited_Interface (Id : E) return B is
2214 return Flag197 (Id);
2215 end Is_Limited_Interface;
2217 function Is_Limited_Record (Id : E) return B is
2220 end Is_Limited_Record;
2222 function Is_Machine_Code_Subprogram (Id : E) return B is
2224 pragma Assert (Is_Subprogram (Id));
2225 return Flag137 (Id);
2226 end Is_Machine_Code_Subprogram;
2228 function Is_Non_Static_Subtype (Id : E) return B is
2230 pragma Assert (Is_Type (Id));
2231 return Flag109 (Id);
2232 end Is_Non_Static_Subtype;
2234 function Is_Null_Init_Proc (Id : E) return B is
2236 pragma Assert (Ekind (Id) = E_Procedure);
2237 return Flag178 (Id);
2238 end Is_Null_Init_Proc;
2240 function Is_Obsolescent (Id : E) return B is
2242 return Flag153 (Id);
2245 function Is_Only_Out_Parameter (Id : E) return B is
2247 pragma Assert (Is_Formal (Id));
2248 return Flag226 (Id);
2249 end Is_Only_Out_Parameter;
2251 function Is_Package_Body_Entity (Id : E) return B is
2253 return Flag160 (Id);
2254 end Is_Package_Body_Entity;
2256 function Is_Packed (Id : E) return B is
2258 return Flag51 (Implementation_Base_Type (Id));
2261 function Is_Packed_Array_Impl_Type (Id : E) return B is
2263 return Flag138 (Id);
2264 end Is_Packed_Array_Impl_Type;
2266 function Is_Potentially_Use_Visible (Id : E) return B is
2268 pragma Assert (Nkind (Id) in N_Entity);
2270 end Is_Potentially_Use_Visible;
2272 function Is_Predicate_Function (Id : E) return B is
2274 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2275 return Flag255 (Id);
2276 end Is_Predicate_Function;
2278 function Is_Predicate_Function_M (Id : E) return B is
2280 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2281 return Flag256 (Id);
2282 end Is_Predicate_Function_M;
2284 function Is_Preelaborated (Id : E) return B is
2287 end Is_Preelaborated;
2289 function Is_Primitive (Id : E) return B is
2292 (Is_Overloadable (Id)
2293 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2294 return Flag218 (Id);
2297 function Is_Primitive_Wrapper (Id : E) return B is
2299 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2300 return Flag195 (Id);
2301 end Is_Primitive_Wrapper;
2303 function Is_Private_Composite (Id : E) return B is
2305 pragma Assert (Is_Type (Id));
2306 return Flag107 (Id);
2307 end Is_Private_Composite;
2309 function Is_Private_Descendant (Id : E) return B is
2312 end Is_Private_Descendant;
2314 function Is_Private_Primitive (Id : E) return B is
2316 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2317 return Flag245 (Id);
2318 end Is_Private_Primitive;
2320 function Is_Processed_Transient (Id : E) return B is
2322 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2323 return Flag252 (Id);
2324 end Is_Processed_Transient;
2326 function Is_Public (Id : E) return B is
2328 pragma Assert (Nkind (Id) in N_Entity);
2332 function Is_Pure (Id : E) return B is
2337 function Is_Pure_Unit_Access_Type (Id : E) return B is
2339 pragma Assert (Is_Access_Type (Id));
2340 return Flag189 (Id);
2341 end Is_Pure_Unit_Access_Type;
2343 function Is_RACW_Stub_Type (Id : E) return B is
2345 pragma Assert (Is_Type (Id));
2346 return Flag244 (Id);
2347 end Is_RACW_Stub_Type;
2349 function Is_Raised (Id : E) return B is
2351 pragma Assert (Ekind (Id) = E_Exception);
2352 return Flag224 (Id);
2355 function Is_Remote_Call_Interface (Id : E) return B is
2358 end Is_Remote_Call_Interface;
2360 function Is_Remote_Types (Id : E) return B is
2363 end Is_Remote_Types;
2365 function Is_Renaming_Of_Object (Id : E) return B is
2367 return Flag112 (Id);
2368 end Is_Renaming_Of_Object;
2370 function Is_Return_Object (Id : E) return B is
2372 return Flag209 (Id);
2373 end Is_Return_Object;
2375 function Is_Safe_To_Reevaluate (Id : E) return B is
2377 return Flag249 (Id);
2378 end Is_Safe_To_Reevaluate;
2380 function Is_Shared_Passive (Id : E) return B is
2383 end Is_Shared_Passive;
2385 function Is_Static_Type (Id : E) return B is
2387 pragma Assert (Is_Type (Id));
2388 return Flag281 (Id);
2391 function Is_Statically_Allocated (Id : E) return B is
2394 end Is_Statically_Allocated;
2396 function Is_Tag (Id : E) return B is
2398 pragma Assert (Nkind (Id) in N_Entity);
2402 function Is_Tagged_Type (Id : E) return B is
2407 function Is_Thunk (Id : E) return B is
2409 return Flag225 (Id);
2412 function Is_Trivial_Subprogram (Id : E) return B is
2414 return Flag235 (Id);
2415 end Is_Trivial_Subprogram;
2417 function Is_True_Constant (Id : E) return B is
2419 return Flag163 (Id);
2420 end Is_True_Constant;
2422 function Is_Unchecked_Union (Id : E) return B is
2424 return Flag117 (Implementation_Base_Type (Id));
2425 end Is_Unchecked_Union;
2427 function Is_Underlying_Record_View (Id : E) return B is
2429 return Flag246 (Id);
2430 end Is_Underlying_Record_View;
2432 function Is_Unsigned_Type (Id : E) return B is
2434 pragma Assert (Is_Type (Id));
2435 return Flag144 (Id);
2436 end Is_Unsigned_Type;
2438 function Is_Valued_Procedure (Id : E) return B is
2440 pragma Assert (Ekind (Id) = E_Procedure);
2441 return Flag127 (Id);
2442 end Is_Valued_Procedure;
2444 function Is_Visible_Formal (Id : E) return B is
2446 return Flag206 (Id);
2447 end Is_Visible_Formal;
2449 function Is_Visible_Lib_Unit (Id : E) return B is
2451 return Flag116 (Id);
2452 end Is_Visible_Lib_Unit;
2454 function Is_Volatile (Id : E) return B is
2456 pragma Assert (Nkind (Id) in N_Entity);
2458 if Is_Type (Id) then
2459 return Flag16 (Base_Type (Id));
2465 function Itype_Printed (Id : E) return B is
2467 pragma Assert (Is_Itype (Id));
2468 return Flag202 (Id);
2471 function Kill_Elaboration_Checks (Id : E) return B is
2474 end Kill_Elaboration_Checks;
2476 function Kill_Range_Checks (Id : E) return B is
2479 end Kill_Range_Checks;
2481 function Known_To_Have_Preelab_Init (Id : E) return B is
2483 pragma Assert (Is_Type (Id));
2484 return Flag207 (Id);
2485 end Known_To_Have_Preelab_Init;
2487 function Last_Aggregate_Assignment (Id : E) return N is
2489 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2491 end Last_Aggregate_Assignment;
2493 function Last_Assignment (Id : E) return N is
2495 pragma Assert (Is_Assignable (Id));
2497 end Last_Assignment;
2499 function Last_Entity (Id : E) return E is
2504 function Limited_View (Id : E) return E is
2506 pragma Assert (Ekind (Id) = E_Package);
2510 function Linker_Section_Pragma (Id : E) return N is
2513 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2515 end Linker_Section_Pragma;
2517 function Lit_Indexes (Id : E) return E is
2519 pragma Assert (Is_Enumeration_Type (Id));
2523 function Lit_Strings (Id : E) return E is
2525 pragma Assert (Is_Enumeration_Type (Id));
2529 function Low_Bound_Tested (Id : E) return B is
2531 return Flag205 (Id);
2532 end Low_Bound_Tested;
2534 function Machine_Radix_10 (Id : E) return B is
2536 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2538 end Machine_Radix_10;
2540 function Master_Id (Id : E) return E is
2542 pragma Assert (Is_Access_Type (Id));
2546 function Materialize_Entity (Id : E) return B is
2548 return Flag168 (Id);
2549 end Materialize_Entity;
2551 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2553 return Flag262 (Id);
2554 end May_Inherit_Delayed_Rep_Aspects;
2556 function Mechanism (Id : E) return M is
2558 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2559 return UI_To_Int (Uint8 (Id));
2562 function Modulus (Id : E) return Uint is
2564 pragma Assert (Is_Modular_Integer_Type (Id));
2565 return Uint17 (Base_Type (Id));
2568 function Must_Be_On_Byte_Boundary (Id : E) return B is
2570 pragma Assert (Is_Type (Id));
2571 return Flag183 (Id);
2572 end Must_Be_On_Byte_Boundary;
2574 function Must_Have_Preelab_Init (Id : E) return B is
2576 pragma Assert (Is_Type (Id));
2577 return Flag208 (Id);
2578 end Must_Have_Preelab_Init;
2580 function Needs_Debug_Info (Id : E) return B is
2582 return Flag147 (Id);
2583 end Needs_Debug_Info;
2585 function Needs_No_Actuals (Id : E) return B is
2588 (Is_Overloadable (Id)
2589 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2591 end Needs_No_Actuals;
2593 function Never_Set_In_Source (Id : E) return B is
2595 return Flag115 (Id);
2596 end Never_Set_In_Source;
2598 function Next_Inlined_Subprogram (Id : E) return E is
2601 end Next_Inlined_Subprogram;
2603 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2605 pragma Assert (Is_Discrete_Type (Id));
2606 return Flag276 (Id);
2607 end No_Dynamic_Predicate_On_Actual;
2609 function No_Pool_Assigned (Id : E) return B is
2611 pragma Assert (Is_Access_Type (Id));
2612 return Flag131 (Root_Type (Id));
2613 end No_Pool_Assigned;
2615 function No_Predicate_On_Actual (Id : E) return Boolean is
2617 pragma Assert (Is_Discrete_Type (Id));
2618 return Flag275 (Id);
2619 end No_Predicate_On_Actual;
2621 function No_Return (Id : E) return B is
2623 return Flag113 (Id);
2626 function No_Strict_Aliasing (Id : E) return B is
2628 pragma Assert (Is_Access_Type (Id));
2629 return Flag136 (Base_Type (Id));
2630 end No_Strict_Aliasing;
2632 function No_Tagged_Streams_Pragma (Id : E) return N is
2634 pragma Assert (Is_Tagged_Type (Id));
2636 end No_Tagged_Streams_Pragma;
2638 function Non_Binary_Modulus (Id : E) return B is
2640 pragma Assert (Is_Type (Id));
2641 return Flag58 (Base_Type (Id));
2642 end Non_Binary_Modulus;
2644 function Non_Limited_View (Id : E) return E is
2647 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2649 end Non_Limited_View;
2651 function Nonzero_Is_True (Id : E) return B is
2653 pragma Assert (Root_Type (Id) = Standard_Boolean);
2654 return Flag162 (Base_Type (Id));
2655 end Nonzero_Is_True;
2657 function Normalized_First_Bit (Id : E) return U is
2659 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2661 end Normalized_First_Bit;
2663 function Normalized_Position (Id : E) return U is
2665 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2667 end Normalized_Position;
2669 function Normalized_Position_Max (Id : E) return U is
2671 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2673 end Normalized_Position_Max;
2675 function OK_To_Rename (Id : E) return B is
2677 pragma Assert (Ekind (Id) = E_Variable);
2678 return Flag247 (Id);
2681 function OK_To_Reorder_Components (Id : E) return B is
2683 pragma Assert (Is_Record_Type (Id));
2684 return Flag239 (Base_Type (Id));
2685 end OK_To_Reorder_Components;
2687 function Optimize_Alignment_Space (Id : E) return B is
2690 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2691 return Flag241 (Id);
2692 end Optimize_Alignment_Space;
2694 function Optimize_Alignment_Time (Id : E) return B is
2697 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2698 return Flag242 (Id);
2699 end Optimize_Alignment_Time;
2701 function Original_Access_Type (Id : E) return E is
2703 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2705 end Original_Access_Type;
2707 function Original_Array_Type (Id : E) return E is
2709 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2711 end Original_Array_Type;
2713 function Original_Record_Component (Id : E) return E is
2715 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2717 end Original_Record_Component;
2719 function Overlays_Constant (Id : E) return B is
2721 return Flag243 (Id);
2722 end Overlays_Constant;
2724 function Overridden_Operation (Id : E) return E is
2727 end Overridden_Operation;
2729 function Package_Instantiation (Id : E) return N is
2731 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2733 end Package_Instantiation;
2735 function Packed_Array_Impl_Type (Id : E) return E is
2737 pragma Assert (Is_Array_Type (Id));
2739 end Packed_Array_Impl_Type;
2741 function Parent_Subtype (Id : E) return E is
2743 pragma Assert (Is_Record_Type (Id));
2744 return Node19 (Base_Type (Id));
2747 function Part_Of_Constituents (Id : E) return L is
2749 pragma Assert (Ekind (Id) = E_Abstract_State);
2751 end Part_Of_Constituents;
2753 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2755 pragma Assert (Is_Type (Id));
2756 return Flag280 (Id);
2757 end Partial_View_Has_Unknown_Discr;
2759 function Pending_Access_Types (Id : E) return L is
2761 pragma Assert (Is_Type (Id));
2762 return Elist15 (Id);
2763 end Pending_Access_Types;
2765 function Postconditions_Proc (Id : E) return E is
2767 pragma Assert (Ekind_In (Id, E_Entry,
2772 end Postconditions_Proc;
2774 function PPC_Wrapper (Id : E) return E is
2776 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2780 function Prival (Id : E) return E is
2782 pragma Assert (Is_Protected_Component (Id));
2786 function Prival_Link (Id : E) return E is
2788 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2792 function Private_Dependents (Id : E) return L is
2794 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2795 return Elist18 (Id);
2796 end Private_Dependents;
2798 function Private_View (Id : E) return N is
2800 pragma Assert (Is_Private_Type (Id));
2804 function Protected_Body_Subprogram (Id : E) return E is
2806 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2808 end Protected_Body_Subprogram;
2810 function Protected_Formal (Id : E) return E is
2812 pragma Assert (Is_Formal (Id));
2814 end Protected_Formal;
2816 function Protection_Object (Id : E) return E is
2819 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2821 end Protection_Object;
2823 function Reachable (Id : E) return B is
2828 function Referenced (Id : E) return B is
2830 return Flag156 (Id);
2833 function Referenced_As_LHS (Id : E) return B is
2836 end Referenced_As_LHS;
2838 function Referenced_As_Out_Parameter (Id : E) return B is
2840 return Flag227 (Id);
2841 end Referenced_As_Out_Parameter;
2843 function Refinement_Constituents (Id : E) return L is
2845 pragma Assert (Ekind (Id) = E_Abstract_State);
2847 end Refinement_Constituents;
2849 function Register_Exception_Call (Id : E) return N is
2851 pragma Assert (Ekind (Id) = E_Exception);
2853 end Register_Exception_Call;
2855 function Related_Array_Object (Id : E) return E is
2857 pragma Assert (Is_Array_Type (Id));
2859 end Related_Array_Object;
2861 function Related_Expression (Id : E) return N is
2863 pragma Assert (Ekind (Id) in Type_Kind
2864 or else Ekind_In (Id, E_Constant, E_Variable));
2866 end Related_Expression;
2868 function Related_Instance (Id : E) return E is
2870 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2872 end Related_Instance;
2874 function Related_Type (Id : E) return E is
2876 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2880 function Relative_Deadline_Variable (Id : E) return E is
2882 pragma Assert (Is_Task_Type (Id));
2883 return Node28 (Implementation_Base_Type (Id));
2884 end Relative_Deadline_Variable;
2886 function Renamed_Entity (Id : E) return N is
2891 function Renamed_In_Spec (Id : E) return B is
2893 pragma Assert (Ekind (Id) = E_Package);
2894 return Flag231 (Id);
2895 end Renamed_In_Spec;
2897 function Renamed_Object (Id : E) return N is
2902 function Renaming_Map (Id : E) return U is
2907 function Requires_Overriding (Id : E) return B is
2909 pragma Assert (Is_Overloadable (Id));
2910 return Flag213 (Id);
2911 end Requires_Overriding;
2913 function Return_Present (Id : E) return B is
2918 function Return_Applies_To (Id : E) return N is
2921 end Return_Applies_To;
2923 function Returns_By_Ref (Id : E) return B is
2928 function Returns_Limited_View (Id : E) return B is
2930 pragma Assert (Ekind (Id) = E_Function);
2931 return Flag134 (Id);
2932 end Returns_Limited_View;
2934 function Reverse_Bit_Order (Id : E) return B is
2936 pragma Assert (Is_Record_Type (Id));
2937 return Flag164 (Base_Type (Id));
2938 end Reverse_Bit_Order;
2940 function Reverse_Storage_Order (Id : E) return B is
2942 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2943 return Flag93 (Base_Type (Id));
2944 end Reverse_Storage_Order;
2946 function RM_Size (Id : E) return U is
2948 pragma Assert (Is_Type (Id));
2952 function Scalar_Range (Id : E) return N is
2957 function Scale_Value (Id : E) return U is
2962 function Scope_Depth_Value (Id : E) return U is
2965 end Scope_Depth_Value;
2967 function Sec_Stack_Needed_For_Return (Id : E) return B is
2969 return Flag167 (Id);
2970 end Sec_Stack_Needed_For_Return;
2972 function Shadow_Entities (Id : E) return S is
2974 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2976 end Shadow_Entities;
2978 function Shared_Var_Procs_Instance (Id : E) return E is
2980 pragma Assert (Ekind (Id) = E_Variable);
2982 end Shared_Var_Procs_Instance;
2984 function Size_Check_Code (Id : E) return N is
2986 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2988 end Size_Check_Code;
2990 function Size_Depends_On_Discriminant (Id : E) return B is
2992 return Flag177 (Id);
2993 end Size_Depends_On_Discriminant;
2995 function Size_Known_At_Compile_Time (Id : E) return B is
2998 end Size_Known_At_Compile_Time;
3000 function Small_Value (Id : E) return R is
3002 pragma Assert (Is_Fixed_Point_Type (Id));
3003 return Ureal21 (Id);
3006 function SPARK_Aux_Pragma (Id : E) return N is
3009 (Ekind_In (Id, E_Generic_Package, -- package variants
3013 end SPARK_Aux_Pragma;
3015 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3018 (Ekind_In (Id, E_Generic_Package, -- package variants
3021 return Flag266 (Id);
3022 end SPARK_Aux_Pragma_Inherited;
3024 function SPARK_Pragma (Id : E) return N is
3027 (Ekind_In (Id, E_Function, -- subprogram variants
3029 E_Generic_Procedure,
3033 Ekind_In (Id, E_Generic_Package, -- package variants
3039 function SPARK_Pragma_Inherited (Id : E) return B is
3042 (Ekind_In (Id, E_Function, -- subprogram variants
3044 E_Generic_Procedure,
3048 Ekind_In (Id, E_Generic_Package, -- package variants
3051 return Flag265 (Id);
3052 end SPARK_Pragma_Inherited;
3054 function Spec_Entity (Id : E) return E is
3056 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3060 function SSO_Set_High_By_Default (Id : E) return B is
3062 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3063 return Flag273 (Base_Type (Id));
3064 end SSO_Set_High_By_Default;
3066 function SSO_Set_Low_By_Default (Id : E) return B is
3068 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3069 return Flag272 (Base_Type (Id));
3070 end SSO_Set_Low_By_Default;
3072 function Static_Discrete_Predicate (Id : E) return S is
3074 pragma Assert (Is_Discrete_Type (Id));
3076 end Static_Discrete_Predicate;
3078 function Static_Real_Or_String_Predicate (Id : E) return N is
3080 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3082 end Static_Real_Or_String_Predicate;
3084 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3086 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3088 end Status_Flag_Or_Transient_Decl;
3090 function Storage_Size_Variable (Id : E) return E is
3092 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3093 return Node26 (Implementation_Base_Type (Id));
3094 end Storage_Size_Variable;
3096 function Static_Elaboration_Desired (Id : E) return B is
3098 pragma Assert (Ekind (Id) = E_Package);
3100 end Static_Elaboration_Desired;
3102 function Static_Initialization (Id : E) return N is
3105 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3107 end Static_Initialization;
3109 function Stored_Constraint (Id : E) return L is
3112 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3113 return Elist23 (Id);
3114 end Stored_Constraint;
3116 function Stores_Attribute_Old_Prefix (Id : E) return B is
3118 return Flag270 (Id);
3119 end Stores_Attribute_Old_Prefix;
3121 function Strict_Alignment (Id : E) return B is
3123 return Flag145 (Implementation_Base_Type (Id));
3124 end Strict_Alignment;
3126 function String_Literal_Length (Id : E) return U is
3129 end String_Literal_Length;
3131 function String_Literal_Low_Bound (Id : E) return N is
3134 end String_Literal_Low_Bound;
3136 function Subprograms_For_Type (Id : E) return E is
3138 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3140 end Subprograms_For_Type;
3142 function Suppress_Elaboration_Warnings (Id : E) return B is
3144 return Flag148 (Id);
3145 end Suppress_Elaboration_Warnings;
3147 function Suppress_Initialization (Id : E) return B is
3149 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3150 return Flag105 (Id);
3151 end Suppress_Initialization;
3153 function Suppress_Style_Checks (Id : E) return B is
3155 return Flag165 (Id);
3156 end Suppress_Style_Checks;
3158 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3160 return Flag217 (Id);
3161 end Suppress_Value_Tracking_On_Call;
3163 function Task_Body_Procedure (Id : E) return N is
3165 pragma Assert (Ekind (Id) in Task_Kind);
3167 end Task_Body_Procedure;
3169 function Thunk_Entity (Id : E) return E is
3171 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3172 and then Is_Thunk (Id));
3176 function Treat_As_Volatile (Id : E) return B is
3179 end Treat_As_Volatile;
3181 function Underlying_Full_View (Id : E) return E is
3183 pragma Assert (Ekind (Id) in Private_Kind);
3185 end Underlying_Full_View;
3187 function Underlying_Record_View (Id : E) return E is
3190 end Underlying_Record_View;
3192 function Universal_Aliasing (Id : E) return B is
3194 pragma Assert (Is_Type (Id));
3195 return Flag216 (Implementation_Base_Type (Id));
3196 end Universal_Aliasing;
3198 function Unset_Reference (Id : E) return N is
3201 end Unset_Reference;
3203 function Uplevel_Reference_Noted (Id : E) return B is
3205 return Flag283 (Id);
3206 end Uplevel_Reference_Noted;
3208 function Uplevel_References (Id : E) return L is
3210 pragma Assert (Is_Subprogram (Id));
3211 return Elist24 (Id);
3212 end Uplevel_References;
3214 function Used_As_Generic_Actual (Id : E) return B is
3216 return Flag222 (Id);
3217 end Used_As_Generic_Actual;
3219 function Uses_Lock_Free (Id : E) return B is
3221 pragma Assert (Is_Protected_Type (Id));
3222 return Flag188 (Id);
3225 function Uses_Sec_Stack (Id : E) return B is
3230 function Warnings_Off (Id : E) return B is
3235 function Warnings_Off_Used (Id : E) return B is
3237 return Flag236 (Id);
3238 end Warnings_Off_Used;
3240 function Warnings_Off_Used_Unmodified (Id : E) return B is
3242 return Flag237 (Id);
3243 end Warnings_Off_Used_Unmodified;
3245 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3247 return Flag238 (Id);
3248 end Warnings_Off_Used_Unreferenced;
3250 function Wrapped_Entity (Id : E) return E is
3252 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3253 and then Is_Primitive_Wrapper (Id));
3257 function Was_Hidden (Id : E) return B is
3259 return Flag196 (Id);
3262 ------------------------------
3263 -- Classification Functions --
3264 ------------------------------
3266 function Is_Access_Type (Id : E) return B is
3268 return Ekind (Id) in Access_Kind;
3271 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3273 return Ekind (Id) in Access_Protected_Kind;
3274 end Is_Access_Protected_Subprogram_Type;
3276 function Is_Access_Subprogram_Type (Id : E) return B is
3278 return Ekind (Id) in Access_Subprogram_Kind;
3279 end Is_Access_Subprogram_Type;
3281 function Is_Aggregate_Type (Id : E) return B is
3283 return Ekind (Id) in Aggregate_Kind;
3284 end Is_Aggregate_Type;
3286 function Is_Array_Type (Id : E) return B is
3288 return Ekind (Id) in Array_Kind;
3291 function Is_Assignable (Id : E) return B is
3293 return Ekind (Id) in Assignable_Kind;
3296 function Is_Class_Wide_Type (Id : E) return B is
3298 return Ekind (Id) in Class_Wide_Kind;
3299 end Is_Class_Wide_Type;
3301 function Is_Composite_Type (Id : E) return B is
3303 return Ekind (Id) in Composite_Kind;
3304 end Is_Composite_Type;
3306 function Is_Concurrent_Body (Id : E) return B is
3308 return Ekind (Id) in
3309 Concurrent_Body_Kind;
3310 end Is_Concurrent_Body;
3312 function Is_Concurrent_Record_Type (Id : E) return B is
3315 end Is_Concurrent_Record_Type;
3317 function Is_Concurrent_Type (Id : E) return B is
3319 return Ekind (Id) in Concurrent_Kind;
3320 end Is_Concurrent_Type;
3322 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3324 return Ekind (Id) in
3325 Decimal_Fixed_Point_Kind;
3326 end Is_Decimal_Fixed_Point_Type;
3328 function Is_Digits_Type (Id : E) return B is
3330 return Ekind (Id) in Digits_Kind;
3333 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3335 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3336 end Is_Discrete_Or_Fixed_Point_Type;
3338 function Is_Discrete_Type (Id : E) return B is
3340 return Ekind (Id) in Discrete_Kind;
3341 end Is_Discrete_Type;
3343 function Is_Elementary_Type (Id : E) return B is
3345 return Ekind (Id) in Elementary_Kind;
3346 end Is_Elementary_Type;
3348 function Is_Entry (Id : E) return B is
3350 return Ekind (Id) in Entry_Kind;
3353 function Is_Enumeration_Type (Id : E) return B is
3355 return Ekind (Id) in
3357 end Is_Enumeration_Type;
3359 function Is_Fixed_Point_Type (Id : E) return B is
3361 return Ekind (Id) in
3363 end Is_Fixed_Point_Type;
3365 function Is_Floating_Point_Type (Id : E) return B is
3367 return Ekind (Id) in Float_Kind;
3368 end Is_Floating_Point_Type;
3370 function Is_Formal (Id : E) return B is
3372 return Ekind (Id) in Formal_Kind;
3375 function Is_Formal_Object (Id : E) return B is
3377 return Ekind (Id) in Formal_Object_Kind;
3378 end Is_Formal_Object;
3380 function Is_Generic_Subprogram (Id : E) return B is
3382 return Ekind (Id) in Generic_Subprogram_Kind;
3383 end Is_Generic_Subprogram;
3385 function Is_Generic_Unit (Id : E) return B is
3387 return Ekind (Id) in Generic_Unit_Kind;
3388 end Is_Generic_Unit;
3390 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3392 return Ekind (Id) in
3393 Incomplete_Or_Private_Kind;
3394 end Is_Incomplete_Or_Private_Type;
3396 function Is_Incomplete_Type (Id : E) return B is
3398 return Ekind (Id) in
3400 end Is_Incomplete_Type;
3402 function Is_Integer_Type (Id : E) return B is
3404 return Ekind (Id) in Integer_Kind;
3405 end Is_Integer_Type;
3407 function Is_Modular_Integer_Type (Id : E) return B is
3409 return Ekind (Id) in
3410 Modular_Integer_Kind;
3411 end Is_Modular_Integer_Type;
3413 function Is_Named_Number (Id : E) return B is
3415 return Ekind (Id) in Named_Kind;
3416 end Is_Named_Number;
3418 function Is_Numeric_Type (Id : E) return B is
3420 return Ekind (Id) in Numeric_Kind;
3421 end Is_Numeric_Type;
3423 function Is_Object (Id : E) return B is
3425 return Ekind (Id) in Object_Kind;
3428 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3430 return Ekind (Id) in
3431 Ordinary_Fixed_Point_Kind;
3432 end Is_Ordinary_Fixed_Point_Type;
3434 function Is_Overloadable (Id : E) return B is
3436 return Ekind (Id) in Overloadable_Kind;
3437 end Is_Overloadable;
3439 function Is_Private_Type (Id : E) return B is
3441 return Ekind (Id) in Private_Kind;
3442 end Is_Private_Type;
3444 function Is_Protected_Type (Id : E) return B is
3446 return Ekind (Id) in Protected_Kind;
3447 end Is_Protected_Type;
3449 function Is_Real_Type (Id : E) return B is
3451 return Ekind (Id) in Real_Kind;
3454 function Is_Record_Type (Id : E) return B is
3456 return Ekind (Id) in Record_Kind;
3459 function Is_Scalar_Type (Id : E) return B is
3461 return Ekind (Id) in Scalar_Kind;
3464 function Is_Signed_Integer_Type (Id : E) return B is
3466 return Ekind (Id) in Signed_Integer_Kind;
3467 end Is_Signed_Integer_Type;
3469 function Is_Subprogram (Id : E) return B is
3471 return Ekind (Id) in Subprogram_Kind;
3474 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3476 return Ekind (Id) in Subprogram_Kind
3478 Ekind (Id) in Generic_Subprogram_Kind;
3479 end Is_Subprogram_Or_Generic_Subprogram;
3481 function Is_Task_Type (Id : E) return B is
3483 return Ekind (Id) in Task_Kind;
3486 function Is_Type (Id : E) return B is
3488 return Ekind (Id) in Type_Kind;
3491 ------------------------------
3492 -- Attribute Set Procedures --
3493 ------------------------------
3495 -- Note: in many of these set procedures an "obvious" assertion is missing.
3496 -- The reason for this is that in many cases, a field is set before the
3497 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3498 -- it is possible to add assertions that specifically include the E_Void
3499 -- possibility, but in some cases, we just omit the assertions.
3501 procedure Set_Abstract_States (Id : E; V : L) is
3503 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3504 Set_Elist25 (Id, V);
3505 end Set_Abstract_States;
3507 procedure Set_Accept_Address (Id : E; V : L) is
3509 Set_Elist21 (Id, V);
3510 end Set_Accept_Address;
3512 procedure Set_Access_Disp_Table (Id : E; V : L) is
3514 pragma Assert (Ekind (Id) = E_Record_Type
3515 and then Id = Implementation_Base_Type (Id));
3516 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3517 Set_Elist16 (Id, V);
3518 end Set_Access_Disp_Table;
3520 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3523 end Set_Associated_Formal_Package;
3525 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3528 end Set_Associated_Node_For_Itype;
3530 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3532 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3534 end Set_Associated_Storage_Pool;
3536 procedure Set_Actual_Subtype (Id : E; V : E) is
3539 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3540 or else Is_Formal (Id));
3542 end Set_Actual_Subtype;
3544 procedure Set_Address_Taken (Id : E; V : B := True) is
3546 Set_Flag104 (Id, V);
3547 end Set_Address_Taken;
3549 procedure Set_Alias (Id : E; V : E) is
3552 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3556 procedure Set_Alignment (Id : E; V : U) is
3558 pragma Assert (Is_Type (Id)
3559 or else Is_Formal (Id)
3560 or else Ekind_In (Id, E_Loop_Parameter,
3567 procedure Set_Barrier_Function (Id : E; V : N) is
3569 pragma Assert (Is_Entry (Id));
3571 end Set_Barrier_Function;
3573 procedure Set_Block_Node (Id : E; V : N) is
3575 pragma Assert (Ekind (Id) = E_Block);
3579 procedure Set_Body_Entity (Id : E; V : E) is
3581 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3583 end Set_Body_Entity;
3585 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3588 (Ekind (Id) = E_Package
3589 or else Is_Subprogram (Id)
3590 or else Is_Generic_Unit (Id));
3592 end Set_Body_Needed_For_SAL;
3594 procedure Set_Body_References (Id : E; V : L) is
3596 pragma Assert (Ekind (Id) = E_Abstract_State);
3597 Set_Elist16 (Id, V);
3598 end Set_Body_References;
3600 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3602 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3604 end Set_BIP_Initialization_Call;
3606 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3608 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3609 Set_Flag125 (Id, V);
3610 end Set_C_Pass_By_Copy;
3612 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3615 end Set_Can_Never_Be_Null;
3617 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3620 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3621 Set_Flag229 (Id, V);
3622 end Set_Can_Use_Internal_Rep;
3624 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3627 end Set_Checks_May_Be_Suppressed;
3629 procedure Set_Class_Wide_Type (Id : E; V : E) is
3631 pragma Assert (Is_Type (Id));
3633 end Set_Class_Wide_Type;
3635 procedure Set_Cloned_Subtype (Id : E; V : E) is
3637 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3639 end Set_Cloned_Subtype;
3641 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3643 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3645 end Set_Component_Bit_Offset;
3647 procedure Set_Component_Clause (Id : E; V : N) is
3649 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3651 end Set_Component_Clause;
3653 procedure Set_Component_Size (Id : E; V : U) is
3655 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3657 end Set_Component_Size;
3659 procedure Set_Component_Type (Id : E; V : E) is
3661 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3663 end Set_Component_Type;
3665 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3668 (Ekind_In (Id, E_Block,
3672 E_Generic_Procedure,
3676 E_Subprogram_Body));
3677 Set_Flag279 (Id, V);
3678 end Set_Contains_Ignored_Ghost_Code;
3680 procedure Set_Contract (Id : E; V : N) is
3683 (Ekind_In (Id, E_Entry,
3691 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3695 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3698 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3700 end Set_Corresponding_Concurrent_Type;
3702 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3704 pragma Assert (Ekind (Id) = E_Discriminant);
3706 end Set_Corresponding_Discriminant;
3708 procedure Set_Corresponding_Equality (Id : E; V : E) is
3711 (Ekind (Id) = E_Function
3712 and then not Comes_From_Source (Id)
3713 and then Chars (Id) = Name_Op_Ne);
3715 end Set_Corresponding_Equality;
3717 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3719 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3721 end Set_Corresponding_Protected_Entry;
3723 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3725 pragma Assert (Is_Concurrent_Type (Id));
3727 end Set_Corresponding_Record_Type;
3729 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3732 end Set_Corresponding_Remote_Type;
3734 procedure Set_Current_Use_Clause (Id : E; V : E) is
3736 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3738 end Set_Current_Use_Clause;
3740 procedure Set_Current_Value (Id : E; V : N) is
3742 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3744 end Set_Current_Value;
3746 procedure Set_CR_Discriminant (Id : E; V : E) is
3749 end Set_CR_Discriminant;
3751 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3753 Set_Flag166 (Id, V);
3754 end Set_Debug_Info_Off;
3756 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3759 end Set_Debug_Renaming_Link;
3761 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3763 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3765 end Set_Default_Aspect_Component_Value;
3767 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3769 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3771 end Set_Default_Aspect_Value;
3773 procedure Set_Default_Expr_Function (Id : E; V : E) is
3775 pragma Assert (Is_Formal (Id));
3777 end Set_Default_Expr_Function;
3779 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3781 Set_Flag108 (Id, V);
3782 end Set_Default_Expressions_Processed;
3784 procedure Set_Default_Value (Id : E; V : N) is
3786 pragma Assert (Is_Formal (Id));
3788 end Set_Default_Value;
3790 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3794 or else Is_Task_Type (Id)
3795 or else Ekind (Id) = E_Block);
3796 Set_Flag114 (Id, V);
3797 end Set_Delay_Cleanups;
3799 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3802 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3805 end Set_Delay_Subprogram_Descriptors;
3807 procedure Set_Delta_Value (Id : E; V : R) is
3809 pragma Assert (Is_Fixed_Point_Type (Id));
3810 Set_Ureal18 (Id, V);
3811 end Set_Delta_Value;
3813 procedure Set_Dependent_Instances (Id : E; V : L) is
3815 pragma Assert (Is_Generic_Instance (Id));
3817 end Set_Dependent_Instances;
3819 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3821 pragma Assert (Nkind (Id) in N_Entity);
3823 end Set_Depends_On_Private;
3825 procedure Set_Derived_Type_Link (Id : E; V : E) is
3827 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3829 end Set_Derived_Type_Link;
3831 procedure Set_Digits_Value (Id : E; V : U) is
3834 (Is_Floating_Point_Type (Id)
3835 or else Is_Decimal_Fixed_Point_Type (Id));
3837 end Set_Digits_Value;
3839 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3842 end Set_Directly_Designated_Type;
3844 procedure Set_Discard_Names (Id : E; V : B := True) is
3847 end Set_Discard_Names;
3849 procedure Set_Discriminal (Id : E; V : E) is
3851 pragma Assert (Ekind (Id) = E_Discriminant);
3853 end Set_Discriminal;
3855 procedure Set_Discriminal_Link (Id : E; V : E) is
3858 end Set_Discriminal_Link;
3860 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3862 pragma Assert (Ekind (Id) = E_Component);
3864 end Set_Discriminant_Checking_Func;
3866 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3868 pragma Assert (Nkind (Id) in N_Entity);
3869 Set_Elist21 (Id, V);
3870 end Set_Discriminant_Constraint;
3872 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3875 end Set_Discriminant_Default_Value;
3877 procedure Set_Discriminant_Number (Id : E; V : U) is
3880 end Set_Discriminant_Number;
3882 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3884 pragma Assert (Ekind (Id) = E_Record_Type
3885 and then Id = Implementation_Base_Type (Id));
3886 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3887 Set_Elist26 (Id, V);
3888 end Set_Dispatch_Table_Wrappers;
3890 procedure Set_DT_Entry_Count (Id : E; V : U) is
3892 pragma Assert (Ekind (Id) = E_Component);
3894 end Set_DT_Entry_Count;
3896 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3898 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3900 end Set_DT_Offset_To_Top_Func;
3902 procedure Set_DT_Position (Id : E; V : U) is
3904 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3906 end Set_DT_Position;
3908 procedure Set_DTC_Entity (Id : E; V : E) is
3910 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3914 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3916 pragma Assert (Ekind (Id) = E_Package);
3917 Set_Flag210 (Id, V);
3918 end Set_Elaborate_Body_Desirable;
3920 procedure Set_Elaboration_Entity (Id : E; V : E) is
3925 Ekind (Id) = E_Package
3927 Is_Generic_Unit (Id));
3929 end Set_Elaboration_Entity;
3931 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3936 Ekind (Id) = E_Package
3938 Is_Generic_Unit (Id));
3939 Set_Flag174 (Id, V);
3940 end Set_Elaboration_Entity_Required;
3942 procedure Set_Encapsulating_State (Id : E; V : E) is
3944 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3946 end Set_Encapsulating_State;
3948 procedure Set_Enclosing_Scope (Id : E; V : E) is
3951 end Set_Enclosing_Scope;
3953 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3955 pragma Assert (Is_Entry (Id));
3956 Set_Flag152 (Id, V);
3957 end Set_Entry_Accepted;
3959 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3962 end Set_Entry_Bodies_Array;
3964 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3967 end Set_Entry_Cancel_Parameter;
3969 procedure Set_Entry_Component (Id : E; V : E) is
3972 end Set_Entry_Component;
3974 procedure Set_Entry_Formal (Id : E; V : E) is
3977 end Set_Entry_Formal;
3979 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3981 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3983 end Set_Entry_Index_Constant;
3985 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3988 end Set_Entry_Parameters_Type;
3990 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3992 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3994 end Set_Enum_Pos_To_Rep;
3996 procedure Set_Enumeration_Pos (Id : E; V : U) is
3998 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4000 end Set_Enumeration_Pos;
4002 procedure Set_Enumeration_Rep (Id : E; V : U) is
4004 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4006 end Set_Enumeration_Rep;
4008 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4010 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4012 end Set_Enumeration_Rep_Expr;
4014 procedure Set_Equivalent_Type (Id : E; V : E) is
4017 (Ekind_In (Id, E_Class_Wide_Type,
4018 E_Class_Wide_Subtype,
4019 E_Access_Protected_Subprogram_Type,
4020 E_Anonymous_Access_Protected_Subprogram_Type,
4021 E_Access_Subprogram_Type,
4024 end Set_Equivalent_Type;
4026 procedure Set_Esize (Id : E; V : U) is
4031 procedure Set_Extra_Accessibility (Id : E; V : E) is
4034 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4036 end Set_Extra_Accessibility;
4038 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4040 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4042 end Set_Extra_Accessibility_Of_Result;
4044 procedure Set_Extra_Constrained (Id : E; V : E) is
4046 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4048 end Set_Extra_Constrained;
4050 procedure Set_Extra_Formal (Id : E; V : E) is
4053 end Set_Extra_Formal;
4055 procedure Set_Extra_Formals (Id : E; V : E) is
4058 (Is_Overloadable (Id)
4059 or else Ekind_In (Id, E_Entry_Family,
4061 E_Subprogram_Type));
4063 end Set_Extra_Formals;
4065 procedure Set_Finalization_Master (Id : E; V : E) is
4067 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4069 end Set_Finalization_Master;
4071 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4073 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4074 Set_Flag158 (Id, V);
4075 end Set_Finalize_Storage_Only;
4077 procedure Set_Finalizer (Id : E; V : E) is
4079 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4083 procedure Set_First_Entity (Id : E; V : E) is
4086 end Set_First_Entity;
4088 procedure Set_First_Exit_Statement (Id : E; V : N) is
4090 pragma Assert (Ekind (Id) = E_Loop);
4092 end Set_First_Exit_Statement;
4094 procedure Set_First_Index (Id : E; V : N) is
4096 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4098 end Set_First_Index;
4100 procedure Set_First_Literal (Id : E; V : E) is
4102 pragma Assert (Is_Enumeration_Type (Id));
4104 end Set_First_Literal;
4106 procedure Set_First_Private_Entity (Id : E; V : E) is
4108 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4109 or else Ekind (Id) in Concurrent_Kind);
4111 end Set_First_Private_Entity;
4113 procedure Set_First_Rep_Item (Id : E; V : N) is
4116 end Set_First_Rep_Item;
4118 procedure Set_Float_Rep (Id : E; V : F) is
4119 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4121 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4124 procedure Set_Freeze_Node (Id : E; V : N) is
4127 end Set_Freeze_Node;
4129 procedure Set_From_Limited_With (Id : E; V : B := True) is
4132 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4133 Set_Flag159 (Id, V);
4134 end Set_From_Limited_With;
4136 procedure Set_Full_View (Id : E; V : E) is
4138 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4142 procedure Set_Generic_Homonym (Id : E; V : E) is
4145 end Set_Generic_Homonym;
4147 procedure Set_Generic_Renamings (Id : E; V : L) is
4149 Set_Elist23 (Id, V);
4150 end Set_Generic_Renamings;
4152 procedure Set_Handler_Records (Id : E; V : S) is
4155 end Set_Handler_Records;
4157 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4159 pragma Assert (Id = Base_Type (Id));
4160 Set_Flag135 (Id, V);
4161 end Set_Has_Aliased_Components;
4163 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4166 end Set_Has_Alignment_Clause;
4168 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4171 end Set_Has_All_Calls_Remote;
4173 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4176 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4177 Set_Flag253 (Id, V);
4178 end Set_Has_Anonymous_Master;
4180 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4182 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4184 end Set_Has_Atomic_Components;
4186 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4189 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4190 Set_Flag139 (Id, V);
4191 end Set_Has_Biased_Representation;
4193 procedure Set_Has_Completion (Id : E; V : B := True) is
4196 end Set_Has_Completion;
4198 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4200 pragma Assert (Is_Type (Id));
4202 end Set_Has_Completion_In_Body;
4204 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4206 pragma Assert (Ekind (Id) = E_Record_Type);
4207 Set_Flag140 (Id, V);
4208 end Set_Has_Complex_Representation;
4210 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4212 pragma Assert (Ekind (Id) = E_Array_Type);
4214 end Set_Has_Component_Size_Clause;
4216 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4218 pragma Assert (Is_Type (Id));
4219 Set_Flag187 (Id, V);
4220 end Set_Has_Constrained_Partial_View;
4222 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4224 Set_Flag181 (Id, V);
4225 end Set_Has_Contiguous_Rep;
4227 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4229 pragma Assert (Id = Base_Type (Id));
4231 end Set_Has_Controlled_Component;
4233 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4236 end Set_Has_Controlling_Result;
4238 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4240 Set_Flag119 (Id, V);
4241 end Set_Has_Convention_Pragma;
4243 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4246 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4247 and then Is_Base_Type (Id));
4249 end Set_Has_Default_Aspect;
4251 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4253 pragma Assert (Is_Type (Id));
4255 end Set_Has_Default_Init_Cond;
4257 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4259 pragma Assert (Nkind (Id) in N_Entity);
4260 Set_Flag200 (Id, V);
4261 end Set_Has_Delayed_Aspects;
4263 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4265 pragma Assert (Nkind (Id) in N_Entity);
4267 end Set_Has_Delayed_Freeze;
4269 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4271 pragma Assert (Nkind (Id) in N_Entity);
4272 Set_Flag261 (Id, V);
4273 end Set_Has_Delayed_Rep_Aspects;
4275 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4277 pragma Assert (Nkind (Id) in N_Entity);
4279 end Set_Has_Discriminants;
4281 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4283 pragma Assert (Ekind (Id) = E_Record_Type
4284 and then Is_Tagged_Type (Id));
4285 Set_Flag220 (Id, V);
4286 end Set_Has_Dispatch_Table;
4288 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4290 pragma Assert (Is_Type (Id));
4291 Set_Flag258 (Id, V);
4292 end Set_Has_Dynamic_Predicate_Aspect;
4294 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4296 pragma Assert (Is_Enumeration_Type (Id));
4298 end Set_Has_Enumeration_Rep_Clause;
4300 procedure Set_Has_Exit (Id : E; V : B := True) is
4305 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4307 pragma Assert (Ekind_In (Id, E_Entry,
4311 Set_Flag240 (Id, V);
4312 end Set_Has_Expanded_Contract;
4314 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4316 Set_Flag175 (Id, V);
4317 end Set_Has_Forward_Instantiation;
4319 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4321 Set_Flag173 (Id, V);
4322 end Set_Has_Fully_Qualified_Name;
4324 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4327 end Set_Has_Gigi_Rep_Item;
4329 procedure Set_Has_Homonym (Id : E; V : B := True) is
4332 end Set_Has_Homonym;
4334 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4336 Set_Flag251 (Id, V);
4337 end Set_Has_Implicit_Dereference;
4339 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4341 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4343 end Set_Has_Independent_Components;
4345 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4347 pragma Assert (Is_Type (Id));
4348 Set_Flag248 (Id, V);
4349 end Set_Has_Inheritable_Invariants;
4351 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4353 pragma Assert (Is_Type (Id));
4354 Set_Flag133 (Id, V);
4355 end Set_Has_Inherited_Default_Init_Cond;
4357 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4359 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4360 Set_Flag219 (Id, V);
4361 end Set_Has_Initial_Value;
4363 procedure Set_Has_Invariants (Id : E; V : B := True) is
4365 pragma Assert (Is_Type (Id));
4366 Set_Flag232 (Id, V);
4367 end Set_Has_Invariants;
4369 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4371 pragma Assert (Ekind (Id) = E_Loop);
4372 Set_Flag260 (Id, V);
4373 end Set_Has_Loop_Entry_Attributes;
4375 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4377 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4379 end Set_Has_Machine_Radix_Clause;
4381 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4384 end Set_Has_Master_Entity;
4386 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4388 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4389 Set_Flag142 (Id, V);
4390 end Set_Has_Missing_Return;
4392 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4394 Set_Flag101 (Id, V);
4395 end Set_Has_Nested_Block_With_Handler;
4397 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4399 pragma Assert (Is_Subprogram (Id));
4400 Set_Flag282 (Id, V);
4401 end Set_Has_Nested_Subprogram;
4403 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4405 Set_Flag215 (Id, V);
4406 end Set_Has_Uplevel_Reference;
4408 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4410 pragma Assert (Id = Base_Type (Id));
4412 end Set_Has_Non_Standard_Rep;
4414 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4416 pragma Assert (Is_Type (Id));
4417 Set_Flag172 (Id, V);
4418 end Set_Has_Object_Size_Clause;
4420 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4422 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4423 Set_Flag110 (Id, V);
4424 end Set_Has_Out_Or_In_Out_Parameter;
4426 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4428 Set_Flag154 (Id, V);
4429 end Set_Has_Per_Object_Constraint;
4431 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4433 pragma Assert (Is_Access_Type (Id));
4434 Set_Flag27 (Base_Type (Id), V);
4435 end Set_Has_Pragma_Controlled;
4437 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4439 Set_Flag150 (Id, V);
4440 end Set_Has_Pragma_Elaborate_Body;
4442 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4444 Set_Flag157 (Id, V);
4445 end Set_Has_Pragma_Inline;
4447 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4449 Set_Flag230 (Id, V);
4450 end Set_Has_Pragma_Inline_Always;
4452 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4454 Set_Flag201 (Id, V);
4455 end Set_Has_Pragma_No_Inline;
4457 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4459 pragma Assert (Is_Enumeration_Type (Id));
4460 pragma Assert (Id = Base_Type (Id));
4461 Set_Flag198 (Id, V);
4462 end Set_Has_Pragma_Ordered;
4464 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4466 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4467 pragma Assert (Id = Base_Type (Id));
4468 Set_Flag121 (Id, V);
4469 end Set_Has_Pragma_Pack;
4471 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4473 Set_Flag221 (Id, V);
4474 end Set_Has_Pragma_Preelab_Init;
4476 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4478 Set_Flag203 (Id, V);
4479 end Set_Has_Pragma_Pure;
4481 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4483 Set_Flag179 (Id, V);
4484 end Set_Has_Pragma_Pure_Function;
4486 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4488 Set_Flag169 (Id, V);
4489 end Set_Has_Pragma_Thread_Local_Storage;
4491 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4493 Set_Flag233 (Id, V);
4494 end Set_Has_Pragma_Unmodified;
4496 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4498 Set_Flag180 (Id, V);
4499 end Set_Has_Pragma_Unreferenced;
4501 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4503 pragma Assert (Is_Type (Id));
4504 Set_Flag212 (Id, V);
4505 end Set_Has_Pragma_Unreferenced_Objects;
4507 procedure Set_Has_Predicates (Id : E; V : B := True) is
4509 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4510 Set_Flag250 (Id, V);
4511 end Set_Has_Predicates;
4513 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4515 pragma Assert (Id = Base_Type (Id));
4516 Set_Flag120 (Id, V);
4517 end Set_Has_Primitive_Operations;
4519 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4521 pragma Assert (Is_Type (Id));
4522 Set_Flag151 (Id, V);
4523 end Set_Has_Private_Ancestor;
4525 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4527 Set_Flag155 (Id, V);
4528 end Set_Has_Private_Declaration;
4530 procedure Set_Has_Protected (Id : E; V : B := True) is
4532 Set_Flag271 (Id, V);
4533 end Set_Has_Protected;
4535 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4537 Set_Flag161 (Id, V);
4538 end Set_Has_Qualified_Name;
4540 procedure Set_Has_RACW (Id : E; V : B := True) is
4542 pragma Assert (Ekind (Id) = E_Package);
4543 Set_Flag214 (Id, V);
4546 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4548 pragma Assert (Id = Base_Type (Id));
4550 end Set_Has_Record_Rep_Clause;
4552 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4554 pragma Assert (Is_Subprogram (Id));
4555 Set_Flag143 (Id, V);
4556 end Set_Has_Recursive_Call;
4558 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4560 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4561 Set_Flag267 (Id, V);
4562 end Set_Has_Shift_Operator;
4564 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4567 end Set_Has_Size_Clause;
4569 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4572 end Set_Has_Small_Clause;
4574 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4576 pragma Assert (Id = Base_Type (Id));
4577 Set_Flag100 (Id, V);
4578 end Set_Has_Specified_Layout;
4580 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4582 pragma Assert (Is_Type (Id));
4583 Set_Flag190 (Id, V);
4584 end Set_Has_Specified_Stream_Input;
4586 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4588 pragma Assert (Is_Type (Id));
4589 Set_Flag191 (Id, V);
4590 end Set_Has_Specified_Stream_Output;
4592 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4594 pragma Assert (Is_Type (Id));
4595 Set_Flag192 (Id, V);
4596 end Set_Has_Specified_Stream_Read;
4598 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4600 pragma Assert (Is_Type (Id));
4601 Set_Flag193 (Id, V);
4602 end Set_Has_Specified_Stream_Write;
4604 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4606 Set_Flag211 (Id, V);
4607 end Set_Has_Static_Discriminants;
4609 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4611 pragma Assert (Is_Type (Id));
4612 Set_Flag269 (Id, V);
4613 end Set_Has_Static_Predicate;
4615 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4617 pragma Assert (Is_Type (Id));
4618 Set_Flag259 (Id, V);
4619 end Set_Has_Static_Predicate_Aspect;
4621 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4623 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4624 pragma Assert (Id = Base_Type (Id));
4626 end Set_Has_Storage_Size_Clause;
4628 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4630 pragma Assert (Is_Elementary_Type (Id));
4631 Set_Flag184 (Id, V);
4632 end Set_Has_Stream_Size_Clause;
4634 procedure Set_Has_Task (Id : E; V : B := True) is
4636 pragma Assert (Id = Base_Type (Id));
4640 procedure Set_Has_Thunks (Id : E; V : B := True) is
4642 pragma Assert (Is_Tag (Id));
4643 Set_Flag228 (Id, V);
4646 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4648 pragma Assert (Id = Base_Type (Id));
4649 Set_Flag123 (Id, V);
4650 end Set_Has_Unchecked_Union;
4652 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4654 pragma Assert (Is_Type (Id));
4656 end Set_Has_Unknown_Discriminants;
4658 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4660 pragma Assert (Ekind (Id) = E_Abstract_State);
4661 Set_Flag263 (Id, V);
4662 end Set_Has_Visible_Refinement;
4664 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4666 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4668 end Set_Has_Volatile_Components;
4670 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4672 Set_Flag182 (Id, V);
4673 end Set_Has_Xref_Entry;
4675 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4677 pragma Assert (Ekind (Id) = E_Variable);
4679 end Set_Hiding_Loop_Variable;
4681 procedure Set_Homonym (Id : E; V : E) is
4683 pragma Assert (Id /= V);
4687 procedure Set_Import_Pragma (Id : E; V : E) is
4689 pragma Assert (Is_Subprogram (Id));
4691 end Set_Import_Pragma;
4693 procedure Set_Interface_Alias (Id : E; V : E) is
4697 and then Is_Hidden (Id)
4698 and then (Ekind_In (Id, E_Procedure, E_Function)));
4700 end Set_Interface_Alias;
4702 procedure Set_Interfaces (Id : E; V : L) is
4704 pragma Assert (Is_Record_Type (Id));
4705 Set_Elist25 (Id, V);
4708 procedure Set_In_Package_Body (Id : E; V : B := True) is
4711 end Set_In_Package_Body;
4713 procedure Set_In_Private_Part (Id : E; V : B := True) is
4716 end Set_In_Private_Part;
4718 procedure Set_In_Use (Id : E; V : B := True) is
4720 pragma Assert (Nkind (Id) in N_Entity);
4724 procedure Set_Initialization_Statements (Id : E; V : N) is
4726 -- Tolerate an E_Void entity since this can be called while resolving
4727 -- an aggregate used as the initialization expression for an object
4728 -- declaration, and this occurs before the Ekind for the object is set.
4730 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4732 end Set_Initialization_Statements;
4734 procedure Set_Inner_Instances (Id : E; V : L) is
4736 Set_Elist23 (Id, V);
4737 end Set_Inner_Instances;
4739 procedure Set_Interface_Name (Id : E; V : N) is
4742 end Set_Interface_Name;
4744 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4746 pragma Assert (Is_Overloadable (Id));
4748 end Set_Is_Abstract_Subprogram;
4750 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4752 pragma Assert (Is_Type (Id));
4753 Set_Flag146 (Id, V);
4754 end Set_Is_Abstract_Type;
4756 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4758 pragma Assert (Is_Access_Type (Id));
4759 Set_Flag194 (Id, V);
4760 end Set_Is_Local_Anonymous_Access;
4762 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4764 pragma Assert (Is_Access_Type (Id));
4766 end Set_Is_Access_Constant;
4768 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4770 Set_Flag185 (Id, V);
4771 end Set_Is_Ada_2005_Only;
4773 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4775 Set_Flag199 (Id, V);
4776 end Set_Is_Ada_2012_Only;
4778 procedure Set_Is_Aliased (Id : E; V : B := True) is
4780 pragma Assert (Nkind (Id) in N_Entity);
4784 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4787 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4789 end Set_Is_Asynchronous;
4791 procedure Set_Is_Atomic (Id : E; V : B := True) is
4796 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4798 pragma Assert ((not V)
4799 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4800 Set_Flag122 (Id, V);
4801 end Set_Is_Bit_Packed_Array;
4803 procedure Set_Is_Called (Id : E; V : B := True) is
4805 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4806 Set_Flag102 (Id, V);
4809 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4812 end Set_Is_Character_Type;
4814 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4816 pragma Assert (Is_Formal (Id)
4817 or else Is_Object (Id)
4818 or else Is_Package_Or_Generic_Package (Id)
4819 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4820 or else Is_Type (Id)
4821 or else Ekind (Id) = E_Abstract_State
4822 or else Ekind (Id) = E_Component
4823 or else Ekind (Id) = E_Discriminant
4824 or else Ekind (Id) = E_Exception
4825 or else Ekind (Id) = E_Package_Body
4826 or else Ekind (Id) = E_Subprogram_Body
4828 -- Allow this attribute to appear on non-analyzed entities
4830 or else Ekind (Id) = E_Void);
4831 Set_Flag277 (Id, V);
4832 end Set_Is_Checked_Ghost_Entity;
4834 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4837 end Set_Is_Child_Unit;
4839 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4842 end Set_Is_Class_Wide_Equivalent_Type;
4844 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4846 Set_Flag149 (Id, V);
4847 end Set_Is_Compilation_Unit;
4849 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4851 pragma Assert (Ekind (Id) = E_Discriminant);
4852 Set_Flag103 (Id, V);
4853 end Set_Is_Completely_Hidden;
4855 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4858 end Set_Is_Concurrent_Record_Type;
4860 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4863 end Set_Is_Constr_Subt_For_U_Nominal;
4865 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4867 Set_Flag141 (Id, V);
4868 end Set_Is_Constr_Subt_For_UN_Aliased;
4870 procedure Set_Is_Constrained (Id : E; V : B := True) is
4872 pragma Assert (Nkind (Id) in N_Entity);
4874 end Set_Is_Constrained;
4876 procedure Set_Is_Constructor (Id : E; V : B := True) is
4879 end Set_Is_Constructor;
4881 procedure Set_Is_Controlled (Id : E; V : B := True) is
4883 pragma Assert (Id = Base_Type (Id));
4885 end Set_Is_Controlled;
4887 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4889 pragma Assert (Is_Formal (Id));
4891 end Set_Is_Controlling_Formal;
4893 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4896 end Set_Is_CPP_Class;
4898 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4900 pragma Assert (Ekind (Id) = E_Procedure);
4901 Set_Flag132 (Id, V);
4902 end Set_Is_Default_Init_Cond_Procedure;
4904 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4906 pragma Assert (Is_Type (Id));
4907 Set_Flag223 (Id, V);
4908 end Set_Is_Descendent_Of_Address;
4910 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4912 Set_Flag176 (Id, V);
4913 end Set_Is_Discrim_SO_Function;
4915 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4917 Set_Flag264 (Id, V);
4918 end Set_Is_Discriminant_Check_Function;
4920 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4922 Set_Flag234 (Id, V);
4923 end Set_Is_Dispatch_Table_Entity;
4925 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4930 Is_Overloadable (Id)
4932 Ekind (Id) = E_Subprogram_Type);
4935 end Set_Is_Dispatching_Operation;
4937 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4939 Set_Flag124 (Id, V);
4940 end Set_Is_Eliminated;
4942 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4945 end Set_Is_Entry_Formal;
4947 procedure Set_Is_Exported (Id : E; V : B := True) is
4950 end Set_Is_Exported;
4952 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4955 end Set_Is_First_Subtype;
4957 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4959 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4960 Set_Flag118 (Id, V);
4961 end Set_Is_For_Access_Subtype;
4963 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4965 Set_Flag111 (Id, V);
4966 end Set_Is_Formal_Subprogram;
4968 procedure Set_Is_Frozen (Id : E; V : B := True) is
4970 pragma Assert (Nkind (Id) in N_Entity);
4974 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4976 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4977 Set_Flag274 (Id, V);
4978 end Set_Is_Generic_Actual_Subprogram;
4980 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4982 pragma Assert (Is_Type (Id));
4984 end Set_Is_Generic_Actual_Type;
4986 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4988 Set_Flag130 (Id, V);
4989 end Set_Is_Generic_Instance;
4991 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4993 pragma Assert (Nkind (Id) in N_Entity);
4995 end Set_Is_Generic_Type;
4997 procedure Set_Is_Hidden (Id : E; V : B := True) is
5002 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5004 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5006 end Set_Is_Hidden_Non_Overridden_Subpgm;
5008 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5010 Set_Flag171 (Id, V);
5011 end Set_Is_Hidden_Open_Scope;
5013 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5015 pragma Assert (Is_Formal (Id)
5016 or else Is_Object (Id)
5017 or else Is_Package_Or_Generic_Package (Id)
5018 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5019 or else Is_Type (Id)
5020 or else Ekind (Id) = E_Abstract_State
5021 or else Ekind (Id) = E_Component
5022 or else Ekind (Id) = E_Discriminant
5023 or else Ekind (Id) = E_Exception
5024 or else Ekind (Id) = E_Package_Body
5025 or else Ekind (Id) = E_Subprogram_Body
5027 -- Allow this attribute to appear on non-analyzed entities
5029 or else Ekind (Id) = E_Void);
5030 Set_Flag278 (Id, V);
5031 end Set_Is_Ignored_Ghost_Entity;
5033 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5035 pragma Assert (Nkind (Id) in N_Entity);
5037 end Set_Is_Immediately_Visible;
5039 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5041 Set_Flag254 (Id, V);
5042 end Set_Is_Implementation_Defined;
5044 procedure Set_Is_Imported (Id : E; V : B := True) is
5047 end Set_Is_Imported;
5049 procedure Set_Is_Independent (Id : E; V : B := True) is
5051 Set_Flag268 (Id, V);
5052 end Set_Is_Independent;
5054 procedure Set_Is_Inlined (Id : E; V : B := True) is
5059 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5061 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5063 end Set_Is_Inlined_Always;
5065 procedure Set_Is_Interface (Id : E; V : B := True) is
5067 pragma Assert (Is_Record_Type (Id));
5068 Set_Flag186 (Id, V);
5069 end Set_Is_Interface;
5071 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5073 Set_Flag126 (Id, V);
5074 end Set_Is_Instantiated;
5076 procedure Set_Is_Internal (Id : E; V : B := True) is
5078 pragma Assert (Nkind (Id) in N_Entity);
5080 end Set_Is_Internal;
5082 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5084 pragma Assert (Nkind (Id) in N_Entity);
5086 end Set_Is_Interrupt_Handler;
5088 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5091 end Set_Is_Intrinsic_Subprogram;
5093 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5095 pragma Assert (Ekind (Id) = E_Procedure);
5096 Set_Flag257 (Id, V);
5097 end Set_Is_Invariant_Procedure;
5099 procedure Set_Is_Itype (Id : E; V : B := True) is
5104 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5107 end Set_Is_Known_Non_Null;
5109 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5111 Set_Flag204 (Id, V);
5112 end Set_Is_Known_Null;
5114 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5116 Set_Flag170 (Id, V);
5117 end Set_Is_Known_Valid;
5119 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5121 pragma Assert (Is_Type (Id));
5122 Set_Flag106 (Id, V);
5123 end Set_Is_Limited_Composite;
5125 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5127 pragma Assert (Is_Interface (Id));
5128 Set_Flag197 (Id, V);
5129 end Set_Is_Limited_Interface;
5131 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5134 end Set_Is_Limited_Record;
5136 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5138 pragma Assert (Is_Subprogram (Id));
5139 Set_Flag137 (Id, V);
5140 end Set_Is_Machine_Code_Subprogram;
5142 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5144 pragma Assert (Is_Type (Id));
5145 Set_Flag109 (Id, V);
5146 end Set_Is_Non_Static_Subtype;
5148 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5150 pragma Assert (Ekind (Id) = E_Procedure);
5151 Set_Flag178 (Id, V);
5152 end Set_Is_Null_Init_Proc;
5154 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5156 Set_Flag153 (Id, V);
5157 end Set_Is_Obsolescent;
5159 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5161 pragma Assert (Ekind (Id) = E_Out_Parameter);
5162 Set_Flag226 (Id, V);
5163 end Set_Is_Only_Out_Parameter;
5165 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5167 Set_Flag160 (Id, V);
5168 end Set_Is_Package_Body_Entity;
5170 procedure Set_Is_Packed (Id : E; V : B := True) is
5172 pragma Assert (Id = Base_Type (Id));
5176 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5178 Set_Flag138 (Id, V);
5179 end Set_Is_Packed_Array_Impl_Type;
5181 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5183 pragma Assert (Nkind (Id) in N_Entity);
5185 end Set_Is_Potentially_Use_Visible;
5187 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5189 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5190 Set_Flag255 (Id, V);
5191 end Set_Is_Predicate_Function;
5193 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5195 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5196 Set_Flag256 (Id, V);
5197 end Set_Is_Predicate_Function_M;
5199 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5202 end Set_Is_Preelaborated;
5204 procedure Set_Is_Primitive (Id : E; V : B := True) is
5207 (Is_Overloadable (Id)
5208 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5209 Set_Flag218 (Id, V);
5210 end Set_Is_Primitive;
5212 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5214 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5215 Set_Flag195 (Id, V);
5216 end Set_Is_Primitive_Wrapper;
5218 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5220 pragma Assert (Is_Type (Id));
5221 Set_Flag107 (Id, V);
5222 end Set_Is_Private_Composite;
5224 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5227 end Set_Is_Private_Descendant;
5229 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5231 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5232 Set_Flag245 (Id, V);
5233 end Set_Is_Private_Primitive;
5235 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5237 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5238 Set_Flag252 (Id, V);
5239 end Set_Is_Processed_Transient;
5241 procedure Set_Is_Public (Id : E; V : B := True) is
5243 pragma Assert (Nkind (Id) in N_Entity);
5247 procedure Set_Is_Pure (Id : E; V : B := True) is
5252 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5254 pragma Assert (Is_Access_Type (Id));
5255 Set_Flag189 (Id, V);
5256 end Set_Is_Pure_Unit_Access_Type;
5258 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5260 pragma Assert (Is_Type (Id));
5261 Set_Flag244 (Id, V);
5262 end Set_Is_RACW_Stub_Type;
5264 procedure Set_Is_Raised (Id : E; V : B := True) is
5266 pragma Assert (Ekind (Id) = E_Exception);
5267 Set_Flag224 (Id, V);
5270 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5273 end Set_Is_Remote_Call_Interface;
5275 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5278 end Set_Is_Remote_Types;
5280 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5282 Set_Flag112 (Id, V);
5283 end Set_Is_Renaming_Of_Object;
5285 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5287 Set_Flag209 (Id, V);
5288 end Set_Is_Return_Object;
5290 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5292 pragma Assert (Ekind (Id) = E_Variable);
5293 Set_Flag249 (Id, V);
5294 end Set_Is_Safe_To_Reevaluate;
5296 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5299 end Set_Is_Shared_Passive;
5301 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5303 pragma Assert (Is_Type (Id));
5304 Set_Flag281 (Id, V);
5305 end Set_Is_Static_Type;
5307 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5311 or else Ekind_In (Id, E_Exception,
5316 end Set_Is_Statically_Allocated;
5318 procedure Set_Is_Tag (Id : E; V : B := True) is
5320 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5324 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5327 end Set_Is_Tagged_Type;
5329 procedure Set_Is_Thunk (Id : E; V : B := True) is
5331 pragma Assert (Is_Subprogram (Id));
5332 Set_Flag225 (Id, V);
5335 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5337 Set_Flag235 (Id, V);
5338 end Set_Is_Trivial_Subprogram;
5340 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5342 Set_Flag163 (Id, V);
5343 end Set_Is_True_Constant;
5345 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5347 pragma Assert (Id = Base_Type (Id));
5348 Set_Flag117 (Id, V);
5349 end Set_Is_Unchecked_Union;
5351 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5353 pragma Assert (Ekind (Id) = E_Record_Type);
5354 Set_Flag246 (Id, V);
5355 end Set_Is_Underlying_Record_View;
5357 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5359 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5360 Set_Flag144 (Id, V);
5361 end Set_Is_Unsigned_Type;
5363 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5365 pragma Assert (Ekind (Id) = E_Procedure);
5366 Set_Flag127 (Id, V);
5367 end Set_Is_Valued_Procedure;
5369 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5371 Set_Flag206 (Id, V);
5372 end Set_Is_Visible_Formal;
5374 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5376 Set_Flag116 (Id, V);
5377 end Set_Is_Visible_Lib_Unit;
5379 procedure Set_Is_Volatile (Id : E; V : B := True) is
5381 pragma Assert (Nkind (Id) in N_Entity);
5383 end Set_Is_Volatile;
5385 procedure Set_Itype_Printed (Id : E; V : B := True) is
5387 pragma Assert (Is_Itype (Id));
5388 Set_Flag202 (Id, V);
5389 end Set_Itype_Printed;
5391 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5394 end Set_Kill_Elaboration_Checks;
5396 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5399 end Set_Kill_Range_Checks;
5401 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5403 pragma Assert (Is_Type (Id));
5404 Set_Flag207 (Id, V);
5405 end Set_Known_To_Have_Preelab_Init;
5407 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5409 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5411 end Set_Last_Aggregate_Assignment;
5413 procedure Set_Last_Assignment (Id : E; V : N) is
5415 pragma Assert (Is_Assignable (Id));
5417 end Set_Last_Assignment;
5419 procedure Set_Last_Entity (Id : E; V : E) is
5422 end Set_Last_Entity;
5424 procedure Set_Limited_View (Id : E; V : E) is
5426 pragma Assert (Ekind (Id) = E_Package);
5428 end Set_Limited_View;
5430 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5432 pragma Assert (Is_Type (Id)
5433 or else Ekind_In (Id, E_Constant, E_Variable)
5434 or else Is_Subprogram (Id));
5436 end Set_Linker_Section_Pragma;
5438 procedure Set_Lit_Indexes (Id : E; V : E) is
5440 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5442 end Set_Lit_Indexes;
5444 procedure Set_Lit_Strings (Id : E; V : E) is
5446 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5448 end Set_Lit_Strings;
5450 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5452 pragma Assert (Is_Formal (Id));
5453 Set_Flag205 (Id, V);
5454 end Set_Low_Bound_Tested;
5456 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5458 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5460 end Set_Machine_Radix_10;
5462 procedure Set_Master_Id (Id : E; V : E) is
5464 pragma Assert (Is_Access_Type (Id));
5468 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5470 Set_Flag168 (Id, V);
5471 end Set_Materialize_Entity;
5473 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5475 Set_Flag262 (Id, V);
5476 end Set_May_Inherit_Delayed_Rep_Aspects;
5478 procedure Set_Mechanism (Id : E; V : M) is
5480 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5481 Set_Uint8 (Id, UI_From_Int (V));
5484 procedure Set_Modulus (Id : E; V : U) is
5486 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5490 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5492 pragma Assert (Is_Type (Id));
5493 Set_Flag183 (Id, V);
5494 end Set_Must_Be_On_Byte_Boundary;
5496 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5498 pragma Assert (Is_Type (Id));
5499 Set_Flag208 (Id, V);
5500 end Set_Must_Have_Preelab_Init;
5502 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5504 Set_Flag147 (Id, V);
5505 end Set_Needs_Debug_Info;
5507 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5510 (Is_Overloadable (Id)
5511 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5513 end Set_Needs_No_Actuals;
5515 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5517 Set_Flag115 (Id, V);
5518 end Set_Never_Set_In_Source;
5520 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5523 end Set_Next_Inlined_Subprogram;
5525 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5527 pragma Assert (Is_Discrete_Type (Id));
5528 Set_Flag276 (Id, V);
5529 end Set_No_Dynamic_Predicate_On_Actual;
5531 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5533 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5534 Set_Flag131 (Id, V);
5535 end Set_No_Pool_Assigned;
5537 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5539 pragma Assert (Is_Discrete_Type (Id));
5540 Set_Flag275 (Id, V);
5541 end Set_No_Predicate_On_Actual;
5543 procedure Set_No_Return (Id : E; V : B := True) is
5546 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5547 Set_Flag113 (Id, V);
5550 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5552 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5553 Set_Flag136 (Id, V);
5554 end Set_No_Strict_Aliasing;
5556 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5558 pragma Assert (Is_Tagged_Type (Id));
5560 end Set_No_Tagged_Streams_Pragma;
5562 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5564 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5566 end Set_Non_Binary_Modulus;
5568 procedure Set_Non_Limited_View (Id : E; V : E) is
5571 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5573 end Set_Non_Limited_View;
5575 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5578 (Root_Type (Id) = Standard_Boolean
5579 and then Ekind (Id) = E_Enumeration_Type);
5580 Set_Flag162 (Id, V);
5581 end Set_Nonzero_Is_True;
5583 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5585 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5587 end Set_Normalized_First_Bit;
5589 procedure Set_Normalized_Position (Id : E; V : U) is
5591 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5593 end Set_Normalized_Position;
5595 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5597 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5599 end Set_Normalized_Position_Max;
5601 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5603 pragma Assert (Ekind (Id) = E_Variable);
5604 Set_Flag247 (Id, V);
5605 end Set_OK_To_Rename;
5607 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5610 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5611 Set_Flag239 (Id, V);
5612 end Set_OK_To_Reorder_Components;
5614 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5617 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5618 Set_Flag241 (Id, V);
5619 end Set_Optimize_Alignment_Space;
5621 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5624 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5625 Set_Flag242 (Id, V);
5626 end Set_Optimize_Alignment_Time;
5628 procedure Set_Original_Access_Type (Id : E; V : E) is
5630 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5632 end Set_Original_Access_Type;
5634 procedure Set_Original_Array_Type (Id : E; V : E) is
5636 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5638 end Set_Original_Array_Type;
5640 procedure Set_Original_Record_Component (Id : E; V : E) is
5642 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5644 end Set_Original_Record_Component;
5646 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5648 Set_Flag243 (Id, V);
5649 end Set_Overlays_Constant;
5651 procedure Set_Overridden_Operation (Id : E; V : E) is
5654 end Set_Overridden_Operation;
5656 procedure Set_Package_Instantiation (Id : E; V : N) is
5658 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5660 end Set_Package_Instantiation;
5662 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5664 pragma Assert (Is_Array_Type (Id));
5666 end Set_Packed_Array_Impl_Type;
5668 procedure Set_Parent_Subtype (Id : E; V : E) is
5670 pragma Assert (Ekind (Id) = E_Record_Type);
5672 end Set_Parent_Subtype;
5674 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5676 pragma Assert (Ekind (Id) = E_Abstract_State);
5678 end Set_Part_Of_Constituents;
5680 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5682 pragma Assert (Is_Type (Id));
5683 Set_Flag280 (Id, V);
5684 end Set_Partial_View_Has_Unknown_Discr;
5686 procedure Set_Pending_Access_Types (Id : E; V : L) is
5688 pragma Assert (Is_Type (Id));
5689 Set_Elist15 (Id, V);
5690 end Set_Pending_Access_Types;
5692 procedure Set_Postconditions_Proc (Id : E; V : E) is
5694 pragma Assert (Ekind_In (Id, E_Entry,
5699 end Set_Postconditions_Proc;
5701 procedure Set_PPC_Wrapper (Id : E; V : E) is
5703 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5705 end Set_PPC_Wrapper;
5707 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5709 pragma Assert (Is_Tagged_Type (Id));
5710 Set_Elist10 (Id, V);
5711 end Set_Direct_Primitive_Operations;
5713 procedure Set_Prival (Id : E; V : E) is
5715 pragma Assert (Is_Protected_Component (Id));
5719 procedure Set_Prival_Link (Id : E; V : E) is
5721 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5723 end Set_Prival_Link;
5725 procedure Set_Private_Dependents (Id : E; V : L) is
5727 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5728 Set_Elist18 (Id, V);
5729 end Set_Private_Dependents;
5731 procedure Set_Private_View (Id : E; V : N) is
5733 pragma Assert (Is_Private_Type (Id));
5735 end Set_Private_View;
5737 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5739 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5741 end Set_Protected_Body_Subprogram;
5743 procedure Set_Protected_Formal (Id : E; V : E) is
5745 pragma Assert (Is_Formal (Id));
5747 end Set_Protected_Formal;
5749 procedure Set_Protection_Object (Id : E; V : E) is
5751 pragma Assert (Ekind_In (Id, E_Entry,
5756 end Set_Protection_Object;
5758 procedure Set_Reachable (Id : E; V : B := True) is
5763 procedure Set_Referenced (Id : E; V : B := True) is
5765 Set_Flag156 (Id, V);
5768 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5771 end Set_Referenced_As_LHS;
5773 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5775 Set_Flag227 (Id, V);
5776 end Set_Referenced_As_Out_Parameter;
5778 procedure Set_Refinement_Constituents (Id : E; V : L) is
5780 pragma Assert (Ekind (Id) = E_Abstract_State);
5782 end Set_Refinement_Constituents;
5784 procedure Set_Register_Exception_Call (Id : E; V : N) is
5786 pragma Assert (Ekind (Id) = E_Exception);
5788 end Set_Register_Exception_Call;
5790 procedure Set_Related_Array_Object (Id : E; V : E) is
5792 pragma Assert (Is_Array_Type (Id));
5794 end Set_Related_Array_Object;
5796 procedure Set_Related_Expression (Id : E; V : N) is
5798 pragma Assert (Ekind (Id) in Type_Kind
5799 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5801 end Set_Related_Expression;
5803 procedure Set_Related_Instance (Id : E; V : E) is
5805 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5807 end Set_Related_Instance;
5809 procedure Set_Related_Type (Id : E; V : E) is
5811 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5813 end Set_Related_Type;
5815 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5817 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5819 end Set_Relative_Deadline_Variable;
5821 procedure Set_Renamed_Entity (Id : E; V : N) is
5824 end Set_Renamed_Entity;
5826 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5828 pragma Assert (Ekind (Id) = E_Package);
5829 Set_Flag231 (Id, V);
5830 end Set_Renamed_In_Spec;
5832 procedure Set_Renamed_Object (Id : E; V : N) is
5835 end Set_Renamed_Object;
5837 procedure Set_Renaming_Map (Id : E; V : U) is
5840 end Set_Renaming_Map;
5842 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5844 pragma Assert (Is_Overloadable (Id));
5845 Set_Flag213 (Id, V);
5846 end Set_Requires_Overriding;
5848 procedure Set_Return_Present (Id : E; V : B := True) is
5851 end Set_Return_Present;
5853 procedure Set_Return_Applies_To (Id : E; V : N) is
5856 end Set_Return_Applies_To;
5858 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5861 end Set_Returns_By_Ref;
5863 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5865 pragma Assert (Ekind (Id) = E_Function);
5866 Set_Flag134 (Id, V);
5867 end Set_Returns_Limited_View;
5869 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5872 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5873 Set_Flag164 (Id, V);
5874 end Set_Reverse_Bit_Order;
5876 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5880 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5882 end Set_Reverse_Storage_Order;
5884 procedure Set_RM_Size (Id : E; V : U) is
5886 pragma Assert (Is_Type (Id));
5890 procedure Set_Scalar_Range (Id : E; V : N) is
5893 end Set_Scalar_Range;
5895 procedure Set_Scale_Value (Id : E; V : U) is
5898 end Set_Scale_Value;
5900 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5902 pragma Assert (not Is_Record_Type (Id));
5904 end Set_Scope_Depth_Value;
5906 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5908 Set_Flag167 (Id, V);
5909 end Set_Sec_Stack_Needed_For_Return;
5911 procedure Set_Shadow_Entities (Id : E; V : S) is
5913 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5915 end Set_Shadow_Entities;
5917 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5919 pragma Assert (Ekind (Id) = E_Variable);
5921 end Set_Shared_Var_Procs_Instance;
5923 procedure Set_Size_Check_Code (Id : E; V : N) is
5925 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5927 end Set_Size_Check_Code;
5929 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5931 Set_Flag177 (Id, V);
5932 end Set_Size_Depends_On_Discriminant;
5934 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5937 end Set_Size_Known_At_Compile_Time;
5939 procedure Set_Small_Value (Id : E; V : R) is
5941 pragma Assert (Is_Fixed_Point_Type (Id));
5942 Set_Ureal21 (Id, V);
5943 end Set_Small_Value;
5945 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5948 (Ekind_In (Id, E_Generic_Package, -- package variants
5953 end Set_SPARK_Aux_Pragma;
5955 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5958 (Ekind_In (Id, E_Generic_Package, -- package variants
5962 Set_Flag266 (Id, V);
5963 end Set_SPARK_Aux_Pragma_Inherited;
5965 procedure Set_SPARK_Pragma (Id : E; V : N) is
5968 (Ekind_In (Id, E_Function, -- subprogram variants
5970 E_Generic_Procedure,
5974 Ekind_In (Id, E_Generic_Package, -- package variants
5979 end Set_SPARK_Pragma;
5981 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5984 (Ekind_In (Id, E_Function, -- subprogram variants
5986 E_Generic_Procedure,
5990 Ekind_In (Id, E_Generic_Package, -- package variants
5994 Set_Flag265 (Id, V);
5995 end Set_SPARK_Pragma_Inherited;
5997 procedure Set_Spec_Entity (Id : E; V : E) is
5999 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6001 end Set_Spec_Entity;
6003 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6007 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6008 Set_Flag273 (Id, V);
6009 end Set_SSO_Set_High_By_Default;
6011 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6015 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6016 Set_Flag272 (Id, V);
6017 end Set_SSO_Set_Low_By_Default;
6019 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6021 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6023 end Set_Static_Discrete_Predicate;
6025 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6027 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6028 and then Has_Predicates (Id));
6030 end Set_Static_Real_Or_String_Predicate;
6032 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6034 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6036 end Set_Status_Flag_Or_Transient_Decl;
6038 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6040 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6041 pragma Assert (Id = Base_Type (Id));
6043 end Set_Storage_Size_Variable;
6045 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6047 pragma Assert (Ekind (Id) = E_Package);
6049 end Set_Static_Elaboration_Desired;
6051 procedure Set_Static_Initialization (Id : E; V : N) is
6054 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6056 end Set_Static_Initialization;
6058 procedure Set_Stored_Constraint (Id : E; V : L) is
6060 pragma Assert (Nkind (Id) in N_Entity);
6061 Set_Elist23 (Id, V);
6062 end Set_Stored_Constraint;
6064 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6066 pragma Assert (Ekind (Id) = E_Constant);
6067 Set_Flag270 (Id, V);
6068 end Set_Stores_Attribute_Old_Prefix;
6070 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6072 pragma Assert (Id = Base_Type (Id));
6073 Set_Flag145 (Id, V);
6074 end Set_Strict_Alignment;
6076 procedure Set_String_Literal_Length (Id : E; V : U) is
6078 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6080 end Set_String_Literal_Length;
6082 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6084 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6086 end Set_String_Literal_Low_Bound;
6088 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6090 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6092 end Set_Subprograms_For_Type;
6094 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6096 Set_Flag148 (Id, V);
6097 end Set_Suppress_Elaboration_Warnings;
6099 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6101 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6102 Set_Flag105 (Id, V);
6103 end Set_Suppress_Initialization;
6105 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6107 Set_Flag165 (Id, V);
6108 end Set_Suppress_Style_Checks;
6110 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6112 Set_Flag217 (Id, V);
6113 end Set_Suppress_Value_Tracking_On_Call;
6115 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6117 pragma Assert (Ekind (Id) in Task_Kind);
6119 end Set_Task_Body_Procedure;
6121 procedure Set_Thunk_Entity (Id : E; V : E) is
6123 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6124 and then Is_Thunk (Id));
6126 end Set_Thunk_Entity;
6128 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6131 end Set_Treat_As_Volatile;
6133 procedure Set_Underlying_Full_View (Id : E; V : E) is
6135 pragma Assert (Ekind (Id) in Private_Kind);
6137 end Set_Underlying_Full_View;
6139 procedure Set_Underlying_Record_View (Id : E; V : E) is
6141 pragma Assert (Ekind (Id) = E_Record_Type);
6143 end Set_Underlying_Record_View;
6145 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6147 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6148 Set_Flag216 (Id, V);
6149 end Set_Universal_Aliasing;
6151 procedure Set_Unset_Reference (Id : E; V : N) is
6154 end Set_Unset_Reference;
6156 procedure Set_Uplevel_Reference_Noted (Id : E; V : B := True) is
6158 Set_Flag283 (Id, V);
6159 end Set_Uplevel_Reference_Noted;
6161 procedure Set_Uplevel_References (Id : E; V : L) is
6163 pragma Assert (Is_Subprogram (Id));
6164 Set_Elist24 (Id, V);
6165 end Set_Uplevel_References;
6167 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6169 Set_Flag222 (Id, V);
6170 end Set_Used_As_Generic_Actual;
6172 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6174 pragma Assert (Ekind (Id) = E_Protected_Type);
6175 Set_Flag188 (Id, V);
6176 end Set_Uses_Lock_Free;
6178 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6181 end Set_Uses_Sec_Stack;
6183 procedure Set_Warnings_Off (Id : E; V : B := True) is
6186 end Set_Warnings_Off;
6188 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6190 Set_Flag236 (Id, V);
6191 end Set_Warnings_Off_Used;
6193 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6195 Set_Flag237 (Id, V);
6196 end Set_Warnings_Off_Used_Unmodified;
6198 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6200 Set_Flag238 (Id, V);
6201 end Set_Warnings_Off_Used_Unreferenced;
6203 procedure Set_Was_Hidden (Id : E; V : B := True) is
6205 Set_Flag196 (Id, V);
6208 procedure Set_Wrapped_Entity (Id : E; V : E) is
6210 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6211 and then Is_Primitive_Wrapper (Id));
6213 end Set_Wrapped_Entity;
6215 -----------------------------------
6216 -- Field Initialization Routines --
6217 -----------------------------------
6219 procedure Init_Alignment (Id : E) is
6221 Set_Uint14 (Id, Uint_0);
6224 procedure Init_Alignment (Id : E; V : Int) is
6226 Set_Uint14 (Id, UI_From_Int (V));
6229 procedure Init_Component_Bit_Offset (Id : E) is
6231 Set_Uint11 (Id, No_Uint);
6232 end Init_Component_Bit_Offset;
6234 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6236 Set_Uint11 (Id, UI_From_Int (V));
6237 end Init_Component_Bit_Offset;
6239 procedure Init_Component_Size (Id : E) is
6241 Set_Uint22 (Id, Uint_0);
6242 end Init_Component_Size;
6244 procedure Init_Component_Size (Id : E; V : Int) is
6246 Set_Uint22 (Id, UI_From_Int (V));
6247 end Init_Component_Size;
6249 procedure Init_Digits_Value (Id : E) is
6251 Set_Uint17 (Id, Uint_0);
6252 end Init_Digits_Value;
6254 procedure Init_Digits_Value (Id : E; V : Int) is
6256 Set_Uint17 (Id, UI_From_Int (V));
6257 end Init_Digits_Value;
6259 procedure Init_Esize (Id : E) is
6261 Set_Uint12 (Id, Uint_0);
6264 procedure Init_Esize (Id : E; V : Int) is
6266 Set_Uint12 (Id, UI_From_Int (V));
6269 procedure Init_Normalized_First_Bit (Id : E) is
6271 Set_Uint8 (Id, No_Uint);
6272 end Init_Normalized_First_Bit;
6274 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6276 Set_Uint8 (Id, UI_From_Int (V));
6277 end Init_Normalized_First_Bit;
6279 procedure Init_Normalized_Position (Id : E) is
6281 Set_Uint14 (Id, No_Uint);
6282 end Init_Normalized_Position;
6284 procedure Init_Normalized_Position (Id : E; V : Int) is
6286 Set_Uint14 (Id, UI_From_Int (V));
6287 end Init_Normalized_Position;
6289 procedure Init_Normalized_Position_Max (Id : E) is
6291 Set_Uint10 (Id, No_Uint);
6292 end Init_Normalized_Position_Max;
6294 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6296 Set_Uint10 (Id, UI_From_Int (V));
6297 end Init_Normalized_Position_Max;
6299 procedure Init_RM_Size (Id : E) is
6301 Set_Uint13 (Id, Uint_0);
6304 procedure Init_RM_Size (Id : E; V : Int) is
6306 Set_Uint13 (Id, UI_From_Int (V));
6309 -----------------------------
6310 -- Init_Component_Location --
6311 -----------------------------
6313 procedure Init_Component_Location (Id : E) is
6315 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6316 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6317 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6318 Set_Uint12 (Id, Uint_0); -- Esize
6319 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6320 end Init_Component_Location;
6322 ----------------------------
6323 -- Init_Object_Size_Align --
6324 ----------------------------
6326 procedure Init_Object_Size_Align (Id : E) is
6328 Set_Uint12 (Id, Uint_0); -- Esize
6329 Set_Uint14 (Id, Uint_0); -- Alignment
6330 end Init_Object_Size_Align;
6336 procedure Init_Size (Id : E; V : Int) is
6338 pragma Assert (not Is_Object (Id));
6339 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6340 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6343 ---------------------
6344 -- Init_Size_Align --
6345 ---------------------
6347 procedure Init_Size_Align (Id : E) is
6349 pragma Assert (not Is_Object (Id));
6350 Set_Uint12 (Id, Uint_0); -- Esize
6351 Set_Uint13 (Id, Uint_0); -- RM_Size
6352 Set_Uint14 (Id, Uint_0); -- Alignment
6353 end Init_Size_Align;
6355 ----------------------------------------------
6356 -- Type Representation Attribute Predicates --
6357 ----------------------------------------------
6359 function Known_Alignment (E : Entity_Id) return B is
6361 return Uint14 (E) /= Uint_0
6362 and then Uint14 (E) /= No_Uint;
6363 end Known_Alignment;
6365 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6367 return Uint11 (E) /= No_Uint;
6368 end Known_Component_Bit_Offset;
6370 function Known_Component_Size (E : Entity_Id) return B is
6372 return Uint22 (Base_Type (E)) /= Uint_0
6373 and then Uint22 (Base_Type (E)) /= No_Uint;
6374 end Known_Component_Size;
6376 function Known_Esize (E : Entity_Id) return B is
6378 return Uint12 (E) /= Uint_0
6379 and then Uint12 (E) /= No_Uint;
6382 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6384 return Uint8 (E) /= No_Uint;
6385 end Known_Normalized_First_Bit;
6387 function Known_Normalized_Position (E : Entity_Id) return B is
6389 return Uint14 (E) /= No_Uint;
6390 end Known_Normalized_Position;
6392 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6394 return Uint10 (E) /= No_Uint;
6395 end Known_Normalized_Position_Max;
6397 function Known_RM_Size (E : Entity_Id) return B is
6399 return Uint13 (E) /= No_Uint
6400 and then (Uint13 (E) /= Uint_0
6401 or else Is_Discrete_Type (E)
6402 or else Is_Fixed_Point_Type (E));
6405 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6407 return Uint11 (E) /= No_Uint
6408 and then Uint11 (E) >= Uint_0;
6409 end Known_Static_Component_Bit_Offset;
6411 function Known_Static_Component_Size (E : Entity_Id) return B is
6413 return Uint22 (Base_Type (E)) > Uint_0;
6414 end Known_Static_Component_Size;
6416 function Known_Static_Esize (E : Entity_Id) return B is
6418 return Uint12 (E) > Uint_0
6419 and then not Is_Generic_Type (E);
6420 end Known_Static_Esize;
6422 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6424 return Uint8 (E) /= No_Uint
6425 and then Uint8 (E) >= Uint_0;
6426 end Known_Static_Normalized_First_Bit;
6428 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6430 return Uint14 (E) /= No_Uint
6431 and then Uint14 (E) >= Uint_0;
6432 end Known_Static_Normalized_Position;
6434 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6436 return Uint10 (E) /= No_Uint
6437 and then Uint10 (E) >= Uint_0;
6438 end Known_Static_Normalized_Position_Max;
6440 function Known_Static_RM_Size (E : Entity_Id) return B is
6442 return (Uint13 (E) > Uint_0
6443 or else Is_Discrete_Type (E)
6444 or else Is_Fixed_Point_Type (E))
6445 and then not Is_Generic_Type (E);
6446 end Known_Static_RM_Size;
6448 function Unknown_Alignment (E : Entity_Id) return B is
6450 return Uint14 (E) = Uint_0
6451 or else Uint14 (E) = No_Uint;
6452 end Unknown_Alignment;
6454 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6456 return Uint11 (E) = No_Uint;
6457 end Unknown_Component_Bit_Offset;
6459 function Unknown_Component_Size (E : Entity_Id) return B is
6461 return Uint22 (Base_Type (E)) = Uint_0
6463 Uint22 (Base_Type (E)) = No_Uint;
6464 end Unknown_Component_Size;
6466 function Unknown_Esize (E : Entity_Id) return B is
6468 return Uint12 (E) = No_Uint
6470 Uint12 (E) = Uint_0;
6473 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6475 return Uint8 (E) = No_Uint;
6476 end Unknown_Normalized_First_Bit;
6478 function Unknown_Normalized_Position (E : Entity_Id) return B is
6480 return Uint14 (E) = No_Uint;
6481 end Unknown_Normalized_Position;
6483 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6485 return Uint10 (E) = No_Uint;
6486 end Unknown_Normalized_Position_Max;
6488 function Unknown_RM_Size (E : Entity_Id) return B is
6490 return (Uint13 (E) = Uint_0
6491 and then not Is_Discrete_Type (E)
6492 and then not Is_Fixed_Point_Type (E))
6493 or else Uint13 (E) = No_Uint;
6494 end Unknown_RM_Size;
6496 --------------------
6497 -- Address_Clause --
6498 --------------------
6500 function Address_Clause (Id : E) return N is
6502 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6509 function Aft_Value (Id : E) return U is
6511 Delta_Val : Ureal := Delta_Value (Id);
6513 while Delta_Val < Ureal_Tenth loop
6514 Delta_Val := Delta_Val * Ureal_10;
6515 Result := Result + 1;
6518 return UI_From_Int (Result);
6521 ----------------------
6522 -- Alignment_Clause --
6523 ----------------------
6525 function Alignment_Clause (Id : E) return N is
6527 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6528 end Alignment_Clause;
6534 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6536 if Last_Entity (V) = Empty then
6537 Set_First_Entity (Id => V, V => Id);
6539 Set_Next_Entity (Last_Entity (V), Id);
6542 Set_Next_Entity (Id, Empty);
6544 Set_Last_Entity (Id => V, V => Id);
6551 function Base_Type (Id : E) return E is
6553 if Is_Base_Type (Id) then
6556 pragma Assert (Is_Type (Id));
6561 -------------------------
6562 -- Component_Alignment --
6563 -------------------------
6565 -- Component Alignment is encoded using two flags, Flag128/129 as
6566 -- follows. Note that both flags False = Align_Default, so that the
6567 -- default initialization of flags to False initializes component
6568 -- alignment to the default value as required.
6570 -- Flag128 Flag129 Value
6571 -- ------- ------- -----
6572 -- False False Calign_Default
6573 -- False True Calign_Component_Size
6574 -- True False Calign_Component_Size_4
6575 -- True True Calign_Storage_Unit
6577 function Component_Alignment (Id : E) return C is
6578 BT : constant Node_Id := Base_Type (Id);
6581 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6583 if Flag128 (BT) then
6584 if Flag129 (BT) then
6585 return Calign_Storage_Unit;
6587 return Calign_Component_Size_4;
6591 if Flag129 (BT) then
6592 return Calign_Component_Size;
6594 return Calign_Default;
6597 end Component_Alignment;
6599 ----------------------
6600 -- Declaration_Node --
6601 ----------------------
6603 function Declaration_Node (Id : E) return N is
6607 if Ekind (Id) = E_Incomplete_Type
6608 and then Present (Full_View (Id))
6610 P := Parent (Full_View (Id));
6616 if Nkind (P) /= N_Selected_Component
6617 and then Nkind (P) /= N_Expanded_Name
6619 not (Nkind (P) = N_Defining_Program_Unit_Name
6620 and then Is_Child_Unit (Id))
6627 end Declaration_Node;
6629 ---------------------------------
6630 -- Default_Init_Cond_Procedure --
6631 ---------------------------------
6633 function Default_Init_Cond_Procedure (Id : E) return E is
6639 and then (Has_Default_Init_Cond (Id)
6640 or Has_Inherited_Default_Init_Cond (Id)));
6642 S := Subprograms_For_Type (Id);
6643 while Present (S) loop
6644 if Is_Default_Init_Cond_Procedure (S) then
6648 S := Subprograms_For_Type (S);
6652 end Default_Init_Cond_Procedure;
6654 ---------------------
6655 -- Designated_Type --
6656 ---------------------
6658 function Designated_Type (Id : E) return E is
6662 Desig_Type := Directly_Designated_Type (Id);
6664 if Ekind (Desig_Type) = E_Incomplete_Type
6665 and then Present (Full_View (Desig_Type))
6667 return Full_View (Desig_Type);
6669 elsif Is_Class_Wide_Type (Desig_Type)
6670 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6671 and then Present (Full_View (Etype (Desig_Type)))
6672 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6674 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6679 end Designated_Type;
6681 ----------------------
6682 -- Entry_Index_Type --
6683 ----------------------
6685 function Entry_Index_Type (Id : E) return N is
6687 pragma Assert (Ekind (Id) = E_Entry_Family);
6688 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6689 end Entry_Index_Type;
6691 ---------------------
6692 -- First_Component --
6693 ---------------------
6695 function First_Component (Id : E) return E is
6700 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6702 Comp_Id := First_Entity (Id);
6703 while Present (Comp_Id) loop
6704 exit when Ekind (Comp_Id) = E_Component;
6705 Comp_Id := Next_Entity (Comp_Id);
6709 end First_Component;
6711 -------------------------------------
6712 -- First_Component_Or_Discriminant --
6713 -------------------------------------
6715 function First_Component_Or_Discriminant (Id : E) return E is
6720 (Is_Record_Type (Id)
6721 or else Is_Incomplete_Or_Private_Type (Id)
6722 or else Has_Discriminants (Id));
6724 Comp_Id := First_Entity (Id);
6725 while Present (Comp_Id) loop
6726 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6727 Comp_Id := Next_Entity (Comp_Id);
6731 end First_Component_Or_Discriminant;
6737 function First_Formal (Id : E) return E is
6742 (Is_Generic_Subprogram (Id)
6743 or else Is_Overloadable (Id)
6744 or else Ekind_In (Id, E_Entry_Family,
6746 E_Subprogram_Type));
6748 if Ekind (Id) = E_Enumeration_Literal then
6752 Formal := First_Entity (Id);
6754 -- The first/next entity chain of a generic subprogram contains all
6755 -- generic formal parameters, followed by the formal parameters. Go
6756 -- directly to the parameters by skipping the formal part.
6758 if Is_Generic_Subprogram (Id) then
6759 while Present (Formal) and then not Is_Formal (Formal) loop
6760 Next_Entity (Formal);
6764 if Present (Formal) and then Is_Formal (Formal) then
6772 ------------------------------
6773 -- First_Formal_With_Extras --
6774 ------------------------------
6776 function First_Formal_With_Extras (Id : E) return E is
6781 (Is_Generic_Subprogram (Id)
6782 or else Is_Overloadable (Id)
6783 or else Ekind_In (Id, E_Entry_Family,
6785 E_Subprogram_Type));
6787 if Ekind (Id) = E_Enumeration_Literal then
6791 Formal := First_Entity (Id);
6793 -- The first/next entity chain of a generic subprogram contains all
6794 -- generic formal parameters, followed by the formal parameters. Go
6795 -- directly to the parameters by skipping the formal part.
6797 if Is_Generic_Subprogram (Id) then
6798 while Present (Formal) and then not Is_Formal (Formal) loop
6799 Next_Entity (Formal);
6803 if Present (Formal) and then Is_Formal (Formal) then
6806 return Extra_Formals (Id); -- Empty if no extra formals
6809 end First_Formal_With_Extras;
6811 -------------------------------------
6812 -- Get_Attribute_Definition_Clause --
6813 -------------------------------------
6815 function Get_Attribute_Definition_Clause
6817 Id : Attribute_Id) return Node_Id
6822 N := First_Rep_Item (E);
6823 while Present (N) loop
6824 if Nkind (N) = N_Attribute_Definition_Clause
6825 and then Get_Attribute_Id (Chars (N)) = Id
6834 end Get_Attribute_Definition_Clause;
6840 function Get_Full_View (T : Entity_Id) return Entity_Id is
6842 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6843 return Full_View (T);
6845 elsif Is_Class_Wide_Type (T)
6846 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6847 and then Present (Full_View (Root_Type (T)))
6849 return Class_Wide_Type (Full_View (Root_Type (T)));
6860 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6861 Is_CDG : constant Boolean :=
6862 Id = Pragma_Abstract_State or else
6863 Id = Pragma_Async_Readers or else
6864 Id = Pragma_Async_Writers or else
6865 Id = Pragma_Depends or else
6866 Id = Pragma_Effective_Reads or else
6867 Id = Pragma_Effective_Writes or else
6868 Id = Pragma_Extensions_Visible or else
6869 Id = Pragma_Global or else
6870 Id = Pragma_Initial_Condition or else
6871 Id = Pragma_Initializes or else
6872 Id = Pragma_Part_Of or else
6873 Id = Pragma_Refined_Depends or else
6874 Id = Pragma_Refined_Global or else
6875 Id = Pragma_Refined_State;
6876 Is_CTC : constant Boolean :=
6877 Id = Pragma_Contract_Cases or else
6878 Id = Pragma_Test_Case;
6879 Is_PPC : constant Boolean :=
6880 Id = Pragma_Precondition or else
6881 Id = Pragma_Postcondition or else
6882 Id = Pragma_Refined_Post;
6884 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6890 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6891 -- extracted from their specialized list.
6894 Items := Contract (E);
6900 Item := Classifications (Items);
6903 Item := Contract_Test_Cases (Items);
6906 Item := Pre_Post_Conditions (Items);
6912 Item := First_Rep_Item (E);
6915 while Present (Item) loop
6916 if Nkind (Item) = N_Pragma
6917 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6921 -- All nodes in N_Contract are chained using Next_Pragma
6923 elsif In_Contract then
6924 Item := Next_Pragma (Item);
6929 Next_Rep_Item (Item);
6936 --------------------------------------
6937 -- Get_Record_Representation_Clause --
6938 --------------------------------------
6940 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6944 N := First_Rep_Item (E);
6945 while Present (N) loop
6946 if Nkind (N) = N_Record_Representation_Clause then
6954 end Get_Record_Representation_Clause;
6956 ------------------------
6957 -- Has_Attach_Handler --
6958 ------------------------
6960 function Has_Attach_Handler (Id : E) return B is
6964 pragma Assert (Is_Protected_Type (Id));
6966 Ritem := First_Rep_Item (Id);
6967 while Present (Ritem) loop
6968 if Nkind (Ritem) = N_Pragma
6969 and then Pragma_Name (Ritem) = Name_Attach_Handler
6973 Next_Rep_Item (Ritem);
6978 end Has_Attach_Handler;
6984 function Has_Entries (Id : E) return B is
6988 pragma Assert (Is_Concurrent_Type (Id));
6990 Ent := First_Entity (Id);
6991 while Present (Ent) loop
6992 if Is_Entry (Ent) then
6996 Ent := Next_Entity (Ent);
7002 ----------------------------
7003 -- Has_Foreign_Convention --
7004 ----------------------------
7006 function Has_Foreign_Convention (Id : E) return B is
7008 -- While regular Intrinsics such as the Standard operators fit in the
7009 -- "Ada" convention, those with an Interface_Name materialize GCC
7010 -- builtin imports for which Ada special treatments shouldn't apply.
7012 return Convention (Id) in Foreign_Convention
7013 or else (Convention (Id) = Convention_Intrinsic
7014 and then Present (Interface_Name (Id)));
7015 end Has_Foreign_Convention;
7017 ---------------------------
7018 -- Has_Interrupt_Handler --
7019 ---------------------------
7021 function Has_Interrupt_Handler (Id : E) return B is
7025 pragma Assert (Is_Protected_Type (Id));
7027 Ritem := First_Rep_Item (Id);
7028 while Present (Ritem) loop
7029 if Nkind (Ritem) = N_Pragma
7030 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7034 Next_Rep_Item (Ritem);
7039 end Has_Interrupt_Handler;
7041 -----------------------------
7042 -- Has_Non_Null_Refinement --
7043 -----------------------------
7045 function Has_Non_Null_Refinement (Id : E) return B is
7047 -- "Refinement" is a concept applicable only to abstract states
7049 pragma Assert (Ekind (Id) = E_Abstract_State);
7051 if Has_Visible_Refinement (Id) then
7052 pragma Assert (Present (Refinement_Constituents (Id)));
7054 -- For a refinement to be non-null, the first constituent must be
7055 -- anything other than null.
7058 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7062 end Has_Non_Null_Refinement;
7064 -----------------------------
7065 -- Has_Null_Abstract_State --
7066 -----------------------------
7068 function Has_Null_Abstract_State (Id : E) return B is
7070 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7073 Present (Abstract_States (Id))
7074 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7075 end Has_Null_Abstract_State;
7077 -------------------------
7078 -- Has_Null_Refinement --
7079 -------------------------
7081 function Has_Null_Refinement (Id : E) return B is
7083 -- "Refinement" is a concept applicable only to abstract states
7085 pragma Assert (Ekind (Id) = E_Abstract_State);
7087 if Has_Visible_Refinement (Id) then
7088 pragma Assert (Present (Refinement_Constituents (Id)));
7090 -- For a refinement to be null, the state's sole constituent must be
7094 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7098 end Has_Null_Refinement;
7100 --------------------
7101 -- Has_Unmodified --
7102 --------------------
7104 function Has_Unmodified (E : Entity_Id) return Boolean is
7106 if Has_Pragma_Unmodified (E) then
7108 elsif Warnings_Off (E) then
7109 Set_Warnings_Off_Used_Unmodified (E);
7116 ---------------------
7117 -- Has_Unreferenced --
7118 ---------------------
7120 function Has_Unreferenced (E : Entity_Id) return Boolean is
7122 if Has_Pragma_Unreferenced (E) then
7124 elsif Warnings_Off (E) then
7125 Set_Warnings_Off_Used_Unreferenced (E);
7130 end Has_Unreferenced;
7132 ----------------------
7133 -- Has_Warnings_Off --
7134 ----------------------
7136 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7138 if Warnings_Off (E) then
7139 Set_Warnings_Off_Used (E);
7144 end Has_Warnings_Off;
7146 ------------------------------
7147 -- Implementation_Base_Type --
7148 ------------------------------
7150 function Implementation_Base_Type (Id : E) return E is
7155 Bastyp := Base_Type (Id);
7157 if Is_Incomplete_Or_Private_Type (Bastyp) then
7158 Imptyp := Underlying_Type (Bastyp);
7160 -- If we have an implementation type, then just return it,
7161 -- otherwise we return the Base_Type anyway. This can only
7162 -- happen in error situations and should avoid some error bombs.
7164 if Present (Imptyp) then
7165 return Base_Type (Imptyp);
7173 end Implementation_Base_Type;
7175 -------------------------
7176 -- Invariant_Procedure --
7177 -------------------------
7179 function Invariant_Procedure (Id : E) return E is
7183 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7185 if No (Subprograms_For_Type (Id)) then
7189 S := Subprograms_For_Type (Id);
7190 while Present (S) loop
7191 if Is_Invariant_Procedure (S) then
7194 S := Subprograms_For_Type (S);
7200 end Invariant_Procedure;
7206 -- Global flag table allowing rapid computation of this function
7208 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7209 (E_Enumeration_Subtype |
7211 E_Signed_Integer_Subtype |
7212 E_Modular_Integer_Subtype |
7213 E_Floating_Point_Subtype |
7214 E_Ordinary_Fixed_Point_Subtype |
7215 E_Decimal_Fixed_Point_Subtype |
7220 E_Record_Subtype_With_Private |
7221 E_Limited_Private_Subtype |
7223 E_Protected_Subtype |
7225 E_String_Literal_Subtype |
7226 E_Class_Wide_Subtype => False,
7229 function Is_Base_Type (Id : E) return Boolean is
7231 return Entity_Is_Base_Type (Ekind (Id));
7234 ---------------------
7235 -- Is_Boolean_Type --
7236 ---------------------
7238 function Is_Boolean_Type (Id : E) return B is
7240 return Root_Type (Id) = Standard_Boolean;
7241 end Is_Boolean_Type;
7243 ------------------------
7244 -- Is_Constant_Object --
7245 ------------------------
7247 function Is_Constant_Object (Id : E) return B is
7248 K : constant Entity_Kind := Ekind (Id);
7251 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7252 end Is_Constant_Object;
7254 --------------------
7255 -- Is_Discriminal --
7256 --------------------
7258 function Is_Discriminal (Id : E) return B is
7260 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7261 and then Present (Discriminal_Link (Id)));
7264 ----------------------
7265 -- Is_Dynamic_Scope --
7266 ----------------------
7268 function Is_Dynamic_Scope (Id : E) return B is
7271 Ekind (Id) = E_Block
7273 Ekind (Id) = E_Function
7275 Ekind (Id) = E_Procedure
7277 Ekind (Id) = E_Subprogram_Body
7279 Ekind (Id) = E_Task_Type
7281 (Ekind (Id) = E_Limited_Private_Type
7282 and then Present (Full_View (Id))
7283 and then Ekind (Full_View (Id)) = E_Task_Type)
7285 Ekind (Id) = E_Entry
7287 Ekind (Id) = E_Entry_Family
7289 Ekind (Id) = E_Return_Statement;
7290 end Is_Dynamic_Scope;
7292 --------------------
7293 -- Is_Entity_Name --
7294 --------------------
7296 function Is_Entity_Name (N : Node_Id) return Boolean is
7297 Kind : constant Node_Kind := Nkind (N);
7300 -- Identifiers, operator symbols, expanded names are entity names
7302 return Kind = N_Identifier
7303 or else Kind = N_Operator_Symbol
7304 or else Kind = N_Expanded_Name
7306 -- Attribute references are entity names if they refer to an entity.
7307 -- Note that we don't do this by testing for the presence of the
7308 -- Entity field in the N_Attribute_Reference node, since it may not
7309 -- have been set yet.
7311 or else (Kind = N_Attribute_Reference
7312 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7315 -----------------------
7316 -- Is_External_State --
7317 -----------------------
7319 function Is_External_State (Id : E) return B is
7322 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7323 end Is_External_State;
7329 function Is_Finalizer (Id : E) return B is
7331 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7338 function Is_Null_State (Id : E) return B is
7341 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7344 ---------------------
7345 -- Is_Packed_Array --
7346 ---------------------
7348 function Is_Packed_Array (Id : E) return B is
7350 return Is_Array_Type (Id) and then Is_Packed (Id);
7351 end Is_Packed_Array;
7353 -----------------------------------
7354 -- Is_Package_Or_Generic_Package --
7355 -----------------------------------
7357 function Is_Package_Or_Generic_Package (Id : E) return B is
7359 return Ekind_In (Id, E_Generic_Package, E_Package);
7360 end Is_Package_Or_Generic_Package;
7366 function Is_Prival (Id : E) return B is
7368 return (Ekind_In (Id, E_Constant, E_Variable)
7369 and then Present (Prival_Link (Id)));
7372 ----------------------------
7373 -- Is_Protected_Component --
7374 ----------------------------
7376 function Is_Protected_Component (Id : E) return B is
7378 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7379 end Is_Protected_Component;
7381 ----------------------------
7382 -- Is_Protected_Interface --
7383 ----------------------------
7385 function Is_Protected_Interface (Id : E) return B is
7386 Typ : constant Entity_Id := Base_Type (Id);
7388 if not Is_Interface (Typ) then
7390 elsif Is_Class_Wide_Type (Typ) then
7391 return Is_Protected_Interface (Etype (Typ));
7393 return Protected_Present (Type_Definition (Parent (Typ)));
7395 end Is_Protected_Interface;
7397 ------------------------------
7398 -- Is_Protected_Record_Type --
7399 ------------------------------
7401 function Is_Protected_Record_Type (Id : E) return B is
7404 Is_Concurrent_Record_Type (Id)
7405 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7406 end Is_Protected_Record_Type;
7408 --------------------------------
7409 -- Is_Standard_Character_Type --
7410 --------------------------------
7412 function Is_Standard_Character_Type (Id : E) return B is
7414 if Is_Type (Id) then
7416 R : constant Entity_Id := Root_Type (Id);
7419 R = Standard_Character
7421 R = Standard_Wide_Character
7423 R = Standard_Wide_Wide_Character;
7429 end Is_Standard_Character_Type;
7431 -----------------------------
7432 -- Is_Standard_String_Type --
7433 -----------------------------
7435 function Is_Standard_String_Type (Id : E) return B is
7437 if Is_Type (Id) then
7439 R : constant Entity_Id := Root_Type (Id);
7444 R = Standard_Wide_String
7446 R = Standard_Wide_Wide_String;
7452 end Is_Standard_String_Type;
7454 --------------------
7455 -- Is_String_Type --
7456 --------------------
7458 function Is_String_Type (Id : E) return B is
7460 return Is_Array_Type (Id)
7461 and then Id /= Any_Composite
7462 and then Number_Dimensions (Id) = 1
7463 and then Is_Character_Type (Component_Type (Id));
7466 -------------------------------
7467 -- Is_Synchronized_Interface --
7468 -------------------------------
7470 function Is_Synchronized_Interface (Id : E) return B is
7471 Typ : constant Entity_Id := Base_Type (Id);
7474 if not Is_Interface (Typ) then
7477 elsif Is_Class_Wide_Type (Typ) then
7478 return Is_Synchronized_Interface (Etype (Typ));
7481 return Protected_Present (Type_Definition (Parent (Typ)))
7482 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7483 or else Task_Present (Type_Definition (Parent (Typ)));
7485 end Is_Synchronized_Interface;
7487 -----------------------
7488 -- Is_Task_Interface --
7489 -----------------------
7491 function Is_Task_Interface (Id : E) return B is
7492 Typ : constant Entity_Id := Base_Type (Id);
7494 if not Is_Interface (Typ) then
7496 elsif Is_Class_Wide_Type (Typ) then
7497 return Is_Task_Interface (Etype (Typ));
7499 return Task_Present (Type_Definition (Parent (Typ)));
7501 end Is_Task_Interface;
7503 -------------------------
7504 -- Is_Task_Record_Type --
7505 -------------------------
7507 function Is_Task_Record_Type (Id : E) return B is
7510 Is_Concurrent_Record_Type (Id)
7511 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7512 end Is_Task_Record_Type;
7514 ------------------------
7515 -- Is_Wrapper_Package --
7516 ------------------------
7518 function Is_Wrapper_Package (Id : E) return B is
7520 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7521 end Is_Wrapper_Package;
7527 function Last_Formal (Id : E) return E is
7532 (Is_Overloadable (Id)
7533 or else Ekind_In (Id, E_Entry_Family,
7535 E_Subprogram_Type));
7537 if Ekind (Id) = E_Enumeration_Literal then
7541 Formal := First_Formal (Id);
7543 if Present (Formal) then
7544 while Present (Next_Formal (Formal)) loop
7545 Formal := Next_Formal (Formal);
7553 function Model_Emin_Value (Id : E) return Uint is
7555 return Machine_Emin_Value (Id);
7556 end Model_Emin_Value;
7558 -------------------------
7559 -- Model_Epsilon_Value --
7560 -------------------------
7562 function Model_Epsilon_Value (Id : E) return Ureal is
7563 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7565 return Radix ** (1 - Model_Mantissa_Value (Id));
7566 end Model_Epsilon_Value;
7568 --------------------------
7569 -- Model_Mantissa_Value --
7570 --------------------------
7572 function Model_Mantissa_Value (Id : E) return Uint is
7574 return Machine_Mantissa_Value (Id);
7575 end Model_Mantissa_Value;
7577 -----------------------
7578 -- Model_Small_Value --
7579 -----------------------
7581 function Model_Small_Value (Id : E) return Ureal is
7582 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7584 return Radix ** (Model_Emin_Value (Id) - 1);
7585 end Model_Small_Value;
7587 ------------------------
7588 -- Machine_Emax_Value --
7589 ------------------------
7591 function Machine_Emax_Value (Id : E) return Uint is
7592 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7595 case Float_Rep (Id) is
7598 when 1 .. 6 => return Uint_128;
7599 when 7 .. 15 => return 2**10;
7600 when 16 .. 33 => return 2**14;
7601 when others => return No_Uint;
7605 return Uint_2 ** Uint_7 - Uint_1;
7607 end Machine_Emax_Value;
7609 ------------------------
7610 -- Machine_Emin_Value --
7611 ------------------------
7613 function Machine_Emin_Value (Id : E) return Uint is
7615 case Float_Rep (Id) is
7616 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7617 when AAMP => return -Machine_Emax_Value (Id);
7619 end Machine_Emin_Value;
7621 ----------------------------
7622 -- Machine_Mantissa_Value --
7623 ----------------------------
7625 function Machine_Mantissa_Value (Id : E) return Uint is
7626 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7629 case Float_Rep (Id) is
7632 when 1 .. 6 => return Uint_24;
7633 when 7 .. 15 => return UI_From_Int (53);
7634 when 16 .. 18 => return Uint_64;
7635 when 19 .. 33 => return UI_From_Int (113);
7636 when others => return No_Uint;
7641 when 1 .. 6 => return Uint_24;
7642 when 7 .. 9 => return UI_From_Int (40);
7643 when others => return No_Uint;
7646 end Machine_Mantissa_Value;
7648 -------------------------
7649 -- Machine_Radix_Value --
7650 -------------------------
7652 function Machine_Radix_Value (Id : E) return U is
7654 case Float_Rep (Id) is
7655 when IEEE_Binary | AAMP =>
7658 end Machine_Radix_Value;
7660 --------------------
7661 -- Next_Component --
7662 --------------------
7664 function Next_Component (Id : E) return E is
7668 Comp_Id := Next_Entity (Id);
7669 while Present (Comp_Id) loop
7670 exit when Ekind (Comp_Id) = E_Component;
7671 Comp_Id := Next_Entity (Comp_Id);
7677 ------------------------------------
7678 -- Next_Component_Or_Discriminant --
7679 ------------------------------------
7681 function Next_Component_Or_Discriminant (Id : E) return E is
7685 Comp_Id := Next_Entity (Id);
7686 while Present (Comp_Id) loop
7687 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7688 Comp_Id := Next_Entity (Comp_Id);
7692 end Next_Component_Or_Discriminant;
7694 -----------------------
7695 -- Next_Discriminant --
7696 -----------------------
7698 -- This function actually implements both Next_Discriminant and
7699 -- Next_Stored_Discriminant by making sure that the Discriminant
7700 -- returned is of the same variety as Id.
7702 function Next_Discriminant (Id : E) return E is
7704 -- Derived Tagged types with private extensions look like this...
7706 -- E_Discriminant d1
7707 -- E_Discriminant d2
7709 -- E_Discriminant d1
7710 -- E_Discriminant d2
7713 -- so it is critical not to go past the leading discriminants
7718 pragma Assert (Ekind (Id) = E_Discriminant);
7721 D := Next_Entity (D);
7723 or else (Ekind (D) /= E_Discriminant
7724 and then not Is_Itype (D))
7729 exit when Ekind (D) = E_Discriminant
7730 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7734 end Next_Discriminant;
7740 function Next_Formal (Id : E) return E is
7744 -- Follow the chain of declared entities as long as the kind of the
7745 -- entity corresponds to a formal parameter. Skip internal entities
7746 -- that may have been created for implicit subtypes, in the process
7747 -- of analyzing default expressions.
7751 P := Next_Entity (P);
7753 if No (P) or else Is_Formal (P) then
7755 elsif not Is_Internal (P) then
7761 -----------------------------
7762 -- Next_Formal_With_Extras --
7763 -----------------------------
7765 function Next_Formal_With_Extras (Id : E) return E is
7767 if Present (Extra_Formal (Id)) then
7768 return Extra_Formal (Id);
7770 return Next_Formal (Id);
7772 end Next_Formal_With_Extras;
7778 function Next_Index (Id : Node_Id) return Node_Id is
7787 function Next_Literal (Id : E) return E is
7789 pragma Assert (Nkind (Id) in N_Entity);
7793 ------------------------------
7794 -- Next_Stored_Discriminant --
7795 ------------------------------
7797 function Next_Stored_Discriminant (Id : E) return E is
7799 -- See comment in Next_Discriminant
7801 return Next_Discriminant (Id);
7802 end Next_Stored_Discriminant;
7804 -----------------------
7805 -- Number_Dimensions --
7806 -----------------------
7808 function Number_Dimensions (Id : E) return Pos is
7813 if Ekind (Id) = E_String_Literal_Subtype then
7818 T := First_Index (Id);
7819 while Present (T) loop
7826 end Number_Dimensions;
7828 --------------------
7829 -- Number_Entries --
7830 --------------------
7832 function Number_Entries (Id : E) return Nat is
7837 pragma Assert (Is_Concurrent_Type (Id));
7840 Ent := First_Entity (Id);
7841 while Present (Ent) loop
7842 if Is_Entry (Ent) then
7846 Ent := Next_Entity (Ent);
7852 --------------------
7853 -- Number_Formals --
7854 --------------------
7856 function Number_Formals (Id : E) return Pos is
7862 Formal := First_Formal (Id);
7863 while Present (Formal) loop
7865 Formal := Next_Formal (Formal);
7871 --------------------
7872 -- Parameter_Mode --
7873 --------------------
7875 function Parameter_Mode (Id : E) return Formal_Kind is
7880 ------------------------
7881 -- Predicate_Function --
7882 ------------------------
7884 function Predicate_Function (Id : E) return E is
7889 pragma Assert (Is_Type (Id));
7891 -- If type is private and has a completion, predicate may be defined
7892 -- on the full view.
7894 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7895 T := Full_View (Id);
7900 if No (Subprograms_For_Type (T)) then
7904 S := Subprograms_For_Type (T);
7905 while Present (S) loop
7906 if Is_Predicate_Function (S) then
7909 S := Subprograms_For_Type (S);
7915 end Predicate_Function;
7917 --------------------------
7918 -- Predicate_Function_M --
7919 --------------------------
7921 function Predicate_Function_M (Id : E) return E is
7926 pragma Assert (Is_Type (Id));
7928 -- If type is private and has a completion, predicate may be defined
7929 -- on the full view.
7931 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7932 T := Full_View (Id);
7937 if No (Subprograms_For_Type (T)) then
7941 S := Subprograms_For_Type (T);
7942 while Present (S) loop
7943 if Is_Predicate_Function_M (S) then
7946 S := Subprograms_For_Type (S);
7952 end Predicate_Function_M;
7954 -------------------------
7955 -- Present_In_Rep_Item --
7956 -------------------------
7958 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7962 Ritem := First_Rep_Item (E);
7964 while Present (Ritem) loop
7969 Next_Rep_Item (Ritem);
7973 end Present_In_Rep_Item;
7975 --------------------------
7976 -- Primitive_Operations --
7977 --------------------------
7979 function Primitive_Operations (Id : E) return L is
7981 if Is_Concurrent_Type (Id) then
7982 if Present (Corresponding_Record_Type (Id)) then
7983 return Direct_Primitive_Operations
7984 (Corresponding_Record_Type (Id));
7986 -- If expansion is disabled the corresponding record type is absent,
7987 -- but if the type has ancestors it may have primitive operations.
7989 elsif Is_Tagged_Type (Id) then
7990 return Direct_Primitive_Operations (Id);
7996 return Direct_Primitive_Operations (Id);
7998 end Primitive_Operations;
8000 ---------------------
8001 -- Record_Rep_Item --
8002 ---------------------
8004 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8006 Set_Next_Rep_Item (N, First_Rep_Item (E));
8007 Set_First_Rep_Item (E, N);
8008 end Record_Rep_Item;
8014 function Root_Type (Id : E) return E is
8018 pragma Assert (Nkind (Id) in N_Entity);
8020 T := Base_Type (Id);
8022 if Ekind (T) = E_Class_Wide_Type then
8034 -- Following test catches some error cases resulting from
8037 elsif No (Etyp) then
8038 Check_Error_Detected;
8041 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8044 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8050 -- Return if there is a circularity in the inheritance chain. This
8051 -- happens in some error situations and we do not want to get
8052 -- stuck in this loop.
8054 if T = Base_Type (Id) then
8061 ---------------------
8062 -- Safe_Emax_Value --
8063 ---------------------
8065 function Safe_Emax_Value (Id : E) return Uint is
8067 return Machine_Emax_Value (Id);
8068 end Safe_Emax_Value;
8070 ----------------------
8071 -- Safe_First_Value --
8072 ----------------------
8074 function Safe_First_Value (Id : E) return Ureal is
8076 return -Safe_Last_Value (Id);
8077 end Safe_First_Value;
8079 ---------------------
8080 -- Safe_Last_Value --
8081 ---------------------
8083 function Safe_Last_Value (Id : E) return Ureal is
8084 Radix : constant Uint := Machine_Radix_Value (Id);
8085 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8086 Emax : constant Uint := Safe_Emax_Value (Id);
8087 Significand : constant Uint := Radix ** Mantissa - 1;
8088 Exponent : constant Uint := Emax - Mantissa;
8094 (Num => Significand * 2 ** (Exponent mod 4),
8095 Den => -Exponent / 4,
8100 (Num => Significand,
8104 end Safe_Last_Value;
8110 function Scope_Depth (Id : E) return Uint is
8115 while Is_Record_Type (Scop) loop
8116 Scop := Scope (Scop);
8119 return Scope_Depth_Value (Scop);
8122 ---------------------
8123 -- Scope_Depth_Set --
8124 ---------------------
8126 function Scope_Depth_Set (Id : E) return B is
8128 return not Is_Record_Type (Id)
8129 and then Field22 (Id) /= Union_Id (Empty);
8130 end Scope_Depth_Set;
8132 -----------------------------
8133 -- Set_Component_Alignment --
8134 -----------------------------
8136 -- Component Alignment is encoded using two flags, Flag128/129 as
8137 -- follows. Note that both flags False = Align_Default, so that the
8138 -- default initialization of flags to False initializes component
8139 -- alignment to the default value as required.
8141 -- Flag128 Flag129 Value
8142 -- ------- ------- -----
8143 -- False False Calign_Default
8144 -- False True Calign_Component_Size
8145 -- True False Calign_Component_Size_4
8146 -- True True Calign_Storage_Unit
8148 procedure Set_Component_Alignment (Id : E; V : C) is
8150 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8151 and then Is_Base_Type (Id));
8154 when Calign_Default =>
8155 Set_Flag128 (Id, False);
8156 Set_Flag129 (Id, False);
8158 when Calign_Component_Size =>
8159 Set_Flag128 (Id, False);
8160 Set_Flag129 (Id, True);
8162 when Calign_Component_Size_4 =>
8163 Set_Flag128 (Id, True);
8164 Set_Flag129 (Id, False);
8166 when Calign_Storage_Unit =>
8167 Set_Flag128 (Id, True);
8168 Set_Flag129 (Id, True);
8170 end Set_Component_Alignment;
8172 -------------------------------------
8173 -- Set_Default_Init_Cond_Procedure --
8174 -------------------------------------
8176 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8181 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8183 Has_Inherited_Default_Init_Cond (Id)));
8185 S := Subprograms_For_Type (Id);
8186 Set_Subprograms_For_Type (Id, V);
8187 Set_Subprograms_For_Type (V, S);
8189 -- Check for a duplicate procedure
8191 while Present (S) loop
8192 if Is_Default_Init_Cond_Procedure (S) then
8193 raise Program_Error;
8196 S := Subprograms_For_Type (S);
8198 end Set_Default_Init_Cond_Procedure;
8200 -----------------------------
8201 -- Set_Invariant_Procedure --
8202 -----------------------------
8204 procedure Set_Invariant_Procedure (Id : E; V : E) is
8208 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8210 S := Subprograms_For_Type (Id);
8211 Set_Subprograms_For_Type (Id, V);
8212 Set_Subprograms_For_Type (V, S);
8214 -- Check for duplicate entry
8216 while Present (S) loop
8217 if Is_Invariant_Procedure (S) then
8218 raise Program_Error;
8220 S := Subprograms_For_Type (S);
8223 end Set_Invariant_Procedure;
8225 ----------------------------
8226 -- Set_Predicate_Function --
8227 ----------------------------
8229 procedure Set_Predicate_Function (Id : E; V : E) is
8233 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8235 S := Subprograms_For_Type (Id);
8236 Set_Subprograms_For_Type (Id, V);
8237 Set_Subprograms_For_Type (V, S);
8239 while Present (S) loop
8240 if Is_Predicate_Function (S) then
8241 raise Program_Error;
8243 S := Subprograms_For_Type (S);
8246 end Set_Predicate_Function;
8248 ------------------------------
8249 -- Set_Predicate_Function_M --
8250 ------------------------------
8252 procedure Set_Predicate_Function_M (Id : E; V : E) is
8256 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8258 S := Subprograms_For_Type (Id);
8259 Set_Subprograms_For_Type (Id, V);
8260 Set_Subprograms_For_Type (V, S);
8262 -- Check for duplicates
8264 while Present (S) loop
8265 if Is_Predicate_Function_M (S) then
8266 raise Program_Error;
8268 S := Subprograms_For_Type (S);
8271 end Set_Predicate_Function_M;
8277 function Size_Clause (Id : E) return N is
8279 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8282 ------------------------
8283 -- Stream_Size_Clause --
8284 ------------------------
8286 function Stream_Size_Clause (Id : E) return N is
8288 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8289 end Stream_Size_Clause;
8295 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8301 Kind := E_Access_Subtype;
8305 Kind := E_Array_Subtype;
8307 when E_Class_Wide_Type |
8308 E_Class_Wide_Subtype =>
8309 Kind := E_Class_Wide_Subtype;
8311 when E_Decimal_Fixed_Point_Type |
8312 E_Decimal_Fixed_Point_Subtype =>
8313 Kind := E_Decimal_Fixed_Point_Subtype;
8315 when E_Ordinary_Fixed_Point_Type |
8316 E_Ordinary_Fixed_Point_Subtype =>
8317 Kind := E_Ordinary_Fixed_Point_Subtype;
8319 when E_Private_Type |
8320 E_Private_Subtype =>
8321 Kind := E_Private_Subtype;
8323 when E_Limited_Private_Type |
8324 E_Limited_Private_Subtype =>
8325 Kind := E_Limited_Private_Subtype;
8327 when E_Record_Type_With_Private |
8328 E_Record_Subtype_With_Private =>
8329 Kind := E_Record_Subtype_With_Private;
8331 when E_Record_Type |
8333 Kind := E_Record_Subtype;
8335 when Enumeration_Kind =>
8336 Kind := E_Enumeration_Subtype;
8339 Kind := E_Floating_Point_Subtype;
8341 when Signed_Integer_Kind =>
8342 Kind := E_Signed_Integer_Subtype;
8344 when Modular_Integer_Kind =>
8345 Kind := E_Modular_Integer_Subtype;
8347 when Protected_Kind =>
8348 Kind := E_Protected_Subtype;
8351 Kind := E_Task_Subtype;
8355 raise Program_Error;
8361 ---------------------
8362 -- Type_High_Bound --
8363 ---------------------
8365 function Type_High_Bound (Id : E) return Node_Id is
8366 Rng : constant Node_Id := Scalar_Range (Id);
8368 if Nkind (Rng) = N_Subtype_Indication then
8369 return High_Bound (Range_Expression (Constraint (Rng)));
8371 return High_Bound (Rng);
8373 end Type_High_Bound;
8375 --------------------
8376 -- Type_Low_Bound --
8377 --------------------
8379 function Type_Low_Bound (Id : E) return Node_Id is
8380 Rng : constant Node_Id := Scalar_Range (Id);
8382 if Nkind (Rng) = N_Subtype_Indication then
8383 return Low_Bound (Range_Expression (Constraint (Rng)));
8385 return Low_Bound (Rng);
8389 ---------------------
8390 -- Underlying_Type --
8391 ---------------------
8393 function Underlying_Type (Id : E) return E is
8395 -- For record_with_private the underlying type is always the direct
8396 -- full view. Never try to take the full view of the parent it
8397 -- doesn't make sense.
8399 if Ekind (Id) = E_Record_Type_With_Private then
8400 return Full_View (Id);
8402 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8404 -- If we have an incomplete or private type with a full view,
8405 -- then we return the Underlying_Type of this full view.
8407 if Present (Full_View (Id)) then
8408 if Id = Full_View (Id) then
8410 -- Previous error in declaration
8415 return Underlying_Type (Full_View (Id));
8418 -- If we have a private type with an underlying full view, then we
8419 -- return the Underlying_Type of this underlying full view.
8421 elsif Ekind (Id) in Private_Kind
8422 and then Present (Underlying_Full_View (Id))
8424 return Underlying_Type (Underlying_Full_View (Id));
8426 -- If we have an incomplete entity that comes from the limited
8427 -- view then we return the Underlying_Type of its non-limited
8430 elsif From_Limited_With (Id)
8431 and then Present (Non_Limited_View (Id))
8433 return Underlying_Type (Non_Limited_View (Id));
8435 -- Otherwise check for the case where we have a derived type or
8436 -- subtype, and if so get the Underlying_Type of the parent type.
8438 elsif Etype (Id) /= Id then
8439 return Underlying_Type (Etype (Id));
8441 -- Otherwise we have an incomplete or private type that has
8442 -- no full view, which means that we have not encountered the
8443 -- completion, so return Empty to indicate the underlying type
8444 -- is not yet known.
8450 -- For non-incomplete, non-private types, return the type itself Also
8451 -- for entities that are not types at all return the entity itself.
8456 end Underlying_Type;
8458 ------------------------
8459 -- Write_Entity_Flags --
8460 ------------------------
8462 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8464 procedure W (Flag_Name : String; Flag : Boolean);
8465 -- Write out given flag if it is set
8471 procedure W (Flag_Name : String; Flag : Boolean) is
8475 Write_Str (Flag_Name);
8476 Write_Str (" = True");
8481 -- Start of processing for Write_Entity_Flags
8484 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8485 and then Is_Base_Type (Id)
8488 Write_Str ("Component_Alignment = ");
8490 case Component_Alignment (Id) is
8491 when Calign_Default =>
8492 Write_Str ("Calign_Default");
8494 when Calign_Component_Size =>
8495 Write_Str ("Calign_Component_Size");
8497 when Calign_Component_Size_4 =>
8498 Write_Str ("Calign_Component_Size_4");
8500 when Calign_Storage_Unit =>
8501 Write_Str ("Calign_Storage_Unit");
8507 W ("Address_Taken", Flag104 (Id));
8508 W ("Body_Needed_For_SAL", Flag40 (Id));
8509 W ("C_Pass_By_Copy", Flag125 (Id));
8510 W ("Can_Never_Be_Null", Flag38 (Id));
8511 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8512 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8513 W ("Debug_Info_Off", Flag166 (Id));
8514 W ("Default_Expressions_Processed", Flag108 (Id));
8515 W ("Delay_Cleanups", Flag114 (Id));
8516 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8517 W ("Depends_On_Private", Flag14 (Id));
8518 W ("Discard_Names", Flag88 (Id));
8519 W ("Elaboration_Entity_Required", Flag174 (Id));
8520 W ("Elaborate_Body_Desirable", Flag210 (Id));
8521 W ("Entry_Accepted", Flag152 (Id));
8522 W ("Can_Use_Internal_Rep", Flag229 (Id));
8523 W ("Finalize_Storage_Only", Flag158 (Id));
8524 W ("From_Limited_With", Flag159 (Id));
8525 W ("Has_Aliased_Components", Flag135 (Id));
8526 W ("Has_Alignment_Clause", Flag46 (Id));
8527 W ("Has_All_Calls_Remote", Flag79 (Id));
8528 W ("Has_Anonymous_Master", Flag253 (Id));
8529 W ("Has_Atomic_Components", Flag86 (Id));
8530 W ("Has_Biased_Representation", Flag139 (Id));
8531 W ("Has_Completion", Flag26 (Id));
8532 W ("Has_Completion_In_Body", Flag71 (Id));
8533 W ("Has_Complex_Representation", Flag140 (Id));
8534 W ("Has_Component_Size_Clause", Flag68 (Id));
8535 W ("Has_Contiguous_Rep", Flag181 (Id));
8536 W ("Has_Controlled_Component", Flag43 (Id));
8537 W ("Has_Controlling_Result", Flag98 (Id));
8538 W ("Has_Convention_Pragma", Flag119 (Id));
8539 W ("Has_Default_Aspect", Flag39 (Id));
8540 W ("Has_Default_Init_Cond", Flag3 (Id));
8541 W ("Has_Delayed_Aspects", Flag200 (Id));
8542 W ("Has_Delayed_Freeze", Flag18 (Id));
8543 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8544 W ("Has_Discriminants", Flag5 (Id));
8545 W ("Has_Dispatch_Table", Flag220 (Id));
8546 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8547 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8548 W ("Has_Exit", Flag47 (Id));
8549 W ("Has_Expanded_Contract", Flag240 (Id));
8550 W ("Has_Forward_Instantiation", Flag175 (Id));
8551 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8552 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8553 W ("Has_Homonym", Flag56 (Id));
8554 W ("Has_Implicit_Dereference", Flag251 (Id));
8555 W ("Has_Independent_Components", Flag34 (Id));
8556 W ("Has_Inheritable_Invariants", Flag248 (Id));
8557 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8558 W ("Has_Initial_Value", Flag219 (Id));
8559 W ("Has_Invariants", Flag232 (Id));
8560 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8561 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8562 W ("Has_Master_Entity", Flag21 (Id));
8563 W ("Has_Missing_Return", Flag142 (Id));
8564 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8565 W ("Has_Nested_Subprogram", Flag282 (Id));
8566 W ("Has_Non_Standard_Rep", Flag75 (Id));
8567 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8568 W ("Has_Object_Size_Clause", Flag172 (Id));
8569 W ("Has_Per_Object_Constraint", Flag154 (Id));
8570 W ("Has_Pragma_Controlled", Flag27 (Id));
8571 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8572 W ("Has_Pragma_Inline", Flag157 (Id));
8573 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8574 W ("Has_Pragma_No_Inline", Flag201 (Id));
8575 W ("Has_Pragma_Ordered", Flag198 (Id));
8576 W ("Has_Pragma_Pack", Flag121 (Id));
8577 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8578 W ("Has_Pragma_Pure", Flag203 (Id));
8579 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8580 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8581 W ("Has_Pragma_Unmodified", Flag233 (Id));
8582 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8583 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8584 W ("Has_Predicates", Flag250 (Id));
8585 W ("Has_Primitive_Operations", Flag120 (Id));
8586 W ("Has_Private_Ancestor", Flag151 (Id));
8587 W ("Has_Private_Declaration", Flag155 (Id));
8588 W ("Has_Protected", Flag271 (Id));
8589 W ("Has_Qualified_Name", Flag161 (Id));
8590 W ("Has_RACW", Flag214 (Id));
8591 W ("Has_Record_Rep_Clause", Flag65 (Id));
8592 W ("Has_Recursive_Call", Flag143 (Id));
8593 W ("Has_Shift_Operator", Flag267 (Id));
8594 W ("Has_Size_Clause", Flag29 (Id));
8595 W ("Has_Small_Clause", Flag67 (Id));
8596 W ("Has_Specified_Layout", Flag100 (Id));
8597 W ("Has_Specified_Stream_Input", Flag190 (Id));
8598 W ("Has_Specified_Stream_Output", Flag191 (Id));
8599 W ("Has_Specified_Stream_Read", Flag192 (Id));
8600 W ("Has_Specified_Stream_Write", Flag193 (Id));
8601 W ("Has_Static_Discriminants", Flag211 (Id));
8602 W ("Has_Static_Predicate", Flag269 (Id));
8603 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8604 W ("Has_Storage_Size_Clause", Flag23 (Id));
8605 W ("Has_Stream_Size_Clause", Flag184 (Id));
8606 W ("Has_Task", Flag30 (Id));
8607 W ("Has_Thunks", Flag228 (Id));
8608 W ("Has_Unchecked_Union", Flag123 (Id));
8609 W ("Has_Unknown_Discriminants", Flag72 (Id));
8610 W ("Has_Uplevel_Reference", Flag215 (Id));
8611 W ("Has_Visible_Refinement", Flag263 (Id));
8612 W ("Has_Volatile_Components", Flag87 (Id));
8613 W ("Has_Xref_Entry", Flag182 (Id));
8614 W ("In_Package_Body", Flag48 (Id));
8615 W ("In_Private_Part", Flag45 (Id));
8616 W ("In_Use", Flag8 (Id));
8617 W ("Is_Abstract_Subprogram", Flag19 (Id));
8618 W ("Is_Abstract_Type", Flag146 (Id));
8619 W ("Is_Access_Constant", Flag69 (Id));
8620 W ("Is_Ada_2005_Only", Flag185 (Id));
8621 W ("Is_Ada_2012_Only", Flag199 (Id));
8622 W ("Is_Aliased", Flag15 (Id));
8623 W ("Is_Asynchronous", Flag81 (Id));
8624 W ("Is_Atomic", Flag85 (Id));
8625 W ("Is_Bit_Packed_Array", Flag122 (Id));
8626 W ("Is_CPP_Class", Flag74 (Id));
8627 W ("Is_Called", Flag102 (Id));
8628 W ("Is_Character_Type", Flag63 (Id));
8629 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8630 W ("Is_Child_Unit", Flag73 (Id));
8631 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8632 W ("Is_Compilation_Unit", Flag149 (Id));
8633 W ("Is_Completely_Hidden", Flag103 (Id));
8634 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8635 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8636 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8637 W ("Is_Constrained", Flag12 (Id));
8638 W ("Is_Constructor", Flag76 (Id));
8639 W ("Is_Controlled", Flag42 (Id));
8640 W ("Is_Controlling_Formal", Flag97 (Id));
8641 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8642 W ("Is_Descendent_Of_Address", Flag223 (Id));
8643 W ("Is_Discrim_SO_Function", Flag176 (Id));
8644 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8645 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8646 W ("Is_Dispatching_Operation", Flag6 (Id));
8647 W ("Is_Eliminated", Flag124 (Id));
8648 W ("Is_Entry_Formal", Flag52 (Id));
8649 W ("Is_Exported", Flag99 (Id));
8650 W ("Is_First_Subtype", Flag70 (Id));
8651 W ("Is_For_Access_Subtype", Flag118 (Id));
8652 W ("Is_Formal_Subprogram", Flag111 (Id));
8653 W ("Is_Frozen", Flag4 (Id));
8654 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8655 W ("Is_Generic_Actual_Type", Flag94 (Id));
8656 W ("Is_Generic_Instance", Flag130 (Id));
8657 W ("Is_Generic_Type", Flag13 (Id));
8658 W ("Is_Hidden", Flag57 (Id));
8659 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8660 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8661 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8662 W ("Is_Immediately_Visible", Flag7 (Id));
8663 W ("Is_Implementation_Defined", Flag254 (Id));
8664 W ("Is_Imported", Flag24 (Id));
8665 W ("Is_Independent", Flag268 (Id));
8666 W ("Is_Inlined", Flag11 (Id));
8667 W ("Is_Inlined_Always", Flag1 (Id));
8668 W ("Is_Instantiated", Flag126 (Id));
8669 W ("Is_Interface", Flag186 (Id));
8670 W ("Is_Internal", Flag17 (Id));
8671 W ("Is_Interrupt_Handler", Flag89 (Id));
8672 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8673 W ("Is_Invariant_Procedure", Flag257 (Id));
8674 W ("Is_Itype", Flag91 (Id));
8675 W ("Is_Known_Non_Null", Flag37 (Id));
8676 W ("Is_Known_Null", Flag204 (Id));
8677 W ("Is_Known_Valid", Flag170 (Id));
8678 W ("Is_Limited_Composite", Flag106 (Id));
8679 W ("Is_Limited_Interface", Flag197 (Id));
8680 W ("Is_Limited_Record", Flag25 (Id));
8681 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8682 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8683 W ("Is_Non_Static_Subtype", Flag109 (Id));
8684 W ("Is_Null_Init_Proc", Flag178 (Id));
8685 W ("Is_Obsolescent", Flag153 (Id));
8686 W ("Is_Only_Out_Parameter", Flag226 (Id));
8687 W ("Is_Package_Body_Entity", Flag160 (Id));
8688 W ("Is_Packed", Flag51 (Id));
8689 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8690 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8691 W ("Is_Predicate_Function", Flag255 (Id));
8692 W ("Is_Predicate_Function_M", Flag256 (Id));
8693 W ("Is_Preelaborated", Flag59 (Id));
8694 W ("Is_Primitive", Flag218 (Id));
8695 W ("Is_Primitive_Wrapper", Flag195 (Id));
8696 W ("Is_Private_Composite", Flag107 (Id));
8697 W ("Is_Private_Descendant", Flag53 (Id));
8698 W ("Is_Private_Primitive", Flag245 (Id));
8699 W ("Is_Processed_Transient", Flag252 (Id));
8700 W ("Is_Public", Flag10 (Id));
8701 W ("Is_Pure", Flag44 (Id));
8702 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8703 W ("Is_RACW_Stub_Type", Flag244 (Id));
8704 W ("Is_Raised", Flag224 (Id));
8705 W ("Is_Remote_Call_Interface", Flag62 (Id));
8706 W ("Is_Remote_Types", Flag61 (Id));
8707 W ("Is_Renaming_Of_Object", Flag112 (Id));
8708 W ("Is_Return_Object", Flag209 (Id));
8709 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8710 W ("Is_Shared_Passive", Flag60 (Id));
8711 W ("Is_Static_Type", Flag281 (Id));
8712 W ("Is_Statically_Allocated", Flag28 (Id));
8713 W ("Is_Tag", Flag78 (Id));
8714 W ("Is_Tagged_Type", Flag55 (Id));
8715 W ("Is_Thunk", Flag225 (Id));
8716 W ("Is_Trivial_Subprogram", Flag235 (Id));
8717 W ("Is_True_Constant", Flag163 (Id));
8718 W ("Is_Unchecked_Union", Flag117 (Id));
8719 W ("Is_Underlying_Record_View", Flag246 (Id));
8720 W ("Is_Unsigned_Type", Flag144 (Id));
8721 W ("Is_Valued_Procedure", Flag127 (Id));
8722 W ("Is_Visible_Formal", Flag206 (Id));
8723 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8724 W ("Is_Volatile", Flag16 (Id));
8725 W ("Itype_Printed", Flag202 (Id));
8726 W ("Kill_Elaboration_Checks", Flag32 (Id));
8727 W ("Kill_Range_Checks", Flag33 (Id));
8728 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8729 W ("Low_Bound_Tested", Flag205 (Id));
8730 W ("Machine_Radix_10", Flag84 (Id));
8731 W ("Materialize_Entity", Flag168 (Id));
8732 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8733 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8734 W ("Must_Have_Preelab_Init", Flag208 (Id));
8735 W ("Needs_Debug_Info", Flag147 (Id));
8736 W ("Needs_No_Actuals", Flag22 (Id));
8737 W ("Never_Set_In_Source", Flag115 (Id));
8738 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8739 W ("No_Pool_Assigned", Flag131 (Id));
8740 W ("No_Predicate_On_actual", Flag275 (Id));
8741 W ("No_Return", Flag113 (Id));
8742 W ("No_Strict_Aliasing", Flag136 (Id));
8743 W ("Non_Binary_Modulus", Flag58 (Id));
8744 W ("Nonzero_Is_True", Flag162 (Id));
8745 W ("OK_To_Rename", Flag247 (Id));
8746 W ("OK_To_Reorder_Components", Flag239 (Id));
8747 W ("Optimize_Alignment_Space", Flag241 (Id));
8748 W ("Optimize_Alignment_Time", Flag242 (Id));
8749 W ("Overlays_Constant", Flag243 (Id));
8750 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8751 W ("Reachable", Flag49 (Id));
8752 W ("Referenced", Flag156 (Id));
8753 W ("Referenced_As_LHS", Flag36 (Id));
8754 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8755 W ("Renamed_In_Spec", Flag231 (Id));
8756 W ("Requires_Overriding", Flag213 (Id));
8757 W ("Return_Present", Flag54 (Id));
8758 W ("Returns_By_Ref", Flag90 (Id));
8759 W ("Returns_Limited_View", Flag134 (Id));
8760 W ("Reverse_Bit_Order", Flag164 (Id));
8761 W ("Reverse_Storage_Order", Flag93 (Id));
8762 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8763 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8764 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8765 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8766 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8767 W ("SSO_Set_High_By_Default", Flag273 (Id));
8768 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8769 W ("Static_Elaboration_Desired", Flag77 (Id));
8770 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8771 W ("Strict_Alignment", Flag145 (Id));
8772 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8773 W ("Suppress_Initialization", Flag105 (Id));
8774 W ("Suppress_Style_Checks", Flag165 (Id));
8775 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8776 W ("Treat_As_Volatile", Flag41 (Id));
8777 W ("Universal_Aliasing", Flag216 (Id));
8778 W ("Uplevel_Reference_Noted", Flag283 (Id));
8779 W ("Used_As_Generic_Actual", Flag222 (Id));
8780 W ("Uses_Sec_Stack", Flag95 (Id));
8781 W ("Warnings_Off", Flag96 (Id));
8782 W ("Warnings_Off_Used", Flag236 (Id));
8783 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8784 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8785 W ("Was_Hidden", Flag196 (Id));
8786 end Write_Entity_Flags;
8788 -----------------------
8789 -- Write_Entity_Info --
8790 -----------------------
8792 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8794 procedure Write_Attribute (Which : String; Nam : E);
8795 -- Write attribute value with given string name
8797 procedure Write_Kind (Id : Entity_Id);
8798 -- Write Ekind field of entity
8800 ---------------------
8801 -- Write_Attribute --
8802 ---------------------
8804 procedure Write_Attribute (Which : String; Nam : E) is
8808 Write_Int (Int (Nam));
8810 Write_Name (Chars (Nam));
8812 end Write_Attribute;
8818 procedure Write_Kind (Id : Entity_Id) is
8819 K : constant String := Entity_Kind'Image (Ekind (Id));
8823 Write_Str (" Kind ");
8825 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8826 Write_Str ("TAGGED ");
8829 Write_Str (K (3 .. K'Length));
8832 if Is_Type (Id) and then Depends_On_Private (Id) then
8833 Write_Str ("Depends_On_Private ");
8837 -- Start of processing for Write_Entity_Info
8841 Write_Attribute ("Name ", Id);
8842 Write_Int (Int (Id));
8846 Write_Attribute (" Type ", Etype (Id));
8848 Write_Attribute (" Scope ", Scope (Id));
8853 when Discrete_Kind =>
8854 Write_Str ("Bounds: Id = ");
8856 if Present (Scalar_Range (Id)) then
8857 Write_Int (Int (Type_Low_Bound (Id)));
8858 Write_Str (" .. Id = ");
8859 Write_Int (Int (Type_High_Bound (Id)));
8861 Write_Str ("Empty");
8872 (" Component Type ", Component_Type (Id));
8875 Write_Str (" Indexes ");
8877 Index := First_Index (Id);
8878 while Present (Index) loop
8879 Write_Attribute (" ", Etype (Index));
8880 Index := Next_Index (Index);
8888 (" Directly Designated Type ",
8889 Directly_Designated_Type (Id));
8892 when Overloadable_Kind =>
8893 if Present (Homonym (Id)) then
8894 Write_Str (" Homonym ");
8895 Write_Name (Chars (Homonym (Id)));
8897 Write_Int (Int (Homonym (Id)));
8904 if Ekind (Scope (Id)) in Record_Kind then
8906 " Original_Record_Component ",
8907 Original_Record_Component (Id));
8908 Write_Int (Int (Original_Record_Component (Id)));
8912 when others => null;
8914 end Write_Entity_Info;
8916 -----------------------
8917 -- Write_Field6_Name --
8918 -----------------------
8920 procedure Write_Field6_Name (Id : Entity_Id) is
8921 pragma Warnings (Off, Id);
8923 Write_Str ("First_Rep_Item");
8924 end Write_Field6_Name;
8926 -----------------------
8927 -- Write_Field7_Name --
8928 -----------------------
8930 procedure Write_Field7_Name (Id : Entity_Id) is
8931 pragma Warnings (Off, Id);
8933 Write_Str ("Freeze_Node");
8934 end Write_Field7_Name;
8936 -----------------------
8937 -- Write_Field8_Name --
8938 -----------------------
8940 procedure Write_Field8_Name (Id : Entity_Id) is
8944 Write_Str ("Associated_Node_For_Itype");
8947 Write_Str ("Dependent_Instances");
8950 Write_Str ("First_Exit_Statement");
8953 Write_Str ("Hiding_Loop_Variable");
8957 E_Subprogram_Body =>
8958 Write_Str ("Mechanism");
8962 Write_Str ("Normalized_First_Bit");
8964 when E_Abstract_State =>
8965 Write_Str ("Refinement_Constituents");
8967 when E_Return_Statement =>
8968 Write_Str ("Return_Applies_To");
8971 Write_Str ("Field8??");
8973 end Write_Field8_Name;
8975 -----------------------
8976 -- Write_Field9_Name --
8977 -----------------------
8979 procedure Write_Field9_Name (Id : Entity_Id) is
8983 Write_Str ("Class_Wide_Type");
8986 Write_Str ("Current_Value");
8988 when E_Abstract_State =>
8989 Write_Str ("Part_Of_Constituents");
8992 E_Generic_Function |
8994 E_Generic_Procedure |
8997 Write_Str ("Renaming_Map");
9000 Write_Str ("Field9??");
9002 end Write_Field9_Name;
9004 ------------------------
9005 -- Write_Field10_Name --
9006 ------------------------
9008 procedure Write_Field10_Name (Id : Entity_Id) is
9011 when E_Abstract_State |
9013 Write_Str ("Encapsulating_State");
9015 when Class_Wide_Kind |
9021 Write_Str ("Direct_Primitive_Operations");
9024 Write_Str ("Float_Rep");
9026 when E_In_Parameter |
9028 Write_Str ("Discriminal_Link");
9034 Write_Str ("Handler_Records");
9038 Write_Str ("Normalized_Position_Max");
9041 Write_Str ("Field10??");
9043 end Write_Field10_Name;
9045 ------------------------
9046 -- Write_Field11_Name --
9047 ------------------------
9049 procedure Write_Field11_Name (Id : Entity_Id) is
9053 Write_Str ("Block_Node");
9057 Write_Str ("Component_Bit_Offset");
9060 Write_Str ("Entry_Component");
9062 when E_Enumeration_Literal =>
9063 Write_Str ("Enumeration_Pos");
9067 Write_Str ("Full_View");
9069 when E_Generic_Package =>
9070 Write_Str ("Generic_Homonym");
9076 Write_Str ("Protected_Body_Subprogram");
9079 Write_Str ("Field11??");
9081 end Write_Field11_Name;
9083 ------------------------
9084 -- Write_Field12_Name --
9085 ------------------------
9087 procedure Write_Field12_Name (Id : Entity_Id) is
9091 Write_Str ("Associated_Formal_Package");
9094 Write_Str ("Barrier_Function");
9096 when E_Enumeration_Literal =>
9097 Write_Str ("Enumeration_Rep");
9105 E_In_Out_Parameter |
9109 Write_Str ("Esize");
9113 Write_Str ("Next_Inlined_Subprogram");
9116 Write_Str ("Field12??");
9118 end Write_Field12_Name;
9120 ------------------------
9121 -- Write_Field13_Name --
9122 ------------------------
9124 procedure Write_Field13_Name (Id : Entity_Id) is
9129 Write_Str ("Component_Clause");
9132 Write_Str ("Elaboration_Entity");
9136 Generic_Unit_Kind =>
9137 Write_Str ("Elaboration_Entity");
9141 Write_Str ("Extra_Accessibility");
9144 Write_Str ("RM_Size");
9147 Write_Str ("Field13??");
9149 end Write_Field13_Name;
9151 -----------------------
9152 -- Write_Field14_Name --
9153 -----------------------
9155 procedure Write_Field14_Name (Id : Entity_Id) is
9164 Write_Str ("Alignment");
9168 Write_Str ("Normalized_Position");
9174 Write_Str ("Postconditions_Proc");
9176 when E_Generic_Package |
9178 Write_Str ("Shadow_Entities");
9181 Write_Str ("Field14??");
9183 end Write_Field14_Name;
9185 ------------------------
9186 -- Write_Field15_Name --
9187 ------------------------
9189 procedure Write_Field15_Name (Id : Entity_Id) is
9192 when E_Discriminant =>
9193 Write_Str ("Discriminant_Number");
9196 Write_Str ("DT_Entry_Count");
9200 Write_Str ("DT_Position");
9203 Write_Str ("Entry_Parameters_Type");
9206 Write_Str ("Extra_Formal");
9209 Write_Str ("Pending_Access_Types");
9213 Write_Str ("Related_Instance");
9217 Write_Str ("Status_Flag_Or_Transient_Decl");
9220 Write_Str ("Field15??");
9222 end Write_Field15_Name;
9224 ------------------------
9225 -- Write_Field16_Name --
9226 ------------------------
9228 procedure Write_Field16_Name (Id : Entity_Id) is
9231 when E_Record_Type |
9232 E_Record_Type_With_Private =>
9233 Write_Str ("Access_Disp_Table");
9235 when E_Abstract_State =>
9236 Write_Str ("Body_References");
9238 when E_Record_Subtype |
9239 E_Class_Wide_Subtype =>
9240 Write_Str ("Cloned_Subtype");
9244 Write_Str ("DTC_Entity");
9247 Write_Str ("Entry_Formal");
9252 Write_Str ("First_Private_Entity");
9254 when Enumeration_Kind =>
9255 Write_Str ("Lit_Strings");
9257 when Decimal_Fixed_Point_Kind =>
9258 Write_Str ("Scale_Value");
9260 when E_String_Literal_Subtype =>
9261 Write_Str ("String_Literal_Length");
9265 Write_Str ("Unset_Reference");
9268 Write_Str ("Field16??");
9270 end Write_Field16_Name;
9272 ------------------------
9273 -- Write_Field17_Name --
9274 ------------------------
9276 procedure Write_Field17_Name (Id : Entity_Id) is
9281 E_Generic_In_Out_Parameter |
9283 Write_Str ("Actual_Subtype");
9286 Write_Str ("Digits_Value");
9288 when E_Discriminant =>
9289 Write_Str ("Discriminal");
9298 E_Generic_Function |
9300 E_Generic_Procedure |
9308 E_Return_Statement |
9310 E_Subprogram_Type =>
9311 Write_Str ("First_Entity");
9314 Write_Str ("First_Index");
9316 when Enumeration_Kind =>
9317 Write_Str ("First_Literal");
9320 Write_Str ("Master_Id");
9322 when Modular_Integer_Kind =>
9323 Write_Str ("Modulus");
9325 when E_Abstract_State |
9326 E_Incomplete_Type =>
9327 Write_Str ("Non_Limited_View");
9329 when E_Incomplete_Subtype =>
9330 if From_Limited_With (Id) then
9331 Write_Str ("Non_Limited_View");
9335 Write_Str ("Prival");
9338 Write_Str ("Field17??");
9340 end Write_Field17_Name;
9342 ------------------------
9343 -- Write_Field18_Name --
9344 ------------------------
9346 procedure Write_Field18_Name (Id : Entity_Id) is
9349 when E_Enumeration_Literal |
9353 Write_Str ("Alias");
9355 when E_Record_Type =>
9356 Write_Str ("Corresponding_Concurrent_Type");
9358 when E_Subprogram_Body =>
9359 Write_Str ("Corresponding_Protected_Entry");
9361 when Concurrent_Kind =>
9362 Write_Str ("Corresponding_Record_Type");
9367 Write_Str ("Enclosing_Scope");
9369 when E_Entry_Index_Parameter =>
9370 Write_Str ("Entry_Index_Constant");
9372 when E_Class_Wide_Subtype |
9373 E_Access_Protected_Subprogram_Type |
9374 E_Anonymous_Access_Protected_Subprogram_Type |
9375 E_Access_Subprogram_Type |
9377 Write_Str ("Equivalent_Type");
9379 when Fixed_Point_Kind =>
9380 Write_Str ("Delta_Value");
9382 when Enumeration_Kind =>
9383 Write_Str ("Lit_Indexes");
9385 when Incomplete_Or_Private_Kind |
9387 Write_Str ("Private_Dependents");
9390 Write_Str ("Renamed_Object");
9394 E_Generic_Function |
9395 E_Generic_Procedure |
9396 E_Generic_Package =>
9397 Write_Str ("Renamed_Entity");
9399 when E_String_Literal_Subtype =>
9400 Write_Str ("String_Literal_Low_Bound");
9403 Write_Str ("Field18??");
9405 end Write_Field18_Name;
9407 -----------------------
9408 -- Write_Field19_Name --
9409 -----------------------
9411 procedure Write_Field19_Name (Id : Entity_Id) is
9415 E_Generic_Package =>
9416 Write_Str ("Body_Entity");
9418 when E_Discriminant =>
9419 Write_Str ("Corresponding_Discriminant");
9422 Write_Str ("Default_Aspect_Value");
9424 when E_Array_Type =>
9425 Write_Str ("Default_Component_Value");
9427 when E_Protected_Type =>
9428 Write_Str ("Entry_Bodies_Array");
9432 E_Subprogram_Type =>
9433 Write_Str ("Extra_Accessibility_Of_Result");
9435 when E_Record_Type =>
9436 Write_Str ("Parent_Subtype");
9440 Write_Str ("Size_Check_Code");
9442 when E_Package_Body |
9444 Write_Str ("Spec_Entity");
9446 when Private_Kind =>
9447 Write_Str ("Underlying_Full_View");
9450 Write_Str ("Field19??");
9452 end Write_Field19_Name;
9454 -----------------------
9455 -- Write_Field20_Name --
9456 -----------------------
9458 procedure Write_Field20_Name (Id : Entity_Id) is
9462 Write_Str ("Component_Type");
9464 when E_In_Parameter |
9465 E_Generic_In_Parameter =>
9466 Write_Str ("Default_Value");
9469 Write_Str ("Directly_Designated_Type");
9472 Write_Str ("Discriminant_Checking_Func");
9474 when E_Discriminant =>
9475 Write_Str ("Discriminant_Default_Value");
9484 E_Generic_Function |
9486 E_Generic_Procedure |
9494 E_Return_Statement |
9496 E_Subprogram_Type =>
9497 Write_Str ("Last_Entity");
9501 Write_Str ("Prival_Link");
9504 Write_Str ("Scalar_Range");
9507 Write_Str ("Register_Exception_Call");
9510 Write_Str ("Field20??");
9512 end Write_Field20_Name;
9514 -----------------------
9515 -- Write_Field21_Name --
9516 -----------------------
9518 procedure Write_Field21_Name (Id : Entity_Id) is
9522 Write_Str ("Accept_Address");
9524 when E_In_Parameter =>
9525 Write_Str ("Default_Expr_Function");
9527 when Concurrent_Kind |
9528 Incomplete_Or_Private_Kind |
9532 Write_Str ("Discriminant_Constraint");
9537 E_Generic_Function |
9539 E_Generic_Procedure |
9541 Write_Str ("Interface_Name");
9544 Modular_Integer_Kind =>
9545 Write_Str ("Original_Array_Type");
9547 when Fixed_Point_Kind =>
9548 Write_Str ("Small_Value");
9551 Write_Str ("Field21??");
9553 end Write_Field21_Name;
9555 -----------------------
9556 -- Write_Field22_Name --
9557 -----------------------
9559 procedure Write_Field22_Name (Id : Entity_Id) is
9563 Write_Str ("Associated_Storage_Pool");
9566 Write_Str ("Component_Size");
9568 when E_Record_Type =>
9569 Write_Str ("Corresponding_Remote_Type");
9573 Write_Str ("Original_Record_Component");
9575 when E_Enumeration_Literal =>
9576 Write_Str ("Enumeration_Rep_Expr");
9578 when E_Record_Type_With_Private |
9579 E_Record_Subtype_With_Private |
9582 E_Limited_Private_Type |
9583 E_Limited_Private_Subtype =>
9584 Write_Str ("Private_View");
9587 Write_Str ("Protected_Formal");
9597 E_Generic_Function |
9598 E_Generic_Procedure |
9601 E_Return_Statement |
9604 Write_Str ("Scope_Depth_Value");
9607 Write_Str ("Shared_Var_Procs_Instance");
9610 Write_Str ("Field22??");
9612 end Write_Field22_Name;
9614 ------------------------
9615 -- Write_Field23_Name --
9616 ------------------------
9618 procedure Write_Field23_Name (Id : Entity_Id) is
9621 when E_Discriminant =>
9622 Write_Str ("CR_Discriminant");
9625 Write_Str ("Entry_Cancel_Parameter");
9627 when E_Enumeration_Type =>
9628 Write_Str ("Enum_Pos_To_Rep");
9632 Write_Str ("Extra_Constrained");
9635 Write_Str ("Finalization_Master");
9637 when E_Generic_Function |
9639 E_Generic_Procedure =>
9640 Write_Str ("Inner_Instances");
9643 Write_Str ("Packed_Array_Impl_Type");
9646 Write_Str ("Protection_Object");
9648 when Concurrent_Kind |
9649 Incomplete_Or_Private_Kind |
9653 Write_Str ("Stored_Constraint");
9657 if Present (Scope (Id))
9658 and then Is_Protected_Type (Scope (Id))
9660 Write_Str ("Protection_Object");
9662 Write_Str ("Generic_Renamings");
9666 if Is_Generic_Instance (Id) then
9667 Write_Str ("Generic_Renamings");
9669 Write_Str ("Limited_View");
9673 Write_Str ("Field23??");
9675 end Write_Field23_Name;
9677 ------------------------
9678 -- Write_Field24_Name --
9679 ------------------------
9681 procedure Write_Field24_Name (Id : Entity_Id) is
9687 Write_Str ("Related_Expression");
9692 Write_Str ("Uplevel_References");
9695 Write_Str ("Field24???");
9697 end Write_Field24_Name;
9699 ------------------------
9700 -- Write_Field25_Name --
9701 ------------------------
9703 procedure Write_Field25_Name (Id : Entity_Id) is
9706 when E_Generic_Package |
9708 Write_Str ("Abstract_States");
9711 Write_Str ("Debug_Renaming_Link");
9714 Write_Str ("DT_Offset_To_Top_Func");
9718 Write_Str ("Interface_Alias");
9720 when E_Record_Type |
9722 E_Record_Type_With_Private |
9723 E_Record_Subtype_With_Private =>
9724 Write_Str ("Interfaces");
9728 Write_Str ("Related_Array_Object");
9731 Write_Str ("Task_Body_Procedure");
9735 Write_Str ("PPC_Wrapper");
9737 when Discrete_Kind =>
9738 Write_Str ("Static_Discrete_Predicate");
9741 Write_Str ("Static_Real_Or_String_Predicate");
9744 Write_Str ("Field25??");
9746 end Write_Field25_Name;
9748 ------------------------
9749 -- Write_Field26_Name --
9750 ------------------------
9752 procedure Write_Field26_Name (Id : Entity_Id) is
9755 when E_Record_Type |
9756 E_Record_Type_With_Private =>
9757 Write_Str ("Dispatch_Table_Wrappers");
9759 when E_In_Out_Parameter |
9762 Write_Str ("Last_Assignment");
9766 Write_Str ("Overridden_Operation");
9768 when E_Generic_Package |
9770 Write_Str ("Package_Instantiation");
9774 Write_Str ("Related_Type");
9778 Write_Str ("Storage_Size_Variable");
9781 Write_Str ("Field26??");
9783 end Write_Field26_Name;
9785 ------------------------
9786 -- Write_Field27_Name --
9787 ------------------------
9789 procedure Write_Field27_Name (Id : Entity_Id) is
9794 Write_Str ("Current_Use_Clause");
9799 Write_Str ("Related_Type");
9803 Write_Str ("Wrapped_Entity");
9806 Write_Str ("Field27??");
9808 end Write_Field27_Name;
9810 ------------------------
9811 -- Write_Field28_Name --
9812 ------------------------
9814 procedure Write_Field28_Name (Id : Entity_Id) is
9822 E_Subprogram_Type =>
9823 Write_Str ("Extra_Formals");
9827 Write_Str ("Finalizer");
9831 Write_Str ("Initialization_Statements");
9833 when E_Access_Subprogram_Type =>
9834 Write_Str ("Original_Access_Type");
9837 Write_Str ("Relative_Deadline_Variable");
9839 when E_Record_Type =>
9840 Write_Str ("Underlying_Record_View");
9843 Write_Str ("Field28??");
9845 end Write_Field28_Name;
9847 ------------------------
9848 -- Write_Field29_Name --
9849 ------------------------
9851 procedure Write_Field29_Name (Id : Entity_Id) is
9856 Write_Str ("BIP_Initialization_Call");
9859 Write_Str ("Subprograms_For_Type");
9862 Write_Str ("Field29??");
9864 end Write_Field29_Name;
9866 ------------------------
9867 -- Write_Field30_Name --
9868 ------------------------
9870 procedure Write_Field30_Name (Id : Entity_Id) is
9874 Write_Str ("Corresponding_Equality");
9878 Write_Str ("Last_Aggregate_Assignment");
9881 Write_Str ("Static_Initialization");
9884 Write_Str ("Field30??");
9886 end Write_Field30_Name;
9888 ------------------------
9889 -- Write_Field31_Name --
9890 ------------------------
9892 procedure Write_Field31_Name (Id : Entity_Id) is
9897 Write_Str ("Thunk_Entity");
9900 Write_Str ("Derived_Type_Link");
9903 Write_Str ("Field31??");
9905 end Write_Field31_Name;
9907 ------------------------
9908 -- Write_Field32_Name --
9909 ------------------------
9911 procedure Write_Field32_Name (Id : Entity_Id) is
9915 E_Generic_Function |
9917 E_Generic_Procedure |
9921 E_Subprogram_Body =>
9922 Write_Str ("SPARK_Pragma");
9925 Write_Str ("No_Tagged_Streams_Pragma");
9928 Write_Str ("Field32??");
9930 end Write_Field32_Name;
9932 ------------------------
9933 -- Write_Field33_Name --
9934 ------------------------
9936 procedure Write_Field33_Name (Id : Entity_Id) is
9939 when E_Generic_Package |
9942 Write_Str ("SPARK_Aux_Pragma");
9948 Write_Str ("Linker_Section_Pragma");
9951 Write_Str ("Field33??");
9953 end Write_Field33_Name;
9955 ------------------------
9956 -- Write_Field34_Name --
9957 ------------------------
9959 procedure Write_Field34_Name (Id : Entity_Id) is
9969 Generic_Subprogram_Kind |
9971 Write_Str ("Contract");
9974 Write_Str ("Field34??");
9976 end Write_Field34_Name;
9978 ------------------------
9979 -- Write_Field35_Name --
9980 ------------------------
9982 procedure Write_Field35_Name (Id : Entity_Id) is
9985 when Subprogram_Kind =>
9986 Write_Str ("Import_Pragma");
9989 Write_Str ("Field35??");
9991 end Write_Field35_Name;
9993 -------------------------
9994 -- Iterator Procedures --
9995 -------------------------
9997 procedure Proc_Next_Component (N : in out Node_Id) is
9999 N := Next_Component (N);
10000 end Proc_Next_Component;
10002 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10004 N := Next_Entity (N);
10005 while Present (N) loop
10006 exit when Ekind_In (N, E_Component, E_Discriminant);
10007 N := Next_Entity (N);
10009 end Proc_Next_Component_Or_Discriminant;
10011 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10013 N := Next_Discriminant (N);
10014 end Proc_Next_Discriminant;
10016 procedure Proc_Next_Formal (N : in out Node_Id) is
10018 N := Next_Formal (N);
10019 end Proc_Next_Formal;
10021 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10023 N := Next_Formal_With_Extras (N);
10024 end Proc_Next_Formal_With_Extras;
10026 procedure Proc_Next_Index (N : in out Node_Id) is
10028 N := Next_Index (N);
10029 end Proc_Next_Index;
10031 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10033 N := Next_Inlined_Subprogram (N);
10034 end Proc_Next_Inlined_Subprogram;
10036 procedure Proc_Next_Literal (N : in out Node_Id) is
10038 N := Next_Literal (N);
10039 end Proc_Next_Literal;
10041 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10043 N := Next_Stored_Discriminant (N);
10044 end Proc_Next_Stored_Discriminant;