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 -- Associated_Collection Node23
199 -- CR_Discriminant Node23
200 -- Entry_Cancel_Parameter Node23
201 -- Enum_Pos_To_Rep Node23
202 -- Extra_Constrained 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 -- Is_Processed_Transient Flag252
523 -- Is_Postcondition_Proc Flag253
529 -----------------------
530 -- Local subprograms --
531 -----------------------
533 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
534 -- Returns the attribute definition clause for Id whose name is Rep_Name.
535 -- Returns Empty if no matching attribute definition clause found for Id.
541 function Float_Rep (Id : E) return F is
542 pragma Assert (Is_Floating_Point_Type (Id));
544 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
551 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
555 Ritem := First_Rep_Item (Id);
556 while Present (Ritem) loop
557 if Nkind (Ritem) = N_Attribute_Definition_Clause
558 and then Chars (Ritem) = Rep_Name
562 Next_Rep_Item (Ritem);
569 --------------------------------
570 -- Attribute Access Functions --
571 --------------------------------
573 function Accept_Address (Id : E) return L is
578 function Access_Disp_Table (Id : E) return L is
580 pragma Assert (Ekind_In (Id, E_Record_Type,
582 return Elist16 (Implementation_Base_Type (Id));
583 end Access_Disp_Table;
585 function Actual_Subtype (Id : E) return E is
588 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
589 or else Is_Formal (Id));
593 function Address_Taken (Id : E) return B is
598 function Alias (Id : E) return E is
601 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
605 function Alignment (Id : E) return U is
607 pragma Assert (Is_Type (Id)
608 or else Is_Formal (Id)
609 or else Ekind_In (Id, E_Loop_Parameter,
616 function Associated_Collection (Id : E) return E is
618 pragma Assert (Is_Access_Type (Id));
620 end Associated_Collection;
622 function Associated_Formal_Package (Id : E) return E is
624 pragma Assert (Ekind (Id) = E_Package);
626 end Associated_Formal_Package;
628 function Associated_Node_For_Itype (Id : E) return N is
631 end Associated_Node_For_Itype;
633 function Associated_Storage_Pool (Id : E) return E is
635 pragma Assert (Is_Access_Type (Id));
636 return Node22 (Root_Type (Id));
637 end Associated_Storage_Pool;
639 function Barrier_Function (Id : E) return N is
641 pragma Assert (Is_Entry (Id));
643 end Barrier_Function;
645 function Block_Node (Id : E) return N is
647 pragma Assert (Ekind (Id) = E_Block);
651 function Body_Entity (Id : E) return E is
653 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
657 function Body_Needed_For_SAL (Id : E) return B is
660 (Ekind (Id) = E_Package
661 or else Is_Subprogram (Id)
662 or else Is_Generic_Unit (Id));
664 end Body_Needed_For_SAL;
666 function C_Pass_By_Copy (Id : E) return B is
668 pragma Assert (Is_Record_Type (Id));
669 return Flag125 (Implementation_Base_Type (Id));
672 function Can_Never_Be_Null (Id : E) return B is
675 end Can_Never_Be_Null;
677 function Checks_May_Be_Suppressed (Id : E) return B is
680 end Checks_May_Be_Suppressed;
682 function Class_Wide_Type (Id : E) return E is
684 pragma Assert (Is_Type (Id));
688 function Cloned_Subtype (Id : E) return E is
690 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
694 function Component_Bit_Offset (Id : E) return U is
696 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
698 end Component_Bit_Offset;
700 function Component_Clause (Id : E) return N is
702 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
704 end Component_Clause;
706 function Component_Size (Id : E) return U is
708 pragma Assert (Is_Array_Type (Id));
709 return Uint22 (Implementation_Base_Type (Id));
712 function Component_Type (Id : E) return E is
714 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
715 return Node20 (Implementation_Base_Type (Id));
718 function Corresponding_Concurrent_Type (Id : E) return E is
720 pragma Assert (Ekind (Id) = E_Record_Type);
722 end Corresponding_Concurrent_Type;
724 function Corresponding_Discriminant (Id : E) return E is
726 pragma Assert (Ekind (Id) = E_Discriminant);
728 end Corresponding_Discriminant;
730 function Corresponding_Equality (Id : E) return E is
733 (Ekind (Id) = E_Function
734 and then not Comes_From_Source (Id)
735 and then Chars (Id) = Name_Op_Ne);
737 end Corresponding_Equality;
739 function Corresponding_Protected_Entry (Id : E) return E is
741 pragma Assert (Ekind (Id) = E_Subprogram_Body);
743 end Corresponding_Protected_Entry;
745 function Corresponding_Record_Type (Id : E) return E is
747 pragma Assert (Is_Concurrent_Type (Id));
749 end Corresponding_Record_Type;
751 function Corresponding_Remote_Type (Id : E) return E is
754 end Corresponding_Remote_Type;
756 function Current_Use_Clause (Id : E) return E is
758 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
760 end Current_Use_Clause;
762 function Current_Value (Id : E) return N is
764 pragma Assert (Ekind (Id) in Object_Kind);
768 function CR_Discriminant (Id : E) return E is
773 function Debug_Info_Off (Id : E) return B is
778 function Debug_Renaming_Link (Id : E) return E is
781 end Debug_Renaming_Link;
783 function Default_Expr_Function (Id : E) return E is
785 pragma Assert (Is_Formal (Id));
787 end Default_Expr_Function;
789 function Default_Expressions_Processed (Id : E) return B is
792 end Default_Expressions_Processed;
794 function Default_Value (Id : E) return N is
796 pragma Assert (Is_Formal (Id));
800 function Delay_Cleanups (Id : E) return B is
805 function Delay_Subprogram_Descriptors (Id : E) return B is
808 end Delay_Subprogram_Descriptors;
810 function Delta_Value (Id : E) return R is
812 pragma Assert (Is_Fixed_Point_Type (Id));
816 function Dependent_Instances (Id : E) return L is
818 pragma Assert (Is_Generic_Instance (Id));
820 end Dependent_Instances;
822 function Depends_On_Private (Id : E) return B is
824 pragma Assert (Nkind (Id) in N_Entity);
826 end Depends_On_Private;
828 function Digits_Value (Id : E) return U is
831 (Is_Floating_Point_Type (Id)
832 or else Is_Decimal_Fixed_Point_Type (Id));
836 function Direct_Primitive_Operations (Id : E) return L is
838 pragma Assert (Is_Tagged_Type (Id));
840 end Direct_Primitive_Operations;
842 function Directly_Designated_Type (Id : E) return E is
844 pragma Assert (Is_Access_Type (Id));
846 end Directly_Designated_Type;
848 function Discard_Names (Id : E) return B is
853 function Discriminal (Id : E) return E is
855 pragma Assert (Ekind (Id) = E_Discriminant);
859 function Discriminal_Link (Id : E) return N is
862 end Discriminal_Link;
864 function Discriminant_Checking_Func (Id : E) return E is
866 pragma Assert (Ekind (Id) = E_Component);
868 end Discriminant_Checking_Func;
870 function Discriminant_Constraint (Id : E) return L is
872 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
874 end Discriminant_Constraint;
876 function Discriminant_Default_Value (Id : E) return N is
878 pragma Assert (Ekind (Id) = E_Discriminant);
880 end Discriminant_Default_Value;
882 function Discriminant_Number (Id : E) return U is
884 pragma Assert (Ekind (Id) = E_Discriminant);
886 end Discriminant_Number;
888 function Dispatch_Table_Wrappers (Id : E) return L is
890 pragma Assert (Ekind_In (Id, E_Record_Type,
892 return Elist26 (Implementation_Base_Type (Id));
893 end Dispatch_Table_Wrappers;
895 function DT_Entry_Count (Id : E) return U is
897 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
901 function DT_Offset_To_Top_Func (Id : E) return E is
903 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
905 end DT_Offset_To_Top_Func;
907 function DT_Position (Id : E) return U is
909 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
910 and then Present (DTC_Entity (Id)));
914 function DTC_Entity (Id : E) return E is
916 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
920 function Elaborate_Body_Desirable (Id : E) return B is
922 pragma Assert (Ekind (Id) = E_Package);
924 end Elaborate_Body_Desirable;
926 function Elaboration_Entity (Id : E) return E is
931 Ekind (Id) = E_Package
933 Is_Generic_Unit (Id));
935 end Elaboration_Entity;
937 function Elaboration_Entity_Required (Id : E) return B is
942 Ekind (Id) = E_Package
944 Is_Generic_Unit (Id));
946 end Elaboration_Entity_Required;
948 function Enclosing_Scope (Id : E) return E is
953 function Entry_Accepted (Id : E) return B is
955 pragma Assert (Is_Entry (Id));
959 function Entry_Bodies_Array (Id : E) return E is
962 end Entry_Bodies_Array;
964 function Entry_Cancel_Parameter (Id : E) return E is
967 end Entry_Cancel_Parameter;
969 function Entry_Component (Id : E) return E is
974 function Entry_Formal (Id : E) return E is
979 function Entry_Index_Constant (Id : E) return N is
981 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
983 end Entry_Index_Constant;
985 function Contract (Id : E) return N is
988 (Ekind_In (Id, E_Entry, E_Entry_Family)
989 or else Is_Subprogram (Id)
990 or else Is_Generic_Subprogram (Id));
994 function Entry_Parameters_Type (Id : E) return E is
997 end Entry_Parameters_Type;
999 function Enum_Pos_To_Rep (Id : E) return E is
1001 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1003 end Enum_Pos_To_Rep;
1005 function Enumeration_Pos (Id : E) return Uint is
1007 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1009 end Enumeration_Pos;
1011 function Enumeration_Rep (Id : E) return U is
1013 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1015 end Enumeration_Rep;
1017 function Enumeration_Rep_Expr (Id : E) return N is
1019 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1021 end Enumeration_Rep_Expr;
1023 function Equivalent_Type (Id : E) return E is
1026 (Ekind_In (Id, E_Class_Wide_Type,
1027 E_Class_Wide_Subtype,
1028 E_Access_Protected_Subprogram_Type,
1029 E_Anonymous_Access_Protected_Subprogram_Type,
1030 E_Access_Subprogram_Type,
1033 end Equivalent_Type;
1035 function Esize (Id : E) return Uint is
1040 function Exception_Code (Id : E) return Uint is
1042 pragma Assert (Ekind (Id) = E_Exception);
1046 function Extra_Accessibility (Id : E) return E is
1048 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1050 end Extra_Accessibility;
1052 function Extra_Constrained (Id : E) return E is
1054 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1056 end Extra_Constrained;
1058 function Extra_Formal (Id : E) return E is
1063 function Extra_Formals (Id : E) return E is
1066 (Is_Overloadable (Id)
1067 or else Ekind_In (Id, E_Entry_Family,
1069 E_Subprogram_Type));
1073 function Can_Use_Internal_Rep (Id : E) return B is
1075 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1076 return Flag229 (Base_Type (Id));
1077 end Can_Use_Internal_Rep;
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_Atomic_Components (Id : E) return B is
1188 return Flag86 (Implementation_Base_Type (Id));
1189 end Has_Atomic_Components;
1191 function Has_Biased_Representation (Id : E) return B is
1193 return Flag139 (Id);
1194 end Has_Biased_Representation;
1196 function Has_Completion (Id : E) return B is
1201 function Has_Completion_In_Body (Id : E) return B is
1203 pragma Assert (Is_Type (Id));
1205 end Has_Completion_In_Body;
1207 function Has_Complex_Representation (Id : E) return B is
1209 pragma Assert (Is_Type (Id));
1210 return Flag140 (Implementation_Base_Type (Id));
1211 end Has_Complex_Representation;
1213 function Has_Component_Size_Clause (Id : E) return B is
1215 pragma Assert (Is_Array_Type (Id));
1216 return Flag68 (Implementation_Base_Type (Id));
1217 end Has_Component_Size_Clause;
1219 function Has_Constrained_Partial_View (Id : E) return B is
1221 pragma Assert (Is_Type (Id));
1222 return Flag187 (Id);
1223 end Has_Constrained_Partial_View;
1225 function Has_Controlled_Component (Id : E) return B is
1227 return Flag43 (Base_Type (Id));
1228 end Has_Controlled_Component;
1230 function Has_Contiguous_Rep (Id : E) return B is
1232 return Flag181 (Id);
1233 end Has_Contiguous_Rep;
1235 function Has_Controlling_Result (Id : E) return B is
1238 end Has_Controlling_Result;
1240 function Has_Convention_Pragma (Id : E) return B is
1242 return Flag119 (Id);
1243 end Has_Convention_Pragma;
1245 function Has_Default_Aspect (Id : E) return B is
1247 return Flag39 (Base_Type (Id));
1248 end Has_Default_Aspect;
1250 function Has_Delayed_Aspects (Id : E) return B is
1252 pragma Assert (Nkind (Id) in N_Entity);
1253 return Flag200 (Id);
1254 end Has_Delayed_Aspects;
1256 function Has_Delayed_Freeze (Id : E) return B is
1258 pragma Assert (Nkind (Id) in N_Entity);
1260 end Has_Delayed_Freeze;
1262 function Has_Discriminants (Id : E) return B is
1264 pragma Assert (Nkind (Id) in N_Entity);
1266 end Has_Discriminants;
1268 function Has_Dispatch_Table (Id : E) return B is
1270 pragma Assert (Is_Tagged_Type (Id));
1271 return Flag220 (Id);
1272 end Has_Dispatch_Table;
1274 function Has_Enumeration_Rep_Clause (Id : E) return B is
1276 pragma Assert (Is_Enumeration_Type (Id));
1278 end Has_Enumeration_Rep_Clause;
1280 function Has_Exit (Id : E) return B is
1285 function Has_External_Tag_Rep_Clause (Id : E) return B is
1287 pragma Assert (Is_Tagged_Type (Id));
1288 return Flag110 (Id);
1289 end Has_External_Tag_Rep_Clause;
1291 function Has_Forward_Instantiation (Id : E) return B is
1293 return Flag175 (Id);
1294 end Has_Forward_Instantiation;
1296 function Has_Fully_Qualified_Name (Id : E) return B is
1298 return Flag173 (Id);
1299 end Has_Fully_Qualified_Name;
1301 function Has_Gigi_Rep_Item (Id : E) return B is
1304 end Has_Gigi_Rep_Item;
1306 function Has_Homonym (Id : E) return B is
1311 function Has_Inheritable_Invariants (Id : E) return B is
1313 pragma Assert (Is_Type (Id));
1314 return Flag248 (Id);
1315 end Has_Inheritable_Invariants;
1317 function Has_Initial_Value (Id : E) return B is
1319 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1320 return Flag219 (Id);
1321 end Has_Initial_Value;
1323 function Has_Invariants (Id : E) return B is
1325 pragma Assert (Is_Type (Id)
1326 or else Ekind (Id) = E_Procedure
1327 or else Ekind (Id) = E_Generic_Procedure);
1328 return Flag232 (Id);
1331 function Has_Machine_Radix_Clause (Id : E) return B is
1333 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1335 end Has_Machine_Radix_Clause;
1337 function Has_Master_Entity (Id : E) return B is
1340 end Has_Master_Entity;
1342 function Has_Missing_Return (Id : E) return B is
1344 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1345 return Flag142 (Id);
1346 end Has_Missing_Return;
1348 function Has_Nested_Block_With_Handler (Id : E) return B is
1350 return Flag101 (Id);
1351 end Has_Nested_Block_With_Handler;
1353 function Has_Non_Standard_Rep (Id : E) return B is
1355 return Flag75 (Implementation_Base_Type (Id));
1356 end Has_Non_Standard_Rep;
1358 function Has_Object_Size_Clause (Id : E) return B is
1360 pragma Assert (Is_Type (Id));
1361 return Flag172 (Id);
1362 end Has_Object_Size_Clause;
1364 function Has_Per_Object_Constraint (Id : E) return B is
1366 return Flag154 (Id);
1367 end Has_Per_Object_Constraint;
1369 function Has_Persistent_BSS (Id : E) return B is
1371 return Flag188 (Id);
1372 end Has_Persistent_BSS;
1374 function Has_Postconditions (Id : E) return B is
1376 pragma Assert (Is_Subprogram (Id));
1377 return Flag240 (Id);
1378 end Has_Postconditions;
1380 function Has_Pragma_Controlled (Id : E) return B is
1382 pragma Assert (Is_Access_Type (Id));
1383 return Flag27 (Implementation_Base_Type (Id));
1384 end Has_Pragma_Controlled;
1386 function Has_Pragma_Elaborate_Body (Id : E) return B is
1388 return Flag150 (Id);
1389 end Has_Pragma_Elaborate_Body;
1391 function Has_Pragma_Inline (Id : E) return B is
1393 return Flag157 (Id);
1394 end Has_Pragma_Inline;
1396 function Has_Pragma_Inline_Always (Id : E) return B is
1398 return Flag230 (Id);
1399 end Has_Pragma_Inline_Always;
1401 function Has_Pragma_Ordered (Id : E) return B is
1403 pragma Assert (Is_Enumeration_Type (Id));
1404 return Flag198 (Implementation_Base_Type (Id));
1405 end Has_Pragma_Ordered;
1407 function Has_Pragma_Pack (Id : E) return B is
1409 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1410 return Flag121 (Implementation_Base_Type (Id));
1411 end Has_Pragma_Pack;
1413 function Has_Pragma_Preelab_Init (Id : E) return B is
1415 return Flag221 (Id);
1416 end Has_Pragma_Preelab_Init;
1418 function Has_Pragma_Pure (Id : E) return B is
1420 return Flag203 (Id);
1421 end Has_Pragma_Pure;
1423 function Has_Pragma_Pure_Function (Id : E) return B is
1425 return Flag179 (Id);
1426 end Has_Pragma_Pure_Function;
1428 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1430 return Flag169 (Id);
1431 end Has_Pragma_Thread_Local_Storage;
1433 function Has_Pragma_Unmodified (Id : E) return B is
1435 return Flag233 (Id);
1436 end Has_Pragma_Unmodified;
1438 function Has_Pragma_Unreferenced (Id : E) return B is
1440 return Flag180 (Id);
1441 end Has_Pragma_Unreferenced;
1443 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1445 pragma Assert (Is_Type (Id));
1446 return Flag212 (Id);
1447 end Has_Pragma_Unreferenced_Objects;
1449 function Has_Predicates (Id : E) return B is
1451 return Flag250 (Id);
1454 function Has_Primitive_Operations (Id : E) return B is
1456 pragma Assert (Is_Type (Id));
1457 return Flag120 (Base_Type (Id));
1458 end Has_Primitive_Operations;
1460 function Has_Private_Ancestor (Id : E) return B is
1462 return Flag151 (Id);
1463 end Has_Private_Ancestor;
1465 function Has_Private_Declaration (Id : E) return B is
1467 return Flag155 (Id);
1468 end Has_Private_Declaration;
1470 function Has_Qualified_Name (Id : E) return B is
1472 return Flag161 (Id);
1473 end Has_Qualified_Name;
1475 function Has_RACW (Id : E) return B is
1477 pragma Assert (Ekind (Id) = E_Package);
1478 return Flag214 (Id);
1481 function Has_Record_Rep_Clause (Id : E) return B is
1483 pragma Assert (Is_Record_Type (Id));
1484 return Flag65 (Implementation_Base_Type (Id));
1485 end Has_Record_Rep_Clause;
1487 function Has_Recursive_Call (Id : E) return B is
1489 pragma Assert (Is_Subprogram (Id));
1490 return Flag143 (Id);
1491 end Has_Recursive_Call;
1493 function Has_Size_Clause (Id : E) return B is
1496 end Has_Size_Clause;
1498 function Has_Small_Clause (Id : E) return B is
1501 end Has_Small_Clause;
1503 function Has_Specified_Layout (Id : E) return B is
1505 pragma Assert (Is_Type (Id));
1506 return Flag100 (Implementation_Base_Type (Id));
1507 end Has_Specified_Layout;
1509 function Has_Specified_Stream_Input (Id : E) return B is
1511 pragma Assert (Is_Type (Id));
1512 return Flag190 (Id);
1513 end Has_Specified_Stream_Input;
1515 function Has_Specified_Stream_Output (Id : E) return B is
1517 pragma Assert (Is_Type (Id));
1518 return Flag191 (Id);
1519 end Has_Specified_Stream_Output;
1521 function Has_Specified_Stream_Read (Id : E) return B is
1523 pragma Assert (Is_Type (Id));
1524 return Flag192 (Id);
1525 end Has_Specified_Stream_Read;
1527 function Has_Specified_Stream_Write (Id : E) return B is
1529 pragma Assert (Is_Type (Id));
1530 return Flag193 (Id);
1531 end Has_Specified_Stream_Write;
1533 function Has_Static_Discriminants (Id : E) return B is
1535 pragma Assert (Is_Type (Id));
1536 return Flag211 (Id);
1537 end Has_Static_Discriminants;
1539 function Has_Storage_Size_Clause (Id : E) return B is
1541 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1542 return Flag23 (Implementation_Base_Type (Id));
1543 end Has_Storage_Size_Clause;
1545 function Has_Stream_Size_Clause (Id : E) return B is
1547 return Flag184 (Id);
1548 end Has_Stream_Size_Clause;
1550 function Has_Subprogram_Descriptor (Id : E) return B is
1553 end Has_Subprogram_Descriptor;
1555 function Has_Task (Id : E) return B is
1557 return Flag30 (Base_Type (Id));
1560 function Has_Thunks (Id : E) return B is
1562 return Flag228 (Id);
1565 function Has_Unchecked_Union (Id : E) return B is
1567 return Flag123 (Base_Type (Id));
1568 end Has_Unchecked_Union;
1570 function Has_Unknown_Discriminants (Id : E) return B is
1572 pragma Assert (Is_Type (Id));
1574 end Has_Unknown_Discriminants;
1576 function Has_Up_Level_Access (Id : E) return B is
1579 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1580 return Flag215 (Id);
1581 end Has_Up_Level_Access;
1583 function Has_Volatile_Components (Id : E) return B is
1585 return Flag87 (Implementation_Base_Type (Id));
1586 end Has_Volatile_Components;
1588 function Has_Xref_Entry (Id : E) return B is
1590 return Flag182 (Implementation_Base_Type (Id));
1593 function Hiding_Loop_Variable (Id : E) return E is
1595 pragma Assert (Ekind (Id) = E_Variable);
1597 end Hiding_Loop_Variable;
1599 function Homonym (Id : E) return E is
1604 function Interface_Alias (Id : E) return E is
1606 pragma Assert (Is_Subprogram (Id));
1608 end Interface_Alias;
1610 function Interfaces (Id : E) return L is
1612 pragma Assert (Is_Record_Type (Id));
1613 return Elist25 (Id);
1616 function In_Package_Body (Id : E) return B is
1619 end In_Package_Body;
1621 function In_Private_Part (Id : E) return B is
1624 end In_Private_Part;
1626 function In_Use (Id : E) return B is
1628 pragma Assert (Nkind (Id) in N_Entity);
1632 function Inner_Instances (Id : E) return L is
1634 return Elist23 (Id);
1635 end Inner_Instances;
1637 function Interface_Name (Id : E) return N is
1642 function Is_Abstract_Subprogram (Id : E) return B is
1644 pragma Assert (Is_Overloadable (Id));
1646 end Is_Abstract_Subprogram;
1648 function Is_Abstract_Type (Id : E) return B is
1650 pragma Assert (Is_Type (Id));
1651 return Flag146 (Id);
1652 end Is_Abstract_Type;
1654 function Is_Local_Anonymous_Access (Id : E) return B is
1656 pragma Assert (Is_Access_Type (Id));
1657 return Flag194 (Id);
1658 end Is_Local_Anonymous_Access;
1660 function Is_Access_Constant (Id : E) return B is
1662 pragma Assert (Is_Access_Type (Id));
1664 end Is_Access_Constant;
1666 function Is_Ada_2005_Only (Id : E) return B is
1668 return Flag185 (Id);
1669 end Is_Ada_2005_Only;
1671 function Is_Ada_2012_Only (Id : E) return B is
1673 return Flag199 (Id);
1674 end Is_Ada_2012_Only;
1676 function Is_Aliased (Id : E) return B is
1678 pragma Assert (Nkind (Id) in N_Entity);
1682 function Is_AST_Entry (Id : E) return B is
1684 pragma Assert (Is_Entry (Id));
1685 return Flag132 (Id);
1688 function Is_Asynchronous (Id : E) return B is
1690 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1692 end Is_Asynchronous;
1694 function Is_Atomic (Id : E) return B is
1699 function Is_Bit_Packed_Array (Id : E) return B is
1701 return Flag122 (Implementation_Base_Type (Id));
1702 end Is_Bit_Packed_Array;
1704 function Is_Called (Id : E) return B is
1706 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1707 return Flag102 (Id);
1710 function Is_Character_Type (Id : E) return B is
1713 end Is_Character_Type;
1715 function Is_Child_Unit (Id : E) return B is
1720 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1723 end Is_Class_Wide_Equivalent_Type;
1725 function Is_Compilation_Unit (Id : E) return B is
1727 return Flag149 (Id);
1728 end Is_Compilation_Unit;
1730 function Is_Completely_Hidden (Id : E) return B is
1732 pragma Assert (Ekind (Id) = E_Discriminant);
1733 return Flag103 (Id);
1734 end Is_Completely_Hidden;
1736 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1739 end Is_Constr_Subt_For_U_Nominal;
1741 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1743 return Flag141 (Id);
1744 end Is_Constr_Subt_For_UN_Aliased;
1746 function Is_Constrained (Id : E) return B is
1748 pragma Assert (Nkind (Id) in N_Entity);
1752 function Is_Constructor (Id : E) return B is
1757 function Is_Controlled (Id : E) return B is
1759 return Flag42 (Base_Type (Id));
1762 function Is_Controlling_Formal (Id : E) return B is
1764 pragma Assert (Is_Formal (Id));
1766 end Is_Controlling_Formal;
1768 function Is_CPP_Class (Id : E) return B is
1773 function Is_Descendent_Of_Address (Id : E) return B is
1775 pragma Assert (Is_Type (Id));
1776 return Flag223 (Id);
1777 end Is_Descendent_Of_Address;
1779 function Is_Discrim_SO_Function (Id : E) return B is
1781 return Flag176 (Id);
1782 end Is_Discrim_SO_Function;
1784 function Is_Dispatch_Table_Entity (Id : E) return B is
1786 return Flag234 (Id);
1787 end Is_Dispatch_Table_Entity;
1789 function Is_Dispatching_Operation (Id : E) return B is
1791 pragma Assert (Nkind (Id) in N_Entity);
1793 end Is_Dispatching_Operation;
1795 function Is_Eliminated (Id : E) return B is
1797 return Flag124 (Id);
1800 function Is_Entry_Formal (Id : E) return B is
1803 end Is_Entry_Formal;
1805 function Is_Exported (Id : E) return B is
1810 function Is_First_Subtype (Id : E) return B is
1813 end Is_First_Subtype;
1815 function Is_For_Access_Subtype (Id : E) return B is
1817 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1818 return Flag118 (Id);
1819 end Is_For_Access_Subtype;
1821 function Is_Formal_Subprogram (Id : E) return B is
1823 return Flag111 (Id);
1824 end Is_Formal_Subprogram;
1826 function Is_Frozen (Id : E) return B is
1831 function Is_Generic_Actual_Type (Id : E) return B is
1833 pragma Assert (Is_Type (Id));
1835 end Is_Generic_Actual_Type;
1837 function Is_Generic_Instance (Id : E) return B is
1839 return Flag130 (Id);
1840 end Is_Generic_Instance;
1842 function Is_Generic_Type (Id : E) return B is
1844 pragma Assert (Nkind (Id) in N_Entity);
1846 end Is_Generic_Type;
1848 function Is_Hidden (Id : E) return B is
1853 function Is_Hidden_Open_Scope (Id : E) return B is
1855 return Flag171 (Id);
1856 end Is_Hidden_Open_Scope;
1858 function Is_Immediately_Visible (Id : E) return B is
1860 pragma Assert (Nkind (Id) in N_Entity);
1862 end Is_Immediately_Visible;
1864 function Is_Imported (Id : E) return B is
1869 function Is_Inlined (Id : E) return B is
1874 function Is_Interface (Id : E) return B is
1876 return Flag186 (Id);
1879 function Is_Instantiated (Id : E) return B is
1881 return Flag126 (Id);
1882 end Is_Instantiated;
1884 function Is_Internal (Id : E) return B is
1886 pragma Assert (Nkind (Id) in N_Entity);
1890 function Is_Interrupt_Handler (Id : E) return B is
1892 pragma Assert (Nkind (Id) in N_Entity);
1894 end Is_Interrupt_Handler;
1896 function Is_Intrinsic_Subprogram (Id : E) return B is
1899 end Is_Intrinsic_Subprogram;
1901 function Is_Itype (Id : E) return B is
1906 function Is_Known_Non_Null (Id : E) return B is
1909 end Is_Known_Non_Null;
1911 function Is_Known_Null (Id : E) return B is
1913 return Flag204 (Id);
1916 function Is_Known_Valid (Id : E) return B is
1918 return Flag170 (Id);
1921 function Is_Limited_Composite (Id : E) return B is
1923 return Flag106 (Id);
1924 end Is_Limited_Composite;
1926 function Is_Limited_Interface (Id : E) return B is
1928 return Flag197 (Id);
1929 end Is_Limited_Interface;
1931 function Is_Limited_Record (Id : E) return B is
1934 end Is_Limited_Record;
1936 function Is_Machine_Code_Subprogram (Id : E) return B is
1938 pragma Assert (Is_Subprogram (Id));
1939 return Flag137 (Id);
1940 end Is_Machine_Code_Subprogram;
1942 function Is_Non_Static_Subtype (Id : E) return B is
1944 pragma Assert (Is_Type (Id));
1945 return Flag109 (Id);
1946 end Is_Non_Static_Subtype;
1948 function Is_Null_Init_Proc (Id : E) return B is
1950 pragma Assert (Ekind (Id) = E_Procedure);
1951 return Flag178 (Id);
1952 end Is_Null_Init_Proc;
1954 function Is_Obsolescent (Id : E) return B is
1956 return Flag153 (Id);
1959 function Is_Only_Out_Parameter (Id : E) return B is
1961 pragma Assert (Is_Formal (Id));
1962 return Flag226 (Id);
1963 end Is_Only_Out_Parameter;
1965 function Is_Optional_Parameter (Id : E) return B is
1967 pragma Assert (Is_Formal (Id));
1968 return Flag134 (Id);
1969 end Is_Optional_Parameter;
1971 function Is_Package_Body_Entity (Id : E) return B is
1973 return Flag160 (Id);
1974 end Is_Package_Body_Entity;
1976 function Is_Packed (Id : E) return B is
1978 return Flag51 (Implementation_Base_Type (Id));
1981 function Is_Packed_Array_Type (Id : E) return B is
1983 return Flag138 (Id);
1984 end Is_Packed_Array_Type;
1986 function Is_Postcondition_Proc (Id : E) return B is
1988 pragma Assert (Ekind (Id) = E_Procedure);
1989 return Flag253 (Id);
1990 end Is_Postcondition_Proc;
1992 function Is_Potentially_Use_Visible (Id : E) return B is
1994 pragma Assert (Nkind (Id) in N_Entity);
1996 end Is_Potentially_Use_Visible;
1998 function Is_Preelaborated (Id : E) return B is
2001 end Is_Preelaborated;
2003 function Is_Primitive (Id : E) return B is
2006 (Is_Overloadable (Id)
2007 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2008 return Flag218 (Id);
2011 function Is_Primitive_Wrapper (Id : E) return B is
2013 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2014 return Flag195 (Id);
2015 end Is_Primitive_Wrapper;
2017 function Is_Private_Composite (Id : E) return B is
2019 pragma Assert (Is_Type (Id));
2020 return Flag107 (Id);
2021 end Is_Private_Composite;
2023 function Is_Private_Descendant (Id : E) return B is
2026 end Is_Private_Descendant;
2028 function Is_Private_Primitive (Id : E) return B is
2030 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2031 return Flag245 (Id);
2032 end Is_Private_Primitive;
2034 function Is_Processed_Transient (Id : E) return B is
2036 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2037 return Flag252 (Id);
2038 end Is_Processed_Transient;
2040 function Is_Public (Id : E) return B is
2042 pragma Assert (Nkind (Id) in N_Entity);
2046 function Is_Pure (Id : E) return B is
2051 function Is_Pure_Unit_Access_Type (Id : E) return B is
2053 pragma Assert (Is_Access_Type (Id));
2054 return Flag189 (Id);
2055 end Is_Pure_Unit_Access_Type;
2057 function Is_RACW_Stub_Type (Id : E) return B is
2059 pragma Assert (Is_Type (Id));
2060 return Flag244 (Id);
2061 end Is_RACW_Stub_Type;
2063 function Is_Raised (Id : E) return B is
2065 pragma Assert (Ekind (Id) = E_Exception);
2066 return Flag224 (Id);
2069 function Is_Remote_Call_Interface (Id : E) return B is
2072 end Is_Remote_Call_Interface;
2074 function Is_Remote_Types (Id : E) return B is
2077 end Is_Remote_Types;
2079 function Is_Renaming_Of_Object (Id : E) return B is
2081 return Flag112 (Id);
2082 end Is_Renaming_Of_Object;
2084 function Is_Return_Object (Id : E) return B is
2086 return Flag209 (Id);
2087 end Is_Return_Object;
2089 function Is_Safe_To_Reevaluate (Id : E) return B is
2091 return Flag249 (Id);
2092 end Is_Safe_To_Reevaluate;
2094 function Is_Shared_Passive (Id : E) return B is
2097 end Is_Shared_Passive;
2099 function Is_Statically_Allocated (Id : E) return B is
2102 end Is_Statically_Allocated;
2104 function Is_Tag (Id : E) return B is
2106 pragma Assert (Nkind (Id) in N_Entity);
2110 function Is_Tagged_Type (Id : E) return B is
2115 function Is_Thunk (Id : E) return B is
2117 pragma Assert (Is_Subprogram (Id));
2118 return Flag225 (Id);
2121 function Is_Trivial_Subprogram (Id : E) return B is
2123 return Flag235 (Id);
2124 end Is_Trivial_Subprogram;
2126 function Is_True_Constant (Id : E) return B is
2128 return Flag163 (Id);
2129 end Is_True_Constant;
2131 function Is_Unchecked_Union (Id : E) return B is
2133 return Flag117 (Implementation_Base_Type (Id));
2134 end Is_Unchecked_Union;
2136 function Is_Underlying_Record_View (Id : E) return B is
2138 return Flag246 (Id);
2139 end Is_Underlying_Record_View;
2141 function Is_Unsigned_Type (Id : E) return B is
2143 pragma Assert (Is_Type (Id));
2144 return Flag144 (Id);
2145 end Is_Unsigned_Type;
2147 function Is_Valued_Procedure (Id : E) return B is
2149 pragma Assert (Ekind (Id) = E_Procedure);
2150 return Flag127 (Id);
2151 end Is_Valued_Procedure;
2153 function Is_Visible_Child_Unit (Id : E) return B is
2155 pragma Assert (Is_Child_Unit (Id));
2156 return Flag116 (Id);
2157 end Is_Visible_Child_Unit;
2159 function Is_Visible_Formal (Id : E) return B is
2161 return Flag206 (Id);
2162 end Is_Visible_Formal;
2164 function Is_VMS_Exception (Id : E) return B is
2166 return Flag133 (Id);
2167 end Is_VMS_Exception;
2169 function Is_Volatile (Id : E) return B is
2171 pragma Assert (Nkind (Id) in N_Entity);
2173 if Is_Type (Id) then
2174 return Flag16 (Base_Type (Id));
2180 function Itype_Printed (Id : E) return B is
2182 pragma Assert (Is_Itype (Id));
2183 return Flag202 (Id);
2186 function Kill_Elaboration_Checks (Id : E) return B is
2189 end Kill_Elaboration_Checks;
2191 function Kill_Range_Checks (Id : E) return B is
2194 end Kill_Range_Checks;
2196 function Kill_Tag_Checks (Id : E) return B is
2199 end Kill_Tag_Checks;
2201 function Known_To_Have_Preelab_Init (Id : E) return B is
2203 pragma Assert (Is_Type (Id));
2204 return Flag207 (Id);
2205 end Known_To_Have_Preelab_Init;
2207 function Last_Assignment (Id : E) return N is
2209 pragma Assert (Is_Assignable (Id));
2211 end Last_Assignment;
2213 function Last_Entity (Id : E) return E is
2218 function Limited_View (Id : E) return E is
2220 pragma Assert (Ekind (Id) = E_Package);
2224 function Lit_Indexes (Id : E) return E is
2226 pragma Assert (Is_Enumeration_Type (Id));
2230 function Lit_Strings (Id : E) return E is
2232 pragma Assert (Is_Enumeration_Type (Id));
2236 function Low_Bound_Tested (Id : E) return B is
2238 return Flag205 (Id);
2239 end Low_Bound_Tested;
2241 function Machine_Radix_10 (Id : E) return B is
2243 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2245 end Machine_Radix_10;
2247 function Master_Id (Id : E) return E is
2249 pragma Assert (Is_Access_Type (Id));
2253 function Materialize_Entity (Id : E) return B is
2255 return Flag168 (Id);
2256 end Materialize_Entity;
2258 function Mechanism (Id : E) return M is
2260 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2261 return UI_To_Int (Uint8 (Id));
2264 function Modulus (Id : E) return Uint is
2266 pragma Assert (Is_Modular_Integer_Type (Id));
2267 return Uint17 (Base_Type (Id));
2270 function Must_Be_On_Byte_Boundary (Id : E) return B is
2272 pragma Assert (Is_Type (Id));
2273 return Flag183 (Id);
2274 end Must_Be_On_Byte_Boundary;
2276 function Must_Have_Preelab_Init (Id : E) return B is
2278 pragma Assert (Is_Type (Id));
2279 return Flag208 (Id);
2280 end Must_Have_Preelab_Init;
2282 function Needs_Debug_Info (Id : E) return B is
2284 return Flag147 (Id);
2285 end Needs_Debug_Info;
2287 function Needs_No_Actuals (Id : E) return B is
2290 (Is_Overloadable (Id)
2291 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2293 end Needs_No_Actuals;
2295 function Never_Set_In_Source (Id : E) return B is
2297 return Flag115 (Id);
2298 end Never_Set_In_Source;
2300 function Next_Inlined_Subprogram (Id : E) return E is
2303 end Next_Inlined_Subprogram;
2305 function No_Pool_Assigned (Id : E) return B is
2307 pragma Assert (Is_Access_Type (Id));
2308 return Flag131 (Root_Type (Id));
2309 end No_Pool_Assigned;
2311 function No_Return (Id : E) return B is
2313 return Flag113 (Id);
2316 function No_Strict_Aliasing (Id : E) return B is
2318 pragma Assert (Is_Access_Type (Id));
2319 return Flag136 (Base_Type (Id));
2320 end No_Strict_Aliasing;
2322 function Non_Binary_Modulus (Id : E) return B is
2324 pragma Assert (Is_Type (Id));
2325 return Flag58 (Base_Type (Id));
2326 end Non_Binary_Modulus;
2328 function Non_Limited_View (Id : E) return E is
2330 pragma Assert (Ekind (Id) in Incomplete_Kind);
2332 end Non_Limited_View;
2334 function Nonzero_Is_True (Id : E) return B is
2336 pragma Assert (Root_Type (Id) = Standard_Boolean);
2337 return Flag162 (Base_Type (Id));
2338 end Nonzero_Is_True;
2340 function Normalized_First_Bit (Id : E) return U is
2342 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2344 end Normalized_First_Bit;
2346 function Normalized_Position (Id : E) return U is
2348 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2350 end Normalized_Position;
2352 function Normalized_Position_Max (Id : E) return U is
2354 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2356 end Normalized_Position_Max;
2358 function OK_To_Rename (Id : E) return B is
2360 pragma Assert (Ekind (Id) = E_Variable);
2361 return Flag247 (Id);
2364 function OK_To_Reorder_Components (Id : E) return B is
2366 pragma Assert (Is_Record_Type (Id));
2367 return Flag239 (Base_Type (Id));
2368 end OK_To_Reorder_Components;
2370 function Optimize_Alignment_Space (Id : E) return B is
2373 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2374 return Flag241 (Id);
2375 end Optimize_Alignment_Space;
2377 function Optimize_Alignment_Time (Id : E) return B is
2380 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2381 return Flag242 (Id);
2382 end Optimize_Alignment_Time;
2384 function Original_Access_Type (Id : E) return E is
2386 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2388 end Original_Access_Type;
2390 function Original_Array_Type (Id : E) return E is
2392 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2394 end Original_Array_Type;
2396 function Original_Record_Component (Id : E) return E is
2398 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2400 end Original_Record_Component;
2402 function Overlays_Constant (Id : E) return B is
2404 return Flag243 (Id);
2405 end Overlays_Constant;
2407 function Overridden_Operation (Id : E) return E is
2410 end Overridden_Operation;
2412 function Package_Instantiation (Id : E) return N is
2414 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2416 end Package_Instantiation;
2418 function Packed_Array_Type (Id : E) return E is
2420 pragma Assert (Is_Array_Type (Id));
2422 end Packed_Array_Type;
2424 function Parent_Subtype (Id : E) return E is
2426 pragma Assert (Is_Record_Type (Id));
2427 return Node19 (Base_Type (Id));
2430 function Postcondition_Proc (Id : E) return E is
2432 pragma Assert (Ekind (Id) = E_Procedure);
2434 end Postcondition_Proc;
2436 function PPC_Wrapper (Id : E) return E is
2438 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2442 function Prival (Id : E) return E is
2444 pragma Assert (Is_Protected_Component (Id));
2448 function Prival_Link (Id : E) return E is
2450 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2454 function Private_Dependents (Id : E) return L is
2456 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2457 return Elist18 (Id);
2458 end Private_Dependents;
2460 function Private_View (Id : E) return N is
2462 pragma Assert (Is_Private_Type (Id));
2466 function Protected_Body_Subprogram (Id : E) return E is
2468 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2470 end Protected_Body_Subprogram;
2472 function Protected_Formal (Id : E) return E is
2474 pragma Assert (Is_Formal (Id));
2476 end Protected_Formal;
2478 function Protection_Object (Id : E) return E is
2481 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2483 end Protection_Object;
2485 function Reachable (Id : E) return B is
2490 function Referenced (Id : E) return B is
2492 return Flag156 (Id);
2495 function Referenced_As_LHS (Id : E) return B is
2498 end Referenced_As_LHS;
2500 function Referenced_As_Out_Parameter (Id : E) return B is
2502 return Flag227 (Id);
2503 end Referenced_As_Out_Parameter;
2505 function Register_Exception_Call (Id : E) return N is
2507 pragma Assert (Ekind (Id) = E_Exception);
2509 end Register_Exception_Call;
2511 function Related_Array_Object (Id : E) return E is
2513 pragma Assert (Is_Array_Type (Id));
2515 end Related_Array_Object;
2517 function Related_Expression (Id : E) return N is
2519 pragma Assert (Ekind (Id) in Type_Kind
2520 or else Ekind_In (Id, E_Constant, E_Variable));
2522 end Related_Expression;
2524 function Related_Instance (Id : E) return E is
2526 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2528 end Related_Instance;
2530 function Related_Type (Id : E) return E is
2532 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2536 function Relative_Deadline_Variable (Id : E) return E is
2538 pragma Assert (Is_Task_Type (Id));
2539 return Node26 (Implementation_Base_Type (Id));
2540 end Relative_Deadline_Variable;
2542 function Renamed_Entity (Id : E) return N is
2547 function Renamed_In_Spec (Id : E) return B is
2549 pragma Assert (Ekind (Id) = E_Package);
2550 return Flag231 (Id);
2551 end Renamed_In_Spec;
2553 function Renamed_Object (Id : E) return N is
2558 function Renaming_Map (Id : E) return U is
2563 function Requires_Overriding (Id : E) return B is
2565 pragma Assert (Is_Overloadable (Id));
2566 return Flag213 (Id);
2567 end Requires_Overriding;
2569 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2571 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2573 end Return_Flag_Or_Transient_Decl;
2575 function Return_Present (Id : E) return B is
2580 function Return_Applies_To (Id : E) return N is
2583 end Return_Applies_To;
2585 function Returns_By_Ref (Id : E) return B is
2590 function Reverse_Bit_Order (Id : E) return B is
2592 pragma Assert (Is_Record_Type (Id));
2593 return Flag164 (Base_Type (Id));
2594 end Reverse_Bit_Order;
2596 function RM_Size (Id : E) return U is
2598 pragma Assert (Is_Type (Id));
2602 function Scalar_Range (Id : E) return N is
2607 function Scale_Value (Id : E) return U is
2612 function Scope_Depth_Value (Id : E) return U is
2615 end Scope_Depth_Value;
2617 function Sec_Stack_Needed_For_Return (Id : E) return B is
2619 return Flag167 (Id);
2620 end Sec_Stack_Needed_For_Return;
2622 function Shadow_Entities (Id : E) return S is
2624 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2626 end Shadow_Entities;
2628 function Shared_Var_Procs_Instance (Id : E) return E is
2630 pragma Assert (Ekind (Id) = E_Variable);
2632 end Shared_Var_Procs_Instance;
2634 function Size_Check_Code (Id : E) return N is
2636 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2638 end Size_Check_Code;
2640 function Size_Depends_On_Discriminant (Id : E) return B is
2642 return Flag177 (Id);
2643 end Size_Depends_On_Discriminant;
2645 function Size_Known_At_Compile_Time (Id : E) return B is
2648 end Size_Known_At_Compile_Time;
2650 function Small_Value (Id : E) return R is
2652 pragma Assert (Is_Fixed_Point_Type (Id));
2653 return Ureal21 (Id);
2656 function Spec_Entity (Id : E) return E is
2658 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2662 function Static_Predicate (Id : E) return S is
2664 pragma Assert (Is_Discrete_Type (Id));
2666 end Static_Predicate;
2668 function Storage_Size_Variable (Id : E) return E is
2670 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2671 return Node15 (Implementation_Base_Type (Id));
2672 end Storage_Size_Variable;
2674 function Static_Elaboration_Desired (Id : E) return B is
2676 pragma Assert (Ekind (Id) = E_Package);
2678 end Static_Elaboration_Desired;
2680 function Static_Initialization (Id : E) return N is
2683 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2685 end Static_Initialization;
2687 function Stored_Constraint (Id : E) return L is
2690 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2691 return Elist23 (Id);
2692 end Stored_Constraint;
2694 function Strict_Alignment (Id : E) return B is
2696 return Flag145 (Implementation_Base_Type (Id));
2697 end Strict_Alignment;
2699 function String_Literal_Length (Id : E) return U is
2702 end String_Literal_Length;
2704 function String_Literal_Low_Bound (Id : E) return N is
2707 end String_Literal_Low_Bound;
2709 function Subprograms_For_Type (Id : E) return E is
2711 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2713 end Subprograms_For_Type;
2715 function Suppress_Elaboration_Warnings (Id : E) return B is
2717 return Flag148 (Id);
2718 end Suppress_Elaboration_Warnings;
2720 function Suppress_Initialization (Id : E) return B is
2722 pragma Assert (Is_Type (Id));
2723 return Flag105 (Id);
2724 end Suppress_Initialization;
2726 function Suppress_Style_Checks (Id : E) return B is
2728 return Flag165 (Id);
2729 end Suppress_Style_Checks;
2731 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2733 return Flag217 (Id);
2734 end Suppress_Value_Tracking_On_Call;
2736 function Task_Body_Procedure (Id : E) return N is
2738 pragma Assert (Ekind (Id) in Task_Kind);
2740 end Task_Body_Procedure;
2742 function Treat_As_Volatile (Id : E) return B is
2745 end Treat_As_Volatile;
2747 function Underlying_Full_View (Id : E) return E is
2749 pragma Assert (Ekind (Id) in Private_Kind);
2751 end Underlying_Full_View;
2753 function Underlying_Record_View (Id : E) return E is
2756 end Underlying_Record_View;
2758 function Universal_Aliasing (Id : E) return B is
2760 pragma Assert (Is_Type (Id));
2761 return Flag216 (Base_Type (Id));
2762 end Universal_Aliasing;
2764 function Unset_Reference (Id : E) return N is
2767 end Unset_Reference;
2769 function Used_As_Generic_Actual (Id : E) return B is
2771 return Flag222 (Id);
2772 end Used_As_Generic_Actual;
2774 function Uses_Sec_Stack (Id : E) return B is
2779 function Warnings_Off (Id : E) return B is
2784 function Warnings_Off_Used (Id : E) return B is
2786 return Flag236 (Id);
2787 end Warnings_Off_Used;
2789 function Warnings_Off_Used_Unmodified (Id : E) return B is
2791 return Flag237 (Id);
2792 end Warnings_Off_Used_Unmodified;
2794 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2796 return Flag238 (Id);
2797 end Warnings_Off_Used_Unreferenced;
2799 function Wrapped_Entity (Id : E) return E is
2801 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2802 and then Is_Primitive_Wrapper (Id));
2806 function Was_Hidden (Id : E) return B is
2808 return Flag196 (Id);
2811 ------------------------------
2812 -- Classification Functions --
2813 ------------------------------
2815 function Is_Access_Type (Id : E) return B is
2817 return Ekind (Id) in Access_Kind;
2820 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2822 return Ekind (Id) in Access_Protected_Kind;
2823 end Is_Access_Protected_Subprogram_Type;
2825 function Is_Access_Subprogram_Type (Id : E) return B is
2827 return Ekind (Id) in Access_Subprogram_Kind;
2828 end Is_Access_Subprogram_Type;
2830 function Is_Aggregate_Type (Id : E) return B is
2832 return Ekind (Id) in Aggregate_Kind;
2833 end Is_Aggregate_Type;
2835 function Is_Array_Type (Id : E) return B is
2837 return Ekind (Id) in Array_Kind;
2840 function Is_Assignable (Id : E) return B is
2842 return Ekind (Id) in Assignable_Kind;
2845 function Is_Class_Wide_Type (Id : E) return B is
2847 return Ekind (Id) in Class_Wide_Kind;
2848 end Is_Class_Wide_Type;
2850 function Is_Composite_Type (Id : E) return B is
2852 return Ekind (Id) in Composite_Kind;
2853 end Is_Composite_Type;
2855 function Is_Concurrent_Body (Id : E) return B is
2857 return Ekind (Id) in
2858 Concurrent_Body_Kind;
2859 end Is_Concurrent_Body;
2861 function Is_Concurrent_Record_Type (Id : E) return B is
2864 end Is_Concurrent_Record_Type;
2866 function Is_Concurrent_Type (Id : E) return B is
2868 return Ekind (Id) in Concurrent_Kind;
2869 end Is_Concurrent_Type;
2871 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2873 return Ekind (Id) in
2874 Decimal_Fixed_Point_Kind;
2875 end Is_Decimal_Fixed_Point_Type;
2877 function Is_Digits_Type (Id : E) return B is
2879 return Ekind (Id) in Digits_Kind;
2882 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2884 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2885 end Is_Discrete_Or_Fixed_Point_Type;
2887 function Is_Discrete_Type (Id : E) return B is
2889 return Ekind (Id) in Discrete_Kind;
2890 end Is_Discrete_Type;
2892 function Is_Elementary_Type (Id : E) return B is
2894 return Ekind (Id) in Elementary_Kind;
2895 end Is_Elementary_Type;
2897 function Is_Entry (Id : E) return B is
2899 return Ekind (Id) in Entry_Kind;
2902 function Is_Enumeration_Type (Id : E) return B is
2904 return Ekind (Id) in
2906 end Is_Enumeration_Type;
2908 function Is_Fixed_Point_Type (Id : E) return B is
2910 return Ekind (Id) in
2912 end Is_Fixed_Point_Type;
2914 function Is_Floating_Point_Type (Id : E) return B is
2916 return Ekind (Id) in Float_Kind;
2917 end Is_Floating_Point_Type;
2919 function Is_Formal (Id : E) return B is
2921 return Ekind (Id) in Formal_Kind;
2924 function Is_Formal_Object (Id : E) return B is
2926 return Ekind (Id) in Formal_Object_Kind;
2927 end Is_Formal_Object;
2929 function Is_Generic_Subprogram (Id : E) return B is
2931 return Ekind (Id) in Generic_Subprogram_Kind;
2932 end Is_Generic_Subprogram;
2934 function Is_Generic_Unit (Id : E) return B is
2936 return Ekind (Id) in Generic_Unit_Kind;
2937 end Is_Generic_Unit;
2939 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2941 return Ekind (Id) in
2942 Incomplete_Or_Private_Kind;
2943 end Is_Incomplete_Or_Private_Type;
2945 function Is_Incomplete_Type (Id : E) return B is
2947 return Ekind (Id) in
2949 end Is_Incomplete_Type;
2951 function Is_Integer_Type (Id : E) return B is
2953 return Ekind (Id) in Integer_Kind;
2954 end Is_Integer_Type;
2956 function Is_Modular_Integer_Type (Id : E) return B is
2958 return Ekind (Id) in
2959 Modular_Integer_Kind;
2960 end Is_Modular_Integer_Type;
2962 function Is_Named_Number (Id : E) return B is
2964 return Ekind (Id) in Named_Kind;
2965 end Is_Named_Number;
2967 function Is_Numeric_Type (Id : E) return B is
2969 return Ekind (Id) in Numeric_Kind;
2970 end Is_Numeric_Type;
2972 function Is_Object (Id : E) return B is
2974 return Ekind (Id) in Object_Kind;
2977 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2979 return Ekind (Id) in
2980 Ordinary_Fixed_Point_Kind;
2981 end Is_Ordinary_Fixed_Point_Type;
2983 function Is_Overloadable (Id : E) return B is
2985 return Ekind (Id) in Overloadable_Kind;
2986 end Is_Overloadable;
2988 function Is_Private_Type (Id : E) return B is
2990 return Ekind (Id) in Private_Kind;
2991 end Is_Private_Type;
2993 function Is_Protected_Type (Id : E) return B is
2995 return Ekind (Id) in Protected_Kind;
2996 end Is_Protected_Type;
2998 function Is_Real_Type (Id : E) return B is
3000 return Ekind (Id) in Real_Kind;
3003 function Is_Record_Type (Id : E) return B is
3005 return Ekind (Id) in Record_Kind;
3008 function Is_Scalar_Type (Id : E) return B is
3010 return Ekind (Id) in Scalar_Kind;
3013 function Is_Signed_Integer_Type (Id : E) return B is
3015 return Ekind (Id) in Signed_Integer_Kind;
3016 end Is_Signed_Integer_Type;
3018 function Is_Subprogram (Id : E) return B is
3020 return Ekind (Id) in Subprogram_Kind;
3023 function Is_Task_Type (Id : E) return B is
3025 return Ekind (Id) in Task_Kind;
3028 function Is_Type (Id : E) return B is
3030 return Ekind (Id) in Type_Kind;
3033 ------------------------------
3034 -- Attribute Set Procedures --
3035 ------------------------------
3037 -- Note: in many of these set procedures an "obvious" assertion is missing.
3038 -- The reason for this is that in many cases, a field is set before the
3039 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3040 -- it is possible to add assertions that specifically include the E_Void
3041 -- possibility, but in some cases, we just omit the assertions.
3043 procedure Set_Accept_Address (Id : E; V : L) is
3045 Set_Elist21 (Id, V);
3046 end Set_Accept_Address;
3048 procedure Set_Access_Disp_Table (Id : E; V : L) is
3050 pragma Assert (Ekind (Id) = E_Record_Type
3051 and then Id = Implementation_Base_Type (Id));
3052 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3053 Set_Elist16 (Id, V);
3054 end Set_Access_Disp_Table;
3056 procedure Set_Associated_Collection (Id : E; V : E) is
3058 pragma Assert (Is_Access_Type (Id));
3060 end Set_Associated_Collection;
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
3517 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3519 end Set_Extra_Accessibility;
3521 procedure Set_Extra_Constrained (Id : E; V : E) is
3523 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3525 end Set_Extra_Constrained;
3527 procedure Set_Extra_Formal (Id : E; V : E) is
3530 end Set_Extra_Formal;
3532 procedure Set_Extra_Formals (Id : E; V : E) is
3535 (Is_Overloadable (Id)
3536 or else Ekind_In (Id, E_Entry_Family,
3538 E_Subprogram_Type));
3540 end Set_Extra_Formals;
3542 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3545 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3546 Set_Flag229 (Id, V);
3547 end Set_Can_Use_Internal_Rep;
3549 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3551 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3552 Set_Flag158 (Id, V);
3553 end Set_Finalize_Storage_Only;
3555 procedure Set_Finalizer (Id : E; V : E) is
3558 (Ekind (Id) = E_Package
3559 or else Ekind (Id) = E_Package_Body);
3563 procedure Set_First_Entity (Id : E; V : E) is
3566 end Set_First_Entity;
3568 procedure Set_First_Exit_Statement (Id : E; V : N) is
3570 pragma Assert (Ekind (Id) = E_Loop);
3572 end Set_First_Exit_Statement;
3574 procedure Set_First_Index (Id : E; V : N) is
3576 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3578 end Set_First_Index;
3580 procedure Set_First_Literal (Id : E; V : E) is
3582 pragma Assert (Is_Enumeration_Type (Id));
3584 end Set_First_Literal;
3586 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3588 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3590 end Set_First_Optional_Parameter;
3592 procedure Set_First_Private_Entity (Id : E; V : E) is
3594 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3595 or else Ekind (Id) in Concurrent_Kind);
3597 end Set_First_Private_Entity;
3599 procedure Set_First_Rep_Item (Id : E; V : N) is
3602 end Set_First_Rep_Item;
3604 procedure Set_Float_Rep (Id : E; V : F) is
3605 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3607 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3610 procedure Set_Freeze_Node (Id : E; V : N) is
3613 end Set_Freeze_Node;
3615 procedure Set_From_With_Type (Id : E; V : B := True) is
3619 or else Ekind (Id) = E_Package);
3620 Set_Flag159 (Id, V);
3621 end Set_From_With_Type;
3623 procedure Set_Full_View (Id : E; V : E) is
3625 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3629 procedure Set_Generic_Homonym (Id : E; V : E) is
3632 end Set_Generic_Homonym;
3634 procedure Set_Generic_Renamings (Id : E; V : L) is
3636 Set_Elist23 (Id, V);
3637 end Set_Generic_Renamings;
3639 procedure Set_Handler_Records (Id : E; V : S) is
3642 end Set_Handler_Records;
3644 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3646 pragma Assert (Id = Base_Type (Id));
3647 Set_Flag135 (Id, V);
3648 end Set_Has_Aliased_Components;
3650 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3653 end Set_Has_Alignment_Clause;
3655 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3658 end Set_Has_All_Calls_Remote;
3660 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3662 Set_Flag201 (Id, V);
3663 end Set_Has_Anon_Block_Suffix;
3665 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3667 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3669 end Set_Has_Atomic_Components;
3671 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3674 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3675 Set_Flag139 (Id, V);
3676 end Set_Has_Biased_Representation;
3678 procedure Set_Has_Completion (Id : E; V : B := True) is
3681 end Set_Has_Completion;
3683 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3685 pragma Assert (Is_Type (Id));
3687 end Set_Has_Completion_In_Body;
3689 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3691 pragma Assert (Ekind (Id) = E_Record_Type);
3692 Set_Flag140 (Id, V);
3693 end Set_Has_Complex_Representation;
3695 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3697 pragma Assert (Ekind (Id) = E_Array_Type);
3699 end Set_Has_Component_Size_Clause;
3701 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3703 pragma Assert (Is_Type (Id));
3704 Set_Flag187 (Id, V);
3705 end Set_Has_Constrained_Partial_View;
3707 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3709 Set_Flag181 (Id, V);
3710 end Set_Has_Contiguous_Rep;
3712 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3714 pragma Assert (Id = Base_Type (Id));
3716 end Set_Has_Controlled_Component;
3718 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3721 end Set_Has_Controlling_Result;
3723 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3725 Set_Flag119 (Id, V);
3726 end Set_Has_Convention_Pragma;
3728 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3731 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3732 and then Is_Base_Type (Id));
3734 end Set_Has_Default_Aspect;
3736 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3738 pragma Assert (Nkind (Id) in N_Entity);
3739 Set_Flag200 (Id, V);
3740 end Set_Has_Delayed_Aspects;
3742 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3744 pragma Assert (Nkind (Id) in N_Entity);
3746 end Set_Has_Delayed_Freeze;
3748 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3750 pragma Assert (Nkind (Id) in N_Entity);
3752 end Set_Has_Discriminants;
3754 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3756 pragma Assert (Ekind (Id) = E_Record_Type
3757 and then Is_Tagged_Type (Id));
3758 Set_Flag220 (Id, V);
3759 end Set_Has_Dispatch_Table;
3761 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3763 pragma Assert (Is_Enumeration_Type (Id));
3765 end Set_Has_Enumeration_Rep_Clause;
3767 procedure Set_Has_Exit (Id : E; V : B := True) is
3772 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3774 pragma Assert (Is_Tagged_Type (Id));
3775 Set_Flag110 (Id, V);
3776 end Set_Has_External_Tag_Rep_Clause;
3778 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3780 Set_Flag175 (Id, V);
3781 end Set_Has_Forward_Instantiation;
3783 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3785 Set_Flag173 (Id, V);
3786 end Set_Has_Fully_Qualified_Name;
3788 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3791 end Set_Has_Gigi_Rep_Item;
3793 procedure Set_Has_Homonym (Id : E; V : B := True) is
3796 end Set_Has_Homonym;
3798 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3800 pragma Assert (Is_Type (Id));
3801 Set_Flag248 (Id, V);
3802 end Set_Has_Inheritable_Invariants;
3804 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3806 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3807 Set_Flag219 (Id, V);
3808 end Set_Has_Initial_Value;
3810 procedure Set_Has_Invariants (Id : E; V : B := True) is
3812 pragma Assert (Is_Type (Id)
3813 or else Ekind (Id) = E_Procedure
3814 or else Ekind (Id) = E_Void);
3815 Set_Flag232 (Id, V);
3816 end Set_Has_Invariants;
3818 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3820 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3822 end Set_Has_Machine_Radix_Clause;
3824 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3827 end Set_Has_Master_Entity;
3829 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3831 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3832 Set_Flag142 (Id, V);
3833 end Set_Has_Missing_Return;
3835 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3837 Set_Flag101 (Id, V);
3838 end Set_Has_Nested_Block_With_Handler;
3840 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3842 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3843 Set_Flag215 (Id, V);
3844 end Set_Has_Up_Level_Access;
3846 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3848 pragma Assert (Id = Base_Type (Id));
3850 end Set_Has_Non_Standard_Rep;
3852 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3854 pragma Assert (Is_Type (Id));
3855 Set_Flag172 (Id, V);
3856 end Set_Has_Object_Size_Clause;
3858 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3860 Set_Flag154 (Id, V);
3861 end Set_Has_Per_Object_Constraint;
3863 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3865 Set_Flag188 (Id, V);
3866 end Set_Has_Persistent_BSS;
3868 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3870 pragma Assert (Is_Subprogram (Id));
3871 Set_Flag240 (Id, V);
3872 end Set_Has_Postconditions;
3874 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3876 pragma Assert (Is_Access_Type (Id));
3877 Set_Flag27 (Base_Type (Id), V);
3878 end Set_Has_Pragma_Controlled;
3880 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3882 Set_Flag150 (Id, V);
3883 end Set_Has_Pragma_Elaborate_Body;
3885 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3887 Set_Flag157 (Id, V);
3888 end Set_Has_Pragma_Inline;
3890 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3892 Set_Flag230 (Id, V);
3893 end Set_Has_Pragma_Inline_Always;
3895 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3897 pragma Assert (Is_Enumeration_Type (Id));
3898 pragma Assert (Id = Base_Type (Id));
3899 Set_Flag198 (Id, V);
3900 end Set_Has_Pragma_Ordered;
3902 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3904 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3905 pragma Assert (Id = Base_Type (Id));
3906 Set_Flag121 (Id, V);
3907 end Set_Has_Pragma_Pack;
3909 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3911 Set_Flag221 (Id, V);
3912 end Set_Has_Pragma_Preelab_Init;
3914 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3916 Set_Flag203 (Id, V);
3917 end Set_Has_Pragma_Pure;
3919 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3921 Set_Flag179 (Id, V);
3922 end Set_Has_Pragma_Pure_Function;
3924 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3926 Set_Flag169 (Id, V);
3927 end Set_Has_Pragma_Thread_Local_Storage;
3929 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3931 Set_Flag233 (Id, V);
3932 end Set_Has_Pragma_Unmodified;
3934 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3936 Set_Flag180 (Id, V);
3937 end Set_Has_Pragma_Unreferenced;
3939 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3941 pragma Assert (Is_Type (Id));
3942 Set_Flag212 (Id, V);
3943 end Set_Has_Pragma_Unreferenced_Objects;
3945 procedure Set_Has_Predicates (Id : E; V : B := True) is
3947 Set_Flag250 (Id, V);
3948 end Set_Has_Predicates;
3950 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3952 pragma Assert (Id = Base_Type (Id));
3953 Set_Flag120 (Id, V);
3954 end Set_Has_Primitive_Operations;
3956 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
3958 pragma Assert (Is_Type (Id));
3959 Set_Flag151 (Id, V);
3960 end Set_Has_Private_Ancestor;
3962 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3964 Set_Flag155 (Id, V);
3965 end Set_Has_Private_Declaration;
3967 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3969 Set_Flag161 (Id, V);
3970 end Set_Has_Qualified_Name;
3972 procedure Set_Has_RACW (Id : E; V : B := True) is
3974 pragma Assert (Ekind (Id) = E_Package);
3975 Set_Flag214 (Id, V);
3978 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3980 pragma Assert (Id = Base_Type (Id));
3982 end Set_Has_Record_Rep_Clause;
3984 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3986 pragma Assert (Is_Subprogram (Id));
3987 Set_Flag143 (Id, V);
3988 end Set_Has_Recursive_Call;
3990 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3993 end Set_Has_Size_Clause;
3995 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3998 end Set_Has_Small_Clause;
4000 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4002 pragma Assert (Id = Base_Type (Id));
4003 Set_Flag100 (Id, V);
4004 end Set_Has_Specified_Layout;
4006 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4008 pragma Assert (Is_Type (Id));
4009 Set_Flag190 (Id, V);
4010 end Set_Has_Specified_Stream_Input;
4012 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4014 pragma Assert (Is_Type (Id));
4015 Set_Flag191 (Id, V);
4016 end Set_Has_Specified_Stream_Output;
4018 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4020 pragma Assert (Is_Type (Id));
4021 Set_Flag192 (Id, V);
4022 end Set_Has_Specified_Stream_Read;
4024 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4026 pragma Assert (Is_Type (Id));
4027 Set_Flag193 (Id, V);
4028 end Set_Has_Specified_Stream_Write;
4030 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4032 Set_Flag211 (Id, V);
4033 end Set_Has_Static_Discriminants;
4035 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4037 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4038 pragma Assert (Id = Base_Type (Id));
4040 end Set_Has_Storage_Size_Clause;
4042 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4044 pragma Assert (Is_Elementary_Type (Id));
4045 Set_Flag184 (Id, V);
4046 end Set_Has_Stream_Size_Clause;
4048 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4051 end Set_Has_Subprogram_Descriptor;
4053 procedure Set_Has_Task (Id : E; V : B := True) is
4055 pragma Assert (Id = Base_Type (Id));
4059 procedure Set_Has_Thunks (Id : E; V : B := True) is
4061 pragma Assert (Is_Tag (Id));
4062 Set_Flag228 (Id, V);
4065 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4067 pragma Assert (Id = Base_Type (Id));
4068 Set_Flag123 (Id, V);
4069 end Set_Has_Unchecked_Union;
4071 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4073 pragma Assert (Is_Type (Id));
4075 end Set_Has_Unknown_Discriminants;
4077 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4079 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4081 end Set_Has_Volatile_Components;
4083 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4085 Set_Flag182 (Id, V);
4086 end Set_Has_Xref_Entry;
4088 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4090 pragma Assert (Ekind (Id) = E_Variable);
4092 end Set_Hiding_Loop_Variable;
4094 procedure Set_Homonym (Id : E; V : E) is
4096 pragma Assert (Id /= V);
4100 procedure Set_Interface_Alias (Id : E; V : E) is
4104 and then Is_Hidden (Id)
4105 and then (Ekind_In (Id, E_Procedure, E_Function)));
4107 end Set_Interface_Alias;
4109 procedure Set_Interfaces (Id : E; V : L) is
4111 pragma Assert (Is_Record_Type (Id));
4112 Set_Elist25 (Id, V);
4115 procedure Set_In_Package_Body (Id : E; V : B := True) is
4118 end Set_In_Package_Body;
4120 procedure Set_In_Private_Part (Id : E; V : B := True) is
4123 end Set_In_Private_Part;
4125 procedure Set_In_Use (Id : E; V : B := True) is
4127 pragma Assert (Nkind (Id) in N_Entity);
4131 procedure Set_Inner_Instances (Id : E; V : L) is
4133 Set_Elist23 (Id, V);
4134 end Set_Inner_Instances;
4136 procedure Set_Interface_Name (Id : E; V : N) is
4139 end Set_Interface_Name;
4141 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4143 pragma Assert (Is_Overloadable (Id));
4145 end Set_Is_Abstract_Subprogram;
4147 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4149 pragma Assert (Is_Type (Id));
4150 Set_Flag146 (Id, V);
4151 end Set_Is_Abstract_Type;
4153 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4155 pragma Assert (Is_Access_Type (Id));
4156 Set_Flag194 (Id, V);
4157 end Set_Is_Local_Anonymous_Access;
4159 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4161 pragma Assert (Is_Access_Type (Id));
4163 end Set_Is_Access_Constant;
4165 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4167 Set_Flag185 (Id, V);
4168 end Set_Is_Ada_2005_Only;
4170 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4172 Set_Flag199 (Id, V);
4173 end Set_Is_Ada_2012_Only;
4175 procedure Set_Is_Aliased (Id : E; V : B := True) is
4177 pragma Assert (Nkind (Id) in N_Entity);
4181 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4183 pragma Assert (Is_Entry (Id));
4184 Set_Flag132 (Id, V);
4185 end Set_Is_AST_Entry;
4187 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4190 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4192 end Set_Is_Asynchronous;
4194 procedure Set_Is_Atomic (Id : E; V : B := True) is
4199 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4201 pragma Assert ((not V)
4202 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4203 Set_Flag122 (Id, V);
4204 end Set_Is_Bit_Packed_Array;
4206 procedure Set_Is_Called (Id : E; V : B := True) is
4208 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4209 Set_Flag102 (Id, V);
4212 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4215 end Set_Is_Character_Type;
4217 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4220 end Set_Is_Child_Unit;
4222 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4225 end Set_Is_Class_Wide_Equivalent_Type;
4227 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4229 Set_Flag149 (Id, V);
4230 end Set_Is_Compilation_Unit;
4232 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4234 pragma Assert (Ekind (Id) = E_Discriminant);
4235 Set_Flag103 (Id, V);
4236 end Set_Is_Completely_Hidden;
4238 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4241 end Set_Is_Concurrent_Record_Type;
4243 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4246 end Set_Is_Constr_Subt_For_U_Nominal;
4248 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4250 Set_Flag141 (Id, V);
4251 end Set_Is_Constr_Subt_For_UN_Aliased;
4253 procedure Set_Is_Constrained (Id : E; V : B := True) is
4255 pragma Assert (Nkind (Id) in N_Entity);
4257 end Set_Is_Constrained;
4259 procedure Set_Is_Constructor (Id : E; V : B := True) is
4262 end Set_Is_Constructor;
4264 procedure Set_Is_Controlled (Id : E; V : B := True) is
4266 pragma Assert (Id = Base_Type (Id));
4268 end Set_Is_Controlled;
4270 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4272 pragma Assert (Is_Formal (Id));
4274 end Set_Is_Controlling_Formal;
4276 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4279 end Set_Is_CPP_Class;
4281 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4283 pragma Assert (Is_Type (Id));
4284 Set_Flag223 (Id, V);
4285 end Set_Is_Descendent_Of_Address;
4287 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4289 Set_Flag176 (Id, V);
4290 end Set_Is_Discrim_SO_Function;
4292 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4294 Set_Flag234 (Id, V);
4295 end Set_Is_Dispatch_Table_Entity;
4297 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4302 Is_Overloadable (Id)
4304 Ekind (Id) = E_Subprogram_Type);
4307 end Set_Is_Dispatching_Operation;
4309 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4311 Set_Flag124 (Id, V);
4312 end Set_Is_Eliminated;
4314 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4317 end Set_Is_Entry_Formal;
4319 procedure Set_Is_Exported (Id : E; V : B := True) is
4322 end Set_Is_Exported;
4324 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4327 end Set_Is_First_Subtype;
4329 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4331 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4332 Set_Flag118 (Id, V);
4333 end Set_Is_For_Access_Subtype;
4335 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4337 Set_Flag111 (Id, V);
4338 end Set_Is_Formal_Subprogram;
4340 procedure Set_Is_Frozen (Id : E; V : B := True) is
4342 pragma Assert (Nkind (Id) in N_Entity);
4346 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4348 pragma Assert (Is_Type (Id));
4350 end Set_Is_Generic_Actual_Type;
4352 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4354 Set_Flag130 (Id, V);
4355 end Set_Is_Generic_Instance;
4357 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4359 pragma Assert (Nkind (Id) in N_Entity);
4361 end Set_Is_Generic_Type;
4363 procedure Set_Is_Hidden (Id : E; V : B := True) is
4368 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4370 Set_Flag171 (Id, V);
4371 end Set_Is_Hidden_Open_Scope;
4373 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4375 pragma Assert (Nkind (Id) in N_Entity);
4377 end Set_Is_Immediately_Visible;
4379 procedure Set_Is_Imported (Id : E; V : B := True) is
4382 end Set_Is_Imported;
4384 procedure Set_Is_Inlined (Id : E; V : B := True) is
4389 procedure Set_Is_Interface (Id : E; V : B := True) is
4391 pragma Assert (Is_Record_Type (Id));
4392 Set_Flag186 (Id, V);
4393 end Set_Is_Interface;
4395 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4397 Set_Flag126 (Id, V);
4398 end Set_Is_Instantiated;
4400 procedure Set_Is_Internal (Id : E; V : B := True) is
4402 pragma Assert (Nkind (Id) in N_Entity);
4404 end Set_Is_Internal;
4406 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4408 pragma Assert (Nkind (Id) in N_Entity);
4410 end Set_Is_Interrupt_Handler;
4412 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4415 end Set_Is_Intrinsic_Subprogram;
4417 procedure Set_Is_Itype (Id : E; V : B := True) is
4422 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4425 end Set_Is_Known_Non_Null;
4427 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4429 Set_Flag204 (Id, V);
4430 end Set_Is_Known_Null;
4432 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4434 Set_Flag170 (Id, V);
4435 end Set_Is_Known_Valid;
4437 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4439 pragma Assert (Is_Type (Id));
4440 Set_Flag106 (Id, V);
4441 end Set_Is_Limited_Composite;
4443 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4445 pragma Assert (Is_Interface (Id));
4446 Set_Flag197 (Id, V);
4447 end Set_Is_Limited_Interface;
4449 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4452 end Set_Is_Limited_Record;
4454 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4456 pragma Assert (Is_Subprogram (Id));
4457 Set_Flag137 (Id, V);
4458 end Set_Is_Machine_Code_Subprogram;
4460 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4462 pragma Assert (Is_Type (Id));
4463 Set_Flag109 (Id, V);
4464 end Set_Is_Non_Static_Subtype;
4466 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4468 pragma Assert (Ekind (Id) = E_Procedure);
4469 Set_Flag178 (Id, V);
4470 end Set_Is_Null_Init_Proc;
4472 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4474 Set_Flag153 (Id, V);
4475 end Set_Is_Obsolescent;
4477 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4479 pragma Assert (Ekind (Id) = E_Out_Parameter);
4480 Set_Flag226 (Id, V);
4481 end Set_Is_Only_Out_Parameter;
4483 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4485 pragma Assert (Is_Formal (Id));
4486 Set_Flag134 (Id, V);
4487 end Set_Is_Optional_Parameter;
4489 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4491 Set_Flag160 (Id, V);
4492 end Set_Is_Package_Body_Entity;
4494 procedure Set_Is_Packed (Id : E; V : B := True) is
4496 pragma Assert (Id = Base_Type (Id));
4500 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4502 Set_Flag138 (Id, V);
4503 end Set_Is_Packed_Array_Type;
4505 procedure Set_Is_Postcondition_Proc (Id : E; V : B := True) is
4507 pragma Assert (Ekind (Id) = E_Procedure);
4508 Set_Flag253 (Id, V);
4509 end Set_Is_Postcondition_Proc;
4511 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4513 pragma Assert (Nkind (Id) in N_Entity);
4515 end Set_Is_Potentially_Use_Visible;
4517 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4520 end Set_Is_Preelaborated;
4522 procedure Set_Is_Primitive (Id : E; V : B := True) is
4525 (Is_Overloadable (Id)
4526 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4527 Set_Flag218 (Id, V);
4528 end Set_Is_Primitive;
4530 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4532 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4533 Set_Flag195 (Id, V);
4534 end Set_Is_Primitive_Wrapper;
4536 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4538 pragma Assert (Is_Type (Id));
4539 Set_Flag107 (Id, V);
4540 end Set_Is_Private_Composite;
4542 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4545 end Set_Is_Private_Descendant;
4547 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4549 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4550 Set_Flag245 (Id, V);
4551 end Set_Is_Private_Primitive;
4553 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4555 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4556 Set_Flag252 (Id, V);
4557 end Set_Is_Processed_Transient;
4559 procedure Set_Is_Public (Id : E; V : B := True) is
4561 pragma Assert (Nkind (Id) in N_Entity);
4565 procedure Set_Is_Pure (Id : E; V : B := True) is
4570 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4572 pragma Assert (Is_Access_Type (Id));
4573 Set_Flag189 (Id, V);
4574 end Set_Is_Pure_Unit_Access_Type;
4576 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4578 pragma Assert (Is_Type (Id));
4579 Set_Flag244 (Id, V);
4580 end Set_Is_RACW_Stub_Type;
4582 procedure Set_Is_Raised (Id : E; V : B := True) is
4584 pragma Assert (Ekind (Id) = E_Exception);
4585 Set_Flag224 (Id, V);
4588 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4591 end Set_Is_Remote_Call_Interface;
4593 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4596 end Set_Is_Remote_Types;
4598 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4600 Set_Flag112 (Id, V);
4601 end Set_Is_Renaming_Of_Object;
4603 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4605 Set_Flag209 (Id, V);
4606 end Set_Is_Return_Object;
4608 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4610 pragma Assert (Ekind (Id) = E_Variable);
4611 Set_Flag249 (Id, V);
4612 end Set_Is_Safe_To_Reevaluate;
4614 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4617 end Set_Is_Shared_Passive;
4619 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4623 or else Ekind_In (Id, E_Exception,
4628 end Set_Is_Statically_Allocated;
4630 procedure Set_Is_Tag (Id : E; V : B := True) is
4632 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4636 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4639 end Set_Is_Tagged_Type;
4641 procedure Set_Is_Thunk (Id : E; V : B := True) is
4643 Set_Flag225 (Id, V);
4646 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4648 Set_Flag235 (Id, V);
4649 end Set_Is_Trivial_Subprogram;
4651 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4653 Set_Flag163 (Id, V);
4654 end Set_Is_True_Constant;
4656 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4658 pragma Assert (Id = Base_Type (Id));
4659 Set_Flag117 (Id, V);
4660 end Set_Is_Unchecked_Union;
4662 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4664 pragma Assert (Ekind (Id) = E_Record_Type);
4665 Set_Flag246 (Id, V);
4666 end Set_Is_Underlying_Record_View;
4668 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4670 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4671 Set_Flag144 (Id, V);
4672 end Set_Is_Unsigned_Type;
4674 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4676 pragma Assert (Ekind (Id) = E_Procedure);
4677 Set_Flag127 (Id, V);
4678 end Set_Is_Valued_Procedure;
4680 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4682 pragma Assert (Is_Child_Unit (Id));
4683 Set_Flag116 (Id, V);
4684 end Set_Is_Visible_Child_Unit;
4686 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4688 Set_Flag206 (Id, V);
4689 end Set_Is_Visible_Formal;
4691 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4693 pragma Assert (Ekind (Id) = E_Exception);
4694 Set_Flag133 (Id, V);
4695 end Set_Is_VMS_Exception;
4697 procedure Set_Is_Volatile (Id : E; V : B := True) is
4699 pragma Assert (Nkind (Id) in N_Entity);
4701 end Set_Is_Volatile;
4703 procedure Set_Itype_Printed (Id : E; V : B := True) is
4705 pragma Assert (Is_Itype (Id));
4706 Set_Flag202 (Id, V);
4707 end Set_Itype_Printed;
4709 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4712 end Set_Kill_Elaboration_Checks;
4714 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4717 end Set_Kill_Range_Checks;
4719 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4722 end Set_Kill_Tag_Checks;
4724 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4726 pragma Assert (Is_Type (Id));
4727 Set_Flag207 (Id, V);
4728 end Set_Known_To_Have_Preelab_Init;
4730 procedure Set_Last_Assignment (Id : E; V : N) is
4732 pragma Assert (Is_Assignable (Id));
4734 end Set_Last_Assignment;
4736 procedure Set_Last_Entity (Id : E; V : E) is
4739 end Set_Last_Entity;
4741 procedure Set_Limited_View (Id : E; V : E) is
4743 pragma Assert (Ekind (Id) = E_Package);
4745 end Set_Limited_View;
4747 procedure Set_Lit_Indexes (Id : E; V : E) is
4749 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4751 end Set_Lit_Indexes;
4753 procedure Set_Lit_Strings (Id : E; V : E) is
4755 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4757 end Set_Lit_Strings;
4759 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4761 pragma Assert (Is_Formal (Id));
4762 Set_Flag205 (Id, V);
4763 end Set_Low_Bound_Tested;
4765 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4767 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4769 end Set_Machine_Radix_10;
4771 procedure Set_Master_Id (Id : E; V : E) is
4773 pragma Assert (Is_Access_Type (Id));
4777 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4779 Set_Flag168 (Id, V);
4780 end Set_Materialize_Entity;
4782 procedure Set_Mechanism (Id : E; V : M) is
4784 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4785 Set_Uint8 (Id, UI_From_Int (V));
4788 procedure Set_Modulus (Id : E; V : U) is
4790 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4794 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4796 pragma Assert (Is_Type (Id));
4797 Set_Flag183 (Id, V);
4798 end Set_Must_Be_On_Byte_Boundary;
4800 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4802 pragma Assert (Is_Type (Id));
4803 Set_Flag208 (Id, V);
4804 end Set_Must_Have_Preelab_Init;
4806 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4808 Set_Flag147 (Id, V);
4809 end Set_Needs_Debug_Info;
4811 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4814 (Is_Overloadable (Id)
4815 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4817 end Set_Needs_No_Actuals;
4819 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4821 Set_Flag115 (Id, V);
4822 end Set_Never_Set_In_Source;
4824 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4827 end Set_Next_Inlined_Subprogram;
4829 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4831 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4832 Set_Flag131 (Id, V);
4833 end Set_No_Pool_Assigned;
4835 procedure Set_No_Return (Id : E; V : B := True) is
4838 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4839 Set_Flag113 (Id, V);
4842 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4844 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4845 Set_Flag136 (Id, V);
4846 end Set_No_Strict_Aliasing;
4848 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4850 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4852 end Set_Non_Binary_Modulus;
4854 procedure Set_Non_Limited_View (Id : E; V : E) is
4856 pragma Assert (Ekind (Id) in Incomplete_Kind);
4858 end Set_Non_Limited_View;
4860 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4863 (Root_Type (Id) = Standard_Boolean
4864 and then Ekind (Id) = E_Enumeration_Type);
4865 Set_Flag162 (Id, V);
4866 end Set_Nonzero_Is_True;
4868 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4870 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4872 end Set_Normalized_First_Bit;
4874 procedure Set_Normalized_Position (Id : E; V : U) is
4876 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4878 end Set_Normalized_Position;
4880 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4882 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4884 end Set_Normalized_Position_Max;
4886 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4888 pragma Assert (Ekind (Id) = E_Variable);
4889 Set_Flag247 (Id, V);
4890 end Set_OK_To_Rename;
4892 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4895 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4896 Set_Flag239 (Id, V);
4897 end Set_OK_To_Reorder_Components;
4899 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4902 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4903 Set_Flag241 (Id, V);
4904 end Set_Optimize_Alignment_Space;
4906 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4909 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4910 Set_Flag242 (Id, V);
4911 end Set_Optimize_Alignment_Time;
4913 procedure Set_Original_Access_Type (Id : E; V : E) is
4915 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4917 end Set_Original_Access_Type;
4919 procedure Set_Original_Array_Type (Id : E; V : E) is
4921 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4923 end Set_Original_Array_Type;
4925 procedure Set_Original_Record_Component (Id : E; V : E) is
4927 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4929 end Set_Original_Record_Component;
4931 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4933 Set_Flag243 (Id, V);
4934 end Set_Overlays_Constant;
4936 procedure Set_Overridden_Operation (Id : E; V : E) is
4939 end Set_Overridden_Operation;
4941 procedure Set_Package_Instantiation (Id : E; V : N) is
4943 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4945 end Set_Package_Instantiation;
4947 procedure Set_Packed_Array_Type (Id : E; V : E) is
4949 pragma Assert (Is_Array_Type (Id));
4951 end Set_Packed_Array_Type;
4953 procedure Set_Parent_Subtype (Id : E; V : E) is
4955 pragma Assert (Ekind (Id) = E_Record_Type);
4957 end Set_Parent_Subtype;
4959 procedure Set_Postcondition_Proc (Id : E; V : E) is
4961 pragma Assert (Ekind (Id) = E_Procedure);
4963 end Set_Postcondition_Proc;
4965 procedure Set_PPC_Wrapper (Id : E; V : E) is
4967 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4969 end Set_PPC_Wrapper;
4971 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4973 pragma Assert (Is_Tagged_Type (Id));
4974 Set_Elist10 (Id, V);
4975 end Set_Direct_Primitive_Operations;
4977 procedure Set_Prival (Id : E; V : E) is
4979 pragma Assert (Is_Protected_Component (Id));
4983 procedure Set_Prival_Link (Id : E; V : E) is
4985 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4987 end Set_Prival_Link;
4989 procedure Set_Private_Dependents (Id : E; V : L) is
4991 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4992 Set_Elist18 (Id, V);
4993 end Set_Private_Dependents;
4995 procedure Set_Private_View (Id : E; V : N) is
4997 pragma Assert (Is_Private_Type (Id));
4999 end Set_Private_View;
5001 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5003 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5005 end Set_Protected_Body_Subprogram;
5007 procedure Set_Protected_Formal (Id : E; V : E) is
5009 pragma Assert (Is_Formal (Id));
5011 end Set_Protected_Formal;
5013 procedure Set_Protection_Object (Id : E; V : E) is
5015 pragma Assert (Ekind_In (Id, E_Entry,
5020 end Set_Protection_Object;
5022 procedure Set_Reachable (Id : E; V : B := True) is
5027 procedure Set_Referenced (Id : E; V : B := True) is
5029 Set_Flag156 (Id, V);
5032 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5035 end Set_Referenced_As_LHS;
5037 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5039 Set_Flag227 (Id, V);
5040 end Set_Referenced_As_Out_Parameter;
5042 procedure Set_Register_Exception_Call (Id : E; V : N) is
5044 pragma Assert (Ekind (Id) = E_Exception);
5046 end Set_Register_Exception_Call;
5048 procedure Set_Related_Array_Object (Id : E; V : E) is
5050 pragma Assert (Is_Array_Type (Id));
5052 end Set_Related_Array_Object;
5054 procedure Set_Related_Expression (Id : E; V : N) is
5056 pragma Assert (Ekind (Id) in Type_Kind
5057 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5059 end Set_Related_Expression;
5061 procedure Set_Related_Instance (Id : E; V : E) is
5063 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5065 end Set_Related_Instance;
5067 procedure Set_Related_Type (Id : E; V : E) is
5069 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5071 end Set_Related_Type;
5073 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5075 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5077 end Set_Relative_Deadline_Variable;
5079 procedure Set_Renamed_Entity (Id : E; V : N) is
5082 end Set_Renamed_Entity;
5084 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5086 pragma Assert (Ekind (Id) = E_Package);
5087 Set_Flag231 (Id, V);
5088 end Set_Renamed_In_Spec;
5090 procedure Set_Renamed_Object (Id : E; V : N) is
5093 end Set_Renamed_Object;
5095 procedure Set_Renaming_Map (Id : E; V : U) is
5098 end Set_Renaming_Map;
5100 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5102 pragma Assert (Is_Overloadable (Id));
5103 Set_Flag213 (Id, V);
5104 end Set_Requires_Overriding;
5106 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5108 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5110 end Set_Return_Flag_Or_Transient_Decl;
5112 procedure Set_Return_Present (Id : E; V : B := True) is
5115 end Set_Return_Present;
5117 procedure Set_Return_Applies_To (Id : E; V : N) is
5120 end Set_Return_Applies_To;
5122 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5125 end Set_Returns_By_Ref;
5127 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5130 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5131 Set_Flag164 (Id, V);
5132 end Set_Reverse_Bit_Order;
5134 procedure Set_RM_Size (Id : E; V : U) is
5136 pragma Assert (Is_Type (Id));
5140 procedure Set_Scalar_Range (Id : E; V : N) is
5143 end Set_Scalar_Range;
5145 procedure Set_Scale_Value (Id : E; V : U) is
5148 end Set_Scale_Value;
5150 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5152 pragma Assert (not Is_Record_Type (Id));
5154 end Set_Scope_Depth_Value;
5156 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5158 Set_Flag167 (Id, V);
5159 end Set_Sec_Stack_Needed_For_Return;
5161 procedure Set_Shadow_Entities (Id : E; V : S) is
5163 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5165 end Set_Shadow_Entities;
5167 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5169 pragma Assert (Ekind (Id) = E_Variable);
5171 end Set_Shared_Var_Procs_Instance;
5173 procedure Set_Size_Check_Code (Id : E; V : N) is
5175 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5177 end Set_Size_Check_Code;
5179 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5181 Set_Flag177 (Id, V);
5182 end Set_Size_Depends_On_Discriminant;
5184 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5187 end Set_Size_Known_At_Compile_Time;
5189 procedure Set_Small_Value (Id : E; V : R) is
5191 pragma Assert (Is_Fixed_Point_Type (Id));
5192 Set_Ureal21 (Id, V);
5193 end Set_Small_Value;
5195 procedure Set_Spec_Entity (Id : E; V : E) is
5197 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5199 end Set_Spec_Entity;
5201 procedure Set_Static_Predicate (Id : E; V : S) is
5204 (Ekind_In (Id, E_Enumeration_Subtype,
5205 E_Modular_Integer_Subtype,
5206 E_Signed_Integer_Subtype)
5207 and then Has_Predicates (Id));
5209 end Set_Static_Predicate;
5211 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5213 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5214 pragma Assert (Id = Base_Type (Id));
5216 end Set_Storage_Size_Variable;
5218 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5220 pragma Assert (Ekind (Id) = E_Package);
5222 end Set_Static_Elaboration_Desired;
5224 procedure Set_Static_Initialization (Id : E; V : N) is
5227 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5229 end Set_Static_Initialization;
5231 procedure Set_Stored_Constraint (Id : E; V : L) is
5233 pragma Assert (Nkind (Id) in N_Entity);
5234 Set_Elist23 (Id, V);
5235 end Set_Stored_Constraint;
5237 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5239 pragma Assert (Id = Base_Type (Id));
5240 Set_Flag145 (Id, V);
5241 end Set_Strict_Alignment;
5243 procedure Set_String_Literal_Length (Id : E; V : U) is
5245 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5247 end Set_String_Literal_Length;
5249 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5251 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5253 end Set_String_Literal_Low_Bound;
5255 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5257 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5259 end Set_Subprograms_For_Type;
5261 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5263 Set_Flag148 (Id, V);
5264 end Set_Suppress_Elaboration_Warnings;
5266 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5268 pragma Assert (Is_Type (Id));
5269 Set_Flag105 (Id, V);
5270 end Set_Suppress_Initialization;
5272 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5274 Set_Flag165 (Id, V);
5275 end Set_Suppress_Style_Checks;
5277 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5279 Set_Flag217 (Id, V);
5280 end Set_Suppress_Value_Tracking_On_Call;
5282 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5284 pragma Assert (Ekind (Id) in Task_Kind);
5286 end Set_Task_Body_Procedure;
5288 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5291 end Set_Treat_As_Volatile;
5293 procedure Set_Underlying_Full_View (Id : E; V : E) is
5295 pragma Assert (Ekind (Id) in Private_Kind);
5297 end Set_Underlying_Full_View;
5299 procedure Set_Underlying_Record_View (Id : E; V : E) is
5301 pragma Assert (Ekind (Id) = E_Record_Type);
5303 end Set_Underlying_Record_View;
5305 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5307 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5308 Set_Flag216 (Id, V);
5309 end Set_Universal_Aliasing;
5311 procedure Set_Unset_Reference (Id : E; V : N) is
5314 end Set_Unset_Reference;
5316 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5319 end Set_Uses_Sec_Stack;
5321 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5323 Set_Flag222 (Id, V);
5324 end Set_Used_As_Generic_Actual;
5326 procedure Set_Warnings_Off (Id : E; V : B := True) is
5329 end Set_Warnings_Off;
5331 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5333 Set_Flag236 (Id, V);
5334 end Set_Warnings_Off_Used;
5336 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5338 Set_Flag237 (Id, V);
5339 end Set_Warnings_Off_Used_Unmodified;
5341 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5343 Set_Flag238 (Id, V);
5344 end Set_Warnings_Off_Used_Unreferenced;
5346 procedure Set_Was_Hidden (Id : E; V : B := True) is
5348 Set_Flag196 (Id, V);
5351 procedure Set_Wrapped_Entity (Id : E; V : E) is
5353 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5354 and then Is_Primitive_Wrapper (Id));
5356 end Set_Wrapped_Entity;
5358 -----------------------------------
5359 -- Field Initialization Routines --
5360 -----------------------------------
5362 procedure Init_Alignment (Id : E) is
5364 Set_Uint14 (Id, Uint_0);
5367 procedure Init_Alignment (Id : E; V : Int) is
5369 Set_Uint14 (Id, UI_From_Int (V));
5372 procedure Init_Component_Bit_Offset (Id : E) is
5374 Set_Uint11 (Id, No_Uint);
5375 end Init_Component_Bit_Offset;
5377 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5379 Set_Uint11 (Id, UI_From_Int (V));
5380 end Init_Component_Bit_Offset;
5382 procedure Init_Component_Size (Id : E) is
5384 Set_Uint22 (Id, Uint_0);
5385 end Init_Component_Size;
5387 procedure Init_Component_Size (Id : E; V : Int) is
5389 Set_Uint22 (Id, UI_From_Int (V));
5390 end Init_Component_Size;
5392 procedure Init_Digits_Value (Id : E) is
5394 Set_Uint17 (Id, Uint_0);
5395 end Init_Digits_Value;
5397 procedure Init_Digits_Value (Id : E; V : Int) is
5399 Set_Uint17 (Id, UI_From_Int (V));
5400 end Init_Digits_Value;
5402 procedure Init_Esize (Id : E) is
5404 Set_Uint12 (Id, Uint_0);
5407 procedure Init_Esize (Id : E; V : Int) is
5409 Set_Uint12 (Id, UI_From_Int (V));
5412 procedure Init_Normalized_First_Bit (Id : E) is
5414 Set_Uint8 (Id, No_Uint);
5415 end Init_Normalized_First_Bit;
5417 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5419 Set_Uint8 (Id, UI_From_Int (V));
5420 end Init_Normalized_First_Bit;
5422 procedure Init_Normalized_Position (Id : E) is
5424 Set_Uint14 (Id, No_Uint);
5425 end Init_Normalized_Position;
5427 procedure Init_Normalized_Position (Id : E; V : Int) is
5429 Set_Uint14 (Id, UI_From_Int (V));
5430 end Init_Normalized_Position;
5432 procedure Init_Normalized_Position_Max (Id : E) is
5434 Set_Uint10 (Id, No_Uint);
5435 end Init_Normalized_Position_Max;
5437 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5439 Set_Uint10 (Id, UI_From_Int (V));
5440 end Init_Normalized_Position_Max;
5442 procedure Init_RM_Size (Id : E) is
5444 Set_Uint13 (Id, Uint_0);
5447 procedure Init_RM_Size (Id : E; V : Int) is
5449 Set_Uint13 (Id, UI_From_Int (V));
5452 -----------------------------
5453 -- Init_Component_Location --
5454 -----------------------------
5456 procedure Init_Component_Location (Id : E) is
5458 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5459 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5460 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5461 Set_Uint12 (Id, Uint_0); -- Esize
5462 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5463 end Init_Component_Location;
5469 procedure Init_Size (Id : E; V : Int) is
5471 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5472 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5475 ---------------------
5476 -- Init_Size_Align --
5477 ---------------------
5479 procedure Init_Size_Align (Id : E) is
5481 Set_Uint12 (Id, Uint_0); -- Esize
5482 Set_Uint13 (Id, Uint_0); -- RM_Size
5483 Set_Uint14 (Id, Uint_0); -- Alignment
5484 end Init_Size_Align;
5486 ----------------------------------------------
5487 -- Type Representation Attribute Predicates --
5488 ----------------------------------------------
5490 function Known_Alignment (E : Entity_Id) return B is
5492 return Uint14 (E) /= Uint_0
5493 and then Uint14 (E) /= No_Uint;
5494 end Known_Alignment;
5496 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5498 return Uint11 (E) /= No_Uint;
5499 end Known_Component_Bit_Offset;
5501 function Known_Component_Size (E : Entity_Id) return B is
5503 return Uint22 (Base_Type (E)) /= Uint_0
5504 and then Uint22 (Base_Type (E)) /= No_Uint;
5505 end Known_Component_Size;
5507 function Known_Esize (E : Entity_Id) return B is
5509 return Uint12 (E) /= Uint_0
5510 and then Uint12 (E) /= No_Uint;
5513 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5515 return Uint8 (E) /= No_Uint;
5516 end Known_Normalized_First_Bit;
5518 function Known_Normalized_Position (E : Entity_Id) return B is
5520 return Uint14 (E) /= No_Uint;
5521 end Known_Normalized_Position;
5523 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5525 return Uint10 (E) /= No_Uint;
5526 end Known_Normalized_Position_Max;
5528 function Known_RM_Size (E : Entity_Id) return B is
5530 return Uint13 (E) /= No_Uint
5531 and then (Uint13 (E) /= Uint_0
5532 or else Is_Discrete_Type (E)
5533 or else Is_Fixed_Point_Type (E));
5536 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5538 return Uint11 (E) /= No_Uint
5539 and then Uint11 (E) >= Uint_0;
5540 end Known_Static_Component_Bit_Offset;
5542 function Known_Static_Component_Size (E : Entity_Id) return B is
5544 return Uint22 (Base_Type (E)) > Uint_0;
5545 end Known_Static_Component_Size;
5547 function Known_Static_Esize (E : Entity_Id) return B is
5549 return Uint12 (E) > Uint_0
5550 and then not Is_Generic_Type (E);
5551 end Known_Static_Esize;
5553 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5555 return Uint8 (E) /= No_Uint
5556 and then Uint8 (E) >= Uint_0;
5557 end Known_Static_Normalized_First_Bit;
5559 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5561 return Uint14 (E) /= No_Uint
5562 and then Uint14 (E) >= Uint_0;
5563 end Known_Static_Normalized_Position;
5565 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5567 return Uint10 (E) /= No_Uint
5568 and then Uint10 (E) >= Uint_0;
5569 end Known_Static_Normalized_Position_Max;
5571 function Known_Static_RM_Size (E : Entity_Id) return B is
5573 return (Uint13 (E) > Uint_0
5574 or else Is_Discrete_Type (E)
5575 or else Is_Fixed_Point_Type (E))
5576 and then not Is_Generic_Type (E);
5577 end Known_Static_RM_Size;
5579 function Unknown_Alignment (E : Entity_Id) return B is
5581 return Uint14 (E) = Uint_0
5582 or else Uint14 (E) = No_Uint;
5583 end Unknown_Alignment;
5585 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5587 return Uint11 (E) = No_Uint;
5588 end Unknown_Component_Bit_Offset;
5590 function Unknown_Component_Size (E : Entity_Id) return B is
5592 return Uint22 (Base_Type (E)) = Uint_0
5594 Uint22 (Base_Type (E)) = No_Uint;
5595 end Unknown_Component_Size;
5597 function Unknown_Esize (E : Entity_Id) return B is
5599 return Uint12 (E) = No_Uint
5601 Uint12 (E) = Uint_0;
5604 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5606 return Uint8 (E) = No_Uint;
5607 end Unknown_Normalized_First_Bit;
5609 function Unknown_Normalized_Position (E : Entity_Id) return B is
5611 return Uint14 (E) = No_Uint;
5612 end Unknown_Normalized_Position;
5614 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5616 return Uint10 (E) = No_Uint;
5617 end Unknown_Normalized_Position_Max;
5619 function Unknown_RM_Size (E : Entity_Id) return B is
5621 return (Uint13 (E) = Uint_0
5622 and then not Is_Discrete_Type (E)
5623 and then not Is_Fixed_Point_Type (E))
5624 or else Uint13 (E) = No_Uint;
5625 end Unknown_RM_Size;
5627 --------------------
5628 -- Address_Clause --
5629 --------------------
5631 function Address_Clause (Id : E) return N is
5633 return Rep_Clause (Id, Name_Address);
5640 function Aft_Value (Id : E) return U is
5642 Delta_Val : Ureal := Delta_Value (Id);
5644 while Delta_Val < Ureal_Tenth loop
5645 Delta_Val := Delta_Val * Ureal_10;
5646 Result := Result + 1;
5649 return UI_From_Int (Result);
5652 ----------------------
5653 -- Alignment_Clause --
5654 ----------------------
5656 function Alignment_Clause (Id : E) return N is
5658 return Rep_Clause (Id, Name_Alignment);
5659 end Alignment_Clause;
5665 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5667 if Last_Entity (V) = Empty then
5668 Set_First_Entity (Id => V, V => Id);
5670 Set_Next_Entity (Last_Entity (V), Id);
5673 Set_Next_Entity (Id, Empty);
5675 Set_Last_Entity (Id => V, V => Id);
5682 function Base_Type (Id : E) return E is
5684 if Is_Base_Type (Id) then
5687 pragma Assert (Is_Type (Id));
5692 -------------------------
5693 -- Component_Alignment --
5694 -------------------------
5696 -- Component Alignment is encoded using two flags, Flag128/129 as
5697 -- follows. Note that both flags False = Align_Default, so that the
5698 -- default initialization of flags to False initializes component
5699 -- alignment to the default value as required.
5701 -- Flag128 Flag129 Value
5702 -- ------- ------- -----
5703 -- False False Calign_Default
5704 -- False True Calign_Component_Size
5705 -- True False Calign_Component_Size_4
5706 -- True True Calign_Storage_Unit
5708 function Component_Alignment (Id : E) return C is
5709 BT : constant Node_Id := Base_Type (Id);
5712 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5714 if Flag128 (BT) then
5715 if Flag129 (BT) then
5716 return Calign_Storage_Unit;
5718 return Calign_Component_Size_4;
5722 if Flag129 (BT) then
5723 return Calign_Component_Size;
5725 return Calign_Default;
5728 end Component_Alignment;
5730 ----------------------
5731 -- Declaration_Node --
5732 ----------------------
5734 function Declaration_Node (Id : E) return N is
5738 if Ekind (Id) = E_Incomplete_Type
5739 and then Present (Full_View (Id))
5741 P := Parent (Full_View (Id));
5747 if Nkind (P) /= N_Selected_Component
5748 and then Nkind (P) /= N_Expanded_Name
5750 not (Nkind (P) = N_Defining_Program_Unit_Name
5751 and then Is_Child_Unit (Id))
5758 end Declaration_Node;
5760 ---------------------
5761 -- Designated_Type --
5762 ---------------------
5764 function Designated_Type (Id : E) return E is
5768 Desig_Type := Directly_Designated_Type (Id);
5770 if Ekind (Desig_Type) = E_Incomplete_Type
5771 and then Present (Full_View (Desig_Type))
5773 return Full_View (Desig_Type);
5775 elsif Is_Class_Wide_Type (Desig_Type)
5776 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5777 and then Present (Full_View (Etype (Desig_Type)))
5778 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5780 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5785 end Designated_Type;
5787 ----------------------
5788 -- Entry_Index_Type --
5789 ----------------------
5791 function Entry_Index_Type (Id : E) return N is
5793 pragma Assert (Ekind (Id) = E_Entry_Family);
5794 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5795 end Entry_Index_Type;
5797 ---------------------
5798 -- First_Component --
5799 ---------------------
5801 function First_Component (Id : E) return E is
5806 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5808 Comp_Id := First_Entity (Id);
5809 while Present (Comp_Id) loop
5810 exit when Ekind (Comp_Id) = E_Component;
5811 Comp_Id := Next_Entity (Comp_Id);
5815 end First_Component;
5817 -------------------------------------
5818 -- First_Component_Or_Discriminant --
5819 -------------------------------------
5821 function First_Component_Or_Discriminant (Id : E) return E is
5826 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5828 Comp_Id := First_Entity (Id);
5829 while Present (Comp_Id) loop
5830 exit when Ekind (Comp_Id) = E_Component
5832 Ekind (Comp_Id) = E_Discriminant;
5833 Comp_Id := Next_Entity (Comp_Id);
5837 end First_Component_Or_Discriminant;
5843 function First_Formal (Id : E) return E is
5848 (Is_Overloadable (Id)
5849 or else Ekind_In (Id, E_Entry_Family,
5851 E_Subprogram_Type));
5853 if Ekind (Id) = E_Enumeration_Literal then
5857 Formal := First_Entity (Id);
5859 if Present (Formal) and then Is_Formal (Formal) then
5867 ------------------------------
5868 -- First_Formal_With_Extras --
5869 ------------------------------
5871 function First_Formal_With_Extras (Id : E) return E is
5876 (Is_Overloadable (Id)
5877 or else Ekind_In (Id, E_Entry_Family,
5879 E_Subprogram_Type));
5881 if Ekind (Id) = E_Enumeration_Literal then
5885 Formal := First_Entity (Id);
5887 if Present (Formal) and then Is_Formal (Formal) then
5890 return Extra_Formals (Id); -- Empty if no extra formals
5893 end First_Formal_With_Extras;
5895 -------------------------------------
5896 -- Get_Attribute_Definition_Clause --
5897 -------------------------------------
5899 function Get_Attribute_Definition_Clause
5901 Id : Attribute_Id) return Node_Id
5906 N := First_Rep_Item (E);
5907 while Present (N) loop
5908 if Nkind (N) = N_Attribute_Definition_Clause
5909 and then Get_Attribute_Id (Chars (N)) = Id
5918 end Get_Attribute_Definition_Clause;
5924 function Get_Full_View (T : Entity_Id) return Entity_Id is
5926 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5927 return Full_View (T);
5929 elsif Is_Class_Wide_Type (T)
5930 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5931 and then Present (Full_View (Root_Type (T)))
5933 return Class_Wide_Type (Full_View (Root_Type (T)));
5940 --------------------------------------
5941 -- Get_Record_Representation_Clause --
5942 --------------------------------------
5944 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5948 N := First_Rep_Item (E);
5949 while Present (N) loop
5950 if Nkind (N) = N_Record_Representation_Clause then
5958 end Get_Record_Representation_Clause;
5960 -----------------------------
5961 -- Get_Rep_Item_For_Entity --
5962 -----------------------------
5964 function Get_Rep_Item_For_Entity
5966 Nam : Name_Id) return Node_Id
5972 N := First_Rep_Item (E);
5973 while Present (N) loop
5974 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5975 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5977 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5981 elsif Nkind (N) = N_Attribute_Definition_Clause
5982 and then Chars (N) = Nam
5983 and then Entity (N) = E
5987 elsif Nkind (N) = N_Aspect_Specification
5988 and then Chars (Identifier (N)) = Nam
5989 and then Entity (N) = E
5998 end Get_Rep_Item_For_Entity;
6000 --------------------
6001 -- Get_Rep_Pragma --
6002 --------------------
6004 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6008 N := First_Rep_Item (E);
6009 while Present (N) loop
6010 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6020 ------------------------
6021 -- Has_Attach_Handler --
6022 ------------------------
6024 function Has_Attach_Handler (Id : E) return B is
6028 pragma Assert (Is_Protected_Type (Id));
6030 Ritem := First_Rep_Item (Id);
6031 while Present (Ritem) loop
6032 if Nkind (Ritem) = N_Pragma
6033 and then Pragma_Name (Ritem) = Name_Attach_Handler
6037 Next_Rep_Item (Ritem);
6042 end Has_Attach_Handler;
6044 -------------------------------------
6045 -- Has_Attribute_Definition_Clause --
6046 -------------------------------------
6048 function Has_Attribute_Definition_Clause
6050 Id : Attribute_Id) return Boolean
6053 return Present (Get_Attribute_Definition_Clause (E, Id));
6054 end Has_Attribute_Definition_Clause;
6060 function Has_Entries (Id : E) return B is
6064 pragma Assert (Is_Concurrent_Type (Id));
6066 Ent := First_Entity (Id);
6067 while Present (Ent) loop
6068 if Is_Entry (Ent) then
6072 Ent := Next_Entity (Ent);
6078 ----------------------------
6079 -- Has_Foreign_Convention --
6080 ----------------------------
6082 function Has_Foreign_Convention (Id : E) return B is
6084 -- While regular Intrinsics such as the Standard operators fit in the
6085 -- "Ada" convention, those with an Interface_Name materialize GCC
6086 -- builtin imports for which Ada special treatments shouldn't apply.
6088 return Convention (Id) in Foreign_Convention
6089 or else (Convention (Id) = Convention_Intrinsic
6090 and then Present (Interface_Name (Id)));
6091 end Has_Foreign_Convention;
6093 ---------------------------
6094 -- Has_Interrupt_Handler --
6095 ---------------------------
6097 function Has_Interrupt_Handler (Id : E) return B is
6101 pragma Assert (Is_Protected_Type (Id));
6103 Ritem := First_Rep_Item (Id);
6104 while Present (Ritem) loop
6105 if Nkind (Ritem) = N_Pragma
6106 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6110 Next_Rep_Item (Ritem);
6115 end Has_Interrupt_Handler;
6117 --------------------
6118 -- Has_Rep_Pragma --
6119 --------------------
6121 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6123 return Present (Get_Rep_Pragma (E, Nam));
6126 --------------------
6127 -- Has_Unmodified --
6128 --------------------
6130 function Has_Unmodified (E : Entity_Id) return Boolean is
6132 if Has_Pragma_Unmodified (E) then
6134 elsif Warnings_Off (E) then
6135 Set_Warnings_Off_Used_Unmodified (E);
6142 ---------------------
6143 -- Has_Unreferenced --
6144 ---------------------
6146 function Has_Unreferenced (E : Entity_Id) return Boolean is
6148 if Has_Pragma_Unreferenced (E) then
6150 elsif Warnings_Off (E) then
6151 Set_Warnings_Off_Used_Unreferenced (E);
6156 end Has_Unreferenced;
6158 ----------------------
6159 -- Has_Warnings_Off --
6160 ----------------------
6162 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6164 if Warnings_Off (E) then
6165 Set_Warnings_Off_Used (E);
6170 end Has_Warnings_Off;
6172 ------------------------------
6173 -- Implementation_Base_Type --
6174 ------------------------------
6176 function Implementation_Base_Type (Id : E) return E is
6181 Bastyp := Base_Type (Id);
6183 if Is_Incomplete_Or_Private_Type (Bastyp) then
6184 Imptyp := Underlying_Type (Bastyp);
6186 -- If we have an implementation type, then just return it,
6187 -- otherwise we return the Base_Type anyway. This can only
6188 -- happen in error situations and should avoid some error bombs.
6190 if Present (Imptyp) then
6191 return Base_Type (Imptyp);
6199 end Implementation_Base_Type;
6201 -------------------------
6202 -- Invariant_Procedure --
6203 -------------------------
6205 function Invariant_Procedure (Id : E) return E is
6209 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6211 if No (Subprograms_For_Type (Id)) then
6215 S := Subprograms_For_Type (Id);
6216 while Present (S) loop
6217 if Has_Invariants (S) then
6220 S := Subprograms_For_Type (S);
6226 end Invariant_Procedure;
6232 -- Global flag table allowing rapid computation of this function
6234 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6235 (E_Enumeration_Subtype |
6237 E_Signed_Integer_Subtype |
6238 E_Modular_Integer_Subtype |
6239 E_Floating_Point_Subtype |
6240 E_Ordinary_Fixed_Point_Subtype |
6241 E_Decimal_Fixed_Point_Subtype |
6246 E_Record_Subtype_With_Private |
6247 E_Limited_Private_Subtype |
6249 E_Protected_Subtype |
6251 E_String_Literal_Subtype |
6252 E_Class_Wide_Subtype => False,
6255 function Is_Base_Type (Id : E) return Boolean is
6257 return Entity_Is_Base_Type (Ekind (Id));
6260 ---------------------
6261 -- Is_Boolean_Type --
6262 ---------------------
6264 function Is_Boolean_Type (Id : E) return B is
6266 return Root_Type (Id) = Standard_Boolean;
6267 end Is_Boolean_Type;
6269 ------------------------
6270 -- Is_Constant_Object --
6271 ------------------------
6273 function Is_Constant_Object (Id : E) return B is
6274 K : constant Entity_Kind := Ekind (Id);
6277 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6278 end Is_Constant_Object;
6280 --------------------
6281 -- Is_Discriminal --
6282 --------------------
6284 function Is_Discriminal (Id : E) return B is
6286 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6287 and then Present (Discriminal_Link (Id)));
6290 ----------------------
6291 -- Is_Dynamic_Scope --
6292 ----------------------
6294 function Is_Dynamic_Scope (Id : E) return B is
6297 Ekind (Id) = E_Block
6299 Ekind (Id) = E_Function
6301 Ekind (Id) = E_Procedure
6303 Ekind (Id) = E_Subprogram_Body
6305 Ekind (Id) = E_Task_Type
6307 (Ekind (Id) = E_Limited_Private_Type
6308 and then Present (Full_View (Id))
6309 and then Ekind (Full_View (Id)) = E_Task_Type)
6311 Ekind (Id) = E_Entry
6313 Ekind (Id) = E_Entry_Family
6315 Ekind (Id) = E_Return_Statement;
6316 end Is_Dynamic_Scope;
6318 --------------------
6319 -- Is_Entity_Name --
6320 --------------------
6322 function Is_Entity_Name (N : Node_Id) return Boolean is
6323 Kind : constant Node_Kind := Nkind (N);
6326 -- Identifiers, operator symbols, expanded names are entity names
6328 return Kind = N_Identifier
6329 or else Kind = N_Operator_Symbol
6330 or else Kind = N_Expanded_Name
6332 -- Attribute references are entity names if they refer to an entity.
6333 -- Note that we don't do this by testing for the presence of the
6334 -- Entity field in the N_Attribute_Reference node, since it may not
6335 -- have been set yet.
6337 or else (Kind = N_Attribute_Reference
6338 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6345 function Is_Finalizer (Id : E) return B is
6347 return Ekind (Id) = E_Procedure
6348 and then Chars (Id) = Name_uFinalizer;
6351 -----------------------------------
6352 -- Is_Package_Or_Generic_Package --
6353 -----------------------------------
6355 function Is_Package_Or_Generic_Package (Id : E) return B is
6358 Ekind (Id) = E_Package
6360 Ekind (Id) = E_Generic_Package;
6361 end Is_Package_Or_Generic_Package;
6363 ------------------------
6364 -- Predicate_Function --
6365 ------------------------
6367 function Predicate_Function (Id : E) return E is
6371 pragma Assert (Is_Type (Id));
6373 if No (Subprograms_For_Type (Id)) then
6377 S := Subprograms_For_Type (Id);
6378 while Present (S) loop
6379 if Has_Predicates (S) then
6382 S := Subprograms_For_Type (S);
6388 end Predicate_Function;
6394 function Is_Prival (Id : E) return B is
6396 return (Ekind_In (Id, E_Constant, E_Variable)
6397 and then Present (Prival_Link (Id)));
6400 ----------------------------
6401 -- Is_Protected_Component --
6402 ----------------------------
6404 function Is_Protected_Component (Id : E) return B is
6406 return Ekind (Id) = E_Component
6407 and then Is_Protected_Type (Scope (Id));
6408 end Is_Protected_Component;
6410 ----------------------------
6411 -- Is_Protected_Interface --
6412 ----------------------------
6414 function Is_Protected_Interface (Id : E) return B is
6415 Typ : constant Entity_Id := Base_Type (Id);
6417 if not Is_Interface (Typ) then
6419 elsif Is_Class_Wide_Type (Typ) then
6420 return Is_Protected_Interface (Etype (Typ));
6422 return Protected_Present (Type_Definition (Parent (Typ)));
6424 end Is_Protected_Interface;
6426 ------------------------------
6427 -- Is_Protected_Record_Type --
6428 ------------------------------
6430 function Is_Protected_Record_Type (Id : E) return B is
6433 Is_Concurrent_Record_Type (Id)
6434 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6435 end Is_Protected_Record_Type;
6437 --------------------------------
6438 -- Is_Standard_Character_Type --
6439 --------------------------------
6441 function Is_Standard_Character_Type (Id : E) return B is
6443 if Is_Type (Id) then
6445 R : constant Entity_Id := Root_Type (Id);
6448 R = Standard_Character
6450 R = Standard_Wide_Character
6452 R = Standard_Wide_Wide_Character;
6458 end Is_Standard_Character_Type;
6460 --------------------
6461 -- Is_String_Type --
6462 --------------------
6464 function Is_String_Type (Id : E) return B is
6466 return Ekind (Id) in String_Kind
6467 or else (Is_Array_Type (Id)
6468 and then Id /= Any_Composite
6469 and then Number_Dimensions (Id) = 1
6470 and then Is_Character_Type (Component_Type (Id)));
6473 -------------------------------
6474 -- Is_Synchronized_Interface --
6475 -------------------------------
6477 function Is_Synchronized_Interface (Id : E) return B is
6478 Typ : constant Entity_Id := Base_Type (Id);
6481 if not Is_Interface (Typ) then
6484 elsif Is_Class_Wide_Type (Typ) then
6485 return Is_Synchronized_Interface (Etype (Typ));
6488 return Protected_Present (Type_Definition (Parent (Typ)))
6489 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6490 or else Task_Present (Type_Definition (Parent (Typ)));
6492 end Is_Synchronized_Interface;
6494 -----------------------
6495 -- Is_Task_Interface --
6496 -----------------------
6498 function Is_Task_Interface (Id : E) return B is
6499 Typ : constant Entity_Id := Base_Type (Id);
6501 if not Is_Interface (Typ) then
6503 elsif Is_Class_Wide_Type (Typ) then
6504 return Is_Task_Interface (Etype (Typ));
6506 return Task_Present (Type_Definition (Parent (Typ)));
6508 end Is_Task_Interface;
6510 -------------------------
6511 -- Is_Task_Record_Type --
6512 -------------------------
6514 function Is_Task_Record_Type (Id : E) return B is
6517 Is_Concurrent_Record_Type (Id)
6518 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6519 end Is_Task_Record_Type;
6521 ------------------------
6522 -- Is_Wrapper_Package --
6523 ------------------------
6525 function Is_Wrapper_Package (Id : E) return B is
6527 return (Ekind (Id) = E_Package
6528 and then Present (Related_Instance (Id)));
6529 end Is_Wrapper_Package;
6535 function Last_Formal (Id : E) return E is
6540 (Is_Overloadable (Id)
6541 or else Ekind_In (Id, E_Entry_Family,
6543 E_Subprogram_Type));
6545 if Ekind (Id) = E_Enumeration_Literal then
6549 Formal := First_Formal (Id);
6551 if Present (Formal) then
6552 while Present (Next_Formal (Formal)) loop
6553 Formal := Next_Formal (Formal);
6561 function Model_Emin_Value (Id : E) return Uint is
6563 return Machine_Emin_Value (Id);
6564 end Model_Emin_Value;
6566 -------------------------
6567 -- Model_Epsilon_Value --
6568 -------------------------
6570 function Model_Epsilon_Value (Id : E) return Ureal is
6571 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6573 return Radix ** (1 - Model_Mantissa_Value (Id));
6574 end Model_Epsilon_Value;
6576 --------------------------
6577 -- Model_Mantissa_Value --
6578 --------------------------
6580 function Model_Mantissa_Value (Id : E) return Uint is
6582 return Machine_Mantissa_Value (Id);
6583 end Model_Mantissa_Value;
6585 -----------------------
6586 -- Model_Small_Value --
6587 -----------------------
6589 function Model_Small_Value (Id : E) return Ureal is
6590 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6592 return Radix ** (Model_Emin_Value (Id) - 1);
6593 end Model_Small_Value;
6595 ------------------------
6596 -- Machine_Emax_Value --
6597 ------------------------
6599 function Machine_Emax_Value (Id : E) return Uint is
6600 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6603 case Float_Rep (Id) is
6606 when 1 .. 6 => return Uint_128;
6607 when 7 .. 15 => return 2**10;
6608 when 16 .. 33 => return 2**14;
6609 when others => return No_Uint;
6614 when 1 .. 9 => return 2**7 - 1;
6615 when 10 .. 15 => return 2**10 - 1;
6616 when others => return No_Uint;
6620 return Uint_2 ** Uint_7 - Uint_1;
6622 end Machine_Emax_Value;
6624 ------------------------
6625 -- Machine_Emin_Value --
6626 ------------------------
6628 function Machine_Emin_Value (Id : E) return Uint is
6630 case Float_Rep (Id) is
6631 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6632 when VAX_Native => return -Machine_Emax_Value (Id);
6633 when AAMP => return -Machine_Emax_Value (Id);
6635 end Machine_Emin_Value;
6637 ----------------------------
6638 -- Machine_Mantissa_Value --
6639 ----------------------------
6641 function Machine_Mantissa_Value (Id : E) return Uint is
6642 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6645 case Float_Rep (Id) is
6648 when 1 .. 6 => return Uint_24;
6649 when 7 .. 15 => return UI_From_Int (53);
6650 when 16 .. 18 => return Uint_64;
6651 when 19 .. 33 => return UI_From_Int (113);
6652 when others => return No_Uint;
6657 when 1 .. 6 => return Uint_24;
6658 when 7 .. 9 => return UI_From_Int (56);
6659 when 10 .. 15 => return UI_From_Int (53);
6660 when others => return No_Uint;
6665 when 1 .. 6 => return Uint_24;
6666 when 7 .. 9 => return UI_From_Int (40);
6667 when others => return No_Uint;
6670 end Machine_Mantissa_Value;
6672 -------------------------
6673 -- Machine_Radix_Value --
6674 -------------------------
6676 function Machine_Radix_Value (Id : E) return U is
6678 case Float_Rep (Id) is
6679 when IEEE_Binary | VAX_Native | AAMP =>
6682 end Machine_Radix_Value;
6684 --------------------
6685 -- Next_Component --
6686 --------------------
6688 function Next_Component (Id : E) return E is
6692 Comp_Id := Next_Entity (Id);
6693 while Present (Comp_Id) loop
6694 exit when Ekind (Comp_Id) = E_Component;
6695 Comp_Id := Next_Entity (Comp_Id);
6701 ------------------------------------
6702 -- Next_Component_Or_Discriminant --
6703 ------------------------------------
6705 function Next_Component_Or_Discriminant (Id : E) return E is
6709 Comp_Id := Next_Entity (Id);
6710 while Present (Comp_Id) loop
6711 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6712 Comp_Id := Next_Entity (Comp_Id);
6716 end Next_Component_Or_Discriminant;
6718 -----------------------
6719 -- Next_Discriminant --
6720 -----------------------
6722 -- This function actually implements both Next_Discriminant and
6723 -- Next_Stored_Discriminant by making sure that the Discriminant
6724 -- returned is of the same variety as Id.
6726 function Next_Discriminant (Id : E) return E is
6728 -- Derived Tagged types with private extensions look like this...
6730 -- E_Discriminant d1
6731 -- E_Discriminant d2
6733 -- E_Discriminant d1
6734 -- E_Discriminant d2
6737 -- so it is critical not to go past the leading discriminants
6742 pragma Assert (Ekind (Id) = E_Discriminant);
6745 D := Next_Entity (D);
6747 or else (Ekind (D) /= E_Discriminant
6748 and then not Is_Itype (D))
6753 exit when Ekind (D) = E_Discriminant
6754 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6758 end Next_Discriminant;
6764 function Next_Formal (Id : E) return E is
6768 -- Follow the chain of declared entities as long as the kind of the
6769 -- entity corresponds to a formal parameter. Skip internal entities
6770 -- that may have been created for implicit subtypes, in the process
6771 -- of analyzing default expressions.
6775 P := Next_Entity (P);
6777 if No (P) or else Is_Formal (P) then
6779 elsif not Is_Internal (P) then
6785 -----------------------------
6786 -- Next_Formal_With_Extras --
6787 -----------------------------
6789 function Next_Formal_With_Extras (Id : E) return E is
6791 if Present (Extra_Formal (Id)) then
6792 return Extra_Formal (Id);
6794 return Next_Formal (Id);
6796 end Next_Formal_With_Extras;
6802 function Next_Index (Id : Node_Id) return Node_Id is
6811 function Next_Literal (Id : E) return E is
6813 pragma Assert (Nkind (Id) in N_Entity);
6817 ------------------------------
6818 -- Next_Stored_Discriminant --
6819 ------------------------------
6821 function Next_Stored_Discriminant (Id : E) return E is
6823 -- See comment in Next_Discriminant
6825 return Next_Discriminant (Id);
6826 end Next_Stored_Discriminant;
6828 -----------------------
6829 -- Number_Dimensions --
6830 -----------------------
6832 function Number_Dimensions (Id : E) return Pos is
6837 if Ekind (Id) in String_Kind then
6842 T := First_Index (Id);
6843 while Present (T) loop
6850 end Number_Dimensions;
6852 --------------------
6853 -- Number_Entries --
6854 --------------------
6856 function Number_Entries (Id : E) return Nat is
6861 pragma Assert (Is_Concurrent_Type (Id));
6864 Ent := First_Entity (Id);
6865 while Present (Ent) loop
6866 if Is_Entry (Ent) then
6870 Ent := Next_Entity (Ent);
6876 --------------------
6877 -- Number_Formals --
6878 --------------------
6880 function Number_Formals (Id : E) return Pos is
6886 Formal := First_Formal (Id);
6887 while Present (Formal) loop
6889 Formal := Next_Formal (Formal);
6895 --------------------
6896 -- Parameter_Mode --
6897 --------------------
6899 function Parameter_Mode (Id : E) return Formal_Kind is
6904 --------------------------
6905 -- Primitive_Operations --
6906 --------------------------
6908 function Primitive_Operations (Id : E) return L is
6910 if Is_Concurrent_Type (Id) then
6911 if Present (Corresponding_Record_Type (Id)) then
6912 return Direct_Primitive_Operations
6913 (Corresponding_Record_Type (Id));
6918 return Direct_Primitive_Operations (Id);
6920 end Primitive_Operations;
6922 ---------------------
6923 -- Record_Rep_Item --
6924 ---------------------
6926 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6928 Set_Next_Rep_Item (N, First_Rep_Item (E));
6929 Set_First_Rep_Item (E, N);
6930 end Record_Rep_Item;
6936 function Root_Type (Id : E) return E is
6940 pragma Assert (Nkind (Id) in N_Entity);
6942 T := Base_Type (Id);
6944 if Ekind (T) = E_Class_Wide_Type then
6947 elsif Ekind (T) = E_Class_Wide_Subtype then
6948 return Etype (Base_Type (T));
6950 -- ??? T comes from Base_Type, how can it be a subtype?
6951 -- Also Base_Type is supposed to be idempotent, so either way
6952 -- this is equivalent to "return Etype (T)" and should be merged
6953 -- with the E_Class_Wide_Type case.
6964 -- Following test catches some error cases resulting from
6967 elsif No (Etyp) then
6970 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6973 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6979 -- Return if there is a circularity in the inheritance chain. This
6980 -- happens in some error situations and we do not want to get
6981 -- stuck in this loop.
6983 if T = Base_Type (Id) then
6990 ---------------------
6991 -- Safe_Emax_Value --
6992 ---------------------
6994 function Safe_Emax_Value (Id : E) return Uint is
6996 return Machine_Emax_Value (Id);
6997 end Safe_Emax_Value;
6999 ----------------------
7000 -- Safe_First_Value --
7001 ----------------------
7003 function Safe_First_Value (Id : E) return Ureal is
7005 return -Safe_Last_Value (Id);
7006 end Safe_First_Value;
7008 ---------------------
7009 -- Safe_Last_Value --
7010 ---------------------
7012 function Safe_Last_Value (Id : E) return Ureal is
7013 Radix : constant Uint := Machine_Radix_Value (Id);
7014 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7015 Emax : constant Uint := Safe_Emax_Value (Id);
7016 Significand : constant Uint := Radix ** Mantissa - 1;
7017 Exponent : constant Uint := Emax - Mantissa;
7023 (Num => Significand * 2 ** (Exponent mod 4),
7024 Den => -Exponent / 4,
7030 (Num => Significand,
7034 end Safe_Last_Value;
7040 function Scope_Depth (Id : E) return Uint is
7045 while Is_Record_Type (Scop) loop
7046 Scop := Scope (Scop);
7049 return Scope_Depth_Value (Scop);
7052 ---------------------
7053 -- Scope_Depth_Set --
7054 ---------------------
7056 function Scope_Depth_Set (Id : E) return B is
7058 return not Is_Record_Type (Id)
7059 and then Field22 (Id) /= Union_Id (Empty);
7060 end Scope_Depth_Set;
7062 -----------------------------
7063 -- Set_Component_Alignment --
7064 -----------------------------
7066 -- Component Alignment is encoded using two flags, Flag128/129 as
7067 -- follows. Note that both flags False = Align_Default, so that the
7068 -- default initialization of flags to False initializes component
7069 -- alignment to the default value as required.
7071 -- Flag128 Flag129 Value
7072 -- ------- ------- -----
7073 -- False False Calign_Default
7074 -- False True Calign_Component_Size
7075 -- True False Calign_Component_Size_4
7076 -- True True Calign_Storage_Unit
7078 procedure Set_Component_Alignment (Id : E; V : C) is
7080 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7081 and then Is_Base_Type (Id));
7084 when Calign_Default =>
7085 Set_Flag128 (Id, False);
7086 Set_Flag129 (Id, False);
7088 when Calign_Component_Size =>
7089 Set_Flag128 (Id, False);
7090 Set_Flag129 (Id, True);
7092 when Calign_Component_Size_4 =>
7093 Set_Flag128 (Id, True);
7094 Set_Flag129 (Id, False);
7096 when Calign_Storage_Unit =>
7097 Set_Flag128 (Id, True);
7098 Set_Flag129 (Id, True);
7100 end Set_Component_Alignment;
7102 -----------------------------
7103 -- Set_Invariant_Procedure --
7104 -----------------------------
7106 procedure Set_Invariant_Procedure (Id : E; V : E) is
7110 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7112 S := Subprograms_For_Type (Id);
7113 Set_Subprograms_For_Type (Id, V);
7115 while Present (S) loop
7116 if Has_Invariants (S) then
7117 raise Program_Error;
7119 S := Subprograms_For_Type (S);
7123 Set_Subprograms_For_Type (Id, V);
7124 end Set_Invariant_Procedure;
7126 ----------------------------
7127 -- Set_Predicate_Function --
7128 ----------------------------
7130 procedure Set_Predicate_Function (Id : E; V : E) is
7134 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7136 S := Subprograms_For_Type (Id);
7137 Set_Subprograms_For_Type (Id, V);
7139 while Present (S) loop
7140 if Has_Predicates (S) then
7141 raise Program_Error;
7143 S := Subprograms_For_Type (S);
7147 Set_Subprograms_For_Type (Id, V);
7148 end Set_Predicate_Function;
7154 function Size_Clause (Id : E) return N is
7156 return Rep_Clause (Id, Name_Size);
7159 ------------------------
7160 -- Stream_Size_Clause --
7161 ------------------------
7163 function Stream_Size_Clause (Id : E) return N is
7165 return Rep_Clause (Id, Name_Stream_Size);
7166 end Stream_Size_Clause;
7172 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7178 Kind := E_Access_Subtype;
7182 Kind := E_Array_Subtype;
7184 when E_Class_Wide_Type |
7185 E_Class_Wide_Subtype =>
7186 Kind := E_Class_Wide_Subtype;
7188 when E_Decimal_Fixed_Point_Type |
7189 E_Decimal_Fixed_Point_Subtype =>
7190 Kind := E_Decimal_Fixed_Point_Subtype;
7192 when E_Ordinary_Fixed_Point_Type |
7193 E_Ordinary_Fixed_Point_Subtype =>
7194 Kind := E_Ordinary_Fixed_Point_Subtype;
7196 when E_Private_Type |
7197 E_Private_Subtype =>
7198 Kind := E_Private_Subtype;
7200 when E_Limited_Private_Type |
7201 E_Limited_Private_Subtype =>
7202 Kind := E_Limited_Private_Subtype;
7204 when E_Record_Type_With_Private |
7205 E_Record_Subtype_With_Private =>
7206 Kind := E_Record_Subtype_With_Private;
7208 when E_Record_Type |
7210 Kind := E_Record_Subtype;
7212 when E_String_Type |
7214 Kind := E_String_Subtype;
7216 when Enumeration_Kind =>
7217 Kind := E_Enumeration_Subtype;
7220 Kind := E_Floating_Point_Subtype;
7222 when Signed_Integer_Kind =>
7223 Kind := E_Signed_Integer_Subtype;
7225 when Modular_Integer_Kind =>
7226 Kind := E_Modular_Integer_Subtype;
7228 when Protected_Kind =>
7229 Kind := E_Protected_Subtype;
7232 Kind := E_Task_Subtype;
7236 raise Program_Error;
7242 ---------------------
7243 -- Type_High_Bound --
7244 ---------------------
7246 function Type_High_Bound (Id : E) return Node_Id is
7247 Rng : constant Node_Id := Scalar_Range (Id);
7249 if Nkind (Rng) = N_Subtype_Indication then
7250 return High_Bound (Range_Expression (Constraint (Rng)));
7252 return High_Bound (Rng);
7254 end Type_High_Bound;
7256 --------------------
7257 -- Type_Low_Bound --
7258 --------------------
7260 function Type_Low_Bound (Id : E) return Node_Id is
7261 Rng : constant Node_Id := Scalar_Range (Id);
7263 if Nkind (Rng) = N_Subtype_Indication then
7264 return Low_Bound (Range_Expression (Constraint (Rng)));
7266 return Low_Bound (Rng);
7270 ---------------------
7271 -- Underlying_Type --
7272 ---------------------
7274 function Underlying_Type (Id : E) return E is
7276 -- For record_with_private the underlying type is always the direct
7277 -- full view. Never try to take the full view of the parent it
7278 -- doesn't make sense.
7280 if Ekind (Id) = E_Record_Type_With_Private then
7281 return Full_View (Id);
7283 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7285 -- If we have an incomplete or private type with a full view,
7286 -- then we return the Underlying_Type of this full view
7288 if Present (Full_View (Id)) then
7289 if Id = Full_View (Id) then
7291 -- Previous error in declaration
7296 return Underlying_Type (Full_View (Id));
7299 -- If we have an incomplete entity that comes from the limited
7300 -- view then we return the Underlying_Type of its non-limited
7303 elsif From_With_Type (Id)
7304 and then Present (Non_Limited_View (Id))
7306 return Underlying_Type (Non_Limited_View (Id));
7308 -- Otherwise check for the case where we have a derived type or
7309 -- subtype, and if so get the Underlying_Type of the parent type.
7311 elsif Etype (Id) /= Id then
7312 return Underlying_Type (Etype (Id));
7314 -- Otherwise we have an incomplete or private type that has
7315 -- no full view, which means that we have not encountered the
7316 -- completion, so return Empty to indicate the underlying type
7317 -- is not yet known.
7323 -- For non-incomplete, non-private types, return the type itself
7324 -- Also for entities that are not types at all return the entity
7330 end Underlying_Type;
7336 function Vax_Float (Id : E) return B is
7338 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7341 ------------------------
7342 -- Write_Entity_Flags --
7343 ------------------------
7345 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7347 procedure W (Flag_Name : String; Flag : Boolean);
7348 -- Write out given flag if it is set
7354 procedure W (Flag_Name : String; Flag : Boolean) is
7358 Write_Str (Flag_Name);
7359 Write_Str (" = True");
7364 -- Start of processing for Write_Entity_Flags
7367 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7368 and then Is_Base_Type (Id)
7371 Write_Str ("Component_Alignment = ");
7373 case Component_Alignment (Id) is
7374 when Calign_Default =>
7375 Write_Str ("Calign_Default");
7377 when Calign_Component_Size =>
7378 Write_Str ("Calign_Component_Size");
7380 when Calign_Component_Size_4 =>
7381 Write_Str ("Calign_Component_Size_4");
7383 when Calign_Storage_Unit =>
7384 Write_Str ("Calign_Storage_Unit");
7390 W ("Address_Taken", Flag104 (Id));
7391 W ("Body_Needed_For_SAL", Flag40 (Id));
7392 W ("C_Pass_By_Copy", Flag125 (Id));
7393 W ("Can_Never_Be_Null", Flag38 (Id));
7394 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7395 W ("Debug_Info_Off", Flag166 (Id));
7396 W ("Default_Expressions_Processed", Flag108 (Id));
7397 W ("Delay_Cleanups", Flag114 (Id));
7398 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7399 W ("Depends_On_Private", Flag14 (Id));
7400 W ("Discard_Names", Flag88 (Id));
7401 W ("Elaboration_Entity_Required", Flag174 (Id));
7402 W ("Elaborate_Body_Desirable", Flag210 (Id));
7403 W ("Entry_Accepted", Flag152 (Id));
7404 W ("Can_Use_Internal_Rep", Flag229 (Id));
7405 W ("Finalize_Storage_Only", Flag158 (Id));
7406 W ("From_With_Type", Flag159 (Id));
7407 W ("Has_Aliased_Components", Flag135 (Id));
7408 W ("Has_Alignment_Clause", Flag46 (Id));
7409 W ("Has_All_Calls_Remote", Flag79 (Id));
7410 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7411 W ("Has_Atomic_Components", Flag86 (Id));
7412 W ("Has_Biased_Representation", Flag139 (Id));
7413 W ("Has_Completion", Flag26 (Id));
7414 W ("Has_Completion_In_Body", Flag71 (Id));
7415 W ("Has_Complex_Representation", Flag140 (Id));
7416 W ("Has_Component_Size_Clause", Flag68 (Id));
7417 W ("Has_Contiguous_Rep", Flag181 (Id));
7418 W ("Has_Controlled_Component", Flag43 (Id));
7419 W ("Has_Controlling_Result", Flag98 (Id));
7420 W ("Has_Convention_Pragma", Flag119 (Id));
7421 W ("Has_Default_Aspect", Flag39 (Id));
7422 W ("Has_Delayed_Aspects", Flag200 (Id));
7423 W ("Has_Delayed_Freeze", Flag18 (Id));
7424 W ("Has_Discriminants", Flag5 (Id));
7425 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7426 W ("Has_Exit", Flag47 (Id));
7427 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7428 W ("Has_Forward_Instantiation", Flag175 (Id));
7429 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7430 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7431 W ("Has_Homonym", Flag56 (Id));
7432 W ("Has_Inheritable_Invariants", Flag248 (Id));
7433 W ("Has_Initial_Value", Flag219 (Id));
7434 W ("Has_Invariants", Flag232 (Id));
7435 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7436 W ("Has_Master_Entity", Flag21 (Id));
7437 W ("Has_Missing_Return", Flag142 (Id));
7438 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7439 W ("Has_Non_Standard_Rep", Flag75 (Id));
7440 W ("Has_Object_Size_Clause", Flag172 (Id));
7441 W ("Has_Per_Object_Constraint", Flag154 (Id));
7442 W ("Has_Persistent_BSS", Flag188 (Id));
7443 W ("Has_Postconditions", Flag240 (Id));
7444 W ("Has_Pragma_Controlled", Flag27 (Id));
7445 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7446 W ("Has_Pragma_Inline", Flag157 (Id));
7447 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7448 W ("Has_Pragma_Ordered", Flag198 (Id));
7449 W ("Has_Pragma_Pack", Flag121 (Id));
7450 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7451 W ("Has_Pragma_Pure", Flag203 (Id));
7452 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7453 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7454 W ("Has_Pragma_Unmodified", Flag233 (Id));
7455 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7456 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7457 W ("Has_Predicates", Flag250 (Id));
7458 W ("Has_Primitive_Operations", Flag120 (Id));
7459 W ("Has_Private_Ancestor", Flag151 (Id));
7460 W ("Has_Private_Declaration", Flag155 (Id));
7461 W ("Has_Qualified_Name", Flag161 (Id));
7462 W ("Has_RACW", Flag214 (Id));
7463 W ("Has_Record_Rep_Clause", Flag65 (Id));
7464 W ("Has_Recursive_Call", Flag143 (Id));
7465 W ("Has_Size_Clause", Flag29 (Id));
7466 W ("Has_Small_Clause", Flag67 (Id));
7467 W ("Has_Specified_Layout", Flag100 (Id));
7468 W ("Has_Specified_Stream_Input", Flag190 (Id));
7469 W ("Has_Specified_Stream_Output", Flag191 (Id));
7470 W ("Has_Specified_Stream_Read", Flag192 (Id));
7471 W ("Has_Specified_Stream_Write", Flag193 (Id));
7472 W ("Has_Static_Discriminants", Flag211 (Id));
7473 W ("Has_Storage_Size_Clause", Flag23 (Id));
7474 W ("Has_Stream_Size_Clause", Flag184 (Id));
7475 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7476 W ("Has_Task", Flag30 (Id));
7477 W ("Has_Thunks", Flag228 (Id));
7478 W ("Has_Unchecked_Union", Flag123 (Id));
7479 W ("Has_Unknown_Discriminants", Flag72 (Id));
7480 W ("Has_Up_Level_Access", Flag215 (Id));
7481 W ("Has_Volatile_Components", Flag87 (Id));
7482 W ("Has_Xref_Entry", Flag182 (Id));
7483 W ("In_Package_Body", Flag48 (Id));
7484 W ("In_Private_Part", Flag45 (Id));
7485 W ("In_Use", Flag8 (Id));
7486 W ("Is_AST_Entry", Flag132 (Id));
7487 W ("Is_Abstract_Subprogram", Flag19 (Id));
7488 W ("Is_Abstract_Type", Flag146 (Id));
7489 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7490 W ("Is_Access_Constant", Flag69 (Id));
7491 W ("Is_Ada_2005_Only", Flag185 (Id));
7492 W ("Is_Ada_2012_Only", Flag199 (Id));
7493 W ("Is_Aliased", Flag15 (Id));
7494 W ("Is_Asynchronous", Flag81 (Id));
7495 W ("Is_Atomic", Flag85 (Id));
7496 W ("Is_Bit_Packed_Array", Flag122 (Id));
7497 W ("Is_CPP_Class", Flag74 (Id));
7498 W ("Is_Called", Flag102 (Id));
7499 W ("Is_Character_Type", Flag63 (Id));
7500 W ("Is_Child_Unit", Flag73 (Id));
7501 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7502 W ("Is_Compilation_Unit", Flag149 (Id));
7503 W ("Is_Completely_Hidden", Flag103 (Id));
7504 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7505 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7506 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7507 W ("Is_Constrained", Flag12 (Id));
7508 W ("Is_Constructor", Flag76 (Id));
7509 W ("Is_Controlled", Flag42 (Id));
7510 W ("Is_Controlling_Formal", Flag97 (Id));
7511 W ("Is_Descendent_Of_Address", Flag223 (Id));
7512 W ("Is_Discrim_SO_Function", Flag176 (Id));
7513 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7514 W ("Is_Dispatching_Operation", Flag6 (Id));
7515 W ("Is_Eliminated", Flag124 (Id));
7516 W ("Is_Entry_Formal", Flag52 (Id));
7517 W ("Is_Exported", Flag99 (Id));
7518 W ("Is_First_Subtype", Flag70 (Id));
7519 W ("Is_For_Access_Subtype", Flag118 (Id));
7520 W ("Is_Formal_Subprogram", Flag111 (Id));
7521 W ("Is_Frozen", Flag4 (Id));
7522 W ("Is_Generic_Actual_Type", Flag94 (Id));
7523 W ("Is_Generic_Instance", Flag130 (Id));
7524 W ("Is_Generic_Type", Flag13 (Id));
7525 W ("Is_Hidden", Flag57 (Id));
7526 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7527 W ("Is_Immediately_Visible", Flag7 (Id));
7528 W ("Is_Imported", Flag24 (Id));
7529 W ("Is_Inlined", Flag11 (Id));
7530 W ("Is_Instantiated", Flag126 (Id));
7531 W ("Is_Interface", Flag186 (Id));
7532 W ("Is_Internal", Flag17 (Id));
7533 W ("Is_Interrupt_Handler", Flag89 (Id));
7534 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7535 W ("Is_Itype", Flag91 (Id));
7536 W ("Is_Known_Non_Null", Flag37 (Id));
7537 W ("Is_Known_Null", Flag204 (Id));
7538 W ("Is_Known_Valid", Flag170 (Id));
7539 W ("Is_Limited_Composite", Flag106 (Id));
7540 W ("Is_Limited_Interface", Flag197 (Id));
7541 W ("Is_Limited_Record", Flag25 (Id));
7542 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7543 W ("Is_Non_Static_Subtype", Flag109 (Id));
7544 W ("Is_Null_Init_Proc", Flag178 (Id));
7545 W ("Is_Obsolescent", Flag153 (Id));
7546 W ("Is_Only_Out_Parameter", Flag226 (Id));
7547 W ("Is_Optional_Parameter", Flag134 (Id));
7548 W ("Is_Package_Body_Entity", Flag160 (Id));
7549 W ("Is_Packed", Flag51 (Id));
7550 W ("Is_Packed_Array_Type", Flag138 (Id));
7551 W ("Is_Postcondition_Proc", Flag253 (Id));
7552 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7553 W ("Is_Preelaborated", Flag59 (Id));
7554 W ("Is_Primitive", Flag218 (Id));
7555 W ("Is_Primitive_Wrapper", Flag195 (Id));
7556 W ("Is_Private_Composite", Flag107 (Id));
7557 W ("Is_Private_Descendant", Flag53 (Id));
7558 W ("Is_Private_Primitive", Flag245 (Id));
7559 W ("Is_Processed_Transient", Flag252 (Id));
7560 W ("Is_Public", Flag10 (Id));
7561 W ("Is_Pure", Flag44 (Id));
7562 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7563 W ("Is_RACW_Stub_Type", Flag244 (Id));
7564 W ("Is_Raised", Flag224 (Id));
7565 W ("Is_Remote_Call_Interface", Flag62 (Id));
7566 W ("Is_Remote_Types", Flag61 (Id));
7567 W ("Is_Renaming_Of_Object", Flag112 (Id));
7568 W ("Is_Return_Object", Flag209 (Id));
7569 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7570 W ("Is_Shared_Passive", Flag60 (Id));
7571 W ("Is_Statically_Allocated", Flag28 (Id));
7572 W ("Is_Tag", Flag78 (Id));
7573 W ("Is_Tagged_Type", Flag55 (Id));
7574 W ("Is_Thunk", Flag225 (Id));
7575 W ("Is_Trivial_Subprogram", Flag235 (Id));
7576 W ("Is_True_Constant", Flag163 (Id));
7577 W ("Is_Unchecked_Union", Flag117 (Id));
7578 W ("Is_Underlying_Record_View", Flag246 (Id));
7579 W ("Is_Unsigned_Type", Flag144 (Id));
7580 W ("Is_VMS_Exception", Flag133 (Id));
7581 W ("Is_Valued_Procedure", Flag127 (Id));
7582 W ("Is_Visible_Child_Unit", Flag116 (Id));
7583 W ("Is_Visible_Formal", Flag206 (Id));
7584 W ("Is_Volatile", Flag16 (Id));
7585 W ("Itype_Printed", Flag202 (Id));
7586 W ("Kill_Elaboration_Checks", Flag32 (Id));
7587 W ("Kill_Range_Checks", Flag33 (Id));
7588 W ("Kill_Tag_Checks", Flag34 (Id));
7589 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7590 W ("Low_Bound_Tested", Flag205 (Id));
7591 W ("Machine_Radix_10", Flag84 (Id));
7592 W ("Materialize_Entity", Flag168 (Id));
7593 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7594 W ("Must_Have_Preelab_Init", Flag208 (Id));
7595 W ("Needs_Debug_Info", Flag147 (Id));
7596 W ("Needs_No_Actuals", Flag22 (Id));
7597 W ("Never_Set_In_Source", Flag115 (Id));
7598 W ("No_Pool_Assigned", Flag131 (Id));
7599 W ("No_Return", Flag113 (Id));
7600 W ("No_Strict_Aliasing", Flag136 (Id));
7601 W ("Non_Binary_Modulus", Flag58 (Id));
7602 W ("Nonzero_Is_True", Flag162 (Id));
7603 W ("OK_To_Rename", Flag247 (Id));
7604 W ("OK_To_Reorder_Components", Flag239 (Id));
7605 W ("Optimize_Alignment_Space", Flag241 (Id));
7606 W ("Optimize_Alignment_Time", Flag242 (Id));
7607 W ("Overlays_Constant", Flag243 (Id));
7608 W ("Reachable", Flag49 (Id));
7609 W ("Referenced", Flag156 (Id));
7610 W ("Referenced_As_LHS", Flag36 (Id));
7611 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7612 W ("Renamed_In_Spec", Flag231 (Id));
7613 W ("Requires_Overriding", Flag213 (Id));
7614 W ("Return_Present", Flag54 (Id));
7615 W ("Returns_By_Ref", Flag90 (Id));
7616 W ("Reverse_Bit_Order", Flag164 (Id));
7617 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7618 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7619 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7620 W ("Static_Elaboration_Desired", Flag77 (Id));
7621 W ("Strict_Alignment", Flag145 (Id));
7622 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7623 W ("Suppress_Initialization", Flag105 (Id));
7624 W ("Suppress_Style_Checks", Flag165 (Id));
7625 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7626 W ("Treat_As_Volatile", Flag41 (Id));
7627 W ("Universal_Aliasing", Flag216 (Id));
7628 W ("Used_As_Generic_Actual", Flag222 (Id));
7629 W ("Uses_Sec_Stack", Flag95 (Id));
7630 W ("Warnings_Off", Flag96 (Id));
7631 W ("Warnings_Off_Used", Flag236 (Id));
7632 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7633 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7634 W ("Was_Hidden", Flag196 (Id));
7635 end Write_Entity_Flags;
7637 -----------------------
7638 -- Write_Entity_Info --
7639 -----------------------
7641 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7643 procedure Write_Attribute (Which : String; Nam : E);
7644 -- Write attribute value with given string name
7646 procedure Write_Kind (Id : Entity_Id);
7647 -- Write Ekind field of entity
7649 ---------------------
7650 -- Write_Attribute --
7651 ---------------------
7653 procedure Write_Attribute (Which : String; Nam : E) is
7657 Write_Int (Int (Nam));
7659 Write_Name (Chars (Nam));
7661 end Write_Attribute;
7667 procedure Write_Kind (Id : Entity_Id) is
7668 K : constant String := Entity_Kind'Image (Ekind (Id));
7672 Write_Str (" Kind ");
7674 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7675 Write_Str ("TAGGED ");
7678 Write_Str (K (3 .. K'Length));
7681 if Is_Type (Id) and then Depends_On_Private (Id) then
7682 Write_Str ("Depends_On_Private ");
7686 -- Start of processing for Write_Entity_Info
7690 Write_Attribute ("Name ", Id);
7691 Write_Int (Int (Id));
7695 Write_Attribute (" Type ", Etype (Id));
7697 Write_Attribute (" Scope ", Scope (Id));
7702 when Discrete_Kind =>
7703 Write_Str ("Bounds: Id = ");
7705 if Present (Scalar_Range (Id)) then
7706 Write_Int (Int (Type_Low_Bound (Id)));
7707 Write_Str (" .. Id = ");
7708 Write_Int (Int (Type_High_Bound (Id)));
7710 Write_Str ("Empty");
7721 (" Component Type ", Component_Type (Id));
7724 Write_Str (" Indexes ");
7726 Index := First_Index (Id);
7727 while Present (Index) loop
7728 Write_Attribute (" ", Etype (Index));
7729 Index := Next_Index (Index);
7737 (" Directly Designated Type ",
7738 Directly_Designated_Type (Id));
7741 when Overloadable_Kind =>
7742 if Present (Homonym (Id)) then
7743 Write_Str (" Homonym ");
7744 Write_Name (Chars (Homonym (Id)));
7746 Write_Int (Int (Homonym (Id)));
7753 if Ekind (Scope (Id)) in Record_Kind then
7755 " Original_Record_Component ",
7756 Original_Record_Component (Id));
7757 Write_Int (Int (Original_Record_Component (Id)));
7761 when others => null;
7763 end Write_Entity_Info;
7765 -----------------------
7766 -- Write_Field6_Name --
7767 -----------------------
7769 procedure Write_Field6_Name (Id : Entity_Id) is
7770 pragma Warnings (Off, Id);
7772 Write_Str ("First_Rep_Item");
7773 end Write_Field6_Name;
7775 -----------------------
7776 -- Write_Field7_Name --
7777 -----------------------
7779 procedure Write_Field7_Name (Id : Entity_Id) is
7780 pragma Warnings (Off, Id);
7782 Write_Str ("Freeze_Node");
7783 end Write_Field7_Name;
7785 -----------------------
7786 -- Write_Field8_Name --
7787 -----------------------
7789 procedure Write_Field8_Name (Id : Entity_Id) is
7793 Write_Str ("Associated_Node_For_Itype");
7796 Write_Str ("Dependent_Instances");
7799 Write_Str ("First_Exit_Statement");
7802 Write_Str ("Hiding_Loop_Variable");
7806 E_Subprogram_Body =>
7807 Write_Str ("Mechanism");
7811 Write_Str ("Normalized_First_Bit");
7814 Write_Str ("Postcondition_Proc");
7816 when E_Return_Statement =>
7817 Write_Str ("Return_Applies_To");
7820 Write_Str ("Field8??");
7822 end Write_Field8_Name;
7824 -----------------------
7825 -- Write_Field9_Name --
7826 -----------------------
7828 procedure Write_Field9_Name (Id : Entity_Id) is
7832 Write_Str ("Class_Wide_Type");
7835 Write_Str ("Current_Value");
7838 E_Generic_Function |
7840 E_Generic_Procedure |
7843 Write_Str ("Renaming_Map");
7846 Write_Str ("Field9??");
7848 end Write_Field9_Name;
7850 ------------------------
7851 -- Write_Field10_Name --
7852 ------------------------
7854 procedure Write_Field10_Name (Id : Entity_Id) is
7857 when Class_Wide_Kind |
7863 Write_Str ("Direct_Primitive_Operations");
7866 Write_Str ("Float_Rep");
7868 when E_In_Parameter |
7870 Write_Str ("Discriminal_Link");
7876 Write_Str ("Handler_Records");
7880 Write_Str ("Normalized_Position_Max");
7883 Write_Str ("Field10??");
7885 end Write_Field10_Name;
7887 ------------------------
7888 -- Write_Field11_Name --
7889 ------------------------
7891 procedure Write_Field11_Name (Id : Entity_Id) is
7895 Write_Str ("Block_Node");
7899 Write_Str ("Component_Bit_Offset");
7902 Write_Str ("Entry_Component");
7904 when E_Enumeration_Literal =>
7905 Write_Str ("Enumeration_Pos");
7909 Write_Str ("Full_View");
7911 when E_Generic_Package =>
7912 Write_Str ("Generic_Homonym");
7918 Write_Str ("Protected_Body_Subprogram");
7921 Write_Str ("Field11??");
7923 end Write_Field11_Name;
7925 ------------------------
7926 -- Write_Field12_Name --
7927 ------------------------
7929 procedure Write_Field12_Name (Id : Entity_Id) is
7933 Write_Str ("Associated_Formal_Package");
7936 Write_Str ("Barrier_Function");
7938 when E_Enumeration_Literal =>
7939 Write_Str ("Enumeration_Rep");
7947 E_In_Out_Parameter |
7951 Write_Str ("Esize");
7955 Write_Str ("Next_Inlined_Subprogram");
7958 Write_Str ("Field12??");
7960 end Write_Field12_Name;
7962 ------------------------
7963 -- Write_Field13_Name --
7964 ------------------------
7966 procedure Write_Field13_Name (Id : Entity_Id) is
7971 Write_Str ("Component_Clause");
7974 if not Comes_From_Source (Id)
7976 Chars (Id) = Name_Op_Ne
7978 Write_Str ("Corresponding_Equality");
7980 elsif Comes_From_Source (Id) then
7981 Write_Str ("Elaboration_Entity");
7984 Write_Str ("Field13??");
7989 Generic_Unit_Kind =>
7990 Write_Str ("Elaboration_Entity");
7994 Write_Str ("Extra_Accessibility");
7997 Write_Str ("RM_Size");
8000 Write_Str ("Field13??");
8002 end Write_Field13_Name;
8004 -----------------------
8005 -- Write_Field14_Name --
8006 -----------------------
8008 procedure Write_Field14_Name (Id : Entity_Id) is
8017 Write_Str ("Alignment");
8021 Write_Str ("First_Optional_Parameter");
8025 Write_Str ("Normalized_Position");
8028 E_Generic_Package =>
8029 Write_Str ("Shadow_Entities");
8032 Write_Str ("Field14??");
8034 end Write_Field14_Name;
8036 ------------------------
8037 -- Write_Field15_Name --
8038 ------------------------
8040 procedure Write_Field15_Name (Id : Entity_Id) is
8043 when E_Discriminant =>
8044 Write_Str ("Discriminant_Number");
8047 Write_Str ("DT_Entry_Count");
8051 Write_Str ("DT_Position");
8053 when E_Protected_Type =>
8054 Write_Str ("Entry_Bodies_Array");
8057 Write_Str ("Entry_Parameters_Type");
8060 Write_Str ("Extra_Formal");
8062 when Enumeration_Kind =>
8063 Write_Str ("Lit_Indexes");
8067 Write_Str ("Related_Instance");
8071 Write_Str ("Return_Flag_Or_Transient_Decl");
8073 when Decimal_Fixed_Point_Kind =>
8074 Write_Str ("Scale_Value");
8078 Write_Str ("Storage_Size_Variable");
8080 when E_String_Literal_Subtype =>
8081 Write_Str ("String_Literal_Low_Bound");
8084 Write_Str ("Field15??");
8086 end Write_Field15_Name;
8088 ------------------------
8089 -- Write_Field16_Name --
8090 ------------------------
8092 procedure Write_Field16_Name (Id : Entity_Id) is
8095 when E_Record_Type |
8096 E_Record_Type_With_Private =>
8097 Write_Str ("Access_Disp_Table");
8099 when E_Record_Subtype |
8100 E_Class_Wide_Subtype =>
8101 Write_Str ("Cloned_Subtype");
8105 Write_Str ("DTC_Entity");
8108 Write_Str ("Entry_Formal");
8113 Write_Str ("First_Private_Entity");
8115 when Enumeration_Kind =>
8116 Write_Str ("Lit_Strings");
8118 when E_String_Literal_Subtype =>
8119 Write_Str ("String_Literal_Length");
8123 Write_Str ("Unset_Reference");
8126 Write_Str ("Field16??");
8128 end Write_Field16_Name;
8130 ------------------------
8131 -- Write_Field17_Name --
8132 ------------------------
8134 procedure Write_Field17_Name (Id : Entity_Id) is
8139 E_Generic_In_Out_Parameter |
8141 Write_Str ("Actual_Subtype");
8144 Write_Str ("Digits_Value");
8146 when E_Discriminant =>
8147 Write_Str ("Discriminal");
8156 E_Generic_Function |
8158 E_Generic_Procedure |
8166 E_Return_Statement |
8168 E_Subprogram_Type =>
8169 Write_Str ("First_Entity");
8172 Write_Str ("First_Index");
8174 when Enumeration_Kind =>
8175 Write_Str ("First_Literal");
8178 Write_Str ("Master_Id");
8180 when Modular_Integer_Kind =>
8181 Write_Str ("Modulus");
8183 when E_Incomplete_Type =>
8184 Write_Str ("Non_Limited_View");
8186 when E_Incomplete_Subtype =>
8187 if From_With_Type (Id) then
8188 Write_Str ("Non_Limited_View");
8192 Write_Str ("Prival");
8195 Write_Str ("Field17??");
8197 end Write_Field17_Name;
8199 ------------------------
8200 -- Write_Field18_Name --
8201 ------------------------
8203 procedure Write_Field18_Name (Id : Entity_Id) is
8206 when E_Enumeration_Literal |
8210 Write_Str ("Alias");
8212 when E_Record_Type =>
8213 Write_Str ("Corresponding_Concurrent_Type");
8215 when E_Subprogram_Body =>
8216 Write_Str ("Corresponding_Protected_Entry");
8218 when Concurrent_Kind =>
8219 Write_Str ("Corresponding_Record_Type");
8224 Write_Str ("Enclosing_Scope");
8226 when E_Entry_Index_Parameter =>
8227 Write_Str ("Entry_Index_Constant");
8229 when E_Class_Wide_Subtype |
8230 E_Access_Protected_Subprogram_Type |
8231 E_Anonymous_Access_Protected_Subprogram_Type |
8232 E_Access_Subprogram_Type |
8234 Write_Str ("Equivalent_Type");
8236 when Fixed_Point_Kind =>
8237 Write_Str ("Delta_Value");
8239 when Incomplete_Or_Private_Kind |
8241 Write_Str ("Private_Dependents");
8244 Write_Str ("Renamed_Object");
8248 E_Generic_Function |
8249 E_Generic_Procedure |
8250 E_Generic_Package =>
8251 Write_Str ("Renamed_Entity");
8254 Write_Str ("Field18??");
8256 end Write_Field18_Name;
8258 -----------------------
8259 -- Write_Field19_Name --
8260 -----------------------
8262 procedure Write_Field19_Name (Id : Entity_Id) is
8266 E_Generic_Package =>
8267 Write_Str ("Body_Entity");
8269 when E_Discriminant =>
8270 Write_Str ("Corresponding_Discriminant");
8272 when E_Record_Type =>
8273 Write_Str ("Parent_Subtype");
8277 Write_Str ("Related_Array_Object");
8281 Write_Str ("Size_Check_Code");
8283 when E_Package_Body |
8285 Write_Str ("Spec_Entity");
8287 when Private_Kind =>
8288 Write_Str ("Underlying_Full_View");
8291 Write_Str ("Field19??");
8293 end Write_Field19_Name;
8295 -----------------------
8296 -- Write_Field20_Name --
8297 -----------------------
8299 procedure Write_Field20_Name (Id : Entity_Id) is
8303 Write_Str ("Component_Type");
8305 when E_In_Parameter |
8306 E_Generic_In_Parameter =>
8307 Write_Str ("Default_Value");
8310 Write_Str ("Directly_Designated_Type");
8313 Write_Str ("Discriminant_Checking_Func");
8315 when E_Discriminant =>
8316 Write_Str ("Discriminant_Default_Value");
8325 E_Generic_Function |
8327 E_Generic_Procedure |
8335 E_Return_Statement |
8337 E_Subprogram_Type =>
8338 Write_Str ("Last_Entity");
8342 Write_Str ("Prival_Link");
8345 Write_Str ("Scalar_Range");
8348 Write_Str ("Register_Exception_Call");
8351 Write_Str ("Field20??");
8353 end Write_Field20_Name;
8355 -----------------------
8356 -- Write_Field21_Name --
8357 -----------------------
8359 procedure Write_Field21_Name (Id : Entity_Id) is
8363 Write_Str ("Accept_Address");
8365 when E_In_Parameter =>
8366 Write_Str ("Default_Expr_Function");
8368 when Concurrent_Kind |
8369 Incomplete_Or_Private_Kind |
8373 Write_Str ("Discriminant_Constraint");
8378 E_Generic_Function |
8380 E_Generic_Procedure |
8382 Write_Str ("Interface_Name");
8385 Modular_Integer_Kind =>
8386 Write_Str ("Original_Array_Type");
8388 when Fixed_Point_Kind =>
8389 Write_Str ("Small_Value");
8392 Write_Str ("Field21??");
8394 end Write_Field21_Name;
8396 -----------------------
8397 -- Write_Field22_Name --
8398 -----------------------
8400 procedure Write_Field22_Name (Id : Entity_Id) is
8404 Write_Str ("Associated_Storage_Pool");
8407 Write_Str ("Component_Size");
8409 when E_Record_Type =>
8410 Write_Str ("Corresponding_Remote_Type");
8414 Write_Str ("Original_Record_Component");
8416 when E_Enumeration_Literal =>
8417 Write_Str ("Enumeration_Rep_Expr");
8420 Write_Str ("Exception_Code");
8422 when E_Record_Type_With_Private |
8423 E_Record_Subtype_With_Private |
8426 E_Limited_Private_Type |
8427 E_Limited_Private_Subtype =>
8428 Write_Str ("Private_View");
8431 Write_Str ("Protected_Formal");
8441 E_Generic_Function |
8442 E_Generic_Procedure |
8445 E_Return_Statement |
8448 Write_Str ("Scope_Depth_Value");
8451 Write_Str ("Shared_Var_Procs_Instance");
8454 Write_Str ("Field22??");
8456 end Write_Field22_Name;
8458 ------------------------
8459 -- Write_Field23_Name --
8460 ------------------------
8462 procedure Write_Field23_Name (Id : Entity_Id) is
8466 Write_Str ("Associated_Collection");
8468 when E_Discriminant =>
8469 Write_Str ("CR_Discriminant");
8472 Write_Str ("Entry_Cancel_Parameter");
8474 when E_Enumeration_Type =>
8475 Write_Str ("Enum_Pos_To_Rep");
8479 Write_Str ("Extra_Constrained");
8481 when E_Generic_Function |
8483 E_Generic_Procedure =>
8484 Write_Str ("Inner_Instances");
8487 Write_Str ("Packed_Array_Type");
8490 Write_Str ("Protection_Object");
8492 when Concurrent_Kind |
8493 Incomplete_Or_Private_Kind |
8497 Write_Str ("Stored_Constraint");
8501 if Present (Scope (Id))
8502 and then Is_Protected_Type (Scope (Id))
8504 Write_Str ("Protection_Object");
8506 Write_Str ("Generic_Renamings");
8510 if Is_Generic_Instance (Id) then
8511 Write_Str ("Generic_Renamings");
8513 Write_Str ("Limited_View");
8517 Write_Str ("Field23??");
8519 end Write_Field23_Name;
8521 ------------------------
8522 -- Write_Field24_Name --
8523 ------------------------
8525 procedure Write_Field24_Name (Id : Entity_Id) is
8530 Write_Str ("Finalizer");
8535 Write_Str ("Related_Expression");
8540 Generic_Subprogram_Kind =>
8541 Write_Str ("Contract");
8544 Write_Str ("Field24???");
8546 end Write_Field24_Name;
8548 ------------------------
8549 -- Write_Field25_Name --
8550 ------------------------
8552 procedure Write_Field25_Name (Id : Entity_Id) is
8556 Write_Str ("Debug_Renaming_Link");
8559 Write_Str ("DT_Offset_To_Top_Func");
8563 Write_Str ("Interface_Alias");
8565 when E_Record_Type |
8567 E_Record_Type_With_Private |
8568 E_Record_Subtype_With_Private =>
8569 Write_Str ("Interfaces");
8572 Write_Str ("Task_Body_Procedure");
8576 Write_Str ("PPC_Wrapper");
8578 when E_Enumeration_Subtype |
8579 E_Modular_Integer_Subtype |
8580 E_Signed_Integer_Subtype =>
8581 Write_Str ("Static_Predicate");
8584 Write_Str ("Field25??");
8586 end Write_Field25_Name;
8588 ------------------------
8589 -- Write_Field26_Name --
8590 ------------------------
8592 procedure Write_Field26_Name (Id : Entity_Id) is
8595 when E_Record_Type |
8596 E_Record_Type_With_Private =>
8597 Write_Str ("Dispatch_Table_Wrappers");
8599 when E_In_Out_Parameter |
8602 Write_Str ("Last_Assignment");
8604 when E_Access_Subprogram_Type =>
8605 Write_Str ("Original_Access_Type");
8607 when E_Generic_Package |
8609 Write_Str ("Package_Instantiation");
8613 Write_Str ("Related_Type");
8616 Write_Str ("Relative_Deadline_Variable");
8620 if Ekind (Id) = E_Procedure
8621 and then not Is_Dispatching_Operation (Id)
8623 Write_Str ("Static_Initialization");
8625 Write_Str ("Overridden_Operation");
8629 Write_Str ("Field26??");
8631 end Write_Field26_Name;
8633 ------------------------
8634 -- Write_Field27_Name --
8635 ------------------------
8637 procedure Write_Field27_Name (Id : Entity_Id) is
8642 Write_Str ("Current_Use_Clause");
8647 Write_Str ("Related_Type");
8650 Write_Str ("Wrapped_Entity");
8653 Write_Str ("Field27??");
8655 end Write_Field27_Name;
8657 ------------------------
8658 -- Write_Field28_Name --
8659 ------------------------
8661 procedure Write_Field28_Name (Id : Entity_Id) is
8667 Write_Str ("Extra_Formals");
8669 when E_Record_Type =>
8670 Write_Str ("Underlying_Record_View");
8673 Write_Str ("Field28??");
8675 end Write_Field28_Name;
8677 procedure Write_Field29_Name (Id : Entity_Id) is
8681 Write_Str ("Subprograms_For_Type");
8684 Write_Str ("Field29??");
8686 end Write_Field29_Name;
8688 -------------------------
8689 -- Iterator Procedures --
8690 -------------------------
8692 procedure Proc_Next_Component (N : in out Node_Id) is
8694 N := Next_Component (N);
8695 end Proc_Next_Component;
8697 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8699 N := Next_Entity (N);
8700 while Present (N) loop
8701 exit when Ekind_In (N, E_Component, E_Discriminant);
8702 N := Next_Entity (N);
8704 end Proc_Next_Component_Or_Discriminant;
8706 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8708 N := Next_Discriminant (N);
8709 end Proc_Next_Discriminant;
8711 procedure Proc_Next_Formal (N : in out Node_Id) is
8713 N := Next_Formal (N);
8714 end Proc_Next_Formal;
8716 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8718 N := Next_Formal_With_Extras (N);
8719 end Proc_Next_Formal_With_Extras;
8721 procedure Proc_Next_Index (N : in out Node_Id) is
8723 N := Next_Index (N);
8724 end Proc_Next_Index;
8726 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8728 N := Next_Inlined_Subprogram (N);
8729 end Proc_Next_Inlined_Subprogram;
8731 procedure Proc_Next_Literal (N : in out Node_Id) is
8733 N := Next_Literal (N);
8734 end Proc_Next_Literal;
8736 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8738 N := Next_Stored_Discriminant (N);
8739 end Proc_Next_Stored_Discriminant;