1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2011, 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 Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- Return_Flag_Or_Transient_Decl Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
131 -- Access_Disp_Table Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- String_Literal_Length Uint16
138 -- Unset_Reference Node16
140 -- Actual_Subtype Node17
141 -- Digits_Value Uint17
142 -- Discriminal Node17
143 -- First_Entity Node17
144 -- First_Index Node17
145 -- First_Literal Node17
148 -- Non_Limited_View Node17
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Private_Dependents Elist18
159 -- Renamed_Entity Node18
160 -- Renamed_Object Node18
162 -- Body_Entity Node19
163 -- Corresponding_Discriminant Node19
164 -- Parent_Subtype Node19
165 -- Related_Array_Object Node19
166 -- Size_Check_Code Node19
167 -- Spec_Entity Node19
168 -- Underlying_Full_View Node19
170 -- Component_Type Node20
171 -- Default_Value Node20
172 -- Directly_Designated_Type Node20
173 -- Discriminant_Checking_Func Node20
174 -- Discriminant_Default_Value Node20
175 -- Last_Entity Node20
176 -- Prival_Link Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Array_Type Node21
185 -- Small_Value Ureal21
187 -- Associated_Storage_Pool Node22
188 -- Component_Size Uint22
189 -- Corresponding_Remote_Type Node22
190 -- Enumeration_Rep_Expr Node22
191 -- Exception_Code Uint22
192 -- Original_Record_Component Node22
193 -- Private_View Node22
194 -- Protected_Formal Node22
195 -- Scope_Depth_Value Uint22
196 -- Shared_Var_Procs_Instance Node22
198 -- CR_Discriminant Node23
199 -- Entry_Cancel_Parameter Node23
200 -- Enum_Pos_To_Rep Node23
201 -- Extra_Constrained Node23
202 -- Finalization_Master Node23
203 -- Generic_Renamings Elist23
204 -- Inner_Instances Elist23
205 -- Limited_View Node23
206 -- Packed_Array_Type Node23
207 -- Protection_Object Node23
208 -- Stored_Constraint Elist23
211 -- Related_Expression Node24
214 -- Interface_Alias Node25
215 -- Interfaces Elist25
216 -- Debug_Renaming_Link Node25
217 -- DT_Offset_To_Top_Func Node25
218 -- PPC_Wrapper Node25
219 -- Static_Predicate List25
220 -- Task_Body_Procedure Node25
222 -- Dispatch_Table_Wrappers Elist26
223 -- Last_Assignment Node26
224 -- Original_Access_Type Node26
225 -- Overridden_Operation Node26
226 -- Package_Instantiation Node26
227 -- Relative_Deadline_Variable Node26
228 -- Static_Initialization Node26
230 -- Current_Use_Clause Node27
231 -- Related_Type Node27
232 -- Wrapped_Entity Node27
234 -- Extra_Formals Node28
235 -- Underlying_Record_View Node28
237 -- Subprograms_For_Type Node29
239 ---------------------------------------------
240 -- Usage of Flags in Defining Entity Nodes --
241 ---------------------------------------------
243 -- All flags are unique, there is no overlaying, so each flag is physically
244 -- present in every entity. However, for many of the flags, it only makes
245 -- sense for them to be set true for certain subsets of entity kinds. See
246 -- the spec of Einfo for further details.
248 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
251 -- Has_Discriminants Flag5
252 -- Is_Dispatching_Operation Flag6
253 -- Is_Immediately_Visible Flag7
255 -- Is_Potentially_Use_Visible Flag9
259 -- Is_Constrained Flag12
260 -- Is_Generic_Type Flag13
261 -- Depends_On_Private Flag14
263 -- Is_Volatile Flag16
264 -- Is_Internal Flag17
265 -- Has_Delayed_Freeze Flag18
266 -- Is_Abstract_Subprogram Flag19
267 -- Is_Concurrent_Record_Type Flag20
269 -- Has_Master_Entity Flag21
270 -- Needs_No_Actuals Flag22
271 -- Has_Storage_Size_Clause Flag23
272 -- Is_Imported Flag24
273 -- Is_Limited_Record Flag25
274 -- Has_Completion Flag26
275 -- Has_Pragma_Controlled Flag27
276 -- Is_Statically_Allocated Flag28
277 -- Has_Size_Clause Flag29
280 -- Checks_May_Be_Suppressed Flag31
281 -- Kill_Elaboration_Checks Flag32
282 -- Kill_Range_Checks Flag33
283 -- Kill_Tag_Checks Flag34
284 -- Is_Class_Wide_Equivalent_Type Flag35
285 -- Referenced_As_LHS Flag36
286 -- Is_Known_Non_Null Flag37
287 -- Can_Never_Be_Null Flag38
288 -- Has_Default_Aspect Flag39
289 -- Body_Needed_For_SAL Flag40
291 -- Treat_As_Volatile Flag41
292 -- Is_Controlled Flag42
293 -- Has_Controlled_Component Flag43
295 -- In_Private_Part Flag45
296 -- Has_Alignment_Clause Flag46
298 -- In_Package_Body Flag48
300 -- Delay_Subprogram_Descriptors Flag50
303 -- Is_Entry_Formal Flag52
304 -- Is_Private_Descendant Flag53
305 -- Return_Present Flag54
306 -- Is_Tagged_Type Flag55
307 -- Has_Homonym Flag56
309 -- Non_Binary_Modulus Flag58
310 -- Is_Preelaborated Flag59
311 -- Is_Shared_Passive Flag60
313 -- Is_Remote_Types Flag61
314 -- Is_Remote_Call_Interface Flag62
315 -- Is_Character_Type Flag63
316 -- Is_Intrinsic_Subprogram Flag64
317 -- Has_Record_Rep_Clause Flag65
318 -- Has_Enumeration_Rep_Clause Flag66
319 -- Has_Small_Clause Flag67
320 -- Has_Component_Size_Clause Flag68
321 -- Is_Access_Constant Flag69
322 -- Is_First_Subtype Flag70
324 -- Has_Completion_In_Body Flag71
325 -- Has_Unknown_Discriminants Flag72
326 -- Is_Child_Unit Flag73
327 -- Is_CPP_Class Flag74
328 -- Has_Non_Standard_Rep Flag75
329 -- Is_Constructor Flag76
330 -- Static_Elaboration_Desired Flag77
332 -- Has_All_Calls_Remote Flag79
333 -- Is_Constr_Subt_For_U_Nominal Flag80
335 -- Is_Asynchronous Flag81
336 -- Has_Gigi_Rep_Item Flag82
337 -- Has_Machine_Radix_Clause Flag83
338 -- Machine_Radix_10 Flag84
340 -- Has_Atomic_Components Flag86
341 -- Has_Volatile_Components Flag87
342 -- Discard_Names Flag88
343 -- Is_Interrupt_Handler Flag89
344 -- Returns_By_Ref Flag90
347 -- Size_Known_At_Compile_Time Flag92
348 -- Has_Subprogram_Descriptor Flag93
349 -- Is_Generic_Actual_Type Flag94
350 -- Uses_Sec_Stack Flag95
351 -- Warnings_Off Flag96
352 -- Is_Controlling_Formal Flag97
353 -- Has_Controlling_Result Flag98
354 -- Is_Exported Flag99
355 -- Has_Specified_Layout Flag100
357 -- Has_Nested_Block_With_Handler Flag101
359 -- Is_Completely_Hidden Flag103
360 -- Address_Taken Flag104
361 -- Suppress_Initialization Flag105
362 -- Is_Limited_Composite Flag106
363 -- Is_Private_Composite Flag107
364 -- Default_Expressions_Processed Flag108
365 -- Is_Non_Static_Subtype Flag109
366 -- Has_External_Tag_Rep_Clause Flag110
368 -- Is_Formal_Subprogram Flag111
369 -- Is_Renaming_Of_Object Flag112
371 -- Delay_Cleanups Flag114
372 -- Never_Set_In_Source Flag115
373 -- Is_Visible_Child_Unit Flag116
374 -- Is_Unchecked_Union Flag117
375 -- Is_For_Access_Subtype Flag118
376 -- Has_Convention_Pragma Flag119
377 -- Has_Primitive_Operations Flag120
379 -- Has_Pragma_Pack Flag121
380 -- Is_Bit_Packed_Array Flag122
381 -- Has_Unchecked_Union Flag123
382 -- Is_Eliminated Flag124
383 -- C_Pass_By_Copy Flag125
384 -- Is_Instantiated Flag126
385 -- Is_Valued_Procedure Flag127
386 -- (used for Component_Alignment) Flag128
387 -- (used for Component_Alignment) Flag129
388 -- Is_Generic_Instance Flag130
390 -- No_Pool_Assigned Flag131
391 -- Is_AST_Entry Flag132
392 -- Is_VMS_Exception Flag133
393 -- Is_Optional_Parameter Flag134
394 -- Has_Aliased_Components Flag135
395 -- No_Strict_Aliasing Flag136
396 -- Is_Machine_Code_Subprogram Flag137
397 -- Is_Packed_Array_Type Flag138
398 -- Has_Biased_Representation Flag139
399 -- Has_Complex_Representation Flag140
401 -- Is_Constr_Subt_For_UN_Aliased Flag141
402 -- Has_Missing_Return Flag142
403 -- Has_Recursive_Call Flag143
404 -- Is_Unsigned_Type Flag144
405 -- Strict_Alignment Flag145
406 -- Is_Abstract_Type Flag146
407 -- Needs_Debug_Info Flag147
408 -- Suppress_Elaboration_Warnings Flag148
409 -- Is_Compilation_Unit Flag149
410 -- Has_Pragma_Elaborate_Body Flag150
412 -- Has_Private_Ancestor Flag151
413 -- Entry_Accepted Flag152
414 -- Is_Obsolescent Flag153
415 -- Has_Per_Object_Constraint Flag154
416 -- Has_Private_Declaration Flag155
417 -- Referenced Flag156
418 -- Has_Pragma_Inline Flag157
419 -- Finalize_Storage_Only Flag158
420 -- From_With_Type Flag159
421 -- Is_Package_Body_Entity Flag160
423 -- Has_Qualified_Name Flag161
424 -- Nonzero_Is_True Flag162
425 -- Is_True_Constant Flag163
426 -- Reverse_Bit_Order Flag164
427 -- Suppress_Style_Checks Flag165
428 -- Debug_Info_Off Flag166
429 -- Sec_Stack_Needed_For_Return Flag167
430 -- Materialize_Entity Flag168
431 -- Has_Pragma_Thread_Local_Storage Flag169
432 -- Is_Known_Valid Flag170
434 -- Is_Hidden_Open_Scope Flag171
435 -- Has_Object_Size_Clause Flag172
436 -- Has_Fully_Qualified_Name Flag173
437 -- Elaboration_Entity_Required Flag174
438 -- Has_Forward_Instantiation Flag175
439 -- Is_Discrim_SO_Function Flag176
440 -- Size_Depends_On_Discriminant Flag177
441 -- Is_Null_Init_Proc Flag178
442 -- Has_Pragma_Pure_Function Flag179
443 -- Has_Pragma_Unreferenced Flag180
445 -- Has_Contiguous_Rep Flag181
446 -- Has_Xref_Entry Flag182
447 -- Must_Be_On_Byte_Boundary Flag183
448 -- Has_Stream_Size_Clause Flag184
449 -- Is_Ada_2005_Only Flag185
450 -- Is_Interface Flag186
451 -- Has_Constrained_Partial_View Flag187
452 -- Has_Persistent_BSS Flag188
453 -- Is_Pure_Unit_Access_Type Flag189
454 -- Has_Specified_Stream_Input Flag190
456 -- Has_Specified_Stream_Output Flag191
457 -- Has_Specified_Stream_Read Flag192
458 -- Has_Specified_Stream_Write Flag193
459 -- Is_Local_Anonymous_Access Flag194
460 -- Is_Primitive_Wrapper Flag195
461 -- Was_Hidden Flag196
462 -- Is_Limited_Interface Flag197
463 -- Has_Pragma_Ordered Flag198
464 -- Is_Ada_2012_Only Flag199
466 -- Has_Delayed_Aspects Flag200
467 -- Has_Anon_Block_Suffix Flag201
468 -- Itype_Printed Flag202
469 -- Has_Pragma_Pure Flag203
470 -- Is_Known_Null Flag204
471 -- Low_Bound_Tested Flag205
472 -- Is_Visible_Formal Flag206
473 -- Known_To_Have_Preelab_Init Flag207
474 -- Must_Have_Preelab_Init Flag208
475 -- Is_Return_Object Flag209
476 -- Elaborate_Body_Desirable Flag210
478 -- Has_Static_Discriminants Flag211
479 -- Has_Pragma_Unreferenced_Objects Flag212
480 -- Requires_Overriding Flag213
482 -- Has_Up_Level_Access Flag215
483 -- Universal_Aliasing Flag216
484 -- Suppress_Value_Tracking_On_Call Flag217
485 -- Is_Primitive Flag218
486 -- Has_Initial_Value Flag219
487 -- Has_Dispatch_Table Flag220
489 -- Has_Pragma_Preelab_Init Flag221
490 -- Used_As_Generic_Actual Flag222
491 -- Is_Descendent_Of_Address Flag223
494 -- Is_Only_Out_Parameter Flag226
495 -- Referenced_As_Out_Parameter Flag227
496 -- Has_Thunks Flag228
497 -- Can_Use_Internal_Rep Flag229
498 -- Has_Pragma_Inline_Always Flag230
500 -- Renamed_In_Spec Flag231
501 -- Has_Invariants Flag232
502 -- Has_Pragma_Unmodified Flag233
503 -- Is_Dispatch_Table_Entity Flag234
504 -- Is_Trivial_Subprogram Flag235
505 -- Warnings_Off_Used Flag236
506 -- Warnings_Off_Used_Unmodified Flag237
507 -- Warnings_Off_Used_Unreferenced Flag238
508 -- OK_To_Reorder_Components Flag239
509 -- Has_Postconditions Flag240
511 -- Optimize_Alignment_Space Flag241
512 -- Optimize_Alignment_Time Flag242
513 -- Overlays_Constant Flag243
514 -- Is_RACW_Stub_Type Flag244
515 -- Is_Private_Primitive Flag245
516 -- Is_Underlying_Record_View Flag246
517 -- OK_To_Rename Flag247
518 -- Has_Inheritable_Invariants Flag248
519 -- Is_Safe_To_Reevaluate Flag249
520 -- Has_Predicates Flag250
522 -- Has_Implicit_Dereference Flag251
523 -- Is_Processed_Transient Flag252
524 -- Has_Anonymous_Master Flag253
528 -----------------------
529 -- Local subprograms --
530 -----------------------
532 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
533 -- Returns the attribute definition clause for Id whose name is Rep_Name.
534 -- Returns Empty if no matching attribute definition clause found for Id.
540 function Float_Rep (Id : E) return F is
541 pragma Assert (Is_Floating_Point_Type (Id));
543 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
550 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
554 Ritem := First_Rep_Item (Id);
555 while Present (Ritem) loop
556 if Nkind (Ritem) = N_Attribute_Definition_Clause
557 and then Chars (Ritem) = Rep_Name
561 Next_Rep_Item (Ritem);
568 --------------------------------
569 -- Attribute Access Functions --
570 --------------------------------
572 function Accept_Address (Id : E) return L is
577 function Access_Disp_Table (Id : E) return L is
579 pragma Assert (Ekind_In (Id, E_Record_Type,
581 return Elist16 (Implementation_Base_Type (Id));
582 end Access_Disp_Table;
584 function Actual_Subtype (Id : E) return E is
587 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
588 or else Is_Formal (Id));
592 function Address_Taken (Id : E) return B is
597 function Alias (Id : E) return E is
600 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
604 function Alignment (Id : E) return U is
606 pragma Assert (Is_Type (Id)
607 or else Is_Formal (Id)
608 or else Ekind_In (Id, E_Loop_Parameter,
615 function Associated_Formal_Package (Id : E) return E is
617 pragma Assert (Ekind (Id) = E_Package);
619 end Associated_Formal_Package;
621 function Associated_Node_For_Itype (Id : E) return N is
624 end Associated_Node_For_Itype;
626 function Associated_Storage_Pool (Id : E) return E is
628 pragma Assert (Is_Access_Type (Id));
629 return Node22 (Root_Type (Id));
630 end Associated_Storage_Pool;
632 function Barrier_Function (Id : E) return N is
634 pragma Assert (Is_Entry (Id));
636 end Barrier_Function;
638 function Block_Node (Id : E) return N is
640 pragma Assert (Ekind (Id) = E_Block);
644 function Body_Entity (Id : E) return E is
646 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
650 function Body_Needed_For_SAL (Id : E) return B is
653 (Ekind (Id) = E_Package
654 or else Is_Subprogram (Id)
655 or else Is_Generic_Unit (Id));
657 end Body_Needed_For_SAL;
659 function C_Pass_By_Copy (Id : E) return B is
661 pragma Assert (Is_Record_Type (Id));
662 return Flag125 (Implementation_Base_Type (Id));
665 function Can_Never_Be_Null (Id : E) return B is
668 end Can_Never_Be_Null;
670 function Checks_May_Be_Suppressed (Id : E) return B is
673 end Checks_May_Be_Suppressed;
675 function Class_Wide_Type (Id : E) return E is
677 pragma Assert (Is_Type (Id));
681 function Cloned_Subtype (Id : E) return E is
683 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
687 function Component_Bit_Offset (Id : E) return U is
689 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
691 end Component_Bit_Offset;
693 function Component_Clause (Id : E) return N is
695 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
697 end Component_Clause;
699 function Component_Size (Id : E) return U is
701 pragma Assert (Is_Array_Type (Id));
702 return Uint22 (Implementation_Base_Type (Id));
705 function Component_Type (Id : E) return E is
707 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
708 return Node20 (Implementation_Base_Type (Id));
711 function Corresponding_Concurrent_Type (Id : E) return E is
713 pragma Assert (Ekind (Id) = E_Record_Type);
715 end Corresponding_Concurrent_Type;
717 function Corresponding_Discriminant (Id : E) return E is
719 pragma Assert (Ekind (Id) = E_Discriminant);
721 end Corresponding_Discriminant;
723 function Corresponding_Equality (Id : E) return E is
726 (Ekind (Id) = E_Function
727 and then not Comes_From_Source (Id)
728 and then Chars (Id) = Name_Op_Ne);
730 end Corresponding_Equality;
732 function Corresponding_Protected_Entry (Id : E) return E is
734 pragma Assert (Ekind (Id) = E_Subprogram_Body);
736 end Corresponding_Protected_Entry;
738 function Corresponding_Record_Type (Id : E) return E is
740 pragma Assert (Is_Concurrent_Type (Id));
742 end Corresponding_Record_Type;
744 function Corresponding_Remote_Type (Id : E) return E is
747 end Corresponding_Remote_Type;
749 function Current_Use_Clause (Id : E) return E is
751 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
753 end Current_Use_Clause;
755 function Current_Value (Id : E) return N is
757 pragma Assert (Ekind (Id) in Object_Kind);
761 function CR_Discriminant (Id : E) return E is
766 function Debug_Info_Off (Id : E) return B is
771 function Debug_Renaming_Link (Id : E) return E is
774 end Debug_Renaming_Link;
776 function Default_Expr_Function (Id : E) return E is
778 pragma Assert (Is_Formal (Id));
780 end Default_Expr_Function;
782 function Default_Expressions_Processed (Id : E) return B is
785 end Default_Expressions_Processed;
787 function Default_Value (Id : E) return N is
789 pragma Assert (Is_Formal (Id));
793 function Delay_Cleanups (Id : E) return B is
798 function Delay_Subprogram_Descriptors (Id : E) return B is
801 end Delay_Subprogram_Descriptors;
803 function Delta_Value (Id : E) return R is
805 pragma Assert (Is_Fixed_Point_Type (Id));
809 function Dependent_Instances (Id : E) return L is
811 pragma Assert (Is_Generic_Instance (Id));
813 end Dependent_Instances;
815 function Depends_On_Private (Id : E) return B is
817 pragma Assert (Nkind (Id) in N_Entity);
819 end Depends_On_Private;
821 function Digits_Value (Id : E) return U is
824 (Is_Floating_Point_Type (Id)
825 or else Is_Decimal_Fixed_Point_Type (Id));
829 function Direct_Primitive_Operations (Id : E) return L is
831 pragma Assert (Is_Tagged_Type (Id));
833 end Direct_Primitive_Operations;
835 function Directly_Designated_Type (Id : E) return E is
837 pragma Assert (Is_Access_Type (Id));
839 end Directly_Designated_Type;
841 function Discard_Names (Id : E) return B is
846 function Discriminal (Id : E) return E is
848 pragma Assert (Ekind (Id) = E_Discriminant);
852 function Discriminal_Link (Id : E) return N is
855 end Discriminal_Link;
857 function Discriminant_Checking_Func (Id : E) return E is
859 pragma Assert (Ekind (Id) = E_Component);
861 end Discriminant_Checking_Func;
863 function Discriminant_Constraint (Id : E) return L is
865 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
867 end Discriminant_Constraint;
869 function Discriminant_Default_Value (Id : E) return N is
871 pragma Assert (Ekind (Id) = E_Discriminant);
873 end Discriminant_Default_Value;
875 function Discriminant_Number (Id : E) return U is
877 pragma Assert (Ekind (Id) = E_Discriminant);
879 end Discriminant_Number;
881 function Dispatch_Table_Wrappers (Id : E) return L is
883 pragma Assert (Ekind_In (Id, E_Record_Type,
885 return Elist26 (Implementation_Base_Type (Id));
886 end Dispatch_Table_Wrappers;
888 function DT_Entry_Count (Id : E) return U is
890 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
894 function DT_Offset_To_Top_Func (Id : E) return E is
896 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
898 end DT_Offset_To_Top_Func;
900 function DT_Position (Id : E) return U is
902 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
903 and then Present (DTC_Entity (Id)));
907 function DTC_Entity (Id : E) return E is
909 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
913 function Elaborate_Body_Desirable (Id : E) return B is
915 pragma Assert (Ekind (Id) = E_Package);
917 end Elaborate_Body_Desirable;
919 function Elaboration_Entity (Id : E) return E is
924 Ekind (Id) = E_Package
926 Is_Generic_Unit (Id));
928 end Elaboration_Entity;
930 function Elaboration_Entity_Required (Id : E) return B is
935 Ekind (Id) = E_Package
937 Is_Generic_Unit (Id));
939 end Elaboration_Entity_Required;
941 function Enclosing_Scope (Id : E) return E is
946 function Entry_Accepted (Id : E) return B is
948 pragma Assert (Is_Entry (Id));
952 function Entry_Bodies_Array (Id : E) return E is
955 end Entry_Bodies_Array;
957 function Entry_Cancel_Parameter (Id : E) return E is
960 end Entry_Cancel_Parameter;
962 function Entry_Component (Id : E) return E is
967 function Entry_Formal (Id : E) return E is
972 function Entry_Index_Constant (Id : E) return N is
974 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
976 end Entry_Index_Constant;
978 function Contract (Id : E) return N is
981 (Ekind_In (Id, E_Entry, E_Entry_Family)
982 or else Is_Subprogram (Id)
983 or else Is_Generic_Subprogram (Id));
987 function Entry_Parameters_Type (Id : E) return E is
990 end Entry_Parameters_Type;
992 function Enum_Pos_To_Rep (Id : E) return E is
994 pragma Assert (Ekind (Id) = E_Enumeration_Type);
998 function Enumeration_Pos (Id : E) return Uint is
1000 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1002 end Enumeration_Pos;
1004 function Enumeration_Rep (Id : E) return U is
1006 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1008 end Enumeration_Rep;
1010 function Enumeration_Rep_Expr (Id : E) return N is
1012 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1014 end Enumeration_Rep_Expr;
1016 function Equivalent_Type (Id : E) return E is
1019 (Ekind_In (Id, E_Class_Wide_Type,
1020 E_Class_Wide_Subtype,
1021 E_Access_Protected_Subprogram_Type,
1022 E_Anonymous_Access_Protected_Subprogram_Type,
1023 E_Access_Subprogram_Type,
1026 end Equivalent_Type;
1028 function Esize (Id : E) return Uint is
1033 function Exception_Code (Id : E) return Uint is
1035 pragma Assert (Ekind (Id) = E_Exception);
1039 function Extra_Accessibility (Id : E) return E is
1042 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1044 end Extra_Accessibility;
1046 function Extra_Constrained (Id : E) return E is
1048 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1050 end Extra_Constrained;
1052 function Extra_Formal (Id : E) return E is
1057 function Extra_Formals (Id : E) return E is
1060 (Is_Overloadable (Id)
1061 or else Ekind_In (Id, E_Entry_Family,
1063 E_Subprogram_Type));
1067 function Can_Use_Internal_Rep (Id : E) return B is
1069 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1070 return Flag229 (Base_Type (Id));
1071 end Can_Use_Internal_Rep;
1073 function Finalization_Master (Id : E) return E is
1075 pragma Assert (Is_Access_Type (Id));
1076 return Node23 (Root_Type (Id));
1077 end Finalization_Master;
1079 function Finalize_Storage_Only (Id : E) return B is
1081 pragma Assert (Is_Type (Id));
1082 return Flag158 (Base_Type (Id));
1083 end Finalize_Storage_Only;
1085 function Finalizer (Id : E) return E is
1088 (Ekind (Id) = E_Package
1089 or else Ekind (Id) = E_Package_Body);
1093 function First_Entity (Id : E) return E is
1098 function First_Exit_Statement (Id : E) return N is
1100 pragma Assert (Ekind (Id) = E_Loop);
1102 end First_Exit_Statement;
1104 function First_Index (Id : E) return N is
1106 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1110 function First_Literal (Id : E) return E is
1112 pragma Assert (Is_Enumeration_Type (Id));
1116 function First_Optional_Parameter (Id : E) return E is
1118 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1120 end First_Optional_Parameter;
1122 function First_Private_Entity (Id : E) return E is
1124 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1125 or else Ekind (Id) in Concurrent_Kind);
1127 end First_Private_Entity;
1129 function First_Rep_Item (Id : E) return E is
1134 function Freeze_Node (Id : E) return N is
1139 function From_With_Type (Id : E) return B is
1141 return Flag159 (Id);
1144 function Full_View (Id : E) return E is
1146 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1150 function Generic_Homonym (Id : E) return E is
1152 pragma Assert (Ekind (Id) = E_Generic_Package);
1154 end Generic_Homonym;
1156 function Generic_Renamings (Id : E) return L is
1158 return Elist23 (Id);
1159 end Generic_Renamings;
1161 function Handler_Records (Id : E) return S is
1164 end Handler_Records;
1166 function Has_Aliased_Components (Id : E) return B is
1168 return Flag135 (Implementation_Base_Type (Id));
1169 end Has_Aliased_Components;
1171 function Has_Alignment_Clause (Id : E) return B is
1174 end Has_Alignment_Clause;
1176 function Has_All_Calls_Remote (Id : E) return B is
1179 end Has_All_Calls_Remote;
1181 function Has_Anon_Block_Suffix (Id : E) return B is
1183 return Flag201 (Id);
1184 end Has_Anon_Block_Suffix;
1186 function Has_Anonymous_Master (Id : E) return B is
1189 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1190 return Flag253 (Id);
1191 end Has_Anonymous_Master;
1193 function Has_Atomic_Components (Id : E) return B is
1195 return Flag86 (Implementation_Base_Type (Id));
1196 end Has_Atomic_Components;
1198 function Has_Biased_Representation (Id : E) return B is
1200 return Flag139 (Id);
1201 end Has_Biased_Representation;
1203 function Has_Completion (Id : E) return B is
1208 function Has_Completion_In_Body (Id : E) return B is
1210 pragma Assert (Is_Type (Id));
1212 end Has_Completion_In_Body;
1214 function Has_Complex_Representation (Id : E) return B is
1216 pragma Assert (Is_Type (Id));
1217 return Flag140 (Implementation_Base_Type (Id));
1218 end Has_Complex_Representation;
1220 function Has_Component_Size_Clause (Id : E) return B is
1222 pragma Assert (Is_Array_Type (Id));
1223 return Flag68 (Implementation_Base_Type (Id));
1224 end Has_Component_Size_Clause;
1226 function Has_Constrained_Partial_View (Id : E) return B is
1228 pragma Assert (Is_Type (Id));
1229 return Flag187 (Id);
1230 end Has_Constrained_Partial_View;
1232 function Has_Controlled_Component (Id : E) return B is
1234 return Flag43 (Base_Type (Id));
1235 end Has_Controlled_Component;
1237 function Has_Contiguous_Rep (Id : E) return B is
1239 return Flag181 (Id);
1240 end Has_Contiguous_Rep;
1242 function Has_Controlling_Result (Id : E) return B is
1245 end Has_Controlling_Result;
1247 function Has_Convention_Pragma (Id : E) return B is
1249 return Flag119 (Id);
1250 end Has_Convention_Pragma;
1252 function Has_Default_Aspect (Id : E) return B is
1254 return Flag39 (Base_Type (Id));
1255 end Has_Default_Aspect;
1257 function Has_Delayed_Aspects (Id : E) return B is
1259 pragma Assert (Nkind (Id) in N_Entity);
1260 return Flag200 (Id);
1261 end Has_Delayed_Aspects;
1263 function Has_Delayed_Freeze (Id : E) return B is
1265 pragma Assert (Nkind (Id) in N_Entity);
1267 end Has_Delayed_Freeze;
1269 function Has_Discriminants (Id : E) return B is
1271 pragma Assert (Nkind (Id) in N_Entity);
1273 end Has_Discriminants;
1275 function Has_Dispatch_Table (Id : E) return B is
1277 pragma Assert (Is_Tagged_Type (Id));
1278 return Flag220 (Id);
1279 end Has_Dispatch_Table;
1281 function Has_Enumeration_Rep_Clause (Id : E) return B is
1283 pragma Assert (Is_Enumeration_Type (Id));
1285 end Has_Enumeration_Rep_Clause;
1287 function Has_Exit (Id : E) return B is
1292 function Has_External_Tag_Rep_Clause (Id : E) return B is
1294 pragma Assert (Is_Tagged_Type (Id));
1295 return Flag110 (Id);
1296 end Has_External_Tag_Rep_Clause;
1298 function Has_Forward_Instantiation (Id : E) return B is
1300 return Flag175 (Id);
1301 end Has_Forward_Instantiation;
1303 function Has_Fully_Qualified_Name (Id : E) return B is
1305 return Flag173 (Id);
1306 end Has_Fully_Qualified_Name;
1308 function Has_Gigi_Rep_Item (Id : E) return B is
1311 end Has_Gigi_Rep_Item;
1313 function Has_Homonym (Id : E) return B is
1318 function Has_Implicit_Dereference (Id : E) return B is
1320 return Flag251 (Id);
1321 end Has_Implicit_Dereference;
1323 function Has_Inheritable_Invariants (Id : E) return B is
1325 pragma Assert (Is_Type (Id));
1326 return Flag248 (Id);
1327 end Has_Inheritable_Invariants;
1329 function Has_Initial_Value (Id : E) return B is
1331 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1332 return Flag219 (Id);
1333 end Has_Initial_Value;
1335 function Has_Invariants (Id : E) return B is
1337 pragma Assert (Is_Type (Id)
1338 or else Ekind (Id) = E_Procedure
1339 or else Ekind (Id) = E_Generic_Procedure);
1340 return Flag232 (Id);
1343 function Has_Machine_Radix_Clause (Id : E) return B is
1345 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1347 end Has_Machine_Radix_Clause;
1349 function Has_Master_Entity (Id : E) return B is
1352 end Has_Master_Entity;
1354 function Has_Missing_Return (Id : E) return B is
1356 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1357 return Flag142 (Id);
1358 end Has_Missing_Return;
1360 function Has_Nested_Block_With_Handler (Id : E) return B is
1362 return Flag101 (Id);
1363 end Has_Nested_Block_With_Handler;
1365 function Has_Non_Standard_Rep (Id : E) return B is
1367 return Flag75 (Implementation_Base_Type (Id));
1368 end Has_Non_Standard_Rep;
1370 function Has_Object_Size_Clause (Id : E) return B is
1372 pragma Assert (Is_Type (Id));
1373 return Flag172 (Id);
1374 end Has_Object_Size_Clause;
1376 function Has_Per_Object_Constraint (Id : E) return B is
1378 return Flag154 (Id);
1379 end Has_Per_Object_Constraint;
1381 function Has_Persistent_BSS (Id : E) return B is
1383 return Flag188 (Id);
1384 end Has_Persistent_BSS;
1386 function Has_Postconditions (Id : E) return B is
1388 pragma Assert (Is_Subprogram (Id));
1389 return Flag240 (Id);
1390 end Has_Postconditions;
1392 function Has_Pragma_Controlled (Id : E) return B is
1394 pragma Assert (Is_Access_Type (Id));
1395 return Flag27 (Implementation_Base_Type (Id));
1396 end Has_Pragma_Controlled;
1398 function Has_Pragma_Elaborate_Body (Id : E) return B is
1400 return Flag150 (Id);
1401 end Has_Pragma_Elaborate_Body;
1403 function Has_Pragma_Inline (Id : E) return B is
1405 return Flag157 (Id);
1406 end Has_Pragma_Inline;
1408 function Has_Pragma_Inline_Always (Id : E) return B is
1410 return Flag230 (Id);
1411 end Has_Pragma_Inline_Always;
1413 function Has_Pragma_Ordered (Id : E) return B is
1415 pragma Assert (Is_Enumeration_Type (Id));
1416 return Flag198 (Implementation_Base_Type (Id));
1417 end Has_Pragma_Ordered;
1419 function Has_Pragma_Pack (Id : E) return B is
1421 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1422 return Flag121 (Implementation_Base_Type (Id));
1423 end Has_Pragma_Pack;
1425 function Has_Pragma_Preelab_Init (Id : E) return B is
1427 return Flag221 (Id);
1428 end Has_Pragma_Preelab_Init;
1430 function Has_Pragma_Pure (Id : E) return B is
1432 return Flag203 (Id);
1433 end Has_Pragma_Pure;
1435 function Has_Pragma_Pure_Function (Id : E) return B is
1437 return Flag179 (Id);
1438 end Has_Pragma_Pure_Function;
1440 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1442 return Flag169 (Id);
1443 end Has_Pragma_Thread_Local_Storage;
1445 function Has_Pragma_Unmodified (Id : E) return B is
1447 return Flag233 (Id);
1448 end Has_Pragma_Unmodified;
1450 function Has_Pragma_Unreferenced (Id : E) return B is
1452 return Flag180 (Id);
1453 end Has_Pragma_Unreferenced;
1455 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1457 pragma Assert (Is_Type (Id));
1458 return Flag212 (Id);
1459 end Has_Pragma_Unreferenced_Objects;
1461 function Has_Predicates (Id : E) return B is
1463 return Flag250 (Id);
1466 function Has_Primitive_Operations (Id : E) return B is
1468 pragma Assert (Is_Type (Id));
1469 return Flag120 (Base_Type (Id));
1470 end Has_Primitive_Operations;
1472 function Has_Private_Ancestor (Id : E) return B is
1474 return Flag151 (Id);
1475 end Has_Private_Ancestor;
1477 function Has_Private_Declaration (Id : E) return B is
1479 return Flag155 (Id);
1480 end Has_Private_Declaration;
1482 function Has_Qualified_Name (Id : E) return B is
1484 return Flag161 (Id);
1485 end Has_Qualified_Name;
1487 function Has_RACW (Id : E) return B is
1489 pragma Assert (Ekind (Id) = E_Package);
1490 return Flag214 (Id);
1493 function Has_Record_Rep_Clause (Id : E) return B is
1495 pragma Assert (Is_Record_Type (Id));
1496 return Flag65 (Implementation_Base_Type (Id));
1497 end Has_Record_Rep_Clause;
1499 function Has_Recursive_Call (Id : E) return B is
1501 pragma Assert (Is_Subprogram (Id));
1502 return Flag143 (Id);
1503 end Has_Recursive_Call;
1505 function Has_Size_Clause (Id : E) return B is
1508 end Has_Size_Clause;
1510 function Has_Small_Clause (Id : E) return B is
1513 end Has_Small_Clause;
1515 function Has_Specified_Layout (Id : E) return B is
1517 pragma Assert (Is_Type (Id));
1518 return Flag100 (Implementation_Base_Type (Id));
1519 end Has_Specified_Layout;
1521 function Has_Specified_Stream_Input (Id : E) return B is
1523 pragma Assert (Is_Type (Id));
1524 return Flag190 (Id);
1525 end Has_Specified_Stream_Input;
1527 function Has_Specified_Stream_Output (Id : E) return B is
1529 pragma Assert (Is_Type (Id));
1530 return Flag191 (Id);
1531 end Has_Specified_Stream_Output;
1533 function Has_Specified_Stream_Read (Id : E) return B is
1535 pragma Assert (Is_Type (Id));
1536 return Flag192 (Id);
1537 end Has_Specified_Stream_Read;
1539 function Has_Specified_Stream_Write (Id : E) return B is
1541 pragma Assert (Is_Type (Id));
1542 return Flag193 (Id);
1543 end Has_Specified_Stream_Write;
1545 function Has_Static_Discriminants (Id : E) return B is
1547 pragma Assert (Is_Type (Id));
1548 return Flag211 (Id);
1549 end Has_Static_Discriminants;
1551 function Has_Storage_Size_Clause (Id : E) return B is
1553 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1554 return Flag23 (Implementation_Base_Type (Id));
1555 end Has_Storage_Size_Clause;
1557 function Has_Stream_Size_Clause (Id : E) return B is
1559 return Flag184 (Id);
1560 end Has_Stream_Size_Clause;
1562 function Has_Subprogram_Descriptor (Id : E) return B is
1565 end Has_Subprogram_Descriptor;
1567 function Has_Task (Id : E) return B is
1569 return Flag30 (Base_Type (Id));
1572 function Has_Thunks (Id : E) return B is
1574 return Flag228 (Id);
1577 function Has_Unchecked_Union (Id : E) return B is
1579 return Flag123 (Base_Type (Id));
1580 end Has_Unchecked_Union;
1582 function Has_Unknown_Discriminants (Id : E) return B is
1584 pragma Assert (Is_Type (Id));
1586 end Has_Unknown_Discriminants;
1588 function Has_Up_Level_Access (Id : E) return B is
1591 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1592 return Flag215 (Id);
1593 end Has_Up_Level_Access;
1595 function Has_Volatile_Components (Id : E) return B is
1597 return Flag87 (Implementation_Base_Type (Id));
1598 end Has_Volatile_Components;
1600 function Has_Xref_Entry (Id : E) return B is
1602 return Flag182 (Id);
1605 function Hiding_Loop_Variable (Id : E) return E is
1607 pragma Assert (Ekind (Id) = E_Variable);
1609 end Hiding_Loop_Variable;
1611 function Homonym (Id : E) return E is
1616 function Interface_Alias (Id : E) return E is
1618 pragma Assert (Is_Subprogram (Id));
1620 end Interface_Alias;
1622 function Interfaces (Id : E) return L is
1624 pragma Assert (Is_Record_Type (Id));
1625 return Elist25 (Id);
1628 function In_Package_Body (Id : E) return B is
1631 end In_Package_Body;
1633 function In_Private_Part (Id : E) return B is
1636 end In_Private_Part;
1638 function In_Use (Id : E) return B is
1640 pragma Assert (Nkind (Id) in N_Entity);
1644 function Inner_Instances (Id : E) return L is
1646 return Elist23 (Id);
1647 end Inner_Instances;
1649 function Interface_Name (Id : E) return N is
1654 function Is_Abstract_Subprogram (Id : E) return B is
1656 pragma Assert (Is_Overloadable (Id));
1658 end Is_Abstract_Subprogram;
1660 function Is_Abstract_Type (Id : E) return B is
1662 pragma Assert (Is_Type (Id));
1663 return Flag146 (Id);
1664 end Is_Abstract_Type;
1666 function Is_Local_Anonymous_Access (Id : E) return B is
1668 pragma Assert (Is_Access_Type (Id));
1669 return Flag194 (Id);
1670 end Is_Local_Anonymous_Access;
1672 function Is_Access_Constant (Id : E) return B is
1674 pragma Assert (Is_Access_Type (Id));
1676 end Is_Access_Constant;
1678 function Is_Ada_2005_Only (Id : E) return B is
1680 return Flag185 (Id);
1681 end Is_Ada_2005_Only;
1683 function Is_Ada_2012_Only (Id : E) return B is
1685 return Flag199 (Id);
1686 end Is_Ada_2012_Only;
1688 function Is_Aliased (Id : E) return B is
1690 pragma Assert (Nkind (Id) in N_Entity);
1694 function Is_AST_Entry (Id : E) return B is
1696 pragma Assert (Is_Entry (Id));
1697 return Flag132 (Id);
1700 function Is_Asynchronous (Id : E) return B is
1702 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1704 end Is_Asynchronous;
1706 function Is_Atomic (Id : E) return B is
1711 function Is_Bit_Packed_Array (Id : E) return B is
1713 return Flag122 (Implementation_Base_Type (Id));
1714 end Is_Bit_Packed_Array;
1716 function Is_Called (Id : E) return B is
1718 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1719 return Flag102 (Id);
1722 function Is_Character_Type (Id : E) return B is
1725 end Is_Character_Type;
1727 function Is_Child_Unit (Id : E) return B is
1732 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1735 end Is_Class_Wide_Equivalent_Type;
1737 function Is_Compilation_Unit (Id : E) return B is
1739 return Flag149 (Id);
1740 end Is_Compilation_Unit;
1742 function Is_Completely_Hidden (Id : E) return B is
1744 pragma Assert (Ekind (Id) = E_Discriminant);
1745 return Flag103 (Id);
1746 end Is_Completely_Hidden;
1748 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1751 end Is_Constr_Subt_For_U_Nominal;
1753 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1755 return Flag141 (Id);
1756 end Is_Constr_Subt_For_UN_Aliased;
1758 function Is_Constrained (Id : E) return B is
1760 pragma Assert (Nkind (Id) in N_Entity);
1764 function Is_Constructor (Id : E) return B is
1769 function Is_Controlled (Id : E) return B is
1771 return Flag42 (Base_Type (Id));
1774 function Is_Controlling_Formal (Id : E) return B is
1776 pragma Assert (Is_Formal (Id));
1778 end Is_Controlling_Formal;
1780 function Is_CPP_Class (Id : E) return B is
1785 function Is_Descendent_Of_Address (Id : E) return B is
1787 pragma Assert (Is_Type (Id));
1788 return Flag223 (Id);
1789 end Is_Descendent_Of_Address;
1791 function Is_Discrim_SO_Function (Id : E) return B is
1793 return Flag176 (Id);
1794 end Is_Discrim_SO_Function;
1796 function Is_Dispatch_Table_Entity (Id : E) return B is
1798 return Flag234 (Id);
1799 end Is_Dispatch_Table_Entity;
1801 function Is_Dispatching_Operation (Id : E) return B is
1803 pragma Assert (Nkind (Id) in N_Entity);
1805 end Is_Dispatching_Operation;
1807 function Is_Eliminated (Id : E) return B is
1809 return Flag124 (Id);
1812 function Is_Entry_Formal (Id : E) return B is
1815 end Is_Entry_Formal;
1817 function Is_Exported (Id : E) return B is
1822 function Is_First_Subtype (Id : E) return B is
1825 end Is_First_Subtype;
1827 function Is_For_Access_Subtype (Id : E) return B is
1829 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1830 return Flag118 (Id);
1831 end Is_For_Access_Subtype;
1833 function Is_Formal_Subprogram (Id : E) return B is
1835 return Flag111 (Id);
1836 end Is_Formal_Subprogram;
1838 function Is_Frozen (Id : E) return B is
1843 function Is_Generic_Actual_Type (Id : E) return B is
1845 pragma Assert (Is_Type (Id));
1847 end Is_Generic_Actual_Type;
1849 function Is_Generic_Instance (Id : E) return B is
1851 return Flag130 (Id);
1852 end Is_Generic_Instance;
1854 function Is_Generic_Type (Id : E) return B is
1856 pragma Assert (Nkind (Id) in N_Entity);
1858 end Is_Generic_Type;
1860 function Is_Hidden (Id : E) return B is
1865 function Is_Hidden_Open_Scope (Id : E) return B is
1867 return Flag171 (Id);
1868 end Is_Hidden_Open_Scope;
1870 function Is_Immediately_Visible (Id : E) return B is
1872 pragma Assert (Nkind (Id) in N_Entity);
1874 end Is_Immediately_Visible;
1876 function Is_Imported (Id : E) return B is
1881 function Is_Inlined (Id : E) return B is
1886 function Is_Interface (Id : E) return B is
1888 return Flag186 (Id);
1891 function Is_Instantiated (Id : E) return B is
1893 return Flag126 (Id);
1894 end Is_Instantiated;
1896 function Is_Internal (Id : E) return B is
1898 pragma Assert (Nkind (Id) in N_Entity);
1902 function Is_Interrupt_Handler (Id : E) return B is
1904 pragma Assert (Nkind (Id) in N_Entity);
1906 end Is_Interrupt_Handler;
1908 function Is_Intrinsic_Subprogram (Id : E) return B is
1911 end Is_Intrinsic_Subprogram;
1913 function Is_Itype (Id : E) return B is
1918 function Is_Known_Non_Null (Id : E) return B is
1921 end Is_Known_Non_Null;
1923 function Is_Known_Null (Id : E) return B is
1925 return Flag204 (Id);
1928 function Is_Known_Valid (Id : E) return B is
1930 return Flag170 (Id);
1933 function Is_Limited_Composite (Id : E) return B is
1935 return Flag106 (Id);
1936 end Is_Limited_Composite;
1938 function Is_Limited_Interface (Id : E) return B is
1940 return Flag197 (Id);
1941 end Is_Limited_Interface;
1943 function Is_Limited_Record (Id : E) return B is
1946 end Is_Limited_Record;
1948 function Is_Machine_Code_Subprogram (Id : E) return B is
1950 pragma Assert (Is_Subprogram (Id));
1951 return Flag137 (Id);
1952 end Is_Machine_Code_Subprogram;
1954 function Is_Non_Static_Subtype (Id : E) return B is
1956 pragma Assert (Is_Type (Id));
1957 return Flag109 (Id);
1958 end Is_Non_Static_Subtype;
1960 function Is_Null_Init_Proc (Id : E) return B is
1962 pragma Assert (Ekind (Id) = E_Procedure);
1963 return Flag178 (Id);
1964 end Is_Null_Init_Proc;
1966 function Is_Obsolescent (Id : E) return B is
1968 return Flag153 (Id);
1971 function Is_Only_Out_Parameter (Id : E) return B is
1973 pragma Assert (Is_Formal (Id));
1974 return Flag226 (Id);
1975 end Is_Only_Out_Parameter;
1977 function Is_Optional_Parameter (Id : E) return B is
1979 pragma Assert (Is_Formal (Id));
1980 return Flag134 (Id);
1981 end Is_Optional_Parameter;
1983 function Is_Package_Body_Entity (Id : E) return B is
1985 return Flag160 (Id);
1986 end Is_Package_Body_Entity;
1988 function Is_Packed (Id : E) return B is
1990 return Flag51 (Implementation_Base_Type (Id));
1993 function Is_Packed_Array_Type (Id : E) return B is
1995 return Flag138 (Id);
1996 end Is_Packed_Array_Type;
1998 function Is_Potentially_Use_Visible (Id : E) return B is
2000 pragma Assert (Nkind (Id) in N_Entity);
2002 end Is_Potentially_Use_Visible;
2004 function Is_Preelaborated (Id : E) return B is
2007 end Is_Preelaborated;
2009 function Is_Primitive (Id : E) return B is
2012 (Is_Overloadable (Id)
2013 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2014 return Flag218 (Id);
2017 function Is_Primitive_Wrapper (Id : E) return B is
2019 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2020 return Flag195 (Id);
2021 end Is_Primitive_Wrapper;
2023 function Is_Private_Composite (Id : E) return B is
2025 pragma Assert (Is_Type (Id));
2026 return Flag107 (Id);
2027 end Is_Private_Composite;
2029 function Is_Private_Descendant (Id : E) return B is
2032 end Is_Private_Descendant;
2034 function Is_Private_Primitive (Id : E) return B is
2036 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2037 return Flag245 (Id);
2038 end Is_Private_Primitive;
2040 function Is_Processed_Transient (Id : E) return B is
2042 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2043 return Flag252 (Id);
2044 end Is_Processed_Transient;
2046 function Is_Public (Id : E) return B is
2048 pragma Assert (Nkind (Id) in N_Entity);
2052 function Is_Pure (Id : E) return B is
2057 function Is_Pure_Unit_Access_Type (Id : E) return B is
2059 pragma Assert (Is_Access_Type (Id));
2060 return Flag189 (Id);
2061 end Is_Pure_Unit_Access_Type;
2063 function Is_RACW_Stub_Type (Id : E) return B is
2065 pragma Assert (Is_Type (Id));
2066 return Flag244 (Id);
2067 end Is_RACW_Stub_Type;
2069 function Is_Raised (Id : E) return B is
2071 pragma Assert (Ekind (Id) = E_Exception);
2072 return Flag224 (Id);
2075 function Is_Remote_Call_Interface (Id : E) return B is
2078 end Is_Remote_Call_Interface;
2080 function Is_Remote_Types (Id : E) return B is
2083 end Is_Remote_Types;
2085 function Is_Renaming_Of_Object (Id : E) return B is
2087 return Flag112 (Id);
2088 end Is_Renaming_Of_Object;
2090 function Is_Return_Object (Id : E) return B is
2092 return Flag209 (Id);
2093 end Is_Return_Object;
2095 function Is_Safe_To_Reevaluate (Id : E) return B is
2097 return Flag249 (Id);
2098 end Is_Safe_To_Reevaluate;
2100 function Is_Shared_Passive (Id : E) return B is
2103 end Is_Shared_Passive;
2105 function Is_Statically_Allocated (Id : E) return B is
2108 end Is_Statically_Allocated;
2110 function Is_Tag (Id : E) return B is
2112 pragma Assert (Nkind (Id) in N_Entity);
2116 function Is_Tagged_Type (Id : E) return B is
2121 function Is_Thunk (Id : E) return B is
2123 pragma Assert (Is_Subprogram (Id));
2124 return Flag225 (Id);
2127 function Is_Trivial_Subprogram (Id : E) return B is
2129 return Flag235 (Id);
2130 end Is_Trivial_Subprogram;
2132 function Is_True_Constant (Id : E) return B is
2134 return Flag163 (Id);
2135 end Is_True_Constant;
2137 function Is_Unchecked_Union (Id : E) return B is
2139 return Flag117 (Implementation_Base_Type (Id));
2140 end Is_Unchecked_Union;
2142 function Is_Underlying_Record_View (Id : E) return B is
2144 return Flag246 (Id);
2145 end Is_Underlying_Record_View;
2147 function Is_Unsigned_Type (Id : E) return B is
2149 pragma Assert (Is_Type (Id));
2150 return Flag144 (Id);
2151 end Is_Unsigned_Type;
2153 function Is_Valued_Procedure (Id : E) return B is
2155 pragma Assert (Ekind (Id) = E_Procedure);
2156 return Flag127 (Id);
2157 end Is_Valued_Procedure;
2159 function Is_Visible_Child_Unit (Id : E) return B is
2161 pragma Assert (Is_Child_Unit (Id));
2162 return Flag116 (Id);
2163 end Is_Visible_Child_Unit;
2165 function Is_Visible_Formal (Id : E) return B is
2167 return Flag206 (Id);
2168 end Is_Visible_Formal;
2170 function Is_VMS_Exception (Id : E) return B is
2172 return Flag133 (Id);
2173 end Is_VMS_Exception;
2175 function Is_Volatile (Id : E) return B is
2177 pragma Assert (Nkind (Id) in N_Entity);
2179 if Is_Type (Id) then
2180 return Flag16 (Base_Type (Id));
2186 function Itype_Printed (Id : E) return B is
2188 pragma Assert (Is_Itype (Id));
2189 return Flag202 (Id);
2192 function Kill_Elaboration_Checks (Id : E) return B is
2195 end Kill_Elaboration_Checks;
2197 function Kill_Range_Checks (Id : E) return B is
2200 end Kill_Range_Checks;
2202 function Kill_Tag_Checks (Id : E) return B is
2205 end Kill_Tag_Checks;
2207 function Known_To_Have_Preelab_Init (Id : E) return B is
2209 pragma Assert (Is_Type (Id));
2210 return Flag207 (Id);
2211 end Known_To_Have_Preelab_Init;
2213 function Last_Assignment (Id : E) return N is
2215 pragma Assert (Is_Assignable (Id));
2217 end Last_Assignment;
2219 function Last_Entity (Id : E) return E is
2224 function Limited_View (Id : E) return E is
2226 pragma Assert (Ekind (Id) = E_Package);
2230 function Lit_Indexes (Id : E) return E is
2232 pragma Assert (Is_Enumeration_Type (Id));
2236 function Lit_Strings (Id : E) return E is
2238 pragma Assert (Is_Enumeration_Type (Id));
2242 function Low_Bound_Tested (Id : E) return B is
2244 return Flag205 (Id);
2245 end Low_Bound_Tested;
2247 function Machine_Radix_10 (Id : E) return B is
2249 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2251 end Machine_Radix_10;
2253 function Master_Id (Id : E) return E is
2255 pragma Assert (Is_Access_Type (Id));
2259 function Materialize_Entity (Id : E) return B is
2261 return Flag168 (Id);
2262 end Materialize_Entity;
2264 function Mechanism (Id : E) return M is
2266 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2267 return UI_To_Int (Uint8 (Id));
2270 function Modulus (Id : E) return Uint is
2272 pragma Assert (Is_Modular_Integer_Type (Id));
2273 return Uint17 (Base_Type (Id));
2276 function Must_Be_On_Byte_Boundary (Id : E) return B is
2278 pragma Assert (Is_Type (Id));
2279 return Flag183 (Id);
2280 end Must_Be_On_Byte_Boundary;
2282 function Must_Have_Preelab_Init (Id : E) return B is
2284 pragma Assert (Is_Type (Id));
2285 return Flag208 (Id);
2286 end Must_Have_Preelab_Init;
2288 function Needs_Debug_Info (Id : E) return B is
2290 return Flag147 (Id);
2291 end Needs_Debug_Info;
2293 function Needs_No_Actuals (Id : E) return B is
2296 (Is_Overloadable (Id)
2297 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2299 end Needs_No_Actuals;
2301 function Never_Set_In_Source (Id : E) return B is
2303 return Flag115 (Id);
2304 end Never_Set_In_Source;
2306 function Next_Inlined_Subprogram (Id : E) return E is
2309 end Next_Inlined_Subprogram;
2311 function No_Pool_Assigned (Id : E) return B is
2313 pragma Assert (Is_Access_Type (Id));
2314 return Flag131 (Root_Type (Id));
2315 end No_Pool_Assigned;
2317 function No_Return (Id : E) return B is
2319 return Flag113 (Id);
2322 function No_Strict_Aliasing (Id : E) return B is
2324 pragma Assert (Is_Access_Type (Id));
2325 return Flag136 (Base_Type (Id));
2326 end No_Strict_Aliasing;
2328 function Non_Binary_Modulus (Id : E) return B is
2330 pragma Assert (Is_Type (Id));
2331 return Flag58 (Base_Type (Id));
2332 end Non_Binary_Modulus;
2334 function Non_Limited_View (Id : E) return E is
2336 pragma Assert (Ekind (Id) in Incomplete_Kind);
2338 end Non_Limited_View;
2340 function Nonzero_Is_True (Id : E) return B is
2342 pragma Assert (Root_Type (Id) = Standard_Boolean);
2343 return Flag162 (Base_Type (Id));
2344 end Nonzero_Is_True;
2346 function Normalized_First_Bit (Id : E) return U is
2348 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2350 end Normalized_First_Bit;
2352 function Normalized_Position (Id : E) return U is
2354 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2356 end Normalized_Position;
2358 function Normalized_Position_Max (Id : E) return U is
2360 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2362 end Normalized_Position_Max;
2364 function OK_To_Rename (Id : E) return B is
2366 pragma Assert (Ekind (Id) = E_Variable);
2367 return Flag247 (Id);
2370 function OK_To_Reorder_Components (Id : E) return B is
2372 pragma Assert (Is_Record_Type (Id));
2373 return Flag239 (Base_Type (Id));
2374 end OK_To_Reorder_Components;
2376 function Optimize_Alignment_Space (Id : E) return B is
2379 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2380 return Flag241 (Id);
2381 end Optimize_Alignment_Space;
2383 function Optimize_Alignment_Time (Id : E) return B is
2386 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2387 return Flag242 (Id);
2388 end Optimize_Alignment_Time;
2390 function Original_Access_Type (Id : E) return E is
2392 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2394 end Original_Access_Type;
2396 function Original_Array_Type (Id : E) return E is
2398 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2400 end Original_Array_Type;
2402 function Original_Record_Component (Id : E) return E is
2404 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2406 end Original_Record_Component;
2408 function Overlays_Constant (Id : E) return B is
2410 return Flag243 (Id);
2411 end Overlays_Constant;
2413 function Overridden_Operation (Id : E) return E is
2416 end Overridden_Operation;
2418 function Package_Instantiation (Id : E) return N is
2420 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2422 end Package_Instantiation;
2424 function Packed_Array_Type (Id : E) return E is
2426 pragma Assert (Is_Array_Type (Id));
2428 end Packed_Array_Type;
2430 function Parent_Subtype (Id : E) return E is
2432 pragma Assert (Is_Record_Type (Id));
2433 return Node19 (Base_Type (Id));
2436 function Postcondition_Proc (Id : E) return E is
2438 pragma Assert (Ekind (Id) = E_Procedure);
2440 end Postcondition_Proc;
2442 function PPC_Wrapper (Id : E) return E is
2444 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2448 function Prival (Id : E) return E is
2450 pragma Assert (Is_Protected_Component (Id));
2454 function Prival_Link (Id : E) return E is
2456 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2460 function Private_Dependents (Id : E) return L is
2462 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2463 return Elist18 (Id);
2464 end Private_Dependents;
2466 function Private_View (Id : E) return N is
2468 pragma Assert (Is_Private_Type (Id));
2472 function Protected_Body_Subprogram (Id : E) return E is
2474 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2476 end Protected_Body_Subprogram;
2478 function Protected_Formal (Id : E) return E is
2480 pragma Assert (Is_Formal (Id));
2482 end Protected_Formal;
2484 function Protection_Object (Id : E) return E is
2487 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2489 end Protection_Object;
2491 function Reachable (Id : E) return B is
2496 function Referenced (Id : E) return B is
2498 return Flag156 (Id);
2501 function Referenced_As_LHS (Id : E) return B is
2504 end Referenced_As_LHS;
2506 function Referenced_As_Out_Parameter (Id : E) return B is
2508 return Flag227 (Id);
2509 end Referenced_As_Out_Parameter;
2511 function Register_Exception_Call (Id : E) return N is
2513 pragma Assert (Ekind (Id) = E_Exception);
2515 end Register_Exception_Call;
2517 function Related_Array_Object (Id : E) return E is
2519 pragma Assert (Is_Array_Type (Id));
2521 end Related_Array_Object;
2523 function Related_Expression (Id : E) return N is
2525 pragma Assert (Ekind (Id) in Type_Kind
2526 or else Ekind_In (Id, E_Constant, E_Variable));
2528 end Related_Expression;
2530 function Related_Instance (Id : E) return E is
2532 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2534 end Related_Instance;
2536 function Related_Type (Id : E) return E is
2538 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2542 function Relative_Deadline_Variable (Id : E) return E is
2544 pragma Assert (Is_Task_Type (Id));
2545 return Node26 (Implementation_Base_Type (Id));
2546 end Relative_Deadline_Variable;
2548 function Renamed_Entity (Id : E) return N is
2553 function Renamed_In_Spec (Id : E) return B is
2555 pragma Assert (Ekind (Id) = E_Package);
2556 return Flag231 (Id);
2557 end Renamed_In_Spec;
2559 function Renamed_Object (Id : E) return N is
2564 function Renaming_Map (Id : E) return U is
2569 function Requires_Overriding (Id : E) return B is
2571 pragma Assert (Is_Overloadable (Id));
2572 return Flag213 (Id);
2573 end Requires_Overriding;
2575 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2577 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2579 end Return_Flag_Or_Transient_Decl;
2581 function Return_Present (Id : E) return B is
2586 function Return_Applies_To (Id : E) return N is
2589 end Return_Applies_To;
2591 function Returns_By_Ref (Id : E) return B is
2596 function Reverse_Bit_Order (Id : E) return B is
2598 pragma Assert (Is_Record_Type (Id));
2599 return Flag164 (Base_Type (Id));
2600 end Reverse_Bit_Order;
2602 function RM_Size (Id : E) return U is
2604 pragma Assert (Is_Type (Id));
2608 function Scalar_Range (Id : E) return N is
2613 function Scale_Value (Id : E) return U is
2618 function Scope_Depth_Value (Id : E) return U is
2621 end Scope_Depth_Value;
2623 function Sec_Stack_Needed_For_Return (Id : E) return B is
2625 return Flag167 (Id);
2626 end Sec_Stack_Needed_For_Return;
2628 function Shadow_Entities (Id : E) return S is
2630 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2632 end Shadow_Entities;
2634 function Shared_Var_Procs_Instance (Id : E) return E is
2636 pragma Assert (Ekind (Id) = E_Variable);
2638 end Shared_Var_Procs_Instance;
2640 function Size_Check_Code (Id : E) return N is
2642 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2644 end Size_Check_Code;
2646 function Size_Depends_On_Discriminant (Id : E) return B is
2648 return Flag177 (Id);
2649 end Size_Depends_On_Discriminant;
2651 function Size_Known_At_Compile_Time (Id : E) return B is
2654 end Size_Known_At_Compile_Time;
2656 function Small_Value (Id : E) return R is
2658 pragma Assert (Is_Fixed_Point_Type (Id));
2659 return Ureal21 (Id);
2662 function Spec_Entity (Id : E) return E is
2664 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2668 function Static_Predicate (Id : E) return S is
2670 pragma Assert (Is_Discrete_Type (Id));
2672 end Static_Predicate;
2674 function Storage_Size_Variable (Id : E) return E is
2676 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2677 return Node15 (Implementation_Base_Type (Id));
2678 end Storage_Size_Variable;
2680 function Static_Elaboration_Desired (Id : E) return B is
2682 pragma Assert (Ekind (Id) = E_Package);
2684 end Static_Elaboration_Desired;
2686 function Static_Initialization (Id : E) return N is
2689 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2691 end Static_Initialization;
2693 function Stored_Constraint (Id : E) return L is
2696 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2697 return Elist23 (Id);
2698 end Stored_Constraint;
2700 function Strict_Alignment (Id : E) return B is
2702 return Flag145 (Implementation_Base_Type (Id));
2703 end Strict_Alignment;
2705 function String_Literal_Length (Id : E) return U is
2708 end String_Literal_Length;
2710 function String_Literal_Low_Bound (Id : E) return N is
2713 end String_Literal_Low_Bound;
2715 function Subprograms_For_Type (Id : E) return E is
2717 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2719 end Subprograms_For_Type;
2721 function Suppress_Elaboration_Warnings (Id : E) return B is
2723 return Flag148 (Id);
2724 end Suppress_Elaboration_Warnings;
2726 function Suppress_Initialization (Id : E) return B is
2728 pragma Assert (Is_Type (Id));
2729 return Flag105 (Id);
2730 end Suppress_Initialization;
2732 function Suppress_Style_Checks (Id : E) return B is
2734 return Flag165 (Id);
2735 end Suppress_Style_Checks;
2737 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2739 return Flag217 (Id);
2740 end Suppress_Value_Tracking_On_Call;
2742 function Task_Body_Procedure (Id : E) return N is
2744 pragma Assert (Ekind (Id) in Task_Kind);
2746 end Task_Body_Procedure;
2748 function Treat_As_Volatile (Id : E) return B is
2751 end Treat_As_Volatile;
2753 function Underlying_Full_View (Id : E) return E is
2755 pragma Assert (Ekind (Id) in Private_Kind);
2757 end Underlying_Full_View;
2759 function Underlying_Record_View (Id : E) return E is
2762 end Underlying_Record_View;
2764 function Universal_Aliasing (Id : E) return B is
2766 pragma Assert (Is_Type (Id));
2767 return Flag216 (Base_Type (Id));
2768 end Universal_Aliasing;
2770 function Unset_Reference (Id : E) return N is
2773 end Unset_Reference;
2775 function Used_As_Generic_Actual (Id : E) return B is
2777 return Flag222 (Id);
2778 end Used_As_Generic_Actual;
2780 function Uses_Sec_Stack (Id : E) return B is
2785 function Warnings_Off (Id : E) return B is
2790 function Warnings_Off_Used (Id : E) return B is
2792 return Flag236 (Id);
2793 end Warnings_Off_Used;
2795 function Warnings_Off_Used_Unmodified (Id : E) return B is
2797 return Flag237 (Id);
2798 end Warnings_Off_Used_Unmodified;
2800 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2802 return Flag238 (Id);
2803 end Warnings_Off_Used_Unreferenced;
2805 function Wrapped_Entity (Id : E) return E is
2807 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2808 and then Is_Primitive_Wrapper (Id));
2812 function Was_Hidden (Id : E) return B is
2814 return Flag196 (Id);
2817 ------------------------------
2818 -- Classification Functions --
2819 ------------------------------
2821 function Is_Access_Type (Id : E) return B is
2823 return Ekind (Id) in Access_Kind;
2826 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2828 return Ekind (Id) in Access_Protected_Kind;
2829 end Is_Access_Protected_Subprogram_Type;
2831 function Is_Access_Subprogram_Type (Id : E) return B is
2833 return Ekind (Id) in Access_Subprogram_Kind;
2834 end Is_Access_Subprogram_Type;
2836 function Is_Aggregate_Type (Id : E) return B is
2838 return Ekind (Id) in Aggregate_Kind;
2839 end Is_Aggregate_Type;
2841 function Is_Array_Type (Id : E) return B is
2843 return Ekind (Id) in Array_Kind;
2846 function Is_Assignable (Id : E) return B is
2848 return Ekind (Id) in Assignable_Kind;
2851 function Is_Class_Wide_Type (Id : E) return B is
2853 return Ekind (Id) in Class_Wide_Kind;
2854 end Is_Class_Wide_Type;
2856 function Is_Composite_Type (Id : E) return B is
2858 return Ekind (Id) in Composite_Kind;
2859 end Is_Composite_Type;
2861 function Is_Concurrent_Body (Id : E) return B is
2863 return Ekind (Id) in
2864 Concurrent_Body_Kind;
2865 end Is_Concurrent_Body;
2867 function Is_Concurrent_Record_Type (Id : E) return B is
2870 end Is_Concurrent_Record_Type;
2872 function Is_Concurrent_Type (Id : E) return B is
2874 return Ekind (Id) in Concurrent_Kind;
2875 end Is_Concurrent_Type;
2877 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2879 return Ekind (Id) in
2880 Decimal_Fixed_Point_Kind;
2881 end Is_Decimal_Fixed_Point_Type;
2883 function Is_Digits_Type (Id : E) return B is
2885 return Ekind (Id) in Digits_Kind;
2888 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2890 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2891 end Is_Discrete_Or_Fixed_Point_Type;
2893 function Is_Discrete_Type (Id : E) return B is
2895 return Ekind (Id) in Discrete_Kind;
2896 end Is_Discrete_Type;
2898 function Is_Elementary_Type (Id : E) return B is
2900 return Ekind (Id) in Elementary_Kind;
2901 end Is_Elementary_Type;
2903 function Is_Entry (Id : E) return B is
2905 return Ekind (Id) in Entry_Kind;
2908 function Is_Enumeration_Type (Id : E) return B is
2910 return Ekind (Id) in
2912 end Is_Enumeration_Type;
2914 function Is_Fixed_Point_Type (Id : E) return B is
2916 return Ekind (Id) in
2918 end Is_Fixed_Point_Type;
2920 function Is_Floating_Point_Type (Id : E) return B is
2922 return Ekind (Id) in Float_Kind;
2923 end Is_Floating_Point_Type;
2925 function Is_Formal (Id : E) return B is
2927 return Ekind (Id) in Formal_Kind;
2930 function Is_Formal_Object (Id : E) return B is
2932 return Ekind (Id) in Formal_Object_Kind;
2933 end Is_Formal_Object;
2935 function Is_Generic_Subprogram (Id : E) return B is
2937 return Ekind (Id) in Generic_Subprogram_Kind;
2938 end Is_Generic_Subprogram;
2940 function Is_Generic_Unit (Id : E) return B is
2942 return Ekind (Id) in Generic_Unit_Kind;
2943 end Is_Generic_Unit;
2945 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2947 return Ekind (Id) in
2948 Incomplete_Or_Private_Kind;
2949 end Is_Incomplete_Or_Private_Type;
2951 function Is_Incomplete_Type (Id : E) return B is
2953 return Ekind (Id) in
2955 end Is_Incomplete_Type;
2957 function Is_Integer_Type (Id : E) return B is
2959 return Ekind (Id) in Integer_Kind;
2960 end Is_Integer_Type;
2962 function Is_Modular_Integer_Type (Id : E) return B is
2964 return Ekind (Id) in
2965 Modular_Integer_Kind;
2966 end Is_Modular_Integer_Type;
2968 function Is_Named_Number (Id : E) return B is
2970 return Ekind (Id) in Named_Kind;
2971 end Is_Named_Number;
2973 function Is_Numeric_Type (Id : E) return B is
2975 return Ekind (Id) in Numeric_Kind;
2976 end Is_Numeric_Type;
2978 function Is_Object (Id : E) return B is
2980 return Ekind (Id) in Object_Kind;
2983 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2985 return Ekind (Id) in
2986 Ordinary_Fixed_Point_Kind;
2987 end Is_Ordinary_Fixed_Point_Type;
2989 function Is_Overloadable (Id : E) return B is
2991 return Ekind (Id) in Overloadable_Kind;
2992 end Is_Overloadable;
2994 function Is_Private_Type (Id : E) return B is
2996 return Ekind (Id) in Private_Kind;
2997 end Is_Private_Type;
2999 function Is_Protected_Type (Id : E) return B is
3001 return Ekind (Id) in Protected_Kind;
3002 end Is_Protected_Type;
3004 function Is_Real_Type (Id : E) return B is
3006 return Ekind (Id) in Real_Kind;
3009 function Is_Record_Type (Id : E) return B is
3011 return Ekind (Id) in Record_Kind;
3014 function Is_Scalar_Type (Id : E) return B is
3016 return Ekind (Id) in Scalar_Kind;
3019 function Is_Signed_Integer_Type (Id : E) return B is
3021 return Ekind (Id) in Signed_Integer_Kind;
3022 end Is_Signed_Integer_Type;
3024 function Is_Subprogram (Id : E) return B is
3026 return Ekind (Id) in Subprogram_Kind;
3029 function Is_Task_Type (Id : E) return B is
3031 return Ekind (Id) in Task_Kind;
3034 function Is_Type (Id : E) return B is
3036 return Ekind (Id) in Type_Kind;
3039 ------------------------------
3040 -- Attribute Set Procedures --
3041 ------------------------------
3043 -- Note: in many of these set procedures an "obvious" assertion is missing.
3044 -- The reason for this is that in many cases, a field is set before the
3045 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3046 -- it is possible to add assertions that specifically include the E_Void
3047 -- possibility, but in some cases, we just omit the assertions.
3049 procedure Set_Accept_Address (Id : E; V : L) is
3051 Set_Elist21 (Id, V);
3052 end Set_Accept_Address;
3054 procedure Set_Access_Disp_Table (Id : E; V : L) is
3056 pragma Assert (Ekind (Id) = E_Record_Type
3057 and then Id = Implementation_Base_Type (Id));
3058 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3059 Set_Elist16 (Id, V);
3060 end Set_Access_Disp_Table;
3062 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3065 end Set_Associated_Formal_Package;
3067 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3070 end Set_Associated_Node_For_Itype;
3072 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3074 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3076 end Set_Associated_Storage_Pool;
3078 procedure Set_Actual_Subtype (Id : E; V : E) is
3081 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3082 or else Is_Formal (Id));
3084 end Set_Actual_Subtype;
3086 procedure Set_Address_Taken (Id : E; V : B := True) is
3088 Set_Flag104 (Id, V);
3089 end Set_Address_Taken;
3091 procedure Set_Alias (Id : E; V : E) is
3094 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3098 procedure Set_Alignment (Id : E; V : U) is
3100 pragma Assert (Is_Type (Id)
3101 or else Is_Formal (Id)
3102 or else Ekind_In (Id, E_Loop_Parameter,
3109 procedure Set_Barrier_Function (Id : E; V : N) is
3111 pragma Assert (Is_Entry (Id));
3113 end Set_Barrier_Function;
3115 procedure Set_Block_Node (Id : E; V : N) is
3117 pragma Assert (Ekind (Id) = E_Block);
3121 procedure Set_Body_Entity (Id : E; V : E) is
3123 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3125 end Set_Body_Entity;
3127 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3130 (Ekind (Id) = E_Package
3131 or else Is_Subprogram (Id)
3132 or else Is_Generic_Unit (Id));
3134 end Set_Body_Needed_For_SAL;
3136 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3138 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3139 Set_Flag125 (Id, V);
3140 end Set_C_Pass_By_Copy;
3142 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3145 end Set_Can_Never_Be_Null;
3147 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3150 end Set_Checks_May_Be_Suppressed;
3152 procedure Set_Class_Wide_Type (Id : E; V : E) is
3154 pragma Assert (Is_Type (Id));
3156 end Set_Class_Wide_Type;
3158 procedure Set_Cloned_Subtype (Id : E; V : E) is
3160 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3162 end Set_Cloned_Subtype;
3164 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3166 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3168 end Set_Component_Bit_Offset;
3170 procedure Set_Component_Clause (Id : E; V : N) is
3172 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3174 end Set_Component_Clause;
3176 procedure Set_Component_Size (Id : E; V : U) is
3178 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3180 end Set_Component_Size;
3182 procedure Set_Component_Type (Id : E; V : E) is
3184 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3186 end Set_Component_Type;
3188 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3191 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3193 end Set_Corresponding_Concurrent_Type;
3195 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3197 pragma Assert (Ekind (Id) = E_Discriminant);
3199 end Set_Corresponding_Discriminant;
3201 procedure Set_Corresponding_Equality (Id : E; V : E) is
3204 (Ekind (Id) = E_Function
3205 and then not Comes_From_Source (Id)
3206 and then Chars (Id) = Name_Op_Ne);
3208 end Set_Corresponding_Equality;
3210 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3212 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3214 end Set_Corresponding_Protected_Entry;
3216 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3218 pragma Assert (Is_Concurrent_Type (Id));
3220 end Set_Corresponding_Record_Type;
3222 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3225 end Set_Corresponding_Remote_Type;
3227 procedure Set_Current_Use_Clause (Id : E; V : E) is
3229 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3231 end Set_Current_Use_Clause;
3233 procedure Set_Current_Value (Id : E; V : N) is
3235 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3237 end Set_Current_Value;
3239 procedure Set_CR_Discriminant (Id : E; V : E) is
3242 end Set_CR_Discriminant;
3244 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3246 Set_Flag166 (Id, V);
3247 end Set_Debug_Info_Off;
3249 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3252 end Set_Debug_Renaming_Link;
3254 procedure Set_Default_Expr_Function (Id : E; V : E) is
3256 pragma Assert (Is_Formal (Id));
3258 end Set_Default_Expr_Function;
3260 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3262 Set_Flag108 (Id, V);
3263 end Set_Default_Expressions_Processed;
3265 procedure Set_Default_Value (Id : E; V : N) is
3267 pragma Assert (Is_Formal (Id));
3269 end Set_Default_Value;
3271 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3275 or else Is_Task_Type (Id)
3276 or else Ekind (Id) = E_Block);
3277 Set_Flag114 (Id, V);
3278 end Set_Delay_Cleanups;
3280 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3283 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3286 end Set_Delay_Subprogram_Descriptors;
3288 procedure Set_Delta_Value (Id : E; V : R) is
3290 pragma Assert (Is_Fixed_Point_Type (Id));
3291 Set_Ureal18 (Id, V);
3292 end Set_Delta_Value;
3294 procedure Set_Dependent_Instances (Id : E; V : L) is
3296 pragma Assert (Is_Generic_Instance (Id));
3298 end Set_Dependent_Instances;
3300 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3302 pragma Assert (Nkind (Id) in N_Entity);
3304 end Set_Depends_On_Private;
3306 procedure Set_Digits_Value (Id : E; V : U) is
3309 (Is_Floating_Point_Type (Id)
3310 or else Is_Decimal_Fixed_Point_Type (Id));
3312 end Set_Digits_Value;
3314 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3317 end Set_Directly_Designated_Type;
3319 procedure Set_Discard_Names (Id : E; V : B := True) is
3322 end Set_Discard_Names;
3324 procedure Set_Discriminal (Id : E; V : E) is
3326 pragma Assert (Ekind (Id) = E_Discriminant);
3328 end Set_Discriminal;
3330 procedure Set_Discriminal_Link (Id : E; V : E) is
3333 end Set_Discriminal_Link;
3335 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3337 pragma Assert (Ekind (Id) = E_Component);
3339 end Set_Discriminant_Checking_Func;
3341 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3343 pragma Assert (Nkind (Id) in N_Entity);
3344 Set_Elist21 (Id, V);
3345 end Set_Discriminant_Constraint;
3347 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3350 end Set_Discriminant_Default_Value;
3352 procedure Set_Discriminant_Number (Id : E; V : U) is
3355 end Set_Discriminant_Number;
3357 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3359 pragma Assert (Ekind (Id) = E_Record_Type
3360 and then Id = Implementation_Base_Type (Id));
3361 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3362 Set_Elist26 (Id, V);
3363 end Set_Dispatch_Table_Wrappers;
3365 procedure Set_DT_Entry_Count (Id : E; V : U) is
3367 pragma Assert (Ekind (Id) = E_Component);
3369 end Set_DT_Entry_Count;
3371 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3373 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3375 end Set_DT_Offset_To_Top_Func;
3377 procedure Set_DT_Position (Id : E; V : U) is
3379 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3381 end Set_DT_Position;
3383 procedure Set_DTC_Entity (Id : E; V : E) is
3385 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3389 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3391 pragma Assert (Ekind (Id) = E_Package);
3392 Set_Flag210 (Id, V);
3393 end Set_Elaborate_Body_Desirable;
3395 procedure Set_Elaboration_Entity (Id : E; V : E) is
3400 Ekind (Id) = E_Package
3402 Is_Generic_Unit (Id));
3404 end Set_Elaboration_Entity;
3406 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3411 Ekind (Id) = E_Package
3413 Is_Generic_Unit (Id));
3414 Set_Flag174 (Id, V);
3415 end Set_Elaboration_Entity_Required;
3417 procedure Set_Enclosing_Scope (Id : E; V : E) is
3420 end Set_Enclosing_Scope;
3422 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3424 pragma Assert (Is_Entry (Id));
3425 Set_Flag152 (Id, V);
3426 end Set_Entry_Accepted;
3428 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3431 end Set_Entry_Bodies_Array;
3433 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3436 end Set_Entry_Cancel_Parameter;
3438 procedure Set_Entry_Component (Id : E; V : E) is
3441 end Set_Entry_Component;
3443 procedure Set_Entry_Formal (Id : E; V : E) is
3446 end Set_Entry_Formal;
3448 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3450 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3452 end Set_Entry_Index_Constant;
3454 procedure Set_Contract (Id : E; V : N) is
3457 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3458 or else Is_Subprogram (Id)
3459 or else Is_Generic_Subprogram (Id));
3463 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3466 end Set_Entry_Parameters_Type;
3468 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3470 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3472 end Set_Enum_Pos_To_Rep;
3474 procedure Set_Enumeration_Pos (Id : E; V : U) is
3476 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3478 end Set_Enumeration_Pos;
3480 procedure Set_Enumeration_Rep (Id : E; V : U) is
3482 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3484 end Set_Enumeration_Rep;
3486 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3488 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3490 end Set_Enumeration_Rep_Expr;
3492 procedure Set_Equivalent_Type (Id : E; V : E) is
3495 (Ekind_In (Id, E_Class_Wide_Type,
3496 E_Class_Wide_Subtype,
3497 E_Access_Protected_Subprogram_Type,
3498 E_Anonymous_Access_Protected_Subprogram_Type,
3499 E_Access_Subprogram_Type,
3502 end Set_Equivalent_Type;
3504 procedure Set_Esize (Id : E; V : U) is
3509 procedure Set_Exception_Code (Id : E; V : U) is
3511 pragma Assert (Ekind (Id) = E_Exception);
3513 end Set_Exception_Code;
3515 procedure Set_Extra_Accessibility (Id : E; V : E) is
3518 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3520 end Set_Extra_Accessibility;
3522 procedure Set_Extra_Constrained (Id : E; V : E) is
3524 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3526 end Set_Extra_Constrained;
3528 procedure Set_Extra_Formal (Id : E; V : E) is
3531 end Set_Extra_Formal;
3533 procedure Set_Extra_Formals (Id : E; V : E) is
3536 (Is_Overloadable (Id)
3537 or else Ekind_In (Id, E_Entry_Family,
3539 E_Subprogram_Type));
3541 end Set_Extra_Formals;
3543 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3546 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3547 Set_Flag229 (Id, V);
3548 end Set_Can_Use_Internal_Rep;
3550 procedure Set_Finalization_Master (Id : E; V : E) is
3552 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3554 end Set_Finalization_Master;
3556 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3558 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3559 Set_Flag158 (Id, V);
3560 end Set_Finalize_Storage_Only;
3562 procedure Set_Finalizer (Id : E; V : E) is
3565 (Ekind (Id) = E_Package
3566 or else Ekind (Id) = E_Package_Body);
3570 procedure Set_First_Entity (Id : E; V : E) is
3573 end Set_First_Entity;
3575 procedure Set_First_Exit_Statement (Id : E; V : N) is
3577 pragma Assert (Ekind (Id) = E_Loop);
3579 end Set_First_Exit_Statement;
3581 procedure Set_First_Index (Id : E; V : N) is
3583 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3585 end Set_First_Index;
3587 procedure Set_First_Literal (Id : E; V : E) is
3589 pragma Assert (Is_Enumeration_Type (Id));
3591 end Set_First_Literal;
3593 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3595 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3597 end Set_First_Optional_Parameter;
3599 procedure Set_First_Private_Entity (Id : E; V : E) is
3601 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3602 or else Ekind (Id) in Concurrent_Kind);
3604 end Set_First_Private_Entity;
3606 procedure Set_First_Rep_Item (Id : E; V : N) is
3609 end Set_First_Rep_Item;
3611 procedure Set_Float_Rep (Id : E; V : F) is
3612 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3614 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3617 procedure Set_Freeze_Node (Id : E; V : N) is
3620 end Set_Freeze_Node;
3622 procedure Set_From_With_Type (Id : E; V : B := True) is
3626 or else Ekind (Id) = E_Package);
3627 Set_Flag159 (Id, V);
3628 end Set_From_With_Type;
3630 procedure Set_Full_View (Id : E; V : E) is
3632 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3636 procedure Set_Generic_Homonym (Id : E; V : E) is
3639 end Set_Generic_Homonym;
3641 procedure Set_Generic_Renamings (Id : E; V : L) is
3643 Set_Elist23 (Id, V);
3644 end Set_Generic_Renamings;
3646 procedure Set_Handler_Records (Id : E; V : S) is
3649 end Set_Handler_Records;
3651 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3653 pragma Assert (Id = Base_Type (Id));
3654 Set_Flag135 (Id, V);
3655 end Set_Has_Aliased_Components;
3657 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3660 end Set_Has_Alignment_Clause;
3662 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3665 end Set_Has_All_Calls_Remote;
3667 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3669 Set_Flag201 (Id, V);
3670 end Set_Has_Anon_Block_Suffix;
3672 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3675 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3676 Set_Flag253 (Id, V);
3677 end Set_Has_Anonymous_Master;
3679 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3681 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3683 end Set_Has_Atomic_Components;
3685 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3688 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3689 Set_Flag139 (Id, V);
3690 end Set_Has_Biased_Representation;
3692 procedure Set_Has_Completion (Id : E; V : B := True) is
3695 end Set_Has_Completion;
3697 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3699 pragma Assert (Is_Type (Id));
3701 end Set_Has_Completion_In_Body;
3703 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3705 pragma Assert (Ekind (Id) = E_Record_Type);
3706 Set_Flag140 (Id, V);
3707 end Set_Has_Complex_Representation;
3709 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3711 pragma Assert (Ekind (Id) = E_Array_Type);
3713 end Set_Has_Component_Size_Clause;
3715 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3717 pragma Assert (Is_Type (Id));
3718 Set_Flag187 (Id, V);
3719 end Set_Has_Constrained_Partial_View;
3721 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3723 Set_Flag181 (Id, V);
3724 end Set_Has_Contiguous_Rep;
3726 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3728 pragma Assert (Id = Base_Type (Id));
3730 end Set_Has_Controlled_Component;
3732 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3735 end Set_Has_Controlling_Result;
3737 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3739 Set_Flag119 (Id, V);
3740 end Set_Has_Convention_Pragma;
3742 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3745 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3746 and then Is_Base_Type (Id));
3748 end Set_Has_Default_Aspect;
3750 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3752 pragma Assert (Nkind (Id) in N_Entity);
3753 Set_Flag200 (Id, V);
3754 end Set_Has_Delayed_Aspects;
3756 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3758 pragma Assert (Nkind (Id) in N_Entity);
3760 end Set_Has_Delayed_Freeze;
3762 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3764 pragma Assert (Nkind (Id) in N_Entity);
3766 end Set_Has_Discriminants;
3768 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3770 pragma Assert (Ekind (Id) = E_Record_Type
3771 and then Is_Tagged_Type (Id));
3772 Set_Flag220 (Id, V);
3773 end Set_Has_Dispatch_Table;
3775 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3777 pragma Assert (Is_Enumeration_Type (Id));
3779 end Set_Has_Enumeration_Rep_Clause;
3781 procedure Set_Has_Exit (Id : E; V : B := True) is
3786 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3788 pragma Assert (Is_Tagged_Type (Id));
3789 Set_Flag110 (Id, V);
3790 end Set_Has_External_Tag_Rep_Clause;
3792 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3794 Set_Flag175 (Id, V);
3795 end Set_Has_Forward_Instantiation;
3797 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3799 Set_Flag173 (Id, V);
3800 end Set_Has_Fully_Qualified_Name;
3802 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3805 end Set_Has_Gigi_Rep_Item;
3807 procedure Set_Has_Homonym (Id : E; V : B := True) is
3810 end Set_Has_Homonym;
3812 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
3814 Set_Flag251 (Id, V);
3815 end Set_Has_Implicit_Dereference;
3817 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3819 pragma Assert (Is_Type (Id));
3820 Set_Flag248 (Id, V);
3821 end Set_Has_Inheritable_Invariants;
3823 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3825 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3826 Set_Flag219 (Id, V);
3827 end Set_Has_Initial_Value;
3829 procedure Set_Has_Invariants (Id : E; V : B := True) is
3831 pragma Assert (Is_Type (Id)
3832 or else Ekind (Id) = E_Procedure
3833 or else Ekind (Id) = E_Void);
3834 Set_Flag232 (Id, V);
3835 end Set_Has_Invariants;
3837 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3839 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3841 end Set_Has_Machine_Radix_Clause;
3843 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3846 end Set_Has_Master_Entity;
3848 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3850 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3851 Set_Flag142 (Id, V);
3852 end Set_Has_Missing_Return;
3854 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3856 Set_Flag101 (Id, V);
3857 end Set_Has_Nested_Block_With_Handler;
3859 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3861 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3862 Set_Flag215 (Id, V);
3863 end Set_Has_Up_Level_Access;
3865 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3867 pragma Assert (Id = Base_Type (Id));
3869 end Set_Has_Non_Standard_Rep;
3871 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3873 pragma Assert (Is_Type (Id));
3874 Set_Flag172 (Id, V);
3875 end Set_Has_Object_Size_Clause;
3877 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3879 Set_Flag154 (Id, V);
3880 end Set_Has_Per_Object_Constraint;
3882 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3884 Set_Flag188 (Id, V);
3885 end Set_Has_Persistent_BSS;
3887 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3889 pragma Assert (Is_Subprogram (Id));
3890 Set_Flag240 (Id, V);
3891 end Set_Has_Postconditions;
3893 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3895 pragma Assert (Is_Access_Type (Id));
3896 Set_Flag27 (Base_Type (Id), V);
3897 end Set_Has_Pragma_Controlled;
3899 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3901 Set_Flag150 (Id, V);
3902 end Set_Has_Pragma_Elaborate_Body;
3904 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3906 Set_Flag157 (Id, V);
3907 end Set_Has_Pragma_Inline;
3909 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3911 Set_Flag230 (Id, V);
3912 end Set_Has_Pragma_Inline_Always;
3914 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3916 pragma Assert (Is_Enumeration_Type (Id));
3917 pragma Assert (Id = Base_Type (Id));
3918 Set_Flag198 (Id, V);
3919 end Set_Has_Pragma_Ordered;
3921 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3923 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3924 pragma Assert (Id = Base_Type (Id));
3925 Set_Flag121 (Id, V);
3926 end Set_Has_Pragma_Pack;
3928 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3930 Set_Flag221 (Id, V);
3931 end Set_Has_Pragma_Preelab_Init;
3933 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3935 Set_Flag203 (Id, V);
3936 end Set_Has_Pragma_Pure;
3938 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3940 Set_Flag179 (Id, V);
3941 end Set_Has_Pragma_Pure_Function;
3943 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3945 Set_Flag169 (Id, V);
3946 end Set_Has_Pragma_Thread_Local_Storage;
3948 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3950 Set_Flag233 (Id, V);
3951 end Set_Has_Pragma_Unmodified;
3953 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3955 Set_Flag180 (Id, V);
3956 end Set_Has_Pragma_Unreferenced;
3958 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3960 pragma Assert (Is_Type (Id));
3961 Set_Flag212 (Id, V);
3962 end Set_Has_Pragma_Unreferenced_Objects;
3964 procedure Set_Has_Predicates (Id : E; V : B := True) is
3966 Set_Flag250 (Id, V);
3967 end Set_Has_Predicates;
3969 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3971 pragma Assert (Id = Base_Type (Id));
3972 Set_Flag120 (Id, V);
3973 end Set_Has_Primitive_Operations;
3975 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
3977 pragma Assert (Is_Type (Id));
3978 Set_Flag151 (Id, V);
3979 end Set_Has_Private_Ancestor;
3981 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3983 Set_Flag155 (Id, V);
3984 end Set_Has_Private_Declaration;
3986 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3988 Set_Flag161 (Id, V);
3989 end Set_Has_Qualified_Name;
3991 procedure Set_Has_RACW (Id : E; V : B := True) is
3993 pragma Assert (Ekind (Id) = E_Package);
3994 Set_Flag214 (Id, V);
3997 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3999 pragma Assert (Id = Base_Type (Id));
4001 end Set_Has_Record_Rep_Clause;
4003 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4005 pragma Assert (Is_Subprogram (Id));
4006 Set_Flag143 (Id, V);
4007 end Set_Has_Recursive_Call;
4009 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4012 end Set_Has_Size_Clause;
4014 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4017 end Set_Has_Small_Clause;
4019 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4021 pragma Assert (Id = Base_Type (Id));
4022 Set_Flag100 (Id, V);
4023 end Set_Has_Specified_Layout;
4025 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4027 pragma Assert (Is_Type (Id));
4028 Set_Flag190 (Id, V);
4029 end Set_Has_Specified_Stream_Input;
4031 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4033 pragma Assert (Is_Type (Id));
4034 Set_Flag191 (Id, V);
4035 end Set_Has_Specified_Stream_Output;
4037 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4039 pragma Assert (Is_Type (Id));
4040 Set_Flag192 (Id, V);
4041 end Set_Has_Specified_Stream_Read;
4043 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4045 pragma Assert (Is_Type (Id));
4046 Set_Flag193 (Id, V);
4047 end Set_Has_Specified_Stream_Write;
4049 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4051 Set_Flag211 (Id, V);
4052 end Set_Has_Static_Discriminants;
4054 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4056 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4057 pragma Assert (Id = Base_Type (Id));
4059 end Set_Has_Storage_Size_Clause;
4061 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4063 pragma Assert (Is_Elementary_Type (Id));
4064 Set_Flag184 (Id, V);
4065 end Set_Has_Stream_Size_Clause;
4067 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4070 end Set_Has_Subprogram_Descriptor;
4072 procedure Set_Has_Task (Id : E; V : B := True) is
4074 pragma Assert (Id = Base_Type (Id));
4078 procedure Set_Has_Thunks (Id : E; V : B := True) is
4080 pragma Assert (Is_Tag (Id));
4081 Set_Flag228 (Id, V);
4084 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4086 pragma Assert (Id = Base_Type (Id));
4087 Set_Flag123 (Id, V);
4088 end Set_Has_Unchecked_Union;
4090 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4092 pragma Assert (Is_Type (Id));
4094 end Set_Has_Unknown_Discriminants;
4096 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4098 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4100 end Set_Has_Volatile_Components;
4102 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4104 Set_Flag182 (Id, V);
4105 end Set_Has_Xref_Entry;
4107 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4109 pragma Assert (Ekind (Id) = E_Variable);
4111 end Set_Hiding_Loop_Variable;
4113 procedure Set_Homonym (Id : E; V : E) is
4115 pragma Assert (Id /= V);
4119 procedure Set_Interface_Alias (Id : E; V : E) is
4123 and then Is_Hidden (Id)
4124 and then (Ekind_In (Id, E_Procedure, E_Function)));
4126 end Set_Interface_Alias;
4128 procedure Set_Interfaces (Id : E; V : L) is
4130 pragma Assert (Is_Record_Type (Id));
4131 Set_Elist25 (Id, V);
4134 procedure Set_In_Package_Body (Id : E; V : B := True) is
4137 end Set_In_Package_Body;
4139 procedure Set_In_Private_Part (Id : E; V : B := True) is
4142 end Set_In_Private_Part;
4144 procedure Set_In_Use (Id : E; V : B := True) is
4146 pragma Assert (Nkind (Id) in N_Entity);
4150 procedure Set_Inner_Instances (Id : E; V : L) is
4152 Set_Elist23 (Id, V);
4153 end Set_Inner_Instances;
4155 procedure Set_Interface_Name (Id : E; V : N) is
4158 end Set_Interface_Name;
4160 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4162 pragma Assert (Is_Overloadable (Id));
4164 end Set_Is_Abstract_Subprogram;
4166 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4168 pragma Assert (Is_Type (Id));
4169 Set_Flag146 (Id, V);
4170 end Set_Is_Abstract_Type;
4172 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4174 pragma Assert (Is_Access_Type (Id));
4175 Set_Flag194 (Id, V);
4176 end Set_Is_Local_Anonymous_Access;
4178 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4180 pragma Assert (Is_Access_Type (Id));
4182 end Set_Is_Access_Constant;
4184 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4186 Set_Flag185 (Id, V);
4187 end Set_Is_Ada_2005_Only;
4189 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4191 Set_Flag199 (Id, V);
4192 end Set_Is_Ada_2012_Only;
4194 procedure Set_Is_Aliased (Id : E; V : B := True) is
4196 pragma Assert (Nkind (Id) in N_Entity);
4200 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4202 pragma Assert (Is_Entry (Id));
4203 Set_Flag132 (Id, V);
4204 end Set_Is_AST_Entry;
4206 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4209 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4211 end Set_Is_Asynchronous;
4213 procedure Set_Is_Atomic (Id : E; V : B := True) is
4218 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4220 pragma Assert ((not V)
4221 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4222 Set_Flag122 (Id, V);
4223 end Set_Is_Bit_Packed_Array;
4225 procedure Set_Is_Called (Id : E; V : B := True) is
4227 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4228 Set_Flag102 (Id, V);
4231 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4234 end Set_Is_Character_Type;
4236 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4239 end Set_Is_Child_Unit;
4241 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4244 end Set_Is_Class_Wide_Equivalent_Type;
4246 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4248 Set_Flag149 (Id, V);
4249 end Set_Is_Compilation_Unit;
4251 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4253 pragma Assert (Ekind (Id) = E_Discriminant);
4254 Set_Flag103 (Id, V);
4255 end Set_Is_Completely_Hidden;
4257 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4260 end Set_Is_Concurrent_Record_Type;
4262 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4265 end Set_Is_Constr_Subt_For_U_Nominal;
4267 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4269 Set_Flag141 (Id, V);
4270 end Set_Is_Constr_Subt_For_UN_Aliased;
4272 procedure Set_Is_Constrained (Id : E; V : B := True) is
4274 pragma Assert (Nkind (Id) in N_Entity);
4276 end Set_Is_Constrained;
4278 procedure Set_Is_Constructor (Id : E; V : B := True) is
4281 end Set_Is_Constructor;
4283 procedure Set_Is_Controlled (Id : E; V : B := True) is
4285 pragma Assert (Id = Base_Type (Id));
4287 end Set_Is_Controlled;
4289 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4291 pragma Assert (Is_Formal (Id));
4293 end Set_Is_Controlling_Formal;
4295 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4298 end Set_Is_CPP_Class;
4300 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4302 pragma Assert (Is_Type (Id));
4303 Set_Flag223 (Id, V);
4304 end Set_Is_Descendent_Of_Address;
4306 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4308 Set_Flag176 (Id, V);
4309 end Set_Is_Discrim_SO_Function;
4311 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4313 Set_Flag234 (Id, V);
4314 end Set_Is_Dispatch_Table_Entity;
4316 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4321 Is_Overloadable (Id)
4323 Ekind (Id) = E_Subprogram_Type);
4326 end Set_Is_Dispatching_Operation;
4328 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4330 Set_Flag124 (Id, V);
4331 end Set_Is_Eliminated;
4333 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4336 end Set_Is_Entry_Formal;
4338 procedure Set_Is_Exported (Id : E; V : B := True) is
4341 end Set_Is_Exported;
4343 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4346 end Set_Is_First_Subtype;
4348 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4350 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4351 Set_Flag118 (Id, V);
4352 end Set_Is_For_Access_Subtype;
4354 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4356 Set_Flag111 (Id, V);
4357 end Set_Is_Formal_Subprogram;
4359 procedure Set_Is_Frozen (Id : E; V : B := True) is
4361 pragma Assert (Nkind (Id) in N_Entity);
4365 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4367 pragma Assert (Is_Type (Id));
4369 end Set_Is_Generic_Actual_Type;
4371 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4373 Set_Flag130 (Id, V);
4374 end Set_Is_Generic_Instance;
4376 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4378 pragma Assert (Nkind (Id) in N_Entity);
4380 end Set_Is_Generic_Type;
4382 procedure Set_Is_Hidden (Id : E; V : B := True) is
4387 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4389 Set_Flag171 (Id, V);
4390 end Set_Is_Hidden_Open_Scope;
4392 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4394 pragma Assert (Nkind (Id) in N_Entity);
4396 end Set_Is_Immediately_Visible;
4398 procedure Set_Is_Imported (Id : E; V : B := True) is
4401 end Set_Is_Imported;
4403 procedure Set_Is_Inlined (Id : E; V : B := True) is
4408 procedure Set_Is_Interface (Id : E; V : B := True) is
4410 pragma Assert (Is_Record_Type (Id));
4411 Set_Flag186 (Id, V);
4412 end Set_Is_Interface;
4414 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4416 Set_Flag126 (Id, V);
4417 end Set_Is_Instantiated;
4419 procedure Set_Is_Internal (Id : E; V : B := True) is
4421 pragma Assert (Nkind (Id) in N_Entity);
4423 end Set_Is_Internal;
4425 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4427 pragma Assert (Nkind (Id) in N_Entity);
4429 end Set_Is_Interrupt_Handler;
4431 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4434 end Set_Is_Intrinsic_Subprogram;
4436 procedure Set_Is_Itype (Id : E; V : B := True) is
4441 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4444 end Set_Is_Known_Non_Null;
4446 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4448 Set_Flag204 (Id, V);
4449 end Set_Is_Known_Null;
4451 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4453 Set_Flag170 (Id, V);
4454 end Set_Is_Known_Valid;
4456 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4458 pragma Assert (Is_Type (Id));
4459 Set_Flag106 (Id, V);
4460 end Set_Is_Limited_Composite;
4462 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4464 pragma Assert (Is_Interface (Id));
4465 Set_Flag197 (Id, V);
4466 end Set_Is_Limited_Interface;
4468 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4471 end Set_Is_Limited_Record;
4473 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4475 pragma Assert (Is_Subprogram (Id));
4476 Set_Flag137 (Id, V);
4477 end Set_Is_Machine_Code_Subprogram;
4479 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4481 pragma Assert (Is_Type (Id));
4482 Set_Flag109 (Id, V);
4483 end Set_Is_Non_Static_Subtype;
4485 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4487 pragma Assert (Ekind (Id) = E_Procedure);
4488 Set_Flag178 (Id, V);
4489 end Set_Is_Null_Init_Proc;
4491 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4493 Set_Flag153 (Id, V);
4494 end Set_Is_Obsolescent;
4496 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4498 pragma Assert (Ekind (Id) = E_Out_Parameter);
4499 Set_Flag226 (Id, V);
4500 end Set_Is_Only_Out_Parameter;
4502 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4504 pragma Assert (Is_Formal (Id));
4505 Set_Flag134 (Id, V);
4506 end Set_Is_Optional_Parameter;
4508 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4510 Set_Flag160 (Id, V);
4511 end Set_Is_Package_Body_Entity;
4513 procedure Set_Is_Packed (Id : E; V : B := True) is
4515 pragma Assert (Id = Base_Type (Id));
4519 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4521 Set_Flag138 (Id, V);
4522 end Set_Is_Packed_Array_Type;
4524 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4526 pragma Assert (Nkind (Id) in N_Entity);
4528 end Set_Is_Potentially_Use_Visible;
4530 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4533 end Set_Is_Preelaborated;
4535 procedure Set_Is_Primitive (Id : E; V : B := True) is
4538 (Is_Overloadable (Id)
4539 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4540 Set_Flag218 (Id, V);
4541 end Set_Is_Primitive;
4543 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4545 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4546 Set_Flag195 (Id, V);
4547 end Set_Is_Primitive_Wrapper;
4549 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4551 pragma Assert (Is_Type (Id));
4552 Set_Flag107 (Id, V);
4553 end Set_Is_Private_Composite;
4555 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4558 end Set_Is_Private_Descendant;
4560 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4562 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4563 Set_Flag245 (Id, V);
4564 end Set_Is_Private_Primitive;
4566 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4568 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4569 Set_Flag252 (Id, V);
4570 end Set_Is_Processed_Transient;
4572 procedure Set_Is_Public (Id : E; V : B := True) is
4574 pragma Assert (Nkind (Id) in N_Entity);
4578 procedure Set_Is_Pure (Id : E; V : B := True) is
4583 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4585 pragma Assert (Is_Access_Type (Id));
4586 Set_Flag189 (Id, V);
4587 end Set_Is_Pure_Unit_Access_Type;
4589 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4591 pragma Assert (Is_Type (Id));
4592 Set_Flag244 (Id, V);
4593 end Set_Is_RACW_Stub_Type;
4595 procedure Set_Is_Raised (Id : E; V : B := True) is
4597 pragma Assert (Ekind (Id) = E_Exception);
4598 Set_Flag224 (Id, V);
4601 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4604 end Set_Is_Remote_Call_Interface;
4606 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4609 end Set_Is_Remote_Types;
4611 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4613 Set_Flag112 (Id, V);
4614 end Set_Is_Renaming_Of_Object;
4616 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4618 Set_Flag209 (Id, V);
4619 end Set_Is_Return_Object;
4621 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4623 pragma Assert (Ekind (Id) = E_Variable);
4624 Set_Flag249 (Id, V);
4625 end Set_Is_Safe_To_Reevaluate;
4627 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4630 end Set_Is_Shared_Passive;
4632 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4636 or else Ekind_In (Id, E_Exception,
4641 end Set_Is_Statically_Allocated;
4643 procedure Set_Is_Tag (Id : E; V : B := True) is
4645 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4649 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4652 end Set_Is_Tagged_Type;
4654 procedure Set_Is_Thunk (Id : E; V : B := True) is
4656 Set_Flag225 (Id, V);
4659 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4661 Set_Flag235 (Id, V);
4662 end Set_Is_Trivial_Subprogram;
4664 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4666 Set_Flag163 (Id, V);
4667 end Set_Is_True_Constant;
4669 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4671 pragma Assert (Id = Base_Type (Id));
4672 Set_Flag117 (Id, V);
4673 end Set_Is_Unchecked_Union;
4675 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4677 pragma Assert (Ekind (Id) = E_Record_Type);
4678 Set_Flag246 (Id, V);
4679 end Set_Is_Underlying_Record_View;
4681 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4683 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4684 Set_Flag144 (Id, V);
4685 end Set_Is_Unsigned_Type;
4687 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4689 pragma Assert (Ekind (Id) = E_Procedure);
4690 Set_Flag127 (Id, V);
4691 end Set_Is_Valued_Procedure;
4693 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4695 pragma Assert (Is_Child_Unit (Id));
4696 Set_Flag116 (Id, V);
4697 end Set_Is_Visible_Child_Unit;
4699 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4701 Set_Flag206 (Id, V);
4702 end Set_Is_Visible_Formal;
4704 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4706 pragma Assert (Ekind (Id) = E_Exception);
4707 Set_Flag133 (Id, V);
4708 end Set_Is_VMS_Exception;
4710 procedure Set_Is_Volatile (Id : E; V : B := True) is
4712 pragma Assert (Nkind (Id) in N_Entity);
4714 end Set_Is_Volatile;
4716 procedure Set_Itype_Printed (Id : E; V : B := True) is
4718 pragma Assert (Is_Itype (Id));
4719 Set_Flag202 (Id, V);
4720 end Set_Itype_Printed;
4722 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4725 end Set_Kill_Elaboration_Checks;
4727 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4730 end Set_Kill_Range_Checks;
4732 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4735 end Set_Kill_Tag_Checks;
4737 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4739 pragma Assert (Is_Type (Id));
4740 Set_Flag207 (Id, V);
4741 end Set_Known_To_Have_Preelab_Init;
4743 procedure Set_Last_Assignment (Id : E; V : N) is
4745 pragma Assert (Is_Assignable (Id));
4747 end Set_Last_Assignment;
4749 procedure Set_Last_Entity (Id : E; V : E) is
4752 end Set_Last_Entity;
4754 procedure Set_Limited_View (Id : E; V : E) is
4756 pragma Assert (Ekind (Id) = E_Package);
4758 end Set_Limited_View;
4760 procedure Set_Lit_Indexes (Id : E; V : E) is
4762 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4764 end Set_Lit_Indexes;
4766 procedure Set_Lit_Strings (Id : E; V : E) is
4768 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4770 end Set_Lit_Strings;
4772 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4774 pragma Assert (Is_Formal (Id));
4775 Set_Flag205 (Id, V);
4776 end Set_Low_Bound_Tested;
4778 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4780 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4782 end Set_Machine_Radix_10;
4784 procedure Set_Master_Id (Id : E; V : E) is
4786 pragma Assert (Is_Access_Type (Id));
4790 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4792 Set_Flag168 (Id, V);
4793 end Set_Materialize_Entity;
4795 procedure Set_Mechanism (Id : E; V : M) is
4797 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4798 Set_Uint8 (Id, UI_From_Int (V));
4801 procedure Set_Modulus (Id : E; V : U) is
4803 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4807 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4809 pragma Assert (Is_Type (Id));
4810 Set_Flag183 (Id, V);
4811 end Set_Must_Be_On_Byte_Boundary;
4813 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4815 pragma Assert (Is_Type (Id));
4816 Set_Flag208 (Id, V);
4817 end Set_Must_Have_Preelab_Init;
4819 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4821 Set_Flag147 (Id, V);
4822 end Set_Needs_Debug_Info;
4824 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4827 (Is_Overloadable (Id)
4828 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4830 end Set_Needs_No_Actuals;
4832 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4834 Set_Flag115 (Id, V);
4835 end Set_Never_Set_In_Source;
4837 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4840 end Set_Next_Inlined_Subprogram;
4842 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4844 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4845 Set_Flag131 (Id, V);
4846 end Set_No_Pool_Assigned;
4848 procedure Set_No_Return (Id : E; V : B := True) is
4851 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4852 Set_Flag113 (Id, V);
4855 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4857 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4858 Set_Flag136 (Id, V);
4859 end Set_No_Strict_Aliasing;
4861 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4863 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4865 end Set_Non_Binary_Modulus;
4867 procedure Set_Non_Limited_View (Id : E; V : E) is
4869 pragma Assert (Ekind (Id) in Incomplete_Kind);
4871 end Set_Non_Limited_View;
4873 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4876 (Root_Type (Id) = Standard_Boolean
4877 and then Ekind (Id) = E_Enumeration_Type);
4878 Set_Flag162 (Id, V);
4879 end Set_Nonzero_Is_True;
4881 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4883 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4885 end Set_Normalized_First_Bit;
4887 procedure Set_Normalized_Position (Id : E; V : U) is
4889 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4891 end Set_Normalized_Position;
4893 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4895 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4897 end Set_Normalized_Position_Max;
4899 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4901 pragma Assert (Ekind (Id) = E_Variable);
4902 Set_Flag247 (Id, V);
4903 end Set_OK_To_Rename;
4905 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4908 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4909 Set_Flag239 (Id, V);
4910 end Set_OK_To_Reorder_Components;
4912 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4915 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4916 Set_Flag241 (Id, V);
4917 end Set_Optimize_Alignment_Space;
4919 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4922 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4923 Set_Flag242 (Id, V);
4924 end Set_Optimize_Alignment_Time;
4926 procedure Set_Original_Access_Type (Id : E; V : E) is
4928 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4930 end Set_Original_Access_Type;
4932 procedure Set_Original_Array_Type (Id : E; V : E) is
4934 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4936 end Set_Original_Array_Type;
4938 procedure Set_Original_Record_Component (Id : E; V : E) is
4940 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4942 end Set_Original_Record_Component;
4944 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4946 Set_Flag243 (Id, V);
4947 end Set_Overlays_Constant;
4949 procedure Set_Overridden_Operation (Id : E; V : E) is
4952 end Set_Overridden_Operation;
4954 procedure Set_Package_Instantiation (Id : E; V : N) is
4956 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4958 end Set_Package_Instantiation;
4960 procedure Set_Packed_Array_Type (Id : E; V : E) is
4962 pragma Assert (Is_Array_Type (Id));
4964 end Set_Packed_Array_Type;
4966 procedure Set_Parent_Subtype (Id : E; V : E) is
4968 pragma Assert (Ekind (Id) = E_Record_Type);
4970 end Set_Parent_Subtype;
4972 procedure Set_Postcondition_Proc (Id : E; V : E) is
4974 pragma Assert (Ekind (Id) = E_Procedure);
4976 end Set_Postcondition_Proc;
4978 procedure Set_PPC_Wrapper (Id : E; V : E) is
4980 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4982 end Set_PPC_Wrapper;
4984 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4986 pragma Assert (Is_Tagged_Type (Id));
4987 Set_Elist10 (Id, V);
4988 end Set_Direct_Primitive_Operations;
4990 procedure Set_Prival (Id : E; V : E) is
4992 pragma Assert (Is_Protected_Component (Id));
4996 procedure Set_Prival_Link (Id : E; V : E) is
4998 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5000 end Set_Prival_Link;
5002 procedure Set_Private_Dependents (Id : E; V : L) is
5004 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5005 Set_Elist18 (Id, V);
5006 end Set_Private_Dependents;
5008 procedure Set_Private_View (Id : E; V : N) is
5010 pragma Assert (Is_Private_Type (Id));
5012 end Set_Private_View;
5014 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5016 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5018 end Set_Protected_Body_Subprogram;
5020 procedure Set_Protected_Formal (Id : E; V : E) is
5022 pragma Assert (Is_Formal (Id));
5024 end Set_Protected_Formal;
5026 procedure Set_Protection_Object (Id : E; V : E) is
5028 pragma Assert (Ekind_In (Id, E_Entry,
5033 end Set_Protection_Object;
5035 procedure Set_Reachable (Id : E; V : B := True) is
5040 procedure Set_Referenced (Id : E; V : B := True) is
5042 Set_Flag156 (Id, V);
5045 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5048 end Set_Referenced_As_LHS;
5050 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5052 Set_Flag227 (Id, V);
5053 end Set_Referenced_As_Out_Parameter;
5055 procedure Set_Register_Exception_Call (Id : E; V : N) is
5057 pragma Assert (Ekind (Id) = E_Exception);
5059 end Set_Register_Exception_Call;
5061 procedure Set_Related_Array_Object (Id : E; V : E) is
5063 pragma Assert (Is_Array_Type (Id));
5065 end Set_Related_Array_Object;
5067 procedure Set_Related_Expression (Id : E; V : N) is
5069 pragma Assert (Ekind (Id) in Type_Kind
5070 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5072 end Set_Related_Expression;
5074 procedure Set_Related_Instance (Id : E; V : E) is
5076 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5078 end Set_Related_Instance;
5080 procedure Set_Related_Type (Id : E; V : E) is
5082 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5084 end Set_Related_Type;
5086 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5088 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5090 end Set_Relative_Deadline_Variable;
5092 procedure Set_Renamed_Entity (Id : E; V : N) is
5095 end Set_Renamed_Entity;
5097 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5099 pragma Assert (Ekind (Id) = E_Package);
5100 Set_Flag231 (Id, V);
5101 end Set_Renamed_In_Spec;
5103 procedure Set_Renamed_Object (Id : E; V : N) is
5106 end Set_Renamed_Object;
5108 procedure Set_Renaming_Map (Id : E; V : U) is
5111 end Set_Renaming_Map;
5113 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5115 pragma Assert (Is_Overloadable (Id));
5116 Set_Flag213 (Id, V);
5117 end Set_Requires_Overriding;
5119 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5121 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5123 end Set_Return_Flag_Or_Transient_Decl;
5125 procedure Set_Return_Present (Id : E; V : B := True) is
5128 end Set_Return_Present;
5130 procedure Set_Return_Applies_To (Id : E; V : N) is
5133 end Set_Return_Applies_To;
5135 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5138 end Set_Returns_By_Ref;
5140 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5143 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5144 Set_Flag164 (Id, V);
5145 end Set_Reverse_Bit_Order;
5147 procedure Set_RM_Size (Id : E; V : U) is
5149 pragma Assert (Is_Type (Id));
5153 procedure Set_Scalar_Range (Id : E; V : N) is
5156 end Set_Scalar_Range;
5158 procedure Set_Scale_Value (Id : E; V : U) is
5161 end Set_Scale_Value;
5163 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5165 pragma Assert (not Is_Record_Type (Id));
5167 end Set_Scope_Depth_Value;
5169 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5171 Set_Flag167 (Id, V);
5172 end Set_Sec_Stack_Needed_For_Return;
5174 procedure Set_Shadow_Entities (Id : E; V : S) is
5176 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5178 end Set_Shadow_Entities;
5180 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5182 pragma Assert (Ekind (Id) = E_Variable);
5184 end Set_Shared_Var_Procs_Instance;
5186 procedure Set_Size_Check_Code (Id : E; V : N) is
5188 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5190 end Set_Size_Check_Code;
5192 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5194 Set_Flag177 (Id, V);
5195 end Set_Size_Depends_On_Discriminant;
5197 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5200 end Set_Size_Known_At_Compile_Time;
5202 procedure Set_Small_Value (Id : E; V : R) is
5204 pragma Assert (Is_Fixed_Point_Type (Id));
5205 Set_Ureal21 (Id, V);
5206 end Set_Small_Value;
5208 procedure Set_Spec_Entity (Id : E; V : E) is
5210 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5212 end Set_Spec_Entity;
5214 procedure Set_Static_Predicate (Id : E; V : S) is
5217 (Ekind_In (Id, E_Enumeration_Subtype,
5218 E_Modular_Integer_Subtype,
5219 E_Signed_Integer_Subtype)
5220 and then Has_Predicates (Id));
5222 end Set_Static_Predicate;
5224 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5226 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5227 pragma Assert (Id = Base_Type (Id));
5229 end Set_Storage_Size_Variable;
5231 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5233 pragma Assert (Ekind (Id) = E_Package);
5235 end Set_Static_Elaboration_Desired;
5237 procedure Set_Static_Initialization (Id : E; V : N) is
5240 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5242 end Set_Static_Initialization;
5244 procedure Set_Stored_Constraint (Id : E; V : L) is
5246 pragma Assert (Nkind (Id) in N_Entity);
5247 Set_Elist23 (Id, V);
5248 end Set_Stored_Constraint;
5250 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5252 pragma Assert (Id = Base_Type (Id));
5253 Set_Flag145 (Id, V);
5254 end Set_Strict_Alignment;
5256 procedure Set_String_Literal_Length (Id : E; V : U) is
5258 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5260 end Set_String_Literal_Length;
5262 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5264 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5266 end Set_String_Literal_Low_Bound;
5268 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5270 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5272 end Set_Subprograms_For_Type;
5274 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5276 Set_Flag148 (Id, V);
5277 end Set_Suppress_Elaboration_Warnings;
5279 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5281 pragma Assert (Is_Type (Id));
5282 Set_Flag105 (Id, V);
5283 end Set_Suppress_Initialization;
5285 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5287 Set_Flag165 (Id, V);
5288 end Set_Suppress_Style_Checks;
5290 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5292 Set_Flag217 (Id, V);
5293 end Set_Suppress_Value_Tracking_On_Call;
5295 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5297 pragma Assert (Ekind (Id) in Task_Kind);
5299 end Set_Task_Body_Procedure;
5301 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5304 end Set_Treat_As_Volatile;
5306 procedure Set_Underlying_Full_View (Id : E; V : E) is
5308 pragma Assert (Ekind (Id) in Private_Kind);
5310 end Set_Underlying_Full_View;
5312 procedure Set_Underlying_Record_View (Id : E; V : E) is
5314 pragma Assert (Ekind (Id) = E_Record_Type);
5316 end Set_Underlying_Record_View;
5318 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5320 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5321 Set_Flag216 (Id, V);
5322 end Set_Universal_Aliasing;
5324 procedure Set_Unset_Reference (Id : E; V : N) is
5327 end Set_Unset_Reference;
5329 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5332 end Set_Uses_Sec_Stack;
5334 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5336 Set_Flag222 (Id, V);
5337 end Set_Used_As_Generic_Actual;
5339 procedure Set_Warnings_Off (Id : E; V : B := True) is
5342 end Set_Warnings_Off;
5344 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5346 Set_Flag236 (Id, V);
5347 end Set_Warnings_Off_Used;
5349 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5351 Set_Flag237 (Id, V);
5352 end Set_Warnings_Off_Used_Unmodified;
5354 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5356 Set_Flag238 (Id, V);
5357 end Set_Warnings_Off_Used_Unreferenced;
5359 procedure Set_Was_Hidden (Id : E; V : B := True) is
5361 Set_Flag196 (Id, V);
5364 procedure Set_Wrapped_Entity (Id : E; V : E) is
5366 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5367 and then Is_Primitive_Wrapper (Id));
5369 end Set_Wrapped_Entity;
5371 -----------------------------------
5372 -- Field Initialization Routines --
5373 -----------------------------------
5375 procedure Init_Alignment (Id : E) is
5377 Set_Uint14 (Id, Uint_0);
5380 procedure Init_Alignment (Id : E; V : Int) is
5382 Set_Uint14 (Id, UI_From_Int (V));
5385 procedure Init_Component_Bit_Offset (Id : E) is
5387 Set_Uint11 (Id, No_Uint);
5388 end Init_Component_Bit_Offset;
5390 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5392 Set_Uint11 (Id, UI_From_Int (V));
5393 end Init_Component_Bit_Offset;
5395 procedure Init_Component_Size (Id : E) is
5397 Set_Uint22 (Id, Uint_0);
5398 end Init_Component_Size;
5400 procedure Init_Component_Size (Id : E; V : Int) is
5402 Set_Uint22 (Id, UI_From_Int (V));
5403 end Init_Component_Size;
5405 procedure Init_Digits_Value (Id : E) is
5407 Set_Uint17 (Id, Uint_0);
5408 end Init_Digits_Value;
5410 procedure Init_Digits_Value (Id : E; V : Int) is
5412 Set_Uint17 (Id, UI_From_Int (V));
5413 end Init_Digits_Value;
5415 procedure Init_Esize (Id : E) is
5417 Set_Uint12 (Id, Uint_0);
5420 procedure Init_Esize (Id : E; V : Int) is
5422 Set_Uint12 (Id, UI_From_Int (V));
5425 procedure Init_Normalized_First_Bit (Id : E) is
5427 Set_Uint8 (Id, No_Uint);
5428 end Init_Normalized_First_Bit;
5430 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5432 Set_Uint8 (Id, UI_From_Int (V));
5433 end Init_Normalized_First_Bit;
5435 procedure Init_Normalized_Position (Id : E) is
5437 Set_Uint14 (Id, No_Uint);
5438 end Init_Normalized_Position;
5440 procedure Init_Normalized_Position (Id : E; V : Int) is
5442 Set_Uint14 (Id, UI_From_Int (V));
5443 end Init_Normalized_Position;
5445 procedure Init_Normalized_Position_Max (Id : E) is
5447 Set_Uint10 (Id, No_Uint);
5448 end Init_Normalized_Position_Max;
5450 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5452 Set_Uint10 (Id, UI_From_Int (V));
5453 end Init_Normalized_Position_Max;
5455 procedure Init_RM_Size (Id : E) is
5457 Set_Uint13 (Id, Uint_0);
5460 procedure Init_RM_Size (Id : E; V : Int) is
5462 Set_Uint13 (Id, UI_From_Int (V));
5465 -----------------------------
5466 -- Init_Component_Location --
5467 -----------------------------
5469 procedure Init_Component_Location (Id : E) is
5471 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5472 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5473 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5474 Set_Uint12 (Id, Uint_0); -- Esize
5475 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5476 end Init_Component_Location;
5478 ----------------------------
5479 -- Init_Object_Size_Align --
5480 ----------------------------
5482 procedure Init_Object_Size_Align (Id : E) is
5484 Set_Uint12 (Id, Uint_0); -- Esize
5485 Set_Uint14 (Id, Uint_0); -- Alignment
5486 end Init_Object_Size_Align;
5492 procedure Init_Size (Id : E; V : Int) is
5494 pragma Assert (not Is_Object (Id));
5495 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5496 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5499 ---------------------
5500 -- Init_Size_Align --
5501 ---------------------
5503 procedure Init_Size_Align (Id : E) is
5505 pragma Assert (not Is_Object (Id));
5506 Set_Uint12 (Id, Uint_0); -- Esize
5507 Set_Uint13 (Id, Uint_0); -- RM_Size
5508 Set_Uint14 (Id, Uint_0); -- Alignment
5509 end Init_Size_Align;
5511 ----------------------------------------------
5512 -- Type Representation Attribute Predicates --
5513 ----------------------------------------------
5515 function Known_Alignment (E : Entity_Id) return B is
5517 return Uint14 (E) /= Uint_0
5518 and then Uint14 (E) /= No_Uint;
5519 end Known_Alignment;
5521 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5523 return Uint11 (E) /= No_Uint;
5524 end Known_Component_Bit_Offset;
5526 function Known_Component_Size (E : Entity_Id) return B is
5528 return Uint22 (Base_Type (E)) /= Uint_0
5529 and then Uint22 (Base_Type (E)) /= No_Uint;
5530 end Known_Component_Size;
5532 function Known_Esize (E : Entity_Id) return B is
5534 return Uint12 (E) /= Uint_0
5535 and then Uint12 (E) /= No_Uint;
5538 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5540 return Uint8 (E) /= No_Uint;
5541 end Known_Normalized_First_Bit;
5543 function Known_Normalized_Position (E : Entity_Id) return B is
5545 return Uint14 (E) /= No_Uint;
5546 end Known_Normalized_Position;
5548 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5550 return Uint10 (E) /= No_Uint;
5551 end Known_Normalized_Position_Max;
5553 function Known_RM_Size (E : Entity_Id) return B is
5555 return Uint13 (E) /= No_Uint
5556 and then (Uint13 (E) /= Uint_0
5557 or else Is_Discrete_Type (E)
5558 or else Is_Fixed_Point_Type (E));
5561 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5563 return Uint11 (E) /= No_Uint
5564 and then Uint11 (E) >= Uint_0;
5565 end Known_Static_Component_Bit_Offset;
5567 function Known_Static_Component_Size (E : Entity_Id) return B is
5569 return Uint22 (Base_Type (E)) > Uint_0;
5570 end Known_Static_Component_Size;
5572 function Known_Static_Esize (E : Entity_Id) return B is
5574 return Uint12 (E) > Uint_0
5575 and then not Is_Generic_Type (E);
5576 end Known_Static_Esize;
5578 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5580 return Uint8 (E) /= No_Uint
5581 and then Uint8 (E) >= Uint_0;
5582 end Known_Static_Normalized_First_Bit;
5584 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5586 return Uint14 (E) /= No_Uint
5587 and then Uint14 (E) >= Uint_0;
5588 end Known_Static_Normalized_Position;
5590 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5592 return Uint10 (E) /= No_Uint
5593 and then Uint10 (E) >= Uint_0;
5594 end Known_Static_Normalized_Position_Max;
5596 function Known_Static_RM_Size (E : Entity_Id) return B is
5598 return (Uint13 (E) > Uint_0
5599 or else Is_Discrete_Type (E)
5600 or else Is_Fixed_Point_Type (E))
5601 and then not Is_Generic_Type (E);
5602 end Known_Static_RM_Size;
5604 function Unknown_Alignment (E : Entity_Id) return B is
5606 return Uint14 (E) = Uint_0
5607 or else Uint14 (E) = No_Uint;
5608 end Unknown_Alignment;
5610 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5612 return Uint11 (E) = No_Uint;
5613 end Unknown_Component_Bit_Offset;
5615 function Unknown_Component_Size (E : Entity_Id) return B is
5617 return Uint22 (Base_Type (E)) = Uint_0
5619 Uint22 (Base_Type (E)) = No_Uint;
5620 end Unknown_Component_Size;
5622 function Unknown_Esize (E : Entity_Id) return B is
5624 return Uint12 (E) = No_Uint
5626 Uint12 (E) = Uint_0;
5629 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5631 return Uint8 (E) = No_Uint;
5632 end Unknown_Normalized_First_Bit;
5634 function Unknown_Normalized_Position (E : Entity_Id) return B is
5636 return Uint14 (E) = No_Uint;
5637 end Unknown_Normalized_Position;
5639 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5641 return Uint10 (E) = No_Uint;
5642 end Unknown_Normalized_Position_Max;
5644 function Unknown_RM_Size (E : Entity_Id) return B is
5646 return (Uint13 (E) = Uint_0
5647 and then not Is_Discrete_Type (E)
5648 and then not Is_Fixed_Point_Type (E))
5649 or else Uint13 (E) = No_Uint;
5650 end Unknown_RM_Size;
5652 --------------------
5653 -- Address_Clause --
5654 --------------------
5656 function Address_Clause (Id : E) return N is
5658 return Rep_Clause (Id, Name_Address);
5665 function Aft_Value (Id : E) return U is
5667 Delta_Val : Ureal := Delta_Value (Id);
5669 while Delta_Val < Ureal_Tenth loop
5670 Delta_Val := Delta_Val * Ureal_10;
5671 Result := Result + 1;
5674 return UI_From_Int (Result);
5677 ----------------------
5678 -- Alignment_Clause --
5679 ----------------------
5681 function Alignment_Clause (Id : E) return N is
5683 return Rep_Clause (Id, Name_Alignment);
5684 end Alignment_Clause;
5690 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5692 if Last_Entity (V) = Empty then
5693 Set_First_Entity (Id => V, V => Id);
5695 Set_Next_Entity (Last_Entity (V), Id);
5698 Set_Next_Entity (Id, Empty);
5700 Set_Last_Entity (Id => V, V => Id);
5707 function Base_Type (Id : E) return E is
5709 if Is_Base_Type (Id) then
5712 pragma Assert (Is_Type (Id));
5717 -------------------------
5718 -- Component_Alignment --
5719 -------------------------
5721 -- Component Alignment is encoded using two flags, Flag128/129 as
5722 -- follows. Note that both flags False = Align_Default, so that the
5723 -- default initialization of flags to False initializes component
5724 -- alignment to the default value as required.
5726 -- Flag128 Flag129 Value
5727 -- ------- ------- -----
5728 -- False False Calign_Default
5729 -- False True Calign_Component_Size
5730 -- True False Calign_Component_Size_4
5731 -- True True Calign_Storage_Unit
5733 function Component_Alignment (Id : E) return C is
5734 BT : constant Node_Id := Base_Type (Id);
5737 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5739 if Flag128 (BT) then
5740 if Flag129 (BT) then
5741 return Calign_Storage_Unit;
5743 return Calign_Component_Size_4;
5747 if Flag129 (BT) then
5748 return Calign_Component_Size;
5750 return Calign_Default;
5753 end Component_Alignment;
5755 ----------------------
5756 -- Declaration_Node --
5757 ----------------------
5759 function Declaration_Node (Id : E) return N is
5763 if Ekind (Id) = E_Incomplete_Type
5764 and then Present (Full_View (Id))
5766 P := Parent (Full_View (Id));
5772 if Nkind (P) /= N_Selected_Component
5773 and then Nkind (P) /= N_Expanded_Name
5775 not (Nkind (P) = N_Defining_Program_Unit_Name
5776 and then Is_Child_Unit (Id))
5783 end Declaration_Node;
5785 ---------------------
5786 -- Designated_Type --
5787 ---------------------
5789 function Designated_Type (Id : E) return E is
5793 Desig_Type := Directly_Designated_Type (Id);
5795 if Ekind (Desig_Type) = E_Incomplete_Type
5796 and then Present (Full_View (Desig_Type))
5798 return Full_View (Desig_Type);
5800 elsif Is_Class_Wide_Type (Desig_Type)
5801 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5802 and then Present (Full_View (Etype (Desig_Type)))
5803 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5805 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5810 end Designated_Type;
5812 ----------------------
5813 -- Entry_Index_Type --
5814 ----------------------
5816 function Entry_Index_Type (Id : E) return N is
5818 pragma Assert (Ekind (Id) = E_Entry_Family);
5819 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5820 end Entry_Index_Type;
5822 ---------------------
5823 -- First_Component --
5824 ---------------------
5826 function First_Component (Id : E) return E is
5831 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5833 Comp_Id := First_Entity (Id);
5834 while Present (Comp_Id) loop
5835 exit when Ekind (Comp_Id) = E_Component;
5836 Comp_Id := Next_Entity (Comp_Id);
5840 end First_Component;
5842 -------------------------------------
5843 -- First_Component_Or_Discriminant --
5844 -------------------------------------
5846 function First_Component_Or_Discriminant (Id : E) return E is
5851 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5853 Comp_Id := First_Entity (Id);
5854 while Present (Comp_Id) loop
5855 exit when Ekind (Comp_Id) = E_Component
5857 Ekind (Comp_Id) = E_Discriminant;
5858 Comp_Id := Next_Entity (Comp_Id);
5862 end First_Component_Or_Discriminant;
5868 function First_Formal (Id : E) return E is
5873 (Is_Overloadable (Id)
5874 or else Ekind_In (Id, E_Entry_Family,
5876 E_Subprogram_Type));
5878 if Ekind (Id) = E_Enumeration_Literal then
5882 Formal := First_Entity (Id);
5884 if Present (Formal) and then Is_Formal (Formal) then
5892 ------------------------------
5893 -- First_Formal_With_Extras --
5894 ------------------------------
5896 function First_Formal_With_Extras (Id : E) return E is
5901 (Is_Overloadable (Id)
5902 or else Ekind_In (Id, E_Entry_Family,
5904 E_Subprogram_Type));
5906 if Ekind (Id) = E_Enumeration_Literal then
5910 Formal := First_Entity (Id);
5912 if Present (Formal) and then Is_Formal (Formal) then
5915 return Extra_Formals (Id); -- Empty if no extra formals
5918 end First_Formal_With_Extras;
5920 -------------------------------------
5921 -- Get_Attribute_Definition_Clause --
5922 -------------------------------------
5924 function Get_Attribute_Definition_Clause
5926 Id : Attribute_Id) return Node_Id
5931 N := First_Rep_Item (E);
5932 while Present (N) loop
5933 if Nkind (N) = N_Attribute_Definition_Clause
5934 and then Get_Attribute_Id (Chars (N)) = Id
5943 end Get_Attribute_Definition_Clause;
5949 function Get_Full_View (T : Entity_Id) return Entity_Id is
5951 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5952 return Full_View (T);
5954 elsif Is_Class_Wide_Type (T)
5955 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5956 and then Present (Full_View (Root_Type (T)))
5958 return Class_Wide_Type (Full_View (Root_Type (T)));
5965 --------------------------------------
5966 -- Get_Record_Representation_Clause --
5967 --------------------------------------
5969 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5973 N := First_Rep_Item (E);
5974 while Present (N) loop
5975 if Nkind (N) = N_Record_Representation_Clause then
5983 end Get_Record_Representation_Clause;
5985 -----------------------------
5986 -- Get_Rep_Item_For_Entity --
5987 -----------------------------
5989 function Get_Rep_Item_For_Entity
5991 Nam : Name_Id) return Node_Id
5997 N := First_Rep_Item (E);
5998 while Present (N) loop
5999 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6000 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
6002 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
6006 elsif Nkind (N) = N_Attribute_Definition_Clause
6007 and then Chars (N) = Nam
6008 and then Entity (N) = E
6012 elsif Nkind (N) = N_Aspect_Specification
6013 and then Chars (Identifier (N)) = Nam
6014 and then Entity (N) = E
6023 end Get_Rep_Item_For_Entity;
6025 --------------------
6026 -- Get_Rep_Pragma --
6027 --------------------
6029 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6033 N := First_Rep_Item (E);
6034 while Present (N) loop
6035 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6045 ------------------------
6046 -- Has_Attach_Handler --
6047 ------------------------
6049 function Has_Attach_Handler (Id : E) return B is
6053 pragma Assert (Is_Protected_Type (Id));
6055 Ritem := First_Rep_Item (Id);
6056 while Present (Ritem) loop
6057 if Nkind (Ritem) = N_Pragma
6058 and then Pragma_Name (Ritem) = Name_Attach_Handler
6062 Next_Rep_Item (Ritem);
6067 end Has_Attach_Handler;
6069 -------------------------------------
6070 -- Has_Attribute_Definition_Clause --
6071 -------------------------------------
6073 function Has_Attribute_Definition_Clause
6075 Id : Attribute_Id) return Boolean
6078 return Present (Get_Attribute_Definition_Clause (E, Id));
6079 end Has_Attribute_Definition_Clause;
6085 function Has_Entries (Id : E) return B is
6089 pragma Assert (Is_Concurrent_Type (Id));
6091 Ent := First_Entity (Id);
6092 while Present (Ent) loop
6093 if Is_Entry (Ent) then
6097 Ent := Next_Entity (Ent);
6103 ----------------------------
6104 -- Has_Foreign_Convention --
6105 ----------------------------
6107 function Has_Foreign_Convention (Id : E) return B is
6109 -- While regular Intrinsics such as the Standard operators fit in the
6110 -- "Ada" convention, those with an Interface_Name materialize GCC
6111 -- builtin imports for which Ada special treatments shouldn't apply.
6113 return Convention (Id) in Foreign_Convention
6114 or else (Convention (Id) = Convention_Intrinsic
6115 and then Present (Interface_Name (Id)));
6116 end Has_Foreign_Convention;
6118 ---------------------------
6119 -- Has_Interrupt_Handler --
6120 ---------------------------
6122 function Has_Interrupt_Handler (Id : E) return B is
6126 pragma Assert (Is_Protected_Type (Id));
6128 Ritem := First_Rep_Item (Id);
6129 while Present (Ritem) loop
6130 if Nkind (Ritem) = N_Pragma
6131 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6135 Next_Rep_Item (Ritem);
6140 end Has_Interrupt_Handler;
6142 --------------------
6143 -- Has_Rep_Pragma --
6144 --------------------
6146 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6148 return Present (Get_Rep_Pragma (E, Nam));
6151 --------------------
6152 -- Has_Unmodified --
6153 --------------------
6155 function Has_Unmodified (E : Entity_Id) return Boolean is
6157 if Has_Pragma_Unmodified (E) then
6159 elsif Warnings_Off (E) then
6160 Set_Warnings_Off_Used_Unmodified (E);
6167 ---------------------
6168 -- Has_Unreferenced --
6169 ---------------------
6171 function Has_Unreferenced (E : Entity_Id) return Boolean is
6173 if Has_Pragma_Unreferenced (E) then
6175 elsif Warnings_Off (E) then
6176 Set_Warnings_Off_Used_Unreferenced (E);
6181 end Has_Unreferenced;
6183 ----------------------
6184 -- Has_Warnings_Off --
6185 ----------------------
6187 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6189 if Warnings_Off (E) then
6190 Set_Warnings_Off_Used (E);
6195 end Has_Warnings_Off;
6197 ------------------------------
6198 -- Implementation_Base_Type --
6199 ------------------------------
6201 function Implementation_Base_Type (Id : E) return E is
6206 Bastyp := Base_Type (Id);
6208 if Is_Incomplete_Or_Private_Type (Bastyp) then
6209 Imptyp := Underlying_Type (Bastyp);
6211 -- If we have an implementation type, then just return it,
6212 -- otherwise we return the Base_Type anyway. This can only
6213 -- happen in error situations and should avoid some error bombs.
6215 if Present (Imptyp) then
6216 return Base_Type (Imptyp);
6224 end Implementation_Base_Type;
6226 -------------------------
6227 -- Invariant_Procedure --
6228 -------------------------
6230 function Invariant_Procedure (Id : E) return E is
6234 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6236 if No (Subprograms_For_Type (Id)) then
6240 S := Subprograms_For_Type (Id);
6241 while Present (S) loop
6242 if Has_Invariants (S) then
6245 S := Subprograms_For_Type (S);
6251 end Invariant_Procedure;
6257 -- Global flag table allowing rapid computation of this function
6259 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6260 (E_Enumeration_Subtype |
6262 E_Signed_Integer_Subtype |
6263 E_Modular_Integer_Subtype |
6264 E_Floating_Point_Subtype |
6265 E_Ordinary_Fixed_Point_Subtype |
6266 E_Decimal_Fixed_Point_Subtype |
6271 E_Record_Subtype_With_Private |
6272 E_Limited_Private_Subtype |
6274 E_Protected_Subtype |
6276 E_String_Literal_Subtype |
6277 E_Class_Wide_Subtype => False,
6280 function Is_Base_Type (Id : E) return Boolean is
6282 return Entity_Is_Base_Type (Ekind (Id));
6285 ---------------------
6286 -- Is_Boolean_Type --
6287 ---------------------
6289 function Is_Boolean_Type (Id : E) return B is
6291 return Root_Type (Id) = Standard_Boolean;
6292 end Is_Boolean_Type;
6294 ------------------------
6295 -- Is_Constant_Object --
6296 ------------------------
6298 function Is_Constant_Object (Id : E) return B is
6299 K : constant Entity_Kind := Ekind (Id);
6302 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6303 end Is_Constant_Object;
6305 --------------------
6306 -- Is_Discriminal --
6307 --------------------
6309 function Is_Discriminal (Id : E) return B is
6311 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6312 and then Present (Discriminal_Link (Id)));
6315 ----------------------
6316 -- Is_Dynamic_Scope --
6317 ----------------------
6319 function Is_Dynamic_Scope (Id : E) return B is
6322 Ekind (Id) = E_Block
6324 Ekind (Id) = E_Function
6326 Ekind (Id) = E_Procedure
6328 Ekind (Id) = E_Subprogram_Body
6330 Ekind (Id) = E_Task_Type
6332 (Ekind (Id) = E_Limited_Private_Type
6333 and then Present (Full_View (Id))
6334 and then Ekind (Full_View (Id)) = E_Task_Type)
6336 Ekind (Id) = E_Entry
6338 Ekind (Id) = E_Entry_Family
6340 Ekind (Id) = E_Return_Statement;
6341 end Is_Dynamic_Scope;
6343 --------------------
6344 -- Is_Entity_Name --
6345 --------------------
6347 function Is_Entity_Name (N : Node_Id) return Boolean is
6348 Kind : constant Node_Kind := Nkind (N);
6351 -- Identifiers, operator symbols, expanded names are entity names
6353 return Kind = N_Identifier
6354 or else Kind = N_Operator_Symbol
6355 or else Kind = N_Expanded_Name
6357 -- Attribute references are entity names if they refer to an entity.
6358 -- Note that we don't do this by testing for the presence of the
6359 -- Entity field in the N_Attribute_Reference node, since it may not
6360 -- have been set yet.
6362 or else (Kind = N_Attribute_Reference
6363 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6370 function Is_Finalizer (Id : E) return B is
6372 return Ekind (Id) = E_Procedure
6373 and then Chars (Id) = Name_uFinalizer;
6376 -----------------------------------
6377 -- Is_Package_Or_Generic_Package --
6378 -----------------------------------
6380 function Is_Package_Or_Generic_Package (Id : E) return B is
6383 Ekind (Id) = E_Package
6385 Ekind (Id) = E_Generic_Package;
6386 end Is_Package_Or_Generic_Package;
6388 ------------------------
6389 -- Predicate_Function --
6390 ------------------------
6392 function Predicate_Function (Id : E) return E is
6396 pragma Assert (Is_Type (Id));
6398 if No (Subprograms_For_Type (Id)) then
6402 S := Subprograms_For_Type (Id);
6403 while Present (S) loop
6404 if Has_Predicates (S) then
6407 S := Subprograms_For_Type (S);
6413 end Predicate_Function;
6419 function Is_Prival (Id : E) return B is
6421 return (Ekind_In (Id, E_Constant, E_Variable)
6422 and then Present (Prival_Link (Id)));
6425 ----------------------------
6426 -- Is_Protected_Component --
6427 ----------------------------
6429 function Is_Protected_Component (Id : E) return B is
6431 return Ekind (Id) = E_Component
6432 and then Is_Protected_Type (Scope (Id));
6433 end Is_Protected_Component;
6435 ----------------------------
6436 -- Is_Protected_Interface --
6437 ----------------------------
6439 function Is_Protected_Interface (Id : E) return B is
6440 Typ : constant Entity_Id := Base_Type (Id);
6442 if not Is_Interface (Typ) then
6444 elsif Is_Class_Wide_Type (Typ) then
6445 return Is_Protected_Interface (Etype (Typ));
6447 return Protected_Present (Type_Definition (Parent (Typ)));
6449 end Is_Protected_Interface;
6451 ------------------------------
6452 -- Is_Protected_Record_Type --
6453 ------------------------------
6455 function Is_Protected_Record_Type (Id : E) return B is
6458 Is_Concurrent_Record_Type (Id)
6459 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6460 end Is_Protected_Record_Type;
6462 --------------------------------
6463 -- Is_Standard_Character_Type --
6464 --------------------------------
6466 function Is_Standard_Character_Type (Id : E) return B is
6468 if Is_Type (Id) then
6470 R : constant Entity_Id := Root_Type (Id);
6473 R = Standard_Character
6475 R = Standard_Wide_Character
6477 R = Standard_Wide_Wide_Character;
6483 end Is_Standard_Character_Type;
6485 --------------------
6486 -- Is_String_Type --
6487 --------------------
6489 function Is_String_Type (Id : E) return B is
6491 return Ekind (Id) in String_Kind
6492 or else (Is_Array_Type (Id)
6493 and then Id /= Any_Composite
6494 and then Number_Dimensions (Id) = 1
6495 and then Is_Character_Type (Component_Type (Id)));
6498 -------------------------------
6499 -- Is_Synchronized_Interface --
6500 -------------------------------
6502 function Is_Synchronized_Interface (Id : E) return B is
6503 Typ : constant Entity_Id := Base_Type (Id);
6506 if not Is_Interface (Typ) then
6509 elsif Is_Class_Wide_Type (Typ) then
6510 return Is_Synchronized_Interface (Etype (Typ));
6513 return Protected_Present (Type_Definition (Parent (Typ)))
6514 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6515 or else Task_Present (Type_Definition (Parent (Typ)));
6517 end Is_Synchronized_Interface;
6519 -----------------------
6520 -- Is_Task_Interface --
6521 -----------------------
6523 function Is_Task_Interface (Id : E) return B is
6524 Typ : constant Entity_Id := Base_Type (Id);
6526 if not Is_Interface (Typ) then
6528 elsif Is_Class_Wide_Type (Typ) then
6529 return Is_Task_Interface (Etype (Typ));
6531 return Task_Present (Type_Definition (Parent (Typ)));
6533 end Is_Task_Interface;
6535 -------------------------
6536 -- Is_Task_Record_Type --
6537 -------------------------
6539 function Is_Task_Record_Type (Id : E) return B is
6542 Is_Concurrent_Record_Type (Id)
6543 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6544 end Is_Task_Record_Type;
6546 ------------------------
6547 -- Is_Wrapper_Package --
6548 ------------------------
6550 function Is_Wrapper_Package (Id : E) return B is
6552 return (Ekind (Id) = E_Package
6553 and then Present (Related_Instance (Id)));
6554 end Is_Wrapper_Package;
6560 function Last_Formal (Id : E) return E is
6565 (Is_Overloadable (Id)
6566 or else Ekind_In (Id, E_Entry_Family,
6568 E_Subprogram_Type));
6570 if Ekind (Id) = E_Enumeration_Literal then
6574 Formal := First_Formal (Id);
6576 if Present (Formal) then
6577 while Present (Next_Formal (Formal)) loop
6578 Formal := Next_Formal (Formal);
6586 function Model_Emin_Value (Id : E) return Uint is
6588 return Machine_Emin_Value (Id);
6589 end Model_Emin_Value;
6591 -------------------------
6592 -- Model_Epsilon_Value --
6593 -------------------------
6595 function Model_Epsilon_Value (Id : E) return Ureal is
6596 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6598 return Radix ** (1 - Model_Mantissa_Value (Id));
6599 end Model_Epsilon_Value;
6601 --------------------------
6602 -- Model_Mantissa_Value --
6603 --------------------------
6605 function Model_Mantissa_Value (Id : E) return Uint is
6607 return Machine_Mantissa_Value (Id);
6608 end Model_Mantissa_Value;
6610 -----------------------
6611 -- Model_Small_Value --
6612 -----------------------
6614 function Model_Small_Value (Id : E) return Ureal is
6615 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6617 return Radix ** (Model_Emin_Value (Id) - 1);
6618 end Model_Small_Value;
6620 ------------------------
6621 -- Machine_Emax_Value --
6622 ------------------------
6624 function Machine_Emax_Value (Id : E) return Uint is
6625 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6628 case Float_Rep (Id) is
6631 when 1 .. 6 => return Uint_128;
6632 when 7 .. 15 => return 2**10;
6633 when 16 .. 33 => return 2**14;
6634 when others => return No_Uint;
6639 when 1 .. 9 => return 2**7 - 1;
6640 when 10 .. 15 => return 2**10 - 1;
6641 when others => return No_Uint;
6645 return Uint_2 ** Uint_7 - Uint_1;
6647 end Machine_Emax_Value;
6649 ------------------------
6650 -- Machine_Emin_Value --
6651 ------------------------
6653 function Machine_Emin_Value (Id : E) return Uint is
6655 case Float_Rep (Id) is
6656 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6657 when VAX_Native => return -Machine_Emax_Value (Id);
6658 when AAMP => return -Machine_Emax_Value (Id);
6660 end Machine_Emin_Value;
6662 ----------------------------
6663 -- Machine_Mantissa_Value --
6664 ----------------------------
6666 function Machine_Mantissa_Value (Id : E) return Uint is
6667 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6670 case Float_Rep (Id) is
6673 when 1 .. 6 => return Uint_24;
6674 when 7 .. 15 => return UI_From_Int (53);
6675 when 16 .. 18 => return Uint_64;
6676 when 19 .. 33 => return UI_From_Int (113);
6677 when others => return No_Uint;
6682 when 1 .. 6 => return Uint_24;
6683 when 7 .. 9 => return UI_From_Int (56);
6684 when 10 .. 15 => return UI_From_Int (53);
6685 when others => return No_Uint;
6690 when 1 .. 6 => return Uint_24;
6691 when 7 .. 9 => return UI_From_Int (40);
6692 when others => return No_Uint;
6695 end Machine_Mantissa_Value;
6697 -------------------------
6698 -- Machine_Radix_Value --
6699 -------------------------
6701 function Machine_Radix_Value (Id : E) return U is
6703 case Float_Rep (Id) is
6704 when IEEE_Binary | VAX_Native | AAMP =>
6707 end Machine_Radix_Value;
6709 --------------------
6710 -- Next_Component --
6711 --------------------
6713 function Next_Component (Id : E) return E is
6717 Comp_Id := Next_Entity (Id);
6718 while Present (Comp_Id) loop
6719 exit when Ekind (Comp_Id) = E_Component;
6720 Comp_Id := Next_Entity (Comp_Id);
6726 ------------------------------------
6727 -- Next_Component_Or_Discriminant --
6728 ------------------------------------
6730 function Next_Component_Or_Discriminant (Id : E) return E is
6734 Comp_Id := Next_Entity (Id);
6735 while Present (Comp_Id) loop
6736 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6737 Comp_Id := Next_Entity (Comp_Id);
6741 end Next_Component_Or_Discriminant;
6743 -----------------------
6744 -- Next_Discriminant --
6745 -----------------------
6747 -- This function actually implements both Next_Discriminant and
6748 -- Next_Stored_Discriminant by making sure that the Discriminant
6749 -- returned is of the same variety as Id.
6751 function Next_Discriminant (Id : E) return E is
6753 -- Derived Tagged types with private extensions look like this...
6755 -- E_Discriminant d1
6756 -- E_Discriminant d2
6758 -- E_Discriminant d1
6759 -- E_Discriminant d2
6762 -- so it is critical not to go past the leading discriminants
6767 pragma Assert (Ekind (Id) = E_Discriminant);
6770 D := Next_Entity (D);
6772 or else (Ekind (D) /= E_Discriminant
6773 and then not Is_Itype (D))
6778 exit when Ekind (D) = E_Discriminant
6779 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6783 end Next_Discriminant;
6789 function Next_Formal (Id : E) return E is
6793 -- Follow the chain of declared entities as long as the kind of the
6794 -- entity corresponds to a formal parameter. Skip internal entities
6795 -- that may have been created for implicit subtypes, in the process
6796 -- of analyzing default expressions.
6800 P := Next_Entity (P);
6802 if No (P) or else Is_Formal (P) then
6804 elsif not Is_Internal (P) then
6810 -----------------------------
6811 -- Next_Formal_With_Extras --
6812 -----------------------------
6814 function Next_Formal_With_Extras (Id : E) return E is
6816 if Present (Extra_Formal (Id)) then
6817 return Extra_Formal (Id);
6819 return Next_Formal (Id);
6821 end Next_Formal_With_Extras;
6827 function Next_Index (Id : Node_Id) return Node_Id is
6836 function Next_Literal (Id : E) return E is
6838 pragma Assert (Nkind (Id) in N_Entity);
6842 ------------------------------
6843 -- Next_Stored_Discriminant --
6844 ------------------------------
6846 function Next_Stored_Discriminant (Id : E) return E is
6848 -- See comment in Next_Discriminant
6850 return Next_Discriminant (Id);
6851 end Next_Stored_Discriminant;
6853 -----------------------
6854 -- Number_Dimensions --
6855 -----------------------
6857 function Number_Dimensions (Id : E) return Pos is
6862 if Ekind (Id) in String_Kind then
6867 T := First_Index (Id);
6868 while Present (T) loop
6875 end Number_Dimensions;
6877 --------------------
6878 -- Number_Entries --
6879 --------------------
6881 function Number_Entries (Id : E) return Nat is
6886 pragma Assert (Is_Concurrent_Type (Id));
6889 Ent := First_Entity (Id);
6890 while Present (Ent) loop
6891 if Is_Entry (Ent) then
6895 Ent := Next_Entity (Ent);
6901 --------------------
6902 -- Number_Formals --
6903 --------------------
6905 function Number_Formals (Id : E) return Pos is
6911 Formal := First_Formal (Id);
6912 while Present (Formal) loop
6914 Formal := Next_Formal (Formal);
6920 --------------------
6921 -- Parameter_Mode --
6922 --------------------
6924 function Parameter_Mode (Id : E) return Formal_Kind is
6929 --------------------------
6930 -- Primitive_Operations --
6931 --------------------------
6933 function Primitive_Operations (Id : E) return L is
6935 if Is_Concurrent_Type (Id) then
6936 if Present (Corresponding_Record_Type (Id)) then
6937 return Direct_Primitive_Operations
6938 (Corresponding_Record_Type (Id));
6940 -- If expansion is disabled the corresponding record type is absent,
6941 -- but if the type has ancestors it may have primitive operations.
6943 elsif Is_Tagged_Type (Id) then
6944 return Direct_Primitive_Operations (Id);
6950 return Direct_Primitive_Operations (Id);
6952 end Primitive_Operations;
6954 ---------------------
6955 -- Record_Rep_Item --
6956 ---------------------
6958 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6960 Set_Next_Rep_Item (N, First_Rep_Item (E));
6961 Set_First_Rep_Item (E, N);
6962 end Record_Rep_Item;
6968 function Root_Type (Id : E) return E is
6972 pragma Assert (Nkind (Id) in N_Entity);
6974 T := Base_Type (Id);
6976 if Ekind (T) = E_Class_Wide_Type then
6988 -- Following test catches some error cases resulting from
6991 elsif No (Etyp) then
6994 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6997 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7003 -- Return if there is a circularity in the inheritance chain. This
7004 -- happens in some error situations and we do not want to get
7005 -- stuck in this loop.
7007 if T = Base_Type (Id) then
7014 ---------------------
7015 -- Safe_Emax_Value --
7016 ---------------------
7018 function Safe_Emax_Value (Id : E) return Uint is
7020 return Machine_Emax_Value (Id);
7021 end Safe_Emax_Value;
7023 ----------------------
7024 -- Safe_First_Value --
7025 ----------------------
7027 function Safe_First_Value (Id : E) return Ureal is
7029 return -Safe_Last_Value (Id);
7030 end Safe_First_Value;
7032 ---------------------
7033 -- Safe_Last_Value --
7034 ---------------------
7036 function Safe_Last_Value (Id : E) return Ureal is
7037 Radix : constant Uint := Machine_Radix_Value (Id);
7038 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7039 Emax : constant Uint := Safe_Emax_Value (Id);
7040 Significand : constant Uint := Radix ** Mantissa - 1;
7041 Exponent : constant Uint := Emax - Mantissa;
7047 (Num => Significand * 2 ** (Exponent mod 4),
7048 Den => -Exponent / 4,
7054 (Num => Significand,
7058 end Safe_Last_Value;
7064 function Scope_Depth (Id : E) return Uint is
7069 while Is_Record_Type (Scop) loop
7070 Scop := Scope (Scop);
7073 return Scope_Depth_Value (Scop);
7076 ---------------------
7077 -- Scope_Depth_Set --
7078 ---------------------
7080 function Scope_Depth_Set (Id : E) return B is
7082 return not Is_Record_Type (Id)
7083 and then Field22 (Id) /= Union_Id (Empty);
7084 end Scope_Depth_Set;
7086 -----------------------------
7087 -- Set_Component_Alignment --
7088 -----------------------------
7090 -- Component Alignment is encoded using two flags, Flag128/129 as
7091 -- follows. Note that both flags False = Align_Default, so that the
7092 -- default initialization of flags to False initializes component
7093 -- alignment to the default value as required.
7095 -- Flag128 Flag129 Value
7096 -- ------- ------- -----
7097 -- False False Calign_Default
7098 -- False True Calign_Component_Size
7099 -- True False Calign_Component_Size_4
7100 -- True True Calign_Storage_Unit
7102 procedure Set_Component_Alignment (Id : E; V : C) is
7104 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7105 and then Is_Base_Type (Id));
7108 when Calign_Default =>
7109 Set_Flag128 (Id, False);
7110 Set_Flag129 (Id, False);
7112 when Calign_Component_Size =>
7113 Set_Flag128 (Id, False);
7114 Set_Flag129 (Id, True);
7116 when Calign_Component_Size_4 =>
7117 Set_Flag128 (Id, True);
7118 Set_Flag129 (Id, False);
7120 when Calign_Storage_Unit =>
7121 Set_Flag128 (Id, True);
7122 Set_Flag129 (Id, True);
7124 end Set_Component_Alignment;
7126 -----------------------------
7127 -- Set_Invariant_Procedure --
7128 -----------------------------
7130 procedure Set_Invariant_Procedure (Id : E; V : E) is
7134 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7136 S := Subprograms_For_Type (Id);
7137 Set_Subprograms_For_Type (Id, V);
7139 while Present (S) loop
7140 if Has_Invariants (S) then
7141 raise Program_Error;
7143 S := Subprograms_For_Type (S);
7147 Set_Subprograms_For_Type (Id, V);
7148 end Set_Invariant_Procedure;
7150 ----------------------------
7151 -- Set_Predicate_Function --
7152 ----------------------------
7154 procedure Set_Predicate_Function (Id : E; V : E) is
7158 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7160 S := Subprograms_For_Type (Id);
7161 Set_Subprograms_For_Type (Id, V);
7163 while Present (S) loop
7164 if Has_Predicates (S) then
7165 raise Program_Error;
7167 S := Subprograms_For_Type (S);
7171 Set_Subprograms_For_Type (Id, V);
7172 end Set_Predicate_Function;
7178 function Size_Clause (Id : E) return N is
7180 return Rep_Clause (Id, Name_Size);
7183 ------------------------
7184 -- Stream_Size_Clause --
7185 ------------------------
7187 function Stream_Size_Clause (Id : E) return N is
7189 return Rep_Clause (Id, Name_Stream_Size);
7190 end Stream_Size_Clause;
7196 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7202 Kind := E_Access_Subtype;
7206 Kind := E_Array_Subtype;
7208 when E_Class_Wide_Type |
7209 E_Class_Wide_Subtype =>
7210 Kind := E_Class_Wide_Subtype;
7212 when E_Decimal_Fixed_Point_Type |
7213 E_Decimal_Fixed_Point_Subtype =>
7214 Kind := E_Decimal_Fixed_Point_Subtype;
7216 when E_Ordinary_Fixed_Point_Type |
7217 E_Ordinary_Fixed_Point_Subtype =>
7218 Kind := E_Ordinary_Fixed_Point_Subtype;
7220 when E_Private_Type |
7221 E_Private_Subtype =>
7222 Kind := E_Private_Subtype;
7224 when E_Limited_Private_Type |
7225 E_Limited_Private_Subtype =>
7226 Kind := E_Limited_Private_Subtype;
7228 when E_Record_Type_With_Private |
7229 E_Record_Subtype_With_Private =>
7230 Kind := E_Record_Subtype_With_Private;
7232 when E_Record_Type |
7234 Kind := E_Record_Subtype;
7236 when E_String_Type |
7238 Kind := E_String_Subtype;
7240 when Enumeration_Kind =>
7241 Kind := E_Enumeration_Subtype;
7244 Kind := E_Floating_Point_Subtype;
7246 when Signed_Integer_Kind =>
7247 Kind := E_Signed_Integer_Subtype;
7249 when Modular_Integer_Kind =>
7250 Kind := E_Modular_Integer_Subtype;
7252 when Protected_Kind =>
7253 Kind := E_Protected_Subtype;
7256 Kind := E_Task_Subtype;
7260 raise Program_Error;
7266 ---------------------
7267 -- Type_High_Bound --
7268 ---------------------
7270 function Type_High_Bound (Id : E) return Node_Id is
7271 Rng : constant Node_Id := Scalar_Range (Id);
7273 if Nkind (Rng) = N_Subtype_Indication then
7274 return High_Bound (Range_Expression (Constraint (Rng)));
7276 return High_Bound (Rng);
7278 end Type_High_Bound;
7280 --------------------
7281 -- Type_Low_Bound --
7282 --------------------
7284 function Type_Low_Bound (Id : E) return Node_Id is
7285 Rng : constant Node_Id := Scalar_Range (Id);
7287 if Nkind (Rng) = N_Subtype_Indication then
7288 return Low_Bound (Range_Expression (Constraint (Rng)));
7290 return Low_Bound (Rng);
7294 ---------------------
7295 -- Underlying_Type --
7296 ---------------------
7298 function Underlying_Type (Id : E) return E is
7300 -- For record_with_private the underlying type is always the direct
7301 -- full view. Never try to take the full view of the parent it
7302 -- doesn't make sense.
7304 if Ekind (Id) = E_Record_Type_With_Private then
7305 return Full_View (Id);
7307 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7309 -- If we have an incomplete or private type with a full view,
7310 -- then we return the Underlying_Type of this full view
7312 if Present (Full_View (Id)) then
7313 if Id = Full_View (Id) then
7315 -- Previous error in declaration
7320 return Underlying_Type (Full_View (Id));
7323 -- If we have an incomplete entity that comes from the limited
7324 -- view then we return the Underlying_Type of its non-limited
7327 elsif From_With_Type (Id)
7328 and then Present (Non_Limited_View (Id))
7330 return Underlying_Type (Non_Limited_View (Id));
7332 -- Otherwise check for the case where we have a derived type or
7333 -- subtype, and if so get the Underlying_Type of the parent type.
7335 elsif Etype (Id) /= Id then
7336 return Underlying_Type (Etype (Id));
7338 -- Otherwise we have an incomplete or private type that has
7339 -- no full view, which means that we have not encountered the
7340 -- completion, so return Empty to indicate the underlying type
7341 -- is not yet known.
7347 -- For non-incomplete, non-private types, return the type itself
7348 -- Also for entities that are not types at all return the entity
7354 end Underlying_Type;
7360 function Vax_Float (Id : E) return B is
7362 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7365 ------------------------
7366 -- Write_Entity_Flags --
7367 ------------------------
7369 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7371 procedure W (Flag_Name : String; Flag : Boolean);
7372 -- Write out given flag if it is set
7378 procedure W (Flag_Name : String; Flag : Boolean) is
7382 Write_Str (Flag_Name);
7383 Write_Str (" = True");
7388 -- Start of processing for Write_Entity_Flags
7391 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7392 and then Is_Base_Type (Id)
7395 Write_Str ("Component_Alignment = ");
7397 case Component_Alignment (Id) is
7398 when Calign_Default =>
7399 Write_Str ("Calign_Default");
7401 when Calign_Component_Size =>
7402 Write_Str ("Calign_Component_Size");
7404 when Calign_Component_Size_4 =>
7405 Write_Str ("Calign_Component_Size_4");
7407 when Calign_Storage_Unit =>
7408 Write_Str ("Calign_Storage_Unit");
7414 W ("Address_Taken", Flag104 (Id));
7415 W ("Body_Needed_For_SAL", Flag40 (Id));
7416 W ("C_Pass_By_Copy", Flag125 (Id));
7417 W ("Can_Never_Be_Null", Flag38 (Id));
7418 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7419 W ("Debug_Info_Off", Flag166 (Id));
7420 W ("Default_Expressions_Processed", Flag108 (Id));
7421 W ("Delay_Cleanups", Flag114 (Id));
7422 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7423 W ("Depends_On_Private", Flag14 (Id));
7424 W ("Discard_Names", Flag88 (Id));
7425 W ("Elaboration_Entity_Required", Flag174 (Id));
7426 W ("Elaborate_Body_Desirable", Flag210 (Id));
7427 W ("Entry_Accepted", Flag152 (Id));
7428 W ("Can_Use_Internal_Rep", Flag229 (Id));
7429 W ("Finalize_Storage_Only", Flag158 (Id));
7430 W ("From_With_Type", Flag159 (Id));
7431 W ("Has_Aliased_Components", Flag135 (Id));
7432 W ("Has_Alignment_Clause", Flag46 (Id));
7433 W ("Has_All_Calls_Remote", Flag79 (Id));
7434 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7435 W ("Has_Anonymous_Master", Flag253 (Id));
7436 W ("Has_Atomic_Components", Flag86 (Id));
7437 W ("Has_Biased_Representation", Flag139 (Id));
7438 W ("Has_Completion", Flag26 (Id));
7439 W ("Has_Completion_In_Body", Flag71 (Id));
7440 W ("Has_Complex_Representation", Flag140 (Id));
7441 W ("Has_Component_Size_Clause", Flag68 (Id));
7442 W ("Has_Contiguous_Rep", Flag181 (Id));
7443 W ("Has_Controlled_Component", Flag43 (Id));
7444 W ("Has_Controlling_Result", Flag98 (Id));
7445 W ("Has_Convention_Pragma", Flag119 (Id));
7446 W ("Has_Default_Aspect", Flag39 (Id));
7447 W ("Has_Delayed_Aspects", Flag200 (Id));
7448 W ("Has_Delayed_Freeze", Flag18 (Id));
7449 W ("Has_Discriminants", Flag5 (Id));
7450 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7451 W ("Has_Exit", Flag47 (Id));
7452 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7453 W ("Has_Forward_Instantiation", Flag175 (Id));
7454 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7455 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7456 W ("Has_Homonym", Flag56 (Id));
7457 W ("Has_Implicit_Dereference", Flag251 (Id));
7458 W ("Has_Inheritable_Invariants", Flag248 (Id));
7459 W ("Has_Initial_Value", Flag219 (Id));
7460 W ("Has_Invariants", Flag232 (Id));
7461 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7462 W ("Has_Master_Entity", Flag21 (Id));
7463 W ("Has_Missing_Return", Flag142 (Id));
7464 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7465 W ("Has_Non_Standard_Rep", Flag75 (Id));
7466 W ("Has_Object_Size_Clause", Flag172 (Id));
7467 W ("Has_Per_Object_Constraint", Flag154 (Id));
7468 W ("Has_Persistent_BSS", Flag188 (Id));
7469 W ("Has_Postconditions", Flag240 (Id));
7470 W ("Has_Pragma_Controlled", Flag27 (Id));
7471 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7472 W ("Has_Pragma_Inline", Flag157 (Id));
7473 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7474 W ("Has_Pragma_Ordered", Flag198 (Id));
7475 W ("Has_Pragma_Pack", Flag121 (Id));
7476 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7477 W ("Has_Pragma_Pure", Flag203 (Id));
7478 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7479 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7480 W ("Has_Pragma_Unmodified", Flag233 (Id));
7481 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7482 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7483 W ("Has_Predicates", Flag250 (Id));
7484 W ("Has_Primitive_Operations", Flag120 (Id));
7485 W ("Has_Private_Ancestor", Flag151 (Id));
7486 W ("Has_Private_Declaration", Flag155 (Id));
7487 W ("Has_Qualified_Name", Flag161 (Id));
7488 W ("Has_RACW", Flag214 (Id));
7489 W ("Has_Record_Rep_Clause", Flag65 (Id));
7490 W ("Has_Recursive_Call", Flag143 (Id));
7491 W ("Has_Size_Clause", Flag29 (Id));
7492 W ("Has_Small_Clause", Flag67 (Id));
7493 W ("Has_Specified_Layout", Flag100 (Id));
7494 W ("Has_Specified_Stream_Input", Flag190 (Id));
7495 W ("Has_Specified_Stream_Output", Flag191 (Id));
7496 W ("Has_Specified_Stream_Read", Flag192 (Id));
7497 W ("Has_Specified_Stream_Write", Flag193 (Id));
7498 W ("Has_Static_Discriminants", Flag211 (Id));
7499 W ("Has_Storage_Size_Clause", Flag23 (Id));
7500 W ("Has_Stream_Size_Clause", Flag184 (Id));
7501 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7502 W ("Has_Task", Flag30 (Id));
7503 W ("Has_Thunks", Flag228 (Id));
7504 W ("Has_Unchecked_Union", Flag123 (Id));
7505 W ("Has_Unknown_Discriminants", Flag72 (Id));
7506 W ("Has_Up_Level_Access", Flag215 (Id));
7507 W ("Has_Volatile_Components", Flag87 (Id));
7508 W ("Has_Xref_Entry", Flag182 (Id));
7509 W ("In_Package_Body", Flag48 (Id));
7510 W ("In_Private_Part", Flag45 (Id));
7511 W ("In_Use", Flag8 (Id));
7512 W ("Is_AST_Entry", Flag132 (Id));
7513 W ("Is_Abstract_Subprogram", Flag19 (Id));
7514 W ("Is_Abstract_Type", Flag146 (Id));
7515 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7516 W ("Is_Access_Constant", Flag69 (Id));
7517 W ("Is_Ada_2005_Only", Flag185 (Id));
7518 W ("Is_Ada_2012_Only", Flag199 (Id));
7519 W ("Is_Aliased", Flag15 (Id));
7520 W ("Is_Asynchronous", Flag81 (Id));
7521 W ("Is_Atomic", Flag85 (Id));
7522 W ("Is_Bit_Packed_Array", Flag122 (Id));
7523 W ("Is_CPP_Class", Flag74 (Id));
7524 W ("Is_Called", Flag102 (Id));
7525 W ("Is_Character_Type", Flag63 (Id));
7526 W ("Is_Child_Unit", Flag73 (Id));
7527 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7528 W ("Is_Compilation_Unit", Flag149 (Id));
7529 W ("Is_Completely_Hidden", Flag103 (Id));
7530 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7531 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7532 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7533 W ("Is_Constrained", Flag12 (Id));
7534 W ("Is_Constructor", Flag76 (Id));
7535 W ("Is_Controlled", Flag42 (Id));
7536 W ("Is_Controlling_Formal", Flag97 (Id));
7537 W ("Is_Descendent_Of_Address", Flag223 (Id));
7538 W ("Is_Discrim_SO_Function", Flag176 (Id));
7539 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7540 W ("Is_Dispatching_Operation", Flag6 (Id));
7541 W ("Is_Eliminated", Flag124 (Id));
7542 W ("Is_Entry_Formal", Flag52 (Id));
7543 W ("Is_Exported", Flag99 (Id));
7544 W ("Is_First_Subtype", Flag70 (Id));
7545 W ("Is_For_Access_Subtype", Flag118 (Id));
7546 W ("Is_Formal_Subprogram", Flag111 (Id));
7547 W ("Is_Frozen", Flag4 (Id));
7548 W ("Is_Generic_Actual_Type", Flag94 (Id));
7549 W ("Is_Generic_Instance", Flag130 (Id));
7550 W ("Is_Generic_Type", Flag13 (Id));
7551 W ("Is_Hidden", Flag57 (Id));
7552 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7553 W ("Is_Immediately_Visible", Flag7 (Id));
7554 W ("Is_Imported", Flag24 (Id));
7555 W ("Is_Inlined", Flag11 (Id));
7556 W ("Is_Instantiated", Flag126 (Id));
7557 W ("Is_Interface", Flag186 (Id));
7558 W ("Is_Internal", Flag17 (Id));
7559 W ("Is_Interrupt_Handler", Flag89 (Id));
7560 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7561 W ("Is_Itype", Flag91 (Id));
7562 W ("Is_Known_Non_Null", Flag37 (Id));
7563 W ("Is_Known_Null", Flag204 (Id));
7564 W ("Is_Known_Valid", Flag170 (Id));
7565 W ("Is_Limited_Composite", Flag106 (Id));
7566 W ("Is_Limited_Interface", Flag197 (Id));
7567 W ("Is_Limited_Record", Flag25 (Id));
7568 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7569 W ("Is_Non_Static_Subtype", Flag109 (Id));
7570 W ("Is_Null_Init_Proc", Flag178 (Id));
7571 W ("Is_Obsolescent", Flag153 (Id));
7572 W ("Is_Only_Out_Parameter", Flag226 (Id));
7573 W ("Is_Optional_Parameter", Flag134 (Id));
7574 W ("Is_Package_Body_Entity", Flag160 (Id));
7575 W ("Is_Packed", Flag51 (Id));
7576 W ("Is_Packed_Array_Type", Flag138 (Id));
7577 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7578 W ("Is_Preelaborated", Flag59 (Id));
7579 W ("Is_Primitive", Flag218 (Id));
7580 W ("Is_Primitive_Wrapper", Flag195 (Id));
7581 W ("Is_Private_Composite", Flag107 (Id));
7582 W ("Is_Private_Descendant", Flag53 (Id));
7583 W ("Is_Private_Primitive", Flag245 (Id));
7584 W ("Is_Processed_Transient", Flag252 (Id));
7585 W ("Is_Public", Flag10 (Id));
7586 W ("Is_Pure", Flag44 (Id));
7587 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7588 W ("Is_RACW_Stub_Type", Flag244 (Id));
7589 W ("Is_Raised", Flag224 (Id));
7590 W ("Is_Remote_Call_Interface", Flag62 (Id));
7591 W ("Is_Remote_Types", Flag61 (Id));
7592 W ("Is_Renaming_Of_Object", Flag112 (Id));
7593 W ("Is_Return_Object", Flag209 (Id));
7594 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7595 W ("Is_Shared_Passive", Flag60 (Id));
7596 W ("Is_Statically_Allocated", Flag28 (Id));
7597 W ("Is_Tag", Flag78 (Id));
7598 W ("Is_Tagged_Type", Flag55 (Id));
7599 W ("Is_Thunk", Flag225 (Id));
7600 W ("Is_Trivial_Subprogram", Flag235 (Id));
7601 W ("Is_True_Constant", Flag163 (Id));
7602 W ("Is_Unchecked_Union", Flag117 (Id));
7603 W ("Is_Underlying_Record_View", Flag246 (Id));
7604 W ("Is_Unsigned_Type", Flag144 (Id));
7605 W ("Is_VMS_Exception", Flag133 (Id));
7606 W ("Is_Valued_Procedure", Flag127 (Id));
7607 W ("Is_Visible_Child_Unit", Flag116 (Id));
7608 W ("Is_Visible_Formal", Flag206 (Id));
7609 W ("Is_Volatile", Flag16 (Id));
7610 W ("Itype_Printed", Flag202 (Id));
7611 W ("Kill_Elaboration_Checks", Flag32 (Id));
7612 W ("Kill_Range_Checks", Flag33 (Id));
7613 W ("Kill_Tag_Checks", Flag34 (Id));
7614 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7615 W ("Low_Bound_Tested", Flag205 (Id));
7616 W ("Machine_Radix_10", Flag84 (Id));
7617 W ("Materialize_Entity", Flag168 (Id));
7618 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7619 W ("Must_Have_Preelab_Init", Flag208 (Id));
7620 W ("Needs_Debug_Info", Flag147 (Id));
7621 W ("Needs_No_Actuals", Flag22 (Id));
7622 W ("Never_Set_In_Source", Flag115 (Id));
7623 W ("No_Pool_Assigned", Flag131 (Id));
7624 W ("No_Return", Flag113 (Id));
7625 W ("No_Strict_Aliasing", Flag136 (Id));
7626 W ("Non_Binary_Modulus", Flag58 (Id));
7627 W ("Nonzero_Is_True", Flag162 (Id));
7628 W ("OK_To_Rename", Flag247 (Id));
7629 W ("OK_To_Reorder_Components", Flag239 (Id));
7630 W ("Optimize_Alignment_Space", Flag241 (Id));
7631 W ("Optimize_Alignment_Time", Flag242 (Id));
7632 W ("Overlays_Constant", Flag243 (Id));
7633 W ("Reachable", Flag49 (Id));
7634 W ("Referenced", Flag156 (Id));
7635 W ("Referenced_As_LHS", Flag36 (Id));
7636 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7637 W ("Renamed_In_Spec", Flag231 (Id));
7638 W ("Requires_Overriding", Flag213 (Id));
7639 W ("Return_Present", Flag54 (Id));
7640 W ("Returns_By_Ref", Flag90 (Id));
7641 W ("Reverse_Bit_Order", Flag164 (Id));
7642 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7643 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7644 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7645 W ("Static_Elaboration_Desired", Flag77 (Id));
7646 W ("Strict_Alignment", Flag145 (Id));
7647 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7648 W ("Suppress_Initialization", Flag105 (Id));
7649 W ("Suppress_Style_Checks", Flag165 (Id));
7650 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7651 W ("Treat_As_Volatile", Flag41 (Id));
7652 W ("Universal_Aliasing", Flag216 (Id));
7653 W ("Used_As_Generic_Actual", Flag222 (Id));
7654 W ("Uses_Sec_Stack", Flag95 (Id));
7655 W ("Warnings_Off", Flag96 (Id));
7656 W ("Warnings_Off_Used", Flag236 (Id));
7657 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7658 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7659 W ("Was_Hidden", Flag196 (Id));
7660 end Write_Entity_Flags;
7662 -----------------------
7663 -- Write_Entity_Info --
7664 -----------------------
7666 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7668 procedure Write_Attribute (Which : String; Nam : E);
7669 -- Write attribute value with given string name
7671 procedure Write_Kind (Id : Entity_Id);
7672 -- Write Ekind field of entity
7674 ---------------------
7675 -- Write_Attribute --
7676 ---------------------
7678 procedure Write_Attribute (Which : String; Nam : E) is
7682 Write_Int (Int (Nam));
7684 Write_Name (Chars (Nam));
7686 end Write_Attribute;
7692 procedure Write_Kind (Id : Entity_Id) is
7693 K : constant String := Entity_Kind'Image (Ekind (Id));
7697 Write_Str (" Kind ");
7699 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7700 Write_Str ("TAGGED ");
7703 Write_Str (K (3 .. K'Length));
7706 if Is_Type (Id) and then Depends_On_Private (Id) then
7707 Write_Str ("Depends_On_Private ");
7711 -- Start of processing for Write_Entity_Info
7715 Write_Attribute ("Name ", Id);
7716 Write_Int (Int (Id));
7720 Write_Attribute (" Type ", Etype (Id));
7722 Write_Attribute (" Scope ", Scope (Id));
7727 when Discrete_Kind =>
7728 Write_Str ("Bounds: Id = ");
7730 if Present (Scalar_Range (Id)) then
7731 Write_Int (Int (Type_Low_Bound (Id)));
7732 Write_Str (" .. Id = ");
7733 Write_Int (Int (Type_High_Bound (Id)));
7735 Write_Str ("Empty");
7746 (" Component Type ", Component_Type (Id));
7749 Write_Str (" Indexes ");
7751 Index := First_Index (Id);
7752 while Present (Index) loop
7753 Write_Attribute (" ", Etype (Index));
7754 Index := Next_Index (Index);
7762 (" Directly Designated Type ",
7763 Directly_Designated_Type (Id));
7766 when Overloadable_Kind =>
7767 if Present (Homonym (Id)) then
7768 Write_Str (" Homonym ");
7769 Write_Name (Chars (Homonym (Id)));
7771 Write_Int (Int (Homonym (Id)));
7778 if Ekind (Scope (Id)) in Record_Kind then
7780 " Original_Record_Component ",
7781 Original_Record_Component (Id));
7782 Write_Int (Int (Original_Record_Component (Id)));
7786 when others => null;
7788 end Write_Entity_Info;
7790 -----------------------
7791 -- Write_Field6_Name --
7792 -----------------------
7794 procedure Write_Field6_Name (Id : Entity_Id) is
7795 pragma Warnings (Off, Id);
7797 Write_Str ("First_Rep_Item");
7798 end Write_Field6_Name;
7800 -----------------------
7801 -- Write_Field7_Name --
7802 -----------------------
7804 procedure Write_Field7_Name (Id : Entity_Id) is
7805 pragma Warnings (Off, Id);
7807 Write_Str ("Freeze_Node");
7808 end Write_Field7_Name;
7810 -----------------------
7811 -- Write_Field8_Name --
7812 -----------------------
7814 procedure Write_Field8_Name (Id : Entity_Id) is
7818 Write_Str ("Associated_Node_For_Itype");
7821 Write_Str ("Dependent_Instances");
7824 Write_Str ("First_Exit_Statement");
7827 Write_Str ("Hiding_Loop_Variable");
7831 E_Subprogram_Body =>
7832 Write_Str ("Mechanism");
7836 Write_Str ("Normalized_First_Bit");
7839 Write_Str ("Postcondition_Proc");
7841 when E_Return_Statement =>
7842 Write_Str ("Return_Applies_To");
7845 Write_Str ("Field8??");
7847 end Write_Field8_Name;
7849 -----------------------
7850 -- Write_Field9_Name --
7851 -----------------------
7853 procedure Write_Field9_Name (Id : Entity_Id) is
7857 Write_Str ("Class_Wide_Type");
7860 Write_Str ("Current_Value");
7863 E_Generic_Function |
7865 E_Generic_Procedure |
7868 Write_Str ("Renaming_Map");
7871 Write_Str ("Field9??");
7873 end Write_Field9_Name;
7875 ------------------------
7876 -- Write_Field10_Name --
7877 ------------------------
7879 procedure Write_Field10_Name (Id : Entity_Id) is
7882 when Class_Wide_Kind |
7888 Write_Str ("Direct_Primitive_Operations");
7891 Write_Str ("Float_Rep");
7893 when E_In_Parameter |
7895 Write_Str ("Discriminal_Link");
7901 Write_Str ("Handler_Records");
7905 Write_Str ("Normalized_Position_Max");
7908 Write_Str ("Field10??");
7910 end Write_Field10_Name;
7912 ------------------------
7913 -- Write_Field11_Name --
7914 ------------------------
7916 procedure Write_Field11_Name (Id : Entity_Id) is
7920 Write_Str ("Block_Node");
7924 Write_Str ("Component_Bit_Offset");
7927 Write_Str ("Entry_Component");
7929 when E_Enumeration_Literal =>
7930 Write_Str ("Enumeration_Pos");
7934 Write_Str ("Full_View");
7936 when E_Generic_Package =>
7937 Write_Str ("Generic_Homonym");
7943 Write_Str ("Protected_Body_Subprogram");
7946 Write_Str ("Field11??");
7948 end Write_Field11_Name;
7950 ------------------------
7951 -- Write_Field12_Name --
7952 ------------------------
7954 procedure Write_Field12_Name (Id : Entity_Id) is
7958 Write_Str ("Associated_Formal_Package");
7961 Write_Str ("Barrier_Function");
7963 when E_Enumeration_Literal =>
7964 Write_Str ("Enumeration_Rep");
7972 E_In_Out_Parameter |
7976 Write_Str ("Esize");
7980 Write_Str ("Next_Inlined_Subprogram");
7983 Write_Str ("Field12??");
7985 end Write_Field12_Name;
7987 ------------------------
7988 -- Write_Field13_Name --
7989 ------------------------
7991 procedure Write_Field13_Name (Id : Entity_Id) is
7996 Write_Str ("Component_Clause");
7999 if not Comes_From_Source (Id)
8001 Chars (Id) = Name_Op_Ne
8003 Write_Str ("Corresponding_Equality");
8005 elsif Comes_From_Source (Id) then
8006 Write_Str ("Elaboration_Entity");
8009 Write_Str ("Field13??");
8014 Generic_Unit_Kind =>
8015 Write_Str ("Elaboration_Entity");
8019 Write_Str ("Extra_Accessibility");
8022 Write_Str ("RM_Size");
8025 Write_Str ("Field13??");
8027 end Write_Field13_Name;
8029 -----------------------
8030 -- Write_Field14_Name --
8031 -----------------------
8033 procedure Write_Field14_Name (Id : Entity_Id) is
8042 Write_Str ("Alignment");
8046 Write_Str ("First_Optional_Parameter");
8050 Write_Str ("Normalized_Position");
8053 E_Generic_Package =>
8054 Write_Str ("Shadow_Entities");
8057 Write_Str ("Field14??");
8059 end Write_Field14_Name;
8061 ------------------------
8062 -- Write_Field15_Name --
8063 ------------------------
8065 procedure Write_Field15_Name (Id : Entity_Id) is
8068 when E_Discriminant =>
8069 Write_Str ("Discriminant_Number");
8072 Write_Str ("DT_Entry_Count");
8076 Write_Str ("DT_Position");
8078 when E_Protected_Type =>
8079 Write_Str ("Entry_Bodies_Array");
8082 Write_Str ("Entry_Parameters_Type");
8085 Write_Str ("Extra_Formal");
8087 when Enumeration_Kind =>
8088 Write_Str ("Lit_Indexes");
8092 Write_Str ("Related_Instance");
8096 Write_Str ("Return_Flag_Or_Transient_Decl");
8098 when Decimal_Fixed_Point_Kind =>
8099 Write_Str ("Scale_Value");
8103 Write_Str ("Storage_Size_Variable");
8105 when E_String_Literal_Subtype =>
8106 Write_Str ("String_Literal_Low_Bound");
8109 Write_Str ("Field15??");
8111 end Write_Field15_Name;
8113 ------------------------
8114 -- Write_Field16_Name --
8115 ------------------------
8117 procedure Write_Field16_Name (Id : Entity_Id) is
8120 when E_Record_Type |
8121 E_Record_Type_With_Private =>
8122 Write_Str ("Access_Disp_Table");
8124 when E_Record_Subtype |
8125 E_Class_Wide_Subtype =>
8126 Write_Str ("Cloned_Subtype");
8130 Write_Str ("DTC_Entity");
8133 Write_Str ("Entry_Formal");
8138 Write_Str ("First_Private_Entity");
8140 when Enumeration_Kind =>
8141 Write_Str ("Lit_Strings");
8143 when E_String_Literal_Subtype =>
8144 Write_Str ("String_Literal_Length");
8148 Write_Str ("Unset_Reference");
8151 Write_Str ("Field16??");
8153 end Write_Field16_Name;
8155 ------------------------
8156 -- Write_Field17_Name --
8157 ------------------------
8159 procedure Write_Field17_Name (Id : Entity_Id) is
8164 E_Generic_In_Out_Parameter |
8166 Write_Str ("Actual_Subtype");
8169 Write_Str ("Digits_Value");
8171 when E_Discriminant =>
8172 Write_Str ("Discriminal");
8181 E_Generic_Function |
8183 E_Generic_Procedure |
8191 E_Return_Statement |
8193 E_Subprogram_Type =>
8194 Write_Str ("First_Entity");
8197 Write_Str ("First_Index");
8199 when Enumeration_Kind =>
8200 Write_Str ("First_Literal");
8203 Write_Str ("Master_Id");
8205 when Modular_Integer_Kind =>
8206 Write_Str ("Modulus");
8208 when E_Incomplete_Type =>
8209 Write_Str ("Non_Limited_View");
8211 when E_Incomplete_Subtype =>
8212 if From_With_Type (Id) then
8213 Write_Str ("Non_Limited_View");
8217 Write_Str ("Prival");
8220 Write_Str ("Field17??");
8222 end Write_Field17_Name;
8224 ------------------------
8225 -- Write_Field18_Name --
8226 ------------------------
8228 procedure Write_Field18_Name (Id : Entity_Id) is
8231 when E_Enumeration_Literal |
8235 Write_Str ("Alias");
8237 when E_Record_Type =>
8238 Write_Str ("Corresponding_Concurrent_Type");
8240 when E_Subprogram_Body =>
8241 Write_Str ("Corresponding_Protected_Entry");
8243 when Concurrent_Kind =>
8244 Write_Str ("Corresponding_Record_Type");
8249 Write_Str ("Enclosing_Scope");
8251 when E_Entry_Index_Parameter =>
8252 Write_Str ("Entry_Index_Constant");
8254 when E_Class_Wide_Subtype |
8255 E_Access_Protected_Subprogram_Type |
8256 E_Anonymous_Access_Protected_Subprogram_Type |
8257 E_Access_Subprogram_Type |
8259 Write_Str ("Equivalent_Type");
8261 when Fixed_Point_Kind =>
8262 Write_Str ("Delta_Value");
8264 when Incomplete_Or_Private_Kind |
8266 Write_Str ("Private_Dependents");
8269 Write_Str ("Renamed_Object");
8273 E_Generic_Function |
8274 E_Generic_Procedure |
8275 E_Generic_Package =>
8276 Write_Str ("Renamed_Entity");
8279 Write_Str ("Field18??");
8281 end Write_Field18_Name;
8283 -----------------------
8284 -- Write_Field19_Name --
8285 -----------------------
8287 procedure Write_Field19_Name (Id : Entity_Id) is
8291 E_Generic_Package =>
8292 Write_Str ("Body_Entity");
8294 when E_Discriminant =>
8295 Write_Str ("Corresponding_Discriminant");
8297 when E_Record_Type =>
8298 Write_Str ("Parent_Subtype");
8302 Write_Str ("Related_Array_Object");
8306 Write_Str ("Size_Check_Code");
8308 when E_Package_Body |
8310 Write_Str ("Spec_Entity");
8312 when Private_Kind =>
8313 Write_Str ("Underlying_Full_View");
8316 Write_Str ("Field19??");
8318 end Write_Field19_Name;
8320 -----------------------
8321 -- Write_Field20_Name --
8322 -----------------------
8324 procedure Write_Field20_Name (Id : Entity_Id) is
8328 Write_Str ("Component_Type");
8330 when E_In_Parameter |
8331 E_Generic_In_Parameter =>
8332 Write_Str ("Default_Value");
8335 Write_Str ("Directly_Designated_Type");
8338 Write_Str ("Discriminant_Checking_Func");
8340 when E_Discriminant =>
8341 Write_Str ("Discriminant_Default_Value");
8350 E_Generic_Function |
8352 E_Generic_Procedure |
8360 E_Return_Statement |
8362 E_Subprogram_Type =>
8363 Write_Str ("Last_Entity");
8367 Write_Str ("Prival_Link");
8370 Write_Str ("Scalar_Range");
8373 Write_Str ("Register_Exception_Call");
8376 Write_Str ("Field20??");
8378 end Write_Field20_Name;
8380 -----------------------
8381 -- Write_Field21_Name --
8382 -----------------------
8384 procedure Write_Field21_Name (Id : Entity_Id) is
8388 Write_Str ("Accept_Address");
8390 when E_In_Parameter =>
8391 Write_Str ("Default_Expr_Function");
8393 when Concurrent_Kind |
8394 Incomplete_Or_Private_Kind |
8398 Write_Str ("Discriminant_Constraint");
8403 E_Generic_Function |
8405 E_Generic_Procedure |
8407 Write_Str ("Interface_Name");
8410 Modular_Integer_Kind =>
8411 Write_Str ("Original_Array_Type");
8413 when Fixed_Point_Kind =>
8414 Write_Str ("Small_Value");
8417 Write_Str ("Field21??");
8419 end Write_Field21_Name;
8421 -----------------------
8422 -- Write_Field22_Name --
8423 -----------------------
8425 procedure Write_Field22_Name (Id : Entity_Id) is
8429 Write_Str ("Associated_Storage_Pool");
8432 Write_Str ("Component_Size");
8434 when E_Record_Type =>
8435 Write_Str ("Corresponding_Remote_Type");
8439 Write_Str ("Original_Record_Component");
8441 when E_Enumeration_Literal =>
8442 Write_Str ("Enumeration_Rep_Expr");
8445 Write_Str ("Exception_Code");
8447 when E_Record_Type_With_Private |
8448 E_Record_Subtype_With_Private |
8451 E_Limited_Private_Type |
8452 E_Limited_Private_Subtype =>
8453 Write_Str ("Private_View");
8456 Write_Str ("Protected_Formal");
8466 E_Generic_Function |
8467 E_Generic_Procedure |
8470 E_Return_Statement |
8473 Write_Str ("Scope_Depth_Value");
8476 Write_Str ("Shared_Var_Procs_Instance");
8479 Write_Str ("Field22??");
8481 end Write_Field22_Name;
8483 ------------------------
8484 -- Write_Field23_Name --
8485 ------------------------
8487 procedure Write_Field23_Name (Id : Entity_Id) is
8490 when E_Discriminant =>
8491 Write_Str ("CR_Discriminant");
8494 Write_Str ("Entry_Cancel_Parameter");
8496 when E_Enumeration_Type =>
8497 Write_Str ("Enum_Pos_To_Rep");
8501 Write_Str ("Extra_Constrained");
8504 Write_Str ("Finalization_Master");
8506 when E_Generic_Function |
8508 E_Generic_Procedure =>
8509 Write_Str ("Inner_Instances");
8512 Write_Str ("Packed_Array_Type");
8515 Write_Str ("Protection_Object");
8517 when Concurrent_Kind |
8518 Incomplete_Or_Private_Kind |
8522 Write_Str ("Stored_Constraint");
8526 if Present (Scope (Id))
8527 and then Is_Protected_Type (Scope (Id))
8529 Write_Str ("Protection_Object");
8531 Write_Str ("Generic_Renamings");
8535 if Is_Generic_Instance (Id) then
8536 Write_Str ("Generic_Renamings");
8538 Write_Str ("Limited_View");
8542 Write_Str ("Field23??");
8544 end Write_Field23_Name;
8546 ------------------------
8547 -- Write_Field24_Name --
8548 ------------------------
8550 procedure Write_Field24_Name (Id : Entity_Id) is
8555 Write_Str ("Finalizer");
8560 Write_Str ("Related_Expression");
8565 Generic_Subprogram_Kind =>
8566 Write_Str ("Contract");
8569 Write_Str ("Field24???");
8571 end Write_Field24_Name;
8573 ------------------------
8574 -- Write_Field25_Name --
8575 ------------------------
8577 procedure Write_Field25_Name (Id : Entity_Id) is
8581 Write_Str ("Debug_Renaming_Link");
8584 Write_Str ("DT_Offset_To_Top_Func");
8588 Write_Str ("Interface_Alias");
8590 when E_Record_Type |
8592 E_Record_Type_With_Private |
8593 E_Record_Subtype_With_Private =>
8594 Write_Str ("Interfaces");
8597 Write_Str ("Task_Body_Procedure");
8601 Write_Str ("PPC_Wrapper");
8603 when E_Enumeration_Subtype |
8604 E_Modular_Integer_Subtype |
8605 E_Signed_Integer_Subtype =>
8606 Write_Str ("Static_Predicate");
8609 Write_Str ("Field25??");
8611 end Write_Field25_Name;
8613 ------------------------
8614 -- Write_Field26_Name --
8615 ------------------------
8617 procedure Write_Field26_Name (Id : Entity_Id) is
8620 when E_Record_Type |
8621 E_Record_Type_With_Private =>
8622 Write_Str ("Dispatch_Table_Wrappers");
8624 when E_In_Out_Parameter |
8627 Write_Str ("Last_Assignment");
8629 when E_Access_Subprogram_Type =>
8630 Write_Str ("Original_Access_Type");
8632 when E_Generic_Package |
8634 Write_Str ("Package_Instantiation");
8638 Write_Str ("Related_Type");
8641 Write_Str ("Relative_Deadline_Variable");
8645 if Ekind (Id) = E_Procedure
8646 and then not Is_Dispatching_Operation (Id)
8648 Write_Str ("Static_Initialization");
8650 Write_Str ("Overridden_Operation");
8654 Write_Str ("Field26??");
8656 end Write_Field26_Name;
8658 ------------------------
8659 -- Write_Field27_Name --
8660 ------------------------
8662 procedure Write_Field27_Name (Id : Entity_Id) is
8667 Write_Str ("Current_Use_Clause");
8672 Write_Str ("Related_Type");
8675 Write_Str ("Wrapped_Entity");
8678 Write_Str ("Field27??");
8680 end Write_Field27_Name;
8682 ------------------------
8683 -- Write_Field28_Name --
8684 ------------------------
8686 procedure Write_Field28_Name (Id : Entity_Id) is
8694 E_Subprogram_Type =>
8695 Write_Str ("Extra_Formals");
8697 when E_Record_Type =>
8698 Write_Str ("Underlying_Record_View");
8701 Write_Str ("Field28??");
8703 end Write_Field28_Name;
8705 procedure Write_Field29_Name (Id : Entity_Id) is
8709 Write_Str ("Subprograms_For_Type");
8712 Write_Str ("Field29??");
8714 end Write_Field29_Name;
8716 -------------------------
8717 -- Iterator Procedures --
8718 -------------------------
8720 procedure Proc_Next_Component (N : in out Node_Id) is
8722 N := Next_Component (N);
8723 end Proc_Next_Component;
8725 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8727 N := Next_Entity (N);
8728 while Present (N) loop
8729 exit when Ekind_In (N, E_Component, E_Discriminant);
8730 N := Next_Entity (N);
8732 end Proc_Next_Component_Or_Discriminant;
8734 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8736 N := Next_Discriminant (N);
8737 end Proc_Next_Discriminant;
8739 procedure Proc_Next_Formal (N : in out Node_Id) is
8741 N := Next_Formal (N);
8742 end Proc_Next_Formal;
8744 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8746 N := Next_Formal_With_Extras (N);
8747 end Proc_Next_Formal_With_Extras;
8749 procedure Proc_Next_Index (N : in out Node_Id) is
8751 N := Next_Index (N);
8752 end Proc_Next_Index;
8754 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8756 N := Next_Inlined_Subprogram (N);
8757 end Proc_Next_Inlined_Subprogram;
8759 procedure Proc_Next_Literal (N : in out Node_Id) is
8761 N := Next_Literal (N);
8762 end Proc_Next_Literal;
8764 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8766 N := Next_Stored_Discriminant (N);
8767 end Proc_Next_Stored_Discriminant;