1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- Return_Flag_Or_Transient_Decl Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
131 -- Access_Disp_Table Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- String_Literal_Length Uint16
138 -- Unset_Reference Node16
140 -- Actual_Subtype Node17
141 -- Digits_Value Uint17
142 -- Discriminal Node17
143 -- First_Entity Node17
144 -- First_Index Node17
145 -- First_Literal Node17
148 -- Non_Limited_View Node17
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Private_Dependents Elist18
159 -- Renamed_Entity Node18
160 -- Renamed_Object Node18
162 -- Body_Entity Node19
163 -- Corresponding_Discriminant Node19
164 -- Parent_Subtype Node19
165 -- Related_Array_Object Node19
166 -- Size_Check_Code Node19
167 -- Spec_Entity Node19
168 -- Underlying_Full_View Node19
170 -- Component_Type Node20
171 -- Default_Value Node20
172 -- Directly_Designated_Type Node20
173 -- Discriminant_Checking_Func Node20
174 -- Discriminant_Default_Value Node20
175 -- Last_Entity Node20
176 -- Prival_Link Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Array_Type Node21
185 -- Small_Value Ureal21
187 -- Associated_Storage_Pool Node22
188 -- Component_Size Uint22
189 -- Corresponding_Remote_Type Node22
190 -- Enumeration_Rep_Expr Node22
191 -- Exception_Code Uint22
192 -- Original_Record_Component Node22
193 -- Private_View Node22
194 -- Protected_Formal Node22
195 -- Scope_Depth_Value Uint22
196 -- Shared_Var_Procs_Instance Node22
198 -- CR_Discriminant Node23
199 -- Entry_Cancel_Parameter Node23
200 -- Enum_Pos_To_Rep Node23
201 -- Extra_Constrained Node23
202 -- Finalization_Master Node23
203 -- Generic_Renamings Elist23
204 -- Inner_Instances Elist23
205 -- Limited_View Node23
206 -- Packed_Array_Type Node23
207 -- Protection_Object Node23
208 -- Stored_Constraint Elist23
211 -- Related_Expression Node24
214 -- Interface_Alias Node25
215 -- Interfaces Elist25
216 -- Debug_Renaming_Link Node25
217 -- DT_Offset_To_Top_Func Node25
218 -- PPC_Wrapper Node25
219 -- Static_Predicate List25
220 -- Task_Body_Procedure Node25
222 -- Dispatch_Table_Wrappers Elist26
223 -- Last_Assignment Node26
224 -- Original_Access_Type Node26
225 -- Overridden_Operation Node26
226 -- Package_Instantiation Node26
227 -- Relative_Deadline_Variable Node26
228 -- Static_Initialization Node26
230 -- Current_Use_Clause Node27
231 -- Related_Type Node27
232 -- Wrapped_Entity Node27
234 -- Extra_Formals Node28
235 -- Underlying_Record_View Node28
237 -- Subprograms_For_Type Node29
239 ---------------------------------------------
240 -- Usage of Flags in Defining Entity Nodes --
241 ---------------------------------------------
243 -- All flags are unique, there is no overlaying, so each flag is physically
244 -- present in every entity. However, for many of the flags, it only makes
245 -- sense for them to be set true for certain subsets of entity kinds. See
246 -- the spec of Einfo for further details.
248 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
251 -- Has_Discriminants Flag5
252 -- Is_Dispatching_Operation Flag6
253 -- Is_Immediately_Visible Flag7
255 -- Is_Potentially_Use_Visible Flag9
259 -- Is_Constrained Flag12
260 -- Is_Generic_Type Flag13
261 -- Depends_On_Private Flag14
263 -- Is_Volatile Flag16
264 -- Is_Internal Flag17
265 -- Has_Delayed_Freeze Flag18
266 -- Is_Abstract_Subprogram Flag19
267 -- Is_Concurrent_Record_Type Flag20
269 -- Has_Master_Entity Flag21
270 -- Needs_No_Actuals Flag22
271 -- Has_Storage_Size_Clause Flag23
272 -- Is_Imported Flag24
273 -- Is_Limited_Record Flag25
274 -- Has_Completion Flag26
275 -- Has_Pragma_Controlled Flag27
276 -- Is_Statically_Allocated Flag28
277 -- Has_Size_Clause Flag29
280 -- Checks_May_Be_Suppressed Flag31
281 -- Kill_Elaboration_Checks Flag32
282 -- Kill_Range_Checks Flag33
283 -- Kill_Tag_Checks Flag34
284 -- Is_Class_Wide_Equivalent_Type Flag35
285 -- Referenced_As_LHS Flag36
286 -- Is_Known_Non_Null Flag37
287 -- Can_Never_Be_Null Flag38
288 -- Has_Default_Aspect Flag39
289 -- Body_Needed_For_SAL Flag40
291 -- Treat_As_Volatile Flag41
292 -- Is_Controlled Flag42
293 -- Has_Controlled_Component Flag43
295 -- In_Private_Part Flag45
296 -- Has_Alignment_Clause Flag46
298 -- In_Package_Body Flag48
300 -- Delay_Subprogram_Descriptors Flag50
303 -- Is_Entry_Formal Flag52
304 -- Is_Private_Descendant Flag53
305 -- Return_Present Flag54
306 -- Is_Tagged_Type Flag55
307 -- Has_Homonym Flag56
309 -- Non_Binary_Modulus Flag58
310 -- Is_Preelaborated Flag59
311 -- Is_Shared_Passive Flag60
313 -- Is_Remote_Types Flag61
314 -- Is_Remote_Call_Interface Flag62
315 -- Is_Character_Type Flag63
316 -- Is_Intrinsic_Subprogram Flag64
317 -- Has_Record_Rep_Clause Flag65
318 -- Has_Enumeration_Rep_Clause Flag66
319 -- Has_Small_Clause Flag67
320 -- Has_Component_Size_Clause Flag68
321 -- Is_Access_Constant Flag69
322 -- Is_First_Subtype Flag70
324 -- Has_Completion_In_Body Flag71
325 -- Has_Unknown_Discriminants Flag72
326 -- Is_Child_Unit Flag73
327 -- Is_CPP_Class Flag74
328 -- Has_Non_Standard_Rep Flag75
329 -- Is_Constructor Flag76
330 -- Static_Elaboration_Desired Flag77
332 -- Has_All_Calls_Remote Flag79
333 -- Is_Constr_Subt_For_U_Nominal Flag80
335 -- Is_Asynchronous Flag81
336 -- Has_Gigi_Rep_Item Flag82
337 -- Has_Machine_Radix_Clause Flag83
338 -- Machine_Radix_10 Flag84
340 -- Has_Atomic_Components Flag86
341 -- Has_Volatile_Components Flag87
342 -- Discard_Names Flag88
343 -- Is_Interrupt_Handler Flag89
344 -- Returns_By_Ref Flag90
347 -- Size_Known_At_Compile_Time Flag92
348 -- Has_Subprogram_Descriptor Flag93
349 -- Is_Generic_Actual_Type Flag94
350 -- Uses_Sec_Stack Flag95
351 -- Warnings_Off Flag96
352 -- Is_Controlling_Formal Flag97
353 -- Has_Controlling_Result Flag98
354 -- Is_Exported Flag99
355 -- Has_Specified_Layout Flag100
357 -- Has_Nested_Block_With_Handler Flag101
359 -- Is_Completely_Hidden Flag103
360 -- Address_Taken Flag104
361 -- Suppress_Initialization Flag105
362 -- Is_Limited_Composite Flag106
363 -- Is_Private_Composite Flag107
364 -- Default_Expressions_Processed Flag108
365 -- Is_Non_Static_Subtype Flag109
366 -- Has_External_Tag_Rep_Clause Flag110
368 -- Is_Formal_Subprogram Flag111
369 -- Is_Renaming_Of_Object Flag112
371 -- Delay_Cleanups Flag114
372 -- Never_Set_In_Source Flag115
373 -- Is_Visible_Child_Unit Flag116
374 -- Is_Unchecked_Union Flag117
375 -- Is_For_Access_Subtype Flag118
376 -- Has_Convention_Pragma Flag119
377 -- Has_Primitive_Operations Flag120
379 -- Has_Pragma_Pack Flag121
380 -- Is_Bit_Packed_Array Flag122
381 -- Has_Unchecked_Union Flag123
382 -- Is_Eliminated Flag124
383 -- C_Pass_By_Copy Flag125
384 -- Is_Instantiated Flag126
385 -- Is_Valued_Procedure Flag127
386 -- (used for Component_Alignment) Flag128
387 -- (used for Component_Alignment) Flag129
388 -- Is_Generic_Instance Flag130
390 -- No_Pool_Assigned Flag131
391 -- Is_AST_Entry Flag132
392 -- Is_VMS_Exception Flag133
393 -- Is_Optional_Parameter Flag134
394 -- Has_Aliased_Components Flag135
395 -- No_Strict_Aliasing Flag136
396 -- Is_Machine_Code_Subprogram Flag137
397 -- Is_Packed_Array_Type Flag138
398 -- Has_Biased_Representation Flag139
399 -- Has_Complex_Representation Flag140
401 -- Is_Constr_Subt_For_UN_Aliased Flag141
402 -- Has_Missing_Return Flag142
403 -- Has_Recursive_Call Flag143
404 -- Is_Unsigned_Type Flag144
405 -- Strict_Alignment Flag145
406 -- Is_Abstract_Type Flag146
407 -- Needs_Debug_Info Flag147
408 -- Suppress_Elaboration_Warnings Flag148
409 -- Is_Compilation_Unit Flag149
410 -- Has_Pragma_Elaborate_Body Flag150
412 -- Has_Private_Ancestor Flag151
413 -- Entry_Accepted Flag152
414 -- Is_Obsolescent Flag153
415 -- Has_Per_Object_Constraint Flag154
416 -- Has_Private_Declaration Flag155
417 -- Referenced Flag156
418 -- Has_Pragma_Inline Flag157
419 -- Finalize_Storage_Only Flag158
420 -- From_With_Type Flag159
421 -- Is_Package_Body_Entity Flag160
423 -- Has_Qualified_Name Flag161
424 -- Nonzero_Is_True Flag162
425 -- Is_True_Constant Flag163
426 -- Reverse_Bit_Order Flag164
427 -- Suppress_Style_Checks Flag165
428 -- Debug_Info_Off Flag166
429 -- Sec_Stack_Needed_For_Return Flag167
430 -- Materialize_Entity Flag168
431 -- Has_Pragma_Thread_Local_Storage Flag169
432 -- Is_Known_Valid Flag170
434 -- Is_Hidden_Open_Scope Flag171
435 -- Has_Object_Size_Clause Flag172
436 -- Has_Fully_Qualified_Name Flag173
437 -- Elaboration_Entity_Required Flag174
438 -- Has_Forward_Instantiation Flag175
439 -- Is_Discrim_SO_Function Flag176
440 -- Size_Depends_On_Discriminant Flag177
441 -- Is_Null_Init_Proc Flag178
442 -- Has_Pragma_Pure_Function Flag179
443 -- Has_Pragma_Unreferenced Flag180
445 -- Has_Contiguous_Rep Flag181
446 -- Has_Xref_Entry Flag182
447 -- Must_Be_On_Byte_Boundary Flag183
448 -- Has_Stream_Size_Clause Flag184
449 -- Is_Ada_2005_Only Flag185
450 -- Is_Interface Flag186
451 -- Has_Constrained_Partial_View Flag187
452 -- Has_Persistent_BSS Flag188
453 -- Is_Pure_Unit_Access_Type Flag189
454 -- Has_Specified_Stream_Input Flag190
456 -- Has_Specified_Stream_Output Flag191
457 -- Has_Specified_Stream_Read Flag192
458 -- Has_Specified_Stream_Write Flag193
459 -- Is_Local_Anonymous_Access Flag194
460 -- Is_Primitive_Wrapper Flag195
461 -- Was_Hidden Flag196
462 -- Is_Limited_Interface Flag197
463 -- Has_Pragma_Ordered Flag198
464 -- Is_Ada_2012_Only Flag199
466 -- Has_Delayed_Aspects Flag200
467 -- Has_Anon_Block_Suffix Flag201
468 -- Itype_Printed Flag202
469 -- Has_Pragma_Pure Flag203
470 -- Is_Known_Null Flag204
471 -- Low_Bound_Tested Flag205
472 -- Is_Visible_Formal Flag206
473 -- Known_To_Have_Preelab_Init Flag207
474 -- Must_Have_Preelab_Init Flag208
475 -- Is_Return_Object Flag209
476 -- Elaborate_Body_Desirable Flag210
478 -- Has_Static_Discriminants Flag211
479 -- Has_Pragma_Unreferenced_Objects Flag212
480 -- Requires_Overriding Flag213
482 -- Has_Up_Level_Access Flag215
483 -- Universal_Aliasing Flag216
484 -- Suppress_Value_Tracking_On_Call Flag217
485 -- Is_Primitive Flag218
486 -- Has_Initial_Value Flag219
487 -- Has_Dispatch_Table Flag220
489 -- Has_Pragma_Preelab_Init Flag221
490 -- Used_As_Generic_Actual Flag222
491 -- Is_Descendent_Of_Address Flag223
494 -- Is_Only_Out_Parameter Flag226
495 -- Referenced_As_Out_Parameter Flag227
496 -- Has_Thunks Flag228
497 -- Can_Use_Internal_Rep Flag229
498 -- Has_Pragma_Inline_Always Flag230
500 -- Renamed_In_Spec Flag231
501 -- Has_Invariants Flag232
502 -- Has_Pragma_Unmodified Flag233
503 -- Is_Dispatch_Table_Entity Flag234
504 -- Is_Trivial_Subprogram Flag235
505 -- Warnings_Off_Used Flag236
506 -- Warnings_Off_Used_Unmodified Flag237
507 -- Warnings_Off_Used_Unreferenced Flag238
508 -- OK_To_Reorder_Components Flag239
509 -- Has_Postconditions Flag240
511 -- Optimize_Alignment_Space Flag241
512 -- Optimize_Alignment_Time Flag242
513 -- Overlays_Constant Flag243
514 -- Is_RACW_Stub_Type Flag244
515 -- Is_Private_Primitive Flag245
516 -- Is_Underlying_Record_View Flag246
517 -- OK_To_Rename Flag247
518 -- Has_Inheritable_Invariants Flag248
519 -- Is_Safe_To_Reevaluate Flag249
520 -- Has_Predicates Flag250
522 -- Has_Implicit_Dereference Flag251
523 -- Is_Processed_Transient Flag252
528 -----------------------
529 -- Local subprograms --
530 -----------------------
532 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
533 -- Returns the attribute definition clause for Id whose name is Rep_Name.
534 -- Returns Empty if no matching attribute definition clause found for Id.
540 function Float_Rep (Id : E) return F is
541 pragma Assert (Is_Floating_Point_Type (Id));
543 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
550 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
554 Ritem := First_Rep_Item (Id);
555 while Present (Ritem) loop
556 if Nkind (Ritem) = N_Attribute_Definition_Clause
557 and then Chars (Ritem) = Rep_Name
561 Next_Rep_Item (Ritem);
568 --------------------------------
569 -- Attribute Access Functions --
570 --------------------------------
572 function Accept_Address (Id : E) return L is
577 function Access_Disp_Table (Id : E) return L is
579 pragma Assert (Ekind_In (Id, E_Record_Type,
581 return Elist16 (Implementation_Base_Type (Id));
582 end Access_Disp_Table;
584 function Actual_Subtype (Id : E) return E is
587 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
588 or else Is_Formal (Id));
592 function Address_Taken (Id : E) return B is
597 function Alias (Id : E) return E is
600 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
604 function Alignment (Id : E) return U is
606 pragma Assert (Is_Type (Id)
607 or else Is_Formal (Id)
608 or else Ekind_In (Id, E_Loop_Parameter,
615 function Associated_Formal_Package (Id : E) return E is
617 pragma Assert (Ekind (Id) = E_Package);
619 end Associated_Formal_Package;
621 function Associated_Node_For_Itype (Id : E) return N is
624 end Associated_Node_For_Itype;
626 function Associated_Storage_Pool (Id : E) return E is
628 pragma Assert (Is_Access_Type (Id));
629 return Node22 (Root_Type (Id));
630 end Associated_Storage_Pool;
632 function Barrier_Function (Id : E) return N is
634 pragma Assert (Is_Entry (Id));
636 end Barrier_Function;
638 function Block_Node (Id : E) return N is
640 pragma Assert (Ekind (Id) = E_Block);
644 function Body_Entity (Id : E) return E is
646 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
650 function Body_Needed_For_SAL (Id : E) return B is
653 (Ekind (Id) = E_Package
654 or else Is_Subprogram (Id)
655 or else Is_Generic_Unit (Id));
657 end Body_Needed_For_SAL;
659 function C_Pass_By_Copy (Id : E) return B is
661 pragma Assert (Is_Record_Type (Id));
662 return Flag125 (Implementation_Base_Type (Id));
665 function Can_Never_Be_Null (Id : E) return B is
668 end Can_Never_Be_Null;
670 function Checks_May_Be_Suppressed (Id : E) return B is
673 end Checks_May_Be_Suppressed;
675 function Class_Wide_Type (Id : E) return E is
677 pragma Assert (Is_Type (Id));
681 function Cloned_Subtype (Id : E) return E is
683 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
687 function Component_Bit_Offset (Id : E) return U is
689 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
691 end Component_Bit_Offset;
693 function Component_Clause (Id : E) return N is
695 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
697 end Component_Clause;
699 function Component_Size (Id : E) return U is
701 pragma Assert (Is_Array_Type (Id));
702 return Uint22 (Implementation_Base_Type (Id));
705 function Component_Type (Id : E) return E is
707 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
708 return Node20 (Implementation_Base_Type (Id));
711 function Corresponding_Concurrent_Type (Id : E) return E is
713 pragma Assert (Ekind (Id) = E_Record_Type);
715 end Corresponding_Concurrent_Type;
717 function Corresponding_Discriminant (Id : E) return E is
719 pragma Assert (Ekind (Id) = E_Discriminant);
721 end Corresponding_Discriminant;
723 function Corresponding_Equality (Id : E) return E is
726 (Ekind (Id) = E_Function
727 and then not Comes_From_Source (Id)
728 and then Chars (Id) = Name_Op_Ne);
730 end Corresponding_Equality;
732 function Corresponding_Protected_Entry (Id : E) return E is
734 pragma Assert (Ekind (Id) = E_Subprogram_Body);
736 end Corresponding_Protected_Entry;
738 function Corresponding_Record_Type (Id : E) return E is
740 pragma Assert (Is_Concurrent_Type (Id));
742 end Corresponding_Record_Type;
744 function Corresponding_Remote_Type (Id : E) return E is
747 end Corresponding_Remote_Type;
749 function Current_Use_Clause (Id : E) return E is
751 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
753 end Current_Use_Clause;
755 function Current_Value (Id : E) return N is
757 pragma Assert (Ekind (Id) in Object_Kind);
761 function CR_Discriminant (Id : E) return E is
766 function Debug_Info_Off (Id : E) return B is
771 function Debug_Renaming_Link (Id : E) return E is
774 end Debug_Renaming_Link;
776 function Default_Expr_Function (Id : E) return E is
778 pragma Assert (Is_Formal (Id));
780 end Default_Expr_Function;
782 function Default_Expressions_Processed (Id : E) return B is
785 end Default_Expressions_Processed;
787 function Default_Value (Id : E) return N is
789 pragma Assert (Is_Formal (Id));
793 function Delay_Cleanups (Id : E) return B is
798 function Delay_Subprogram_Descriptors (Id : E) return B is
801 end Delay_Subprogram_Descriptors;
803 function Delta_Value (Id : E) return R is
805 pragma Assert (Is_Fixed_Point_Type (Id));
809 function Dependent_Instances (Id : E) return L is
811 pragma Assert (Is_Generic_Instance (Id));
813 end Dependent_Instances;
815 function Depends_On_Private (Id : E) return B is
817 pragma Assert (Nkind (Id) in N_Entity);
819 end Depends_On_Private;
821 function Digits_Value (Id : E) return U is
824 (Is_Floating_Point_Type (Id)
825 or else Is_Decimal_Fixed_Point_Type (Id));
829 function Direct_Primitive_Operations (Id : E) return L is
831 pragma Assert (Is_Tagged_Type (Id));
833 end Direct_Primitive_Operations;
835 function Directly_Designated_Type (Id : E) return E is
837 pragma Assert (Is_Access_Type (Id));
839 end Directly_Designated_Type;
841 function Discard_Names (Id : E) return B is
846 function Discriminal (Id : E) return E is
848 pragma Assert (Ekind (Id) = E_Discriminant);
852 function Discriminal_Link (Id : E) return N is
855 end Discriminal_Link;
857 function Discriminant_Checking_Func (Id : E) return E is
859 pragma Assert (Ekind (Id) = E_Component);
861 end Discriminant_Checking_Func;
863 function Discriminant_Constraint (Id : E) return L is
865 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
867 end Discriminant_Constraint;
869 function Discriminant_Default_Value (Id : E) return N is
871 pragma Assert (Ekind (Id) = E_Discriminant);
873 end Discriminant_Default_Value;
875 function Discriminant_Number (Id : E) return U is
877 pragma Assert (Ekind (Id) = E_Discriminant);
879 end Discriminant_Number;
881 function Dispatch_Table_Wrappers (Id : E) return L is
883 pragma Assert (Ekind_In (Id, E_Record_Type,
885 return Elist26 (Implementation_Base_Type (Id));
886 end Dispatch_Table_Wrappers;
888 function DT_Entry_Count (Id : E) return U is
890 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
894 function DT_Offset_To_Top_Func (Id : E) return E is
896 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
898 end DT_Offset_To_Top_Func;
900 function DT_Position (Id : E) return U is
902 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
903 and then Present (DTC_Entity (Id)));
907 function DTC_Entity (Id : E) return E is
909 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
913 function Elaborate_Body_Desirable (Id : E) return B is
915 pragma Assert (Ekind (Id) = E_Package);
917 end Elaborate_Body_Desirable;
919 function Elaboration_Entity (Id : E) return E is
924 Ekind (Id) = E_Package
926 Is_Generic_Unit (Id));
928 end Elaboration_Entity;
930 function Elaboration_Entity_Required (Id : E) return B is
935 Ekind (Id) = E_Package
937 Is_Generic_Unit (Id));
939 end Elaboration_Entity_Required;
941 function Enclosing_Scope (Id : E) return E is
946 function Entry_Accepted (Id : E) return B is
948 pragma Assert (Is_Entry (Id));
952 function Entry_Bodies_Array (Id : E) return E is
955 end Entry_Bodies_Array;
957 function Entry_Cancel_Parameter (Id : E) return E is
960 end Entry_Cancel_Parameter;
962 function Entry_Component (Id : E) return E is
967 function Entry_Formal (Id : E) return E is
972 function Entry_Index_Constant (Id : E) return N is
974 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
976 end Entry_Index_Constant;
978 function Contract (Id : E) return N is
981 (Ekind_In (Id, E_Entry, E_Entry_Family)
982 or else Is_Subprogram (Id)
983 or else Is_Generic_Subprogram (Id));
987 function Entry_Parameters_Type (Id : E) return E is
990 end Entry_Parameters_Type;
992 function Enum_Pos_To_Rep (Id : E) return E is
994 pragma Assert (Ekind (Id) = E_Enumeration_Type);
998 function Enumeration_Pos (Id : E) return Uint is
1000 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1002 end Enumeration_Pos;
1004 function Enumeration_Rep (Id : E) return U is
1006 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1008 end Enumeration_Rep;
1010 function Enumeration_Rep_Expr (Id : E) return N is
1012 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1014 end Enumeration_Rep_Expr;
1016 function Equivalent_Type (Id : E) return E is
1019 (Ekind_In (Id, E_Class_Wide_Type,
1020 E_Class_Wide_Subtype,
1021 E_Access_Protected_Subprogram_Type,
1022 E_Anonymous_Access_Protected_Subprogram_Type,
1023 E_Access_Subprogram_Type,
1026 end Equivalent_Type;
1028 function Esize (Id : E) return Uint is
1033 function Exception_Code (Id : E) return Uint is
1035 pragma Assert (Ekind (Id) = E_Exception);
1039 function Extra_Accessibility (Id : E) return E is
1042 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1044 end Extra_Accessibility;
1046 function Extra_Constrained (Id : E) return E is
1048 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1050 end Extra_Constrained;
1052 function Extra_Formal (Id : E) return E is
1057 function Extra_Formals (Id : E) return E is
1060 (Is_Overloadable (Id)
1061 or else Ekind_In (Id, E_Entry_Family,
1063 E_Subprogram_Type));
1067 function Can_Use_Internal_Rep (Id : E) return B is
1069 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1070 return Flag229 (Base_Type (Id));
1071 end Can_Use_Internal_Rep;
1073 function Finalization_Master (Id : E) return E is
1075 pragma Assert (Is_Access_Type (Id));
1076 return Node23 (Root_Type (Id));
1077 end Finalization_Master;
1079 function Finalize_Storage_Only (Id : E) return B is
1081 pragma Assert (Is_Type (Id));
1082 return Flag158 (Base_Type (Id));
1083 end Finalize_Storage_Only;
1085 function Finalizer (Id : E) return E is
1088 (Ekind (Id) = E_Package
1089 or else Ekind (Id) = E_Package_Body);
1093 function First_Entity (Id : E) return E is
1098 function First_Exit_Statement (Id : E) return N is
1100 pragma Assert (Ekind (Id) = E_Loop);
1102 end First_Exit_Statement;
1104 function First_Index (Id : E) return N is
1106 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1110 function First_Literal (Id : E) return E is
1112 pragma Assert (Is_Enumeration_Type (Id));
1116 function First_Optional_Parameter (Id : E) return E is
1118 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1120 end First_Optional_Parameter;
1122 function First_Private_Entity (Id : E) return E is
1124 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1125 or else Ekind (Id) in Concurrent_Kind);
1127 end First_Private_Entity;
1129 function First_Rep_Item (Id : E) return E is
1134 function Freeze_Node (Id : E) return N is
1139 function From_With_Type (Id : E) return B is
1141 return Flag159 (Id);
1144 function Full_View (Id : E) return E is
1146 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1150 function Generic_Homonym (Id : E) return E is
1152 pragma Assert (Ekind (Id) = E_Generic_Package);
1154 end Generic_Homonym;
1156 function Generic_Renamings (Id : E) return L is
1158 return Elist23 (Id);
1159 end Generic_Renamings;
1161 function Handler_Records (Id : E) return S is
1164 end Handler_Records;
1166 function Has_Aliased_Components (Id : E) return B is
1168 return Flag135 (Implementation_Base_Type (Id));
1169 end Has_Aliased_Components;
1171 function Has_Alignment_Clause (Id : E) return B is
1174 end Has_Alignment_Clause;
1176 function Has_All_Calls_Remote (Id : E) return B is
1179 end Has_All_Calls_Remote;
1181 function Has_Anon_Block_Suffix (Id : E) return B is
1183 return Flag201 (Id);
1184 end Has_Anon_Block_Suffix;
1186 function Has_Atomic_Components (Id : E) return B is
1188 return Flag86 (Implementation_Base_Type (Id));
1189 end Has_Atomic_Components;
1191 function Has_Biased_Representation (Id : E) return B is
1193 return Flag139 (Id);
1194 end Has_Biased_Representation;
1196 function Has_Completion (Id : E) return B is
1201 function Has_Completion_In_Body (Id : E) return B is
1203 pragma Assert (Is_Type (Id));
1205 end Has_Completion_In_Body;
1207 function Has_Complex_Representation (Id : E) return B is
1209 pragma Assert (Is_Type (Id));
1210 return Flag140 (Implementation_Base_Type (Id));
1211 end Has_Complex_Representation;
1213 function Has_Component_Size_Clause (Id : E) return B is
1215 pragma Assert (Is_Array_Type (Id));
1216 return Flag68 (Implementation_Base_Type (Id));
1217 end Has_Component_Size_Clause;
1219 function Has_Constrained_Partial_View (Id : E) return B is
1221 pragma Assert (Is_Type (Id));
1222 return Flag187 (Id);
1223 end Has_Constrained_Partial_View;
1225 function Has_Controlled_Component (Id : E) return B is
1227 return Flag43 (Base_Type (Id));
1228 end Has_Controlled_Component;
1230 function Has_Contiguous_Rep (Id : E) return B is
1232 return Flag181 (Id);
1233 end Has_Contiguous_Rep;
1235 function Has_Controlling_Result (Id : E) return B is
1238 end Has_Controlling_Result;
1240 function Has_Convention_Pragma (Id : E) return B is
1242 return Flag119 (Id);
1243 end Has_Convention_Pragma;
1245 function Has_Default_Aspect (Id : E) return B is
1247 return Flag39 (Base_Type (Id));
1248 end Has_Default_Aspect;
1250 function Has_Delayed_Aspects (Id : E) return B is
1252 pragma Assert (Nkind (Id) in N_Entity);
1253 return Flag200 (Id);
1254 end Has_Delayed_Aspects;
1256 function Has_Delayed_Freeze (Id : E) return B is
1258 pragma Assert (Nkind (Id) in N_Entity);
1260 end Has_Delayed_Freeze;
1262 function Has_Discriminants (Id : E) return B is
1264 pragma Assert (Nkind (Id) in N_Entity);
1266 end Has_Discriminants;
1268 function Has_Dispatch_Table (Id : E) return B is
1270 pragma Assert (Is_Tagged_Type (Id));
1271 return Flag220 (Id);
1272 end Has_Dispatch_Table;
1274 function Has_Enumeration_Rep_Clause (Id : E) return B is
1276 pragma Assert (Is_Enumeration_Type (Id));
1278 end Has_Enumeration_Rep_Clause;
1280 function Has_Exit (Id : E) return B is
1285 function Has_External_Tag_Rep_Clause (Id : E) return B is
1287 pragma Assert (Is_Tagged_Type (Id));
1288 return Flag110 (Id);
1289 end Has_External_Tag_Rep_Clause;
1291 function Has_Forward_Instantiation (Id : E) return B is
1293 return Flag175 (Id);
1294 end Has_Forward_Instantiation;
1296 function Has_Fully_Qualified_Name (Id : E) return B is
1298 return Flag173 (Id);
1299 end Has_Fully_Qualified_Name;
1301 function Has_Gigi_Rep_Item (Id : E) return B is
1304 end Has_Gigi_Rep_Item;
1306 function Has_Homonym (Id : E) return B is
1311 function Has_Implicit_Dereference (Id : E) return B is
1313 return Flag251 (Id);
1314 end Has_Implicit_Dereference;
1316 function Has_Inheritable_Invariants (Id : E) return B is
1318 pragma Assert (Is_Type (Id));
1319 return Flag248 (Id);
1320 end Has_Inheritable_Invariants;
1322 function Has_Initial_Value (Id : E) return B is
1324 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1325 return Flag219 (Id);
1326 end Has_Initial_Value;
1328 function Has_Invariants (Id : E) return B is
1330 pragma Assert (Is_Type (Id)
1331 or else Ekind (Id) = E_Procedure
1332 or else Ekind (Id) = E_Generic_Procedure);
1333 return Flag232 (Id);
1336 function Has_Machine_Radix_Clause (Id : E) return B is
1338 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1340 end Has_Machine_Radix_Clause;
1342 function Has_Master_Entity (Id : E) return B is
1345 end Has_Master_Entity;
1347 function Has_Missing_Return (Id : E) return B is
1349 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1350 return Flag142 (Id);
1351 end Has_Missing_Return;
1353 function Has_Nested_Block_With_Handler (Id : E) return B is
1355 return Flag101 (Id);
1356 end Has_Nested_Block_With_Handler;
1358 function Has_Non_Standard_Rep (Id : E) return B is
1360 return Flag75 (Implementation_Base_Type (Id));
1361 end Has_Non_Standard_Rep;
1363 function Has_Object_Size_Clause (Id : E) return B is
1365 pragma Assert (Is_Type (Id));
1366 return Flag172 (Id);
1367 end Has_Object_Size_Clause;
1369 function Has_Per_Object_Constraint (Id : E) return B is
1371 return Flag154 (Id);
1372 end Has_Per_Object_Constraint;
1374 function Has_Persistent_BSS (Id : E) return B is
1376 return Flag188 (Id);
1377 end Has_Persistent_BSS;
1379 function Has_Postconditions (Id : E) return B is
1381 pragma Assert (Is_Subprogram (Id));
1382 return Flag240 (Id);
1383 end Has_Postconditions;
1385 function Has_Pragma_Controlled (Id : E) return B is
1387 pragma Assert (Is_Access_Type (Id));
1388 return Flag27 (Implementation_Base_Type (Id));
1389 end Has_Pragma_Controlled;
1391 function Has_Pragma_Elaborate_Body (Id : E) return B is
1393 return Flag150 (Id);
1394 end Has_Pragma_Elaborate_Body;
1396 function Has_Pragma_Inline (Id : E) return B is
1398 return Flag157 (Id);
1399 end Has_Pragma_Inline;
1401 function Has_Pragma_Inline_Always (Id : E) return B is
1403 return Flag230 (Id);
1404 end Has_Pragma_Inline_Always;
1406 function Has_Pragma_Ordered (Id : E) return B is
1408 pragma Assert (Is_Enumeration_Type (Id));
1409 return Flag198 (Implementation_Base_Type (Id));
1410 end Has_Pragma_Ordered;
1412 function Has_Pragma_Pack (Id : E) return B is
1414 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1415 return Flag121 (Implementation_Base_Type (Id));
1416 end Has_Pragma_Pack;
1418 function Has_Pragma_Preelab_Init (Id : E) return B is
1420 return Flag221 (Id);
1421 end Has_Pragma_Preelab_Init;
1423 function Has_Pragma_Pure (Id : E) return B is
1425 return Flag203 (Id);
1426 end Has_Pragma_Pure;
1428 function Has_Pragma_Pure_Function (Id : E) return B is
1430 return Flag179 (Id);
1431 end Has_Pragma_Pure_Function;
1433 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1435 return Flag169 (Id);
1436 end Has_Pragma_Thread_Local_Storage;
1438 function Has_Pragma_Unmodified (Id : E) return B is
1440 return Flag233 (Id);
1441 end Has_Pragma_Unmodified;
1443 function Has_Pragma_Unreferenced (Id : E) return B is
1445 return Flag180 (Id);
1446 end Has_Pragma_Unreferenced;
1448 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag212 (Id);
1452 end Has_Pragma_Unreferenced_Objects;
1454 function Has_Predicates (Id : E) return B is
1456 return Flag250 (Id);
1459 function Has_Primitive_Operations (Id : E) return B is
1461 pragma Assert (Is_Type (Id));
1462 return Flag120 (Base_Type (Id));
1463 end Has_Primitive_Operations;
1465 function Has_Private_Ancestor (Id : E) return B is
1467 return Flag151 (Id);
1468 end Has_Private_Ancestor;
1470 function Has_Private_Declaration (Id : E) return B is
1472 return Flag155 (Id);
1473 end Has_Private_Declaration;
1475 function Has_Qualified_Name (Id : E) return B is
1477 return Flag161 (Id);
1478 end Has_Qualified_Name;
1480 function Has_RACW (Id : E) return B is
1482 pragma Assert (Ekind (Id) = E_Package);
1483 return Flag214 (Id);
1486 function Has_Record_Rep_Clause (Id : E) return B is
1488 pragma Assert (Is_Record_Type (Id));
1489 return Flag65 (Implementation_Base_Type (Id));
1490 end Has_Record_Rep_Clause;
1492 function Has_Recursive_Call (Id : E) return B is
1494 pragma Assert (Is_Subprogram (Id));
1495 return Flag143 (Id);
1496 end Has_Recursive_Call;
1498 function Has_Size_Clause (Id : E) return B is
1501 end Has_Size_Clause;
1503 function Has_Small_Clause (Id : E) return B is
1506 end Has_Small_Clause;
1508 function Has_Specified_Layout (Id : E) return B is
1510 pragma Assert (Is_Type (Id));
1511 return Flag100 (Implementation_Base_Type (Id));
1512 end Has_Specified_Layout;
1514 function Has_Specified_Stream_Input (Id : E) return B is
1516 pragma Assert (Is_Type (Id));
1517 return Flag190 (Id);
1518 end Has_Specified_Stream_Input;
1520 function Has_Specified_Stream_Output (Id : E) return B is
1522 pragma Assert (Is_Type (Id));
1523 return Flag191 (Id);
1524 end Has_Specified_Stream_Output;
1526 function Has_Specified_Stream_Read (Id : E) return B is
1528 pragma Assert (Is_Type (Id));
1529 return Flag192 (Id);
1530 end Has_Specified_Stream_Read;
1532 function Has_Specified_Stream_Write (Id : E) return B is
1534 pragma Assert (Is_Type (Id));
1535 return Flag193 (Id);
1536 end Has_Specified_Stream_Write;
1538 function Has_Static_Discriminants (Id : E) return B is
1540 pragma Assert (Is_Type (Id));
1541 return Flag211 (Id);
1542 end Has_Static_Discriminants;
1544 function Has_Storage_Size_Clause (Id : E) return B is
1546 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1547 return Flag23 (Implementation_Base_Type (Id));
1548 end Has_Storage_Size_Clause;
1550 function Has_Stream_Size_Clause (Id : E) return B is
1552 return Flag184 (Id);
1553 end Has_Stream_Size_Clause;
1555 function Has_Subprogram_Descriptor (Id : E) return B is
1558 end Has_Subprogram_Descriptor;
1560 function Has_Task (Id : E) return B is
1562 return Flag30 (Base_Type (Id));
1565 function Has_Thunks (Id : E) return B is
1567 return Flag228 (Id);
1570 function Has_Unchecked_Union (Id : E) return B is
1572 return Flag123 (Base_Type (Id));
1573 end Has_Unchecked_Union;
1575 function Has_Unknown_Discriminants (Id : E) return B is
1577 pragma Assert (Is_Type (Id));
1579 end Has_Unknown_Discriminants;
1581 function Has_Up_Level_Access (Id : E) return B is
1584 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1585 return Flag215 (Id);
1586 end Has_Up_Level_Access;
1588 function Has_Volatile_Components (Id : E) return B is
1590 return Flag87 (Implementation_Base_Type (Id));
1591 end Has_Volatile_Components;
1593 function Has_Xref_Entry (Id : E) return B is
1595 return Flag182 (Implementation_Base_Type (Id));
1598 function Hiding_Loop_Variable (Id : E) return E is
1600 pragma Assert (Ekind (Id) = E_Variable);
1602 end Hiding_Loop_Variable;
1604 function Homonym (Id : E) return E is
1609 function Interface_Alias (Id : E) return E is
1611 pragma Assert (Is_Subprogram (Id));
1613 end Interface_Alias;
1615 function Interfaces (Id : E) return L is
1617 pragma Assert (Is_Record_Type (Id));
1618 return Elist25 (Id);
1621 function In_Package_Body (Id : E) return B is
1624 end In_Package_Body;
1626 function In_Private_Part (Id : E) return B is
1629 end In_Private_Part;
1631 function In_Use (Id : E) return B is
1633 pragma Assert (Nkind (Id) in N_Entity);
1637 function Inner_Instances (Id : E) return L is
1639 return Elist23 (Id);
1640 end Inner_Instances;
1642 function Interface_Name (Id : E) return N is
1647 function Is_Abstract_Subprogram (Id : E) return B is
1649 pragma Assert (Is_Overloadable (Id));
1651 end Is_Abstract_Subprogram;
1653 function Is_Abstract_Type (Id : E) return B is
1655 pragma Assert (Is_Type (Id));
1656 return Flag146 (Id);
1657 end Is_Abstract_Type;
1659 function Is_Local_Anonymous_Access (Id : E) return B is
1661 pragma Assert (Is_Access_Type (Id));
1662 return Flag194 (Id);
1663 end Is_Local_Anonymous_Access;
1665 function Is_Access_Constant (Id : E) return B is
1667 pragma Assert (Is_Access_Type (Id));
1669 end Is_Access_Constant;
1671 function Is_Ada_2005_Only (Id : E) return B is
1673 return Flag185 (Id);
1674 end Is_Ada_2005_Only;
1676 function Is_Ada_2012_Only (Id : E) return B is
1678 return Flag199 (Id);
1679 end Is_Ada_2012_Only;
1681 function Is_Aliased (Id : E) return B is
1683 pragma Assert (Nkind (Id) in N_Entity);
1687 function Is_AST_Entry (Id : E) return B is
1689 pragma Assert (Is_Entry (Id));
1690 return Flag132 (Id);
1693 function Is_Asynchronous (Id : E) return B is
1695 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1697 end Is_Asynchronous;
1699 function Is_Atomic (Id : E) return B is
1704 function Is_Bit_Packed_Array (Id : E) return B is
1706 return Flag122 (Implementation_Base_Type (Id));
1707 end Is_Bit_Packed_Array;
1709 function Is_Called (Id : E) return B is
1711 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1712 return Flag102 (Id);
1715 function Is_Character_Type (Id : E) return B is
1718 end Is_Character_Type;
1720 function Is_Child_Unit (Id : E) return B is
1725 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1728 end Is_Class_Wide_Equivalent_Type;
1730 function Is_Compilation_Unit (Id : E) return B is
1732 return Flag149 (Id);
1733 end Is_Compilation_Unit;
1735 function Is_Completely_Hidden (Id : E) return B is
1737 pragma Assert (Ekind (Id) = E_Discriminant);
1738 return Flag103 (Id);
1739 end Is_Completely_Hidden;
1741 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1744 end Is_Constr_Subt_For_U_Nominal;
1746 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1748 return Flag141 (Id);
1749 end Is_Constr_Subt_For_UN_Aliased;
1751 function Is_Constrained (Id : E) return B is
1753 pragma Assert (Nkind (Id) in N_Entity);
1757 function Is_Constructor (Id : E) return B is
1762 function Is_Controlled (Id : E) return B is
1764 return Flag42 (Base_Type (Id));
1767 function Is_Controlling_Formal (Id : E) return B is
1769 pragma Assert (Is_Formal (Id));
1771 end Is_Controlling_Formal;
1773 function Is_CPP_Class (Id : E) return B is
1778 function Is_Descendent_Of_Address (Id : E) return B is
1780 pragma Assert (Is_Type (Id));
1781 return Flag223 (Id);
1782 end Is_Descendent_Of_Address;
1784 function Is_Discrim_SO_Function (Id : E) return B is
1786 return Flag176 (Id);
1787 end Is_Discrim_SO_Function;
1789 function Is_Dispatch_Table_Entity (Id : E) return B is
1791 return Flag234 (Id);
1792 end Is_Dispatch_Table_Entity;
1794 function Is_Dispatching_Operation (Id : E) return B is
1796 pragma Assert (Nkind (Id) in N_Entity);
1798 end Is_Dispatching_Operation;
1800 function Is_Eliminated (Id : E) return B is
1802 return Flag124 (Id);
1805 function Is_Entry_Formal (Id : E) return B is
1808 end Is_Entry_Formal;
1810 function Is_Exported (Id : E) return B is
1815 function Is_First_Subtype (Id : E) return B is
1818 end Is_First_Subtype;
1820 function Is_For_Access_Subtype (Id : E) return B is
1822 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1823 return Flag118 (Id);
1824 end Is_For_Access_Subtype;
1826 function Is_Formal_Subprogram (Id : E) return B is
1828 return Flag111 (Id);
1829 end Is_Formal_Subprogram;
1831 function Is_Frozen (Id : E) return B is
1836 function Is_Generic_Actual_Type (Id : E) return B is
1838 pragma Assert (Is_Type (Id));
1840 end Is_Generic_Actual_Type;
1842 function Is_Generic_Instance (Id : E) return B is
1844 return Flag130 (Id);
1845 end Is_Generic_Instance;
1847 function Is_Generic_Type (Id : E) return B is
1849 pragma Assert (Nkind (Id) in N_Entity);
1851 end Is_Generic_Type;
1853 function Is_Hidden (Id : E) return B is
1858 function Is_Hidden_Open_Scope (Id : E) return B is
1860 return Flag171 (Id);
1861 end Is_Hidden_Open_Scope;
1863 function Is_Immediately_Visible (Id : E) return B is
1865 pragma Assert (Nkind (Id) in N_Entity);
1867 end Is_Immediately_Visible;
1869 function Is_Imported (Id : E) return B is
1874 function Is_Inlined (Id : E) return B is
1879 function Is_Interface (Id : E) return B is
1881 return Flag186 (Id);
1884 function Is_Instantiated (Id : E) return B is
1886 return Flag126 (Id);
1887 end Is_Instantiated;
1889 function Is_Internal (Id : E) return B is
1891 pragma Assert (Nkind (Id) in N_Entity);
1895 function Is_Interrupt_Handler (Id : E) return B is
1897 pragma Assert (Nkind (Id) in N_Entity);
1899 end Is_Interrupt_Handler;
1901 function Is_Intrinsic_Subprogram (Id : E) return B is
1904 end Is_Intrinsic_Subprogram;
1906 function Is_Itype (Id : E) return B is
1911 function Is_Known_Non_Null (Id : E) return B is
1914 end Is_Known_Non_Null;
1916 function Is_Known_Null (Id : E) return B is
1918 return Flag204 (Id);
1921 function Is_Known_Valid (Id : E) return B is
1923 return Flag170 (Id);
1926 function Is_Limited_Composite (Id : E) return B is
1928 return Flag106 (Id);
1929 end Is_Limited_Composite;
1931 function Is_Limited_Interface (Id : E) return B is
1933 return Flag197 (Id);
1934 end Is_Limited_Interface;
1936 function Is_Limited_Record (Id : E) return B is
1939 end Is_Limited_Record;
1941 function Is_Machine_Code_Subprogram (Id : E) return B is
1943 pragma Assert (Is_Subprogram (Id));
1944 return Flag137 (Id);
1945 end Is_Machine_Code_Subprogram;
1947 function Is_Non_Static_Subtype (Id : E) return B is
1949 pragma Assert (Is_Type (Id));
1950 return Flag109 (Id);
1951 end Is_Non_Static_Subtype;
1953 function Is_Null_Init_Proc (Id : E) return B is
1955 pragma Assert (Ekind (Id) = E_Procedure);
1956 return Flag178 (Id);
1957 end Is_Null_Init_Proc;
1959 function Is_Obsolescent (Id : E) return B is
1961 return Flag153 (Id);
1964 function Is_Only_Out_Parameter (Id : E) return B is
1966 pragma Assert (Is_Formal (Id));
1967 return Flag226 (Id);
1968 end Is_Only_Out_Parameter;
1970 function Is_Optional_Parameter (Id : E) return B is
1972 pragma Assert (Is_Formal (Id));
1973 return Flag134 (Id);
1974 end Is_Optional_Parameter;
1976 function Is_Package_Body_Entity (Id : E) return B is
1978 return Flag160 (Id);
1979 end Is_Package_Body_Entity;
1981 function Is_Packed (Id : E) return B is
1983 return Flag51 (Implementation_Base_Type (Id));
1986 function Is_Packed_Array_Type (Id : E) return B is
1988 return Flag138 (Id);
1989 end Is_Packed_Array_Type;
1991 function Is_Potentially_Use_Visible (Id : E) return B is
1993 pragma Assert (Nkind (Id) in N_Entity);
1995 end Is_Potentially_Use_Visible;
1997 function Is_Preelaborated (Id : E) return B is
2000 end Is_Preelaborated;
2002 function Is_Primitive (Id : E) return B is
2005 (Is_Overloadable (Id)
2006 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2007 return Flag218 (Id);
2010 function Is_Primitive_Wrapper (Id : E) return B is
2012 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2013 return Flag195 (Id);
2014 end Is_Primitive_Wrapper;
2016 function Is_Private_Composite (Id : E) return B is
2018 pragma Assert (Is_Type (Id));
2019 return Flag107 (Id);
2020 end Is_Private_Composite;
2022 function Is_Private_Descendant (Id : E) return B is
2025 end Is_Private_Descendant;
2027 function Is_Private_Primitive (Id : E) return B is
2029 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2030 return Flag245 (Id);
2031 end Is_Private_Primitive;
2033 function Is_Processed_Transient (Id : E) return B is
2035 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2036 return Flag252 (Id);
2037 end Is_Processed_Transient;
2039 function Is_Public (Id : E) return B is
2041 pragma Assert (Nkind (Id) in N_Entity);
2045 function Is_Pure (Id : E) return B is
2050 function Is_Pure_Unit_Access_Type (Id : E) return B is
2052 pragma Assert (Is_Access_Type (Id));
2053 return Flag189 (Id);
2054 end Is_Pure_Unit_Access_Type;
2056 function Is_RACW_Stub_Type (Id : E) return B is
2058 pragma Assert (Is_Type (Id));
2059 return Flag244 (Id);
2060 end Is_RACW_Stub_Type;
2062 function Is_Raised (Id : E) return B is
2064 pragma Assert (Ekind (Id) = E_Exception);
2065 return Flag224 (Id);
2068 function Is_Remote_Call_Interface (Id : E) return B is
2071 end Is_Remote_Call_Interface;
2073 function Is_Remote_Types (Id : E) return B is
2076 end Is_Remote_Types;
2078 function Is_Renaming_Of_Object (Id : E) return B is
2080 return Flag112 (Id);
2081 end Is_Renaming_Of_Object;
2083 function Is_Return_Object (Id : E) return B is
2085 return Flag209 (Id);
2086 end Is_Return_Object;
2088 function Is_Safe_To_Reevaluate (Id : E) return B is
2090 return Flag249 (Id);
2091 end Is_Safe_To_Reevaluate;
2093 function Is_Shared_Passive (Id : E) return B is
2096 end Is_Shared_Passive;
2098 function Is_Statically_Allocated (Id : E) return B is
2101 end Is_Statically_Allocated;
2103 function Is_Tag (Id : E) return B is
2105 pragma Assert (Nkind (Id) in N_Entity);
2109 function Is_Tagged_Type (Id : E) return B is
2114 function Is_Thunk (Id : E) return B is
2116 pragma Assert (Is_Subprogram (Id));
2117 return Flag225 (Id);
2120 function Is_Trivial_Subprogram (Id : E) return B is
2122 return Flag235 (Id);
2123 end Is_Trivial_Subprogram;
2125 function Is_True_Constant (Id : E) return B is
2127 return Flag163 (Id);
2128 end Is_True_Constant;
2130 function Is_Unchecked_Union (Id : E) return B is
2132 return Flag117 (Implementation_Base_Type (Id));
2133 end Is_Unchecked_Union;
2135 function Is_Underlying_Record_View (Id : E) return B is
2137 return Flag246 (Id);
2138 end Is_Underlying_Record_View;
2140 function Is_Unsigned_Type (Id : E) return B is
2142 pragma Assert (Is_Type (Id));
2143 return Flag144 (Id);
2144 end Is_Unsigned_Type;
2146 function Is_Valued_Procedure (Id : E) return B is
2148 pragma Assert (Ekind (Id) = E_Procedure);
2149 return Flag127 (Id);
2150 end Is_Valued_Procedure;
2152 function Is_Visible_Child_Unit (Id : E) return B is
2154 pragma Assert (Is_Child_Unit (Id));
2155 return Flag116 (Id);
2156 end Is_Visible_Child_Unit;
2158 function Is_Visible_Formal (Id : E) return B is
2160 return Flag206 (Id);
2161 end Is_Visible_Formal;
2163 function Is_VMS_Exception (Id : E) return B is
2165 return Flag133 (Id);
2166 end Is_VMS_Exception;
2168 function Is_Volatile (Id : E) return B is
2170 pragma Assert (Nkind (Id) in N_Entity);
2172 if Is_Type (Id) then
2173 return Flag16 (Base_Type (Id));
2179 function Itype_Printed (Id : E) return B is
2181 pragma Assert (Is_Itype (Id));
2182 return Flag202 (Id);
2185 function Kill_Elaboration_Checks (Id : E) return B is
2188 end Kill_Elaboration_Checks;
2190 function Kill_Range_Checks (Id : E) return B is
2193 end Kill_Range_Checks;
2195 function Kill_Tag_Checks (Id : E) return B is
2198 end Kill_Tag_Checks;
2200 function Known_To_Have_Preelab_Init (Id : E) return B is
2202 pragma Assert (Is_Type (Id));
2203 return Flag207 (Id);
2204 end Known_To_Have_Preelab_Init;
2206 function Last_Assignment (Id : E) return N is
2208 pragma Assert (Is_Assignable (Id));
2210 end Last_Assignment;
2212 function Last_Entity (Id : E) return E is
2217 function Limited_View (Id : E) return E is
2219 pragma Assert (Ekind (Id) = E_Package);
2223 function Lit_Indexes (Id : E) return E is
2225 pragma Assert (Is_Enumeration_Type (Id));
2229 function Lit_Strings (Id : E) return E is
2231 pragma Assert (Is_Enumeration_Type (Id));
2235 function Low_Bound_Tested (Id : E) return B is
2237 return Flag205 (Id);
2238 end Low_Bound_Tested;
2240 function Machine_Radix_10 (Id : E) return B is
2242 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2244 end Machine_Radix_10;
2246 function Master_Id (Id : E) return E is
2248 pragma Assert (Is_Access_Type (Id));
2252 function Materialize_Entity (Id : E) return B is
2254 return Flag168 (Id);
2255 end Materialize_Entity;
2257 function Mechanism (Id : E) return M is
2259 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2260 return UI_To_Int (Uint8 (Id));
2263 function Modulus (Id : E) return Uint is
2265 pragma Assert (Is_Modular_Integer_Type (Id));
2266 return Uint17 (Base_Type (Id));
2269 function Must_Be_On_Byte_Boundary (Id : E) return B is
2271 pragma Assert (Is_Type (Id));
2272 return Flag183 (Id);
2273 end Must_Be_On_Byte_Boundary;
2275 function Must_Have_Preelab_Init (Id : E) return B is
2277 pragma Assert (Is_Type (Id));
2278 return Flag208 (Id);
2279 end Must_Have_Preelab_Init;
2281 function Needs_Debug_Info (Id : E) return B is
2283 return Flag147 (Id);
2284 end Needs_Debug_Info;
2286 function Needs_No_Actuals (Id : E) return B is
2289 (Is_Overloadable (Id)
2290 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2292 end Needs_No_Actuals;
2294 function Never_Set_In_Source (Id : E) return B is
2296 return Flag115 (Id);
2297 end Never_Set_In_Source;
2299 function Next_Inlined_Subprogram (Id : E) return E is
2302 end Next_Inlined_Subprogram;
2304 function No_Pool_Assigned (Id : E) return B is
2306 pragma Assert (Is_Access_Type (Id));
2307 return Flag131 (Root_Type (Id));
2308 end No_Pool_Assigned;
2310 function No_Return (Id : E) return B is
2312 return Flag113 (Id);
2315 function No_Strict_Aliasing (Id : E) return B is
2317 pragma Assert (Is_Access_Type (Id));
2318 return Flag136 (Base_Type (Id));
2319 end No_Strict_Aliasing;
2321 function Non_Binary_Modulus (Id : E) return B is
2323 pragma Assert (Is_Type (Id));
2324 return Flag58 (Base_Type (Id));
2325 end Non_Binary_Modulus;
2327 function Non_Limited_View (Id : E) return E is
2329 pragma Assert (Ekind (Id) in Incomplete_Kind);
2331 end Non_Limited_View;
2333 function Nonzero_Is_True (Id : E) return B is
2335 pragma Assert (Root_Type (Id) = Standard_Boolean);
2336 return Flag162 (Base_Type (Id));
2337 end Nonzero_Is_True;
2339 function Normalized_First_Bit (Id : E) return U is
2341 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2343 end Normalized_First_Bit;
2345 function Normalized_Position (Id : E) return U is
2347 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2349 end Normalized_Position;
2351 function Normalized_Position_Max (Id : E) return U is
2353 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2355 end Normalized_Position_Max;
2357 function OK_To_Rename (Id : E) return B is
2359 pragma Assert (Ekind (Id) = E_Variable);
2360 return Flag247 (Id);
2363 function OK_To_Reorder_Components (Id : E) return B is
2365 pragma Assert (Is_Record_Type (Id));
2366 return Flag239 (Base_Type (Id));
2367 end OK_To_Reorder_Components;
2369 function Optimize_Alignment_Space (Id : E) return B is
2372 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2373 return Flag241 (Id);
2374 end Optimize_Alignment_Space;
2376 function Optimize_Alignment_Time (Id : E) return B is
2379 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2380 return Flag242 (Id);
2381 end Optimize_Alignment_Time;
2383 function Original_Access_Type (Id : E) return E is
2385 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2387 end Original_Access_Type;
2389 function Original_Array_Type (Id : E) return E is
2391 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2393 end Original_Array_Type;
2395 function Original_Record_Component (Id : E) return E is
2397 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2399 end Original_Record_Component;
2401 function Overlays_Constant (Id : E) return B is
2403 return Flag243 (Id);
2404 end Overlays_Constant;
2406 function Overridden_Operation (Id : E) return E is
2409 end Overridden_Operation;
2411 function Package_Instantiation (Id : E) return N is
2413 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2415 end Package_Instantiation;
2417 function Packed_Array_Type (Id : E) return E is
2419 pragma Assert (Is_Array_Type (Id));
2421 end Packed_Array_Type;
2423 function Parent_Subtype (Id : E) return E is
2425 pragma Assert (Is_Record_Type (Id));
2426 return Node19 (Base_Type (Id));
2429 function Postcondition_Proc (Id : E) return E is
2431 pragma Assert (Ekind (Id) = E_Procedure);
2433 end Postcondition_Proc;
2435 function PPC_Wrapper (Id : E) return E is
2437 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2441 function Prival (Id : E) return E is
2443 pragma Assert (Is_Protected_Component (Id));
2447 function Prival_Link (Id : E) return E is
2449 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2453 function Private_Dependents (Id : E) return L is
2455 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2456 return Elist18 (Id);
2457 end Private_Dependents;
2459 function Private_View (Id : E) return N is
2461 pragma Assert (Is_Private_Type (Id));
2465 function Protected_Body_Subprogram (Id : E) return E is
2467 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2469 end Protected_Body_Subprogram;
2471 function Protected_Formal (Id : E) return E is
2473 pragma Assert (Is_Formal (Id));
2475 end Protected_Formal;
2477 function Protection_Object (Id : E) return E is
2480 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2482 end Protection_Object;
2484 function Reachable (Id : E) return B is
2489 function Referenced (Id : E) return B is
2491 return Flag156 (Id);
2494 function Referenced_As_LHS (Id : E) return B is
2497 end Referenced_As_LHS;
2499 function Referenced_As_Out_Parameter (Id : E) return B is
2501 return Flag227 (Id);
2502 end Referenced_As_Out_Parameter;
2504 function Register_Exception_Call (Id : E) return N is
2506 pragma Assert (Ekind (Id) = E_Exception);
2508 end Register_Exception_Call;
2510 function Related_Array_Object (Id : E) return E is
2512 pragma Assert (Is_Array_Type (Id));
2514 end Related_Array_Object;
2516 function Related_Expression (Id : E) return N is
2518 pragma Assert (Ekind (Id) in Type_Kind
2519 or else Ekind_In (Id, E_Constant, E_Variable));
2521 end Related_Expression;
2523 function Related_Instance (Id : E) return E is
2525 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2527 end Related_Instance;
2529 function Related_Type (Id : E) return E is
2531 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2535 function Relative_Deadline_Variable (Id : E) return E is
2537 pragma Assert (Is_Task_Type (Id));
2538 return Node26 (Implementation_Base_Type (Id));
2539 end Relative_Deadline_Variable;
2541 function Renamed_Entity (Id : E) return N is
2546 function Renamed_In_Spec (Id : E) return B is
2548 pragma Assert (Ekind (Id) = E_Package);
2549 return Flag231 (Id);
2550 end Renamed_In_Spec;
2552 function Renamed_Object (Id : E) return N is
2557 function Renaming_Map (Id : E) return U is
2562 function Requires_Overriding (Id : E) return B is
2564 pragma Assert (Is_Overloadable (Id));
2565 return Flag213 (Id);
2566 end Requires_Overriding;
2568 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2570 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2572 end Return_Flag_Or_Transient_Decl;
2574 function Return_Present (Id : E) return B is
2579 function Return_Applies_To (Id : E) return N is
2582 end Return_Applies_To;
2584 function Returns_By_Ref (Id : E) return B is
2589 function Reverse_Bit_Order (Id : E) return B is
2591 pragma Assert (Is_Record_Type (Id));
2592 return Flag164 (Base_Type (Id));
2593 end Reverse_Bit_Order;
2595 function RM_Size (Id : E) return U is
2597 pragma Assert (Is_Type (Id));
2601 function Scalar_Range (Id : E) return N is
2606 function Scale_Value (Id : E) return U is
2611 function Scope_Depth_Value (Id : E) return U is
2614 end Scope_Depth_Value;
2616 function Sec_Stack_Needed_For_Return (Id : E) return B is
2618 return Flag167 (Id);
2619 end Sec_Stack_Needed_For_Return;
2621 function Shadow_Entities (Id : E) return S is
2623 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2625 end Shadow_Entities;
2627 function Shared_Var_Procs_Instance (Id : E) return E is
2629 pragma Assert (Ekind (Id) = E_Variable);
2631 end Shared_Var_Procs_Instance;
2633 function Size_Check_Code (Id : E) return N is
2635 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2637 end Size_Check_Code;
2639 function Size_Depends_On_Discriminant (Id : E) return B is
2641 return Flag177 (Id);
2642 end Size_Depends_On_Discriminant;
2644 function Size_Known_At_Compile_Time (Id : E) return B is
2647 end Size_Known_At_Compile_Time;
2649 function Small_Value (Id : E) return R is
2651 pragma Assert (Is_Fixed_Point_Type (Id));
2652 return Ureal21 (Id);
2655 function Spec_Entity (Id : E) return E is
2657 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2661 function Static_Predicate (Id : E) return S is
2663 pragma Assert (Is_Discrete_Type (Id));
2665 end Static_Predicate;
2667 function Storage_Size_Variable (Id : E) return E is
2669 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2670 return Node15 (Implementation_Base_Type (Id));
2671 end Storage_Size_Variable;
2673 function Static_Elaboration_Desired (Id : E) return B is
2675 pragma Assert (Ekind (Id) = E_Package);
2677 end Static_Elaboration_Desired;
2679 function Static_Initialization (Id : E) return N is
2682 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2684 end Static_Initialization;
2686 function Stored_Constraint (Id : E) return L is
2689 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2690 return Elist23 (Id);
2691 end Stored_Constraint;
2693 function Strict_Alignment (Id : E) return B is
2695 return Flag145 (Implementation_Base_Type (Id));
2696 end Strict_Alignment;
2698 function String_Literal_Length (Id : E) return U is
2701 end String_Literal_Length;
2703 function String_Literal_Low_Bound (Id : E) return N is
2706 end String_Literal_Low_Bound;
2708 function Subprograms_For_Type (Id : E) return E is
2710 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2712 end Subprograms_For_Type;
2714 function Suppress_Elaboration_Warnings (Id : E) return B is
2716 return Flag148 (Id);
2717 end Suppress_Elaboration_Warnings;
2719 function Suppress_Initialization (Id : E) return B is
2721 pragma Assert (Is_Type (Id));
2722 return Flag105 (Id);
2723 end Suppress_Initialization;
2725 function Suppress_Style_Checks (Id : E) return B is
2727 return Flag165 (Id);
2728 end Suppress_Style_Checks;
2730 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2732 return Flag217 (Id);
2733 end Suppress_Value_Tracking_On_Call;
2735 function Task_Body_Procedure (Id : E) return N is
2737 pragma Assert (Ekind (Id) in Task_Kind);
2739 end Task_Body_Procedure;
2741 function Treat_As_Volatile (Id : E) return B is
2744 end Treat_As_Volatile;
2746 function Underlying_Full_View (Id : E) return E is
2748 pragma Assert (Ekind (Id) in Private_Kind);
2750 end Underlying_Full_View;
2752 function Underlying_Record_View (Id : E) return E is
2755 end Underlying_Record_View;
2757 function Universal_Aliasing (Id : E) return B is
2759 pragma Assert (Is_Type (Id));
2760 return Flag216 (Base_Type (Id));
2761 end Universal_Aliasing;
2763 function Unset_Reference (Id : E) return N is
2766 end Unset_Reference;
2768 function Used_As_Generic_Actual (Id : E) return B is
2770 return Flag222 (Id);
2771 end Used_As_Generic_Actual;
2773 function Uses_Sec_Stack (Id : E) return B is
2778 function Warnings_Off (Id : E) return B is
2783 function Warnings_Off_Used (Id : E) return B is
2785 return Flag236 (Id);
2786 end Warnings_Off_Used;
2788 function Warnings_Off_Used_Unmodified (Id : E) return B is
2790 return Flag237 (Id);
2791 end Warnings_Off_Used_Unmodified;
2793 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2795 return Flag238 (Id);
2796 end Warnings_Off_Used_Unreferenced;
2798 function Wrapped_Entity (Id : E) return E is
2800 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2801 and then Is_Primitive_Wrapper (Id));
2805 function Was_Hidden (Id : E) return B is
2807 return Flag196 (Id);
2810 ------------------------------
2811 -- Classification Functions --
2812 ------------------------------
2814 function Is_Access_Type (Id : E) return B is
2816 return Ekind (Id) in Access_Kind;
2819 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2821 return Ekind (Id) in Access_Protected_Kind;
2822 end Is_Access_Protected_Subprogram_Type;
2824 function Is_Access_Subprogram_Type (Id : E) return B is
2826 return Ekind (Id) in Access_Subprogram_Kind;
2827 end Is_Access_Subprogram_Type;
2829 function Is_Aggregate_Type (Id : E) return B is
2831 return Ekind (Id) in Aggregate_Kind;
2832 end Is_Aggregate_Type;
2834 function Is_Array_Type (Id : E) return B is
2836 return Ekind (Id) in Array_Kind;
2839 function Is_Assignable (Id : E) return B is
2841 return Ekind (Id) in Assignable_Kind;
2844 function Is_Class_Wide_Type (Id : E) return B is
2846 return Ekind (Id) in Class_Wide_Kind;
2847 end Is_Class_Wide_Type;
2849 function Is_Composite_Type (Id : E) return B is
2851 return Ekind (Id) in Composite_Kind;
2852 end Is_Composite_Type;
2854 function Is_Concurrent_Body (Id : E) return B is
2856 return Ekind (Id) in
2857 Concurrent_Body_Kind;
2858 end Is_Concurrent_Body;
2860 function Is_Concurrent_Record_Type (Id : E) return B is
2863 end Is_Concurrent_Record_Type;
2865 function Is_Concurrent_Type (Id : E) return B is
2867 return Ekind (Id) in Concurrent_Kind;
2868 end Is_Concurrent_Type;
2870 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2872 return Ekind (Id) in
2873 Decimal_Fixed_Point_Kind;
2874 end Is_Decimal_Fixed_Point_Type;
2876 function Is_Digits_Type (Id : E) return B is
2878 return Ekind (Id) in Digits_Kind;
2881 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2883 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2884 end Is_Discrete_Or_Fixed_Point_Type;
2886 function Is_Discrete_Type (Id : E) return B is
2888 return Ekind (Id) in Discrete_Kind;
2889 end Is_Discrete_Type;
2891 function Is_Elementary_Type (Id : E) return B is
2893 return Ekind (Id) in Elementary_Kind;
2894 end Is_Elementary_Type;
2896 function Is_Entry (Id : E) return B is
2898 return Ekind (Id) in Entry_Kind;
2901 function Is_Enumeration_Type (Id : E) return B is
2903 return Ekind (Id) in
2905 end Is_Enumeration_Type;
2907 function Is_Fixed_Point_Type (Id : E) return B is
2909 return Ekind (Id) in
2911 end Is_Fixed_Point_Type;
2913 function Is_Floating_Point_Type (Id : E) return B is
2915 return Ekind (Id) in Float_Kind;
2916 end Is_Floating_Point_Type;
2918 function Is_Formal (Id : E) return B is
2920 return Ekind (Id) in Formal_Kind;
2923 function Is_Formal_Object (Id : E) return B is
2925 return Ekind (Id) in Formal_Object_Kind;
2926 end Is_Formal_Object;
2928 function Is_Generic_Subprogram (Id : E) return B is
2930 return Ekind (Id) in Generic_Subprogram_Kind;
2931 end Is_Generic_Subprogram;
2933 function Is_Generic_Unit (Id : E) return B is
2935 return Ekind (Id) in Generic_Unit_Kind;
2936 end Is_Generic_Unit;
2938 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2940 return Ekind (Id) in
2941 Incomplete_Or_Private_Kind;
2942 end Is_Incomplete_Or_Private_Type;
2944 function Is_Incomplete_Type (Id : E) return B is
2946 return Ekind (Id) in
2948 end Is_Incomplete_Type;
2950 function Is_Integer_Type (Id : E) return B is
2952 return Ekind (Id) in Integer_Kind;
2953 end Is_Integer_Type;
2955 function Is_Modular_Integer_Type (Id : E) return B is
2957 return Ekind (Id) in
2958 Modular_Integer_Kind;
2959 end Is_Modular_Integer_Type;
2961 function Is_Named_Number (Id : E) return B is
2963 return Ekind (Id) in Named_Kind;
2964 end Is_Named_Number;
2966 function Is_Numeric_Type (Id : E) return B is
2968 return Ekind (Id) in Numeric_Kind;
2969 end Is_Numeric_Type;
2971 function Is_Object (Id : E) return B is
2973 return Ekind (Id) in Object_Kind;
2976 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2978 return Ekind (Id) in
2979 Ordinary_Fixed_Point_Kind;
2980 end Is_Ordinary_Fixed_Point_Type;
2982 function Is_Overloadable (Id : E) return B is
2984 return Ekind (Id) in Overloadable_Kind;
2985 end Is_Overloadable;
2987 function Is_Private_Type (Id : E) return B is
2989 return Ekind (Id) in Private_Kind;
2990 end Is_Private_Type;
2992 function Is_Protected_Type (Id : E) return B is
2994 return Ekind (Id) in Protected_Kind;
2995 end Is_Protected_Type;
2997 function Is_Real_Type (Id : E) return B is
2999 return Ekind (Id) in Real_Kind;
3002 function Is_Record_Type (Id : E) return B is
3004 return Ekind (Id) in Record_Kind;
3007 function Is_Scalar_Type (Id : E) return B is
3009 return Ekind (Id) in Scalar_Kind;
3012 function Is_Signed_Integer_Type (Id : E) return B is
3014 return Ekind (Id) in Signed_Integer_Kind;
3015 end Is_Signed_Integer_Type;
3017 function Is_Subprogram (Id : E) return B is
3019 return Ekind (Id) in Subprogram_Kind;
3022 function Is_Task_Type (Id : E) return B is
3024 return Ekind (Id) in Task_Kind;
3027 function Is_Type (Id : E) return B is
3029 return Ekind (Id) in Type_Kind;
3032 ------------------------------
3033 -- Attribute Set Procedures --
3034 ------------------------------
3036 -- Note: in many of these set procedures an "obvious" assertion is missing.
3037 -- The reason for this is that in many cases, a field is set before the
3038 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3039 -- it is possible to add assertions that specifically include the E_Void
3040 -- possibility, but in some cases, we just omit the assertions.
3042 procedure Set_Accept_Address (Id : E; V : L) is
3044 Set_Elist21 (Id, V);
3045 end Set_Accept_Address;
3047 procedure Set_Access_Disp_Table (Id : E; V : L) is
3049 pragma Assert (Ekind (Id) = E_Record_Type
3050 and then Id = Implementation_Base_Type (Id));
3051 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3052 Set_Elist16 (Id, V);
3053 end Set_Access_Disp_Table;
3055 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3058 end Set_Associated_Formal_Package;
3060 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3063 end Set_Associated_Node_For_Itype;
3065 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3067 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3069 end Set_Associated_Storage_Pool;
3071 procedure Set_Actual_Subtype (Id : E; V : E) is
3074 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3075 or else Is_Formal (Id));
3077 end Set_Actual_Subtype;
3079 procedure Set_Address_Taken (Id : E; V : B := True) is
3081 Set_Flag104 (Id, V);
3082 end Set_Address_Taken;
3084 procedure Set_Alias (Id : E; V : E) is
3087 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3091 procedure Set_Alignment (Id : E; V : U) is
3093 pragma Assert (Is_Type (Id)
3094 or else Is_Formal (Id)
3095 or else Ekind_In (Id, E_Loop_Parameter,
3102 procedure Set_Barrier_Function (Id : E; V : N) is
3104 pragma Assert (Is_Entry (Id));
3106 end Set_Barrier_Function;
3108 procedure Set_Block_Node (Id : E; V : N) is
3110 pragma Assert (Ekind (Id) = E_Block);
3114 procedure Set_Body_Entity (Id : E; V : E) is
3116 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3118 end Set_Body_Entity;
3120 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3123 (Ekind (Id) = E_Package
3124 or else Is_Subprogram (Id)
3125 or else Is_Generic_Unit (Id));
3127 end Set_Body_Needed_For_SAL;
3129 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3131 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3132 Set_Flag125 (Id, V);
3133 end Set_C_Pass_By_Copy;
3135 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3138 end Set_Can_Never_Be_Null;
3140 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3143 end Set_Checks_May_Be_Suppressed;
3145 procedure Set_Class_Wide_Type (Id : E; V : E) is
3147 pragma Assert (Is_Type (Id));
3149 end Set_Class_Wide_Type;
3151 procedure Set_Cloned_Subtype (Id : E; V : E) is
3153 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3155 end Set_Cloned_Subtype;
3157 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3159 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3161 end Set_Component_Bit_Offset;
3163 procedure Set_Component_Clause (Id : E; V : N) is
3165 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3167 end Set_Component_Clause;
3169 procedure Set_Component_Size (Id : E; V : U) is
3171 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3173 end Set_Component_Size;
3175 procedure Set_Component_Type (Id : E; V : E) is
3177 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3179 end Set_Component_Type;
3181 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3184 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3186 end Set_Corresponding_Concurrent_Type;
3188 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3190 pragma Assert (Ekind (Id) = E_Discriminant);
3192 end Set_Corresponding_Discriminant;
3194 procedure Set_Corresponding_Equality (Id : E; V : E) is
3197 (Ekind (Id) = E_Function
3198 and then not Comes_From_Source (Id)
3199 and then Chars (Id) = Name_Op_Ne);
3201 end Set_Corresponding_Equality;
3203 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3205 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3207 end Set_Corresponding_Protected_Entry;
3209 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3211 pragma Assert (Is_Concurrent_Type (Id));
3213 end Set_Corresponding_Record_Type;
3215 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3218 end Set_Corresponding_Remote_Type;
3220 procedure Set_Current_Use_Clause (Id : E; V : E) is
3222 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3224 end Set_Current_Use_Clause;
3226 procedure Set_Current_Value (Id : E; V : N) is
3228 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3230 end Set_Current_Value;
3232 procedure Set_CR_Discriminant (Id : E; V : E) is
3235 end Set_CR_Discriminant;
3237 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3239 Set_Flag166 (Id, V);
3240 end Set_Debug_Info_Off;
3242 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3245 end Set_Debug_Renaming_Link;
3247 procedure Set_Default_Expr_Function (Id : E; V : E) is
3249 pragma Assert (Is_Formal (Id));
3251 end Set_Default_Expr_Function;
3253 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3255 Set_Flag108 (Id, V);
3256 end Set_Default_Expressions_Processed;
3258 procedure Set_Default_Value (Id : E; V : N) is
3260 pragma Assert (Is_Formal (Id));
3262 end Set_Default_Value;
3264 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3268 or else Is_Task_Type (Id)
3269 or else Ekind (Id) = E_Block);
3270 Set_Flag114 (Id, V);
3271 end Set_Delay_Cleanups;
3273 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3276 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3279 end Set_Delay_Subprogram_Descriptors;
3281 procedure Set_Delta_Value (Id : E; V : R) is
3283 pragma Assert (Is_Fixed_Point_Type (Id));
3284 Set_Ureal18 (Id, V);
3285 end Set_Delta_Value;
3287 procedure Set_Dependent_Instances (Id : E; V : L) is
3289 pragma Assert (Is_Generic_Instance (Id));
3291 end Set_Dependent_Instances;
3293 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3295 pragma Assert (Nkind (Id) in N_Entity);
3297 end Set_Depends_On_Private;
3299 procedure Set_Digits_Value (Id : E; V : U) is
3302 (Is_Floating_Point_Type (Id)
3303 or else Is_Decimal_Fixed_Point_Type (Id));
3305 end Set_Digits_Value;
3307 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3310 end Set_Directly_Designated_Type;
3312 procedure Set_Discard_Names (Id : E; V : B := True) is
3315 end Set_Discard_Names;
3317 procedure Set_Discriminal (Id : E; V : E) is
3319 pragma Assert (Ekind (Id) = E_Discriminant);
3321 end Set_Discriminal;
3323 procedure Set_Discriminal_Link (Id : E; V : E) is
3326 end Set_Discriminal_Link;
3328 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3330 pragma Assert (Ekind (Id) = E_Component);
3332 end Set_Discriminant_Checking_Func;
3334 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3336 pragma Assert (Nkind (Id) in N_Entity);
3337 Set_Elist21 (Id, V);
3338 end Set_Discriminant_Constraint;
3340 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3343 end Set_Discriminant_Default_Value;
3345 procedure Set_Discriminant_Number (Id : E; V : U) is
3348 end Set_Discriminant_Number;
3350 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3352 pragma Assert (Ekind (Id) = E_Record_Type
3353 and then Id = Implementation_Base_Type (Id));
3354 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3355 Set_Elist26 (Id, V);
3356 end Set_Dispatch_Table_Wrappers;
3358 procedure Set_DT_Entry_Count (Id : E; V : U) is
3360 pragma Assert (Ekind (Id) = E_Component);
3362 end Set_DT_Entry_Count;
3364 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3366 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3368 end Set_DT_Offset_To_Top_Func;
3370 procedure Set_DT_Position (Id : E; V : U) is
3372 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3374 end Set_DT_Position;
3376 procedure Set_DTC_Entity (Id : E; V : E) is
3378 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3382 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3384 pragma Assert (Ekind (Id) = E_Package);
3385 Set_Flag210 (Id, V);
3386 end Set_Elaborate_Body_Desirable;
3388 procedure Set_Elaboration_Entity (Id : E; V : E) is
3393 Ekind (Id) = E_Package
3395 Is_Generic_Unit (Id));
3397 end Set_Elaboration_Entity;
3399 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3404 Ekind (Id) = E_Package
3406 Is_Generic_Unit (Id));
3407 Set_Flag174 (Id, V);
3408 end Set_Elaboration_Entity_Required;
3410 procedure Set_Enclosing_Scope (Id : E; V : E) is
3413 end Set_Enclosing_Scope;
3415 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3417 pragma Assert (Is_Entry (Id));
3418 Set_Flag152 (Id, V);
3419 end Set_Entry_Accepted;
3421 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3424 end Set_Entry_Bodies_Array;
3426 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3429 end Set_Entry_Cancel_Parameter;
3431 procedure Set_Entry_Component (Id : E; V : E) is
3434 end Set_Entry_Component;
3436 procedure Set_Entry_Formal (Id : E; V : E) is
3439 end Set_Entry_Formal;
3441 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3443 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3445 end Set_Entry_Index_Constant;
3447 procedure Set_Contract (Id : E; V : N) is
3450 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3451 or else Is_Subprogram (Id)
3452 or else Is_Generic_Subprogram (Id));
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
3511 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3513 end Set_Extra_Accessibility;
3515 procedure Set_Extra_Constrained (Id : E; V : E) is
3517 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3519 end Set_Extra_Constrained;
3521 procedure Set_Extra_Formal (Id : E; V : E) is
3524 end Set_Extra_Formal;
3526 procedure Set_Extra_Formals (Id : E; V : E) is
3529 (Is_Overloadable (Id)
3530 or else Ekind_In (Id, E_Entry_Family,
3532 E_Subprogram_Type));
3534 end Set_Extra_Formals;
3536 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3539 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3540 Set_Flag229 (Id, V);
3541 end Set_Can_Use_Internal_Rep;
3543 procedure Set_Finalization_Master (Id : E; V : E) is
3545 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3547 end Set_Finalization_Master;
3549 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3551 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3552 Set_Flag158 (Id, V);
3553 end Set_Finalize_Storage_Only;
3555 procedure Set_Finalizer (Id : E; V : E) is
3558 (Ekind (Id) = E_Package
3559 or else Ekind (Id) = E_Package_Body);
3563 procedure Set_First_Entity (Id : E; V : E) is
3566 end Set_First_Entity;
3568 procedure Set_First_Exit_Statement (Id : E; V : N) is
3570 pragma Assert (Ekind (Id) = E_Loop);
3572 end Set_First_Exit_Statement;
3574 procedure Set_First_Index (Id : E; V : N) is
3576 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3578 end Set_First_Index;
3580 procedure Set_First_Literal (Id : E; V : E) is
3582 pragma Assert (Is_Enumeration_Type (Id));
3584 end Set_First_Literal;
3586 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3588 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3590 end Set_First_Optional_Parameter;
3592 procedure Set_First_Private_Entity (Id : E; V : E) is
3594 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3595 or else Ekind (Id) in Concurrent_Kind);
3597 end Set_First_Private_Entity;
3599 procedure Set_First_Rep_Item (Id : E; V : N) is
3602 end Set_First_Rep_Item;
3604 procedure Set_Float_Rep (Id : E; V : F) is
3605 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3607 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3610 procedure Set_Freeze_Node (Id : E; V : N) is
3613 end Set_Freeze_Node;
3615 procedure Set_From_With_Type (Id : E; V : B := True) is
3619 or else Ekind (Id) = E_Package);
3620 Set_Flag159 (Id, V);
3621 end Set_From_With_Type;
3623 procedure Set_Full_View (Id : E; V : E) is
3625 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3629 procedure Set_Generic_Homonym (Id : E; V : E) is
3632 end Set_Generic_Homonym;
3634 procedure Set_Generic_Renamings (Id : E; V : L) is
3636 Set_Elist23 (Id, V);
3637 end Set_Generic_Renamings;
3639 procedure Set_Handler_Records (Id : E; V : S) is
3642 end Set_Handler_Records;
3644 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3646 pragma Assert (Id = Base_Type (Id));
3647 Set_Flag135 (Id, V);
3648 end Set_Has_Aliased_Components;
3650 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3653 end Set_Has_Alignment_Clause;
3655 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3658 end Set_Has_All_Calls_Remote;
3660 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3662 Set_Flag201 (Id, V);
3663 end Set_Has_Anon_Block_Suffix;
3665 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3667 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3669 end Set_Has_Atomic_Components;
3671 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3674 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3675 Set_Flag139 (Id, V);
3676 end Set_Has_Biased_Representation;
3678 procedure Set_Has_Completion (Id : E; V : B := True) is
3681 end Set_Has_Completion;
3683 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3685 pragma Assert (Is_Type (Id));
3687 end Set_Has_Completion_In_Body;
3689 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3691 pragma Assert (Ekind (Id) = E_Record_Type);
3692 Set_Flag140 (Id, V);
3693 end Set_Has_Complex_Representation;
3695 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3697 pragma Assert (Ekind (Id) = E_Array_Type);
3699 end Set_Has_Component_Size_Clause;
3701 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3703 pragma Assert (Is_Type (Id));
3704 Set_Flag187 (Id, V);
3705 end Set_Has_Constrained_Partial_View;
3707 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3709 Set_Flag181 (Id, V);
3710 end Set_Has_Contiguous_Rep;
3712 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3714 pragma Assert (Id = Base_Type (Id));
3716 end Set_Has_Controlled_Component;
3718 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3721 end Set_Has_Controlling_Result;
3723 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3725 Set_Flag119 (Id, V);
3726 end Set_Has_Convention_Pragma;
3728 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3731 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3732 and then Is_Base_Type (Id));
3734 end Set_Has_Default_Aspect;
3736 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3738 pragma Assert (Nkind (Id) in N_Entity);
3739 Set_Flag200 (Id, V);
3740 end Set_Has_Delayed_Aspects;
3742 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3744 pragma Assert (Nkind (Id) in N_Entity);
3746 end Set_Has_Delayed_Freeze;
3748 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3750 pragma Assert (Nkind (Id) in N_Entity);
3752 end Set_Has_Discriminants;
3754 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3756 pragma Assert (Ekind (Id) = E_Record_Type
3757 and then Is_Tagged_Type (Id));
3758 Set_Flag220 (Id, V);
3759 end Set_Has_Dispatch_Table;
3761 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3763 pragma Assert (Is_Enumeration_Type (Id));
3765 end Set_Has_Enumeration_Rep_Clause;
3767 procedure Set_Has_Exit (Id : E; V : B := True) is
3772 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3774 pragma Assert (Is_Tagged_Type (Id));
3775 Set_Flag110 (Id, V);
3776 end Set_Has_External_Tag_Rep_Clause;
3778 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3780 Set_Flag175 (Id, V);
3781 end Set_Has_Forward_Instantiation;
3783 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3785 Set_Flag173 (Id, V);
3786 end Set_Has_Fully_Qualified_Name;
3788 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3791 end Set_Has_Gigi_Rep_Item;
3793 procedure Set_Has_Homonym (Id : E; V : B := True) is
3796 end Set_Has_Homonym;
3798 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
3800 Set_Flag251 (Id, V);
3801 end Set_Has_Implicit_Dereference;
3803 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3805 pragma Assert (Is_Type (Id));
3806 Set_Flag248 (Id, V);
3807 end Set_Has_Inheritable_Invariants;
3809 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3811 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3812 Set_Flag219 (Id, V);
3813 end Set_Has_Initial_Value;
3815 procedure Set_Has_Invariants (Id : E; V : B := True) is
3817 pragma Assert (Is_Type (Id)
3818 or else Ekind (Id) = E_Procedure
3819 or else Ekind (Id) = E_Void);
3820 Set_Flag232 (Id, V);
3821 end Set_Has_Invariants;
3823 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3825 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3827 end Set_Has_Machine_Radix_Clause;
3829 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3832 end Set_Has_Master_Entity;
3834 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3836 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3837 Set_Flag142 (Id, V);
3838 end Set_Has_Missing_Return;
3840 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3842 Set_Flag101 (Id, V);
3843 end Set_Has_Nested_Block_With_Handler;
3845 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3847 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3848 Set_Flag215 (Id, V);
3849 end Set_Has_Up_Level_Access;
3851 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3853 pragma Assert (Id = Base_Type (Id));
3855 end Set_Has_Non_Standard_Rep;
3857 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3859 pragma Assert (Is_Type (Id));
3860 Set_Flag172 (Id, V);
3861 end Set_Has_Object_Size_Clause;
3863 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3865 Set_Flag154 (Id, V);
3866 end Set_Has_Per_Object_Constraint;
3868 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3870 Set_Flag188 (Id, V);
3871 end Set_Has_Persistent_BSS;
3873 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3875 pragma Assert (Is_Subprogram (Id));
3876 Set_Flag240 (Id, V);
3877 end Set_Has_Postconditions;
3879 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3881 pragma Assert (Is_Access_Type (Id));
3882 Set_Flag27 (Base_Type (Id), V);
3883 end Set_Has_Pragma_Controlled;
3885 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3887 Set_Flag150 (Id, V);
3888 end Set_Has_Pragma_Elaborate_Body;
3890 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3892 Set_Flag157 (Id, V);
3893 end Set_Has_Pragma_Inline;
3895 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3897 Set_Flag230 (Id, V);
3898 end Set_Has_Pragma_Inline_Always;
3900 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3902 pragma Assert (Is_Enumeration_Type (Id));
3903 pragma Assert (Id = Base_Type (Id));
3904 Set_Flag198 (Id, V);
3905 end Set_Has_Pragma_Ordered;
3907 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3909 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3910 pragma Assert (Id = Base_Type (Id));
3911 Set_Flag121 (Id, V);
3912 end Set_Has_Pragma_Pack;
3914 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3916 Set_Flag221 (Id, V);
3917 end Set_Has_Pragma_Preelab_Init;
3919 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3921 Set_Flag203 (Id, V);
3922 end Set_Has_Pragma_Pure;
3924 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3926 Set_Flag179 (Id, V);
3927 end Set_Has_Pragma_Pure_Function;
3929 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3931 Set_Flag169 (Id, V);
3932 end Set_Has_Pragma_Thread_Local_Storage;
3934 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3936 Set_Flag233 (Id, V);
3937 end Set_Has_Pragma_Unmodified;
3939 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3941 Set_Flag180 (Id, V);
3942 end Set_Has_Pragma_Unreferenced;
3944 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3946 pragma Assert (Is_Type (Id));
3947 Set_Flag212 (Id, V);
3948 end Set_Has_Pragma_Unreferenced_Objects;
3950 procedure Set_Has_Predicates (Id : E; V : B := True) is
3952 Set_Flag250 (Id, V);
3953 end Set_Has_Predicates;
3955 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3957 pragma Assert (Id = Base_Type (Id));
3958 Set_Flag120 (Id, V);
3959 end Set_Has_Primitive_Operations;
3961 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
3963 pragma Assert (Is_Type (Id));
3964 Set_Flag151 (Id, V);
3965 end Set_Has_Private_Ancestor;
3967 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3969 Set_Flag155 (Id, V);
3970 end Set_Has_Private_Declaration;
3972 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3974 Set_Flag161 (Id, V);
3975 end Set_Has_Qualified_Name;
3977 procedure Set_Has_RACW (Id : E; V : B := True) is
3979 pragma Assert (Ekind (Id) = E_Package);
3980 Set_Flag214 (Id, V);
3983 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3985 pragma Assert (Id = Base_Type (Id));
3987 end Set_Has_Record_Rep_Clause;
3989 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3991 pragma Assert (Is_Subprogram (Id));
3992 Set_Flag143 (Id, V);
3993 end Set_Has_Recursive_Call;
3995 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3998 end Set_Has_Size_Clause;
4000 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4003 end Set_Has_Small_Clause;
4005 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4007 pragma Assert (Id = Base_Type (Id));
4008 Set_Flag100 (Id, V);
4009 end Set_Has_Specified_Layout;
4011 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4013 pragma Assert (Is_Type (Id));
4014 Set_Flag190 (Id, V);
4015 end Set_Has_Specified_Stream_Input;
4017 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4019 pragma Assert (Is_Type (Id));
4020 Set_Flag191 (Id, V);
4021 end Set_Has_Specified_Stream_Output;
4023 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4025 pragma Assert (Is_Type (Id));
4026 Set_Flag192 (Id, V);
4027 end Set_Has_Specified_Stream_Read;
4029 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4031 pragma Assert (Is_Type (Id));
4032 Set_Flag193 (Id, V);
4033 end Set_Has_Specified_Stream_Write;
4035 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4037 Set_Flag211 (Id, V);
4038 end Set_Has_Static_Discriminants;
4040 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4042 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4043 pragma Assert (Id = Base_Type (Id));
4045 end Set_Has_Storage_Size_Clause;
4047 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4049 pragma Assert (Is_Elementary_Type (Id));
4050 Set_Flag184 (Id, V);
4051 end Set_Has_Stream_Size_Clause;
4053 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4056 end Set_Has_Subprogram_Descriptor;
4058 procedure Set_Has_Task (Id : E; V : B := True) is
4060 pragma Assert (Id = Base_Type (Id));
4064 procedure Set_Has_Thunks (Id : E; V : B := True) is
4066 pragma Assert (Is_Tag (Id));
4067 Set_Flag228 (Id, V);
4070 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4072 pragma Assert (Id = Base_Type (Id));
4073 Set_Flag123 (Id, V);
4074 end Set_Has_Unchecked_Union;
4076 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4078 pragma Assert (Is_Type (Id));
4080 end Set_Has_Unknown_Discriminants;
4082 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4084 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4086 end Set_Has_Volatile_Components;
4088 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4090 Set_Flag182 (Id, V);
4091 end Set_Has_Xref_Entry;
4093 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4095 pragma Assert (Ekind (Id) = E_Variable);
4097 end Set_Hiding_Loop_Variable;
4099 procedure Set_Homonym (Id : E; V : E) is
4101 pragma Assert (Id /= V);
4105 procedure Set_Interface_Alias (Id : E; V : E) is
4109 and then Is_Hidden (Id)
4110 and then (Ekind_In (Id, E_Procedure, E_Function)));
4112 end Set_Interface_Alias;
4114 procedure Set_Interfaces (Id : E; V : L) is
4116 pragma Assert (Is_Record_Type (Id));
4117 Set_Elist25 (Id, V);
4120 procedure Set_In_Package_Body (Id : E; V : B := True) is
4123 end Set_In_Package_Body;
4125 procedure Set_In_Private_Part (Id : E; V : B := True) is
4128 end Set_In_Private_Part;
4130 procedure Set_In_Use (Id : E; V : B := True) is
4132 pragma Assert (Nkind (Id) in N_Entity);
4136 procedure Set_Inner_Instances (Id : E; V : L) is
4138 Set_Elist23 (Id, V);
4139 end Set_Inner_Instances;
4141 procedure Set_Interface_Name (Id : E; V : N) is
4144 end Set_Interface_Name;
4146 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4148 pragma Assert (Is_Overloadable (Id));
4150 end Set_Is_Abstract_Subprogram;
4152 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4154 pragma Assert (Is_Type (Id));
4155 Set_Flag146 (Id, V);
4156 end Set_Is_Abstract_Type;
4158 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4160 pragma Assert (Is_Access_Type (Id));
4161 Set_Flag194 (Id, V);
4162 end Set_Is_Local_Anonymous_Access;
4164 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4166 pragma Assert (Is_Access_Type (Id));
4168 end Set_Is_Access_Constant;
4170 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4172 Set_Flag185 (Id, V);
4173 end Set_Is_Ada_2005_Only;
4175 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4177 Set_Flag199 (Id, V);
4178 end Set_Is_Ada_2012_Only;
4180 procedure Set_Is_Aliased (Id : E; V : B := True) is
4182 pragma Assert (Nkind (Id) in N_Entity);
4186 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4188 pragma Assert (Is_Entry (Id));
4189 Set_Flag132 (Id, V);
4190 end Set_Is_AST_Entry;
4192 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4195 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4197 end Set_Is_Asynchronous;
4199 procedure Set_Is_Atomic (Id : E; V : B := True) is
4204 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4206 pragma Assert ((not V)
4207 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4208 Set_Flag122 (Id, V);
4209 end Set_Is_Bit_Packed_Array;
4211 procedure Set_Is_Called (Id : E; V : B := True) is
4213 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4214 Set_Flag102 (Id, V);
4217 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4220 end Set_Is_Character_Type;
4222 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4225 end Set_Is_Child_Unit;
4227 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4230 end Set_Is_Class_Wide_Equivalent_Type;
4232 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4234 Set_Flag149 (Id, V);
4235 end Set_Is_Compilation_Unit;
4237 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4239 pragma Assert (Ekind (Id) = E_Discriminant);
4240 Set_Flag103 (Id, V);
4241 end Set_Is_Completely_Hidden;
4243 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4246 end Set_Is_Concurrent_Record_Type;
4248 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4251 end Set_Is_Constr_Subt_For_U_Nominal;
4253 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4255 Set_Flag141 (Id, V);
4256 end Set_Is_Constr_Subt_For_UN_Aliased;
4258 procedure Set_Is_Constrained (Id : E; V : B := True) is
4260 pragma Assert (Nkind (Id) in N_Entity);
4262 end Set_Is_Constrained;
4264 procedure Set_Is_Constructor (Id : E; V : B := True) is
4267 end Set_Is_Constructor;
4269 procedure Set_Is_Controlled (Id : E; V : B := True) is
4271 pragma Assert (Id = Base_Type (Id));
4273 end Set_Is_Controlled;
4275 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4277 pragma Assert (Is_Formal (Id));
4279 end Set_Is_Controlling_Formal;
4281 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4284 end Set_Is_CPP_Class;
4286 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4288 pragma Assert (Is_Type (Id));
4289 Set_Flag223 (Id, V);
4290 end Set_Is_Descendent_Of_Address;
4292 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4294 Set_Flag176 (Id, V);
4295 end Set_Is_Discrim_SO_Function;
4297 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4299 Set_Flag234 (Id, V);
4300 end Set_Is_Dispatch_Table_Entity;
4302 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4307 Is_Overloadable (Id)
4309 Ekind (Id) = E_Subprogram_Type);
4312 end Set_Is_Dispatching_Operation;
4314 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4316 Set_Flag124 (Id, V);
4317 end Set_Is_Eliminated;
4319 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4322 end Set_Is_Entry_Formal;
4324 procedure Set_Is_Exported (Id : E; V : B := True) is
4327 end Set_Is_Exported;
4329 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4332 end Set_Is_First_Subtype;
4334 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4336 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4337 Set_Flag118 (Id, V);
4338 end Set_Is_For_Access_Subtype;
4340 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4342 Set_Flag111 (Id, V);
4343 end Set_Is_Formal_Subprogram;
4345 procedure Set_Is_Frozen (Id : E; V : B := True) is
4347 pragma Assert (Nkind (Id) in N_Entity);
4351 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4353 pragma Assert (Is_Type (Id));
4355 end Set_Is_Generic_Actual_Type;
4357 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4359 Set_Flag130 (Id, V);
4360 end Set_Is_Generic_Instance;
4362 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4364 pragma Assert (Nkind (Id) in N_Entity);
4366 end Set_Is_Generic_Type;
4368 procedure Set_Is_Hidden (Id : E; V : B := True) is
4373 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4375 Set_Flag171 (Id, V);
4376 end Set_Is_Hidden_Open_Scope;
4378 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4380 pragma Assert (Nkind (Id) in N_Entity);
4382 end Set_Is_Immediately_Visible;
4384 procedure Set_Is_Imported (Id : E; V : B := True) is
4387 end Set_Is_Imported;
4389 procedure Set_Is_Inlined (Id : E; V : B := True) is
4394 procedure Set_Is_Interface (Id : E; V : B := True) is
4396 pragma Assert (Is_Record_Type (Id));
4397 Set_Flag186 (Id, V);
4398 end Set_Is_Interface;
4400 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4402 Set_Flag126 (Id, V);
4403 end Set_Is_Instantiated;
4405 procedure Set_Is_Internal (Id : E; V : B := True) is
4407 pragma Assert (Nkind (Id) in N_Entity);
4409 end Set_Is_Internal;
4411 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4413 pragma Assert (Nkind (Id) in N_Entity);
4415 end Set_Is_Interrupt_Handler;
4417 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4420 end Set_Is_Intrinsic_Subprogram;
4422 procedure Set_Is_Itype (Id : E; V : B := True) is
4427 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4430 end Set_Is_Known_Non_Null;
4432 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4434 Set_Flag204 (Id, V);
4435 end Set_Is_Known_Null;
4437 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4439 Set_Flag170 (Id, V);
4440 end Set_Is_Known_Valid;
4442 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4444 pragma Assert (Is_Type (Id));
4445 Set_Flag106 (Id, V);
4446 end Set_Is_Limited_Composite;
4448 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4450 pragma Assert (Is_Interface (Id));
4451 Set_Flag197 (Id, V);
4452 end Set_Is_Limited_Interface;
4454 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4457 end Set_Is_Limited_Record;
4459 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4461 pragma Assert (Is_Subprogram (Id));
4462 Set_Flag137 (Id, V);
4463 end Set_Is_Machine_Code_Subprogram;
4465 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4467 pragma Assert (Is_Type (Id));
4468 Set_Flag109 (Id, V);
4469 end Set_Is_Non_Static_Subtype;
4471 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4473 pragma Assert (Ekind (Id) = E_Procedure);
4474 Set_Flag178 (Id, V);
4475 end Set_Is_Null_Init_Proc;
4477 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4479 Set_Flag153 (Id, V);
4480 end Set_Is_Obsolescent;
4482 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4484 pragma Assert (Ekind (Id) = E_Out_Parameter);
4485 Set_Flag226 (Id, V);
4486 end Set_Is_Only_Out_Parameter;
4488 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4490 pragma Assert (Is_Formal (Id));
4491 Set_Flag134 (Id, V);
4492 end Set_Is_Optional_Parameter;
4494 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4496 Set_Flag160 (Id, V);
4497 end Set_Is_Package_Body_Entity;
4499 procedure Set_Is_Packed (Id : E; V : B := True) is
4501 pragma Assert (Id = Base_Type (Id));
4505 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4507 Set_Flag138 (Id, V);
4508 end Set_Is_Packed_Array_Type;
4510 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4512 pragma Assert (Nkind (Id) in N_Entity);
4514 end Set_Is_Potentially_Use_Visible;
4516 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4519 end Set_Is_Preelaborated;
4521 procedure Set_Is_Primitive (Id : E; V : B := True) is
4524 (Is_Overloadable (Id)
4525 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4526 Set_Flag218 (Id, V);
4527 end Set_Is_Primitive;
4529 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4531 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4532 Set_Flag195 (Id, V);
4533 end Set_Is_Primitive_Wrapper;
4535 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4537 pragma Assert (Is_Type (Id));
4538 Set_Flag107 (Id, V);
4539 end Set_Is_Private_Composite;
4541 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4544 end Set_Is_Private_Descendant;
4546 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4548 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4549 Set_Flag245 (Id, V);
4550 end Set_Is_Private_Primitive;
4552 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4554 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4555 Set_Flag252 (Id, V);
4556 end Set_Is_Processed_Transient;
4558 procedure Set_Is_Public (Id : E; V : B := True) is
4560 pragma Assert (Nkind (Id) in N_Entity);
4564 procedure Set_Is_Pure (Id : E; V : B := True) is
4569 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4571 pragma Assert (Is_Access_Type (Id));
4572 Set_Flag189 (Id, V);
4573 end Set_Is_Pure_Unit_Access_Type;
4575 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4577 pragma Assert (Is_Type (Id));
4578 Set_Flag244 (Id, V);
4579 end Set_Is_RACW_Stub_Type;
4581 procedure Set_Is_Raised (Id : E; V : B := True) is
4583 pragma Assert (Ekind (Id) = E_Exception);
4584 Set_Flag224 (Id, V);
4587 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4590 end Set_Is_Remote_Call_Interface;
4592 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4595 end Set_Is_Remote_Types;
4597 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4599 Set_Flag112 (Id, V);
4600 end Set_Is_Renaming_Of_Object;
4602 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4604 Set_Flag209 (Id, V);
4605 end Set_Is_Return_Object;
4607 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4609 pragma Assert (Ekind (Id) = E_Variable);
4610 Set_Flag249 (Id, V);
4611 end Set_Is_Safe_To_Reevaluate;
4613 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4616 end Set_Is_Shared_Passive;
4618 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4622 or else Ekind_In (Id, E_Exception,
4627 end Set_Is_Statically_Allocated;
4629 procedure Set_Is_Tag (Id : E; V : B := True) is
4631 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4635 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4638 end Set_Is_Tagged_Type;
4640 procedure Set_Is_Thunk (Id : E; V : B := True) is
4642 Set_Flag225 (Id, V);
4645 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4647 Set_Flag235 (Id, V);
4648 end Set_Is_Trivial_Subprogram;
4650 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4652 Set_Flag163 (Id, V);
4653 end Set_Is_True_Constant;
4655 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4657 pragma Assert (Id = Base_Type (Id));
4658 Set_Flag117 (Id, V);
4659 end Set_Is_Unchecked_Union;
4661 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4663 pragma Assert (Ekind (Id) = E_Record_Type);
4664 Set_Flag246 (Id, V);
4665 end Set_Is_Underlying_Record_View;
4667 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4669 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4670 Set_Flag144 (Id, V);
4671 end Set_Is_Unsigned_Type;
4673 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4675 pragma Assert (Ekind (Id) = E_Procedure);
4676 Set_Flag127 (Id, V);
4677 end Set_Is_Valued_Procedure;
4679 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4681 pragma Assert (Is_Child_Unit (Id));
4682 Set_Flag116 (Id, V);
4683 end Set_Is_Visible_Child_Unit;
4685 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4687 Set_Flag206 (Id, V);
4688 end Set_Is_Visible_Formal;
4690 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4692 pragma Assert (Ekind (Id) = E_Exception);
4693 Set_Flag133 (Id, V);
4694 end Set_Is_VMS_Exception;
4696 procedure Set_Is_Volatile (Id : E; V : B := True) is
4698 pragma Assert (Nkind (Id) in N_Entity);
4700 end Set_Is_Volatile;
4702 procedure Set_Itype_Printed (Id : E; V : B := True) is
4704 pragma Assert (Is_Itype (Id));
4705 Set_Flag202 (Id, V);
4706 end Set_Itype_Printed;
4708 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4711 end Set_Kill_Elaboration_Checks;
4713 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4716 end Set_Kill_Range_Checks;
4718 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4721 end Set_Kill_Tag_Checks;
4723 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4725 pragma Assert (Is_Type (Id));
4726 Set_Flag207 (Id, V);
4727 end Set_Known_To_Have_Preelab_Init;
4729 procedure Set_Last_Assignment (Id : E; V : N) is
4731 pragma Assert (Is_Assignable (Id));
4733 end Set_Last_Assignment;
4735 procedure Set_Last_Entity (Id : E; V : E) is
4738 end Set_Last_Entity;
4740 procedure Set_Limited_View (Id : E; V : E) is
4742 pragma Assert (Ekind (Id) = E_Package);
4744 end Set_Limited_View;
4746 procedure Set_Lit_Indexes (Id : E; V : E) is
4748 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4750 end Set_Lit_Indexes;
4752 procedure Set_Lit_Strings (Id : E; V : E) is
4754 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4756 end Set_Lit_Strings;
4758 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4760 pragma Assert (Is_Formal (Id));
4761 Set_Flag205 (Id, V);
4762 end Set_Low_Bound_Tested;
4764 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4766 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4768 end Set_Machine_Radix_10;
4770 procedure Set_Master_Id (Id : E; V : E) is
4772 pragma Assert (Is_Access_Type (Id));
4776 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4778 Set_Flag168 (Id, V);
4779 end Set_Materialize_Entity;
4781 procedure Set_Mechanism (Id : E; V : M) is
4783 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4784 Set_Uint8 (Id, UI_From_Int (V));
4787 procedure Set_Modulus (Id : E; V : U) is
4789 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4793 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4795 pragma Assert (Is_Type (Id));
4796 Set_Flag183 (Id, V);
4797 end Set_Must_Be_On_Byte_Boundary;
4799 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4801 pragma Assert (Is_Type (Id));
4802 Set_Flag208 (Id, V);
4803 end Set_Must_Have_Preelab_Init;
4805 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4807 Set_Flag147 (Id, V);
4808 end Set_Needs_Debug_Info;
4810 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4813 (Is_Overloadable (Id)
4814 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4816 end Set_Needs_No_Actuals;
4818 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4820 Set_Flag115 (Id, V);
4821 end Set_Never_Set_In_Source;
4823 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4826 end Set_Next_Inlined_Subprogram;
4828 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4830 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4831 Set_Flag131 (Id, V);
4832 end Set_No_Pool_Assigned;
4834 procedure Set_No_Return (Id : E; V : B := True) is
4837 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4838 Set_Flag113 (Id, V);
4841 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4843 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4844 Set_Flag136 (Id, V);
4845 end Set_No_Strict_Aliasing;
4847 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4849 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4851 end Set_Non_Binary_Modulus;
4853 procedure Set_Non_Limited_View (Id : E; V : E) is
4855 pragma Assert (Ekind (Id) in Incomplete_Kind);
4857 end Set_Non_Limited_View;
4859 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4862 (Root_Type (Id) = Standard_Boolean
4863 and then Ekind (Id) = E_Enumeration_Type);
4864 Set_Flag162 (Id, V);
4865 end Set_Nonzero_Is_True;
4867 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4869 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4871 end Set_Normalized_First_Bit;
4873 procedure Set_Normalized_Position (Id : E; V : U) is
4875 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4877 end Set_Normalized_Position;
4879 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4881 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4883 end Set_Normalized_Position_Max;
4885 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4887 pragma Assert (Ekind (Id) = E_Variable);
4888 Set_Flag247 (Id, V);
4889 end Set_OK_To_Rename;
4891 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4894 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4895 Set_Flag239 (Id, V);
4896 end Set_OK_To_Reorder_Components;
4898 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4901 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4902 Set_Flag241 (Id, V);
4903 end Set_Optimize_Alignment_Space;
4905 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4908 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4909 Set_Flag242 (Id, V);
4910 end Set_Optimize_Alignment_Time;
4912 procedure Set_Original_Access_Type (Id : E; V : E) is
4914 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4916 end Set_Original_Access_Type;
4918 procedure Set_Original_Array_Type (Id : E; V : E) is
4920 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4922 end Set_Original_Array_Type;
4924 procedure Set_Original_Record_Component (Id : E; V : E) is
4926 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4928 end Set_Original_Record_Component;
4930 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4932 Set_Flag243 (Id, V);
4933 end Set_Overlays_Constant;
4935 procedure Set_Overridden_Operation (Id : E; V : E) is
4938 end Set_Overridden_Operation;
4940 procedure Set_Package_Instantiation (Id : E; V : N) is
4942 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4944 end Set_Package_Instantiation;
4946 procedure Set_Packed_Array_Type (Id : E; V : E) is
4948 pragma Assert (Is_Array_Type (Id));
4950 end Set_Packed_Array_Type;
4952 procedure Set_Parent_Subtype (Id : E; V : E) is
4954 pragma Assert (Ekind (Id) = E_Record_Type);
4956 end Set_Parent_Subtype;
4958 procedure Set_Postcondition_Proc (Id : E; V : E) is
4960 pragma Assert (Ekind (Id) = E_Procedure);
4962 end Set_Postcondition_Proc;
4964 procedure Set_PPC_Wrapper (Id : E; V : E) is
4966 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4968 end Set_PPC_Wrapper;
4970 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4972 pragma Assert (Is_Tagged_Type (Id));
4973 Set_Elist10 (Id, V);
4974 end Set_Direct_Primitive_Operations;
4976 procedure Set_Prival (Id : E; V : E) is
4978 pragma Assert (Is_Protected_Component (Id));
4982 procedure Set_Prival_Link (Id : E; V : E) is
4984 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4986 end Set_Prival_Link;
4988 procedure Set_Private_Dependents (Id : E; V : L) is
4990 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4991 Set_Elist18 (Id, V);
4992 end Set_Private_Dependents;
4994 procedure Set_Private_View (Id : E; V : N) is
4996 pragma Assert (Is_Private_Type (Id));
4998 end Set_Private_View;
5000 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5002 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5004 end Set_Protected_Body_Subprogram;
5006 procedure Set_Protected_Formal (Id : E; V : E) is
5008 pragma Assert (Is_Formal (Id));
5010 end Set_Protected_Formal;
5012 procedure Set_Protection_Object (Id : E; V : E) is
5014 pragma Assert (Ekind_In (Id, E_Entry,
5019 end Set_Protection_Object;
5021 procedure Set_Reachable (Id : E; V : B := True) is
5026 procedure Set_Referenced (Id : E; V : B := True) is
5028 Set_Flag156 (Id, V);
5031 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5034 end Set_Referenced_As_LHS;
5036 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5038 Set_Flag227 (Id, V);
5039 end Set_Referenced_As_Out_Parameter;
5041 procedure Set_Register_Exception_Call (Id : E; V : N) is
5043 pragma Assert (Ekind (Id) = E_Exception);
5045 end Set_Register_Exception_Call;
5047 procedure Set_Related_Array_Object (Id : E; V : E) is
5049 pragma Assert (Is_Array_Type (Id));
5051 end Set_Related_Array_Object;
5053 procedure Set_Related_Expression (Id : E; V : N) is
5055 pragma Assert (Ekind (Id) in Type_Kind
5056 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5058 end Set_Related_Expression;
5060 procedure Set_Related_Instance (Id : E; V : E) is
5062 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5064 end Set_Related_Instance;
5066 procedure Set_Related_Type (Id : E; V : E) is
5068 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5070 end Set_Related_Type;
5072 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5074 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5076 end Set_Relative_Deadline_Variable;
5078 procedure Set_Renamed_Entity (Id : E; V : N) is
5081 end Set_Renamed_Entity;
5083 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5085 pragma Assert (Ekind (Id) = E_Package);
5086 Set_Flag231 (Id, V);
5087 end Set_Renamed_In_Spec;
5089 procedure Set_Renamed_Object (Id : E; V : N) is
5092 end Set_Renamed_Object;
5094 procedure Set_Renaming_Map (Id : E; V : U) is
5097 end Set_Renaming_Map;
5099 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5101 pragma Assert (Is_Overloadable (Id));
5102 Set_Flag213 (Id, V);
5103 end Set_Requires_Overriding;
5105 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5107 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5109 end Set_Return_Flag_Or_Transient_Decl;
5111 procedure Set_Return_Present (Id : E; V : B := True) is
5114 end Set_Return_Present;
5116 procedure Set_Return_Applies_To (Id : E; V : N) is
5119 end Set_Return_Applies_To;
5121 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5124 end Set_Returns_By_Ref;
5126 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5129 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5130 Set_Flag164 (Id, V);
5131 end Set_Reverse_Bit_Order;
5133 procedure Set_RM_Size (Id : E; V : U) is
5135 pragma Assert (Is_Type (Id));
5139 procedure Set_Scalar_Range (Id : E; V : N) is
5142 end Set_Scalar_Range;
5144 procedure Set_Scale_Value (Id : E; V : U) is
5147 end Set_Scale_Value;
5149 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5151 pragma Assert (not Is_Record_Type (Id));
5153 end Set_Scope_Depth_Value;
5155 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5157 Set_Flag167 (Id, V);
5158 end Set_Sec_Stack_Needed_For_Return;
5160 procedure Set_Shadow_Entities (Id : E; V : S) is
5162 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5164 end Set_Shadow_Entities;
5166 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5168 pragma Assert (Ekind (Id) = E_Variable);
5170 end Set_Shared_Var_Procs_Instance;
5172 procedure Set_Size_Check_Code (Id : E; V : N) is
5174 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5176 end Set_Size_Check_Code;
5178 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5180 Set_Flag177 (Id, V);
5181 end Set_Size_Depends_On_Discriminant;
5183 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5186 end Set_Size_Known_At_Compile_Time;
5188 procedure Set_Small_Value (Id : E; V : R) is
5190 pragma Assert (Is_Fixed_Point_Type (Id));
5191 Set_Ureal21 (Id, V);
5192 end Set_Small_Value;
5194 procedure Set_Spec_Entity (Id : E; V : E) is
5196 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5198 end Set_Spec_Entity;
5200 procedure Set_Static_Predicate (Id : E; V : S) is
5203 (Ekind_In (Id, E_Enumeration_Subtype,
5204 E_Modular_Integer_Subtype,
5205 E_Signed_Integer_Subtype)
5206 and then Has_Predicates (Id));
5208 end Set_Static_Predicate;
5210 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5212 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5213 pragma Assert (Id = Base_Type (Id));
5215 end Set_Storage_Size_Variable;
5217 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5219 pragma Assert (Ekind (Id) = E_Package);
5221 end Set_Static_Elaboration_Desired;
5223 procedure Set_Static_Initialization (Id : E; V : N) is
5226 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5228 end Set_Static_Initialization;
5230 procedure Set_Stored_Constraint (Id : E; V : L) is
5232 pragma Assert (Nkind (Id) in N_Entity);
5233 Set_Elist23 (Id, V);
5234 end Set_Stored_Constraint;
5236 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5238 pragma Assert (Id = Base_Type (Id));
5239 Set_Flag145 (Id, V);
5240 end Set_Strict_Alignment;
5242 procedure Set_String_Literal_Length (Id : E; V : U) is
5244 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5246 end Set_String_Literal_Length;
5248 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5250 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5252 end Set_String_Literal_Low_Bound;
5254 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5256 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5258 end Set_Subprograms_For_Type;
5260 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5262 Set_Flag148 (Id, V);
5263 end Set_Suppress_Elaboration_Warnings;
5265 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5267 pragma Assert (Is_Type (Id));
5268 Set_Flag105 (Id, V);
5269 end Set_Suppress_Initialization;
5271 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5273 Set_Flag165 (Id, V);
5274 end Set_Suppress_Style_Checks;
5276 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5278 Set_Flag217 (Id, V);
5279 end Set_Suppress_Value_Tracking_On_Call;
5281 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5283 pragma Assert (Ekind (Id) in Task_Kind);
5285 end Set_Task_Body_Procedure;
5287 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5290 end Set_Treat_As_Volatile;
5292 procedure Set_Underlying_Full_View (Id : E; V : E) is
5294 pragma Assert (Ekind (Id) in Private_Kind);
5296 end Set_Underlying_Full_View;
5298 procedure Set_Underlying_Record_View (Id : E; V : E) is
5300 pragma Assert (Ekind (Id) = E_Record_Type);
5302 end Set_Underlying_Record_View;
5304 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5306 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5307 Set_Flag216 (Id, V);
5308 end Set_Universal_Aliasing;
5310 procedure Set_Unset_Reference (Id : E; V : N) is
5313 end Set_Unset_Reference;
5315 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5318 end Set_Uses_Sec_Stack;
5320 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5322 Set_Flag222 (Id, V);
5323 end Set_Used_As_Generic_Actual;
5325 procedure Set_Warnings_Off (Id : E; V : B := True) is
5328 end Set_Warnings_Off;
5330 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5332 Set_Flag236 (Id, V);
5333 end Set_Warnings_Off_Used;
5335 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5337 Set_Flag237 (Id, V);
5338 end Set_Warnings_Off_Used_Unmodified;
5340 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5342 Set_Flag238 (Id, V);
5343 end Set_Warnings_Off_Used_Unreferenced;
5345 procedure Set_Was_Hidden (Id : E; V : B := True) is
5347 Set_Flag196 (Id, V);
5350 procedure Set_Wrapped_Entity (Id : E; V : E) is
5352 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5353 and then Is_Primitive_Wrapper (Id));
5355 end Set_Wrapped_Entity;
5357 -----------------------------------
5358 -- Field Initialization Routines --
5359 -----------------------------------
5361 procedure Init_Alignment (Id : E) is
5363 Set_Uint14 (Id, Uint_0);
5366 procedure Init_Alignment (Id : E; V : Int) is
5368 Set_Uint14 (Id, UI_From_Int (V));
5371 procedure Init_Component_Bit_Offset (Id : E) is
5373 Set_Uint11 (Id, No_Uint);
5374 end Init_Component_Bit_Offset;
5376 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5378 Set_Uint11 (Id, UI_From_Int (V));
5379 end Init_Component_Bit_Offset;
5381 procedure Init_Component_Size (Id : E) is
5383 Set_Uint22 (Id, Uint_0);
5384 end Init_Component_Size;
5386 procedure Init_Component_Size (Id : E; V : Int) is
5388 Set_Uint22 (Id, UI_From_Int (V));
5389 end Init_Component_Size;
5391 procedure Init_Digits_Value (Id : E) is
5393 Set_Uint17 (Id, Uint_0);
5394 end Init_Digits_Value;
5396 procedure Init_Digits_Value (Id : E; V : Int) is
5398 Set_Uint17 (Id, UI_From_Int (V));
5399 end Init_Digits_Value;
5401 procedure Init_Esize (Id : E) is
5403 Set_Uint12 (Id, Uint_0);
5406 procedure Init_Esize (Id : E; V : Int) is
5408 Set_Uint12 (Id, UI_From_Int (V));
5411 procedure Init_Normalized_First_Bit (Id : E) is
5413 Set_Uint8 (Id, No_Uint);
5414 end Init_Normalized_First_Bit;
5416 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5418 Set_Uint8 (Id, UI_From_Int (V));
5419 end Init_Normalized_First_Bit;
5421 procedure Init_Normalized_Position (Id : E) is
5423 Set_Uint14 (Id, No_Uint);
5424 end Init_Normalized_Position;
5426 procedure Init_Normalized_Position (Id : E; V : Int) is
5428 Set_Uint14 (Id, UI_From_Int (V));
5429 end Init_Normalized_Position;
5431 procedure Init_Normalized_Position_Max (Id : E) is
5433 Set_Uint10 (Id, No_Uint);
5434 end Init_Normalized_Position_Max;
5436 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5438 Set_Uint10 (Id, UI_From_Int (V));
5439 end Init_Normalized_Position_Max;
5441 procedure Init_RM_Size (Id : E) is
5443 Set_Uint13 (Id, Uint_0);
5446 procedure Init_RM_Size (Id : E; V : Int) is
5448 Set_Uint13 (Id, UI_From_Int (V));
5451 -----------------------------
5452 -- Init_Component_Location --
5453 -----------------------------
5455 procedure Init_Component_Location (Id : E) is
5457 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5458 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5459 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5460 Set_Uint12 (Id, Uint_0); -- Esize
5461 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5462 end Init_Component_Location;
5468 procedure Init_Size (Id : E; V : Int) is
5470 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5471 pragma Assert (not Is_Object (Id));
5472 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5475 ---------------------
5476 -- Init_Size_Align --
5477 ---------------------
5479 procedure Init_Size_Align (Id : E) is
5481 Set_Uint12 (Id, Uint_0); -- Esize
5482 pragma Assert (not Is_Object (Id));
5483 Set_Uint13 (Id, Uint_0); -- RM_Size
5484 Set_Uint14 (Id, Uint_0); -- Alignment
5485 end Init_Size_Align;
5487 ----------------------------
5488 -- Init_Object_Size_Align --
5489 ----------------------------
5491 procedure Init_Object_Size_Align (Id : E) is
5493 Set_Uint12 (Id, Uint_0); -- Esize
5494 Set_Uint14 (Id, Uint_0); -- Alignment
5495 end Init_Object_Size_Align;
5497 ----------------------------------------------
5498 -- Type Representation Attribute Predicates --
5499 ----------------------------------------------
5501 function Known_Alignment (E : Entity_Id) return B is
5503 return Uint14 (E) /= Uint_0
5504 and then Uint14 (E) /= No_Uint;
5505 end Known_Alignment;
5507 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5509 return Uint11 (E) /= No_Uint;
5510 end Known_Component_Bit_Offset;
5512 function Known_Component_Size (E : Entity_Id) return B is
5514 return Uint22 (Base_Type (E)) /= Uint_0
5515 and then Uint22 (Base_Type (E)) /= No_Uint;
5516 end Known_Component_Size;
5518 function Known_Esize (E : Entity_Id) return B is
5520 return Uint12 (E) /= Uint_0
5521 and then Uint12 (E) /= No_Uint;
5524 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5526 return Uint8 (E) /= No_Uint;
5527 end Known_Normalized_First_Bit;
5529 function Known_Normalized_Position (E : Entity_Id) return B is
5531 return Uint14 (E) /= No_Uint;
5532 end Known_Normalized_Position;
5534 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5536 return Uint10 (E) /= No_Uint;
5537 end Known_Normalized_Position_Max;
5539 function Known_RM_Size (E : Entity_Id) return B is
5541 return Uint13 (E) /= No_Uint
5542 and then (Uint13 (E) /= Uint_0
5543 or else Is_Discrete_Type (E)
5544 or else Is_Fixed_Point_Type (E));
5547 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5549 return Uint11 (E) /= No_Uint
5550 and then Uint11 (E) >= Uint_0;
5551 end Known_Static_Component_Bit_Offset;
5553 function Known_Static_Component_Size (E : Entity_Id) return B is
5555 return Uint22 (Base_Type (E)) > Uint_0;
5556 end Known_Static_Component_Size;
5558 function Known_Static_Esize (E : Entity_Id) return B is
5560 return Uint12 (E) > Uint_0
5561 and then not Is_Generic_Type (E);
5562 end Known_Static_Esize;
5564 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5566 return Uint8 (E) /= No_Uint
5567 and then Uint8 (E) >= Uint_0;
5568 end Known_Static_Normalized_First_Bit;
5570 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5572 return Uint14 (E) /= No_Uint
5573 and then Uint14 (E) >= Uint_0;
5574 end Known_Static_Normalized_Position;
5576 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5578 return Uint10 (E) /= No_Uint
5579 and then Uint10 (E) >= Uint_0;
5580 end Known_Static_Normalized_Position_Max;
5582 function Known_Static_RM_Size (E : Entity_Id) return B is
5584 return (Uint13 (E) > Uint_0
5585 or else Is_Discrete_Type (E)
5586 or else Is_Fixed_Point_Type (E))
5587 and then not Is_Generic_Type (E);
5588 end Known_Static_RM_Size;
5590 function Unknown_Alignment (E : Entity_Id) return B is
5592 return Uint14 (E) = Uint_0
5593 or else Uint14 (E) = No_Uint;
5594 end Unknown_Alignment;
5596 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5598 return Uint11 (E) = No_Uint;
5599 end Unknown_Component_Bit_Offset;
5601 function Unknown_Component_Size (E : Entity_Id) return B is
5603 return Uint22 (Base_Type (E)) = Uint_0
5605 Uint22 (Base_Type (E)) = No_Uint;
5606 end Unknown_Component_Size;
5608 function Unknown_Esize (E : Entity_Id) return B is
5610 return Uint12 (E) = No_Uint
5612 Uint12 (E) = Uint_0;
5615 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5617 return Uint8 (E) = No_Uint;
5618 end Unknown_Normalized_First_Bit;
5620 function Unknown_Normalized_Position (E : Entity_Id) return B is
5622 return Uint14 (E) = No_Uint;
5623 end Unknown_Normalized_Position;
5625 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5627 return Uint10 (E) = No_Uint;
5628 end Unknown_Normalized_Position_Max;
5630 function Unknown_RM_Size (E : Entity_Id) return B is
5632 return (Uint13 (E) = Uint_0
5633 and then not Is_Discrete_Type (E)
5634 and then not Is_Fixed_Point_Type (E))
5635 or else Uint13 (E) = No_Uint;
5636 end Unknown_RM_Size;
5638 --------------------
5639 -- Address_Clause --
5640 --------------------
5642 function Address_Clause (Id : E) return N is
5644 return Rep_Clause (Id, Name_Address);
5651 function Aft_Value (Id : E) return U is
5653 Delta_Val : Ureal := Delta_Value (Id);
5655 while Delta_Val < Ureal_Tenth loop
5656 Delta_Val := Delta_Val * Ureal_10;
5657 Result := Result + 1;
5660 return UI_From_Int (Result);
5663 ----------------------
5664 -- Alignment_Clause --
5665 ----------------------
5667 function Alignment_Clause (Id : E) return N is
5669 return Rep_Clause (Id, Name_Alignment);
5670 end Alignment_Clause;
5676 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5678 if Last_Entity (V) = Empty then
5679 Set_First_Entity (Id => V, V => Id);
5681 Set_Next_Entity (Last_Entity (V), Id);
5684 Set_Next_Entity (Id, Empty);
5686 Set_Last_Entity (Id => V, V => Id);
5693 function Base_Type (Id : E) return E is
5695 if Is_Base_Type (Id) then
5698 pragma Assert (Is_Type (Id));
5703 -------------------------
5704 -- Component_Alignment --
5705 -------------------------
5707 -- Component Alignment is encoded using two flags, Flag128/129 as
5708 -- follows. Note that both flags False = Align_Default, so that the
5709 -- default initialization of flags to False initializes component
5710 -- alignment to the default value as required.
5712 -- Flag128 Flag129 Value
5713 -- ------- ------- -----
5714 -- False False Calign_Default
5715 -- False True Calign_Component_Size
5716 -- True False Calign_Component_Size_4
5717 -- True True Calign_Storage_Unit
5719 function Component_Alignment (Id : E) return C is
5720 BT : constant Node_Id := Base_Type (Id);
5723 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5725 if Flag128 (BT) then
5726 if Flag129 (BT) then
5727 return Calign_Storage_Unit;
5729 return Calign_Component_Size_4;
5733 if Flag129 (BT) then
5734 return Calign_Component_Size;
5736 return Calign_Default;
5739 end Component_Alignment;
5741 ----------------------
5742 -- Declaration_Node --
5743 ----------------------
5745 function Declaration_Node (Id : E) return N is
5749 if Ekind (Id) = E_Incomplete_Type
5750 and then Present (Full_View (Id))
5752 P := Parent (Full_View (Id));
5758 if Nkind (P) /= N_Selected_Component
5759 and then Nkind (P) /= N_Expanded_Name
5761 not (Nkind (P) = N_Defining_Program_Unit_Name
5762 and then Is_Child_Unit (Id))
5769 end Declaration_Node;
5771 ---------------------
5772 -- Designated_Type --
5773 ---------------------
5775 function Designated_Type (Id : E) return E is
5779 Desig_Type := Directly_Designated_Type (Id);
5781 if Ekind (Desig_Type) = E_Incomplete_Type
5782 and then Present (Full_View (Desig_Type))
5784 return Full_View (Desig_Type);
5786 elsif Is_Class_Wide_Type (Desig_Type)
5787 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5788 and then Present (Full_View (Etype (Desig_Type)))
5789 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5791 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5796 end Designated_Type;
5798 ----------------------
5799 -- Entry_Index_Type --
5800 ----------------------
5802 function Entry_Index_Type (Id : E) return N is
5804 pragma Assert (Ekind (Id) = E_Entry_Family);
5805 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5806 end Entry_Index_Type;
5808 ---------------------
5809 -- First_Component --
5810 ---------------------
5812 function First_Component (Id : E) return E is
5817 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5819 Comp_Id := First_Entity (Id);
5820 while Present (Comp_Id) loop
5821 exit when Ekind (Comp_Id) = E_Component;
5822 Comp_Id := Next_Entity (Comp_Id);
5826 end First_Component;
5828 -------------------------------------
5829 -- First_Component_Or_Discriminant --
5830 -------------------------------------
5832 function First_Component_Or_Discriminant (Id : E) return E is
5837 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5839 Comp_Id := First_Entity (Id);
5840 while Present (Comp_Id) loop
5841 exit when Ekind (Comp_Id) = E_Component
5843 Ekind (Comp_Id) = E_Discriminant;
5844 Comp_Id := Next_Entity (Comp_Id);
5848 end First_Component_Or_Discriminant;
5854 function First_Formal (Id : E) return E is
5859 (Is_Overloadable (Id)
5860 or else Ekind_In (Id, E_Entry_Family,
5862 E_Subprogram_Type));
5864 if Ekind (Id) = E_Enumeration_Literal then
5868 Formal := First_Entity (Id);
5870 if Present (Formal) and then Is_Formal (Formal) then
5878 ------------------------------
5879 -- First_Formal_With_Extras --
5880 ------------------------------
5882 function First_Formal_With_Extras (Id : E) return E is
5887 (Is_Overloadable (Id)
5888 or else Ekind_In (Id, E_Entry_Family,
5890 E_Subprogram_Type));
5892 if Ekind (Id) = E_Enumeration_Literal then
5896 Formal := First_Entity (Id);
5898 if Present (Formal) and then Is_Formal (Formal) then
5901 return Extra_Formals (Id); -- Empty if no extra formals
5904 end First_Formal_With_Extras;
5906 -------------------------------------
5907 -- Get_Attribute_Definition_Clause --
5908 -------------------------------------
5910 function Get_Attribute_Definition_Clause
5912 Id : Attribute_Id) return Node_Id
5917 N := First_Rep_Item (E);
5918 while Present (N) loop
5919 if Nkind (N) = N_Attribute_Definition_Clause
5920 and then Get_Attribute_Id (Chars (N)) = Id
5929 end Get_Attribute_Definition_Clause;
5935 function Get_Full_View (T : Entity_Id) return Entity_Id is
5937 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5938 return Full_View (T);
5940 elsif Is_Class_Wide_Type (T)
5941 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5942 and then Present (Full_View (Root_Type (T)))
5944 return Class_Wide_Type (Full_View (Root_Type (T)));
5951 --------------------------------------
5952 -- Get_Record_Representation_Clause --
5953 --------------------------------------
5955 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5959 N := First_Rep_Item (E);
5960 while Present (N) loop
5961 if Nkind (N) = N_Record_Representation_Clause then
5969 end Get_Record_Representation_Clause;
5971 -----------------------------
5972 -- Get_Rep_Item_For_Entity --
5973 -----------------------------
5975 function Get_Rep_Item_For_Entity
5977 Nam : Name_Id) return Node_Id
5983 N := First_Rep_Item (E);
5984 while Present (N) loop
5985 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5986 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5988 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5992 elsif Nkind (N) = N_Attribute_Definition_Clause
5993 and then Chars (N) = Nam
5994 and then Entity (N) = E
5998 elsif Nkind (N) = N_Aspect_Specification
5999 and then Chars (Identifier (N)) = Nam
6000 and then Entity (N) = E
6009 end Get_Rep_Item_For_Entity;
6011 --------------------
6012 -- Get_Rep_Pragma --
6013 --------------------
6015 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6019 N := First_Rep_Item (E);
6020 while Present (N) loop
6021 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6031 ------------------------
6032 -- Has_Attach_Handler --
6033 ------------------------
6035 function Has_Attach_Handler (Id : E) return B is
6039 pragma Assert (Is_Protected_Type (Id));
6041 Ritem := First_Rep_Item (Id);
6042 while Present (Ritem) loop
6043 if Nkind (Ritem) = N_Pragma
6044 and then Pragma_Name (Ritem) = Name_Attach_Handler
6048 Next_Rep_Item (Ritem);
6053 end Has_Attach_Handler;
6055 -------------------------------------
6056 -- Has_Attribute_Definition_Clause --
6057 -------------------------------------
6059 function Has_Attribute_Definition_Clause
6061 Id : Attribute_Id) return Boolean
6064 return Present (Get_Attribute_Definition_Clause (E, Id));
6065 end Has_Attribute_Definition_Clause;
6071 function Has_Entries (Id : E) return B is
6075 pragma Assert (Is_Concurrent_Type (Id));
6077 Ent := First_Entity (Id);
6078 while Present (Ent) loop
6079 if Is_Entry (Ent) then
6083 Ent := Next_Entity (Ent);
6089 ----------------------------
6090 -- Has_Foreign_Convention --
6091 ----------------------------
6093 function Has_Foreign_Convention (Id : E) return B is
6095 -- While regular Intrinsics such as the Standard operators fit in the
6096 -- "Ada" convention, those with an Interface_Name materialize GCC
6097 -- builtin imports for which Ada special treatments shouldn't apply.
6099 return Convention (Id) in Foreign_Convention
6100 or else (Convention (Id) = Convention_Intrinsic
6101 and then Present (Interface_Name (Id)));
6102 end Has_Foreign_Convention;
6104 ---------------------------
6105 -- Has_Interrupt_Handler --
6106 ---------------------------
6108 function Has_Interrupt_Handler (Id : E) return B is
6112 pragma Assert (Is_Protected_Type (Id));
6114 Ritem := First_Rep_Item (Id);
6115 while Present (Ritem) loop
6116 if Nkind (Ritem) = N_Pragma
6117 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6121 Next_Rep_Item (Ritem);
6126 end Has_Interrupt_Handler;
6128 --------------------
6129 -- Has_Rep_Pragma --
6130 --------------------
6132 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6134 return Present (Get_Rep_Pragma (E, Nam));
6137 --------------------
6138 -- Has_Unmodified --
6139 --------------------
6141 function Has_Unmodified (E : Entity_Id) return Boolean is
6143 if Has_Pragma_Unmodified (E) then
6145 elsif Warnings_Off (E) then
6146 Set_Warnings_Off_Used_Unmodified (E);
6153 ---------------------
6154 -- Has_Unreferenced --
6155 ---------------------
6157 function Has_Unreferenced (E : Entity_Id) return Boolean is
6159 if Has_Pragma_Unreferenced (E) then
6161 elsif Warnings_Off (E) then
6162 Set_Warnings_Off_Used_Unreferenced (E);
6167 end Has_Unreferenced;
6169 ----------------------
6170 -- Has_Warnings_Off --
6171 ----------------------
6173 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6175 if Warnings_Off (E) then
6176 Set_Warnings_Off_Used (E);
6181 end Has_Warnings_Off;
6183 ------------------------------
6184 -- Implementation_Base_Type --
6185 ------------------------------
6187 function Implementation_Base_Type (Id : E) return E is
6192 Bastyp := Base_Type (Id);
6194 if Is_Incomplete_Or_Private_Type (Bastyp) then
6195 Imptyp := Underlying_Type (Bastyp);
6197 -- If we have an implementation type, then just return it,
6198 -- otherwise we return the Base_Type anyway. This can only
6199 -- happen in error situations and should avoid some error bombs.
6201 if Present (Imptyp) then
6202 return Base_Type (Imptyp);
6210 end Implementation_Base_Type;
6212 -------------------------
6213 -- Invariant_Procedure --
6214 -------------------------
6216 function Invariant_Procedure (Id : E) return E is
6220 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6222 if No (Subprograms_For_Type (Id)) then
6226 S := Subprograms_For_Type (Id);
6227 while Present (S) loop
6228 if Has_Invariants (S) then
6231 S := Subprograms_For_Type (S);
6237 end Invariant_Procedure;
6243 -- Global flag table allowing rapid computation of this function
6245 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6246 (E_Enumeration_Subtype |
6248 E_Signed_Integer_Subtype |
6249 E_Modular_Integer_Subtype |
6250 E_Floating_Point_Subtype |
6251 E_Ordinary_Fixed_Point_Subtype |
6252 E_Decimal_Fixed_Point_Subtype |
6257 E_Record_Subtype_With_Private |
6258 E_Limited_Private_Subtype |
6260 E_Protected_Subtype |
6262 E_String_Literal_Subtype |
6263 E_Class_Wide_Subtype => False,
6266 function Is_Base_Type (Id : E) return Boolean is
6268 return Entity_Is_Base_Type (Ekind (Id));
6271 ---------------------
6272 -- Is_Boolean_Type --
6273 ---------------------
6275 function Is_Boolean_Type (Id : E) return B is
6277 return Root_Type (Id) = Standard_Boolean;
6278 end Is_Boolean_Type;
6280 ------------------------
6281 -- Is_Constant_Object --
6282 ------------------------
6284 function Is_Constant_Object (Id : E) return B is
6285 K : constant Entity_Kind := Ekind (Id);
6288 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6289 end Is_Constant_Object;
6291 --------------------
6292 -- Is_Discriminal --
6293 --------------------
6295 function Is_Discriminal (Id : E) return B is
6297 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6298 and then Present (Discriminal_Link (Id)));
6301 ----------------------
6302 -- Is_Dynamic_Scope --
6303 ----------------------
6305 function Is_Dynamic_Scope (Id : E) return B is
6308 Ekind (Id) = E_Block
6310 Ekind (Id) = E_Function
6312 Ekind (Id) = E_Procedure
6314 Ekind (Id) = E_Subprogram_Body
6316 Ekind (Id) = E_Task_Type
6318 (Ekind (Id) = E_Limited_Private_Type
6319 and then Present (Full_View (Id))
6320 and then Ekind (Full_View (Id)) = E_Task_Type)
6322 Ekind (Id) = E_Entry
6324 Ekind (Id) = E_Entry_Family
6326 Ekind (Id) = E_Return_Statement;
6327 end Is_Dynamic_Scope;
6329 --------------------
6330 -- Is_Entity_Name --
6331 --------------------
6333 function Is_Entity_Name (N : Node_Id) return Boolean is
6334 Kind : constant Node_Kind := Nkind (N);
6337 -- Identifiers, operator symbols, expanded names are entity names
6339 return Kind = N_Identifier
6340 or else Kind = N_Operator_Symbol
6341 or else Kind = N_Expanded_Name
6343 -- Attribute references are entity names if they refer to an entity.
6344 -- Note that we don't do this by testing for the presence of the
6345 -- Entity field in the N_Attribute_Reference node, since it may not
6346 -- have been set yet.
6348 or else (Kind = N_Attribute_Reference
6349 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6356 function Is_Finalizer (Id : E) return B is
6358 return Ekind (Id) = E_Procedure
6359 and then Chars (Id) = Name_uFinalizer;
6362 -----------------------------------
6363 -- Is_Package_Or_Generic_Package --
6364 -----------------------------------
6366 function Is_Package_Or_Generic_Package (Id : E) return B is
6369 Ekind (Id) = E_Package
6371 Ekind (Id) = E_Generic_Package;
6372 end Is_Package_Or_Generic_Package;
6374 ------------------------
6375 -- Predicate_Function --
6376 ------------------------
6378 function Predicate_Function (Id : E) return E is
6382 pragma Assert (Is_Type (Id));
6384 if No (Subprograms_For_Type (Id)) then
6388 S := Subprograms_For_Type (Id);
6389 while Present (S) loop
6390 if Has_Predicates (S) then
6393 S := Subprograms_For_Type (S);
6399 end Predicate_Function;
6405 function Is_Prival (Id : E) return B is
6407 return (Ekind_In (Id, E_Constant, E_Variable)
6408 and then Present (Prival_Link (Id)));
6411 ----------------------------
6412 -- Is_Protected_Component --
6413 ----------------------------
6415 function Is_Protected_Component (Id : E) return B is
6417 return Ekind (Id) = E_Component
6418 and then Is_Protected_Type (Scope (Id));
6419 end Is_Protected_Component;
6421 ----------------------------
6422 -- Is_Protected_Interface --
6423 ----------------------------
6425 function Is_Protected_Interface (Id : E) return B is
6426 Typ : constant Entity_Id := Base_Type (Id);
6428 if not Is_Interface (Typ) then
6430 elsif Is_Class_Wide_Type (Typ) then
6431 return Is_Protected_Interface (Etype (Typ));
6433 return Protected_Present (Type_Definition (Parent (Typ)));
6435 end Is_Protected_Interface;
6437 ------------------------------
6438 -- Is_Protected_Record_Type --
6439 ------------------------------
6441 function Is_Protected_Record_Type (Id : E) return B is
6444 Is_Concurrent_Record_Type (Id)
6445 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6446 end Is_Protected_Record_Type;
6448 --------------------------------
6449 -- Is_Standard_Character_Type --
6450 --------------------------------
6452 function Is_Standard_Character_Type (Id : E) return B is
6454 if Is_Type (Id) then
6456 R : constant Entity_Id := Root_Type (Id);
6459 R = Standard_Character
6461 R = Standard_Wide_Character
6463 R = Standard_Wide_Wide_Character;
6469 end Is_Standard_Character_Type;
6471 --------------------
6472 -- Is_String_Type --
6473 --------------------
6475 function Is_String_Type (Id : E) return B is
6477 return Ekind (Id) in String_Kind
6478 or else (Is_Array_Type (Id)
6479 and then Id /= Any_Composite
6480 and then Number_Dimensions (Id) = 1
6481 and then Is_Character_Type (Component_Type (Id)));
6484 -------------------------------
6485 -- Is_Synchronized_Interface --
6486 -------------------------------
6488 function Is_Synchronized_Interface (Id : E) return B is
6489 Typ : constant Entity_Id := Base_Type (Id);
6492 if not Is_Interface (Typ) then
6495 elsif Is_Class_Wide_Type (Typ) then
6496 return Is_Synchronized_Interface (Etype (Typ));
6499 return Protected_Present (Type_Definition (Parent (Typ)))
6500 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6501 or else Task_Present (Type_Definition (Parent (Typ)));
6503 end Is_Synchronized_Interface;
6505 -----------------------
6506 -- Is_Task_Interface --
6507 -----------------------
6509 function Is_Task_Interface (Id : E) return B is
6510 Typ : constant Entity_Id := Base_Type (Id);
6512 if not Is_Interface (Typ) then
6514 elsif Is_Class_Wide_Type (Typ) then
6515 return Is_Task_Interface (Etype (Typ));
6517 return Task_Present (Type_Definition (Parent (Typ)));
6519 end Is_Task_Interface;
6521 -------------------------
6522 -- Is_Task_Record_Type --
6523 -------------------------
6525 function Is_Task_Record_Type (Id : E) return B is
6528 Is_Concurrent_Record_Type (Id)
6529 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6530 end Is_Task_Record_Type;
6532 ------------------------
6533 -- Is_Wrapper_Package --
6534 ------------------------
6536 function Is_Wrapper_Package (Id : E) return B is
6538 return (Ekind (Id) = E_Package
6539 and then Present (Related_Instance (Id)));
6540 end Is_Wrapper_Package;
6546 function Last_Formal (Id : E) return E is
6551 (Is_Overloadable (Id)
6552 or else Ekind_In (Id, E_Entry_Family,
6554 E_Subprogram_Type));
6556 if Ekind (Id) = E_Enumeration_Literal then
6560 Formal := First_Formal (Id);
6562 if Present (Formal) then
6563 while Present (Next_Formal (Formal)) loop
6564 Formal := Next_Formal (Formal);
6572 function Model_Emin_Value (Id : E) return Uint is
6574 return Machine_Emin_Value (Id);
6575 end Model_Emin_Value;
6577 -------------------------
6578 -- Model_Epsilon_Value --
6579 -------------------------
6581 function Model_Epsilon_Value (Id : E) return Ureal is
6582 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6584 return Radix ** (1 - Model_Mantissa_Value (Id));
6585 end Model_Epsilon_Value;
6587 --------------------------
6588 -- Model_Mantissa_Value --
6589 --------------------------
6591 function Model_Mantissa_Value (Id : E) return Uint is
6593 return Machine_Mantissa_Value (Id);
6594 end Model_Mantissa_Value;
6596 -----------------------
6597 -- Model_Small_Value --
6598 -----------------------
6600 function Model_Small_Value (Id : E) return Ureal is
6601 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6603 return Radix ** (Model_Emin_Value (Id) - 1);
6604 end Model_Small_Value;
6606 ------------------------
6607 -- Machine_Emax_Value --
6608 ------------------------
6610 function Machine_Emax_Value (Id : E) return Uint is
6611 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6614 case Float_Rep (Id) is
6617 when 1 .. 6 => return Uint_128;
6618 when 7 .. 15 => return 2**10;
6619 when 16 .. 33 => return 2**14;
6620 when others => return No_Uint;
6625 when 1 .. 9 => return 2**7 - 1;
6626 when 10 .. 15 => return 2**10 - 1;
6627 when others => return No_Uint;
6631 return Uint_2 ** Uint_7 - Uint_1;
6633 end Machine_Emax_Value;
6635 ------------------------
6636 -- Machine_Emin_Value --
6637 ------------------------
6639 function Machine_Emin_Value (Id : E) return Uint is
6641 case Float_Rep (Id) is
6642 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6643 when VAX_Native => return -Machine_Emax_Value (Id);
6644 when AAMP => return -Machine_Emax_Value (Id);
6646 end Machine_Emin_Value;
6648 ----------------------------
6649 -- Machine_Mantissa_Value --
6650 ----------------------------
6652 function Machine_Mantissa_Value (Id : E) return Uint is
6653 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6656 case Float_Rep (Id) is
6659 when 1 .. 6 => return Uint_24;
6660 when 7 .. 15 => return UI_From_Int (53);
6661 when 16 .. 18 => return Uint_64;
6662 when 19 .. 33 => return UI_From_Int (113);
6663 when others => return No_Uint;
6668 when 1 .. 6 => return Uint_24;
6669 when 7 .. 9 => return UI_From_Int (56);
6670 when 10 .. 15 => return UI_From_Int (53);
6671 when others => return No_Uint;
6676 when 1 .. 6 => return Uint_24;
6677 when 7 .. 9 => return UI_From_Int (40);
6678 when others => return No_Uint;
6681 end Machine_Mantissa_Value;
6683 -------------------------
6684 -- Machine_Radix_Value --
6685 -------------------------
6687 function Machine_Radix_Value (Id : E) return U is
6689 case Float_Rep (Id) is
6690 when IEEE_Binary | VAX_Native | AAMP =>
6693 end Machine_Radix_Value;
6695 --------------------
6696 -- Next_Component --
6697 --------------------
6699 function Next_Component (Id : E) return E is
6703 Comp_Id := Next_Entity (Id);
6704 while Present (Comp_Id) loop
6705 exit when Ekind (Comp_Id) = E_Component;
6706 Comp_Id := Next_Entity (Comp_Id);
6712 ------------------------------------
6713 -- Next_Component_Or_Discriminant --
6714 ------------------------------------
6716 function Next_Component_Or_Discriminant (Id : E) return E is
6720 Comp_Id := Next_Entity (Id);
6721 while Present (Comp_Id) loop
6722 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6723 Comp_Id := Next_Entity (Comp_Id);
6727 end Next_Component_Or_Discriminant;
6729 -----------------------
6730 -- Next_Discriminant --
6731 -----------------------
6733 -- This function actually implements both Next_Discriminant and
6734 -- Next_Stored_Discriminant by making sure that the Discriminant
6735 -- returned is of the same variety as Id.
6737 function Next_Discriminant (Id : E) return E is
6739 -- Derived Tagged types with private extensions look like this...
6741 -- E_Discriminant d1
6742 -- E_Discriminant d2
6744 -- E_Discriminant d1
6745 -- E_Discriminant d2
6748 -- so it is critical not to go past the leading discriminants
6753 pragma Assert (Ekind (Id) = E_Discriminant);
6756 D := Next_Entity (D);
6758 or else (Ekind (D) /= E_Discriminant
6759 and then not Is_Itype (D))
6764 exit when Ekind (D) = E_Discriminant
6765 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6769 end Next_Discriminant;
6775 function Next_Formal (Id : E) return E is
6779 -- Follow the chain of declared entities as long as the kind of the
6780 -- entity corresponds to a formal parameter. Skip internal entities
6781 -- that may have been created for implicit subtypes, in the process
6782 -- of analyzing default expressions.
6786 P := Next_Entity (P);
6788 if No (P) or else Is_Formal (P) then
6790 elsif not Is_Internal (P) then
6796 -----------------------------
6797 -- Next_Formal_With_Extras --
6798 -----------------------------
6800 function Next_Formal_With_Extras (Id : E) return E is
6802 if Present (Extra_Formal (Id)) then
6803 return Extra_Formal (Id);
6805 return Next_Formal (Id);
6807 end Next_Formal_With_Extras;
6813 function Next_Index (Id : Node_Id) return Node_Id is
6822 function Next_Literal (Id : E) return E is
6824 pragma Assert (Nkind (Id) in N_Entity);
6828 ------------------------------
6829 -- Next_Stored_Discriminant --
6830 ------------------------------
6832 function Next_Stored_Discriminant (Id : E) return E is
6834 -- See comment in Next_Discriminant
6836 return Next_Discriminant (Id);
6837 end Next_Stored_Discriminant;
6839 -----------------------
6840 -- Number_Dimensions --
6841 -----------------------
6843 function Number_Dimensions (Id : E) return Pos is
6848 if Ekind (Id) in String_Kind then
6853 T := First_Index (Id);
6854 while Present (T) loop
6861 end Number_Dimensions;
6863 --------------------
6864 -- Number_Entries --
6865 --------------------
6867 function Number_Entries (Id : E) return Nat is
6872 pragma Assert (Is_Concurrent_Type (Id));
6875 Ent := First_Entity (Id);
6876 while Present (Ent) loop
6877 if Is_Entry (Ent) then
6881 Ent := Next_Entity (Ent);
6887 --------------------
6888 -- Number_Formals --
6889 --------------------
6891 function Number_Formals (Id : E) return Pos is
6897 Formal := First_Formal (Id);
6898 while Present (Formal) loop
6900 Formal := Next_Formal (Formal);
6906 --------------------
6907 -- Parameter_Mode --
6908 --------------------
6910 function Parameter_Mode (Id : E) return Formal_Kind is
6915 --------------------------
6916 -- Primitive_Operations --
6917 --------------------------
6919 function Primitive_Operations (Id : E) return L is
6921 if Is_Concurrent_Type (Id) then
6922 if Present (Corresponding_Record_Type (Id)) then
6923 return Direct_Primitive_Operations
6924 (Corresponding_Record_Type (Id));
6929 return Direct_Primitive_Operations (Id);
6931 end Primitive_Operations;
6933 ---------------------
6934 -- Record_Rep_Item --
6935 ---------------------
6937 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6939 Set_Next_Rep_Item (N, First_Rep_Item (E));
6940 Set_First_Rep_Item (E, N);
6941 end Record_Rep_Item;
6947 function Root_Type (Id : E) return E is
6951 pragma Assert (Nkind (Id) in N_Entity);
6953 T := Base_Type (Id);
6955 if Ekind (T) = E_Class_Wide_Type then
6967 -- Following test catches some error cases resulting from
6970 elsif No (Etyp) then
6973 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6976 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6982 -- Return if there is a circularity in the inheritance chain. This
6983 -- happens in some error situations and we do not want to get
6984 -- stuck in this loop.
6986 if T = Base_Type (Id) then
6993 ---------------------
6994 -- Safe_Emax_Value --
6995 ---------------------
6997 function Safe_Emax_Value (Id : E) return Uint is
6999 return Machine_Emax_Value (Id);
7000 end Safe_Emax_Value;
7002 ----------------------
7003 -- Safe_First_Value --
7004 ----------------------
7006 function Safe_First_Value (Id : E) return Ureal is
7008 return -Safe_Last_Value (Id);
7009 end Safe_First_Value;
7011 ---------------------
7012 -- Safe_Last_Value --
7013 ---------------------
7015 function Safe_Last_Value (Id : E) return Ureal is
7016 Radix : constant Uint := Machine_Radix_Value (Id);
7017 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7018 Emax : constant Uint := Safe_Emax_Value (Id);
7019 Significand : constant Uint := Radix ** Mantissa - 1;
7020 Exponent : constant Uint := Emax - Mantissa;
7026 (Num => Significand * 2 ** (Exponent mod 4),
7027 Den => -Exponent / 4,
7033 (Num => Significand,
7037 end Safe_Last_Value;
7043 function Scope_Depth (Id : E) return Uint is
7048 while Is_Record_Type (Scop) loop
7049 Scop := Scope (Scop);
7052 return Scope_Depth_Value (Scop);
7055 ---------------------
7056 -- Scope_Depth_Set --
7057 ---------------------
7059 function Scope_Depth_Set (Id : E) return B is
7061 return not Is_Record_Type (Id)
7062 and then Field22 (Id) /= Union_Id (Empty);
7063 end Scope_Depth_Set;
7065 -----------------------------
7066 -- Set_Component_Alignment --
7067 -----------------------------
7069 -- Component Alignment is encoded using two flags, Flag128/129 as
7070 -- follows. Note that both flags False = Align_Default, so that the
7071 -- default initialization of flags to False initializes component
7072 -- alignment to the default value as required.
7074 -- Flag128 Flag129 Value
7075 -- ------- ------- -----
7076 -- False False Calign_Default
7077 -- False True Calign_Component_Size
7078 -- True False Calign_Component_Size_4
7079 -- True True Calign_Storage_Unit
7081 procedure Set_Component_Alignment (Id : E; V : C) is
7083 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7084 and then Is_Base_Type (Id));
7087 when Calign_Default =>
7088 Set_Flag128 (Id, False);
7089 Set_Flag129 (Id, False);
7091 when Calign_Component_Size =>
7092 Set_Flag128 (Id, False);
7093 Set_Flag129 (Id, True);
7095 when Calign_Component_Size_4 =>
7096 Set_Flag128 (Id, True);
7097 Set_Flag129 (Id, False);
7099 when Calign_Storage_Unit =>
7100 Set_Flag128 (Id, True);
7101 Set_Flag129 (Id, True);
7103 end Set_Component_Alignment;
7105 -----------------------------
7106 -- Set_Invariant_Procedure --
7107 -----------------------------
7109 procedure Set_Invariant_Procedure (Id : E; V : E) is
7113 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7115 S := Subprograms_For_Type (Id);
7116 Set_Subprograms_For_Type (Id, V);
7118 while Present (S) loop
7119 if Has_Invariants (S) then
7120 raise Program_Error;
7122 S := Subprograms_For_Type (S);
7126 Set_Subprograms_For_Type (Id, V);
7127 end Set_Invariant_Procedure;
7129 ----------------------------
7130 -- Set_Predicate_Function --
7131 ----------------------------
7133 procedure Set_Predicate_Function (Id : E; V : E) is
7137 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7139 S := Subprograms_For_Type (Id);
7140 Set_Subprograms_For_Type (Id, V);
7142 while Present (S) loop
7143 if Has_Predicates (S) then
7144 raise Program_Error;
7146 S := Subprograms_For_Type (S);
7150 Set_Subprograms_For_Type (Id, V);
7151 end Set_Predicate_Function;
7157 function Size_Clause (Id : E) return N is
7159 return Rep_Clause (Id, Name_Size);
7162 ------------------------
7163 -- Stream_Size_Clause --
7164 ------------------------
7166 function Stream_Size_Clause (Id : E) return N is
7168 return Rep_Clause (Id, Name_Stream_Size);
7169 end Stream_Size_Clause;
7175 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7181 Kind := E_Access_Subtype;
7185 Kind := E_Array_Subtype;
7187 when E_Class_Wide_Type |
7188 E_Class_Wide_Subtype =>
7189 Kind := E_Class_Wide_Subtype;
7191 when E_Decimal_Fixed_Point_Type |
7192 E_Decimal_Fixed_Point_Subtype =>
7193 Kind := E_Decimal_Fixed_Point_Subtype;
7195 when E_Ordinary_Fixed_Point_Type |
7196 E_Ordinary_Fixed_Point_Subtype =>
7197 Kind := E_Ordinary_Fixed_Point_Subtype;
7199 when E_Private_Type |
7200 E_Private_Subtype =>
7201 Kind := E_Private_Subtype;
7203 when E_Limited_Private_Type |
7204 E_Limited_Private_Subtype =>
7205 Kind := E_Limited_Private_Subtype;
7207 when E_Record_Type_With_Private |
7208 E_Record_Subtype_With_Private =>
7209 Kind := E_Record_Subtype_With_Private;
7211 when E_Record_Type |
7213 Kind := E_Record_Subtype;
7215 when E_String_Type |
7217 Kind := E_String_Subtype;
7219 when Enumeration_Kind =>
7220 Kind := E_Enumeration_Subtype;
7223 Kind := E_Floating_Point_Subtype;
7225 when Signed_Integer_Kind =>
7226 Kind := E_Signed_Integer_Subtype;
7228 when Modular_Integer_Kind =>
7229 Kind := E_Modular_Integer_Subtype;
7231 when Protected_Kind =>
7232 Kind := E_Protected_Subtype;
7235 Kind := E_Task_Subtype;
7239 raise Program_Error;
7245 ---------------------
7246 -- Type_High_Bound --
7247 ---------------------
7249 function Type_High_Bound (Id : E) return Node_Id is
7250 Rng : constant Node_Id := Scalar_Range (Id);
7252 if Nkind (Rng) = N_Subtype_Indication then
7253 return High_Bound (Range_Expression (Constraint (Rng)));
7255 return High_Bound (Rng);
7257 end Type_High_Bound;
7259 --------------------
7260 -- Type_Low_Bound --
7261 --------------------
7263 function Type_Low_Bound (Id : E) return Node_Id is
7264 Rng : constant Node_Id := Scalar_Range (Id);
7266 if Nkind (Rng) = N_Subtype_Indication then
7267 return Low_Bound (Range_Expression (Constraint (Rng)));
7269 return Low_Bound (Rng);
7273 ---------------------
7274 -- Underlying_Type --
7275 ---------------------
7277 function Underlying_Type (Id : E) return E is
7279 -- For record_with_private the underlying type is always the direct
7280 -- full view. Never try to take the full view of the parent it
7281 -- doesn't make sense.
7283 if Ekind (Id) = E_Record_Type_With_Private then
7284 return Full_View (Id);
7286 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7288 -- If we have an incomplete or private type with a full view,
7289 -- then we return the Underlying_Type of this full view
7291 if Present (Full_View (Id)) then
7292 if Id = Full_View (Id) then
7294 -- Previous error in declaration
7299 return Underlying_Type (Full_View (Id));
7302 -- If we have an incomplete entity that comes from the limited
7303 -- view then we return the Underlying_Type of its non-limited
7306 elsif From_With_Type (Id)
7307 and then Present (Non_Limited_View (Id))
7309 return Underlying_Type (Non_Limited_View (Id));
7311 -- Otherwise check for the case where we have a derived type or
7312 -- subtype, and if so get the Underlying_Type of the parent type.
7314 elsif Etype (Id) /= Id then
7315 return Underlying_Type (Etype (Id));
7317 -- Otherwise we have an incomplete or private type that has
7318 -- no full view, which means that we have not encountered the
7319 -- completion, so return Empty to indicate the underlying type
7320 -- is not yet known.
7326 -- For non-incomplete, non-private types, return the type itself
7327 -- Also for entities that are not types at all return the entity
7333 end Underlying_Type;
7339 function Vax_Float (Id : E) return B is
7341 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7344 ------------------------
7345 -- Write_Entity_Flags --
7346 ------------------------
7348 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7350 procedure W (Flag_Name : String; Flag : Boolean);
7351 -- Write out given flag if it is set
7357 procedure W (Flag_Name : String; Flag : Boolean) is
7361 Write_Str (Flag_Name);
7362 Write_Str (" = True");
7367 -- Start of processing for Write_Entity_Flags
7370 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7371 and then Is_Base_Type (Id)
7374 Write_Str ("Component_Alignment = ");
7376 case Component_Alignment (Id) is
7377 when Calign_Default =>
7378 Write_Str ("Calign_Default");
7380 when Calign_Component_Size =>
7381 Write_Str ("Calign_Component_Size");
7383 when Calign_Component_Size_4 =>
7384 Write_Str ("Calign_Component_Size_4");
7386 when Calign_Storage_Unit =>
7387 Write_Str ("Calign_Storage_Unit");
7393 W ("Address_Taken", Flag104 (Id));
7394 W ("Body_Needed_For_SAL", Flag40 (Id));
7395 W ("C_Pass_By_Copy", Flag125 (Id));
7396 W ("Can_Never_Be_Null", Flag38 (Id));
7397 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7398 W ("Debug_Info_Off", Flag166 (Id));
7399 W ("Default_Expressions_Processed", Flag108 (Id));
7400 W ("Delay_Cleanups", Flag114 (Id));
7401 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7402 W ("Depends_On_Private", Flag14 (Id));
7403 W ("Discard_Names", Flag88 (Id));
7404 W ("Elaboration_Entity_Required", Flag174 (Id));
7405 W ("Elaborate_Body_Desirable", Flag210 (Id));
7406 W ("Entry_Accepted", Flag152 (Id));
7407 W ("Can_Use_Internal_Rep", Flag229 (Id));
7408 W ("Finalize_Storage_Only", Flag158 (Id));
7409 W ("From_With_Type", Flag159 (Id));
7410 W ("Has_Aliased_Components", Flag135 (Id));
7411 W ("Has_Alignment_Clause", Flag46 (Id));
7412 W ("Has_All_Calls_Remote", Flag79 (Id));
7413 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7414 W ("Has_Atomic_Components", Flag86 (Id));
7415 W ("Has_Biased_Representation", Flag139 (Id));
7416 W ("Has_Completion", Flag26 (Id));
7417 W ("Has_Completion_In_Body", Flag71 (Id));
7418 W ("Has_Complex_Representation", Flag140 (Id));
7419 W ("Has_Component_Size_Clause", Flag68 (Id));
7420 W ("Has_Contiguous_Rep", Flag181 (Id));
7421 W ("Has_Controlled_Component", Flag43 (Id));
7422 W ("Has_Controlling_Result", Flag98 (Id));
7423 W ("Has_Convention_Pragma", Flag119 (Id));
7424 W ("Has_Default_Aspect", Flag39 (Id));
7425 W ("Has_Delayed_Aspects", Flag200 (Id));
7426 W ("Has_Delayed_Freeze", Flag18 (Id));
7427 W ("Has_Discriminants", Flag5 (Id));
7428 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7429 W ("Has_Exit", Flag47 (Id));
7430 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7431 W ("Has_Forward_Instantiation", Flag175 (Id));
7432 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7433 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7434 W ("Has_Homonym", Flag56 (Id));
7435 W ("Has_Implicit_Dereference", Flag251 (Id));
7436 W ("Has_Inheritable_Invariants", Flag248 (Id));
7437 W ("Has_Initial_Value", Flag219 (Id));
7438 W ("Has_Invariants", Flag232 (Id));
7439 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7440 W ("Has_Master_Entity", Flag21 (Id));
7441 W ("Has_Missing_Return", Flag142 (Id));
7442 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7443 W ("Has_Non_Standard_Rep", Flag75 (Id));
7444 W ("Has_Object_Size_Clause", Flag172 (Id));
7445 W ("Has_Per_Object_Constraint", Flag154 (Id));
7446 W ("Has_Persistent_BSS", Flag188 (Id));
7447 W ("Has_Postconditions", Flag240 (Id));
7448 W ("Has_Pragma_Controlled", Flag27 (Id));
7449 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7450 W ("Has_Pragma_Inline", Flag157 (Id));
7451 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7452 W ("Has_Pragma_Ordered", Flag198 (Id));
7453 W ("Has_Pragma_Pack", Flag121 (Id));
7454 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7455 W ("Has_Pragma_Pure", Flag203 (Id));
7456 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7457 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7458 W ("Has_Pragma_Unmodified", Flag233 (Id));
7459 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7460 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7461 W ("Has_Predicates", Flag250 (Id));
7462 W ("Has_Primitive_Operations", Flag120 (Id));
7463 W ("Has_Private_Ancestor", Flag151 (Id));
7464 W ("Has_Private_Declaration", Flag155 (Id));
7465 W ("Has_Qualified_Name", Flag161 (Id));
7466 W ("Has_RACW", Flag214 (Id));
7467 W ("Has_Record_Rep_Clause", Flag65 (Id));
7468 W ("Has_Recursive_Call", Flag143 (Id));
7469 W ("Has_Size_Clause", Flag29 (Id));
7470 W ("Has_Small_Clause", Flag67 (Id));
7471 W ("Has_Specified_Layout", Flag100 (Id));
7472 W ("Has_Specified_Stream_Input", Flag190 (Id));
7473 W ("Has_Specified_Stream_Output", Flag191 (Id));
7474 W ("Has_Specified_Stream_Read", Flag192 (Id));
7475 W ("Has_Specified_Stream_Write", Flag193 (Id));
7476 W ("Has_Static_Discriminants", Flag211 (Id));
7477 W ("Has_Storage_Size_Clause", Flag23 (Id));
7478 W ("Has_Stream_Size_Clause", Flag184 (Id));
7479 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7480 W ("Has_Task", Flag30 (Id));
7481 W ("Has_Thunks", Flag228 (Id));
7482 W ("Has_Unchecked_Union", Flag123 (Id));
7483 W ("Has_Unknown_Discriminants", Flag72 (Id));
7484 W ("Has_Up_Level_Access", Flag215 (Id));
7485 W ("Has_Volatile_Components", Flag87 (Id));
7486 W ("Has_Xref_Entry", Flag182 (Id));
7487 W ("In_Package_Body", Flag48 (Id));
7488 W ("In_Private_Part", Flag45 (Id));
7489 W ("In_Use", Flag8 (Id));
7490 W ("Is_AST_Entry", Flag132 (Id));
7491 W ("Is_Abstract_Subprogram", Flag19 (Id));
7492 W ("Is_Abstract_Type", Flag146 (Id));
7493 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7494 W ("Is_Access_Constant", Flag69 (Id));
7495 W ("Is_Ada_2005_Only", Flag185 (Id));
7496 W ("Is_Ada_2012_Only", Flag199 (Id));
7497 W ("Is_Aliased", Flag15 (Id));
7498 W ("Is_Asynchronous", Flag81 (Id));
7499 W ("Is_Atomic", Flag85 (Id));
7500 W ("Is_Bit_Packed_Array", Flag122 (Id));
7501 W ("Is_CPP_Class", Flag74 (Id));
7502 W ("Is_Called", Flag102 (Id));
7503 W ("Is_Character_Type", Flag63 (Id));
7504 W ("Is_Child_Unit", Flag73 (Id));
7505 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7506 W ("Is_Compilation_Unit", Flag149 (Id));
7507 W ("Is_Completely_Hidden", Flag103 (Id));
7508 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7509 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7510 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7511 W ("Is_Constrained", Flag12 (Id));
7512 W ("Is_Constructor", Flag76 (Id));
7513 W ("Is_Controlled", Flag42 (Id));
7514 W ("Is_Controlling_Formal", Flag97 (Id));
7515 W ("Is_Descendent_Of_Address", Flag223 (Id));
7516 W ("Is_Discrim_SO_Function", Flag176 (Id));
7517 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7518 W ("Is_Dispatching_Operation", Flag6 (Id));
7519 W ("Is_Eliminated", Flag124 (Id));
7520 W ("Is_Entry_Formal", Flag52 (Id));
7521 W ("Is_Exported", Flag99 (Id));
7522 W ("Is_First_Subtype", Flag70 (Id));
7523 W ("Is_For_Access_Subtype", Flag118 (Id));
7524 W ("Is_Formal_Subprogram", Flag111 (Id));
7525 W ("Is_Frozen", Flag4 (Id));
7526 W ("Is_Generic_Actual_Type", Flag94 (Id));
7527 W ("Is_Generic_Instance", Flag130 (Id));
7528 W ("Is_Generic_Type", Flag13 (Id));
7529 W ("Is_Hidden", Flag57 (Id));
7530 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7531 W ("Is_Immediately_Visible", Flag7 (Id));
7532 W ("Is_Imported", Flag24 (Id));
7533 W ("Is_Inlined", Flag11 (Id));
7534 W ("Is_Instantiated", Flag126 (Id));
7535 W ("Is_Interface", Flag186 (Id));
7536 W ("Is_Internal", Flag17 (Id));
7537 W ("Is_Interrupt_Handler", Flag89 (Id));
7538 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7539 W ("Is_Itype", Flag91 (Id));
7540 W ("Is_Known_Non_Null", Flag37 (Id));
7541 W ("Is_Known_Null", Flag204 (Id));
7542 W ("Is_Known_Valid", Flag170 (Id));
7543 W ("Is_Limited_Composite", Flag106 (Id));
7544 W ("Is_Limited_Interface", Flag197 (Id));
7545 W ("Is_Limited_Record", Flag25 (Id));
7546 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7547 W ("Is_Non_Static_Subtype", Flag109 (Id));
7548 W ("Is_Null_Init_Proc", Flag178 (Id));
7549 W ("Is_Obsolescent", Flag153 (Id));
7550 W ("Is_Only_Out_Parameter", Flag226 (Id));
7551 W ("Is_Optional_Parameter", Flag134 (Id));
7552 W ("Is_Package_Body_Entity", Flag160 (Id));
7553 W ("Is_Packed", Flag51 (Id));
7554 W ("Is_Packed_Array_Type", Flag138 (Id));
7555 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7556 W ("Is_Preelaborated", Flag59 (Id));
7557 W ("Is_Primitive", Flag218 (Id));
7558 W ("Is_Primitive_Wrapper", Flag195 (Id));
7559 W ("Is_Private_Composite", Flag107 (Id));
7560 W ("Is_Private_Descendant", Flag53 (Id));
7561 W ("Is_Private_Primitive", Flag245 (Id));
7562 W ("Is_Processed_Transient", Flag252 (Id));
7563 W ("Is_Public", Flag10 (Id));
7564 W ("Is_Pure", Flag44 (Id));
7565 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7566 W ("Is_RACW_Stub_Type", Flag244 (Id));
7567 W ("Is_Raised", Flag224 (Id));
7568 W ("Is_Remote_Call_Interface", Flag62 (Id));
7569 W ("Is_Remote_Types", Flag61 (Id));
7570 W ("Is_Renaming_Of_Object", Flag112 (Id));
7571 W ("Is_Return_Object", Flag209 (Id));
7572 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7573 W ("Is_Shared_Passive", Flag60 (Id));
7574 W ("Is_Statically_Allocated", Flag28 (Id));
7575 W ("Is_Tag", Flag78 (Id));
7576 W ("Is_Tagged_Type", Flag55 (Id));
7577 W ("Is_Thunk", Flag225 (Id));
7578 W ("Is_Trivial_Subprogram", Flag235 (Id));
7579 W ("Is_True_Constant", Flag163 (Id));
7580 W ("Is_Unchecked_Union", Flag117 (Id));
7581 W ("Is_Underlying_Record_View", Flag246 (Id));
7582 W ("Is_Unsigned_Type", Flag144 (Id));
7583 W ("Is_VMS_Exception", Flag133 (Id));
7584 W ("Is_Valued_Procedure", Flag127 (Id));
7585 W ("Is_Visible_Child_Unit", Flag116 (Id));
7586 W ("Is_Visible_Formal", Flag206 (Id));
7587 W ("Is_Volatile", Flag16 (Id));
7588 W ("Itype_Printed", Flag202 (Id));
7589 W ("Kill_Elaboration_Checks", Flag32 (Id));
7590 W ("Kill_Range_Checks", Flag33 (Id));
7591 W ("Kill_Tag_Checks", Flag34 (Id));
7592 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7593 W ("Low_Bound_Tested", Flag205 (Id));
7594 W ("Machine_Radix_10", Flag84 (Id));
7595 W ("Materialize_Entity", Flag168 (Id));
7596 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7597 W ("Must_Have_Preelab_Init", Flag208 (Id));
7598 W ("Needs_Debug_Info", Flag147 (Id));
7599 W ("Needs_No_Actuals", Flag22 (Id));
7600 W ("Never_Set_In_Source", Flag115 (Id));
7601 W ("No_Pool_Assigned", Flag131 (Id));
7602 W ("No_Return", Flag113 (Id));
7603 W ("No_Strict_Aliasing", Flag136 (Id));
7604 W ("Non_Binary_Modulus", Flag58 (Id));
7605 W ("Nonzero_Is_True", Flag162 (Id));
7606 W ("OK_To_Rename", Flag247 (Id));
7607 W ("OK_To_Reorder_Components", Flag239 (Id));
7608 W ("Optimize_Alignment_Space", Flag241 (Id));
7609 W ("Optimize_Alignment_Time", Flag242 (Id));
7610 W ("Overlays_Constant", Flag243 (Id));
7611 W ("Reachable", Flag49 (Id));
7612 W ("Referenced", Flag156 (Id));
7613 W ("Referenced_As_LHS", Flag36 (Id));
7614 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7615 W ("Renamed_In_Spec", Flag231 (Id));
7616 W ("Requires_Overriding", Flag213 (Id));
7617 W ("Return_Present", Flag54 (Id));
7618 W ("Returns_By_Ref", Flag90 (Id));
7619 W ("Reverse_Bit_Order", Flag164 (Id));
7620 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7621 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7622 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7623 W ("Static_Elaboration_Desired", Flag77 (Id));
7624 W ("Strict_Alignment", Flag145 (Id));
7625 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7626 W ("Suppress_Initialization", Flag105 (Id));
7627 W ("Suppress_Style_Checks", Flag165 (Id));
7628 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7629 W ("Treat_As_Volatile", Flag41 (Id));
7630 W ("Universal_Aliasing", Flag216 (Id));
7631 W ("Used_As_Generic_Actual", Flag222 (Id));
7632 W ("Uses_Sec_Stack", Flag95 (Id));
7633 W ("Warnings_Off", Flag96 (Id));
7634 W ("Warnings_Off_Used", Flag236 (Id));
7635 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7636 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7637 W ("Was_Hidden", Flag196 (Id));
7638 end Write_Entity_Flags;
7640 -----------------------
7641 -- Write_Entity_Info --
7642 -----------------------
7644 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7646 procedure Write_Attribute (Which : String; Nam : E);
7647 -- Write attribute value with given string name
7649 procedure Write_Kind (Id : Entity_Id);
7650 -- Write Ekind field of entity
7652 ---------------------
7653 -- Write_Attribute --
7654 ---------------------
7656 procedure Write_Attribute (Which : String; Nam : E) is
7660 Write_Int (Int (Nam));
7662 Write_Name (Chars (Nam));
7664 end Write_Attribute;
7670 procedure Write_Kind (Id : Entity_Id) is
7671 K : constant String := Entity_Kind'Image (Ekind (Id));
7675 Write_Str (" Kind ");
7677 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7678 Write_Str ("TAGGED ");
7681 Write_Str (K (3 .. K'Length));
7684 if Is_Type (Id) and then Depends_On_Private (Id) then
7685 Write_Str ("Depends_On_Private ");
7689 -- Start of processing for Write_Entity_Info
7693 Write_Attribute ("Name ", Id);
7694 Write_Int (Int (Id));
7698 Write_Attribute (" Type ", Etype (Id));
7700 Write_Attribute (" Scope ", Scope (Id));
7705 when Discrete_Kind =>
7706 Write_Str ("Bounds: Id = ");
7708 if Present (Scalar_Range (Id)) then
7709 Write_Int (Int (Type_Low_Bound (Id)));
7710 Write_Str (" .. Id = ");
7711 Write_Int (Int (Type_High_Bound (Id)));
7713 Write_Str ("Empty");
7724 (" Component Type ", Component_Type (Id));
7727 Write_Str (" Indexes ");
7729 Index := First_Index (Id);
7730 while Present (Index) loop
7731 Write_Attribute (" ", Etype (Index));
7732 Index := Next_Index (Index);
7740 (" Directly Designated Type ",
7741 Directly_Designated_Type (Id));
7744 when Overloadable_Kind =>
7745 if Present (Homonym (Id)) then
7746 Write_Str (" Homonym ");
7747 Write_Name (Chars (Homonym (Id)));
7749 Write_Int (Int (Homonym (Id)));
7756 if Ekind (Scope (Id)) in Record_Kind then
7758 " Original_Record_Component ",
7759 Original_Record_Component (Id));
7760 Write_Int (Int (Original_Record_Component (Id)));
7764 when others => null;
7766 end Write_Entity_Info;
7768 -----------------------
7769 -- Write_Field6_Name --
7770 -----------------------
7772 procedure Write_Field6_Name (Id : Entity_Id) is
7773 pragma Warnings (Off, Id);
7775 Write_Str ("First_Rep_Item");
7776 end Write_Field6_Name;
7778 -----------------------
7779 -- Write_Field7_Name --
7780 -----------------------
7782 procedure Write_Field7_Name (Id : Entity_Id) is
7783 pragma Warnings (Off, Id);
7785 Write_Str ("Freeze_Node");
7786 end Write_Field7_Name;
7788 -----------------------
7789 -- Write_Field8_Name --
7790 -----------------------
7792 procedure Write_Field8_Name (Id : Entity_Id) is
7796 Write_Str ("Associated_Node_For_Itype");
7799 Write_Str ("Dependent_Instances");
7802 Write_Str ("First_Exit_Statement");
7805 Write_Str ("Hiding_Loop_Variable");
7809 E_Subprogram_Body =>
7810 Write_Str ("Mechanism");
7814 Write_Str ("Normalized_First_Bit");
7817 Write_Str ("Postcondition_Proc");
7819 when E_Return_Statement =>
7820 Write_Str ("Return_Applies_To");
7823 Write_Str ("Field8??");
7825 end Write_Field8_Name;
7827 -----------------------
7828 -- Write_Field9_Name --
7829 -----------------------
7831 procedure Write_Field9_Name (Id : Entity_Id) is
7835 Write_Str ("Class_Wide_Type");
7838 Write_Str ("Current_Value");
7841 E_Generic_Function |
7843 E_Generic_Procedure |
7846 Write_Str ("Renaming_Map");
7849 Write_Str ("Field9??");
7851 end Write_Field9_Name;
7853 ------------------------
7854 -- Write_Field10_Name --
7855 ------------------------
7857 procedure Write_Field10_Name (Id : Entity_Id) is
7860 when Class_Wide_Kind |
7866 Write_Str ("Direct_Primitive_Operations");
7869 Write_Str ("Float_Rep");
7871 when E_In_Parameter |
7873 Write_Str ("Discriminal_Link");
7879 Write_Str ("Handler_Records");
7883 Write_Str ("Normalized_Position_Max");
7886 Write_Str ("Field10??");
7888 end Write_Field10_Name;
7890 ------------------------
7891 -- Write_Field11_Name --
7892 ------------------------
7894 procedure Write_Field11_Name (Id : Entity_Id) is
7898 Write_Str ("Block_Node");
7902 Write_Str ("Component_Bit_Offset");
7905 Write_Str ("Entry_Component");
7907 when E_Enumeration_Literal =>
7908 Write_Str ("Enumeration_Pos");
7912 Write_Str ("Full_View");
7914 when E_Generic_Package =>
7915 Write_Str ("Generic_Homonym");
7921 Write_Str ("Protected_Body_Subprogram");
7924 Write_Str ("Field11??");
7926 end Write_Field11_Name;
7928 ------------------------
7929 -- Write_Field12_Name --
7930 ------------------------
7932 procedure Write_Field12_Name (Id : Entity_Id) is
7936 Write_Str ("Associated_Formal_Package");
7939 Write_Str ("Barrier_Function");
7941 when E_Enumeration_Literal =>
7942 Write_Str ("Enumeration_Rep");
7950 E_In_Out_Parameter |
7954 Write_Str ("Esize");
7958 Write_Str ("Next_Inlined_Subprogram");
7961 Write_Str ("Field12??");
7963 end Write_Field12_Name;
7965 ------------------------
7966 -- Write_Field13_Name --
7967 ------------------------
7969 procedure Write_Field13_Name (Id : Entity_Id) is
7974 Write_Str ("Component_Clause");
7977 if not Comes_From_Source (Id)
7979 Chars (Id) = Name_Op_Ne
7981 Write_Str ("Corresponding_Equality");
7983 elsif Comes_From_Source (Id) then
7984 Write_Str ("Elaboration_Entity");
7987 Write_Str ("Field13??");
7992 Generic_Unit_Kind =>
7993 Write_Str ("Elaboration_Entity");
7997 Write_Str ("Extra_Accessibility");
8000 Write_Str ("RM_Size");
8003 Write_Str ("Field13??");
8005 end Write_Field13_Name;
8007 -----------------------
8008 -- Write_Field14_Name --
8009 -----------------------
8011 procedure Write_Field14_Name (Id : Entity_Id) is
8020 Write_Str ("Alignment");
8024 Write_Str ("First_Optional_Parameter");
8028 Write_Str ("Normalized_Position");
8031 E_Generic_Package =>
8032 Write_Str ("Shadow_Entities");
8035 Write_Str ("Field14??");
8037 end Write_Field14_Name;
8039 ------------------------
8040 -- Write_Field15_Name --
8041 ------------------------
8043 procedure Write_Field15_Name (Id : Entity_Id) is
8046 when E_Discriminant =>
8047 Write_Str ("Discriminant_Number");
8050 Write_Str ("DT_Entry_Count");
8054 Write_Str ("DT_Position");
8056 when E_Protected_Type =>
8057 Write_Str ("Entry_Bodies_Array");
8060 Write_Str ("Entry_Parameters_Type");
8063 Write_Str ("Extra_Formal");
8065 when Enumeration_Kind =>
8066 Write_Str ("Lit_Indexes");
8070 Write_Str ("Related_Instance");
8074 Write_Str ("Return_Flag_Or_Transient_Decl");
8076 when Decimal_Fixed_Point_Kind =>
8077 Write_Str ("Scale_Value");
8081 Write_Str ("Storage_Size_Variable");
8083 when E_String_Literal_Subtype =>
8084 Write_Str ("String_Literal_Low_Bound");
8087 Write_Str ("Field15??");
8089 end Write_Field15_Name;
8091 ------------------------
8092 -- Write_Field16_Name --
8093 ------------------------
8095 procedure Write_Field16_Name (Id : Entity_Id) is
8098 when E_Record_Type |
8099 E_Record_Type_With_Private =>
8100 Write_Str ("Access_Disp_Table");
8102 when E_Record_Subtype |
8103 E_Class_Wide_Subtype =>
8104 Write_Str ("Cloned_Subtype");
8108 Write_Str ("DTC_Entity");
8111 Write_Str ("Entry_Formal");
8116 Write_Str ("First_Private_Entity");
8118 when Enumeration_Kind =>
8119 Write_Str ("Lit_Strings");
8121 when E_String_Literal_Subtype =>
8122 Write_Str ("String_Literal_Length");
8126 Write_Str ("Unset_Reference");
8129 Write_Str ("Field16??");
8131 end Write_Field16_Name;
8133 ------------------------
8134 -- Write_Field17_Name --
8135 ------------------------
8137 procedure Write_Field17_Name (Id : Entity_Id) is
8142 E_Generic_In_Out_Parameter |
8144 Write_Str ("Actual_Subtype");
8147 Write_Str ("Digits_Value");
8149 when E_Discriminant =>
8150 Write_Str ("Discriminal");
8159 E_Generic_Function |
8161 E_Generic_Procedure |
8169 E_Return_Statement |
8171 E_Subprogram_Type =>
8172 Write_Str ("First_Entity");
8175 Write_Str ("First_Index");
8177 when Enumeration_Kind =>
8178 Write_Str ("First_Literal");
8181 Write_Str ("Master_Id");
8183 when Modular_Integer_Kind =>
8184 Write_Str ("Modulus");
8186 when E_Incomplete_Type =>
8187 Write_Str ("Non_Limited_View");
8189 when E_Incomplete_Subtype =>
8190 if From_With_Type (Id) then
8191 Write_Str ("Non_Limited_View");
8195 Write_Str ("Prival");
8198 Write_Str ("Field17??");
8200 end Write_Field17_Name;
8202 ------------------------
8203 -- Write_Field18_Name --
8204 ------------------------
8206 procedure Write_Field18_Name (Id : Entity_Id) is
8209 when E_Enumeration_Literal |
8213 Write_Str ("Alias");
8215 when E_Record_Type =>
8216 Write_Str ("Corresponding_Concurrent_Type");
8218 when E_Subprogram_Body =>
8219 Write_Str ("Corresponding_Protected_Entry");
8221 when Concurrent_Kind =>
8222 Write_Str ("Corresponding_Record_Type");
8227 Write_Str ("Enclosing_Scope");
8229 when E_Entry_Index_Parameter =>
8230 Write_Str ("Entry_Index_Constant");
8232 when E_Class_Wide_Subtype |
8233 E_Access_Protected_Subprogram_Type |
8234 E_Anonymous_Access_Protected_Subprogram_Type |
8235 E_Access_Subprogram_Type |
8237 Write_Str ("Equivalent_Type");
8239 when Fixed_Point_Kind =>
8240 Write_Str ("Delta_Value");
8242 when Incomplete_Or_Private_Kind |
8244 Write_Str ("Private_Dependents");
8247 Write_Str ("Renamed_Object");
8251 E_Generic_Function |
8252 E_Generic_Procedure |
8253 E_Generic_Package =>
8254 Write_Str ("Renamed_Entity");
8257 Write_Str ("Field18??");
8259 end Write_Field18_Name;
8261 -----------------------
8262 -- Write_Field19_Name --
8263 -----------------------
8265 procedure Write_Field19_Name (Id : Entity_Id) is
8269 E_Generic_Package =>
8270 Write_Str ("Body_Entity");
8272 when E_Discriminant =>
8273 Write_Str ("Corresponding_Discriminant");
8275 when E_Record_Type =>
8276 Write_Str ("Parent_Subtype");
8280 Write_Str ("Related_Array_Object");
8284 Write_Str ("Size_Check_Code");
8286 when E_Package_Body |
8288 Write_Str ("Spec_Entity");
8290 when Private_Kind =>
8291 Write_Str ("Underlying_Full_View");
8294 Write_Str ("Field19??");
8296 end Write_Field19_Name;
8298 -----------------------
8299 -- Write_Field20_Name --
8300 -----------------------
8302 procedure Write_Field20_Name (Id : Entity_Id) is
8306 Write_Str ("Component_Type");
8308 when E_In_Parameter |
8309 E_Generic_In_Parameter =>
8310 Write_Str ("Default_Value");
8313 Write_Str ("Directly_Designated_Type");
8316 Write_Str ("Discriminant_Checking_Func");
8318 when E_Discriminant =>
8319 Write_Str ("Discriminant_Default_Value");
8328 E_Generic_Function |
8330 E_Generic_Procedure |
8338 E_Return_Statement |
8340 E_Subprogram_Type =>
8341 Write_Str ("Last_Entity");
8345 Write_Str ("Prival_Link");
8348 Write_Str ("Scalar_Range");
8351 Write_Str ("Register_Exception_Call");
8354 Write_Str ("Field20??");
8356 end Write_Field20_Name;
8358 -----------------------
8359 -- Write_Field21_Name --
8360 -----------------------
8362 procedure Write_Field21_Name (Id : Entity_Id) is
8366 Write_Str ("Accept_Address");
8368 when E_In_Parameter =>
8369 Write_Str ("Default_Expr_Function");
8371 when Concurrent_Kind |
8372 Incomplete_Or_Private_Kind |
8376 Write_Str ("Discriminant_Constraint");
8381 E_Generic_Function |
8383 E_Generic_Procedure |
8385 Write_Str ("Interface_Name");
8388 Modular_Integer_Kind =>
8389 Write_Str ("Original_Array_Type");
8391 when Fixed_Point_Kind =>
8392 Write_Str ("Small_Value");
8395 Write_Str ("Field21??");
8397 end Write_Field21_Name;
8399 -----------------------
8400 -- Write_Field22_Name --
8401 -----------------------
8403 procedure Write_Field22_Name (Id : Entity_Id) is
8407 Write_Str ("Associated_Storage_Pool");
8410 Write_Str ("Component_Size");
8412 when E_Record_Type =>
8413 Write_Str ("Corresponding_Remote_Type");
8417 Write_Str ("Original_Record_Component");
8419 when E_Enumeration_Literal =>
8420 Write_Str ("Enumeration_Rep_Expr");
8423 Write_Str ("Exception_Code");
8425 when E_Record_Type_With_Private |
8426 E_Record_Subtype_With_Private |
8429 E_Limited_Private_Type |
8430 E_Limited_Private_Subtype =>
8431 Write_Str ("Private_View");
8434 Write_Str ("Protected_Formal");
8444 E_Generic_Function |
8445 E_Generic_Procedure |
8448 E_Return_Statement |
8451 Write_Str ("Scope_Depth_Value");
8454 Write_Str ("Shared_Var_Procs_Instance");
8457 Write_Str ("Field22??");
8459 end Write_Field22_Name;
8461 ------------------------
8462 -- Write_Field23_Name --
8463 ------------------------
8465 procedure Write_Field23_Name (Id : Entity_Id) is
8468 when E_Discriminant =>
8469 Write_Str ("CR_Discriminant");
8472 Write_Str ("Entry_Cancel_Parameter");
8474 when E_Enumeration_Type =>
8475 Write_Str ("Enum_Pos_To_Rep");
8479 Write_Str ("Extra_Constrained");
8482 Write_Str ("Finalization_Master");
8484 when E_Generic_Function |
8486 E_Generic_Procedure =>
8487 Write_Str ("Inner_Instances");
8490 Write_Str ("Packed_Array_Type");
8493 Write_Str ("Protection_Object");
8495 when Concurrent_Kind |
8496 Incomplete_Or_Private_Kind |
8500 Write_Str ("Stored_Constraint");
8504 if Present (Scope (Id))
8505 and then Is_Protected_Type (Scope (Id))
8507 Write_Str ("Protection_Object");
8509 Write_Str ("Generic_Renamings");
8513 if Is_Generic_Instance (Id) then
8514 Write_Str ("Generic_Renamings");
8516 Write_Str ("Limited_View");
8520 Write_Str ("Field23??");
8522 end Write_Field23_Name;
8524 ------------------------
8525 -- Write_Field24_Name --
8526 ------------------------
8528 procedure Write_Field24_Name (Id : Entity_Id) is
8533 Write_Str ("Finalizer");
8538 Write_Str ("Related_Expression");
8543 Generic_Subprogram_Kind =>
8544 Write_Str ("Contract");
8547 Write_Str ("Field24???");
8549 end Write_Field24_Name;
8551 ------------------------
8552 -- Write_Field25_Name --
8553 ------------------------
8555 procedure Write_Field25_Name (Id : Entity_Id) is
8559 Write_Str ("Debug_Renaming_Link");
8562 Write_Str ("DT_Offset_To_Top_Func");
8566 Write_Str ("Interface_Alias");
8568 when E_Record_Type |
8570 E_Record_Type_With_Private |
8571 E_Record_Subtype_With_Private =>
8572 Write_Str ("Interfaces");
8575 Write_Str ("Task_Body_Procedure");
8579 Write_Str ("PPC_Wrapper");
8581 when E_Enumeration_Subtype |
8582 E_Modular_Integer_Subtype |
8583 E_Signed_Integer_Subtype =>
8584 Write_Str ("Static_Predicate");
8587 Write_Str ("Field25??");
8589 end Write_Field25_Name;
8591 ------------------------
8592 -- Write_Field26_Name --
8593 ------------------------
8595 procedure Write_Field26_Name (Id : Entity_Id) is
8598 when E_Record_Type |
8599 E_Record_Type_With_Private =>
8600 Write_Str ("Dispatch_Table_Wrappers");
8602 when E_In_Out_Parameter |
8605 Write_Str ("Last_Assignment");
8607 when E_Access_Subprogram_Type =>
8608 Write_Str ("Original_Access_Type");
8610 when E_Generic_Package |
8612 Write_Str ("Package_Instantiation");
8616 Write_Str ("Related_Type");
8619 Write_Str ("Relative_Deadline_Variable");
8623 if Ekind (Id) = E_Procedure
8624 and then not Is_Dispatching_Operation (Id)
8626 Write_Str ("Static_Initialization");
8628 Write_Str ("Overridden_Operation");
8632 Write_Str ("Field26??");
8634 end Write_Field26_Name;
8636 ------------------------
8637 -- Write_Field27_Name --
8638 ------------------------
8640 procedure Write_Field27_Name (Id : Entity_Id) is
8645 Write_Str ("Current_Use_Clause");
8650 Write_Str ("Related_Type");
8653 Write_Str ("Wrapped_Entity");
8656 Write_Str ("Field27??");
8658 end Write_Field27_Name;
8660 ------------------------
8661 -- Write_Field28_Name --
8662 ------------------------
8664 procedure Write_Field28_Name (Id : Entity_Id) is
8670 Write_Str ("Extra_Formals");
8672 when E_Record_Type =>
8673 Write_Str ("Underlying_Record_View");
8676 Write_Str ("Field28??");
8678 end Write_Field28_Name;
8680 procedure Write_Field29_Name (Id : Entity_Id) is
8684 Write_Str ("Subprograms_For_Type");
8687 Write_Str ("Field29??");
8689 end Write_Field29_Name;
8691 -------------------------
8692 -- Iterator Procedures --
8693 -------------------------
8695 procedure Proc_Next_Component (N : in out Node_Id) is
8697 N := Next_Component (N);
8698 end Proc_Next_Component;
8700 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8702 N := Next_Entity (N);
8703 while Present (N) loop
8704 exit when Ekind_In (N, E_Component, E_Discriminant);
8705 N := Next_Entity (N);
8707 end Proc_Next_Component_Or_Discriminant;
8709 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8711 N := Next_Discriminant (N);
8712 end Proc_Next_Discriminant;
8714 procedure Proc_Next_Formal (N : in out Node_Id) is
8716 N := Next_Formal (N);
8717 end Proc_Next_Formal;
8719 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8721 N := Next_Formal_With_Extras (N);
8722 end Proc_Next_Formal_With_Extras;
8724 procedure Proc_Next_Index (N : in out Node_Id) is
8726 N := Next_Index (N);
8727 end Proc_Next_Index;
8729 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8731 N := Next_Inlined_Subprogram (N);
8732 end Proc_Next_Inlined_Subprogram;
8734 procedure Proc_Next_Literal (N : in out Node_Id) is
8736 N := Next_Literal (N);
8737 end Proc_Next_Literal;
8739 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8741 N := Next_Stored_Discriminant (N);
8742 end Proc_Next_Stored_Discriminant;