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
588 -- Is_ARECnF_Entity Flag284
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_ARECnF_Entity (Id : E) return B is
1906 return Flag284 (Id);
1907 end Is_ARECnF_Entity;
1909 function Is_Local_Anonymous_Access (Id : E) return B is
1911 pragma Assert (Is_Access_Type (Id));
1912 return Flag194 (Id);
1913 end Is_Local_Anonymous_Access;
1915 function Is_Access_Constant (Id : E) return B is
1917 pragma Assert (Is_Access_Type (Id));
1919 end Is_Access_Constant;
1921 function Is_Ada_2005_Only (Id : E) return B is
1923 return Flag185 (Id);
1924 end Is_Ada_2005_Only;
1926 function Is_Ada_2012_Only (Id : E) return B is
1928 return Flag199 (Id);
1929 end Is_Ada_2012_Only;
1931 function Is_Aliased (Id : E) return B is
1933 pragma Assert (Nkind (Id) in N_Entity);
1937 function Is_Asynchronous (Id : E) return B is
1939 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1941 end Is_Asynchronous;
1943 function Is_Atomic (Id : E) return B is
1948 function Is_Bit_Packed_Array (Id : E) return B is
1950 return Flag122 (Implementation_Base_Type (Id));
1951 end Is_Bit_Packed_Array;
1953 function Is_Called (Id : E) return B is
1955 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1956 return Flag102 (Id);
1959 function Is_Character_Type (Id : E) return B is
1962 end Is_Character_Type;
1964 function Is_Checked_Ghost_Entity (Id : E) return B is
1966 pragma Assert (Nkind (Id) in N_Entity);
1967 return Flag277 (Id);
1968 end Is_Checked_Ghost_Entity;
1970 function Is_Child_Unit (Id : E) return B is
1975 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1978 end Is_Class_Wide_Equivalent_Type;
1980 function Is_Compilation_Unit (Id : E) return B is
1982 return Flag149 (Id);
1983 end Is_Compilation_Unit;
1985 function Is_Completely_Hidden (Id : E) return B is
1987 pragma Assert (Ekind (Id) = E_Discriminant);
1988 return Flag103 (Id);
1989 end Is_Completely_Hidden;
1991 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1994 end Is_Constr_Subt_For_U_Nominal;
1996 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1998 return Flag141 (Id);
1999 end Is_Constr_Subt_For_UN_Aliased;
2001 function Is_Constrained (Id : E) return B is
2003 pragma Assert (Nkind (Id) in N_Entity);
2007 function Is_Constructor (Id : E) return B is
2012 function Is_Controlled (Id : E) return B is
2014 return Flag42 (Base_Type (Id));
2017 function Is_Controlling_Formal (Id : E) return B is
2019 pragma Assert (Is_Formal (Id));
2021 end Is_Controlling_Formal;
2023 function Is_CPP_Class (Id : E) return B is
2028 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2030 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2031 return Flag132 (Id);
2032 end Is_Default_Init_Cond_Procedure;
2034 function Is_Descendent_Of_Address (Id : E) return B is
2036 return Flag223 (Id);
2037 end Is_Descendent_Of_Address;
2039 function Is_Discrim_SO_Function (Id : E) return B is
2041 return Flag176 (Id);
2042 end Is_Discrim_SO_Function;
2044 function Is_Discriminant_Check_Function (Id : E) return B is
2046 return Flag264 (Id);
2047 end Is_Discriminant_Check_Function;
2049 function Is_Dispatch_Table_Entity (Id : E) return B is
2051 return Flag234 (Id);
2052 end Is_Dispatch_Table_Entity;
2054 function Is_Dispatching_Operation (Id : E) return B is
2056 pragma Assert (Nkind (Id) in N_Entity);
2058 end Is_Dispatching_Operation;
2060 function Is_Eliminated (Id : E) return B is
2062 return Flag124 (Id);
2065 function Is_Entry_Formal (Id : E) return B is
2068 end Is_Entry_Formal;
2070 function Is_Exported (Id : E) return B is
2075 function Is_First_Subtype (Id : E) return B is
2078 end Is_First_Subtype;
2080 function Is_For_Access_Subtype (Id : E) return B is
2082 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2083 return Flag118 (Id);
2084 end Is_For_Access_Subtype;
2086 function Is_Formal_Subprogram (Id : E) return B is
2088 return Flag111 (Id);
2089 end Is_Formal_Subprogram;
2091 function Is_Frozen (Id : E) return B is
2096 function Is_Generic_Actual_Subprogram (Id : E) return B is
2098 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2099 return Flag274 (Id);
2100 end Is_Generic_Actual_Subprogram;
2102 function Is_Generic_Actual_Type (Id : E) return B is
2104 pragma Assert (Is_Type (Id));
2106 end Is_Generic_Actual_Type;
2108 function Is_Generic_Instance (Id : E) return B is
2110 return Flag130 (Id);
2111 end Is_Generic_Instance;
2113 function Is_Generic_Type (Id : E) return B is
2115 pragma Assert (Nkind (Id) in N_Entity);
2117 end Is_Generic_Type;
2119 function Is_Hidden (Id : E) return B is
2124 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2127 end Is_Hidden_Non_Overridden_Subpgm;
2129 function Is_Hidden_Open_Scope (Id : E) return B is
2131 return Flag171 (Id);
2132 end Is_Hidden_Open_Scope;
2134 function Is_Ignored_Ghost_Entity (Id : E) return B is
2136 pragma Assert (Nkind (Id) in N_Entity);
2137 return Flag278 (Id);
2138 end Is_Ignored_Ghost_Entity;
2140 function Is_Immediately_Visible (Id : E) return B is
2142 pragma Assert (Nkind (Id) in N_Entity);
2144 end Is_Immediately_Visible;
2146 function Is_Implementation_Defined (Id : E) return B is
2148 return Flag254 (Id);
2149 end Is_Implementation_Defined;
2151 function Is_Imported (Id : E) return B is
2156 function Is_Independent (Id : E) return B is
2158 return Flag268 (Id);
2161 function Is_Inlined (Id : E) return B is
2166 function Is_Inlined_Always (Id : E) return B is
2168 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2170 end Is_Inlined_Always;
2172 function Is_Interface (Id : E) return B is
2174 return Flag186 (Id);
2177 function Is_Instantiated (Id : E) return B is
2179 return Flag126 (Id);
2180 end Is_Instantiated;
2182 function Is_Internal (Id : E) return B is
2184 pragma Assert (Nkind (Id) in N_Entity);
2188 function Is_Interrupt_Handler (Id : E) return B is
2190 pragma Assert (Nkind (Id) in N_Entity);
2192 end Is_Interrupt_Handler;
2194 function Is_Intrinsic_Subprogram (Id : E) return B is
2197 end Is_Intrinsic_Subprogram;
2199 function Is_Invariant_Procedure (Id : E) return B is
2201 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2202 return Flag257 (Id);
2203 end Is_Invariant_Procedure;
2205 function Is_Itype (Id : E) return B is
2210 function Is_Known_Non_Null (Id : E) return B is
2213 end Is_Known_Non_Null;
2215 function Is_Known_Null (Id : E) return B is
2217 return Flag204 (Id);
2220 function Is_Known_Valid (Id : E) return B is
2222 return Flag170 (Id);
2225 function Is_Limited_Composite (Id : E) return B is
2227 return Flag106 (Id);
2228 end Is_Limited_Composite;
2230 function Is_Limited_Interface (Id : E) return B is
2232 return Flag197 (Id);
2233 end Is_Limited_Interface;
2235 function Is_Limited_Record (Id : E) return B is
2238 end Is_Limited_Record;
2240 function Is_Machine_Code_Subprogram (Id : E) return B is
2242 pragma Assert (Is_Subprogram (Id));
2243 return Flag137 (Id);
2244 end Is_Machine_Code_Subprogram;
2246 function Is_Non_Static_Subtype (Id : E) return B is
2248 pragma Assert (Is_Type (Id));
2249 return Flag109 (Id);
2250 end Is_Non_Static_Subtype;
2252 function Is_Null_Init_Proc (Id : E) return B is
2254 pragma Assert (Ekind (Id) = E_Procedure);
2255 return Flag178 (Id);
2256 end Is_Null_Init_Proc;
2258 function Is_Obsolescent (Id : E) return B is
2260 return Flag153 (Id);
2263 function Is_Only_Out_Parameter (Id : E) return B is
2265 pragma Assert (Is_Formal (Id));
2266 return Flag226 (Id);
2267 end Is_Only_Out_Parameter;
2269 function Is_Package_Body_Entity (Id : E) return B is
2271 return Flag160 (Id);
2272 end Is_Package_Body_Entity;
2274 function Is_Packed (Id : E) return B is
2276 return Flag51 (Implementation_Base_Type (Id));
2279 function Is_Packed_Array_Impl_Type (Id : E) return B is
2281 return Flag138 (Id);
2282 end Is_Packed_Array_Impl_Type;
2284 function Is_Potentially_Use_Visible (Id : E) return B is
2286 pragma Assert (Nkind (Id) in N_Entity);
2288 end Is_Potentially_Use_Visible;
2290 function Is_Predicate_Function (Id : E) return B is
2292 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2293 return Flag255 (Id);
2294 end Is_Predicate_Function;
2296 function Is_Predicate_Function_M (Id : E) return B is
2298 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2299 return Flag256 (Id);
2300 end Is_Predicate_Function_M;
2302 function Is_Preelaborated (Id : E) return B is
2305 end Is_Preelaborated;
2307 function Is_Primitive (Id : E) return B is
2310 (Is_Overloadable (Id)
2311 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2312 return Flag218 (Id);
2315 function Is_Primitive_Wrapper (Id : E) return B is
2317 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2318 return Flag195 (Id);
2319 end Is_Primitive_Wrapper;
2321 function Is_Private_Composite (Id : E) return B is
2323 pragma Assert (Is_Type (Id));
2324 return Flag107 (Id);
2325 end Is_Private_Composite;
2327 function Is_Private_Descendant (Id : E) return B is
2330 end Is_Private_Descendant;
2332 function Is_Private_Primitive (Id : E) return B is
2334 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2335 return Flag245 (Id);
2336 end Is_Private_Primitive;
2338 function Is_Processed_Transient (Id : E) return B is
2340 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2341 return Flag252 (Id);
2342 end Is_Processed_Transient;
2344 function Is_Public (Id : E) return B is
2346 pragma Assert (Nkind (Id) in N_Entity);
2350 function Is_Pure (Id : E) return B is
2355 function Is_Pure_Unit_Access_Type (Id : E) return B is
2357 pragma Assert (Is_Access_Type (Id));
2358 return Flag189 (Id);
2359 end Is_Pure_Unit_Access_Type;
2361 function Is_RACW_Stub_Type (Id : E) return B is
2363 pragma Assert (Is_Type (Id));
2364 return Flag244 (Id);
2365 end Is_RACW_Stub_Type;
2367 function Is_Raised (Id : E) return B is
2369 pragma Assert (Ekind (Id) = E_Exception);
2370 return Flag224 (Id);
2373 function Is_Remote_Call_Interface (Id : E) return B is
2376 end Is_Remote_Call_Interface;
2378 function Is_Remote_Types (Id : E) return B is
2381 end Is_Remote_Types;
2383 function Is_Renaming_Of_Object (Id : E) return B is
2385 return Flag112 (Id);
2386 end Is_Renaming_Of_Object;
2388 function Is_Return_Object (Id : E) return B is
2390 return Flag209 (Id);
2391 end Is_Return_Object;
2393 function Is_Safe_To_Reevaluate (Id : E) return B is
2395 return Flag249 (Id);
2396 end Is_Safe_To_Reevaluate;
2398 function Is_Shared_Passive (Id : E) return B is
2401 end Is_Shared_Passive;
2403 function Is_Static_Type (Id : E) return B is
2405 pragma Assert (Is_Type (Id));
2406 return Flag281 (Id);
2409 function Is_Statically_Allocated (Id : E) return B is
2412 end Is_Statically_Allocated;
2414 function Is_Tag (Id : E) return B is
2416 pragma Assert (Nkind (Id) in N_Entity);
2420 function Is_Tagged_Type (Id : E) return B is
2425 function Is_Thunk (Id : E) return B is
2427 return Flag225 (Id);
2430 function Is_Trivial_Subprogram (Id : E) return B is
2432 return Flag235 (Id);
2433 end Is_Trivial_Subprogram;
2435 function Is_True_Constant (Id : E) return B is
2437 return Flag163 (Id);
2438 end Is_True_Constant;
2440 function Is_Unchecked_Union (Id : E) return B is
2442 return Flag117 (Implementation_Base_Type (Id));
2443 end Is_Unchecked_Union;
2445 function Is_Underlying_Record_View (Id : E) return B is
2447 return Flag246 (Id);
2448 end Is_Underlying_Record_View;
2450 function Is_Unsigned_Type (Id : E) return B is
2452 pragma Assert (Is_Type (Id));
2453 return Flag144 (Id);
2454 end Is_Unsigned_Type;
2456 function Is_Valued_Procedure (Id : E) return B is
2458 pragma Assert (Ekind (Id) = E_Procedure);
2459 return Flag127 (Id);
2460 end Is_Valued_Procedure;
2462 function Is_Visible_Formal (Id : E) return B is
2464 return Flag206 (Id);
2465 end Is_Visible_Formal;
2467 function Is_Visible_Lib_Unit (Id : E) return B is
2469 return Flag116 (Id);
2470 end Is_Visible_Lib_Unit;
2472 function Is_Volatile (Id : E) return B is
2474 pragma Assert (Nkind (Id) in N_Entity);
2476 if Is_Type (Id) then
2477 return Flag16 (Base_Type (Id));
2483 function Itype_Printed (Id : E) return B is
2485 pragma Assert (Is_Itype (Id));
2486 return Flag202 (Id);
2489 function Kill_Elaboration_Checks (Id : E) return B is
2492 end Kill_Elaboration_Checks;
2494 function Kill_Range_Checks (Id : E) return B is
2497 end Kill_Range_Checks;
2499 function Known_To_Have_Preelab_Init (Id : E) return B is
2501 pragma Assert (Is_Type (Id));
2502 return Flag207 (Id);
2503 end Known_To_Have_Preelab_Init;
2505 function Last_Aggregate_Assignment (Id : E) return N is
2507 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2509 end Last_Aggregate_Assignment;
2511 function Last_Assignment (Id : E) return N is
2513 pragma Assert (Is_Assignable (Id));
2515 end Last_Assignment;
2517 function Last_Entity (Id : E) return E is
2522 function Limited_View (Id : E) return E is
2524 pragma Assert (Ekind (Id) = E_Package);
2528 function Linker_Section_Pragma (Id : E) return N is
2531 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2533 end Linker_Section_Pragma;
2535 function Lit_Indexes (Id : E) return E is
2537 pragma Assert (Is_Enumeration_Type (Id));
2541 function Lit_Strings (Id : E) return E is
2543 pragma Assert (Is_Enumeration_Type (Id));
2547 function Low_Bound_Tested (Id : E) return B is
2549 return Flag205 (Id);
2550 end Low_Bound_Tested;
2552 function Machine_Radix_10 (Id : E) return B is
2554 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2556 end Machine_Radix_10;
2558 function Master_Id (Id : E) return E is
2560 pragma Assert (Is_Access_Type (Id));
2564 function Materialize_Entity (Id : E) return B is
2566 return Flag168 (Id);
2567 end Materialize_Entity;
2569 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2571 return Flag262 (Id);
2572 end May_Inherit_Delayed_Rep_Aspects;
2574 function Mechanism (Id : E) return M is
2576 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2577 return UI_To_Int (Uint8 (Id));
2580 function Modulus (Id : E) return Uint is
2582 pragma Assert (Is_Modular_Integer_Type (Id));
2583 return Uint17 (Base_Type (Id));
2586 function Must_Be_On_Byte_Boundary (Id : E) return B is
2588 pragma Assert (Is_Type (Id));
2589 return Flag183 (Id);
2590 end Must_Be_On_Byte_Boundary;
2592 function Must_Have_Preelab_Init (Id : E) return B is
2594 pragma Assert (Is_Type (Id));
2595 return Flag208 (Id);
2596 end Must_Have_Preelab_Init;
2598 function Needs_Debug_Info (Id : E) return B is
2600 return Flag147 (Id);
2601 end Needs_Debug_Info;
2603 function Needs_No_Actuals (Id : E) return B is
2606 (Is_Overloadable (Id)
2607 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2609 end Needs_No_Actuals;
2611 function Never_Set_In_Source (Id : E) return B is
2613 return Flag115 (Id);
2614 end Never_Set_In_Source;
2616 function Next_Inlined_Subprogram (Id : E) return E is
2619 end Next_Inlined_Subprogram;
2621 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2623 pragma Assert (Is_Discrete_Type (Id));
2624 return Flag276 (Id);
2625 end No_Dynamic_Predicate_On_Actual;
2627 function No_Pool_Assigned (Id : E) return B is
2629 pragma Assert (Is_Access_Type (Id));
2630 return Flag131 (Root_Type (Id));
2631 end No_Pool_Assigned;
2633 function No_Predicate_On_Actual (Id : E) return Boolean is
2635 pragma Assert (Is_Discrete_Type (Id));
2636 return Flag275 (Id);
2637 end No_Predicate_On_Actual;
2639 function No_Return (Id : E) return B is
2641 return Flag113 (Id);
2644 function No_Strict_Aliasing (Id : E) return B is
2646 pragma Assert (Is_Access_Type (Id));
2647 return Flag136 (Base_Type (Id));
2648 end No_Strict_Aliasing;
2650 function No_Tagged_Streams_Pragma (Id : E) return N is
2652 pragma Assert (Is_Tagged_Type (Id));
2654 end No_Tagged_Streams_Pragma;
2656 function Non_Binary_Modulus (Id : E) return B is
2658 pragma Assert (Is_Type (Id));
2659 return Flag58 (Base_Type (Id));
2660 end Non_Binary_Modulus;
2662 function Non_Limited_View (Id : E) return E is
2665 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2667 end Non_Limited_View;
2669 function Nonzero_Is_True (Id : E) return B is
2671 pragma Assert (Root_Type (Id) = Standard_Boolean);
2672 return Flag162 (Base_Type (Id));
2673 end Nonzero_Is_True;
2675 function Normalized_First_Bit (Id : E) return U is
2677 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2679 end Normalized_First_Bit;
2681 function Normalized_Position (Id : E) return U is
2683 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2685 end Normalized_Position;
2687 function Normalized_Position_Max (Id : E) return U is
2689 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2691 end Normalized_Position_Max;
2693 function OK_To_Rename (Id : E) return B is
2695 pragma Assert (Ekind (Id) = E_Variable);
2696 return Flag247 (Id);
2699 function OK_To_Reorder_Components (Id : E) return B is
2701 pragma Assert (Is_Record_Type (Id));
2702 return Flag239 (Base_Type (Id));
2703 end OK_To_Reorder_Components;
2705 function Optimize_Alignment_Space (Id : E) return B is
2708 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2709 return Flag241 (Id);
2710 end Optimize_Alignment_Space;
2712 function Optimize_Alignment_Time (Id : E) return B is
2715 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2716 return Flag242 (Id);
2717 end Optimize_Alignment_Time;
2719 function Original_Access_Type (Id : E) return E is
2721 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2723 end Original_Access_Type;
2725 function Original_Array_Type (Id : E) return E is
2727 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2729 end Original_Array_Type;
2731 function Original_Record_Component (Id : E) return E is
2733 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2735 end Original_Record_Component;
2737 function Overlays_Constant (Id : E) return B is
2739 return Flag243 (Id);
2740 end Overlays_Constant;
2742 function Overridden_Operation (Id : E) return E is
2745 end Overridden_Operation;
2747 function Package_Instantiation (Id : E) return N is
2749 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2751 end Package_Instantiation;
2753 function Packed_Array_Impl_Type (Id : E) return E is
2755 pragma Assert (Is_Array_Type (Id));
2757 end Packed_Array_Impl_Type;
2759 function Parent_Subtype (Id : E) return E is
2761 pragma Assert (Is_Record_Type (Id));
2762 return Node19 (Base_Type (Id));
2765 function Part_Of_Constituents (Id : E) return L is
2767 pragma Assert (Ekind (Id) = E_Abstract_State);
2769 end Part_Of_Constituents;
2771 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2773 pragma Assert (Is_Type (Id));
2774 return Flag280 (Id);
2775 end Partial_View_Has_Unknown_Discr;
2777 function Pending_Access_Types (Id : E) return L is
2779 pragma Assert (Is_Type (Id));
2780 return Elist15 (Id);
2781 end Pending_Access_Types;
2783 function Postconditions_Proc (Id : E) return E is
2785 pragma Assert (Ekind_In (Id, E_Entry,
2790 end Postconditions_Proc;
2792 function PPC_Wrapper (Id : E) return E is
2794 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2798 function Prival (Id : E) return E is
2800 pragma Assert (Is_Protected_Component (Id));
2804 function Prival_Link (Id : E) return E is
2806 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2810 function Private_Dependents (Id : E) return L is
2812 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2813 return Elist18 (Id);
2814 end Private_Dependents;
2816 function Private_View (Id : E) return N is
2818 pragma Assert (Is_Private_Type (Id));
2822 function Protected_Body_Subprogram (Id : E) return E is
2824 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2826 end Protected_Body_Subprogram;
2828 function Protected_Formal (Id : E) return E is
2830 pragma Assert (Is_Formal (Id));
2832 end Protected_Formal;
2834 function Protection_Object (Id : E) return E is
2837 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2839 end Protection_Object;
2841 function Reachable (Id : E) return B is
2846 function Referenced (Id : E) return B is
2848 return Flag156 (Id);
2851 function Referenced_As_LHS (Id : E) return B is
2854 end Referenced_As_LHS;
2856 function Referenced_As_Out_Parameter (Id : E) return B is
2858 return Flag227 (Id);
2859 end Referenced_As_Out_Parameter;
2861 function Refinement_Constituents (Id : E) return L is
2863 pragma Assert (Ekind (Id) = E_Abstract_State);
2865 end Refinement_Constituents;
2867 function Register_Exception_Call (Id : E) return N is
2869 pragma Assert (Ekind (Id) = E_Exception);
2871 end Register_Exception_Call;
2873 function Related_Array_Object (Id : E) return E is
2875 pragma Assert (Is_Array_Type (Id));
2877 end Related_Array_Object;
2879 function Related_Expression (Id : E) return N is
2881 pragma Assert (Ekind (Id) in Type_Kind
2882 or else Ekind_In (Id, E_Constant, E_Variable));
2884 end Related_Expression;
2886 function Related_Instance (Id : E) return E is
2888 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2890 end Related_Instance;
2892 function Related_Type (Id : E) return E is
2894 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2898 function Relative_Deadline_Variable (Id : E) return E is
2900 pragma Assert (Is_Task_Type (Id));
2901 return Node28 (Implementation_Base_Type (Id));
2902 end Relative_Deadline_Variable;
2904 function Renamed_Entity (Id : E) return N is
2909 function Renamed_In_Spec (Id : E) return B is
2911 pragma Assert (Ekind (Id) = E_Package);
2912 return Flag231 (Id);
2913 end Renamed_In_Spec;
2915 function Renamed_Object (Id : E) return N is
2920 function Renaming_Map (Id : E) return U is
2925 function Requires_Overriding (Id : E) return B is
2927 pragma Assert (Is_Overloadable (Id));
2928 return Flag213 (Id);
2929 end Requires_Overriding;
2931 function Return_Present (Id : E) return B is
2936 function Return_Applies_To (Id : E) return N is
2939 end Return_Applies_To;
2941 function Returns_By_Ref (Id : E) return B is
2946 function Returns_Limited_View (Id : E) return B is
2948 pragma Assert (Ekind (Id) = E_Function);
2949 return Flag134 (Id);
2950 end Returns_Limited_View;
2952 function Reverse_Bit_Order (Id : E) return B is
2954 pragma Assert (Is_Record_Type (Id));
2955 return Flag164 (Base_Type (Id));
2956 end Reverse_Bit_Order;
2958 function Reverse_Storage_Order (Id : E) return B is
2960 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2961 return Flag93 (Base_Type (Id));
2962 end Reverse_Storage_Order;
2964 function RM_Size (Id : E) return U is
2966 pragma Assert (Is_Type (Id));
2970 function Scalar_Range (Id : E) return N is
2975 function Scale_Value (Id : E) return U is
2980 function Scope_Depth_Value (Id : E) return U is
2983 end Scope_Depth_Value;
2985 function Sec_Stack_Needed_For_Return (Id : E) return B is
2987 return Flag167 (Id);
2988 end Sec_Stack_Needed_For_Return;
2990 function Shadow_Entities (Id : E) return S is
2992 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2994 end Shadow_Entities;
2996 function Shared_Var_Procs_Instance (Id : E) return E is
2998 pragma Assert (Ekind (Id) = E_Variable);
3000 end Shared_Var_Procs_Instance;
3002 function Size_Check_Code (Id : E) return N is
3004 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3006 end Size_Check_Code;
3008 function Size_Depends_On_Discriminant (Id : E) return B is
3010 return Flag177 (Id);
3011 end Size_Depends_On_Discriminant;
3013 function Size_Known_At_Compile_Time (Id : E) return B is
3016 end Size_Known_At_Compile_Time;
3018 function Small_Value (Id : E) return R is
3020 pragma Assert (Is_Fixed_Point_Type (Id));
3021 return Ureal21 (Id);
3024 function SPARK_Aux_Pragma (Id : E) return N is
3027 (Ekind_In (Id, E_Generic_Package, -- package variants
3031 end SPARK_Aux_Pragma;
3033 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3036 (Ekind_In (Id, E_Generic_Package, -- package variants
3039 return Flag266 (Id);
3040 end SPARK_Aux_Pragma_Inherited;
3042 function SPARK_Pragma (Id : E) return N is
3045 (Ekind_In (Id, E_Function, -- subprogram variants
3047 E_Generic_Procedure,
3051 Ekind_In (Id, E_Generic_Package, -- package variants
3057 function SPARK_Pragma_Inherited (Id : E) return B is
3060 (Ekind_In (Id, E_Function, -- subprogram variants
3062 E_Generic_Procedure,
3066 Ekind_In (Id, E_Generic_Package, -- package variants
3069 return Flag265 (Id);
3070 end SPARK_Pragma_Inherited;
3072 function Spec_Entity (Id : E) return E is
3074 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3078 function SSO_Set_High_By_Default (Id : E) return B is
3080 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3081 return Flag273 (Base_Type (Id));
3082 end SSO_Set_High_By_Default;
3084 function SSO_Set_Low_By_Default (Id : E) return B is
3086 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3087 return Flag272 (Base_Type (Id));
3088 end SSO_Set_Low_By_Default;
3090 function Static_Discrete_Predicate (Id : E) return S is
3092 pragma Assert (Is_Discrete_Type (Id));
3094 end Static_Discrete_Predicate;
3096 function Static_Real_Or_String_Predicate (Id : E) return N is
3098 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3100 end Static_Real_Or_String_Predicate;
3102 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3104 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3106 end Status_Flag_Or_Transient_Decl;
3108 function Storage_Size_Variable (Id : E) return E is
3110 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3111 return Node26 (Implementation_Base_Type (Id));
3112 end Storage_Size_Variable;
3114 function Static_Elaboration_Desired (Id : E) return B is
3116 pragma Assert (Ekind (Id) = E_Package);
3118 end Static_Elaboration_Desired;
3120 function Static_Initialization (Id : E) return N is
3123 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3125 end Static_Initialization;
3127 function Stored_Constraint (Id : E) return L is
3130 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3131 return Elist23 (Id);
3132 end Stored_Constraint;
3134 function Stores_Attribute_Old_Prefix (Id : E) return B is
3136 return Flag270 (Id);
3137 end Stores_Attribute_Old_Prefix;
3139 function Strict_Alignment (Id : E) return B is
3141 return Flag145 (Implementation_Base_Type (Id));
3142 end Strict_Alignment;
3144 function String_Literal_Length (Id : E) return U is
3147 end String_Literal_Length;
3149 function String_Literal_Low_Bound (Id : E) return N is
3152 end String_Literal_Low_Bound;
3154 function Subprograms_For_Type (Id : E) return E is
3156 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3158 end Subprograms_For_Type;
3160 function Subps_Index (Id : E) return U is
3162 pragma Assert (Is_Subprogram (Id));
3166 function Suppress_Elaboration_Warnings (Id : E) return B is
3168 return Flag148 (Id);
3169 end Suppress_Elaboration_Warnings;
3171 function Suppress_Initialization (Id : E) return B is
3173 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3174 return Flag105 (Id);
3175 end Suppress_Initialization;
3177 function Suppress_Style_Checks (Id : E) return B is
3179 return Flag165 (Id);
3180 end Suppress_Style_Checks;
3182 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3184 return Flag217 (Id);
3185 end Suppress_Value_Tracking_On_Call;
3187 function Task_Body_Procedure (Id : E) return N is
3189 pragma Assert (Ekind (Id) in Task_Kind);
3191 end Task_Body_Procedure;
3193 function Thunk_Entity (Id : E) return E is
3195 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3196 and then Is_Thunk (Id));
3200 function Treat_As_Volatile (Id : E) return B is
3203 end Treat_As_Volatile;
3205 function Underlying_Full_View (Id : E) return E is
3207 pragma Assert (Ekind (Id) in Private_Kind);
3209 end Underlying_Full_View;
3211 function Underlying_Record_View (Id : E) return E is
3214 end Underlying_Record_View;
3216 function Universal_Aliasing (Id : E) return B is
3218 pragma Assert (Is_Type (Id));
3219 return Flag216 (Implementation_Base_Type (Id));
3220 end Universal_Aliasing;
3222 function Unset_Reference (Id : E) return N is
3225 end Unset_Reference;
3227 function Uplevel_Reference_Noted (Id : E) return B is
3229 return Flag283 (Id);
3230 end Uplevel_Reference_Noted;
3232 function Uplevel_References (Id : E) return L is
3234 pragma Assert (Is_Subprogram (Id));
3235 return Elist24 (Id);
3236 end Uplevel_References;
3238 function Used_As_Generic_Actual (Id : E) return B is
3240 return Flag222 (Id);
3241 end Used_As_Generic_Actual;
3243 function Uses_Lock_Free (Id : E) return B is
3245 pragma Assert (Is_Protected_Type (Id));
3246 return Flag188 (Id);
3249 function Uses_Sec_Stack (Id : E) return B is
3254 function Warnings_Off (Id : E) return B is
3259 function Warnings_Off_Used (Id : E) return B is
3261 return Flag236 (Id);
3262 end Warnings_Off_Used;
3264 function Warnings_Off_Used_Unmodified (Id : E) return B is
3266 return Flag237 (Id);
3267 end Warnings_Off_Used_Unmodified;
3269 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3271 return Flag238 (Id);
3272 end Warnings_Off_Used_Unreferenced;
3274 function Wrapped_Entity (Id : E) return E is
3276 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3277 and then Is_Primitive_Wrapper (Id));
3281 function Was_Hidden (Id : E) return B is
3283 return Flag196 (Id);
3286 ------------------------------
3287 -- Classification Functions --
3288 ------------------------------
3290 function Is_Access_Type (Id : E) return B is
3292 return Ekind (Id) in Access_Kind;
3295 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3297 return Ekind (Id) in Access_Protected_Kind;
3298 end Is_Access_Protected_Subprogram_Type;
3300 function Is_Access_Subprogram_Type (Id : E) return B is
3302 return Ekind (Id) in Access_Subprogram_Kind;
3303 end Is_Access_Subprogram_Type;
3305 function Is_Aggregate_Type (Id : E) return B is
3307 return Ekind (Id) in Aggregate_Kind;
3308 end Is_Aggregate_Type;
3310 function Is_Array_Type (Id : E) return B is
3312 return Ekind (Id) in Array_Kind;
3315 function Is_Assignable (Id : E) return B is
3317 return Ekind (Id) in Assignable_Kind;
3320 function Is_Class_Wide_Type (Id : E) return B is
3322 return Ekind (Id) in Class_Wide_Kind;
3323 end Is_Class_Wide_Type;
3325 function Is_Composite_Type (Id : E) return B is
3327 return Ekind (Id) in Composite_Kind;
3328 end Is_Composite_Type;
3330 function Is_Concurrent_Body (Id : E) return B is
3332 return Ekind (Id) in
3333 Concurrent_Body_Kind;
3334 end Is_Concurrent_Body;
3336 function Is_Concurrent_Record_Type (Id : E) return B is
3339 end Is_Concurrent_Record_Type;
3341 function Is_Concurrent_Type (Id : E) return B is
3343 return Ekind (Id) in Concurrent_Kind;
3344 end Is_Concurrent_Type;
3346 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3348 return Ekind (Id) in
3349 Decimal_Fixed_Point_Kind;
3350 end Is_Decimal_Fixed_Point_Type;
3352 function Is_Digits_Type (Id : E) return B is
3354 return Ekind (Id) in Digits_Kind;
3357 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3359 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3360 end Is_Discrete_Or_Fixed_Point_Type;
3362 function Is_Discrete_Type (Id : E) return B is
3364 return Ekind (Id) in Discrete_Kind;
3365 end Is_Discrete_Type;
3367 function Is_Elementary_Type (Id : E) return B is
3369 return Ekind (Id) in Elementary_Kind;
3370 end Is_Elementary_Type;
3372 function Is_Entry (Id : E) return B is
3374 return Ekind (Id) in Entry_Kind;
3377 function Is_Enumeration_Type (Id : E) return B is
3379 return Ekind (Id) in
3381 end Is_Enumeration_Type;
3383 function Is_Fixed_Point_Type (Id : E) return B is
3385 return Ekind (Id) in
3387 end Is_Fixed_Point_Type;
3389 function Is_Floating_Point_Type (Id : E) return B is
3391 return Ekind (Id) in Float_Kind;
3392 end Is_Floating_Point_Type;
3394 function Is_Formal (Id : E) return B is
3396 return Ekind (Id) in Formal_Kind;
3399 function Is_Formal_Object (Id : E) return B is
3401 return Ekind (Id) in Formal_Object_Kind;
3402 end Is_Formal_Object;
3404 function Is_Generic_Subprogram (Id : E) return B is
3406 return Ekind (Id) in Generic_Subprogram_Kind;
3407 end Is_Generic_Subprogram;
3409 function Is_Generic_Unit (Id : E) return B is
3411 return Ekind (Id) in Generic_Unit_Kind;
3412 end Is_Generic_Unit;
3414 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3416 return Ekind (Id) in
3417 Incomplete_Or_Private_Kind;
3418 end Is_Incomplete_Or_Private_Type;
3420 function Is_Incomplete_Type (Id : E) return B is
3422 return Ekind (Id) in
3424 end Is_Incomplete_Type;
3426 function Is_Integer_Type (Id : E) return B is
3428 return Ekind (Id) in Integer_Kind;
3429 end Is_Integer_Type;
3431 function Is_Modular_Integer_Type (Id : E) return B is
3433 return Ekind (Id) in
3434 Modular_Integer_Kind;
3435 end Is_Modular_Integer_Type;
3437 function Is_Named_Number (Id : E) return B is
3439 return Ekind (Id) in Named_Kind;
3440 end Is_Named_Number;
3442 function Is_Numeric_Type (Id : E) return B is
3444 return Ekind (Id) in Numeric_Kind;
3445 end Is_Numeric_Type;
3447 function Is_Object (Id : E) return B is
3449 return Ekind (Id) in Object_Kind;
3452 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3454 return Ekind (Id) in
3455 Ordinary_Fixed_Point_Kind;
3456 end Is_Ordinary_Fixed_Point_Type;
3458 function Is_Overloadable (Id : E) return B is
3460 return Ekind (Id) in Overloadable_Kind;
3461 end Is_Overloadable;
3463 function Is_Private_Type (Id : E) return B is
3465 return Ekind (Id) in Private_Kind;
3466 end Is_Private_Type;
3468 function Is_Protected_Type (Id : E) return B is
3470 return Ekind (Id) in Protected_Kind;
3471 end Is_Protected_Type;
3473 function Is_Real_Type (Id : E) return B is
3475 return Ekind (Id) in Real_Kind;
3478 function Is_Record_Type (Id : E) return B is
3480 return Ekind (Id) in Record_Kind;
3483 function Is_Scalar_Type (Id : E) return B is
3485 return Ekind (Id) in Scalar_Kind;
3488 function Is_Signed_Integer_Type (Id : E) return B is
3490 return Ekind (Id) in Signed_Integer_Kind;
3491 end Is_Signed_Integer_Type;
3493 function Is_Subprogram (Id : E) return B is
3495 return Ekind (Id) in Subprogram_Kind;
3498 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3500 return Ekind (Id) in Subprogram_Kind
3502 Ekind (Id) in Generic_Subprogram_Kind;
3503 end Is_Subprogram_Or_Generic_Subprogram;
3505 function Is_Task_Type (Id : E) return B is
3507 return Ekind (Id) in Task_Kind;
3510 function Is_Type (Id : E) return B is
3512 return Ekind (Id) in Type_Kind;
3515 ------------------------------
3516 -- Attribute Set Procedures --
3517 ------------------------------
3519 -- Note: in many of these set procedures an "obvious" assertion is missing.
3520 -- The reason for this is that in many cases, a field is set before the
3521 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3522 -- it is possible to add assertions that specifically include the E_Void
3523 -- possibility, but in some cases, we just omit the assertions.
3525 procedure Set_Abstract_States (Id : E; V : L) is
3527 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3528 Set_Elist25 (Id, V);
3529 end Set_Abstract_States;
3531 procedure Set_Accept_Address (Id : E; V : L) is
3533 Set_Elist21 (Id, V);
3534 end Set_Accept_Address;
3536 procedure Set_Access_Disp_Table (Id : E; V : L) is
3538 pragma Assert (Ekind (Id) = E_Record_Type
3539 and then Id = Implementation_Base_Type (Id));
3540 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3541 Set_Elist16 (Id, V);
3542 end Set_Access_Disp_Table;
3544 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3547 end Set_Associated_Formal_Package;
3549 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3552 end Set_Associated_Node_For_Itype;
3554 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3556 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3558 end Set_Associated_Storage_Pool;
3560 procedure Set_Activation_Record_Component (Id : E; V : E) is
3562 pragma Assert (Ekind_In (Id, E_Constant,
3569 end Set_Activation_Record_Component;
3571 procedure Set_Actual_Subtype (Id : E; V : E) is
3574 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3575 or else Is_Formal (Id));
3577 end Set_Actual_Subtype;
3579 procedure Set_Address_Taken (Id : E; V : B := True) is
3581 Set_Flag104 (Id, V);
3582 end Set_Address_Taken;
3584 procedure Set_Alias (Id : E; V : E) is
3587 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3591 procedure Set_Alignment (Id : E; V : U) is
3593 pragma Assert (Is_Type (Id)
3594 or else Is_Formal (Id)
3595 or else Ekind_In (Id, E_Loop_Parameter,
3602 procedure Set_Barrier_Function (Id : E; V : N) is
3604 pragma Assert (Is_Entry (Id));
3606 end Set_Barrier_Function;
3608 procedure Set_Block_Node (Id : E; V : N) is
3610 pragma Assert (Ekind (Id) = E_Block);
3614 procedure Set_Body_Entity (Id : E; V : E) is
3616 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3618 end Set_Body_Entity;
3620 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3623 (Ekind (Id) = E_Package
3624 or else Is_Subprogram (Id)
3625 or else Is_Generic_Unit (Id));
3627 end Set_Body_Needed_For_SAL;
3629 procedure Set_Body_References (Id : E; V : L) is
3631 pragma Assert (Ekind (Id) = E_Abstract_State);
3632 Set_Elist16 (Id, V);
3633 end Set_Body_References;
3635 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3637 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3639 end Set_BIP_Initialization_Call;
3641 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3643 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3644 Set_Flag125 (Id, V);
3645 end Set_C_Pass_By_Copy;
3647 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3650 end Set_Can_Never_Be_Null;
3652 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3655 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3656 Set_Flag229 (Id, V);
3657 end Set_Can_Use_Internal_Rep;
3659 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3662 end Set_Checks_May_Be_Suppressed;
3664 procedure Set_Class_Wide_Type (Id : E; V : E) is
3666 pragma Assert (Is_Type (Id));
3668 end Set_Class_Wide_Type;
3670 procedure Set_Cloned_Subtype (Id : E; V : E) is
3672 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3674 end Set_Cloned_Subtype;
3676 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3678 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3680 end Set_Component_Bit_Offset;
3682 procedure Set_Component_Clause (Id : E; V : N) is
3684 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3686 end Set_Component_Clause;
3688 procedure Set_Component_Size (Id : E; V : U) is
3690 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3692 end Set_Component_Size;
3694 procedure Set_Component_Type (Id : E; V : E) is
3696 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3698 end Set_Component_Type;
3700 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3703 (Ekind_In (Id, E_Block,
3707 E_Generic_Procedure,
3711 E_Subprogram_Body));
3712 Set_Flag279 (Id, V);
3713 end Set_Contains_Ignored_Ghost_Code;
3715 procedure Set_Contract (Id : E; V : N) is
3718 (Ekind_In (Id, E_Entry,
3726 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3730 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3733 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3735 end Set_Corresponding_Concurrent_Type;
3737 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3739 pragma Assert (Ekind (Id) = E_Discriminant);
3741 end Set_Corresponding_Discriminant;
3743 procedure Set_Corresponding_Equality (Id : E; V : E) is
3746 (Ekind (Id) = E_Function
3747 and then not Comes_From_Source (Id)
3748 and then Chars (Id) = Name_Op_Ne);
3750 end Set_Corresponding_Equality;
3752 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3754 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3756 end Set_Corresponding_Protected_Entry;
3758 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3760 pragma Assert (Is_Concurrent_Type (Id));
3762 end Set_Corresponding_Record_Type;
3764 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3767 end Set_Corresponding_Remote_Type;
3769 procedure Set_Current_Use_Clause (Id : E; V : E) is
3771 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3773 end Set_Current_Use_Clause;
3775 procedure Set_Current_Value (Id : E; V : N) is
3777 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3779 end Set_Current_Value;
3781 procedure Set_CR_Discriminant (Id : E; V : E) is
3784 end Set_CR_Discriminant;
3786 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3788 Set_Flag166 (Id, V);
3789 end Set_Debug_Info_Off;
3791 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3794 end Set_Debug_Renaming_Link;
3796 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3798 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3800 end Set_Default_Aspect_Component_Value;
3802 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3804 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3806 end Set_Default_Aspect_Value;
3808 procedure Set_Default_Expr_Function (Id : E; V : E) is
3810 pragma Assert (Is_Formal (Id));
3812 end Set_Default_Expr_Function;
3814 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3816 Set_Flag108 (Id, V);
3817 end Set_Default_Expressions_Processed;
3819 procedure Set_Default_Value (Id : E; V : N) is
3821 pragma Assert (Is_Formal (Id));
3823 end Set_Default_Value;
3825 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3829 or else Is_Task_Type (Id)
3830 or else Ekind (Id) = E_Block);
3831 Set_Flag114 (Id, V);
3832 end Set_Delay_Cleanups;
3834 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3837 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3840 end Set_Delay_Subprogram_Descriptors;
3842 procedure Set_Delta_Value (Id : E; V : R) is
3844 pragma Assert (Is_Fixed_Point_Type (Id));
3845 Set_Ureal18 (Id, V);
3846 end Set_Delta_Value;
3848 procedure Set_Dependent_Instances (Id : E; V : L) is
3850 pragma Assert (Is_Generic_Instance (Id));
3852 end Set_Dependent_Instances;
3854 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3856 pragma Assert (Nkind (Id) in N_Entity);
3858 end Set_Depends_On_Private;
3860 procedure Set_Derived_Type_Link (Id : E; V : E) is
3862 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3864 end Set_Derived_Type_Link;
3866 procedure Set_Digits_Value (Id : E; V : U) is
3869 (Is_Floating_Point_Type (Id)
3870 or else Is_Decimal_Fixed_Point_Type (Id));
3872 end Set_Digits_Value;
3874 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3877 end Set_Directly_Designated_Type;
3879 procedure Set_Discard_Names (Id : E; V : B := True) is
3882 end Set_Discard_Names;
3884 procedure Set_Discriminal (Id : E; V : E) is
3886 pragma Assert (Ekind (Id) = E_Discriminant);
3888 end Set_Discriminal;
3890 procedure Set_Discriminal_Link (Id : E; V : E) is
3893 end Set_Discriminal_Link;
3895 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3897 pragma Assert (Ekind (Id) = E_Component);
3899 end Set_Discriminant_Checking_Func;
3901 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3903 pragma Assert (Nkind (Id) in N_Entity);
3904 Set_Elist21 (Id, V);
3905 end Set_Discriminant_Constraint;
3907 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3910 end Set_Discriminant_Default_Value;
3912 procedure Set_Discriminant_Number (Id : E; V : U) is
3915 end Set_Discriminant_Number;
3917 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3919 pragma Assert (Ekind (Id) = E_Record_Type
3920 and then Id = Implementation_Base_Type (Id));
3921 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3922 Set_Elist26 (Id, V);
3923 end Set_Dispatch_Table_Wrappers;
3925 procedure Set_DT_Entry_Count (Id : E; V : U) is
3927 pragma Assert (Ekind (Id) = E_Component);
3929 end Set_DT_Entry_Count;
3931 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3933 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3935 end Set_DT_Offset_To_Top_Func;
3937 procedure Set_DT_Position (Id : E; V : U) is
3939 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3941 end Set_DT_Position;
3943 procedure Set_DTC_Entity (Id : E; V : E) is
3945 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3949 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3951 pragma Assert (Ekind (Id) = E_Package);
3952 Set_Flag210 (Id, V);
3953 end Set_Elaborate_Body_Desirable;
3955 procedure Set_Elaboration_Entity (Id : E; V : E) is
3960 Ekind (Id) = E_Package
3962 Is_Generic_Unit (Id));
3964 end Set_Elaboration_Entity;
3966 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3971 Ekind (Id) = E_Package
3973 Is_Generic_Unit (Id));
3974 Set_Flag174 (Id, V);
3975 end Set_Elaboration_Entity_Required;
3977 procedure Set_Encapsulating_State (Id : E; V : E) is
3979 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3981 end Set_Encapsulating_State;
3983 procedure Set_Enclosing_Scope (Id : E; V : E) is
3986 end Set_Enclosing_Scope;
3988 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3990 pragma Assert (Is_Entry (Id));
3991 Set_Flag152 (Id, V);
3992 end Set_Entry_Accepted;
3994 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3997 end Set_Entry_Bodies_Array;
3999 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4002 end Set_Entry_Cancel_Parameter;
4004 procedure Set_Entry_Component (Id : E; V : E) is
4007 end Set_Entry_Component;
4009 procedure Set_Entry_Formal (Id : E; V : E) is
4012 end Set_Entry_Formal;
4014 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4016 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4018 end Set_Entry_Index_Constant;
4020 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4023 end Set_Entry_Parameters_Type;
4025 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4027 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4029 end Set_Enum_Pos_To_Rep;
4031 procedure Set_Enumeration_Pos (Id : E; V : U) is
4033 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4035 end Set_Enumeration_Pos;
4037 procedure Set_Enumeration_Rep (Id : E; V : U) is
4039 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4041 end Set_Enumeration_Rep;
4043 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4045 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4047 end Set_Enumeration_Rep_Expr;
4049 procedure Set_Equivalent_Type (Id : E; V : E) is
4052 (Ekind_In (Id, E_Class_Wide_Type,
4053 E_Class_Wide_Subtype,
4054 E_Access_Protected_Subprogram_Type,
4055 E_Anonymous_Access_Protected_Subprogram_Type,
4056 E_Access_Subprogram_Type,
4059 end Set_Equivalent_Type;
4061 procedure Set_Esize (Id : E; V : U) is
4066 procedure Set_Extra_Accessibility (Id : E; V : E) is
4069 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4071 end Set_Extra_Accessibility;
4073 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4075 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4077 end Set_Extra_Accessibility_Of_Result;
4079 procedure Set_Extra_Constrained (Id : E; V : E) is
4081 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4083 end Set_Extra_Constrained;
4085 procedure Set_Extra_Formal (Id : E; V : E) is
4088 end Set_Extra_Formal;
4090 procedure Set_Extra_Formals (Id : E; V : E) is
4093 (Is_Overloadable (Id)
4094 or else Ekind_In (Id, E_Entry_Family,
4096 E_Subprogram_Type));
4098 end Set_Extra_Formals;
4100 procedure Set_Finalization_Master (Id : E; V : E) is
4102 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4104 end Set_Finalization_Master;
4106 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4108 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4109 Set_Flag158 (Id, V);
4110 end Set_Finalize_Storage_Only;
4112 procedure Set_Finalizer (Id : E; V : E) is
4114 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4118 procedure Set_First_Entity (Id : E; V : E) is
4121 end Set_First_Entity;
4123 procedure Set_First_Exit_Statement (Id : E; V : N) is
4125 pragma Assert (Ekind (Id) = E_Loop);
4127 end Set_First_Exit_Statement;
4129 procedure Set_First_Index (Id : E; V : N) is
4131 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4133 end Set_First_Index;
4135 procedure Set_First_Literal (Id : E; V : E) is
4137 pragma Assert (Is_Enumeration_Type (Id));
4139 end Set_First_Literal;
4141 procedure Set_First_Private_Entity (Id : E; V : E) is
4143 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4144 or else Ekind (Id) in Concurrent_Kind);
4146 end Set_First_Private_Entity;
4148 procedure Set_First_Rep_Item (Id : E; V : N) is
4151 end Set_First_Rep_Item;
4153 procedure Set_Float_Rep (Id : E; V : F) is
4154 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4156 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4159 procedure Set_Freeze_Node (Id : E; V : N) is
4162 end Set_Freeze_Node;
4164 procedure Set_From_Limited_With (Id : E; V : B := True) is
4167 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4168 Set_Flag159 (Id, V);
4169 end Set_From_Limited_With;
4171 procedure Set_Full_View (Id : E; V : E) is
4173 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4177 procedure Set_Generic_Homonym (Id : E; V : E) is
4180 end Set_Generic_Homonym;
4182 procedure Set_Generic_Renamings (Id : E; V : L) is
4184 Set_Elist23 (Id, V);
4185 end Set_Generic_Renamings;
4187 procedure Set_Handler_Records (Id : E; V : S) is
4190 end Set_Handler_Records;
4192 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4194 pragma Assert (Id = Base_Type (Id));
4195 Set_Flag135 (Id, V);
4196 end Set_Has_Aliased_Components;
4198 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4201 end Set_Has_Alignment_Clause;
4203 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4206 end Set_Has_All_Calls_Remote;
4208 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4211 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4212 Set_Flag253 (Id, V);
4213 end Set_Has_Anonymous_Master;
4215 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4217 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4219 end Set_Has_Atomic_Components;
4221 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4224 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4225 Set_Flag139 (Id, V);
4226 end Set_Has_Biased_Representation;
4228 procedure Set_Has_Completion (Id : E; V : B := True) is
4231 end Set_Has_Completion;
4233 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4235 pragma Assert (Is_Type (Id));
4237 end Set_Has_Completion_In_Body;
4239 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4241 pragma Assert (Ekind (Id) = E_Record_Type);
4242 Set_Flag140 (Id, V);
4243 end Set_Has_Complex_Representation;
4245 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4247 pragma Assert (Ekind (Id) = E_Array_Type);
4249 end Set_Has_Component_Size_Clause;
4251 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4253 pragma Assert (Is_Type (Id));
4254 Set_Flag187 (Id, V);
4255 end Set_Has_Constrained_Partial_View;
4257 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4259 Set_Flag181 (Id, V);
4260 end Set_Has_Contiguous_Rep;
4262 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4264 pragma Assert (Id = Base_Type (Id));
4266 end Set_Has_Controlled_Component;
4268 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4271 end Set_Has_Controlling_Result;
4273 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4275 Set_Flag119 (Id, V);
4276 end Set_Has_Convention_Pragma;
4278 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4281 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4282 and then Is_Base_Type (Id));
4284 end Set_Has_Default_Aspect;
4286 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4288 pragma Assert (Is_Type (Id));
4290 end Set_Has_Default_Init_Cond;
4292 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4294 pragma Assert (Nkind (Id) in N_Entity);
4295 Set_Flag200 (Id, V);
4296 end Set_Has_Delayed_Aspects;
4298 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4300 pragma Assert (Nkind (Id) in N_Entity);
4302 end Set_Has_Delayed_Freeze;
4304 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4306 pragma Assert (Nkind (Id) in N_Entity);
4307 Set_Flag261 (Id, V);
4308 end Set_Has_Delayed_Rep_Aspects;
4310 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4312 pragma Assert (Nkind (Id) in N_Entity);
4314 end Set_Has_Discriminants;
4316 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4318 pragma Assert (Ekind (Id) = E_Record_Type
4319 and then Is_Tagged_Type (Id));
4320 Set_Flag220 (Id, V);
4321 end Set_Has_Dispatch_Table;
4323 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4325 pragma Assert (Is_Type (Id));
4326 Set_Flag258 (Id, V);
4327 end Set_Has_Dynamic_Predicate_Aspect;
4329 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4331 pragma Assert (Is_Enumeration_Type (Id));
4333 end Set_Has_Enumeration_Rep_Clause;
4335 procedure Set_Has_Exit (Id : E; V : B := True) is
4340 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4342 pragma Assert (Ekind_In (Id, E_Entry,
4346 Set_Flag240 (Id, V);
4347 end Set_Has_Expanded_Contract;
4349 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4351 Set_Flag175 (Id, V);
4352 end Set_Has_Forward_Instantiation;
4354 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4356 Set_Flag173 (Id, V);
4357 end Set_Has_Fully_Qualified_Name;
4359 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4362 end Set_Has_Gigi_Rep_Item;
4364 procedure Set_Has_Homonym (Id : E; V : B := True) is
4367 end Set_Has_Homonym;
4369 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4371 Set_Flag251 (Id, V);
4372 end Set_Has_Implicit_Dereference;
4374 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4376 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4378 end Set_Has_Independent_Components;
4380 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4382 pragma Assert (Is_Type (Id));
4383 Set_Flag248 (Id, V);
4384 end Set_Has_Inheritable_Invariants;
4386 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4388 pragma Assert (Is_Type (Id));
4389 Set_Flag133 (Id, V);
4390 end Set_Has_Inherited_Default_Init_Cond;
4392 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4394 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4395 Set_Flag219 (Id, V);
4396 end Set_Has_Initial_Value;
4398 procedure Set_Has_Invariants (Id : E; V : B := True) is
4400 pragma Assert (Is_Type (Id));
4401 Set_Flag232 (Id, V);
4402 end Set_Has_Invariants;
4404 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4406 pragma Assert (Ekind (Id) = E_Loop);
4407 Set_Flag260 (Id, V);
4408 end Set_Has_Loop_Entry_Attributes;
4410 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4412 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4414 end Set_Has_Machine_Radix_Clause;
4416 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4419 end Set_Has_Master_Entity;
4421 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4423 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4424 Set_Flag142 (Id, V);
4425 end Set_Has_Missing_Return;
4427 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4429 Set_Flag101 (Id, V);
4430 end Set_Has_Nested_Block_With_Handler;
4432 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4434 pragma Assert (Is_Subprogram (Id));
4435 Set_Flag282 (Id, V);
4436 end Set_Has_Nested_Subprogram;
4438 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4440 Set_Flag215 (Id, V);
4441 end Set_Has_Uplevel_Reference;
4443 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4445 pragma Assert (Id = Base_Type (Id));
4447 end Set_Has_Non_Standard_Rep;
4449 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4451 pragma Assert (Is_Type (Id));
4452 Set_Flag172 (Id, V);
4453 end Set_Has_Object_Size_Clause;
4455 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4457 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4458 Set_Flag110 (Id, V);
4459 end Set_Has_Out_Or_In_Out_Parameter;
4461 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4463 Set_Flag154 (Id, V);
4464 end Set_Has_Per_Object_Constraint;
4466 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4468 pragma Assert (Is_Access_Type (Id));
4469 Set_Flag27 (Base_Type (Id), V);
4470 end Set_Has_Pragma_Controlled;
4472 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4474 Set_Flag150 (Id, V);
4475 end Set_Has_Pragma_Elaborate_Body;
4477 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4479 Set_Flag157 (Id, V);
4480 end Set_Has_Pragma_Inline;
4482 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4484 Set_Flag230 (Id, V);
4485 end Set_Has_Pragma_Inline_Always;
4487 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4489 Set_Flag201 (Id, V);
4490 end Set_Has_Pragma_No_Inline;
4492 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4494 pragma Assert (Is_Enumeration_Type (Id));
4495 pragma Assert (Id = Base_Type (Id));
4496 Set_Flag198 (Id, V);
4497 end Set_Has_Pragma_Ordered;
4499 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4501 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4502 pragma Assert (Id = Base_Type (Id));
4503 Set_Flag121 (Id, V);
4504 end Set_Has_Pragma_Pack;
4506 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4508 Set_Flag221 (Id, V);
4509 end Set_Has_Pragma_Preelab_Init;
4511 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4513 Set_Flag203 (Id, V);
4514 end Set_Has_Pragma_Pure;
4516 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4518 Set_Flag179 (Id, V);
4519 end Set_Has_Pragma_Pure_Function;
4521 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4523 Set_Flag169 (Id, V);
4524 end Set_Has_Pragma_Thread_Local_Storage;
4526 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4528 Set_Flag233 (Id, V);
4529 end Set_Has_Pragma_Unmodified;
4531 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4533 Set_Flag180 (Id, V);
4534 end Set_Has_Pragma_Unreferenced;
4536 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4538 pragma Assert (Is_Type (Id));
4539 Set_Flag212 (Id, V);
4540 end Set_Has_Pragma_Unreferenced_Objects;
4542 procedure Set_Has_Predicates (Id : E; V : B := True) is
4544 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4545 Set_Flag250 (Id, V);
4546 end Set_Has_Predicates;
4548 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4550 pragma Assert (Id = Base_Type (Id));
4551 Set_Flag120 (Id, V);
4552 end Set_Has_Primitive_Operations;
4554 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4556 pragma Assert (Is_Type (Id));
4557 Set_Flag151 (Id, V);
4558 end Set_Has_Private_Ancestor;
4560 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4562 Set_Flag155 (Id, V);
4563 end Set_Has_Private_Declaration;
4565 procedure Set_Has_Protected (Id : E; V : B := True) is
4567 Set_Flag271 (Id, V);
4568 end Set_Has_Protected;
4570 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4572 Set_Flag161 (Id, V);
4573 end Set_Has_Qualified_Name;
4575 procedure Set_Has_RACW (Id : E; V : B := True) is
4577 pragma Assert (Ekind (Id) = E_Package);
4578 Set_Flag214 (Id, V);
4581 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4583 pragma Assert (Id = Base_Type (Id));
4585 end Set_Has_Record_Rep_Clause;
4587 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4589 pragma Assert (Is_Subprogram (Id));
4590 Set_Flag143 (Id, V);
4591 end Set_Has_Recursive_Call;
4593 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4595 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4596 Set_Flag267 (Id, V);
4597 end Set_Has_Shift_Operator;
4599 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4602 end Set_Has_Size_Clause;
4604 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4607 end Set_Has_Small_Clause;
4609 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4611 pragma Assert (Id = Base_Type (Id));
4612 Set_Flag100 (Id, V);
4613 end Set_Has_Specified_Layout;
4615 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4617 pragma Assert (Is_Type (Id));
4618 Set_Flag190 (Id, V);
4619 end Set_Has_Specified_Stream_Input;
4621 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4623 pragma Assert (Is_Type (Id));
4624 Set_Flag191 (Id, V);
4625 end Set_Has_Specified_Stream_Output;
4627 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4629 pragma Assert (Is_Type (Id));
4630 Set_Flag192 (Id, V);
4631 end Set_Has_Specified_Stream_Read;
4633 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4635 pragma Assert (Is_Type (Id));
4636 Set_Flag193 (Id, V);
4637 end Set_Has_Specified_Stream_Write;
4639 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4641 Set_Flag211 (Id, V);
4642 end Set_Has_Static_Discriminants;
4644 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4646 pragma Assert (Is_Type (Id));
4647 Set_Flag269 (Id, V);
4648 end Set_Has_Static_Predicate;
4650 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4652 pragma Assert (Is_Type (Id));
4653 Set_Flag259 (Id, V);
4654 end Set_Has_Static_Predicate_Aspect;
4656 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4658 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4659 pragma Assert (Id = Base_Type (Id));
4661 end Set_Has_Storage_Size_Clause;
4663 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4665 pragma Assert (Is_Elementary_Type (Id));
4666 Set_Flag184 (Id, V);
4667 end Set_Has_Stream_Size_Clause;
4669 procedure Set_Has_Task (Id : E; V : B := True) is
4671 pragma Assert (Id = Base_Type (Id));
4675 procedure Set_Has_Thunks (Id : E; V : B := True) is
4677 pragma Assert (Is_Tag (Id));
4678 Set_Flag228 (Id, V);
4681 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4683 pragma Assert (Id = Base_Type (Id));
4684 Set_Flag123 (Id, V);
4685 end Set_Has_Unchecked_Union;
4687 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4689 pragma Assert (Is_Type (Id));
4691 end Set_Has_Unknown_Discriminants;
4693 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4695 pragma Assert (Ekind (Id) = E_Abstract_State);
4696 Set_Flag263 (Id, V);
4697 end Set_Has_Visible_Refinement;
4699 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4701 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4703 end Set_Has_Volatile_Components;
4705 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4707 Set_Flag182 (Id, V);
4708 end Set_Has_Xref_Entry;
4710 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4712 pragma Assert (Ekind (Id) = E_Variable);
4714 end Set_Hiding_Loop_Variable;
4716 procedure Set_Homonym (Id : E; V : E) is
4718 pragma Assert (Id /= V);
4722 procedure Set_Import_Pragma (Id : E; V : E) is
4724 pragma Assert (Is_Subprogram (Id));
4726 end Set_Import_Pragma;
4728 procedure Set_Interface_Alias (Id : E; V : E) is
4732 and then Is_Hidden (Id)
4733 and then (Ekind_In (Id, E_Procedure, E_Function)));
4735 end Set_Interface_Alias;
4737 procedure Set_Interfaces (Id : E; V : L) is
4739 pragma Assert (Is_Record_Type (Id));
4740 Set_Elist25 (Id, V);
4743 procedure Set_In_Package_Body (Id : E; V : B := True) is
4746 end Set_In_Package_Body;
4748 procedure Set_In_Private_Part (Id : E; V : B := True) is
4751 end Set_In_Private_Part;
4753 procedure Set_In_Use (Id : E; V : B := True) is
4755 pragma Assert (Nkind (Id) in N_Entity);
4759 procedure Set_Initialization_Statements (Id : E; V : N) is
4761 -- Tolerate an E_Void entity since this can be called while resolving
4762 -- an aggregate used as the initialization expression for an object
4763 -- declaration, and this occurs before the Ekind for the object is set.
4765 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4767 end Set_Initialization_Statements;
4769 procedure Set_Inner_Instances (Id : E; V : L) is
4771 Set_Elist23 (Id, V);
4772 end Set_Inner_Instances;
4774 procedure Set_Interface_Name (Id : E; V : N) is
4777 end Set_Interface_Name;
4779 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4781 pragma Assert (Is_Overloadable (Id));
4783 end Set_Is_Abstract_Subprogram;
4785 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4787 pragma Assert (Is_Type (Id));
4788 Set_Flag146 (Id, V);
4789 end Set_Is_Abstract_Type;
4791 procedure Set_Is_ARECnF_Entity (Id : E; V : B := True) is
4793 Set_Flag284 (Id, V);
4794 end Set_Is_ARECnF_Entity;
4796 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4798 pragma Assert (Is_Access_Type (Id));
4799 Set_Flag194 (Id, V);
4800 end Set_Is_Local_Anonymous_Access;
4802 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4804 pragma Assert (Is_Access_Type (Id));
4806 end Set_Is_Access_Constant;
4808 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4810 Set_Flag185 (Id, V);
4811 end Set_Is_Ada_2005_Only;
4813 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4815 Set_Flag199 (Id, V);
4816 end Set_Is_Ada_2012_Only;
4818 procedure Set_Is_Aliased (Id : E; V : B := True) is
4820 pragma Assert (Nkind (Id) in N_Entity);
4824 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4827 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4829 end Set_Is_Asynchronous;
4831 procedure Set_Is_Atomic (Id : E; V : B := True) is
4836 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4838 pragma Assert ((not V)
4839 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4840 Set_Flag122 (Id, V);
4841 end Set_Is_Bit_Packed_Array;
4843 procedure Set_Is_Called (Id : E; V : B := True) is
4845 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4846 Set_Flag102 (Id, V);
4849 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4852 end Set_Is_Character_Type;
4854 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4856 pragma Assert (Is_Formal (Id)
4857 or else Is_Object (Id)
4858 or else Is_Package_Or_Generic_Package (Id)
4859 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4860 or else Is_Type (Id)
4861 or else Ekind (Id) = E_Abstract_State
4862 or else Ekind (Id) = E_Component
4863 or else Ekind (Id) = E_Discriminant
4864 or else Ekind (Id) = E_Exception
4865 or else Ekind (Id) = E_Package_Body
4866 or else Ekind (Id) = E_Subprogram_Body
4868 -- Allow this attribute to appear on non-analyzed entities
4870 or else Ekind (Id) = E_Void);
4871 Set_Flag277 (Id, V);
4872 end Set_Is_Checked_Ghost_Entity;
4874 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4877 end Set_Is_Child_Unit;
4879 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4882 end Set_Is_Class_Wide_Equivalent_Type;
4884 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4886 Set_Flag149 (Id, V);
4887 end Set_Is_Compilation_Unit;
4889 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4891 pragma Assert (Ekind (Id) = E_Discriminant);
4892 Set_Flag103 (Id, V);
4893 end Set_Is_Completely_Hidden;
4895 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4898 end Set_Is_Concurrent_Record_Type;
4900 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4903 end Set_Is_Constr_Subt_For_U_Nominal;
4905 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4907 Set_Flag141 (Id, V);
4908 end Set_Is_Constr_Subt_For_UN_Aliased;
4910 procedure Set_Is_Constrained (Id : E; V : B := True) is
4912 pragma Assert (Nkind (Id) in N_Entity);
4914 end Set_Is_Constrained;
4916 procedure Set_Is_Constructor (Id : E; V : B := True) is
4919 end Set_Is_Constructor;
4921 procedure Set_Is_Controlled (Id : E; V : B := True) is
4923 pragma Assert (Id = Base_Type (Id));
4925 end Set_Is_Controlled;
4927 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4929 pragma Assert (Is_Formal (Id));
4931 end Set_Is_Controlling_Formal;
4933 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4936 end Set_Is_CPP_Class;
4938 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4940 pragma Assert (Ekind (Id) = E_Procedure);
4941 Set_Flag132 (Id, V);
4942 end Set_Is_Default_Init_Cond_Procedure;
4944 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4946 pragma Assert (Is_Type (Id));
4947 Set_Flag223 (Id, V);
4948 end Set_Is_Descendent_Of_Address;
4950 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4952 Set_Flag176 (Id, V);
4953 end Set_Is_Discrim_SO_Function;
4955 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4957 Set_Flag264 (Id, V);
4958 end Set_Is_Discriminant_Check_Function;
4960 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4962 Set_Flag234 (Id, V);
4963 end Set_Is_Dispatch_Table_Entity;
4965 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4970 Is_Overloadable (Id)
4972 Ekind (Id) = E_Subprogram_Type);
4975 end Set_Is_Dispatching_Operation;
4977 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4979 Set_Flag124 (Id, V);
4980 end Set_Is_Eliminated;
4982 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4985 end Set_Is_Entry_Formal;
4987 procedure Set_Is_Exported (Id : E; V : B := True) is
4990 end Set_Is_Exported;
4992 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4995 end Set_Is_First_Subtype;
4997 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4999 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5000 Set_Flag118 (Id, V);
5001 end Set_Is_For_Access_Subtype;
5003 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5005 Set_Flag111 (Id, V);
5006 end Set_Is_Formal_Subprogram;
5008 procedure Set_Is_Frozen (Id : E; V : B := True) is
5010 pragma Assert (Nkind (Id) in N_Entity);
5014 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5016 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5017 Set_Flag274 (Id, V);
5018 end Set_Is_Generic_Actual_Subprogram;
5020 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5022 pragma Assert (Is_Type (Id));
5024 end Set_Is_Generic_Actual_Type;
5026 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5028 Set_Flag130 (Id, V);
5029 end Set_Is_Generic_Instance;
5031 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5033 pragma Assert (Nkind (Id) in N_Entity);
5035 end Set_Is_Generic_Type;
5037 procedure Set_Is_Hidden (Id : E; V : B := True) is
5042 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5044 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5046 end Set_Is_Hidden_Non_Overridden_Subpgm;
5048 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5050 Set_Flag171 (Id, V);
5051 end Set_Is_Hidden_Open_Scope;
5053 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5055 pragma Assert (Is_Formal (Id)
5056 or else Is_Object (Id)
5057 or else Is_Package_Or_Generic_Package (Id)
5058 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5059 or else Is_Type (Id)
5060 or else Ekind (Id) = E_Abstract_State
5061 or else Ekind (Id) = E_Component
5062 or else Ekind (Id) = E_Discriminant
5063 or else Ekind (Id) = E_Exception
5064 or else Ekind (Id) = E_Package_Body
5065 or else Ekind (Id) = E_Subprogram_Body
5067 -- Allow this attribute to appear on non-analyzed entities
5069 or else Ekind (Id) = E_Void);
5070 Set_Flag278 (Id, V);
5071 end Set_Is_Ignored_Ghost_Entity;
5073 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5075 pragma Assert (Nkind (Id) in N_Entity);
5077 end Set_Is_Immediately_Visible;
5079 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5081 Set_Flag254 (Id, V);
5082 end Set_Is_Implementation_Defined;
5084 procedure Set_Is_Imported (Id : E; V : B := True) is
5087 end Set_Is_Imported;
5089 procedure Set_Is_Independent (Id : E; V : B := True) is
5091 Set_Flag268 (Id, V);
5092 end Set_Is_Independent;
5094 procedure Set_Is_Inlined (Id : E; V : B := True) is
5099 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5101 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5103 end Set_Is_Inlined_Always;
5105 procedure Set_Is_Interface (Id : E; V : B := True) is
5107 pragma Assert (Is_Record_Type (Id));
5108 Set_Flag186 (Id, V);
5109 end Set_Is_Interface;
5111 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5113 Set_Flag126 (Id, V);
5114 end Set_Is_Instantiated;
5116 procedure Set_Is_Internal (Id : E; V : B := True) is
5118 pragma Assert (Nkind (Id) in N_Entity);
5120 end Set_Is_Internal;
5122 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5124 pragma Assert (Nkind (Id) in N_Entity);
5126 end Set_Is_Interrupt_Handler;
5128 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5131 end Set_Is_Intrinsic_Subprogram;
5133 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5135 pragma Assert (Ekind (Id) = E_Procedure);
5136 Set_Flag257 (Id, V);
5137 end Set_Is_Invariant_Procedure;
5139 procedure Set_Is_Itype (Id : E; V : B := True) is
5144 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5147 end Set_Is_Known_Non_Null;
5149 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5151 Set_Flag204 (Id, V);
5152 end Set_Is_Known_Null;
5154 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5156 Set_Flag170 (Id, V);
5157 end Set_Is_Known_Valid;
5159 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5161 pragma Assert (Is_Type (Id));
5162 Set_Flag106 (Id, V);
5163 end Set_Is_Limited_Composite;
5165 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5167 pragma Assert (Is_Interface (Id));
5168 Set_Flag197 (Id, V);
5169 end Set_Is_Limited_Interface;
5171 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5174 end Set_Is_Limited_Record;
5176 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5178 pragma Assert (Is_Subprogram (Id));
5179 Set_Flag137 (Id, V);
5180 end Set_Is_Machine_Code_Subprogram;
5182 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5184 pragma Assert (Is_Type (Id));
5185 Set_Flag109 (Id, V);
5186 end Set_Is_Non_Static_Subtype;
5188 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5190 pragma Assert (Ekind (Id) = E_Procedure);
5191 Set_Flag178 (Id, V);
5192 end Set_Is_Null_Init_Proc;
5194 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5196 Set_Flag153 (Id, V);
5197 end Set_Is_Obsolescent;
5199 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5201 pragma Assert (Ekind (Id) = E_Out_Parameter);
5202 Set_Flag226 (Id, V);
5203 end Set_Is_Only_Out_Parameter;
5205 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5207 Set_Flag160 (Id, V);
5208 end Set_Is_Package_Body_Entity;
5210 procedure Set_Is_Packed (Id : E; V : B := True) is
5212 pragma Assert (Id = Base_Type (Id));
5216 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5218 Set_Flag138 (Id, V);
5219 end Set_Is_Packed_Array_Impl_Type;
5221 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5223 pragma Assert (Nkind (Id) in N_Entity);
5225 end Set_Is_Potentially_Use_Visible;
5227 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5229 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5230 Set_Flag255 (Id, V);
5231 end Set_Is_Predicate_Function;
5233 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5235 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5236 Set_Flag256 (Id, V);
5237 end Set_Is_Predicate_Function_M;
5239 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5242 end Set_Is_Preelaborated;
5244 procedure Set_Is_Primitive (Id : E; V : B := True) is
5247 (Is_Overloadable (Id)
5248 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5249 Set_Flag218 (Id, V);
5250 end Set_Is_Primitive;
5252 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5254 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5255 Set_Flag195 (Id, V);
5256 end Set_Is_Primitive_Wrapper;
5258 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5260 pragma Assert (Is_Type (Id));
5261 Set_Flag107 (Id, V);
5262 end Set_Is_Private_Composite;
5264 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5267 end Set_Is_Private_Descendant;
5269 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5271 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5272 Set_Flag245 (Id, V);
5273 end Set_Is_Private_Primitive;
5275 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5277 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5278 Set_Flag252 (Id, V);
5279 end Set_Is_Processed_Transient;
5281 procedure Set_Is_Public (Id : E; V : B := True) is
5283 pragma Assert (Nkind (Id) in N_Entity);
5287 procedure Set_Is_Pure (Id : E; V : B := True) is
5292 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5294 pragma Assert (Is_Access_Type (Id));
5295 Set_Flag189 (Id, V);
5296 end Set_Is_Pure_Unit_Access_Type;
5298 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5300 pragma Assert (Is_Type (Id));
5301 Set_Flag244 (Id, V);
5302 end Set_Is_RACW_Stub_Type;
5304 procedure Set_Is_Raised (Id : E; V : B := True) is
5306 pragma Assert (Ekind (Id) = E_Exception);
5307 Set_Flag224 (Id, V);
5310 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5313 end Set_Is_Remote_Call_Interface;
5315 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5318 end Set_Is_Remote_Types;
5320 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5322 Set_Flag112 (Id, V);
5323 end Set_Is_Renaming_Of_Object;
5325 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5327 Set_Flag209 (Id, V);
5328 end Set_Is_Return_Object;
5330 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5332 pragma Assert (Ekind (Id) = E_Variable);
5333 Set_Flag249 (Id, V);
5334 end Set_Is_Safe_To_Reevaluate;
5336 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5339 end Set_Is_Shared_Passive;
5341 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5343 pragma Assert (Is_Type (Id));
5344 Set_Flag281 (Id, V);
5345 end Set_Is_Static_Type;
5347 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5351 or else Ekind_In (Id, E_Exception,
5356 end Set_Is_Statically_Allocated;
5358 procedure Set_Is_Tag (Id : E; V : B := True) is
5360 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5364 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5367 end Set_Is_Tagged_Type;
5369 procedure Set_Is_Thunk (Id : E; V : B := True) is
5371 pragma Assert (Is_Subprogram (Id));
5372 Set_Flag225 (Id, V);
5375 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5377 Set_Flag235 (Id, V);
5378 end Set_Is_Trivial_Subprogram;
5380 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5382 Set_Flag163 (Id, V);
5383 end Set_Is_True_Constant;
5385 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5387 pragma Assert (Id = Base_Type (Id));
5388 Set_Flag117 (Id, V);
5389 end Set_Is_Unchecked_Union;
5391 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5393 pragma Assert (Ekind (Id) = E_Record_Type);
5394 Set_Flag246 (Id, V);
5395 end Set_Is_Underlying_Record_View;
5397 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5399 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5400 Set_Flag144 (Id, V);
5401 end Set_Is_Unsigned_Type;
5403 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5405 pragma Assert (Ekind (Id) = E_Procedure);
5406 Set_Flag127 (Id, V);
5407 end Set_Is_Valued_Procedure;
5409 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5411 Set_Flag206 (Id, V);
5412 end Set_Is_Visible_Formal;
5414 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5416 Set_Flag116 (Id, V);
5417 end Set_Is_Visible_Lib_Unit;
5419 procedure Set_Is_Volatile (Id : E; V : B := True) is
5421 pragma Assert (Nkind (Id) in N_Entity);
5423 end Set_Is_Volatile;
5425 procedure Set_Itype_Printed (Id : E; V : B := True) is
5427 pragma Assert (Is_Itype (Id));
5428 Set_Flag202 (Id, V);
5429 end Set_Itype_Printed;
5431 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5434 end Set_Kill_Elaboration_Checks;
5436 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5439 end Set_Kill_Range_Checks;
5441 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5443 pragma Assert (Is_Type (Id));
5444 Set_Flag207 (Id, V);
5445 end Set_Known_To_Have_Preelab_Init;
5447 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5449 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5451 end Set_Last_Aggregate_Assignment;
5453 procedure Set_Last_Assignment (Id : E; V : N) is
5455 pragma Assert (Is_Assignable (Id));
5457 end Set_Last_Assignment;
5459 procedure Set_Last_Entity (Id : E; V : E) is
5462 end Set_Last_Entity;
5464 procedure Set_Limited_View (Id : E; V : E) is
5466 pragma Assert (Ekind (Id) = E_Package);
5468 end Set_Limited_View;
5470 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5472 pragma Assert (Is_Type (Id)
5473 or else Ekind_In (Id, E_Constant, E_Variable)
5474 or else Is_Subprogram (Id));
5476 end Set_Linker_Section_Pragma;
5478 procedure Set_Lit_Indexes (Id : E; V : E) is
5480 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5482 end Set_Lit_Indexes;
5484 procedure Set_Lit_Strings (Id : E; V : E) is
5486 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5488 end Set_Lit_Strings;
5490 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5492 pragma Assert (Is_Formal (Id));
5493 Set_Flag205 (Id, V);
5494 end Set_Low_Bound_Tested;
5496 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5498 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5500 end Set_Machine_Radix_10;
5502 procedure Set_Master_Id (Id : E; V : E) is
5504 pragma Assert (Is_Access_Type (Id));
5508 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5510 Set_Flag168 (Id, V);
5511 end Set_Materialize_Entity;
5513 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5515 Set_Flag262 (Id, V);
5516 end Set_May_Inherit_Delayed_Rep_Aspects;
5518 procedure Set_Mechanism (Id : E; V : M) is
5520 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5521 Set_Uint8 (Id, UI_From_Int (V));
5524 procedure Set_Modulus (Id : E; V : U) is
5526 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5530 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5532 pragma Assert (Is_Type (Id));
5533 Set_Flag183 (Id, V);
5534 end Set_Must_Be_On_Byte_Boundary;
5536 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5538 pragma Assert (Is_Type (Id));
5539 Set_Flag208 (Id, V);
5540 end Set_Must_Have_Preelab_Init;
5542 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5544 Set_Flag147 (Id, V);
5545 end Set_Needs_Debug_Info;
5547 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5550 (Is_Overloadable (Id)
5551 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5553 end Set_Needs_No_Actuals;
5555 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5557 Set_Flag115 (Id, V);
5558 end Set_Never_Set_In_Source;
5560 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5563 end Set_Next_Inlined_Subprogram;
5565 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5567 pragma Assert (Is_Discrete_Type (Id));
5568 Set_Flag276 (Id, V);
5569 end Set_No_Dynamic_Predicate_On_Actual;
5571 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5573 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5574 Set_Flag131 (Id, V);
5575 end Set_No_Pool_Assigned;
5577 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5579 pragma Assert (Is_Discrete_Type (Id));
5580 Set_Flag275 (Id, V);
5581 end Set_No_Predicate_On_Actual;
5583 procedure Set_No_Return (Id : E; V : B := True) is
5586 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5587 Set_Flag113 (Id, V);
5590 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5592 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5593 Set_Flag136 (Id, V);
5594 end Set_No_Strict_Aliasing;
5596 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5598 pragma Assert (Is_Tagged_Type (Id));
5600 end Set_No_Tagged_Streams_Pragma;
5602 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5604 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5606 end Set_Non_Binary_Modulus;
5608 procedure Set_Non_Limited_View (Id : E; V : E) is
5611 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5613 end Set_Non_Limited_View;
5615 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5618 (Root_Type (Id) = Standard_Boolean
5619 and then Ekind (Id) = E_Enumeration_Type);
5620 Set_Flag162 (Id, V);
5621 end Set_Nonzero_Is_True;
5623 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5625 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5627 end Set_Normalized_First_Bit;
5629 procedure Set_Normalized_Position (Id : E; V : U) is
5631 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5633 end Set_Normalized_Position;
5635 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5637 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5639 end Set_Normalized_Position_Max;
5641 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5643 pragma Assert (Ekind (Id) = E_Variable);
5644 Set_Flag247 (Id, V);
5645 end Set_OK_To_Rename;
5647 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5650 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5651 Set_Flag239 (Id, V);
5652 end Set_OK_To_Reorder_Components;
5654 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5657 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5658 Set_Flag241 (Id, V);
5659 end Set_Optimize_Alignment_Space;
5661 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5664 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5665 Set_Flag242 (Id, V);
5666 end Set_Optimize_Alignment_Time;
5668 procedure Set_Original_Access_Type (Id : E; V : E) is
5670 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5672 end Set_Original_Access_Type;
5674 procedure Set_Original_Array_Type (Id : E; V : E) is
5676 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5678 end Set_Original_Array_Type;
5680 procedure Set_Original_Record_Component (Id : E; V : E) is
5682 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5684 end Set_Original_Record_Component;
5686 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5688 Set_Flag243 (Id, V);
5689 end Set_Overlays_Constant;
5691 procedure Set_Overridden_Operation (Id : E; V : E) is
5694 end Set_Overridden_Operation;
5696 procedure Set_Package_Instantiation (Id : E; V : N) is
5698 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5700 end Set_Package_Instantiation;
5702 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5704 pragma Assert (Is_Array_Type (Id));
5706 end Set_Packed_Array_Impl_Type;
5708 procedure Set_Parent_Subtype (Id : E; V : E) is
5710 pragma Assert (Ekind (Id) = E_Record_Type);
5712 end Set_Parent_Subtype;
5714 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5716 pragma Assert (Ekind (Id) = E_Abstract_State);
5718 end Set_Part_Of_Constituents;
5720 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5722 pragma Assert (Is_Type (Id));
5723 Set_Flag280 (Id, V);
5724 end Set_Partial_View_Has_Unknown_Discr;
5726 procedure Set_Pending_Access_Types (Id : E; V : L) is
5728 pragma Assert (Is_Type (Id));
5729 Set_Elist15 (Id, V);
5730 end Set_Pending_Access_Types;
5732 procedure Set_Postconditions_Proc (Id : E; V : E) is
5734 pragma Assert (Ekind_In (Id, E_Entry,
5739 end Set_Postconditions_Proc;
5741 procedure Set_PPC_Wrapper (Id : E; V : E) is
5743 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5745 end Set_PPC_Wrapper;
5747 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5749 pragma Assert (Is_Tagged_Type (Id));
5750 Set_Elist10 (Id, V);
5751 end Set_Direct_Primitive_Operations;
5753 procedure Set_Prival (Id : E; V : E) is
5755 pragma Assert (Is_Protected_Component (Id));
5759 procedure Set_Prival_Link (Id : E; V : E) is
5761 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5763 end Set_Prival_Link;
5765 procedure Set_Private_Dependents (Id : E; V : L) is
5767 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5768 Set_Elist18 (Id, V);
5769 end Set_Private_Dependents;
5771 procedure Set_Private_View (Id : E; V : N) is
5773 pragma Assert (Is_Private_Type (Id));
5775 end Set_Private_View;
5777 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5779 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5781 end Set_Protected_Body_Subprogram;
5783 procedure Set_Protected_Formal (Id : E; V : E) is
5785 pragma Assert (Is_Formal (Id));
5787 end Set_Protected_Formal;
5789 procedure Set_Protection_Object (Id : E; V : E) is
5791 pragma Assert (Ekind_In (Id, E_Entry,
5796 end Set_Protection_Object;
5798 procedure Set_Reachable (Id : E; V : B := True) is
5803 procedure Set_Referenced (Id : E; V : B := True) is
5805 Set_Flag156 (Id, V);
5808 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5811 end Set_Referenced_As_LHS;
5813 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5815 Set_Flag227 (Id, V);
5816 end Set_Referenced_As_Out_Parameter;
5818 procedure Set_Refinement_Constituents (Id : E; V : L) is
5820 pragma Assert (Ekind (Id) = E_Abstract_State);
5822 end Set_Refinement_Constituents;
5824 procedure Set_Register_Exception_Call (Id : E; V : N) is
5826 pragma Assert (Ekind (Id) = E_Exception);
5828 end Set_Register_Exception_Call;
5830 procedure Set_Related_Array_Object (Id : E; V : E) is
5832 pragma Assert (Is_Array_Type (Id));
5834 end Set_Related_Array_Object;
5836 procedure Set_Related_Expression (Id : E; V : N) is
5838 pragma Assert (Ekind (Id) in Type_Kind
5839 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5841 end Set_Related_Expression;
5843 procedure Set_Related_Instance (Id : E; V : E) is
5845 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5847 end Set_Related_Instance;
5849 procedure Set_Related_Type (Id : E; V : E) is
5851 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5853 end Set_Related_Type;
5855 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5857 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5859 end Set_Relative_Deadline_Variable;
5861 procedure Set_Renamed_Entity (Id : E; V : N) is
5864 end Set_Renamed_Entity;
5866 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5868 pragma Assert (Ekind (Id) = E_Package);
5869 Set_Flag231 (Id, V);
5870 end Set_Renamed_In_Spec;
5872 procedure Set_Renamed_Object (Id : E; V : N) is
5875 end Set_Renamed_Object;
5877 procedure Set_Renaming_Map (Id : E; V : U) is
5880 end Set_Renaming_Map;
5882 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5884 pragma Assert (Is_Overloadable (Id));
5885 Set_Flag213 (Id, V);
5886 end Set_Requires_Overriding;
5888 procedure Set_Return_Present (Id : E; V : B := True) is
5891 end Set_Return_Present;
5893 procedure Set_Return_Applies_To (Id : E; V : N) is
5896 end Set_Return_Applies_To;
5898 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5901 end Set_Returns_By_Ref;
5903 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5905 pragma Assert (Ekind (Id) = E_Function);
5906 Set_Flag134 (Id, V);
5907 end Set_Returns_Limited_View;
5909 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5912 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5913 Set_Flag164 (Id, V);
5914 end Set_Reverse_Bit_Order;
5916 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5920 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5922 end Set_Reverse_Storage_Order;
5924 procedure Set_RM_Size (Id : E; V : U) is
5926 pragma Assert (Is_Type (Id));
5930 procedure Set_Scalar_Range (Id : E; V : N) is
5933 end Set_Scalar_Range;
5935 procedure Set_Scale_Value (Id : E; V : U) is
5938 end Set_Scale_Value;
5940 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5942 pragma Assert (not Is_Record_Type (Id));
5944 end Set_Scope_Depth_Value;
5946 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5948 Set_Flag167 (Id, V);
5949 end Set_Sec_Stack_Needed_For_Return;
5951 procedure Set_Shadow_Entities (Id : E; V : S) is
5953 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5955 end Set_Shadow_Entities;
5957 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5959 pragma Assert (Ekind (Id) = E_Variable);
5961 end Set_Shared_Var_Procs_Instance;
5963 procedure Set_Size_Check_Code (Id : E; V : N) is
5965 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5967 end Set_Size_Check_Code;
5969 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5971 Set_Flag177 (Id, V);
5972 end Set_Size_Depends_On_Discriminant;
5974 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5977 end Set_Size_Known_At_Compile_Time;
5979 procedure Set_Small_Value (Id : E; V : R) is
5981 pragma Assert (Is_Fixed_Point_Type (Id));
5982 Set_Ureal21 (Id, V);
5983 end Set_Small_Value;
5985 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5988 (Ekind_In (Id, E_Generic_Package, -- package variants
5993 end Set_SPARK_Aux_Pragma;
5995 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5998 (Ekind_In (Id, E_Generic_Package, -- package variants
6002 Set_Flag266 (Id, V);
6003 end Set_SPARK_Aux_Pragma_Inherited;
6005 procedure Set_SPARK_Pragma (Id : E; V : N) is
6008 (Ekind_In (Id, E_Function, -- subprogram variants
6010 E_Generic_Procedure,
6014 Ekind_In (Id, E_Generic_Package, -- package variants
6019 end Set_SPARK_Pragma;
6021 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6024 (Ekind_In (Id, E_Function, -- subprogram variants
6026 E_Generic_Procedure,
6030 Ekind_In (Id, E_Generic_Package, -- package variants
6034 Set_Flag265 (Id, V);
6035 end Set_SPARK_Pragma_Inherited;
6037 procedure Set_Spec_Entity (Id : E; V : E) is
6039 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6041 end Set_Spec_Entity;
6043 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6047 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6048 Set_Flag273 (Id, V);
6049 end Set_SSO_Set_High_By_Default;
6051 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6055 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6056 Set_Flag272 (Id, V);
6057 end Set_SSO_Set_Low_By_Default;
6059 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6061 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6063 end Set_Static_Discrete_Predicate;
6065 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6067 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6068 and then Has_Predicates (Id));
6070 end Set_Static_Real_Or_String_Predicate;
6072 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6074 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6076 end Set_Status_Flag_Or_Transient_Decl;
6078 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6080 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6081 pragma Assert (Id = Base_Type (Id));
6083 end Set_Storage_Size_Variable;
6085 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6087 pragma Assert (Ekind (Id) = E_Package);
6089 end Set_Static_Elaboration_Desired;
6091 procedure Set_Static_Initialization (Id : E; V : N) is
6094 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6096 end Set_Static_Initialization;
6098 procedure Set_Stored_Constraint (Id : E; V : L) is
6100 pragma Assert (Nkind (Id) in N_Entity);
6101 Set_Elist23 (Id, V);
6102 end Set_Stored_Constraint;
6104 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6106 pragma Assert (Ekind (Id) = E_Constant);
6107 Set_Flag270 (Id, V);
6108 end Set_Stores_Attribute_Old_Prefix;
6110 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6112 pragma Assert (Id = Base_Type (Id));
6113 Set_Flag145 (Id, V);
6114 end Set_Strict_Alignment;
6116 procedure Set_String_Literal_Length (Id : E; V : U) is
6118 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6120 end Set_String_Literal_Length;
6122 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6124 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6126 end Set_String_Literal_Low_Bound;
6128 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6130 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6132 end Set_Subprograms_For_Type;
6134 procedure Set_Subps_Index (Id : E; V : U) is
6136 pragma Assert (Is_Subprogram (Id));
6138 end Set_Subps_Index;
6140 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6142 Set_Flag148 (Id, V);
6143 end Set_Suppress_Elaboration_Warnings;
6145 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6147 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6148 Set_Flag105 (Id, V);
6149 end Set_Suppress_Initialization;
6151 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6153 Set_Flag165 (Id, V);
6154 end Set_Suppress_Style_Checks;
6156 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6158 Set_Flag217 (Id, V);
6159 end Set_Suppress_Value_Tracking_On_Call;
6161 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6163 pragma Assert (Ekind (Id) in Task_Kind);
6165 end Set_Task_Body_Procedure;
6167 procedure Set_Thunk_Entity (Id : E; V : E) is
6169 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6170 and then Is_Thunk (Id));
6172 end Set_Thunk_Entity;
6174 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6177 end Set_Treat_As_Volatile;
6179 procedure Set_Underlying_Full_View (Id : E; V : E) is
6181 pragma Assert (Ekind (Id) in Private_Kind);
6183 end Set_Underlying_Full_View;
6185 procedure Set_Underlying_Record_View (Id : E; V : E) is
6187 pragma Assert (Ekind (Id) = E_Record_Type);
6189 end Set_Underlying_Record_View;
6191 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6193 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6194 Set_Flag216 (Id, V);
6195 end Set_Universal_Aliasing;
6197 procedure Set_Unset_Reference (Id : E; V : N) is
6200 end Set_Unset_Reference;
6202 procedure Set_Uplevel_Reference_Noted (Id : E; V : B := True) is
6204 Set_Flag283 (Id, V);
6205 end Set_Uplevel_Reference_Noted;
6207 procedure Set_Uplevel_References (Id : E; V : L) is
6209 pragma Assert (Is_Subprogram (Id));
6210 Set_Elist24 (Id, V);
6211 end Set_Uplevel_References;
6213 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6215 Set_Flag222 (Id, V);
6216 end Set_Used_As_Generic_Actual;
6218 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6220 pragma Assert (Ekind (Id) = E_Protected_Type);
6221 Set_Flag188 (Id, V);
6222 end Set_Uses_Lock_Free;
6224 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6227 end Set_Uses_Sec_Stack;
6229 procedure Set_Warnings_Off (Id : E; V : B := True) is
6232 end Set_Warnings_Off;
6234 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6236 Set_Flag236 (Id, V);
6237 end Set_Warnings_Off_Used;
6239 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6241 Set_Flag237 (Id, V);
6242 end Set_Warnings_Off_Used_Unmodified;
6244 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6246 Set_Flag238 (Id, V);
6247 end Set_Warnings_Off_Used_Unreferenced;
6249 procedure Set_Was_Hidden (Id : E; V : B := True) is
6251 Set_Flag196 (Id, V);
6254 procedure Set_Wrapped_Entity (Id : E; V : E) is
6256 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6257 and then Is_Primitive_Wrapper (Id));
6259 end Set_Wrapped_Entity;
6261 -----------------------------------
6262 -- Field Initialization Routines --
6263 -----------------------------------
6265 procedure Init_Alignment (Id : E) is
6267 Set_Uint14 (Id, Uint_0);
6270 procedure Init_Alignment (Id : E; V : Int) is
6272 Set_Uint14 (Id, UI_From_Int (V));
6275 procedure Init_Component_Bit_Offset (Id : E) is
6277 Set_Uint11 (Id, No_Uint);
6278 end Init_Component_Bit_Offset;
6280 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6282 Set_Uint11 (Id, UI_From_Int (V));
6283 end Init_Component_Bit_Offset;
6285 procedure Init_Component_Size (Id : E) is
6287 Set_Uint22 (Id, Uint_0);
6288 end Init_Component_Size;
6290 procedure Init_Component_Size (Id : E; V : Int) is
6292 Set_Uint22 (Id, UI_From_Int (V));
6293 end Init_Component_Size;
6295 procedure Init_Digits_Value (Id : E) is
6297 Set_Uint17 (Id, Uint_0);
6298 end Init_Digits_Value;
6300 procedure Init_Digits_Value (Id : E; V : Int) is
6302 Set_Uint17 (Id, UI_From_Int (V));
6303 end Init_Digits_Value;
6305 procedure Init_Esize (Id : E) is
6307 Set_Uint12 (Id, Uint_0);
6310 procedure Init_Esize (Id : E; V : Int) is
6312 Set_Uint12 (Id, UI_From_Int (V));
6315 procedure Init_Normalized_First_Bit (Id : E) is
6317 Set_Uint8 (Id, No_Uint);
6318 end Init_Normalized_First_Bit;
6320 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6322 Set_Uint8 (Id, UI_From_Int (V));
6323 end Init_Normalized_First_Bit;
6325 procedure Init_Normalized_Position (Id : E) is
6327 Set_Uint14 (Id, No_Uint);
6328 end Init_Normalized_Position;
6330 procedure Init_Normalized_Position (Id : E; V : Int) is
6332 Set_Uint14 (Id, UI_From_Int (V));
6333 end Init_Normalized_Position;
6335 procedure Init_Normalized_Position_Max (Id : E) is
6337 Set_Uint10 (Id, No_Uint);
6338 end Init_Normalized_Position_Max;
6340 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6342 Set_Uint10 (Id, UI_From_Int (V));
6343 end Init_Normalized_Position_Max;
6345 procedure Init_RM_Size (Id : E) is
6347 Set_Uint13 (Id, Uint_0);
6350 procedure Init_RM_Size (Id : E; V : Int) is
6352 Set_Uint13 (Id, UI_From_Int (V));
6355 -----------------------------
6356 -- Init_Component_Location --
6357 -----------------------------
6359 procedure Init_Component_Location (Id : E) is
6361 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6362 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6363 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6364 Set_Uint12 (Id, Uint_0); -- Esize
6365 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6366 end Init_Component_Location;
6368 ----------------------------
6369 -- Init_Object_Size_Align --
6370 ----------------------------
6372 procedure Init_Object_Size_Align (Id : E) is
6374 Set_Uint12 (Id, Uint_0); -- Esize
6375 Set_Uint14 (Id, Uint_0); -- Alignment
6376 end Init_Object_Size_Align;
6382 procedure Init_Size (Id : E; V : Int) is
6384 pragma Assert (not Is_Object (Id));
6385 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6386 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6389 ---------------------
6390 -- Init_Size_Align --
6391 ---------------------
6393 procedure Init_Size_Align (Id : E) is
6395 pragma Assert (not Is_Object (Id));
6396 Set_Uint12 (Id, Uint_0); -- Esize
6397 Set_Uint13 (Id, Uint_0); -- RM_Size
6398 Set_Uint14 (Id, Uint_0); -- Alignment
6399 end Init_Size_Align;
6401 ----------------------------------------------
6402 -- Type Representation Attribute Predicates --
6403 ----------------------------------------------
6405 function Known_Alignment (E : Entity_Id) return B is
6407 return Uint14 (E) /= Uint_0
6408 and then Uint14 (E) /= No_Uint;
6409 end Known_Alignment;
6411 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6413 return Uint11 (E) /= No_Uint;
6414 end Known_Component_Bit_Offset;
6416 function Known_Component_Size (E : Entity_Id) return B is
6418 return Uint22 (Base_Type (E)) /= Uint_0
6419 and then Uint22 (Base_Type (E)) /= No_Uint;
6420 end Known_Component_Size;
6422 function Known_Esize (E : Entity_Id) return B is
6424 return Uint12 (E) /= Uint_0
6425 and then Uint12 (E) /= No_Uint;
6428 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6430 return Uint8 (E) /= No_Uint;
6431 end Known_Normalized_First_Bit;
6433 function Known_Normalized_Position (E : Entity_Id) return B is
6435 return Uint14 (E) /= No_Uint;
6436 end Known_Normalized_Position;
6438 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6440 return Uint10 (E) /= No_Uint;
6441 end Known_Normalized_Position_Max;
6443 function Known_RM_Size (E : Entity_Id) return B is
6445 return Uint13 (E) /= No_Uint
6446 and then (Uint13 (E) /= Uint_0
6447 or else Is_Discrete_Type (E)
6448 or else Is_Fixed_Point_Type (E));
6451 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6453 return Uint11 (E) /= No_Uint
6454 and then Uint11 (E) >= Uint_0;
6455 end Known_Static_Component_Bit_Offset;
6457 function Known_Static_Component_Size (E : Entity_Id) return B is
6459 return Uint22 (Base_Type (E)) > Uint_0;
6460 end Known_Static_Component_Size;
6462 function Known_Static_Esize (E : Entity_Id) return B is
6464 return Uint12 (E) > Uint_0
6465 and then not Is_Generic_Type (E);
6466 end Known_Static_Esize;
6468 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6470 return Uint8 (E) /= No_Uint
6471 and then Uint8 (E) >= Uint_0;
6472 end Known_Static_Normalized_First_Bit;
6474 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6476 return Uint14 (E) /= No_Uint
6477 and then Uint14 (E) >= Uint_0;
6478 end Known_Static_Normalized_Position;
6480 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6482 return Uint10 (E) /= No_Uint
6483 and then Uint10 (E) >= Uint_0;
6484 end Known_Static_Normalized_Position_Max;
6486 function Known_Static_RM_Size (E : Entity_Id) return B is
6488 return (Uint13 (E) > Uint_0
6489 or else Is_Discrete_Type (E)
6490 or else Is_Fixed_Point_Type (E))
6491 and then not Is_Generic_Type (E);
6492 end Known_Static_RM_Size;
6494 function Unknown_Alignment (E : Entity_Id) return B is
6496 return Uint14 (E) = Uint_0
6497 or else Uint14 (E) = No_Uint;
6498 end Unknown_Alignment;
6500 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6502 return Uint11 (E) = No_Uint;
6503 end Unknown_Component_Bit_Offset;
6505 function Unknown_Component_Size (E : Entity_Id) return B is
6507 return Uint22 (Base_Type (E)) = Uint_0
6509 Uint22 (Base_Type (E)) = No_Uint;
6510 end Unknown_Component_Size;
6512 function Unknown_Esize (E : Entity_Id) return B is
6514 return Uint12 (E) = No_Uint
6516 Uint12 (E) = Uint_0;
6519 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6521 return Uint8 (E) = No_Uint;
6522 end Unknown_Normalized_First_Bit;
6524 function Unknown_Normalized_Position (E : Entity_Id) return B is
6526 return Uint14 (E) = No_Uint;
6527 end Unknown_Normalized_Position;
6529 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6531 return Uint10 (E) = No_Uint;
6532 end Unknown_Normalized_Position_Max;
6534 function Unknown_RM_Size (E : Entity_Id) return B is
6536 return (Uint13 (E) = Uint_0
6537 and then not Is_Discrete_Type (E)
6538 and then not Is_Fixed_Point_Type (E))
6539 or else Uint13 (E) = No_Uint;
6540 end Unknown_RM_Size;
6542 --------------------
6543 -- Address_Clause --
6544 --------------------
6546 function Address_Clause (Id : E) return N is
6548 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6555 function Aft_Value (Id : E) return U is
6557 Delta_Val : Ureal := Delta_Value (Id);
6559 while Delta_Val < Ureal_Tenth loop
6560 Delta_Val := Delta_Val * Ureal_10;
6561 Result := Result + 1;
6564 return UI_From_Int (Result);
6567 ----------------------
6568 -- Alignment_Clause --
6569 ----------------------
6571 function Alignment_Clause (Id : E) return N is
6573 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6574 end Alignment_Clause;
6580 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6582 if Last_Entity (V) = Empty then
6583 Set_First_Entity (Id => V, V => Id);
6585 Set_Next_Entity (Last_Entity (V), Id);
6588 Set_Next_Entity (Id, Empty);
6590 Set_Last_Entity (Id => V, V => Id);
6597 function Base_Type (Id : E) return E is
6599 if Is_Base_Type (Id) then
6602 pragma Assert (Is_Type (Id));
6607 -------------------------
6608 -- Component_Alignment --
6609 -------------------------
6611 -- Component Alignment is encoded using two flags, Flag128/129 as
6612 -- follows. Note that both flags False = Align_Default, so that the
6613 -- default initialization of flags to False initializes component
6614 -- alignment to the default value as required.
6616 -- Flag128 Flag129 Value
6617 -- ------- ------- -----
6618 -- False False Calign_Default
6619 -- False True Calign_Component_Size
6620 -- True False Calign_Component_Size_4
6621 -- True True Calign_Storage_Unit
6623 function Component_Alignment (Id : E) return C is
6624 BT : constant Node_Id := Base_Type (Id);
6627 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6629 if Flag128 (BT) then
6630 if Flag129 (BT) then
6631 return Calign_Storage_Unit;
6633 return Calign_Component_Size_4;
6637 if Flag129 (BT) then
6638 return Calign_Component_Size;
6640 return Calign_Default;
6643 end Component_Alignment;
6645 ----------------------
6646 -- Declaration_Node --
6647 ----------------------
6649 function Declaration_Node (Id : E) return N is
6653 if Ekind (Id) = E_Incomplete_Type
6654 and then Present (Full_View (Id))
6656 P := Parent (Full_View (Id));
6662 if Nkind (P) /= N_Selected_Component
6663 and then Nkind (P) /= N_Expanded_Name
6665 not (Nkind (P) = N_Defining_Program_Unit_Name
6666 and then Is_Child_Unit (Id))
6673 end Declaration_Node;
6675 ---------------------------------
6676 -- Default_Init_Cond_Procedure --
6677 ---------------------------------
6679 function Default_Init_Cond_Procedure (Id : E) return E is
6685 and then (Has_Default_Init_Cond (Id)
6686 or Has_Inherited_Default_Init_Cond (Id)));
6688 S := Subprograms_For_Type (Id);
6689 while Present (S) loop
6690 if Is_Default_Init_Cond_Procedure (S) then
6694 S := Subprograms_For_Type (S);
6698 end Default_Init_Cond_Procedure;
6700 ---------------------
6701 -- Designated_Type --
6702 ---------------------
6704 function Designated_Type (Id : E) return E is
6708 Desig_Type := Directly_Designated_Type (Id);
6710 if Ekind (Desig_Type) = E_Incomplete_Type
6711 and then Present (Full_View (Desig_Type))
6713 return Full_View (Desig_Type);
6715 elsif Is_Class_Wide_Type (Desig_Type)
6716 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6717 and then Present (Full_View (Etype (Desig_Type)))
6718 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6720 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6725 end Designated_Type;
6727 ----------------------
6728 -- Entry_Index_Type --
6729 ----------------------
6731 function Entry_Index_Type (Id : E) return N is
6733 pragma Assert (Ekind (Id) = E_Entry_Family);
6734 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6735 end Entry_Index_Type;
6737 ---------------------
6738 -- First_Component --
6739 ---------------------
6741 function First_Component (Id : E) return E is
6746 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6748 Comp_Id := First_Entity (Id);
6749 while Present (Comp_Id) loop
6750 exit when Ekind (Comp_Id) = E_Component;
6751 Comp_Id := Next_Entity (Comp_Id);
6755 end First_Component;
6757 -------------------------------------
6758 -- First_Component_Or_Discriminant --
6759 -------------------------------------
6761 function First_Component_Or_Discriminant (Id : E) return E is
6766 (Is_Record_Type (Id)
6767 or else Is_Incomplete_Or_Private_Type (Id)
6768 or else Has_Discriminants (Id));
6770 Comp_Id := First_Entity (Id);
6771 while Present (Comp_Id) loop
6772 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6773 Comp_Id := Next_Entity (Comp_Id);
6777 end First_Component_Or_Discriminant;
6783 function First_Formal (Id : E) return E is
6788 (Is_Generic_Subprogram (Id)
6789 or else Is_Overloadable (Id)
6790 or else Ekind_In (Id, E_Entry_Family,
6792 E_Subprogram_Type));
6794 if Ekind (Id) = E_Enumeration_Literal then
6798 Formal := First_Entity (Id);
6800 -- The first/next entity chain of a generic subprogram contains all
6801 -- generic formal parameters, followed by the formal parameters. Go
6802 -- directly to the parameters by skipping the formal part.
6804 if Is_Generic_Subprogram (Id) then
6805 while Present (Formal) and then not Is_Formal (Formal) loop
6806 Next_Entity (Formal);
6810 if Present (Formal) and then Is_Formal (Formal) then
6818 ------------------------------
6819 -- First_Formal_With_Extras --
6820 ------------------------------
6822 function First_Formal_With_Extras (Id : E) return E is
6827 (Is_Generic_Subprogram (Id)
6828 or else Is_Overloadable (Id)
6829 or else Ekind_In (Id, E_Entry_Family,
6831 E_Subprogram_Type));
6833 if Ekind (Id) = E_Enumeration_Literal then
6837 Formal := First_Entity (Id);
6839 -- The first/next entity chain of a generic subprogram contains all
6840 -- generic formal parameters, followed by the formal parameters. Go
6841 -- directly to the parameters by skipping the formal part.
6843 if Is_Generic_Subprogram (Id) then
6844 while Present (Formal) and then not Is_Formal (Formal) loop
6845 Next_Entity (Formal);
6849 if Present (Formal) and then Is_Formal (Formal) then
6852 return Extra_Formals (Id); -- Empty if no extra formals
6855 end First_Formal_With_Extras;
6857 -------------------------------------
6858 -- Get_Attribute_Definition_Clause --
6859 -------------------------------------
6861 function Get_Attribute_Definition_Clause
6863 Id : Attribute_Id) return Node_Id
6868 N := First_Rep_Item (E);
6869 while Present (N) loop
6870 if Nkind (N) = N_Attribute_Definition_Clause
6871 and then Get_Attribute_Id (Chars (N)) = Id
6880 end Get_Attribute_Definition_Clause;
6886 function Get_Full_View (T : Entity_Id) return Entity_Id is
6888 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6889 return Full_View (T);
6891 elsif Is_Class_Wide_Type (T)
6892 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6893 and then Present (Full_View (Root_Type (T)))
6895 return Class_Wide_Type (Full_View (Root_Type (T)));
6906 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6907 Is_CDG : constant Boolean :=
6908 Id = Pragma_Abstract_State or else
6909 Id = Pragma_Async_Readers or else
6910 Id = Pragma_Async_Writers or else
6911 Id = Pragma_Depends or else
6912 Id = Pragma_Effective_Reads or else
6913 Id = Pragma_Effective_Writes or else
6914 Id = Pragma_Extensions_Visible or else
6915 Id = Pragma_Global or else
6916 Id = Pragma_Initial_Condition or else
6917 Id = Pragma_Initializes or else
6918 Id = Pragma_Part_Of or else
6919 Id = Pragma_Refined_Depends or else
6920 Id = Pragma_Refined_Global or else
6921 Id = Pragma_Refined_State;
6922 Is_CTC : constant Boolean :=
6923 Id = Pragma_Contract_Cases or else
6924 Id = Pragma_Test_Case;
6925 Is_PPC : constant Boolean :=
6926 Id = Pragma_Precondition or else
6927 Id = Pragma_Postcondition or else
6928 Id = Pragma_Refined_Post;
6930 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6936 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6937 -- extracted from their specialized list.
6940 Items := Contract (E);
6946 Item := Classifications (Items);
6949 Item := Contract_Test_Cases (Items);
6952 Item := Pre_Post_Conditions (Items);
6958 Item := First_Rep_Item (E);
6961 while Present (Item) loop
6962 if Nkind (Item) = N_Pragma
6963 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6967 -- All nodes in N_Contract are chained using Next_Pragma
6969 elsif In_Contract then
6970 Item := Next_Pragma (Item);
6975 Next_Rep_Item (Item);
6982 --------------------------------------
6983 -- Get_Record_Representation_Clause --
6984 --------------------------------------
6986 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6990 N := First_Rep_Item (E);
6991 while Present (N) loop
6992 if Nkind (N) = N_Record_Representation_Clause then
7000 end Get_Record_Representation_Clause;
7002 ------------------------
7003 -- Has_Attach_Handler --
7004 ------------------------
7006 function Has_Attach_Handler (Id : E) return B is
7010 pragma Assert (Is_Protected_Type (Id));
7012 Ritem := First_Rep_Item (Id);
7013 while Present (Ritem) loop
7014 if Nkind (Ritem) = N_Pragma
7015 and then Pragma_Name (Ritem) = Name_Attach_Handler
7019 Next_Rep_Item (Ritem);
7024 end Has_Attach_Handler;
7030 function Has_Entries (Id : E) return B is
7034 pragma Assert (Is_Concurrent_Type (Id));
7036 Ent := First_Entity (Id);
7037 while Present (Ent) loop
7038 if Is_Entry (Ent) then
7042 Ent := Next_Entity (Ent);
7048 ----------------------------
7049 -- Has_Foreign_Convention --
7050 ----------------------------
7052 function Has_Foreign_Convention (Id : E) return B is
7054 -- While regular Intrinsics such as the Standard operators fit in the
7055 -- "Ada" convention, those with an Interface_Name materialize GCC
7056 -- builtin imports for which Ada special treatments shouldn't apply.
7058 return Convention (Id) in Foreign_Convention
7059 or else (Convention (Id) = Convention_Intrinsic
7060 and then Present (Interface_Name (Id)));
7061 end Has_Foreign_Convention;
7063 ---------------------------
7064 -- Has_Interrupt_Handler --
7065 ---------------------------
7067 function Has_Interrupt_Handler (Id : E) return B is
7071 pragma Assert (Is_Protected_Type (Id));
7073 Ritem := First_Rep_Item (Id);
7074 while Present (Ritem) loop
7075 if Nkind (Ritem) = N_Pragma
7076 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7080 Next_Rep_Item (Ritem);
7085 end Has_Interrupt_Handler;
7087 -----------------------------
7088 -- Has_Non_Null_Refinement --
7089 -----------------------------
7091 function Has_Non_Null_Refinement (Id : E) return B is
7093 -- "Refinement" is a concept applicable only to abstract states
7095 pragma Assert (Ekind (Id) = E_Abstract_State);
7097 if Has_Visible_Refinement (Id) then
7098 pragma Assert (Present (Refinement_Constituents (Id)));
7100 -- For a refinement to be non-null, the first constituent must be
7101 -- anything other than null.
7104 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7108 end Has_Non_Null_Refinement;
7110 -----------------------------
7111 -- Has_Null_Abstract_State --
7112 -----------------------------
7114 function Has_Null_Abstract_State (Id : E) return B is
7116 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7119 Present (Abstract_States (Id))
7120 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7121 end Has_Null_Abstract_State;
7123 -------------------------
7124 -- Has_Null_Refinement --
7125 -------------------------
7127 function Has_Null_Refinement (Id : E) return B is
7129 -- "Refinement" is a concept applicable only to abstract states
7131 pragma Assert (Ekind (Id) = E_Abstract_State);
7133 if Has_Visible_Refinement (Id) then
7134 pragma Assert (Present (Refinement_Constituents (Id)));
7136 -- For a refinement to be null, the state's sole constituent must be
7140 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7144 end Has_Null_Refinement;
7146 --------------------
7147 -- Has_Unmodified --
7148 --------------------
7150 function Has_Unmodified (E : Entity_Id) return Boolean is
7152 if Has_Pragma_Unmodified (E) then
7154 elsif Warnings_Off (E) then
7155 Set_Warnings_Off_Used_Unmodified (E);
7162 ---------------------
7163 -- Has_Unreferenced --
7164 ---------------------
7166 function Has_Unreferenced (E : Entity_Id) return Boolean is
7168 if Has_Pragma_Unreferenced (E) then
7170 elsif Warnings_Off (E) then
7171 Set_Warnings_Off_Used_Unreferenced (E);
7176 end Has_Unreferenced;
7178 ----------------------
7179 -- Has_Warnings_Off --
7180 ----------------------
7182 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7184 if Warnings_Off (E) then
7185 Set_Warnings_Off_Used (E);
7190 end Has_Warnings_Off;
7192 ------------------------------
7193 -- Implementation_Base_Type --
7194 ------------------------------
7196 function Implementation_Base_Type (Id : E) return E is
7201 Bastyp := Base_Type (Id);
7203 if Is_Incomplete_Or_Private_Type (Bastyp) then
7204 Imptyp := Underlying_Type (Bastyp);
7206 -- If we have an implementation type, then just return it,
7207 -- otherwise we return the Base_Type anyway. This can only
7208 -- happen in error situations and should avoid some error bombs.
7210 if Present (Imptyp) then
7211 return Base_Type (Imptyp);
7219 end Implementation_Base_Type;
7221 -------------------------
7222 -- Invariant_Procedure --
7223 -------------------------
7225 function Invariant_Procedure (Id : E) return E is
7229 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7231 if No (Subprograms_For_Type (Id)) then
7235 S := Subprograms_For_Type (Id);
7236 while Present (S) loop
7237 if Is_Invariant_Procedure (S) then
7240 S := Subprograms_For_Type (S);
7246 end Invariant_Procedure;
7252 -- Global flag table allowing rapid computation of this function
7254 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7255 (E_Enumeration_Subtype |
7257 E_Signed_Integer_Subtype |
7258 E_Modular_Integer_Subtype |
7259 E_Floating_Point_Subtype |
7260 E_Ordinary_Fixed_Point_Subtype |
7261 E_Decimal_Fixed_Point_Subtype |
7266 E_Record_Subtype_With_Private |
7267 E_Limited_Private_Subtype |
7269 E_Protected_Subtype |
7271 E_String_Literal_Subtype |
7272 E_Class_Wide_Subtype => False,
7275 function Is_Base_Type (Id : E) return Boolean is
7277 return Entity_Is_Base_Type (Ekind (Id));
7280 ---------------------
7281 -- Is_Boolean_Type --
7282 ---------------------
7284 function Is_Boolean_Type (Id : E) return B is
7286 return Root_Type (Id) = Standard_Boolean;
7287 end Is_Boolean_Type;
7289 ------------------------
7290 -- Is_Constant_Object --
7291 ------------------------
7293 function Is_Constant_Object (Id : E) return B is
7294 K : constant Entity_Kind := Ekind (Id);
7297 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7298 end Is_Constant_Object;
7300 --------------------
7301 -- Is_Discriminal --
7302 --------------------
7304 function Is_Discriminal (Id : E) return B is
7306 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7307 and then Present (Discriminal_Link (Id)));
7310 ----------------------
7311 -- Is_Dynamic_Scope --
7312 ----------------------
7314 function Is_Dynamic_Scope (Id : E) return B is
7317 Ekind (Id) = E_Block
7319 Ekind (Id) = E_Function
7321 Ekind (Id) = E_Procedure
7323 Ekind (Id) = E_Subprogram_Body
7325 Ekind (Id) = E_Task_Type
7327 (Ekind (Id) = E_Limited_Private_Type
7328 and then Present (Full_View (Id))
7329 and then Ekind (Full_View (Id)) = E_Task_Type)
7331 Ekind (Id) = E_Entry
7333 Ekind (Id) = E_Entry_Family
7335 Ekind (Id) = E_Return_Statement;
7336 end Is_Dynamic_Scope;
7338 --------------------
7339 -- Is_Entity_Name --
7340 --------------------
7342 function Is_Entity_Name (N : Node_Id) return Boolean is
7343 Kind : constant Node_Kind := Nkind (N);
7346 -- Identifiers, operator symbols, expanded names are entity names
7348 return Kind = N_Identifier
7349 or else Kind = N_Operator_Symbol
7350 or else Kind = N_Expanded_Name
7352 -- Attribute references are entity names if they refer to an entity.
7353 -- Note that we don't do this by testing for the presence of the
7354 -- Entity field in the N_Attribute_Reference node, since it may not
7355 -- have been set yet.
7357 or else (Kind = N_Attribute_Reference
7358 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7361 -----------------------
7362 -- Is_External_State --
7363 -----------------------
7365 function Is_External_State (Id : E) return B is
7368 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7369 end Is_External_State;
7375 function Is_Finalizer (Id : E) return B is
7377 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7384 function Is_Null_State (Id : E) return B is
7387 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7390 ---------------------
7391 -- Is_Packed_Array --
7392 ---------------------
7394 function Is_Packed_Array (Id : E) return B is
7396 return Is_Array_Type (Id) and then Is_Packed (Id);
7397 end Is_Packed_Array;
7399 -----------------------------------
7400 -- Is_Package_Or_Generic_Package --
7401 -----------------------------------
7403 function Is_Package_Or_Generic_Package (Id : E) return B is
7405 return Ekind_In (Id, E_Generic_Package, E_Package);
7406 end Is_Package_Or_Generic_Package;
7412 function Is_Prival (Id : E) return B is
7414 return (Ekind_In (Id, E_Constant, E_Variable)
7415 and then Present (Prival_Link (Id)));
7418 ----------------------------
7419 -- Is_Protected_Component --
7420 ----------------------------
7422 function Is_Protected_Component (Id : E) return B is
7424 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7425 end Is_Protected_Component;
7427 ----------------------------
7428 -- Is_Protected_Interface --
7429 ----------------------------
7431 function Is_Protected_Interface (Id : E) return B is
7432 Typ : constant Entity_Id := Base_Type (Id);
7434 if not Is_Interface (Typ) then
7436 elsif Is_Class_Wide_Type (Typ) then
7437 return Is_Protected_Interface (Etype (Typ));
7439 return Protected_Present (Type_Definition (Parent (Typ)));
7441 end Is_Protected_Interface;
7443 ------------------------------
7444 -- Is_Protected_Record_Type --
7445 ------------------------------
7447 function Is_Protected_Record_Type (Id : E) return B is
7450 Is_Concurrent_Record_Type (Id)
7451 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7452 end Is_Protected_Record_Type;
7454 --------------------------------
7455 -- Is_Standard_Character_Type --
7456 --------------------------------
7458 function Is_Standard_Character_Type (Id : E) return B is
7460 if Is_Type (Id) then
7462 R : constant Entity_Id := Root_Type (Id);
7465 R = Standard_Character
7467 R = Standard_Wide_Character
7469 R = Standard_Wide_Wide_Character;
7475 end Is_Standard_Character_Type;
7477 -----------------------------
7478 -- Is_Standard_String_Type --
7479 -----------------------------
7481 function Is_Standard_String_Type (Id : E) return B is
7483 if Is_Type (Id) then
7485 R : constant Entity_Id := Root_Type (Id);
7490 R = Standard_Wide_String
7492 R = Standard_Wide_Wide_String;
7498 end Is_Standard_String_Type;
7500 --------------------
7501 -- Is_String_Type --
7502 --------------------
7504 function Is_String_Type (Id : E) return B is
7506 return Is_Array_Type (Id)
7507 and then Id /= Any_Composite
7508 and then Number_Dimensions (Id) = 1
7509 and then Is_Character_Type (Component_Type (Id));
7512 -------------------------------
7513 -- Is_Synchronized_Interface --
7514 -------------------------------
7516 function Is_Synchronized_Interface (Id : E) return B is
7517 Typ : constant Entity_Id := Base_Type (Id);
7520 if not Is_Interface (Typ) then
7523 elsif Is_Class_Wide_Type (Typ) then
7524 return Is_Synchronized_Interface (Etype (Typ));
7527 return Protected_Present (Type_Definition (Parent (Typ)))
7528 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7529 or else Task_Present (Type_Definition (Parent (Typ)));
7531 end Is_Synchronized_Interface;
7533 -----------------------
7534 -- Is_Task_Interface --
7535 -----------------------
7537 function Is_Task_Interface (Id : E) return B is
7538 Typ : constant Entity_Id := Base_Type (Id);
7540 if not Is_Interface (Typ) then
7542 elsif Is_Class_Wide_Type (Typ) then
7543 return Is_Task_Interface (Etype (Typ));
7545 return Task_Present (Type_Definition (Parent (Typ)));
7547 end Is_Task_Interface;
7549 -------------------------
7550 -- Is_Task_Record_Type --
7551 -------------------------
7553 function Is_Task_Record_Type (Id : E) return B is
7556 Is_Concurrent_Record_Type (Id)
7557 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7558 end Is_Task_Record_Type;
7560 ------------------------
7561 -- Is_Wrapper_Package --
7562 ------------------------
7564 function Is_Wrapper_Package (Id : E) return B is
7566 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7567 end Is_Wrapper_Package;
7573 function Last_Formal (Id : E) return E is
7578 (Is_Overloadable (Id)
7579 or else Ekind_In (Id, E_Entry_Family,
7581 E_Subprogram_Type));
7583 if Ekind (Id) = E_Enumeration_Literal then
7587 Formal := First_Formal (Id);
7589 if Present (Formal) then
7591 NForm := Next_Formal (Formal);
7592 exit when No (NForm) or else Is_ARECnF_Entity (NForm);
7601 function Model_Emin_Value (Id : E) return Uint is
7603 return Machine_Emin_Value (Id);
7604 end Model_Emin_Value;
7606 -------------------------
7607 -- Model_Epsilon_Value --
7608 -------------------------
7610 function Model_Epsilon_Value (Id : E) return Ureal is
7611 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7613 return Radix ** (1 - Model_Mantissa_Value (Id));
7614 end Model_Epsilon_Value;
7616 --------------------------
7617 -- Model_Mantissa_Value --
7618 --------------------------
7620 function Model_Mantissa_Value (Id : E) return Uint is
7622 return Machine_Mantissa_Value (Id);
7623 end Model_Mantissa_Value;
7625 -----------------------
7626 -- Model_Small_Value --
7627 -----------------------
7629 function Model_Small_Value (Id : E) return Ureal is
7630 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7632 return Radix ** (Model_Emin_Value (Id) - 1);
7633 end Model_Small_Value;
7635 ------------------------
7636 -- Machine_Emax_Value --
7637 ------------------------
7639 function Machine_Emax_Value (Id : E) return Uint is
7640 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7643 case Float_Rep (Id) is
7646 when 1 .. 6 => return Uint_128;
7647 when 7 .. 15 => return 2**10;
7648 when 16 .. 33 => return 2**14;
7649 when others => return No_Uint;
7653 return Uint_2 ** Uint_7 - Uint_1;
7655 end Machine_Emax_Value;
7657 ------------------------
7658 -- Machine_Emin_Value --
7659 ------------------------
7661 function Machine_Emin_Value (Id : E) return Uint is
7663 case Float_Rep (Id) is
7664 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7665 when AAMP => return -Machine_Emax_Value (Id);
7667 end Machine_Emin_Value;
7669 ----------------------------
7670 -- Machine_Mantissa_Value --
7671 ----------------------------
7673 function Machine_Mantissa_Value (Id : E) return Uint is
7674 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7677 case Float_Rep (Id) is
7680 when 1 .. 6 => return Uint_24;
7681 when 7 .. 15 => return UI_From_Int (53);
7682 when 16 .. 18 => return Uint_64;
7683 when 19 .. 33 => return UI_From_Int (113);
7684 when others => return No_Uint;
7689 when 1 .. 6 => return Uint_24;
7690 when 7 .. 9 => return UI_From_Int (40);
7691 when others => return No_Uint;
7694 end Machine_Mantissa_Value;
7696 -------------------------
7697 -- Machine_Radix_Value --
7698 -------------------------
7700 function Machine_Radix_Value (Id : E) return U is
7702 case Float_Rep (Id) is
7703 when IEEE_Binary | AAMP =>
7706 end Machine_Radix_Value;
7708 --------------------
7709 -- Next_Component --
7710 --------------------
7712 function Next_Component (Id : E) return E is
7716 Comp_Id := Next_Entity (Id);
7717 while Present (Comp_Id) loop
7718 exit when Ekind (Comp_Id) = E_Component;
7719 Comp_Id := Next_Entity (Comp_Id);
7725 ------------------------------------
7726 -- Next_Component_Or_Discriminant --
7727 ------------------------------------
7729 function Next_Component_Or_Discriminant (Id : E) return E is
7733 Comp_Id := Next_Entity (Id);
7734 while Present (Comp_Id) loop
7735 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7736 Comp_Id := Next_Entity (Comp_Id);
7740 end Next_Component_Or_Discriminant;
7742 -----------------------
7743 -- Next_Discriminant --
7744 -----------------------
7746 -- This function actually implements both Next_Discriminant and
7747 -- Next_Stored_Discriminant by making sure that the Discriminant
7748 -- returned is of the same variety as Id.
7750 function Next_Discriminant (Id : E) return E is
7752 -- Derived Tagged types with private extensions look like this...
7754 -- E_Discriminant d1
7755 -- E_Discriminant d2
7757 -- E_Discriminant d1
7758 -- E_Discriminant d2
7761 -- so it is critical not to go past the leading discriminants
7766 pragma Assert (Ekind (Id) = E_Discriminant);
7769 D := Next_Entity (D);
7771 or else (Ekind (D) /= E_Discriminant
7772 and then not Is_Itype (D))
7777 exit when Ekind (D) = E_Discriminant
7778 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7782 end Next_Discriminant;
7788 function Next_Formal (Id : E) return E is
7792 -- Follow the chain of declared entities as long as the kind of the
7793 -- entity corresponds to a formal parameter. Skip internal entities
7794 -- that may have been created for implicit subtypes, in the process
7795 -- of analyzing default expressions.
7801 -- Return Empty if no next entity, or its an ARECnF entity (since
7802 -- the latter is the last extra formal, not to be returned here).
7804 if No (P) or else Is_ARECnF_Entity (P) then
7807 -- If next entity is a formal, return it
7809 elsif Is_Formal (P) then
7812 -- Else one, unless we have an internal entity, which we skip
7814 elsif not Is_Internal (P) then
7820 -----------------------------
7821 -- Next_Formal_With_Extras --
7822 -----------------------------
7824 function Next_Formal_With_Extras (Id : E) return E is
7829 if Present (Extra_Formal (Id)) then
7830 return Extra_Formal (Id);
7833 NForm := Next_Formal (Id);
7835 if Present (NForm) then
7838 -- Deal with ARECnF entity as last extra formal
7841 Next := Next_Entity (Id);
7843 if Present (Next) and then Is_ARECnF_Entity (Next) then
7850 end Next_Formal_With_Extras;
7856 function Next_Index (Id : Node_Id) return Node_Id is
7865 function Next_Literal (Id : E) return E is
7867 pragma Assert (Nkind (Id) in N_Entity);
7871 ------------------------------
7872 -- Next_Stored_Discriminant --
7873 ------------------------------
7875 function Next_Stored_Discriminant (Id : E) return E is
7877 -- See comment in Next_Discriminant
7879 return Next_Discriminant (Id);
7880 end Next_Stored_Discriminant;
7882 -----------------------
7883 -- Number_Dimensions --
7884 -----------------------
7886 function Number_Dimensions (Id : E) return Pos is
7891 if Ekind (Id) = E_String_Literal_Subtype then
7896 T := First_Index (Id);
7897 while Present (T) loop
7904 end Number_Dimensions;
7906 --------------------
7907 -- Number_Entries --
7908 --------------------
7910 function Number_Entries (Id : E) return Nat is
7915 pragma Assert (Is_Concurrent_Type (Id));
7918 Ent := First_Entity (Id);
7919 while Present (Ent) loop
7920 if Is_Entry (Ent) then
7924 Ent := Next_Entity (Ent);
7930 --------------------
7931 -- Number_Formals --
7932 --------------------
7934 function Number_Formals (Id : E) return Pos is
7940 Formal := First_Formal (Id);
7941 while Present (Formal) loop
7943 Formal := Next_Formal (Formal);
7949 --------------------
7950 -- Parameter_Mode --
7951 --------------------
7953 function Parameter_Mode (Id : E) return Formal_Kind is
7958 ------------------------
7959 -- Predicate_Function --
7960 ------------------------
7962 function Predicate_Function (Id : E) return E is
7967 pragma Assert (Is_Type (Id));
7969 -- If type is private and has a completion, predicate may be defined
7970 -- on the full view.
7972 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7973 T := Full_View (Id);
7978 if No (Subprograms_For_Type (T)) then
7982 S := Subprograms_For_Type (T);
7983 while Present (S) loop
7984 if Is_Predicate_Function (S) then
7987 S := Subprograms_For_Type (S);
7993 end Predicate_Function;
7995 --------------------------
7996 -- Predicate_Function_M --
7997 --------------------------
7999 function Predicate_Function_M (Id : E) return E is
8004 pragma Assert (Is_Type (Id));
8006 -- If type is private and has a completion, predicate may be defined
8007 -- on the full view.
8009 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8010 T := Full_View (Id);
8015 if No (Subprograms_For_Type (T)) then
8019 S := Subprograms_For_Type (T);
8020 while Present (S) loop
8021 if Is_Predicate_Function_M (S) then
8024 S := Subprograms_For_Type (S);
8030 end Predicate_Function_M;
8032 -------------------------
8033 -- Present_In_Rep_Item --
8034 -------------------------
8036 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8040 Ritem := First_Rep_Item (E);
8042 while Present (Ritem) loop
8047 Next_Rep_Item (Ritem);
8051 end Present_In_Rep_Item;
8053 --------------------------
8054 -- Primitive_Operations --
8055 --------------------------
8057 function Primitive_Operations (Id : E) return L is
8059 if Is_Concurrent_Type (Id) then
8060 if Present (Corresponding_Record_Type (Id)) then
8061 return Direct_Primitive_Operations
8062 (Corresponding_Record_Type (Id));
8064 -- If expansion is disabled the corresponding record type is absent,
8065 -- but if the type has ancestors it may have primitive operations.
8067 elsif Is_Tagged_Type (Id) then
8068 return Direct_Primitive_Operations (Id);
8074 return Direct_Primitive_Operations (Id);
8076 end Primitive_Operations;
8078 ---------------------
8079 -- Record_Rep_Item --
8080 ---------------------
8082 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8084 Set_Next_Rep_Item (N, First_Rep_Item (E));
8085 Set_First_Rep_Item (E, N);
8086 end Record_Rep_Item;
8092 function Root_Type (Id : E) return E is
8096 pragma Assert (Nkind (Id) in N_Entity);
8098 T := Base_Type (Id);
8100 if Ekind (T) = E_Class_Wide_Type then
8112 -- Following test catches some error cases resulting from
8115 elsif No (Etyp) then
8116 Check_Error_Detected;
8119 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8122 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8128 -- Return if there is a circularity in the inheritance chain. This
8129 -- happens in some error situations and we do not want to get
8130 -- stuck in this loop.
8132 if T = Base_Type (Id) then
8139 ---------------------
8140 -- Safe_Emax_Value --
8141 ---------------------
8143 function Safe_Emax_Value (Id : E) return Uint is
8145 return Machine_Emax_Value (Id);
8146 end Safe_Emax_Value;
8148 ----------------------
8149 -- Safe_First_Value --
8150 ----------------------
8152 function Safe_First_Value (Id : E) return Ureal is
8154 return -Safe_Last_Value (Id);
8155 end Safe_First_Value;
8157 ---------------------
8158 -- Safe_Last_Value --
8159 ---------------------
8161 function Safe_Last_Value (Id : E) return Ureal is
8162 Radix : constant Uint := Machine_Radix_Value (Id);
8163 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8164 Emax : constant Uint := Safe_Emax_Value (Id);
8165 Significand : constant Uint := Radix ** Mantissa - 1;
8166 Exponent : constant Uint := Emax - Mantissa;
8172 (Num => Significand * 2 ** (Exponent mod 4),
8173 Den => -Exponent / 4,
8178 (Num => Significand,
8182 end Safe_Last_Value;
8188 function Scope_Depth (Id : E) return Uint is
8193 while Is_Record_Type (Scop) loop
8194 Scop := Scope (Scop);
8197 return Scope_Depth_Value (Scop);
8200 ---------------------
8201 -- Scope_Depth_Set --
8202 ---------------------
8204 function Scope_Depth_Set (Id : E) return B is
8206 return not Is_Record_Type (Id)
8207 and then Field22 (Id) /= Union_Id (Empty);
8208 end Scope_Depth_Set;
8210 -----------------------------
8211 -- Set_Component_Alignment --
8212 -----------------------------
8214 -- Component Alignment is encoded using two flags, Flag128/129 as
8215 -- follows. Note that both flags False = Align_Default, so that the
8216 -- default initialization of flags to False initializes component
8217 -- alignment to the default value as required.
8219 -- Flag128 Flag129 Value
8220 -- ------- ------- -----
8221 -- False False Calign_Default
8222 -- False True Calign_Component_Size
8223 -- True False Calign_Component_Size_4
8224 -- True True Calign_Storage_Unit
8226 procedure Set_Component_Alignment (Id : E; V : C) is
8228 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8229 and then Is_Base_Type (Id));
8232 when Calign_Default =>
8233 Set_Flag128 (Id, False);
8234 Set_Flag129 (Id, False);
8236 when Calign_Component_Size =>
8237 Set_Flag128 (Id, False);
8238 Set_Flag129 (Id, True);
8240 when Calign_Component_Size_4 =>
8241 Set_Flag128 (Id, True);
8242 Set_Flag129 (Id, False);
8244 when Calign_Storage_Unit =>
8245 Set_Flag128 (Id, True);
8246 Set_Flag129 (Id, True);
8248 end Set_Component_Alignment;
8250 -------------------------------------
8251 -- Set_Default_Init_Cond_Procedure --
8252 -------------------------------------
8254 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8259 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8261 Has_Inherited_Default_Init_Cond (Id)));
8263 S := Subprograms_For_Type (Id);
8264 Set_Subprograms_For_Type (Id, V);
8265 Set_Subprograms_For_Type (V, S);
8267 -- Check for a duplicate procedure
8269 while Present (S) loop
8270 if Is_Default_Init_Cond_Procedure (S) then
8271 raise Program_Error;
8274 S := Subprograms_For_Type (S);
8276 end Set_Default_Init_Cond_Procedure;
8278 -----------------------------
8279 -- Set_Invariant_Procedure --
8280 -----------------------------
8282 procedure Set_Invariant_Procedure (Id : E; V : E) is
8286 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8288 S := Subprograms_For_Type (Id);
8289 Set_Subprograms_For_Type (Id, V);
8290 Set_Subprograms_For_Type (V, S);
8292 -- Check for duplicate entry
8294 while Present (S) loop
8295 if Is_Invariant_Procedure (S) then
8296 raise Program_Error;
8298 S := Subprograms_For_Type (S);
8301 end Set_Invariant_Procedure;
8303 ----------------------------
8304 -- Set_Predicate_Function --
8305 ----------------------------
8307 procedure Set_Predicate_Function (Id : E; V : E) is
8311 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8313 S := Subprograms_For_Type (Id);
8314 Set_Subprograms_For_Type (Id, V);
8315 Set_Subprograms_For_Type (V, S);
8317 while Present (S) loop
8318 if Is_Predicate_Function (S) then
8319 raise Program_Error;
8321 S := Subprograms_For_Type (S);
8324 end Set_Predicate_Function;
8326 ------------------------------
8327 -- Set_Predicate_Function_M --
8328 ------------------------------
8330 procedure Set_Predicate_Function_M (Id : E; V : E) is
8334 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8336 S := Subprograms_For_Type (Id);
8337 Set_Subprograms_For_Type (Id, V);
8338 Set_Subprograms_For_Type (V, S);
8340 -- Check for duplicates
8342 while Present (S) loop
8343 if Is_Predicate_Function_M (S) then
8344 raise Program_Error;
8346 S := Subprograms_For_Type (S);
8349 end Set_Predicate_Function_M;
8355 function Size_Clause (Id : E) return N is
8357 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8360 ------------------------
8361 -- Stream_Size_Clause --
8362 ------------------------
8364 function Stream_Size_Clause (Id : E) return N is
8366 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8367 end Stream_Size_Clause;
8373 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8379 Kind := E_Access_Subtype;
8383 Kind := E_Array_Subtype;
8385 when E_Class_Wide_Type |
8386 E_Class_Wide_Subtype =>
8387 Kind := E_Class_Wide_Subtype;
8389 when E_Decimal_Fixed_Point_Type |
8390 E_Decimal_Fixed_Point_Subtype =>
8391 Kind := E_Decimal_Fixed_Point_Subtype;
8393 when E_Ordinary_Fixed_Point_Type |
8394 E_Ordinary_Fixed_Point_Subtype =>
8395 Kind := E_Ordinary_Fixed_Point_Subtype;
8397 when E_Private_Type |
8398 E_Private_Subtype =>
8399 Kind := E_Private_Subtype;
8401 when E_Limited_Private_Type |
8402 E_Limited_Private_Subtype =>
8403 Kind := E_Limited_Private_Subtype;
8405 when E_Record_Type_With_Private |
8406 E_Record_Subtype_With_Private =>
8407 Kind := E_Record_Subtype_With_Private;
8409 when E_Record_Type |
8411 Kind := E_Record_Subtype;
8413 when Enumeration_Kind =>
8414 Kind := E_Enumeration_Subtype;
8417 Kind := E_Floating_Point_Subtype;
8419 when Signed_Integer_Kind =>
8420 Kind := E_Signed_Integer_Subtype;
8422 when Modular_Integer_Kind =>
8423 Kind := E_Modular_Integer_Subtype;
8425 when Protected_Kind =>
8426 Kind := E_Protected_Subtype;
8429 Kind := E_Task_Subtype;
8433 raise Program_Error;
8439 ---------------------
8440 -- Type_High_Bound --
8441 ---------------------
8443 function Type_High_Bound (Id : E) return Node_Id is
8444 Rng : constant Node_Id := Scalar_Range (Id);
8446 if Nkind (Rng) = N_Subtype_Indication then
8447 return High_Bound (Range_Expression (Constraint (Rng)));
8449 return High_Bound (Rng);
8451 end Type_High_Bound;
8453 --------------------
8454 -- Type_Low_Bound --
8455 --------------------
8457 function Type_Low_Bound (Id : E) return Node_Id is
8458 Rng : constant Node_Id := Scalar_Range (Id);
8460 if Nkind (Rng) = N_Subtype_Indication then
8461 return Low_Bound (Range_Expression (Constraint (Rng)));
8463 return Low_Bound (Rng);
8467 ---------------------
8468 -- Underlying_Type --
8469 ---------------------
8471 function Underlying_Type (Id : E) return E is
8473 -- For record_with_private the underlying type is always the direct
8474 -- full view. Never try to take the full view of the parent it
8475 -- doesn't make sense.
8477 if Ekind (Id) = E_Record_Type_With_Private then
8478 return Full_View (Id);
8480 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8482 -- If we have an incomplete or private type with a full view,
8483 -- then we return the Underlying_Type of this full view.
8485 if Present (Full_View (Id)) then
8486 if Id = Full_View (Id) then
8488 -- Previous error in declaration
8493 return Underlying_Type (Full_View (Id));
8496 -- If we have a private type with an underlying full view, then we
8497 -- return the Underlying_Type of this underlying full view.
8499 elsif Ekind (Id) in Private_Kind
8500 and then Present (Underlying_Full_View (Id))
8502 return Underlying_Type (Underlying_Full_View (Id));
8504 -- If we have an incomplete entity that comes from the limited
8505 -- view then we return the Underlying_Type of its non-limited
8508 elsif From_Limited_With (Id)
8509 and then Present (Non_Limited_View (Id))
8511 return Underlying_Type (Non_Limited_View (Id));
8513 -- Otherwise check for the case where we have a derived type or
8514 -- subtype, and if so get the Underlying_Type of the parent type.
8516 elsif Etype (Id) /= Id then
8517 return Underlying_Type (Etype (Id));
8519 -- Otherwise we have an incomplete or private type that has
8520 -- no full view, which means that we have not encountered the
8521 -- completion, so return Empty to indicate the underlying type
8522 -- is not yet known.
8528 -- For non-incomplete, non-private types, return the type itself Also
8529 -- for entities that are not types at all return the entity itself.
8534 end Underlying_Type;
8536 ------------------------
8537 -- Write_Entity_Flags --
8538 ------------------------
8540 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8542 procedure W (Flag_Name : String; Flag : Boolean);
8543 -- Write out given flag if it is set
8549 procedure W (Flag_Name : String; Flag : Boolean) is
8553 Write_Str (Flag_Name);
8554 Write_Str (" = True");
8559 -- Start of processing for Write_Entity_Flags
8562 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8563 and then Is_Base_Type (Id)
8566 Write_Str ("Component_Alignment = ");
8568 case Component_Alignment (Id) is
8569 when Calign_Default =>
8570 Write_Str ("Calign_Default");
8572 when Calign_Component_Size =>
8573 Write_Str ("Calign_Component_Size");
8575 when Calign_Component_Size_4 =>
8576 Write_Str ("Calign_Component_Size_4");
8578 when Calign_Storage_Unit =>
8579 Write_Str ("Calign_Storage_Unit");
8585 W ("Address_Taken", Flag104 (Id));
8586 W ("Body_Needed_For_SAL", Flag40 (Id));
8587 W ("C_Pass_By_Copy", Flag125 (Id));
8588 W ("Can_Never_Be_Null", Flag38 (Id));
8589 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8590 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8591 W ("Debug_Info_Off", Flag166 (Id));
8592 W ("Default_Expressions_Processed", Flag108 (Id));
8593 W ("Delay_Cleanups", Flag114 (Id));
8594 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8595 W ("Depends_On_Private", Flag14 (Id));
8596 W ("Discard_Names", Flag88 (Id));
8597 W ("Elaboration_Entity_Required", Flag174 (Id));
8598 W ("Elaborate_Body_Desirable", Flag210 (Id));
8599 W ("Entry_Accepted", Flag152 (Id));
8600 W ("Can_Use_Internal_Rep", Flag229 (Id));
8601 W ("Finalize_Storage_Only", Flag158 (Id));
8602 W ("From_Limited_With", Flag159 (Id));
8603 W ("Has_Aliased_Components", Flag135 (Id));
8604 W ("Has_Alignment_Clause", Flag46 (Id));
8605 W ("Has_All_Calls_Remote", Flag79 (Id));
8606 W ("Has_Anonymous_Master", Flag253 (Id));
8607 W ("Has_Atomic_Components", Flag86 (Id));
8608 W ("Has_Biased_Representation", Flag139 (Id));
8609 W ("Has_Completion", Flag26 (Id));
8610 W ("Has_Completion_In_Body", Flag71 (Id));
8611 W ("Has_Complex_Representation", Flag140 (Id));
8612 W ("Has_Component_Size_Clause", Flag68 (Id));
8613 W ("Has_Contiguous_Rep", Flag181 (Id));
8614 W ("Has_Controlled_Component", Flag43 (Id));
8615 W ("Has_Controlling_Result", Flag98 (Id));
8616 W ("Has_Convention_Pragma", Flag119 (Id));
8617 W ("Has_Default_Aspect", Flag39 (Id));
8618 W ("Has_Default_Init_Cond", Flag3 (Id));
8619 W ("Has_Delayed_Aspects", Flag200 (Id));
8620 W ("Has_Delayed_Freeze", Flag18 (Id));
8621 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8622 W ("Has_Discriminants", Flag5 (Id));
8623 W ("Has_Dispatch_Table", Flag220 (Id));
8624 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8625 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8626 W ("Has_Exit", Flag47 (Id));
8627 W ("Has_Expanded_Contract", Flag240 (Id));
8628 W ("Has_Forward_Instantiation", Flag175 (Id));
8629 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8630 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8631 W ("Has_Homonym", Flag56 (Id));
8632 W ("Has_Implicit_Dereference", Flag251 (Id));
8633 W ("Has_Independent_Components", Flag34 (Id));
8634 W ("Has_Inheritable_Invariants", Flag248 (Id));
8635 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8636 W ("Has_Initial_Value", Flag219 (Id));
8637 W ("Has_Invariants", Flag232 (Id));
8638 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8639 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8640 W ("Has_Master_Entity", Flag21 (Id));
8641 W ("Has_Missing_Return", Flag142 (Id));
8642 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8643 W ("Has_Nested_Subprogram", Flag282 (Id));
8644 W ("Has_Non_Standard_Rep", Flag75 (Id));
8645 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8646 W ("Has_Object_Size_Clause", Flag172 (Id));
8647 W ("Has_Per_Object_Constraint", Flag154 (Id));
8648 W ("Has_Pragma_Controlled", Flag27 (Id));
8649 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8650 W ("Has_Pragma_Inline", Flag157 (Id));
8651 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8652 W ("Has_Pragma_No_Inline", Flag201 (Id));
8653 W ("Has_Pragma_Ordered", Flag198 (Id));
8654 W ("Has_Pragma_Pack", Flag121 (Id));
8655 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8656 W ("Has_Pragma_Pure", Flag203 (Id));
8657 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8658 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8659 W ("Has_Pragma_Unmodified", Flag233 (Id));
8660 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8661 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8662 W ("Has_Predicates", Flag250 (Id));
8663 W ("Has_Primitive_Operations", Flag120 (Id));
8664 W ("Has_Private_Ancestor", Flag151 (Id));
8665 W ("Has_Private_Declaration", Flag155 (Id));
8666 W ("Has_Protected", Flag271 (Id));
8667 W ("Has_Qualified_Name", Flag161 (Id));
8668 W ("Has_RACW", Flag214 (Id));
8669 W ("Has_Record_Rep_Clause", Flag65 (Id));
8670 W ("Has_Recursive_Call", Flag143 (Id));
8671 W ("Has_Shift_Operator", Flag267 (Id));
8672 W ("Has_Size_Clause", Flag29 (Id));
8673 W ("Has_Small_Clause", Flag67 (Id));
8674 W ("Has_Specified_Layout", Flag100 (Id));
8675 W ("Has_Specified_Stream_Input", Flag190 (Id));
8676 W ("Has_Specified_Stream_Output", Flag191 (Id));
8677 W ("Has_Specified_Stream_Read", Flag192 (Id));
8678 W ("Has_Specified_Stream_Write", Flag193 (Id));
8679 W ("Has_Static_Discriminants", Flag211 (Id));
8680 W ("Has_Static_Predicate", Flag269 (Id));
8681 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8682 W ("Has_Storage_Size_Clause", Flag23 (Id));
8683 W ("Has_Stream_Size_Clause", Flag184 (Id));
8684 W ("Has_Task", Flag30 (Id));
8685 W ("Has_Thunks", Flag228 (Id));
8686 W ("Has_Unchecked_Union", Flag123 (Id));
8687 W ("Has_Unknown_Discriminants", Flag72 (Id));
8688 W ("Has_Uplevel_Reference", Flag215 (Id));
8689 W ("Has_Visible_Refinement", Flag263 (Id));
8690 W ("Has_Volatile_Components", Flag87 (Id));
8691 W ("Has_Xref_Entry", Flag182 (Id));
8692 W ("In_Package_Body", Flag48 (Id));
8693 W ("In_Private_Part", Flag45 (Id));
8694 W ("In_Use", Flag8 (Id));
8695 W ("Is_Abstract_Subprogram", Flag19 (Id));
8696 W ("Is_Abstract_Type", Flag146 (Id));
8697 W ("Is_ARECnF_Entity", Flag284 (Id));
8698 W ("Is_Access_Constant", Flag69 (Id));
8699 W ("Is_Ada_2005_Only", Flag185 (Id));
8700 W ("Is_Ada_2012_Only", Flag199 (Id));
8701 W ("Is_Aliased", Flag15 (Id));
8702 W ("Is_Asynchronous", Flag81 (Id));
8703 W ("Is_Atomic", Flag85 (Id));
8704 W ("Is_Bit_Packed_Array", Flag122 (Id));
8705 W ("Is_CPP_Class", Flag74 (Id));
8706 W ("Is_Called", Flag102 (Id));
8707 W ("Is_Character_Type", Flag63 (Id));
8708 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8709 W ("Is_Child_Unit", Flag73 (Id));
8710 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8711 W ("Is_Compilation_Unit", Flag149 (Id));
8712 W ("Is_Completely_Hidden", Flag103 (Id));
8713 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8714 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8715 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8716 W ("Is_Constrained", Flag12 (Id));
8717 W ("Is_Constructor", Flag76 (Id));
8718 W ("Is_Controlled", Flag42 (Id));
8719 W ("Is_Controlling_Formal", Flag97 (Id));
8720 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8721 W ("Is_Descendent_Of_Address", Flag223 (Id));
8722 W ("Is_Discrim_SO_Function", Flag176 (Id));
8723 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8724 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8725 W ("Is_Dispatching_Operation", Flag6 (Id));
8726 W ("Is_Eliminated", Flag124 (Id));
8727 W ("Is_Entry_Formal", Flag52 (Id));
8728 W ("Is_Exported", Flag99 (Id));
8729 W ("Is_First_Subtype", Flag70 (Id));
8730 W ("Is_For_Access_Subtype", Flag118 (Id));
8731 W ("Is_Formal_Subprogram", Flag111 (Id));
8732 W ("Is_Frozen", Flag4 (Id));
8733 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8734 W ("Is_Generic_Actual_Type", Flag94 (Id));
8735 W ("Is_Generic_Instance", Flag130 (Id));
8736 W ("Is_Generic_Type", Flag13 (Id));
8737 W ("Is_Hidden", Flag57 (Id));
8738 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8739 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8740 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8741 W ("Is_Immediately_Visible", Flag7 (Id));
8742 W ("Is_Implementation_Defined", Flag254 (Id));
8743 W ("Is_Imported", Flag24 (Id));
8744 W ("Is_Independent", Flag268 (Id));
8745 W ("Is_Inlined", Flag11 (Id));
8746 W ("Is_Inlined_Always", Flag1 (Id));
8747 W ("Is_Instantiated", Flag126 (Id));
8748 W ("Is_Interface", Flag186 (Id));
8749 W ("Is_Internal", Flag17 (Id));
8750 W ("Is_Interrupt_Handler", Flag89 (Id));
8751 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8752 W ("Is_Invariant_Procedure", Flag257 (Id));
8753 W ("Is_Itype", Flag91 (Id));
8754 W ("Is_Known_Non_Null", Flag37 (Id));
8755 W ("Is_Known_Null", Flag204 (Id));
8756 W ("Is_Known_Valid", Flag170 (Id));
8757 W ("Is_Limited_Composite", Flag106 (Id));
8758 W ("Is_Limited_Interface", Flag197 (Id));
8759 W ("Is_Limited_Record", Flag25 (Id));
8760 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8761 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8762 W ("Is_Non_Static_Subtype", Flag109 (Id));
8763 W ("Is_Null_Init_Proc", Flag178 (Id));
8764 W ("Is_Obsolescent", Flag153 (Id));
8765 W ("Is_Only_Out_Parameter", Flag226 (Id));
8766 W ("Is_Package_Body_Entity", Flag160 (Id));
8767 W ("Is_Packed", Flag51 (Id));
8768 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8769 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8770 W ("Is_Predicate_Function", Flag255 (Id));
8771 W ("Is_Predicate_Function_M", Flag256 (Id));
8772 W ("Is_Preelaborated", Flag59 (Id));
8773 W ("Is_Primitive", Flag218 (Id));
8774 W ("Is_Primitive_Wrapper", Flag195 (Id));
8775 W ("Is_Private_Composite", Flag107 (Id));
8776 W ("Is_Private_Descendant", Flag53 (Id));
8777 W ("Is_Private_Primitive", Flag245 (Id));
8778 W ("Is_Processed_Transient", Flag252 (Id));
8779 W ("Is_Public", Flag10 (Id));
8780 W ("Is_Pure", Flag44 (Id));
8781 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8782 W ("Is_RACW_Stub_Type", Flag244 (Id));
8783 W ("Is_Raised", Flag224 (Id));
8784 W ("Is_Remote_Call_Interface", Flag62 (Id));
8785 W ("Is_Remote_Types", Flag61 (Id));
8786 W ("Is_Renaming_Of_Object", Flag112 (Id));
8787 W ("Is_Return_Object", Flag209 (Id));
8788 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8789 W ("Is_Shared_Passive", Flag60 (Id));
8790 W ("Is_Static_Type", Flag281 (Id));
8791 W ("Is_Statically_Allocated", Flag28 (Id));
8792 W ("Is_Tag", Flag78 (Id));
8793 W ("Is_Tagged_Type", Flag55 (Id));
8794 W ("Is_Thunk", Flag225 (Id));
8795 W ("Is_Trivial_Subprogram", Flag235 (Id));
8796 W ("Is_True_Constant", Flag163 (Id));
8797 W ("Is_Unchecked_Union", Flag117 (Id));
8798 W ("Is_Underlying_Record_View", Flag246 (Id));
8799 W ("Is_Unsigned_Type", Flag144 (Id));
8800 W ("Is_Valued_Procedure", Flag127 (Id));
8801 W ("Is_Visible_Formal", Flag206 (Id));
8802 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8803 W ("Is_Volatile", Flag16 (Id));
8804 W ("Itype_Printed", Flag202 (Id));
8805 W ("Kill_Elaboration_Checks", Flag32 (Id));
8806 W ("Kill_Range_Checks", Flag33 (Id));
8807 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8808 W ("Low_Bound_Tested", Flag205 (Id));
8809 W ("Machine_Radix_10", Flag84 (Id));
8810 W ("Materialize_Entity", Flag168 (Id));
8811 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8812 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8813 W ("Must_Have_Preelab_Init", Flag208 (Id));
8814 W ("Needs_Debug_Info", Flag147 (Id));
8815 W ("Needs_No_Actuals", Flag22 (Id));
8816 W ("Never_Set_In_Source", Flag115 (Id));
8817 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8818 W ("No_Pool_Assigned", Flag131 (Id));
8819 W ("No_Predicate_On_actual", Flag275 (Id));
8820 W ("No_Return", Flag113 (Id));
8821 W ("No_Strict_Aliasing", Flag136 (Id));
8822 W ("Non_Binary_Modulus", Flag58 (Id));
8823 W ("Nonzero_Is_True", Flag162 (Id));
8824 W ("OK_To_Rename", Flag247 (Id));
8825 W ("OK_To_Reorder_Components", Flag239 (Id));
8826 W ("Optimize_Alignment_Space", Flag241 (Id));
8827 W ("Optimize_Alignment_Time", Flag242 (Id));
8828 W ("Overlays_Constant", Flag243 (Id));
8829 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8830 W ("Reachable", Flag49 (Id));
8831 W ("Referenced", Flag156 (Id));
8832 W ("Referenced_As_LHS", Flag36 (Id));
8833 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8834 W ("Renamed_In_Spec", Flag231 (Id));
8835 W ("Requires_Overriding", Flag213 (Id));
8836 W ("Return_Present", Flag54 (Id));
8837 W ("Returns_By_Ref", Flag90 (Id));
8838 W ("Returns_Limited_View", Flag134 (Id));
8839 W ("Reverse_Bit_Order", Flag164 (Id));
8840 W ("Reverse_Storage_Order", Flag93 (Id));
8841 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8842 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8843 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8844 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8845 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8846 W ("SSO_Set_High_By_Default", Flag273 (Id));
8847 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8848 W ("Static_Elaboration_Desired", Flag77 (Id));
8849 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8850 W ("Strict_Alignment", Flag145 (Id));
8851 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8852 W ("Suppress_Initialization", Flag105 (Id));
8853 W ("Suppress_Style_Checks", Flag165 (Id));
8854 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8855 W ("Treat_As_Volatile", Flag41 (Id));
8856 W ("Universal_Aliasing", Flag216 (Id));
8857 W ("Uplevel_Reference_Noted", Flag283 (Id));
8858 W ("Used_As_Generic_Actual", Flag222 (Id));
8859 W ("Uses_Sec_Stack", Flag95 (Id));
8860 W ("Warnings_Off", Flag96 (Id));
8861 W ("Warnings_Off_Used", Flag236 (Id));
8862 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8863 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8864 W ("Was_Hidden", Flag196 (Id));
8865 end Write_Entity_Flags;
8867 -----------------------
8868 -- Write_Entity_Info --
8869 -----------------------
8871 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8873 procedure Write_Attribute (Which : String; Nam : E);
8874 -- Write attribute value with given string name
8876 procedure Write_Kind (Id : Entity_Id);
8877 -- Write Ekind field of entity
8879 ---------------------
8880 -- Write_Attribute --
8881 ---------------------
8883 procedure Write_Attribute (Which : String; Nam : E) is
8887 Write_Int (Int (Nam));
8889 Write_Name (Chars (Nam));
8891 end Write_Attribute;
8897 procedure Write_Kind (Id : Entity_Id) is
8898 K : constant String := Entity_Kind'Image (Ekind (Id));
8902 Write_Str (" Kind ");
8904 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8905 Write_Str ("TAGGED ");
8908 Write_Str (K (3 .. K'Length));
8911 if Is_Type (Id) and then Depends_On_Private (Id) then
8912 Write_Str ("Depends_On_Private ");
8916 -- Start of processing for Write_Entity_Info
8920 Write_Attribute ("Name ", Id);
8921 Write_Int (Int (Id));
8925 Write_Attribute (" Type ", Etype (Id));
8927 Write_Attribute (" Scope ", Scope (Id));
8932 when Discrete_Kind =>
8933 Write_Str ("Bounds: Id = ");
8935 if Present (Scalar_Range (Id)) then
8936 Write_Int (Int (Type_Low_Bound (Id)));
8937 Write_Str (" .. Id = ");
8938 Write_Int (Int (Type_High_Bound (Id)));
8940 Write_Str ("Empty");
8951 (" Component Type ", Component_Type (Id));
8954 Write_Str (" Indexes ");
8956 Index := First_Index (Id);
8957 while Present (Index) loop
8958 Write_Attribute (" ", Etype (Index));
8959 Index := Next_Index (Index);
8967 (" Directly Designated Type ",
8968 Directly_Designated_Type (Id));
8971 when Overloadable_Kind =>
8972 if Present (Homonym (Id)) then
8973 Write_Str (" Homonym ");
8974 Write_Name (Chars (Homonym (Id)));
8976 Write_Int (Int (Homonym (Id)));
8983 if Ekind (Scope (Id)) in Record_Kind then
8985 " Original_Record_Component ",
8986 Original_Record_Component (Id));
8987 Write_Int (Int (Original_Record_Component (Id)));
8991 when others => null;
8993 end Write_Entity_Info;
8995 -----------------------
8996 -- Write_Field6_Name --
8997 -----------------------
8999 procedure Write_Field6_Name (Id : Entity_Id) is
9000 pragma Warnings (Off, Id);
9002 Write_Str ("First_Rep_Item");
9003 end Write_Field6_Name;
9005 -----------------------
9006 -- Write_Field7_Name --
9007 -----------------------
9009 procedure Write_Field7_Name (Id : Entity_Id) is
9010 pragma Warnings (Off, Id);
9012 Write_Str ("Freeze_Node");
9013 end Write_Field7_Name;
9015 -----------------------
9016 -- Write_Field8_Name --
9017 -----------------------
9019 procedure Write_Field8_Name (Id : Entity_Id) is
9023 Write_Str ("Associated_Node_For_Itype");
9026 Write_Str ("Dependent_Instances");
9029 Write_Str ("First_Exit_Statement");
9032 Write_Str ("Hiding_Loop_Variable");
9036 E_Subprogram_Body =>
9037 Write_Str ("Mechanism");
9041 Write_Str ("Normalized_First_Bit");
9043 when E_Abstract_State =>
9044 Write_Str ("Refinement_Constituents");
9046 when E_Return_Statement =>
9047 Write_Str ("Return_Applies_To");
9050 Write_Str ("Field8??");
9052 end Write_Field8_Name;
9054 -----------------------
9055 -- Write_Field9_Name --
9056 -----------------------
9058 procedure Write_Field9_Name (Id : Entity_Id) is
9062 Write_Str ("Class_Wide_Type");
9065 Write_Str ("Current_Value");
9067 when E_Abstract_State =>
9068 Write_Str ("Part_Of_Constituents");
9071 E_Generic_Function |
9073 E_Generic_Procedure |
9076 Write_Str ("Renaming_Map");
9079 Write_Str ("Field9??");
9081 end Write_Field9_Name;
9083 ------------------------
9084 -- Write_Field10_Name --
9085 ------------------------
9087 procedure Write_Field10_Name (Id : Entity_Id) is
9090 when E_Abstract_State |
9092 Write_Str ("Encapsulating_State");
9094 when Class_Wide_Kind |
9100 Write_Str ("Direct_Primitive_Operations");
9103 Write_Str ("Float_Rep");
9105 when E_In_Parameter |
9107 Write_Str ("Discriminal_Link");
9113 Write_Str ("Handler_Records");
9117 Write_Str ("Normalized_Position_Max");
9120 Write_Str ("Field10??");
9122 end Write_Field10_Name;
9124 ------------------------
9125 -- Write_Field11_Name --
9126 ------------------------
9128 procedure Write_Field11_Name (Id : Entity_Id) is
9132 Write_Str ("Block_Node");
9136 Write_Str ("Component_Bit_Offset");
9139 Write_Str ("Entry_Component");
9141 when E_Enumeration_Literal =>
9142 Write_Str ("Enumeration_Pos");
9146 Write_Str ("Full_View");
9148 when E_Generic_Package =>
9149 Write_Str ("Generic_Homonym");
9155 Write_Str ("Protected_Body_Subprogram");
9158 Write_Str ("Field11??");
9160 end Write_Field11_Name;
9162 ------------------------
9163 -- Write_Field12_Name --
9164 ------------------------
9166 procedure Write_Field12_Name (Id : Entity_Id) is
9170 Write_Str ("Associated_Formal_Package");
9173 Write_Str ("Barrier_Function");
9175 when E_Enumeration_Literal =>
9176 Write_Str ("Enumeration_Rep");
9184 E_In_Out_Parameter |
9188 Write_Str ("Esize");
9192 Write_Str ("Next_Inlined_Subprogram");
9195 Write_Str ("Field12??");
9197 end Write_Field12_Name;
9199 ------------------------
9200 -- Write_Field13_Name --
9201 ------------------------
9203 procedure Write_Field13_Name (Id : Entity_Id) is
9208 Write_Str ("Component_Clause");
9211 Write_Str ("Elaboration_Entity");
9215 Generic_Unit_Kind =>
9216 Write_Str ("Elaboration_Entity");
9220 Write_Str ("Extra_Accessibility");
9223 Write_Str ("RM_Size");
9226 Write_Str ("Field13??");
9228 end Write_Field13_Name;
9230 -----------------------
9231 -- Write_Field14_Name --
9232 -----------------------
9234 procedure Write_Field14_Name (Id : Entity_Id) is
9243 Write_Str ("Alignment");
9247 Write_Str ("Normalized_Position");
9253 Write_Str ("Postconditions_Proc");
9255 when E_Generic_Package |
9257 Write_Str ("Shadow_Entities");
9260 Write_Str ("Field14??");
9262 end Write_Field14_Name;
9264 ------------------------
9265 -- Write_Field15_Name --
9266 ------------------------
9268 procedure Write_Field15_Name (Id : Entity_Id) is
9271 when E_Discriminant =>
9272 Write_Str ("Discriminant_Number");
9275 Write_Str ("DT_Entry_Count");
9279 Write_Str ("DT_Position");
9282 Write_Str ("Entry_Parameters_Type");
9285 Write_Str ("Extra_Formal");
9288 Write_Str ("Pending_Access_Types");
9292 Write_Str ("Related_Instance");
9296 Write_Str ("Status_Flag_Or_Transient_Decl");
9299 Write_Str ("Field15??");
9301 end Write_Field15_Name;
9303 ------------------------
9304 -- Write_Field16_Name --
9305 ------------------------
9307 procedure Write_Field16_Name (Id : Entity_Id) is
9310 when E_Record_Type |
9311 E_Record_Type_With_Private =>
9312 Write_Str ("Access_Disp_Table");
9314 when E_Abstract_State =>
9315 Write_Str ("Body_References");
9317 when E_Record_Subtype |
9318 E_Class_Wide_Subtype =>
9319 Write_Str ("Cloned_Subtype");
9323 Write_Str ("DTC_Entity");
9326 Write_Str ("Entry_Formal");
9331 Write_Str ("First_Private_Entity");
9333 when Enumeration_Kind =>
9334 Write_Str ("Lit_Strings");
9336 when Decimal_Fixed_Point_Kind =>
9337 Write_Str ("Scale_Value");
9339 when E_String_Literal_Subtype =>
9340 Write_Str ("String_Literal_Length");
9344 Write_Str ("Unset_Reference");
9347 Write_Str ("Field16??");
9349 end Write_Field16_Name;
9351 ------------------------
9352 -- Write_Field17_Name --
9353 ------------------------
9355 procedure Write_Field17_Name (Id : Entity_Id) is
9360 E_Generic_In_Out_Parameter |
9362 Write_Str ("Actual_Subtype");
9365 Write_Str ("Digits_Value");
9367 when E_Discriminant =>
9368 Write_Str ("Discriminal");
9377 E_Generic_Function |
9379 E_Generic_Procedure |
9387 E_Return_Statement |
9389 E_Subprogram_Type =>
9390 Write_Str ("First_Entity");
9393 Write_Str ("First_Index");
9395 when Enumeration_Kind =>
9396 Write_Str ("First_Literal");
9399 Write_Str ("Master_Id");
9401 when Modular_Integer_Kind =>
9402 Write_Str ("Modulus");
9404 when E_Abstract_State |
9405 E_Incomplete_Type =>
9406 Write_Str ("Non_Limited_View");
9408 when E_Incomplete_Subtype =>
9409 if From_Limited_With (Id) then
9410 Write_Str ("Non_Limited_View");
9414 Write_Str ("Prival");
9417 Write_Str ("Field17??");
9419 end Write_Field17_Name;
9421 ------------------------
9422 -- Write_Field18_Name --
9423 ------------------------
9425 procedure Write_Field18_Name (Id : Entity_Id) is
9428 when E_Enumeration_Literal |
9432 Write_Str ("Alias");
9434 when E_Record_Type =>
9435 Write_Str ("Corresponding_Concurrent_Type");
9437 when E_Subprogram_Body =>
9438 Write_Str ("Corresponding_Protected_Entry");
9440 when Concurrent_Kind =>
9441 Write_Str ("Corresponding_Record_Type");
9446 Write_Str ("Enclosing_Scope");
9448 when E_Entry_Index_Parameter =>
9449 Write_Str ("Entry_Index_Constant");
9451 when E_Class_Wide_Subtype |
9452 E_Access_Protected_Subprogram_Type |
9453 E_Anonymous_Access_Protected_Subprogram_Type |
9454 E_Access_Subprogram_Type |
9456 Write_Str ("Equivalent_Type");
9458 when Fixed_Point_Kind =>
9459 Write_Str ("Delta_Value");
9461 when Enumeration_Kind =>
9462 Write_Str ("Lit_Indexes");
9464 when Incomplete_Or_Private_Kind |
9466 Write_Str ("Private_Dependents");
9469 Write_Str ("Renamed_Object");
9473 E_Generic_Function |
9474 E_Generic_Procedure |
9475 E_Generic_Package =>
9476 Write_Str ("Renamed_Entity");
9478 when E_String_Literal_Subtype =>
9479 Write_Str ("String_Literal_Low_Bound");
9482 Write_Str ("Field18??");
9484 end Write_Field18_Name;
9486 -----------------------
9487 -- Write_Field19_Name --
9488 -----------------------
9490 procedure Write_Field19_Name (Id : Entity_Id) is
9494 E_Generic_Package =>
9495 Write_Str ("Body_Entity");
9497 when E_Discriminant =>
9498 Write_Str ("Corresponding_Discriminant");
9501 Write_Str ("Default_Aspect_Value");
9503 when E_Array_Type =>
9504 Write_Str ("Default_Component_Value");
9506 when E_Protected_Type =>
9507 Write_Str ("Entry_Bodies_Array");
9511 E_Subprogram_Type =>
9512 Write_Str ("Extra_Accessibility_Of_Result");
9514 when E_Record_Type =>
9515 Write_Str ("Parent_Subtype");
9519 Write_Str ("Size_Check_Code");
9521 when E_Package_Body |
9523 Write_Str ("Spec_Entity");
9525 when Private_Kind =>
9526 Write_Str ("Underlying_Full_View");
9529 Write_Str ("Field19??");
9531 end Write_Field19_Name;
9533 -----------------------
9534 -- Write_Field20_Name --
9535 -----------------------
9537 procedure Write_Field20_Name (Id : Entity_Id) is
9541 Write_Str ("Component_Type");
9543 when E_In_Parameter |
9544 E_Generic_In_Parameter =>
9545 Write_Str ("Default_Value");
9548 Write_Str ("Directly_Designated_Type");
9551 Write_Str ("Discriminant_Checking_Func");
9553 when E_Discriminant =>
9554 Write_Str ("Discriminant_Default_Value");
9563 E_Generic_Function |
9565 E_Generic_Procedure |
9573 E_Return_Statement |
9575 E_Subprogram_Type =>
9576 Write_Str ("Last_Entity");
9580 Write_Str ("Prival_Link");
9583 Write_Str ("Scalar_Range");
9586 Write_Str ("Register_Exception_Call");
9589 Write_Str ("Field20??");
9591 end Write_Field20_Name;
9593 -----------------------
9594 -- Write_Field21_Name --
9595 -----------------------
9597 procedure Write_Field21_Name (Id : Entity_Id) is
9601 Write_Str ("Accept_Address");
9603 when E_In_Parameter =>
9604 Write_Str ("Default_Expr_Function");
9606 when Concurrent_Kind |
9607 Incomplete_Or_Private_Kind |
9611 Write_Str ("Discriminant_Constraint");
9616 E_Generic_Function |
9618 E_Generic_Procedure |
9620 Write_Str ("Interface_Name");
9623 Modular_Integer_Kind =>
9624 Write_Str ("Original_Array_Type");
9626 when Fixed_Point_Kind =>
9627 Write_Str ("Small_Value");
9630 Write_Str ("Field21??");
9632 end Write_Field21_Name;
9634 -----------------------
9635 -- Write_Field22_Name --
9636 -----------------------
9638 procedure Write_Field22_Name (Id : Entity_Id) is
9642 Write_Str ("Associated_Storage_Pool");
9645 Write_Str ("Component_Size");
9647 when E_Record_Type =>
9648 Write_Str ("Corresponding_Remote_Type");
9652 Write_Str ("Original_Record_Component");
9654 when E_Enumeration_Literal =>
9655 Write_Str ("Enumeration_Rep_Expr");
9657 when E_Record_Type_With_Private |
9658 E_Record_Subtype_With_Private |
9661 E_Limited_Private_Type |
9662 E_Limited_Private_Subtype =>
9663 Write_Str ("Private_View");
9666 Write_Str ("Protected_Formal");
9676 E_Generic_Function |
9677 E_Generic_Procedure |
9680 E_Return_Statement |
9683 Write_Str ("Scope_Depth_Value");
9686 Write_Str ("Shared_Var_Procs_Instance");
9689 Write_Str ("Field22??");
9691 end Write_Field22_Name;
9693 ------------------------
9694 -- Write_Field23_Name --
9695 ------------------------
9697 procedure Write_Field23_Name (Id : Entity_Id) is
9700 when E_Discriminant =>
9701 Write_Str ("CR_Discriminant");
9704 Write_Str ("Entry_Cancel_Parameter");
9706 when E_Enumeration_Type =>
9707 Write_Str ("Enum_Pos_To_Rep");
9711 Write_Str ("Extra_Constrained");
9714 Write_Str ("Finalization_Master");
9716 when E_Generic_Function |
9718 E_Generic_Procedure =>
9719 Write_Str ("Inner_Instances");
9722 Write_Str ("Packed_Array_Impl_Type");
9725 Write_Str ("Protection_Object");
9727 when Concurrent_Kind |
9728 Incomplete_Or_Private_Kind |
9732 Write_Str ("Stored_Constraint");
9736 if Present (Scope (Id))
9737 and then Is_Protected_Type (Scope (Id))
9739 Write_Str ("Protection_Object");
9741 Write_Str ("Generic_Renamings");
9745 if Is_Generic_Instance (Id) then
9746 Write_Str ("Generic_Renamings");
9748 Write_Str ("Limited_View");
9752 Write_Str ("Field23??");
9754 end Write_Field23_Name;
9756 ------------------------
9757 -- Write_Field24_Name --
9758 ------------------------
9760 procedure Write_Field24_Name (Id : Entity_Id) is
9766 Write_Str ("Related_Expression");
9771 if Field24 (Id) in Uint_Range then
9772 Write_Str ("Subps_Index");
9774 Write_Str ("Uplevel_References");
9778 Write_Str ("Field24???");
9780 end Write_Field24_Name;
9782 ------------------------
9783 -- Write_Field25_Name --
9784 ------------------------
9786 procedure Write_Field25_Name (Id : Entity_Id) is
9789 when E_Generic_Package |
9791 Write_Str ("Abstract_States");
9794 Write_Str ("Debug_Renaming_Link");
9797 Write_Str ("DT_Offset_To_Top_Func");
9801 Write_Str ("Interface_Alias");
9803 when E_Record_Type |
9805 E_Record_Type_With_Private |
9806 E_Record_Subtype_With_Private =>
9807 Write_Str ("Interfaces");
9811 Write_Str ("Related_Array_Object");
9814 Write_Str ("Task_Body_Procedure");
9818 Write_Str ("PPC_Wrapper");
9820 when Discrete_Kind =>
9821 Write_Str ("Static_Discrete_Predicate");
9824 Write_Str ("Static_Real_Or_String_Predicate");
9827 Write_Str ("Field25??");
9829 end Write_Field25_Name;
9831 ------------------------
9832 -- Write_Field26_Name --
9833 ------------------------
9835 procedure Write_Field26_Name (Id : Entity_Id) is
9838 when E_Record_Type |
9839 E_Record_Type_With_Private =>
9840 Write_Str ("Dispatch_Table_Wrappers");
9842 when E_In_Out_Parameter |
9845 Write_Str ("Last_Assignment");
9849 Write_Str ("Overridden_Operation");
9851 when E_Generic_Package |
9853 Write_Str ("Package_Instantiation");
9857 Write_Str ("Related_Type");
9861 Write_Str ("Storage_Size_Variable");
9864 Write_Str ("Field26??");
9866 end Write_Field26_Name;
9868 ------------------------
9869 -- Write_Field27_Name --
9870 ------------------------
9872 procedure Write_Field27_Name (Id : Entity_Id) is
9877 Write_Str ("Current_Use_Clause");
9882 Write_Str ("Related_Type");
9886 Write_Str ("Wrapped_Entity");
9889 Write_Str ("Field27??");
9891 end Write_Field27_Name;
9893 ------------------------
9894 -- Write_Field28_Name --
9895 ------------------------
9897 procedure Write_Field28_Name (Id : Entity_Id) is
9905 E_Subprogram_Type =>
9906 Write_Str ("Extra_Formals");
9910 Write_Str ("Finalizer");
9914 Write_Str ("Initialization_Statements");
9916 when E_Access_Subprogram_Type =>
9917 Write_Str ("Original_Access_Type");
9920 Write_Str ("Relative_Deadline_Variable");
9922 when E_Record_Type =>
9923 Write_Str ("Underlying_Record_View");
9926 Write_Str ("Field28??");
9928 end Write_Field28_Name;
9930 ------------------------
9931 -- Write_Field29_Name --
9932 ------------------------
9934 procedure Write_Field29_Name (Id : Entity_Id) is
9939 Write_Str ("BIP_Initialization_Call");
9942 Write_Str ("Subprograms_For_Type");
9945 Write_Str ("Field29??");
9947 end Write_Field29_Name;
9949 ------------------------
9950 -- Write_Field30_Name --
9951 ------------------------
9953 procedure Write_Field30_Name (Id : Entity_Id) is
9957 Write_Str ("Corresponding_Equality");
9961 Write_Str ("Last_Aggregate_Assignment");
9964 Write_Str ("Static_Initialization");
9967 Write_Str ("Field30??");
9969 end Write_Field30_Name;
9971 ------------------------
9972 -- Write_Field31_Name --
9973 ------------------------
9975 procedure Write_Field31_Name (Id : Entity_Id) is
9980 Write_Str ("Thunk_Entity");
9983 Write_Str ("Derived_Type_Link");
9987 E_In_Out_Parameter |
9991 Write_Str ("Activation_Record_Component");
9994 Write_Str ("Field31??");
9996 end Write_Field31_Name;
9998 ------------------------
9999 -- Write_Field32_Name --
10000 ------------------------
10002 procedure Write_Field32_Name (Id : Entity_Id) is
10006 E_Generic_Function |
10007 E_Generic_Package |
10008 E_Generic_Procedure |
10012 E_Subprogram_Body =>
10013 Write_Str ("SPARK_Pragma");
10016 Write_Str ("No_Tagged_Streams_Pragma");
10019 Write_Str ("Field32??");
10021 end Write_Field32_Name;
10023 ------------------------
10024 -- Write_Field33_Name --
10025 ------------------------
10027 procedure Write_Field33_Name (Id : Entity_Id) is
10030 when E_Generic_Package |
10033 Write_Str ("SPARK_Aux_Pragma");
10039 Write_Str ("Linker_Section_Pragma");
10042 Write_Str ("Field33??");
10044 end Write_Field33_Name;
10046 ------------------------
10047 -- Write_Field34_Name --
10048 ------------------------
10050 procedure Write_Field34_Name (Id : Entity_Id) is
10055 E_Generic_Package |
10058 E_Subprogram_Body |
10060 Generic_Subprogram_Kind |
10062 Write_Str ("Contract");
10065 Write_Str ("Field34??");
10067 end Write_Field34_Name;
10069 ------------------------
10070 -- Write_Field35_Name --
10071 ------------------------
10073 procedure Write_Field35_Name (Id : Entity_Id) is
10076 when Subprogram_Kind =>
10077 Write_Str ("Import_Pragma");
10080 Write_Str ("Field35??");
10082 end Write_Field35_Name;
10084 -------------------------
10085 -- Iterator Procedures --
10086 -------------------------
10088 procedure Proc_Next_Component (N : in out Node_Id) is
10090 N := Next_Component (N);
10091 end Proc_Next_Component;
10093 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10095 N := Next_Entity (N);
10096 while Present (N) loop
10097 exit when Ekind_In (N, E_Component, E_Discriminant);
10098 N := Next_Entity (N);
10100 end Proc_Next_Component_Or_Discriminant;
10102 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10104 N := Next_Discriminant (N);
10105 end Proc_Next_Discriminant;
10107 procedure Proc_Next_Formal (N : in out Node_Id) is
10109 N := Next_Formal (N);
10110 end Proc_Next_Formal;
10112 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10114 N := Next_Formal_With_Extras (N);
10115 end Proc_Next_Formal_With_Extras;
10117 procedure Proc_Next_Index (N : in out Node_Id) is
10119 N := Next_Index (N);
10120 end Proc_Next_Index;
10122 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10124 N := Next_Inlined_Subprogram (N);
10125 end Proc_Next_Inlined_Subprogram;
10127 procedure Proc_Next_Literal (N : in out Node_Id) is
10129 N := Next_Literal (N);
10130 end Proc_Next_Literal;
10132 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10134 N := Next_Stored_Discriminant (N);
10135 end Proc_Next_Stored_Discriminant;