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
217 -- Subps_Index Uint24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Discrete_Predicate List25
226 -- Static_Real_Or_String_Predicate Node25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Storage_Size_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Original_Access_Type Node28
243 -- Relative_Deadline_Variable Node28
244 -- Underlying_Record_View Node28
246 -- BIP_Initialization_Call Node29
247 -- Subprograms_For_Type Node29
249 -- Corresponding_Equality Node30
250 -- Last_Aggregate_Assignment Node30
251 -- Static_Initialization Node30
253 -- Derived_Type_Link Node31
254 -- Thunk_Entity Node31
255 -- Activation_Record_Component Node31
257 -- SPARK_Pragma Node32
258 -- No_Tagged_Streams_Pragma Node32
260 -- Linker_Section_Pragma Node33
261 -- SPARK_Aux_Pragma Node33
265 -- Import_Pragma Node35
267 ---------------------------------------------
268 -- Usage of Flags in Defining Entity Nodes --
269 ---------------------------------------------
271 -- All flags are unique, there is no overlaying, so each flag is physically
272 -- present in every entity. However, for many of the flags, it only makes
273 -- sense for them to be set true for certain subsets of entity kinds. See
274 -- the spec of Einfo for further details.
276 -- Is_Inlined_Always Flag1
277 -- Is_Hidden_Non_Overridden_Subpgm Flag2
278 -- Has_Default_Init_Cond Flag3
280 -- Has_Discriminants Flag5
281 -- Is_Dispatching_Operation Flag6
282 -- Is_Immediately_Visible Flag7
284 -- Is_Potentially_Use_Visible Flag9
288 -- Is_Constrained Flag12
289 -- Is_Generic_Type Flag13
290 -- Depends_On_Private Flag14
292 -- Is_Volatile Flag16
293 -- Is_Internal Flag17
294 -- Has_Delayed_Freeze Flag18
295 -- Is_Abstract_Subprogram Flag19
296 -- Is_Concurrent_Record_Type Flag20
298 -- Has_Master_Entity Flag21
299 -- Needs_No_Actuals Flag22
300 -- Has_Storage_Size_Clause Flag23
301 -- Is_Imported Flag24
302 -- Is_Limited_Record Flag25
303 -- Has_Completion Flag26
304 -- Has_Pragma_Controlled Flag27
305 -- Is_Statically_Allocated Flag28
306 -- Has_Size_Clause Flag29
309 -- Checks_May_Be_Suppressed Flag31
310 -- Kill_Elaboration_Checks Flag32
311 -- Kill_Range_Checks Flag33
312 -- Has_Independent_Components Flag34
313 -- Is_Class_Wide_Equivalent_Type Flag35
314 -- Referenced_As_LHS Flag36
315 -- Is_Known_Non_Null Flag37
316 -- Can_Never_Be_Null Flag38
317 -- Has_Default_Aspect Flag39
318 -- Body_Needed_For_SAL Flag40
320 -- Treat_As_Volatile Flag41
321 -- Is_Controlled Flag42
322 -- Has_Controlled_Component Flag43
324 -- In_Private_Part Flag45
325 -- Has_Alignment_Clause Flag46
327 -- In_Package_Body Flag48
329 -- Delay_Subprogram_Descriptors Flag50
332 -- Is_Entry_Formal Flag52
333 -- Is_Private_Descendant Flag53
334 -- Return_Present Flag54
335 -- Is_Tagged_Type Flag55
336 -- Has_Homonym Flag56
338 -- Non_Binary_Modulus Flag58
339 -- Is_Preelaborated Flag59
340 -- Is_Shared_Passive Flag60
342 -- Is_Remote_Types Flag61
343 -- Is_Remote_Call_Interface Flag62
344 -- Is_Character_Type Flag63
345 -- Is_Intrinsic_Subprogram Flag64
346 -- Has_Record_Rep_Clause Flag65
347 -- Has_Enumeration_Rep_Clause Flag66
348 -- Has_Small_Clause Flag67
349 -- Has_Component_Size_Clause Flag68
350 -- Is_Access_Constant Flag69
351 -- Is_First_Subtype Flag70
353 -- Has_Completion_In_Body Flag71
354 -- Has_Unknown_Discriminants Flag72
355 -- Is_Child_Unit Flag73
356 -- Is_CPP_Class Flag74
357 -- Has_Non_Standard_Rep Flag75
358 -- Is_Constructor Flag76
359 -- Static_Elaboration_Desired Flag77
361 -- Has_All_Calls_Remote Flag79
362 -- Is_Constr_Subt_For_U_Nominal Flag80
364 -- Is_Asynchronous Flag81
365 -- Has_Gigi_Rep_Item Flag82
366 -- Has_Machine_Radix_Clause Flag83
367 -- Machine_Radix_10 Flag84
369 -- Has_Atomic_Components Flag86
370 -- Has_Volatile_Components Flag87
371 -- Discard_Names Flag88
372 -- Is_Interrupt_Handler Flag89
373 -- Returns_By_Ref Flag90
376 -- Size_Known_At_Compile_Time Flag92
377 -- Reverse_Storage_Order Flag93
378 -- Is_Generic_Actual_Type Flag94
379 -- Uses_Sec_Stack Flag95
380 -- Warnings_Off Flag96
381 -- Is_Controlling_Formal Flag97
382 -- Has_Controlling_Result Flag98
383 -- Is_Exported Flag99
384 -- Has_Specified_Layout Flag100
386 -- Has_Nested_Block_With_Handler Flag101
388 -- Is_Completely_Hidden Flag103
389 -- Address_Taken Flag104
390 -- Suppress_Initialization Flag105
391 -- Is_Limited_Composite Flag106
392 -- Is_Private_Composite Flag107
393 -- Default_Expressions_Processed Flag108
394 -- Is_Non_Static_Subtype Flag109
395 -- Has_Out_Or_In_Out_Parameter Flag110
397 -- Is_Formal_Subprogram Flag111
398 -- Is_Renaming_Of_Object Flag112
400 -- Delay_Cleanups Flag114
401 -- Never_Set_In_Source Flag115
402 -- Is_Visible_Lib_Unit Flag116
403 -- Is_Unchecked_Union Flag117
404 -- Is_For_Access_Subtype Flag118
405 -- Has_Convention_Pragma Flag119
406 -- Has_Primitive_Operations Flag120
408 -- Has_Pragma_Pack Flag121
409 -- Is_Bit_Packed_Array Flag122
410 -- Has_Unchecked_Union Flag123
411 -- Is_Eliminated Flag124
412 -- C_Pass_By_Copy Flag125
413 -- Is_Instantiated Flag126
414 -- Is_Valued_Procedure Flag127
415 -- (used for Component_Alignment) Flag128
416 -- (used for Component_Alignment) Flag129
417 -- Is_Generic_Instance Flag130
419 -- No_Pool_Assigned Flag131
420 -- Is_Default_Init_Cond_Procedure Flag132
421 -- Has_Inherited_Default_Init_Cond Flag133
422 -- Returns_Limited_View Flag134
423 -- Has_Aliased_Components Flag135
424 -- No_Strict_Aliasing Flag136
425 -- Is_Machine_Code_Subprogram Flag137
426 -- Is_Packed_Array_Impl_Type Flag138
427 -- Has_Biased_Representation Flag139
428 -- Has_Complex_Representation Flag140
430 -- Is_Constr_Subt_For_UN_Aliased Flag141
431 -- Has_Missing_Return Flag142
432 -- Has_Recursive_Call Flag143
433 -- Is_Unsigned_Type Flag144
434 -- Strict_Alignment Flag145
435 -- Is_Abstract_Type Flag146
436 -- Needs_Debug_Info Flag147
437 -- Suppress_Elaboration_Warnings Flag148
438 -- Is_Compilation_Unit Flag149
439 -- Has_Pragma_Elaborate_Body Flag150
441 -- Has_Private_Ancestor Flag151
442 -- Entry_Accepted Flag152
443 -- Is_Obsolescent Flag153
444 -- Has_Per_Object_Constraint Flag154
445 -- Has_Private_Declaration Flag155
446 -- Referenced Flag156
447 -- Has_Pragma_Inline Flag157
448 -- Finalize_Storage_Only Flag158
449 -- From_Limited_With Flag159
450 -- Is_Package_Body_Entity Flag160
452 -- Has_Qualified_Name Flag161
453 -- Nonzero_Is_True Flag162
454 -- Is_True_Constant Flag163
455 -- Reverse_Bit_Order Flag164
456 -- Suppress_Style_Checks Flag165
457 -- Debug_Info_Off Flag166
458 -- Sec_Stack_Needed_For_Return Flag167
459 -- Materialize_Entity Flag168
460 -- Has_Pragma_Thread_Local_Storage Flag169
461 -- Is_Known_Valid Flag170
463 -- Is_Hidden_Open_Scope Flag171
464 -- Has_Object_Size_Clause Flag172
465 -- Has_Fully_Qualified_Name Flag173
466 -- Elaboration_Entity_Required Flag174
467 -- Has_Forward_Instantiation Flag175
468 -- Is_Discrim_SO_Function Flag176
469 -- Size_Depends_On_Discriminant Flag177
470 -- Is_Null_Init_Proc Flag178
471 -- Has_Pragma_Pure_Function Flag179
472 -- Has_Pragma_Unreferenced Flag180
474 -- Has_Contiguous_Rep Flag181
475 -- Has_Xref_Entry Flag182
476 -- Must_Be_On_Byte_Boundary Flag183
477 -- Has_Stream_Size_Clause Flag184
478 -- Is_Ada_2005_Only Flag185
479 -- Is_Interface Flag186
480 -- Has_Constrained_Partial_View Flag187
481 -- Uses_Lock_Free Flag188
482 -- Is_Pure_Unit_Access_Type Flag189
483 -- Has_Specified_Stream_Input Flag190
485 -- Has_Specified_Stream_Output Flag191
486 -- Has_Specified_Stream_Read Flag192
487 -- Has_Specified_Stream_Write Flag193
488 -- Is_Local_Anonymous_Access Flag194
489 -- Is_Primitive_Wrapper Flag195
490 -- Was_Hidden Flag196
491 -- Is_Limited_Interface Flag197
492 -- Has_Pragma_Ordered Flag198
493 -- Is_Ada_2012_Only Flag199
495 -- Has_Delayed_Aspects Flag200
496 -- Has_Pragma_No_Inline Flag201
497 -- Itype_Printed Flag202
498 -- Has_Pragma_Pure Flag203
499 -- Is_Known_Null Flag204
500 -- Low_Bound_Tested Flag205
501 -- Is_Visible_Formal Flag206
502 -- Known_To_Have_Preelab_Init Flag207
503 -- Must_Have_Preelab_Init Flag208
504 -- Is_Return_Object Flag209
505 -- Elaborate_Body_Desirable Flag210
507 -- Has_Static_Discriminants Flag211
508 -- Has_Pragma_Unreferenced_Objects Flag212
509 -- Requires_Overriding Flag213
511 -- Has_Uplevel_Reference Flag215
512 -- Universal_Aliasing Flag216
513 -- Suppress_Value_Tracking_On_Call Flag217
514 -- Is_Primitive Flag218
515 -- Has_Initial_Value Flag219
516 -- Has_Dispatch_Table Flag220
518 -- Has_Pragma_Preelab_Init Flag221
519 -- Used_As_Generic_Actual Flag222
520 -- Is_Descendent_Of_Address Flag223
523 -- Is_Only_Out_Parameter Flag226
524 -- Referenced_As_Out_Parameter Flag227
525 -- Has_Thunks Flag228
526 -- Can_Use_Internal_Rep Flag229
527 -- Has_Pragma_Inline_Always Flag230
529 -- Renamed_In_Spec Flag231
530 -- Has_Invariants Flag232
531 -- Has_Pragma_Unmodified Flag233
532 -- Is_Dispatch_Table_Entity Flag234
533 -- Is_Trivial_Subprogram Flag235
534 -- Warnings_Off_Used Flag236
535 -- Warnings_Off_Used_Unmodified Flag237
536 -- Warnings_Off_Used_Unreferenced Flag238
537 -- OK_To_Reorder_Components Flag239
538 -- Has_Expanded_Contract Flag240
540 -- Optimize_Alignment_Space Flag241
541 -- Optimize_Alignment_Time Flag242
542 -- Overlays_Constant Flag243
543 -- Is_RACW_Stub_Type Flag244
544 -- Is_Private_Primitive Flag245
545 -- Is_Underlying_Record_View Flag246
546 -- OK_To_Rename Flag247
547 -- Has_Inheritable_Invariants Flag248
548 -- Is_Safe_To_Reevaluate Flag249
549 -- Has_Predicates Flag250
551 -- Has_Implicit_Dereference Flag251
552 -- Is_Processed_Transient Flag252
553 -- Has_Anonymous_Master Flag253
554 -- Is_Implementation_Defined Flag254
555 -- Is_Predicate_Function Flag255
556 -- Is_Predicate_Function_M Flag256
557 -- Is_Invariant_Procedure Flag257
558 -- Has_Dynamic_Predicate_Aspect Flag258
559 -- Has_Static_Predicate_Aspect Flag259
560 -- Has_Loop_Entry_Attributes Flag260
562 -- Has_Delayed_Rep_Aspects Flag261
563 -- May_Inherit_Delayed_Rep_Aspects Flag262
564 -- Has_Visible_Refinement Flag263
565 -- Is_Discriminant_Check_Function Flag264
566 -- SPARK_Pragma_Inherited Flag265
567 -- SPARK_Aux_Pragma_Inherited Flag266
568 -- Has_Shift_Operator Flag267
569 -- Is_Independent Flag268
570 -- Has_Static_Predicate Flag269
571 -- Stores_Attribute_Old_Prefix Flag270
573 -- Has_Protected Flag271
574 -- SSO_Set_Low_By_Default Flag272
575 -- SSO_Set_High_By_Default Flag273
576 -- Is_Generic_Actual_Subprogram Flag274
577 -- No_Predicate_On_Actual Flag275
578 -- No_Dynamic_Predicate_On_Actual Flag276
579 -- Is_Checked_Ghost_Entity Flag277
580 -- Is_Ignored_Ghost_Entity Flag278
581 -- Contains_Ignored_Ghost_Code Flag279
582 -- Partial_View_Has_Unknown_Discr Flag280
584 -- Is_Static_Type Flag281
585 -- Has_Nested_Subprogram Flag282
586 -- Uplevel_Reference_Noted Flag283
592 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
594 -----------------------
595 -- Local subprograms --
596 -----------------------
599 (State_Id : Entity_Id;
600 Option_Nam : Name_Id) return Boolean;
601 -- Determine whether abstract state State_Id has particular option denoted
602 -- by the name Option_Nam.
608 function Float_Rep (Id : E) return F is
609 pragma Assert (Is_Floating_Point_Type (Id));
611 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
619 (State_Id : Entity_Id;
620 Option_Nam : Name_Id) return Boolean
622 Decl : constant Node_Id := Parent (State_Id);
627 pragma Assert (Ekind (State_Id) = E_Abstract_State);
629 -- The declaration of abstract states with options appear as an
630 -- extension aggregate. If this is not the case, the option is not
633 if Nkind (Decl) /= N_Extension_Aggregate then
639 Opt := First (Expressions (Decl));
640 while Present (Opt) loop
642 -- Currently the only simple option allowed is External
644 if Nkind (Opt) = N_Identifier
645 and then Chars (Opt) = Name_External
646 and then Chars (Opt) = Option_Nam
654 -- Complex options with various specifiers
656 Opt := First (Component_Associations (Decl));
657 while Present (Opt) loop
658 Opt_Nam := First (Choices (Opt));
660 if Nkind (Opt_Nam) = N_Identifier
661 and then Chars (Opt_Nam) = Option_Nam
672 --------------------------------
673 -- Attribute Access Functions --
674 --------------------------------
676 function Abstract_States (Id : E) return L is
678 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
682 function Accept_Address (Id : E) return L is
687 function Access_Disp_Table (Id : E) return L is
689 pragma Assert (Ekind_In (Id, E_Record_Type,
691 return Elist16 (Implementation_Base_Type (Id));
692 end Access_Disp_Table;
694 function Activation_Record_Component (Id : E) return E is
696 pragma Assert (Ekind_In (Id, E_Constant,
703 end Activation_Record_Component;
705 function Actual_Subtype (Id : E) return E is
708 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
709 or else Is_Formal (Id));
713 function Address_Taken (Id : E) return B is
718 function Alias (Id : E) return E is
721 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
725 function Alignment (Id : E) return U is
727 pragma Assert (Is_Type (Id)
728 or else Is_Formal (Id)
729 or else Ekind_In (Id, E_Loop_Parameter,
736 function Associated_Formal_Package (Id : E) return E is
738 pragma Assert (Ekind (Id) = E_Package);
740 end Associated_Formal_Package;
742 function Associated_Node_For_Itype (Id : E) return N is
745 end Associated_Node_For_Itype;
747 function Associated_Storage_Pool (Id : E) return E is
749 pragma Assert (Is_Access_Type (Id));
750 return Node22 (Root_Type (Id));
751 end Associated_Storage_Pool;
753 function Barrier_Function (Id : E) return N is
755 pragma Assert (Is_Entry (Id));
757 end Barrier_Function;
759 function Block_Node (Id : E) return N is
761 pragma Assert (Ekind (Id) = E_Block);
765 function Body_Entity (Id : E) return E is
767 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
771 function Body_Needed_For_SAL (Id : E) return B is
774 (Ekind (Id) = E_Package
775 or else Is_Subprogram (Id)
776 or else Is_Generic_Unit (Id));
778 end Body_Needed_For_SAL;
780 function Body_References (Id : E) return L is
782 pragma Assert (Ekind (Id) = E_Abstract_State);
786 function BIP_Initialization_Call (Id : E) return N is
788 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
790 end BIP_Initialization_Call;
792 function C_Pass_By_Copy (Id : E) return B is
794 pragma Assert (Is_Record_Type (Id));
795 return Flag125 (Implementation_Base_Type (Id));
798 function Can_Never_Be_Null (Id : E) return B is
801 end Can_Never_Be_Null;
803 function Checks_May_Be_Suppressed (Id : E) return B is
806 end Checks_May_Be_Suppressed;
808 function Class_Wide_Type (Id : E) return E is
810 pragma Assert (Is_Type (Id));
814 function Cloned_Subtype (Id : E) return E is
816 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
820 function Component_Bit_Offset (Id : E) return U is
822 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
824 end Component_Bit_Offset;
826 function Component_Clause (Id : E) return N is
828 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
830 end Component_Clause;
832 function Component_Size (Id : E) return U is
834 pragma Assert (Is_Array_Type (Id));
835 return Uint22 (Implementation_Base_Type (Id));
838 function Component_Type (Id : E) return E is
840 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
841 return Node20 (Implementation_Base_Type (Id));
844 function Corresponding_Concurrent_Type (Id : E) return E is
846 pragma Assert (Ekind (Id) = E_Record_Type);
848 end Corresponding_Concurrent_Type;
850 function Corresponding_Discriminant (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Discriminant);
854 end Corresponding_Discriminant;
856 function Corresponding_Equality (Id : E) return E is
859 (Ekind (Id) = E_Function
860 and then not Comes_From_Source (Id)
861 and then Chars (Id) = Name_Op_Ne);
863 end Corresponding_Equality;
865 function Corresponding_Protected_Entry (Id : E) return E is
867 pragma Assert (Ekind (Id) = E_Subprogram_Body);
869 end Corresponding_Protected_Entry;
871 function Corresponding_Record_Type (Id : E) return E is
873 pragma Assert (Is_Concurrent_Type (Id));
875 end Corresponding_Record_Type;
877 function Corresponding_Remote_Type (Id : E) return E is
880 end Corresponding_Remote_Type;
882 function Current_Use_Clause (Id : E) return E is
884 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
886 end Current_Use_Clause;
888 function Current_Value (Id : E) return N is
890 pragma Assert (Ekind (Id) in Object_Kind);
894 function CR_Discriminant (Id : E) return E is
899 function Debug_Info_Off (Id : E) return B is
904 function Debug_Renaming_Link (Id : E) return E is
907 end Debug_Renaming_Link;
909 function Default_Aspect_Component_Value (Id : E) return N is
911 pragma Assert (Is_Array_Type (Id));
912 return Node19 (Base_Type (Id));
913 end Default_Aspect_Component_Value;
915 function Default_Aspect_Value (Id : E) return N is
917 pragma Assert (Is_Scalar_Type (Id));
918 return Node19 (Base_Type (Id));
919 end Default_Aspect_Value;
921 function Default_Expr_Function (Id : E) return E is
923 pragma Assert (Is_Formal (Id));
925 end Default_Expr_Function;
927 function Default_Expressions_Processed (Id : E) return B is
930 end Default_Expressions_Processed;
932 function Default_Value (Id : E) return N is
934 pragma Assert (Is_Formal (Id));
938 function Delay_Cleanups (Id : E) return B is
943 function Delay_Subprogram_Descriptors (Id : E) return B is
946 end Delay_Subprogram_Descriptors;
948 function Delta_Value (Id : E) return R is
950 pragma Assert (Is_Fixed_Point_Type (Id));
954 function Dependent_Instances (Id : E) return L is
956 pragma Assert (Is_Generic_Instance (Id));
958 end Dependent_Instances;
960 function Depends_On_Private (Id : E) return B is
962 pragma Assert (Nkind (Id) in N_Entity);
964 end Depends_On_Private;
966 function Derived_Type_Link (Id : E) return E is
968 pragma Assert (Is_Type (Id));
969 return Node31 (Base_Type (Id));
970 end Derived_Type_Link;
972 function Digits_Value (Id : E) return U is
975 (Is_Floating_Point_Type (Id)
976 or else Is_Decimal_Fixed_Point_Type (Id));
980 function Direct_Primitive_Operations (Id : E) return L is
982 pragma Assert (Is_Tagged_Type (Id));
984 end Direct_Primitive_Operations;
986 function Directly_Designated_Type (Id : E) return E is
988 pragma Assert (Is_Access_Type (Id));
990 end Directly_Designated_Type;
992 function Discard_Names (Id : E) return B is
997 function Discriminal (Id : E) return E is
999 pragma Assert (Ekind (Id) = E_Discriminant);
1003 function Discriminal_Link (Id : E) return N is
1006 end Discriminal_Link;
1008 function Discriminant_Checking_Func (Id : E) return E is
1010 pragma Assert (Ekind (Id) = E_Component);
1012 end Discriminant_Checking_Func;
1014 function Discriminant_Constraint (Id : E) return L is
1016 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1017 return Elist21 (Id);
1018 end Discriminant_Constraint;
1020 function Discriminant_Default_Value (Id : E) return N is
1022 pragma Assert (Ekind (Id) = E_Discriminant);
1024 end Discriminant_Default_Value;
1026 function Discriminant_Number (Id : E) return U is
1028 pragma Assert (Ekind (Id) = E_Discriminant);
1030 end Discriminant_Number;
1032 function Dispatch_Table_Wrappers (Id : E) return L is
1034 pragma Assert (Ekind_In (Id, E_Record_Type,
1036 return Elist26 (Implementation_Base_Type (Id));
1037 end Dispatch_Table_Wrappers;
1039 function DT_Entry_Count (Id : E) return U is
1041 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1045 function DT_Offset_To_Top_Func (Id : E) return E is
1047 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1049 end DT_Offset_To_Top_Func;
1051 function DT_Position (Id : E) return U is
1053 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1054 and then Present (DTC_Entity (Id)));
1058 function DTC_Entity (Id : E) return E is
1060 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1064 function Elaborate_Body_Desirable (Id : E) return B is
1066 pragma Assert (Ekind (Id) = E_Package);
1067 return Flag210 (Id);
1068 end Elaborate_Body_Desirable;
1070 function Elaboration_Entity (Id : E) return E is
1075 Ekind (Id) = E_Package
1077 Is_Generic_Unit (Id));
1079 end Elaboration_Entity;
1081 function Elaboration_Entity_Required (Id : E) return B is
1086 Ekind (Id) = E_Package
1088 Is_Generic_Unit (Id));
1089 return Flag174 (Id);
1090 end Elaboration_Entity_Required;
1092 function Encapsulating_State (Id : E) return N is
1094 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1096 end Encapsulating_State;
1098 function Enclosing_Scope (Id : E) return E is
1101 end Enclosing_Scope;
1103 function Entry_Accepted (Id : E) return B is
1105 pragma Assert (Is_Entry (Id));
1106 return Flag152 (Id);
1109 function Entry_Bodies_Array (Id : E) return E is
1112 end Entry_Bodies_Array;
1114 function Entry_Cancel_Parameter (Id : E) return E is
1117 end Entry_Cancel_Parameter;
1119 function Entry_Component (Id : E) return E is
1122 end Entry_Component;
1124 function Entry_Formal (Id : E) return E is
1129 function Entry_Index_Constant (Id : E) return N is
1131 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1133 end Entry_Index_Constant;
1135 function Contains_Ignored_Ghost_Code (Id : E) return B is
1138 (Ekind_In (Id, E_Block,
1142 E_Generic_Procedure,
1146 E_Subprogram_Body));
1147 return Flag279 (Id);
1148 end Contains_Ignored_Ghost_Code;
1150 function Contract (Id : E) return N is
1153 (Ekind_In (Id, E_Entry,
1160 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1164 function Entry_Parameters_Type (Id : E) return E is
1167 end Entry_Parameters_Type;
1169 function Enum_Pos_To_Rep (Id : E) return E is
1171 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1173 end Enum_Pos_To_Rep;
1175 function Enumeration_Pos (Id : E) return Uint is
1177 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1179 end Enumeration_Pos;
1181 function Enumeration_Rep (Id : E) return U is
1183 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1185 end Enumeration_Rep;
1187 function Enumeration_Rep_Expr (Id : E) return N is
1189 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1191 end Enumeration_Rep_Expr;
1193 function Equivalent_Type (Id : E) return E is
1196 (Ekind_In (Id, E_Class_Wide_Type,
1197 E_Class_Wide_Subtype,
1198 E_Access_Subprogram_Type,
1199 E_Access_Protected_Subprogram_Type,
1200 E_Anonymous_Access_Protected_Subprogram_Type,
1201 E_Access_Subprogram_Type,
1204 end Equivalent_Type;
1206 function Esize (Id : E) return Uint is
1211 function Extra_Accessibility (Id : E) return E is
1214 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1216 end Extra_Accessibility;
1218 function Extra_Accessibility_Of_Result (Id : E) return E is
1220 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1222 end Extra_Accessibility_Of_Result;
1224 function Extra_Constrained (Id : E) return E is
1226 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1228 end Extra_Constrained;
1230 function Extra_Formal (Id : E) return E is
1235 function Extra_Formals (Id : E) return E is
1238 (Is_Overloadable (Id)
1239 or else Ekind_In (Id, E_Entry_Family,
1241 E_Subprogram_Type));
1245 function Can_Use_Internal_Rep (Id : E) return B is
1247 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1248 return Flag229 (Base_Type (Id));
1249 end Can_Use_Internal_Rep;
1251 function Finalization_Master (Id : E) return E is
1253 pragma Assert (Is_Access_Type (Id));
1254 return Node23 (Root_Type (Id));
1255 end Finalization_Master;
1257 function Finalize_Storage_Only (Id : E) return B is
1259 pragma Assert (Is_Type (Id));
1260 return Flag158 (Base_Type (Id));
1261 end Finalize_Storage_Only;
1263 function Finalizer (Id : E) return E is
1265 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1269 function First_Entity (Id : E) return E is
1274 function First_Exit_Statement (Id : E) return N is
1276 pragma Assert (Ekind (Id) = E_Loop);
1278 end First_Exit_Statement;
1280 function First_Index (Id : E) return N is
1282 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1286 function First_Literal (Id : E) return E is
1288 pragma Assert (Is_Enumeration_Type (Id));
1292 function First_Private_Entity (Id : E) return E is
1294 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1295 or else Ekind (Id) in Concurrent_Kind);
1297 end First_Private_Entity;
1299 function First_Rep_Item (Id : E) return E is
1304 function Freeze_Node (Id : E) return N is
1309 function From_Limited_With (Id : E) return B is
1311 return Flag159 (Id);
1312 end From_Limited_With;
1314 function Full_View (Id : E) return E is
1316 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1320 function Generic_Homonym (Id : E) return E is
1322 pragma Assert (Ekind (Id) = E_Generic_Package);
1324 end Generic_Homonym;
1326 function Generic_Renamings (Id : E) return L is
1328 return Elist23 (Id);
1329 end Generic_Renamings;
1331 function Handler_Records (Id : E) return S is
1334 end Handler_Records;
1336 function Has_Aliased_Components (Id : E) return B is
1338 return Flag135 (Implementation_Base_Type (Id));
1339 end Has_Aliased_Components;
1341 function Has_Alignment_Clause (Id : E) return B is
1344 end Has_Alignment_Clause;
1346 function Has_All_Calls_Remote (Id : E) return B is
1349 end Has_All_Calls_Remote;
1351 function Has_Anonymous_Master (Id : E) return B is
1354 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1355 return Flag253 (Id);
1356 end Has_Anonymous_Master;
1358 function Has_Atomic_Components (Id : E) return B is
1360 return Flag86 (Implementation_Base_Type (Id));
1361 end Has_Atomic_Components;
1363 function Has_Biased_Representation (Id : E) return B is
1365 return Flag139 (Id);
1366 end Has_Biased_Representation;
1368 function Has_Completion (Id : E) return B is
1373 function Has_Completion_In_Body (Id : E) return B is
1375 pragma Assert (Is_Type (Id));
1377 end Has_Completion_In_Body;
1379 function Has_Complex_Representation (Id : E) return B is
1381 pragma Assert (Is_Type (Id));
1382 return Flag140 (Implementation_Base_Type (Id));
1383 end Has_Complex_Representation;
1385 function Has_Component_Size_Clause (Id : E) return B is
1387 pragma Assert (Is_Array_Type (Id));
1388 return Flag68 (Implementation_Base_Type (Id));
1389 end Has_Component_Size_Clause;
1391 function Has_Constrained_Partial_View (Id : E) return B is
1393 pragma Assert (Is_Type (Id));
1394 return Flag187 (Id);
1395 end Has_Constrained_Partial_View;
1397 function Has_Controlled_Component (Id : E) return B is
1399 return Flag43 (Base_Type (Id));
1400 end Has_Controlled_Component;
1402 function Has_Contiguous_Rep (Id : E) return B is
1404 return Flag181 (Id);
1405 end Has_Contiguous_Rep;
1407 function Has_Controlling_Result (Id : E) return B is
1410 end Has_Controlling_Result;
1412 function Has_Convention_Pragma (Id : E) return B is
1414 return Flag119 (Id);
1415 end Has_Convention_Pragma;
1417 function Has_Default_Aspect (Id : E) return B is
1419 return Flag39 (Base_Type (Id));
1420 end Has_Default_Aspect;
1422 function Has_Default_Init_Cond (Id : E) return B is
1425 end Has_Default_Init_Cond;
1427 function Has_Delayed_Aspects (Id : E) return B is
1429 pragma Assert (Nkind (Id) in N_Entity);
1430 return Flag200 (Id);
1431 end Has_Delayed_Aspects;
1433 function Has_Delayed_Freeze (Id : E) return B is
1435 pragma Assert (Nkind (Id) in N_Entity);
1437 end Has_Delayed_Freeze;
1439 function Has_Delayed_Rep_Aspects (Id : E) return B is
1441 pragma Assert (Nkind (Id) in N_Entity);
1442 return Flag261 (Id);
1443 end Has_Delayed_Rep_Aspects;
1445 function Has_Discriminants (Id : E) return B is
1447 pragma Assert (Nkind (Id) in N_Entity);
1449 end Has_Discriminants;
1451 function Has_Dispatch_Table (Id : E) return B is
1453 pragma Assert (Is_Tagged_Type (Id));
1454 return Flag220 (Id);
1455 end Has_Dispatch_Table;
1457 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1459 pragma Assert (Is_Type (Id));
1460 return Flag258 (Id);
1461 end Has_Dynamic_Predicate_Aspect;
1463 function Has_Enumeration_Rep_Clause (Id : E) return B is
1465 pragma Assert (Is_Enumeration_Type (Id));
1467 end Has_Enumeration_Rep_Clause;
1469 function Has_Exit (Id : E) return B is
1474 function Has_Expanded_Contract (Id : E) return B is
1476 pragma Assert (Is_Subprogram (Id));
1477 return Flag240 (Id);
1478 end Has_Expanded_Contract;
1480 function Has_Forward_Instantiation (Id : E) return B is
1482 return Flag175 (Id);
1483 end Has_Forward_Instantiation;
1485 function Has_Fully_Qualified_Name (Id : E) return B is
1487 return Flag173 (Id);
1488 end Has_Fully_Qualified_Name;
1490 function Has_Gigi_Rep_Item (Id : E) return B is
1493 end Has_Gigi_Rep_Item;
1495 function Has_Homonym (Id : E) return B is
1500 function Has_Implicit_Dereference (Id : E) return B is
1502 return Flag251 (Id);
1503 end Has_Implicit_Dereference;
1505 function Has_Independent_Components (Id : E) return B is
1507 return Flag34 (Implementation_Base_Type (Id));
1508 end Has_Independent_Components;
1510 function Has_Inheritable_Invariants (Id : E) return B is
1512 pragma Assert (Is_Type (Id));
1513 return Flag248 (Id);
1514 end Has_Inheritable_Invariants;
1516 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1518 pragma Assert (Is_Type (Id));
1519 return Flag133 (Id);
1520 end Has_Inherited_Default_Init_Cond;
1522 function Has_Initial_Value (Id : E) return B is
1524 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1525 return Flag219 (Id);
1526 end Has_Initial_Value;
1528 function Has_Invariants (Id : E) return B is
1530 pragma Assert (Is_Type (Id));
1531 return Flag232 (Id);
1534 function Has_Loop_Entry_Attributes (Id : E) return B is
1536 pragma Assert (Ekind (Id) = E_Loop);
1537 return Flag260 (Id);
1538 end Has_Loop_Entry_Attributes;
1540 function Has_Machine_Radix_Clause (Id : E) return B is
1542 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1544 end Has_Machine_Radix_Clause;
1546 function Has_Master_Entity (Id : E) return B is
1549 end Has_Master_Entity;
1551 function Has_Missing_Return (Id : E) return B is
1553 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1554 return Flag142 (Id);
1555 end Has_Missing_Return;
1557 function Has_Nested_Block_With_Handler (Id : E) return B is
1559 return Flag101 (Id);
1560 end Has_Nested_Block_With_Handler;
1562 function Has_Nested_Subprogram (Id : E) return B is
1564 pragma Assert (Is_Subprogram (Id));
1565 return Flag282 (Id);
1566 end Has_Nested_Subprogram;
1568 function Has_Non_Standard_Rep (Id : E) return B is
1570 return Flag75 (Implementation_Base_Type (Id));
1571 end Has_Non_Standard_Rep;
1573 function Has_Object_Size_Clause (Id : E) return B is
1575 pragma Assert (Is_Type (Id));
1576 return Flag172 (Id);
1577 end Has_Object_Size_Clause;
1579 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1581 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1582 return Flag110 (Id);
1583 end Has_Out_Or_In_Out_Parameter;
1585 function Has_Per_Object_Constraint (Id : E) return B is
1587 return Flag154 (Id);
1588 end Has_Per_Object_Constraint;
1590 function Has_Pragma_Controlled (Id : E) return B is
1592 pragma Assert (Is_Access_Type (Id));
1593 return Flag27 (Implementation_Base_Type (Id));
1594 end Has_Pragma_Controlled;
1596 function Has_Pragma_Elaborate_Body (Id : E) return B is
1598 return Flag150 (Id);
1599 end Has_Pragma_Elaborate_Body;
1601 function Has_Pragma_Inline (Id : E) return B is
1603 return Flag157 (Id);
1604 end Has_Pragma_Inline;
1606 function Has_Pragma_Inline_Always (Id : E) return B is
1608 return Flag230 (Id);
1609 end Has_Pragma_Inline_Always;
1611 function Has_Pragma_No_Inline (Id : E) return B is
1613 return Flag201 (Id);
1614 end Has_Pragma_No_Inline;
1616 function Has_Pragma_Ordered (Id : E) return B is
1618 pragma Assert (Is_Enumeration_Type (Id));
1619 return Flag198 (Implementation_Base_Type (Id));
1620 end Has_Pragma_Ordered;
1622 function Has_Pragma_Pack (Id : E) return B is
1624 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1625 return Flag121 (Implementation_Base_Type (Id));
1626 end Has_Pragma_Pack;
1628 function Has_Pragma_Preelab_Init (Id : E) return B is
1630 return Flag221 (Id);
1631 end Has_Pragma_Preelab_Init;
1633 function Has_Pragma_Pure (Id : E) return B is
1635 return Flag203 (Id);
1636 end Has_Pragma_Pure;
1638 function Has_Pragma_Pure_Function (Id : E) return B is
1640 return Flag179 (Id);
1641 end Has_Pragma_Pure_Function;
1643 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1645 return Flag169 (Id);
1646 end Has_Pragma_Thread_Local_Storage;
1648 function Has_Pragma_Unmodified (Id : E) return B is
1650 return Flag233 (Id);
1651 end Has_Pragma_Unmodified;
1653 function Has_Pragma_Unreferenced (Id : E) return B is
1655 return Flag180 (Id);
1656 end Has_Pragma_Unreferenced;
1658 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1660 pragma Assert (Is_Type (Id));
1661 return Flag212 (Id);
1662 end Has_Pragma_Unreferenced_Objects;
1664 function Has_Predicates (Id : E) return B is
1666 pragma Assert (Is_Type (Id));
1667 return Flag250 (Id);
1670 function Has_Primitive_Operations (Id : E) return B is
1672 pragma Assert (Is_Type (Id));
1673 return Flag120 (Base_Type (Id));
1674 end Has_Primitive_Operations;
1676 function Has_Private_Ancestor (Id : E) return B is
1678 return Flag151 (Id);
1679 end Has_Private_Ancestor;
1681 function Has_Private_Declaration (Id : E) return B is
1683 return Flag155 (Id);
1684 end Has_Private_Declaration;
1686 function Has_Protected (Id : E) return B is
1688 return Flag271 (Base_Type (Id));
1691 function Has_Qualified_Name (Id : E) return B is
1693 return Flag161 (Id);
1694 end Has_Qualified_Name;
1696 function Has_RACW (Id : E) return B is
1698 pragma Assert (Ekind (Id) = E_Package);
1699 return Flag214 (Id);
1702 function Has_Record_Rep_Clause (Id : E) return B is
1704 pragma Assert (Is_Record_Type (Id));
1705 return Flag65 (Implementation_Base_Type (Id));
1706 end Has_Record_Rep_Clause;
1708 function Has_Recursive_Call (Id : E) return B is
1710 pragma Assert (Is_Subprogram (Id));
1711 return Flag143 (Id);
1712 end Has_Recursive_Call;
1714 function Has_Shift_Operator (Id : E) return B is
1716 pragma Assert (Is_Integer_Type (Id));
1717 return Flag267 (Base_Type (Id));
1718 end Has_Shift_Operator;
1720 function Has_Size_Clause (Id : E) return B is
1723 end Has_Size_Clause;
1725 function Has_Small_Clause (Id : E) return B is
1728 end Has_Small_Clause;
1730 function Has_Specified_Layout (Id : E) return B is
1732 pragma Assert (Is_Type (Id));
1733 return Flag100 (Implementation_Base_Type (Id));
1734 end Has_Specified_Layout;
1736 function Has_Specified_Stream_Input (Id : E) return B is
1738 pragma Assert (Is_Type (Id));
1739 return Flag190 (Id);
1740 end Has_Specified_Stream_Input;
1742 function Has_Specified_Stream_Output (Id : E) return B is
1744 pragma Assert (Is_Type (Id));
1745 return Flag191 (Id);
1746 end Has_Specified_Stream_Output;
1748 function Has_Specified_Stream_Read (Id : E) return B is
1750 pragma Assert (Is_Type (Id));
1751 return Flag192 (Id);
1752 end Has_Specified_Stream_Read;
1754 function Has_Specified_Stream_Write (Id : E) return B is
1756 pragma Assert (Is_Type (Id));
1757 return Flag193 (Id);
1758 end Has_Specified_Stream_Write;
1760 function Has_Static_Discriminants (Id : E) return B is
1762 pragma Assert (Is_Type (Id));
1763 return Flag211 (Id);
1764 end Has_Static_Discriminants;
1766 function Has_Static_Predicate (Id : E) return B is
1768 pragma Assert (Is_Type (Id));
1769 return Flag269 (Id);
1770 end Has_Static_Predicate;
1772 function Has_Static_Predicate_Aspect (Id : E) return B is
1774 pragma Assert (Is_Type (Id));
1775 return Flag259 (Id);
1776 end Has_Static_Predicate_Aspect;
1778 function Has_Storage_Size_Clause (Id : E) return B is
1780 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1781 return Flag23 (Implementation_Base_Type (Id));
1782 end Has_Storage_Size_Clause;
1784 function Has_Stream_Size_Clause (Id : E) return B is
1786 return Flag184 (Id);
1787 end Has_Stream_Size_Clause;
1789 function Has_Task (Id : E) return B is
1791 return Flag30 (Base_Type (Id));
1794 function Has_Thunks (Id : E) return B is
1796 return Flag228 (Id);
1799 function Has_Unchecked_Union (Id : E) return B is
1801 return Flag123 (Base_Type (Id));
1802 end Has_Unchecked_Union;
1804 function Has_Unknown_Discriminants (Id : E) return B is
1806 pragma Assert (Is_Type (Id));
1808 end Has_Unknown_Discriminants;
1810 function Has_Uplevel_Reference (Id : E) return B is
1812 return Flag215 (Id);
1813 end Has_Uplevel_Reference;
1815 function Has_Visible_Refinement (Id : E) return B is
1817 pragma Assert (Ekind (Id) = E_Abstract_State);
1818 return Flag263 (Id);
1819 end Has_Visible_Refinement;
1821 function Has_Volatile_Components (Id : E) return B is
1823 return Flag87 (Implementation_Base_Type (Id));
1824 end Has_Volatile_Components;
1826 function Has_Xref_Entry (Id : E) return B is
1828 return Flag182 (Id);
1831 function Hiding_Loop_Variable (Id : E) return E is
1833 pragma Assert (Ekind (Id) = E_Variable);
1835 end Hiding_Loop_Variable;
1837 function Homonym (Id : E) return E is
1842 function Import_Pragma (Id : E) return E is
1844 pragma Assert (Is_Subprogram (Id));
1848 function Interface_Alias (Id : E) return E is
1850 pragma Assert (Is_Subprogram (Id));
1852 end Interface_Alias;
1854 function Interfaces (Id : E) return L is
1856 pragma Assert (Is_Record_Type (Id));
1857 return Elist25 (Id);
1860 function In_Package_Body (Id : E) return B is
1863 end In_Package_Body;
1865 function In_Private_Part (Id : E) return B is
1868 end In_Private_Part;
1870 function In_Use (Id : E) return B is
1872 pragma Assert (Nkind (Id) in N_Entity);
1876 function Initialization_Statements (Id : E) return N is
1878 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1880 end Initialization_Statements;
1882 function Inner_Instances (Id : E) return L is
1884 return Elist23 (Id);
1885 end Inner_Instances;
1887 function Interface_Name (Id : E) return N is
1892 function Is_Abstract_Subprogram (Id : E) return B is
1894 pragma Assert (Is_Overloadable (Id));
1896 end Is_Abstract_Subprogram;
1898 function Is_Abstract_Type (Id : E) return B is
1900 pragma Assert (Is_Type (Id));
1901 return Flag146 (Id);
1902 end Is_Abstract_Type;
1904 function Is_Local_Anonymous_Access (Id : E) return B is
1906 pragma Assert (Is_Access_Type (Id));
1907 return Flag194 (Id);
1908 end Is_Local_Anonymous_Access;
1910 function Is_Access_Constant (Id : E) return B is
1912 pragma Assert (Is_Access_Type (Id));
1914 end Is_Access_Constant;
1916 function Is_Ada_2005_Only (Id : E) return B is
1918 return Flag185 (Id);
1919 end Is_Ada_2005_Only;
1921 function Is_Ada_2012_Only (Id : E) return B is
1923 return Flag199 (Id);
1924 end Is_Ada_2012_Only;
1926 function Is_Aliased (Id : E) return B is
1928 pragma Assert (Nkind (Id) in N_Entity);
1932 function Is_Asynchronous (Id : E) return B is
1934 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1936 end Is_Asynchronous;
1938 function Is_Atomic (Id : E) return B is
1943 function Is_Bit_Packed_Array (Id : E) return B is
1945 return Flag122 (Implementation_Base_Type (Id));
1946 end Is_Bit_Packed_Array;
1948 function Is_Called (Id : E) return B is
1950 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1951 return Flag102 (Id);
1954 function Is_Character_Type (Id : E) return B is
1957 end Is_Character_Type;
1959 function Is_Checked_Ghost_Entity (Id : E) return B is
1961 pragma Assert (Nkind (Id) in N_Entity);
1962 return Flag277 (Id);
1963 end Is_Checked_Ghost_Entity;
1965 function Is_Child_Unit (Id : E) return B is
1970 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1973 end Is_Class_Wide_Equivalent_Type;
1975 function Is_Compilation_Unit (Id : E) return B is
1977 return Flag149 (Id);
1978 end Is_Compilation_Unit;
1980 function Is_Completely_Hidden (Id : E) return B is
1982 pragma Assert (Ekind (Id) = E_Discriminant);
1983 return Flag103 (Id);
1984 end Is_Completely_Hidden;
1986 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1989 end Is_Constr_Subt_For_U_Nominal;
1991 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1993 return Flag141 (Id);
1994 end Is_Constr_Subt_For_UN_Aliased;
1996 function Is_Constrained (Id : E) return B is
1998 pragma Assert (Nkind (Id) in N_Entity);
2002 function Is_Constructor (Id : E) return B is
2007 function Is_Controlled (Id : E) return B is
2009 return Flag42 (Base_Type (Id));
2012 function Is_Controlling_Formal (Id : E) return B is
2014 pragma Assert (Is_Formal (Id));
2016 end Is_Controlling_Formal;
2018 function Is_CPP_Class (Id : E) return B is
2023 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2025 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2026 return Flag132 (Id);
2027 end Is_Default_Init_Cond_Procedure;
2029 function Is_Descendent_Of_Address (Id : E) return B is
2031 return Flag223 (Id);
2032 end Is_Descendent_Of_Address;
2034 function Is_Discrim_SO_Function (Id : E) return B is
2036 return Flag176 (Id);
2037 end Is_Discrim_SO_Function;
2039 function Is_Discriminant_Check_Function (Id : E) return B is
2041 return Flag264 (Id);
2042 end Is_Discriminant_Check_Function;
2044 function Is_Dispatch_Table_Entity (Id : E) return B is
2046 return Flag234 (Id);
2047 end Is_Dispatch_Table_Entity;
2049 function Is_Dispatching_Operation (Id : E) return B is
2051 pragma Assert (Nkind (Id) in N_Entity);
2053 end Is_Dispatching_Operation;
2055 function Is_Eliminated (Id : E) return B is
2057 return Flag124 (Id);
2060 function Is_Entry_Formal (Id : E) return B is
2063 end Is_Entry_Formal;
2065 function Is_Exported (Id : E) return B is
2070 function Is_First_Subtype (Id : E) return B is
2073 end Is_First_Subtype;
2075 function Is_For_Access_Subtype (Id : E) return B is
2077 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2078 return Flag118 (Id);
2079 end Is_For_Access_Subtype;
2081 function Is_Formal_Subprogram (Id : E) return B is
2083 return Flag111 (Id);
2084 end Is_Formal_Subprogram;
2086 function Is_Frozen (Id : E) return B is
2091 function Is_Generic_Actual_Subprogram (Id : E) return B is
2093 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2094 return Flag274 (Id);
2095 end Is_Generic_Actual_Subprogram;
2097 function Is_Generic_Actual_Type (Id : E) return B is
2099 pragma Assert (Is_Type (Id));
2101 end Is_Generic_Actual_Type;
2103 function Is_Generic_Instance (Id : E) return B is
2105 return Flag130 (Id);
2106 end Is_Generic_Instance;
2108 function Is_Generic_Type (Id : E) return B is
2110 pragma Assert (Nkind (Id) in N_Entity);
2112 end Is_Generic_Type;
2114 function Is_Hidden (Id : E) return B is
2119 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2122 end Is_Hidden_Non_Overridden_Subpgm;
2124 function Is_Hidden_Open_Scope (Id : E) return B is
2126 return Flag171 (Id);
2127 end Is_Hidden_Open_Scope;
2129 function Is_Ignored_Ghost_Entity (Id : E) return B is
2131 pragma Assert (Nkind (Id) in N_Entity);
2132 return Flag278 (Id);
2133 end Is_Ignored_Ghost_Entity;
2135 function Is_Immediately_Visible (Id : E) return B is
2137 pragma Assert (Nkind (Id) in N_Entity);
2139 end Is_Immediately_Visible;
2141 function Is_Implementation_Defined (Id : E) return B is
2143 return Flag254 (Id);
2144 end Is_Implementation_Defined;
2146 function Is_Imported (Id : E) return B is
2151 function Is_Independent (Id : E) return B is
2153 return Flag268 (Id);
2156 function Is_Inlined (Id : E) return B is
2161 function Is_Inlined_Always (Id : E) return B is
2163 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2165 end Is_Inlined_Always;
2167 function Is_Interface (Id : E) return B is
2169 return Flag186 (Id);
2172 function Is_Instantiated (Id : E) return B is
2174 return Flag126 (Id);
2175 end Is_Instantiated;
2177 function Is_Internal (Id : E) return B is
2179 pragma Assert (Nkind (Id) in N_Entity);
2183 function Is_Interrupt_Handler (Id : E) return B is
2185 pragma Assert (Nkind (Id) in N_Entity);
2187 end Is_Interrupt_Handler;
2189 function Is_Intrinsic_Subprogram (Id : E) return B is
2192 end Is_Intrinsic_Subprogram;
2194 function Is_Invariant_Procedure (Id : E) return B is
2196 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2197 return Flag257 (Id);
2198 end Is_Invariant_Procedure;
2200 function Is_Itype (Id : E) return B is
2205 function Is_Known_Non_Null (Id : E) return B is
2208 end Is_Known_Non_Null;
2210 function Is_Known_Null (Id : E) return B is
2212 return Flag204 (Id);
2215 function Is_Known_Valid (Id : E) return B is
2217 return Flag170 (Id);
2220 function Is_Limited_Composite (Id : E) return B is
2222 return Flag106 (Id);
2223 end Is_Limited_Composite;
2225 function Is_Limited_Interface (Id : E) return B is
2227 return Flag197 (Id);
2228 end Is_Limited_Interface;
2230 function Is_Limited_Record (Id : E) return B is
2233 end Is_Limited_Record;
2235 function Is_Machine_Code_Subprogram (Id : E) return B is
2237 pragma Assert (Is_Subprogram (Id));
2238 return Flag137 (Id);
2239 end Is_Machine_Code_Subprogram;
2241 function Is_Non_Static_Subtype (Id : E) return B is
2243 pragma Assert (Is_Type (Id));
2244 return Flag109 (Id);
2245 end Is_Non_Static_Subtype;
2247 function Is_Null_Init_Proc (Id : E) return B is
2249 pragma Assert (Ekind (Id) = E_Procedure);
2250 return Flag178 (Id);
2251 end Is_Null_Init_Proc;
2253 function Is_Obsolescent (Id : E) return B is
2255 return Flag153 (Id);
2258 function Is_Only_Out_Parameter (Id : E) return B is
2260 pragma Assert (Is_Formal (Id));
2261 return Flag226 (Id);
2262 end Is_Only_Out_Parameter;
2264 function Is_Package_Body_Entity (Id : E) return B is
2266 return Flag160 (Id);
2267 end Is_Package_Body_Entity;
2269 function Is_Packed (Id : E) return B is
2271 return Flag51 (Implementation_Base_Type (Id));
2274 function Is_Packed_Array_Impl_Type (Id : E) return B is
2276 return Flag138 (Id);
2277 end Is_Packed_Array_Impl_Type;
2279 function Is_Potentially_Use_Visible (Id : E) return B is
2281 pragma Assert (Nkind (Id) in N_Entity);
2283 end Is_Potentially_Use_Visible;
2285 function Is_Predicate_Function (Id : E) return B is
2287 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2288 return Flag255 (Id);
2289 end Is_Predicate_Function;
2291 function Is_Predicate_Function_M (Id : E) return B is
2293 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2294 return Flag256 (Id);
2295 end Is_Predicate_Function_M;
2297 function Is_Preelaborated (Id : E) return B is
2300 end Is_Preelaborated;
2302 function Is_Primitive (Id : E) return B is
2305 (Is_Overloadable (Id)
2306 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2307 return Flag218 (Id);
2310 function Is_Primitive_Wrapper (Id : E) return B is
2312 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2313 return Flag195 (Id);
2314 end Is_Primitive_Wrapper;
2316 function Is_Private_Composite (Id : E) return B is
2318 pragma Assert (Is_Type (Id));
2319 return Flag107 (Id);
2320 end Is_Private_Composite;
2322 function Is_Private_Descendant (Id : E) return B is
2325 end Is_Private_Descendant;
2327 function Is_Private_Primitive (Id : E) return B is
2329 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2330 return Flag245 (Id);
2331 end Is_Private_Primitive;
2333 function Is_Processed_Transient (Id : E) return B is
2335 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2336 return Flag252 (Id);
2337 end Is_Processed_Transient;
2339 function Is_Public (Id : E) return B is
2341 pragma Assert (Nkind (Id) in N_Entity);
2345 function Is_Pure (Id : E) return B is
2350 function Is_Pure_Unit_Access_Type (Id : E) return B is
2352 pragma Assert (Is_Access_Type (Id));
2353 return Flag189 (Id);
2354 end Is_Pure_Unit_Access_Type;
2356 function Is_RACW_Stub_Type (Id : E) return B is
2358 pragma Assert (Is_Type (Id));
2359 return Flag244 (Id);
2360 end Is_RACW_Stub_Type;
2362 function Is_Raised (Id : E) return B is
2364 pragma Assert (Ekind (Id) = E_Exception);
2365 return Flag224 (Id);
2368 function Is_Remote_Call_Interface (Id : E) return B is
2371 end Is_Remote_Call_Interface;
2373 function Is_Remote_Types (Id : E) return B is
2376 end Is_Remote_Types;
2378 function Is_Renaming_Of_Object (Id : E) return B is
2380 return Flag112 (Id);
2381 end Is_Renaming_Of_Object;
2383 function Is_Return_Object (Id : E) return B is
2385 return Flag209 (Id);
2386 end Is_Return_Object;
2388 function Is_Safe_To_Reevaluate (Id : E) return B is
2390 return Flag249 (Id);
2391 end Is_Safe_To_Reevaluate;
2393 function Is_Shared_Passive (Id : E) return B is
2396 end Is_Shared_Passive;
2398 function Is_Static_Type (Id : E) return B is
2400 pragma Assert (Is_Type (Id));
2401 return Flag281 (Id);
2404 function Is_Statically_Allocated (Id : E) return B is
2407 end Is_Statically_Allocated;
2409 function Is_Tag (Id : E) return B is
2411 pragma Assert (Nkind (Id) in N_Entity);
2415 function Is_Tagged_Type (Id : E) return B is
2420 function Is_Thunk (Id : E) return B is
2422 return Flag225 (Id);
2425 function Is_Trivial_Subprogram (Id : E) return B is
2427 return Flag235 (Id);
2428 end Is_Trivial_Subprogram;
2430 function Is_True_Constant (Id : E) return B is
2432 return Flag163 (Id);
2433 end Is_True_Constant;
2435 function Is_Unchecked_Union (Id : E) return B is
2437 return Flag117 (Implementation_Base_Type (Id));
2438 end Is_Unchecked_Union;
2440 function Is_Underlying_Record_View (Id : E) return B is
2442 return Flag246 (Id);
2443 end Is_Underlying_Record_View;
2445 function Is_Unsigned_Type (Id : E) return B is
2447 pragma Assert (Is_Type (Id));
2448 return Flag144 (Id);
2449 end Is_Unsigned_Type;
2451 function Is_Valued_Procedure (Id : E) return B is
2453 pragma Assert (Ekind (Id) = E_Procedure);
2454 return Flag127 (Id);
2455 end Is_Valued_Procedure;
2457 function Is_Visible_Formal (Id : E) return B is
2459 return Flag206 (Id);
2460 end Is_Visible_Formal;
2462 function Is_Visible_Lib_Unit (Id : E) return B is
2464 return Flag116 (Id);
2465 end Is_Visible_Lib_Unit;
2467 function Is_Volatile (Id : E) return B is
2469 pragma Assert (Nkind (Id) in N_Entity);
2471 if Is_Type (Id) then
2472 return Flag16 (Base_Type (Id));
2478 function Itype_Printed (Id : E) return B is
2480 pragma Assert (Is_Itype (Id));
2481 return Flag202 (Id);
2484 function Kill_Elaboration_Checks (Id : E) return B is
2487 end Kill_Elaboration_Checks;
2489 function Kill_Range_Checks (Id : E) return B is
2492 end Kill_Range_Checks;
2494 function Known_To_Have_Preelab_Init (Id : E) return B is
2496 pragma Assert (Is_Type (Id));
2497 return Flag207 (Id);
2498 end Known_To_Have_Preelab_Init;
2500 function Last_Aggregate_Assignment (Id : E) return N is
2502 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2504 end Last_Aggregate_Assignment;
2506 function Last_Assignment (Id : E) return N is
2508 pragma Assert (Is_Assignable (Id));
2510 end Last_Assignment;
2512 function Last_Entity (Id : E) return E is
2517 function Limited_View (Id : E) return E is
2519 pragma Assert (Ekind (Id) = E_Package);
2523 function Linker_Section_Pragma (Id : E) return N is
2526 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2528 end Linker_Section_Pragma;
2530 function Lit_Indexes (Id : E) return E is
2532 pragma Assert (Is_Enumeration_Type (Id));
2536 function Lit_Strings (Id : E) return E is
2538 pragma Assert (Is_Enumeration_Type (Id));
2542 function Low_Bound_Tested (Id : E) return B is
2544 return Flag205 (Id);
2545 end Low_Bound_Tested;
2547 function Machine_Radix_10 (Id : E) return B is
2549 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2551 end Machine_Radix_10;
2553 function Master_Id (Id : E) return E is
2555 pragma Assert (Is_Access_Type (Id));
2559 function Materialize_Entity (Id : E) return B is
2561 return Flag168 (Id);
2562 end Materialize_Entity;
2564 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2566 return Flag262 (Id);
2567 end May_Inherit_Delayed_Rep_Aspects;
2569 function Mechanism (Id : E) return M is
2571 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2572 return UI_To_Int (Uint8 (Id));
2575 function Modulus (Id : E) return Uint is
2577 pragma Assert (Is_Modular_Integer_Type (Id));
2578 return Uint17 (Base_Type (Id));
2581 function Must_Be_On_Byte_Boundary (Id : E) return B is
2583 pragma Assert (Is_Type (Id));
2584 return Flag183 (Id);
2585 end Must_Be_On_Byte_Boundary;
2587 function Must_Have_Preelab_Init (Id : E) return B is
2589 pragma Assert (Is_Type (Id));
2590 return Flag208 (Id);
2591 end Must_Have_Preelab_Init;
2593 function Needs_Debug_Info (Id : E) return B is
2595 return Flag147 (Id);
2596 end Needs_Debug_Info;
2598 function Needs_No_Actuals (Id : E) return B is
2601 (Is_Overloadable (Id)
2602 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2604 end Needs_No_Actuals;
2606 function Never_Set_In_Source (Id : E) return B is
2608 return Flag115 (Id);
2609 end Never_Set_In_Source;
2611 function Next_Inlined_Subprogram (Id : E) return E is
2614 end Next_Inlined_Subprogram;
2616 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2618 pragma Assert (Is_Discrete_Type (Id));
2619 return Flag276 (Id);
2620 end No_Dynamic_Predicate_On_Actual;
2622 function No_Pool_Assigned (Id : E) return B is
2624 pragma Assert (Is_Access_Type (Id));
2625 return Flag131 (Root_Type (Id));
2626 end No_Pool_Assigned;
2628 function No_Predicate_On_Actual (Id : E) return Boolean is
2630 pragma Assert (Is_Discrete_Type (Id));
2631 return Flag275 (Id);
2632 end No_Predicate_On_Actual;
2634 function No_Return (Id : E) return B is
2636 return Flag113 (Id);
2639 function No_Strict_Aliasing (Id : E) return B is
2641 pragma Assert (Is_Access_Type (Id));
2642 return Flag136 (Base_Type (Id));
2643 end No_Strict_Aliasing;
2645 function No_Tagged_Streams_Pragma (Id : E) return N is
2647 pragma Assert (Is_Tagged_Type (Id));
2649 end No_Tagged_Streams_Pragma;
2651 function Non_Binary_Modulus (Id : E) return B is
2653 pragma Assert (Is_Type (Id));
2654 return Flag58 (Base_Type (Id));
2655 end Non_Binary_Modulus;
2657 function Non_Limited_View (Id : E) return E is
2660 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2662 end Non_Limited_View;
2664 function Nonzero_Is_True (Id : E) return B is
2666 pragma Assert (Root_Type (Id) = Standard_Boolean);
2667 return Flag162 (Base_Type (Id));
2668 end Nonzero_Is_True;
2670 function Normalized_First_Bit (Id : E) return U is
2672 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2674 end Normalized_First_Bit;
2676 function Normalized_Position (Id : E) return U is
2678 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2680 end Normalized_Position;
2682 function Normalized_Position_Max (Id : E) return U is
2684 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2686 end Normalized_Position_Max;
2688 function OK_To_Rename (Id : E) return B is
2690 pragma Assert (Ekind (Id) = E_Variable);
2691 return Flag247 (Id);
2694 function OK_To_Reorder_Components (Id : E) return B is
2696 pragma Assert (Is_Record_Type (Id));
2697 return Flag239 (Base_Type (Id));
2698 end OK_To_Reorder_Components;
2700 function Optimize_Alignment_Space (Id : E) return B is
2703 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2704 return Flag241 (Id);
2705 end Optimize_Alignment_Space;
2707 function Optimize_Alignment_Time (Id : E) return B is
2710 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2711 return Flag242 (Id);
2712 end Optimize_Alignment_Time;
2714 function Original_Access_Type (Id : E) return E is
2716 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2718 end Original_Access_Type;
2720 function Original_Array_Type (Id : E) return E is
2722 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2724 end Original_Array_Type;
2726 function Original_Record_Component (Id : E) return E is
2728 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2730 end Original_Record_Component;
2732 function Overlays_Constant (Id : E) return B is
2734 return Flag243 (Id);
2735 end Overlays_Constant;
2737 function Overridden_Operation (Id : E) return E is
2740 end Overridden_Operation;
2742 function Package_Instantiation (Id : E) return N is
2744 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2746 end Package_Instantiation;
2748 function Packed_Array_Impl_Type (Id : E) return E is
2750 pragma Assert (Is_Array_Type (Id));
2752 end Packed_Array_Impl_Type;
2754 function Parent_Subtype (Id : E) return E is
2756 pragma Assert (Is_Record_Type (Id));
2757 return Node19 (Base_Type (Id));
2760 function Part_Of_Constituents (Id : E) return L is
2762 pragma Assert (Ekind (Id) = E_Abstract_State);
2764 end Part_Of_Constituents;
2766 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2768 pragma Assert (Is_Type (Id));
2769 return Flag280 (Id);
2770 end Partial_View_Has_Unknown_Discr;
2772 function Pending_Access_Types (Id : E) return L is
2774 pragma Assert (Is_Type (Id));
2775 return Elist15 (Id);
2776 end Pending_Access_Types;
2778 function Postconditions_Proc (Id : E) return E is
2780 pragma Assert (Ekind_In (Id, E_Entry,
2785 end Postconditions_Proc;
2787 function PPC_Wrapper (Id : E) return E is
2789 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2793 function Prival (Id : E) return E is
2795 pragma Assert (Is_Protected_Component (Id));
2799 function Prival_Link (Id : E) return E is
2801 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2805 function Private_Dependents (Id : E) return L is
2807 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2808 return Elist18 (Id);
2809 end Private_Dependents;
2811 function Private_View (Id : E) return N is
2813 pragma Assert (Is_Private_Type (Id));
2817 function Protected_Body_Subprogram (Id : E) return E is
2819 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2821 end Protected_Body_Subprogram;
2823 function Protected_Formal (Id : E) return E is
2825 pragma Assert (Is_Formal (Id));
2827 end Protected_Formal;
2829 function Protection_Object (Id : E) return E is
2832 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2834 end Protection_Object;
2836 function Reachable (Id : E) return B is
2841 function Referenced (Id : E) return B is
2843 return Flag156 (Id);
2846 function Referenced_As_LHS (Id : E) return B is
2849 end Referenced_As_LHS;
2851 function Referenced_As_Out_Parameter (Id : E) return B is
2853 return Flag227 (Id);
2854 end Referenced_As_Out_Parameter;
2856 function Refinement_Constituents (Id : E) return L is
2858 pragma Assert (Ekind (Id) = E_Abstract_State);
2860 end Refinement_Constituents;
2862 function Register_Exception_Call (Id : E) return N is
2864 pragma Assert (Ekind (Id) = E_Exception);
2866 end Register_Exception_Call;
2868 function Related_Array_Object (Id : E) return E is
2870 pragma Assert (Is_Array_Type (Id));
2872 end Related_Array_Object;
2874 function Related_Expression (Id : E) return N is
2876 pragma Assert (Ekind (Id) in Type_Kind
2877 or else Ekind_In (Id, E_Constant, E_Variable));
2879 end Related_Expression;
2881 function Related_Instance (Id : E) return E is
2883 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2885 end Related_Instance;
2887 function Related_Type (Id : E) return E is
2889 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2893 function Relative_Deadline_Variable (Id : E) return E is
2895 pragma Assert (Is_Task_Type (Id));
2896 return Node28 (Implementation_Base_Type (Id));
2897 end Relative_Deadline_Variable;
2899 function Renamed_Entity (Id : E) return N is
2904 function Renamed_In_Spec (Id : E) return B is
2906 pragma Assert (Ekind (Id) = E_Package);
2907 return Flag231 (Id);
2908 end Renamed_In_Spec;
2910 function Renamed_Object (Id : E) return N is
2915 function Renaming_Map (Id : E) return U is
2920 function Requires_Overriding (Id : E) return B is
2922 pragma Assert (Is_Overloadable (Id));
2923 return Flag213 (Id);
2924 end Requires_Overriding;
2926 function Return_Present (Id : E) return B is
2931 function Return_Applies_To (Id : E) return N is
2934 end Return_Applies_To;
2936 function Returns_By_Ref (Id : E) return B is
2941 function Returns_Limited_View (Id : E) return B is
2943 pragma Assert (Ekind (Id) = E_Function);
2944 return Flag134 (Id);
2945 end Returns_Limited_View;
2947 function Reverse_Bit_Order (Id : E) return B is
2949 pragma Assert (Is_Record_Type (Id));
2950 return Flag164 (Base_Type (Id));
2951 end Reverse_Bit_Order;
2953 function Reverse_Storage_Order (Id : E) return B is
2955 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2956 return Flag93 (Base_Type (Id));
2957 end Reverse_Storage_Order;
2959 function RM_Size (Id : E) return U is
2961 pragma Assert (Is_Type (Id));
2965 function Scalar_Range (Id : E) return N is
2970 function Scale_Value (Id : E) return U is
2975 function Scope_Depth_Value (Id : E) return U is
2978 end Scope_Depth_Value;
2980 function Sec_Stack_Needed_For_Return (Id : E) return B is
2982 return Flag167 (Id);
2983 end Sec_Stack_Needed_For_Return;
2985 function Shadow_Entities (Id : E) return S is
2987 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2989 end Shadow_Entities;
2991 function Shared_Var_Procs_Instance (Id : E) return E is
2993 pragma Assert (Ekind (Id) = E_Variable);
2995 end Shared_Var_Procs_Instance;
2997 function Size_Check_Code (Id : E) return N is
2999 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3001 end Size_Check_Code;
3003 function Size_Depends_On_Discriminant (Id : E) return B is
3005 return Flag177 (Id);
3006 end Size_Depends_On_Discriminant;
3008 function Size_Known_At_Compile_Time (Id : E) return B is
3011 end Size_Known_At_Compile_Time;
3013 function Small_Value (Id : E) return R is
3015 pragma Assert (Is_Fixed_Point_Type (Id));
3016 return Ureal21 (Id);
3019 function SPARK_Aux_Pragma (Id : E) return N is
3022 (Ekind_In (Id, E_Generic_Package, -- package variants
3026 end SPARK_Aux_Pragma;
3028 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3031 (Ekind_In (Id, E_Generic_Package, -- package variants
3034 return Flag266 (Id);
3035 end SPARK_Aux_Pragma_Inherited;
3037 function SPARK_Pragma (Id : E) return N is
3040 (Ekind_In (Id, E_Function, -- subprogram variants
3042 E_Generic_Procedure,
3046 Ekind_In (Id, E_Generic_Package, -- package variants
3052 function SPARK_Pragma_Inherited (Id : E) return B is
3055 (Ekind_In (Id, E_Function, -- subprogram variants
3057 E_Generic_Procedure,
3061 Ekind_In (Id, E_Generic_Package, -- package variants
3064 return Flag265 (Id);
3065 end SPARK_Pragma_Inherited;
3067 function Spec_Entity (Id : E) return E is
3069 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3073 function SSO_Set_High_By_Default (Id : E) return B is
3075 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3076 return Flag273 (Base_Type (Id));
3077 end SSO_Set_High_By_Default;
3079 function SSO_Set_Low_By_Default (Id : E) return B is
3081 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3082 return Flag272 (Base_Type (Id));
3083 end SSO_Set_Low_By_Default;
3085 function Static_Discrete_Predicate (Id : E) return S is
3087 pragma Assert (Is_Discrete_Type (Id));
3089 end Static_Discrete_Predicate;
3091 function Static_Real_Or_String_Predicate (Id : E) return N is
3093 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3095 end Static_Real_Or_String_Predicate;
3097 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3099 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3101 end Status_Flag_Or_Transient_Decl;
3103 function Storage_Size_Variable (Id : E) return E is
3105 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3106 return Node26 (Implementation_Base_Type (Id));
3107 end Storage_Size_Variable;
3109 function Static_Elaboration_Desired (Id : E) return B is
3111 pragma Assert (Ekind (Id) = E_Package);
3113 end Static_Elaboration_Desired;
3115 function Static_Initialization (Id : E) return N is
3118 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3120 end Static_Initialization;
3122 function Stored_Constraint (Id : E) return L is
3125 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3126 return Elist23 (Id);
3127 end Stored_Constraint;
3129 function Stores_Attribute_Old_Prefix (Id : E) return B is
3131 return Flag270 (Id);
3132 end Stores_Attribute_Old_Prefix;
3134 function Strict_Alignment (Id : E) return B is
3136 return Flag145 (Implementation_Base_Type (Id));
3137 end Strict_Alignment;
3139 function String_Literal_Length (Id : E) return U is
3142 end String_Literal_Length;
3144 function String_Literal_Low_Bound (Id : E) return N is
3147 end String_Literal_Low_Bound;
3149 function Subprograms_For_Type (Id : E) return E is
3151 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3153 end Subprograms_For_Type;
3155 function Subps_Index (Id : E) return U is
3157 pragma Assert (Is_Subprogram (Id));
3161 function Suppress_Elaboration_Warnings (Id : E) return B is
3163 return Flag148 (Id);
3164 end Suppress_Elaboration_Warnings;
3166 function Suppress_Initialization (Id : E) return B is
3168 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3169 return Flag105 (Id);
3170 end Suppress_Initialization;
3172 function Suppress_Style_Checks (Id : E) return B is
3174 return Flag165 (Id);
3175 end Suppress_Style_Checks;
3177 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3179 return Flag217 (Id);
3180 end Suppress_Value_Tracking_On_Call;
3182 function Task_Body_Procedure (Id : E) return N is
3184 pragma Assert (Ekind (Id) in Task_Kind);
3186 end Task_Body_Procedure;
3188 function Thunk_Entity (Id : E) return E is
3190 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3191 and then Is_Thunk (Id));
3195 function Treat_As_Volatile (Id : E) return B is
3198 end Treat_As_Volatile;
3200 function Underlying_Full_View (Id : E) return E is
3202 pragma Assert (Ekind (Id) in Private_Kind);
3204 end Underlying_Full_View;
3206 function Underlying_Record_View (Id : E) return E is
3209 end Underlying_Record_View;
3211 function Universal_Aliasing (Id : E) return B is
3213 pragma Assert (Is_Type (Id));
3214 return Flag216 (Implementation_Base_Type (Id));
3215 end Universal_Aliasing;
3217 function Unset_Reference (Id : E) return N is
3220 end Unset_Reference;
3222 function Uplevel_Reference_Noted (Id : E) return B is
3224 return Flag283 (Id);
3225 end Uplevel_Reference_Noted;
3227 function Uplevel_References (Id : E) return L is
3229 pragma Assert (Is_Subprogram (Id));
3230 return Elist24 (Id);
3231 end Uplevel_References;
3233 function Used_As_Generic_Actual (Id : E) return B is
3235 return Flag222 (Id);
3236 end Used_As_Generic_Actual;
3238 function Uses_Lock_Free (Id : E) return B is
3240 pragma Assert (Is_Protected_Type (Id));
3241 return Flag188 (Id);
3244 function Uses_Sec_Stack (Id : E) return B is
3249 function Warnings_Off (Id : E) return B is
3254 function Warnings_Off_Used (Id : E) return B is
3256 return Flag236 (Id);
3257 end Warnings_Off_Used;
3259 function Warnings_Off_Used_Unmodified (Id : E) return B is
3261 return Flag237 (Id);
3262 end Warnings_Off_Used_Unmodified;
3264 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3266 return Flag238 (Id);
3267 end Warnings_Off_Used_Unreferenced;
3269 function Wrapped_Entity (Id : E) return E is
3271 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3272 and then Is_Primitive_Wrapper (Id));
3276 function Was_Hidden (Id : E) return B is
3278 return Flag196 (Id);
3281 ------------------------------
3282 -- Classification Functions --
3283 ------------------------------
3285 function Is_Access_Type (Id : E) return B is
3287 return Ekind (Id) in Access_Kind;
3290 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3292 return Ekind (Id) in Access_Protected_Kind;
3293 end Is_Access_Protected_Subprogram_Type;
3295 function Is_Access_Subprogram_Type (Id : E) return B is
3297 return Ekind (Id) in Access_Subprogram_Kind;
3298 end Is_Access_Subprogram_Type;
3300 function Is_Aggregate_Type (Id : E) return B is
3302 return Ekind (Id) in Aggregate_Kind;
3303 end Is_Aggregate_Type;
3305 function Is_Array_Type (Id : E) return B is
3307 return Ekind (Id) in Array_Kind;
3310 function Is_Assignable (Id : E) return B is
3312 return Ekind (Id) in Assignable_Kind;
3315 function Is_Class_Wide_Type (Id : E) return B is
3317 return Ekind (Id) in Class_Wide_Kind;
3318 end Is_Class_Wide_Type;
3320 function Is_Composite_Type (Id : E) return B is
3322 return Ekind (Id) in Composite_Kind;
3323 end Is_Composite_Type;
3325 function Is_Concurrent_Body (Id : E) return B is
3327 return Ekind (Id) in
3328 Concurrent_Body_Kind;
3329 end Is_Concurrent_Body;
3331 function Is_Concurrent_Record_Type (Id : E) return B is
3334 end Is_Concurrent_Record_Type;
3336 function Is_Concurrent_Type (Id : E) return B is
3338 return Ekind (Id) in Concurrent_Kind;
3339 end Is_Concurrent_Type;
3341 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3343 return Ekind (Id) in
3344 Decimal_Fixed_Point_Kind;
3345 end Is_Decimal_Fixed_Point_Type;
3347 function Is_Digits_Type (Id : E) return B is
3349 return Ekind (Id) in Digits_Kind;
3352 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3354 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3355 end Is_Discrete_Or_Fixed_Point_Type;
3357 function Is_Discrete_Type (Id : E) return B is
3359 return Ekind (Id) in Discrete_Kind;
3360 end Is_Discrete_Type;
3362 function Is_Elementary_Type (Id : E) return B is
3364 return Ekind (Id) in Elementary_Kind;
3365 end Is_Elementary_Type;
3367 function Is_Entry (Id : E) return B is
3369 return Ekind (Id) in Entry_Kind;
3372 function Is_Enumeration_Type (Id : E) return B is
3374 return Ekind (Id) in
3376 end Is_Enumeration_Type;
3378 function Is_Fixed_Point_Type (Id : E) return B is
3380 return Ekind (Id) in
3382 end Is_Fixed_Point_Type;
3384 function Is_Floating_Point_Type (Id : E) return B is
3386 return Ekind (Id) in Float_Kind;
3387 end Is_Floating_Point_Type;
3389 function Is_Formal (Id : E) return B is
3391 return Ekind (Id) in Formal_Kind;
3394 function Is_Formal_Object (Id : E) return B is
3396 return Ekind (Id) in Formal_Object_Kind;
3397 end Is_Formal_Object;
3399 function Is_Generic_Subprogram (Id : E) return B is
3401 return Ekind (Id) in Generic_Subprogram_Kind;
3402 end Is_Generic_Subprogram;
3404 function Is_Generic_Unit (Id : E) return B is
3406 return Ekind (Id) in Generic_Unit_Kind;
3407 end Is_Generic_Unit;
3409 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3411 return Ekind (Id) in
3412 Incomplete_Or_Private_Kind;
3413 end Is_Incomplete_Or_Private_Type;
3415 function Is_Incomplete_Type (Id : E) return B is
3417 return Ekind (Id) in
3419 end Is_Incomplete_Type;
3421 function Is_Integer_Type (Id : E) return B is
3423 return Ekind (Id) in Integer_Kind;
3424 end Is_Integer_Type;
3426 function Is_Modular_Integer_Type (Id : E) return B is
3428 return Ekind (Id) in
3429 Modular_Integer_Kind;
3430 end Is_Modular_Integer_Type;
3432 function Is_Named_Number (Id : E) return B is
3434 return Ekind (Id) in Named_Kind;
3435 end Is_Named_Number;
3437 function Is_Numeric_Type (Id : E) return B is
3439 return Ekind (Id) in Numeric_Kind;
3440 end Is_Numeric_Type;
3442 function Is_Object (Id : E) return B is
3444 return Ekind (Id) in Object_Kind;
3447 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3449 return Ekind (Id) in
3450 Ordinary_Fixed_Point_Kind;
3451 end Is_Ordinary_Fixed_Point_Type;
3453 function Is_Overloadable (Id : E) return B is
3455 return Ekind (Id) in Overloadable_Kind;
3456 end Is_Overloadable;
3458 function Is_Private_Type (Id : E) return B is
3460 return Ekind (Id) in Private_Kind;
3461 end Is_Private_Type;
3463 function Is_Protected_Type (Id : E) return B is
3465 return Ekind (Id) in Protected_Kind;
3466 end Is_Protected_Type;
3468 function Is_Real_Type (Id : E) return B is
3470 return Ekind (Id) in Real_Kind;
3473 function Is_Record_Type (Id : E) return B is
3475 return Ekind (Id) in Record_Kind;
3478 function Is_Scalar_Type (Id : E) return B is
3480 return Ekind (Id) in Scalar_Kind;
3483 function Is_Signed_Integer_Type (Id : E) return B is
3485 return Ekind (Id) in Signed_Integer_Kind;
3486 end Is_Signed_Integer_Type;
3488 function Is_Subprogram (Id : E) return B is
3490 return Ekind (Id) in Subprogram_Kind;
3493 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3495 return Ekind (Id) in Subprogram_Kind
3497 Ekind (Id) in Generic_Subprogram_Kind;
3498 end Is_Subprogram_Or_Generic_Subprogram;
3500 function Is_Task_Type (Id : E) return B is
3502 return Ekind (Id) in Task_Kind;
3505 function Is_Type (Id : E) return B is
3507 return Ekind (Id) in Type_Kind;
3510 ------------------------------
3511 -- Attribute Set Procedures --
3512 ------------------------------
3514 -- Note: in many of these set procedures an "obvious" assertion is missing.
3515 -- The reason for this is that in many cases, a field is set before the
3516 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3517 -- it is possible to add assertions that specifically include the E_Void
3518 -- possibility, but in some cases, we just omit the assertions.
3520 procedure Set_Abstract_States (Id : E; V : L) is
3522 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3523 Set_Elist25 (Id, V);
3524 end Set_Abstract_States;
3526 procedure Set_Accept_Address (Id : E; V : L) is
3528 Set_Elist21 (Id, V);
3529 end Set_Accept_Address;
3531 procedure Set_Access_Disp_Table (Id : E; V : L) is
3533 pragma Assert (Ekind (Id) = E_Record_Type
3534 and then Id = Implementation_Base_Type (Id));
3535 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3536 Set_Elist16 (Id, V);
3537 end Set_Access_Disp_Table;
3539 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3542 end Set_Associated_Formal_Package;
3544 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3547 end Set_Associated_Node_For_Itype;
3549 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3551 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3553 end Set_Associated_Storage_Pool;
3555 procedure Set_Activation_Record_Component (Id : E; V : E) is
3557 pragma Assert (Ekind_In (Id, E_Constant,
3564 end Set_Activation_Record_Component;
3566 procedure Set_Actual_Subtype (Id : E; V : E) is
3569 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3570 or else Is_Formal (Id));
3572 end Set_Actual_Subtype;
3574 procedure Set_Address_Taken (Id : E; V : B := True) is
3576 Set_Flag104 (Id, V);
3577 end Set_Address_Taken;
3579 procedure Set_Alias (Id : E; V : E) is
3582 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3586 procedure Set_Alignment (Id : E; V : U) is
3588 pragma Assert (Is_Type (Id)
3589 or else Is_Formal (Id)
3590 or else Ekind_In (Id, E_Loop_Parameter,
3597 procedure Set_Barrier_Function (Id : E; V : N) is
3599 pragma Assert (Is_Entry (Id));
3601 end Set_Barrier_Function;
3603 procedure Set_Block_Node (Id : E; V : N) is
3605 pragma Assert (Ekind (Id) = E_Block);
3609 procedure Set_Body_Entity (Id : E; V : E) is
3611 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3613 end Set_Body_Entity;
3615 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3618 (Ekind (Id) = E_Package
3619 or else Is_Subprogram (Id)
3620 or else Is_Generic_Unit (Id));
3622 end Set_Body_Needed_For_SAL;
3624 procedure Set_Body_References (Id : E; V : L) is
3626 pragma Assert (Ekind (Id) = E_Abstract_State);
3627 Set_Elist16 (Id, V);
3628 end Set_Body_References;
3630 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3632 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3634 end Set_BIP_Initialization_Call;
3636 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3638 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3639 Set_Flag125 (Id, V);
3640 end Set_C_Pass_By_Copy;
3642 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3645 end Set_Can_Never_Be_Null;
3647 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3650 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3651 Set_Flag229 (Id, V);
3652 end Set_Can_Use_Internal_Rep;
3654 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3657 end Set_Checks_May_Be_Suppressed;
3659 procedure Set_Class_Wide_Type (Id : E; V : E) is
3661 pragma Assert (Is_Type (Id));
3663 end Set_Class_Wide_Type;
3665 procedure Set_Cloned_Subtype (Id : E; V : E) is
3667 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3669 end Set_Cloned_Subtype;
3671 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3673 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3675 end Set_Component_Bit_Offset;
3677 procedure Set_Component_Clause (Id : E; V : N) is
3679 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3681 end Set_Component_Clause;
3683 procedure Set_Component_Size (Id : E; V : U) is
3685 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3687 end Set_Component_Size;
3689 procedure Set_Component_Type (Id : E; V : E) is
3691 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3693 end Set_Component_Type;
3695 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3698 (Ekind_In (Id, E_Block,
3702 E_Generic_Procedure,
3706 E_Subprogram_Body));
3707 Set_Flag279 (Id, V);
3708 end Set_Contains_Ignored_Ghost_Code;
3710 procedure Set_Contract (Id : E; V : N) is
3713 (Ekind_In (Id, E_Entry,
3721 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3725 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3728 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3730 end Set_Corresponding_Concurrent_Type;
3732 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3734 pragma Assert (Ekind (Id) = E_Discriminant);
3736 end Set_Corresponding_Discriminant;
3738 procedure Set_Corresponding_Equality (Id : E; V : E) is
3741 (Ekind (Id) = E_Function
3742 and then not Comes_From_Source (Id)
3743 and then Chars (Id) = Name_Op_Ne);
3745 end Set_Corresponding_Equality;
3747 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3749 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3751 end Set_Corresponding_Protected_Entry;
3753 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3755 pragma Assert (Is_Concurrent_Type (Id));
3757 end Set_Corresponding_Record_Type;
3759 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3762 end Set_Corresponding_Remote_Type;
3764 procedure Set_Current_Use_Clause (Id : E; V : E) is
3766 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3768 end Set_Current_Use_Clause;
3770 procedure Set_Current_Value (Id : E; V : N) is
3772 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3774 end Set_Current_Value;
3776 procedure Set_CR_Discriminant (Id : E; V : E) is
3779 end Set_CR_Discriminant;
3781 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3783 Set_Flag166 (Id, V);
3784 end Set_Debug_Info_Off;
3786 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3789 end Set_Debug_Renaming_Link;
3791 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3793 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3795 end Set_Default_Aspect_Component_Value;
3797 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3799 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3801 end Set_Default_Aspect_Value;
3803 procedure Set_Default_Expr_Function (Id : E; V : E) is
3805 pragma Assert (Is_Formal (Id));
3807 end Set_Default_Expr_Function;
3809 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3811 Set_Flag108 (Id, V);
3812 end Set_Default_Expressions_Processed;
3814 procedure Set_Default_Value (Id : E; V : N) is
3816 pragma Assert (Is_Formal (Id));
3818 end Set_Default_Value;
3820 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3824 or else Is_Task_Type (Id)
3825 or else Ekind (Id) = E_Block);
3826 Set_Flag114 (Id, V);
3827 end Set_Delay_Cleanups;
3829 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3832 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3835 end Set_Delay_Subprogram_Descriptors;
3837 procedure Set_Delta_Value (Id : E; V : R) is
3839 pragma Assert (Is_Fixed_Point_Type (Id));
3840 Set_Ureal18 (Id, V);
3841 end Set_Delta_Value;
3843 procedure Set_Dependent_Instances (Id : E; V : L) is
3845 pragma Assert (Is_Generic_Instance (Id));
3847 end Set_Dependent_Instances;
3849 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3851 pragma Assert (Nkind (Id) in N_Entity);
3853 end Set_Depends_On_Private;
3855 procedure Set_Derived_Type_Link (Id : E; V : E) is
3857 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3859 end Set_Derived_Type_Link;
3861 procedure Set_Digits_Value (Id : E; V : U) is
3864 (Is_Floating_Point_Type (Id)
3865 or else Is_Decimal_Fixed_Point_Type (Id));
3867 end Set_Digits_Value;
3869 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3872 end Set_Directly_Designated_Type;
3874 procedure Set_Discard_Names (Id : E; V : B := True) is
3877 end Set_Discard_Names;
3879 procedure Set_Discriminal (Id : E; V : E) is
3881 pragma Assert (Ekind (Id) = E_Discriminant);
3883 end Set_Discriminal;
3885 procedure Set_Discriminal_Link (Id : E; V : E) is
3888 end Set_Discriminal_Link;
3890 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3892 pragma Assert (Ekind (Id) = E_Component);
3894 end Set_Discriminant_Checking_Func;
3896 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3898 pragma Assert (Nkind (Id) in N_Entity);
3899 Set_Elist21 (Id, V);
3900 end Set_Discriminant_Constraint;
3902 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3905 end Set_Discriminant_Default_Value;
3907 procedure Set_Discriminant_Number (Id : E; V : U) is
3910 end Set_Discriminant_Number;
3912 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3914 pragma Assert (Ekind (Id) = E_Record_Type
3915 and then Id = Implementation_Base_Type (Id));
3916 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3917 Set_Elist26 (Id, V);
3918 end Set_Dispatch_Table_Wrappers;
3920 procedure Set_DT_Entry_Count (Id : E; V : U) is
3922 pragma Assert (Ekind (Id) = E_Component);
3924 end Set_DT_Entry_Count;
3926 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3928 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3930 end Set_DT_Offset_To_Top_Func;
3932 procedure Set_DT_Position (Id : E; V : U) is
3934 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3936 end Set_DT_Position;
3938 procedure Set_DTC_Entity (Id : E; V : E) is
3940 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3944 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3946 pragma Assert (Ekind (Id) = E_Package);
3947 Set_Flag210 (Id, V);
3948 end Set_Elaborate_Body_Desirable;
3950 procedure Set_Elaboration_Entity (Id : E; V : E) is
3955 Ekind (Id) = E_Package
3957 Is_Generic_Unit (Id));
3959 end Set_Elaboration_Entity;
3961 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3966 Ekind (Id) = E_Package
3968 Is_Generic_Unit (Id));
3969 Set_Flag174 (Id, V);
3970 end Set_Elaboration_Entity_Required;
3972 procedure Set_Encapsulating_State (Id : E; V : E) is
3974 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3976 end Set_Encapsulating_State;
3978 procedure Set_Enclosing_Scope (Id : E; V : E) is
3981 end Set_Enclosing_Scope;
3983 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3985 pragma Assert (Is_Entry (Id));
3986 Set_Flag152 (Id, V);
3987 end Set_Entry_Accepted;
3989 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3992 end Set_Entry_Bodies_Array;
3994 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3997 end Set_Entry_Cancel_Parameter;
3999 procedure Set_Entry_Component (Id : E; V : E) is
4002 end Set_Entry_Component;
4004 procedure Set_Entry_Formal (Id : E; V : E) is
4007 end Set_Entry_Formal;
4009 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4011 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4013 end Set_Entry_Index_Constant;
4015 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4018 end Set_Entry_Parameters_Type;
4020 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4022 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4024 end Set_Enum_Pos_To_Rep;
4026 procedure Set_Enumeration_Pos (Id : E; V : U) is
4028 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4030 end Set_Enumeration_Pos;
4032 procedure Set_Enumeration_Rep (Id : E; V : U) is
4034 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4036 end Set_Enumeration_Rep;
4038 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4040 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4042 end Set_Enumeration_Rep_Expr;
4044 procedure Set_Equivalent_Type (Id : E; V : E) is
4047 (Ekind_In (Id, E_Class_Wide_Type,
4048 E_Class_Wide_Subtype,
4049 E_Access_Protected_Subprogram_Type,
4050 E_Anonymous_Access_Protected_Subprogram_Type,
4051 E_Access_Subprogram_Type,
4054 end Set_Equivalent_Type;
4056 procedure Set_Esize (Id : E; V : U) is
4061 procedure Set_Extra_Accessibility (Id : E; V : E) is
4064 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4066 end Set_Extra_Accessibility;
4068 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4070 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4072 end Set_Extra_Accessibility_Of_Result;
4074 procedure Set_Extra_Constrained (Id : E; V : E) is
4076 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4078 end Set_Extra_Constrained;
4080 procedure Set_Extra_Formal (Id : E; V : E) is
4083 end Set_Extra_Formal;
4085 procedure Set_Extra_Formals (Id : E; V : E) is
4088 (Is_Overloadable (Id)
4089 or else Ekind_In (Id, E_Entry_Family,
4091 E_Subprogram_Type));
4093 end Set_Extra_Formals;
4095 procedure Set_Finalization_Master (Id : E; V : E) is
4097 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4099 end Set_Finalization_Master;
4101 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4103 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4104 Set_Flag158 (Id, V);
4105 end Set_Finalize_Storage_Only;
4107 procedure Set_Finalizer (Id : E; V : E) is
4109 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4113 procedure Set_First_Entity (Id : E; V : E) is
4116 end Set_First_Entity;
4118 procedure Set_First_Exit_Statement (Id : E; V : N) is
4120 pragma Assert (Ekind (Id) = E_Loop);
4122 end Set_First_Exit_Statement;
4124 procedure Set_First_Index (Id : E; V : N) is
4126 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4128 end Set_First_Index;
4130 procedure Set_First_Literal (Id : E; V : E) is
4132 pragma Assert (Is_Enumeration_Type (Id));
4134 end Set_First_Literal;
4136 procedure Set_First_Private_Entity (Id : E; V : E) is
4138 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4139 or else Ekind (Id) in Concurrent_Kind);
4141 end Set_First_Private_Entity;
4143 procedure Set_First_Rep_Item (Id : E; V : N) is
4146 end Set_First_Rep_Item;
4148 procedure Set_Float_Rep (Id : E; V : F) is
4149 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4151 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4154 procedure Set_Freeze_Node (Id : E; V : N) is
4157 end Set_Freeze_Node;
4159 procedure Set_From_Limited_With (Id : E; V : B := True) is
4162 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4163 Set_Flag159 (Id, V);
4164 end Set_From_Limited_With;
4166 procedure Set_Full_View (Id : E; V : E) is
4168 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4172 procedure Set_Generic_Homonym (Id : E; V : E) is
4175 end Set_Generic_Homonym;
4177 procedure Set_Generic_Renamings (Id : E; V : L) is
4179 Set_Elist23 (Id, V);
4180 end Set_Generic_Renamings;
4182 procedure Set_Handler_Records (Id : E; V : S) is
4185 end Set_Handler_Records;
4187 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4189 pragma Assert (Id = Base_Type (Id));
4190 Set_Flag135 (Id, V);
4191 end Set_Has_Aliased_Components;
4193 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4196 end Set_Has_Alignment_Clause;
4198 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4201 end Set_Has_All_Calls_Remote;
4203 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4206 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4207 Set_Flag253 (Id, V);
4208 end Set_Has_Anonymous_Master;
4210 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4212 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4214 end Set_Has_Atomic_Components;
4216 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4219 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4220 Set_Flag139 (Id, V);
4221 end Set_Has_Biased_Representation;
4223 procedure Set_Has_Completion (Id : E; V : B := True) is
4226 end Set_Has_Completion;
4228 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4230 pragma Assert (Is_Type (Id));
4232 end Set_Has_Completion_In_Body;
4234 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4236 pragma Assert (Ekind (Id) = E_Record_Type);
4237 Set_Flag140 (Id, V);
4238 end Set_Has_Complex_Representation;
4240 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4242 pragma Assert (Ekind (Id) = E_Array_Type);
4244 end Set_Has_Component_Size_Clause;
4246 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4248 pragma Assert (Is_Type (Id));
4249 Set_Flag187 (Id, V);
4250 end Set_Has_Constrained_Partial_View;
4252 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4254 Set_Flag181 (Id, V);
4255 end Set_Has_Contiguous_Rep;
4257 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4259 pragma Assert (Id = Base_Type (Id));
4261 end Set_Has_Controlled_Component;
4263 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4266 end Set_Has_Controlling_Result;
4268 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4270 Set_Flag119 (Id, V);
4271 end Set_Has_Convention_Pragma;
4273 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4276 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4277 and then Is_Base_Type (Id));
4279 end Set_Has_Default_Aspect;
4281 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4283 pragma Assert (Is_Type (Id));
4285 end Set_Has_Default_Init_Cond;
4287 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4289 pragma Assert (Nkind (Id) in N_Entity);
4290 Set_Flag200 (Id, V);
4291 end Set_Has_Delayed_Aspects;
4293 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4295 pragma Assert (Nkind (Id) in N_Entity);
4297 end Set_Has_Delayed_Freeze;
4299 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4301 pragma Assert (Nkind (Id) in N_Entity);
4302 Set_Flag261 (Id, V);
4303 end Set_Has_Delayed_Rep_Aspects;
4305 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4307 pragma Assert (Nkind (Id) in N_Entity);
4309 end Set_Has_Discriminants;
4311 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4313 pragma Assert (Ekind (Id) = E_Record_Type
4314 and then Is_Tagged_Type (Id));
4315 Set_Flag220 (Id, V);
4316 end Set_Has_Dispatch_Table;
4318 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4320 pragma Assert (Is_Type (Id));
4321 Set_Flag258 (Id, V);
4322 end Set_Has_Dynamic_Predicate_Aspect;
4324 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4326 pragma Assert (Is_Enumeration_Type (Id));
4328 end Set_Has_Enumeration_Rep_Clause;
4330 procedure Set_Has_Exit (Id : E; V : B := True) is
4335 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4337 pragma Assert (Ekind_In (Id, E_Entry,
4341 Set_Flag240 (Id, V);
4342 end Set_Has_Expanded_Contract;
4344 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4346 Set_Flag175 (Id, V);
4347 end Set_Has_Forward_Instantiation;
4349 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4351 Set_Flag173 (Id, V);
4352 end Set_Has_Fully_Qualified_Name;
4354 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4357 end Set_Has_Gigi_Rep_Item;
4359 procedure Set_Has_Homonym (Id : E; V : B := True) is
4362 end Set_Has_Homonym;
4364 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4366 Set_Flag251 (Id, V);
4367 end Set_Has_Implicit_Dereference;
4369 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4371 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4373 end Set_Has_Independent_Components;
4375 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4377 pragma Assert (Is_Type (Id));
4378 Set_Flag248 (Id, V);
4379 end Set_Has_Inheritable_Invariants;
4381 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4383 pragma Assert (Is_Type (Id));
4384 Set_Flag133 (Id, V);
4385 end Set_Has_Inherited_Default_Init_Cond;
4387 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4389 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4390 Set_Flag219 (Id, V);
4391 end Set_Has_Initial_Value;
4393 procedure Set_Has_Invariants (Id : E; V : B := True) is
4395 pragma Assert (Is_Type (Id));
4396 Set_Flag232 (Id, V);
4397 end Set_Has_Invariants;
4399 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4401 pragma Assert (Ekind (Id) = E_Loop);
4402 Set_Flag260 (Id, V);
4403 end Set_Has_Loop_Entry_Attributes;
4405 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4407 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4409 end Set_Has_Machine_Radix_Clause;
4411 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4414 end Set_Has_Master_Entity;
4416 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4418 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4419 Set_Flag142 (Id, V);
4420 end Set_Has_Missing_Return;
4422 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4424 Set_Flag101 (Id, V);
4425 end Set_Has_Nested_Block_With_Handler;
4427 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4429 pragma Assert (Is_Subprogram (Id));
4430 Set_Flag282 (Id, V);
4431 end Set_Has_Nested_Subprogram;
4433 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4435 Set_Flag215 (Id, V);
4436 end Set_Has_Uplevel_Reference;
4438 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4440 pragma Assert (Id = Base_Type (Id));
4442 end Set_Has_Non_Standard_Rep;
4444 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4446 pragma Assert (Is_Type (Id));
4447 Set_Flag172 (Id, V);
4448 end Set_Has_Object_Size_Clause;
4450 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4452 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4453 Set_Flag110 (Id, V);
4454 end Set_Has_Out_Or_In_Out_Parameter;
4456 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4458 Set_Flag154 (Id, V);
4459 end Set_Has_Per_Object_Constraint;
4461 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4463 pragma Assert (Is_Access_Type (Id));
4464 Set_Flag27 (Base_Type (Id), V);
4465 end Set_Has_Pragma_Controlled;
4467 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4469 Set_Flag150 (Id, V);
4470 end Set_Has_Pragma_Elaborate_Body;
4472 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4474 Set_Flag157 (Id, V);
4475 end Set_Has_Pragma_Inline;
4477 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4479 Set_Flag230 (Id, V);
4480 end Set_Has_Pragma_Inline_Always;
4482 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4484 Set_Flag201 (Id, V);
4485 end Set_Has_Pragma_No_Inline;
4487 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4489 pragma Assert (Is_Enumeration_Type (Id));
4490 pragma Assert (Id = Base_Type (Id));
4491 Set_Flag198 (Id, V);
4492 end Set_Has_Pragma_Ordered;
4494 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4496 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4497 pragma Assert (Id = Base_Type (Id));
4498 Set_Flag121 (Id, V);
4499 end Set_Has_Pragma_Pack;
4501 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4503 Set_Flag221 (Id, V);
4504 end Set_Has_Pragma_Preelab_Init;
4506 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4508 Set_Flag203 (Id, V);
4509 end Set_Has_Pragma_Pure;
4511 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4513 Set_Flag179 (Id, V);
4514 end Set_Has_Pragma_Pure_Function;
4516 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4518 Set_Flag169 (Id, V);
4519 end Set_Has_Pragma_Thread_Local_Storage;
4521 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4523 Set_Flag233 (Id, V);
4524 end Set_Has_Pragma_Unmodified;
4526 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4528 Set_Flag180 (Id, V);
4529 end Set_Has_Pragma_Unreferenced;
4531 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4533 pragma Assert (Is_Type (Id));
4534 Set_Flag212 (Id, V);
4535 end Set_Has_Pragma_Unreferenced_Objects;
4537 procedure Set_Has_Predicates (Id : E; V : B := True) is
4539 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4540 Set_Flag250 (Id, V);
4541 end Set_Has_Predicates;
4543 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4545 pragma Assert (Id = Base_Type (Id));
4546 Set_Flag120 (Id, V);
4547 end Set_Has_Primitive_Operations;
4549 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4551 pragma Assert (Is_Type (Id));
4552 Set_Flag151 (Id, V);
4553 end Set_Has_Private_Ancestor;
4555 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4557 Set_Flag155 (Id, V);
4558 end Set_Has_Private_Declaration;
4560 procedure Set_Has_Protected (Id : E; V : B := True) is
4562 Set_Flag271 (Id, V);
4563 end Set_Has_Protected;
4565 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4567 Set_Flag161 (Id, V);
4568 end Set_Has_Qualified_Name;
4570 procedure Set_Has_RACW (Id : E; V : B := True) is
4572 pragma Assert (Ekind (Id) = E_Package);
4573 Set_Flag214 (Id, V);
4576 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4578 pragma Assert (Id = Base_Type (Id));
4580 end Set_Has_Record_Rep_Clause;
4582 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4584 pragma Assert (Is_Subprogram (Id));
4585 Set_Flag143 (Id, V);
4586 end Set_Has_Recursive_Call;
4588 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4590 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4591 Set_Flag267 (Id, V);
4592 end Set_Has_Shift_Operator;
4594 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4597 end Set_Has_Size_Clause;
4599 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4602 end Set_Has_Small_Clause;
4604 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4606 pragma Assert (Id = Base_Type (Id));
4607 Set_Flag100 (Id, V);
4608 end Set_Has_Specified_Layout;
4610 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4612 pragma Assert (Is_Type (Id));
4613 Set_Flag190 (Id, V);
4614 end Set_Has_Specified_Stream_Input;
4616 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4618 pragma Assert (Is_Type (Id));
4619 Set_Flag191 (Id, V);
4620 end Set_Has_Specified_Stream_Output;
4622 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4624 pragma Assert (Is_Type (Id));
4625 Set_Flag192 (Id, V);
4626 end Set_Has_Specified_Stream_Read;
4628 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4630 pragma Assert (Is_Type (Id));
4631 Set_Flag193 (Id, V);
4632 end Set_Has_Specified_Stream_Write;
4634 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4636 Set_Flag211 (Id, V);
4637 end Set_Has_Static_Discriminants;
4639 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4641 pragma Assert (Is_Type (Id));
4642 Set_Flag269 (Id, V);
4643 end Set_Has_Static_Predicate;
4645 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4647 pragma Assert (Is_Type (Id));
4648 Set_Flag259 (Id, V);
4649 end Set_Has_Static_Predicate_Aspect;
4651 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4653 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4654 pragma Assert (Id = Base_Type (Id));
4656 end Set_Has_Storage_Size_Clause;
4658 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4660 pragma Assert (Is_Elementary_Type (Id));
4661 Set_Flag184 (Id, V);
4662 end Set_Has_Stream_Size_Clause;
4664 procedure Set_Has_Task (Id : E; V : B := True) is
4666 pragma Assert (Id = Base_Type (Id));
4670 procedure Set_Has_Thunks (Id : E; V : B := True) is
4672 pragma Assert (Is_Tag (Id));
4673 Set_Flag228 (Id, V);
4676 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4678 pragma Assert (Id = Base_Type (Id));
4679 Set_Flag123 (Id, V);
4680 end Set_Has_Unchecked_Union;
4682 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4684 pragma Assert (Is_Type (Id));
4686 end Set_Has_Unknown_Discriminants;
4688 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4690 pragma Assert (Ekind (Id) = E_Abstract_State);
4691 Set_Flag263 (Id, V);
4692 end Set_Has_Visible_Refinement;
4694 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4696 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4698 end Set_Has_Volatile_Components;
4700 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4702 Set_Flag182 (Id, V);
4703 end Set_Has_Xref_Entry;
4705 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4707 pragma Assert (Ekind (Id) = E_Variable);
4709 end Set_Hiding_Loop_Variable;
4711 procedure Set_Homonym (Id : E; V : E) is
4713 pragma Assert (Id /= V);
4717 procedure Set_Import_Pragma (Id : E; V : E) is
4719 pragma Assert (Is_Subprogram (Id));
4721 end Set_Import_Pragma;
4723 procedure Set_Interface_Alias (Id : E; V : E) is
4727 and then Is_Hidden (Id)
4728 and then (Ekind_In (Id, E_Procedure, E_Function)));
4730 end Set_Interface_Alias;
4732 procedure Set_Interfaces (Id : E; V : L) is
4734 pragma Assert (Is_Record_Type (Id));
4735 Set_Elist25 (Id, V);
4738 procedure Set_In_Package_Body (Id : E; V : B := True) is
4741 end Set_In_Package_Body;
4743 procedure Set_In_Private_Part (Id : E; V : B := True) is
4746 end Set_In_Private_Part;
4748 procedure Set_In_Use (Id : E; V : B := True) is
4750 pragma Assert (Nkind (Id) in N_Entity);
4754 procedure Set_Initialization_Statements (Id : E; V : N) is
4756 -- Tolerate an E_Void entity since this can be called while resolving
4757 -- an aggregate used as the initialization expression for an object
4758 -- declaration, and this occurs before the Ekind for the object is set.
4760 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4762 end Set_Initialization_Statements;
4764 procedure Set_Inner_Instances (Id : E; V : L) is
4766 Set_Elist23 (Id, V);
4767 end Set_Inner_Instances;
4769 procedure Set_Interface_Name (Id : E; V : N) is
4772 end Set_Interface_Name;
4774 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4776 pragma Assert (Is_Overloadable (Id));
4778 end Set_Is_Abstract_Subprogram;
4780 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4782 pragma Assert (Is_Type (Id));
4783 Set_Flag146 (Id, V);
4784 end Set_Is_Abstract_Type;
4786 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4788 pragma Assert (Is_Access_Type (Id));
4789 Set_Flag194 (Id, V);
4790 end Set_Is_Local_Anonymous_Access;
4792 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4794 pragma Assert (Is_Access_Type (Id));
4796 end Set_Is_Access_Constant;
4798 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4800 Set_Flag185 (Id, V);
4801 end Set_Is_Ada_2005_Only;
4803 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4805 Set_Flag199 (Id, V);
4806 end Set_Is_Ada_2012_Only;
4808 procedure Set_Is_Aliased (Id : E; V : B := True) is
4810 pragma Assert (Nkind (Id) in N_Entity);
4814 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4817 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4819 end Set_Is_Asynchronous;
4821 procedure Set_Is_Atomic (Id : E; V : B := True) is
4826 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4828 pragma Assert ((not V)
4829 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4830 Set_Flag122 (Id, V);
4831 end Set_Is_Bit_Packed_Array;
4833 procedure Set_Is_Called (Id : E; V : B := True) is
4835 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4836 Set_Flag102 (Id, V);
4839 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4842 end Set_Is_Character_Type;
4844 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4846 pragma Assert (Is_Formal (Id)
4847 or else Is_Object (Id)
4848 or else Is_Package_Or_Generic_Package (Id)
4849 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4850 or else Is_Type (Id)
4851 or else Ekind (Id) = E_Abstract_State
4852 or else Ekind (Id) = E_Component
4853 or else Ekind (Id) = E_Discriminant
4854 or else Ekind (Id) = E_Exception
4855 or else Ekind (Id) = E_Package_Body
4856 or else Ekind (Id) = E_Subprogram_Body
4858 -- Allow this attribute to appear on non-analyzed entities
4860 or else Ekind (Id) = E_Void);
4861 Set_Flag277 (Id, V);
4862 end Set_Is_Checked_Ghost_Entity;
4864 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4867 end Set_Is_Child_Unit;
4869 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4872 end Set_Is_Class_Wide_Equivalent_Type;
4874 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4876 Set_Flag149 (Id, V);
4877 end Set_Is_Compilation_Unit;
4879 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4881 pragma Assert (Ekind (Id) = E_Discriminant);
4882 Set_Flag103 (Id, V);
4883 end Set_Is_Completely_Hidden;
4885 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4888 end Set_Is_Concurrent_Record_Type;
4890 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4893 end Set_Is_Constr_Subt_For_U_Nominal;
4895 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4897 Set_Flag141 (Id, V);
4898 end Set_Is_Constr_Subt_For_UN_Aliased;
4900 procedure Set_Is_Constrained (Id : E; V : B := True) is
4902 pragma Assert (Nkind (Id) in N_Entity);
4904 end Set_Is_Constrained;
4906 procedure Set_Is_Constructor (Id : E; V : B := True) is
4909 end Set_Is_Constructor;
4911 procedure Set_Is_Controlled (Id : E; V : B := True) is
4913 pragma Assert (Id = Base_Type (Id));
4915 end Set_Is_Controlled;
4917 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4919 pragma Assert (Is_Formal (Id));
4921 end Set_Is_Controlling_Formal;
4923 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4926 end Set_Is_CPP_Class;
4928 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4930 pragma Assert (Ekind (Id) = E_Procedure);
4931 Set_Flag132 (Id, V);
4932 end Set_Is_Default_Init_Cond_Procedure;
4934 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4936 pragma Assert (Is_Type (Id));
4937 Set_Flag223 (Id, V);
4938 end Set_Is_Descendent_Of_Address;
4940 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4942 Set_Flag176 (Id, V);
4943 end Set_Is_Discrim_SO_Function;
4945 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4947 Set_Flag264 (Id, V);
4948 end Set_Is_Discriminant_Check_Function;
4950 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4952 Set_Flag234 (Id, V);
4953 end Set_Is_Dispatch_Table_Entity;
4955 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4960 Is_Overloadable (Id)
4962 Ekind (Id) = E_Subprogram_Type);
4965 end Set_Is_Dispatching_Operation;
4967 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4969 Set_Flag124 (Id, V);
4970 end Set_Is_Eliminated;
4972 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4975 end Set_Is_Entry_Formal;
4977 procedure Set_Is_Exported (Id : E; V : B := True) is
4980 end Set_Is_Exported;
4982 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4985 end Set_Is_First_Subtype;
4987 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4989 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4990 Set_Flag118 (Id, V);
4991 end Set_Is_For_Access_Subtype;
4993 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4995 Set_Flag111 (Id, V);
4996 end Set_Is_Formal_Subprogram;
4998 procedure Set_Is_Frozen (Id : E; V : B := True) is
5000 pragma Assert (Nkind (Id) in N_Entity);
5004 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5006 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5007 Set_Flag274 (Id, V);
5008 end Set_Is_Generic_Actual_Subprogram;
5010 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5012 pragma Assert (Is_Type (Id));
5014 end Set_Is_Generic_Actual_Type;
5016 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5018 Set_Flag130 (Id, V);
5019 end Set_Is_Generic_Instance;
5021 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5023 pragma Assert (Nkind (Id) in N_Entity);
5025 end Set_Is_Generic_Type;
5027 procedure Set_Is_Hidden (Id : E; V : B := True) is
5032 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5034 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5036 end Set_Is_Hidden_Non_Overridden_Subpgm;
5038 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5040 Set_Flag171 (Id, V);
5041 end Set_Is_Hidden_Open_Scope;
5043 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5045 pragma Assert (Is_Formal (Id)
5046 or else Is_Object (Id)
5047 or else Is_Package_Or_Generic_Package (Id)
5048 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5049 or else Is_Type (Id)
5050 or else Ekind (Id) = E_Abstract_State
5051 or else Ekind (Id) = E_Component
5052 or else Ekind (Id) = E_Discriminant
5053 or else Ekind (Id) = E_Exception
5054 or else Ekind (Id) = E_Package_Body
5055 or else Ekind (Id) = E_Subprogram_Body
5057 -- Allow this attribute to appear on non-analyzed entities
5059 or else Ekind (Id) = E_Void);
5060 Set_Flag278 (Id, V);
5061 end Set_Is_Ignored_Ghost_Entity;
5063 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5065 pragma Assert (Nkind (Id) in N_Entity);
5067 end Set_Is_Immediately_Visible;
5069 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5071 Set_Flag254 (Id, V);
5072 end Set_Is_Implementation_Defined;
5074 procedure Set_Is_Imported (Id : E; V : B := True) is
5077 end Set_Is_Imported;
5079 procedure Set_Is_Independent (Id : E; V : B := True) is
5081 Set_Flag268 (Id, V);
5082 end Set_Is_Independent;
5084 procedure Set_Is_Inlined (Id : E; V : B := True) is
5089 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5091 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5093 end Set_Is_Inlined_Always;
5095 procedure Set_Is_Interface (Id : E; V : B := True) is
5097 pragma Assert (Is_Record_Type (Id));
5098 Set_Flag186 (Id, V);
5099 end Set_Is_Interface;
5101 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5103 Set_Flag126 (Id, V);
5104 end Set_Is_Instantiated;
5106 procedure Set_Is_Internal (Id : E; V : B := True) is
5108 pragma Assert (Nkind (Id) in N_Entity);
5110 end Set_Is_Internal;
5112 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5114 pragma Assert (Nkind (Id) in N_Entity);
5116 end Set_Is_Interrupt_Handler;
5118 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5121 end Set_Is_Intrinsic_Subprogram;
5123 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5125 pragma Assert (Ekind (Id) = E_Procedure);
5126 Set_Flag257 (Id, V);
5127 end Set_Is_Invariant_Procedure;
5129 procedure Set_Is_Itype (Id : E; V : B := True) is
5134 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5137 end Set_Is_Known_Non_Null;
5139 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5141 Set_Flag204 (Id, V);
5142 end Set_Is_Known_Null;
5144 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5146 Set_Flag170 (Id, V);
5147 end Set_Is_Known_Valid;
5149 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5151 pragma Assert (Is_Type (Id));
5152 Set_Flag106 (Id, V);
5153 end Set_Is_Limited_Composite;
5155 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5157 pragma Assert (Is_Interface (Id));
5158 Set_Flag197 (Id, V);
5159 end Set_Is_Limited_Interface;
5161 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5164 end Set_Is_Limited_Record;
5166 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5168 pragma Assert (Is_Subprogram (Id));
5169 Set_Flag137 (Id, V);
5170 end Set_Is_Machine_Code_Subprogram;
5172 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5174 pragma Assert (Is_Type (Id));
5175 Set_Flag109 (Id, V);
5176 end Set_Is_Non_Static_Subtype;
5178 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5180 pragma Assert (Ekind (Id) = E_Procedure);
5181 Set_Flag178 (Id, V);
5182 end Set_Is_Null_Init_Proc;
5184 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5186 Set_Flag153 (Id, V);
5187 end Set_Is_Obsolescent;
5189 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5191 pragma Assert (Ekind (Id) = E_Out_Parameter);
5192 Set_Flag226 (Id, V);
5193 end Set_Is_Only_Out_Parameter;
5195 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5197 Set_Flag160 (Id, V);
5198 end Set_Is_Package_Body_Entity;
5200 procedure Set_Is_Packed (Id : E; V : B := True) is
5202 pragma Assert (Id = Base_Type (Id));
5206 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5208 Set_Flag138 (Id, V);
5209 end Set_Is_Packed_Array_Impl_Type;
5211 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5213 pragma Assert (Nkind (Id) in N_Entity);
5215 end Set_Is_Potentially_Use_Visible;
5217 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5219 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5220 Set_Flag255 (Id, V);
5221 end Set_Is_Predicate_Function;
5223 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5225 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5226 Set_Flag256 (Id, V);
5227 end Set_Is_Predicate_Function_M;
5229 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5232 end Set_Is_Preelaborated;
5234 procedure Set_Is_Primitive (Id : E; V : B := True) is
5237 (Is_Overloadable (Id)
5238 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5239 Set_Flag218 (Id, V);
5240 end Set_Is_Primitive;
5242 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5244 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5245 Set_Flag195 (Id, V);
5246 end Set_Is_Primitive_Wrapper;
5248 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5250 pragma Assert (Is_Type (Id));
5251 Set_Flag107 (Id, V);
5252 end Set_Is_Private_Composite;
5254 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5257 end Set_Is_Private_Descendant;
5259 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5261 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5262 Set_Flag245 (Id, V);
5263 end Set_Is_Private_Primitive;
5265 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5267 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5268 Set_Flag252 (Id, V);
5269 end Set_Is_Processed_Transient;
5271 procedure Set_Is_Public (Id : E; V : B := True) is
5273 pragma Assert (Nkind (Id) in N_Entity);
5277 procedure Set_Is_Pure (Id : E; V : B := True) is
5282 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5284 pragma Assert (Is_Access_Type (Id));
5285 Set_Flag189 (Id, V);
5286 end Set_Is_Pure_Unit_Access_Type;
5288 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5290 pragma Assert (Is_Type (Id));
5291 Set_Flag244 (Id, V);
5292 end Set_Is_RACW_Stub_Type;
5294 procedure Set_Is_Raised (Id : E; V : B := True) is
5296 pragma Assert (Ekind (Id) = E_Exception);
5297 Set_Flag224 (Id, V);
5300 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5303 end Set_Is_Remote_Call_Interface;
5305 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5308 end Set_Is_Remote_Types;
5310 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5312 Set_Flag112 (Id, V);
5313 end Set_Is_Renaming_Of_Object;
5315 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5317 Set_Flag209 (Id, V);
5318 end Set_Is_Return_Object;
5320 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5322 pragma Assert (Ekind (Id) = E_Variable);
5323 Set_Flag249 (Id, V);
5324 end Set_Is_Safe_To_Reevaluate;
5326 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5329 end Set_Is_Shared_Passive;
5331 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5333 pragma Assert (Is_Type (Id));
5334 Set_Flag281 (Id, V);
5335 end Set_Is_Static_Type;
5337 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5341 or else Ekind_In (Id, E_Exception,
5346 end Set_Is_Statically_Allocated;
5348 procedure Set_Is_Tag (Id : E; V : B := True) is
5350 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5354 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5357 end Set_Is_Tagged_Type;
5359 procedure Set_Is_Thunk (Id : E; V : B := True) is
5361 pragma Assert (Is_Subprogram (Id));
5362 Set_Flag225 (Id, V);
5365 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5367 Set_Flag235 (Id, V);
5368 end Set_Is_Trivial_Subprogram;
5370 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5372 Set_Flag163 (Id, V);
5373 end Set_Is_True_Constant;
5375 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5377 pragma Assert (Id = Base_Type (Id));
5378 Set_Flag117 (Id, V);
5379 end Set_Is_Unchecked_Union;
5381 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5383 pragma Assert (Ekind (Id) = E_Record_Type);
5384 Set_Flag246 (Id, V);
5385 end Set_Is_Underlying_Record_View;
5387 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5389 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5390 Set_Flag144 (Id, V);
5391 end Set_Is_Unsigned_Type;
5393 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5395 pragma Assert (Ekind (Id) = E_Procedure);
5396 Set_Flag127 (Id, V);
5397 end Set_Is_Valued_Procedure;
5399 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5401 Set_Flag206 (Id, V);
5402 end Set_Is_Visible_Formal;
5404 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5406 Set_Flag116 (Id, V);
5407 end Set_Is_Visible_Lib_Unit;
5409 procedure Set_Is_Volatile (Id : E; V : B := True) is
5411 pragma Assert (Nkind (Id) in N_Entity);
5413 end Set_Is_Volatile;
5415 procedure Set_Itype_Printed (Id : E; V : B := True) is
5417 pragma Assert (Is_Itype (Id));
5418 Set_Flag202 (Id, V);
5419 end Set_Itype_Printed;
5421 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5424 end Set_Kill_Elaboration_Checks;
5426 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5429 end Set_Kill_Range_Checks;
5431 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5433 pragma Assert (Is_Type (Id));
5434 Set_Flag207 (Id, V);
5435 end Set_Known_To_Have_Preelab_Init;
5437 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5439 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5441 end Set_Last_Aggregate_Assignment;
5443 procedure Set_Last_Assignment (Id : E; V : N) is
5445 pragma Assert (Is_Assignable (Id));
5447 end Set_Last_Assignment;
5449 procedure Set_Last_Entity (Id : E; V : E) is
5452 end Set_Last_Entity;
5454 procedure Set_Limited_View (Id : E; V : E) is
5456 pragma Assert (Ekind (Id) = E_Package);
5458 end Set_Limited_View;
5460 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5462 pragma Assert (Is_Type (Id)
5463 or else Ekind_In (Id, E_Constant, E_Variable)
5464 or else Is_Subprogram (Id));
5466 end Set_Linker_Section_Pragma;
5468 procedure Set_Lit_Indexes (Id : E; V : E) is
5470 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5472 end Set_Lit_Indexes;
5474 procedure Set_Lit_Strings (Id : E; V : E) is
5476 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5478 end Set_Lit_Strings;
5480 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5482 pragma Assert (Is_Formal (Id));
5483 Set_Flag205 (Id, V);
5484 end Set_Low_Bound_Tested;
5486 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5488 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5490 end Set_Machine_Radix_10;
5492 procedure Set_Master_Id (Id : E; V : E) is
5494 pragma Assert (Is_Access_Type (Id));
5498 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5500 Set_Flag168 (Id, V);
5501 end Set_Materialize_Entity;
5503 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5505 Set_Flag262 (Id, V);
5506 end Set_May_Inherit_Delayed_Rep_Aspects;
5508 procedure Set_Mechanism (Id : E; V : M) is
5510 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5511 Set_Uint8 (Id, UI_From_Int (V));
5514 procedure Set_Modulus (Id : E; V : U) is
5516 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5520 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5522 pragma Assert (Is_Type (Id));
5523 Set_Flag183 (Id, V);
5524 end Set_Must_Be_On_Byte_Boundary;
5526 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5528 pragma Assert (Is_Type (Id));
5529 Set_Flag208 (Id, V);
5530 end Set_Must_Have_Preelab_Init;
5532 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5534 Set_Flag147 (Id, V);
5535 end Set_Needs_Debug_Info;
5537 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5540 (Is_Overloadable (Id)
5541 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5543 end Set_Needs_No_Actuals;
5545 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5547 Set_Flag115 (Id, V);
5548 end Set_Never_Set_In_Source;
5550 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5553 end Set_Next_Inlined_Subprogram;
5555 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5557 pragma Assert (Is_Discrete_Type (Id));
5558 Set_Flag276 (Id, V);
5559 end Set_No_Dynamic_Predicate_On_Actual;
5561 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5563 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5564 Set_Flag131 (Id, V);
5565 end Set_No_Pool_Assigned;
5567 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5569 pragma Assert (Is_Discrete_Type (Id));
5570 Set_Flag275 (Id, V);
5571 end Set_No_Predicate_On_Actual;
5573 procedure Set_No_Return (Id : E; V : B := True) is
5576 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5577 Set_Flag113 (Id, V);
5580 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5582 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5583 Set_Flag136 (Id, V);
5584 end Set_No_Strict_Aliasing;
5586 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5588 pragma Assert (Is_Tagged_Type (Id));
5590 end Set_No_Tagged_Streams_Pragma;
5592 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5594 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5596 end Set_Non_Binary_Modulus;
5598 procedure Set_Non_Limited_View (Id : E; V : E) is
5601 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5603 end Set_Non_Limited_View;
5605 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5608 (Root_Type (Id) = Standard_Boolean
5609 and then Ekind (Id) = E_Enumeration_Type);
5610 Set_Flag162 (Id, V);
5611 end Set_Nonzero_Is_True;
5613 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5615 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5617 end Set_Normalized_First_Bit;
5619 procedure Set_Normalized_Position (Id : E; V : U) is
5621 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5623 end Set_Normalized_Position;
5625 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5627 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5629 end Set_Normalized_Position_Max;
5631 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5633 pragma Assert (Ekind (Id) = E_Variable);
5634 Set_Flag247 (Id, V);
5635 end Set_OK_To_Rename;
5637 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5640 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5641 Set_Flag239 (Id, V);
5642 end Set_OK_To_Reorder_Components;
5644 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5647 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5648 Set_Flag241 (Id, V);
5649 end Set_Optimize_Alignment_Space;
5651 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5654 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5655 Set_Flag242 (Id, V);
5656 end Set_Optimize_Alignment_Time;
5658 procedure Set_Original_Access_Type (Id : E; V : E) is
5660 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5662 end Set_Original_Access_Type;
5664 procedure Set_Original_Array_Type (Id : E; V : E) is
5666 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5668 end Set_Original_Array_Type;
5670 procedure Set_Original_Record_Component (Id : E; V : E) is
5672 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5674 end Set_Original_Record_Component;
5676 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5678 Set_Flag243 (Id, V);
5679 end Set_Overlays_Constant;
5681 procedure Set_Overridden_Operation (Id : E; V : E) is
5684 end Set_Overridden_Operation;
5686 procedure Set_Package_Instantiation (Id : E; V : N) is
5688 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5690 end Set_Package_Instantiation;
5692 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5694 pragma Assert (Is_Array_Type (Id));
5696 end Set_Packed_Array_Impl_Type;
5698 procedure Set_Parent_Subtype (Id : E; V : E) is
5700 pragma Assert (Ekind (Id) = E_Record_Type);
5702 end Set_Parent_Subtype;
5704 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5706 pragma Assert (Ekind (Id) = E_Abstract_State);
5708 end Set_Part_Of_Constituents;
5710 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5712 pragma Assert (Is_Type (Id));
5713 Set_Flag280 (Id, V);
5714 end Set_Partial_View_Has_Unknown_Discr;
5716 procedure Set_Pending_Access_Types (Id : E; V : L) is
5718 pragma Assert (Is_Type (Id));
5719 Set_Elist15 (Id, V);
5720 end Set_Pending_Access_Types;
5722 procedure Set_Postconditions_Proc (Id : E; V : E) is
5724 pragma Assert (Ekind_In (Id, E_Entry,
5729 end Set_Postconditions_Proc;
5731 procedure Set_PPC_Wrapper (Id : E; V : E) is
5733 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5735 end Set_PPC_Wrapper;
5737 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5739 pragma Assert (Is_Tagged_Type (Id));
5740 Set_Elist10 (Id, V);
5741 end Set_Direct_Primitive_Operations;
5743 procedure Set_Prival (Id : E; V : E) is
5745 pragma Assert (Is_Protected_Component (Id));
5749 procedure Set_Prival_Link (Id : E; V : E) is
5751 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5753 end Set_Prival_Link;
5755 procedure Set_Private_Dependents (Id : E; V : L) is
5757 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5758 Set_Elist18 (Id, V);
5759 end Set_Private_Dependents;
5761 procedure Set_Private_View (Id : E; V : N) is
5763 pragma Assert (Is_Private_Type (Id));
5765 end Set_Private_View;
5767 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5769 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5771 end Set_Protected_Body_Subprogram;
5773 procedure Set_Protected_Formal (Id : E; V : E) is
5775 pragma Assert (Is_Formal (Id));
5777 end Set_Protected_Formal;
5779 procedure Set_Protection_Object (Id : E; V : E) is
5781 pragma Assert (Ekind_In (Id, E_Entry,
5786 end Set_Protection_Object;
5788 procedure Set_Reachable (Id : E; V : B := True) is
5793 procedure Set_Referenced (Id : E; V : B := True) is
5795 Set_Flag156 (Id, V);
5798 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5801 end Set_Referenced_As_LHS;
5803 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5805 Set_Flag227 (Id, V);
5806 end Set_Referenced_As_Out_Parameter;
5808 procedure Set_Refinement_Constituents (Id : E; V : L) is
5810 pragma Assert (Ekind (Id) = E_Abstract_State);
5812 end Set_Refinement_Constituents;
5814 procedure Set_Register_Exception_Call (Id : E; V : N) is
5816 pragma Assert (Ekind (Id) = E_Exception);
5818 end Set_Register_Exception_Call;
5820 procedure Set_Related_Array_Object (Id : E; V : E) is
5822 pragma Assert (Is_Array_Type (Id));
5824 end Set_Related_Array_Object;
5826 procedure Set_Related_Expression (Id : E; V : N) is
5828 pragma Assert (Ekind (Id) in Type_Kind
5829 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5831 end Set_Related_Expression;
5833 procedure Set_Related_Instance (Id : E; V : E) is
5835 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5837 end Set_Related_Instance;
5839 procedure Set_Related_Type (Id : E; V : E) is
5841 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5843 end Set_Related_Type;
5845 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5847 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5849 end Set_Relative_Deadline_Variable;
5851 procedure Set_Renamed_Entity (Id : E; V : N) is
5854 end Set_Renamed_Entity;
5856 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5858 pragma Assert (Ekind (Id) = E_Package);
5859 Set_Flag231 (Id, V);
5860 end Set_Renamed_In_Spec;
5862 procedure Set_Renamed_Object (Id : E; V : N) is
5865 end Set_Renamed_Object;
5867 procedure Set_Renaming_Map (Id : E; V : U) is
5870 end Set_Renaming_Map;
5872 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5874 pragma Assert (Is_Overloadable (Id));
5875 Set_Flag213 (Id, V);
5876 end Set_Requires_Overriding;
5878 procedure Set_Return_Present (Id : E; V : B := True) is
5881 end Set_Return_Present;
5883 procedure Set_Return_Applies_To (Id : E; V : N) is
5886 end Set_Return_Applies_To;
5888 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5891 end Set_Returns_By_Ref;
5893 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5895 pragma Assert (Ekind (Id) = E_Function);
5896 Set_Flag134 (Id, V);
5897 end Set_Returns_Limited_View;
5899 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5902 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5903 Set_Flag164 (Id, V);
5904 end Set_Reverse_Bit_Order;
5906 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5910 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5912 end Set_Reverse_Storage_Order;
5914 procedure Set_RM_Size (Id : E; V : U) is
5916 pragma Assert (Is_Type (Id));
5920 procedure Set_Scalar_Range (Id : E; V : N) is
5923 end Set_Scalar_Range;
5925 procedure Set_Scale_Value (Id : E; V : U) is
5928 end Set_Scale_Value;
5930 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5932 pragma Assert (not Is_Record_Type (Id));
5934 end Set_Scope_Depth_Value;
5936 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5938 Set_Flag167 (Id, V);
5939 end Set_Sec_Stack_Needed_For_Return;
5941 procedure Set_Shadow_Entities (Id : E; V : S) is
5943 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5945 end Set_Shadow_Entities;
5947 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5949 pragma Assert (Ekind (Id) = E_Variable);
5951 end Set_Shared_Var_Procs_Instance;
5953 procedure Set_Size_Check_Code (Id : E; V : N) is
5955 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5957 end Set_Size_Check_Code;
5959 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5961 Set_Flag177 (Id, V);
5962 end Set_Size_Depends_On_Discriminant;
5964 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5967 end Set_Size_Known_At_Compile_Time;
5969 procedure Set_Small_Value (Id : E; V : R) is
5971 pragma Assert (Is_Fixed_Point_Type (Id));
5972 Set_Ureal21 (Id, V);
5973 end Set_Small_Value;
5975 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5978 (Ekind_In (Id, E_Generic_Package, -- package variants
5983 end Set_SPARK_Aux_Pragma;
5985 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5988 (Ekind_In (Id, E_Generic_Package, -- package variants
5992 Set_Flag266 (Id, V);
5993 end Set_SPARK_Aux_Pragma_Inherited;
5995 procedure Set_SPARK_Pragma (Id : E; V : N) is
5998 (Ekind_In (Id, E_Function, -- subprogram variants
6000 E_Generic_Procedure,
6004 Ekind_In (Id, E_Generic_Package, -- package variants
6009 end Set_SPARK_Pragma;
6011 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6014 (Ekind_In (Id, E_Function, -- subprogram variants
6016 E_Generic_Procedure,
6020 Ekind_In (Id, E_Generic_Package, -- package variants
6024 Set_Flag265 (Id, V);
6025 end Set_SPARK_Pragma_Inherited;
6027 procedure Set_Spec_Entity (Id : E; V : E) is
6029 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6031 end Set_Spec_Entity;
6033 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6037 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6038 Set_Flag273 (Id, V);
6039 end Set_SSO_Set_High_By_Default;
6041 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6045 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6046 Set_Flag272 (Id, V);
6047 end Set_SSO_Set_Low_By_Default;
6049 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6051 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6053 end Set_Static_Discrete_Predicate;
6055 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6057 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6058 and then Has_Predicates (Id));
6060 end Set_Static_Real_Or_String_Predicate;
6062 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6064 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6066 end Set_Status_Flag_Or_Transient_Decl;
6068 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6070 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6071 pragma Assert (Id = Base_Type (Id));
6073 end Set_Storage_Size_Variable;
6075 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6077 pragma Assert (Ekind (Id) = E_Package);
6079 end Set_Static_Elaboration_Desired;
6081 procedure Set_Static_Initialization (Id : E; V : N) is
6084 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6086 end Set_Static_Initialization;
6088 procedure Set_Stored_Constraint (Id : E; V : L) is
6090 pragma Assert (Nkind (Id) in N_Entity);
6091 Set_Elist23 (Id, V);
6092 end Set_Stored_Constraint;
6094 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6096 pragma Assert (Ekind (Id) = E_Constant);
6097 Set_Flag270 (Id, V);
6098 end Set_Stores_Attribute_Old_Prefix;
6100 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6102 pragma Assert (Id = Base_Type (Id));
6103 Set_Flag145 (Id, V);
6104 end Set_Strict_Alignment;
6106 procedure Set_String_Literal_Length (Id : E; V : U) is
6108 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6110 end Set_String_Literal_Length;
6112 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6114 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6116 end Set_String_Literal_Low_Bound;
6118 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6120 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6122 end Set_Subprograms_For_Type;
6124 procedure Set_Subps_Index (Id : E; V : U) is
6126 pragma Assert (Is_Subprogram (Id));
6128 end Set_Subps_Index;
6130 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6132 Set_Flag148 (Id, V);
6133 end Set_Suppress_Elaboration_Warnings;
6135 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6137 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6138 Set_Flag105 (Id, V);
6139 end Set_Suppress_Initialization;
6141 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6143 Set_Flag165 (Id, V);
6144 end Set_Suppress_Style_Checks;
6146 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6148 Set_Flag217 (Id, V);
6149 end Set_Suppress_Value_Tracking_On_Call;
6151 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6153 pragma Assert (Ekind (Id) in Task_Kind);
6155 end Set_Task_Body_Procedure;
6157 procedure Set_Thunk_Entity (Id : E; V : E) is
6159 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6160 and then Is_Thunk (Id));
6162 end Set_Thunk_Entity;
6164 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6167 end Set_Treat_As_Volatile;
6169 procedure Set_Underlying_Full_View (Id : E; V : E) is
6171 pragma Assert (Ekind (Id) in Private_Kind);
6173 end Set_Underlying_Full_View;
6175 procedure Set_Underlying_Record_View (Id : E; V : E) is
6177 pragma Assert (Ekind (Id) = E_Record_Type);
6179 end Set_Underlying_Record_View;
6181 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6183 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6184 Set_Flag216 (Id, V);
6185 end Set_Universal_Aliasing;
6187 procedure Set_Unset_Reference (Id : E; V : N) is
6190 end Set_Unset_Reference;
6192 procedure Set_Uplevel_Reference_Noted (Id : E; V : B := True) is
6194 Set_Flag283 (Id, V);
6195 end Set_Uplevel_Reference_Noted;
6197 procedure Set_Uplevel_References (Id : E; V : L) is
6199 pragma Assert (Is_Subprogram (Id));
6200 Set_Elist24 (Id, V);
6201 end Set_Uplevel_References;
6203 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6205 Set_Flag222 (Id, V);
6206 end Set_Used_As_Generic_Actual;
6208 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6210 pragma Assert (Ekind (Id) = E_Protected_Type);
6211 Set_Flag188 (Id, V);
6212 end Set_Uses_Lock_Free;
6214 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6217 end Set_Uses_Sec_Stack;
6219 procedure Set_Warnings_Off (Id : E; V : B := True) is
6222 end Set_Warnings_Off;
6224 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6226 Set_Flag236 (Id, V);
6227 end Set_Warnings_Off_Used;
6229 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6231 Set_Flag237 (Id, V);
6232 end Set_Warnings_Off_Used_Unmodified;
6234 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6236 Set_Flag238 (Id, V);
6237 end Set_Warnings_Off_Used_Unreferenced;
6239 procedure Set_Was_Hidden (Id : E; V : B := True) is
6241 Set_Flag196 (Id, V);
6244 procedure Set_Wrapped_Entity (Id : E; V : E) is
6246 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6247 and then Is_Primitive_Wrapper (Id));
6249 end Set_Wrapped_Entity;
6251 -----------------------------------
6252 -- Field Initialization Routines --
6253 -----------------------------------
6255 procedure Init_Alignment (Id : E) is
6257 Set_Uint14 (Id, Uint_0);
6260 procedure Init_Alignment (Id : E; V : Int) is
6262 Set_Uint14 (Id, UI_From_Int (V));
6265 procedure Init_Component_Bit_Offset (Id : E) is
6267 Set_Uint11 (Id, No_Uint);
6268 end Init_Component_Bit_Offset;
6270 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6272 Set_Uint11 (Id, UI_From_Int (V));
6273 end Init_Component_Bit_Offset;
6275 procedure Init_Component_Size (Id : E) is
6277 Set_Uint22 (Id, Uint_0);
6278 end Init_Component_Size;
6280 procedure Init_Component_Size (Id : E; V : Int) is
6282 Set_Uint22 (Id, UI_From_Int (V));
6283 end Init_Component_Size;
6285 procedure Init_Digits_Value (Id : E) is
6287 Set_Uint17 (Id, Uint_0);
6288 end Init_Digits_Value;
6290 procedure Init_Digits_Value (Id : E; V : Int) is
6292 Set_Uint17 (Id, UI_From_Int (V));
6293 end Init_Digits_Value;
6295 procedure Init_Esize (Id : E) is
6297 Set_Uint12 (Id, Uint_0);
6300 procedure Init_Esize (Id : E; V : Int) is
6302 Set_Uint12 (Id, UI_From_Int (V));
6305 procedure Init_Normalized_First_Bit (Id : E) is
6307 Set_Uint8 (Id, No_Uint);
6308 end Init_Normalized_First_Bit;
6310 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6312 Set_Uint8 (Id, UI_From_Int (V));
6313 end Init_Normalized_First_Bit;
6315 procedure Init_Normalized_Position (Id : E) is
6317 Set_Uint14 (Id, No_Uint);
6318 end Init_Normalized_Position;
6320 procedure Init_Normalized_Position (Id : E; V : Int) is
6322 Set_Uint14 (Id, UI_From_Int (V));
6323 end Init_Normalized_Position;
6325 procedure Init_Normalized_Position_Max (Id : E) is
6327 Set_Uint10 (Id, No_Uint);
6328 end Init_Normalized_Position_Max;
6330 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6332 Set_Uint10 (Id, UI_From_Int (V));
6333 end Init_Normalized_Position_Max;
6335 procedure Init_RM_Size (Id : E) is
6337 Set_Uint13 (Id, Uint_0);
6340 procedure Init_RM_Size (Id : E; V : Int) is
6342 Set_Uint13 (Id, UI_From_Int (V));
6345 -----------------------------
6346 -- Init_Component_Location --
6347 -----------------------------
6349 procedure Init_Component_Location (Id : E) is
6351 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6352 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6353 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6354 Set_Uint12 (Id, Uint_0); -- Esize
6355 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6356 end Init_Component_Location;
6358 ----------------------------
6359 -- Init_Object_Size_Align --
6360 ----------------------------
6362 procedure Init_Object_Size_Align (Id : E) is
6364 Set_Uint12 (Id, Uint_0); -- Esize
6365 Set_Uint14 (Id, Uint_0); -- Alignment
6366 end Init_Object_Size_Align;
6372 procedure Init_Size (Id : E; V : Int) is
6374 pragma Assert (not Is_Object (Id));
6375 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6376 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6379 ---------------------
6380 -- Init_Size_Align --
6381 ---------------------
6383 procedure Init_Size_Align (Id : E) is
6385 pragma Assert (not Is_Object (Id));
6386 Set_Uint12 (Id, Uint_0); -- Esize
6387 Set_Uint13 (Id, Uint_0); -- RM_Size
6388 Set_Uint14 (Id, Uint_0); -- Alignment
6389 end Init_Size_Align;
6391 ----------------------------------------------
6392 -- Type Representation Attribute Predicates --
6393 ----------------------------------------------
6395 function Known_Alignment (E : Entity_Id) return B is
6397 return Uint14 (E) /= Uint_0
6398 and then Uint14 (E) /= No_Uint;
6399 end Known_Alignment;
6401 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6403 return Uint11 (E) /= No_Uint;
6404 end Known_Component_Bit_Offset;
6406 function Known_Component_Size (E : Entity_Id) return B is
6408 return Uint22 (Base_Type (E)) /= Uint_0
6409 and then Uint22 (Base_Type (E)) /= No_Uint;
6410 end Known_Component_Size;
6412 function Known_Esize (E : Entity_Id) return B is
6414 return Uint12 (E) /= Uint_0
6415 and then Uint12 (E) /= No_Uint;
6418 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6420 return Uint8 (E) /= No_Uint;
6421 end Known_Normalized_First_Bit;
6423 function Known_Normalized_Position (E : Entity_Id) return B is
6425 return Uint14 (E) /= No_Uint;
6426 end Known_Normalized_Position;
6428 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6430 return Uint10 (E) /= No_Uint;
6431 end Known_Normalized_Position_Max;
6433 function Known_RM_Size (E : Entity_Id) return B is
6435 return Uint13 (E) /= No_Uint
6436 and then (Uint13 (E) /= Uint_0
6437 or else Is_Discrete_Type (E)
6438 or else Is_Fixed_Point_Type (E));
6441 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6443 return Uint11 (E) /= No_Uint
6444 and then Uint11 (E) >= Uint_0;
6445 end Known_Static_Component_Bit_Offset;
6447 function Known_Static_Component_Size (E : Entity_Id) return B is
6449 return Uint22 (Base_Type (E)) > Uint_0;
6450 end Known_Static_Component_Size;
6452 function Known_Static_Esize (E : Entity_Id) return B is
6454 return Uint12 (E) > Uint_0
6455 and then not Is_Generic_Type (E);
6456 end Known_Static_Esize;
6458 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6460 return Uint8 (E) /= No_Uint
6461 and then Uint8 (E) >= Uint_0;
6462 end Known_Static_Normalized_First_Bit;
6464 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6466 return Uint14 (E) /= No_Uint
6467 and then Uint14 (E) >= Uint_0;
6468 end Known_Static_Normalized_Position;
6470 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6472 return Uint10 (E) /= No_Uint
6473 and then Uint10 (E) >= Uint_0;
6474 end Known_Static_Normalized_Position_Max;
6476 function Known_Static_RM_Size (E : Entity_Id) return B is
6478 return (Uint13 (E) > Uint_0
6479 or else Is_Discrete_Type (E)
6480 or else Is_Fixed_Point_Type (E))
6481 and then not Is_Generic_Type (E);
6482 end Known_Static_RM_Size;
6484 function Unknown_Alignment (E : Entity_Id) return B is
6486 return Uint14 (E) = Uint_0
6487 or else Uint14 (E) = No_Uint;
6488 end Unknown_Alignment;
6490 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6492 return Uint11 (E) = No_Uint;
6493 end Unknown_Component_Bit_Offset;
6495 function Unknown_Component_Size (E : Entity_Id) return B is
6497 return Uint22 (Base_Type (E)) = Uint_0
6499 Uint22 (Base_Type (E)) = No_Uint;
6500 end Unknown_Component_Size;
6502 function Unknown_Esize (E : Entity_Id) return B is
6504 return Uint12 (E) = No_Uint
6506 Uint12 (E) = Uint_0;
6509 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6511 return Uint8 (E) = No_Uint;
6512 end Unknown_Normalized_First_Bit;
6514 function Unknown_Normalized_Position (E : Entity_Id) return B is
6516 return Uint14 (E) = No_Uint;
6517 end Unknown_Normalized_Position;
6519 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6521 return Uint10 (E) = No_Uint;
6522 end Unknown_Normalized_Position_Max;
6524 function Unknown_RM_Size (E : Entity_Id) return B is
6526 return (Uint13 (E) = Uint_0
6527 and then not Is_Discrete_Type (E)
6528 and then not Is_Fixed_Point_Type (E))
6529 or else Uint13 (E) = No_Uint;
6530 end Unknown_RM_Size;
6532 --------------------
6533 -- Address_Clause --
6534 --------------------
6536 function Address_Clause (Id : E) return N is
6538 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6545 function Aft_Value (Id : E) return U is
6547 Delta_Val : Ureal := Delta_Value (Id);
6549 while Delta_Val < Ureal_Tenth loop
6550 Delta_Val := Delta_Val * Ureal_10;
6551 Result := Result + 1;
6554 return UI_From_Int (Result);
6557 ----------------------
6558 -- Alignment_Clause --
6559 ----------------------
6561 function Alignment_Clause (Id : E) return N is
6563 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6564 end Alignment_Clause;
6570 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6572 if Last_Entity (V) = Empty then
6573 Set_First_Entity (Id => V, V => Id);
6575 Set_Next_Entity (Last_Entity (V), Id);
6578 Set_Next_Entity (Id, Empty);
6580 Set_Last_Entity (Id => V, V => Id);
6587 function Base_Type (Id : E) return E is
6589 if Is_Base_Type (Id) then
6592 pragma Assert (Is_Type (Id));
6597 -------------------------
6598 -- Component_Alignment --
6599 -------------------------
6601 -- Component Alignment is encoded using two flags, Flag128/129 as
6602 -- follows. Note that both flags False = Align_Default, so that the
6603 -- default initialization of flags to False initializes component
6604 -- alignment to the default value as required.
6606 -- Flag128 Flag129 Value
6607 -- ------- ------- -----
6608 -- False False Calign_Default
6609 -- False True Calign_Component_Size
6610 -- True False Calign_Component_Size_4
6611 -- True True Calign_Storage_Unit
6613 function Component_Alignment (Id : E) return C is
6614 BT : constant Node_Id := Base_Type (Id);
6617 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6619 if Flag128 (BT) then
6620 if Flag129 (BT) then
6621 return Calign_Storage_Unit;
6623 return Calign_Component_Size_4;
6627 if Flag129 (BT) then
6628 return Calign_Component_Size;
6630 return Calign_Default;
6633 end Component_Alignment;
6635 ----------------------
6636 -- Declaration_Node --
6637 ----------------------
6639 function Declaration_Node (Id : E) return N is
6643 if Ekind (Id) = E_Incomplete_Type
6644 and then Present (Full_View (Id))
6646 P := Parent (Full_View (Id));
6652 if Nkind (P) /= N_Selected_Component
6653 and then Nkind (P) /= N_Expanded_Name
6655 not (Nkind (P) = N_Defining_Program_Unit_Name
6656 and then Is_Child_Unit (Id))
6663 end Declaration_Node;
6665 ---------------------------------
6666 -- Default_Init_Cond_Procedure --
6667 ---------------------------------
6669 function Default_Init_Cond_Procedure (Id : E) return E is
6675 and then (Has_Default_Init_Cond (Id)
6676 or Has_Inherited_Default_Init_Cond (Id)));
6678 S := Subprograms_For_Type (Id);
6679 while Present (S) loop
6680 if Is_Default_Init_Cond_Procedure (S) then
6684 S := Subprograms_For_Type (S);
6688 end Default_Init_Cond_Procedure;
6690 ---------------------
6691 -- Designated_Type --
6692 ---------------------
6694 function Designated_Type (Id : E) return E is
6698 Desig_Type := Directly_Designated_Type (Id);
6700 if Ekind (Desig_Type) = E_Incomplete_Type
6701 and then Present (Full_View (Desig_Type))
6703 return Full_View (Desig_Type);
6705 elsif Is_Class_Wide_Type (Desig_Type)
6706 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6707 and then Present (Full_View (Etype (Desig_Type)))
6708 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6710 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6715 end Designated_Type;
6717 ----------------------
6718 -- Entry_Index_Type --
6719 ----------------------
6721 function Entry_Index_Type (Id : E) return N is
6723 pragma Assert (Ekind (Id) = E_Entry_Family);
6724 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6725 end Entry_Index_Type;
6727 ---------------------
6728 -- First_Component --
6729 ---------------------
6731 function First_Component (Id : E) return E is
6736 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6738 Comp_Id := First_Entity (Id);
6739 while Present (Comp_Id) loop
6740 exit when Ekind (Comp_Id) = E_Component;
6741 Comp_Id := Next_Entity (Comp_Id);
6745 end First_Component;
6747 -------------------------------------
6748 -- First_Component_Or_Discriminant --
6749 -------------------------------------
6751 function First_Component_Or_Discriminant (Id : E) return E is
6756 (Is_Record_Type (Id)
6757 or else Is_Incomplete_Or_Private_Type (Id)
6758 or else Has_Discriminants (Id));
6760 Comp_Id := First_Entity (Id);
6761 while Present (Comp_Id) loop
6762 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6763 Comp_Id := Next_Entity (Comp_Id);
6767 end First_Component_Or_Discriminant;
6773 function First_Formal (Id : E) return E is
6778 (Is_Generic_Subprogram (Id)
6779 or else Is_Overloadable (Id)
6780 or else Ekind_In (Id, E_Entry_Family,
6782 E_Subprogram_Type));
6784 if Ekind (Id) = E_Enumeration_Literal then
6788 Formal := First_Entity (Id);
6790 -- The first/next entity chain of a generic subprogram contains all
6791 -- generic formal parameters, followed by the formal parameters. Go
6792 -- directly to the parameters by skipping the formal part.
6794 if Is_Generic_Subprogram (Id) then
6795 while Present (Formal) and then not Is_Formal (Formal) loop
6796 Next_Entity (Formal);
6800 if Present (Formal) and then Is_Formal (Formal) then
6808 ------------------------------
6809 -- First_Formal_With_Extras --
6810 ------------------------------
6812 function First_Formal_With_Extras (Id : E) return E is
6817 (Is_Generic_Subprogram (Id)
6818 or else Is_Overloadable (Id)
6819 or else Ekind_In (Id, E_Entry_Family,
6821 E_Subprogram_Type));
6823 if Ekind (Id) = E_Enumeration_Literal then
6827 Formal := First_Entity (Id);
6829 -- The first/next entity chain of a generic subprogram contains all
6830 -- generic formal parameters, followed by the formal parameters. Go
6831 -- directly to the parameters by skipping the formal part.
6833 if Is_Generic_Subprogram (Id) then
6834 while Present (Formal) and then not Is_Formal (Formal) loop
6835 Next_Entity (Formal);
6839 if Present (Formal) and then Is_Formal (Formal) then
6842 return Extra_Formals (Id); -- Empty if no extra formals
6845 end First_Formal_With_Extras;
6847 -------------------------------------
6848 -- Get_Attribute_Definition_Clause --
6849 -------------------------------------
6851 function Get_Attribute_Definition_Clause
6853 Id : Attribute_Id) return Node_Id
6858 N := First_Rep_Item (E);
6859 while Present (N) loop
6860 if Nkind (N) = N_Attribute_Definition_Clause
6861 and then Get_Attribute_Id (Chars (N)) = Id
6870 end Get_Attribute_Definition_Clause;
6876 function Get_Full_View (T : Entity_Id) return Entity_Id is
6878 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6879 return Full_View (T);
6881 elsif Is_Class_Wide_Type (T)
6882 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6883 and then Present (Full_View (Root_Type (T)))
6885 return Class_Wide_Type (Full_View (Root_Type (T)));
6896 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6897 Is_CDG : constant Boolean :=
6898 Id = Pragma_Abstract_State or else
6899 Id = Pragma_Async_Readers or else
6900 Id = Pragma_Async_Writers or else
6901 Id = Pragma_Depends or else
6902 Id = Pragma_Effective_Reads or else
6903 Id = Pragma_Effective_Writes or else
6904 Id = Pragma_Extensions_Visible or else
6905 Id = Pragma_Global or else
6906 Id = Pragma_Initial_Condition or else
6907 Id = Pragma_Initializes or else
6908 Id = Pragma_Part_Of or else
6909 Id = Pragma_Refined_Depends or else
6910 Id = Pragma_Refined_Global or else
6911 Id = Pragma_Refined_State;
6912 Is_CTC : constant Boolean :=
6913 Id = Pragma_Contract_Cases or else
6914 Id = Pragma_Test_Case;
6915 Is_PPC : constant Boolean :=
6916 Id = Pragma_Precondition or else
6917 Id = Pragma_Postcondition or else
6918 Id = Pragma_Refined_Post;
6920 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6926 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6927 -- extracted from their specialized list.
6930 Items := Contract (E);
6936 Item := Classifications (Items);
6939 Item := Contract_Test_Cases (Items);
6942 Item := Pre_Post_Conditions (Items);
6948 Item := First_Rep_Item (E);
6951 while Present (Item) loop
6952 if Nkind (Item) = N_Pragma
6953 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6957 -- All nodes in N_Contract are chained using Next_Pragma
6959 elsif In_Contract then
6960 Item := Next_Pragma (Item);
6965 Next_Rep_Item (Item);
6972 --------------------------------------
6973 -- Get_Record_Representation_Clause --
6974 --------------------------------------
6976 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6980 N := First_Rep_Item (E);
6981 while Present (N) loop
6982 if Nkind (N) = N_Record_Representation_Clause then
6990 end Get_Record_Representation_Clause;
6992 ------------------------
6993 -- Has_Attach_Handler --
6994 ------------------------
6996 function Has_Attach_Handler (Id : E) return B is
7000 pragma Assert (Is_Protected_Type (Id));
7002 Ritem := First_Rep_Item (Id);
7003 while Present (Ritem) loop
7004 if Nkind (Ritem) = N_Pragma
7005 and then Pragma_Name (Ritem) = Name_Attach_Handler
7009 Next_Rep_Item (Ritem);
7014 end Has_Attach_Handler;
7020 function Has_Entries (Id : E) return B is
7024 pragma Assert (Is_Concurrent_Type (Id));
7026 Ent := First_Entity (Id);
7027 while Present (Ent) loop
7028 if Is_Entry (Ent) then
7032 Ent := Next_Entity (Ent);
7038 ----------------------------
7039 -- Has_Foreign_Convention --
7040 ----------------------------
7042 function Has_Foreign_Convention (Id : E) return B is
7044 -- While regular Intrinsics such as the Standard operators fit in the
7045 -- "Ada" convention, those with an Interface_Name materialize GCC
7046 -- builtin imports for which Ada special treatments shouldn't apply.
7048 return Convention (Id) in Foreign_Convention
7049 or else (Convention (Id) = Convention_Intrinsic
7050 and then Present (Interface_Name (Id)));
7051 end Has_Foreign_Convention;
7053 ---------------------------
7054 -- Has_Interrupt_Handler --
7055 ---------------------------
7057 function Has_Interrupt_Handler (Id : E) return B is
7061 pragma Assert (Is_Protected_Type (Id));
7063 Ritem := First_Rep_Item (Id);
7064 while Present (Ritem) loop
7065 if Nkind (Ritem) = N_Pragma
7066 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7070 Next_Rep_Item (Ritem);
7075 end Has_Interrupt_Handler;
7077 -----------------------------
7078 -- Has_Non_Null_Refinement --
7079 -----------------------------
7081 function Has_Non_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 non-null, the first constituent must be
7091 -- anything other than null.
7094 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7098 end Has_Non_Null_Refinement;
7100 -----------------------------
7101 -- Has_Null_Abstract_State --
7102 -----------------------------
7104 function Has_Null_Abstract_State (Id : E) return B is
7106 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7109 Present (Abstract_States (Id))
7110 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7111 end Has_Null_Abstract_State;
7113 -------------------------
7114 -- Has_Null_Refinement --
7115 -------------------------
7117 function Has_Null_Refinement (Id : E) return B is
7119 -- "Refinement" is a concept applicable only to abstract states
7121 pragma Assert (Ekind (Id) = E_Abstract_State);
7123 if Has_Visible_Refinement (Id) then
7124 pragma Assert (Present (Refinement_Constituents (Id)));
7126 -- For a refinement to be null, the state's sole constituent must be
7130 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7134 end Has_Null_Refinement;
7136 --------------------
7137 -- Has_Unmodified --
7138 --------------------
7140 function Has_Unmodified (E : Entity_Id) return Boolean is
7142 if Has_Pragma_Unmodified (E) then
7144 elsif Warnings_Off (E) then
7145 Set_Warnings_Off_Used_Unmodified (E);
7152 ---------------------
7153 -- Has_Unreferenced --
7154 ---------------------
7156 function Has_Unreferenced (E : Entity_Id) return Boolean is
7158 if Has_Pragma_Unreferenced (E) then
7160 elsif Warnings_Off (E) then
7161 Set_Warnings_Off_Used_Unreferenced (E);
7166 end Has_Unreferenced;
7168 ----------------------
7169 -- Has_Warnings_Off --
7170 ----------------------
7172 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7174 if Warnings_Off (E) then
7175 Set_Warnings_Off_Used (E);
7180 end Has_Warnings_Off;
7182 ------------------------------
7183 -- Implementation_Base_Type --
7184 ------------------------------
7186 function Implementation_Base_Type (Id : E) return E is
7191 Bastyp := Base_Type (Id);
7193 if Is_Incomplete_Or_Private_Type (Bastyp) then
7194 Imptyp := Underlying_Type (Bastyp);
7196 -- If we have an implementation type, then just return it,
7197 -- otherwise we return the Base_Type anyway. This can only
7198 -- happen in error situations and should avoid some error bombs.
7200 if Present (Imptyp) then
7201 return Base_Type (Imptyp);
7209 end Implementation_Base_Type;
7211 -------------------------
7212 -- Invariant_Procedure --
7213 -------------------------
7215 function Invariant_Procedure (Id : E) return E is
7219 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7221 if No (Subprograms_For_Type (Id)) then
7225 S := Subprograms_For_Type (Id);
7226 while Present (S) loop
7227 if Is_Invariant_Procedure (S) then
7230 S := Subprograms_For_Type (S);
7236 end Invariant_Procedure;
7242 -- Global flag table allowing rapid computation of this function
7244 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7245 (E_Enumeration_Subtype |
7247 E_Signed_Integer_Subtype |
7248 E_Modular_Integer_Subtype |
7249 E_Floating_Point_Subtype |
7250 E_Ordinary_Fixed_Point_Subtype |
7251 E_Decimal_Fixed_Point_Subtype |
7256 E_Record_Subtype_With_Private |
7257 E_Limited_Private_Subtype |
7259 E_Protected_Subtype |
7261 E_String_Literal_Subtype |
7262 E_Class_Wide_Subtype => False,
7265 function Is_Base_Type (Id : E) return Boolean is
7267 return Entity_Is_Base_Type (Ekind (Id));
7270 ---------------------
7271 -- Is_Boolean_Type --
7272 ---------------------
7274 function Is_Boolean_Type (Id : E) return B is
7276 return Root_Type (Id) = Standard_Boolean;
7277 end Is_Boolean_Type;
7279 ------------------------
7280 -- Is_Constant_Object --
7281 ------------------------
7283 function Is_Constant_Object (Id : E) return B is
7284 K : constant Entity_Kind := Ekind (Id);
7287 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7288 end Is_Constant_Object;
7290 --------------------
7291 -- Is_Discriminal --
7292 --------------------
7294 function Is_Discriminal (Id : E) return B is
7296 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7297 and then Present (Discriminal_Link (Id)));
7300 ----------------------
7301 -- Is_Dynamic_Scope --
7302 ----------------------
7304 function Is_Dynamic_Scope (Id : E) return B is
7307 Ekind (Id) = E_Block
7309 Ekind (Id) = E_Function
7311 Ekind (Id) = E_Procedure
7313 Ekind (Id) = E_Subprogram_Body
7315 Ekind (Id) = E_Task_Type
7317 (Ekind (Id) = E_Limited_Private_Type
7318 and then Present (Full_View (Id))
7319 and then Ekind (Full_View (Id)) = E_Task_Type)
7321 Ekind (Id) = E_Entry
7323 Ekind (Id) = E_Entry_Family
7325 Ekind (Id) = E_Return_Statement;
7326 end Is_Dynamic_Scope;
7328 --------------------
7329 -- Is_Entity_Name --
7330 --------------------
7332 function Is_Entity_Name (N : Node_Id) return Boolean is
7333 Kind : constant Node_Kind := Nkind (N);
7336 -- Identifiers, operator symbols, expanded names are entity names
7338 return Kind = N_Identifier
7339 or else Kind = N_Operator_Symbol
7340 or else Kind = N_Expanded_Name
7342 -- Attribute references are entity names if they refer to an entity.
7343 -- Note that we don't do this by testing for the presence of the
7344 -- Entity field in the N_Attribute_Reference node, since it may not
7345 -- have been set yet.
7347 or else (Kind = N_Attribute_Reference
7348 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7351 -----------------------
7352 -- Is_External_State --
7353 -----------------------
7355 function Is_External_State (Id : E) return B is
7358 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7359 end Is_External_State;
7365 function Is_Finalizer (Id : E) return B is
7367 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7374 function Is_Null_State (Id : E) return B is
7377 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7380 ---------------------
7381 -- Is_Packed_Array --
7382 ---------------------
7384 function Is_Packed_Array (Id : E) return B is
7386 return Is_Array_Type (Id) and then Is_Packed (Id);
7387 end Is_Packed_Array;
7389 -----------------------------------
7390 -- Is_Package_Or_Generic_Package --
7391 -----------------------------------
7393 function Is_Package_Or_Generic_Package (Id : E) return B is
7395 return Ekind_In (Id, E_Generic_Package, E_Package);
7396 end Is_Package_Or_Generic_Package;
7402 function Is_Prival (Id : E) return B is
7404 return (Ekind_In (Id, E_Constant, E_Variable)
7405 and then Present (Prival_Link (Id)));
7408 ----------------------------
7409 -- Is_Protected_Component --
7410 ----------------------------
7412 function Is_Protected_Component (Id : E) return B is
7414 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7415 end Is_Protected_Component;
7417 ----------------------------
7418 -- Is_Protected_Interface --
7419 ----------------------------
7421 function Is_Protected_Interface (Id : E) return B is
7422 Typ : constant Entity_Id := Base_Type (Id);
7424 if not Is_Interface (Typ) then
7426 elsif Is_Class_Wide_Type (Typ) then
7427 return Is_Protected_Interface (Etype (Typ));
7429 return Protected_Present (Type_Definition (Parent (Typ)));
7431 end Is_Protected_Interface;
7433 ------------------------------
7434 -- Is_Protected_Record_Type --
7435 ------------------------------
7437 function Is_Protected_Record_Type (Id : E) return B is
7440 Is_Concurrent_Record_Type (Id)
7441 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7442 end Is_Protected_Record_Type;
7444 --------------------------------
7445 -- Is_Standard_Character_Type --
7446 --------------------------------
7448 function Is_Standard_Character_Type (Id : E) return B is
7450 if Is_Type (Id) then
7452 R : constant Entity_Id := Root_Type (Id);
7455 R = Standard_Character
7457 R = Standard_Wide_Character
7459 R = Standard_Wide_Wide_Character;
7465 end Is_Standard_Character_Type;
7467 -----------------------------
7468 -- Is_Standard_String_Type --
7469 -----------------------------
7471 function Is_Standard_String_Type (Id : E) return B is
7473 if Is_Type (Id) then
7475 R : constant Entity_Id := Root_Type (Id);
7480 R = Standard_Wide_String
7482 R = Standard_Wide_Wide_String;
7488 end Is_Standard_String_Type;
7490 --------------------
7491 -- Is_String_Type --
7492 --------------------
7494 function Is_String_Type (Id : E) return B is
7496 return Is_Array_Type (Id)
7497 and then Id /= Any_Composite
7498 and then Number_Dimensions (Id) = 1
7499 and then Is_Character_Type (Component_Type (Id));
7502 -------------------------------
7503 -- Is_Synchronized_Interface --
7504 -------------------------------
7506 function Is_Synchronized_Interface (Id : E) return B is
7507 Typ : constant Entity_Id := Base_Type (Id);
7510 if not Is_Interface (Typ) then
7513 elsif Is_Class_Wide_Type (Typ) then
7514 return Is_Synchronized_Interface (Etype (Typ));
7517 return Protected_Present (Type_Definition (Parent (Typ)))
7518 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7519 or else Task_Present (Type_Definition (Parent (Typ)));
7521 end Is_Synchronized_Interface;
7523 -----------------------
7524 -- Is_Task_Interface --
7525 -----------------------
7527 function Is_Task_Interface (Id : E) return B is
7528 Typ : constant Entity_Id := Base_Type (Id);
7530 if not Is_Interface (Typ) then
7532 elsif Is_Class_Wide_Type (Typ) then
7533 return Is_Task_Interface (Etype (Typ));
7535 return Task_Present (Type_Definition (Parent (Typ)));
7537 end Is_Task_Interface;
7539 -------------------------
7540 -- Is_Task_Record_Type --
7541 -------------------------
7543 function Is_Task_Record_Type (Id : E) return B is
7546 Is_Concurrent_Record_Type (Id)
7547 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7548 end Is_Task_Record_Type;
7550 ------------------------
7551 -- Is_Wrapper_Package --
7552 ------------------------
7554 function Is_Wrapper_Package (Id : E) return B is
7556 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7557 end Is_Wrapper_Package;
7563 function Last_Formal (Id : E) return E is
7568 (Is_Overloadable (Id)
7569 or else Ekind_In (Id, E_Entry_Family,
7571 E_Subprogram_Type));
7573 if Ekind (Id) = E_Enumeration_Literal then
7577 Formal := First_Formal (Id);
7579 if Present (Formal) then
7580 while Present (Next_Formal (Formal)) loop
7581 Formal := Next_Formal (Formal);
7589 function Model_Emin_Value (Id : E) return Uint is
7591 return Machine_Emin_Value (Id);
7592 end Model_Emin_Value;
7594 -------------------------
7595 -- Model_Epsilon_Value --
7596 -------------------------
7598 function Model_Epsilon_Value (Id : E) return Ureal is
7599 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7601 return Radix ** (1 - Model_Mantissa_Value (Id));
7602 end Model_Epsilon_Value;
7604 --------------------------
7605 -- Model_Mantissa_Value --
7606 --------------------------
7608 function Model_Mantissa_Value (Id : E) return Uint is
7610 return Machine_Mantissa_Value (Id);
7611 end Model_Mantissa_Value;
7613 -----------------------
7614 -- Model_Small_Value --
7615 -----------------------
7617 function Model_Small_Value (Id : E) return Ureal is
7618 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7620 return Radix ** (Model_Emin_Value (Id) - 1);
7621 end Model_Small_Value;
7623 ------------------------
7624 -- Machine_Emax_Value --
7625 ------------------------
7627 function Machine_Emax_Value (Id : E) return Uint is
7628 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7631 case Float_Rep (Id) is
7634 when 1 .. 6 => return Uint_128;
7635 when 7 .. 15 => return 2**10;
7636 when 16 .. 33 => return 2**14;
7637 when others => return No_Uint;
7641 return Uint_2 ** Uint_7 - Uint_1;
7643 end Machine_Emax_Value;
7645 ------------------------
7646 -- Machine_Emin_Value --
7647 ------------------------
7649 function Machine_Emin_Value (Id : E) return Uint is
7651 case Float_Rep (Id) is
7652 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7653 when AAMP => return -Machine_Emax_Value (Id);
7655 end Machine_Emin_Value;
7657 ----------------------------
7658 -- Machine_Mantissa_Value --
7659 ----------------------------
7661 function Machine_Mantissa_Value (Id : E) return Uint is
7662 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7665 case Float_Rep (Id) is
7668 when 1 .. 6 => return Uint_24;
7669 when 7 .. 15 => return UI_From_Int (53);
7670 when 16 .. 18 => return Uint_64;
7671 when 19 .. 33 => return UI_From_Int (113);
7672 when others => return No_Uint;
7677 when 1 .. 6 => return Uint_24;
7678 when 7 .. 9 => return UI_From_Int (40);
7679 when others => return No_Uint;
7682 end Machine_Mantissa_Value;
7684 -------------------------
7685 -- Machine_Radix_Value --
7686 -------------------------
7688 function Machine_Radix_Value (Id : E) return U is
7690 case Float_Rep (Id) is
7691 when IEEE_Binary | AAMP =>
7694 end Machine_Radix_Value;
7696 --------------------
7697 -- Next_Component --
7698 --------------------
7700 function Next_Component (Id : E) return E is
7704 Comp_Id := Next_Entity (Id);
7705 while Present (Comp_Id) loop
7706 exit when Ekind (Comp_Id) = E_Component;
7707 Comp_Id := Next_Entity (Comp_Id);
7713 ------------------------------------
7714 -- Next_Component_Or_Discriminant --
7715 ------------------------------------
7717 function Next_Component_Or_Discriminant (Id : E) return E is
7721 Comp_Id := Next_Entity (Id);
7722 while Present (Comp_Id) loop
7723 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7724 Comp_Id := Next_Entity (Comp_Id);
7728 end Next_Component_Or_Discriminant;
7730 -----------------------
7731 -- Next_Discriminant --
7732 -----------------------
7734 -- This function actually implements both Next_Discriminant and
7735 -- Next_Stored_Discriminant by making sure that the Discriminant
7736 -- returned is of the same variety as Id.
7738 function Next_Discriminant (Id : E) return E is
7740 -- Derived Tagged types with private extensions look like this...
7742 -- E_Discriminant d1
7743 -- E_Discriminant d2
7745 -- E_Discriminant d1
7746 -- E_Discriminant d2
7749 -- so it is critical not to go past the leading discriminants
7754 pragma Assert (Ekind (Id) = E_Discriminant);
7757 D := Next_Entity (D);
7759 or else (Ekind (D) /= E_Discriminant
7760 and then not Is_Itype (D))
7765 exit when Ekind (D) = E_Discriminant
7766 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7770 end Next_Discriminant;
7776 function Next_Formal (Id : E) return E is
7780 -- Follow the chain of declared entities as long as the kind of the
7781 -- entity corresponds to a formal parameter. Skip internal entities
7782 -- that may have been created for implicit subtypes, in the process
7783 -- of analyzing default expressions.
7787 P := Next_Entity (P);
7789 if No (P) or else Is_Formal (P) then
7791 elsif not Is_Internal (P) then
7797 -----------------------------
7798 -- Next_Formal_With_Extras --
7799 -----------------------------
7801 function Next_Formal_With_Extras (Id : E) return E is
7803 if Present (Extra_Formal (Id)) then
7804 return Extra_Formal (Id);
7806 return Next_Formal (Id);
7808 end Next_Formal_With_Extras;
7814 function Next_Index (Id : Node_Id) return Node_Id is
7823 function Next_Literal (Id : E) return E is
7825 pragma Assert (Nkind (Id) in N_Entity);
7829 ------------------------------
7830 -- Next_Stored_Discriminant --
7831 ------------------------------
7833 function Next_Stored_Discriminant (Id : E) return E is
7835 -- See comment in Next_Discriminant
7837 return Next_Discriminant (Id);
7838 end Next_Stored_Discriminant;
7840 -----------------------
7841 -- Number_Dimensions --
7842 -----------------------
7844 function Number_Dimensions (Id : E) return Pos is
7849 if Ekind (Id) = E_String_Literal_Subtype then
7854 T := First_Index (Id);
7855 while Present (T) loop
7862 end Number_Dimensions;
7864 --------------------
7865 -- Number_Entries --
7866 --------------------
7868 function Number_Entries (Id : E) return Nat is
7873 pragma Assert (Is_Concurrent_Type (Id));
7876 Ent := First_Entity (Id);
7877 while Present (Ent) loop
7878 if Is_Entry (Ent) then
7882 Ent := Next_Entity (Ent);
7888 --------------------
7889 -- Number_Formals --
7890 --------------------
7892 function Number_Formals (Id : E) return Pos is
7898 Formal := First_Formal (Id);
7899 while Present (Formal) loop
7901 Formal := Next_Formal (Formal);
7907 --------------------
7908 -- Parameter_Mode --
7909 --------------------
7911 function Parameter_Mode (Id : E) return Formal_Kind is
7916 ------------------------
7917 -- Predicate_Function --
7918 ------------------------
7920 function Predicate_Function (Id : E) return E is
7925 pragma Assert (Is_Type (Id));
7927 -- If type is private and has a completion, predicate may be defined
7928 -- on the full view.
7930 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7931 T := Full_View (Id);
7936 if No (Subprograms_For_Type (T)) then
7940 S := Subprograms_For_Type (T);
7941 while Present (S) loop
7942 if Is_Predicate_Function (S) then
7945 S := Subprograms_For_Type (S);
7951 end Predicate_Function;
7953 --------------------------
7954 -- Predicate_Function_M --
7955 --------------------------
7957 function Predicate_Function_M (Id : E) return E is
7962 pragma Assert (Is_Type (Id));
7964 -- If type is private and has a completion, predicate may be defined
7965 -- on the full view.
7967 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7968 T := Full_View (Id);
7973 if No (Subprograms_For_Type (T)) then
7977 S := Subprograms_For_Type (T);
7978 while Present (S) loop
7979 if Is_Predicate_Function_M (S) then
7982 S := Subprograms_For_Type (S);
7988 end Predicate_Function_M;
7990 -------------------------
7991 -- Present_In_Rep_Item --
7992 -------------------------
7994 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7998 Ritem := First_Rep_Item (E);
8000 while Present (Ritem) loop
8005 Next_Rep_Item (Ritem);
8009 end Present_In_Rep_Item;
8011 --------------------------
8012 -- Primitive_Operations --
8013 --------------------------
8015 function Primitive_Operations (Id : E) return L is
8017 if Is_Concurrent_Type (Id) then
8018 if Present (Corresponding_Record_Type (Id)) then
8019 return Direct_Primitive_Operations
8020 (Corresponding_Record_Type (Id));
8022 -- If expansion is disabled the corresponding record type is absent,
8023 -- but if the type has ancestors it may have primitive operations.
8025 elsif Is_Tagged_Type (Id) then
8026 return Direct_Primitive_Operations (Id);
8032 return Direct_Primitive_Operations (Id);
8034 end Primitive_Operations;
8036 ---------------------
8037 -- Record_Rep_Item --
8038 ---------------------
8040 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8042 Set_Next_Rep_Item (N, First_Rep_Item (E));
8043 Set_First_Rep_Item (E, N);
8044 end Record_Rep_Item;
8050 function Root_Type (Id : E) return E is
8054 pragma Assert (Nkind (Id) in N_Entity);
8056 T := Base_Type (Id);
8058 if Ekind (T) = E_Class_Wide_Type then
8070 -- Following test catches some error cases resulting from
8073 elsif No (Etyp) then
8074 Check_Error_Detected;
8077 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8080 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8086 -- Return if there is a circularity in the inheritance chain. This
8087 -- happens in some error situations and we do not want to get
8088 -- stuck in this loop.
8090 if T = Base_Type (Id) then
8097 ---------------------
8098 -- Safe_Emax_Value --
8099 ---------------------
8101 function Safe_Emax_Value (Id : E) return Uint is
8103 return Machine_Emax_Value (Id);
8104 end Safe_Emax_Value;
8106 ----------------------
8107 -- Safe_First_Value --
8108 ----------------------
8110 function Safe_First_Value (Id : E) return Ureal is
8112 return -Safe_Last_Value (Id);
8113 end Safe_First_Value;
8115 ---------------------
8116 -- Safe_Last_Value --
8117 ---------------------
8119 function Safe_Last_Value (Id : E) return Ureal is
8120 Radix : constant Uint := Machine_Radix_Value (Id);
8121 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8122 Emax : constant Uint := Safe_Emax_Value (Id);
8123 Significand : constant Uint := Radix ** Mantissa - 1;
8124 Exponent : constant Uint := Emax - Mantissa;
8130 (Num => Significand * 2 ** (Exponent mod 4),
8131 Den => -Exponent / 4,
8136 (Num => Significand,
8140 end Safe_Last_Value;
8146 function Scope_Depth (Id : E) return Uint is
8151 while Is_Record_Type (Scop) loop
8152 Scop := Scope (Scop);
8155 return Scope_Depth_Value (Scop);
8158 ---------------------
8159 -- Scope_Depth_Set --
8160 ---------------------
8162 function Scope_Depth_Set (Id : E) return B is
8164 return not Is_Record_Type (Id)
8165 and then Field22 (Id) /= Union_Id (Empty);
8166 end Scope_Depth_Set;
8168 -----------------------------
8169 -- Set_Component_Alignment --
8170 -----------------------------
8172 -- Component Alignment is encoded using two flags, Flag128/129 as
8173 -- follows. Note that both flags False = Align_Default, so that the
8174 -- default initialization of flags to False initializes component
8175 -- alignment to the default value as required.
8177 -- Flag128 Flag129 Value
8178 -- ------- ------- -----
8179 -- False False Calign_Default
8180 -- False True Calign_Component_Size
8181 -- True False Calign_Component_Size_4
8182 -- True True Calign_Storage_Unit
8184 procedure Set_Component_Alignment (Id : E; V : C) is
8186 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8187 and then Is_Base_Type (Id));
8190 when Calign_Default =>
8191 Set_Flag128 (Id, False);
8192 Set_Flag129 (Id, False);
8194 when Calign_Component_Size =>
8195 Set_Flag128 (Id, False);
8196 Set_Flag129 (Id, True);
8198 when Calign_Component_Size_4 =>
8199 Set_Flag128 (Id, True);
8200 Set_Flag129 (Id, False);
8202 when Calign_Storage_Unit =>
8203 Set_Flag128 (Id, True);
8204 Set_Flag129 (Id, True);
8206 end Set_Component_Alignment;
8208 -------------------------------------
8209 -- Set_Default_Init_Cond_Procedure --
8210 -------------------------------------
8212 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8217 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8219 Has_Inherited_Default_Init_Cond (Id)));
8221 S := Subprograms_For_Type (Id);
8222 Set_Subprograms_For_Type (Id, V);
8223 Set_Subprograms_For_Type (V, S);
8225 -- Check for a duplicate procedure
8227 while Present (S) loop
8228 if Is_Default_Init_Cond_Procedure (S) then
8229 raise Program_Error;
8232 S := Subprograms_For_Type (S);
8234 end Set_Default_Init_Cond_Procedure;
8236 -----------------------------
8237 -- Set_Invariant_Procedure --
8238 -----------------------------
8240 procedure Set_Invariant_Procedure (Id : E; V : E) is
8244 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8246 S := Subprograms_For_Type (Id);
8247 Set_Subprograms_For_Type (Id, V);
8248 Set_Subprograms_For_Type (V, S);
8250 -- Check for duplicate entry
8252 while Present (S) loop
8253 if Is_Invariant_Procedure (S) then
8254 raise Program_Error;
8256 S := Subprograms_For_Type (S);
8259 end Set_Invariant_Procedure;
8261 ----------------------------
8262 -- Set_Predicate_Function --
8263 ----------------------------
8265 procedure Set_Predicate_Function (Id : E; V : E) is
8269 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8271 S := Subprograms_For_Type (Id);
8272 Set_Subprograms_For_Type (Id, V);
8273 Set_Subprograms_For_Type (V, S);
8275 while Present (S) loop
8276 if Is_Predicate_Function (S) then
8277 raise Program_Error;
8279 S := Subprograms_For_Type (S);
8282 end Set_Predicate_Function;
8284 ------------------------------
8285 -- Set_Predicate_Function_M --
8286 ------------------------------
8288 procedure Set_Predicate_Function_M (Id : E; V : E) is
8292 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8294 S := Subprograms_For_Type (Id);
8295 Set_Subprograms_For_Type (Id, V);
8296 Set_Subprograms_For_Type (V, S);
8298 -- Check for duplicates
8300 while Present (S) loop
8301 if Is_Predicate_Function_M (S) then
8302 raise Program_Error;
8304 S := Subprograms_For_Type (S);
8307 end Set_Predicate_Function_M;
8313 function Size_Clause (Id : E) return N is
8315 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8318 ------------------------
8319 -- Stream_Size_Clause --
8320 ------------------------
8322 function Stream_Size_Clause (Id : E) return N is
8324 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8325 end Stream_Size_Clause;
8331 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8337 Kind := E_Access_Subtype;
8341 Kind := E_Array_Subtype;
8343 when E_Class_Wide_Type |
8344 E_Class_Wide_Subtype =>
8345 Kind := E_Class_Wide_Subtype;
8347 when E_Decimal_Fixed_Point_Type |
8348 E_Decimal_Fixed_Point_Subtype =>
8349 Kind := E_Decimal_Fixed_Point_Subtype;
8351 when E_Ordinary_Fixed_Point_Type |
8352 E_Ordinary_Fixed_Point_Subtype =>
8353 Kind := E_Ordinary_Fixed_Point_Subtype;
8355 when E_Private_Type |
8356 E_Private_Subtype =>
8357 Kind := E_Private_Subtype;
8359 when E_Limited_Private_Type |
8360 E_Limited_Private_Subtype =>
8361 Kind := E_Limited_Private_Subtype;
8363 when E_Record_Type_With_Private |
8364 E_Record_Subtype_With_Private =>
8365 Kind := E_Record_Subtype_With_Private;
8367 when E_Record_Type |
8369 Kind := E_Record_Subtype;
8371 when Enumeration_Kind =>
8372 Kind := E_Enumeration_Subtype;
8375 Kind := E_Floating_Point_Subtype;
8377 when Signed_Integer_Kind =>
8378 Kind := E_Signed_Integer_Subtype;
8380 when Modular_Integer_Kind =>
8381 Kind := E_Modular_Integer_Subtype;
8383 when Protected_Kind =>
8384 Kind := E_Protected_Subtype;
8387 Kind := E_Task_Subtype;
8391 raise Program_Error;
8397 ---------------------
8398 -- Type_High_Bound --
8399 ---------------------
8401 function Type_High_Bound (Id : E) return Node_Id is
8402 Rng : constant Node_Id := Scalar_Range (Id);
8404 if Nkind (Rng) = N_Subtype_Indication then
8405 return High_Bound (Range_Expression (Constraint (Rng)));
8407 return High_Bound (Rng);
8409 end Type_High_Bound;
8411 --------------------
8412 -- Type_Low_Bound --
8413 --------------------
8415 function Type_Low_Bound (Id : E) return Node_Id is
8416 Rng : constant Node_Id := Scalar_Range (Id);
8418 if Nkind (Rng) = N_Subtype_Indication then
8419 return Low_Bound (Range_Expression (Constraint (Rng)));
8421 return Low_Bound (Rng);
8425 ---------------------
8426 -- Underlying_Type --
8427 ---------------------
8429 function Underlying_Type (Id : E) return E is
8431 -- For record_with_private the underlying type is always the direct
8432 -- full view. Never try to take the full view of the parent it
8433 -- doesn't make sense.
8435 if Ekind (Id) = E_Record_Type_With_Private then
8436 return Full_View (Id);
8438 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8440 -- If we have an incomplete or private type with a full view,
8441 -- then we return the Underlying_Type of this full view.
8443 if Present (Full_View (Id)) then
8444 if Id = Full_View (Id) then
8446 -- Previous error in declaration
8451 return Underlying_Type (Full_View (Id));
8454 -- If we have a private type with an underlying full view, then we
8455 -- return the Underlying_Type of this underlying full view.
8457 elsif Ekind (Id) in Private_Kind
8458 and then Present (Underlying_Full_View (Id))
8460 return Underlying_Type (Underlying_Full_View (Id));
8462 -- If we have an incomplete entity that comes from the limited
8463 -- view then we return the Underlying_Type of its non-limited
8466 elsif From_Limited_With (Id)
8467 and then Present (Non_Limited_View (Id))
8469 return Underlying_Type (Non_Limited_View (Id));
8471 -- Otherwise check for the case where we have a derived type or
8472 -- subtype, and if so get the Underlying_Type of the parent type.
8474 elsif Etype (Id) /= Id then
8475 return Underlying_Type (Etype (Id));
8477 -- Otherwise we have an incomplete or private type that has
8478 -- no full view, which means that we have not encountered the
8479 -- completion, so return Empty to indicate the underlying type
8480 -- is not yet known.
8486 -- For non-incomplete, non-private types, return the type itself Also
8487 -- for entities that are not types at all return the entity itself.
8492 end Underlying_Type;
8494 ------------------------
8495 -- Write_Entity_Flags --
8496 ------------------------
8498 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8500 procedure W (Flag_Name : String; Flag : Boolean);
8501 -- Write out given flag if it is set
8507 procedure W (Flag_Name : String; Flag : Boolean) is
8511 Write_Str (Flag_Name);
8512 Write_Str (" = True");
8517 -- Start of processing for Write_Entity_Flags
8520 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8521 and then Is_Base_Type (Id)
8524 Write_Str ("Component_Alignment = ");
8526 case Component_Alignment (Id) is
8527 when Calign_Default =>
8528 Write_Str ("Calign_Default");
8530 when Calign_Component_Size =>
8531 Write_Str ("Calign_Component_Size");
8533 when Calign_Component_Size_4 =>
8534 Write_Str ("Calign_Component_Size_4");
8536 when Calign_Storage_Unit =>
8537 Write_Str ("Calign_Storage_Unit");
8543 W ("Address_Taken", Flag104 (Id));
8544 W ("Body_Needed_For_SAL", Flag40 (Id));
8545 W ("C_Pass_By_Copy", Flag125 (Id));
8546 W ("Can_Never_Be_Null", Flag38 (Id));
8547 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8548 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8549 W ("Debug_Info_Off", Flag166 (Id));
8550 W ("Default_Expressions_Processed", Flag108 (Id));
8551 W ("Delay_Cleanups", Flag114 (Id));
8552 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8553 W ("Depends_On_Private", Flag14 (Id));
8554 W ("Discard_Names", Flag88 (Id));
8555 W ("Elaboration_Entity_Required", Flag174 (Id));
8556 W ("Elaborate_Body_Desirable", Flag210 (Id));
8557 W ("Entry_Accepted", Flag152 (Id));
8558 W ("Can_Use_Internal_Rep", Flag229 (Id));
8559 W ("Finalize_Storage_Only", Flag158 (Id));
8560 W ("From_Limited_With", Flag159 (Id));
8561 W ("Has_Aliased_Components", Flag135 (Id));
8562 W ("Has_Alignment_Clause", Flag46 (Id));
8563 W ("Has_All_Calls_Remote", Flag79 (Id));
8564 W ("Has_Anonymous_Master", Flag253 (Id));
8565 W ("Has_Atomic_Components", Flag86 (Id));
8566 W ("Has_Biased_Representation", Flag139 (Id));
8567 W ("Has_Completion", Flag26 (Id));
8568 W ("Has_Completion_In_Body", Flag71 (Id));
8569 W ("Has_Complex_Representation", Flag140 (Id));
8570 W ("Has_Component_Size_Clause", Flag68 (Id));
8571 W ("Has_Contiguous_Rep", Flag181 (Id));
8572 W ("Has_Controlled_Component", Flag43 (Id));
8573 W ("Has_Controlling_Result", Flag98 (Id));
8574 W ("Has_Convention_Pragma", Flag119 (Id));
8575 W ("Has_Default_Aspect", Flag39 (Id));
8576 W ("Has_Default_Init_Cond", Flag3 (Id));
8577 W ("Has_Delayed_Aspects", Flag200 (Id));
8578 W ("Has_Delayed_Freeze", Flag18 (Id));
8579 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8580 W ("Has_Discriminants", Flag5 (Id));
8581 W ("Has_Dispatch_Table", Flag220 (Id));
8582 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8583 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8584 W ("Has_Exit", Flag47 (Id));
8585 W ("Has_Expanded_Contract", Flag240 (Id));
8586 W ("Has_Forward_Instantiation", Flag175 (Id));
8587 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8588 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8589 W ("Has_Homonym", Flag56 (Id));
8590 W ("Has_Implicit_Dereference", Flag251 (Id));
8591 W ("Has_Independent_Components", Flag34 (Id));
8592 W ("Has_Inheritable_Invariants", Flag248 (Id));
8593 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8594 W ("Has_Initial_Value", Flag219 (Id));
8595 W ("Has_Invariants", Flag232 (Id));
8596 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8597 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8598 W ("Has_Master_Entity", Flag21 (Id));
8599 W ("Has_Missing_Return", Flag142 (Id));
8600 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8601 W ("Has_Nested_Subprogram", Flag282 (Id));
8602 W ("Has_Non_Standard_Rep", Flag75 (Id));
8603 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8604 W ("Has_Object_Size_Clause", Flag172 (Id));
8605 W ("Has_Per_Object_Constraint", Flag154 (Id));
8606 W ("Has_Pragma_Controlled", Flag27 (Id));
8607 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8608 W ("Has_Pragma_Inline", Flag157 (Id));
8609 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8610 W ("Has_Pragma_No_Inline", Flag201 (Id));
8611 W ("Has_Pragma_Ordered", Flag198 (Id));
8612 W ("Has_Pragma_Pack", Flag121 (Id));
8613 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8614 W ("Has_Pragma_Pure", Flag203 (Id));
8615 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8616 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8617 W ("Has_Pragma_Unmodified", Flag233 (Id));
8618 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8619 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8620 W ("Has_Predicates", Flag250 (Id));
8621 W ("Has_Primitive_Operations", Flag120 (Id));
8622 W ("Has_Private_Ancestor", Flag151 (Id));
8623 W ("Has_Private_Declaration", Flag155 (Id));
8624 W ("Has_Protected", Flag271 (Id));
8625 W ("Has_Qualified_Name", Flag161 (Id));
8626 W ("Has_RACW", Flag214 (Id));
8627 W ("Has_Record_Rep_Clause", Flag65 (Id));
8628 W ("Has_Recursive_Call", Flag143 (Id));
8629 W ("Has_Shift_Operator", Flag267 (Id));
8630 W ("Has_Size_Clause", Flag29 (Id));
8631 W ("Has_Small_Clause", Flag67 (Id));
8632 W ("Has_Specified_Layout", Flag100 (Id));
8633 W ("Has_Specified_Stream_Input", Flag190 (Id));
8634 W ("Has_Specified_Stream_Output", Flag191 (Id));
8635 W ("Has_Specified_Stream_Read", Flag192 (Id));
8636 W ("Has_Specified_Stream_Write", Flag193 (Id));
8637 W ("Has_Static_Discriminants", Flag211 (Id));
8638 W ("Has_Static_Predicate", Flag269 (Id));
8639 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8640 W ("Has_Storage_Size_Clause", Flag23 (Id));
8641 W ("Has_Stream_Size_Clause", Flag184 (Id));
8642 W ("Has_Task", Flag30 (Id));
8643 W ("Has_Thunks", Flag228 (Id));
8644 W ("Has_Unchecked_Union", Flag123 (Id));
8645 W ("Has_Unknown_Discriminants", Flag72 (Id));
8646 W ("Has_Uplevel_Reference", Flag215 (Id));
8647 W ("Has_Visible_Refinement", Flag263 (Id));
8648 W ("Has_Volatile_Components", Flag87 (Id));
8649 W ("Has_Xref_Entry", Flag182 (Id));
8650 W ("In_Package_Body", Flag48 (Id));
8651 W ("In_Private_Part", Flag45 (Id));
8652 W ("In_Use", Flag8 (Id));
8653 W ("Is_Abstract_Subprogram", Flag19 (Id));
8654 W ("Is_Abstract_Type", Flag146 (Id));
8655 W ("Is_Access_Constant", Flag69 (Id));
8656 W ("Is_Ada_2005_Only", Flag185 (Id));
8657 W ("Is_Ada_2012_Only", Flag199 (Id));
8658 W ("Is_Aliased", Flag15 (Id));
8659 W ("Is_Asynchronous", Flag81 (Id));
8660 W ("Is_Atomic", Flag85 (Id));
8661 W ("Is_Bit_Packed_Array", Flag122 (Id));
8662 W ("Is_CPP_Class", Flag74 (Id));
8663 W ("Is_Called", Flag102 (Id));
8664 W ("Is_Character_Type", Flag63 (Id));
8665 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8666 W ("Is_Child_Unit", Flag73 (Id));
8667 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8668 W ("Is_Compilation_Unit", Flag149 (Id));
8669 W ("Is_Completely_Hidden", Flag103 (Id));
8670 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8671 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8672 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8673 W ("Is_Constrained", Flag12 (Id));
8674 W ("Is_Constructor", Flag76 (Id));
8675 W ("Is_Controlled", Flag42 (Id));
8676 W ("Is_Controlling_Formal", Flag97 (Id));
8677 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8678 W ("Is_Descendent_Of_Address", Flag223 (Id));
8679 W ("Is_Discrim_SO_Function", Flag176 (Id));
8680 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8681 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8682 W ("Is_Dispatching_Operation", Flag6 (Id));
8683 W ("Is_Eliminated", Flag124 (Id));
8684 W ("Is_Entry_Formal", Flag52 (Id));
8685 W ("Is_Exported", Flag99 (Id));
8686 W ("Is_First_Subtype", Flag70 (Id));
8687 W ("Is_For_Access_Subtype", Flag118 (Id));
8688 W ("Is_Formal_Subprogram", Flag111 (Id));
8689 W ("Is_Frozen", Flag4 (Id));
8690 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8691 W ("Is_Generic_Actual_Type", Flag94 (Id));
8692 W ("Is_Generic_Instance", Flag130 (Id));
8693 W ("Is_Generic_Type", Flag13 (Id));
8694 W ("Is_Hidden", Flag57 (Id));
8695 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8696 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8697 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8698 W ("Is_Immediately_Visible", Flag7 (Id));
8699 W ("Is_Implementation_Defined", Flag254 (Id));
8700 W ("Is_Imported", Flag24 (Id));
8701 W ("Is_Independent", Flag268 (Id));
8702 W ("Is_Inlined", Flag11 (Id));
8703 W ("Is_Inlined_Always", Flag1 (Id));
8704 W ("Is_Instantiated", Flag126 (Id));
8705 W ("Is_Interface", Flag186 (Id));
8706 W ("Is_Internal", Flag17 (Id));
8707 W ("Is_Interrupt_Handler", Flag89 (Id));
8708 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8709 W ("Is_Invariant_Procedure", Flag257 (Id));
8710 W ("Is_Itype", Flag91 (Id));
8711 W ("Is_Known_Non_Null", Flag37 (Id));
8712 W ("Is_Known_Null", Flag204 (Id));
8713 W ("Is_Known_Valid", Flag170 (Id));
8714 W ("Is_Limited_Composite", Flag106 (Id));
8715 W ("Is_Limited_Interface", Flag197 (Id));
8716 W ("Is_Limited_Record", Flag25 (Id));
8717 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8718 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8719 W ("Is_Non_Static_Subtype", Flag109 (Id));
8720 W ("Is_Null_Init_Proc", Flag178 (Id));
8721 W ("Is_Obsolescent", Flag153 (Id));
8722 W ("Is_Only_Out_Parameter", Flag226 (Id));
8723 W ("Is_Package_Body_Entity", Flag160 (Id));
8724 W ("Is_Packed", Flag51 (Id));
8725 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8726 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8727 W ("Is_Predicate_Function", Flag255 (Id));
8728 W ("Is_Predicate_Function_M", Flag256 (Id));
8729 W ("Is_Preelaborated", Flag59 (Id));
8730 W ("Is_Primitive", Flag218 (Id));
8731 W ("Is_Primitive_Wrapper", Flag195 (Id));
8732 W ("Is_Private_Composite", Flag107 (Id));
8733 W ("Is_Private_Descendant", Flag53 (Id));
8734 W ("Is_Private_Primitive", Flag245 (Id));
8735 W ("Is_Processed_Transient", Flag252 (Id));
8736 W ("Is_Public", Flag10 (Id));
8737 W ("Is_Pure", Flag44 (Id));
8738 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8739 W ("Is_RACW_Stub_Type", Flag244 (Id));
8740 W ("Is_Raised", Flag224 (Id));
8741 W ("Is_Remote_Call_Interface", Flag62 (Id));
8742 W ("Is_Remote_Types", Flag61 (Id));
8743 W ("Is_Renaming_Of_Object", Flag112 (Id));
8744 W ("Is_Return_Object", Flag209 (Id));
8745 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8746 W ("Is_Shared_Passive", Flag60 (Id));
8747 W ("Is_Static_Type", Flag281 (Id));
8748 W ("Is_Statically_Allocated", Flag28 (Id));
8749 W ("Is_Tag", Flag78 (Id));
8750 W ("Is_Tagged_Type", Flag55 (Id));
8751 W ("Is_Thunk", Flag225 (Id));
8752 W ("Is_Trivial_Subprogram", Flag235 (Id));
8753 W ("Is_True_Constant", Flag163 (Id));
8754 W ("Is_Unchecked_Union", Flag117 (Id));
8755 W ("Is_Underlying_Record_View", Flag246 (Id));
8756 W ("Is_Unsigned_Type", Flag144 (Id));
8757 W ("Is_Valued_Procedure", Flag127 (Id));
8758 W ("Is_Visible_Formal", Flag206 (Id));
8759 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8760 W ("Is_Volatile", Flag16 (Id));
8761 W ("Itype_Printed", Flag202 (Id));
8762 W ("Kill_Elaboration_Checks", Flag32 (Id));
8763 W ("Kill_Range_Checks", Flag33 (Id));
8764 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8765 W ("Low_Bound_Tested", Flag205 (Id));
8766 W ("Machine_Radix_10", Flag84 (Id));
8767 W ("Materialize_Entity", Flag168 (Id));
8768 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8769 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8770 W ("Must_Have_Preelab_Init", Flag208 (Id));
8771 W ("Needs_Debug_Info", Flag147 (Id));
8772 W ("Needs_No_Actuals", Flag22 (Id));
8773 W ("Never_Set_In_Source", Flag115 (Id));
8774 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8775 W ("No_Pool_Assigned", Flag131 (Id));
8776 W ("No_Predicate_On_actual", Flag275 (Id));
8777 W ("No_Return", Flag113 (Id));
8778 W ("No_Strict_Aliasing", Flag136 (Id));
8779 W ("Non_Binary_Modulus", Flag58 (Id));
8780 W ("Nonzero_Is_True", Flag162 (Id));
8781 W ("OK_To_Rename", Flag247 (Id));
8782 W ("OK_To_Reorder_Components", Flag239 (Id));
8783 W ("Optimize_Alignment_Space", Flag241 (Id));
8784 W ("Optimize_Alignment_Time", Flag242 (Id));
8785 W ("Overlays_Constant", Flag243 (Id));
8786 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8787 W ("Reachable", Flag49 (Id));
8788 W ("Referenced", Flag156 (Id));
8789 W ("Referenced_As_LHS", Flag36 (Id));
8790 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8791 W ("Renamed_In_Spec", Flag231 (Id));
8792 W ("Requires_Overriding", Flag213 (Id));
8793 W ("Return_Present", Flag54 (Id));
8794 W ("Returns_By_Ref", Flag90 (Id));
8795 W ("Returns_Limited_View", Flag134 (Id));
8796 W ("Reverse_Bit_Order", Flag164 (Id));
8797 W ("Reverse_Storage_Order", Flag93 (Id));
8798 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8799 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8800 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8801 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8802 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8803 W ("SSO_Set_High_By_Default", Flag273 (Id));
8804 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8805 W ("Static_Elaboration_Desired", Flag77 (Id));
8806 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8807 W ("Strict_Alignment", Flag145 (Id));
8808 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8809 W ("Suppress_Initialization", Flag105 (Id));
8810 W ("Suppress_Style_Checks", Flag165 (Id));
8811 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8812 W ("Treat_As_Volatile", Flag41 (Id));
8813 W ("Universal_Aliasing", Flag216 (Id));
8814 W ("Uplevel_Reference_Noted", Flag283 (Id));
8815 W ("Used_As_Generic_Actual", Flag222 (Id));
8816 W ("Uses_Sec_Stack", Flag95 (Id));
8817 W ("Warnings_Off", Flag96 (Id));
8818 W ("Warnings_Off_Used", Flag236 (Id));
8819 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8820 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8821 W ("Was_Hidden", Flag196 (Id));
8822 end Write_Entity_Flags;
8824 -----------------------
8825 -- Write_Entity_Info --
8826 -----------------------
8828 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8830 procedure Write_Attribute (Which : String; Nam : E);
8831 -- Write attribute value with given string name
8833 procedure Write_Kind (Id : Entity_Id);
8834 -- Write Ekind field of entity
8836 ---------------------
8837 -- Write_Attribute --
8838 ---------------------
8840 procedure Write_Attribute (Which : String; Nam : E) is
8844 Write_Int (Int (Nam));
8846 Write_Name (Chars (Nam));
8848 end Write_Attribute;
8854 procedure Write_Kind (Id : Entity_Id) is
8855 K : constant String := Entity_Kind'Image (Ekind (Id));
8859 Write_Str (" Kind ");
8861 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8862 Write_Str ("TAGGED ");
8865 Write_Str (K (3 .. K'Length));
8868 if Is_Type (Id) and then Depends_On_Private (Id) then
8869 Write_Str ("Depends_On_Private ");
8873 -- Start of processing for Write_Entity_Info
8877 Write_Attribute ("Name ", Id);
8878 Write_Int (Int (Id));
8882 Write_Attribute (" Type ", Etype (Id));
8884 Write_Attribute (" Scope ", Scope (Id));
8889 when Discrete_Kind =>
8890 Write_Str ("Bounds: Id = ");
8892 if Present (Scalar_Range (Id)) then
8893 Write_Int (Int (Type_Low_Bound (Id)));
8894 Write_Str (" .. Id = ");
8895 Write_Int (Int (Type_High_Bound (Id)));
8897 Write_Str ("Empty");
8908 (" Component Type ", Component_Type (Id));
8911 Write_Str (" Indexes ");
8913 Index := First_Index (Id);
8914 while Present (Index) loop
8915 Write_Attribute (" ", Etype (Index));
8916 Index := Next_Index (Index);
8924 (" Directly Designated Type ",
8925 Directly_Designated_Type (Id));
8928 when Overloadable_Kind =>
8929 if Present (Homonym (Id)) then
8930 Write_Str (" Homonym ");
8931 Write_Name (Chars (Homonym (Id)));
8933 Write_Int (Int (Homonym (Id)));
8940 if Ekind (Scope (Id)) in Record_Kind then
8942 " Original_Record_Component ",
8943 Original_Record_Component (Id));
8944 Write_Int (Int (Original_Record_Component (Id)));
8948 when others => null;
8950 end Write_Entity_Info;
8952 -----------------------
8953 -- Write_Field6_Name --
8954 -----------------------
8956 procedure Write_Field6_Name (Id : Entity_Id) is
8957 pragma Warnings (Off, Id);
8959 Write_Str ("First_Rep_Item");
8960 end Write_Field6_Name;
8962 -----------------------
8963 -- Write_Field7_Name --
8964 -----------------------
8966 procedure Write_Field7_Name (Id : Entity_Id) is
8967 pragma Warnings (Off, Id);
8969 Write_Str ("Freeze_Node");
8970 end Write_Field7_Name;
8972 -----------------------
8973 -- Write_Field8_Name --
8974 -----------------------
8976 procedure Write_Field8_Name (Id : Entity_Id) is
8980 Write_Str ("Associated_Node_For_Itype");
8983 Write_Str ("Dependent_Instances");
8986 Write_Str ("First_Exit_Statement");
8989 Write_Str ("Hiding_Loop_Variable");
8993 E_Subprogram_Body =>
8994 Write_Str ("Mechanism");
8998 Write_Str ("Normalized_First_Bit");
9000 when E_Abstract_State =>
9001 Write_Str ("Refinement_Constituents");
9003 when E_Return_Statement =>
9004 Write_Str ("Return_Applies_To");
9007 Write_Str ("Field8??");
9009 end Write_Field8_Name;
9011 -----------------------
9012 -- Write_Field9_Name --
9013 -----------------------
9015 procedure Write_Field9_Name (Id : Entity_Id) is
9019 Write_Str ("Class_Wide_Type");
9022 Write_Str ("Current_Value");
9024 when E_Abstract_State =>
9025 Write_Str ("Part_Of_Constituents");
9028 E_Generic_Function |
9030 E_Generic_Procedure |
9033 Write_Str ("Renaming_Map");
9036 Write_Str ("Field9??");
9038 end Write_Field9_Name;
9040 ------------------------
9041 -- Write_Field10_Name --
9042 ------------------------
9044 procedure Write_Field10_Name (Id : Entity_Id) is
9047 when E_Abstract_State |
9049 Write_Str ("Encapsulating_State");
9051 when Class_Wide_Kind |
9057 Write_Str ("Direct_Primitive_Operations");
9060 Write_Str ("Float_Rep");
9062 when E_In_Parameter |
9064 Write_Str ("Discriminal_Link");
9070 Write_Str ("Handler_Records");
9074 Write_Str ("Normalized_Position_Max");
9077 Write_Str ("Field10??");
9079 end Write_Field10_Name;
9081 ------------------------
9082 -- Write_Field11_Name --
9083 ------------------------
9085 procedure Write_Field11_Name (Id : Entity_Id) is
9089 Write_Str ("Block_Node");
9093 Write_Str ("Component_Bit_Offset");
9096 Write_Str ("Entry_Component");
9098 when E_Enumeration_Literal =>
9099 Write_Str ("Enumeration_Pos");
9103 Write_Str ("Full_View");
9105 when E_Generic_Package =>
9106 Write_Str ("Generic_Homonym");
9112 Write_Str ("Protected_Body_Subprogram");
9115 Write_Str ("Field11??");
9117 end Write_Field11_Name;
9119 ------------------------
9120 -- Write_Field12_Name --
9121 ------------------------
9123 procedure Write_Field12_Name (Id : Entity_Id) is
9127 Write_Str ("Associated_Formal_Package");
9130 Write_Str ("Barrier_Function");
9132 when E_Enumeration_Literal =>
9133 Write_Str ("Enumeration_Rep");
9141 E_In_Out_Parameter |
9145 Write_Str ("Esize");
9149 Write_Str ("Next_Inlined_Subprogram");
9152 Write_Str ("Field12??");
9154 end Write_Field12_Name;
9156 ------------------------
9157 -- Write_Field13_Name --
9158 ------------------------
9160 procedure Write_Field13_Name (Id : Entity_Id) is
9165 Write_Str ("Component_Clause");
9168 Write_Str ("Elaboration_Entity");
9172 Generic_Unit_Kind =>
9173 Write_Str ("Elaboration_Entity");
9177 Write_Str ("Extra_Accessibility");
9180 Write_Str ("RM_Size");
9183 Write_Str ("Field13??");
9185 end Write_Field13_Name;
9187 -----------------------
9188 -- Write_Field14_Name --
9189 -----------------------
9191 procedure Write_Field14_Name (Id : Entity_Id) is
9200 Write_Str ("Alignment");
9204 Write_Str ("Normalized_Position");
9210 Write_Str ("Postconditions_Proc");
9212 when E_Generic_Package |
9214 Write_Str ("Shadow_Entities");
9217 Write_Str ("Field14??");
9219 end Write_Field14_Name;
9221 ------------------------
9222 -- Write_Field15_Name --
9223 ------------------------
9225 procedure Write_Field15_Name (Id : Entity_Id) is
9228 when E_Discriminant =>
9229 Write_Str ("Discriminant_Number");
9232 Write_Str ("DT_Entry_Count");
9236 Write_Str ("DT_Position");
9239 Write_Str ("Entry_Parameters_Type");
9242 Write_Str ("Extra_Formal");
9245 Write_Str ("Pending_Access_Types");
9249 Write_Str ("Related_Instance");
9253 Write_Str ("Status_Flag_Or_Transient_Decl");
9256 Write_Str ("Field15??");
9258 end Write_Field15_Name;
9260 ------------------------
9261 -- Write_Field16_Name --
9262 ------------------------
9264 procedure Write_Field16_Name (Id : Entity_Id) is
9267 when E_Record_Type |
9268 E_Record_Type_With_Private =>
9269 Write_Str ("Access_Disp_Table");
9271 when E_Abstract_State =>
9272 Write_Str ("Body_References");
9274 when E_Record_Subtype |
9275 E_Class_Wide_Subtype =>
9276 Write_Str ("Cloned_Subtype");
9280 Write_Str ("DTC_Entity");
9283 Write_Str ("Entry_Formal");
9288 Write_Str ("First_Private_Entity");
9290 when Enumeration_Kind =>
9291 Write_Str ("Lit_Strings");
9293 when Decimal_Fixed_Point_Kind =>
9294 Write_Str ("Scale_Value");
9296 when E_String_Literal_Subtype =>
9297 Write_Str ("String_Literal_Length");
9301 Write_Str ("Unset_Reference");
9304 Write_Str ("Field16??");
9306 end Write_Field16_Name;
9308 ------------------------
9309 -- Write_Field17_Name --
9310 ------------------------
9312 procedure Write_Field17_Name (Id : Entity_Id) is
9317 E_Generic_In_Out_Parameter |
9319 Write_Str ("Actual_Subtype");
9322 Write_Str ("Digits_Value");
9324 when E_Discriminant =>
9325 Write_Str ("Discriminal");
9334 E_Generic_Function |
9336 E_Generic_Procedure |
9344 E_Return_Statement |
9346 E_Subprogram_Type =>
9347 Write_Str ("First_Entity");
9350 Write_Str ("First_Index");
9352 when Enumeration_Kind =>
9353 Write_Str ("First_Literal");
9356 Write_Str ("Master_Id");
9358 when Modular_Integer_Kind =>
9359 Write_Str ("Modulus");
9361 when E_Abstract_State |
9362 E_Incomplete_Type =>
9363 Write_Str ("Non_Limited_View");
9365 when E_Incomplete_Subtype =>
9366 if From_Limited_With (Id) then
9367 Write_Str ("Non_Limited_View");
9371 Write_Str ("Prival");
9374 Write_Str ("Field17??");
9376 end Write_Field17_Name;
9378 ------------------------
9379 -- Write_Field18_Name --
9380 ------------------------
9382 procedure Write_Field18_Name (Id : Entity_Id) is
9385 when E_Enumeration_Literal |
9389 Write_Str ("Alias");
9391 when E_Record_Type =>
9392 Write_Str ("Corresponding_Concurrent_Type");
9394 when E_Subprogram_Body =>
9395 Write_Str ("Corresponding_Protected_Entry");
9397 when Concurrent_Kind =>
9398 Write_Str ("Corresponding_Record_Type");
9403 Write_Str ("Enclosing_Scope");
9405 when E_Entry_Index_Parameter =>
9406 Write_Str ("Entry_Index_Constant");
9408 when E_Class_Wide_Subtype |
9409 E_Access_Protected_Subprogram_Type |
9410 E_Anonymous_Access_Protected_Subprogram_Type |
9411 E_Access_Subprogram_Type |
9413 Write_Str ("Equivalent_Type");
9415 when Fixed_Point_Kind =>
9416 Write_Str ("Delta_Value");
9418 when Enumeration_Kind =>
9419 Write_Str ("Lit_Indexes");
9421 when Incomplete_Or_Private_Kind |
9423 Write_Str ("Private_Dependents");
9426 Write_Str ("Renamed_Object");
9430 E_Generic_Function |
9431 E_Generic_Procedure |
9432 E_Generic_Package =>
9433 Write_Str ("Renamed_Entity");
9435 when E_String_Literal_Subtype =>
9436 Write_Str ("String_Literal_Low_Bound");
9439 Write_Str ("Field18??");
9441 end Write_Field18_Name;
9443 -----------------------
9444 -- Write_Field19_Name --
9445 -----------------------
9447 procedure Write_Field19_Name (Id : Entity_Id) is
9451 E_Generic_Package =>
9452 Write_Str ("Body_Entity");
9454 when E_Discriminant =>
9455 Write_Str ("Corresponding_Discriminant");
9458 Write_Str ("Default_Aspect_Value");
9460 when E_Array_Type =>
9461 Write_Str ("Default_Component_Value");
9463 when E_Protected_Type =>
9464 Write_Str ("Entry_Bodies_Array");
9468 E_Subprogram_Type =>
9469 Write_Str ("Extra_Accessibility_Of_Result");
9471 when E_Record_Type =>
9472 Write_Str ("Parent_Subtype");
9476 Write_Str ("Size_Check_Code");
9478 when E_Package_Body |
9480 Write_Str ("Spec_Entity");
9482 when Private_Kind =>
9483 Write_Str ("Underlying_Full_View");
9486 Write_Str ("Field19??");
9488 end Write_Field19_Name;
9490 -----------------------
9491 -- Write_Field20_Name --
9492 -----------------------
9494 procedure Write_Field20_Name (Id : Entity_Id) is
9498 Write_Str ("Component_Type");
9500 when E_In_Parameter |
9501 E_Generic_In_Parameter =>
9502 Write_Str ("Default_Value");
9505 Write_Str ("Directly_Designated_Type");
9508 Write_Str ("Discriminant_Checking_Func");
9510 when E_Discriminant =>
9511 Write_Str ("Discriminant_Default_Value");
9520 E_Generic_Function |
9522 E_Generic_Procedure |
9530 E_Return_Statement |
9532 E_Subprogram_Type =>
9533 Write_Str ("Last_Entity");
9537 Write_Str ("Prival_Link");
9540 Write_Str ("Scalar_Range");
9543 Write_Str ("Register_Exception_Call");
9546 Write_Str ("Field20??");
9548 end Write_Field20_Name;
9550 -----------------------
9551 -- Write_Field21_Name --
9552 -----------------------
9554 procedure Write_Field21_Name (Id : Entity_Id) is
9558 Write_Str ("Accept_Address");
9560 when E_In_Parameter =>
9561 Write_Str ("Default_Expr_Function");
9563 when Concurrent_Kind |
9564 Incomplete_Or_Private_Kind |
9568 Write_Str ("Discriminant_Constraint");
9573 E_Generic_Function |
9575 E_Generic_Procedure |
9577 Write_Str ("Interface_Name");
9580 Modular_Integer_Kind =>
9581 Write_Str ("Original_Array_Type");
9583 when Fixed_Point_Kind =>
9584 Write_Str ("Small_Value");
9587 Write_Str ("Field21??");
9589 end Write_Field21_Name;
9591 -----------------------
9592 -- Write_Field22_Name --
9593 -----------------------
9595 procedure Write_Field22_Name (Id : Entity_Id) is
9599 Write_Str ("Associated_Storage_Pool");
9602 Write_Str ("Component_Size");
9604 when E_Record_Type =>
9605 Write_Str ("Corresponding_Remote_Type");
9609 Write_Str ("Original_Record_Component");
9611 when E_Enumeration_Literal =>
9612 Write_Str ("Enumeration_Rep_Expr");
9614 when E_Record_Type_With_Private |
9615 E_Record_Subtype_With_Private |
9618 E_Limited_Private_Type |
9619 E_Limited_Private_Subtype =>
9620 Write_Str ("Private_View");
9623 Write_Str ("Protected_Formal");
9633 E_Generic_Function |
9634 E_Generic_Procedure |
9637 E_Return_Statement |
9640 Write_Str ("Scope_Depth_Value");
9643 Write_Str ("Shared_Var_Procs_Instance");
9646 Write_Str ("Field22??");
9648 end Write_Field22_Name;
9650 ------------------------
9651 -- Write_Field23_Name --
9652 ------------------------
9654 procedure Write_Field23_Name (Id : Entity_Id) is
9657 when E_Discriminant =>
9658 Write_Str ("CR_Discriminant");
9661 Write_Str ("Entry_Cancel_Parameter");
9663 when E_Enumeration_Type =>
9664 Write_Str ("Enum_Pos_To_Rep");
9668 Write_Str ("Extra_Constrained");
9671 Write_Str ("Finalization_Master");
9673 when E_Generic_Function |
9675 E_Generic_Procedure =>
9676 Write_Str ("Inner_Instances");
9679 Write_Str ("Packed_Array_Impl_Type");
9682 Write_Str ("Protection_Object");
9684 when Concurrent_Kind |
9685 Incomplete_Or_Private_Kind |
9689 Write_Str ("Stored_Constraint");
9693 if Present (Scope (Id))
9694 and then Is_Protected_Type (Scope (Id))
9696 Write_Str ("Protection_Object");
9698 Write_Str ("Generic_Renamings");
9702 if Is_Generic_Instance (Id) then
9703 Write_Str ("Generic_Renamings");
9705 Write_Str ("Limited_View");
9709 Write_Str ("Field23??");
9711 end Write_Field23_Name;
9713 ------------------------
9714 -- Write_Field24_Name --
9715 ------------------------
9717 procedure Write_Field24_Name (Id : Entity_Id) is
9723 Write_Str ("Related_Expression");
9728 if Field24 (Id) in Uint_Range then
9729 Write_Str ("Subps_Index");
9731 Write_Str ("Uplevel_References");
9735 Write_Str ("Field24???");
9737 end Write_Field24_Name;
9739 ------------------------
9740 -- Write_Field25_Name --
9741 ------------------------
9743 procedure Write_Field25_Name (Id : Entity_Id) is
9746 when E_Generic_Package |
9748 Write_Str ("Abstract_States");
9751 Write_Str ("Debug_Renaming_Link");
9754 Write_Str ("DT_Offset_To_Top_Func");
9758 Write_Str ("Interface_Alias");
9760 when E_Record_Type |
9762 E_Record_Type_With_Private |
9763 E_Record_Subtype_With_Private =>
9764 Write_Str ("Interfaces");
9768 Write_Str ("Related_Array_Object");
9771 Write_Str ("Task_Body_Procedure");
9775 Write_Str ("PPC_Wrapper");
9777 when Discrete_Kind =>
9778 Write_Str ("Static_Discrete_Predicate");
9781 Write_Str ("Static_Real_Or_String_Predicate");
9784 Write_Str ("Field25??");
9786 end Write_Field25_Name;
9788 ------------------------
9789 -- Write_Field26_Name --
9790 ------------------------
9792 procedure Write_Field26_Name (Id : Entity_Id) is
9795 when E_Record_Type |
9796 E_Record_Type_With_Private =>
9797 Write_Str ("Dispatch_Table_Wrappers");
9799 when E_In_Out_Parameter |
9802 Write_Str ("Last_Assignment");
9806 Write_Str ("Overridden_Operation");
9808 when E_Generic_Package |
9810 Write_Str ("Package_Instantiation");
9814 Write_Str ("Related_Type");
9818 Write_Str ("Storage_Size_Variable");
9821 Write_Str ("Field26??");
9823 end Write_Field26_Name;
9825 ------------------------
9826 -- Write_Field27_Name --
9827 ------------------------
9829 procedure Write_Field27_Name (Id : Entity_Id) is
9834 Write_Str ("Current_Use_Clause");
9839 Write_Str ("Related_Type");
9843 Write_Str ("Wrapped_Entity");
9846 Write_Str ("Field27??");
9848 end Write_Field27_Name;
9850 ------------------------
9851 -- Write_Field28_Name --
9852 ------------------------
9854 procedure Write_Field28_Name (Id : Entity_Id) is
9862 E_Subprogram_Type =>
9863 Write_Str ("Extra_Formals");
9867 Write_Str ("Finalizer");
9871 Write_Str ("Initialization_Statements");
9873 when E_Access_Subprogram_Type =>
9874 Write_Str ("Original_Access_Type");
9877 Write_Str ("Relative_Deadline_Variable");
9879 when E_Record_Type =>
9880 Write_Str ("Underlying_Record_View");
9883 Write_Str ("Field28??");
9885 end Write_Field28_Name;
9887 ------------------------
9888 -- Write_Field29_Name --
9889 ------------------------
9891 procedure Write_Field29_Name (Id : Entity_Id) is
9896 Write_Str ("BIP_Initialization_Call");
9899 Write_Str ("Subprograms_For_Type");
9902 Write_Str ("Field29??");
9904 end Write_Field29_Name;
9906 ------------------------
9907 -- Write_Field30_Name --
9908 ------------------------
9910 procedure Write_Field30_Name (Id : Entity_Id) is
9914 Write_Str ("Corresponding_Equality");
9918 Write_Str ("Last_Aggregate_Assignment");
9921 Write_Str ("Static_Initialization");
9924 Write_Str ("Field30??");
9926 end Write_Field30_Name;
9928 ------------------------
9929 -- Write_Field31_Name --
9930 ------------------------
9932 procedure Write_Field31_Name (Id : Entity_Id) is
9937 Write_Str ("Thunk_Entity");
9940 Write_Str ("Derived_Type_Link");
9944 E_In_Out_Parameter |
9948 Write_Str ("Activation_Record_Component");
9951 Write_Str ("Field31??");
9953 end Write_Field31_Name;
9955 ------------------------
9956 -- Write_Field32_Name --
9957 ------------------------
9959 procedure Write_Field32_Name (Id : Entity_Id) is
9963 E_Generic_Function |
9965 E_Generic_Procedure |
9969 E_Subprogram_Body =>
9970 Write_Str ("SPARK_Pragma");
9973 Write_Str ("No_Tagged_Streams_Pragma");
9976 Write_Str ("Field32??");
9978 end Write_Field32_Name;
9980 ------------------------
9981 -- Write_Field33_Name --
9982 ------------------------
9984 procedure Write_Field33_Name (Id : Entity_Id) is
9987 when E_Generic_Package |
9990 Write_Str ("SPARK_Aux_Pragma");
9996 Write_Str ("Linker_Section_Pragma");
9999 Write_Str ("Field33??");
10001 end Write_Field33_Name;
10003 ------------------------
10004 -- Write_Field34_Name --
10005 ------------------------
10007 procedure Write_Field34_Name (Id : Entity_Id) is
10012 E_Generic_Package |
10015 E_Subprogram_Body |
10017 Generic_Subprogram_Kind |
10019 Write_Str ("Contract");
10022 Write_Str ("Field34??");
10024 end Write_Field34_Name;
10026 ------------------------
10027 -- Write_Field35_Name --
10028 ------------------------
10030 procedure Write_Field35_Name (Id : Entity_Id) is
10033 when Subprogram_Kind =>
10034 Write_Str ("Import_Pragma");
10037 Write_Str ("Field35??");
10039 end Write_Field35_Name;
10041 -------------------------
10042 -- Iterator Procedures --
10043 -------------------------
10045 procedure Proc_Next_Component (N : in out Node_Id) is
10047 N := Next_Component (N);
10048 end Proc_Next_Component;
10050 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10052 N := Next_Entity (N);
10053 while Present (N) loop
10054 exit when Ekind_In (N, E_Component, E_Discriminant);
10055 N := Next_Entity (N);
10057 end Proc_Next_Component_Or_Discriminant;
10059 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10061 N := Next_Discriminant (N);
10062 end Proc_Next_Discriminant;
10064 procedure Proc_Next_Formal (N : in out Node_Id) is
10066 N := Next_Formal (N);
10067 end Proc_Next_Formal;
10069 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10071 N := Next_Formal_With_Extras (N);
10072 end Proc_Next_Formal_With_Extras;
10074 procedure Proc_Next_Index (N : in out Node_Id) is
10076 N := Next_Index (N);
10077 end Proc_Next_Index;
10079 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10081 N := Next_Inlined_Subprogram (N);
10082 end Proc_Next_Inlined_Subprogram;
10084 procedure Proc_Next_Literal (N : in out Node_Id) is
10086 N := Next_Literal (N);
10087 end Proc_Next_Literal;
10089 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10091 N := Next_Stored_Discriminant (N);
10092 end Proc_Next_Stored_Discriminant;