1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- Return_Flag_Or_Transient_Decl Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
131 -- Access_Disp_Table Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- String_Literal_Length Uint16
138 -- Unset_Reference Node16
140 -- Actual_Subtype Node17
141 -- Digits_Value Uint17
142 -- Discriminal Node17
143 -- First_Entity Node17
144 -- First_Index Node17
145 -- First_Literal Node17
148 -- Non_Limited_View Node17
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Private_Dependents Elist18
159 -- Renamed_Entity Node18
160 -- Renamed_Object Node18
162 -- Body_Entity Node19
163 -- Corresponding_Discriminant Node19
164 -- Parent_Subtype Node19
165 -- Related_Array_Object Node19
166 -- Size_Check_Code Node19
167 -- Spec_Entity Node19
168 -- Underlying_Full_View Node19
170 -- Component_Type Node20
171 -- Default_Value Node20
172 -- Directly_Designated_Type Node20
173 -- Discriminant_Checking_Func Node20
174 -- Discriminant_Default_Value Node20
175 -- Last_Entity Node20
176 -- Prival_Link Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Array_Type Node21
185 -- Small_Value Ureal21
187 -- Associated_Storage_Pool Node22
188 -- Component_Size Uint22
189 -- Corresponding_Remote_Type Node22
190 -- Enumeration_Rep_Expr Node22
191 -- Exception_Code Uint22
192 -- Original_Record_Component Node22
193 -- Private_View Node22
194 -- Protected_Formal Node22
195 -- Scope_Depth_Value Uint22
196 -- Shared_Var_Procs_Instance Node22
198 -- Associated_Collection Node23
199 -- CR_Discriminant Node23
200 -- Entry_Cancel_Parameter Node23
201 -- Enum_Pos_To_Rep Node23
202 -- Extra_Constrained Node23
203 -- Generic_Renamings Elist23
204 -- Inner_Instances Elist23
205 -- Limited_View Node23
206 -- Packed_Array_Type Node23
207 -- Protection_Object Node23
208 -- Stored_Constraint Elist23
211 -- Related_Expression Node24
214 -- Interface_Alias Node25
215 -- Interfaces Elist25
216 -- Debug_Renaming_Link Node25
217 -- DT_Offset_To_Top_Func Node25
218 -- PPC_Wrapper Node25
219 -- Static_Predicate List25
220 -- Task_Body_Procedure Node25
222 -- Dispatch_Table_Wrappers Elist26
223 -- Last_Assignment Node26
224 -- Original_Access_Type Node26
225 -- Overridden_Operation Node26
226 -- Package_Instantiation Node26
227 -- Relative_Deadline_Variable Node26
228 -- Static_Initialization Node26
230 -- Current_Use_Clause Node27
231 -- Related_Type Node27
232 -- Wrapped_Entity Node27
234 -- Extra_Formals Node28
235 -- Underlying_Record_View Node28
237 -- Subprograms_For_Type Node29
239 ---------------------------------------------
240 -- Usage of Flags in Defining Entity Nodes --
241 ---------------------------------------------
243 -- All flags are unique, there is no overlaying, so each flag is physically
244 -- present in every entity. However, for many of the flags, it only makes
245 -- sense for them to be set true for certain subsets of entity kinds. See
246 -- the spec of Einfo for further details.
248 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
251 -- Has_Discriminants Flag5
252 -- Is_Dispatching_Operation Flag6
253 -- Is_Immediately_Visible Flag7
255 -- Is_Potentially_Use_Visible Flag9
259 -- Is_Constrained Flag12
260 -- Is_Generic_Type Flag13
261 -- Depends_On_Private Flag14
263 -- Is_Volatile Flag16
264 -- Is_Internal Flag17
265 -- Has_Delayed_Freeze Flag18
266 -- Is_Abstract_Subprogram Flag19
267 -- Is_Concurrent_Record_Type Flag20
269 -- Has_Master_Entity Flag21
270 -- Needs_No_Actuals Flag22
271 -- Has_Storage_Size_Clause Flag23
272 -- Is_Imported Flag24
273 -- Is_Limited_Record Flag25
274 -- Has_Completion Flag26
275 -- Has_Pragma_Controlled Flag27
276 -- Is_Statically_Allocated Flag28
277 -- Has_Size_Clause Flag29
280 -- Checks_May_Be_Suppressed Flag31
281 -- Kill_Elaboration_Checks Flag32
282 -- Kill_Range_Checks Flag33
283 -- Kill_Tag_Checks Flag34
284 -- Is_Class_Wide_Equivalent_Type Flag35
285 -- Referenced_As_LHS Flag36
286 -- Is_Known_Non_Null Flag37
287 -- Can_Never_Be_Null Flag38
288 -- Has_Default_Aspect Flag39
289 -- Body_Needed_For_SAL Flag40
291 -- Treat_As_Volatile Flag41
292 -- Is_Controlled Flag42
293 -- Has_Controlled_Component Flag43
295 -- In_Private_Part Flag45
296 -- Has_Alignment_Clause Flag46
298 -- In_Package_Body Flag48
300 -- Delay_Subprogram_Descriptors Flag50
303 -- Is_Entry_Formal Flag52
304 -- Is_Private_Descendant Flag53
305 -- Return_Present Flag54
306 -- Is_Tagged_Type Flag55
307 -- Has_Homonym Flag56
309 -- Non_Binary_Modulus Flag58
310 -- Is_Preelaborated Flag59
311 -- Is_Shared_Passive Flag60
313 -- Is_Remote_Types Flag61
314 -- Is_Remote_Call_Interface Flag62
315 -- Is_Character_Type Flag63
316 -- Is_Intrinsic_Subprogram Flag64
317 -- Has_Record_Rep_Clause Flag65
318 -- Has_Enumeration_Rep_Clause Flag66
319 -- Has_Small_Clause Flag67
320 -- Has_Component_Size_Clause Flag68
321 -- Is_Access_Constant Flag69
322 -- Is_First_Subtype Flag70
324 -- Has_Completion_In_Body Flag71
325 -- Has_Unknown_Discriminants Flag72
326 -- Is_Child_Unit Flag73
327 -- Is_CPP_Class Flag74
328 -- Has_Non_Standard_Rep Flag75
329 -- Is_Constructor Flag76
330 -- Static_Elaboration_Desired Flag77
332 -- Has_All_Calls_Remote Flag79
333 -- Is_Constr_Subt_For_U_Nominal Flag80
335 -- Is_Asynchronous Flag81
336 -- Has_Gigi_Rep_Item Flag82
337 -- Has_Machine_Radix_Clause Flag83
338 -- Machine_Radix_10 Flag84
340 -- Has_Atomic_Components Flag86
341 -- Has_Volatile_Components Flag87
342 -- Discard_Names Flag88
343 -- Is_Interrupt_Handler Flag89
344 -- Returns_By_Ref Flag90
347 -- Size_Known_At_Compile_Time Flag92
348 -- Has_Subprogram_Descriptor Flag93
349 -- Is_Generic_Actual_Type Flag94
350 -- Uses_Sec_Stack Flag95
351 -- Warnings_Off Flag96
352 -- Is_Controlling_Formal Flag97
353 -- Has_Controlling_Result Flag98
354 -- Is_Exported Flag99
355 -- Has_Specified_Layout Flag100
357 -- Has_Nested_Block_With_Handler Flag101
359 -- Is_Completely_Hidden Flag103
360 -- Address_Taken Flag104
361 -- Suppress_Initialization Flag105
362 -- Is_Limited_Composite Flag106
363 -- Is_Private_Composite Flag107
364 -- Default_Expressions_Processed Flag108
365 -- Is_Non_Static_Subtype Flag109
366 -- Has_External_Tag_Rep_Clause Flag110
368 -- Is_Formal_Subprogram Flag111
369 -- Is_Renaming_Of_Object Flag112
371 -- Delay_Cleanups Flag114
372 -- Never_Set_In_Source Flag115
373 -- Is_Visible_Child_Unit Flag116
374 -- Is_Unchecked_Union Flag117
375 -- Is_For_Access_Subtype Flag118
376 -- Has_Convention_Pragma Flag119
377 -- Has_Primitive_Operations Flag120
379 -- Has_Pragma_Pack Flag121
380 -- Is_Bit_Packed_Array Flag122
381 -- Has_Unchecked_Union Flag123
382 -- Is_Eliminated Flag124
383 -- C_Pass_By_Copy Flag125
384 -- Is_Instantiated Flag126
385 -- Is_Valued_Procedure Flag127
386 -- (used for Component_Alignment) Flag128
387 -- (used for Component_Alignment) Flag129
388 -- Is_Generic_Instance Flag130
390 -- No_Pool_Assigned Flag131
391 -- Is_AST_Entry Flag132
392 -- Is_VMS_Exception Flag133
393 -- Is_Optional_Parameter Flag134
394 -- Has_Aliased_Components Flag135
395 -- No_Strict_Aliasing Flag136
396 -- Is_Machine_Code_Subprogram Flag137
397 -- Is_Packed_Array_Type Flag138
398 -- Has_Biased_Representation Flag139
399 -- Has_Complex_Representation Flag140
401 -- Is_Constr_Subt_For_UN_Aliased Flag141
402 -- Has_Missing_Return Flag142
403 -- Has_Recursive_Call Flag143
404 -- Is_Unsigned_Type Flag144
405 -- Strict_Alignment Flag145
406 -- Is_Abstract_Type Flag146
407 -- Needs_Debug_Info Flag147
408 -- Suppress_Elaboration_Warnings Flag148
409 -- Is_Compilation_Unit Flag149
410 -- Has_Pragma_Elaborate_Body Flag150
412 -- Has_Private_Ancestor Flag151
413 -- Entry_Accepted Flag152
414 -- Is_Obsolescent Flag153
415 -- Has_Per_Object_Constraint Flag154
416 -- Has_Private_Declaration Flag155
417 -- Referenced Flag156
418 -- Has_Pragma_Inline Flag157
419 -- Finalize_Storage_Only Flag158
420 -- From_With_Type Flag159
421 -- Is_Package_Body_Entity Flag160
423 -- Has_Qualified_Name Flag161
424 -- Nonzero_Is_True Flag162
425 -- Is_True_Constant Flag163
426 -- Reverse_Bit_Order Flag164
427 -- Suppress_Style_Checks Flag165
428 -- Debug_Info_Off Flag166
429 -- Sec_Stack_Needed_For_Return Flag167
430 -- Materialize_Entity Flag168
431 -- Has_Pragma_Thread_Local_Storage Flag169
432 -- Is_Known_Valid Flag170
434 -- Is_Hidden_Open_Scope Flag171
435 -- Has_Object_Size_Clause Flag172
436 -- Has_Fully_Qualified_Name Flag173
437 -- Elaboration_Entity_Required Flag174
438 -- Has_Forward_Instantiation Flag175
439 -- Is_Discrim_SO_Function Flag176
440 -- Size_Depends_On_Discriminant Flag177
441 -- Is_Null_Init_Proc Flag178
442 -- Has_Pragma_Pure_Function Flag179
443 -- Has_Pragma_Unreferenced Flag180
445 -- Has_Contiguous_Rep Flag181
446 -- Has_Xref_Entry Flag182
447 -- Must_Be_On_Byte_Boundary Flag183
448 -- Has_Stream_Size_Clause Flag184
449 -- Is_Ada_2005_Only Flag185
450 -- Is_Interface Flag186
451 -- Has_Constrained_Partial_View Flag187
452 -- Has_Persistent_BSS Flag188
453 -- Is_Pure_Unit_Access_Type Flag189
454 -- Has_Specified_Stream_Input Flag190
456 -- Has_Specified_Stream_Output Flag191
457 -- Has_Specified_Stream_Read Flag192
458 -- Has_Specified_Stream_Write Flag193
459 -- Is_Local_Anonymous_Access Flag194
460 -- Is_Primitive_Wrapper Flag195
461 -- Was_Hidden Flag196
462 -- Is_Limited_Interface Flag197
463 -- Has_Pragma_Ordered Flag198
464 -- Is_Ada_2012_Only Flag199
466 -- Has_Delayed_Aspects Flag200
467 -- Has_Anon_Block_Suffix Flag201
468 -- Itype_Printed Flag202
469 -- Has_Pragma_Pure Flag203
470 -- Is_Known_Null Flag204
471 -- Low_Bound_Tested Flag205
472 -- Is_Visible_Formal Flag206
473 -- Known_To_Have_Preelab_Init Flag207
474 -- Must_Have_Preelab_Init Flag208
475 -- Is_Return_Object Flag209
476 -- Elaborate_Body_Desirable Flag210
478 -- Has_Static_Discriminants Flag211
479 -- Has_Pragma_Unreferenced_Objects Flag212
480 -- Requires_Overriding Flag213
482 -- Has_Up_Level_Access Flag215
483 -- Universal_Aliasing Flag216
484 -- Suppress_Value_Tracking_On_Call Flag217
485 -- Is_Primitive Flag218
486 -- Has_Initial_Value Flag219
487 -- Has_Dispatch_Table Flag220
489 -- Has_Pragma_Preelab_Init Flag221
490 -- Used_As_Generic_Actual Flag222
491 -- Is_Descendent_Of_Address Flag223
494 -- Is_Only_Out_Parameter Flag226
495 -- Referenced_As_Out_Parameter Flag227
496 -- Has_Thunks Flag228
497 -- Can_Use_Internal_Rep Flag229
498 -- Has_Pragma_Inline_Always Flag230
500 -- Renamed_In_Spec Flag231
501 -- Has_Invariants Flag232
502 -- Has_Pragma_Unmodified Flag233
503 -- Is_Dispatch_Table_Entity Flag234
504 -- Is_Trivial_Subprogram Flag235
505 -- Warnings_Off_Used Flag236
506 -- Warnings_Off_Used_Unmodified Flag237
507 -- Warnings_Off_Used_Unreferenced Flag238
508 -- OK_To_Reorder_Components Flag239
509 -- Has_Postconditions Flag240
511 -- Optimize_Alignment_Space Flag241
512 -- Optimize_Alignment_Time Flag242
513 -- Overlays_Constant Flag243
514 -- Is_RACW_Stub_Type Flag244
515 -- Is_Private_Primitive Flag245
516 -- Is_Underlying_Record_View Flag246
517 -- OK_To_Rename Flag247
518 -- Has_Inheritable_Invariants Flag248
519 -- Is_Safe_To_Reevaluate Flag249
520 -- Has_Predicates Flag250
522 -- 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_Collection (Id : E) return E is
617 pragma Assert (Is_Access_Type (Id));
619 end Associated_Collection;
621 function Associated_Formal_Package (Id : E) return E is
623 pragma Assert (Ekind (Id) = E_Package);
625 end Associated_Formal_Package;
627 function Associated_Node_For_Itype (Id : E) return N is
630 end Associated_Node_For_Itype;
632 function Associated_Storage_Pool (Id : E) return E is
634 pragma Assert (Is_Access_Type (Id));
635 return Node22 (Root_Type (Id));
636 end Associated_Storage_Pool;
638 function Barrier_Function (Id : E) return N is
640 pragma Assert (Is_Entry (Id));
642 end Barrier_Function;
644 function Block_Node (Id : E) return N is
646 pragma Assert (Ekind (Id) = E_Block);
650 function Body_Entity (Id : E) return E is
652 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
656 function Body_Needed_For_SAL (Id : E) return B is
659 (Ekind (Id) = E_Package
660 or else Is_Subprogram (Id)
661 or else Is_Generic_Unit (Id));
663 end Body_Needed_For_SAL;
665 function C_Pass_By_Copy (Id : E) return B is
667 pragma Assert (Is_Record_Type (Id));
668 return Flag125 (Implementation_Base_Type (Id));
671 function Can_Never_Be_Null (Id : E) return B is
674 end Can_Never_Be_Null;
676 function Checks_May_Be_Suppressed (Id : E) return B is
679 end Checks_May_Be_Suppressed;
681 function Class_Wide_Type (Id : E) return E is
683 pragma Assert (Is_Type (Id));
687 function Cloned_Subtype (Id : E) return E is
689 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
693 function Component_Bit_Offset (Id : E) return U is
695 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
697 end Component_Bit_Offset;
699 function Component_Clause (Id : E) return N is
701 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
703 end Component_Clause;
705 function Component_Size (Id : E) return U is
707 pragma Assert (Is_Array_Type (Id));
708 return Uint22 (Implementation_Base_Type (Id));
711 function Component_Type (Id : E) return E is
713 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
714 return Node20 (Implementation_Base_Type (Id));
717 function Corresponding_Concurrent_Type (Id : E) return E is
719 pragma Assert (Ekind (Id) = E_Record_Type);
721 end Corresponding_Concurrent_Type;
723 function Corresponding_Discriminant (Id : E) return E is
725 pragma Assert (Ekind (Id) = E_Discriminant);
727 end Corresponding_Discriminant;
729 function Corresponding_Equality (Id : E) return E is
732 (Ekind (Id) = E_Function
733 and then not Comes_From_Source (Id)
734 and then Chars (Id) = Name_Op_Ne);
736 end Corresponding_Equality;
738 function Corresponding_Protected_Entry (Id : E) return E is
740 pragma Assert (Ekind (Id) = E_Subprogram_Body);
742 end Corresponding_Protected_Entry;
744 function Corresponding_Record_Type (Id : E) return E is
746 pragma Assert (Is_Concurrent_Type (Id));
748 end Corresponding_Record_Type;
750 function Corresponding_Remote_Type (Id : E) return E is
753 end Corresponding_Remote_Type;
755 function Current_Use_Clause (Id : E) return E is
757 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
759 end Current_Use_Clause;
761 function Current_Value (Id : E) return N is
763 pragma Assert (Ekind (Id) in Object_Kind);
767 function CR_Discriminant (Id : E) return E is
772 function Debug_Info_Off (Id : E) return B is
777 function Debug_Renaming_Link (Id : E) return E is
780 end Debug_Renaming_Link;
782 function Default_Expr_Function (Id : E) return E is
784 pragma Assert (Is_Formal (Id));
786 end Default_Expr_Function;
788 function Default_Expressions_Processed (Id : E) return B is
791 end Default_Expressions_Processed;
793 function Default_Value (Id : E) return N is
795 pragma Assert (Is_Formal (Id));
799 function Delay_Cleanups (Id : E) return B is
804 function Delay_Subprogram_Descriptors (Id : E) return B is
807 end Delay_Subprogram_Descriptors;
809 function Delta_Value (Id : E) return R is
811 pragma Assert (Is_Fixed_Point_Type (Id));
815 function Dependent_Instances (Id : E) return L is
817 pragma Assert (Is_Generic_Instance (Id));
819 end Dependent_Instances;
821 function Depends_On_Private (Id : E) return B is
823 pragma Assert (Nkind (Id) in N_Entity);
825 end Depends_On_Private;
827 function Digits_Value (Id : E) return U is
830 (Is_Floating_Point_Type (Id)
831 or else Is_Decimal_Fixed_Point_Type (Id));
835 function Direct_Primitive_Operations (Id : E) return L is
837 pragma Assert (Is_Tagged_Type (Id));
839 end Direct_Primitive_Operations;
841 function Directly_Designated_Type (Id : E) return E is
843 pragma Assert (Is_Access_Type (Id));
845 end Directly_Designated_Type;
847 function Discard_Names (Id : E) return B is
852 function Discriminal (Id : E) return E is
854 pragma Assert (Ekind (Id) = E_Discriminant);
858 function Discriminal_Link (Id : E) return N is
861 end Discriminal_Link;
863 function Discriminant_Checking_Func (Id : E) return E is
865 pragma Assert (Ekind (Id) = E_Component);
867 end Discriminant_Checking_Func;
869 function Discriminant_Constraint (Id : E) return L is
871 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
873 end Discriminant_Constraint;
875 function Discriminant_Default_Value (Id : E) return N is
877 pragma Assert (Ekind (Id) = E_Discriminant);
879 end Discriminant_Default_Value;
881 function Discriminant_Number (Id : E) return U is
883 pragma Assert (Ekind (Id) = E_Discriminant);
885 end Discriminant_Number;
887 function Dispatch_Table_Wrappers (Id : E) return L is
889 pragma Assert (Ekind_In (Id, E_Record_Type,
891 return Elist26 (Implementation_Base_Type (Id));
892 end Dispatch_Table_Wrappers;
894 function DT_Entry_Count (Id : E) return U is
896 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
900 function DT_Offset_To_Top_Func (Id : E) return E is
902 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
904 end DT_Offset_To_Top_Func;
906 function DT_Position (Id : E) return U is
908 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
909 and then Present (DTC_Entity (Id)));
913 function DTC_Entity (Id : E) return E is
915 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
919 function Elaborate_Body_Desirable (Id : E) return B is
921 pragma Assert (Ekind (Id) = E_Package);
923 end Elaborate_Body_Desirable;
925 function Elaboration_Entity (Id : E) return E is
930 Ekind (Id) = E_Package
932 Is_Generic_Unit (Id));
934 end Elaboration_Entity;
936 function Elaboration_Entity_Required (Id : E) return B is
941 Ekind (Id) = E_Package
943 Is_Generic_Unit (Id));
945 end Elaboration_Entity_Required;
947 function Enclosing_Scope (Id : E) return E is
952 function Entry_Accepted (Id : E) return B is
954 pragma Assert (Is_Entry (Id));
958 function Entry_Bodies_Array (Id : E) return E is
961 end Entry_Bodies_Array;
963 function Entry_Cancel_Parameter (Id : E) return E is
966 end Entry_Cancel_Parameter;
968 function Entry_Component (Id : E) return E is
973 function Entry_Formal (Id : E) return E is
978 function Entry_Index_Constant (Id : E) return N is
980 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
982 end Entry_Index_Constant;
984 function Contract (Id : E) return N is
987 (Ekind_In (Id, E_Entry, E_Entry_Family)
988 or else Is_Subprogram (Id)
989 or else Is_Generic_Subprogram (Id));
993 function Entry_Parameters_Type (Id : E) return E is
996 end Entry_Parameters_Type;
998 function Enum_Pos_To_Rep (Id : E) return E is
1000 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1002 end Enum_Pos_To_Rep;
1004 function Enumeration_Pos (Id : E) return Uint is
1006 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1008 end Enumeration_Pos;
1010 function Enumeration_Rep (Id : E) return U is
1012 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1014 end Enumeration_Rep;
1016 function Enumeration_Rep_Expr (Id : E) return N is
1018 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1020 end Enumeration_Rep_Expr;
1022 function Equivalent_Type (Id : E) return E is
1025 (Ekind_In (Id, E_Class_Wide_Type,
1026 E_Class_Wide_Subtype,
1027 E_Access_Protected_Subprogram_Type,
1028 E_Anonymous_Access_Protected_Subprogram_Type,
1029 E_Access_Subprogram_Type,
1032 end Equivalent_Type;
1034 function Esize (Id : E) return Uint is
1039 function Exception_Code (Id : E) return Uint is
1041 pragma Assert (Ekind (Id) = E_Exception);
1045 function Extra_Accessibility (Id : E) return E is
1047 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1049 end Extra_Accessibility;
1051 function Extra_Constrained (Id : E) return E is
1053 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1055 end Extra_Constrained;
1057 function Extra_Formal (Id : E) return E is
1062 function Extra_Formals (Id : E) return E is
1065 (Is_Overloadable (Id)
1066 or else Ekind_In (Id, E_Entry_Family,
1068 E_Subprogram_Type));
1072 function Can_Use_Internal_Rep (Id : E) return B is
1074 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1075 return Flag229 (Base_Type (Id));
1076 end Can_Use_Internal_Rep;
1078 function Finalize_Storage_Only (Id : E) return B is
1080 pragma Assert (Is_Type (Id));
1081 return Flag158 (Base_Type (Id));
1082 end Finalize_Storage_Only;
1084 function Finalizer (Id : E) return E is
1087 (Ekind (Id) = E_Package
1088 or else Ekind (Id) = E_Package_Body);
1092 function First_Entity (Id : E) return E is
1097 function First_Exit_Statement (Id : E) return N is
1099 pragma Assert (Ekind (Id) = E_Loop);
1101 end First_Exit_Statement;
1103 function First_Index (Id : E) return N is
1105 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1109 function First_Literal (Id : E) return E is
1111 pragma Assert (Is_Enumeration_Type (Id));
1115 function First_Optional_Parameter (Id : E) return E is
1117 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1119 end First_Optional_Parameter;
1121 function First_Private_Entity (Id : E) return E is
1123 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1124 or else Ekind (Id) in Concurrent_Kind);
1126 end First_Private_Entity;
1128 function First_Rep_Item (Id : E) return E is
1133 function Freeze_Node (Id : E) return N is
1138 function From_With_Type (Id : E) return B is
1140 return Flag159 (Id);
1143 function Full_View (Id : E) return E is
1145 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1149 function Generic_Homonym (Id : E) return E is
1151 pragma Assert (Ekind (Id) = E_Generic_Package);
1153 end Generic_Homonym;
1155 function Generic_Renamings (Id : E) return L is
1157 return Elist23 (Id);
1158 end Generic_Renamings;
1160 function Handler_Records (Id : E) return S is
1163 end Handler_Records;
1165 function Has_Aliased_Components (Id : E) return B is
1167 return Flag135 (Implementation_Base_Type (Id));
1168 end Has_Aliased_Components;
1170 function Has_Alignment_Clause (Id : E) return B is
1173 end Has_Alignment_Clause;
1175 function Has_All_Calls_Remote (Id : E) return B is
1178 end Has_All_Calls_Remote;
1180 function Has_Anon_Block_Suffix (Id : E) return B is
1182 return Flag201 (Id);
1183 end Has_Anon_Block_Suffix;
1185 function Has_Atomic_Components (Id : E) return B is
1187 return Flag86 (Implementation_Base_Type (Id));
1188 end Has_Atomic_Components;
1190 function Has_Biased_Representation (Id : E) return B is
1192 return Flag139 (Id);
1193 end Has_Biased_Representation;
1195 function Has_Completion (Id : E) return B is
1200 function Has_Completion_In_Body (Id : E) return B is
1202 pragma Assert (Is_Type (Id));
1204 end Has_Completion_In_Body;
1206 function Has_Complex_Representation (Id : E) return B is
1208 pragma Assert (Is_Type (Id));
1209 return Flag140 (Implementation_Base_Type (Id));
1210 end Has_Complex_Representation;
1212 function Has_Component_Size_Clause (Id : E) return B is
1214 pragma Assert (Is_Array_Type (Id));
1215 return Flag68 (Implementation_Base_Type (Id));
1216 end Has_Component_Size_Clause;
1218 function Has_Constrained_Partial_View (Id : E) return B is
1220 pragma Assert (Is_Type (Id));
1221 return Flag187 (Id);
1222 end Has_Constrained_Partial_View;
1224 function Has_Controlled_Component (Id : E) return B is
1226 return Flag43 (Base_Type (Id));
1227 end Has_Controlled_Component;
1229 function Has_Contiguous_Rep (Id : E) return B is
1231 return Flag181 (Id);
1232 end Has_Contiguous_Rep;
1234 function Has_Controlling_Result (Id : E) return B is
1237 end Has_Controlling_Result;
1239 function Has_Convention_Pragma (Id : E) return B is
1241 return Flag119 (Id);
1242 end Has_Convention_Pragma;
1244 function Has_Default_Aspect (Id : E) return B is
1246 return Flag39 (Base_Type (Id));
1247 end Has_Default_Aspect;
1249 function Has_Delayed_Aspects (Id : E) return B is
1251 pragma Assert (Nkind (Id) in N_Entity);
1252 return Flag200 (Id);
1253 end Has_Delayed_Aspects;
1255 function Has_Delayed_Freeze (Id : E) return B is
1257 pragma Assert (Nkind (Id) in N_Entity);
1259 end Has_Delayed_Freeze;
1261 function Has_Discriminants (Id : E) return B is
1263 pragma Assert (Nkind (Id) in N_Entity);
1265 end Has_Discriminants;
1267 function Has_Dispatch_Table (Id : E) return B is
1269 pragma Assert (Is_Tagged_Type (Id));
1270 return Flag220 (Id);
1271 end Has_Dispatch_Table;
1273 function Has_Enumeration_Rep_Clause (Id : E) return B is
1275 pragma Assert (Is_Enumeration_Type (Id));
1277 end Has_Enumeration_Rep_Clause;
1279 function Has_Exit (Id : E) return B is
1284 function Has_External_Tag_Rep_Clause (Id : E) return B is
1286 pragma Assert (Is_Tagged_Type (Id));
1287 return Flag110 (Id);
1288 end Has_External_Tag_Rep_Clause;
1290 function Has_Forward_Instantiation (Id : E) return B is
1292 return Flag175 (Id);
1293 end Has_Forward_Instantiation;
1295 function Has_Fully_Qualified_Name (Id : E) return B is
1297 return Flag173 (Id);
1298 end Has_Fully_Qualified_Name;
1300 function Has_Gigi_Rep_Item (Id : E) return B is
1303 end Has_Gigi_Rep_Item;
1305 function Has_Homonym (Id : E) return B is
1310 function Has_Implicit_Dereference (Id : E) return B is
1312 return Flag251 (Id);
1313 end Has_Implicit_Dereference;
1315 function Has_Inheritable_Invariants (Id : E) return B is
1317 pragma Assert (Is_Type (Id));
1318 return Flag248 (Id);
1319 end Has_Inheritable_Invariants;
1321 function Has_Initial_Value (Id : E) return B is
1323 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1324 return Flag219 (Id);
1325 end Has_Initial_Value;
1327 function Has_Invariants (Id : E) return B is
1329 pragma Assert (Is_Type (Id)
1330 or else Ekind (Id) = E_Procedure
1331 or else Ekind (Id) = E_Generic_Procedure);
1332 return Flag232 (Id);
1335 function Has_Machine_Radix_Clause (Id : E) return B is
1337 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1339 end Has_Machine_Radix_Clause;
1341 function Has_Master_Entity (Id : E) return B is
1344 end Has_Master_Entity;
1346 function Has_Missing_Return (Id : E) return B is
1348 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1349 return Flag142 (Id);
1350 end Has_Missing_Return;
1352 function Has_Nested_Block_With_Handler (Id : E) return B is
1354 return Flag101 (Id);
1355 end Has_Nested_Block_With_Handler;
1357 function Has_Non_Standard_Rep (Id : E) return B is
1359 return Flag75 (Implementation_Base_Type (Id));
1360 end Has_Non_Standard_Rep;
1362 function Has_Object_Size_Clause (Id : E) return B is
1364 pragma Assert (Is_Type (Id));
1365 return Flag172 (Id);
1366 end Has_Object_Size_Clause;
1368 function Has_Per_Object_Constraint (Id : E) return B is
1370 return Flag154 (Id);
1371 end Has_Per_Object_Constraint;
1373 function Has_Persistent_BSS (Id : E) return B is
1375 return Flag188 (Id);
1376 end Has_Persistent_BSS;
1378 function Has_Postconditions (Id : E) return B is
1380 pragma Assert (Is_Subprogram (Id));
1381 return Flag240 (Id);
1382 end Has_Postconditions;
1384 function Has_Pragma_Controlled (Id : E) return B is
1386 pragma Assert (Is_Access_Type (Id));
1387 return Flag27 (Implementation_Base_Type (Id));
1388 end Has_Pragma_Controlled;
1390 function Has_Pragma_Elaborate_Body (Id : E) return B is
1392 return Flag150 (Id);
1393 end Has_Pragma_Elaborate_Body;
1395 function Has_Pragma_Inline (Id : E) return B is
1397 return Flag157 (Id);
1398 end Has_Pragma_Inline;
1400 function Has_Pragma_Inline_Always (Id : E) return B is
1402 return Flag230 (Id);
1403 end Has_Pragma_Inline_Always;
1405 function Has_Pragma_Ordered (Id : E) return B is
1407 pragma Assert (Is_Enumeration_Type (Id));
1408 return Flag198 (Implementation_Base_Type (Id));
1409 end Has_Pragma_Ordered;
1411 function Has_Pragma_Pack (Id : E) return B is
1413 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1414 return Flag121 (Implementation_Base_Type (Id));
1415 end Has_Pragma_Pack;
1417 function Has_Pragma_Preelab_Init (Id : E) return B is
1419 return Flag221 (Id);
1420 end Has_Pragma_Preelab_Init;
1422 function Has_Pragma_Pure (Id : E) return B is
1424 return Flag203 (Id);
1425 end Has_Pragma_Pure;
1427 function Has_Pragma_Pure_Function (Id : E) return B is
1429 return Flag179 (Id);
1430 end Has_Pragma_Pure_Function;
1432 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1434 return Flag169 (Id);
1435 end Has_Pragma_Thread_Local_Storage;
1437 function Has_Pragma_Unmodified (Id : E) return B is
1439 return Flag233 (Id);
1440 end Has_Pragma_Unmodified;
1442 function Has_Pragma_Unreferenced (Id : E) return B is
1444 return Flag180 (Id);
1445 end Has_Pragma_Unreferenced;
1447 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1449 pragma Assert (Is_Type (Id));
1450 return Flag212 (Id);
1451 end Has_Pragma_Unreferenced_Objects;
1453 function Has_Predicates (Id : E) return B is
1455 return Flag250 (Id);
1458 function Has_Primitive_Operations (Id : E) return B is
1460 pragma Assert (Is_Type (Id));
1461 return Flag120 (Base_Type (Id));
1462 end Has_Primitive_Operations;
1464 function Has_Private_Ancestor (Id : E) return B is
1466 return Flag151 (Id);
1467 end Has_Private_Ancestor;
1469 function Has_Private_Declaration (Id : E) return B is
1471 return Flag155 (Id);
1472 end Has_Private_Declaration;
1474 function Has_Qualified_Name (Id : E) return B is
1476 return Flag161 (Id);
1477 end Has_Qualified_Name;
1479 function Has_RACW (Id : E) return B is
1481 pragma Assert (Ekind (Id) = E_Package);
1482 return Flag214 (Id);
1485 function Has_Record_Rep_Clause (Id : E) return B is
1487 pragma Assert (Is_Record_Type (Id));
1488 return Flag65 (Implementation_Base_Type (Id));
1489 end Has_Record_Rep_Clause;
1491 function Has_Recursive_Call (Id : E) return B is
1493 pragma Assert (Is_Subprogram (Id));
1494 return Flag143 (Id);
1495 end Has_Recursive_Call;
1497 function Has_Size_Clause (Id : E) return B is
1500 end Has_Size_Clause;
1502 function Has_Small_Clause (Id : E) return B is
1505 end Has_Small_Clause;
1507 function Has_Specified_Layout (Id : E) return B is
1509 pragma Assert (Is_Type (Id));
1510 return Flag100 (Implementation_Base_Type (Id));
1511 end Has_Specified_Layout;
1513 function Has_Specified_Stream_Input (Id : E) return B is
1515 pragma Assert (Is_Type (Id));
1516 return Flag190 (Id);
1517 end Has_Specified_Stream_Input;
1519 function Has_Specified_Stream_Output (Id : E) return B is
1521 pragma Assert (Is_Type (Id));
1522 return Flag191 (Id);
1523 end Has_Specified_Stream_Output;
1525 function Has_Specified_Stream_Read (Id : E) return B is
1527 pragma Assert (Is_Type (Id));
1528 return Flag192 (Id);
1529 end Has_Specified_Stream_Read;
1531 function Has_Specified_Stream_Write (Id : E) return B is
1533 pragma Assert (Is_Type (Id));
1534 return Flag193 (Id);
1535 end Has_Specified_Stream_Write;
1537 function Has_Static_Discriminants (Id : E) return B is
1539 pragma Assert (Is_Type (Id));
1540 return Flag211 (Id);
1541 end Has_Static_Discriminants;
1543 function Has_Storage_Size_Clause (Id : E) return B is
1545 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1546 return Flag23 (Implementation_Base_Type (Id));
1547 end Has_Storage_Size_Clause;
1549 function Has_Stream_Size_Clause (Id : E) return B is
1551 return Flag184 (Id);
1552 end Has_Stream_Size_Clause;
1554 function Has_Subprogram_Descriptor (Id : E) return B is
1557 end Has_Subprogram_Descriptor;
1559 function Has_Task (Id : E) return B is
1561 return Flag30 (Base_Type (Id));
1564 function Has_Thunks (Id : E) return B is
1566 return Flag228 (Id);
1569 function Has_Unchecked_Union (Id : E) return B is
1571 return Flag123 (Base_Type (Id));
1572 end Has_Unchecked_Union;
1574 function Has_Unknown_Discriminants (Id : E) return B is
1576 pragma Assert (Is_Type (Id));
1578 end Has_Unknown_Discriminants;
1580 function Has_Up_Level_Access (Id : E) return B is
1583 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1584 return Flag215 (Id);
1585 end Has_Up_Level_Access;
1587 function Has_Volatile_Components (Id : E) return B is
1589 return Flag87 (Implementation_Base_Type (Id));
1590 end Has_Volatile_Components;
1592 function Has_Xref_Entry (Id : E) return B is
1594 return Flag182 (Implementation_Base_Type (Id));
1597 function Hiding_Loop_Variable (Id : E) return E is
1599 pragma Assert (Ekind (Id) = E_Variable);
1601 end Hiding_Loop_Variable;
1603 function Homonym (Id : E) return E is
1608 function Interface_Alias (Id : E) return E is
1610 pragma Assert (Is_Subprogram (Id));
1612 end Interface_Alias;
1614 function Interfaces (Id : E) return L is
1616 pragma Assert (Is_Record_Type (Id));
1617 return Elist25 (Id);
1620 function In_Package_Body (Id : E) return B is
1623 end In_Package_Body;
1625 function In_Private_Part (Id : E) return B is
1628 end In_Private_Part;
1630 function In_Use (Id : E) return B is
1632 pragma Assert (Nkind (Id) in N_Entity);
1636 function Inner_Instances (Id : E) return L is
1638 return Elist23 (Id);
1639 end Inner_Instances;
1641 function Interface_Name (Id : E) return N is
1646 function Is_Abstract_Subprogram (Id : E) return B is
1648 pragma Assert (Is_Overloadable (Id));
1650 end Is_Abstract_Subprogram;
1652 function Is_Abstract_Type (Id : E) return B is
1654 pragma Assert (Is_Type (Id));
1655 return Flag146 (Id);
1656 end Is_Abstract_Type;
1658 function Is_Local_Anonymous_Access (Id : E) return B is
1660 pragma Assert (Is_Access_Type (Id));
1661 return Flag194 (Id);
1662 end Is_Local_Anonymous_Access;
1664 function Is_Access_Constant (Id : E) return B is
1666 pragma Assert (Is_Access_Type (Id));
1668 end Is_Access_Constant;
1670 function Is_Ada_2005_Only (Id : E) return B is
1672 return Flag185 (Id);
1673 end Is_Ada_2005_Only;
1675 function Is_Ada_2012_Only (Id : E) return B is
1677 return Flag199 (Id);
1678 end Is_Ada_2012_Only;
1680 function Is_Aliased (Id : E) return B is
1682 pragma Assert (Nkind (Id) in N_Entity);
1686 function Is_AST_Entry (Id : E) return B is
1688 pragma Assert (Is_Entry (Id));
1689 return Flag132 (Id);
1692 function Is_Asynchronous (Id : E) return B is
1694 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1696 end Is_Asynchronous;
1698 function Is_Atomic (Id : E) return B is
1703 function Is_Bit_Packed_Array (Id : E) return B is
1705 return Flag122 (Implementation_Base_Type (Id));
1706 end Is_Bit_Packed_Array;
1708 function Is_Called (Id : E) return B is
1710 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1711 return Flag102 (Id);
1714 function Is_Character_Type (Id : E) return B is
1717 end Is_Character_Type;
1719 function Is_Child_Unit (Id : E) return B is
1724 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1727 end Is_Class_Wide_Equivalent_Type;
1729 function Is_Compilation_Unit (Id : E) return B is
1731 return Flag149 (Id);
1732 end Is_Compilation_Unit;
1734 function Is_Completely_Hidden (Id : E) return B is
1736 pragma Assert (Ekind (Id) = E_Discriminant);
1737 return Flag103 (Id);
1738 end Is_Completely_Hidden;
1740 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1743 end Is_Constr_Subt_For_U_Nominal;
1745 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1747 return Flag141 (Id);
1748 end Is_Constr_Subt_For_UN_Aliased;
1750 function Is_Constrained (Id : E) return B is
1752 pragma Assert (Nkind (Id) in N_Entity);
1756 function Is_Constructor (Id : E) return B is
1761 function Is_Controlled (Id : E) return B is
1763 return Flag42 (Base_Type (Id));
1766 function Is_Controlling_Formal (Id : E) return B is
1768 pragma Assert (Is_Formal (Id));
1770 end Is_Controlling_Formal;
1772 function Is_CPP_Class (Id : E) return B is
1777 function Is_Descendent_Of_Address (Id : E) return B is
1779 pragma Assert (Is_Type (Id));
1780 return Flag223 (Id);
1781 end Is_Descendent_Of_Address;
1783 function Is_Discrim_SO_Function (Id : E) return B is
1785 return Flag176 (Id);
1786 end Is_Discrim_SO_Function;
1788 function Is_Dispatch_Table_Entity (Id : E) return B is
1790 return Flag234 (Id);
1791 end Is_Dispatch_Table_Entity;
1793 function Is_Dispatching_Operation (Id : E) return B is
1795 pragma Assert (Nkind (Id) in N_Entity);
1797 end Is_Dispatching_Operation;
1799 function Is_Eliminated (Id : E) return B is
1801 return Flag124 (Id);
1804 function Is_Entry_Formal (Id : E) return B is
1807 end Is_Entry_Formal;
1809 function Is_Exported (Id : E) return B is
1814 function Is_First_Subtype (Id : E) return B is
1817 end Is_First_Subtype;
1819 function Is_For_Access_Subtype (Id : E) return B is
1821 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1822 return Flag118 (Id);
1823 end Is_For_Access_Subtype;
1825 function Is_Formal_Subprogram (Id : E) return B is
1827 return Flag111 (Id);
1828 end Is_Formal_Subprogram;
1830 function Is_Frozen (Id : E) return B is
1835 function Is_Generic_Actual_Type (Id : E) return B is
1837 pragma Assert (Is_Type (Id));
1839 end Is_Generic_Actual_Type;
1841 function Is_Generic_Instance (Id : E) return B is
1843 return Flag130 (Id);
1844 end Is_Generic_Instance;
1846 function Is_Generic_Type (Id : E) return B is
1848 pragma Assert (Nkind (Id) in N_Entity);
1850 end Is_Generic_Type;
1852 function Is_Hidden (Id : E) return B is
1857 function Is_Hidden_Open_Scope (Id : E) return B is
1859 return Flag171 (Id);
1860 end Is_Hidden_Open_Scope;
1862 function Is_Immediately_Visible (Id : E) return B is
1864 pragma Assert (Nkind (Id) in N_Entity);
1866 end Is_Immediately_Visible;
1868 function Is_Imported (Id : E) return B is
1873 function Is_Inlined (Id : E) return B is
1878 function Is_Interface (Id : E) return B is
1880 return Flag186 (Id);
1883 function Is_Instantiated (Id : E) return B is
1885 return Flag126 (Id);
1886 end Is_Instantiated;
1888 function Is_Internal (Id : E) return B is
1890 pragma Assert (Nkind (Id) in N_Entity);
1894 function Is_Interrupt_Handler (Id : E) return B is
1896 pragma Assert (Nkind (Id) in N_Entity);
1898 end Is_Interrupt_Handler;
1900 function Is_Intrinsic_Subprogram (Id : E) return B is
1903 end Is_Intrinsic_Subprogram;
1905 function Is_Itype (Id : E) return B is
1910 function Is_Known_Non_Null (Id : E) return B is
1913 end Is_Known_Non_Null;
1915 function Is_Known_Null (Id : E) return B is
1917 return Flag204 (Id);
1920 function Is_Known_Valid (Id : E) return B is
1922 return Flag170 (Id);
1925 function Is_Limited_Composite (Id : E) return B is
1927 return Flag106 (Id);
1928 end Is_Limited_Composite;
1930 function Is_Limited_Interface (Id : E) return B is
1932 return Flag197 (Id);
1933 end Is_Limited_Interface;
1935 function Is_Limited_Record (Id : E) return B is
1938 end Is_Limited_Record;
1940 function Is_Machine_Code_Subprogram (Id : E) return B is
1942 pragma Assert (Is_Subprogram (Id));
1943 return Flag137 (Id);
1944 end Is_Machine_Code_Subprogram;
1946 function Is_Non_Static_Subtype (Id : E) return B is
1948 pragma Assert (Is_Type (Id));
1949 return Flag109 (Id);
1950 end Is_Non_Static_Subtype;
1952 function Is_Null_Init_Proc (Id : E) return B is
1954 pragma Assert (Ekind (Id) = E_Procedure);
1955 return Flag178 (Id);
1956 end Is_Null_Init_Proc;
1958 function Is_Obsolescent (Id : E) return B is
1960 return Flag153 (Id);
1963 function Is_Only_Out_Parameter (Id : E) return B is
1965 pragma Assert (Is_Formal (Id));
1966 return Flag226 (Id);
1967 end Is_Only_Out_Parameter;
1969 function Is_Optional_Parameter (Id : E) return B is
1971 pragma Assert (Is_Formal (Id));
1972 return Flag134 (Id);
1973 end Is_Optional_Parameter;
1975 function Is_Package_Body_Entity (Id : E) return B is
1977 return Flag160 (Id);
1978 end Is_Package_Body_Entity;
1980 function Is_Packed (Id : E) return B is
1982 return Flag51 (Implementation_Base_Type (Id));
1985 function Is_Packed_Array_Type (Id : E) return B is
1987 return Flag138 (Id);
1988 end Is_Packed_Array_Type;
1990 function Is_Potentially_Use_Visible (Id : E) return B is
1992 pragma Assert (Nkind (Id) in N_Entity);
1994 end Is_Potentially_Use_Visible;
1996 function Is_Preelaborated (Id : E) return B is
1999 end Is_Preelaborated;
2001 function Is_Primitive (Id : E) return B is
2004 (Is_Overloadable (Id)
2005 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2006 return Flag218 (Id);
2009 function Is_Primitive_Wrapper (Id : E) return B is
2011 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2012 return Flag195 (Id);
2013 end Is_Primitive_Wrapper;
2015 function Is_Private_Composite (Id : E) return B is
2017 pragma Assert (Is_Type (Id));
2018 return Flag107 (Id);
2019 end Is_Private_Composite;
2021 function Is_Private_Descendant (Id : E) return B is
2024 end Is_Private_Descendant;
2026 function Is_Private_Primitive (Id : E) return B is
2028 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2029 return Flag245 (Id);
2030 end Is_Private_Primitive;
2032 function Is_Processed_Transient (Id : E) return B is
2034 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2035 return Flag252 (Id);
2036 end Is_Processed_Transient;
2038 function Is_Public (Id : E) return B is
2040 pragma Assert (Nkind (Id) in N_Entity);
2044 function Is_Pure (Id : E) return B is
2049 function Is_Pure_Unit_Access_Type (Id : E) return B is
2051 pragma Assert (Is_Access_Type (Id));
2052 return Flag189 (Id);
2053 end Is_Pure_Unit_Access_Type;
2055 function Is_RACW_Stub_Type (Id : E) return B is
2057 pragma Assert (Is_Type (Id));
2058 return Flag244 (Id);
2059 end Is_RACW_Stub_Type;
2061 function Is_Raised (Id : E) return B is
2063 pragma Assert (Ekind (Id) = E_Exception);
2064 return Flag224 (Id);
2067 function Is_Remote_Call_Interface (Id : E) return B is
2070 end Is_Remote_Call_Interface;
2072 function Is_Remote_Types (Id : E) return B is
2075 end Is_Remote_Types;
2077 function Is_Renaming_Of_Object (Id : E) return B is
2079 return Flag112 (Id);
2080 end Is_Renaming_Of_Object;
2082 function Is_Return_Object (Id : E) return B is
2084 return Flag209 (Id);
2085 end Is_Return_Object;
2087 function Is_Safe_To_Reevaluate (Id : E) return B is
2089 return Flag249 (Id);
2090 end Is_Safe_To_Reevaluate;
2092 function Is_Shared_Passive (Id : E) return B is
2095 end Is_Shared_Passive;
2097 function Is_Statically_Allocated (Id : E) return B is
2100 end Is_Statically_Allocated;
2102 function Is_Tag (Id : E) return B is
2104 pragma Assert (Nkind (Id) in N_Entity);
2108 function Is_Tagged_Type (Id : E) return B is
2113 function Is_Thunk (Id : E) return B is
2115 pragma Assert (Is_Subprogram (Id));
2116 return Flag225 (Id);
2119 function Is_Trivial_Subprogram (Id : E) return B is
2121 return Flag235 (Id);
2122 end Is_Trivial_Subprogram;
2124 function Is_True_Constant (Id : E) return B is
2126 return Flag163 (Id);
2127 end Is_True_Constant;
2129 function Is_Unchecked_Union (Id : E) return B is
2131 return Flag117 (Implementation_Base_Type (Id));
2132 end Is_Unchecked_Union;
2134 function Is_Underlying_Record_View (Id : E) return B is
2136 return Flag246 (Id);
2137 end Is_Underlying_Record_View;
2139 function Is_Unsigned_Type (Id : E) return B is
2141 pragma Assert (Is_Type (Id));
2142 return Flag144 (Id);
2143 end Is_Unsigned_Type;
2145 function Is_Valued_Procedure (Id : E) return B is
2147 pragma Assert (Ekind (Id) = E_Procedure);
2148 return Flag127 (Id);
2149 end Is_Valued_Procedure;
2151 function Is_Visible_Child_Unit (Id : E) return B is
2153 pragma Assert (Is_Child_Unit (Id));
2154 return Flag116 (Id);
2155 end Is_Visible_Child_Unit;
2157 function Is_Visible_Formal (Id : E) return B is
2159 return Flag206 (Id);
2160 end Is_Visible_Formal;
2162 function Is_VMS_Exception (Id : E) return B is
2164 return Flag133 (Id);
2165 end Is_VMS_Exception;
2167 function Is_Volatile (Id : E) return B is
2169 pragma Assert (Nkind (Id) in N_Entity);
2171 if Is_Type (Id) then
2172 return Flag16 (Base_Type (Id));
2178 function Itype_Printed (Id : E) return B is
2180 pragma Assert (Is_Itype (Id));
2181 return Flag202 (Id);
2184 function Kill_Elaboration_Checks (Id : E) return B is
2187 end Kill_Elaboration_Checks;
2189 function Kill_Range_Checks (Id : E) return B is
2192 end Kill_Range_Checks;
2194 function Kill_Tag_Checks (Id : E) return B is
2197 end Kill_Tag_Checks;
2199 function Known_To_Have_Preelab_Init (Id : E) return B is
2201 pragma Assert (Is_Type (Id));
2202 return Flag207 (Id);
2203 end Known_To_Have_Preelab_Init;
2205 function Last_Assignment (Id : E) return N is
2207 pragma Assert (Is_Assignable (Id));
2209 end Last_Assignment;
2211 function Last_Entity (Id : E) return E is
2216 function Limited_View (Id : E) return E is
2218 pragma Assert (Ekind (Id) = E_Package);
2222 function Lit_Indexes (Id : E) return E is
2224 pragma Assert (Is_Enumeration_Type (Id));
2228 function Lit_Strings (Id : E) return E is
2230 pragma Assert (Is_Enumeration_Type (Id));
2234 function Low_Bound_Tested (Id : E) return B is
2236 return Flag205 (Id);
2237 end Low_Bound_Tested;
2239 function Machine_Radix_10 (Id : E) return B is
2241 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2243 end Machine_Radix_10;
2245 function Master_Id (Id : E) return E is
2247 pragma Assert (Is_Access_Type (Id));
2251 function Materialize_Entity (Id : E) return B is
2253 return Flag168 (Id);
2254 end Materialize_Entity;
2256 function Mechanism (Id : E) return M is
2258 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2259 return UI_To_Int (Uint8 (Id));
2262 function Modulus (Id : E) return Uint is
2264 pragma Assert (Is_Modular_Integer_Type (Id));
2265 return Uint17 (Base_Type (Id));
2268 function Must_Be_On_Byte_Boundary (Id : E) return B is
2270 pragma Assert (Is_Type (Id));
2271 return Flag183 (Id);
2272 end Must_Be_On_Byte_Boundary;
2274 function Must_Have_Preelab_Init (Id : E) return B is
2276 pragma Assert (Is_Type (Id));
2277 return Flag208 (Id);
2278 end Must_Have_Preelab_Init;
2280 function Needs_Debug_Info (Id : E) return B is
2282 return Flag147 (Id);
2283 end Needs_Debug_Info;
2285 function Needs_No_Actuals (Id : E) return B is
2288 (Is_Overloadable (Id)
2289 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2291 end Needs_No_Actuals;
2293 function Never_Set_In_Source (Id : E) return B is
2295 return Flag115 (Id);
2296 end Never_Set_In_Source;
2298 function Next_Inlined_Subprogram (Id : E) return E is
2301 end Next_Inlined_Subprogram;
2303 function No_Pool_Assigned (Id : E) return B is
2305 pragma Assert (Is_Access_Type (Id));
2306 return Flag131 (Root_Type (Id));
2307 end No_Pool_Assigned;
2309 function No_Return (Id : E) return B is
2311 return Flag113 (Id);
2314 function No_Strict_Aliasing (Id : E) return B is
2316 pragma Assert (Is_Access_Type (Id));
2317 return Flag136 (Base_Type (Id));
2318 end No_Strict_Aliasing;
2320 function Non_Binary_Modulus (Id : E) return B is
2322 pragma Assert (Is_Type (Id));
2323 return Flag58 (Base_Type (Id));
2324 end Non_Binary_Modulus;
2326 function Non_Limited_View (Id : E) return E is
2328 pragma Assert (Ekind (Id) in Incomplete_Kind);
2330 end Non_Limited_View;
2332 function Nonzero_Is_True (Id : E) return B is
2334 pragma Assert (Root_Type (Id) = Standard_Boolean);
2335 return Flag162 (Base_Type (Id));
2336 end Nonzero_Is_True;
2338 function Normalized_First_Bit (Id : E) return U is
2340 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2342 end Normalized_First_Bit;
2344 function Normalized_Position (Id : E) return U is
2346 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2348 end Normalized_Position;
2350 function Normalized_Position_Max (Id : E) return U is
2352 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2354 end Normalized_Position_Max;
2356 function OK_To_Rename (Id : E) return B is
2358 pragma Assert (Ekind (Id) = E_Variable);
2359 return Flag247 (Id);
2362 function OK_To_Reorder_Components (Id : E) return B is
2364 pragma Assert (Is_Record_Type (Id));
2365 return Flag239 (Base_Type (Id));
2366 end OK_To_Reorder_Components;
2368 function Optimize_Alignment_Space (Id : E) return B is
2371 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2372 return Flag241 (Id);
2373 end Optimize_Alignment_Space;
2375 function Optimize_Alignment_Time (Id : E) return B is
2378 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2379 return Flag242 (Id);
2380 end Optimize_Alignment_Time;
2382 function Original_Access_Type (Id : E) return E is
2384 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2386 end Original_Access_Type;
2388 function Original_Array_Type (Id : E) return E is
2390 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2392 end Original_Array_Type;
2394 function Original_Record_Component (Id : E) return E is
2396 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2398 end Original_Record_Component;
2400 function Overlays_Constant (Id : E) return B is
2402 return Flag243 (Id);
2403 end Overlays_Constant;
2405 function Overridden_Operation (Id : E) return E is
2408 end Overridden_Operation;
2410 function Package_Instantiation (Id : E) return N is
2412 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2414 end Package_Instantiation;
2416 function Packed_Array_Type (Id : E) return E is
2418 pragma Assert (Is_Array_Type (Id));
2420 end Packed_Array_Type;
2422 function Parent_Subtype (Id : E) return E is
2424 pragma Assert (Is_Record_Type (Id));
2425 return Node19 (Base_Type (Id));
2428 function Postcondition_Proc (Id : E) return E is
2430 pragma Assert (Ekind (Id) = E_Procedure);
2432 end Postcondition_Proc;
2434 function PPC_Wrapper (Id : E) return E is
2436 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2440 function Prival (Id : E) return E is
2442 pragma Assert (Is_Protected_Component (Id));
2446 function Prival_Link (Id : E) return E is
2448 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2452 function Private_Dependents (Id : E) return L is
2454 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2455 return Elist18 (Id);
2456 end Private_Dependents;
2458 function Private_View (Id : E) return N is
2460 pragma Assert (Is_Private_Type (Id));
2464 function Protected_Body_Subprogram (Id : E) return E is
2466 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2468 end Protected_Body_Subprogram;
2470 function Protected_Formal (Id : E) return E is
2472 pragma Assert (Is_Formal (Id));
2474 end Protected_Formal;
2476 function Protection_Object (Id : E) return E is
2479 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2481 end Protection_Object;
2483 function Reachable (Id : E) return B is
2488 function Referenced (Id : E) return B is
2490 return Flag156 (Id);
2493 function Referenced_As_LHS (Id : E) return B is
2496 end Referenced_As_LHS;
2498 function Referenced_As_Out_Parameter (Id : E) return B is
2500 return Flag227 (Id);
2501 end Referenced_As_Out_Parameter;
2503 function Register_Exception_Call (Id : E) return N is
2505 pragma Assert (Ekind (Id) = E_Exception);
2507 end Register_Exception_Call;
2509 function Related_Array_Object (Id : E) return E is
2511 pragma Assert (Is_Array_Type (Id));
2513 end Related_Array_Object;
2515 function Related_Expression (Id : E) return N is
2517 pragma Assert (Ekind (Id) in Type_Kind
2518 or else Ekind_In (Id, E_Constant, E_Variable));
2520 end Related_Expression;
2522 function Related_Instance (Id : E) return E is
2524 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2526 end Related_Instance;
2528 function Related_Type (Id : E) return E is
2530 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2534 function Relative_Deadline_Variable (Id : E) return E is
2536 pragma Assert (Is_Task_Type (Id));
2537 return Node26 (Implementation_Base_Type (Id));
2538 end Relative_Deadline_Variable;
2540 function Renamed_Entity (Id : E) return N is
2545 function Renamed_In_Spec (Id : E) return B is
2547 pragma Assert (Ekind (Id) = E_Package);
2548 return Flag231 (Id);
2549 end Renamed_In_Spec;
2551 function Renamed_Object (Id : E) return N is
2556 function Renaming_Map (Id : E) return U is
2561 function Requires_Overriding (Id : E) return B is
2563 pragma Assert (Is_Overloadable (Id));
2564 return Flag213 (Id);
2565 end Requires_Overriding;
2567 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2569 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2571 end Return_Flag_Or_Transient_Decl;
2573 function Return_Present (Id : E) return B is
2578 function Return_Applies_To (Id : E) return N is
2581 end Return_Applies_To;
2583 function Returns_By_Ref (Id : E) return B is
2588 function Reverse_Bit_Order (Id : E) return B is
2590 pragma Assert (Is_Record_Type (Id));
2591 return Flag164 (Base_Type (Id));
2592 end Reverse_Bit_Order;
2594 function RM_Size (Id : E) return U is
2596 pragma Assert (Is_Type (Id));
2600 function Scalar_Range (Id : E) return N is
2605 function Scale_Value (Id : E) return U is
2610 function Scope_Depth_Value (Id : E) return U is
2613 end Scope_Depth_Value;
2615 function Sec_Stack_Needed_For_Return (Id : E) return B is
2617 return Flag167 (Id);
2618 end Sec_Stack_Needed_For_Return;
2620 function Shadow_Entities (Id : E) return S is
2622 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2624 end Shadow_Entities;
2626 function Shared_Var_Procs_Instance (Id : E) return E is
2628 pragma Assert (Ekind (Id) = E_Variable);
2630 end Shared_Var_Procs_Instance;
2632 function Size_Check_Code (Id : E) return N is
2634 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2636 end Size_Check_Code;
2638 function Size_Depends_On_Discriminant (Id : E) return B is
2640 return Flag177 (Id);
2641 end Size_Depends_On_Discriminant;
2643 function Size_Known_At_Compile_Time (Id : E) return B is
2646 end Size_Known_At_Compile_Time;
2648 function Small_Value (Id : E) return R is
2650 pragma Assert (Is_Fixed_Point_Type (Id));
2651 return Ureal21 (Id);
2654 function Spec_Entity (Id : E) return E is
2656 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2660 function Static_Predicate (Id : E) return S is
2662 pragma Assert (Is_Discrete_Type (Id));
2664 end Static_Predicate;
2666 function Storage_Size_Variable (Id : E) return E is
2668 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2669 return Node15 (Implementation_Base_Type (Id));
2670 end Storage_Size_Variable;
2672 function Static_Elaboration_Desired (Id : E) return B is
2674 pragma Assert (Ekind (Id) = E_Package);
2676 end Static_Elaboration_Desired;
2678 function Static_Initialization (Id : E) return N is
2681 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2683 end Static_Initialization;
2685 function Stored_Constraint (Id : E) return L is
2688 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2689 return Elist23 (Id);
2690 end Stored_Constraint;
2692 function Strict_Alignment (Id : E) return B is
2694 return Flag145 (Implementation_Base_Type (Id));
2695 end Strict_Alignment;
2697 function String_Literal_Length (Id : E) return U is
2700 end String_Literal_Length;
2702 function String_Literal_Low_Bound (Id : E) return N is
2705 end String_Literal_Low_Bound;
2707 function Subprograms_For_Type (Id : E) return E is
2709 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2711 end Subprograms_For_Type;
2713 function Suppress_Elaboration_Warnings (Id : E) return B is
2715 return Flag148 (Id);
2716 end Suppress_Elaboration_Warnings;
2718 function Suppress_Initialization (Id : E) return B is
2720 pragma Assert (Is_Type (Id));
2721 return Flag105 (Id);
2722 end Suppress_Initialization;
2724 function Suppress_Style_Checks (Id : E) return B is
2726 return Flag165 (Id);
2727 end Suppress_Style_Checks;
2729 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2731 return Flag217 (Id);
2732 end Suppress_Value_Tracking_On_Call;
2734 function Task_Body_Procedure (Id : E) return N is
2736 pragma Assert (Ekind (Id) in Task_Kind);
2738 end Task_Body_Procedure;
2740 function Treat_As_Volatile (Id : E) return B is
2743 end Treat_As_Volatile;
2745 function Underlying_Full_View (Id : E) return E is
2747 pragma Assert (Ekind (Id) in Private_Kind);
2749 end Underlying_Full_View;
2751 function Underlying_Record_View (Id : E) return E is
2754 end Underlying_Record_View;
2756 function Universal_Aliasing (Id : E) return B is
2758 pragma Assert (Is_Type (Id));
2759 return Flag216 (Base_Type (Id));
2760 end Universal_Aliasing;
2762 function Unset_Reference (Id : E) return N is
2765 end Unset_Reference;
2767 function Used_As_Generic_Actual (Id : E) return B is
2769 return Flag222 (Id);
2770 end Used_As_Generic_Actual;
2772 function Uses_Sec_Stack (Id : E) return B is
2777 function Warnings_Off (Id : E) return B is
2782 function Warnings_Off_Used (Id : E) return B is
2784 return Flag236 (Id);
2785 end Warnings_Off_Used;
2787 function Warnings_Off_Used_Unmodified (Id : E) return B is
2789 return Flag237 (Id);
2790 end Warnings_Off_Used_Unmodified;
2792 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2794 return Flag238 (Id);
2795 end Warnings_Off_Used_Unreferenced;
2797 function Wrapped_Entity (Id : E) return E is
2799 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2800 and then Is_Primitive_Wrapper (Id));
2804 function Was_Hidden (Id : E) return B is
2806 return Flag196 (Id);
2809 ------------------------------
2810 -- Classification Functions --
2811 ------------------------------
2813 function Is_Access_Type (Id : E) return B is
2815 return Ekind (Id) in Access_Kind;
2818 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2820 return Ekind (Id) in Access_Protected_Kind;
2821 end Is_Access_Protected_Subprogram_Type;
2823 function Is_Access_Subprogram_Type (Id : E) return B is
2825 return Ekind (Id) in Access_Subprogram_Kind;
2826 end Is_Access_Subprogram_Type;
2828 function Is_Aggregate_Type (Id : E) return B is
2830 return Ekind (Id) in Aggregate_Kind;
2831 end Is_Aggregate_Type;
2833 function Is_Array_Type (Id : E) return B is
2835 return Ekind (Id) in Array_Kind;
2838 function Is_Assignable (Id : E) return B is
2840 return Ekind (Id) in Assignable_Kind;
2843 function Is_Class_Wide_Type (Id : E) return B is
2845 return Ekind (Id) in Class_Wide_Kind;
2846 end Is_Class_Wide_Type;
2848 function Is_Composite_Type (Id : E) return B is
2850 return Ekind (Id) in Composite_Kind;
2851 end Is_Composite_Type;
2853 function Is_Concurrent_Body (Id : E) return B is
2855 return Ekind (Id) in
2856 Concurrent_Body_Kind;
2857 end Is_Concurrent_Body;
2859 function Is_Concurrent_Record_Type (Id : E) return B is
2862 end Is_Concurrent_Record_Type;
2864 function Is_Concurrent_Type (Id : E) return B is
2866 return Ekind (Id) in Concurrent_Kind;
2867 end Is_Concurrent_Type;
2869 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2871 return Ekind (Id) in
2872 Decimal_Fixed_Point_Kind;
2873 end Is_Decimal_Fixed_Point_Type;
2875 function Is_Digits_Type (Id : E) return B is
2877 return Ekind (Id) in Digits_Kind;
2880 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2882 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2883 end Is_Discrete_Or_Fixed_Point_Type;
2885 function Is_Discrete_Type (Id : E) return B is
2887 return Ekind (Id) in Discrete_Kind;
2888 end Is_Discrete_Type;
2890 function Is_Elementary_Type (Id : E) return B is
2892 return Ekind (Id) in Elementary_Kind;
2893 end Is_Elementary_Type;
2895 function Is_Entry (Id : E) return B is
2897 return Ekind (Id) in Entry_Kind;
2900 function Is_Enumeration_Type (Id : E) return B is
2902 return Ekind (Id) in
2904 end Is_Enumeration_Type;
2906 function Is_Fixed_Point_Type (Id : E) return B is
2908 return Ekind (Id) in
2910 end Is_Fixed_Point_Type;
2912 function Is_Floating_Point_Type (Id : E) return B is
2914 return Ekind (Id) in Float_Kind;
2915 end Is_Floating_Point_Type;
2917 function Is_Formal (Id : E) return B is
2919 return Ekind (Id) in Formal_Kind;
2922 function Is_Formal_Object (Id : E) return B is
2924 return Ekind (Id) in Formal_Object_Kind;
2925 end Is_Formal_Object;
2927 function Is_Generic_Subprogram (Id : E) return B is
2929 return Ekind (Id) in Generic_Subprogram_Kind;
2930 end Is_Generic_Subprogram;
2932 function Is_Generic_Unit (Id : E) return B is
2934 return Ekind (Id) in Generic_Unit_Kind;
2935 end Is_Generic_Unit;
2937 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2939 return Ekind (Id) in
2940 Incomplete_Or_Private_Kind;
2941 end Is_Incomplete_Or_Private_Type;
2943 function Is_Incomplete_Type (Id : E) return B is
2945 return Ekind (Id) in
2947 end Is_Incomplete_Type;
2949 function Is_Integer_Type (Id : E) return B is
2951 return Ekind (Id) in Integer_Kind;
2952 end Is_Integer_Type;
2954 function Is_Modular_Integer_Type (Id : E) return B is
2956 return Ekind (Id) in
2957 Modular_Integer_Kind;
2958 end Is_Modular_Integer_Type;
2960 function Is_Named_Number (Id : E) return B is
2962 return Ekind (Id) in Named_Kind;
2963 end Is_Named_Number;
2965 function Is_Numeric_Type (Id : E) return B is
2967 return Ekind (Id) in Numeric_Kind;
2968 end Is_Numeric_Type;
2970 function Is_Object (Id : E) return B is
2972 return Ekind (Id) in Object_Kind;
2975 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2977 return Ekind (Id) in
2978 Ordinary_Fixed_Point_Kind;
2979 end Is_Ordinary_Fixed_Point_Type;
2981 function Is_Overloadable (Id : E) return B is
2983 return Ekind (Id) in Overloadable_Kind;
2984 end Is_Overloadable;
2986 function Is_Private_Type (Id : E) return B is
2988 return Ekind (Id) in Private_Kind;
2989 end Is_Private_Type;
2991 function Is_Protected_Type (Id : E) return B is
2993 return Ekind (Id) in Protected_Kind;
2994 end Is_Protected_Type;
2996 function Is_Real_Type (Id : E) return B is
2998 return Ekind (Id) in Real_Kind;
3001 function Is_Record_Type (Id : E) return B is
3003 return Ekind (Id) in Record_Kind;
3006 function Is_Scalar_Type (Id : E) return B is
3008 return Ekind (Id) in Scalar_Kind;
3011 function Is_Signed_Integer_Type (Id : E) return B is
3013 return Ekind (Id) in Signed_Integer_Kind;
3014 end Is_Signed_Integer_Type;
3016 function Is_Subprogram (Id : E) return B is
3018 return Ekind (Id) in Subprogram_Kind;
3021 function Is_Task_Type (Id : E) return B is
3023 return Ekind (Id) in Task_Kind;
3026 function Is_Type (Id : E) return B is
3028 return Ekind (Id) in Type_Kind;
3031 ------------------------------
3032 -- Attribute Set Procedures --
3033 ------------------------------
3035 -- Note: in many of these set procedures an "obvious" assertion is missing.
3036 -- The reason for this is that in many cases, a field is set before the
3037 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3038 -- it is possible to add assertions that specifically include the E_Void
3039 -- possibility, but in some cases, we just omit the assertions.
3041 procedure Set_Accept_Address (Id : E; V : L) is
3043 Set_Elist21 (Id, V);
3044 end Set_Accept_Address;
3046 procedure Set_Access_Disp_Table (Id : E; V : L) is
3048 pragma Assert (Ekind (Id) = E_Record_Type
3049 and then Id = Implementation_Base_Type (Id));
3050 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3051 Set_Elist16 (Id, V);
3052 end Set_Access_Disp_Table;
3054 procedure Set_Associated_Collection (Id : E; V : E) is
3056 pragma Assert (Is_Access_Type (Id));
3058 end Set_Associated_Collection;
3060 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3063 end Set_Associated_Formal_Package;
3065 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3068 end Set_Associated_Node_For_Itype;
3070 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3072 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3074 end Set_Associated_Storage_Pool;
3076 procedure Set_Actual_Subtype (Id : E; V : E) is
3079 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3080 or else Is_Formal (Id));
3082 end Set_Actual_Subtype;
3084 procedure Set_Address_Taken (Id : E; V : B := True) is
3086 Set_Flag104 (Id, V);
3087 end Set_Address_Taken;
3089 procedure Set_Alias (Id : E; V : E) is
3092 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3096 procedure Set_Alignment (Id : E; V : U) is
3098 pragma Assert (Is_Type (Id)
3099 or else Is_Formal (Id)
3100 or else Ekind_In (Id, E_Loop_Parameter,
3107 procedure Set_Barrier_Function (Id : E; V : N) is
3109 pragma Assert (Is_Entry (Id));
3111 end Set_Barrier_Function;
3113 procedure Set_Block_Node (Id : E; V : N) is
3115 pragma Assert (Ekind (Id) = E_Block);
3119 procedure Set_Body_Entity (Id : E; V : E) is
3121 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3123 end Set_Body_Entity;
3125 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3128 (Ekind (Id) = E_Package
3129 or else Is_Subprogram (Id)
3130 or else Is_Generic_Unit (Id));
3132 end Set_Body_Needed_For_SAL;
3134 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3136 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3137 Set_Flag125 (Id, V);
3138 end Set_C_Pass_By_Copy;
3140 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3143 end Set_Can_Never_Be_Null;
3145 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3148 end Set_Checks_May_Be_Suppressed;
3150 procedure Set_Class_Wide_Type (Id : E; V : E) is
3152 pragma Assert (Is_Type (Id));
3154 end Set_Class_Wide_Type;
3156 procedure Set_Cloned_Subtype (Id : E; V : E) is
3158 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3160 end Set_Cloned_Subtype;
3162 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3164 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3166 end Set_Component_Bit_Offset;
3168 procedure Set_Component_Clause (Id : E; V : N) is
3170 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3172 end Set_Component_Clause;
3174 procedure Set_Component_Size (Id : E; V : U) is
3176 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3178 end Set_Component_Size;
3180 procedure Set_Component_Type (Id : E; V : E) is
3182 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3184 end Set_Component_Type;
3186 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3189 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3191 end Set_Corresponding_Concurrent_Type;
3193 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3195 pragma Assert (Ekind (Id) = E_Discriminant);
3197 end Set_Corresponding_Discriminant;
3199 procedure Set_Corresponding_Equality (Id : E; V : E) is
3202 (Ekind (Id) = E_Function
3203 and then not Comes_From_Source (Id)
3204 and then Chars (Id) = Name_Op_Ne);
3206 end Set_Corresponding_Equality;
3208 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3210 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3212 end Set_Corresponding_Protected_Entry;
3214 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3216 pragma Assert (Is_Concurrent_Type (Id));
3218 end Set_Corresponding_Record_Type;
3220 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3223 end Set_Corresponding_Remote_Type;
3225 procedure Set_Current_Use_Clause (Id : E; V : E) is
3227 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3229 end Set_Current_Use_Clause;
3231 procedure Set_Current_Value (Id : E; V : N) is
3233 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3235 end Set_Current_Value;
3237 procedure Set_CR_Discriminant (Id : E; V : E) is
3240 end Set_CR_Discriminant;
3242 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3244 Set_Flag166 (Id, V);
3245 end Set_Debug_Info_Off;
3247 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3250 end Set_Debug_Renaming_Link;
3252 procedure Set_Default_Expr_Function (Id : E; V : E) is
3254 pragma Assert (Is_Formal (Id));
3256 end Set_Default_Expr_Function;
3258 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3260 Set_Flag108 (Id, V);
3261 end Set_Default_Expressions_Processed;
3263 procedure Set_Default_Value (Id : E; V : N) is
3265 pragma Assert (Is_Formal (Id));
3267 end Set_Default_Value;
3269 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3273 or else Is_Task_Type (Id)
3274 or else Ekind (Id) = E_Block);
3275 Set_Flag114 (Id, V);
3276 end Set_Delay_Cleanups;
3278 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3281 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3284 end Set_Delay_Subprogram_Descriptors;
3286 procedure Set_Delta_Value (Id : E; V : R) is
3288 pragma Assert (Is_Fixed_Point_Type (Id));
3289 Set_Ureal18 (Id, V);
3290 end Set_Delta_Value;
3292 procedure Set_Dependent_Instances (Id : E; V : L) is
3294 pragma Assert (Is_Generic_Instance (Id));
3296 end Set_Dependent_Instances;
3298 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3300 pragma Assert (Nkind (Id) in N_Entity);
3302 end Set_Depends_On_Private;
3304 procedure Set_Digits_Value (Id : E; V : U) is
3307 (Is_Floating_Point_Type (Id)
3308 or else Is_Decimal_Fixed_Point_Type (Id));
3310 end Set_Digits_Value;
3312 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3315 end Set_Directly_Designated_Type;
3317 procedure Set_Discard_Names (Id : E; V : B := True) is
3320 end Set_Discard_Names;
3322 procedure Set_Discriminal (Id : E; V : E) is
3324 pragma Assert (Ekind (Id) = E_Discriminant);
3326 end Set_Discriminal;
3328 procedure Set_Discriminal_Link (Id : E; V : E) is
3331 end Set_Discriminal_Link;
3333 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3335 pragma Assert (Ekind (Id) = E_Component);
3337 end Set_Discriminant_Checking_Func;
3339 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3341 pragma Assert (Nkind (Id) in N_Entity);
3342 Set_Elist21 (Id, V);
3343 end Set_Discriminant_Constraint;
3345 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3348 end Set_Discriminant_Default_Value;
3350 procedure Set_Discriminant_Number (Id : E; V : U) is
3353 end Set_Discriminant_Number;
3355 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3357 pragma Assert (Ekind (Id) = E_Record_Type
3358 and then Id = Implementation_Base_Type (Id));
3359 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3360 Set_Elist26 (Id, V);
3361 end Set_Dispatch_Table_Wrappers;
3363 procedure Set_DT_Entry_Count (Id : E; V : U) is
3365 pragma Assert (Ekind (Id) = E_Component);
3367 end Set_DT_Entry_Count;
3369 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3371 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3373 end Set_DT_Offset_To_Top_Func;
3375 procedure Set_DT_Position (Id : E; V : U) is
3377 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3379 end Set_DT_Position;
3381 procedure Set_DTC_Entity (Id : E; V : E) is
3383 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3387 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3389 pragma Assert (Ekind (Id) = E_Package);
3390 Set_Flag210 (Id, V);
3391 end Set_Elaborate_Body_Desirable;
3393 procedure Set_Elaboration_Entity (Id : E; V : E) is
3398 Ekind (Id) = E_Package
3400 Is_Generic_Unit (Id));
3402 end Set_Elaboration_Entity;
3404 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3409 Ekind (Id) = E_Package
3411 Is_Generic_Unit (Id));
3412 Set_Flag174 (Id, V);
3413 end Set_Elaboration_Entity_Required;
3415 procedure Set_Enclosing_Scope (Id : E; V : E) is
3418 end Set_Enclosing_Scope;
3420 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3422 pragma Assert (Is_Entry (Id));
3423 Set_Flag152 (Id, V);
3424 end Set_Entry_Accepted;
3426 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3429 end Set_Entry_Bodies_Array;
3431 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3434 end Set_Entry_Cancel_Parameter;
3436 procedure Set_Entry_Component (Id : E; V : E) is
3439 end Set_Entry_Component;
3441 procedure Set_Entry_Formal (Id : E; V : E) is
3444 end Set_Entry_Formal;
3446 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3448 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3450 end Set_Entry_Index_Constant;
3452 procedure Set_Contract (Id : E; V : N) is
3455 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3456 or else Is_Subprogram (Id)
3457 or else Is_Generic_Subprogram (Id));
3461 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3464 end Set_Entry_Parameters_Type;
3466 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3468 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3470 end Set_Enum_Pos_To_Rep;
3472 procedure Set_Enumeration_Pos (Id : E; V : U) is
3474 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3476 end Set_Enumeration_Pos;
3478 procedure Set_Enumeration_Rep (Id : E; V : U) is
3480 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3482 end Set_Enumeration_Rep;
3484 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3486 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3488 end Set_Enumeration_Rep_Expr;
3490 procedure Set_Equivalent_Type (Id : E; V : E) is
3493 (Ekind_In (Id, E_Class_Wide_Type,
3494 E_Class_Wide_Subtype,
3495 E_Access_Protected_Subprogram_Type,
3496 E_Anonymous_Access_Protected_Subprogram_Type,
3497 E_Access_Subprogram_Type,
3500 end Set_Equivalent_Type;
3502 procedure Set_Esize (Id : E; V : U) is
3507 procedure Set_Exception_Code (Id : E; V : U) is
3509 pragma Assert (Ekind (Id) = E_Exception);
3511 end Set_Exception_Code;
3513 procedure Set_Extra_Accessibility (Id : E; V : E) is
3515 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3517 end Set_Extra_Accessibility;
3519 procedure Set_Extra_Constrained (Id : E; V : E) is
3521 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3523 end Set_Extra_Constrained;
3525 procedure Set_Extra_Formal (Id : E; V : E) is
3528 end Set_Extra_Formal;
3530 procedure Set_Extra_Formals (Id : E; V : E) is
3533 (Is_Overloadable (Id)
3534 or else Ekind_In (Id, E_Entry_Family,
3536 E_Subprogram_Type));
3538 end Set_Extra_Formals;
3540 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3543 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3544 Set_Flag229 (Id, V);
3545 end Set_Can_Use_Internal_Rep;
3547 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3549 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3550 Set_Flag158 (Id, V);
3551 end Set_Finalize_Storage_Only;
3553 procedure Set_Finalizer (Id : E; V : E) is
3556 (Ekind (Id) = E_Package
3557 or else Ekind (Id) = E_Package_Body);
3561 procedure Set_First_Entity (Id : E; V : E) is
3564 end Set_First_Entity;
3566 procedure Set_First_Exit_Statement (Id : E; V : N) is
3568 pragma Assert (Ekind (Id) = E_Loop);
3570 end Set_First_Exit_Statement;
3572 procedure Set_First_Index (Id : E; V : N) is
3574 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3576 end Set_First_Index;
3578 procedure Set_First_Literal (Id : E; V : E) is
3580 pragma Assert (Is_Enumeration_Type (Id));
3582 end Set_First_Literal;
3584 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3586 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3588 end Set_First_Optional_Parameter;
3590 procedure Set_First_Private_Entity (Id : E; V : E) is
3592 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3593 or else Ekind (Id) in Concurrent_Kind);
3595 end Set_First_Private_Entity;
3597 procedure Set_First_Rep_Item (Id : E; V : N) is
3600 end Set_First_Rep_Item;
3602 procedure Set_Float_Rep (Id : E; V : F) is
3603 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3605 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3608 procedure Set_Freeze_Node (Id : E; V : N) is
3611 end Set_Freeze_Node;
3613 procedure Set_From_With_Type (Id : E; V : B := True) is
3617 or else Ekind (Id) = E_Package);
3618 Set_Flag159 (Id, V);
3619 end Set_From_With_Type;
3621 procedure Set_Full_View (Id : E; V : E) is
3623 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3627 procedure Set_Generic_Homonym (Id : E; V : E) is
3630 end Set_Generic_Homonym;
3632 procedure Set_Generic_Renamings (Id : E; V : L) is
3634 Set_Elist23 (Id, V);
3635 end Set_Generic_Renamings;
3637 procedure Set_Handler_Records (Id : E; V : S) is
3640 end Set_Handler_Records;
3642 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3644 pragma Assert (Id = Base_Type (Id));
3645 Set_Flag135 (Id, V);
3646 end Set_Has_Aliased_Components;
3648 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3651 end Set_Has_Alignment_Clause;
3653 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3656 end Set_Has_All_Calls_Remote;
3658 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3660 Set_Flag201 (Id, V);
3661 end Set_Has_Anon_Block_Suffix;
3663 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3665 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3667 end Set_Has_Atomic_Components;
3669 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3672 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3673 Set_Flag139 (Id, V);
3674 end Set_Has_Biased_Representation;
3676 procedure Set_Has_Completion (Id : E; V : B := True) is
3679 end Set_Has_Completion;
3681 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3683 pragma Assert (Is_Type (Id));
3685 end Set_Has_Completion_In_Body;
3687 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3689 pragma Assert (Ekind (Id) = E_Record_Type);
3690 Set_Flag140 (Id, V);
3691 end Set_Has_Complex_Representation;
3693 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3695 pragma Assert (Ekind (Id) = E_Array_Type);
3697 end Set_Has_Component_Size_Clause;
3699 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3701 pragma Assert (Is_Type (Id));
3702 Set_Flag187 (Id, V);
3703 end Set_Has_Constrained_Partial_View;
3705 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3707 Set_Flag181 (Id, V);
3708 end Set_Has_Contiguous_Rep;
3710 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3712 pragma Assert (Id = Base_Type (Id));
3714 end Set_Has_Controlled_Component;
3716 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3719 end Set_Has_Controlling_Result;
3721 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3723 Set_Flag119 (Id, V);
3724 end Set_Has_Convention_Pragma;
3726 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3729 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3730 and then Is_Base_Type (Id));
3732 end Set_Has_Default_Aspect;
3734 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3736 pragma Assert (Nkind (Id) in N_Entity);
3737 Set_Flag200 (Id, V);
3738 end Set_Has_Delayed_Aspects;
3740 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3742 pragma Assert (Nkind (Id) in N_Entity);
3744 end Set_Has_Delayed_Freeze;
3746 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3748 pragma Assert (Nkind (Id) in N_Entity);
3750 end Set_Has_Discriminants;
3752 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3754 pragma Assert (Ekind (Id) = E_Record_Type
3755 and then Is_Tagged_Type (Id));
3756 Set_Flag220 (Id, V);
3757 end Set_Has_Dispatch_Table;
3759 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3761 pragma Assert (Is_Enumeration_Type (Id));
3763 end Set_Has_Enumeration_Rep_Clause;
3765 procedure Set_Has_Exit (Id : E; V : B := True) is
3770 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3772 pragma Assert (Is_Tagged_Type (Id));
3773 Set_Flag110 (Id, V);
3774 end Set_Has_External_Tag_Rep_Clause;
3776 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3778 Set_Flag175 (Id, V);
3779 end Set_Has_Forward_Instantiation;
3781 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3783 Set_Flag173 (Id, V);
3784 end Set_Has_Fully_Qualified_Name;
3786 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3789 end Set_Has_Gigi_Rep_Item;
3791 procedure Set_Has_Homonym (Id : E; V : B := True) is
3794 end Set_Has_Homonym;
3796 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
3798 Set_Flag251 (Id, V);
3799 end Set_Has_Implicit_Dereference;
3801 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3803 pragma Assert (Is_Type (Id));
3804 Set_Flag248 (Id, V);
3805 end Set_Has_Inheritable_Invariants;
3807 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3809 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3810 Set_Flag219 (Id, V);
3811 end Set_Has_Initial_Value;
3813 procedure Set_Has_Invariants (Id : E; V : B := True) is
3815 pragma Assert (Is_Type (Id)
3816 or else Ekind (Id) = E_Procedure
3817 or else Ekind (Id) = E_Void);
3818 Set_Flag232 (Id, V);
3819 end Set_Has_Invariants;
3821 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3823 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3825 end Set_Has_Machine_Radix_Clause;
3827 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3830 end Set_Has_Master_Entity;
3832 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3834 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3835 Set_Flag142 (Id, V);
3836 end Set_Has_Missing_Return;
3838 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3840 Set_Flag101 (Id, V);
3841 end Set_Has_Nested_Block_With_Handler;
3843 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3845 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3846 Set_Flag215 (Id, V);
3847 end Set_Has_Up_Level_Access;
3849 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3851 pragma Assert (Id = Base_Type (Id));
3853 end Set_Has_Non_Standard_Rep;
3855 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3857 pragma Assert (Is_Type (Id));
3858 Set_Flag172 (Id, V);
3859 end Set_Has_Object_Size_Clause;
3861 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3863 Set_Flag154 (Id, V);
3864 end Set_Has_Per_Object_Constraint;
3866 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3868 Set_Flag188 (Id, V);
3869 end Set_Has_Persistent_BSS;
3871 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3873 pragma Assert (Is_Subprogram (Id));
3874 Set_Flag240 (Id, V);
3875 end Set_Has_Postconditions;
3877 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3879 pragma Assert (Is_Access_Type (Id));
3880 Set_Flag27 (Base_Type (Id), V);
3881 end Set_Has_Pragma_Controlled;
3883 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3885 Set_Flag150 (Id, V);
3886 end Set_Has_Pragma_Elaborate_Body;
3888 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3890 Set_Flag157 (Id, V);
3891 end Set_Has_Pragma_Inline;
3893 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3895 Set_Flag230 (Id, V);
3896 end Set_Has_Pragma_Inline_Always;
3898 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3900 pragma Assert (Is_Enumeration_Type (Id));
3901 pragma Assert (Id = Base_Type (Id));
3902 Set_Flag198 (Id, V);
3903 end Set_Has_Pragma_Ordered;
3905 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3907 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3908 pragma Assert (Id = Base_Type (Id));
3909 Set_Flag121 (Id, V);
3910 end Set_Has_Pragma_Pack;
3912 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3914 Set_Flag221 (Id, V);
3915 end Set_Has_Pragma_Preelab_Init;
3917 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3919 Set_Flag203 (Id, V);
3920 end Set_Has_Pragma_Pure;
3922 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3924 Set_Flag179 (Id, V);
3925 end Set_Has_Pragma_Pure_Function;
3927 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3929 Set_Flag169 (Id, V);
3930 end Set_Has_Pragma_Thread_Local_Storage;
3932 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3934 Set_Flag233 (Id, V);
3935 end Set_Has_Pragma_Unmodified;
3937 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3939 Set_Flag180 (Id, V);
3940 end Set_Has_Pragma_Unreferenced;
3942 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3944 pragma Assert (Is_Type (Id));
3945 Set_Flag212 (Id, V);
3946 end Set_Has_Pragma_Unreferenced_Objects;
3948 procedure Set_Has_Predicates (Id : E; V : B := True) is
3950 Set_Flag250 (Id, V);
3951 end Set_Has_Predicates;
3953 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3955 pragma Assert (Id = Base_Type (Id));
3956 Set_Flag120 (Id, V);
3957 end Set_Has_Primitive_Operations;
3959 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
3961 pragma Assert (Is_Type (Id));
3962 Set_Flag151 (Id, V);
3963 end Set_Has_Private_Ancestor;
3965 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3967 Set_Flag155 (Id, V);
3968 end Set_Has_Private_Declaration;
3970 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3972 Set_Flag161 (Id, V);
3973 end Set_Has_Qualified_Name;
3975 procedure Set_Has_RACW (Id : E; V : B := True) is
3977 pragma Assert (Ekind (Id) = E_Package);
3978 Set_Flag214 (Id, V);
3981 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3983 pragma Assert (Id = Base_Type (Id));
3985 end Set_Has_Record_Rep_Clause;
3987 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3989 pragma Assert (Is_Subprogram (Id));
3990 Set_Flag143 (Id, V);
3991 end Set_Has_Recursive_Call;
3993 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3996 end Set_Has_Size_Clause;
3998 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4001 end Set_Has_Small_Clause;
4003 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4005 pragma Assert (Id = Base_Type (Id));
4006 Set_Flag100 (Id, V);
4007 end Set_Has_Specified_Layout;
4009 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4011 pragma Assert (Is_Type (Id));
4012 Set_Flag190 (Id, V);
4013 end Set_Has_Specified_Stream_Input;
4015 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4017 pragma Assert (Is_Type (Id));
4018 Set_Flag191 (Id, V);
4019 end Set_Has_Specified_Stream_Output;
4021 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4023 pragma Assert (Is_Type (Id));
4024 Set_Flag192 (Id, V);
4025 end Set_Has_Specified_Stream_Read;
4027 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4029 pragma Assert (Is_Type (Id));
4030 Set_Flag193 (Id, V);
4031 end Set_Has_Specified_Stream_Write;
4033 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4035 Set_Flag211 (Id, V);
4036 end Set_Has_Static_Discriminants;
4038 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4040 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4041 pragma Assert (Id = Base_Type (Id));
4043 end Set_Has_Storage_Size_Clause;
4045 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4047 pragma Assert (Is_Elementary_Type (Id));
4048 Set_Flag184 (Id, V);
4049 end Set_Has_Stream_Size_Clause;
4051 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4054 end Set_Has_Subprogram_Descriptor;
4056 procedure Set_Has_Task (Id : E; V : B := True) is
4058 pragma Assert (Id = Base_Type (Id));
4062 procedure Set_Has_Thunks (Id : E; V : B := True) is
4064 pragma Assert (Is_Tag (Id));
4065 Set_Flag228 (Id, V);
4068 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4070 pragma Assert (Id = Base_Type (Id));
4071 Set_Flag123 (Id, V);
4072 end Set_Has_Unchecked_Union;
4074 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4076 pragma Assert (Is_Type (Id));
4078 end Set_Has_Unknown_Discriminants;
4080 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4082 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4084 end Set_Has_Volatile_Components;
4086 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4088 Set_Flag182 (Id, V);
4089 end Set_Has_Xref_Entry;
4091 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4093 pragma Assert (Ekind (Id) = E_Variable);
4095 end Set_Hiding_Loop_Variable;
4097 procedure Set_Homonym (Id : E; V : E) is
4099 pragma Assert (Id /= V);
4103 procedure Set_Interface_Alias (Id : E; V : E) is
4107 and then Is_Hidden (Id)
4108 and then (Ekind_In (Id, E_Procedure, E_Function)));
4110 end Set_Interface_Alias;
4112 procedure Set_Interfaces (Id : E; V : L) is
4114 pragma Assert (Is_Record_Type (Id));
4115 Set_Elist25 (Id, V);
4118 procedure Set_In_Package_Body (Id : E; V : B := True) is
4121 end Set_In_Package_Body;
4123 procedure Set_In_Private_Part (Id : E; V : B := True) is
4126 end Set_In_Private_Part;
4128 procedure Set_In_Use (Id : E; V : B := True) is
4130 pragma Assert (Nkind (Id) in N_Entity);
4134 procedure Set_Inner_Instances (Id : E; V : L) is
4136 Set_Elist23 (Id, V);
4137 end Set_Inner_Instances;
4139 procedure Set_Interface_Name (Id : E; V : N) is
4142 end Set_Interface_Name;
4144 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4146 pragma Assert (Is_Overloadable (Id));
4148 end Set_Is_Abstract_Subprogram;
4150 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4152 pragma Assert (Is_Type (Id));
4153 Set_Flag146 (Id, V);
4154 end Set_Is_Abstract_Type;
4156 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4158 pragma Assert (Is_Access_Type (Id));
4159 Set_Flag194 (Id, V);
4160 end Set_Is_Local_Anonymous_Access;
4162 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4164 pragma Assert (Is_Access_Type (Id));
4166 end Set_Is_Access_Constant;
4168 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4170 Set_Flag185 (Id, V);
4171 end Set_Is_Ada_2005_Only;
4173 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4175 Set_Flag199 (Id, V);
4176 end Set_Is_Ada_2012_Only;
4178 procedure Set_Is_Aliased (Id : E; V : B := True) is
4180 pragma Assert (Nkind (Id) in N_Entity);
4184 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4186 pragma Assert (Is_Entry (Id));
4187 Set_Flag132 (Id, V);
4188 end Set_Is_AST_Entry;
4190 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4193 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4195 end Set_Is_Asynchronous;
4197 procedure Set_Is_Atomic (Id : E; V : B := True) is
4202 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4204 pragma Assert ((not V)
4205 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4206 Set_Flag122 (Id, V);
4207 end Set_Is_Bit_Packed_Array;
4209 procedure Set_Is_Called (Id : E; V : B := True) is
4211 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4212 Set_Flag102 (Id, V);
4215 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4218 end Set_Is_Character_Type;
4220 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4223 end Set_Is_Child_Unit;
4225 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4228 end Set_Is_Class_Wide_Equivalent_Type;
4230 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4232 Set_Flag149 (Id, V);
4233 end Set_Is_Compilation_Unit;
4235 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4237 pragma Assert (Ekind (Id) = E_Discriminant);
4238 Set_Flag103 (Id, V);
4239 end Set_Is_Completely_Hidden;
4241 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4244 end Set_Is_Concurrent_Record_Type;
4246 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4249 end Set_Is_Constr_Subt_For_U_Nominal;
4251 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4253 Set_Flag141 (Id, V);
4254 end Set_Is_Constr_Subt_For_UN_Aliased;
4256 procedure Set_Is_Constrained (Id : E; V : B := True) is
4258 pragma Assert (Nkind (Id) in N_Entity);
4260 end Set_Is_Constrained;
4262 procedure Set_Is_Constructor (Id : E; V : B := True) is
4265 end Set_Is_Constructor;
4267 procedure Set_Is_Controlled (Id : E; V : B := True) is
4269 pragma Assert (Id = Base_Type (Id));
4271 end Set_Is_Controlled;
4273 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4275 pragma Assert (Is_Formal (Id));
4277 end Set_Is_Controlling_Formal;
4279 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4282 end Set_Is_CPP_Class;
4284 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4286 pragma Assert (Is_Type (Id));
4287 Set_Flag223 (Id, V);
4288 end Set_Is_Descendent_Of_Address;
4290 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4292 Set_Flag176 (Id, V);
4293 end Set_Is_Discrim_SO_Function;
4295 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4297 Set_Flag234 (Id, V);
4298 end Set_Is_Dispatch_Table_Entity;
4300 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4305 Is_Overloadable (Id)
4307 Ekind (Id) = E_Subprogram_Type);
4310 end Set_Is_Dispatching_Operation;
4312 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4314 Set_Flag124 (Id, V);
4315 end Set_Is_Eliminated;
4317 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4320 end Set_Is_Entry_Formal;
4322 procedure Set_Is_Exported (Id : E; V : B := True) is
4325 end Set_Is_Exported;
4327 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4330 end Set_Is_First_Subtype;
4332 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4334 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4335 Set_Flag118 (Id, V);
4336 end Set_Is_For_Access_Subtype;
4338 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4340 Set_Flag111 (Id, V);
4341 end Set_Is_Formal_Subprogram;
4343 procedure Set_Is_Frozen (Id : E; V : B := True) is
4345 pragma Assert (Nkind (Id) in N_Entity);
4349 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4351 pragma Assert (Is_Type (Id));
4353 end Set_Is_Generic_Actual_Type;
4355 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4357 Set_Flag130 (Id, V);
4358 end Set_Is_Generic_Instance;
4360 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4362 pragma Assert (Nkind (Id) in N_Entity);
4364 end Set_Is_Generic_Type;
4366 procedure Set_Is_Hidden (Id : E; V : B := True) is
4371 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4373 Set_Flag171 (Id, V);
4374 end Set_Is_Hidden_Open_Scope;
4376 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4378 pragma Assert (Nkind (Id) in N_Entity);
4380 end Set_Is_Immediately_Visible;
4382 procedure Set_Is_Imported (Id : E; V : B := True) is
4385 end Set_Is_Imported;
4387 procedure Set_Is_Inlined (Id : E; V : B := True) is
4392 procedure Set_Is_Interface (Id : E; V : B := True) is
4394 pragma Assert (Is_Record_Type (Id));
4395 Set_Flag186 (Id, V);
4396 end Set_Is_Interface;
4398 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4400 Set_Flag126 (Id, V);
4401 end Set_Is_Instantiated;
4403 procedure Set_Is_Internal (Id : E; V : B := True) is
4405 pragma Assert (Nkind (Id) in N_Entity);
4407 end Set_Is_Internal;
4409 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4411 pragma Assert (Nkind (Id) in N_Entity);
4413 end Set_Is_Interrupt_Handler;
4415 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4418 end Set_Is_Intrinsic_Subprogram;
4420 procedure Set_Is_Itype (Id : E; V : B := True) is
4425 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4428 end Set_Is_Known_Non_Null;
4430 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4432 Set_Flag204 (Id, V);
4433 end Set_Is_Known_Null;
4435 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4437 Set_Flag170 (Id, V);
4438 end Set_Is_Known_Valid;
4440 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4442 pragma Assert (Is_Type (Id));
4443 Set_Flag106 (Id, V);
4444 end Set_Is_Limited_Composite;
4446 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4448 pragma Assert (Is_Interface (Id));
4449 Set_Flag197 (Id, V);
4450 end Set_Is_Limited_Interface;
4452 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4455 end Set_Is_Limited_Record;
4457 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4459 pragma Assert (Is_Subprogram (Id));
4460 Set_Flag137 (Id, V);
4461 end Set_Is_Machine_Code_Subprogram;
4463 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4465 pragma Assert (Is_Type (Id));
4466 Set_Flag109 (Id, V);
4467 end Set_Is_Non_Static_Subtype;
4469 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4471 pragma Assert (Ekind (Id) = E_Procedure);
4472 Set_Flag178 (Id, V);
4473 end Set_Is_Null_Init_Proc;
4475 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4477 Set_Flag153 (Id, V);
4478 end Set_Is_Obsolescent;
4480 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4482 pragma Assert (Ekind (Id) = E_Out_Parameter);
4483 Set_Flag226 (Id, V);
4484 end Set_Is_Only_Out_Parameter;
4486 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4488 pragma Assert (Is_Formal (Id));
4489 Set_Flag134 (Id, V);
4490 end Set_Is_Optional_Parameter;
4492 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4494 Set_Flag160 (Id, V);
4495 end Set_Is_Package_Body_Entity;
4497 procedure Set_Is_Packed (Id : E; V : B := True) is
4499 pragma Assert (Id = Base_Type (Id));
4503 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4505 Set_Flag138 (Id, V);
4506 end Set_Is_Packed_Array_Type;
4508 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4510 pragma Assert (Nkind (Id) in N_Entity);
4512 end Set_Is_Potentially_Use_Visible;
4514 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4517 end Set_Is_Preelaborated;
4519 procedure Set_Is_Primitive (Id : E; V : B := True) is
4522 (Is_Overloadable (Id)
4523 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4524 Set_Flag218 (Id, V);
4525 end Set_Is_Primitive;
4527 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4529 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4530 Set_Flag195 (Id, V);
4531 end Set_Is_Primitive_Wrapper;
4533 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4535 pragma Assert (Is_Type (Id));
4536 Set_Flag107 (Id, V);
4537 end Set_Is_Private_Composite;
4539 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4542 end Set_Is_Private_Descendant;
4544 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4546 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4547 Set_Flag245 (Id, V);
4548 end Set_Is_Private_Primitive;
4550 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4552 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4553 Set_Flag252 (Id, V);
4554 end Set_Is_Processed_Transient;
4556 procedure Set_Is_Public (Id : E; V : B := True) is
4558 pragma Assert (Nkind (Id) in N_Entity);
4562 procedure Set_Is_Pure (Id : E; V : B := True) is
4567 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4569 pragma Assert (Is_Access_Type (Id));
4570 Set_Flag189 (Id, V);
4571 end Set_Is_Pure_Unit_Access_Type;
4573 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4575 pragma Assert (Is_Type (Id));
4576 Set_Flag244 (Id, V);
4577 end Set_Is_RACW_Stub_Type;
4579 procedure Set_Is_Raised (Id : E; V : B := True) is
4581 pragma Assert (Ekind (Id) = E_Exception);
4582 Set_Flag224 (Id, V);
4585 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4588 end Set_Is_Remote_Call_Interface;
4590 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4593 end Set_Is_Remote_Types;
4595 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4597 Set_Flag112 (Id, V);
4598 end Set_Is_Renaming_Of_Object;
4600 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4602 Set_Flag209 (Id, V);
4603 end Set_Is_Return_Object;
4605 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4607 pragma Assert (Ekind (Id) = E_Variable);
4608 Set_Flag249 (Id, V);
4609 end Set_Is_Safe_To_Reevaluate;
4611 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4614 end Set_Is_Shared_Passive;
4616 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4620 or else Ekind_In (Id, E_Exception,
4625 end Set_Is_Statically_Allocated;
4627 procedure Set_Is_Tag (Id : E; V : B := True) is
4629 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4633 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4636 end Set_Is_Tagged_Type;
4638 procedure Set_Is_Thunk (Id : E; V : B := True) is
4640 Set_Flag225 (Id, V);
4643 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4645 Set_Flag235 (Id, V);
4646 end Set_Is_Trivial_Subprogram;
4648 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4650 Set_Flag163 (Id, V);
4651 end Set_Is_True_Constant;
4653 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4655 pragma Assert (Id = Base_Type (Id));
4656 Set_Flag117 (Id, V);
4657 end Set_Is_Unchecked_Union;
4659 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4661 pragma Assert (Ekind (Id) = E_Record_Type);
4662 Set_Flag246 (Id, V);
4663 end Set_Is_Underlying_Record_View;
4665 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4667 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4668 Set_Flag144 (Id, V);
4669 end Set_Is_Unsigned_Type;
4671 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4673 pragma Assert (Ekind (Id) = E_Procedure);
4674 Set_Flag127 (Id, V);
4675 end Set_Is_Valued_Procedure;
4677 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4679 pragma Assert (Is_Child_Unit (Id));
4680 Set_Flag116 (Id, V);
4681 end Set_Is_Visible_Child_Unit;
4683 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4685 Set_Flag206 (Id, V);
4686 end Set_Is_Visible_Formal;
4688 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4690 pragma Assert (Ekind (Id) = E_Exception);
4691 Set_Flag133 (Id, V);
4692 end Set_Is_VMS_Exception;
4694 procedure Set_Is_Volatile (Id : E; V : B := True) is
4696 pragma Assert (Nkind (Id) in N_Entity);
4698 end Set_Is_Volatile;
4700 procedure Set_Itype_Printed (Id : E; V : B := True) is
4702 pragma Assert (Is_Itype (Id));
4703 Set_Flag202 (Id, V);
4704 end Set_Itype_Printed;
4706 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4709 end Set_Kill_Elaboration_Checks;
4711 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4714 end Set_Kill_Range_Checks;
4716 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4719 end Set_Kill_Tag_Checks;
4721 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4723 pragma Assert (Is_Type (Id));
4724 Set_Flag207 (Id, V);
4725 end Set_Known_To_Have_Preelab_Init;
4727 procedure Set_Last_Assignment (Id : E; V : N) is
4729 pragma Assert (Is_Assignable (Id));
4731 end Set_Last_Assignment;
4733 procedure Set_Last_Entity (Id : E; V : E) is
4736 end Set_Last_Entity;
4738 procedure Set_Limited_View (Id : E; V : E) is
4740 pragma Assert (Ekind (Id) = E_Package);
4742 end Set_Limited_View;
4744 procedure Set_Lit_Indexes (Id : E; V : E) is
4746 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4748 end Set_Lit_Indexes;
4750 procedure Set_Lit_Strings (Id : E; V : E) is
4752 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4754 end Set_Lit_Strings;
4756 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4758 pragma Assert (Is_Formal (Id));
4759 Set_Flag205 (Id, V);
4760 end Set_Low_Bound_Tested;
4762 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4764 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4766 end Set_Machine_Radix_10;
4768 procedure Set_Master_Id (Id : E; V : E) is
4770 pragma Assert (Is_Access_Type (Id));
4774 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4776 Set_Flag168 (Id, V);
4777 end Set_Materialize_Entity;
4779 procedure Set_Mechanism (Id : E; V : M) is
4781 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4782 Set_Uint8 (Id, UI_From_Int (V));
4785 procedure Set_Modulus (Id : E; V : U) is
4787 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4791 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4793 pragma Assert (Is_Type (Id));
4794 Set_Flag183 (Id, V);
4795 end Set_Must_Be_On_Byte_Boundary;
4797 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4799 pragma Assert (Is_Type (Id));
4800 Set_Flag208 (Id, V);
4801 end Set_Must_Have_Preelab_Init;
4803 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4805 Set_Flag147 (Id, V);
4806 end Set_Needs_Debug_Info;
4808 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4811 (Is_Overloadable (Id)
4812 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4814 end Set_Needs_No_Actuals;
4816 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4818 Set_Flag115 (Id, V);
4819 end Set_Never_Set_In_Source;
4821 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4824 end Set_Next_Inlined_Subprogram;
4826 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4828 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4829 Set_Flag131 (Id, V);
4830 end Set_No_Pool_Assigned;
4832 procedure Set_No_Return (Id : E; V : B := True) is
4835 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4836 Set_Flag113 (Id, V);
4839 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4841 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4842 Set_Flag136 (Id, V);
4843 end Set_No_Strict_Aliasing;
4845 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4847 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4849 end Set_Non_Binary_Modulus;
4851 procedure Set_Non_Limited_View (Id : E; V : E) is
4853 pragma Assert (Ekind (Id) in Incomplete_Kind);
4855 end Set_Non_Limited_View;
4857 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4860 (Root_Type (Id) = Standard_Boolean
4861 and then Ekind (Id) = E_Enumeration_Type);
4862 Set_Flag162 (Id, V);
4863 end Set_Nonzero_Is_True;
4865 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4867 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4869 end Set_Normalized_First_Bit;
4871 procedure Set_Normalized_Position (Id : E; V : U) is
4873 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4875 end Set_Normalized_Position;
4877 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4879 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4881 end Set_Normalized_Position_Max;
4883 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4885 pragma Assert (Ekind (Id) = E_Variable);
4886 Set_Flag247 (Id, V);
4887 end Set_OK_To_Rename;
4889 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4892 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4893 Set_Flag239 (Id, V);
4894 end Set_OK_To_Reorder_Components;
4896 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4899 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4900 Set_Flag241 (Id, V);
4901 end Set_Optimize_Alignment_Space;
4903 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4906 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4907 Set_Flag242 (Id, V);
4908 end Set_Optimize_Alignment_Time;
4910 procedure Set_Original_Access_Type (Id : E; V : E) is
4912 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4914 end Set_Original_Access_Type;
4916 procedure Set_Original_Array_Type (Id : E; V : E) is
4918 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4920 end Set_Original_Array_Type;
4922 procedure Set_Original_Record_Component (Id : E; V : E) is
4924 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4926 end Set_Original_Record_Component;
4928 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4930 Set_Flag243 (Id, V);
4931 end Set_Overlays_Constant;
4933 procedure Set_Overridden_Operation (Id : E; V : E) is
4936 end Set_Overridden_Operation;
4938 procedure Set_Package_Instantiation (Id : E; V : N) is
4940 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4942 end Set_Package_Instantiation;
4944 procedure Set_Packed_Array_Type (Id : E; V : E) is
4946 pragma Assert (Is_Array_Type (Id));
4948 end Set_Packed_Array_Type;
4950 procedure Set_Parent_Subtype (Id : E; V : E) is
4952 pragma Assert (Ekind (Id) = E_Record_Type);
4954 end Set_Parent_Subtype;
4956 procedure Set_Postcondition_Proc (Id : E; V : E) is
4958 pragma Assert (Ekind (Id) = E_Procedure);
4960 end Set_Postcondition_Proc;
4962 procedure Set_PPC_Wrapper (Id : E; V : E) is
4964 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4966 end Set_PPC_Wrapper;
4968 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4970 pragma Assert (Is_Tagged_Type (Id));
4971 Set_Elist10 (Id, V);
4972 end Set_Direct_Primitive_Operations;
4974 procedure Set_Prival (Id : E; V : E) is
4976 pragma Assert (Is_Protected_Component (Id));
4980 procedure Set_Prival_Link (Id : E; V : E) is
4982 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4984 end Set_Prival_Link;
4986 procedure Set_Private_Dependents (Id : E; V : L) is
4988 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4989 Set_Elist18 (Id, V);
4990 end Set_Private_Dependents;
4992 procedure Set_Private_View (Id : E; V : N) is
4994 pragma Assert (Is_Private_Type (Id));
4996 end Set_Private_View;
4998 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5000 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5002 end Set_Protected_Body_Subprogram;
5004 procedure Set_Protected_Formal (Id : E; V : E) is
5006 pragma Assert (Is_Formal (Id));
5008 end Set_Protected_Formal;
5010 procedure Set_Protection_Object (Id : E; V : E) is
5012 pragma Assert (Ekind_In (Id, E_Entry,
5017 end Set_Protection_Object;
5019 procedure Set_Reachable (Id : E; V : B := True) is
5024 procedure Set_Referenced (Id : E; V : B := True) is
5026 Set_Flag156 (Id, V);
5029 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5032 end Set_Referenced_As_LHS;
5034 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5036 Set_Flag227 (Id, V);
5037 end Set_Referenced_As_Out_Parameter;
5039 procedure Set_Register_Exception_Call (Id : E; V : N) is
5041 pragma Assert (Ekind (Id) = E_Exception);
5043 end Set_Register_Exception_Call;
5045 procedure Set_Related_Array_Object (Id : E; V : E) is
5047 pragma Assert (Is_Array_Type (Id));
5049 end Set_Related_Array_Object;
5051 procedure Set_Related_Expression (Id : E; V : N) is
5053 pragma Assert (Ekind (Id) in Type_Kind
5054 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5056 end Set_Related_Expression;
5058 procedure Set_Related_Instance (Id : E; V : E) is
5060 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5062 end Set_Related_Instance;
5064 procedure Set_Related_Type (Id : E; V : E) is
5066 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5068 end Set_Related_Type;
5070 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5072 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5074 end Set_Relative_Deadline_Variable;
5076 procedure Set_Renamed_Entity (Id : E; V : N) is
5079 end Set_Renamed_Entity;
5081 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5083 pragma Assert (Ekind (Id) = E_Package);
5084 Set_Flag231 (Id, V);
5085 end Set_Renamed_In_Spec;
5087 procedure Set_Renamed_Object (Id : E; V : N) is
5090 end Set_Renamed_Object;
5092 procedure Set_Renaming_Map (Id : E; V : U) is
5095 end Set_Renaming_Map;
5097 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5099 pragma Assert (Is_Overloadable (Id));
5100 Set_Flag213 (Id, V);
5101 end Set_Requires_Overriding;
5103 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5105 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5107 end Set_Return_Flag_Or_Transient_Decl;
5109 procedure Set_Return_Present (Id : E; V : B := True) is
5112 end Set_Return_Present;
5114 procedure Set_Return_Applies_To (Id : E; V : N) is
5117 end Set_Return_Applies_To;
5119 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5122 end Set_Returns_By_Ref;
5124 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5127 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5128 Set_Flag164 (Id, V);
5129 end Set_Reverse_Bit_Order;
5131 procedure Set_RM_Size (Id : E; V : U) is
5133 pragma Assert (Is_Type (Id));
5137 procedure Set_Scalar_Range (Id : E; V : N) is
5140 end Set_Scalar_Range;
5142 procedure Set_Scale_Value (Id : E; V : U) is
5145 end Set_Scale_Value;
5147 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5149 pragma Assert (not Is_Record_Type (Id));
5151 end Set_Scope_Depth_Value;
5153 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5155 Set_Flag167 (Id, V);
5156 end Set_Sec_Stack_Needed_For_Return;
5158 procedure Set_Shadow_Entities (Id : E; V : S) is
5160 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5162 end Set_Shadow_Entities;
5164 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5166 pragma Assert (Ekind (Id) = E_Variable);
5168 end Set_Shared_Var_Procs_Instance;
5170 procedure Set_Size_Check_Code (Id : E; V : N) is
5172 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5174 end Set_Size_Check_Code;
5176 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5178 Set_Flag177 (Id, V);
5179 end Set_Size_Depends_On_Discriminant;
5181 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5184 end Set_Size_Known_At_Compile_Time;
5186 procedure Set_Small_Value (Id : E; V : R) is
5188 pragma Assert (Is_Fixed_Point_Type (Id));
5189 Set_Ureal21 (Id, V);
5190 end Set_Small_Value;
5192 procedure Set_Spec_Entity (Id : E; V : E) is
5194 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5196 end Set_Spec_Entity;
5198 procedure Set_Static_Predicate (Id : E; V : S) is
5201 (Ekind_In (Id, E_Enumeration_Subtype,
5202 E_Modular_Integer_Subtype,
5203 E_Signed_Integer_Subtype)
5204 and then Has_Predicates (Id));
5206 end Set_Static_Predicate;
5208 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5210 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5211 pragma Assert (Id = Base_Type (Id));
5213 end Set_Storage_Size_Variable;
5215 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5217 pragma Assert (Ekind (Id) = E_Package);
5219 end Set_Static_Elaboration_Desired;
5221 procedure Set_Static_Initialization (Id : E; V : N) is
5224 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5226 end Set_Static_Initialization;
5228 procedure Set_Stored_Constraint (Id : E; V : L) is
5230 pragma Assert (Nkind (Id) in N_Entity);
5231 Set_Elist23 (Id, V);
5232 end Set_Stored_Constraint;
5234 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5236 pragma Assert (Id = Base_Type (Id));
5237 Set_Flag145 (Id, V);
5238 end Set_Strict_Alignment;
5240 procedure Set_String_Literal_Length (Id : E; V : U) is
5242 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5244 end Set_String_Literal_Length;
5246 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5248 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5250 end Set_String_Literal_Low_Bound;
5252 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5254 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5256 end Set_Subprograms_For_Type;
5258 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5260 Set_Flag148 (Id, V);
5261 end Set_Suppress_Elaboration_Warnings;
5263 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5265 pragma Assert (Is_Type (Id));
5266 Set_Flag105 (Id, V);
5267 end Set_Suppress_Initialization;
5269 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5271 Set_Flag165 (Id, V);
5272 end Set_Suppress_Style_Checks;
5274 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5276 Set_Flag217 (Id, V);
5277 end Set_Suppress_Value_Tracking_On_Call;
5279 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5281 pragma Assert (Ekind (Id) in Task_Kind);
5283 end Set_Task_Body_Procedure;
5285 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5288 end Set_Treat_As_Volatile;
5290 procedure Set_Underlying_Full_View (Id : E; V : E) is
5292 pragma Assert (Ekind (Id) in Private_Kind);
5294 end Set_Underlying_Full_View;
5296 procedure Set_Underlying_Record_View (Id : E; V : E) is
5298 pragma Assert (Ekind (Id) = E_Record_Type);
5300 end Set_Underlying_Record_View;
5302 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5304 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5305 Set_Flag216 (Id, V);
5306 end Set_Universal_Aliasing;
5308 procedure Set_Unset_Reference (Id : E; V : N) is
5311 end Set_Unset_Reference;
5313 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5316 end Set_Uses_Sec_Stack;
5318 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5320 Set_Flag222 (Id, V);
5321 end Set_Used_As_Generic_Actual;
5323 procedure Set_Warnings_Off (Id : E; V : B := True) is
5326 end Set_Warnings_Off;
5328 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5330 Set_Flag236 (Id, V);
5331 end Set_Warnings_Off_Used;
5333 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5335 Set_Flag237 (Id, V);
5336 end Set_Warnings_Off_Used_Unmodified;
5338 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5340 Set_Flag238 (Id, V);
5341 end Set_Warnings_Off_Used_Unreferenced;
5343 procedure Set_Was_Hidden (Id : E; V : B := True) is
5345 Set_Flag196 (Id, V);
5348 procedure Set_Wrapped_Entity (Id : E; V : E) is
5350 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5351 and then Is_Primitive_Wrapper (Id));
5353 end Set_Wrapped_Entity;
5355 -----------------------------------
5356 -- Field Initialization Routines --
5357 -----------------------------------
5359 procedure Init_Alignment (Id : E) is
5361 Set_Uint14 (Id, Uint_0);
5364 procedure Init_Alignment (Id : E; V : Int) is
5366 Set_Uint14 (Id, UI_From_Int (V));
5369 procedure Init_Component_Bit_Offset (Id : E) is
5371 Set_Uint11 (Id, No_Uint);
5372 end Init_Component_Bit_Offset;
5374 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5376 Set_Uint11 (Id, UI_From_Int (V));
5377 end Init_Component_Bit_Offset;
5379 procedure Init_Component_Size (Id : E) is
5381 Set_Uint22 (Id, Uint_0);
5382 end Init_Component_Size;
5384 procedure Init_Component_Size (Id : E; V : Int) is
5386 Set_Uint22 (Id, UI_From_Int (V));
5387 end Init_Component_Size;
5389 procedure Init_Digits_Value (Id : E) is
5391 Set_Uint17 (Id, Uint_0);
5392 end Init_Digits_Value;
5394 procedure Init_Digits_Value (Id : E; V : Int) is
5396 Set_Uint17 (Id, UI_From_Int (V));
5397 end Init_Digits_Value;
5399 procedure Init_Esize (Id : E) is
5401 Set_Uint12 (Id, Uint_0);
5404 procedure Init_Esize (Id : E; V : Int) is
5406 Set_Uint12 (Id, UI_From_Int (V));
5409 procedure Init_Normalized_First_Bit (Id : E) is
5411 Set_Uint8 (Id, No_Uint);
5412 end Init_Normalized_First_Bit;
5414 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5416 Set_Uint8 (Id, UI_From_Int (V));
5417 end Init_Normalized_First_Bit;
5419 procedure Init_Normalized_Position (Id : E) is
5421 Set_Uint14 (Id, No_Uint);
5422 end Init_Normalized_Position;
5424 procedure Init_Normalized_Position (Id : E; V : Int) is
5426 Set_Uint14 (Id, UI_From_Int (V));
5427 end Init_Normalized_Position;
5429 procedure Init_Normalized_Position_Max (Id : E) is
5431 Set_Uint10 (Id, No_Uint);
5432 end Init_Normalized_Position_Max;
5434 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5436 Set_Uint10 (Id, UI_From_Int (V));
5437 end Init_Normalized_Position_Max;
5439 procedure Init_RM_Size (Id : E) is
5441 Set_Uint13 (Id, Uint_0);
5444 procedure Init_RM_Size (Id : E; V : Int) is
5446 Set_Uint13 (Id, UI_From_Int (V));
5449 -----------------------------
5450 -- Init_Component_Location --
5451 -----------------------------
5453 procedure Init_Component_Location (Id : E) is
5455 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5456 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5457 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5458 Set_Uint12 (Id, Uint_0); -- Esize
5459 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5460 end Init_Component_Location;
5466 procedure Init_Size (Id : E; V : Int) is
5468 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5469 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5472 ---------------------
5473 -- Init_Size_Align --
5474 ---------------------
5476 procedure Init_Size_Align (Id : E) is
5478 Set_Uint12 (Id, Uint_0); -- Esize
5479 Set_Uint13 (Id, Uint_0); -- RM_Size
5480 Set_Uint14 (Id, Uint_0); -- Alignment
5481 end Init_Size_Align;
5483 ----------------------------------------------
5484 -- Type Representation Attribute Predicates --
5485 ----------------------------------------------
5487 function Known_Alignment (E : Entity_Id) return B is
5489 return Uint14 (E) /= Uint_0
5490 and then Uint14 (E) /= No_Uint;
5491 end Known_Alignment;
5493 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5495 return Uint11 (E) /= No_Uint;
5496 end Known_Component_Bit_Offset;
5498 function Known_Component_Size (E : Entity_Id) return B is
5500 return Uint22 (Base_Type (E)) /= Uint_0
5501 and then Uint22 (Base_Type (E)) /= No_Uint;
5502 end Known_Component_Size;
5504 function Known_Esize (E : Entity_Id) return B is
5506 return Uint12 (E) /= Uint_0
5507 and then Uint12 (E) /= No_Uint;
5510 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5512 return Uint8 (E) /= No_Uint;
5513 end Known_Normalized_First_Bit;
5515 function Known_Normalized_Position (E : Entity_Id) return B is
5517 return Uint14 (E) /= No_Uint;
5518 end Known_Normalized_Position;
5520 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5522 return Uint10 (E) /= No_Uint;
5523 end Known_Normalized_Position_Max;
5525 function Known_RM_Size (E : Entity_Id) return B is
5527 return Uint13 (E) /= No_Uint
5528 and then (Uint13 (E) /= Uint_0
5529 or else Is_Discrete_Type (E)
5530 or else Is_Fixed_Point_Type (E));
5533 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5535 return Uint11 (E) /= No_Uint
5536 and then Uint11 (E) >= Uint_0;
5537 end Known_Static_Component_Bit_Offset;
5539 function Known_Static_Component_Size (E : Entity_Id) return B is
5541 return Uint22 (Base_Type (E)) > Uint_0;
5542 end Known_Static_Component_Size;
5544 function Known_Static_Esize (E : Entity_Id) return B is
5546 return Uint12 (E) > Uint_0
5547 and then not Is_Generic_Type (E);
5548 end Known_Static_Esize;
5550 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5552 return Uint8 (E) /= No_Uint
5553 and then Uint8 (E) >= Uint_0;
5554 end Known_Static_Normalized_First_Bit;
5556 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5558 return Uint14 (E) /= No_Uint
5559 and then Uint14 (E) >= Uint_0;
5560 end Known_Static_Normalized_Position;
5562 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5564 return Uint10 (E) /= No_Uint
5565 and then Uint10 (E) >= Uint_0;
5566 end Known_Static_Normalized_Position_Max;
5568 function Known_Static_RM_Size (E : Entity_Id) return B is
5570 return (Uint13 (E) > Uint_0
5571 or else Is_Discrete_Type (E)
5572 or else Is_Fixed_Point_Type (E))
5573 and then not Is_Generic_Type (E);
5574 end Known_Static_RM_Size;
5576 function Unknown_Alignment (E : Entity_Id) return B is
5578 return Uint14 (E) = Uint_0
5579 or else Uint14 (E) = No_Uint;
5580 end Unknown_Alignment;
5582 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5584 return Uint11 (E) = No_Uint;
5585 end Unknown_Component_Bit_Offset;
5587 function Unknown_Component_Size (E : Entity_Id) return B is
5589 return Uint22 (Base_Type (E)) = Uint_0
5591 Uint22 (Base_Type (E)) = No_Uint;
5592 end Unknown_Component_Size;
5594 function Unknown_Esize (E : Entity_Id) return B is
5596 return Uint12 (E) = No_Uint
5598 Uint12 (E) = Uint_0;
5601 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5603 return Uint8 (E) = No_Uint;
5604 end Unknown_Normalized_First_Bit;
5606 function Unknown_Normalized_Position (E : Entity_Id) return B is
5608 return Uint14 (E) = No_Uint;
5609 end Unknown_Normalized_Position;
5611 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5613 return Uint10 (E) = No_Uint;
5614 end Unknown_Normalized_Position_Max;
5616 function Unknown_RM_Size (E : Entity_Id) return B is
5618 return (Uint13 (E) = Uint_0
5619 and then not Is_Discrete_Type (E)
5620 and then not Is_Fixed_Point_Type (E))
5621 or else Uint13 (E) = No_Uint;
5622 end Unknown_RM_Size;
5624 --------------------
5625 -- Address_Clause --
5626 --------------------
5628 function Address_Clause (Id : E) return N is
5630 return Rep_Clause (Id, Name_Address);
5637 function Aft_Value (Id : E) return U is
5639 Delta_Val : Ureal := Delta_Value (Id);
5641 while Delta_Val < Ureal_Tenth loop
5642 Delta_Val := Delta_Val * Ureal_10;
5643 Result := Result + 1;
5646 return UI_From_Int (Result);
5649 ----------------------
5650 -- Alignment_Clause --
5651 ----------------------
5653 function Alignment_Clause (Id : E) return N is
5655 return Rep_Clause (Id, Name_Alignment);
5656 end Alignment_Clause;
5662 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5664 if Last_Entity (V) = Empty then
5665 Set_First_Entity (Id => V, V => Id);
5667 Set_Next_Entity (Last_Entity (V), Id);
5670 Set_Next_Entity (Id, Empty);
5672 Set_Last_Entity (Id => V, V => Id);
5679 function Base_Type (Id : E) return E is
5681 if Is_Base_Type (Id) then
5684 pragma Assert (Is_Type (Id));
5689 -------------------------
5690 -- Component_Alignment --
5691 -------------------------
5693 -- Component Alignment is encoded using two flags, Flag128/129 as
5694 -- follows. Note that both flags False = Align_Default, so that the
5695 -- default initialization of flags to False initializes component
5696 -- alignment to the default value as required.
5698 -- Flag128 Flag129 Value
5699 -- ------- ------- -----
5700 -- False False Calign_Default
5701 -- False True Calign_Component_Size
5702 -- True False Calign_Component_Size_4
5703 -- True True Calign_Storage_Unit
5705 function Component_Alignment (Id : E) return C is
5706 BT : constant Node_Id := Base_Type (Id);
5709 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5711 if Flag128 (BT) then
5712 if Flag129 (BT) then
5713 return Calign_Storage_Unit;
5715 return Calign_Component_Size_4;
5719 if Flag129 (BT) then
5720 return Calign_Component_Size;
5722 return Calign_Default;
5725 end Component_Alignment;
5727 ----------------------
5728 -- Declaration_Node --
5729 ----------------------
5731 function Declaration_Node (Id : E) return N is
5735 if Ekind (Id) = E_Incomplete_Type
5736 and then Present (Full_View (Id))
5738 P := Parent (Full_View (Id));
5744 if Nkind (P) /= N_Selected_Component
5745 and then Nkind (P) /= N_Expanded_Name
5747 not (Nkind (P) = N_Defining_Program_Unit_Name
5748 and then Is_Child_Unit (Id))
5755 end Declaration_Node;
5757 ---------------------
5758 -- Designated_Type --
5759 ---------------------
5761 function Designated_Type (Id : E) return E is
5765 Desig_Type := Directly_Designated_Type (Id);
5767 if Ekind (Desig_Type) = E_Incomplete_Type
5768 and then Present (Full_View (Desig_Type))
5770 return Full_View (Desig_Type);
5772 elsif Is_Class_Wide_Type (Desig_Type)
5773 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5774 and then Present (Full_View (Etype (Desig_Type)))
5775 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5777 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5782 end Designated_Type;
5784 ----------------------
5785 -- Entry_Index_Type --
5786 ----------------------
5788 function Entry_Index_Type (Id : E) return N is
5790 pragma Assert (Ekind (Id) = E_Entry_Family);
5791 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5792 end Entry_Index_Type;
5794 ---------------------
5795 -- First_Component --
5796 ---------------------
5798 function First_Component (Id : E) return E is
5803 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5805 Comp_Id := First_Entity (Id);
5806 while Present (Comp_Id) loop
5807 exit when Ekind (Comp_Id) = E_Component;
5808 Comp_Id := Next_Entity (Comp_Id);
5812 end First_Component;
5814 -------------------------------------
5815 -- First_Component_Or_Discriminant --
5816 -------------------------------------
5818 function First_Component_Or_Discriminant (Id : E) return E is
5823 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5825 Comp_Id := First_Entity (Id);
5826 while Present (Comp_Id) loop
5827 exit when Ekind (Comp_Id) = E_Component
5829 Ekind (Comp_Id) = E_Discriminant;
5830 Comp_Id := Next_Entity (Comp_Id);
5834 end First_Component_Or_Discriminant;
5840 function First_Formal (Id : E) return E is
5845 (Is_Overloadable (Id)
5846 or else Ekind_In (Id, E_Entry_Family,
5848 E_Subprogram_Type));
5850 if Ekind (Id) = E_Enumeration_Literal then
5854 Formal := First_Entity (Id);
5856 if Present (Formal) and then Is_Formal (Formal) then
5864 ------------------------------
5865 -- First_Formal_With_Extras --
5866 ------------------------------
5868 function First_Formal_With_Extras (Id : E) return E is
5873 (Is_Overloadable (Id)
5874 or else Ekind_In (Id, E_Entry_Family,
5876 E_Subprogram_Type));
5878 if Ekind (Id) = E_Enumeration_Literal then
5882 Formal := First_Entity (Id);
5884 if Present (Formal) and then Is_Formal (Formal) then
5887 return Extra_Formals (Id); -- Empty if no extra formals
5890 end First_Formal_With_Extras;
5892 -------------------------------------
5893 -- Get_Attribute_Definition_Clause --
5894 -------------------------------------
5896 function Get_Attribute_Definition_Clause
5898 Id : Attribute_Id) return Node_Id
5903 N := First_Rep_Item (E);
5904 while Present (N) loop
5905 if Nkind (N) = N_Attribute_Definition_Clause
5906 and then Get_Attribute_Id (Chars (N)) = Id
5915 end Get_Attribute_Definition_Clause;
5921 function Get_Full_View (T : Entity_Id) return Entity_Id is
5923 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5924 return Full_View (T);
5926 elsif Is_Class_Wide_Type (T)
5927 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5928 and then Present (Full_View (Root_Type (T)))
5930 return Class_Wide_Type (Full_View (Root_Type (T)));
5937 --------------------------------------
5938 -- Get_Record_Representation_Clause --
5939 --------------------------------------
5941 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5945 N := First_Rep_Item (E);
5946 while Present (N) loop
5947 if Nkind (N) = N_Record_Representation_Clause then
5955 end Get_Record_Representation_Clause;
5957 -----------------------------
5958 -- Get_Rep_Item_For_Entity --
5959 -----------------------------
5961 function Get_Rep_Item_For_Entity
5963 Nam : Name_Id) return Node_Id
5969 N := First_Rep_Item (E);
5970 while Present (N) loop
5971 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5972 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5974 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5978 elsif Nkind (N) = N_Attribute_Definition_Clause
5979 and then Chars (N) = Nam
5980 and then Entity (N) = E
5984 elsif Nkind (N) = N_Aspect_Specification
5985 and then Chars (Identifier (N)) = Nam
5986 and then Entity (N) = E
5995 end Get_Rep_Item_For_Entity;
5997 --------------------
5998 -- Get_Rep_Pragma --
5999 --------------------
6001 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6005 N := First_Rep_Item (E);
6006 while Present (N) loop
6007 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6017 ------------------------
6018 -- Has_Attach_Handler --
6019 ------------------------
6021 function Has_Attach_Handler (Id : E) return B is
6025 pragma Assert (Is_Protected_Type (Id));
6027 Ritem := First_Rep_Item (Id);
6028 while Present (Ritem) loop
6029 if Nkind (Ritem) = N_Pragma
6030 and then Pragma_Name (Ritem) = Name_Attach_Handler
6034 Next_Rep_Item (Ritem);
6039 end Has_Attach_Handler;
6041 -------------------------------------
6042 -- Has_Attribute_Definition_Clause --
6043 -------------------------------------
6045 function Has_Attribute_Definition_Clause
6047 Id : Attribute_Id) return Boolean
6050 return Present (Get_Attribute_Definition_Clause (E, Id));
6051 end Has_Attribute_Definition_Clause;
6057 function Has_Entries (Id : E) return B is
6061 pragma Assert (Is_Concurrent_Type (Id));
6063 Ent := First_Entity (Id);
6064 while Present (Ent) loop
6065 if Is_Entry (Ent) then
6069 Ent := Next_Entity (Ent);
6075 ----------------------------
6076 -- Has_Foreign_Convention --
6077 ----------------------------
6079 function Has_Foreign_Convention (Id : E) return B is
6081 -- While regular Intrinsics such as the Standard operators fit in the
6082 -- "Ada" convention, those with an Interface_Name materialize GCC
6083 -- builtin imports for which Ada special treatments shouldn't apply.
6085 return Convention (Id) in Foreign_Convention
6086 or else (Convention (Id) = Convention_Intrinsic
6087 and then Present (Interface_Name (Id)));
6088 end Has_Foreign_Convention;
6090 ---------------------------
6091 -- Has_Interrupt_Handler --
6092 ---------------------------
6094 function Has_Interrupt_Handler (Id : E) return B is
6098 pragma Assert (Is_Protected_Type (Id));
6100 Ritem := First_Rep_Item (Id);
6101 while Present (Ritem) loop
6102 if Nkind (Ritem) = N_Pragma
6103 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6107 Next_Rep_Item (Ritem);
6112 end Has_Interrupt_Handler;
6114 --------------------
6115 -- Has_Rep_Pragma --
6116 --------------------
6118 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6120 return Present (Get_Rep_Pragma (E, Nam));
6123 --------------------
6124 -- Has_Unmodified --
6125 --------------------
6127 function Has_Unmodified (E : Entity_Id) return Boolean is
6129 if Has_Pragma_Unmodified (E) then
6131 elsif Warnings_Off (E) then
6132 Set_Warnings_Off_Used_Unmodified (E);
6139 ---------------------
6140 -- Has_Unreferenced --
6141 ---------------------
6143 function Has_Unreferenced (E : Entity_Id) return Boolean is
6145 if Has_Pragma_Unreferenced (E) then
6147 elsif Warnings_Off (E) then
6148 Set_Warnings_Off_Used_Unreferenced (E);
6153 end Has_Unreferenced;
6155 ----------------------
6156 -- Has_Warnings_Off --
6157 ----------------------
6159 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6161 if Warnings_Off (E) then
6162 Set_Warnings_Off_Used (E);
6167 end Has_Warnings_Off;
6169 ------------------------------
6170 -- Implementation_Base_Type --
6171 ------------------------------
6173 function Implementation_Base_Type (Id : E) return E is
6178 Bastyp := Base_Type (Id);
6180 if Is_Incomplete_Or_Private_Type (Bastyp) then
6181 Imptyp := Underlying_Type (Bastyp);
6183 -- If we have an implementation type, then just return it,
6184 -- otherwise we return the Base_Type anyway. This can only
6185 -- happen in error situations and should avoid some error bombs.
6187 if Present (Imptyp) then
6188 return Base_Type (Imptyp);
6196 end Implementation_Base_Type;
6198 -------------------------
6199 -- Invariant_Procedure --
6200 -------------------------
6202 function Invariant_Procedure (Id : E) return E is
6206 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6208 if No (Subprograms_For_Type (Id)) then
6212 S := Subprograms_For_Type (Id);
6213 while Present (S) loop
6214 if Has_Invariants (S) then
6217 S := Subprograms_For_Type (S);
6223 end Invariant_Procedure;
6229 -- Global flag table allowing rapid computation of this function
6231 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6232 (E_Enumeration_Subtype |
6234 E_Signed_Integer_Subtype |
6235 E_Modular_Integer_Subtype |
6236 E_Floating_Point_Subtype |
6237 E_Ordinary_Fixed_Point_Subtype |
6238 E_Decimal_Fixed_Point_Subtype |
6243 E_Record_Subtype_With_Private |
6244 E_Limited_Private_Subtype |
6246 E_Protected_Subtype |
6248 E_String_Literal_Subtype |
6249 E_Class_Wide_Subtype => False,
6252 function Is_Base_Type (Id : E) return Boolean is
6254 return Entity_Is_Base_Type (Ekind (Id));
6257 ---------------------
6258 -- Is_Boolean_Type --
6259 ---------------------
6261 function Is_Boolean_Type (Id : E) return B is
6263 return Root_Type (Id) = Standard_Boolean;
6264 end Is_Boolean_Type;
6266 ------------------------
6267 -- Is_Constant_Object --
6268 ------------------------
6270 function Is_Constant_Object (Id : E) return B is
6271 K : constant Entity_Kind := Ekind (Id);
6274 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6275 end Is_Constant_Object;
6277 --------------------
6278 -- Is_Discriminal --
6279 --------------------
6281 function Is_Discriminal (Id : E) return B is
6283 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6284 and then Present (Discriminal_Link (Id)));
6287 ----------------------
6288 -- Is_Dynamic_Scope --
6289 ----------------------
6291 function Is_Dynamic_Scope (Id : E) return B is
6294 Ekind (Id) = E_Block
6296 Ekind (Id) = E_Function
6298 Ekind (Id) = E_Procedure
6300 Ekind (Id) = E_Subprogram_Body
6302 Ekind (Id) = E_Task_Type
6304 (Ekind (Id) = E_Limited_Private_Type
6305 and then Present (Full_View (Id))
6306 and then Ekind (Full_View (Id)) = E_Task_Type)
6308 Ekind (Id) = E_Entry
6310 Ekind (Id) = E_Entry_Family
6312 Ekind (Id) = E_Return_Statement;
6313 end Is_Dynamic_Scope;
6315 --------------------
6316 -- Is_Entity_Name --
6317 --------------------
6319 function Is_Entity_Name (N : Node_Id) return Boolean is
6320 Kind : constant Node_Kind := Nkind (N);
6323 -- Identifiers, operator symbols, expanded names are entity names
6325 return Kind = N_Identifier
6326 or else Kind = N_Operator_Symbol
6327 or else Kind = N_Expanded_Name
6329 -- Attribute references are entity names if they refer to an entity.
6330 -- Note that we don't do this by testing for the presence of the
6331 -- Entity field in the N_Attribute_Reference node, since it may not
6332 -- have been set yet.
6334 or else (Kind = N_Attribute_Reference
6335 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6342 function Is_Finalizer (Id : E) return B is
6344 return Ekind (Id) = E_Procedure
6345 and then Chars (Id) = Name_uFinalizer;
6348 -----------------------------------
6349 -- Is_Package_Or_Generic_Package --
6350 -----------------------------------
6352 function Is_Package_Or_Generic_Package (Id : E) return B is
6355 Ekind (Id) = E_Package
6357 Ekind (Id) = E_Generic_Package;
6358 end Is_Package_Or_Generic_Package;
6360 ------------------------
6361 -- Predicate_Function --
6362 ------------------------
6364 function Predicate_Function (Id : E) return E is
6368 pragma Assert (Is_Type (Id));
6370 if No (Subprograms_For_Type (Id)) then
6374 S := Subprograms_For_Type (Id);
6375 while Present (S) loop
6376 if Has_Predicates (S) then
6379 S := Subprograms_For_Type (S);
6385 end Predicate_Function;
6391 function Is_Prival (Id : E) return B is
6393 return (Ekind_In (Id, E_Constant, E_Variable)
6394 and then Present (Prival_Link (Id)));
6397 ----------------------------
6398 -- Is_Protected_Component --
6399 ----------------------------
6401 function Is_Protected_Component (Id : E) return B is
6403 return Ekind (Id) = E_Component
6404 and then Is_Protected_Type (Scope (Id));
6405 end Is_Protected_Component;
6407 ----------------------------
6408 -- Is_Protected_Interface --
6409 ----------------------------
6411 function Is_Protected_Interface (Id : E) return B is
6412 Typ : constant Entity_Id := Base_Type (Id);
6414 if not Is_Interface (Typ) then
6416 elsif Is_Class_Wide_Type (Typ) then
6417 return Is_Protected_Interface (Etype (Typ));
6419 return Protected_Present (Type_Definition (Parent (Typ)));
6421 end Is_Protected_Interface;
6423 ------------------------------
6424 -- Is_Protected_Record_Type --
6425 ------------------------------
6427 function Is_Protected_Record_Type (Id : E) return B is
6430 Is_Concurrent_Record_Type (Id)
6431 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6432 end Is_Protected_Record_Type;
6434 --------------------------------
6435 -- Is_Standard_Character_Type --
6436 --------------------------------
6438 function Is_Standard_Character_Type (Id : E) return B is
6440 if Is_Type (Id) then
6442 R : constant Entity_Id := Root_Type (Id);
6445 R = Standard_Character
6447 R = Standard_Wide_Character
6449 R = Standard_Wide_Wide_Character;
6455 end Is_Standard_Character_Type;
6457 --------------------
6458 -- Is_String_Type --
6459 --------------------
6461 function Is_String_Type (Id : E) return B is
6463 return Ekind (Id) in String_Kind
6464 or else (Is_Array_Type (Id)
6465 and then Id /= Any_Composite
6466 and then Number_Dimensions (Id) = 1
6467 and then Is_Character_Type (Component_Type (Id)));
6470 -------------------------------
6471 -- Is_Synchronized_Interface --
6472 -------------------------------
6474 function Is_Synchronized_Interface (Id : E) return B is
6475 Typ : constant Entity_Id := Base_Type (Id);
6478 if not Is_Interface (Typ) then
6481 elsif Is_Class_Wide_Type (Typ) then
6482 return Is_Synchronized_Interface (Etype (Typ));
6485 return Protected_Present (Type_Definition (Parent (Typ)))
6486 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6487 or else Task_Present (Type_Definition (Parent (Typ)));
6489 end Is_Synchronized_Interface;
6491 -----------------------
6492 -- Is_Task_Interface --
6493 -----------------------
6495 function Is_Task_Interface (Id : E) return B is
6496 Typ : constant Entity_Id := Base_Type (Id);
6498 if not Is_Interface (Typ) then
6500 elsif Is_Class_Wide_Type (Typ) then
6501 return Is_Task_Interface (Etype (Typ));
6503 return Task_Present (Type_Definition (Parent (Typ)));
6505 end Is_Task_Interface;
6507 -------------------------
6508 -- Is_Task_Record_Type --
6509 -------------------------
6511 function Is_Task_Record_Type (Id : E) return B is
6514 Is_Concurrent_Record_Type (Id)
6515 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6516 end Is_Task_Record_Type;
6518 ------------------------
6519 -- Is_Wrapper_Package --
6520 ------------------------
6522 function Is_Wrapper_Package (Id : E) return B is
6524 return (Ekind (Id) = E_Package
6525 and then Present (Related_Instance (Id)));
6526 end Is_Wrapper_Package;
6532 function Last_Formal (Id : E) return E is
6537 (Is_Overloadable (Id)
6538 or else Ekind_In (Id, E_Entry_Family,
6540 E_Subprogram_Type));
6542 if Ekind (Id) = E_Enumeration_Literal then
6546 Formal := First_Formal (Id);
6548 if Present (Formal) then
6549 while Present (Next_Formal (Formal)) loop
6550 Formal := Next_Formal (Formal);
6558 function Model_Emin_Value (Id : E) return Uint is
6560 return Machine_Emin_Value (Id);
6561 end Model_Emin_Value;
6563 -------------------------
6564 -- Model_Epsilon_Value --
6565 -------------------------
6567 function Model_Epsilon_Value (Id : E) return Ureal is
6568 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6570 return Radix ** (1 - Model_Mantissa_Value (Id));
6571 end Model_Epsilon_Value;
6573 --------------------------
6574 -- Model_Mantissa_Value --
6575 --------------------------
6577 function Model_Mantissa_Value (Id : E) return Uint is
6579 return Machine_Mantissa_Value (Id);
6580 end Model_Mantissa_Value;
6582 -----------------------
6583 -- Model_Small_Value --
6584 -----------------------
6586 function Model_Small_Value (Id : E) return Ureal is
6587 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6589 return Radix ** (Model_Emin_Value (Id) - 1);
6590 end Model_Small_Value;
6592 ------------------------
6593 -- Machine_Emax_Value --
6594 ------------------------
6596 function Machine_Emax_Value (Id : E) return Uint is
6597 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6600 case Float_Rep (Id) is
6603 when 1 .. 6 => return Uint_128;
6604 when 7 .. 15 => return 2**10;
6605 when 16 .. 33 => return 2**14;
6606 when others => return No_Uint;
6611 when 1 .. 9 => return 2**7 - 1;
6612 when 10 .. 15 => return 2**10 - 1;
6613 when others => return No_Uint;
6617 return Uint_2 ** Uint_7 - Uint_1;
6619 end Machine_Emax_Value;
6621 ------------------------
6622 -- Machine_Emin_Value --
6623 ------------------------
6625 function Machine_Emin_Value (Id : E) return Uint is
6627 case Float_Rep (Id) is
6628 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6629 when VAX_Native => return -Machine_Emax_Value (Id);
6630 when AAMP => return -Machine_Emax_Value (Id);
6632 end Machine_Emin_Value;
6634 ----------------------------
6635 -- Machine_Mantissa_Value --
6636 ----------------------------
6638 function Machine_Mantissa_Value (Id : E) return Uint is
6639 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6642 case Float_Rep (Id) is
6645 when 1 .. 6 => return Uint_24;
6646 when 7 .. 15 => return UI_From_Int (53);
6647 when 16 .. 18 => return Uint_64;
6648 when 19 .. 33 => return UI_From_Int (113);
6649 when others => return No_Uint;
6654 when 1 .. 6 => return Uint_24;
6655 when 7 .. 9 => return UI_From_Int (56);
6656 when 10 .. 15 => return UI_From_Int (53);
6657 when others => return No_Uint;
6662 when 1 .. 6 => return Uint_24;
6663 when 7 .. 9 => return UI_From_Int (40);
6664 when others => return No_Uint;
6667 end Machine_Mantissa_Value;
6669 -------------------------
6670 -- Machine_Radix_Value --
6671 -------------------------
6673 function Machine_Radix_Value (Id : E) return U is
6675 case Float_Rep (Id) is
6676 when IEEE_Binary | VAX_Native | AAMP =>
6679 end Machine_Radix_Value;
6681 --------------------
6682 -- Next_Component --
6683 --------------------
6685 function Next_Component (Id : E) return E is
6689 Comp_Id := Next_Entity (Id);
6690 while Present (Comp_Id) loop
6691 exit when Ekind (Comp_Id) = E_Component;
6692 Comp_Id := Next_Entity (Comp_Id);
6698 ------------------------------------
6699 -- Next_Component_Or_Discriminant --
6700 ------------------------------------
6702 function Next_Component_Or_Discriminant (Id : E) return E is
6706 Comp_Id := Next_Entity (Id);
6707 while Present (Comp_Id) loop
6708 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6709 Comp_Id := Next_Entity (Comp_Id);
6713 end Next_Component_Or_Discriminant;
6715 -----------------------
6716 -- Next_Discriminant --
6717 -----------------------
6719 -- This function actually implements both Next_Discriminant and
6720 -- Next_Stored_Discriminant by making sure that the Discriminant
6721 -- returned is of the same variety as Id.
6723 function Next_Discriminant (Id : E) return E is
6725 -- Derived Tagged types with private extensions look like this...
6727 -- E_Discriminant d1
6728 -- E_Discriminant d2
6730 -- E_Discriminant d1
6731 -- E_Discriminant d2
6734 -- so it is critical not to go past the leading discriminants
6739 pragma Assert (Ekind (Id) = E_Discriminant);
6742 D := Next_Entity (D);
6744 or else (Ekind (D) /= E_Discriminant
6745 and then not Is_Itype (D))
6750 exit when Ekind (D) = E_Discriminant
6751 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6755 end Next_Discriminant;
6761 function Next_Formal (Id : E) return E is
6765 -- Follow the chain of declared entities as long as the kind of the
6766 -- entity corresponds to a formal parameter. Skip internal entities
6767 -- that may have been created for implicit subtypes, in the process
6768 -- of analyzing default expressions.
6772 P := Next_Entity (P);
6774 if No (P) or else Is_Formal (P) then
6776 elsif not Is_Internal (P) then
6782 -----------------------------
6783 -- Next_Formal_With_Extras --
6784 -----------------------------
6786 function Next_Formal_With_Extras (Id : E) return E is
6788 if Present (Extra_Formal (Id)) then
6789 return Extra_Formal (Id);
6791 return Next_Formal (Id);
6793 end Next_Formal_With_Extras;
6799 function Next_Index (Id : Node_Id) return Node_Id is
6808 function Next_Literal (Id : E) return E is
6810 pragma Assert (Nkind (Id) in N_Entity);
6814 ------------------------------
6815 -- Next_Stored_Discriminant --
6816 ------------------------------
6818 function Next_Stored_Discriminant (Id : E) return E is
6820 -- See comment in Next_Discriminant
6822 return Next_Discriminant (Id);
6823 end Next_Stored_Discriminant;
6825 -----------------------
6826 -- Number_Dimensions --
6827 -----------------------
6829 function Number_Dimensions (Id : E) return Pos is
6834 if Ekind (Id) in String_Kind then
6839 T := First_Index (Id);
6840 while Present (T) loop
6847 end Number_Dimensions;
6849 --------------------
6850 -- Number_Entries --
6851 --------------------
6853 function Number_Entries (Id : E) return Nat is
6858 pragma Assert (Is_Concurrent_Type (Id));
6861 Ent := First_Entity (Id);
6862 while Present (Ent) loop
6863 if Is_Entry (Ent) then
6867 Ent := Next_Entity (Ent);
6873 --------------------
6874 -- Number_Formals --
6875 --------------------
6877 function Number_Formals (Id : E) return Pos is
6883 Formal := First_Formal (Id);
6884 while Present (Formal) loop
6886 Formal := Next_Formal (Formal);
6892 --------------------
6893 -- Parameter_Mode --
6894 --------------------
6896 function Parameter_Mode (Id : E) return Formal_Kind is
6901 --------------------------
6902 -- Primitive_Operations --
6903 --------------------------
6905 function Primitive_Operations (Id : E) return L is
6907 if Is_Concurrent_Type (Id) then
6908 if Present (Corresponding_Record_Type (Id)) then
6909 return Direct_Primitive_Operations
6910 (Corresponding_Record_Type (Id));
6915 return Direct_Primitive_Operations (Id);
6917 end Primitive_Operations;
6919 ---------------------
6920 -- Record_Rep_Item --
6921 ---------------------
6923 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6925 Set_Next_Rep_Item (N, First_Rep_Item (E));
6926 Set_First_Rep_Item (E, N);
6927 end Record_Rep_Item;
6933 function Root_Type (Id : E) return E is
6937 pragma Assert (Nkind (Id) in N_Entity);
6939 T := Base_Type (Id);
6941 if Ekind (T) = E_Class_Wide_Type then
6944 elsif Ekind (T) = E_Class_Wide_Subtype then
6945 return Etype (Base_Type (T));
6947 -- ??? T comes from Base_Type, how can it be a subtype?
6948 -- Also Base_Type is supposed to be idempotent, so either way
6949 -- this is equivalent to "return Etype (T)" and should be merged
6950 -- with the E_Class_Wide_Type case.
6961 -- Following test catches some error cases resulting from
6964 elsif No (Etyp) then
6967 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6970 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6976 -- Return if there is a circularity in the inheritance chain. This
6977 -- happens in some error situations and we do not want to get
6978 -- stuck in this loop.
6980 if T = Base_Type (Id) then
6987 ---------------------
6988 -- Safe_Emax_Value --
6989 ---------------------
6991 function Safe_Emax_Value (Id : E) return Uint is
6993 return Machine_Emax_Value (Id);
6994 end Safe_Emax_Value;
6996 ----------------------
6997 -- Safe_First_Value --
6998 ----------------------
7000 function Safe_First_Value (Id : E) return Ureal is
7002 return -Safe_Last_Value (Id);
7003 end Safe_First_Value;
7005 ---------------------
7006 -- Safe_Last_Value --
7007 ---------------------
7009 function Safe_Last_Value (Id : E) return Ureal is
7010 Radix : constant Uint := Machine_Radix_Value (Id);
7011 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7012 Emax : constant Uint := Safe_Emax_Value (Id);
7013 Significand : constant Uint := Radix ** Mantissa - 1;
7014 Exponent : constant Uint := Emax - Mantissa;
7020 (Num => Significand * 2 ** (Exponent mod 4),
7021 Den => -Exponent / 4,
7027 (Num => Significand,
7031 end Safe_Last_Value;
7037 function Scope_Depth (Id : E) return Uint is
7042 while Is_Record_Type (Scop) loop
7043 Scop := Scope (Scop);
7046 return Scope_Depth_Value (Scop);
7049 ---------------------
7050 -- Scope_Depth_Set --
7051 ---------------------
7053 function Scope_Depth_Set (Id : E) return B is
7055 return not Is_Record_Type (Id)
7056 and then Field22 (Id) /= Union_Id (Empty);
7057 end Scope_Depth_Set;
7059 -----------------------------
7060 -- Set_Component_Alignment --
7061 -----------------------------
7063 -- Component Alignment is encoded using two flags, Flag128/129 as
7064 -- follows. Note that both flags False = Align_Default, so that the
7065 -- default initialization of flags to False initializes component
7066 -- alignment to the default value as required.
7068 -- Flag128 Flag129 Value
7069 -- ------- ------- -----
7070 -- False False Calign_Default
7071 -- False True Calign_Component_Size
7072 -- True False Calign_Component_Size_4
7073 -- True True Calign_Storage_Unit
7075 procedure Set_Component_Alignment (Id : E; V : C) is
7077 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7078 and then Is_Base_Type (Id));
7081 when Calign_Default =>
7082 Set_Flag128 (Id, False);
7083 Set_Flag129 (Id, False);
7085 when Calign_Component_Size =>
7086 Set_Flag128 (Id, False);
7087 Set_Flag129 (Id, True);
7089 when Calign_Component_Size_4 =>
7090 Set_Flag128 (Id, True);
7091 Set_Flag129 (Id, False);
7093 when Calign_Storage_Unit =>
7094 Set_Flag128 (Id, True);
7095 Set_Flag129 (Id, True);
7097 end Set_Component_Alignment;
7099 -----------------------------
7100 -- Set_Invariant_Procedure --
7101 -----------------------------
7103 procedure Set_Invariant_Procedure (Id : E; V : E) is
7107 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7109 S := Subprograms_For_Type (Id);
7110 Set_Subprograms_For_Type (Id, V);
7112 while Present (S) loop
7113 if Has_Invariants (S) then
7114 raise Program_Error;
7116 S := Subprograms_For_Type (S);
7120 Set_Subprograms_For_Type (Id, V);
7121 end Set_Invariant_Procedure;
7123 ----------------------------
7124 -- Set_Predicate_Function --
7125 ----------------------------
7127 procedure Set_Predicate_Function (Id : E; V : E) is
7131 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7133 S := Subprograms_For_Type (Id);
7134 Set_Subprograms_For_Type (Id, V);
7136 while Present (S) loop
7137 if Has_Predicates (S) then
7138 raise Program_Error;
7140 S := Subprograms_For_Type (S);
7144 Set_Subprograms_For_Type (Id, V);
7145 end Set_Predicate_Function;
7151 function Size_Clause (Id : E) return N is
7153 return Rep_Clause (Id, Name_Size);
7156 ------------------------
7157 -- Stream_Size_Clause --
7158 ------------------------
7160 function Stream_Size_Clause (Id : E) return N is
7162 return Rep_Clause (Id, Name_Stream_Size);
7163 end Stream_Size_Clause;
7169 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7175 Kind := E_Access_Subtype;
7179 Kind := E_Array_Subtype;
7181 when E_Class_Wide_Type |
7182 E_Class_Wide_Subtype =>
7183 Kind := E_Class_Wide_Subtype;
7185 when E_Decimal_Fixed_Point_Type |
7186 E_Decimal_Fixed_Point_Subtype =>
7187 Kind := E_Decimal_Fixed_Point_Subtype;
7189 when E_Ordinary_Fixed_Point_Type |
7190 E_Ordinary_Fixed_Point_Subtype =>
7191 Kind := E_Ordinary_Fixed_Point_Subtype;
7193 when E_Private_Type |
7194 E_Private_Subtype =>
7195 Kind := E_Private_Subtype;
7197 when E_Limited_Private_Type |
7198 E_Limited_Private_Subtype =>
7199 Kind := E_Limited_Private_Subtype;
7201 when E_Record_Type_With_Private |
7202 E_Record_Subtype_With_Private =>
7203 Kind := E_Record_Subtype_With_Private;
7205 when E_Record_Type |
7207 Kind := E_Record_Subtype;
7209 when E_String_Type |
7211 Kind := E_String_Subtype;
7213 when Enumeration_Kind =>
7214 Kind := E_Enumeration_Subtype;
7217 Kind := E_Floating_Point_Subtype;
7219 when Signed_Integer_Kind =>
7220 Kind := E_Signed_Integer_Subtype;
7222 when Modular_Integer_Kind =>
7223 Kind := E_Modular_Integer_Subtype;
7225 when Protected_Kind =>
7226 Kind := E_Protected_Subtype;
7229 Kind := E_Task_Subtype;
7233 raise Program_Error;
7239 ---------------------
7240 -- Type_High_Bound --
7241 ---------------------
7243 function Type_High_Bound (Id : E) return Node_Id is
7244 Rng : constant Node_Id := Scalar_Range (Id);
7246 if Nkind (Rng) = N_Subtype_Indication then
7247 return High_Bound (Range_Expression (Constraint (Rng)));
7249 return High_Bound (Rng);
7251 end Type_High_Bound;
7253 --------------------
7254 -- Type_Low_Bound --
7255 --------------------
7257 function Type_Low_Bound (Id : E) return Node_Id is
7258 Rng : constant Node_Id := Scalar_Range (Id);
7260 if Nkind (Rng) = N_Subtype_Indication then
7261 return Low_Bound (Range_Expression (Constraint (Rng)));
7263 return Low_Bound (Rng);
7267 ---------------------
7268 -- Underlying_Type --
7269 ---------------------
7271 function Underlying_Type (Id : E) return E is
7273 -- For record_with_private the underlying type is always the direct
7274 -- full view. Never try to take the full view of the parent it
7275 -- doesn't make sense.
7277 if Ekind (Id) = E_Record_Type_With_Private then
7278 return Full_View (Id);
7280 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7282 -- If we have an incomplete or private type with a full view,
7283 -- then we return the Underlying_Type of this full view
7285 if Present (Full_View (Id)) then
7286 if Id = Full_View (Id) then
7288 -- Previous error in declaration
7293 return Underlying_Type (Full_View (Id));
7296 -- If we have an incomplete entity that comes from the limited
7297 -- view then we return the Underlying_Type of its non-limited
7300 elsif From_With_Type (Id)
7301 and then Present (Non_Limited_View (Id))
7303 return Underlying_Type (Non_Limited_View (Id));
7305 -- Otherwise check for the case where we have a derived type or
7306 -- subtype, and if so get the Underlying_Type of the parent type.
7308 elsif Etype (Id) /= Id then
7309 return Underlying_Type (Etype (Id));
7311 -- Otherwise we have an incomplete or private type that has
7312 -- no full view, which means that we have not encountered the
7313 -- completion, so return Empty to indicate the underlying type
7314 -- is not yet known.
7320 -- For non-incomplete, non-private types, return the type itself
7321 -- Also for entities that are not types at all return the entity
7327 end Underlying_Type;
7333 function Vax_Float (Id : E) return B is
7335 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7338 ------------------------
7339 -- Write_Entity_Flags --
7340 ------------------------
7342 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7344 procedure W (Flag_Name : String; Flag : Boolean);
7345 -- Write out given flag if it is set
7351 procedure W (Flag_Name : String; Flag : Boolean) is
7355 Write_Str (Flag_Name);
7356 Write_Str (" = True");
7361 -- Start of processing for Write_Entity_Flags
7364 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7365 and then Is_Base_Type (Id)
7368 Write_Str ("Component_Alignment = ");
7370 case Component_Alignment (Id) is
7371 when Calign_Default =>
7372 Write_Str ("Calign_Default");
7374 when Calign_Component_Size =>
7375 Write_Str ("Calign_Component_Size");
7377 when Calign_Component_Size_4 =>
7378 Write_Str ("Calign_Component_Size_4");
7380 when Calign_Storage_Unit =>
7381 Write_Str ("Calign_Storage_Unit");
7387 W ("Address_Taken", Flag104 (Id));
7388 W ("Body_Needed_For_SAL", Flag40 (Id));
7389 W ("C_Pass_By_Copy", Flag125 (Id));
7390 W ("Can_Never_Be_Null", Flag38 (Id));
7391 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7392 W ("Debug_Info_Off", Flag166 (Id));
7393 W ("Default_Expressions_Processed", Flag108 (Id));
7394 W ("Delay_Cleanups", Flag114 (Id));
7395 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7396 W ("Depends_On_Private", Flag14 (Id));
7397 W ("Discard_Names", Flag88 (Id));
7398 W ("Elaboration_Entity_Required", Flag174 (Id));
7399 W ("Elaborate_Body_Desirable", Flag210 (Id));
7400 W ("Entry_Accepted", Flag152 (Id));
7401 W ("Can_Use_Internal_Rep", Flag229 (Id));
7402 W ("Finalize_Storage_Only", Flag158 (Id));
7403 W ("From_With_Type", Flag159 (Id));
7404 W ("Has_Aliased_Components", Flag135 (Id));
7405 W ("Has_Alignment_Clause", Flag46 (Id));
7406 W ("Has_All_Calls_Remote", Flag79 (Id));
7407 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7408 W ("Has_Atomic_Components", Flag86 (Id));
7409 W ("Has_Biased_Representation", Flag139 (Id));
7410 W ("Has_Completion", Flag26 (Id));
7411 W ("Has_Completion_In_Body", Flag71 (Id));
7412 W ("Has_Complex_Representation", Flag140 (Id));
7413 W ("Has_Component_Size_Clause", Flag68 (Id));
7414 W ("Has_Contiguous_Rep", Flag181 (Id));
7415 W ("Has_Controlled_Component", Flag43 (Id));
7416 W ("Has_Controlling_Result", Flag98 (Id));
7417 W ("Has_Convention_Pragma", Flag119 (Id));
7418 W ("Has_Default_Aspect", Flag39 (Id));
7419 W ("Has_Delayed_Aspects", Flag200 (Id));
7420 W ("Has_Delayed_Freeze", Flag18 (Id));
7421 W ("Has_Discriminants", Flag5 (Id));
7422 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7423 W ("Has_Exit", Flag47 (Id));
7424 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7425 W ("Has_Forward_Instantiation", Flag175 (Id));
7426 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7427 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7428 W ("Has_Homonym", Flag56 (Id));
7429 W ("Has_Implicit_Dereference", Flag251 (Id));
7430 W ("Has_Inheritable_Invariants", Flag248 (Id));
7431 W ("Has_Initial_Value", Flag219 (Id));
7432 W ("Has_Invariants", Flag232 (Id));
7433 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7434 W ("Has_Master_Entity", Flag21 (Id));
7435 W ("Has_Missing_Return", Flag142 (Id));
7436 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7437 W ("Has_Non_Standard_Rep", Flag75 (Id));
7438 W ("Has_Object_Size_Clause", Flag172 (Id));
7439 W ("Has_Per_Object_Constraint", Flag154 (Id));
7440 W ("Has_Persistent_BSS", Flag188 (Id));
7441 W ("Has_Postconditions", Flag240 (Id));
7442 W ("Has_Pragma_Controlled", Flag27 (Id));
7443 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7444 W ("Has_Pragma_Inline", Flag157 (Id));
7445 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7446 W ("Has_Pragma_Ordered", Flag198 (Id));
7447 W ("Has_Pragma_Pack", Flag121 (Id));
7448 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7449 W ("Has_Pragma_Pure", Flag203 (Id));
7450 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7451 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7452 W ("Has_Pragma_Unmodified", Flag233 (Id));
7453 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7454 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7455 W ("Has_Predicates", Flag250 (Id));
7456 W ("Has_Primitive_Operations", Flag120 (Id));
7457 W ("Has_Private_Ancestor", Flag151 (Id));
7458 W ("Has_Private_Declaration", Flag155 (Id));
7459 W ("Has_Qualified_Name", Flag161 (Id));
7460 W ("Has_RACW", Flag214 (Id));
7461 W ("Has_Record_Rep_Clause", Flag65 (Id));
7462 W ("Has_Recursive_Call", Flag143 (Id));
7463 W ("Has_Size_Clause", Flag29 (Id));
7464 W ("Has_Small_Clause", Flag67 (Id));
7465 W ("Has_Specified_Layout", Flag100 (Id));
7466 W ("Has_Specified_Stream_Input", Flag190 (Id));
7467 W ("Has_Specified_Stream_Output", Flag191 (Id));
7468 W ("Has_Specified_Stream_Read", Flag192 (Id));
7469 W ("Has_Specified_Stream_Write", Flag193 (Id));
7470 W ("Has_Static_Discriminants", Flag211 (Id));
7471 W ("Has_Storage_Size_Clause", Flag23 (Id));
7472 W ("Has_Stream_Size_Clause", Flag184 (Id));
7473 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7474 W ("Has_Task", Flag30 (Id));
7475 W ("Has_Thunks", Flag228 (Id));
7476 W ("Has_Unchecked_Union", Flag123 (Id));
7477 W ("Has_Unknown_Discriminants", Flag72 (Id));
7478 W ("Has_Up_Level_Access", Flag215 (Id));
7479 W ("Has_Volatile_Components", Flag87 (Id));
7480 W ("Has_Xref_Entry", Flag182 (Id));
7481 W ("In_Package_Body", Flag48 (Id));
7482 W ("In_Private_Part", Flag45 (Id));
7483 W ("In_Use", Flag8 (Id));
7484 W ("Is_AST_Entry", Flag132 (Id));
7485 W ("Is_Abstract_Subprogram", Flag19 (Id));
7486 W ("Is_Abstract_Type", Flag146 (Id));
7487 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7488 W ("Is_Access_Constant", Flag69 (Id));
7489 W ("Is_Ada_2005_Only", Flag185 (Id));
7490 W ("Is_Ada_2012_Only", Flag199 (Id));
7491 W ("Is_Aliased", Flag15 (Id));
7492 W ("Is_Asynchronous", Flag81 (Id));
7493 W ("Is_Atomic", Flag85 (Id));
7494 W ("Is_Bit_Packed_Array", Flag122 (Id));
7495 W ("Is_CPP_Class", Flag74 (Id));
7496 W ("Is_Called", Flag102 (Id));
7497 W ("Is_Character_Type", Flag63 (Id));
7498 W ("Is_Child_Unit", Flag73 (Id));
7499 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7500 W ("Is_Compilation_Unit", Flag149 (Id));
7501 W ("Is_Completely_Hidden", Flag103 (Id));
7502 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7503 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7504 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7505 W ("Is_Constrained", Flag12 (Id));
7506 W ("Is_Constructor", Flag76 (Id));
7507 W ("Is_Controlled", Flag42 (Id));
7508 W ("Is_Controlling_Formal", Flag97 (Id));
7509 W ("Is_Descendent_Of_Address", Flag223 (Id));
7510 W ("Is_Discrim_SO_Function", Flag176 (Id));
7511 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7512 W ("Is_Dispatching_Operation", Flag6 (Id));
7513 W ("Is_Eliminated", Flag124 (Id));
7514 W ("Is_Entry_Formal", Flag52 (Id));
7515 W ("Is_Exported", Flag99 (Id));
7516 W ("Is_First_Subtype", Flag70 (Id));
7517 W ("Is_For_Access_Subtype", Flag118 (Id));
7518 W ("Is_Formal_Subprogram", Flag111 (Id));
7519 W ("Is_Frozen", Flag4 (Id));
7520 W ("Is_Generic_Actual_Type", Flag94 (Id));
7521 W ("Is_Generic_Instance", Flag130 (Id));
7522 W ("Is_Generic_Type", Flag13 (Id));
7523 W ("Is_Hidden", Flag57 (Id));
7524 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7525 W ("Is_Immediately_Visible", Flag7 (Id));
7526 W ("Is_Imported", Flag24 (Id));
7527 W ("Is_Inlined", Flag11 (Id));
7528 W ("Is_Instantiated", Flag126 (Id));
7529 W ("Is_Interface", Flag186 (Id));
7530 W ("Is_Internal", Flag17 (Id));
7531 W ("Is_Interrupt_Handler", Flag89 (Id));
7532 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7533 W ("Is_Itype", Flag91 (Id));
7534 W ("Is_Known_Non_Null", Flag37 (Id));
7535 W ("Is_Known_Null", Flag204 (Id));
7536 W ("Is_Known_Valid", Flag170 (Id));
7537 W ("Is_Limited_Composite", Flag106 (Id));
7538 W ("Is_Limited_Interface", Flag197 (Id));
7539 W ("Is_Limited_Record", Flag25 (Id));
7540 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7541 W ("Is_Non_Static_Subtype", Flag109 (Id));
7542 W ("Is_Null_Init_Proc", Flag178 (Id));
7543 W ("Is_Obsolescent", Flag153 (Id));
7544 W ("Is_Only_Out_Parameter", Flag226 (Id));
7545 W ("Is_Optional_Parameter", Flag134 (Id));
7546 W ("Is_Package_Body_Entity", Flag160 (Id));
7547 W ("Is_Packed", Flag51 (Id));
7548 W ("Is_Packed_Array_Type", Flag138 (Id));
7549 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7550 W ("Is_Preelaborated", Flag59 (Id));
7551 W ("Is_Primitive", Flag218 (Id));
7552 W ("Is_Primitive_Wrapper", Flag195 (Id));
7553 W ("Is_Private_Composite", Flag107 (Id));
7554 W ("Is_Private_Descendant", Flag53 (Id));
7555 W ("Is_Private_Primitive", Flag245 (Id));
7556 W ("Is_Processed_Transient", Flag252 (Id));
7557 W ("Is_Public", Flag10 (Id));
7558 W ("Is_Pure", Flag44 (Id));
7559 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7560 W ("Is_RACW_Stub_Type", Flag244 (Id));
7561 W ("Is_Raised", Flag224 (Id));
7562 W ("Is_Remote_Call_Interface", Flag62 (Id));
7563 W ("Is_Remote_Types", Flag61 (Id));
7564 W ("Is_Renaming_Of_Object", Flag112 (Id));
7565 W ("Is_Return_Object", Flag209 (Id));
7566 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7567 W ("Is_Shared_Passive", Flag60 (Id));
7568 W ("Is_Statically_Allocated", Flag28 (Id));
7569 W ("Is_Tag", Flag78 (Id));
7570 W ("Is_Tagged_Type", Flag55 (Id));
7571 W ("Is_Thunk", Flag225 (Id));
7572 W ("Is_Trivial_Subprogram", Flag235 (Id));
7573 W ("Is_True_Constant", Flag163 (Id));
7574 W ("Is_Unchecked_Union", Flag117 (Id));
7575 W ("Is_Underlying_Record_View", Flag246 (Id));
7576 W ("Is_Unsigned_Type", Flag144 (Id));
7577 W ("Is_VMS_Exception", Flag133 (Id));
7578 W ("Is_Valued_Procedure", Flag127 (Id));
7579 W ("Is_Visible_Child_Unit", Flag116 (Id));
7580 W ("Is_Visible_Formal", Flag206 (Id));
7581 W ("Is_Volatile", Flag16 (Id));
7582 W ("Itype_Printed", Flag202 (Id));
7583 W ("Kill_Elaboration_Checks", Flag32 (Id));
7584 W ("Kill_Range_Checks", Flag33 (Id));
7585 W ("Kill_Tag_Checks", Flag34 (Id));
7586 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7587 W ("Low_Bound_Tested", Flag205 (Id));
7588 W ("Machine_Radix_10", Flag84 (Id));
7589 W ("Materialize_Entity", Flag168 (Id));
7590 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7591 W ("Must_Have_Preelab_Init", Flag208 (Id));
7592 W ("Needs_Debug_Info", Flag147 (Id));
7593 W ("Needs_No_Actuals", Flag22 (Id));
7594 W ("Never_Set_In_Source", Flag115 (Id));
7595 W ("No_Pool_Assigned", Flag131 (Id));
7596 W ("No_Return", Flag113 (Id));
7597 W ("No_Strict_Aliasing", Flag136 (Id));
7598 W ("Non_Binary_Modulus", Flag58 (Id));
7599 W ("Nonzero_Is_True", Flag162 (Id));
7600 W ("OK_To_Rename", Flag247 (Id));
7601 W ("OK_To_Reorder_Components", Flag239 (Id));
7602 W ("Optimize_Alignment_Space", Flag241 (Id));
7603 W ("Optimize_Alignment_Time", Flag242 (Id));
7604 W ("Overlays_Constant", Flag243 (Id));
7605 W ("Reachable", Flag49 (Id));
7606 W ("Referenced", Flag156 (Id));
7607 W ("Referenced_As_LHS", Flag36 (Id));
7608 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7609 W ("Renamed_In_Spec", Flag231 (Id));
7610 W ("Requires_Overriding", Flag213 (Id));
7611 W ("Return_Present", Flag54 (Id));
7612 W ("Returns_By_Ref", Flag90 (Id));
7613 W ("Reverse_Bit_Order", Flag164 (Id));
7614 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7615 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7616 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7617 W ("Static_Elaboration_Desired", Flag77 (Id));
7618 W ("Strict_Alignment", Flag145 (Id));
7619 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7620 W ("Suppress_Initialization", Flag105 (Id));
7621 W ("Suppress_Style_Checks", Flag165 (Id));
7622 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7623 W ("Treat_As_Volatile", Flag41 (Id));
7624 W ("Universal_Aliasing", Flag216 (Id));
7625 W ("Used_As_Generic_Actual", Flag222 (Id));
7626 W ("Uses_Sec_Stack", Flag95 (Id));
7627 W ("Warnings_Off", Flag96 (Id));
7628 W ("Warnings_Off_Used", Flag236 (Id));
7629 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7630 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7631 W ("Was_Hidden", Flag196 (Id));
7632 end Write_Entity_Flags;
7634 -----------------------
7635 -- Write_Entity_Info --
7636 -----------------------
7638 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7640 procedure Write_Attribute (Which : String; Nam : E);
7641 -- Write attribute value with given string name
7643 procedure Write_Kind (Id : Entity_Id);
7644 -- Write Ekind field of entity
7646 ---------------------
7647 -- Write_Attribute --
7648 ---------------------
7650 procedure Write_Attribute (Which : String; Nam : E) is
7654 Write_Int (Int (Nam));
7656 Write_Name (Chars (Nam));
7658 end Write_Attribute;
7664 procedure Write_Kind (Id : Entity_Id) is
7665 K : constant String := Entity_Kind'Image (Ekind (Id));
7669 Write_Str (" Kind ");
7671 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7672 Write_Str ("TAGGED ");
7675 Write_Str (K (3 .. K'Length));
7678 if Is_Type (Id) and then Depends_On_Private (Id) then
7679 Write_Str ("Depends_On_Private ");
7683 -- Start of processing for Write_Entity_Info
7687 Write_Attribute ("Name ", Id);
7688 Write_Int (Int (Id));
7692 Write_Attribute (" Type ", Etype (Id));
7694 Write_Attribute (" Scope ", Scope (Id));
7699 when Discrete_Kind =>
7700 Write_Str ("Bounds: Id = ");
7702 if Present (Scalar_Range (Id)) then
7703 Write_Int (Int (Type_Low_Bound (Id)));
7704 Write_Str (" .. Id = ");
7705 Write_Int (Int (Type_High_Bound (Id)));
7707 Write_Str ("Empty");
7718 (" Component Type ", Component_Type (Id));
7721 Write_Str (" Indexes ");
7723 Index := First_Index (Id);
7724 while Present (Index) loop
7725 Write_Attribute (" ", Etype (Index));
7726 Index := Next_Index (Index);
7734 (" Directly Designated Type ",
7735 Directly_Designated_Type (Id));
7738 when Overloadable_Kind =>
7739 if Present (Homonym (Id)) then
7740 Write_Str (" Homonym ");
7741 Write_Name (Chars (Homonym (Id)));
7743 Write_Int (Int (Homonym (Id)));
7750 if Ekind (Scope (Id)) in Record_Kind then
7752 " Original_Record_Component ",
7753 Original_Record_Component (Id));
7754 Write_Int (Int (Original_Record_Component (Id)));
7758 when others => null;
7760 end Write_Entity_Info;
7762 -----------------------
7763 -- Write_Field6_Name --
7764 -----------------------
7766 procedure Write_Field6_Name (Id : Entity_Id) is
7767 pragma Warnings (Off, Id);
7769 Write_Str ("First_Rep_Item");
7770 end Write_Field6_Name;
7772 -----------------------
7773 -- Write_Field7_Name --
7774 -----------------------
7776 procedure Write_Field7_Name (Id : Entity_Id) is
7777 pragma Warnings (Off, Id);
7779 Write_Str ("Freeze_Node");
7780 end Write_Field7_Name;
7782 -----------------------
7783 -- Write_Field8_Name --
7784 -----------------------
7786 procedure Write_Field8_Name (Id : Entity_Id) is
7790 Write_Str ("Associated_Node_For_Itype");
7793 Write_Str ("Dependent_Instances");
7796 Write_Str ("First_Exit_Statement");
7799 Write_Str ("Hiding_Loop_Variable");
7803 E_Subprogram_Body =>
7804 Write_Str ("Mechanism");
7808 Write_Str ("Normalized_First_Bit");
7811 Write_Str ("Postcondition_Proc");
7813 when E_Return_Statement =>
7814 Write_Str ("Return_Applies_To");
7817 Write_Str ("Field8??");
7819 end Write_Field8_Name;
7821 -----------------------
7822 -- Write_Field9_Name --
7823 -----------------------
7825 procedure Write_Field9_Name (Id : Entity_Id) is
7829 Write_Str ("Class_Wide_Type");
7832 Write_Str ("Current_Value");
7835 E_Generic_Function |
7837 E_Generic_Procedure |
7840 Write_Str ("Renaming_Map");
7843 Write_Str ("Field9??");
7845 end Write_Field9_Name;
7847 ------------------------
7848 -- Write_Field10_Name --
7849 ------------------------
7851 procedure Write_Field10_Name (Id : Entity_Id) is
7854 when Class_Wide_Kind |
7860 Write_Str ("Direct_Primitive_Operations");
7863 Write_Str ("Float_Rep");
7865 when E_In_Parameter |
7867 Write_Str ("Discriminal_Link");
7873 Write_Str ("Handler_Records");
7877 Write_Str ("Normalized_Position_Max");
7880 Write_Str ("Field10??");
7882 end Write_Field10_Name;
7884 ------------------------
7885 -- Write_Field11_Name --
7886 ------------------------
7888 procedure Write_Field11_Name (Id : Entity_Id) is
7892 Write_Str ("Block_Node");
7896 Write_Str ("Component_Bit_Offset");
7899 Write_Str ("Entry_Component");
7901 when E_Enumeration_Literal =>
7902 Write_Str ("Enumeration_Pos");
7906 Write_Str ("Full_View");
7908 when E_Generic_Package =>
7909 Write_Str ("Generic_Homonym");
7915 Write_Str ("Protected_Body_Subprogram");
7918 Write_Str ("Field11??");
7920 end Write_Field11_Name;
7922 ------------------------
7923 -- Write_Field12_Name --
7924 ------------------------
7926 procedure Write_Field12_Name (Id : Entity_Id) is
7930 Write_Str ("Associated_Formal_Package");
7933 Write_Str ("Barrier_Function");
7935 when E_Enumeration_Literal =>
7936 Write_Str ("Enumeration_Rep");
7944 E_In_Out_Parameter |
7948 Write_Str ("Esize");
7952 Write_Str ("Next_Inlined_Subprogram");
7955 Write_Str ("Field12??");
7957 end Write_Field12_Name;
7959 ------------------------
7960 -- Write_Field13_Name --
7961 ------------------------
7963 procedure Write_Field13_Name (Id : Entity_Id) is
7968 Write_Str ("Component_Clause");
7971 if not Comes_From_Source (Id)
7973 Chars (Id) = Name_Op_Ne
7975 Write_Str ("Corresponding_Equality");
7977 elsif Comes_From_Source (Id) then
7978 Write_Str ("Elaboration_Entity");
7981 Write_Str ("Field13??");
7986 Generic_Unit_Kind =>
7987 Write_Str ("Elaboration_Entity");
7991 Write_Str ("Extra_Accessibility");
7994 Write_Str ("RM_Size");
7997 Write_Str ("Field13??");
7999 end Write_Field13_Name;
8001 -----------------------
8002 -- Write_Field14_Name --
8003 -----------------------
8005 procedure Write_Field14_Name (Id : Entity_Id) is
8014 Write_Str ("Alignment");
8018 Write_Str ("First_Optional_Parameter");
8022 Write_Str ("Normalized_Position");
8025 E_Generic_Package =>
8026 Write_Str ("Shadow_Entities");
8029 Write_Str ("Field14??");
8031 end Write_Field14_Name;
8033 ------------------------
8034 -- Write_Field15_Name --
8035 ------------------------
8037 procedure Write_Field15_Name (Id : Entity_Id) is
8040 when E_Discriminant =>
8041 Write_Str ("Discriminant_Number");
8044 Write_Str ("DT_Entry_Count");
8048 Write_Str ("DT_Position");
8050 when E_Protected_Type =>
8051 Write_Str ("Entry_Bodies_Array");
8054 Write_Str ("Entry_Parameters_Type");
8057 Write_Str ("Extra_Formal");
8059 when Enumeration_Kind =>
8060 Write_Str ("Lit_Indexes");
8064 Write_Str ("Related_Instance");
8068 Write_Str ("Return_Flag_Or_Transient_Decl");
8070 when Decimal_Fixed_Point_Kind =>
8071 Write_Str ("Scale_Value");
8075 Write_Str ("Storage_Size_Variable");
8077 when E_String_Literal_Subtype =>
8078 Write_Str ("String_Literal_Low_Bound");
8081 Write_Str ("Field15??");
8083 end Write_Field15_Name;
8085 ------------------------
8086 -- Write_Field16_Name --
8087 ------------------------
8089 procedure Write_Field16_Name (Id : Entity_Id) is
8092 when E_Record_Type |
8093 E_Record_Type_With_Private =>
8094 Write_Str ("Access_Disp_Table");
8096 when E_Record_Subtype |
8097 E_Class_Wide_Subtype =>
8098 Write_Str ("Cloned_Subtype");
8102 Write_Str ("DTC_Entity");
8105 Write_Str ("Entry_Formal");
8110 Write_Str ("First_Private_Entity");
8112 when Enumeration_Kind =>
8113 Write_Str ("Lit_Strings");
8115 when E_String_Literal_Subtype =>
8116 Write_Str ("String_Literal_Length");
8120 Write_Str ("Unset_Reference");
8123 Write_Str ("Field16??");
8125 end Write_Field16_Name;
8127 ------------------------
8128 -- Write_Field17_Name --
8129 ------------------------
8131 procedure Write_Field17_Name (Id : Entity_Id) is
8136 E_Generic_In_Out_Parameter |
8138 Write_Str ("Actual_Subtype");
8141 Write_Str ("Digits_Value");
8143 when E_Discriminant =>
8144 Write_Str ("Discriminal");
8153 E_Generic_Function |
8155 E_Generic_Procedure |
8163 E_Return_Statement |
8165 E_Subprogram_Type =>
8166 Write_Str ("First_Entity");
8169 Write_Str ("First_Index");
8171 when Enumeration_Kind =>
8172 Write_Str ("First_Literal");
8175 Write_Str ("Master_Id");
8177 when Modular_Integer_Kind =>
8178 Write_Str ("Modulus");
8180 when E_Incomplete_Type =>
8181 Write_Str ("Non_Limited_View");
8183 when E_Incomplete_Subtype =>
8184 if From_With_Type (Id) then
8185 Write_Str ("Non_Limited_View");
8189 Write_Str ("Prival");
8192 Write_Str ("Field17??");
8194 end Write_Field17_Name;
8196 ------------------------
8197 -- Write_Field18_Name --
8198 ------------------------
8200 procedure Write_Field18_Name (Id : Entity_Id) is
8203 when E_Enumeration_Literal |
8207 Write_Str ("Alias");
8209 when E_Record_Type =>
8210 Write_Str ("Corresponding_Concurrent_Type");
8212 when E_Subprogram_Body =>
8213 Write_Str ("Corresponding_Protected_Entry");
8215 when Concurrent_Kind =>
8216 Write_Str ("Corresponding_Record_Type");
8221 Write_Str ("Enclosing_Scope");
8223 when E_Entry_Index_Parameter =>
8224 Write_Str ("Entry_Index_Constant");
8226 when E_Class_Wide_Subtype |
8227 E_Access_Protected_Subprogram_Type |
8228 E_Anonymous_Access_Protected_Subprogram_Type |
8229 E_Access_Subprogram_Type |
8231 Write_Str ("Equivalent_Type");
8233 when Fixed_Point_Kind =>
8234 Write_Str ("Delta_Value");
8236 when Incomplete_Or_Private_Kind |
8238 Write_Str ("Private_Dependents");
8241 Write_Str ("Renamed_Object");
8245 E_Generic_Function |
8246 E_Generic_Procedure |
8247 E_Generic_Package =>
8248 Write_Str ("Renamed_Entity");
8251 Write_Str ("Field18??");
8253 end Write_Field18_Name;
8255 -----------------------
8256 -- Write_Field19_Name --
8257 -----------------------
8259 procedure Write_Field19_Name (Id : Entity_Id) is
8263 E_Generic_Package =>
8264 Write_Str ("Body_Entity");
8266 when E_Discriminant =>
8267 Write_Str ("Corresponding_Discriminant");
8269 when E_Record_Type =>
8270 Write_Str ("Parent_Subtype");
8274 Write_Str ("Related_Array_Object");
8278 Write_Str ("Size_Check_Code");
8280 when E_Package_Body |
8282 Write_Str ("Spec_Entity");
8284 when Private_Kind =>
8285 Write_Str ("Underlying_Full_View");
8288 Write_Str ("Field19??");
8290 end Write_Field19_Name;
8292 -----------------------
8293 -- Write_Field20_Name --
8294 -----------------------
8296 procedure Write_Field20_Name (Id : Entity_Id) is
8300 Write_Str ("Component_Type");
8302 when E_In_Parameter |
8303 E_Generic_In_Parameter =>
8304 Write_Str ("Default_Value");
8307 Write_Str ("Directly_Designated_Type");
8310 Write_Str ("Discriminant_Checking_Func");
8312 when E_Discriminant =>
8313 Write_Str ("Discriminant_Default_Value");
8322 E_Generic_Function |
8324 E_Generic_Procedure |
8332 E_Return_Statement |
8334 E_Subprogram_Type =>
8335 Write_Str ("Last_Entity");
8339 Write_Str ("Prival_Link");
8342 Write_Str ("Scalar_Range");
8345 Write_Str ("Register_Exception_Call");
8348 Write_Str ("Field20??");
8350 end Write_Field20_Name;
8352 -----------------------
8353 -- Write_Field21_Name --
8354 -----------------------
8356 procedure Write_Field21_Name (Id : Entity_Id) is
8360 Write_Str ("Accept_Address");
8362 when E_In_Parameter =>
8363 Write_Str ("Default_Expr_Function");
8365 when Concurrent_Kind |
8366 Incomplete_Or_Private_Kind |
8370 Write_Str ("Discriminant_Constraint");
8375 E_Generic_Function |
8377 E_Generic_Procedure |
8379 Write_Str ("Interface_Name");
8382 Modular_Integer_Kind =>
8383 Write_Str ("Original_Array_Type");
8385 when Fixed_Point_Kind =>
8386 Write_Str ("Small_Value");
8389 Write_Str ("Field21??");
8391 end Write_Field21_Name;
8393 -----------------------
8394 -- Write_Field22_Name --
8395 -----------------------
8397 procedure Write_Field22_Name (Id : Entity_Id) is
8401 Write_Str ("Associated_Storage_Pool");
8404 Write_Str ("Component_Size");
8406 when E_Record_Type =>
8407 Write_Str ("Corresponding_Remote_Type");
8411 Write_Str ("Original_Record_Component");
8413 when E_Enumeration_Literal =>
8414 Write_Str ("Enumeration_Rep_Expr");
8417 Write_Str ("Exception_Code");
8419 when E_Record_Type_With_Private |
8420 E_Record_Subtype_With_Private |
8423 E_Limited_Private_Type |
8424 E_Limited_Private_Subtype =>
8425 Write_Str ("Private_View");
8428 Write_Str ("Protected_Formal");
8438 E_Generic_Function |
8439 E_Generic_Procedure |
8442 E_Return_Statement |
8445 Write_Str ("Scope_Depth_Value");
8448 Write_Str ("Shared_Var_Procs_Instance");
8451 Write_Str ("Field22??");
8453 end Write_Field22_Name;
8455 ------------------------
8456 -- Write_Field23_Name --
8457 ------------------------
8459 procedure Write_Field23_Name (Id : Entity_Id) is
8463 Write_Str ("Associated_Collection");
8465 when E_Discriminant =>
8466 Write_Str ("CR_Discriminant");
8469 Write_Str ("Entry_Cancel_Parameter");
8471 when E_Enumeration_Type =>
8472 Write_Str ("Enum_Pos_To_Rep");
8476 Write_Str ("Extra_Constrained");
8478 when E_Generic_Function |
8480 E_Generic_Procedure =>
8481 Write_Str ("Inner_Instances");
8484 Write_Str ("Packed_Array_Type");
8487 Write_Str ("Protection_Object");
8489 when Concurrent_Kind |
8490 Incomplete_Or_Private_Kind |
8494 Write_Str ("Stored_Constraint");
8498 if Present (Scope (Id))
8499 and then Is_Protected_Type (Scope (Id))
8501 Write_Str ("Protection_Object");
8503 Write_Str ("Generic_Renamings");
8507 if Is_Generic_Instance (Id) then
8508 Write_Str ("Generic_Renamings");
8510 Write_Str ("Limited_View");
8514 Write_Str ("Field23??");
8516 end Write_Field23_Name;
8518 ------------------------
8519 -- Write_Field24_Name --
8520 ------------------------
8522 procedure Write_Field24_Name (Id : Entity_Id) is
8527 Write_Str ("Finalizer");
8532 Write_Str ("Related_Expression");
8537 Generic_Subprogram_Kind =>
8538 Write_Str ("Contract");
8541 Write_Str ("Field24???");
8543 end Write_Field24_Name;
8545 ------------------------
8546 -- Write_Field25_Name --
8547 ------------------------
8549 procedure Write_Field25_Name (Id : Entity_Id) is
8553 Write_Str ("Debug_Renaming_Link");
8556 Write_Str ("DT_Offset_To_Top_Func");
8560 Write_Str ("Interface_Alias");
8562 when E_Record_Type |
8564 E_Record_Type_With_Private |
8565 E_Record_Subtype_With_Private =>
8566 Write_Str ("Interfaces");
8569 Write_Str ("Task_Body_Procedure");
8573 Write_Str ("PPC_Wrapper");
8575 when E_Enumeration_Subtype |
8576 E_Modular_Integer_Subtype |
8577 E_Signed_Integer_Subtype =>
8578 Write_Str ("Static_Predicate");
8581 Write_Str ("Field25??");
8583 end Write_Field25_Name;
8585 ------------------------
8586 -- Write_Field26_Name --
8587 ------------------------
8589 procedure Write_Field26_Name (Id : Entity_Id) is
8592 when E_Record_Type |
8593 E_Record_Type_With_Private =>
8594 Write_Str ("Dispatch_Table_Wrappers");
8596 when E_In_Out_Parameter |
8599 Write_Str ("Last_Assignment");
8601 when E_Access_Subprogram_Type =>
8602 Write_Str ("Original_Access_Type");
8604 when E_Generic_Package |
8606 Write_Str ("Package_Instantiation");
8610 Write_Str ("Related_Type");
8613 Write_Str ("Relative_Deadline_Variable");
8617 if Ekind (Id) = E_Procedure
8618 and then not Is_Dispatching_Operation (Id)
8620 Write_Str ("Static_Initialization");
8622 Write_Str ("Overridden_Operation");
8626 Write_Str ("Field26??");
8628 end Write_Field26_Name;
8630 ------------------------
8631 -- Write_Field27_Name --
8632 ------------------------
8634 procedure Write_Field27_Name (Id : Entity_Id) is
8639 Write_Str ("Current_Use_Clause");
8644 Write_Str ("Related_Type");
8647 Write_Str ("Wrapped_Entity");
8650 Write_Str ("Field27??");
8652 end Write_Field27_Name;
8654 ------------------------
8655 -- Write_Field28_Name --
8656 ------------------------
8658 procedure Write_Field28_Name (Id : Entity_Id) is
8664 Write_Str ("Extra_Formals");
8666 when E_Record_Type =>
8667 Write_Str ("Underlying_Record_View");
8670 Write_Str ("Field28??");
8672 end Write_Field28_Name;
8674 procedure Write_Field29_Name (Id : Entity_Id) is
8678 Write_Str ("Subprograms_For_Type");
8681 Write_Str ("Field29??");
8683 end Write_Field29_Name;
8685 -------------------------
8686 -- Iterator Procedures --
8687 -------------------------
8689 procedure Proc_Next_Component (N : in out Node_Id) is
8691 N := Next_Component (N);
8692 end Proc_Next_Component;
8694 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8696 N := Next_Entity (N);
8697 while Present (N) loop
8698 exit when Ekind_In (N, E_Component, E_Discriminant);
8699 N := Next_Entity (N);
8701 end Proc_Next_Component_Or_Discriminant;
8703 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8705 N := Next_Discriminant (N);
8706 end Proc_Next_Discriminant;
8708 procedure Proc_Next_Formal (N : in out Node_Id) is
8710 N := Next_Formal (N);
8711 end Proc_Next_Formal;
8713 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8715 N := Next_Formal_With_Extras (N);
8716 end Proc_Next_Formal_With_Extras;
8718 procedure Proc_Next_Index (N : in out Node_Id) is
8720 N := Next_Index (N);
8721 end Proc_Next_Index;
8723 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8725 N := Next_Inlined_Subprogram (N);
8726 end Proc_Next_Inlined_Subprogram;
8728 procedure Proc_Next_Literal (N : in out Node_Id) is
8730 N := Next_Literal (N);
8731 end Proc_Next_Literal;
8733 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8735 N := Next_Stored_Discriminant (N);
8736 end Proc_Next_Stored_Discriminant;