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 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
212 -- Spec_PPC_List 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 -- Is_In_ALFA 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 -- Body_Is_In_ALFA Flag251
523 -- Is_Processed_Transient Flag252
527 -----------------------
528 -- Local subprograms --
529 -----------------------
531 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
532 -- Returns the attribute definition clause for Id whose name is Rep_Name.
533 -- Returns Empty if no matching attribute definition clause found for Id.
539 function Float_Rep (Id : E) return F is
540 pragma Assert (Is_Floating_Point_Type (Id));
542 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
549 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
553 Ritem := First_Rep_Item (Id);
554 while Present (Ritem) loop
555 if Nkind (Ritem) = N_Attribute_Definition_Clause
556 and then Chars (Ritem) = Rep_Name
560 Next_Rep_Item (Ritem);
567 --------------------------------
568 -- Attribute Access Functions --
569 --------------------------------
571 function Accept_Address (Id : E) return L is
576 function Access_Disp_Table (Id : E) return L is
578 pragma Assert (Ekind_In (Id, E_Record_Type,
580 return Elist16 (Implementation_Base_Type (Id));
581 end Access_Disp_Table;
583 function Actual_Subtype (Id : E) return E is
586 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
587 or else Is_Formal (Id));
591 function Address_Taken (Id : E) return B is
596 function Alias (Id : E) return E is
599 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
603 function Alignment (Id : E) return U is
605 pragma Assert (Is_Type (Id)
606 or else Is_Formal (Id)
607 or else Ekind_In (Id, E_Loop_Parameter,
614 function Associated_Collection (Id : E) return E is
616 pragma Assert (Is_Access_Type (Id));
618 end Associated_Collection;
620 function Associated_Formal_Package (Id : E) return E is
622 pragma Assert (Ekind (Id) = E_Package);
624 end Associated_Formal_Package;
626 function Associated_Node_For_Itype (Id : E) return N is
629 end Associated_Node_For_Itype;
631 function Associated_Storage_Pool (Id : E) return E is
633 pragma Assert (Is_Access_Type (Id));
634 return Node22 (Root_Type (Id));
635 end Associated_Storage_Pool;
637 function Barrier_Function (Id : E) return N is
639 pragma Assert (Is_Entry (Id));
641 end Barrier_Function;
643 function Block_Node (Id : E) return N is
645 pragma Assert (Ekind (Id) = E_Block);
649 function Body_Entity (Id : E) return E is
651 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
655 function Body_Is_In_ALFA (Id : E) return B is
657 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
661 function Body_Needed_For_SAL (Id : E) return B is
664 (Ekind (Id) = E_Package
665 or else Is_Subprogram (Id)
666 or else Is_Generic_Unit (Id));
668 end Body_Needed_For_SAL;
670 function C_Pass_By_Copy (Id : E) return B is
672 pragma Assert (Is_Record_Type (Id));
673 return Flag125 (Implementation_Base_Type (Id));
676 function Can_Never_Be_Null (Id : E) return B is
679 end Can_Never_Be_Null;
681 function Checks_May_Be_Suppressed (Id : E) return B is
684 end Checks_May_Be_Suppressed;
686 function Class_Wide_Type (Id : E) return E is
688 pragma Assert (Is_Type (Id));
692 function Cloned_Subtype (Id : E) return E is
694 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
698 function Component_Bit_Offset (Id : E) return U is
700 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
702 end Component_Bit_Offset;
704 function Component_Clause (Id : E) return N is
706 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
708 end Component_Clause;
710 function Component_Size (Id : E) return U is
712 pragma Assert (Is_Array_Type (Id));
713 return Uint22 (Implementation_Base_Type (Id));
716 function Component_Type (Id : E) return E is
718 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
719 return Node20 (Implementation_Base_Type (Id));
722 function Corresponding_Concurrent_Type (Id : E) return E is
724 pragma Assert (Ekind (Id) = E_Record_Type);
726 end Corresponding_Concurrent_Type;
728 function Corresponding_Discriminant (Id : E) return E is
730 pragma Assert (Ekind (Id) = E_Discriminant);
732 end Corresponding_Discriminant;
734 function Corresponding_Equality (Id : E) return E is
737 (Ekind (Id) = E_Function
738 and then not Comes_From_Source (Id)
739 and then Chars (Id) = Name_Op_Ne);
741 end Corresponding_Equality;
743 function Corresponding_Protected_Entry (Id : E) return E is
745 pragma Assert (Ekind (Id) = E_Subprogram_Body);
747 end Corresponding_Protected_Entry;
749 function Corresponding_Record_Type (Id : E) return E is
751 pragma Assert (Is_Concurrent_Type (Id));
753 end Corresponding_Record_Type;
755 function Corresponding_Remote_Type (Id : E) return E is
758 end Corresponding_Remote_Type;
760 function Current_Use_Clause (Id : E) return E is
762 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
764 end Current_Use_Clause;
766 function Current_Value (Id : E) return N is
768 pragma Assert (Ekind (Id) in Object_Kind);
772 function CR_Discriminant (Id : E) return E is
777 function Debug_Info_Off (Id : E) return B is
782 function Debug_Renaming_Link (Id : E) return E is
785 end Debug_Renaming_Link;
787 function Default_Expr_Function (Id : E) return E is
789 pragma Assert (Is_Formal (Id));
791 end Default_Expr_Function;
793 function Default_Expressions_Processed (Id : E) return B is
796 end Default_Expressions_Processed;
798 function Default_Value (Id : E) return N is
800 pragma Assert (Is_Formal (Id));
804 function Delay_Cleanups (Id : E) return B is
809 function Delay_Subprogram_Descriptors (Id : E) return B is
812 end Delay_Subprogram_Descriptors;
814 function Delta_Value (Id : E) return R is
816 pragma Assert (Is_Fixed_Point_Type (Id));
820 function Dependent_Instances (Id : E) return L is
822 pragma Assert (Is_Generic_Instance (Id));
824 end Dependent_Instances;
826 function Depends_On_Private (Id : E) return B is
828 pragma Assert (Nkind (Id) in N_Entity);
830 end Depends_On_Private;
832 function Digits_Value (Id : E) return U is
835 (Is_Floating_Point_Type (Id)
836 or else Is_Decimal_Fixed_Point_Type (Id));
840 function Direct_Primitive_Operations (Id : E) return L is
842 pragma Assert (Is_Tagged_Type (Id));
844 end Direct_Primitive_Operations;
846 function Directly_Designated_Type (Id : E) return E is
848 pragma Assert (Is_Access_Type (Id));
850 end Directly_Designated_Type;
852 function Discard_Names (Id : E) return B is
857 function Discriminal (Id : E) return E is
859 pragma Assert (Ekind (Id) = E_Discriminant);
863 function Discriminal_Link (Id : E) return N is
866 end Discriminal_Link;
868 function Discriminant_Checking_Func (Id : E) return E is
870 pragma Assert (Ekind (Id) = E_Component);
872 end Discriminant_Checking_Func;
874 function Discriminant_Constraint (Id : E) return L is
876 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
878 end Discriminant_Constraint;
880 function Discriminant_Default_Value (Id : E) return N is
882 pragma Assert (Ekind (Id) = E_Discriminant);
884 end Discriminant_Default_Value;
886 function Discriminant_Number (Id : E) return U is
888 pragma Assert (Ekind (Id) = E_Discriminant);
890 end Discriminant_Number;
892 function Dispatch_Table_Wrappers (Id : E) return L is
894 pragma Assert (Ekind_In (Id, E_Record_Type,
896 return Elist26 (Implementation_Base_Type (Id));
897 end Dispatch_Table_Wrappers;
899 function DT_Entry_Count (Id : E) return U is
901 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
905 function DT_Offset_To_Top_Func (Id : E) return E is
907 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
909 end DT_Offset_To_Top_Func;
911 function DT_Position (Id : E) return U is
913 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
914 and then Present (DTC_Entity (Id)));
918 function DTC_Entity (Id : E) return E is
920 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
924 function Elaborate_Body_Desirable (Id : E) return B is
926 pragma Assert (Ekind (Id) = E_Package);
928 end Elaborate_Body_Desirable;
930 function Elaboration_Entity (Id : E) return E is
935 Ekind (Id) = E_Package
937 Is_Generic_Unit (Id));
939 end Elaboration_Entity;
941 function Elaboration_Entity_Required (Id : E) return B is
946 Ekind (Id) = E_Package
948 Is_Generic_Unit (Id));
950 end Elaboration_Entity_Required;
952 function Enclosing_Scope (Id : E) return E is
957 function Entry_Accepted (Id : E) return B is
959 pragma Assert (Is_Entry (Id));
963 function Entry_Bodies_Array (Id : E) return E is
966 end Entry_Bodies_Array;
968 function Entry_Cancel_Parameter (Id : E) return E is
971 end Entry_Cancel_Parameter;
973 function Entry_Component (Id : E) return E is
978 function Entry_Formal (Id : E) return E is
983 function Entry_Index_Constant (Id : E) return N is
985 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
987 end Entry_Index_Constant;
989 function Entry_Parameters_Type (Id : E) return E is
992 end Entry_Parameters_Type;
994 function Enum_Pos_To_Rep (Id : E) return E is
996 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1000 function Enumeration_Pos (Id : E) return Uint is
1002 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1004 end Enumeration_Pos;
1006 function Enumeration_Rep (Id : E) return U is
1008 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1010 end Enumeration_Rep;
1012 function Enumeration_Rep_Expr (Id : E) return N is
1014 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1016 end Enumeration_Rep_Expr;
1018 function Equivalent_Type (Id : E) return E is
1021 (Ekind_In (Id, E_Class_Wide_Type,
1022 E_Class_Wide_Subtype,
1023 E_Access_Protected_Subprogram_Type,
1024 E_Anonymous_Access_Protected_Subprogram_Type,
1025 E_Access_Subprogram_Type,
1028 end Equivalent_Type;
1030 function Esize (Id : E) return Uint is
1035 function Exception_Code (Id : E) return Uint is
1037 pragma Assert (Ekind (Id) = E_Exception);
1041 function Extra_Accessibility (Id : E) return E is
1043 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1045 end Extra_Accessibility;
1047 function Extra_Constrained (Id : E) return E is
1049 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1051 end Extra_Constrained;
1053 function Extra_Formal (Id : E) return E is
1058 function Extra_Formals (Id : E) return E is
1061 (Is_Overloadable (Id)
1062 or else Ekind_In (Id, E_Entry_Family,
1064 E_Subprogram_Type));
1068 function Can_Use_Internal_Rep (Id : E) return B is
1070 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1071 return Flag229 (Base_Type (Id));
1072 end Can_Use_Internal_Rep;
1074 function Finalize_Storage_Only (Id : E) return B is
1076 pragma Assert (Is_Type (Id));
1077 return Flag158 (Base_Type (Id));
1078 end Finalize_Storage_Only;
1080 function Finalizer (Id : E) return E is
1083 (Ekind (Id) = E_Package
1084 or else Ekind (Id) = E_Package_Body);
1088 function First_Entity (Id : E) return E is
1093 function First_Exit_Statement (Id : E) return N is
1095 pragma Assert (Ekind (Id) = E_Loop);
1097 end First_Exit_Statement;
1099 function First_Index (Id : E) return N is
1101 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1105 function First_Literal (Id : E) return E is
1107 pragma Assert (Is_Enumeration_Type (Id));
1111 function First_Optional_Parameter (Id : E) return E is
1113 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1115 end First_Optional_Parameter;
1117 function First_Private_Entity (Id : E) return E is
1119 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1120 or else Ekind (Id) in Concurrent_Kind);
1122 end First_Private_Entity;
1124 function First_Rep_Item (Id : E) return E is
1129 function Freeze_Node (Id : E) return N is
1134 function From_With_Type (Id : E) return B is
1136 return Flag159 (Id);
1139 function Full_View (Id : E) return E is
1141 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1145 function Generic_Homonym (Id : E) return E is
1147 pragma Assert (Ekind (Id) = E_Generic_Package);
1149 end Generic_Homonym;
1151 function Generic_Renamings (Id : E) return L is
1153 return Elist23 (Id);
1154 end Generic_Renamings;
1156 function Handler_Records (Id : E) return S is
1159 end Handler_Records;
1161 function Has_Aliased_Components (Id : E) return B is
1163 return Flag135 (Implementation_Base_Type (Id));
1164 end Has_Aliased_Components;
1166 function Has_Alignment_Clause (Id : E) return B is
1169 end Has_Alignment_Clause;
1171 function Has_All_Calls_Remote (Id : E) return B is
1174 end Has_All_Calls_Remote;
1176 function Has_Anon_Block_Suffix (Id : E) return B is
1178 return Flag201 (Id);
1179 end Has_Anon_Block_Suffix;
1181 function Has_Atomic_Components (Id : E) return B is
1183 return Flag86 (Implementation_Base_Type (Id));
1184 end Has_Atomic_Components;
1186 function Has_Biased_Representation (Id : E) return B is
1188 return Flag139 (Id);
1189 end Has_Biased_Representation;
1191 function Has_Completion (Id : E) return B is
1196 function Has_Completion_In_Body (Id : E) return B is
1198 pragma Assert (Is_Type (Id));
1200 end Has_Completion_In_Body;
1202 function Has_Complex_Representation (Id : E) return B is
1204 pragma Assert (Is_Type (Id));
1205 return Flag140 (Implementation_Base_Type (Id));
1206 end Has_Complex_Representation;
1208 function Has_Component_Size_Clause (Id : E) return B is
1210 pragma Assert (Is_Array_Type (Id));
1211 return Flag68 (Implementation_Base_Type (Id));
1212 end Has_Component_Size_Clause;
1214 function Has_Constrained_Partial_View (Id : E) return B is
1216 pragma Assert (Is_Type (Id));
1217 return Flag187 (Id);
1218 end Has_Constrained_Partial_View;
1220 function Has_Controlled_Component (Id : E) return B is
1222 return Flag43 (Base_Type (Id));
1223 end Has_Controlled_Component;
1225 function Has_Contiguous_Rep (Id : E) return B is
1227 return Flag181 (Id);
1228 end Has_Contiguous_Rep;
1230 function Has_Controlling_Result (Id : E) return B is
1233 end Has_Controlling_Result;
1235 function Has_Convention_Pragma (Id : E) return B is
1237 return Flag119 (Id);
1238 end Has_Convention_Pragma;
1240 function Has_Default_Aspect (Id : E) return B is
1242 return Flag39 (Base_Type (Id));
1243 end Has_Default_Aspect;
1245 function Has_Delayed_Aspects (Id : E) return B is
1247 pragma Assert (Nkind (Id) in N_Entity);
1248 return Flag200 (Id);
1249 end Has_Delayed_Aspects;
1251 function Has_Delayed_Freeze (Id : E) return B is
1253 pragma Assert (Nkind (Id) in N_Entity);
1255 end Has_Delayed_Freeze;
1257 function Has_Discriminants (Id : E) return B is
1259 pragma Assert (Nkind (Id) in N_Entity);
1261 end Has_Discriminants;
1263 function Has_Dispatch_Table (Id : E) return B is
1265 pragma Assert (Is_Tagged_Type (Id));
1266 return Flag220 (Id);
1267 end Has_Dispatch_Table;
1269 function Has_Enumeration_Rep_Clause (Id : E) return B is
1271 pragma Assert (Is_Enumeration_Type (Id));
1273 end Has_Enumeration_Rep_Clause;
1275 function Has_Exit (Id : E) return B is
1280 function Has_External_Tag_Rep_Clause (Id : E) return B is
1282 pragma Assert (Is_Tagged_Type (Id));
1283 return Flag110 (Id);
1284 end Has_External_Tag_Rep_Clause;
1286 function Has_Forward_Instantiation (Id : E) return B is
1288 return Flag175 (Id);
1289 end Has_Forward_Instantiation;
1291 function Has_Fully_Qualified_Name (Id : E) return B is
1293 return Flag173 (Id);
1294 end Has_Fully_Qualified_Name;
1296 function Has_Gigi_Rep_Item (Id : E) return B is
1299 end Has_Gigi_Rep_Item;
1301 function Has_Homonym (Id : E) return B is
1306 function Has_Inheritable_Invariants (Id : E) return B is
1308 pragma Assert (Is_Type (Id));
1309 return Flag248 (Id);
1310 end Has_Inheritable_Invariants;
1312 function Has_Initial_Value (Id : E) return B is
1314 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1315 return Flag219 (Id);
1316 end Has_Initial_Value;
1318 function Has_Invariants (Id : E) return B is
1320 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Procedure);
1321 return Flag232 (Id);
1324 function Has_Machine_Radix_Clause (Id : E) return B is
1326 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1328 end Has_Machine_Radix_Clause;
1330 function Has_Master_Entity (Id : E) return B is
1333 end Has_Master_Entity;
1335 function Has_Missing_Return (Id : E) return B is
1337 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1338 return Flag142 (Id);
1339 end Has_Missing_Return;
1341 function Has_Nested_Block_With_Handler (Id : E) return B is
1343 return Flag101 (Id);
1344 end Has_Nested_Block_With_Handler;
1346 function Has_Non_Standard_Rep (Id : E) return B is
1348 return Flag75 (Implementation_Base_Type (Id));
1349 end Has_Non_Standard_Rep;
1351 function Has_Object_Size_Clause (Id : E) return B is
1353 pragma Assert (Is_Type (Id));
1354 return Flag172 (Id);
1355 end Has_Object_Size_Clause;
1357 function Has_Per_Object_Constraint (Id : E) return B is
1359 return Flag154 (Id);
1360 end Has_Per_Object_Constraint;
1362 function Has_Persistent_BSS (Id : E) return B is
1364 return Flag188 (Id);
1365 end Has_Persistent_BSS;
1367 function Has_Postconditions (Id : E) return B is
1369 pragma Assert (Is_Subprogram (Id));
1370 return Flag240 (Id);
1371 end Has_Postconditions;
1373 function Has_Pragma_Controlled (Id : E) return B is
1375 pragma Assert (Is_Access_Type (Id));
1376 return Flag27 (Implementation_Base_Type (Id));
1377 end Has_Pragma_Controlled;
1379 function Has_Pragma_Elaborate_Body (Id : E) return B is
1381 return Flag150 (Id);
1382 end Has_Pragma_Elaborate_Body;
1384 function Has_Pragma_Inline (Id : E) return B is
1386 return Flag157 (Id);
1387 end Has_Pragma_Inline;
1389 function Has_Pragma_Inline_Always (Id : E) return B is
1391 return Flag230 (Id);
1392 end Has_Pragma_Inline_Always;
1394 function Has_Pragma_Ordered (Id : E) return B is
1396 pragma Assert (Is_Enumeration_Type (Id));
1397 return Flag198 (Implementation_Base_Type (Id));
1398 end Has_Pragma_Ordered;
1400 function Has_Pragma_Pack (Id : E) return B is
1402 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1403 return Flag121 (Implementation_Base_Type (Id));
1404 end Has_Pragma_Pack;
1406 function Has_Pragma_Preelab_Init (Id : E) return B is
1408 return Flag221 (Id);
1409 end Has_Pragma_Preelab_Init;
1411 function Has_Pragma_Pure (Id : E) return B is
1413 return Flag203 (Id);
1414 end Has_Pragma_Pure;
1416 function Has_Pragma_Pure_Function (Id : E) return B is
1418 return Flag179 (Id);
1419 end Has_Pragma_Pure_Function;
1421 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1423 return Flag169 (Id);
1424 end Has_Pragma_Thread_Local_Storage;
1426 function Has_Pragma_Unmodified (Id : E) return B is
1428 return Flag233 (Id);
1429 end Has_Pragma_Unmodified;
1431 function Has_Pragma_Unreferenced (Id : E) return B is
1433 return Flag180 (Id);
1434 end Has_Pragma_Unreferenced;
1436 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1438 pragma Assert (Is_Type (Id));
1439 return Flag212 (Id);
1440 end Has_Pragma_Unreferenced_Objects;
1442 function Has_Predicates (Id : E) return B is
1444 return Flag250 (Id);
1447 function Has_Primitive_Operations (Id : E) return B is
1449 pragma Assert (Is_Type (Id));
1450 return Flag120 (Base_Type (Id));
1451 end Has_Primitive_Operations;
1453 function Has_Private_Declaration (Id : E) return B is
1455 return Flag155 (Id);
1456 end Has_Private_Declaration;
1458 function Has_Qualified_Name (Id : E) return B is
1460 return Flag161 (Id);
1461 end Has_Qualified_Name;
1463 function Has_RACW (Id : E) return B is
1465 pragma Assert (Ekind (Id) = E_Package);
1466 return Flag214 (Id);
1469 function Has_Record_Rep_Clause (Id : E) return B is
1471 pragma Assert (Is_Record_Type (Id));
1472 return Flag65 (Implementation_Base_Type (Id));
1473 end Has_Record_Rep_Clause;
1475 function Has_Recursive_Call (Id : E) return B is
1477 pragma Assert (Is_Subprogram (Id));
1478 return Flag143 (Id);
1479 end Has_Recursive_Call;
1481 function Has_Size_Clause (Id : E) return B is
1484 end Has_Size_Clause;
1486 function Has_Small_Clause (Id : E) return B is
1489 end Has_Small_Clause;
1491 function Has_Specified_Layout (Id : E) return B is
1493 pragma Assert (Is_Type (Id));
1494 return Flag100 (Implementation_Base_Type (Id));
1495 end Has_Specified_Layout;
1497 function Has_Specified_Stream_Input (Id : E) return B is
1499 pragma Assert (Is_Type (Id));
1500 return Flag190 (Id);
1501 end Has_Specified_Stream_Input;
1503 function Has_Specified_Stream_Output (Id : E) return B is
1505 pragma Assert (Is_Type (Id));
1506 return Flag191 (Id);
1507 end Has_Specified_Stream_Output;
1509 function Has_Specified_Stream_Read (Id : E) return B is
1511 pragma Assert (Is_Type (Id));
1512 return Flag192 (Id);
1513 end Has_Specified_Stream_Read;
1515 function Has_Specified_Stream_Write (Id : E) return B is
1517 pragma Assert (Is_Type (Id));
1518 return Flag193 (Id);
1519 end Has_Specified_Stream_Write;
1521 function Has_Static_Discriminants (Id : E) return B is
1523 pragma Assert (Is_Type (Id));
1524 return Flag211 (Id);
1525 end Has_Static_Discriminants;
1527 function Has_Storage_Size_Clause (Id : E) return B is
1529 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1530 return Flag23 (Implementation_Base_Type (Id));
1531 end Has_Storage_Size_Clause;
1533 function Has_Stream_Size_Clause (Id : E) return B is
1535 return Flag184 (Id);
1536 end Has_Stream_Size_Clause;
1538 function Has_Subprogram_Descriptor (Id : E) return B is
1541 end Has_Subprogram_Descriptor;
1543 function Has_Task (Id : E) return B is
1545 return Flag30 (Base_Type (Id));
1548 function Has_Thunks (Id : E) return B is
1550 return Flag228 (Id);
1553 function Has_Unchecked_Union (Id : E) return B is
1555 return Flag123 (Base_Type (Id));
1556 end Has_Unchecked_Union;
1558 function Has_Unknown_Discriminants (Id : E) return B is
1560 pragma Assert (Is_Type (Id));
1562 end Has_Unknown_Discriminants;
1564 function Has_Up_Level_Access (Id : E) return B is
1567 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1568 return Flag215 (Id);
1569 end Has_Up_Level_Access;
1571 function Has_Volatile_Components (Id : E) return B is
1573 return Flag87 (Implementation_Base_Type (Id));
1574 end Has_Volatile_Components;
1576 function Has_Xref_Entry (Id : E) return B is
1578 return Flag182 (Implementation_Base_Type (Id));
1581 function Hiding_Loop_Variable (Id : E) return E is
1583 pragma Assert (Ekind (Id) = E_Variable);
1585 end Hiding_Loop_Variable;
1587 function Homonym (Id : E) return E is
1592 function Interface_Alias (Id : E) return E is
1594 pragma Assert (Is_Subprogram (Id));
1596 end Interface_Alias;
1598 function Interfaces (Id : E) return L is
1600 pragma Assert (Is_Record_Type (Id));
1601 return Elist25 (Id);
1604 function In_Package_Body (Id : E) return B is
1607 end In_Package_Body;
1609 function In_Private_Part (Id : E) return B is
1612 end In_Private_Part;
1614 function In_Use (Id : E) return B is
1616 pragma Assert (Nkind (Id) in N_Entity);
1620 function Inner_Instances (Id : E) return L is
1622 return Elist23 (Id);
1623 end Inner_Instances;
1625 function Interface_Name (Id : E) return N is
1630 function Is_Abstract_Subprogram (Id : E) return B is
1632 pragma Assert (Is_Overloadable (Id));
1634 end Is_Abstract_Subprogram;
1636 function Is_Abstract_Type (Id : E) return B is
1638 pragma Assert (Is_Type (Id));
1639 return Flag146 (Id);
1640 end Is_Abstract_Type;
1642 function Is_Local_Anonymous_Access (Id : E) return B is
1644 pragma Assert (Is_Access_Type (Id));
1645 return Flag194 (Id);
1646 end Is_Local_Anonymous_Access;
1648 function Is_Access_Constant (Id : E) return B is
1650 pragma Assert (Is_Access_Type (Id));
1652 end Is_Access_Constant;
1654 function Is_Ada_2005_Only (Id : E) return B is
1656 return Flag185 (Id);
1657 end Is_Ada_2005_Only;
1659 function Is_Ada_2012_Only (Id : E) return B is
1661 return Flag199 (Id);
1662 end Is_Ada_2012_Only;
1664 function Is_Aliased (Id : E) return B is
1666 pragma Assert (Nkind (Id) in N_Entity);
1670 function Is_AST_Entry (Id : E) return B is
1672 pragma Assert (Is_Entry (Id));
1673 return Flag132 (Id);
1676 function Is_Asynchronous (Id : E) return B is
1678 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1680 end Is_Asynchronous;
1682 function Is_Atomic (Id : E) return B is
1687 function Is_Bit_Packed_Array (Id : E) return B is
1689 return Flag122 (Implementation_Base_Type (Id));
1690 end Is_Bit_Packed_Array;
1692 function Is_Called (Id : E) return B is
1694 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1695 return Flag102 (Id);
1698 function Is_Character_Type (Id : E) return B is
1701 end Is_Character_Type;
1703 function Is_Child_Unit (Id : E) return B is
1708 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1711 end Is_Class_Wide_Equivalent_Type;
1713 function Is_Compilation_Unit (Id : E) return B is
1715 return Flag149 (Id);
1716 end Is_Compilation_Unit;
1718 function Is_Completely_Hidden (Id : E) return B is
1720 pragma Assert (Ekind (Id) = E_Discriminant);
1721 return Flag103 (Id);
1722 end Is_Completely_Hidden;
1724 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1727 end Is_Constr_Subt_For_U_Nominal;
1729 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1731 return Flag141 (Id);
1732 end Is_Constr_Subt_For_UN_Aliased;
1734 function Is_Constrained (Id : E) return B is
1736 pragma Assert (Nkind (Id) in N_Entity);
1740 function Is_Constructor (Id : E) return B is
1745 function Is_Controlled (Id : E) return B is
1747 return Flag42 (Base_Type (Id));
1750 function Is_Controlling_Formal (Id : E) return B is
1752 pragma Assert (Is_Formal (Id));
1754 end Is_Controlling_Formal;
1756 function Is_CPP_Class (Id : E) return B is
1761 function Is_Descendent_Of_Address (Id : E) return B is
1763 pragma Assert (Is_Type (Id));
1764 return Flag223 (Id);
1765 end Is_Descendent_Of_Address;
1767 function Is_Discrim_SO_Function (Id : E) return B is
1769 return Flag176 (Id);
1770 end Is_Discrim_SO_Function;
1772 function Is_Dispatch_Table_Entity (Id : E) return B is
1774 return Flag234 (Id);
1775 end Is_Dispatch_Table_Entity;
1777 function Is_Dispatching_Operation (Id : E) return B is
1779 pragma Assert (Nkind (Id) in N_Entity);
1781 end Is_Dispatching_Operation;
1783 function Is_Eliminated (Id : E) return B is
1785 return Flag124 (Id);
1788 function Is_Entry_Formal (Id : E) return B is
1791 end Is_Entry_Formal;
1793 function Is_Exported (Id : E) return B is
1798 function Is_First_Subtype (Id : E) return B is
1801 end Is_First_Subtype;
1803 function Is_For_Access_Subtype (Id : E) return B is
1805 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1806 return Flag118 (Id);
1807 end Is_For_Access_Subtype;
1809 function Is_Formal_Subprogram (Id : E) return B is
1811 return Flag111 (Id);
1812 end Is_Formal_Subprogram;
1814 function Is_Frozen (Id : E) return B is
1819 function Is_Generic_Actual_Type (Id : E) return B is
1821 pragma Assert (Is_Type (Id));
1823 end Is_Generic_Actual_Type;
1825 function Is_Generic_Instance (Id : E) return B is
1827 return Flag130 (Id);
1828 end Is_Generic_Instance;
1830 function Is_Generic_Type (Id : E) return B is
1832 pragma Assert (Nkind (Id) in N_Entity);
1834 end Is_Generic_Type;
1836 function Is_Hidden (Id : E) return B is
1841 function Is_Hidden_Open_Scope (Id : E) return B is
1843 return Flag171 (Id);
1844 end Is_Hidden_Open_Scope;
1846 function Is_Immediately_Visible (Id : E) return B is
1848 pragma Assert (Nkind (Id) in N_Entity);
1850 end Is_Immediately_Visible;
1852 function Is_Imported (Id : E) return B is
1857 function Is_In_ALFA (Id : E) return B is
1859 return Flag151 (Id);
1862 function Is_Inlined (Id : E) return B is
1867 function Is_Interface (Id : E) return B is
1869 return Flag186 (Id);
1872 function Is_Instantiated (Id : E) return B is
1874 return Flag126 (Id);
1875 end Is_Instantiated;
1877 function Is_Internal (Id : E) return B is
1879 pragma Assert (Nkind (Id) in N_Entity);
1883 function Is_Interrupt_Handler (Id : E) return B is
1885 pragma Assert (Nkind (Id) in N_Entity);
1887 end Is_Interrupt_Handler;
1889 function Is_Intrinsic_Subprogram (Id : E) return B is
1892 end Is_Intrinsic_Subprogram;
1894 function Is_Itype (Id : E) return B is
1899 function Is_Known_Non_Null (Id : E) return B is
1902 end Is_Known_Non_Null;
1904 function Is_Known_Null (Id : E) return B is
1906 return Flag204 (Id);
1909 function Is_Known_Valid (Id : E) return B is
1911 return Flag170 (Id);
1914 function Is_Limited_Composite (Id : E) return B is
1916 return Flag106 (Id);
1917 end Is_Limited_Composite;
1919 function Is_Limited_Interface (Id : E) return B is
1921 return Flag197 (Id);
1922 end Is_Limited_Interface;
1924 function Is_Limited_Record (Id : E) return B is
1927 end Is_Limited_Record;
1929 function Is_Machine_Code_Subprogram (Id : E) return B is
1931 pragma Assert (Is_Subprogram (Id));
1932 return Flag137 (Id);
1933 end Is_Machine_Code_Subprogram;
1935 function Is_Non_Static_Subtype (Id : E) return B is
1937 pragma Assert (Is_Type (Id));
1938 return Flag109 (Id);
1939 end Is_Non_Static_Subtype;
1941 function Is_Null_Init_Proc (Id : E) return B is
1943 pragma Assert (Ekind (Id) = E_Procedure);
1944 return Flag178 (Id);
1945 end Is_Null_Init_Proc;
1947 function Is_Obsolescent (Id : E) return B is
1949 return Flag153 (Id);
1952 function Is_Only_Out_Parameter (Id : E) return B is
1954 pragma Assert (Is_Formal (Id));
1955 return Flag226 (Id);
1956 end Is_Only_Out_Parameter;
1958 function Is_Optional_Parameter (Id : E) return B is
1960 pragma Assert (Is_Formal (Id));
1961 return Flag134 (Id);
1962 end Is_Optional_Parameter;
1964 function Is_Package_Body_Entity (Id : E) return B is
1966 return Flag160 (Id);
1967 end Is_Package_Body_Entity;
1969 function Is_Packed (Id : E) return B is
1971 return Flag51 (Implementation_Base_Type (Id));
1974 function Is_Packed_Array_Type (Id : E) return B is
1976 return Flag138 (Id);
1977 end Is_Packed_Array_Type;
1979 function Is_Potentially_Use_Visible (Id : E) return B is
1981 pragma Assert (Nkind (Id) in N_Entity);
1983 end Is_Potentially_Use_Visible;
1985 function Is_Preelaborated (Id : E) return B is
1988 end Is_Preelaborated;
1990 function Is_Primitive (Id : E) return B is
1993 (Is_Overloadable (Id)
1994 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1995 return Flag218 (Id);
1998 function Is_Primitive_Wrapper (Id : E) return B is
2000 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2001 return Flag195 (Id);
2002 end Is_Primitive_Wrapper;
2004 function Is_Private_Composite (Id : E) return B is
2006 pragma Assert (Is_Type (Id));
2007 return Flag107 (Id);
2008 end Is_Private_Composite;
2010 function Is_Private_Descendant (Id : E) return B is
2013 end Is_Private_Descendant;
2015 function Is_Private_Primitive (Id : E) return B is
2017 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2018 return Flag245 (Id);
2019 end Is_Private_Primitive;
2021 function Is_Processed_Transient (Id : E) return B is
2023 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2024 return Flag252 (Id);
2025 end Is_Processed_Transient;
2027 function Is_Public (Id : E) return B is
2029 pragma Assert (Nkind (Id) in N_Entity);
2033 function Is_Pure (Id : E) return B is
2038 function Is_Pure_Unit_Access_Type (Id : E) return B is
2040 pragma Assert (Is_Access_Type (Id));
2041 return Flag189 (Id);
2042 end Is_Pure_Unit_Access_Type;
2044 function Is_RACW_Stub_Type (Id : E) return B is
2046 pragma Assert (Is_Type (Id));
2047 return Flag244 (Id);
2048 end Is_RACW_Stub_Type;
2050 function Is_Raised (Id : E) return B is
2052 pragma Assert (Ekind (Id) = E_Exception);
2053 return Flag224 (Id);
2056 function Is_Remote_Call_Interface (Id : E) return B is
2059 end Is_Remote_Call_Interface;
2061 function Is_Remote_Types (Id : E) return B is
2064 end Is_Remote_Types;
2066 function Is_Renaming_Of_Object (Id : E) return B is
2068 return Flag112 (Id);
2069 end Is_Renaming_Of_Object;
2071 function Is_Return_Object (Id : E) return B is
2073 return Flag209 (Id);
2074 end Is_Return_Object;
2076 function Is_Safe_To_Reevaluate (Id : E) return B is
2078 return Flag249 (Id);
2079 end Is_Safe_To_Reevaluate;
2081 function Is_Shared_Passive (Id : E) return B is
2084 end Is_Shared_Passive;
2086 function Is_Statically_Allocated (Id : E) return B is
2089 end Is_Statically_Allocated;
2091 function Is_Tag (Id : E) return B is
2093 pragma Assert (Nkind (Id) in N_Entity);
2097 function Is_Tagged_Type (Id : E) return B is
2102 function Is_Thunk (Id : E) return B is
2104 pragma Assert (Is_Subprogram (Id));
2105 return Flag225 (Id);
2108 function Is_Trivial_Subprogram (Id : E) return B is
2110 return Flag235 (Id);
2111 end Is_Trivial_Subprogram;
2113 function Is_True_Constant (Id : E) return B is
2115 return Flag163 (Id);
2116 end Is_True_Constant;
2118 function Is_Unchecked_Union (Id : E) return B is
2120 return Flag117 (Implementation_Base_Type (Id));
2121 end Is_Unchecked_Union;
2123 function Is_Underlying_Record_View (Id : E) return B is
2125 return Flag246 (Id);
2126 end Is_Underlying_Record_View;
2128 function Is_Unsigned_Type (Id : E) return B is
2130 pragma Assert (Is_Type (Id));
2131 return Flag144 (Id);
2132 end Is_Unsigned_Type;
2134 function Is_Valued_Procedure (Id : E) return B is
2136 pragma Assert (Ekind (Id) = E_Procedure);
2137 return Flag127 (Id);
2138 end Is_Valued_Procedure;
2140 function Is_Visible_Child_Unit (Id : E) return B is
2142 pragma Assert (Is_Child_Unit (Id));
2143 return Flag116 (Id);
2144 end Is_Visible_Child_Unit;
2146 function Is_Visible_Formal (Id : E) return B is
2148 return Flag206 (Id);
2149 end Is_Visible_Formal;
2151 function Is_VMS_Exception (Id : E) return B is
2153 return Flag133 (Id);
2154 end Is_VMS_Exception;
2156 function Is_Volatile (Id : E) return B is
2158 pragma Assert (Nkind (Id) in N_Entity);
2160 if Is_Type (Id) then
2161 return Flag16 (Base_Type (Id));
2167 function Itype_Printed (Id : E) return B is
2169 pragma Assert (Is_Itype (Id));
2170 return Flag202 (Id);
2173 function Kill_Elaboration_Checks (Id : E) return B is
2176 end Kill_Elaboration_Checks;
2178 function Kill_Range_Checks (Id : E) return B is
2181 end Kill_Range_Checks;
2183 function Kill_Tag_Checks (Id : E) return B is
2186 end Kill_Tag_Checks;
2188 function Known_To_Have_Preelab_Init (Id : E) return B is
2190 pragma Assert (Is_Type (Id));
2191 return Flag207 (Id);
2192 end Known_To_Have_Preelab_Init;
2194 function Last_Assignment (Id : E) return N is
2196 pragma Assert (Is_Assignable (Id));
2198 end Last_Assignment;
2200 function Last_Entity (Id : E) return E is
2205 function Limited_View (Id : E) return E is
2207 pragma Assert (Ekind (Id) = E_Package);
2211 function Lit_Indexes (Id : E) return E is
2213 pragma Assert (Is_Enumeration_Type (Id));
2217 function Lit_Strings (Id : E) return E is
2219 pragma Assert (Is_Enumeration_Type (Id));
2223 function Low_Bound_Tested (Id : E) return B is
2225 return Flag205 (Id);
2226 end Low_Bound_Tested;
2228 function Machine_Radix_10 (Id : E) return B is
2230 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2232 end Machine_Radix_10;
2234 function Master_Id (Id : E) return E is
2236 pragma Assert (Is_Access_Type (Id));
2240 function Materialize_Entity (Id : E) return B is
2242 return Flag168 (Id);
2243 end Materialize_Entity;
2245 function Mechanism (Id : E) return M is
2247 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2248 return UI_To_Int (Uint8 (Id));
2251 function Modulus (Id : E) return Uint is
2253 pragma Assert (Is_Modular_Integer_Type (Id));
2254 return Uint17 (Base_Type (Id));
2257 function Must_Be_On_Byte_Boundary (Id : E) return B is
2259 pragma Assert (Is_Type (Id));
2260 return Flag183 (Id);
2261 end Must_Be_On_Byte_Boundary;
2263 function Must_Have_Preelab_Init (Id : E) return B is
2265 pragma Assert (Is_Type (Id));
2266 return Flag208 (Id);
2267 end Must_Have_Preelab_Init;
2269 function Needs_Debug_Info (Id : E) return B is
2271 return Flag147 (Id);
2272 end Needs_Debug_Info;
2274 function Needs_No_Actuals (Id : E) return B is
2277 (Is_Overloadable (Id)
2278 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2280 end Needs_No_Actuals;
2282 function Never_Set_In_Source (Id : E) return B is
2284 return Flag115 (Id);
2285 end Never_Set_In_Source;
2287 function Next_Inlined_Subprogram (Id : E) return E is
2290 end Next_Inlined_Subprogram;
2292 function No_Pool_Assigned (Id : E) return B is
2294 pragma Assert (Is_Access_Type (Id));
2295 return Flag131 (Root_Type (Id));
2296 end No_Pool_Assigned;
2298 function No_Return (Id : E) return B is
2300 return Flag113 (Id);
2303 function No_Strict_Aliasing (Id : E) return B is
2305 pragma Assert (Is_Access_Type (Id));
2306 return Flag136 (Base_Type (Id));
2307 end No_Strict_Aliasing;
2309 function Non_Binary_Modulus (Id : E) return B is
2311 pragma Assert (Is_Type (Id));
2312 return Flag58 (Base_Type (Id));
2313 end Non_Binary_Modulus;
2315 function Non_Limited_View (Id : E) return E is
2317 pragma Assert (Ekind (Id) in Incomplete_Kind);
2319 end Non_Limited_View;
2321 function Nonzero_Is_True (Id : E) return B is
2323 pragma Assert (Root_Type (Id) = Standard_Boolean);
2324 return Flag162 (Base_Type (Id));
2325 end Nonzero_Is_True;
2327 function Normalized_First_Bit (Id : E) return U is
2329 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2331 end Normalized_First_Bit;
2333 function Normalized_Position (Id : E) return U is
2335 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2337 end Normalized_Position;
2339 function Normalized_Position_Max (Id : E) return U is
2341 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2343 end Normalized_Position_Max;
2345 function OK_To_Rename (Id : E) return B is
2347 pragma Assert (Ekind (Id) = E_Variable);
2348 return Flag247 (Id);
2351 function OK_To_Reorder_Components (Id : E) return B is
2353 pragma Assert (Is_Record_Type (Id));
2354 return Flag239 (Base_Type (Id));
2355 end OK_To_Reorder_Components;
2357 function Optimize_Alignment_Space (Id : E) return B is
2360 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2361 return Flag241 (Id);
2362 end Optimize_Alignment_Space;
2364 function Optimize_Alignment_Time (Id : E) return B is
2367 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2368 return Flag242 (Id);
2369 end Optimize_Alignment_Time;
2371 function Original_Access_Type (Id : E) return E is
2373 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2375 end Original_Access_Type;
2377 function Original_Array_Type (Id : E) return E is
2379 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2381 end Original_Array_Type;
2383 function Original_Record_Component (Id : E) return E is
2385 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2387 end Original_Record_Component;
2389 function Overlays_Constant (Id : E) return B is
2391 return Flag243 (Id);
2392 end Overlays_Constant;
2394 function Overridden_Operation (Id : E) return E is
2397 end Overridden_Operation;
2399 function Package_Instantiation (Id : E) return N is
2401 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2403 end Package_Instantiation;
2405 function Packed_Array_Type (Id : E) return E is
2407 pragma Assert (Is_Array_Type (Id));
2409 end Packed_Array_Type;
2411 function Parent_Subtype (Id : E) return E is
2413 pragma Assert (Is_Record_Type (Id));
2414 return Node19 (Base_Type (Id));
2417 function Postcondition_Proc (Id : E) return E is
2419 pragma Assert (Ekind (Id) = E_Procedure);
2421 end Postcondition_Proc;
2423 function PPC_Wrapper (Id : E) return E is
2425 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2429 function Prival (Id : E) return E is
2431 pragma Assert (Is_Protected_Component (Id));
2435 function Prival_Link (Id : E) return E is
2437 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2441 function Private_Dependents (Id : E) return L is
2443 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2444 return Elist18 (Id);
2445 end Private_Dependents;
2447 function Private_View (Id : E) return N is
2449 pragma Assert (Is_Private_Type (Id));
2453 function Protected_Body_Subprogram (Id : E) return E is
2455 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2457 end Protected_Body_Subprogram;
2459 function Protected_Formal (Id : E) return E is
2461 pragma Assert (Is_Formal (Id));
2463 end Protected_Formal;
2465 function Protection_Object (Id : E) return E is
2468 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2470 end Protection_Object;
2472 function Reachable (Id : E) return B is
2477 function Referenced (Id : E) return B is
2479 return Flag156 (Id);
2482 function Referenced_As_LHS (Id : E) return B is
2485 end Referenced_As_LHS;
2487 function Referenced_As_Out_Parameter (Id : E) return B is
2489 return Flag227 (Id);
2490 end Referenced_As_Out_Parameter;
2492 function Register_Exception_Call (Id : E) return N is
2494 pragma Assert (Ekind (Id) = E_Exception);
2496 end Register_Exception_Call;
2498 function Related_Array_Object (Id : E) return E is
2500 pragma Assert (Is_Array_Type (Id));
2502 end Related_Array_Object;
2504 function Related_Expression (Id : E) return N is
2506 pragma Assert (Ekind (Id) in Type_Kind
2507 or else Ekind_In (Id, E_Constant, E_Variable));
2509 end Related_Expression;
2511 function Related_Instance (Id : E) return E is
2513 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2515 end Related_Instance;
2517 function Related_Type (Id : E) return E is
2519 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2523 function Relative_Deadline_Variable (Id : E) return E is
2525 pragma Assert (Is_Task_Type (Id));
2526 return Node26 (Implementation_Base_Type (Id));
2527 end Relative_Deadline_Variable;
2529 function Renamed_Entity (Id : E) return N is
2534 function Renamed_In_Spec (Id : E) return B is
2536 pragma Assert (Ekind (Id) = E_Package);
2537 return Flag231 (Id);
2538 end Renamed_In_Spec;
2540 function Renamed_Object (Id : E) return N is
2545 function Renaming_Map (Id : E) return U is
2550 function Requires_Overriding (Id : E) return B is
2552 pragma Assert (Is_Overloadable (Id));
2553 return Flag213 (Id);
2554 end Requires_Overriding;
2556 function Return_Flag (Id : E) return N is
2558 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2562 function Return_Present (Id : E) return B is
2567 function Return_Applies_To (Id : E) return N is
2570 end Return_Applies_To;
2572 function Returns_By_Ref (Id : E) return B is
2577 function Reverse_Bit_Order (Id : E) return B is
2579 pragma Assert (Is_Record_Type (Id));
2580 return Flag164 (Base_Type (Id));
2581 end Reverse_Bit_Order;
2583 function RM_Size (Id : E) return U is
2585 pragma Assert (Is_Type (Id));
2589 function Scalar_Range (Id : E) return N is
2594 function Scale_Value (Id : E) return U is
2599 function Scope_Depth_Value (Id : E) return U is
2602 end Scope_Depth_Value;
2604 function Sec_Stack_Needed_For_Return (Id : E) return B is
2606 return Flag167 (Id);
2607 end Sec_Stack_Needed_For_Return;
2609 function Shadow_Entities (Id : E) return S is
2611 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2613 end Shadow_Entities;
2615 function Shared_Var_Procs_Instance (Id : E) return E is
2617 pragma Assert (Ekind (Id) = E_Variable);
2619 end Shared_Var_Procs_Instance;
2621 function Size_Check_Code (Id : E) return N is
2623 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2625 end Size_Check_Code;
2627 function Size_Depends_On_Discriminant (Id : E) return B is
2629 return Flag177 (Id);
2630 end Size_Depends_On_Discriminant;
2632 function Size_Known_At_Compile_Time (Id : E) return B is
2635 end Size_Known_At_Compile_Time;
2637 function Small_Value (Id : E) return R is
2639 pragma Assert (Is_Fixed_Point_Type (Id));
2640 return Ureal21 (Id);
2643 function Spec_Entity (Id : E) return E is
2645 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2649 function Spec_PPC_List (Id : E) return N is
2652 (Ekind_In (Id, E_Entry, E_Entry_Family)
2653 or else Is_Subprogram (Id)
2654 or else Is_Generic_Subprogram (Id));
2658 function Static_Predicate (Id : E) return S is
2660 pragma Assert (Is_Discrete_Type (Id));
2662 end Static_Predicate;
2664 function Storage_Size_Variable (Id : E) return E is
2666 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2667 return Node15 (Implementation_Base_Type (Id));
2668 end Storage_Size_Variable;
2670 function Static_Elaboration_Desired (Id : E) return B is
2672 pragma Assert (Ekind (Id) = E_Package);
2674 end Static_Elaboration_Desired;
2676 function Static_Initialization (Id : E) return N is
2679 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2681 end Static_Initialization;
2683 function Stored_Constraint (Id : E) return L is
2686 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2687 return Elist23 (Id);
2688 end Stored_Constraint;
2690 function Strict_Alignment (Id : E) return B is
2692 return Flag145 (Implementation_Base_Type (Id));
2693 end Strict_Alignment;
2695 function String_Literal_Length (Id : E) return U is
2698 end String_Literal_Length;
2700 function String_Literal_Low_Bound (Id : E) return N is
2703 end String_Literal_Low_Bound;
2705 function Subprograms_For_Type (Id : E) return E is
2707 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2709 end Subprograms_For_Type;
2711 function Suppress_Elaboration_Warnings (Id : E) return B is
2713 return Flag148 (Id);
2714 end Suppress_Elaboration_Warnings;
2716 function Suppress_Initialization (Id : E) return B is
2718 pragma Assert (Is_Type (Id));
2719 return Flag105 (Id);
2720 end Suppress_Initialization;
2722 function Suppress_Style_Checks (Id : E) return B is
2724 return Flag165 (Id);
2725 end Suppress_Style_Checks;
2727 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2729 return Flag217 (Id);
2730 end Suppress_Value_Tracking_On_Call;
2732 function Task_Body_Procedure (Id : E) return N is
2734 pragma Assert (Ekind (Id) in Task_Kind);
2736 end Task_Body_Procedure;
2738 function Treat_As_Volatile (Id : E) return B is
2741 end Treat_As_Volatile;
2743 function Underlying_Full_View (Id : E) return E is
2745 pragma Assert (Ekind (Id) in Private_Kind);
2747 end Underlying_Full_View;
2749 function Underlying_Record_View (Id : E) return E is
2752 end Underlying_Record_View;
2754 function Universal_Aliasing (Id : E) return B is
2756 pragma Assert (Is_Type (Id));
2757 return Flag216 (Base_Type (Id));
2758 end Universal_Aliasing;
2760 function Unset_Reference (Id : E) return N is
2763 end Unset_Reference;
2765 function Used_As_Generic_Actual (Id : E) return B is
2767 return Flag222 (Id);
2768 end Used_As_Generic_Actual;
2770 function Uses_Sec_Stack (Id : E) return B is
2775 function Warnings_Off (Id : E) return B is
2780 function Warnings_Off_Used (Id : E) return B is
2782 return Flag236 (Id);
2783 end Warnings_Off_Used;
2785 function Warnings_Off_Used_Unmodified (Id : E) return B is
2787 return Flag237 (Id);
2788 end Warnings_Off_Used_Unmodified;
2790 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2792 return Flag238 (Id);
2793 end Warnings_Off_Used_Unreferenced;
2795 function Wrapped_Entity (Id : E) return E is
2797 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2798 and then Is_Primitive_Wrapper (Id));
2802 function Was_Hidden (Id : E) return B is
2804 return Flag196 (Id);
2807 ------------------------------
2808 -- Classification Functions --
2809 ------------------------------
2811 function Is_Access_Type (Id : E) return B is
2813 return Ekind (Id) in Access_Kind;
2816 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2818 return Ekind (Id) in Access_Protected_Kind;
2819 end Is_Access_Protected_Subprogram_Type;
2821 function Is_Access_Subprogram_Type (Id : E) return B is
2823 return Ekind (Id) in Access_Subprogram_Kind;
2824 end Is_Access_Subprogram_Type;
2826 function Is_Aggregate_Type (Id : E) return B is
2828 return Ekind (Id) in Aggregate_Kind;
2829 end Is_Aggregate_Type;
2831 function Is_Array_Type (Id : E) return B is
2833 return Ekind (Id) in Array_Kind;
2836 function Is_Assignable (Id : E) return B is
2838 return Ekind (Id) in Assignable_Kind;
2841 function Is_Class_Wide_Type (Id : E) return B is
2843 return Ekind (Id) in Class_Wide_Kind;
2844 end Is_Class_Wide_Type;
2846 function Is_Composite_Type (Id : E) return B is
2848 return Ekind (Id) in Composite_Kind;
2849 end Is_Composite_Type;
2851 function Is_Concurrent_Body (Id : E) return B is
2853 return Ekind (Id) in
2854 Concurrent_Body_Kind;
2855 end Is_Concurrent_Body;
2857 function Is_Concurrent_Record_Type (Id : E) return B is
2860 end Is_Concurrent_Record_Type;
2862 function Is_Concurrent_Type (Id : E) return B is
2864 return Ekind (Id) in Concurrent_Kind;
2865 end Is_Concurrent_Type;
2867 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2869 return Ekind (Id) in
2870 Decimal_Fixed_Point_Kind;
2871 end Is_Decimal_Fixed_Point_Type;
2873 function Is_Digits_Type (Id : E) return B is
2875 return Ekind (Id) in Digits_Kind;
2878 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2880 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2881 end Is_Discrete_Or_Fixed_Point_Type;
2883 function Is_Discrete_Type (Id : E) return B is
2885 return Ekind (Id) in Discrete_Kind;
2886 end Is_Discrete_Type;
2888 function Is_Elementary_Type (Id : E) return B is
2890 return Ekind (Id) in Elementary_Kind;
2891 end Is_Elementary_Type;
2893 function Is_Entry (Id : E) return B is
2895 return Ekind (Id) in Entry_Kind;
2898 function Is_Enumeration_Type (Id : E) return B is
2900 return Ekind (Id) in
2902 end Is_Enumeration_Type;
2904 function Is_Fixed_Point_Type (Id : E) return B is
2906 return Ekind (Id) in
2908 end Is_Fixed_Point_Type;
2910 function Is_Floating_Point_Type (Id : E) return B is
2912 return Ekind (Id) in Float_Kind;
2913 end Is_Floating_Point_Type;
2915 function Is_Formal (Id : E) return B is
2917 return Ekind (Id) in Formal_Kind;
2920 function Is_Formal_Object (Id : E) return B is
2922 return Ekind (Id) in Formal_Object_Kind;
2923 end Is_Formal_Object;
2925 function Is_Generic_Subprogram (Id : E) return B is
2927 return Ekind (Id) in Generic_Subprogram_Kind;
2928 end Is_Generic_Subprogram;
2930 function Is_Generic_Unit (Id : E) return B is
2932 return Ekind (Id) in Generic_Unit_Kind;
2933 end Is_Generic_Unit;
2935 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2937 return Ekind (Id) in
2938 Incomplete_Or_Private_Kind;
2939 end Is_Incomplete_Or_Private_Type;
2941 function Is_Incomplete_Type (Id : E) return B is
2943 return Ekind (Id) in
2945 end Is_Incomplete_Type;
2947 function Is_Integer_Type (Id : E) return B is
2949 return Ekind (Id) in Integer_Kind;
2950 end Is_Integer_Type;
2952 function Is_Modular_Integer_Type (Id : E) return B is
2954 return Ekind (Id) in
2955 Modular_Integer_Kind;
2956 end Is_Modular_Integer_Type;
2958 function Is_Named_Number (Id : E) return B is
2960 return Ekind (Id) in Named_Kind;
2961 end Is_Named_Number;
2963 function Is_Numeric_Type (Id : E) return B is
2965 return Ekind (Id) in Numeric_Kind;
2966 end Is_Numeric_Type;
2968 function Is_Object (Id : E) return B is
2970 return Ekind (Id) in Object_Kind;
2973 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2975 return Ekind (Id) in
2976 Ordinary_Fixed_Point_Kind;
2977 end Is_Ordinary_Fixed_Point_Type;
2979 function Is_Overloadable (Id : E) return B is
2981 return Ekind (Id) in Overloadable_Kind;
2982 end Is_Overloadable;
2984 function Is_Private_Type (Id : E) return B is
2986 return Ekind (Id) in Private_Kind;
2987 end Is_Private_Type;
2989 function Is_Protected_Type (Id : E) return B is
2991 return Ekind (Id) in Protected_Kind;
2992 end Is_Protected_Type;
2994 function Is_Real_Type (Id : E) return B is
2996 return Ekind (Id) in Real_Kind;
2999 function Is_Record_Type (Id : E) return B is
3001 return Ekind (Id) in Record_Kind;
3004 function Is_Scalar_Type (Id : E) return B is
3006 return Ekind (Id) in Scalar_Kind;
3009 function Is_Signed_Integer_Type (Id : E) return B is
3011 return Ekind (Id) in Signed_Integer_Kind;
3012 end Is_Signed_Integer_Type;
3014 function Is_Subprogram (Id : E) return B is
3016 return Ekind (Id) in Subprogram_Kind;
3019 function Is_Task_Type (Id : E) return B is
3021 return Ekind (Id) in Task_Kind;
3024 function Is_Type (Id : E) return B is
3026 return Ekind (Id) in Type_Kind;
3029 ------------------------------
3030 -- Attribute Set Procedures --
3031 ------------------------------
3033 -- Note: in many of these set procedures an "obvious" assertion is missing.
3034 -- The reason for this is that in many cases, a field is set before the
3035 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3036 -- it is possible to add assertions that specifically include the E_Void
3037 -- possibility, but in some cases, we just omit the assertions.
3039 procedure Set_Accept_Address (Id : E; V : L) is
3041 Set_Elist21 (Id, V);
3042 end Set_Accept_Address;
3044 procedure Set_Access_Disp_Table (Id : E; V : L) is
3046 pragma Assert (Ekind (Id) = E_Record_Type
3047 and then Id = Implementation_Base_Type (Id));
3048 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3049 Set_Elist16 (Id, V);
3050 end Set_Access_Disp_Table;
3052 procedure Set_Associated_Collection (Id : E; V : E) is
3054 pragma Assert (Is_Access_Type (Id));
3056 end Set_Associated_Collection;
3058 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3061 end Set_Associated_Formal_Package;
3063 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3066 end Set_Associated_Node_For_Itype;
3068 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3070 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3072 end Set_Associated_Storage_Pool;
3074 procedure Set_Actual_Subtype (Id : E; V : E) is
3077 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3078 or else Is_Formal (Id));
3080 end Set_Actual_Subtype;
3082 procedure Set_Address_Taken (Id : E; V : B := True) is
3084 Set_Flag104 (Id, V);
3085 end Set_Address_Taken;
3087 procedure Set_Alias (Id : E; V : E) is
3090 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3094 procedure Set_Alignment (Id : E; V : U) is
3096 pragma Assert (Is_Type (Id)
3097 or else Is_Formal (Id)
3098 or else Ekind_In (Id, E_Loop_Parameter,
3105 procedure Set_Barrier_Function (Id : E; V : N) is
3107 pragma Assert (Is_Entry (Id));
3109 end Set_Barrier_Function;
3111 procedure Set_Block_Node (Id : E; V : N) is
3113 pragma Assert (Ekind (Id) = E_Block);
3117 procedure Set_Body_Entity (Id : E; V : E) is
3119 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3121 end Set_Body_Entity;
3123 procedure Set_Body_Is_In_ALFA (Id : E; V : B := True) is
3125 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
3126 Set_Flag251 (Id, V);
3127 end Set_Body_Is_In_ALFA;
3129 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3132 (Ekind (Id) = E_Package
3133 or else Is_Subprogram (Id)
3134 or else Is_Generic_Unit (Id));
3136 end Set_Body_Needed_For_SAL;
3138 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3140 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3141 Set_Flag125 (Id, V);
3142 end Set_C_Pass_By_Copy;
3144 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3147 end Set_Can_Never_Be_Null;
3149 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3152 end Set_Checks_May_Be_Suppressed;
3154 procedure Set_Class_Wide_Type (Id : E; V : E) is
3156 pragma Assert (Is_Type (Id));
3158 end Set_Class_Wide_Type;
3160 procedure Set_Cloned_Subtype (Id : E; V : E) is
3162 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3164 end Set_Cloned_Subtype;
3166 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3168 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3170 end Set_Component_Bit_Offset;
3172 procedure Set_Component_Clause (Id : E; V : N) is
3174 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3176 end Set_Component_Clause;
3178 procedure Set_Component_Size (Id : E; V : U) is
3180 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3182 end Set_Component_Size;
3184 procedure Set_Component_Type (Id : E; V : E) is
3186 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3188 end Set_Component_Type;
3190 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3193 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3195 end Set_Corresponding_Concurrent_Type;
3197 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3199 pragma Assert (Ekind (Id) = E_Discriminant);
3201 end Set_Corresponding_Discriminant;
3203 procedure Set_Corresponding_Equality (Id : E; V : E) is
3206 (Ekind (Id) = E_Function
3207 and then not Comes_From_Source (Id)
3208 and then Chars (Id) = Name_Op_Ne);
3210 end Set_Corresponding_Equality;
3212 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3214 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3216 end Set_Corresponding_Protected_Entry;
3218 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3220 pragma Assert (Is_Concurrent_Type (Id));
3222 end Set_Corresponding_Record_Type;
3224 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3227 end Set_Corresponding_Remote_Type;
3229 procedure Set_Current_Use_Clause (Id : E; V : E) is
3231 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3233 end Set_Current_Use_Clause;
3235 procedure Set_Current_Value (Id : E; V : N) is
3237 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3239 end Set_Current_Value;
3241 procedure Set_CR_Discriminant (Id : E; V : E) is
3244 end Set_CR_Discriminant;
3246 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3248 Set_Flag166 (Id, V);
3249 end Set_Debug_Info_Off;
3251 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3254 end Set_Debug_Renaming_Link;
3256 procedure Set_Default_Expr_Function (Id : E; V : E) is
3258 pragma Assert (Is_Formal (Id));
3260 end Set_Default_Expr_Function;
3262 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3264 Set_Flag108 (Id, V);
3265 end Set_Default_Expressions_Processed;
3267 procedure Set_Default_Value (Id : E; V : N) is
3269 pragma Assert (Is_Formal (Id));
3271 end Set_Default_Value;
3273 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3277 or else Is_Task_Type (Id)
3278 or else Ekind (Id) = E_Block);
3279 Set_Flag114 (Id, V);
3280 end Set_Delay_Cleanups;
3282 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3285 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3288 end Set_Delay_Subprogram_Descriptors;
3290 procedure Set_Delta_Value (Id : E; V : R) is
3292 pragma Assert (Is_Fixed_Point_Type (Id));
3293 Set_Ureal18 (Id, V);
3294 end Set_Delta_Value;
3296 procedure Set_Dependent_Instances (Id : E; V : L) is
3298 pragma Assert (Is_Generic_Instance (Id));
3300 end Set_Dependent_Instances;
3302 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3304 pragma Assert (Nkind (Id) in N_Entity);
3306 end Set_Depends_On_Private;
3308 procedure Set_Digits_Value (Id : E; V : U) is
3311 (Is_Floating_Point_Type (Id)
3312 or else Is_Decimal_Fixed_Point_Type (Id));
3314 end Set_Digits_Value;
3316 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3319 end Set_Directly_Designated_Type;
3321 procedure Set_Discard_Names (Id : E; V : B := True) is
3324 end Set_Discard_Names;
3326 procedure Set_Discriminal (Id : E; V : E) is
3328 pragma Assert (Ekind (Id) = E_Discriminant);
3330 end Set_Discriminal;
3332 procedure Set_Discriminal_Link (Id : E; V : E) is
3335 end Set_Discriminal_Link;
3337 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3339 pragma Assert (Ekind (Id) = E_Component);
3341 end Set_Discriminant_Checking_Func;
3343 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3345 pragma Assert (Nkind (Id) in N_Entity);
3346 Set_Elist21 (Id, V);
3347 end Set_Discriminant_Constraint;
3349 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3352 end Set_Discriminant_Default_Value;
3354 procedure Set_Discriminant_Number (Id : E; V : U) is
3357 end Set_Discriminant_Number;
3359 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3361 pragma Assert (Ekind (Id) = E_Record_Type
3362 and then Id = Implementation_Base_Type (Id));
3363 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3364 Set_Elist26 (Id, V);
3365 end Set_Dispatch_Table_Wrappers;
3367 procedure Set_DT_Entry_Count (Id : E; V : U) is
3369 pragma Assert (Ekind (Id) = E_Component);
3371 end Set_DT_Entry_Count;
3373 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3375 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3377 end Set_DT_Offset_To_Top_Func;
3379 procedure Set_DT_Position (Id : E; V : U) is
3381 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3383 end Set_DT_Position;
3385 procedure Set_DTC_Entity (Id : E; V : E) is
3387 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3391 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3393 pragma Assert (Ekind (Id) = E_Package);
3394 Set_Flag210 (Id, V);
3395 end Set_Elaborate_Body_Desirable;
3397 procedure Set_Elaboration_Entity (Id : E; V : E) is
3402 Ekind (Id) = E_Package
3404 Is_Generic_Unit (Id));
3406 end Set_Elaboration_Entity;
3408 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3413 Ekind (Id) = E_Package
3415 Is_Generic_Unit (Id));
3416 Set_Flag174 (Id, V);
3417 end Set_Elaboration_Entity_Required;
3419 procedure Set_Enclosing_Scope (Id : E; V : E) is
3422 end Set_Enclosing_Scope;
3424 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3426 pragma Assert (Is_Entry (Id));
3427 Set_Flag152 (Id, V);
3428 end Set_Entry_Accepted;
3430 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3433 end Set_Entry_Bodies_Array;
3435 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3438 end Set_Entry_Cancel_Parameter;
3440 procedure Set_Entry_Component (Id : E; V : E) is
3443 end Set_Entry_Component;
3445 procedure Set_Entry_Formal (Id : E; V : E) is
3448 end Set_Entry_Formal;
3450 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3452 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3454 end Set_Entry_Index_Constant;
3456 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3459 end Set_Entry_Parameters_Type;
3461 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3463 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3465 end Set_Enum_Pos_To_Rep;
3467 procedure Set_Enumeration_Pos (Id : E; V : U) is
3469 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3471 end Set_Enumeration_Pos;
3473 procedure Set_Enumeration_Rep (Id : E; V : U) is
3475 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3477 end Set_Enumeration_Rep;
3479 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3481 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3483 end Set_Enumeration_Rep_Expr;
3485 procedure Set_Equivalent_Type (Id : E; V : E) is
3488 (Ekind_In (Id, E_Class_Wide_Type,
3489 E_Class_Wide_Subtype,
3490 E_Access_Protected_Subprogram_Type,
3491 E_Anonymous_Access_Protected_Subprogram_Type,
3492 E_Access_Subprogram_Type,
3495 end Set_Equivalent_Type;
3497 procedure Set_Esize (Id : E; V : U) is
3502 procedure Set_Exception_Code (Id : E; V : U) is
3504 pragma Assert (Ekind (Id) = E_Exception);
3506 end Set_Exception_Code;
3508 procedure Set_Extra_Accessibility (Id : E; V : E) is
3510 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3512 end Set_Extra_Accessibility;
3514 procedure Set_Extra_Constrained (Id : E; V : E) is
3516 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3518 end Set_Extra_Constrained;
3520 procedure Set_Extra_Formal (Id : E; V : E) is
3523 end Set_Extra_Formal;
3525 procedure Set_Extra_Formals (Id : E; V : E) is
3528 (Is_Overloadable (Id)
3529 or else Ekind_In (Id, E_Entry_Family,
3531 E_Subprogram_Type));
3533 end Set_Extra_Formals;
3535 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3538 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3539 Set_Flag229 (Id, V);
3540 end Set_Can_Use_Internal_Rep;
3542 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3544 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3545 Set_Flag158 (Id, V);
3546 end Set_Finalize_Storage_Only;
3548 procedure Set_Finalizer (Id : E; V : E) is
3551 (Ekind (Id) = E_Package
3552 or else Ekind (Id) = E_Package_Body);
3556 procedure Set_First_Entity (Id : E; V : E) is
3559 end Set_First_Entity;
3561 procedure Set_First_Exit_Statement (Id : E; V : N) is
3563 pragma Assert (Ekind (Id) = E_Loop);
3565 end Set_First_Exit_Statement;
3567 procedure Set_First_Index (Id : E; V : N) is
3569 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3571 end Set_First_Index;
3573 procedure Set_First_Literal (Id : E; V : E) is
3575 pragma Assert (Is_Enumeration_Type (Id));
3577 end Set_First_Literal;
3579 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3581 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3583 end Set_First_Optional_Parameter;
3585 procedure Set_First_Private_Entity (Id : E; V : E) is
3587 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3588 or else Ekind (Id) in Concurrent_Kind);
3590 end Set_First_Private_Entity;
3592 procedure Set_First_Rep_Item (Id : E; V : N) is
3595 end Set_First_Rep_Item;
3597 procedure Set_Float_Rep (Id : E; V : F) is
3598 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3600 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3603 procedure Set_Freeze_Node (Id : E; V : N) is
3606 end Set_Freeze_Node;
3608 procedure Set_From_With_Type (Id : E; V : B := True) is
3612 or else Ekind (Id) = E_Package);
3613 Set_Flag159 (Id, V);
3614 end Set_From_With_Type;
3616 procedure Set_Full_View (Id : E; V : E) is
3618 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3622 procedure Set_Generic_Homonym (Id : E; V : E) is
3625 end Set_Generic_Homonym;
3627 procedure Set_Generic_Renamings (Id : E; V : L) is
3629 Set_Elist23 (Id, V);
3630 end Set_Generic_Renamings;
3632 procedure Set_Handler_Records (Id : E; V : S) is
3635 end Set_Handler_Records;
3637 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3639 pragma Assert (Id = Base_Type (Id));
3640 Set_Flag135 (Id, V);
3641 end Set_Has_Aliased_Components;
3643 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3646 end Set_Has_Alignment_Clause;
3648 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3651 end Set_Has_All_Calls_Remote;
3653 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3655 Set_Flag201 (Id, V);
3656 end Set_Has_Anon_Block_Suffix;
3658 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3660 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3662 end Set_Has_Atomic_Components;
3664 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3667 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3668 Set_Flag139 (Id, V);
3669 end Set_Has_Biased_Representation;
3671 procedure Set_Has_Completion (Id : E; V : B := True) is
3674 end Set_Has_Completion;
3676 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3678 pragma Assert (Is_Type (Id));
3680 end Set_Has_Completion_In_Body;
3682 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3684 pragma Assert (Ekind (Id) = E_Record_Type);
3685 Set_Flag140 (Id, V);
3686 end Set_Has_Complex_Representation;
3688 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3690 pragma Assert (Ekind (Id) = E_Array_Type);
3692 end Set_Has_Component_Size_Clause;
3694 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3696 pragma Assert (Is_Type (Id));
3697 Set_Flag187 (Id, V);
3698 end Set_Has_Constrained_Partial_View;
3700 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3702 Set_Flag181 (Id, V);
3703 end Set_Has_Contiguous_Rep;
3705 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3707 pragma Assert (Id = Base_Type (Id));
3709 end Set_Has_Controlled_Component;
3711 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3714 end Set_Has_Controlling_Result;
3716 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3718 Set_Flag119 (Id, V);
3719 end Set_Has_Convention_Pragma;
3721 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3724 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3725 and then Is_Base_Type (Id));
3727 end Set_Has_Default_Aspect;
3729 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3731 pragma Assert (Nkind (Id) in N_Entity);
3732 Set_Flag200 (Id, V);
3733 end Set_Has_Delayed_Aspects;
3735 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3737 pragma Assert (Nkind (Id) in N_Entity);
3739 end Set_Has_Delayed_Freeze;
3741 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3743 pragma Assert (Nkind (Id) in N_Entity);
3745 end Set_Has_Discriminants;
3747 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3749 pragma Assert (Ekind (Id) = E_Record_Type
3750 and then Is_Tagged_Type (Id));
3751 Set_Flag220 (Id, V);
3752 end Set_Has_Dispatch_Table;
3754 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3756 pragma Assert (Is_Enumeration_Type (Id));
3758 end Set_Has_Enumeration_Rep_Clause;
3760 procedure Set_Has_Exit (Id : E; V : B := True) is
3765 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3767 pragma Assert (Is_Tagged_Type (Id));
3768 Set_Flag110 (Id, V);
3769 end Set_Has_External_Tag_Rep_Clause;
3771 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3773 Set_Flag175 (Id, V);
3774 end Set_Has_Forward_Instantiation;
3776 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3778 Set_Flag173 (Id, V);
3779 end Set_Has_Fully_Qualified_Name;
3781 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3784 end Set_Has_Gigi_Rep_Item;
3786 procedure Set_Has_Homonym (Id : E; V : B := True) is
3789 end Set_Has_Homonym;
3791 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3793 pragma Assert (Is_Type (Id));
3794 Set_Flag248 (Id, V);
3795 end Set_Has_Inheritable_Invariants;
3797 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3799 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3800 Set_Flag219 (Id, V);
3801 end Set_Has_Initial_Value;
3803 procedure Set_Has_Invariants (Id : E; V : B := True) is
3805 pragma Assert (Is_Type (Id)
3806 or else Ekind (Id) = E_Procedure
3807 or else Ekind (Id) = E_Void);
3808 Set_Flag232 (Id, V);
3809 end Set_Has_Invariants;
3811 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3813 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3815 end Set_Has_Machine_Radix_Clause;
3817 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3820 end Set_Has_Master_Entity;
3822 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3824 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3825 Set_Flag142 (Id, V);
3826 end Set_Has_Missing_Return;
3828 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3830 Set_Flag101 (Id, V);
3831 end Set_Has_Nested_Block_With_Handler;
3833 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3835 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3836 Set_Flag215 (Id, V);
3837 end Set_Has_Up_Level_Access;
3839 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3841 pragma Assert (Id = Base_Type (Id));
3843 end Set_Has_Non_Standard_Rep;
3845 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3847 pragma Assert (Is_Type (Id));
3848 Set_Flag172 (Id, V);
3849 end Set_Has_Object_Size_Clause;
3851 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3853 Set_Flag154 (Id, V);
3854 end Set_Has_Per_Object_Constraint;
3856 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3858 Set_Flag188 (Id, V);
3859 end Set_Has_Persistent_BSS;
3861 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3863 pragma Assert (Is_Subprogram (Id));
3864 Set_Flag240 (Id, V);
3865 end Set_Has_Postconditions;
3867 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3869 pragma Assert (Is_Access_Type (Id));
3870 Set_Flag27 (Base_Type (Id), V);
3871 end Set_Has_Pragma_Controlled;
3873 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3875 Set_Flag150 (Id, V);
3876 end Set_Has_Pragma_Elaborate_Body;
3878 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3880 Set_Flag157 (Id, V);
3881 end Set_Has_Pragma_Inline;
3883 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3885 Set_Flag230 (Id, V);
3886 end Set_Has_Pragma_Inline_Always;
3888 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3890 pragma Assert (Is_Enumeration_Type (Id));
3891 pragma Assert (Id = Base_Type (Id));
3892 Set_Flag198 (Id, V);
3893 end Set_Has_Pragma_Ordered;
3895 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3897 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3898 pragma Assert (Id = Base_Type (Id));
3899 Set_Flag121 (Id, V);
3900 end Set_Has_Pragma_Pack;
3902 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3904 Set_Flag221 (Id, V);
3905 end Set_Has_Pragma_Preelab_Init;
3907 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3909 Set_Flag203 (Id, V);
3910 end Set_Has_Pragma_Pure;
3912 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3914 Set_Flag179 (Id, V);
3915 end Set_Has_Pragma_Pure_Function;
3917 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3919 Set_Flag169 (Id, V);
3920 end Set_Has_Pragma_Thread_Local_Storage;
3922 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3924 Set_Flag233 (Id, V);
3925 end Set_Has_Pragma_Unmodified;
3927 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3929 Set_Flag180 (Id, V);
3930 end Set_Has_Pragma_Unreferenced;
3932 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3934 pragma Assert (Is_Type (Id));
3935 Set_Flag212 (Id, V);
3936 end Set_Has_Pragma_Unreferenced_Objects;
3938 procedure Set_Has_Predicates (Id : E; V : B := True) is
3940 Set_Flag250 (Id, V);
3941 end Set_Has_Predicates;
3943 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3945 pragma Assert (Id = Base_Type (Id));
3946 Set_Flag120 (Id, V);
3947 end Set_Has_Primitive_Operations;
3949 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3951 Set_Flag155 (Id, V);
3952 end Set_Has_Private_Declaration;
3954 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3956 Set_Flag161 (Id, V);
3957 end Set_Has_Qualified_Name;
3959 procedure Set_Has_RACW (Id : E; V : B := True) is
3961 pragma Assert (Ekind (Id) = E_Package);
3962 Set_Flag214 (Id, V);
3965 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3967 pragma Assert (Id = Base_Type (Id));
3969 end Set_Has_Record_Rep_Clause;
3971 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3973 pragma Assert (Is_Subprogram (Id));
3974 Set_Flag143 (Id, V);
3975 end Set_Has_Recursive_Call;
3977 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3980 end Set_Has_Size_Clause;
3982 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3985 end Set_Has_Small_Clause;
3987 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3989 pragma Assert (Id = Base_Type (Id));
3990 Set_Flag100 (Id, V);
3991 end Set_Has_Specified_Layout;
3993 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3995 pragma Assert (Is_Type (Id));
3996 Set_Flag190 (Id, V);
3997 end Set_Has_Specified_Stream_Input;
3999 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4001 pragma Assert (Is_Type (Id));
4002 Set_Flag191 (Id, V);
4003 end Set_Has_Specified_Stream_Output;
4005 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4007 pragma Assert (Is_Type (Id));
4008 Set_Flag192 (Id, V);
4009 end Set_Has_Specified_Stream_Read;
4011 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4013 pragma Assert (Is_Type (Id));
4014 Set_Flag193 (Id, V);
4015 end Set_Has_Specified_Stream_Write;
4017 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4019 Set_Flag211 (Id, V);
4020 end Set_Has_Static_Discriminants;
4022 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4024 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4025 pragma Assert (Id = Base_Type (Id));
4027 end Set_Has_Storage_Size_Clause;
4029 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4031 pragma Assert (Is_Elementary_Type (Id));
4032 Set_Flag184 (Id, V);
4033 end Set_Has_Stream_Size_Clause;
4035 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4038 end Set_Has_Subprogram_Descriptor;
4040 procedure Set_Has_Task (Id : E; V : B := True) is
4042 pragma Assert (Id = Base_Type (Id));
4046 procedure Set_Has_Thunks (Id : E; V : B := True) is
4048 pragma Assert (Is_Tag (Id));
4049 Set_Flag228 (Id, V);
4052 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4054 pragma Assert (Id = Base_Type (Id));
4055 Set_Flag123 (Id, V);
4056 end Set_Has_Unchecked_Union;
4058 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4060 pragma Assert (Is_Type (Id));
4062 end Set_Has_Unknown_Discriminants;
4064 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4066 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4068 end Set_Has_Volatile_Components;
4070 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4072 Set_Flag182 (Id, V);
4073 end Set_Has_Xref_Entry;
4075 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4077 pragma Assert (Ekind (Id) = E_Variable);
4079 end Set_Hiding_Loop_Variable;
4081 procedure Set_Homonym (Id : E; V : E) is
4083 pragma Assert (Id /= V);
4087 procedure Set_Interface_Alias (Id : E; V : E) is
4091 and then Is_Hidden (Id)
4092 and then (Ekind_In (Id, E_Procedure, E_Function)));
4094 end Set_Interface_Alias;
4096 procedure Set_Interfaces (Id : E; V : L) is
4098 pragma Assert (Is_Record_Type (Id));
4099 Set_Elist25 (Id, V);
4102 procedure Set_In_Package_Body (Id : E; V : B := True) is
4105 end Set_In_Package_Body;
4107 procedure Set_In_Private_Part (Id : E; V : B := True) is
4110 end Set_In_Private_Part;
4112 procedure Set_In_Use (Id : E; V : B := True) is
4114 pragma Assert (Nkind (Id) in N_Entity);
4118 procedure Set_Inner_Instances (Id : E; V : L) is
4120 Set_Elist23 (Id, V);
4121 end Set_Inner_Instances;
4123 procedure Set_Interface_Name (Id : E; V : N) is
4126 end Set_Interface_Name;
4128 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4130 pragma Assert (Is_Overloadable (Id));
4132 end Set_Is_Abstract_Subprogram;
4134 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4136 pragma Assert (Is_Type (Id));
4137 Set_Flag146 (Id, V);
4138 end Set_Is_Abstract_Type;
4140 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4142 pragma Assert (Is_Access_Type (Id));
4143 Set_Flag194 (Id, V);
4144 end Set_Is_Local_Anonymous_Access;
4146 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4148 pragma Assert (Is_Access_Type (Id));
4150 end Set_Is_Access_Constant;
4152 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4154 Set_Flag185 (Id, V);
4155 end Set_Is_Ada_2005_Only;
4157 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4159 Set_Flag199 (Id, V);
4160 end Set_Is_Ada_2012_Only;
4162 procedure Set_Is_Aliased (Id : E; V : B := True) is
4164 pragma Assert (Nkind (Id) in N_Entity);
4168 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4170 pragma Assert (Is_Entry (Id));
4171 Set_Flag132 (Id, V);
4172 end Set_Is_AST_Entry;
4174 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4177 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4179 end Set_Is_Asynchronous;
4181 procedure Set_Is_Atomic (Id : E; V : B := True) is
4186 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4188 pragma Assert ((not V)
4189 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4190 Set_Flag122 (Id, V);
4191 end Set_Is_Bit_Packed_Array;
4193 procedure Set_Is_Called (Id : E; V : B := True) is
4195 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4196 Set_Flag102 (Id, V);
4199 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4202 end Set_Is_Character_Type;
4204 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4207 end Set_Is_Child_Unit;
4209 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4212 end Set_Is_Class_Wide_Equivalent_Type;
4214 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4216 Set_Flag149 (Id, V);
4217 end Set_Is_Compilation_Unit;
4219 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4221 pragma Assert (Ekind (Id) = E_Discriminant);
4222 Set_Flag103 (Id, V);
4223 end Set_Is_Completely_Hidden;
4225 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4228 end Set_Is_Concurrent_Record_Type;
4230 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4233 end Set_Is_Constr_Subt_For_U_Nominal;
4235 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4237 Set_Flag141 (Id, V);
4238 end Set_Is_Constr_Subt_For_UN_Aliased;
4240 procedure Set_Is_Constrained (Id : E; V : B := True) is
4242 pragma Assert (Nkind (Id) in N_Entity);
4244 end Set_Is_Constrained;
4246 procedure Set_Is_Constructor (Id : E; V : B := True) is
4249 end Set_Is_Constructor;
4251 procedure Set_Is_Controlled (Id : E; V : B := True) is
4253 pragma Assert (Id = Base_Type (Id));
4255 end Set_Is_Controlled;
4257 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4259 pragma Assert (Is_Formal (Id));
4261 end Set_Is_Controlling_Formal;
4263 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4266 end Set_Is_CPP_Class;
4268 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4270 pragma Assert (Is_Type (Id));
4271 Set_Flag223 (Id, V);
4272 end Set_Is_Descendent_Of_Address;
4274 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4276 Set_Flag176 (Id, V);
4277 end Set_Is_Discrim_SO_Function;
4279 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4281 Set_Flag234 (Id, V);
4282 end Set_Is_Dispatch_Table_Entity;
4284 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4289 Is_Overloadable (Id)
4291 Ekind (Id) = E_Subprogram_Type);
4294 end Set_Is_Dispatching_Operation;
4296 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4298 Set_Flag124 (Id, V);
4299 end Set_Is_Eliminated;
4301 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4304 end Set_Is_Entry_Formal;
4306 procedure Set_Is_Exported (Id : E; V : B := True) is
4309 end Set_Is_Exported;
4311 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4314 end Set_Is_First_Subtype;
4316 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4318 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4319 Set_Flag118 (Id, V);
4320 end Set_Is_For_Access_Subtype;
4322 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4324 Set_Flag111 (Id, V);
4325 end Set_Is_Formal_Subprogram;
4327 procedure Set_Is_Frozen (Id : E; V : B := True) is
4329 pragma Assert (Nkind (Id) in N_Entity);
4333 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4335 pragma Assert (Is_Type (Id));
4337 end Set_Is_Generic_Actual_Type;
4339 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4341 Set_Flag130 (Id, V);
4342 end Set_Is_Generic_Instance;
4344 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4346 pragma Assert (Nkind (Id) in N_Entity);
4348 end Set_Is_Generic_Type;
4350 procedure Set_Is_Hidden (Id : E; V : B := True) is
4355 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4357 Set_Flag171 (Id, V);
4358 end Set_Is_Hidden_Open_Scope;
4360 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4362 pragma Assert (Nkind (Id) in N_Entity);
4364 end Set_Is_Immediately_Visible;
4366 procedure Set_Is_Imported (Id : E; V : B := True) is
4369 end Set_Is_Imported;
4371 procedure Set_Is_In_ALFA (Id : E; V : B := True) is
4373 Set_Flag151 (Id, V);
4376 procedure Set_Is_Inlined (Id : E; V : B := True) is
4381 procedure Set_Is_Interface (Id : E; V : B := True) is
4383 pragma Assert (Is_Record_Type (Id));
4384 Set_Flag186 (Id, V);
4385 end Set_Is_Interface;
4387 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4389 Set_Flag126 (Id, V);
4390 end Set_Is_Instantiated;
4392 procedure Set_Is_Internal (Id : E; V : B := True) is
4394 pragma Assert (Nkind (Id) in N_Entity);
4396 end Set_Is_Internal;
4398 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4400 pragma Assert (Nkind (Id) in N_Entity);
4402 end Set_Is_Interrupt_Handler;
4404 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4407 end Set_Is_Intrinsic_Subprogram;
4409 procedure Set_Is_Itype (Id : E; V : B := True) is
4414 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4417 end Set_Is_Known_Non_Null;
4419 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4421 Set_Flag204 (Id, V);
4422 end Set_Is_Known_Null;
4424 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4426 Set_Flag170 (Id, V);
4427 end Set_Is_Known_Valid;
4429 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4431 pragma Assert (Is_Type (Id));
4432 Set_Flag106 (Id, V);
4433 end Set_Is_Limited_Composite;
4435 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4437 pragma Assert (Is_Interface (Id));
4438 Set_Flag197 (Id, V);
4439 end Set_Is_Limited_Interface;
4441 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4444 end Set_Is_Limited_Record;
4446 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4448 pragma Assert (Is_Subprogram (Id));
4449 Set_Flag137 (Id, V);
4450 end Set_Is_Machine_Code_Subprogram;
4452 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4454 pragma Assert (Is_Type (Id));
4455 Set_Flag109 (Id, V);
4456 end Set_Is_Non_Static_Subtype;
4458 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4460 pragma Assert (Ekind (Id) = E_Procedure);
4461 Set_Flag178 (Id, V);
4462 end Set_Is_Null_Init_Proc;
4464 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4466 Set_Flag153 (Id, V);
4467 end Set_Is_Obsolescent;
4469 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4471 pragma Assert (Ekind (Id) = E_Out_Parameter);
4472 Set_Flag226 (Id, V);
4473 end Set_Is_Only_Out_Parameter;
4475 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4477 pragma Assert (Is_Formal (Id));
4478 Set_Flag134 (Id, V);
4479 end Set_Is_Optional_Parameter;
4481 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4483 Set_Flag160 (Id, V);
4484 end Set_Is_Package_Body_Entity;
4486 procedure Set_Is_Packed (Id : E; V : B := True) is
4488 pragma Assert (Id = Base_Type (Id));
4492 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4494 Set_Flag138 (Id, V);
4495 end Set_Is_Packed_Array_Type;
4497 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4499 pragma Assert (Nkind (Id) in N_Entity);
4501 end Set_Is_Potentially_Use_Visible;
4503 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4506 end Set_Is_Preelaborated;
4508 procedure Set_Is_Primitive (Id : E; V : B := True) is
4511 (Is_Overloadable (Id)
4512 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4513 Set_Flag218 (Id, V);
4514 end Set_Is_Primitive;
4516 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4518 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4519 Set_Flag195 (Id, V);
4520 end Set_Is_Primitive_Wrapper;
4522 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4524 pragma Assert (Is_Type (Id));
4525 Set_Flag107 (Id, V);
4526 end Set_Is_Private_Composite;
4528 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4531 end Set_Is_Private_Descendant;
4533 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4535 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4536 Set_Flag245 (Id, V);
4537 end Set_Is_Private_Primitive;
4539 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4541 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4542 Set_Flag252 (Id, V);
4543 end Set_Is_Processed_Transient;
4545 procedure Set_Is_Public (Id : E; V : B := True) is
4547 pragma Assert (Nkind (Id) in N_Entity);
4551 procedure Set_Is_Pure (Id : E; V : B := True) is
4556 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4558 pragma Assert (Is_Access_Type (Id));
4559 Set_Flag189 (Id, V);
4560 end Set_Is_Pure_Unit_Access_Type;
4562 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4564 pragma Assert (Is_Type (Id));
4565 Set_Flag244 (Id, V);
4566 end Set_Is_RACW_Stub_Type;
4568 procedure Set_Is_Raised (Id : E; V : B := True) is
4570 pragma Assert (Ekind (Id) = E_Exception);
4571 Set_Flag224 (Id, V);
4574 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4577 end Set_Is_Remote_Call_Interface;
4579 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4582 end Set_Is_Remote_Types;
4584 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4586 Set_Flag112 (Id, V);
4587 end Set_Is_Renaming_Of_Object;
4589 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4591 Set_Flag209 (Id, V);
4592 end Set_Is_Return_Object;
4594 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4596 pragma Assert (Ekind (Id) = E_Variable);
4597 Set_Flag249 (Id, V);
4598 end Set_Is_Safe_To_Reevaluate;
4600 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4603 end Set_Is_Shared_Passive;
4605 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4609 or else Ekind_In (Id, E_Exception,
4614 end Set_Is_Statically_Allocated;
4616 procedure Set_Is_Tag (Id : E; V : B := True) is
4618 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4622 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4625 end Set_Is_Tagged_Type;
4627 procedure Set_Is_Thunk (Id : E; V : B := True) is
4629 Set_Flag225 (Id, V);
4632 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4634 Set_Flag235 (Id, V);
4635 end Set_Is_Trivial_Subprogram;
4637 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4639 Set_Flag163 (Id, V);
4640 end Set_Is_True_Constant;
4642 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4644 pragma Assert (Id = Base_Type (Id));
4645 Set_Flag117 (Id, V);
4646 end Set_Is_Unchecked_Union;
4648 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4650 pragma Assert (Ekind (Id) = E_Record_Type);
4651 Set_Flag246 (Id, V);
4652 end Set_Is_Underlying_Record_View;
4654 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4656 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4657 Set_Flag144 (Id, V);
4658 end Set_Is_Unsigned_Type;
4660 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4662 pragma Assert (Ekind (Id) = E_Procedure);
4663 Set_Flag127 (Id, V);
4664 end Set_Is_Valued_Procedure;
4666 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4668 pragma Assert (Is_Child_Unit (Id));
4669 Set_Flag116 (Id, V);
4670 end Set_Is_Visible_Child_Unit;
4672 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4674 Set_Flag206 (Id, V);
4675 end Set_Is_Visible_Formal;
4677 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4679 pragma Assert (Ekind (Id) = E_Exception);
4680 Set_Flag133 (Id, V);
4681 end Set_Is_VMS_Exception;
4683 procedure Set_Is_Volatile (Id : E; V : B := True) is
4685 pragma Assert (Nkind (Id) in N_Entity);
4687 end Set_Is_Volatile;
4689 procedure Set_Itype_Printed (Id : E; V : B := True) is
4691 pragma Assert (Is_Itype (Id));
4692 Set_Flag202 (Id, V);
4693 end Set_Itype_Printed;
4695 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4698 end Set_Kill_Elaboration_Checks;
4700 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4703 end Set_Kill_Range_Checks;
4705 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4708 end Set_Kill_Tag_Checks;
4710 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4712 pragma Assert (Is_Type (Id));
4713 Set_Flag207 (Id, V);
4714 end Set_Known_To_Have_Preelab_Init;
4716 procedure Set_Last_Assignment (Id : E; V : N) is
4718 pragma Assert (Is_Assignable (Id));
4720 end Set_Last_Assignment;
4722 procedure Set_Last_Entity (Id : E; V : E) is
4725 end Set_Last_Entity;
4727 procedure Set_Limited_View (Id : E; V : E) is
4729 pragma Assert (Ekind (Id) = E_Package);
4731 end Set_Limited_View;
4733 procedure Set_Lit_Indexes (Id : E; V : E) is
4735 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4737 end Set_Lit_Indexes;
4739 procedure Set_Lit_Strings (Id : E; V : E) is
4741 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4743 end Set_Lit_Strings;
4745 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4747 pragma Assert (Is_Formal (Id));
4748 Set_Flag205 (Id, V);
4749 end Set_Low_Bound_Tested;
4751 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4753 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4755 end Set_Machine_Radix_10;
4757 procedure Set_Master_Id (Id : E; V : E) is
4759 pragma Assert (Is_Access_Type (Id));
4763 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4765 Set_Flag168 (Id, V);
4766 end Set_Materialize_Entity;
4768 procedure Set_Mechanism (Id : E; V : M) is
4770 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4771 Set_Uint8 (Id, UI_From_Int (V));
4774 procedure Set_Modulus (Id : E; V : U) is
4776 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4780 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4782 pragma Assert (Is_Type (Id));
4783 Set_Flag183 (Id, V);
4784 end Set_Must_Be_On_Byte_Boundary;
4786 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4788 pragma Assert (Is_Type (Id));
4789 Set_Flag208 (Id, V);
4790 end Set_Must_Have_Preelab_Init;
4792 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4794 Set_Flag147 (Id, V);
4795 end Set_Needs_Debug_Info;
4797 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4800 (Is_Overloadable (Id)
4801 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4803 end Set_Needs_No_Actuals;
4805 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4807 Set_Flag115 (Id, V);
4808 end Set_Never_Set_In_Source;
4810 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4813 end Set_Next_Inlined_Subprogram;
4815 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4817 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4818 Set_Flag131 (Id, V);
4819 end Set_No_Pool_Assigned;
4821 procedure Set_No_Return (Id : E; V : B := True) is
4824 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4825 Set_Flag113 (Id, V);
4828 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4830 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4831 Set_Flag136 (Id, V);
4832 end Set_No_Strict_Aliasing;
4834 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4836 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4838 end Set_Non_Binary_Modulus;
4840 procedure Set_Non_Limited_View (Id : E; V : E) is
4842 pragma Assert (Ekind (Id) in Incomplete_Kind);
4844 end Set_Non_Limited_View;
4846 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4849 (Root_Type (Id) = Standard_Boolean
4850 and then Ekind (Id) = E_Enumeration_Type);
4851 Set_Flag162 (Id, V);
4852 end Set_Nonzero_Is_True;
4854 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4856 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4858 end Set_Normalized_First_Bit;
4860 procedure Set_Normalized_Position (Id : E; V : U) is
4862 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4864 end Set_Normalized_Position;
4866 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4868 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4870 end Set_Normalized_Position_Max;
4872 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4874 pragma Assert (Ekind (Id) = E_Variable);
4875 Set_Flag247 (Id, V);
4876 end Set_OK_To_Rename;
4878 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4881 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4882 Set_Flag239 (Id, V);
4883 end Set_OK_To_Reorder_Components;
4885 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4888 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4889 Set_Flag241 (Id, V);
4890 end Set_Optimize_Alignment_Space;
4892 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4895 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4896 Set_Flag242 (Id, V);
4897 end Set_Optimize_Alignment_Time;
4899 procedure Set_Original_Access_Type (Id : E; V : E) is
4901 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4903 end Set_Original_Access_Type;
4905 procedure Set_Original_Array_Type (Id : E; V : E) is
4907 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4909 end Set_Original_Array_Type;
4911 procedure Set_Original_Record_Component (Id : E; V : E) is
4913 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4915 end Set_Original_Record_Component;
4917 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4919 Set_Flag243 (Id, V);
4920 end Set_Overlays_Constant;
4922 procedure Set_Overridden_Operation (Id : E; V : E) is
4925 end Set_Overridden_Operation;
4927 procedure Set_Package_Instantiation (Id : E; V : N) is
4929 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4931 end Set_Package_Instantiation;
4933 procedure Set_Packed_Array_Type (Id : E; V : E) is
4935 pragma Assert (Is_Array_Type (Id));
4937 end Set_Packed_Array_Type;
4939 procedure Set_Parent_Subtype (Id : E; V : E) is
4941 pragma Assert (Ekind (Id) = E_Record_Type);
4943 end Set_Parent_Subtype;
4945 procedure Set_Postcondition_Proc (Id : E; V : E) is
4947 pragma Assert (Ekind (Id) = E_Procedure);
4949 end Set_Postcondition_Proc;
4951 procedure Set_PPC_Wrapper (Id : E; V : E) is
4953 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4955 end Set_PPC_Wrapper;
4957 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4959 pragma Assert (Is_Tagged_Type (Id));
4960 Set_Elist10 (Id, V);
4961 end Set_Direct_Primitive_Operations;
4963 procedure Set_Prival (Id : E; V : E) is
4965 pragma Assert (Is_Protected_Component (Id));
4969 procedure Set_Prival_Link (Id : E; V : E) is
4971 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4973 end Set_Prival_Link;
4975 procedure Set_Private_Dependents (Id : E; V : L) is
4977 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4978 Set_Elist18 (Id, V);
4979 end Set_Private_Dependents;
4981 procedure Set_Private_View (Id : E; V : N) is
4983 pragma Assert (Is_Private_Type (Id));
4985 end Set_Private_View;
4987 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4989 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4991 end Set_Protected_Body_Subprogram;
4993 procedure Set_Protected_Formal (Id : E; V : E) is
4995 pragma Assert (Is_Formal (Id));
4997 end Set_Protected_Formal;
4999 procedure Set_Protection_Object (Id : E; V : E) is
5001 pragma Assert (Ekind_In (Id, E_Entry,
5006 end Set_Protection_Object;
5008 procedure Set_Reachable (Id : E; V : B := True) is
5013 procedure Set_Referenced (Id : E; V : B := True) is
5015 Set_Flag156 (Id, V);
5018 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5021 end Set_Referenced_As_LHS;
5023 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5025 Set_Flag227 (Id, V);
5026 end Set_Referenced_As_Out_Parameter;
5028 procedure Set_Register_Exception_Call (Id : E; V : N) is
5030 pragma Assert (Ekind (Id) = E_Exception);
5032 end Set_Register_Exception_Call;
5034 procedure Set_Related_Array_Object (Id : E; V : E) is
5036 pragma Assert (Is_Array_Type (Id));
5038 end Set_Related_Array_Object;
5040 procedure Set_Related_Expression (Id : E; V : N) is
5042 pragma Assert (Ekind (Id) in Type_Kind
5043 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5045 end Set_Related_Expression;
5047 procedure Set_Related_Instance (Id : E; V : E) is
5049 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5051 end Set_Related_Instance;
5053 procedure Set_Related_Type (Id : E; V : E) is
5055 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5057 end Set_Related_Type;
5059 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5061 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5063 end Set_Relative_Deadline_Variable;
5065 procedure Set_Renamed_Entity (Id : E; V : N) is
5068 end Set_Renamed_Entity;
5070 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5072 pragma Assert (Ekind (Id) = E_Package);
5073 Set_Flag231 (Id, V);
5074 end Set_Renamed_In_Spec;
5076 procedure Set_Renamed_Object (Id : E; V : N) is
5079 end Set_Renamed_Object;
5081 procedure Set_Renaming_Map (Id : E; V : U) is
5084 end Set_Renaming_Map;
5086 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5088 pragma Assert (Is_Overloadable (Id));
5089 Set_Flag213 (Id, V);
5090 end Set_Requires_Overriding;
5092 procedure Set_Return_Flag (Id : E; V : E) is
5094 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5096 end Set_Return_Flag;
5098 procedure Set_Return_Present (Id : E; V : B := True) is
5101 end Set_Return_Present;
5103 procedure Set_Return_Applies_To (Id : E; V : N) is
5106 end Set_Return_Applies_To;
5108 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5111 end Set_Returns_By_Ref;
5113 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5116 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5117 Set_Flag164 (Id, V);
5118 end Set_Reverse_Bit_Order;
5120 procedure Set_RM_Size (Id : E; V : U) is
5122 pragma Assert (Is_Type (Id));
5126 procedure Set_Scalar_Range (Id : E; V : N) is
5129 end Set_Scalar_Range;
5131 procedure Set_Scale_Value (Id : E; V : U) is
5134 end Set_Scale_Value;
5136 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5138 pragma Assert (not Is_Record_Type (Id));
5140 end Set_Scope_Depth_Value;
5142 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5144 Set_Flag167 (Id, V);
5145 end Set_Sec_Stack_Needed_For_Return;
5147 procedure Set_Shadow_Entities (Id : E; V : S) is
5149 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5151 end Set_Shadow_Entities;
5153 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5155 pragma Assert (Ekind (Id) = E_Variable);
5157 end Set_Shared_Var_Procs_Instance;
5159 procedure Set_Size_Check_Code (Id : E; V : N) is
5161 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5163 end Set_Size_Check_Code;
5165 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5167 Set_Flag177 (Id, V);
5168 end Set_Size_Depends_On_Discriminant;
5170 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5173 end Set_Size_Known_At_Compile_Time;
5175 procedure Set_Small_Value (Id : E; V : R) is
5177 pragma Assert (Is_Fixed_Point_Type (Id));
5178 Set_Ureal21 (Id, V);
5179 end Set_Small_Value;
5181 procedure Set_Spec_Entity (Id : E; V : E) is
5183 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5185 end Set_Spec_Entity;
5187 procedure Set_Spec_PPC_List (Id : E; V : N) is
5190 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5191 or else Is_Subprogram (Id)
5192 or else Is_Generic_Subprogram (Id));
5194 end Set_Spec_PPC_List;
5196 procedure Set_Static_Predicate (Id : E; V : S) is
5199 (Ekind_In (Id, E_Enumeration_Subtype,
5200 E_Modular_Integer_Subtype,
5201 E_Signed_Integer_Subtype)
5202 and then Has_Predicates (Id));
5204 end Set_Static_Predicate;
5206 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5208 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5209 pragma Assert (Id = Base_Type (Id));
5211 end Set_Storage_Size_Variable;
5213 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5215 pragma Assert (Ekind (Id) = E_Package);
5217 end Set_Static_Elaboration_Desired;
5219 procedure Set_Static_Initialization (Id : E; V : N) is
5222 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5224 end Set_Static_Initialization;
5226 procedure Set_Stored_Constraint (Id : E; V : L) is
5228 pragma Assert (Nkind (Id) in N_Entity);
5229 Set_Elist23 (Id, V);
5230 end Set_Stored_Constraint;
5232 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5234 pragma Assert (Id = Base_Type (Id));
5235 Set_Flag145 (Id, V);
5236 end Set_Strict_Alignment;
5238 procedure Set_String_Literal_Length (Id : E; V : U) is
5240 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5242 end Set_String_Literal_Length;
5244 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5246 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5248 end Set_String_Literal_Low_Bound;
5250 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5252 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5254 end Set_Subprograms_For_Type;
5256 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5258 Set_Flag148 (Id, V);
5259 end Set_Suppress_Elaboration_Warnings;
5261 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5263 pragma Assert (Is_Type (Id));
5264 Set_Flag105 (Id, V);
5265 end Set_Suppress_Initialization;
5267 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5269 Set_Flag165 (Id, V);
5270 end Set_Suppress_Style_Checks;
5272 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5274 Set_Flag217 (Id, V);
5275 end Set_Suppress_Value_Tracking_On_Call;
5277 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5279 pragma Assert (Ekind (Id) in Task_Kind);
5281 end Set_Task_Body_Procedure;
5283 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5286 end Set_Treat_As_Volatile;
5288 procedure Set_Underlying_Full_View (Id : E; V : E) is
5290 pragma Assert (Ekind (Id) in Private_Kind);
5292 end Set_Underlying_Full_View;
5294 procedure Set_Underlying_Record_View (Id : E; V : E) is
5296 pragma Assert (Ekind (Id) = E_Record_Type);
5298 end Set_Underlying_Record_View;
5300 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5302 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5303 Set_Flag216 (Id, V);
5304 end Set_Universal_Aliasing;
5306 procedure Set_Unset_Reference (Id : E; V : N) is
5309 end Set_Unset_Reference;
5311 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5314 end Set_Uses_Sec_Stack;
5316 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5318 Set_Flag222 (Id, V);
5319 end Set_Used_As_Generic_Actual;
5321 procedure Set_Warnings_Off (Id : E; V : B := True) is
5324 end Set_Warnings_Off;
5326 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5328 Set_Flag236 (Id, V);
5329 end Set_Warnings_Off_Used;
5331 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5333 Set_Flag237 (Id, V);
5334 end Set_Warnings_Off_Used_Unmodified;
5336 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5338 Set_Flag238 (Id, V);
5339 end Set_Warnings_Off_Used_Unreferenced;
5341 procedure Set_Was_Hidden (Id : E; V : B := True) is
5343 Set_Flag196 (Id, V);
5346 procedure Set_Wrapped_Entity (Id : E; V : E) is
5348 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5349 and then Is_Primitive_Wrapper (Id));
5351 end Set_Wrapped_Entity;
5353 -----------------------------------
5354 -- Field Initialization Routines --
5355 -----------------------------------
5357 procedure Init_Alignment (Id : E) is
5359 Set_Uint14 (Id, Uint_0);
5362 procedure Init_Alignment (Id : E; V : Int) is
5364 Set_Uint14 (Id, UI_From_Int (V));
5367 procedure Init_Component_Bit_Offset (Id : E) is
5369 Set_Uint11 (Id, No_Uint);
5370 end Init_Component_Bit_Offset;
5372 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5374 Set_Uint11 (Id, UI_From_Int (V));
5375 end Init_Component_Bit_Offset;
5377 procedure Init_Component_Size (Id : E) is
5379 Set_Uint22 (Id, Uint_0);
5380 end Init_Component_Size;
5382 procedure Init_Component_Size (Id : E; V : Int) is
5384 Set_Uint22 (Id, UI_From_Int (V));
5385 end Init_Component_Size;
5387 procedure Init_Digits_Value (Id : E) is
5389 Set_Uint17 (Id, Uint_0);
5390 end Init_Digits_Value;
5392 procedure Init_Digits_Value (Id : E; V : Int) is
5394 Set_Uint17 (Id, UI_From_Int (V));
5395 end Init_Digits_Value;
5397 procedure Init_Esize (Id : E) is
5399 Set_Uint12 (Id, Uint_0);
5402 procedure Init_Esize (Id : E; V : Int) is
5404 Set_Uint12 (Id, UI_From_Int (V));
5407 procedure Init_Normalized_First_Bit (Id : E) is
5409 Set_Uint8 (Id, No_Uint);
5410 end Init_Normalized_First_Bit;
5412 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5414 Set_Uint8 (Id, UI_From_Int (V));
5415 end Init_Normalized_First_Bit;
5417 procedure Init_Normalized_Position (Id : E) is
5419 Set_Uint14 (Id, No_Uint);
5420 end Init_Normalized_Position;
5422 procedure Init_Normalized_Position (Id : E; V : Int) is
5424 Set_Uint14 (Id, UI_From_Int (V));
5425 end Init_Normalized_Position;
5427 procedure Init_Normalized_Position_Max (Id : E) is
5429 Set_Uint10 (Id, No_Uint);
5430 end Init_Normalized_Position_Max;
5432 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5434 Set_Uint10 (Id, UI_From_Int (V));
5435 end Init_Normalized_Position_Max;
5437 procedure Init_RM_Size (Id : E) is
5439 Set_Uint13 (Id, Uint_0);
5442 procedure Init_RM_Size (Id : E; V : Int) is
5444 Set_Uint13 (Id, UI_From_Int (V));
5447 -----------------------------
5448 -- Init_Component_Location --
5449 -----------------------------
5451 procedure Init_Component_Location (Id : E) is
5453 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5454 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5455 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5456 Set_Uint12 (Id, Uint_0); -- Esize
5457 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5458 end Init_Component_Location;
5464 procedure Init_Size (Id : E; V : Int) is
5466 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5467 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5470 ---------------------
5471 -- Init_Size_Align --
5472 ---------------------
5474 procedure Init_Size_Align (Id : E) is
5476 Set_Uint12 (Id, Uint_0); -- Esize
5477 Set_Uint13 (Id, Uint_0); -- RM_Size
5478 Set_Uint14 (Id, Uint_0); -- Alignment
5479 end Init_Size_Align;
5481 ----------------------------------------------
5482 -- Type Representation Attribute Predicates --
5483 ----------------------------------------------
5485 function Known_Alignment (E : Entity_Id) return B is
5487 return Uint14 (E) /= Uint_0
5488 and then Uint14 (E) /= No_Uint;
5489 end Known_Alignment;
5491 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5493 return Uint11 (E) /= No_Uint;
5494 end Known_Component_Bit_Offset;
5496 function Known_Component_Size (E : Entity_Id) return B is
5498 return Uint22 (Base_Type (E)) /= Uint_0
5499 and then Uint22 (Base_Type (E)) /= No_Uint;
5500 end Known_Component_Size;
5502 function Known_Esize (E : Entity_Id) return B is
5504 return Uint12 (E) /= Uint_0
5505 and then Uint12 (E) /= No_Uint;
5508 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5510 return Uint8 (E) /= No_Uint;
5511 end Known_Normalized_First_Bit;
5513 function Known_Normalized_Position (E : Entity_Id) return B is
5515 return Uint14 (E) /= No_Uint;
5516 end Known_Normalized_Position;
5518 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5520 return Uint10 (E) /= No_Uint;
5521 end Known_Normalized_Position_Max;
5523 function Known_RM_Size (E : Entity_Id) return B is
5525 return Uint13 (E) /= No_Uint
5526 and then (Uint13 (E) /= Uint_0
5527 or else Is_Discrete_Type (E)
5528 or else Is_Fixed_Point_Type (E));
5531 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5533 return Uint11 (E) /= No_Uint
5534 and then Uint11 (E) >= Uint_0;
5535 end Known_Static_Component_Bit_Offset;
5537 function Known_Static_Component_Size (E : Entity_Id) return B is
5539 return Uint22 (Base_Type (E)) > Uint_0;
5540 end Known_Static_Component_Size;
5542 function Known_Static_Esize (E : Entity_Id) return B is
5544 return Uint12 (E) > Uint_0
5545 and then not Is_Generic_Type (E);
5546 end Known_Static_Esize;
5548 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5550 return Uint8 (E) /= No_Uint
5551 and then Uint8 (E) >= Uint_0;
5552 end Known_Static_Normalized_First_Bit;
5554 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5556 return Uint14 (E) /= No_Uint
5557 and then Uint14 (E) >= Uint_0;
5558 end Known_Static_Normalized_Position;
5560 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5562 return Uint10 (E) /= No_Uint
5563 and then Uint10 (E) >= Uint_0;
5564 end Known_Static_Normalized_Position_Max;
5566 function Known_Static_RM_Size (E : Entity_Id) return B is
5568 return (Uint13 (E) > Uint_0
5569 or else Is_Discrete_Type (E)
5570 or else Is_Fixed_Point_Type (E))
5571 and then not Is_Generic_Type (E);
5572 end Known_Static_RM_Size;
5574 function Unknown_Alignment (E : Entity_Id) return B is
5576 return Uint14 (E) = Uint_0
5577 or else Uint14 (E) = No_Uint;
5578 end Unknown_Alignment;
5580 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5582 return Uint11 (E) = No_Uint;
5583 end Unknown_Component_Bit_Offset;
5585 function Unknown_Component_Size (E : Entity_Id) return B is
5587 return Uint22 (Base_Type (E)) = Uint_0
5589 Uint22 (Base_Type (E)) = No_Uint;
5590 end Unknown_Component_Size;
5592 function Unknown_Esize (E : Entity_Id) return B is
5594 return Uint12 (E) = No_Uint
5596 Uint12 (E) = Uint_0;
5599 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5601 return Uint8 (E) = No_Uint;
5602 end Unknown_Normalized_First_Bit;
5604 function Unknown_Normalized_Position (E : Entity_Id) return B is
5606 return Uint14 (E) = No_Uint;
5607 end Unknown_Normalized_Position;
5609 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5611 return Uint10 (E) = No_Uint;
5612 end Unknown_Normalized_Position_Max;
5614 function Unknown_RM_Size (E : Entity_Id) return B is
5616 return (Uint13 (E) = Uint_0
5617 and then not Is_Discrete_Type (E)
5618 and then not Is_Fixed_Point_Type (E))
5619 or else Uint13 (E) = No_Uint;
5620 end Unknown_RM_Size;
5622 --------------------
5623 -- Address_Clause --
5624 --------------------
5626 function Address_Clause (Id : E) return N is
5628 return Rep_Clause (Id, Name_Address);
5635 function Aft_Value (Id : E) return U is
5637 Delta_Val : Ureal := Delta_Value (Id);
5639 while Delta_Val < Ureal_Tenth loop
5640 Delta_Val := Delta_Val * Ureal_10;
5641 Result := Result + 1;
5644 return UI_From_Int (Result);
5647 ----------------------
5648 -- Alignment_Clause --
5649 ----------------------
5651 function Alignment_Clause (Id : E) return N is
5653 return Rep_Clause (Id, Name_Alignment);
5654 end Alignment_Clause;
5660 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5662 if Last_Entity (V) = Empty then
5663 Set_First_Entity (Id => V, V => Id);
5665 Set_Next_Entity (Last_Entity (V), Id);
5668 Set_Next_Entity (Id, Empty);
5670 Set_Last_Entity (Id => V, V => Id);
5677 function Base_Type (Id : E) return E is
5679 if Is_Base_Type (Id) then
5682 pragma Assert (Is_Type (Id));
5687 -------------------------
5688 -- Component_Alignment --
5689 -------------------------
5691 -- Component Alignment is encoded using two flags, Flag128/129 as
5692 -- follows. Note that both flags False = Align_Default, so that the
5693 -- default initialization of flags to False initializes component
5694 -- alignment to the default value as required.
5696 -- Flag128 Flag129 Value
5697 -- ------- ------- -----
5698 -- False False Calign_Default
5699 -- False True Calign_Component_Size
5700 -- True False Calign_Component_Size_4
5701 -- True True Calign_Storage_Unit
5703 function Component_Alignment (Id : E) return C is
5704 BT : constant Node_Id := Base_Type (Id);
5707 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5709 if Flag128 (BT) then
5710 if Flag129 (BT) then
5711 return Calign_Storage_Unit;
5713 return Calign_Component_Size_4;
5717 if Flag129 (BT) then
5718 return Calign_Component_Size;
5720 return Calign_Default;
5723 end Component_Alignment;
5725 ----------------------
5726 -- Declaration_Node --
5727 ----------------------
5729 function Declaration_Node (Id : E) return N is
5733 if Ekind (Id) = E_Incomplete_Type
5734 and then Present (Full_View (Id))
5736 P := Parent (Full_View (Id));
5742 if Nkind (P) /= N_Selected_Component
5743 and then Nkind (P) /= N_Expanded_Name
5745 not (Nkind (P) = N_Defining_Program_Unit_Name
5746 and then Is_Child_Unit (Id))
5753 end Declaration_Node;
5755 ---------------------
5756 -- Designated_Type --
5757 ---------------------
5759 function Designated_Type (Id : E) return E is
5763 Desig_Type := Directly_Designated_Type (Id);
5765 if Ekind (Desig_Type) = E_Incomplete_Type
5766 and then Present (Full_View (Desig_Type))
5768 return Full_View (Desig_Type);
5770 elsif Is_Class_Wide_Type (Desig_Type)
5771 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5772 and then Present (Full_View (Etype (Desig_Type)))
5773 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5775 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5780 end Designated_Type;
5782 ----------------------
5783 -- Entry_Index_Type --
5784 ----------------------
5786 function Entry_Index_Type (Id : E) return N is
5788 pragma Assert (Ekind (Id) = E_Entry_Family);
5789 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5790 end Entry_Index_Type;
5792 ---------------------
5793 -- First_Component --
5794 ---------------------
5796 function First_Component (Id : E) return E is
5801 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5803 Comp_Id := First_Entity (Id);
5804 while Present (Comp_Id) loop
5805 exit when Ekind (Comp_Id) = E_Component;
5806 Comp_Id := Next_Entity (Comp_Id);
5810 end First_Component;
5812 -------------------------------------
5813 -- First_Component_Or_Discriminant --
5814 -------------------------------------
5816 function First_Component_Or_Discriminant (Id : E) return E is
5821 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5823 Comp_Id := First_Entity (Id);
5824 while Present (Comp_Id) loop
5825 exit when Ekind (Comp_Id) = E_Component
5827 Ekind (Comp_Id) = E_Discriminant;
5828 Comp_Id := Next_Entity (Comp_Id);
5832 end First_Component_Or_Discriminant;
5838 function First_Formal (Id : E) return E is
5843 (Is_Overloadable (Id)
5844 or else Ekind_In (Id, E_Entry_Family,
5846 E_Subprogram_Type));
5848 if Ekind (Id) = E_Enumeration_Literal then
5852 Formal := First_Entity (Id);
5854 if Present (Formal) and then Is_Formal (Formal) then
5862 ------------------------------
5863 -- First_Formal_With_Extras --
5864 ------------------------------
5866 function First_Formal_With_Extras (Id : E) return E is
5871 (Is_Overloadable (Id)
5872 or else Ekind_In (Id, E_Entry_Family,
5874 E_Subprogram_Type));
5876 if Ekind (Id) = E_Enumeration_Literal then
5880 Formal := First_Entity (Id);
5882 if Present (Formal) and then Is_Formal (Formal) then
5885 return Extra_Formals (Id); -- Empty if no extra formals
5888 end First_Formal_With_Extras;
5890 -------------------------------------
5891 -- Get_Attribute_Definition_Clause --
5892 -------------------------------------
5894 function Get_Attribute_Definition_Clause
5896 Id : Attribute_Id) return Node_Id
5901 N := First_Rep_Item (E);
5902 while Present (N) loop
5903 if Nkind (N) = N_Attribute_Definition_Clause
5904 and then Get_Attribute_Id (Chars (N)) = Id
5913 end Get_Attribute_Definition_Clause;
5919 function Get_Full_View (T : Entity_Id) return Entity_Id is
5921 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5922 return Full_View (T);
5924 elsif Is_Class_Wide_Type (T)
5925 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5926 and then Present (Full_View (Root_Type (T)))
5928 return Class_Wide_Type (Full_View (Root_Type (T)));
5935 --------------------------------------
5936 -- Get_Record_Representation_Clause --
5937 --------------------------------------
5939 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5943 N := First_Rep_Item (E);
5944 while Present (N) loop
5945 if Nkind (N) = N_Record_Representation_Clause then
5953 end Get_Record_Representation_Clause;
5955 -----------------------------
5956 -- Get_Rep_Item_For_Entity --
5957 -----------------------------
5959 function Get_Rep_Item_For_Entity
5961 Nam : Name_Id) return Node_Id
5967 N := First_Rep_Item (E);
5968 while Present (N) loop
5969 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5970 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5972 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5976 elsif Nkind (N) = N_Attribute_Definition_Clause
5977 and then Chars (N) = Nam
5978 and then Entity (N) = E
5982 elsif Nkind (N) = N_Aspect_Specification
5983 and then Chars (Identifier (N)) = Nam
5984 and then Entity (N) = E
5993 end Get_Rep_Item_For_Entity;
5995 --------------------
5996 -- Get_Rep_Pragma --
5997 --------------------
5999 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6003 N := First_Rep_Item (E);
6004 while Present (N) loop
6005 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6015 ------------------------
6016 -- Has_Attach_Handler --
6017 ------------------------
6019 function Has_Attach_Handler (Id : E) return B is
6023 pragma Assert (Is_Protected_Type (Id));
6025 Ritem := First_Rep_Item (Id);
6026 while Present (Ritem) loop
6027 if Nkind (Ritem) = N_Pragma
6028 and then Pragma_Name (Ritem) = Name_Attach_Handler
6032 Next_Rep_Item (Ritem);
6037 end Has_Attach_Handler;
6039 -------------------------------------
6040 -- Has_Attribute_Definition_Clause --
6041 -------------------------------------
6043 function Has_Attribute_Definition_Clause
6045 Id : Attribute_Id) return Boolean
6048 return Present (Get_Attribute_Definition_Clause (E, Id));
6049 end Has_Attribute_Definition_Clause;
6055 function Has_Entries (Id : E) return B is
6059 pragma Assert (Is_Concurrent_Type (Id));
6061 Ent := First_Entity (Id);
6062 while Present (Ent) loop
6063 if Is_Entry (Ent) then
6067 Ent := Next_Entity (Ent);
6073 ----------------------------
6074 -- Has_Foreign_Convention --
6075 ----------------------------
6077 function Has_Foreign_Convention (Id : E) return B is
6079 -- While regular Intrinsics such as the Standard operators fit in the
6080 -- "Ada" convention, those with an Interface_Name materialize GCC
6081 -- builtin imports for which Ada special treatments shouldn't apply.
6083 return Convention (Id) in Foreign_Convention
6084 or else (Convention (Id) = Convention_Intrinsic
6085 and then Present (Interface_Name (Id)));
6086 end Has_Foreign_Convention;
6088 ---------------------------
6089 -- Has_Interrupt_Handler --
6090 ---------------------------
6092 function Has_Interrupt_Handler (Id : E) return B is
6096 pragma Assert (Is_Protected_Type (Id));
6098 Ritem := First_Rep_Item (Id);
6099 while Present (Ritem) loop
6100 if Nkind (Ritem) = N_Pragma
6101 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6105 Next_Rep_Item (Ritem);
6110 end Has_Interrupt_Handler;
6112 --------------------------
6113 -- Has_Private_Ancestor --
6114 --------------------------
6116 function Has_Private_Ancestor (Id : E) return B is
6117 R : constant Entity_Id := Root_Type (Id);
6118 T1 : Entity_Id := Id;
6121 if Is_Private_Type (T1) then
6129 end Has_Private_Ancestor;
6131 --------------------
6132 -- Has_Rep_Pragma --
6133 --------------------
6135 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6137 return Present (Get_Rep_Pragma (E, Nam));
6140 --------------------
6141 -- Has_Unmodified --
6142 --------------------
6144 function Has_Unmodified (E : Entity_Id) return Boolean is
6146 if Has_Pragma_Unmodified (E) then
6148 elsif Warnings_Off (E) then
6149 Set_Warnings_Off_Used_Unmodified (E);
6156 ---------------------
6157 -- Has_Unreferenced --
6158 ---------------------
6160 function Has_Unreferenced (E : Entity_Id) return Boolean is
6162 if Has_Pragma_Unreferenced (E) then
6164 elsif Warnings_Off (E) then
6165 Set_Warnings_Off_Used_Unreferenced (E);
6170 end Has_Unreferenced;
6172 ----------------------
6173 -- Has_Warnings_Off --
6174 ----------------------
6176 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6178 if Warnings_Off (E) then
6179 Set_Warnings_Off_Used (E);
6184 end Has_Warnings_Off;
6186 ------------------------------
6187 -- Implementation_Base_Type --
6188 ------------------------------
6190 function Implementation_Base_Type (Id : E) return E is
6195 Bastyp := Base_Type (Id);
6197 if Is_Incomplete_Or_Private_Type (Bastyp) then
6198 Imptyp := Underlying_Type (Bastyp);
6200 -- If we have an implementation type, then just return it,
6201 -- otherwise we return the Base_Type anyway. This can only
6202 -- happen in error situations and should avoid some error bombs.
6204 if Present (Imptyp) then
6205 return Base_Type (Imptyp);
6213 end Implementation_Base_Type;
6215 -------------------------
6216 -- Invariant_Procedure --
6217 -------------------------
6219 function Invariant_Procedure (Id : E) return E is
6223 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6225 if No (Subprograms_For_Type (Id)) then
6229 S := Subprograms_For_Type (Id);
6230 while Present (S) loop
6231 if Has_Invariants (S) then
6234 S := Subprograms_For_Type (S);
6240 end Invariant_Procedure;
6246 -- Global flag table allowing rapid computation of this function
6248 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6249 (E_Enumeration_Subtype |
6251 E_Signed_Integer_Subtype |
6252 E_Modular_Integer_Subtype |
6253 E_Floating_Point_Subtype |
6254 E_Ordinary_Fixed_Point_Subtype |
6255 E_Decimal_Fixed_Point_Subtype |
6260 E_Record_Subtype_With_Private |
6261 E_Limited_Private_Subtype |
6263 E_Protected_Subtype |
6265 E_String_Literal_Subtype |
6266 E_Class_Wide_Subtype => False,
6269 function Is_Base_Type (Id : E) return Boolean is
6271 return Entity_Is_Base_Type (Ekind (Id));
6274 ---------------------
6275 -- Is_Boolean_Type --
6276 ---------------------
6278 function Is_Boolean_Type (Id : E) return B is
6280 return Root_Type (Id) = Standard_Boolean;
6281 end Is_Boolean_Type;
6283 ------------------------
6284 -- Is_Constant_Object --
6285 ------------------------
6287 function Is_Constant_Object (Id : E) return B is
6288 K : constant Entity_Kind := Ekind (Id);
6291 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6292 end Is_Constant_Object;
6294 --------------------
6295 -- Is_Discriminal --
6296 --------------------
6298 function Is_Discriminal (Id : E) return B is
6300 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6301 and then Present (Discriminal_Link (Id)));
6304 ----------------------
6305 -- Is_Dynamic_Scope --
6306 ----------------------
6308 function Is_Dynamic_Scope (Id : E) return B is
6311 Ekind (Id) = E_Block
6313 Ekind (Id) = E_Function
6315 Ekind (Id) = E_Procedure
6317 Ekind (Id) = E_Subprogram_Body
6319 Ekind (Id) = E_Task_Type
6321 (Ekind (Id) = E_Limited_Private_Type
6322 and then Present (Full_View (Id))
6323 and then Ekind (Full_View (Id)) = E_Task_Type)
6325 Ekind (Id) = E_Entry
6327 Ekind (Id) = E_Entry_Family
6329 Ekind (Id) = E_Return_Statement;
6330 end Is_Dynamic_Scope;
6332 --------------------
6333 -- Is_Entity_Name --
6334 --------------------
6336 function Is_Entity_Name (N : Node_Id) return Boolean is
6337 Kind : constant Node_Kind := Nkind (N);
6340 -- Identifiers, operator symbols, expanded names are entity names
6342 return Kind = N_Identifier
6343 or else Kind = N_Operator_Symbol
6344 or else Kind = N_Expanded_Name
6346 -- Attribute references are entity names if they refer to an entity.
6347 -- Note that we don't do this by testing for the presence of the
6348 -- Entity field in the N_Attribute_Reference node, since it may not
6349 -- have been set yet.
6351 or else (Kind = N_Attribute_Reference
6352 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6359 function Is_Finalizer (Id : E) return B is
6361 return Ekind (Id) = E_Procedure
6362 and then Chars (Id) = Name_uFinalizer;
6365 -----------------------------------
6366 -- Is_Package_Or_Generic_Package --
6367 -----------------------------------
6369 function Is_Package_Or_Generic_Package (Id : E) return B is
6372 Ekind (Id) = E_Package
6374 Ekind (Id) = E_Generic_Package;
6375 end Is_Package_Or_Generic_Package;
6377 ------------------------
6378 -- Predicate_Function --
6379 ------------------------
6381 function Predicate_Function (Id : E) return E is
6385 pragma Assert (Is_Type (Id));
6387 if No (Subprograms_For_Type (Id)) then
6391 S := Subprograms_For_Type (Id);
6392 while Present (S) loop
6393 if Has_Predicates (S) then
6396 S := Subprograms_For_Type (S);
6402 end Predicate_Function;
6408 function Is_Prival (Id : E) return B is
6410 return (Ekind_In (Id, E_Constant, E_Variable)
6411 and then Present (Prival_Link (Id)));
6414 ----------------------------
6415 -- Is_Protected_Component --
6416 ----------------------------
6418 function Is_Protected_Component (Id : E) return B is
6420 return Ekind (Id) = E_Component
6421 and then Is_Protected_Type (Scope (Id));
6422 end Is_Protected_Component;
6424 ----------------------------
6425 -- Is_Protected_Interface --
6426 ----------------------------
6428 function Is_Protected_Interface (Id : E) return B is
6429 Typ : constant Entity_Id := Base_Type (Id);
6431 if not Is_Interface (Typ) then
6433 elsif Is_Class_Wide_Type (Typ) then
6434 return Is_Protected_Interface (Etype (Typ));
6436 return Protected_Present (Type_Definition (Parent (Typ)));
6438 end Is_Protected_Interface;
6440 ------------------------------
6441 -- Is_Protected_Record_Type --
6442 ------------------------------
6444 function Is_Protected_Record_Type (Id : E) return B is
6447 Is_Concurrent_Record_Type (Id)
6448 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6449 end Is_Protected_Record_Type;
6451 --------------------------------
6452 -- Is_Standard_Character_Type --
6453 --------------------------------
6455 function Is_Standard_Character_Type (Id : E) return B is
6457 if Is_Type (Id) then
6459 R : constant Entity_Id := Root_Type (Id);
6462 R = Standard_Character
6464 R = Standard_Wide_Character
6466 R = Standard_Wide_Wide_Character;
6472 end Is_Standard_Character_Type;
6474 --------------------
6475 -- Is_String_Type --
6476 --------------------
6478 function Is_String_Type (Id : E) return B is
6480 return Ekind (Id) in String_Kind
6481 or else (Is_Array_Type (Id)
6482 and then Id /= Any_Composite
6483 and then Number_Dimensions (Id) = 1
6484 and then Is_Character_Type (Component_Type (Id)));
6487 -------------------------------
6488 -- Is_Synchronized_Interface --
6489 -------------------------------
6491 function Is_Synchronized_Interface (Id : E) return B is
6492 Typ : constant Entity_Id := Base_Type (Id);
6495 if not Is_Interface (Typ) then
6498 elsif Is_Class_Wide_Type (Typ) then
6499 return Is_Synchronized_Interface (Etype (Typ));
6502 return Protected_Present (Type_Definition (Parent (Typ)))
6503 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6504 or else Task_Present (Type_Definition (Parent (Typ)));
6506 end Is_Synchronized_Interface;
6508 -----------------------
6509 -- Is_Task_Interface --
6510 -----------------------
6512 function Is_Task_Interface (Id : E) return B is
6513 Typ : constant Entity_Id := Base_Type (Id);
6515 if not Is_Interface (Typ) then
6517 elsif Is_Class_Wide_Type (Typ) then
6518 return Is_Task_Interface (Etype (Typ));
6520 return Task_Present (Type_Definition (Parent (Typ)));
6522 end Is_Task_Interface;
6524 -------------------------
6525 -- Is_Task_Record_Type --
6526 -------------------------
6528 function Is_Task_Record_Type (Id : E) return B is
6531 Is_Concurrent_Record_Type (Id)
6532 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6533 end Is_Task_Record_Type;
6535 ------------------------
6536 -- Is_Wrapper_Package --
6537 ------------------------
6539 function Is_Wrapper_Package (Id : E) return B is
6541 return (Ekind (Id) = E_Package
6542 and then Present (Related_Instance (Id)));
6543 end Is_Wrapper_Package;
6549 function Last_Formal (Id : E) return E is
6554 (Is_Overloadable (Id)
6555 or else Ekind_In (Id, E_Entry_Family,
6557 E_Subprogram_Type));
6559 if Ekind (Id) = E_Enumeration_Literal then
6563 Formal := First_Formal (Id);
6565 if Present (Formal) then
6566 while Present (Next_Formal (Formal)) loop
6567 Formal := Next_Formal (Formal);
6575 function Model_Emin_Value (Id : E) return Uint is
6577 return Machine_Emin_Value (Id);
6578 end Model_Emin_Value;
6580 -------------------------
6581 -- Model_Epsilon_Value --
6582 -------------------------
6584 function Model_Epsilon_Value (Id : E) return Ureal is
6585 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6587 return Radix ** (1 - Model_Mantissa_Value (Id));
6588 end Model_Epsilon_Value;
6590 --------------------------
6591 -- Model_Mantissa_Value --
6592 --------------------------
6594 function Model_Mantissa_Value (Id : E) return Uint is
6596 return Machine_Mantissa_Value (Id);
6597 end Model_Mantissa_Value;
6599 -----------------------
6600 -- Model_Small_Value --
6601 -----------------------
6603 function Model_Small_Value (Id : E) return Ureal is
6604 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6606 return Radix ** (Model_Emin_Value (Id) - 1);
6607 end Model_Small_Value;
6609 ------------------------
6610 -- Machine_Emax_Value --
6611 ------------------------
6613 function Machine_Emax_Value (Id : E) return Uint is
6614 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6617 case Float_Rep (Id) is
6620 when 1 .. 6 => return Uint_128;
6621 when 7 .. 15 => return 2**10;
6622 when 16 .. 33 => return 2**14;
6623 when others => return No_Uint;
6628 when 1 .. 9 => return 2**7 - 1;
6629 when 10 .. 15 => return 2**10 - 1;
6630 when others => return No_Uint;
6634 return Uint_2 ** Uint_7 - Uint_1;
6636 end Machine_Emax_Value;
6638 ------------------------
6639 -- Machine_Emin_Value --
6640 ------------------------
6642 function Machine_Emin_Value (Id : E) return Uint is
6644 case Float_Rep (Id) is
6645 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6646 when VAX_Native => return -Machine_Emax_Value (Id);
6647 when AAMP => return -Machine_Emax_Value (Id);
6649 end Machine_Emin_Value;
6651 ----------------------------
6652 -- Machine_Mantissa_Value --
6653 ----------------------------
6655 function Machine_Mantissa_Value (Id : E) return Uint is
6656 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6659 case Float_Rep (Id) is
6662 when 1 .. 6 => return Uint_24;
6663 when 7 .. 15 => return UI_From_Int (53);
6664 when 16 .. 18 => return Uint_64;
6665 when 19 .. 33 => return UI_From_Int (113);
6666 when others => return No_Uint;
6671 when 1 .. 6 => return Uint_24;
6672 when 7 .. 9 => return UI_From_Int (56);
6673 when 10 .. 15 => return UI_From_Int (53);
6674 when others => return No_Uint;
6679 when 1 .. 6 => return Uint_24;
6680 when 7 .. 9 => return UI_From_Int (40);
6681 when others => return No_Uint;
6684 end Machine_Mantissa_Value;
6686 -------------------------
6687 -- Machine_Radix_Value --
6688 -------------------------
6690 function Machine_Radix_Value (Id : E) return U is
6692 case Float_Rep (Id) is
6693 when IEEE_Binary | VAX_Native | AAMP =>
6696 end Machine_Radix_Value;
6698 --------------------
6699 -- Next_Component --
6700 --------------------
6702 function Next_Component (Id : E) return E is
6706 Comp_Id := Next_Entity (Id);
6707 while Present (Comp_Id) loop
6708 exit when Ekind (Comp_Id) = E_Component;
6709 Comp_Id := Next_Entity (Comp_Id);
6715 ------------------------------------
6716 -- Next_Component_Or_Discriminant --
6717 ------------------------------------
6719 function Next_Component_Or_Discriminant (Id : E) return E is
6723 Comp_Id := Next_Entity (Id);
6724 while Present (Comp_Id) loop
6725 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6726 Comp_Id := Next_Entity (Comp_Id);
6730 end Next_Component_Or_Discriminant;
6732 -----------------------
6733 -- Next_Discriminant --
6734 -----------------------
6736 -- This function actually implements both Next_Discriminant and
6737 -- Next_Stored_Discriminant by making sure that the Discriminant
6738 -- returned is of the same variety as Id.
6740 function Next_Discriminant (Id : E) return E is
6742 -- Derived Tagged types with private extensions look like this...
6744 -- E_Discriminant d1
6745 -- E_Discriminant d2
6747 -- E_Discriminant d1
6748 -- E_Discriminant d2
6751 -- so it is critical not to go past the leading discriminants
6756 pragma Assert (Ekind (Id) = E_Discriminant);
6759 D := Next_Entity (D);
6761 or else (Ekind (D) /= E_Discriminant
6762 and then not Is_Itype (D))
6767 exit when Ekind (D) = E_Discriminant
6768 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6772 end Next_Discriminant;
6778 function Next_Formal (Id : E) return E is
6782 -- Follow the chain of declared entities as long as the kind of the
6783 -- entity corresponds to a formal parameter. Skip internal entities
6784 -- that may have been created for implicit subtypes, in the process
6785 -- of analyzing default expressions.
6789 P := Next_Entity (P);
6791 if No (P) or else Is_Formal (P) then
6793 elsif not Is_Internal (P) then
6799 -----------------------------
6800 -- Next_Formal_With_Extras --
6801 -----------------------------
6803 function Next_Formal_With_Extras (Id : E) return E is
6805 if Present (Extra_Formal (Id)) then
6806 return Extra_Formal (Id);
6808 return Next_Formal (Id);
6810 end Next_Formal_With_Extras;
6816 function Next_Index (Id : Node_Id) return Node_Id is
6825 function Next_Literal (Id : E) return E is
6827 pragma Assert (Nkind (Id) in N_Entity);
6831 ------------------------------
6832 -- Next_Stored_Discriminant --
6833 ------------------------------
6835 function Next_Stored_Discriminant (Id : E) return E is
6837 -- See comment in Next_Discriminant
6839 return Next_Discriminant (Id);
6840 end Next_Stored_Discriminant;
6842 -----------------------
6843 -- Number_Dimensions --
6844 -----------------------
6846 function Number_Dimensions (Id : E) return Pos is
6851 if Ekind (Id) in String_Kind then
6856 T := First_Index (Id);
6857 while Present (T) loop
6864 end Number_Dimensions;
6866 --------------------
6867 -- Number_Entries --
6868 --------------------
6870 function Number_Entries (Id : E) return Nat is
6875 pragma Assert (Is_Concurrent_Type (Id));
6878 Ent := First_Entity (Id);
6879 while Present (Ent) loop
6880 if Is_Entry (Ent) then
6884 Ent := Next_Entity (Ent);
6890 --------------------
6891 -- Number_Formals --
6892 --------------------
6894 function Number_Formals (Id : E) return Pos is
6900 Formal := First_Formal (Id);
6901 while Present (Formal) loop
6903 Formal := Next_Formal (Formal);
6909 --------------------
6910 -- Parameter_Mode --
6911 --------------------
6913 function Parameter_Mode (Id : E) return Formal_Kind is
6918 --------------------------
6919 -- Primitive_Operations --
6920 --------------------------
6922 function Primitive_Operations (Id : E) return L is
6924 if Is_Concurrent_Type (Id) then
6925 if Present (Corresponding_Record_Type (Id)) then
6926 return Direct_Primitive_Operations
6927 (Corresponding_Record_Type (Id));
6932 return Direct_Primitive_Operations (Id);
6934 end Primitive_Operations;
6936 ---------------------
6937 -- Record_Rep_Item --
6938 ---------------------
6940 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6942 Set_Next_Rep_Item (N, First_Rep_Item (E));
6943 Set_First_Rep_Item (E, N);
6944 end Record_Rep_Item;
6950 function Root_Type (Id : E) return E is
6954 pragma Assert (Nkind (Id) in N_Entity);
6956 T := Base_Type (Id);
6958 if Ekind (T) = E_Class_Wide_Type then
6961 elsif Ekind (T) = E_Class_Wide_Subtype then
6962 return Etype (Base_Type (T));
6964 -- ??? T comes from Base_Type, how can it be a subtype?
6965 -- Also Base_Type is supposed to be idempotent, so either way
6966 -- this is equivalent to "return Etype (T)" and should be merged
6967 -- with the E_Class_Wide_Type case.
6978 -- Following test catches some error cases resulting from
6981 elsif No (Etyp) then
6984 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6987 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6993 -- Return if there is a circularity in the inheritance chain. This
6994 -- happens in some error situations and we do not want to get
6995 -- stuck in this loop.
6997 if T = Base_Type (Id) then
7004 ---------------------
7005 -- Safe_Emax_Value --
7006 ---------------------
7008 function Safe_Emax_Value (Id : E) return Uint is
7010 return Machine_Emax_Value (Id);
7011 end Safe_Emax_Value;
7013 ----------------------
7014 -- Safe_First_Value --
7015 ----------------------
7017 function Safe_First_Value (Id : E) return Ureal is
7019 return -Safe_Last_Value (Id);
7020 end Safe_First_Value;
7022 ---------------------
7023 -- Safe_Last_Value --
7024 ---------------------
7026 function Safe_Last_Value (Id : E) return Ureal is
7027 Radix : constant Uint := Machine_Radix_Value (Id);
7028 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7029 Emax : constant Uint := Safe_Emax_Value (Id);
7030 Significand : constant Uint := Radix ** Mantissa - 1;
7031 Exponent : constant Uint := Emax - Mantissa;
7037 (Num => Significand * 2 ** (Exponent mod 4),
7038 Den => -Exponent / 4,
7044 (Num => Significand,
7048 end Safe_Last_Value;
7054 function Scope_Depth (Id : E) return Uint is
7059 while Is_Record_Type (Scop) loop
7060 Scop := Scope (Scop);
7063 return Scope_Depth_Value (Scop);
7066 ---------------------
7067 -- Scope_Depth_Set --
7068 ---------------------
7070 function Scope_Depth_Set (Id : E) return B is
7072 return not Is_Record_Type (Id)
7073 and then Field22 (Id) /= Union_Id (Empty);
7074 end Scope_Depth_Set;
7076 -----------------------------
7077 -- Set_Component_Alignment --
7078 -----------------------------
7080 -- Component Alignment is encoded using two flags, Flag128/129 as
7081 -- follows. Note that both flags False = Align_Default, so that the
7082 -- default initialization of flags to False initializes component
7083 -- alignment to the default value as required.
7085 -- Flag128 Flag129 Value
7086 -- ------- ------- -----
7087 -- False False Calign_Default
7088 -- False True Calign_Component_Size
7089 -- True False Calign_Component_Size_4
7090 -- True True Calign_Storage_Unit
7092 procedure Set_Component_Alignment (Id : E; V : C) is
7094 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7095 and then Is_Base_Type (Id));
7098 when Calign_Default =>
7099 Set_Flag128 (Id, False);
7100 Set_Flag129 (Id, False);
7102 when Calign_Component_Size =>
7103 Set_Flag128 (Id, False);
7104 Set_Flag129 (Id, True);
7106 when Calign_Component_Size_4 =>
7107 Set_Flag128 (Id, True);
7108 Set_Flag129 (Id, False);
7110 when Calign_Storage_Unit =>
7111 Set_Flag128 (Id, True);
7112 Set_Flag129 (Id, True);
7114 end Set_Component_Alignment;
7116 -----------------------------
7117 -- Set_Invariant_Procedure --
7118 -----------------------------
7120 procedure Set_Invariant_Procedure (Id : E; V : E) is
7124 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7126 S := Subprograms_For_Type (Id);
7127 Set_Subprograms_For_Type (Id, V);
7129 while Present (S) loop
7130 if Has_Invariants (S) then
7131 raise Program_Error;
7133 S := Subprograms_For_Type (S);
7137 Set_Subprograms_For_Type (Id, V);
7138 end Set_Invariant_Procedure;
7140 ----------------------------
7141 -- Set_Predicate_Function --
7142 ----------------------------
7144 procedure Set_Predicate_Function (Id : E; V : E) is
7148 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7150 S := Subprograms_For_Type (Id);
7151 Set_Subprograms_For_Type (Id, V);
7153 while Present (S) loop
7154 if Has_Predicates (S) then
7155 raise Program_Error;
7157 S := Subprograms_For_Type (S);
7161 Set_Subprograms_For_Type (Id, V);
7162 end Set_Predicate_Function;
7168 function Size_Clause (Id : E) return N is
7170 return Rep_Clause (Id, Name_Size);
7173 ------------------------
7174 -- Stream_Size_Clause --
7175 ------------------------
7177 function Stream_Size_Clause (Id : E) return N is
7179 return Rep_Clause (Id, Name_Stream_Size);
7180 end Stream_Size_Clause;
7186 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7192 Kind := E_Access_Subtype;
7196 Kind := E_Array_Subtype;
7198 when E_Class_Wide_Type |
7199 E_Class_Wide_Subtype =>
7200 Kind := E_Class_Wide_Subtype;
7202 when E_Decimal_Fixed_Point_Type |
7203 E_Decimal_Fixed_Point_Subtype =>
7204 Kind := E_Decimal_Fixed_Point_Subtype;
7206 when E_Ordinary_Fixed_Point_Type |
7207 E_Ordinary_Fixed_Point_Subtype =>
7208 Kind := E_Ordinary_Fixed_Point_Subtype;
7210 when E_Private_Type |
7211 E_Private_Subtype =>
7212 Kind := E_Private_Subtype;
7214 when E_Limited_Private_Type |
7215 E_Limited_Private_Subtype =>
7216 Kind := E_Limited_Private_Subtype;
7218 when E_Record_Type_With_Private |
7219 E_Record_Subtype_With_Private =>
7220 Kind := E_Record_Subtype_With_Private;
7222 when E_Record_Type |
7224 Kind := E_Record_Subtype;
7226 when E_String_Type |
7228 Kind := E_String_Subtype;
7230 when Enumeration_Kind =>
7231 Kind := E_Enumeration_Subtype;
7234 Kind := E_Floating_Point_Subtype;
7236 when Signed_Integer_Kind =>
7237 Kind := E_Signed_Integer_Subtype;
7239 when Modular_Integer_Kind =>
7240 Kind := E_Modular_Integer_Subtype;
7242 when Protected_Kind =>
7243 Kind := E_Protected_Subtype;
7246 Kind := E_Task_Subtype;
7250 raise Program_Error;
7256 ---------------------
7257 -- Type_High_Bound --
7258 ---------------------
7260 function Type_High_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 High_Bound (Range_Expression (Constraint (Rng)));
7266 return High_Bound (Rng);
7268 end Type_High_Bound;
7270 --------------------
7271 -- Type_Low_Bound --
7272 --------------------
7274 function Type_Low_Bound (Id : E) return Node_Id is
7275 Rng : constant Node_Id := Scalar_Range (Id);
7277 if Nkind (Rng) = N_Subtype_Indication then
7278 return Low_Bound (Range_Expression (Constraint (Rng)));
7280 return Low_Bound (Rng);
7284 ---------------------
7285 -- Underlying_Type --
7286 ---------------------
7288 function Underlying_Type (Id : E) return E is
7290 -- For record_with_private the underlying type is always the direct
7291 -- full view. Never try to take the full view of the parent it
7292 -- doesn't make sense.
7294 if Ekind (Id) = E_Record_Type_With_Private then
7295 return Full_View (Id);
7297 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7299 -- If we have an incomplete or private type with a full view,
7300 -- then we return the Underlying_Type of this full view
7302 if Present (Full_View (Id)) then
7303 if Id = Full_View (Id) then
7305 -- Previous error in declaration
7310 return Underlying_Type (Full_View (Id));
7313 -- If we have an incomplete entity that comes from the limited
7314 -- view then we return the Underlying_Type of its non-limited
7317 elsif From_With_Type (Id)
7318 and then Present (Non_Limited_View (Id))
7320 return Underlying_Type (Non_Limited_View (Id));
7322 -- Otherwise check for the case where we have a derived type or
7323 -- subtype, and if so get the Underlying_Type of the parent type.
7325 elsif Etype (Id) /= Id then
7326 return Underlying_Type (Etype (Id));
7328 -- Otherwise we have an incomplete or private type that has
7329 -- no full view, which means that we have not encountered the
7330 -- completion, so return Empty to indicate the underlying type
7331 -- is not yet known.
7337 -- For non-incomplete, non-private types, return the type itself
7338 -- Also for entities that are not types at all return the entity
7344 end Underlying_Type;
7350 function Vax_Float (Id : E) return B is
7352 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7355 ------------------------
7356 -- Write_Entity_Flags --
7357 ------------------------
7359 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7361 procedure W (Flag_Name : String; Flag : Boolean);
7362 -- Write out given flag if it is set
7368 procedure W (Flag_Name : String; Flag : Boolean) is
7372 Write_Str (Flag_Name);
7373 Write_Str (" = True");
7378 -- Start of processing for Write_Entity_Flags
7381 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7382 and then Is_Base_Type (Id)
7385 Write_Str ("Component_Alignment = ");
7387 case Component_Alignment (Id) is
7388 when Calign_Default =>
7389 Write_Str ("Calign_Default");
7391 when Calign_Component_Size =>
7392 Write_Str ("Calign_Component_Size");
7394 when Calign_Component_Size_4 =>
7395 Write_Str ("Calign_Component_Size_4");
7397 when Calign_Storage_Unit =>
7398 Write_Str ("Calign_Storage_Unit");
7404 W ("Address_Taken", Flag104 (Id));
7405 W ("Body_Is_In_ALFA", Flag251 (Id));
7406 W ("Body_Needed_For_SAL", Flag40 (Id));
7407 W ("C_Pass_By_Copy", Flag125 (Id));
7408 W ("Can_Never_Be_Null", Flag38 (Id));
7409 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7410 W ("Debug_Info_Off", Flag166 (Id));
7411 W ("Default_Expressions_Processed", Flag108 (Id));
7412 W ("Delay_Cleanups", Flag114 (Id));
7413 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7414 W ("Depends_On_Private", Flag14 (Id));
7415 W ("Discard_Names", Flag88 (Id));
7416 W ("Elaboration_Entity_Required", Flag174 (Id));
7417 W ("Elaborate_Body_Desirable", Flag210 (Id));
7418 W ("Entry_Accepted", Flag152 (Id));
7419 W ("Can_Use_Internal_Rep", Flag229 (Id));
7420 W ("Finalize_Storage_Only", Flag158 (Id));
7421 W ("From_With_Type", Flag159 (Id));
7422 W ("Has_Aliased_Components", Flag135 (Id));
7423 W ("Has_Alignment_Clause", Flag46 (Id));
7424 W ("Has_All_Calls_Remote", Flag79 (Id));
7425 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7426 W ("Has_Atomic_Components", Flag86 (Id));
7427 W ("Has_Biased_Representation", Flag139 (Id));
7428 W ("Has_Completion", Flag26 (Id));
7429 W ("Has_Completion_In_Body", Flag71 (Id));
7430 W ("Has_Complex_Representation", Flag140 (Id));
7431 W ("Has_Component_Size_Clause", Flag68 (Id));
7432 W ("Has_Contiguous_Rep", Flag181 (Id));
7433 W ("Has_Controlled_Component", Flag43 (Id));
7434 W ("Has_Controlling_Result", Flag98 (Id));
7435 W ("Has_Convention_Pragma", Flag119 (Id));
7436 W ("Has_Default_Aspect", Flag39 (Id));
7437 W ("Has_Delayed_Aspects", Flag200 (Id));
7438 W ("Has_Delayed_Freeze", Flag18 (Id));
7439 W ("Has_Discriminants", Flag5 (Id));
7440 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7441 W ("Has_Exit", Flag47 (Id));
7442 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7443 W ("Has_Forward_Instantiation", Flag175 (Id));
7444 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7445 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7446 W ("Has_Homonym", Flag56 (Id));
7447 W ("Has_Inheritable_Invariants", Flag248 (Id));
7448 W ("Has_Initial_Value", Flag219 (Id));
7449 W ("Has_Invariants", Flag232 (Id));
7450 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7451 W ("Has_Master_Entity", Flag21 (Id));
7452 W ("Has_Missing_Return", Flag142 (Id));
7453 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7454 W ("Has_Non_Standard_Rep", Flag75 (Id));
7455 W ("Has_Object_Size_Clause", Flag172 (Id));
7456 W ("Has_Per_Object_Constraint", Flag154 (Id));
7457 W ("Has_Persistent_BSS", Flag188 (Id));
7458 W ("Has_Postconditions", Flag240 (Id));
7459 W ("Has_Pragma_Controlled", Flag27 (Id));
7460 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7461 W ("Has_Pragma_Inline", Flag157 (Id));
7462 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7463 W ("Has_Pragma_Ordered", Flag198 (Id));
7464 W ("Has_Pragma_Pack", Flag121 (Id));
7465 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7466 W ("Has_Pragma_Pure", Flag203 (Id));
7467 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7468 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7469 W ("Has_Pragma_Unmodified", Flag233 (Id));
7470 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7471 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7472 W ("Has_Predicates", Flag250 (Id));
7473 W ("Has_Primitive_Operations", Flag120 (Id));
7474 W ("Has_Private_Declaration", Flag155 (Id));
7475 W ("Has_Qualified_Name", Flag161 (Id));
7476 W ("Has_RACW", Flag214 (Id));
7477 W ("Has_Record_Rep_Clause", Flag65 (Id));
7478 W ("Has_Recursive_Call", Flag143 (Id));
7479 W ("Has_Size_Clause", Flag29 (Id));
7480 W ("Has_Small_Clause", Flag67 (Id));
7481 W ("Has_Specified_Layout", Flag100 (Id));
7482 W ("Has_Specified_Stream_Input", Flag190 (Id));
7483 W ("Has_Specified_Stream_Output", Flag191 (Id));
7484 W ("Has_Specified_Stream_Read", Flag192 (Id));
7485 W ("Has_Specified_Stream_Write", Flag193 (Id));
7486 W ("Has_Static_Discriminants", Flag211 (Id));
7487 W ("Has_Storage_Size_Clause", Flag23 (Id));
7488 W ("Has_Stream_Size_Clause", Flag184 (Id));
7489 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7490 W ("Has_Task", Flag30 (Id));
7491 W ("Has_Thunks", Flag228 (Id));
7492 W ("Has_Unchecked_Union", Flag123 (Id));
7493 W ("Has_Unknown_Discriminants", Flag72 (Id));
7494 W ("Has_Up_Level_Access", Flag215 (Id));
7495 W ("Has_Volatile_Components", Flag87 (Id));
7496 W ("Has_Xref_Entry", Flag182 (Id));
7497 W ("In_Package_Body", Flag48 (Id));
7498 W ("In_Private_Part", Flag45 (Id));
7499 W ("In_Use", Flag8 (Id));
7500 W ("Is_AST_Entry", Flag132 (Id));
7501 W ("Is_Abstract_Subprogram", Flag19 (Id));
7502 W ("Is_Abstract_Type", Flag146 (Id));
7503 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7504 W ("Is_Access_Constant", Flag69 (Id));
7505 W ("Is_Ada_2005_Only", Flag185 (Id));
7506 W ("Is_Ada_2012_Only", Flag199 (Id));
7507 W ("Is_Aliased", Flag15 (Id));
7508 W ("Is_Asynchronous", Flag81 (Id));
7509 W ("Is_Atomic", Flag85 (Id));
7510 W ("Is_Bit_Packed_Array", Flag122 (Id));
7511 W ("Is_CPP_Class", Flag74 (Id));
7512 W ("Is_Called", Flag102 (Id));
7513 W ("Is_Character_Type", Flag63 (Id));
7514 W ("Is_Child_Unit", Flag73 (Id));
7515 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7516 W ("Is_Compilation_Unit", Flag149 (Id));
7517 W ("Is_Completely_Hidden", Flag103 (Id));
7518 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7519 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7520 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7521 W ("Is_Constrained", Flag12 (Id));
7522 W ("Is_Constructor", Flag76 (Id));
7523 W ("Is_Controlled", Flag42 (Id));
7524 W ("Is_Controlling_Formal", Flag97 (Id));
7525 W ("Is_Descendent_Of_Address", Flag223 (Id));
7526 W ("Is_Discrim_SO_Function", Flag176 (Id));
7527 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7528 W ("Is_Dispatching_Operation", Flag6 (Id));
7529 W ("Is_Eliminated", Flag124 (Id));
7530 W ("Is_Entry_Formal", Flag52 (Id));
7531 W ("Is_Exported", Flag99 (Id));
7532 W ("Is_First_Subtype", Flag70 (Id));
7533 W ("Is_For_Access_Subtype", Flag118 (Id));
7534 W ("Is_Formal_Subprogram", Flag111 (Id));
7535 W ("Is_Frozen", Flag4 (Id));
7536 W ("Is_Generic_Actual_Type", Flag94 (Id));
7537 W ("Is_Generic_Instance", Flag130 (Id));
7538 W ("Is_Generic_Type", Flag13 (Id));
7539 W ("Is_Hidden", Flag57 (Id));
7540 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7541 W ("Is_Immediately_Visible", Flag7 (Id));
7542 W ("Is_Imported", Flag24 (Id));
7543 W ("Is_In_ALFA", Flag151 (Id));
7544 W ("Is_Inlined", Flag11 (Id));
7545 W ("Is_Instantiated", Flag126 (Id));
7546 W ("Is_Interface", Flag186 (Id));
7547 W ("Is_Internal", Flag17 (Id));
7548 W ("Is_Interrupt_Handler", Flag89 (Id));
7549 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7550 W ("Is_Itype", Flag91 (Id));
7551 W ("Is_Known_Non_Null", Flag37 (Id));
7552 W ("Is_Known_Null", Flag204 (Id));
7553 W ("Is_Known_Valid", Flag170 (Id));
7554 W ("Is_Limited_Composite", Flag106 (Id));
7555 W ("Is_Limited_Interface", Flag197 (Id));
7556 W ("Is_Limited_Record", Flag25 (Id));
7557 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7558 W ("Is_Non_Static_Subtype", Flag109 (Id));
7559 W ("Is_Null_Init_Proc", Flag178 (Id));
7560 W ("Is_Obsolescent", Flag153 (Id));
7561 W ("Is_Only_Out_Parameter", Flag226 (Id));
7562 W ("Is_Optional_Parameter", Flag134 (Id));
7563 W ("Is_Package_Body_Entity", Flag160 (Id));
7564 W ("Is_Packed", Flag51 (Id));
7565 W ("Is_Packed_Array_Type", Flag138 (Id));
7566 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7567 W ("Is_Preelaborated", Flag59 (Id));
7568 W ("Is_Primitive", Flag218 (Id));
7569 W ("Is_Primitive_Wrapper", Flag195 (Id));
7570 W ("Is_Private_Composite", Flag107 (Id));
7571 W ("Is_Private_Descendant", Flag53 (Id));
7572 W ("Is_Private_Primitive", Flag245 (Id));
7573 W ("Is_Processed_Transient", Flag252 (Id));
7574 W ("Is_Public", Flag10 (Id));
7575 W ("Is_Pure", Flag44 (Id));
7576 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7577 W ("Is_RACW_Stub_Type", Flag244 (Id));
7578 W ("Is_Raised", Flag224 (Id));
7579 W ("Is_Remote_Call_Interface", Flag62 (Id));
7580 W ("Is_Remote_Types", Flag61 (Id));
7581 W ("Is_Renaming_Of_Object", Flag112 (Id));
7582 W ("Is_Return_Object", Flag209 (Id));
7583 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7584 W ("Is_Shared_Passive", Flag60 (Id));
7585 W ("Is_Statically_Allocated", Flag28 (Id));
7586 W ("Is_Tag", Flag78 (Id));
7587 W ("Is_Tagged_Type", Flag55 (Id));
7588 W ("Is_Thunk", Flag225 (Id));
7589 W ("Is_Trivial_Subprogram", Flag235 (Id));
7590 W ("Is_True_Constant", Flag163 (Id));
7591 W ("Is_Unchecked_Union", Flag117 (Id));
7592 W ("Is_Underlying_Record_View", Flag246 (Id));
7593 W ("Is_Unsigned_Type", Flag144 (Id));
7594 W ("Is_VMS_Exception", Flag133 (Id));
7595 W ("Is_Valued_Procedure", Flag127 (Id));
7596 W ("Is_Visible_Child_Unit", Flag116 (Id));
7597 W ("Is_Visible_Formal", Flag206 (Id));
7598 W ("Is_Volatile", Flag16 (Id));
7599 W ("Itype_Printed", Flag202 (Id));
7600 W ("Kill_Elaboration_Checks", Flag32 (Id));
7601 W ("Kill_Range_Checks", Flag33 (Id));
7602 W ("Kill_Tag_Checks", Flag34 (Id));
7603 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7604 W ("Low_Bound_Tested", Flag205 (Id));
7605 W ("Machine_Radix_10", Flag84 (Id));
7606 W ("Materialize_Entity", Flag168 (Id));
7607 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7608 W ("Must_Have_Preelab_Init", Flag208 (Id));
7609 W ("Needs_Debug_Info", Flag147 (Id));
7610 W ("Needs_No_Actuals", Flag22 (Id));
7611 W ("Never_Set_In_Source", Flag115 (Id));
7612 W ("No_Pool_Assigned", Flag131 (Id));
7613 W ("No_Return", Flag113 (Id));
7614 W ("No_Strict_Aliasing", Flag136 (Id));
7615 W ("Non_Binary_Modulus", Flag58 (Id));
7616 W ("Nonzero_Is_True", Flag162 (Id));
7617 W ("OK_To_Rename", Flag247 (Id));
7618 W ("OK_To_Reorder_Components", Flag239 (Id));
7619 W ("Optimize_Alignment_Space", Flag241 (Id));
7620 W ("Optimize_Alignment_Time", Flag242 (Id));
7621 W ("Overlays_Constant", Flag243 (Id));
7622 W ("Reachable", Flag49 (Id));
7623 W ("Referenced", Flag156 (Id));
7624 W ("Referenced_As_LHS", Flag36 (Id));
7625 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7626 W ("Renamed_In_Spec", Flag231 (Id));
7627 W ("Requires_Overriding", Flag213 (Id));
7628 W ("Return_Present", Flag54 (Id));
7629 W ("Returns_By_Ref", Flag90 (Id));
7630 W ("Reverse_Bit_Order", Flag164 (Id));
7631 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7632 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7633 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7634 W ("Static_Elaboration_Desired", Flag77 (Id));
7635 W ("Strict_Alignment", Flag145 (Id));
7636 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7637 W ("Suppress_Initialization", Flag105 (Id));
7638 W ("Suppress_Style_Checks", Flag165 (Id));
7639 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7640 W ("Treat_As_Volatile", Flag41 (Id));
7641 W ("Universal_Aliasing", Flag216 (Id));
7642 W ("Used_As_Generic_Actual", Flag222 (Id));
7643 W ("Uses_Sec_Stack", Flag95 (Id));
7644 W ("Warnings_Off", Flag96 (Id));
7645 W ("Warnings_Off_Used", Flag236 (Id));
7646 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7647 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7648 W ("Was_Hidden", Flag196 (Id));
7649 end Write_Entity_Flags;
7651 -----------------------
7652 -- Write_Entity_Info --
7653 -----------------------
7655 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7657 procedure Write_Attribute (Which : String; Nam : E);
7658 -- Write attribute value with given string name
7660 procedure Write_Kind (Id : Entity_Id);
7661 -- Write Ekind field of entity
7663 ---------------------
7664 -- Write_Attribute --
7665 ---------------------
7667 procedure Write_Attribute (Which : String; Nam : E) is
7671 Write_Int (Int (Nam));
7673 Write_Name (Chars (Nam));
7675 end Write_Attribute;
7681 procedure Write_Kind (Id : Entity_Id) is
7682 K : constant String := Entity_Kind'Image (Ekind (Id));
7686 Write_Str (" Kind ");
7688 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7689 Write_Str ("TAGGED ");
7692 Write_Str (K (3 .. K'Length));
7695 if Is_Type (Id) and then Depends_On_Private (Id) then
7696 Write_Str ("Depends_On_Private ");
7700 -- Start of processing for Write_Entity_Info
7704 Write_Attribute ("Name ", Id);
7705 Write_Int (Int (Id));
7709 Write_Attribute (" Type ", Etype (Id));
7711 Write_Attribute (" Scope ", Scope (Id));
7716 when Discrete_Kind =>
7717 Write_Str ("Bounds: Id = ");
7719 if Present (Scalar_Range (Id)) then
7720 Write_Int (Int (Type_Low_Bound (Id)));
7721 Write_Str (" .. Id = ");
7722 Write_Int (Int (Type_High_Bound (Id)));
7724 Write_Str ("Empty");
7735 (" Component Type ", Component_Type (Id));
7738 Write_Str (" Indexes ");
7740 Index := First_Index (Id);
7741 while Present (Index) loop
7742 Write_Attribute (" ", Etype (Index));
7743 Index := Next_Index (Index);
7751 (" Directly Designated Type ",
7752 Directly_Designated_Type (Id));
7755 when Overloadable_Kind =>
7756 if Present (Homonym (Id)) then
7757 Write_Str (" Homonym ");
7758 Write_Name (Chars (Homonym (Id)));
7760 Write_Int (Int (Homonym (Id)));
7767 if Ekind (Scope (Id)) in Record_Kind then
7769 " Original_Record_Component ",
7770 Original_Record_Component (Id));
7771 Write_Int (Int (Original_Record_Component (Id)));
7775 when others => null;
7777 end Write_Entity_Info;
7779 -----------------------
7780 -- Write_Field6_Name --
7781 -----------------------
7783 procedure Write_Field6_Name (Id : Entity_Id) is
7784 pragma Warnings (Off, Id);
7786 Write_Str ("First_Rep_Item");
7787 end Write_Field6_Name;
7789 -----------------------
7790 -- Write_Field7_Name --
7791 -----------------------
7793 procedure Write_Field7_Name (Id : Entity_Id) is
7794 pragma Warnings (Off, Id);
7796 Write_Str ("Freeze_Node");
7797 end Write_Field7_Name;
7799 -----------------------
7800 -- Write_Field8_Name --
7801 -----------------------
7803 procedure Write_Field8_Name (Id : Entity_Id) is
7807 Write_Str ("Associated_Node_For_Itype");
7810 Write_Str ("Dependent_Instances");
7813 Write_Str ("First_Exit_Statement");
7816 Write_Str ("Hiding_Loop_Variable");
7820 E_Subprogram_Body =>
7821 Write_Str ("Mechanism");
7825 Write_Str ("Normalized_First_Bit");
7828 Write_Str ("Postcondition_Proc");
7830 when E_Return_Statement =>
7831 Write_Str ("Return_Applies_To");
7834 Write_Str ("Field8??");
7836 end Write_Field8_Name;
7838 -----------------------
7839 -- Write_Field9_Name --
7840 -----------------------
7842 procedure Write_Field9_Name (Id : Entity_Id) is
7846 Write_Str ("Class_Wide_Type");
7849 Write_Str ("Current_Value");
7852 E_Generic_Function |
7854 E_Generic_Procedure |
7857 Write_Str ("Renaming_Map");
7860 Write_Str ("Field9??");
7862 end Write_Field9_Name;
7864 ------------------------
7865 -- Write_Field10_Name --
7866 ------------------------
7868 procedure Write_Field10_Name (Id : Entity_Id) is
7871 when Class_Wide_Kind |
7877 Write_Str ("Direct_Primitive_Operations");
7880 Write_Str ("Float_Rep");
7882 when E_In_Parameter |
7884 Write_Str ("Discriminal_Link");
7890 Write_Str ("Handler_Records");
7894 Write_Str ("Normalized_Position_Max");
7897 Write_Str ("Field10??");
7899 end Write_Field10_Name;
7901 ------------------------
7902 -- Write_Field11_Name --
7903 ------------------------
7905 procedure Write_Field11_Name (Id : Entity_Id) is
7909 Write_Str ("Block_Node");
7913 Write_Str ("Component_Bit_Offset");
7916 Write_Str ("Entry_Component");
7918 when E_Enumeration_Literal =>
7919 Write_Str ("Enumeration_Pos");
7923 Write_Str ("Full_View");
7925 when E_Generic_Package =>
7926 Write_Str ("Generic_Homonym");
7932 Write_Str ("Protected_Body_Subprogram");
7935 Write_Str ("Field11??");
7937 end Write_Field11_Name;
7939 ------------------------
7940 -- Write_Field12_Name --
7941 ------------------------
7943 procedure Write_Field12_Name (Id : Entity_Id) is
7947 Write_Str ("Associated_Formal_Package");
7950 Write_Str ("Barrier_Function");
7952 when E_Enumeration_Literal =>
7953 Write_Str ("Enumeration_Rep");
7961 E_In_Out_Parameter |
7965 Write_Str ("Esize");
7969 Write_Str ("Next_Inlined_Subprogram");
7972 Write_Str ("Field12??");
7974 end Write_Field12_Name;
7976 ------------------------
7977 -- Write_Field13_Name --
7978 ------------------------
7980 procedure Write_Field13_Name (Id : Entity_Id) is
7985 Write_Str ("Component_Clause");
7988 if not Comes_From_Source (Id)
7990 Chars (Id) = Name_Op_Ne
7992 Write_Str ("Corresponding_Equality");
7994 elsif Comes_From_Source (Id) then
7995 Write_Str ("Elaboration_Entity");
7998 Write_Str ("Field13??");
8003 Generic_Unit_Kind =>
8004 Write_Str ("Elaboration_Entity");
8008 Write_Str ("Extra_Accessibility");
8011 Write_Str ("RM_Size");
8014 Write_Str ("Field13??");
8016 end Write_Field13_Name;
8018 -----------------------
8019 -- Write_Field14_Name --
8020 -----------------------
8022 procedure Write_Field14_Name (Id : Entity_Id) is
8031 Write_Str ("Alignment");
8035 Write_Str ("First_Optional_Parameter");
8039 Write_Str ("Normalized_Position");
8042 E_Generic_Package =>
8043 Write_Str ("Shadow_Entities");
8046 Write_Str ("Field14??");
8048 end Write_Field14_Name;
8050 ------------------------
8051 -- Write_Field15_Name --
8052 ------------------------
8054 procedure Write_Field15_Name (Id : Entity_Id) is
8057 when E_Discriminant =>
8058 Write_Str ("Discriminant_Number");
8061 Write_Str ("DT_Entry_Count");
8065 Write_Str ("DT_Position");
8067 when E_Protected_Type =>
8068 Write_Str ("Entry_Bodies_Array");
8071 Write_Str ("Entry_Parameters_Type");
8074 Write_Str ("Extra_Formal");
8076 when Enumeration_Kind =>
8077 Write_Str ("Lit_Indexes");
8081 Write_Str ("Related_Instance");
8085 Write_Str ("Return_Flag");
8087 when Decimal_Fixed_Point_Kind =>
8088 Write_Str ("Scale_Value");
8092 Write_Str ("Storage_Size_Variable");
8094 when E_String_Literal_Subtype =>
8095 Write_Str ("String_Literal_Low_Bound");
8098 Write_Str ("Field15??");
8100 end Write_Field15_Name;
8102 ------------------------
8103 -- Write_Field16_Name --
8104 ------------------------
8106 procedure Write_Field16_Name (Id : Entity_Id) is
8109 when E_Record_Type |
8110 E_Record_Type_With_Private =>
8111 Write_Str ("Access_Disp_Table");
8113 when E_Record_Subtype |
8114 E_Class_Wide_Subtype =>
8115 Write_Str ("Cloned_Subtype");
8119 Write_Str ("DTC_Entity");
8122 Write_Str ("Entry_Formal");
8127 Write_Str ("First_Private_Entity");
8129 when Enumeration_Kind =>
8130 Write_Str ("Lit_Strings");
8132 when E_String_Literal_Subtype =>
8133 Write_Str ("String_Literal_Length");
8137 Write_Str ("Unset_Reference");
8140 Write_Str ("Field16??");
8142 end Write_Field16_Name;
8144 ------------------------
8145 -- Write_Field17_Name --
8146 ------------------------
8148 procedure Write_Field17_Name (Id : Entity_Id) is
8153 E_Generic_In_Out_Parameter |
8155 Write_Str ("Actual_Subtype");
8158 Write_Str ("Digits_Value");
8160 when E_Discriminant =>
8161 Write_Str ("Discriminal");
8170 E_Generic_Function |
8172 E_Generic_Procedure |
8180 E_Return_Statement |
8182 E_Subprogram_Type =>
8183 Write_Str ("First_Entity");
8186 Write_Str ("First_Index");
8188 when Enumeration_Kind =>
8189 Write_Str ("First_Literal");
8192 Write_Str ("Master_Id");
8194 when Modular_Integer_Kind =>
8195 Write_Str ("Modulus");
8197 when E_Incomplete_Type =>
8198 Write_Str ("Non_Limited_View");
8200 when E_Incomplete_Subtype =>
8201 if From_With_Type (Id) then
8202 Write_Str ("Non_Limited_View");
8206 Write_Str ("Prival");
8209 Write_Str ("Field17??");
8211 end Write_Field17_Name;
8213 ------------------------
8214 -- Write_Field18_Name --
8215 ------------------------
8217 procedure Write_Field18_Name (Id : Entity_Id) is
8220 when E_Enumeration_Literal |
8224 Write_Str ("Alias");
8226 when E_Record_Type =>
8227 Write_Str ("Corresponding_Concurrent_Type");
8229 when E_Subprogram_Body =>
8230 Write_Str ("Corresponding_Protected_Entry");
8232 when Concurrent_Kind =>
8233 Write_Str ("Corresponding_Record_Type");
8238 Write_Str ("Enclosing_Scope");
8240 when E_Entry_Index_Parameter =>
8241 Write_Str ("Entry_Index_Constant");
8243 when E_Class_Wide_Subtype |
8244 E_Access_Protected_Subprogram_Type |
8245 E_Anonymous_Access_Protected_Subprogram_Type |
8246 E_Access_Subprogram_Type |
8248 Write_Str ("Equivalent_Type");
8250 when Fixed_Point_Kind =>
8251 Write_Str ("Delta_Value");
8253 when Incomplete_Or_Private_Kind |
8255 Write_Str ("Private_Dependents");
8258 Write_Str ("Renamed_Object");
8262 E_Generic_Function |
8263 E_Generic_Procedure |
8264 E_Generic_Package =>
8265 Write_Str ("Renamed_Entity");
8268 Write_Str ("Field18??");
8270 end Write_Field18_Name;
8272 -----------------------
8273 -- Write_Field19_Name --
8274 -----------------------
8276 procedure Write_Field19_Name (Id : Entity_Id) is
8280 E_Generic_Package =>
8281 Write_Str ("Body_Entity");
8283 when E_Discriminant =>
8284 Write_Str ("Corresponding_Discriminant");
8286 when E_Record_Type =>
8287 Write_Str ("Parent_Subtype");
8291 Write_Str ("Related_Array_Object");
8295 Write_Str ("Size_Check_Code");
8297 when E_Package_Body |
8299 Write_Str ("Spec_Entity");
8301 when Private_Kind =>
8302 Write_Str ("Underlying_Full_View");
8305 Write_Str ("Field19??");
8307 end Write_Field19_Name;
8309 -----------------------
8310 -- Write_Field20_Name --
8311 -----------------------
8313 procedure Write_Field20_Name (Id : Entity_Id) is
8317 Write_Str ("Component_Type");
8319 when E_In_Parameter |
8320 E_Generic_In_Parameter =>
8321 Write_Str ("Default_Value");
8324 Write_Str ("Directly_Designated_Type");
8327 Write_Str ("Discriminant_Checking_Func");
8329 when E_Discriminant =>
8330 Write_Str ("Discriminant_Default_Value");
8339 E_Generic_Function |
8341 E_Generic_Procedure |
8349 E_Return_Statement |
8351 E_Subprogram_Type =>
8352 Write_Str ("Last_Entity");
8356 Write_Str ("Prival_Link");
8359 Write_Str ("Scalar_Range");
8362 Write_Str ("Register_Exception_Call");
8365 Write_Str ("Field20??");
8367 end Write_Field20_Name;
8369 -----------------------
8370 -- Write_Field21_Name --
8371 -----------------------
8373 procedure Write_Field21_Name (Id : Entity_Id) is
8377 Write_Str ("Accept_Address");
8379 when E_In_Parameter =>
8380 Write_Str ("Default_Expr_Function");
8382 when Concurrent_Kind |
8383 Incomplete_Or_Private_Kind |
8387 Write_Str ("Discriminant_Constraint");
8392 E_Generic_Function |
8394 E_Generic_Procedure |
8396 Write_Str ("Interface_Name");
8399 Modular_Integer_Kind =>
8400 Write_Str ("Original_Array_Type");
8402 when Fixed_Point_Kind =>
8403 Write_Str ("Small_Value");
8406 Write_Str ("Field21??");
8408 end Write_Field21_Name;
8410 -----------------------
8411 -- Write_Field22_Name --
8412 -----------------------
8414 procedure Write_Field22_Name (Id : Entity_Id) is
8418 Write_Str ("Associated_Storage_Pool");
8421 Write_Str ("Component_Size");
8423 when E_Record_Type =>
8424 Write_Str ("Corresponding_Remote_Type");
8428 Write_Str ("Original_Record_Component");
8430 when E_Enumeration_Literal =>
8431 Write_Str ("Enumeration_Rep_Expr");
8434 Write_Str ("Exception_Code");
8436 when E_Record_Type_With_Private |
8437 E_Record_Subtype_With_Private |
8440 E_Limited_Private_Type |
8441 E_Limited_Private_Subtype =>
8442 Write_Str ("Private_View");
8445 Write_Str ("Protected_Formal");
8455 E_Generic_Function |
8456 E_Generic_Procedure |
8459 E_Return_Statement |
8462 Write_Str ("Scope_Depth_Value");
8465 Write_Str ("Shared_Var_Procs_Instance");
8468 Write_Str ("Field22??");
8470 end Write_Field22_Name;
8472 ------------------------
8473 -- Write_Field23_Name --
8474 ------------------------
8476 procedure Write_Field23_Name (Id : Entity_Id) is
8480 Write_Str ("Associated_Collection");
8482 when E_Discriminant =>
8483 Write_Str ("CR_Discriminant");
8486 Write_Str ("Entry_Cancel_Parameter");
8488 when E_Enumeration_Type =>
8489 Write_Str ("Enum_Pos_To_Rep");
8493 Write_Str ("Extra_Constrained");
8495 when E_Generic_Function |
8497 E_Generic_Procedure =>
8498 Write_Str ("Inner_Instances");
8501 Write_Str ("Packed_Array_Type");
8504 Write_Str ("Protection_Object");
8506 when Concurrent_Kind |
8507 Incomplete_Or_Private_Kind |
8511 Write_Str ("Stored_Constraint");
8515 if Present (Scope (Id))
8516 and then Is_Protected_Type (Scope (Id))
8518 Write_Str ("Protection_Object");
8520 Write_Str ("Generic_Renamings");
8524 if Is_Generic_Instance (Id) then
8525 Write_Str ("Generic_Renamings");
8527 Write_Str ("Limited_View");
8531 Write_Str ("Field23??");
8533 end Write_Field23_Name;
8535 ------------------------
8536 -- Write_Field24_Name --
8537 ------------------------
8539 procedure Write_Field24_Name (Id : Entity_Id) is
8544 Write_Str ("Finalizer");
8549 Write_Str ("Related_Expression");
8551 when Subprogram_Kind =>
8552 Write_Str ("Spec_PPC_List");
8555 Write_Str ("Field24???");
8557 end Write_Field24_Name;
8559 ------------------------
8560 -- Write_Field25_Name --
8561 ------------------------
8563 procedure Write_Field25_Name (Id : Entity_Id) is
8567 Write_Str ("Debug_Renaming_Link");
8570 Write_Str ("DT_Offset_To_Top_Func");
8574 Write_Str ("Interface_Alias");
8576 when E_Record_Type |
8578 E_Record_Type_With_Private |
8579 E_Record_Subtype_With_Private =>
8580 Write_Str ("Interfaces");
8583 Write_Str ("Task_Body_Procedure");
8587 Write_Str ("PPC_Wrapper");
8589 when E_Enumeration_Subtype |
8590 E_Modular_Integer_Subtype |
8591 E_Signed_Integer_Subtype =>
8592 Write_Str ("Static_Predicate");
8595 Write_Str ("Field25??");
8597 end Write_Field25_Name;
8599 ------------------------
8600 -- Write_Field26_Name --
8601 ------------------------
8603 procedure Write_Field26_Name (Id : Entity_Id) is
8606 when E_Record_Type |
8607 E_Record_Type_With_Private =>
8608 Write_Str ("Dispatch_Table_Wrappers");
8610 when E_In_Out_Parameter |
8613 Write_Str ("Last_Assignment");
8615 when E_Access_Subprogram_Type =>
8616 Write_Str ("Original_Access_Type");
8618 when E_Generic_Package |
8620 Write_Str ("Package_Instantiation");
8624 Write_Str ("Related_Type");
8627 Write_Str ("Relative_Deadline_Variable");
8631 if Ekind (Id) = E_Procedure
8632 and then not Is_Dispatching_Operation (Id)
8634 Write_Str ("Static_Initialization");
8636 Write_Str ("Overridden_Operation");
8640 Write_Str ("Field26??");
8642 end Write_Field26_Name;
8644 ------------------------
8645 -- Write_Field27_Name --
8646 ------------------------
8648 procedure Write_Field27_Name (Id : Entity_Id) is
8653 Write_Str ("Current_Use_Clause");
8658 Write_Str ("Related_Type");
8661 Write_Str ("Wrapped_Entity");
8664 Write_Str ("Field27??");
8666 end Write_Field27_Name;
8668 ------------------------
8669 -- Write_Field28_Name --
8670 ------------------------
8672 procedure Write_Field28_Name (Id : Entity_Id) is
8678 Write_Str ("Extra_Formals");
8680 when E_Record_Type =>
8681 Write_Str ("Underlying_Record_View");
8684 Write_Str ("Field28??");
8686 end Write_Field28_Name;
8688 procedure Write_Field29_Name (Id : Entity_Id) is
8692 Write_Str ("Subprograms_For_Type");
8695 Write_Str ("Field29??");
8697 end Write_Field29_Name;
8699 -------------------------
8700 -- Iterator Procedures --
8701 -------------------------
8703 procedure Proc_Next_Component (N : in out Node_Id) is
8705 N := Next_Component (N);
8706 end Proc_Next_Component;
8708 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8710 N := Next_Entity (N);
8711 while Present (N) loop
8712 exit when Ekind_In (N, E_Component, E_Discriminant);
8713 N := Next_Entity (N);
8715 end Proc_Next_Component_Or_Discriminant;
8717 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8719 N := Next_Discriminant (N);
8720 end Proc_Next_Discriminant;
8722 procedure Proc_Next_Formal (N : in out Node_Id) is
8724 N := Next_Formal (N);
8725 end Proc_Next_Formal;
8727 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8729 N := Next_Formal_With_Extras (N);
8730 end Proc_Next_Formal_With_Extras;
8732 procedure Proc_Next_Index (N : in out Node_Id) is
8734 N := Next_Index (N);
8735 end Proc_Next_Index;
8737 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8739 N := Next_Inlined_Subprogram (N);
8740 end Proc_Next_Inlined_Subprogram;
8742 procedure Proc_Next_Literal (N : in out Node_Id) is
8744 N := Next_Literal (N);
8745 end Proc_Next_Literal;
8747 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8749 N := Next_Stored_Discriminant (N);
8750 end Proc_Next_Stored_Discriminant;