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
524 -- Is_Postcondition_Proc Flag253
528 -----------------------
529 -- Local subprograms --
530 -----------------------
532 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
533 -- Returns the attribute definition clause for Id whose name is Rep_Name.
534 -- Returns Empty if no matching attribute definition clause found for Id.
540 function Float_Rep (Id : E) return F is
541 pragma Assert (Is_Floating_Point_Type (Id));
543 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
550 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
554 Ritem := First_Rep_Item (Id);
555 while Present (Ritem) loop
556 if Nkind (Ritem) = N_Attribute_Definition_Clause
557 and then Chars (Ritem) = Rep_Name
561 Next_Rep_Item (Ritem);
568 --------------------------------
569 -- Attribute Access Functions --
570 --------------------------------
572 function Accept_Address (Id : E) return L is
577 function Access_Disp_Table (Id : E) return L is
579 pragma Assert (Ekind_In (Id, E_Record_Type,
581 return Elist16 (Implementation_Base_Type (Id));
582 end Access_Disp_Table;
584 function Actual_Subtype (Id : E) return E is
587 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
588 or else Is_Formal (Id));
592 function Address_Taken (Id : E) return B is
597 function Alias (Id : E) return E is
600 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
604 function Alignment (Id : E) return U is
606 pragma Assert (Is_Type (Id)
607 or else Is_Formal (Id)
608 or else Ekind_In (Id, E_Loop_Parameter,
615 function Associated_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_Postcondition_Proc (Id : E) return B is
1992 pragma Assert (Ekind (Id) = E_Procedure);
1993 return Flag253 (Id);
1994 end Is_Postcondition_Proc;
1996 function Is_Potentially_Use_Visible (Id : E) return B is
1998 pragma Assert (Nkind (Id) in N_Entity);
2000 end Is_Potentially_Use_Visible;
2002 function Is_Preelaborated (Id : E) return B is
2005 end Is_Preelaborated;
2007 function Is_Primitive (Id : E) return B is
2010 (Is_Overloadable (Id)
2011 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2012 return Flag218 (Id);
2015 function Is_Primitive_Wrapper (Id : E) return B is
2017 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2018 return Flag195 (Id);
2019 end Is_Primitive_Wrapper;
2021 function Is_Private_Composite (Id : E) return B is
2023 pragma Assert (Is_Type (Id));
2024 return Flag107 (Id);
2025 end Is_Private_Composite;
2027 function Is_Private_Descendant (Id : E) return B is
2030 end Is_Private_Descendant;
2032 function Is_Private_Primitive (Id : E) return B is
2034 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2035 return Flag245 (Id);
2036 end Is_Private_Primitive;
2038 function Is_Processed_Transient (Id : E) return B is
2040 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2041 return Flag252 (Id);
2042 end Is_Processed_Transient;
2044 function Is_Public (Id : E) return B is
2046 pragma Assert (Nkind (Id) in N_Entity);
2050 function Is_Pure (Id : E) return B is
2055 function Is_Pure_Unit_Access_Type (Id : E) return B is
2057 pragma Assert (Is_Access_Type (Id));
2058 return Flag189 (Id);
2059 end Is_Pure_Unit_Access_Type;
2061 function Is_RACW_Stub_Type (Id : E) return B is
2063 pragma Assert (Is_Type (Id));
2064 return Flag244 (Id);
2065 end Is_RACW_Stub_Type;
2067 function Is_Raised (Id : E) return B is
2069 pragma Assert (Ekind (Id) = E_Exception);
2070 return Flag224 (Id);
2073 function Is_Remote_Call_Interface (Id : E) return B is
2076 end Is_Remote_Call_Interface;
2078 function Is_Remote_Types (Id : E) return B is
2081 end Is_Remote_Types;
2083 function Is_Renaming_Of_Object (Id : E) return B is
2085 return Flag112 (Id);
2086 end Is_Renaming_Of_Object;
2088 function Is_Return_Object (Id : E) return B is
2090 return Flag209 (Id);
2091 end Is_Return_Object;
2093 function Is_Safe_To_Reevaluate (Id : E) return B is
2095 return Flag249 (Id);
2096 end Is_Safe_To_Reevaluate;
2098 function Is_Shared_Passive (Id : E) return B is
2101 end Is_Shared_Passive;
2103 function Is_Statically_Allocated (Id : E) return B is
2106 end Is_Statically_Allocated;
2108 function Is_Tag (Id : E) return B is
2110 pragma Assert (Nkind (Id) in N_Entity);
2114 function Is_Tagged_Type (Id : E) return B is
2119 function Is_Thunk (Id : E) return B is
2121 pragma Assert (Is_Subprogram (Id));
2122 return Flag225 (Id);
2125 function Is_Trivial_Subprogram (Id : E) return B is
2127 return Flag235 (Id);
2128 end Is_Trivial_Subprogram;
2130 function Is_True_Constant (Id : E) return B is
2132 return Flag163 (Id);
2133 end Is_True_Constant;
2135 function Is_Unchecked_Union (Id : E) return B is
2137 return Flag117 (Implementation_Base_Type (Id));
2138 end Is_Unchecked_Union;
2140 function Is_Underlying_Record_View (Id : E) return B is
2142 return Flag246 (Id);
2143 end Is_Underlying_Record_View;
2145 function Is_Unsigned_Type (Id : E) return B is
2147 pragma Assert (Is_Type (Id));
2148 return Flag144 (Id);
2149 end Is_Unsigned_Type;
2151 function Is_Valued_Procedure (Id : E) return B is
2153 pragma Assert (Ekind (Id) = E_Procedure);
2154 return Flag127 (Id);
2155 end Is_Valued_Procedure;
2157 function Is_Visible_Child_Unit (Id : E) return B is
2159 pragma Assert (Is_Child_Unit (Id));
2160 return Flag116 (Id);
2161 end Is_Visible_Child_Unit;
2163 function Is_Visible_Formal (Id : E) return B is
2165 return Flag206 (Id);
2166 end Is_Visible_Formal;
2168 function Is_VMS_Exception (Id : E) return B is
2170 return Flag133 (Id);
2171 end Is_VMS_Exception;
2173 function Is_Volatile (Id : E) return B is
2175 pragma Assert (Nkind (Id) in N_Entity);
2177 if Is_Type (Id) then
2178 return Flag16 (Base_Type (Id));
2184 function Itype_Printed (Id : E) return B is
2186 pragma Assert (Is_Itype (Id));
2187 return Flag202 (Id);
2190 function Kill_Elaboration_Checks (Id : E) return B is
2193 end Kill_Elaboration_Checks;
2195 function Kill_Range_Checks (Id : E) return B is
2198 end Kill_Range_Checks;
2200 function Kill_Tag_Checks (Id : E) return B is
2203 end Kill_Tag_Checks;
2205 function Known_To_Have_Preelab_Init (Id : E) return B is
2207 pragma Assert (Is_Type (Id));
2208 return Flag207 (Id);
2209 end Known_To_Have_Preelab_Init;
2211 function Last_Assignment (Id : E) return N is
2213 pragma Assert (Is_Assignable (Id));
2215 end Last_Assignment;
2217 function Last_Entity (Id : E) return E is
2222 function Limited_View (Id : E) return E is
2224 pragma Assert (Ekind (Id) = E_Package);
2228 function Lit_Indexes (Id : E) return E is
2230 pragma Assert (Is_Enumeration_Type (Id));
2234 function Lit_Strings (Id : E) return E is
2236 pragma Assert (Is_Enumeration_Type (Id));
2240 function Low_Bound_Tested (Id : E) return B is
2242 return Flag205 (Id);
2243 end Low_Bound_Tested;
2245 function Machine_Radix_10 (Id : E) return B is
2247 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2249 end Machine_Radix_10;
2251 function Master_Id (Id : E) return E is
2253 pragma Assert (Is_Access_Type (Id));
2257 function Materialize_Entity (Id : E) return B is
2259 return Flag168 (Id);
2260 end Materialize_Entity;
2262 function Mechanism (Id : E) return M is
2264 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2265 return UI_To_Int (Uint8 (Id));
2268 function Modulus (Id : E) return Uint is
2270 pragma Assert (Is_Modular_Integer_Type (Id));
2271 return Uint17 (Base_Type (Id));
2274 function Must_Be_On_Byte_Boundary (Id : E) return B is
2276 pragma Assert (Is_Type (Id));
2277 return Flag183 (Id);
2278 end Must_Be_On_Byte_Boundary;
2280 function Must_Have_Preelab_Init (Id : E) return B is
2282 pragma Assert (Is_Type (Id));
2283 return Flag208 (Id);
2284 end Must_Have_Preelab_Init;
2286 function Needs_Debug_Info (Id : E) return B is
2288 return Flag147 (Id);
2289 end Needs_Debug_Info;
2291 function Needs_No_Actuals (Id : E) return B is
2294 (Is_Overloadable (Id)
2295 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2297 end Needs_No_Actuals;
2299 function Never_Set_In_Source (Id : E) return B is
2301 return Flag115 (Id);
2302 end Never_Set_In_Source;
2304 function Next_Inlined_Subprogram (Id : E) return E is
2307 end Next_Inlined_Subprogram;
2309 function No_Pool_Assigned (Id : E) return B is
2311 pragma Assert (Is_Access_Type (Id));
2312 return Flag131 (Root_Type (Id));
2313 end No_Pool_Assigned;
2315 function No_Return (Id : E) return B is
2317 return Flag113 (Id);
2320 function No_Strict_Aliasing (Id : E) return B is
2322 pragma Assert (Is_Access_Type (Id));
2323 return Flag136 (Base_Type (Id));
2324 end No_Strict_Aliasing;
2326 function Non_Binary_Modulus (Id : E) return B is
2328 pragma Assert (Is_Type (Id));
2329 return Flag58 (Base_Type (Id));
2330 end Non_Binary_Modulus;
2332 function Non_Limited_View (Id : E) return E is
2334 pragma Assert (Ekind (Id) in Incomplete_Kind);
2336 end Non_Limited_View;
2338 function Nonzero_Is_True (Id : E) return B is
2340 pragma Assert (Root_Type (Id) = Standard_Boolean);
2341 return Flag162 (Base_Type (Id));
2342 end Nonzero_Is_True;
2344 function Normalized_First_Bit (Id : E) return U is
2346 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2348 end Normalized_First_Bit;
2350 function Normalized_Position (Id : E) return U is
2352 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2354 end Normalized_Position;
2356 function Normalized_Position_Max (Id : E) return U is
2358 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2360 end Normalized_Position_Max;
2362 function OK_To_Rename (Id : E) return B is
2364 pragma Assert (Ekind (Id) = E_Variable);
2365 return Flag247 (Id);
2368 function OK_To_Reorder_Components (Id : E) return B is
2370 pragma Assert (Is_Record_Type (Id));
2371 return Flag239 (Base_Type (Id));
2372 end OK_To_Reorder_Components;
2374 function Optimize_Alignment_Space (Id : E) return B is
2377 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2378 return Flag241 (Id);
2379 end Optimize_Alignment_Space;
2381 function Optimize_Alignment_Time (Id : E) return B is
2384 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2385 return Flag242 (Id);
2386 end Optimize_Alignment_Time;
2388 function Original_Access_Type (Id : E) return E is
2390 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2392 end Original_Access_Type;
2394 function Original_Array_Type (Id : E) return E is
2396 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2398 end Original_Array_Type;
2400 function Original_Record_Component (Id : E) return E is
2402 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2404 end Original_Record_Component;
2406 function Overlays_Constant (Id : E) return B is
2408 return Flag243 (Id);
2409 end Overlays_Constant;
2411 function Overridden_Operation (Id : E) return E is
2414 end Overridden_Operation;
2416 function Package_Instantiation (Id : E) return N is
2418 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2420 end Package_Instantiation;
2422 function Packed_Array_Type (Id : E) return E is
2424 pragma Assert (Is_Array_Type (Id));
2426 end Packed_Array_Type;
2428 function Parent_Subtype (Id : E) return E is
2430 pragma Assert (Is_Record_Type (Id));
2431 return Node19 (Base_Type (Id));
2434 function Postcondition_Proc (Id : E) return E is
2436 pragma Assert (Ekind (Id) = E_Procedure);
2438 end Postcondition_Proc;
2440 function PPC_Wrapper (Id : E) return E is
2442 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2446 function Prival (Id : E) return E is
2448 pragma Assert (Is_Protected_Component (Id));
2452 function Prival_Link (Id : E) return E is
2454 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2458 function Private_Dependents (Id : E) return L is
2460 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2461 return Elist18 (Id);
2462 end Private_Dependents;
2464 function Private_View (Id : E) return N is
2466 pragma Assert (Is_Private_Type (Id));
2470 function Protected_Body_Subprogram (Id : E) return E is
2472 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2474 end Protected_Body_Subprogram;
2476 function Protected_Formal (Id : E) return E is
2478 pragma Assert (Is_Formal (Id));
2480 end Protected_Formal;
2482 function Protection_Object (Id : E) return E is
2485 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2487 end Protection_Object;
2489 function Reachable (Id : E) return B is
2494 function Referenced (Id : E) return B is
2496 return Flag156 (Id);
2499 function Referenced_As_LHS (Id : E) return B is
2502 end Referenced_As_LHS;
2504 function Referenced_As_Out_Parameter (Id : E) return B is
2506 return Flag227 (Id);
2507 end Referenced_As_Out_Parameter;
2509 function Register_Exception_Call (Id : E) return N is
2511 pragma Assert (Ekind (Id) = E_Exception);
2513 end Register_Exception_Call;
2515 function Related_Array_Object (Id : E) return E is
2517 pragma Assert (Is_Array_Type (Id));
2519 end Related_Array_Object;
2521 function Related_Expression (Id : E) return N is
2523 pragma Assert (Ekind (Id) in Type_Kind
2524 or else Ekind_In (Id, E_Constant, E_Variable));
2526 end Related_Expression;
2528 function Related_Instance (Id : E) return E is
2530 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2532 end Related_Instance;
2534 function Related_Type (Id : E) return E is
2536 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2540 function Relative_Deadline_Variable (Id : E) return E is
2542 pragma Assert (Is_Task_Type (Id));
2543 return Node26 (Implementation_Base_Type (Id));
2544 end Relative_Deadline_Variable;
2546 function Renamed_Entity (Id : E) return N is
2551 function Renamed_In_Spec (Id : E) return B is
2553 pragma Assert (Ekind (Id) = E_Package);
2554 return Flag231 (Id);
2555 end Renamed_In_Spec;
2557 function Renamed_Object (Id : E) return N is
2562 function Renaming_Map (Id : E) return U is
2567 function Requires_Overriding (Id : E) return B is
2569 pragma Assert (Is_Overloadable (Id));
2570 return Flag213 (Id);
2571 end Requires_Overriding;
2573 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2575 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2577 end Return_Flag_Or_Transient_Decl;
2579 function Return_Present (Id : E) return B is
2584 function Return_Applies_To (Id : E) return N is
2587 end Return_Applies_To;
2589 function Returns_By_Ref (Id : E) return B is
2594 function Reverse_Bit_Order (Id : E) return B is
2596 pragma Assert (Is_Record_Type (Id));
2597 return Flag164 (Base_Type (Id));
2598 end Reverse_Bit_Order;
2600 function RM_Size (Id : E) return U is
2602 pragma Assert (Is_Type (Id));
2606 function Scalar_Range (Id : E) return N is
2611 function Scale_Value (Id : E) return U is
2616 function Scope_Depth_Value (Id : E) return U is
2619 end Scope_Depth_Value;
2621 function Sec_Stack_Needed_For_Return (Id : E) return B is
2623 return Flag167 (Id);
2624 end Sec_Stack_Needed_For_Return;
2626 function Shadow_Entities (Id : E) return S is
2628 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2630 end Shadow_Entities;
2632 function Shared_Var_Procs_Instance (Id : E) return E is
2634 pragma Assert (Ekind (Id) = E_Variable);
2636 end Shared_Var_Procs_Instance;
2638 function Size_Check_Code (Id : E) return N is
2640 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2642 end Size_Check_Code;
2644 function Size_Depends_On_Discriminant (Id : E) return B is
2646 return Flag177 (Id);
2647 end Size_Depends_On_Discriminant;
2649 function Size_Known_At_Compile_Time (Id : E) return B is
2652 end Size_Known_At_Compile_Time;
2654 function Small_Value (Id : E) return R is
2656 pragma Assert (Is_Fixed_Point_Type (Id));
2657 return Ureal21 (Id);
2660 function Spec_Entity (Id : E) return E is
2662 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2666 function Static_Predicate (Id : E) return S is
2668 pragma Assert (Is_Discrete_Type (Id));
2670 end Static_Predicate;
2672 function Storage_Size_Variable (Id : E) return E is
2674 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2675 return Node15 (Implementation_Base_Type (Id));
2676 end Storage_Size_Variable;
2678 function Static_Elaboration_Desired (Id : E) return B is
2680 pragma Assert (Ekind (Id) = E_Package);
2682 end Static_Elaboration_Desired;
2684 function Static_Initialization (Id : E) return N is
2687 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2689 end Static_Initialization;
2691 function Stored_Constraint (Id : E) return L is
2694 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2695 return Elist23 (Id);
2696 end Stored_Constraint;
2698 function Strict_Alignment (Id : E) return B is
2700 return Flag145 (Implementation_Base_Type (Id));
2701 end Strict_Alignment;
2703 function String_Literal_Length (Id : E) return U is
2706 end String_Literal_Length;
2708 function String_Literal_Low_Bound (Id : E) return N is
2711 end String_Literal_Low_Bound;
2713 function Subprograms_For_Type (Id : E) return E is
2715 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2717 end Subprograms_For_Type;
2719 function Suppress_Elaboration_Warnings (Id : E) return B is
2721 return Flag148 (Id);
2722 end Suppress_Elaboration_Warnings;
2724 function Suppress_Initialization (Id : E) return B is
2726 pragma Assert (Is_Type (Id));
2727 return Flag105 (Id);
2728 end Suppress_Initialization;
2730 function Suppress_Style_Checks (Id : E) return B is
2732 return Flag165 (Id);
2733 end Suppress_Style_Checks;
2735 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2737 return Flag217 (Id);
2738 end Suppress_Value_Tracking_On_Call;
2740 function Task_Body_Procedure (Id : E) return N is
2742 pragma Assert (Ekind (Id) in Task_Kind);
2744 end Task_Body_Procedure;
2746 function Treat_As_Volatile (Id : E) return B is
2749 end Treat_As_Volatile;
2751 function Underlying_Full_View (Id : E) return E is
2753 pragma Assert (Ekind (Id) in Private_Kind);
2755 end Underlying_Full_View;
2757 function Underlying_Record_View (Id : E) return E is
2760 end Underlying_Record_View;
2762 function Universal_Aliasing (Id : E) return B is
2764 pragma Assert (Is_Type (Id));
2765 return Flag216 (Base_Type (Id));
2766 end Universal_Aliasing;
2768 function Unset_Reference (Id : E) return N is
2771 end Unset_Reference;
2773 function Used_As_Generic_Actual (Id : E) return B is
2775 return Flag222 (Id);
2776 end Used_As_Generic_Actual;
2778 function Uses_Sec_Stack (Id : E) return B is
2783 function Warnings_Off (Id : E) return B is
2788 function Warnings_Off_Used (Id : E) return B is
2790 return Flag236 (Id);
2791 end Warnings_Off_Used;
2793 function Warnings_Off_Used_Unmodified (Id : E) return B is
2795 return Flag237 (Id);
2796 end Warnings_Off_Used_Unmodified;
2798 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2800 return Flag238 (Id);
2801 end Warnings_Off_Used_Unreferenced;
2803 function Wrapped_Entity (Id : E) return E is
2805 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2806 and then Is_Primitive_Wrapper (Id));
2810 function Was_Hidden (Id : E) return B is
2812 return Flag196 (Id);
2815 ------------------------------
2816 -- Classification Functions --
2817 ------------------------------
2819 function Is_Access_Type (Id : E) return B is
2821 return Ekind (Id) in Access_Kind;
2824 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2826 return Ekind (Id) in Access_Protected_Kind;
2827 end Is_Access_Protected_Subprogram_Type;
2829 function Is_Access_Subprogram_Type (Id : E) return B is
2831 return Ekind (Id) in Access_Subprogram_Kind;
2832 end Is_Access_Subprogram_Type;
2834 function Is_Aggregate_Type (Id : E) return B is
2836 return Ekind (Id) in Aggregate_Kind;
2837 end Is_Aggregate_Type;
2839 function Is_Array_Type (Id : E) return B is
2841 return Ekind (Id) in Array_Kind;
2844 function Is_Assignable (Id : E) return B is
2846 return Ekind (Id) in Assignable_Kind;
2849 function Is_Class_Wide_Type (Id : E) return B is
2851 return Ekind (Id) in Class_Wide_Kind;
2852 end Is_Class_Wide_Type;
2854 function Is_Composite_Type (Id : E) return B is
2856 return Ekind (Id) in Composite_Kind;
2857 end Is_Composite_Type;
2859 function Is_Concurrent_Body (Id : E) return B is
2861 return Ekind (Id) in
2862 Concurrent_Body_Kind;
2863 end Is_Concurrent_Body;
2865 function Is_Concurrent_Record_Type (Id : E) return B is
2868 end Is_Concurrent_Record_Type;
2870 function Is_Concurrent_Type (Id : E) return B is
2872 return Ekind (Id) in Concurrent_Kind;
2873 end Is_Concurrent_Type;
2875 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2877 return Ekind (Id) in
2878 Decimal_Fixed_Point_Kind;
2879 end Is_Decimal_Fixed_Point_Type;
2881 function Is_Digits_Type (Id : E) return B is
2883 return Ekind (Id) in Digits_Kind;
2886 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2888 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2889 end Is_Discrete_Or_Fixed_Point_Type;
2891 function Is_Discrete_Type (Id : E) return B is
2893 return Ekind (Id) in Discrete_Kind;
2894 end Is_Discrete_Type;
2896 function Is_Elementary_Type (Id : E) return B is
2898 return Ekind (Id) in Elementary_Kind;
2899 end Is_Elementary_Type;
2901 function Is_Entry (Id : E) return B is
2903 return Ekind (Id) in Entry_Kind;
2906 function Is_Enumeration_Type (Id : E) return B is
2908 return Ekind (Id) in
2910 end Is_Enumeration_Type;
2912 function Is_Fixed_Point_Type (Id : E) return B is
2914 return Ekind (Id) in
2916 end Is_Fixed_Point_Type;
2918 function Is_Floating_Point_Type (Id : E) return B is
2920 return Ekind (Id) in Float_Kind;
2921 end Is_Floating_Point_Type;
2923 function Is_Formal (Id : E) return B is
2925 return Ekind (Id) in Formal_Kind;
2928 function Is_Formal_Object (Id : E) return B is
2930 return Ekind (Id) in Formal_Object_Kind;
2931 end Is_Formal_Object;
2933 function Is_Generic_Subprogram (Id : E) return B is
2935 return Ekind (Id) in Generic_Subprogram_Kind;
2936 end Is_Generic_Subprogram;
2938 function Is_Generic_Unit (Id : E) return B is
2940 return Ekind (Id) in Generic_Unit_Kind;
2941 end Is_Generic_Unit;
2943 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2945 return Ekind (Id) in
2946 Incomplete_Or_Private_Kind;
2947 end Is_Incomplete_Or_Private_Type;
2949 function Is_Incomplete_Type (Id : E) return B is
2951 return Ekind (Id) in
2953 end Is_Incomplete_Type;
2955 function Is_Integer_Type (Id : E) return B is
2957 return Ekind (Id) in Integer_Kind;
2958 end Is_Integer_Type;
2960 function Is_Modular_Integer_Type (Id : E) return B is
2962 return Ekind (Id) in
2963 Modular_Integer_Kind;
2964 end Is_Modular_Integer_Type;
2966 function Is_Named_Number (Id : E) return B is
2968 return Ekind (Id) in Named_Kind;
2969 end Is_Named_Number;
2971 function Is_Numeric_Type (Id : E) return B is
2973 return Ekind (Id) in Numeric_Kind;
2974 end Is_Numeric_Type;
2976 function Is_Object (Id : E) return B is
2978 return Ekind (Id) in Object_Kind;
2981 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2983 return Ekind (Id) in
2984 Ordinary_Fixed_Point_Kind;
2985 end Is_Ordinary_Fixed_Point_Type;
2987 function Is_Overloadable (Id : E) return B is
2989 return Ekind (Id) in Overloadable_Kind;
2990 end Is_Overloadable;
2992 function Is_Private_Type (Id : E) return B is
2994 return Ekind (Id) in Private_Kind;
2995 end Is_Private_Type;
2997 function Is_Protected_Type (Id : E) return B is
2999 return Ekind (Id) in Protected_Kind;
3000 end Is_Protected_Type;
3002 function Is_Real_Type (Id : E) return B is
3004 return Ekind (Id) in Real_Kind;
3007 function Is_Record_Type (Id : E) return B is
3009 return Ekind (Id) in Record_Kind;
3012 function Is_Scalar_Type (Id : E) return B is
3014 return Ekind (Id) in Scalar_Kind;
3017 function Is_Signed_Integer_Type (Id : E) return B is
3019 return Ekind (Id) in Signed_Integer_Kind;
3020 end Is_Signed_Integer_Type;
3022 function Is_Subprogram (Id : E) return B is
3024 return Ekind (Id) in Subprogram_Kind;
3027 function Is_Task_Type (Id : E) return B is
3029 return Ekind (Id) in Task_Kind;
3032 function Is_Type (Id : E) return B is
3034 return Ekind (Id) in Type_Kind;
3037 ------------------------------
3038 -- Attribute Set Procedures --
3039 ------------------------------
3041 -- Note: in many of these set procedures an "obvious" assertion is missing.
3042 -- The reason for this is that in many cases, a field is set before the
3043 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3044 -- it is possible to add assertions that specifically include the E_Void
3045 -- possibility, but in some cases, we just omit the assertions.
3047 procedure Set_Accept_Address (Id : E; V : L) is
3049 Set_Elist21 (Id, V);
3050 end Set_Accept_Address;
3052 procedure Set_Access_Disp_Table (Id : E; V : L) is
3054 pragma Assert (Ekind (Id) = E_Record_Type
3055 and then Id = Implementation_Base_Type (Id));
3056 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3057 Set_Elist16 (Id, V);
3058 end Set_Access_Disp_Table;
3060 procedure Set_Associated_Collection (Id : E; V : E) is
3062 pragma Assert (Is_Access_Type (Id));
3064 end Set_Associated_Collection;
3066 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3069 end Set_Associated_Formal_Package;
3071 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3074 end Set_Associated_Node_For_Itype;
3076 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3078 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3080 end Set_Associated_Storage_Pool;
3082 procedure Set_Actual_Subtype (Id : E; V : E) is
3085 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3086 or else Is_Formal (Id));
3088 end Set_Actual_Subtype;
3090 procedure Set_Address_Taken (Id : E; V : B := True) is
3092 Set_Flag104 (Id, V);
3093 end Set_Address_Taken;
3095 procedure Set_Alias (Id : E; V : E) is
3098 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3102 procedure Set_Alignment (Id : E; V : U) is
3104 pragma Assert (Is_Type (Id)
3105 or else Is_Formal (Id)
3106 or else Ekind_In (Id, E_Loop_Parameter,
3113 procedure Set_Barrier_Function (Id : E; V : N) is
3115 pragma Assert (Is_Entry (Id));
3117 end Set_Barrier_Function;
3119 procedure Set_Block_Node (Id : E; V : N) is
3121 pragma Assert (Ekind (Id) = E_Block);
3125 procedure Set_Body_Entity (Id : E; V : E) is
3127 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3129 end Set_Body_Entity;
3131 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3134 (Ekind (Id) = E_Package
3135 or else Is_Subprogram (Id)
3136 or else Is_Generic_Unit (Id));
3138 end Set_Body_Needed_For_SAL;
3140 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3142 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3143 Set_Flag125 (Id, V);
3144 end Set_C_Pass_By_Copy;
3146 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3149 end Set_Can_Never_Be_Null;
3151 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3154 end Set_Checks_May_Be_Suppressed;
3156 procedure Set_Class_Wide_Type (Id : E; V : E) is
3158 pragma Assert (Is_Type (Id));
3160 end Set_Class_Wide_Type;
3162 procedure Set_Cloned_Subtype (Id : E; V : E) is
3164 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3166 end Set_Cloned_Subtype;
3168 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3170 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3172 end Set_Component_Bit_Offset;
3174 procedure Set_Component_Clause (Id : E; V : N) is
3176 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3178 end Set_Component_Clause;
3180 procedure Set_Component_Size (Id : E; V : U) is
3182 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3184 end Set_Component_Size;
3186 procedure Set_Component_Type (Id : E; V : E) is
3188 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3190 end Set_Component_Type;
3192 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3195 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3197 end Set_Corresponding_Concurrent_Type;
3199 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3201 pragma Assert (Ekind (Id) = E_Discriminant);
3203 end Set_Corresponding_Discriminant;
3205 procedure Set_Corresponding_Equality (Id : E; V : E) is
3208 (Ekind (Id) = E_Function
3209 and then not Comes_From_Source (Id)
3210 and then Chars (Id) = Name_Op_Ne);
3212 end Set_Corresponding_Equality;
3214 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3216 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3218 end Set_Corresponding_Protected_Entry;
3220 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3222 pragma Assert (Is_Concurrent_Type (Id));
3224 end Set_Corresponding_Record_Type;
3226 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3229 end Set_Corresponding_Remote_Type;
3231 procedure Set_Current_Use_Clause (Id : E; V : E) is
3233 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3235 end Set_Current_Use_Clause;
3237 procedure Set_Current_Value (Id : E; V : N) is
3239 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3241 end Set_Current_Value;
3243 procedure Set_CR_Discriminant (Id : E; V : E) is
3246 end Set_CR_Discriminant;
3248 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3250 Set_Flag166 (Id, V);
3251 end Set_Debug_Info_Off;
3253 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3256 end Set_Debug_Renaming_Link;
3258 procedure Set_Default_Expr_Function (Id : E; V : E) is
3260 pragma Assert (Is_Formal (Id));
3262 end Set_Default_Expr_Function;
3264 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3266 Set_Flag108 (Id, V);
3267 end Set_Default_Expressions_Processed;
3269 procedure Set_Default_Value (Id : E; V : N) is
3271 pragma Assert (Is_Formal (Id));
3273 end Set_Default_Value;
3275 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3279 or else Is_Task_Type (Id)
3280 or else Ekind (Id) = E_Block);
3281 Set_Flag114 (Id, V);
3282 end Set_Delay_Cleanups;
3284 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3287 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3290 end Set_Delay_Subprogram_Descriptors;
3292 procedure Set_Delta_Value (Id : E; V : R) is
3294 pragma Assert (Is_Fixed_Point_Type (Id));
3295 Set_Ureal18 (Id, V);
3296 end Set_Delta_Value;
3298 procedure Set_Dependent_Instances (Id : E; V : L) is
3300 pragma Assert (Is_Generic_Instance (Id));
3302 end Set_Dependent_Instances;
3304 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3306 pragma Assert (Nkind (Id) in N_Entity);
3308 end Set_Depends_On_Private;
3310 procedure Set_Digits_Value (Id : E; V : U) is
3313 (Is_Floating_Point_Type (Id)
3314 or else Is_Decimal_Fixed_Point_Type (Id));
3316 end Set_Digits_Value;
3318 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3321 end Set_Directly_Designated_Type;
3323 procedure Set_Discard_Names (Id : E; V : B := True) is
3326 end Set_Discard_Names;
3328 procedure Set_Discriminal (Id : E; V : E) is
3330 pragma Assert (Ekind (Id) = E_Discriminant);
3332 end Set_Discriminal;
3334 procedure Set_Discriminal_Link (Id : E; V : E) is
3337 end Set_Discriminal_Link;
3339 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3341 pragma Assert (Ekind (Id) = E_Component);
3343 end Set_Discriminant_Checking_Func;
3345 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3347 pragma Assert (Nkind (Id) in N_Entity);
3348 Set_Elist21 (Id, V);
3349 end Set_Discriminant_Constraint;
3351 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3354 end Set_Discriminant_Default_Value;
3356 procedure Set_Discriminant_Number (Id : E; V : U) is
3359 end Set_Discriminant_Number;
3361 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3363 pragma Assert (Ekind (Id) = E_Record_Type
3364 and then Id = Implementation_Base_Type (Id));
3365 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3366 Set_Elist26 (Id, V);
3367 end Set_Dispatch_Table_Wrappers;
3369 procedure Set_DT_Entry_Count (Id : E; V : U) is
3371 pragma Assert (Ekind (Id) = E_Component);
3373 end Set_DT_Entry_Count;
3375 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3377 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3379 end Set_DT_Offset_To_Top_Func;
3381 procedure Set_DT_Position (Id : E; V : U) is
3383 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3385 end Set_DT_Position;
3387 procedure Set_DTC_Entity (Id : E; V : E) is
3389 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3393 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3395 pragma Assert (Ekind (Id) = E_Package);
3396 Set_Flag210 (Id, V);
3397 end Set_Elaborate_Body_Desirable;
3399 procedure Set_Elaboration_Entity (Id : E; V : E) is
3404 Ekind (Id) = E_Package
3406 Is_Generic_Unit (Id));
3408 end Set_Elaboration_Entity;
3410 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3415 Ekind (Id) = E_Package
3417 Is_Generic_Unit (Id));
3418 Set_Flag174 (Id, V);
3419 end Set_Elaboration_Entity_Required;
3421 procedure Set_Enclosing_Scope (Id : E; V : E) is
3424 end Set_Enclosing_Scope;
3426 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3428 pragma Assert (Is_Entry (Id));
3429 Set_Flag152 (Id, V);
3430 end Set_Entry_Accepted;
3432 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3435 end Set_Entry_Bodies_Array;
3437 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3440 end Set_Entry_Cancel_Parameter;
3442 procedure Set_Entry_Component (Id : E; V : E) is
3445 end Set_Entry_Component;
3447 procedure Set_Entry_Formal (Id : E; V : E) is
3450 end Set_Entry_Formal;
3452 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3454 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3456 end Set_Entry_Index_Constant;
3458 procedure Set_Contract (Id : E; V : N) is
3461 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3462 or else Is_Subprogram (Id)
3463 or else Is_Generic_Subprogram (Id));
3467 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3470 end Set_Entry_Parameters_Type;
3472 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3474 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3476 end Set_Enum_Pos_To_Rep;
3478 procedure Set_Enumeration_Pos (Id : E; V : U) is
3480 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3482 end Set_Enumeration_Pos;
3484 procedure Set_Enumeration_Rep (Id : E; V : U) is
3486 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3488 end Set_Enumeration_Rep;
3490 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3492 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3494 end Set_Enumeration_Rep_Expr;
3496 procedure Set_Equivalent_Type (Id : E; V : E) is
3499 (Ekind_In (Id, E_Class_Wide_Type,
3500 E_Class_Wide_Subtype,
3501 E_Access_Protected_Subprogram_Type,
3502 E_Anonymous_Access_Protected_Subprogram_Type,
3503 E_Access_Subprogram_Type,
3506 end Set_Equivalent_Type;
3508 procedure Set_Esize (Id : E; V : U) is
3513 procedure Set_Exception_Code (Id : E; V : U) is
3515 pragma Assert (Ekind (Id) = E_Exception);
3517 end Set_Exception_Code;
3519 procedure Set_Extra_Accessibility (Id : E; V : E) is
3521 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3523 end Set_Extra_Accessibility;
3525 procedure Set_Extra_Constrained (Id : E; V : E) is
3527 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3529 end Set_Extra_Constrained;
3531 procedure Set_Extra_Formal (Id : E; V : E) is
3534 end Set_Extra_Formal;
3536 procedure Set_Extra_Formals (Id : E; V : E) is
3539 (Is_Overloadable (Id)
3540 or else Ekind_In (Id, E_Entry_Family,
3542 E_Subprogram_Type));
3544 end Set_Extra_Formals;
3546 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3549 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3550 Set_Flag229 (Id, V);
3551 end Set_Can_Use_Internal_Rep;
3553 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3555 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3556 Set_Flag158 (Id, V);
3557 end Set_Finalize_Storage_Only;
3559 procedure Set_Finalizer (Id : E; V : E) is
3562 (Ekind (Id) = E_Package
3563 or else Ekind (Id) = E_Package_Body);
3567 procedure Set_First_Entity (Id : E; V : E) is
3570 end Set_First_Entity;
3572 procedure Set_First_Exit_Statement (Id : E; V : N) is
3574 pragma Assert (Ekind (Id) = E_Loop);
3576 end Set_First_Exit_Statement;
3578 procedure Set_First_Index (Id : E; V : N) is
3580 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3582 end Set_First_Index;
3584 procedure Set_First_Literal (Id : E; V : E) is
3586 pragma Assert (Is_Enumeration_Type (Id));
3588 end Set_First_Literal;
3590 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3592 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3594 end Set_First_Optional_Parameter;
3596 procedure Set_First_Private_Entity (Id : E; V : E) is
3598 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3599 or else Ekind (Id) in Concurrent_Kind);
3601 end Set_First_Private_Entity;
3603 procedure Set_First_Rep_Item (Id : E; V : N) is
3606 end Set_First_Rep_Item;
3608 procedure Set_Float_Rep (Id : E; V : F) is
3609 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3611 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3614 procedure Set_Freeze_Node (Id : E; V : N) is
3617 end Set_Freeze_Node;
3619 procedure Set_From_With_Type (Id : E; V : B := True) is
3623 or else Ekind (Id) = E_Package);
3624 Set_Flag159 (Id, V);
3625 end Set_From_With_Type;
3627 procedure Set_Full_View (Id : E; V : E) is
3629 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3633 procedure Set_Generic_Homonym (Id : E; V : E) is
3636 end Set_Generic_Homonym;
3638 procedure Set_Generic_Renamings (Id : E; V : L) is
3640 Set_Elist23 (Id, V);
3641 end Set_Generic_Renamings;
3643 procedure Set_Handler_Records (Id : E; V : S) is
3646 end Set_Handler_Records;
3648 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3650 pragma Assert (Id = Base_Type (Id));
3651 Set_Flag135 (Id, V);
3652 end Set_Has_Aliased_Components;
3654 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3657 end Set_Has_Alignment_Clause;
3659 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3662 end Set_Has_All_Calls_Remote;
3664 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3666 Set_Flag201 (Id, V);
3667 end Set_Has_Anon_Block_Suffix;
3669 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3671 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3673 end Set_Has_Atomic_Components;
3675 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3678 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3679 Set_Flag139 (Id, V);
3680 end Set_Has_Biased_Representation;
3682 procedure Set_Has_Completion (Id : E; V : B := True) is
3685 end Set_Has_Completion;
3687 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3689 pragma Assert (Is_Type (Id));
3691 end Set_Has_Completion_In_Body;
3693 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3695 pragma Assert (Ekind (Id) = E_Record_Type);
3696 Set_Flag140 (Id, V);
3697 end Set_Has_Complex_Representation;
3699 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3701 pragma Assert (Ekind (Id) = E_Array_Type);
3703 end Set_Has_Component_Size_Clause;
3705 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3707 pragma Assert (Is_Type (Id));
3708 Set_Flag187 (Id, V);
3709 end Set_Has_Constrained_Partial_View;
3711 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3713 Set_Flag181 (Id, V);
3714 end Set_Has_Contiguous_Rep;
3716 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3718 pragma Assert (Id = Base_Type (Id));
3720 end Set_Has_Controlled_Component;
3722 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3725 end Set_Has_Controlling_Result;
3727 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3729 Set_Flag119 (Id, V);
3730 end Set_Has_Convention_Pragma;
3732 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3735 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3736 and then Is_Base_Type (Id));
3738 end Set_Has_Default_Aspect;
3740 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3742 pragma Assert (Nkind (Id) in N_Entity);
3743 Set_Flag200 (Id, V);
3744 end Set_Has_Delayed_Aspects;
3746 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3748 pragma Assert (Nkind (Id) in N_Entity);
3750 end Set_Has_Delayed_Freeze;
3752 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3754 pragma Assert (Nkind (Id) in N_Entity);
3756 end Set_Has_Discriminants;
3758 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3760 pragma Assert (Ekind (Id) = E_Record_Type
3761 and then Is_Tagged_Type (Id));
3762 Set_Flag220 (Id, V);
3763 end Set_Has_Dispatch_Table;
3765 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3767 pragma Assert (Is_Enumeration_Type (Id));
3769 end Set_Has_Enumeration_Rep_Clause;
3771 procedure Set_Has_Exit (Id : E; V : B := True) is
3776 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3778 pragma Assert (Is_Tagged_Type (Id));
3779 Set_Flag110 (Id, V);
3780 end Set_Has_External_Tag_Rep_Clause;
3782 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3784 Set_Flag175 (Id, V);
3785 end Set_Has_Forward_Instantiation;
3787 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3789 Set_Flag173 (Id, V);
3790 end Set_Has_Fully_Qualified_Name;
3792 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3795 end Set_Has_Gigi_Rep_Item;
3797 procedure Set_Has_Homonym (Id : E; V : B := True) is
3800 end Set_Has_Homonym;
3802 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
3804 Set_Flag251 (Id, V);
3805 end Set_Has_Implicit_Dereference;
3807 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3809 pragma Assert (Is_Type (Id));
3810 Set_Flag248 (Id, V);
3811 end Set_Has_Inheritable_Invariants;
3813 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3815 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3816 Set_Flag219 (Id, V);
3817 end Set_Has_Initial_Value;
3819 procedure Set_Has_Invariants (Id : E; V : B := True) is
3821 pragma Assert (Is_Type (Id)
3822 or else Ekind (Id) = E_Procedure
3823 or else Ekind (Id) = E_Void);
3824 Set_Flag232 (Id, V);
3825 end Set_Has_Invariants;
3827 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3829 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3831 end Set_Has_Machine_Radix_Clause;
3833 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3836 end Set_Has_Master_Entity;
3838 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3840 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3841 Set_Flag142 (Id, V);
3842 end Set_Has_Missing_Return;
3844 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3846 Set_Flag101 (Id, V);
3847 end Set_Has_Nested_Block_With_Handler;
3849 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3851 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3852 Set_Flag215 (Id, V);
3853 end Set_Has_Up_Level_Access;
3855 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3857 pragma Assert (Id = Base_Type (Id));
3859 end Set_Has_Non_Standard_Rep;
3861 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3863 pragma Assert (Is_Type (Id));
3864 Set_Flag172 (Id, V);
3865 end Set_Has_Object_Size_Clause;
3867 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3869 Set_Flag154 (Id, V);
3870 end Set_Has_Per_Object_Constraint;
3872 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3874 Set_Flag188 (Id, V);
3875 end Set_Has_Persistent_BSS;
3877 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3879 pragma Assert (Is_Subprogram (Id));
3880 Set_Flag240 (Id, V);
3881 end Set_Has_Postconditions;
3883 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3885 pragma Assert (Is_Access_Type (Id));
3886 Set_Flag27 (Base_Type (Id), V);
3887 end Set_Has_Pragma_Controlled;
3889 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3891 Set_Flag150 (Id, V);
3892 end Set_Has_Pragma_Elaborate_Body;
3894 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3896 Set_Flag157 (Id, V);
3897 end Set_Has_Pragma_Inline;
3899 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3901 Set_Flag230 (Id, V);
3902 end Set_Has_Pragma_Inline_Always;
3904 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3906 pragma Assert (Is_Enumeration_Type (Id));
3907 pragma Assert (Id = Base_Type (Id));
3908 Set_Flag198 (Id, V);
3909 end Set_Has_Pragma_Ordered;
3911 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3913 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3914 pragma Assert (Id = Base_Type (Id));
3915 Set_Flag121 (Id, V);
3916 end Set_Has_Pragma_Pack;
3918 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3920 Set_Flag221 (Id, V);
3921 end Set_Has_Pragma_Preelab_Init;
3923 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3925 Set_Flag203 (Id, V);
3926 end Set_Has_Pragma_Pure;
3928 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3930 Set_Flag179 (Id, V);
3931 end Set_Has_Pragma_Pure_Function;
3933 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3935 Set_Flag169 (Id, V);
3936 end Set_Has_Pragma_Thread_Local_Storage;
3938 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3940 Set_Flag233 (Id, V);
3941 end Set_Has_Pragma_Unmodified;
3943 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3945 Set_Flag180 (Id, V);
3946 end Set_Has_Pragma_Unreferenced;
3948 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3950 pragma Assert (Is_Type (Id));
3951 Set_Flag212 (Id, V);
3952 end Set_Has_Pragma_Unreferenced_Objects;
3954 procedure Set_Has_Predicates (Id : E; V : B := True) is
3956 Set_Flag250 (Id, V);
3957 end Set_Has_Predicates;
3959 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3961 pragma Assert (Id = Base_Type (Id));
3962 Set_Flag120 (Id, V);
3963 end Set_Has_Primitive_Operations;
3965 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
3967 pragma Assert (Is_Type (Id));
3968 Set_Flag151 (Id, V);
3969 end Set_Has_Private_Ancestor;
3971 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3973 Set_Flag155 (Id, V);
3974 end Set_Has_Private_Declaration;
3976 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3978 Set_Flag161 (Id, V);
3979 end Set_Has_Qualified_Name;
3981 procedure Set_Has_RACW (Id : E; V : B := True) is
3983 pragma Assert (Ekind (Id) = E_Package);
3984 Set_Flag214 (Id, V);
3987 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3989 pragma Assert (Id = Base_Type (Id));
3991 end Set_Has_Record_Rep_Clause;
3993 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3995 pragma Assert (Is_Subprogram (Id));
3996 Set_Flag143 (Id, V);
3997 end Set_Has_Recursive_Call;
3999 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4002 end Set_Has_Size_Clause;
4004 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4007 end Set_Has_Small_Clause;
4009 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4011 pragma Assert (Id = Base_Type (Id));
4012 Set_Flag100 (Id, V);
4013 end Set_Has_Specified_Layout;
4015 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4017 pragma Assert (Is_Type (Id));
4018 Set_Flag190 (Id, V);
4019 end Set_Has_Specified_Stream_Input;
4021 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4023 pragma Assert (Is_Type (Id));
4024 Set_Flag191 (Id, V);
4025 end Set_Has_Specified_Stream_Output;
4027 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4029 pragma Assert (Is_Type (Id));
4030 Set_Flag192 (Id, V);
4031 end Set_Has_Specified_Stream_Read;
4033 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4035 pragma Assert (Is_Type (Id));
4036 Set_Flag193 (Id, V);
4037 end Set_Has_Specified_Stream_Write;
4039 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4041 Set_Flag211 (Id, V);
4042 end Set_Has_Static_Discriminants;
4044 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4046 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4047 pragma Assert (Id = Base_Type (Id));
4049 end Set_Has_Storage_Size_Clause;
4051 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4053 pragma Assert (Is_Elementary_Type (Id));
4054 Set_Flag184 (Id, V);
4055 end Set_Has_Stream_Size_Clause;
4057 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4060 end Set_Has_Subprogram_Descriptor;
4062 procedure Set_Has_Task (Id : E; V : B := True) is
4064 pragma Assert (Id = Base_Type (Id));
4068 procedure Set_Has_Thunks (Id : E; V : B := True) is
4070 pragma Assert (Is_Tag (Id));
4071 Set_Flag228 (Id, V);
4074 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4076 pragma Assert (Id = Base_Type (Id));
4077 Set_Flag123 (Id, V);
4078 end Set_Has_Unchecked_Union;
4080 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4082 pragma Assert (Is_Type (Id));
4084 end Set_Has_Unknown_Discriminants;
4086 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4088 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4090 end Set_Has_Volatile_Components;
4092 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4094 Set_Flag182 (Id, V);
4095 end Set_Has_Xref_Entry;
4097 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4099 pragma Assert (Ekind (Id) = E_Variable);
4101 end Set_Hiding_Loop_Variable;
4103 procedure Set_Homonym (Id : E; V : E) is
4105 pragma Assert (Id /= V);
4109 procedure Set_Interface_Alias (Id : E; V : E) is
4113 and then Is_Hidden (Id)
4114 and then (Ekind_In (Id, E_Procedure, E_Function)));
4116 end Set_Interface_Alias;
4118 procedure Set_Interfaces (Id : E; V : L) is
4120 pragma Assert (Is_Record_Type (Id));
4121 Set_Elist25 (Id, V);
4124 procedure Set_In_Package_Body (Id : E; V : B := True) is
4127 end Set_In_Package_Body;
4129 procedure Set_In_Private_Part (Id : E; V : B := True) is
4132 end Set_In_Private_Part;
4134 procedure Set_In_Use (Id : E; V : B := True) is
4136 pragma Assert (Nkind (Id) in N_Entity);
4140 procedure Set_Inner_Instances (Id : E; V : L) is
4142 Set_Elist23 (Id, V);
4143 end Set_Inner_Instances;
4145 procedure Set_Interface_Name (Id : E; V : N) is
4148 end Set_Interface_Name;
4150 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4152 pragma Assert (Is_Overloadable (Id));
4154 end Set_Is_Abstract_Subprogram;
4156 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4158 pragma Assert (Is_Type (Id));
4159 Set_Flag146 (Id, V);
4160 end Set_Is_Abstract_Type;
4162 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4164 pragma Assert (Is_Access_Type (Id));
4165 Set_Flag194 (Id, V);
4166 end Set_Is_Local_Anonymous_Access;
4168 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4170 pragma Assert (Is_Access_Type (Id));
4172 end Set_Is_Access_Constant;
4174 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4176 Set_Flag185 (Id, V);
4177 end Set_Is_Ada_2005_Only;
4179 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4181 Set_Flag199 (Id, V);
4182 end Set_Is_Ada_2012_Only;
4184 procedure Set_Is_Aliased (Id : E; V : B := True) is
4186 pragma Assert (Nkind (Id) in N_Entity);
4190 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4192 pragma Assert (Is_Entry (Id));
4193 Set_Flag132 (Id, V);
4194 end Set_Is_AST_Entry;
4196 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4199 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4201 end Set_Is_Asynchronous;
4203 procedure Set_Is_Atomic (Id : E; V : B := True) is
4208 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4210 pragma Assert ((not V)
4211 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4212 Set_Flag122 (Id, V);
4213 end Set_Is_Bit_Packed_Array;
4215 procedure Set_Is_Called (Id : E; V : B := True) is
4217 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4218 Set_Flag102 (Id, V);
4221 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4224 end Set_Is_Character_Type;
4226 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4229 end Set_Is_Child_Unit;
4231 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4234 end Set_Is_Class_Wide_Equivalent_Type;
4236 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4238 Set_Flag149 (Id, V);
4239 end Set_Is_Compilation_Unit;
4241 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4243 pragma Assert (Ekind (Id) = E_Discriminant);
4244 Set_Flag103 (Id, V);
4245 end Set_Is_Completely_Hidden;
4247 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4250 end Set_Is_Concurrent_Record_Type;
4252 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4255 end Set_Is_Constr_Subt_For_U_Nominal;
4257 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4259 Set_Flag141 (Id, V);
4260 end Set_Is_Constr_Subt_For_UN_Aliased;
4262 procedure Set_Is_Constrained (Id : E; V : B := True) is
4264 pragma Assert (Nkind (Id) in N_Entity);
4266 end Set_Is_Constrained;
4268 procedure Set_Is_Constructor (Id : E; V : B := True) is
4271 end Set_Is_Constructor;
4273 procedure Set_Is_Controlled (Id : E; V : B := True) is
4275 pragma Assert (Id = Base_Type (Id));
4277 end Set_Is_Controlled;
4279 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4281 pragma Assert (Is_Formal (Id));
4283 end Set_Is_Controlling_Formal;
4285 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4288 end Set_Is_CPP_Class;
4290 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4292 pragma Assert (Is_Type (Id));
4293 Set_Flag223 (Id, V);
4294 end Set_Is_Descendent_Of_Address;
4296 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4298 Set_Flag176 (Id, V);
4299 end Set_Is_Discrim_SO_Function;
4301 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4303 Set_Flag234 (Id, V);
4304 end Set_Is_Dispatch_Table_Entity;
4306 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4311 Is_Overloadable (Id)
4313 Ekind (Id) = E_Subprogram_Type);
4316 end Set_Is_Dispatching_Operation;
4318 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4320 Set_Flag124 (Id, V);
4321 end Set_Is_Eliminated;
4323 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4326 end Set_Is_Entry_Formal;
4328 procedure Set_Is_Exported (Id : E; V : B := True) is
4331 end Set_Is_Exported;
4333 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4336 end Set_Is_First_Subtype;
4338 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4340 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4341 Set_Flag118 (Id, V);
4342 end Set_Is_For_Access_Subtype;
4344 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4346 Set_Flag111 (Id, V);
4347 end Set_Is_Formal_Subprogram;
4349 procedure Set_Is_Frozen (Id : E; V : B := True) is
4351 pragma Assert (Nkind (Id) in N_Entity);
4355 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4357 pragma Assert (Is_Type (Id));
4359 end Set_Is_Generic_Actual_Type;
4361 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4363 Set_Flag130 (Id, V);
4364 end Set_Is_Generic_Instance;
4366 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4368 pragma Assert (Nkind (Id) in N_Entity);
4370 end Set_Is_Generic_Type;
4372 procedure Set_Is_Hidden (Id : E; V : B := True) is
4377 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4379 Set_Flag171 (Id, V);
4380 end Set_Is_Hidden_Open_Scope;
4382 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4384 pragma Assert (Nkind (Id) in N_Entity);
4386 end Set_Is_Immediately_Visible;
4388 procedure Set_Is_Imported (Id : E; V : B := True) is
4391 end Set_Is_Imported;
4393 procedure Set_Is_Inlined (Id : E; V : B := True) is
4398 procedure Set_Is_Interface (Id : E; V : B := True) is
4400 pragma Assert (Is_Record_Type (Id));
4401 Set_Flag186 (Id, V);
4402 end Set_Is_Interface;
4404 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4406 Set_Flag126 (Id, V);
4407 end Set_Is_Instantiated;
4409 procedure Set_Is_Internal (Id : E; V : B := True) is
4411 pragma Assert (Nkind (Id) in N_Entity);
4413 end Set_Is_Internal;
4415 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4417 pragma Assert (Nkind (Id) in N_Entity);
4419 end Set_Is_Interrupt_Handler;
4421 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4424 end Set_Is_Intrinsic_Subprogram;
4426 procedure Set_Is_Itype (Id : E; V : B := True) is
4431 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4434 end Set_Is_Known_Non_Null;
4436 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4438 Set_Flag204 (Id, V);
4439 end Set_Is_Known_Null;
4441 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4443 Set_Flag170 (Id, V);
4444 end Set_Is_Known_Valid;
4446 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4448 pragma Assert (Is_Type (Id));
4449 Set_Flag106 (Id, V);
4450 end Set_Is_Limited_Composite;
4452 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4454 pragma Assert (Is_Interface (Id));
4455 Set_Flag197 (Id, V);
4456 end Set_Is_Limited_Interface;
4458 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4461 end Set_Is_Limited_Record;
4463 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4465 pragma Assert (Is_Subprogram (Id));
4466 Set_Flag137 (Id, V);
4467 end Set_Is_Machine_Code_Subprogram;
4469 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4471 pragma Assert (Is_Type (Id));
4472 Set_Flag109 (Id, V);
4473 end Set_Is_Non_Static_Subtype;
4475 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4477 pragma Assert (Ekind (Id) = E_Procedure);
4478 Set_Flag178 (Id, V);
4479 end Set_Is_Null_Init_Proc;
4481 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4483 Set_Flag153 (Id, V);
4484 end Set_Is_Obsolescent;
4486 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4488 pragma Assert (Ekind (Id) = E_Out_Parameter);
4489 Set_Flag226 (Id, V);
4490 end Set_Is_Only_Out_Parameter;
4492 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4494 pragma Assert (Is_Formal (Id));
4495 Set_Flag134 (Id, V);
4496 end Set_Is_Optional_Parameter;
4498 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4500 Set_Flag160 (Id, V);
4501 end Set_Is_Package_Body_Entity;
4503 procedure Set_Is_Packed (Id : E; V : B := True) is
4505 pragma Assert (Id = Base_Type (Id));
4509 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4511 Set_Flag138 (Id, V);
4512 end Set_Is_Packed_Array_Type;
4514 procedure Set_Is_Postcondition_Proc (Id : E; V : B := True) is
4516 pragma Assert (Ekind (Id) = E_Procedure);
4517 Set_Flag253 (Id, V);
4518 end Set_Is_Postcondition_Proc;
4520 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4522 pragma Assert (Nkind (Id) in N_Entity);
4524 end Set_Is_Potentially_Use_Visible;
4526 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4529 end Set_Is_Preelaborated;
4531 procedure Set_Is_Primitive (Id : E; V : B := True) is
4534 (Is_Overloadable (Id)
4535 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4536 Set_Flag218 (Id, V);
4537 end Set_Is_Primitive;
4539 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4541 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4542 Set_Flag195 (Id, V);
4543 end Set_Is_Primitive_Wrapper;
4545 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4547 pragma Assert (Is_Type (Id));
4548 Set_Flag107 (Id, V);
4549 end Set_Is_Private_Composite;
4551 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4554 end Set_Is_Private_Descendant;
4556 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4558 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4559 Set_Flag245 (Id, V);
4560 end Set_Is_Private_Primitive;
4562 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4564 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4565 Set_Flag252 (Id, V);
4566 end Set_Is_Processed_Transient;
4568 procedure Set_Is_Public (Id : E; V : B := True) is
4570 pragma Assert (Nkind (Id) in N_Entity);
4574 procedure Set_Is_Pure (Id : E; V : B := True) is
4579 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4581 pragma Assert (Is_Access_Type (Id));
4582 Set_Flag189 (Id, V);
4583 end Set_Is_Pure_Unit_Access_Type;
4585 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4587 pragma Assert (Is_Type (Id));
4588 Set_Flag244 (Id, V);
4589 end Set_Is_RACW_Stub_Type;
4591 procedure Set_Is_Raised (Id : E; V : B := True) is
4593 pragma Assert (Ekind (Id) = E_Exception);
4594 Set_Flag224 (Id, V);
4597 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4600 end Set_Is_Remote_Call_Interface;
4602 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4605 end Set_Is_Remote_Types;
4607 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4609 Set_Flag112 (Id, V);
4610 end Set_Is_Renaming_Of_Object;
4612 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4614 Set_Flag209 (Id, V);
4615 end Set_Is_Return_Object;
4617 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4619 pragma Assert (Ekind (Id) = E_Variable);
4620 Set_Flag249 (Id, V);
4621 end Set_Is_Safe_To_Reevaluate;
4623 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4626 end Set_Is_Shared_Passive;
4628 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4632 or else Ekind_In (Id, E_Exception,
4637 end Set_Is_Statically_Allocated;
4639 procedure Set_Is_Tag (Id : E; V : B := True) is
4641 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4645 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4648 end Set_Is_Tagged_Type;
4650 procedure Set_Is_Thunk (Id : E; V : B := True) is
4652 Set_Flag225 (Id, V);
4655 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4657 Set_Flag235 (Id, V);
4658 end Set_Is_Trivial_Subprogram;
4660 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4662 Set_Flag163 (Id, V);
4663 end Set_Is_True_Constant;
4665 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4667 pragma Assert (Id = Base_Type (Id));
4668 Set_Flag117 (Id, V);
4669 end Set_Is_Unchecked_Union;
4671 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4673 pragma Assert (Ekind (Id) = E_Record_Type);
4674 Set_Flag246 (Id, V);
4675 end Set_Is_Underlying_Record_View;
4677 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4679 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4680 Set_Flag144 (Id, V);
4681 end Set_Is_Unsigned_Type;
4683 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4685 pragma Assert (Ekind (Id) = E_Procedure);
4686 Set_Flag127 (Id, V);
4687 end Set_Is_Valued_Procedure;
4689 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4691 pragma Assert (Is_Child_Unit (Id));
4692 Set_Flag116 (Id, V);
4693 end Set_Is_Visible_Child_Unit;
4695 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4697 Set_Flag206 (Id, V);
4698 end Set_Is_Visible_Formal;
4700 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4702 pragma Assert (Ekind (Id) = E_Exception);
4703 Set_Flag133 (Id, V);
4704 end Set_Is_VMS_Exception;
4706 procedure Set_Is_Volatile (Id : E; V : B := True) is
4708 pragma Assert (Nkind (Id) in N_Entity);
4710 end Set_Is_Volatile;
4712 procedure Set_Itype_Printed (Id : E; V : B := True) is
4714 pragma Assert (Is_Itype (Id));
4715 Set_Flag202 (Id, V);
4716 end Set_Itype_Printed;
4718 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4721 end Set_Kill_Elaboration_Checks;
4723 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4726 end Set_Kill_Range_Checks;
4728 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4731 end Set_Kill_Tag_Checks;
4733 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4735 pragma Assert (Is_Type (Id));
4736 Set_Flag207 (Id, V);
4737 end Set_Known_To_Have_Preelab_Init;
4739 procedure Set_Last_Assignment (Id : E; V : N) is
4741 pragma Assert (Is_Assignable (Id));
4743 end Set_Last_Assignment;
4745 procedure Set_Last_Entity (Id : E; V : E) is
4748 end Set_Last_Entity;
4750 procedure Set_Limited_View (Id : E; V : E) is
4752 pragma Assert (Ekind (Id) = E_Package);
4754 end Set_Limited_View;
4756 procedure Set_Lit_Indexes (Id : E; V : E) is
4758 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4760 end Set_Lit_Indexes;
4762 procedure Set_Lit_Strings (Id : E; V : E) is
4764 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4766 end Set_Lit_Strings;
4768 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4770 pragma Assert (Is_Formal (Id));
4771 Set_Flag205 (Id, V);
4772 end Set_Low_Bound_Tested;
4774 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4776 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4778 end Set_Machine_Radix_10;
4780 procedure Set_Master_Id (Id : E; V : E) is
4782 pragma Assert (Is_Access_Type (Id));
4786 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4788 Set_Flag168 (Id, V);
4789 end Set_Materialize_Entity;
4791 procedure Set_Mechanism (Id : E; V : M) is
4793 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4794 Set_Uint8 (Id, UI_From_Int (V));
4797 procedure Set_Modulus (Id : E; V : U) is
4799 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4803 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4805 pragma Assert (Is_Type (Id));
4806 Set_Flag183 (Id, V);
4807 end Set_Must_Be_On_Byte_Boundary;
4809 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4811 pragma Assert (Is_Type (Id));
4812 Set_Flag208 (Id, V);
4813 end Set_Must_Have_Preelab_Init;
4815 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4817 Set_Flag147 (Id, V);
4818 end Set_Needs_Debug_Info;
4820 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4823 (Is_Overloadable (Id)
4824 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4826 end Set_Needs_No_Actuals;
4828 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4830 Set_Flag115 (Id, V);
4831 end Set_Never_Set_In_Source;
4833 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4836 end Set_Next_Inlined_Subprogram;
4838 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4840 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4841 Set_Flag131 (Id, V);
4842 end Set_No_Pool_Assigned;
4844 procedure Set_No_Return (Id : E; V : B := True) is
4847 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4848 Set_Flag113 (Id, V);
4851 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4853 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4854 Set_Flag136 (Id, V);
4855 end Set_No_Strict_Aliasing;
4857 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4859 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4861 end Set_Non_Binary_Modulus;
4863 procedure Set_Non_Limited_View (Id : E; V : E) is
4865 pragma Assert (Ekind (Id) in Incomplete_Kind);
4867 end Set_Non_Limited_View;
4869 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4872 (Root_Type (Id) = Standard_Boolean
4873 and then Ekind (Id) = E_Enumeration_Type);
4874 Set_Flag162 (Id, V);
4875 end Set_Nonzero_Is_True;
4877 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4879 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4881 end Set_Normalized_First_Bit;
4883 procedure Set_Normalized_Position (Id : E; V : U) is
4885 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4887 end Set_Normalized_Position;
4889 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4891 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4893 end Set_Normalized_Position_Max;
4895 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4897 pragma Assert (Ekind (Id) = E_Variable);
4898 Set_Flag247 (Id, V);
4899 end Set_OK_To_Rename;
4901 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4904 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4905 Set_Flag239 (Id, V);
4906 end Set_OK_To_Reorder_Components;
4908 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4911 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4912 Set_Flag241 (Id, V);
4913 end Set_Optimize_Alignment_Space;
4915 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4918 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4919 Set_Flag242 (Id, V);
4920 end Set_Optimize_Alignment_Time;
4922 procedure Set_Original_Access_Type (Id : E; V : E) is
4924 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4926 end Set_Original_Access_Type;
4928 procedure Set_Original_Array_Type (Id : E; V : E) is
4930 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4932 end Set_Original_Array_Type;
4934 procedure Set_Original_Record_Component (Id : E; V : E) is
4936 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4938 end Set_Original_Record_Component;
4940 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4942 Set_Flag243 (Id, V);
4943 end Set_Overlays_Constant;
4945 procedure Set_Overridden_Operation (Id : E; V : E) is
4948 end Set_Overridden_Operation;
4950 procedure Set_Package_Instantiation (Id : E; V : N) is
4952 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4954 end Set_Package_Instantiation;
4956 procedure Set_Packed_Array_Type (Id : E; V : E) is
4958 pragma Assert (Is_Array_Type (Id));
4960 end Set_Packed_Array_Type;
4962 procedure Set_Parent_Subtype (Id : E; V : E) is
4964 pragma Assert (Ekind (Id) = E_Record_Type);
4966 end Set_Parent_Subtype;
4968 procedure Set_Postcondition_Proc (Id : E; V : E) is
4970 pragma Assert (Ekind (Id) = E_Procedure);
4972 end Set_Postcondition_Proc;
4974 procedure Set_PPC_Wrapper (Id : E; V : E) is
4976 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4978 end Set_PPC_Wrapper;
4980 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4982 pragma Assert (Is_Tagged_Type (Id));
4983 Set_Elist10 (Id, V);
4984 end Set_Direct_Primitive_Operations;
4986 procedure Set_Prival (Id : E; V : E) is
4988 pragma Assert (Is_Protected_Component (Id));
4992 procedure Set_Prival_Link (Id : E; V : E) is
4994 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4996 end Set_Prival_Link;
4998 procedure Set_Private_Dependents (Id : E; V : L) is
5000 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5001 Set_Elist18 (Id, V);
5002 end Set_Private_Dependents;
5004 procedure Set_Private_View (Id : E; V : N) is
5006 pragma Assert (Is_Private_Type (Id));
5008 end Set_Private_View;
5010 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5012 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5014 end Set_Protected_Body_Subprogram;
5016 procedure Set_Protected_Formal (Id : E; V : E) is
5018 pragma Assert (Is_Formal (Id));
5020 end Set_Protected_Formal;
5022 procedure Set_Protection_Object (Id : E; V : E) is
5024 pragma Assert (Ekind_In (Id, E_Entry,
5029 end Set_Protection_Object;
5031 procedure Set_Reachable (Id : E; V : B := True) is
5036 procedure Set_Referenced (Id : E; V : B := True) is
5038 Set_Flag156 (Id, V);
5041 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5044 end Set_Referenced_As_LHS;
5046 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5048 Set_Flag227 (Id, V);
5049 end Set_Referenced_As_Out_Parameter;
5051 procedure Set_Register_Exception_Call (Id : E; V : N) is
5053 pragma Assert (Ekind (Id) = E_Exception);
5055 end Set_Register_Exception_Call;
5057 procedure Set_Related_Array_Object (Id : E; V : E) is
5059 pragma Assert (Is_Array_Type (Id));
5061 end Set_Related_Array_Object;
5063 procedure Set_Related_Expression (Id : E; V : N) is
5065 pragma Assert (Ekind (Id) in Type_Kind
5066 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5068 end Set_Related_Expression;
5070 procedure Set_Related_Instance (Id : E; V : E) is
5072 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5074 end Set_Related_Instance;
5076 procedure Set_Related_Type (Id : E; V : E) is
5078 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5080 end Set_Related_Type;
5082 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5084 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5086 end Set_Relative_Deadline_Variable;
5088 procedure Set_Renamed_Entity (Id : E; V : N) is
5091 end Set_Renamed_Entity;
5093 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5095 pragma Assert (Ekind (Id) = E_Package);
5096 Set_Flag231 (Id, V);
5097 end Set_Renamed_In_Spec;
5099 procedure Set_Renamed_Object (Id : E; V : N) is
5102 end Set_Renamed_Object;
5104 procedure Set_Renaming_Map (Id : E; V : U) is
5107 end Set_Renaming_Map;
5109 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5111 pragma Assert (Is_Overloadable (Id));
5112 Set_Flag213 (Id, V);
5113 end Set_Requires_Overriding;
5115 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5117 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5119 end Set_Return_Flag_Or_Transient_Decl;
5121 procedure Set_Return_Present (Id : E; V : B := True) is
5124 end Set_Return_Present;
5126 procedure Set_Return_Applies_To (Id : E; V : N) is
5129 end Set_Return_Applies_To;
5131 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5134 end Set_Returns_By_Ref;
5136 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5139 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5140 Set_Flag164 (Id, V);
5141 end Set_Reverse_Bit_Order;
5143 procedure Set_RM_Size (Id : E; V : U) is
5145 pragma Assert (Is_Type (Id));
5149 procedure Set_Scalar_Range (Id : E; V : N) is
5152 end Set_Scalar_Range;
5154 procedure Set_Scale_Value (Id : E; V : U) is
5157 end Set_Scale_Value;
5159 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5161 pragma Assert (not Is_Record_Type (Id));
5163 end Set_Scope_Depth_Value;
5165 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5167 Set_Flag167 (Id, V);
5168 end Set_Sec_Stack_Needed_For_Return;
5170 procedure Set_Shadow_Entities (Id : E; V : S) is
5172 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5174 end Set_Shadow_Entities;
5176 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5178 pragma Assert (Ekind (Id) = E_Variable);
5180 end Set_Shared_Var_Procs_Instance;
5182 procedure Set_Size_Check_Code (Id : E; V : N) is
5184 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5186 end Set_Size_Check_Code;
5188 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5190 Set_Flag177 (Id, V);
5191 end Set_Size_Depends_On_Discriminant;
5193 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5196 end Set_Size_Known_At_Compile_Time;
5198 procedure Set_Small_Value (Id : E; V : R) is
5200 pragma Assert (Is_Fixed_Point_Type (Id));
5201 Set_Ureal21 (Id, V);
5202 end Set_Small_Value;
5204 procedure Set_Spec_Entity (Id : E; V : E) is
5206 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5208 end Set_Spec_Entity;
5210 procedure Set_Static_Predicate (Id : E; V : S) is
5213 (Ekind_In (Id, E_Enumeration_Subtype,
5214 E_Modular_Integer_Subtype,
5215 E_Signed_Integer_Subtype)
5216 and then Has_Predicates (Id));
5218 end Set_Static_Predicate;
5220 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5222 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5223 pragma Assert (Id = Base_Type (Id));
5225 end Set_Storage_Size_Variable;
5227 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5229 pragma Assert (Ekind (Id) = E_Package);
5231 end Set_Static_Elaboration_Desired;
5233 procedure Set_Static_Initialization (Id : E; V : N) is
5236 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5238 end Set_Static_Initialization;
5240 procedure Set_Stored_Constraint (Id : E; V : L) is
5242 pragma Assert (Nkind (Id) in N_Entity);
5243 Set_Elist23 (Id, V);
5244 end Set_Stored_Constraint;
5246 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5248 pragma Assert (Id = Base_Type (Id));
5249 Set_Flag145 (Id, V);
5250 end Set_Strict_Alignment;
5252 procedure Set_String_Literal_Length (Id : E; V : U) is
5254 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5256 end Set_String_Literal_Length;
5258 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5260 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5262 end Set_String_Literal_Low_Bound;
5264 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5266 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5268 end Set_Subprograms_For_Type;
5270 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5272 Set_Flag148 (Id, V);
5273 end Set_Suppress_Elaboration_Warnings;
5275 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5277 pragma Assert (Is_Type (Id));
5278 Set_Flag105 (Id, V);
5279 end Set_Suppress_Initialization;
5281 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5283 Set_Flag165 (Id, V);
5284 end Set_Suppress_Style_Checks;
5286 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5288 Set_Flag217 (Id, V);
5289 end Set_Suppress_Value_Tracking_On_Call;
5291 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5293 pragma Assert (Ekind (Id) in Task_Kind);
5295 end Set_Task_Body_Procedure;
5297 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5300 end Set_Treat_As_Volatile;
5302 procedure Set_Underlying_Full_View (Id : E; V : E) is
5304 pragma Assert (Ekind (Id) in Private_Kind);
5306 end Set_Underlying_Full_View;
5308 procedure Set_Underlying_Record_View (Id : E; V : E) is
5310 pragma Assert (Ekind (Id) = E_Record_Type);
5312 end Set_Underlying_Record_View;
5314 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5316 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5317 Set_Flag216 (Id, V);
5318 end Set_Universal_Aliasing;
5320 procedure Set_Unset_Reference (Id : E; V : N) is
5323 end Set_Unset_Reference;
5325 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5328 end Set_Uses_Sec_Stack;
5330 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5332 Set_Flag222 (Id, V);
5333 end Set_Used_As_Generic_Actual;
5335 procedure Set_Warnings_Off (Id : E; V : B := True) is
5338 end Set_Warnings_Off;
5340 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5342 Set_Flag236 (Id, V);
5343 end Set_Warnings_Off_Used;
5345 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5347 Set_Flag237 (Id, V);
5348 end Set_Warnings_Off_Used_Unmodified;
5350 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5352 Set_Flag238 (Id, V);
5353 end Set_Warnings_Off_Used_Unreferenced;
5355 procedure Set_Was_Hidden (Id : E; V : B := True) is
5357 Set_Flag196 (Id, V);
5360 procedure Set_Wrapped_Entity (Id : E; V : E) is
5362 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5363 and then Is_Primitive_Wrapper (Id));
5365 end Set_Wrapped_Entity;
5367 -----------------------------------
5368 -- Field Initialization Routines --
5369 -----------------------------------
5371 procedure Init_Alignment (Id : E) is
5373 Set_Uint14 (Id, Uint_0);
5376 procedure Init_Alignment (Id : E; V : Int) is
5378 Set_Uint14 (Id, UI_From_Int (V));
5381 procedure Init_Component_Bit_Offset (Id : E) is
5383 Set_Uint11 (Id, No_Uint);
5384 end Init_Component_Bit_Offset;
5386 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5388 Set_Uint11 (Id, UI_From_Int (V));
5389 end Init_Component_Bit_Offset;
5391 procedure Init_Component_Size (Id : E) is
5393 Set_Uint22 (Id, Uint_0);
5394 end Init_Component_Size;
5396 procedure Init_Component_Size (Id : E; V : Int) is
5398 Set_Uint22 (Id, UI_From_Int (V));
5399 end Init_Component_Size;
5401 procedure Init_Digits_Value (Id : E) is
5403 Set_Uint17 (Id, Uint_0);
5404 end Init_Digits_Value;
5406 procedure Init_Digits_Value (Id : E; V : Int) is
5408 Set_Uint17 (Id, UI_From_Int (V));
5409 end Init_Digits_Value;
5411 procedure Init_Esize (Id : E) is
5413 Set_Uint12 (Id, Uint_0);
5416 procedure Init_Esize (Id : E; V : Int) is
5418 Set_Uint12 (Id, UI_From_Int (V));
5421 procedure Init_Normalized_First_Bit (Id : E) is
5423 Set_Uint8 (Id, No_Uint);
5424 end Init_Normalized_First_Bit;
5426 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5428 Set_Uint8 (Id, UI_From_Int (V));
5429 end Init_Normalized_First_Bit;
5431 procedure Init_Normalized_Position (Id : E) is
5433 Set_Uint14 (Id, No_Uint);
5434 end Init_Normalized_Position;
5436 procedure Init_Normalized_Position (Id : E; V : Int) is
5438 Set_Uint14 (Id, UI_From_Int (V));
5439 end Init_Normalized_Position;
5441 procedure Init_Normalized_Position_Max (Id : E) is
5443 Set_Uint10 (Id, No_Uint);
5444 end Init_Normalized_Position_Max;
5446 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5448 Set_Uint10 (Id, UI_From_Int (V));
5449 end Init_Normalized_Position_Max;
5451 procedure Init_RM_Size (Id : E) is
5453 Set_Uint13 (Id, Uint_0);
5456 procedure Init_RM_Size (Id : E; V : Int) is
5458 Set_Uint13 (Id, UI_From_Int (V));
5461 -----------------------------
5462 -- Init_Component_Location --
5463 -----------------------------
5465 procedure Init_Component_Location (Id : E) is
5467 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5468 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5469 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5470 Set_Uint12 (Id, Uint_0); -- Esize
5471 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5472 end Init_Component_Location;
5478 procedure Init_Size (Id : E; V : Int) is
5480 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5481 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5484 ---------------------
5485 -- Init_Size_Align --
5486 ---------------------
5488 procedure Init_Size_Align (Id : E) is
5490 Set_Uint12 (Id, Uint_0); -- Esize
5491 Set_Uint13 (Id, Uint_0); -- RM_Size
5492 Set_Uint14 (Id, Uint_0); -- Alignment
5493 end Init_Size_Align;
5495 ----------------------------------------------
5496 -- Type Representation Attribute Predicates --
5497 ----------------------------------------------
5499 function Known_Alignment (E : Entity_Id) return B is
5501 return Uint14 (E) /= Uint_0
5502 and then Uint14 (E) /= No_Uint;
5503 end Known_Alignment;
5505 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5507 return Uint11 (E) /= No_Uint;
5508 end Known_Component_Bit_Offset;
5510 function Known_Component_Size (E : Entity_Id) return B is
5512 return Uint22 (Base_Type (E)) /= Uint_0
5513 and then Uint22 (Base_Type (E)) /= No_Uint;
5514 end Known_Component_Size;
5516 function Known_Esize (E : Entity_Id) return B is
5518 return Uint12 (E) /= Uint_0
5519 and then Uint12 (E) /= No_Uint;
5522 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5524 return Uint8 (E) /= No_Uint;
5525 end Known_Normalized_First_Bit;
5527 function Known_Normalized_Position (E : Entity_Id) return B is
5529 return Uint14 (E) /= No_Uint;
5530 end Known_Normalized_Position;
5532 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5534 return Uint10 (E) /= No_Uint;
5535 end Known_Normalized_Position_Max;
5537 function Known_RM_Size (E : Entity_Id) return B is
5539 return Uint13 (E) /= No_Uint
5540 and then (Uint13 (E) /= Uint_0
5541 or else Is_Discrete_Type (E)
5542 or else Is_Fixed_Point_Type (E));
5545 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5547 return Uint11 (E) /= No_Uint
5548 and then Uint11 (E) >= Uint_0;
5549 end Known_Static_Component_Bit_Offset;
5551 function Known_Static_Component_Size (E : Entity_Id) return B is
5553 return Uint22 (Base_Type (E)) > Uint_0;
5554 end Known_Static_Component_Size;
5556 function Known_Static_Esize (E : Entity_Id) return B is
5558 return Uint12 (E) > Uint_0
5559 and then not Is_Generic_Type (E);
5560 end Known_Static_Esize;
5562 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5564 return Uint8 (E) /= No_Uint
5565 and then Uint8 (E) >= Uint_0;
5566 end Known_Static_Normalized_First_Bit;
5568 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5570 return Uint14 (E) /= No_Uint
5571 and then Uint14 (E) >= Uint_0;
5572 end Known_Static_Normalized_Position;
5574 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5576 return Uint10 (E) /= No_Uint
5577 and then Uint10 (E) >= Uint_0;
5578 end Known_Static_Normalized_Position_Max;
5580 function Known_Static_RM_Size (E : Entity_Id) return B is
5582 return (Uint13 (E) > Uint_0
5583 or else Is_Discrete_Type (E)
5584 or else Is_Fixed_Point_Type (E))
5585 and then not Is_Generic_Type (E);
5586 end Known_Static_RM_Size;
5588 function Unknown_Alignment (E : Entity_Id) return B is
5590 return Uint14 (E) = Uint_0
5591 or else Uint14 (E) = No_Uint;
5592 end Unknown_Alignment;
5594 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5596 return Uint11 (E) = No_Uint;
5597 end Unknown_Component_Bit_Offset;
5599 function Unknown_Component_Size (E : Entity_Id) return B is
5601 return Uint22 (Base_Type (E)) = Uint_0
5603 Uint22 (Base_Type (E)) = No_Uint;
5604 end Unknown_Component_Size;
5606 function Unknown_Esize (E : Entity_Id) return B is
5608 return Uint12 (E) = No_Uint
5610 Uint12 (E) = Uint_0;
5613 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5615 return Uint8 (E) = No_Uint;
5616 end Unknown_Normalized_First_Bit;
5618 function Unknown_Normalized_Position (E : Entity_Id) return B is
5620 return Uint14 (E) = No_Uint;
5621 end Unknown_Normalized_Position;
5623 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5625 return Uint10 (E) = No_Uint;
5626 end Unknown_Normalized_Position_Max;
5628 function Unknown_RM_Size (E : Entity_Id) return B is
5630 return (Uint13 (E) = Uint_0
5631 and then not Is_Discrete_Type (E)
5632 and then not Is_Fixed_Point_Type (E))
5633 or else Uint13 (E) = No_Uint;
5634 end Unknown_RM_Size;
5636 --------------------
5637 -- Address_Clause --
5638 --------------------
5640 function Address_Clause (Id : E) return N is
5642 return Rep_Clause (Id, Name_Address);
5649 function Aft_Value (Id : E) return U is
5651 Delta_Val : Ureal := Delta_Value (Id);
5653 while Delta_Val < Ureal_Tenth loop
5654 Delta_Val := Delta_Val * Ureal_10;
5655 Result := Result + 1;
5658 return UI_From_Int (Result);
5661 ----------------------
5662 -- Alignment_Clause --
5663 ----------------------
5665 function Alignment_Clause (Id : E) return N is
5667 return Rep_Clause (Id, Name_Alignment);
5668 end Alignment_Clause;
5674 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5676 if Last_Entity (V) = Empty then
5677 Set_First_Entity (Id => V, V => Id);
5679 Set_Next_Entity (Last_Entity (V), Id);
5682 Set_Next_Entity (Id, Empty);
5684 Set_Last_Entity (Id => V, V => Id);
5691 function Base_Type (Id : E) return E is
5693 if Is_Base_Type (Id) then
5696 pragma Assert (Is_Type (Id));
5701 -------------------------
5702 -- Component_Alignment --
5703 -------------------------
5705 -- Component Alignment is encoded using two flags, Flag128/129 as
5706 -- follows. Note that both flags False = Align_Default, so that the
5707 -- default initialization of flags to False initializes component
5708 -- alignment to the default value as required.
5710 -- Flag128 Flag129 Value
5711 -- ------- ------- -----
5712 -- False False Calign_Default
5713 -- False True Calign_Component_Size
5714 -- True False Calign_Component_Size_4
5715 -- True True Calign_Storage_Unit
5717 function Component_Alignment (Id : E) return C is
5718 BT : constant Node_Id := Base_Type (Id);
5721 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5723 if Flag128 (BT) then
5724 if Flag129 (BT) then
5725 return Calign_Storage_Unit;
5727 return Calign_Component_Size_4;
5731 if Flag129 (BT) then
5732 return Calign_Component_Size;
5734 return Calign_Default;
5737 end Component_Alignment;
5739 ----------------------
5740 -- Declaration_Node --
5741 ----------------------
5743 function Declaration_Node (Id : E) return N is
5747 if Ekind (Id) = E_Incomplete_Type
5748 and then Present (Full_View (Id))
5750 P := Parent (Full_View (Id));
5756 if Nkind (P) /= N_Selected_Component
5757 and then Nkind (P) /= N_Expanded_Name
5759 not (Nkind (P) = N_Defining_Program_Unit_Name
5760 and then Is_Child_Unit (Id))
5767 end Declaration_Node;
5769 ---------------------
5770 -- Designated_Type --
5771 ---------------------
5773 function Designated_Type (Id : E) return E is
5777 Desig_Type := Directly_Designated_Type (Id);
5779 if Ekind (Desig_Type) = E_Incomplete_Type
5780 and then Present (Full_View (Desig_Type))
5782 return Full_View (Desig_Type);
5784 elsif Is_Class_Wide_Type (Desig_Type)
5785 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5786 and then Present (Full_View (Etype (Desig_Type)))
5787 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5789 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5794 end Designated_Type;
5796 ----------------------
5797 -- Entry_Index_Type --
5798 ----------------------
5800 function Entry_Index_Type (Id : E) return N is
5802 pragma Assert (Ekind (Id) = E_Entry_Family);
5803 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5804 end Entry_Index_Type;
5806 ---------------------
5807 -- First_Component --
5808 ---------------------
5810 function First_Component (Id : E) return E is
5815 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5817 Comp_Id := First_Entity (Id);
5818 while Present (Comp_Id) loop
5819 exit when Ekind (Comp_Id) = E_Component;
5820 Comp_Id := Next_Entity (Comp_Id);
5824 end First_Component;
5826 -------------------------------------
5827 -- First_Component_Or_Discriminant --
5828 -------------------------------------
5830 function First_Component_Or_Discriminant (Id : E) return E is
5835 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5837 Comp_Id := First_Entity (Id);
5838 while Present (Comp_Id) loop
5839 exit when Ekind (Comp_Id) = E_Component
5841 Ekind (Comp_Id) = E_Discriminant;
5842 Comp_Id := Next_Entity (Comp_Id);
5846 end First_Component_Or_Discriminant;
5852 function First_Formal (Id : E) return E is
5857 (Is_Overloadable (Id)
5858 or else Ekind_In (Id, E_Entry_Family,
5860 E_Subprogram_Type));
5862 if Ekind (Id) = E_Enumeration_Literal then
5866 Formal := First_Entity (Id);
5868 if Present (Formal) and then Is_Formal (Formal) then
5876 ------------------------------
5877 -- First_Formal_With_Extras --
5878 ------------------------------
5880 function First_Formal_With_Extras (Id : E) return E is
5885 (Is_Overloadable (Id)
5886 or else Ekind_In (Id, E_Entry_Family,
5888 E_Subprogram_Type));
5890 if Ekind (Id) = E_Enumeration_Literal then
5894 Formal := First_Entity (Id);
5896 if Present (Formal) and then Is_Formal (Formal) then
5899 return Extra_Formals (Id); -- Empty if no extra formals
5902 end First_Formal_With_Extras;
5904 -------------------------------------
5905 -- Get_Attribute_Definition_Clause --
5906 -------------------------------------
5908 function Get_Attribute_Definition_Clause
5910 Id : Attribute_Id) return Node_Id
5915 N := First_Rep_Item (E);
5916 while Present (N) loop
5917 if Nkind (N) = N_Attribute_Definition_Clause
5918 and then Get_Attribute_Id (Chars (N)) = Id
5927 end Get_Attribute_Definition_Clause;
5933 function Get_Full_View (T : Entity_Id) return Entity_Id is
5935 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5936 return Full_View (T);
5938 elsif Is_Class_Wide_Type (T)
5939 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5940 and then Present (Full_View (Root_Type (T)))
5942 return Class_Wide_Type (Full_View (Root_Type (T)));
5949 --------------------------------------
5950 -- Get_Record_Representation_Clause --
5951 --------------------------------------
5953 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5957 N := First_Rep_Item (E);
5958 while Present (N) loop
5959 if Nkind (N) = N_Record_Representation_Clause then
5967 end Get_Record_Representation_Clause;
5969 -----------------------------
5970 -- Get_Rep_Item_For_Entity --
5971 -----------------------------
5973 function Get_Rep_Item_For_Entity
5975 Nam : Name_Id) return Node_Id
5981 N := First_Rep_Item (E);
5982 while Present (N) loop
5983 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5984 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5986 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5990 elsif Nkind (N) = N_Attribute_Definition_Clause
5991 and then Chars (N) = Nam
5992 and then Entity (N) = E
5996 elsif Nkind (N) = N_Aspect_Specification
5997 and then Chars (Identifier (N)) = Nam
5998 and then Entity (N) = E
6007 end Get_Rep_Item_For_Entity;
6009 --------------------
6010 -- Get_Rep_Pragma --
6011 --------------------
6013 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6017 N := First_Rep_Item (E);
6018 while Present (N) loop
6019 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6029 ------------------------
6030 -- Has_Attach_Handler --
6031 ------------------------
6033 function Has_Attach_Handler (Id : E) return B is
6037 pragma Assert (Is_Protected_Type (Id));
6039 Ritem := First_Rep_Item (Id);
6040 while Present (Ritem) loop
6041 if Nkind (Ritem) = N_Pragma
6042 and then Pragma_Name (Ritem) = Name_Attach_Handler
6046 Next_Rep_Item (Ritem);
6051 end Has_Attach_Handler;
6053 -------------------------------------
6054 -- Has_Attribute_Definition_Clause --
6055 -------------------------------------
6057 function Has_Attribute_Definition_Clause
6059 Id : Attribute_Id) return Boolean
6062 return Present (Get_Attribute_Definition_Clause (E, Id));
6063 end Has_Attribute_Definition_Clause;
6069 function Has_Entries (Id : E) return B is
6073 pragma Assert (Is_Concurrent_Type (Id));
6075 Ent := First_Entity (Id);
6076 while Present (Ent) loop
6077 if Is_Entry (Ent) then
6081 Ent := Next_Entity (Ent);
6087 ----------------------------
6088 -- Has_Foreign_Convention --
6089 ----------------------------
6091 function Has_Foreign_Convention (Id : E) return B is
6093 -- While regular Intrinsics such as the Standard operators fit in the
6094 -- "Ada" convention, those with an Interface_Name materialize GCC
6095 -- builtin imports for which Ada special treatments shouldn't apply.
6097 return Convention (Id) in Foreign_Convention
6098 or else (Convention (Id) = Convention_Intrinsic
6099 and then Present (Interface_Name (Id)));
6100 end Has_Foreign_Convention;
6102 ---------------------------
6103 -- Has_Interrupt_Handler --
6104 ---------------------------
6106 function Has_Interrupt_Handler (Id : E) return B is
6110 pragma Assert (Is_Protected_Type (Id));
6112 Ritem := First_Rep_Item (Id);
6113 while Present (Ritem) loop
6114 if Nkind (Ritem) = N_Pragma
6115 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6119 Next_Rep_Item (Ritem);
6124 end Has_Interrupt_Handler;
6126 --------------------
6127 -- Has_Rep_Pragma --
6128 --------------------
6130 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6132 return Present (Get_Rep_Pragma (E, Nam));
6135 --------------------
6136 -- Has_Unmodified --
6137 --------------------
6139 function Has_Unmodified (E : Entity_Id) return Boolean is
6141 if Has_Pragma_Unmodified (E) then
6143 elsif Warnings_Off (E) then
6144 Set_Warnings_Off_Used_Unmodified (E);
6151 ---------------------
6152 -- Has_Unreferenced --
6153 ---------------------
6155 function Has_Unreferenced (E : Entity_Id) return Boolean is
6157 if Has_Pragma_Unreferenced (E) then
6159 elsif Warnings_Off (E) then
6160 Set_Warnings_Off_Used_Unreferenced (E);
6165 end Has_Unreferenced;
6167 ----------------------
6168 -- Has_Warnings_Off --
6169 ----------------------
6171 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6173 if Warnings_Off (E) then
6174 Set_Warnings_Off_Used (E);
6179 end Has_Warnings_Off;
6181 ------------------------------
6182 -- Implementation_Base_Type --
6183 ------------------------------
6185 function Implementation_Base_Type (Id : E) return E is
6190 Bastyp := Base_Type (Id);
6192 if Is_Incomplete_Or_Private_Type (Bastyp) then
6193 Imptyp := Underlying_Type (Bastyp);
6195 -- If we have an implementation type, then just return it,
6196 -- otherwise we return the Base_Type anyway. This can only
6197 -- happen in error situations and should avoid some error bombs.
6199 if Present (Imptyp) then
6200 return Base_Type (Imptyp);
6208 end Implementation_Base_Type;
6210 -------------------------
6211 -- Invariant_Procedure --
6212 -------------------------
6214 function Invariant_Procedure (Id : E) return E is
6218 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6220 if No (Subprograms_For_Type (Id)) then
6224 S := Subprograms_For_Type (Id);
6225 while Present (S) loop
6226 if Has_Invariants (S) then
6229 S := Subprograms_For_Type (S);
6235 end Invariant_Procedure;
6241 -- Global flag table allowing rapid computation of this function
6243 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6244 (E_Enumeration_Subtype |
6246 E_Signed_Integer_Subtype |
6247 E_Modular_Integer_Subtype |
6248 E_Floating_Point_Subtype |
6249 E_Ordinary_Fixed_Point_Subtype |
6250 E_Decimal_Fixed_Point_Subtype |
6255 E_Record_Subtype_With_Private |
6256 E_Limited_Private_Subtype |
6258 E_Protected_Subtype |
6260 E_String_Literal_Subtype |
6261 E_Class_Wide_Subtype => False,
6264 function Is_Base_Type (Id : E) return Boolean is
6266 return Entity_Is_Base_Type (Ekind (Id));
6269 ---------------------
6270 -- Is_Boolean_Type --
6271 ---------------------
6273 function Is_Boolean_Type (Id : E) return B is
6275 return Root_Type (Id) = Standard_Boolean;
6276 end Is_Boolean_Type;
6278 ------------------------
6279 -- Is_Constant_Object --
6280 ------------------------
6282 function Is_Constant_Object (Id : E) return B is
6283 K : constant Entity_Kind := Ekind (Id);
6286 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6287 end Is_Constant_Object;
6289 --------------------
6290 -- Is_Discriminal --
6291 --------------------
6293 function Is_Discriminal (Id : E) return B is
6295 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6296 and then Present (Discriminal_Link (Id)));
6299 ----------------------
6300 -- Is_Dynamic_Scope --
6301 ----------------------
6303 function Is_Dynamic_Scope (Id : E) return B is
6306 Ekind (Id) = E_Block
6308 Ekind (Id) = E_Function
6310 Ekind (Id) = E_Procedure
6312 Ekind (Id) = E_Subprogram_Body
6314 Ekind (Id) = E_Task_Type
6316 (Ekind (Id) = E_Limited_Private_Type
6317 and then Present (Full_View (Id))
6318 and then Ekind (Full_View (Id)) = E_Task_Type)
6320 Ekind (Id) = E_Entry
6322 Ekind (Id) = E_Entry_Family
6324 Ekind (Id) = E_Return_Statement;
6325 end Is_Dynamic_Scope;
6327 --------------------
6328 -- Is_Entity_Name --
6329 --------------------
6331 function Is_Entity_Name (N : Node_Id) return Boolean is
6332 Kind : constant Node_Kind := Nkind (N);
6335 -- Identifiers, operator symbols, expanded names are entity names
6337 return Kind = N_Identifier
6338 or else Kind = N_Operator_Symbol
6339 or else Kind = N_Expanded_Name
6341 -- Attribute references are entity names if they refer to an entity.
6342 -- Note that we don't do this by testing for the presence of the
6343 -- Entity field in the N_Attribute_Reference node, since it may not
6344 -- have been set yet.
6346 or else (Kind = N_Attribute_Reference
6347 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6354 function Is_Finalizer (Id : E) return B is
6356 return Ekind (Id) = E_Procedure
6357 and then Chars (Id) = Name_uFinalizer;
6360 -----------------------------------
6361 -- Is_Package_Or_Generic_Package --
6362 -----------------------------------
6364 function Is_Package_Or_Generic_Package (Id : E) return B is
6367 Ekind (Id) = E_Package
6369 Ekind (Id) = E_Generic_Package;
6370 end Is_Package_Or_Generic_Package;
6372 ------------------------
6373 -- Predicate_Function --
6374 ------------------------
6376 function Predicate_Function (Id : E) return E is
6380 pragma Assert (Is_Type (Id));
6382 if No (Subprograms_For_Type (Id)) then
6386 S := Subprograms_For_Type (Id);
6387 while Present (S) loop
6388 if Has_Predicates (S) then
6391 S := Subprograms_For_Type (S);
6397 end Predicate_Function;
6403 function Is_Prival (Id : E) return B is
6405 return (Ekind_In (Id, E_Constant, E_Variable)
6406 and then Present (Prival_Link (Id)));
6409 ----------------------------
6410 -- Is_Protected_Component --
6411 ----------------------------
6413 function Is_Protected_Component (Id : E) return B is
6415 return Ekind (Id) = E_Component
6416 and then Is_Protected_Type (Scope (Id));
6417 end Is_Protected_Component;
6419 ----------------------------
6420 -- Is_Protected_Interface --
6421 ----------------------------
6423 function Is_Protected_Interface (Id : E) return B is
6424 Typ : constant Entity_Id := Base_Type (Id);
6426 if not Is_Interface (Typ) then
6428 elsif Is_Class_Wide_Type (Typ) then
6429 return Is_Protected_Interface (Etype (Typ));
6431 return Protected_Present (Type_Definition (Parent (Typ)));
6433 end Is_Protected_Interface;
6435 ------------------------------
6436 -- Is_Protected_Record_Type --
6437 ------------------------------
6439 function Is_Protected_Record_Type (Id : E) return B is
6442 Is_Concurrent_Record_Type (Id)
6443 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6444 end Is_Protected_Record_Type;
6446 --------------------------------
6447 -- Is_Standard_Character_Type --
6448 --------------------------------
6450 function Is_Standard_Character_Type (Id : E) return B is
6452 if Is_Type (Id) then
6454 R : constant Entity_Id := Root_Type (Id);
6457 R = Standard_Character
6459 R = Standard_Wide_Character
6461 R = Standard_Wide_Wide_Character;
6467 end Is_Standard_Character_Type;
6469 --------------------
6470 -- Is_String_Type --
6471 --------------------
6473 function Is_String_Type (Id : E) return B is
6475 return Ekind (Id) in String_Kind
6476 or else (Is_Array_Type (Id)
6477 and then Id /= Any_Composite
6478 and then Number_Dimensions (Id) = 1
6479 and then Is_Character_Type (Component_Type (Id)));
6482 -------------------------------
6483 -- Is_Synchronized_Interface --
6484 -------------------------------
6486 function Is_Synchronized_Interface (Id : E) return B is
6487 Typ : constant Entity_Id := Base_Type (Id);
6490 if not Is_Interface (Typ) then
6493 elsif Is_Class_Wide_Type (Typ) then
6494 return Is_Synchronized_Interface (Etype (Typ));
6497 return Protected_Present (Type_Definition (Parent (Typ)))
6498 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6499 or else Task_Present (Type_Definition (Parent (Typ)));
6501 end Is_Synchronized_Interface;
6503 -----------------------
6504 -- Is_Task_Interface --
6505 -----------------------
6507 function Is_Task_Interface (Id : E) return B is
6508 Typ : constant Entity_Id := Base_Type (Id);
6510 if not Is_Interface (Typ) then
6512 elsif Is_Class_Wide_Type (Typ) then
6513 return Is_Task_Interface (Etype (Typ));
6515 return Task_Present (Type_Definition (Parent (Typ)));
6517 end Is_Task_Interface;
6519 -------------------------
6520 -- Is_Task_Record_Type --
6521 -------------------------
6523 function Is_Task_Record_Type (Id : E) return B is
6526 Is_Concurrent_Record_Type (Id)
6527 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6528 end Is_Task_Record_Type;
6530 ------------------------
6531 -- Is_Wrapper_Package --
6532 ------------------------
6534 function Is_Wrapper_Package (Id : E) return B is
6536 return (Ekind (Id) = E_Package
6537 and then Present (Related_Instance (Id)));
6538 end Is_Wrapper_Package;
6544 function Last_Formal (Id : E) return E is
6549 (Is_Overloadable (Id)
6550 or else Ekind_In (Id, E_Entry_Family,
6552 E_Subprogram_Type));
6554 if Ekind (Id) = E_Enumeration_Literal then
6558 Formal := First_Formal (Id);
6560 if Present (Formal) then
6561 while Present (Next_Formal (Formal)) loop
6562 Formal := Next_Formal (Formal);
6570 function Model_Emin_Value (Id : E) return Uint is
6572 return Machine_Emin_Value (Id);
6573 end Model_Emin_Value;
6575 -------------------------
6576 -- Model_Epsilon_Value --
6577 -------------------------
6579 function Model_Epsilon_Value (Id : E) return Ureal is
6580 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6582 return Radix ** (1 - Model_Mantissa_Value (Id));
6583 end Model_Epsilon_Value;
6585 --------------------------
6586 -- Model_Mantissa_Value --
6587 --------------------------
6589 function Model_Mantissa_Value (Id : E) return Uint is
6591 return Machine_Mantissa_Value (Id);
6592 end Model_Mantissa_Value;
6594 -----------------------
6595 -- Model_Small_Value --
6596 -----------------------
6598 function Model_Small_Value (Id : E) return Ureal is
6599 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6601 return Radix ** (Model_Emin_Value (Id) - 1);
6602 end Model_Small_Value;
6604 ------------------------
6605 -- Machine_Emax_Value --
6606 ------------------------
6608 function Machine_Emax_Value (Id : E) return Uint is
6609 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6612 case Float_Rep (Id) is
6615 when 1 .. 6 => return Uint_128;
6616 when 7 .. 15 => return 2**10;
6617 when 16 .. 33 => return 2**14;
6618 when others => return No_Uint;
6623 when 1 .. 9 => return 2**7 - 1;
6624 when 10 .. 15 => return 2**10 - 1;
6625 when others => return No_Uint;
6629 return Uint_2 ** Uint_7 - Uint_1;
6631 end Machine_Emax_Value;
6633 ------------------------
6634 -- Machine_Emin_Value --
6635 ------------------------
6637 function Machine_Emin_Value (Id : E) return Uint is
6639 case Float_Rep (Id) is
6640 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6641 when VAX_Native => return -Machine_Emax_Value (Id);
6642 when AAMP => return -Machine_Emax_Value (Id);
6644 end Machine_Emin_Value;
6646 ----------------------------
6647 -- Machine_Mantissa_Value --
6648 ----------------------------
6650 function Machine_Mantissa_Value (Id : E) return Uint is
6651 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6654 case Float_Rep (Id) is
6657 when 1 .. 6 => return Uint_24;
6658 when 7 .. 15 => return UI_From_Int (53);
6659 when 16 .. 18 => return Uint_64;
6660 when 19 .. 33 => return UI_From_Int (113);
6661 when others => return No_Uint;
6666 when 1 .. 6 => return Uint_24;
6667 when 7 .. 9 => return UI_From_Int (56);
6668 when 10 .. 15 => return UI_From_Int (53);
6669 when others => return No_Uint;
6674 when 1 .. 6 => return Uint_24;
6675 when 7 .. 9 => return UI_From_Int (40);
6676 when others => return No_Uint;
6679 end Machine_Mantissa_Value;
6681 -------------------------
6682 -- Machine_Radix_Value --
6683 -------------------------
6685 function Machine_Radix_Value (Id : E) return U is
6687 case Float_Rep (Id) is
6688 when IEEE_Binary | VAX_Native | AAMP =>
6691 end Machine_Radix_Value;
6693 --------------------
6694 -- Next_Component --
6695 --------------------
6697 function Next_Component (Id : E) return E is
6701 Comp_Id := Next_Entity (Id);
6702 while Present (Comp_Id) loop
6703 exit when Ekind (Comp_Id) = E_Component;
6704 Comp_Id := Next_Entity (Comp_Id);
6710 ------------------------------------
6711 -- Next_Component_Or_Discriminant --
6712 ------------------------------------
6714 function Next_Component_Or_Discriminant (Id : E) return E is
6718 Comp_Id := Next_Entity (Id);
6719 while Present (Comp_Id) loop
6720 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6721 Comp_Id := Next_Entity (Comp_Id);
6725 end Next_Component_Or_Discriminant;
6727 -----------------------
6728 -- Next_Discriminant --
6729 -----------------------
6731 -- This function actually implements both Next_Discriminant and
6732 -- Next_Stored_Discriminant by making sure that the Discriminant
6733 -- returned is of the same variety as Id.
6735 function Next_Discriminant (Id : E) return E is
6737 -- Derived Tagged types with private extensions look like this...
6739 -- E_Discriminant d1
6740 -- E_Discriminant d2
6742 -- E_Discriminant d1
6743 -- E_Discriminant d2
6746 -- so it is critical not to go past the leading discriminants
6751 pragma Assert (Ekind (Id) = E_Discriminant);
6754 D := Next_Entity (D);
6756 or else (Ekind (D) /= E_Discriminant
6757 and then not Is_Itype (D))
6762 exit when Ekind (D) = E_Discriminant
6763 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6767 end Next_Discriminant;
6773 function Next_Formal (Id : E) return E is
6777 -- Follow the chain of declared entities as long as the kind of the
6778 -- entity corresponds to a formal parameter. Skip internal entities
6779 -- that may have been created for implicit subtypes, in the process
6780 -- of analyzing default expressions.
6784 P := Next_Entity (P);
6786 if No (P) or else Is_Formal (P) then
6788 elsif not Is_Internal (P) then
6794 -----------------------------
6795 -- Next_Formal_With_Extras --
6796 -----------------------------
6798 function Next_Formal_With_Extras (Id : E) return E is
6800 if Present (Extra_Formal (Id)) then
6801 return Extra_Formal (Id);
6803 return Next_Formal (Id);
6805 end Next_Formal_With_Extras;
6811 function Next_Index (Id : Node_Id) return Node_Id is
6820 function Next_Literal (Id : E) return E is
6822 pragma Assert (Nkind (Id) in N_Entity);
6826 ------------------------------
6827 -- Next_Stored_Discriminant --
6828 ------------------------------
6830 function Next_Stored_Discriminant (Id : E) return E is
6832 -- See comment in Next_Discriminant
6834 return Next_Discriminant (Id);
6835 end Next_Stored_Discriminant;
6837 -----------------------
6838 -- Number_Dimensions --
6839 -----------------------
6841 function Number_Dimensions (Id : E) return Pos is
6846 if Ekind (Id) in String_Kind then
6851 T := First_Index (Id);
6852 while Present (T) loop
6859 end Number_Dimensions;
6861 --------------------
6862 -- Number_Entries --
6863 --------------------
6865 function Number_Entries (Id : E) return Nat is
6870 pragma Assert (Is_Concurrent_Type (Id));
6873 Ent := First_Entity (Id);
6874 while Present (Ent) loop
6875 if Is_Entry (Ent) then
6879 Ent := Next_Entity (Ent);
6885 --------------------
6886 -- Number_Formals --
6887 --------------------
6889 function Number_Formals (Id : E) return Pos is
6895 Formal := First_Formal (Id);
6896 while Present (Formal) loop
6898 Formal := Next_Formal (Formal);
6904 --------------------
6905 -- Parameter_Mode --
6906 --------------------
6908 function Parameter_Mode (Id : E) return Formal_Kind is
6913 --------------------------
6914 -- Primitive_Operations --
6915 --------------------------
6917 function Primitive_Operations (Id : E) return L is
6919 if Is_Concurrent_Type (Id) then
6920 if Present (Corresponding_Record_Type (Id)) then
6921 return Direct_Primitive_Operations
6922 (Corresponding_Record_Type (Id));
6927 return Direct_Primitive_Operations (Id);
6929 end Primitive_Operations;
6931 ---------------------
6932 -- Record_Rep_Item --
6933 ---------------------
6935 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6937 Set_Next_Rep_Item (N, First_Rep_Item (E));
6938 Set_First_Rep_Item (E, N);
6939 end Record_Rep_Item;
6945 function Root_Type (Id : E) return E is
6949 pragma Assert (Nkind (Id) in N_Entity);
6951 T := Base_Type (Id);
6953 if Ekind (T) = E_Class_Wide_Type then
6956 elsif Ekind (T) = E_Class_Wide_Subtype then
6957 return Etype (Base_Type (T));
6959 -- ??? T comes from Base_Type, how can it be a subtype?
6960 -- Also Base_Type is supposed to be idempotent, so either way
6961 -- this is equivalent to "return Etype (T)" and should be merged
6962 -- with the E_Class_Wide_Type case.
6973 -- Following test catches some error cases resulting from
6976 elsif No (Etyp) then
6979 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6982 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6988 -- Return if there is a circularity in the inheritance chain. This
6989 -- happens in some error situations and we do not want to get
6990 -- stuck in this loop.
6992 if T = Base_Type (Id) then
6999 ---------------------
7000 -- Safe_Emax_Value --
7001 ---------------------
7003 function Safe_Emax_Value (Id : E) return Uint is
7005 return Machine_Emax_Value (Id);
7006 end Safe_Emax_Value;
7008 ----------------------
7009 -- Safe_First_Value --
7010 ----------------------
7012 function Safe_First_Value (Id : E) return Ureal is
7014 return -Safe_Last_Value (Id);
7015 end Safe_First_Value;
7017 ---------------------
7018 -- Safe_Last_Value --
7019 ---------------------
7021 function Safe_Last_Value (Id : E) return Ureal is
7022 Radix : constant Uint := Machine_Radix_Value (Id);
7023 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7024 Emax : constant Uint := Safe_Emax_Value (Id);
7025 Significand : constant Uint := Radix ** Mantissa - 1;
7026 Exponent : constant Uint := Emax - Mantissa;
7032 (Num => Significand * 2 ** (Exponent mod 4),
7033 Den => -Exponent / 4,
7039 (Num => Significand,
7043 end Safe_Last_Value;
7049 function Scope_Depth (Id : E) return Uint is
7054 while Is_Record_Type (Scop) loop
7055 Scop := Scope (Scop);
7058 return Scope_Depth_Value (Scop);
7061 ---------------------
7062 -- Scope_Depth_Set --
7063 ---------------------
7065 function Scope_Depth_Set (Id : E) return B is
7067 return not Is_Record_Type (Id)
7068 and then Field22 (Id) /= Union_Id (Empty);
7069 end Scope_Depth_Set;
7071 -----------------------------
7072 -- Set_Component_Alignment --
7073 -----------------------------
7075 -- Component Alignment is encoded using two flags, Flag128/129 as
7076 -- follows. Note that both flags False = Align_Default, so that the
7077 -- default initialization of flags to False initializes component
7078 -- alignment to the default value as required.
7080 -- Flag128 Flag129 Value
7081 -- ------- ------- -----
7082 -- False False Calign_Default
7083 -- False True Calign_Component_Size
7084 -- True False Calign_Component_Size_4
7085 -- True True Calign_Storage_Unit
7087 procedure Set_Component_Alignment (Id : E; V : C) is
7089 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7090 and then Is_Base_Type (Id));
7093 when Calign_Default =>
7094 Set_Flag128 (Id, False);
7095 Set_Flag129 (Id, False);
7097 when Calign_Component_Size =>
7098 Set_Flag128 (Id, False);
7099 Set_Flag129 (Id, True);
7101 when Calign_Component_Size_4 =>
7102 Set_Flag128 (Id, True);
7103 Set_Flag129 (Id, False);
7105 when Calign_Storage_Unit =>
7106 Set_Flag128 (Id, True);
7107 Set_Flag129 (Id, True);
7109 end Set_Component_Alignment;
7111 -----------------------------
7112 -- Set_Invariant_Procedure --
7113 -----------------------------
7115 procedure Set_Invariant_Procedure (Id : E; V : E) is
7119 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7121 S := Subprograms_For_Type (Id);
7122 Set_Subprograms_For_Type (Id, V);
7124 while Present (S) loop
7125 if Has_Invariants (S) then
7126 raise Program_Error;
7128 S := Subprograms_For_Type (S);
7132 Set_Subprograms_For_Type (Id, V);
7133 end Set_Invariant_Procedure;
7135 ----------------------------
7136 -- Set_Predicate_Function --
7137 ----------------------------
7139 procedure Set_Predicate_Function (Id : E; V : E) is
7143 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7145 S := Subprograms_For_Type (Id);
7146 Set_Subprograms_For_Type (Id, V);
7148 while Present (S) loop
7149 if Has_Predicates (S) then
7150 raise Program_Error;
7152 S := Subprograms_For_Type (S);
7156 Set_Subprograms_For_Type (Id, V);
7157 end Set_Predicate_Function;
7163 function Size_Clause (Id : E) return N is
7165 return Rep_Clause (Id, Name_Size);
7168 ------------------------
7169 -- Stream_Size_Clause --
7170 ------------------------
7172 function Stream_Size_Clause (Id : E) return N is
7174 return Rep_Clause (Id, Name_Stream_Size);
7175 end Stream_Size_Clause;
7181 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7187 Kind := E_Access_Subtype;
7191 Kind := E_Array_Subtype;
7193 when E_Class_Wide_Type |
7194 E_Class_Wide_Subtype =>
7195 Kind := E_Class_Wide_Subtype;
7197 when E_Decimal_Fixed_Point_Type |
7198 E_Decimal_Fixed_Point_Subtype =>
7199 Kind := E_Decimal_Fixed_Point_Subtype;
7201 when E_Ordinary_Fixed_Point_Type |
7202 E_Ordinary_Fixed_Point_Subtype =>
7203 Kind := E_Ordinary_Fixed_Point_Subtype;
7205 when E_Private_Type |
7206 E_Private_Subtype =>
7207 Kind := E_Private_Subtype;
7209 when E_Limited_Private_Type |
7210 E_Limited_Private_Subtype =>
7211 Kind := E_Limited_Private_Subtype;
7213 when E_Record_Type_With_Private |
7214 E_Record_Subtype_With_Private =>
7215 Kind := E_Record_Subtype_With_Private;
7217 when E_Record_Type |
7219 Kind := E_Record_Subtype;
7221 when E_String_Type |
7223 Kind := E_String_Subtype;
7225 when Enumeration_Kind =>
7226 Kind := E_Enumeration_Subtype;
7229 Kind := E_Floating_Point_Subtype;
7231 when Signed_Integer_Kind =>
7232 Kind := E_Signed_Integer_Subtype;
7234 when Modular_Integer_Kind =>
7235 Kind := E_Modular_Integer_Subtype;
7237 when Protected_Kind =>
7238 Kind := E_Protected_Subtype;
7241 Kind := E_Task_Subtype;
7245 raise Program_Error;
7251 ---------------------
7252 -- Type_High_Bound --
7253 ---------------------
7255 function Type_High_Bound (Id : E) return Node_Id is
7256 Rng : constant Node_Id := Scalar_Range (Id);
7258 if Nkind (Rng) = N_Subtype_Indication then
7259 return High_Bound (Range_Expression (Constraint (Rng)));
7261 return High_Bound (Rng);
7263 end Type_High_Bound;
7265 --------------------
7266 -- Type_Low_Bound --
7267 --------------------
7269 function Type_Low_Bound (Id : E) return Node_Id is
7270 Rng : constant Node_Id := Scalar_Range (Id);
7272 if Nkind (Rng) = N_Subtype_Indication then
7273 return Low_Bound (Range_Expression (Constraint (Rng)));
7275 return Low_Bound (Rng);
7279 ---------------------
7280 -- Underlying_Type --
7281 ---------------------
7283 function Underlying_Type (Id : E) return E is
7285 -- For record_with_private the underlying type is always the direct
7286 -- full view. Never try to take the full view of the parent it
7287 -- doesn't make sense.
7289 if Ekind (Id) = E_Record_Type_With_Private then
7290 return Full_View (Id);
7292 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7294 -- If we have an incomplete or private type with a full view,
7295 -- then we return the Underlying_Type of this full view
7297 if Present (Full_View (Id)) then
7298 if Id = Full_View (Id) then
7300 -- Previous error in declaration
7305 return Underlying_Type (Full_View (Id));
7308 -- If we have an incomplete entity that comes from the limited
7309 -- view then we return the Underlying_Type of its non-limited
7312 elsif From_With_Type (Id)
7313 and then Present (Non_Limited_View (Id))
7315 return Underlying_Type (Non_Limited_View (Id));
7317 -- Otherwise check for the case where we have a derived type or
7318 -- subtype, and if so get the Underlying_Type of the parent type.
7320 elsif Etype (Id) /= Id then
7321 return Underlying_Type (Etype (Id));
7323 -- Otherwise we have an incomplete or private type that has
7324 -- no full view, which means that we have not encountered the
7325 -- completion, so return Empty to indicate the underlying type
7326 -- is not yet known.
7332 -- For non-incomplete, non-private types, return the type itself
7333 -- Also for entities that are not types at all return the entity
7339 end Underlying_Type;
7345 function Vax_Float (Id : E) return B is
7347 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7350 ------------------------
7351 -- Write_Entity_Flags --
7352 ------------------------
7354 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7356 procedure W (Flag_Name : String; Flag : Boolean);
7357 -- Write out given flag if it is set
7363 procedure W (Flag_Name : String; Flag : Boolean) is
7367 Write_Str (Flag_Name);
7368 Write_Str (" = True");
7373 -- Start of processing for Write_Entity_Flags
7376 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7377 and then Is_Base_Type (Id)
7380 Write_Str ("Component_Alignment = ");
7382 case Component_Alignment (Id) is
7383 when Calign_Default =>
7384 Write_Str ("Calign_Default");
7386 when Calign_Component_Size =>
7387 Write_Str ("Calign_Component_Size");
7389 when Calign_Component_Size_4 =>
7390 Write_Str ("Calign_Component_Size_4");
7392 when Calign_Storage_Unit =>
7393 Write_Str ("Calign_Storage_Unit");
7399 W ("Address_Taken", Flag104 (Id));
7400 W ("Body_Needed_For_SAL", Flag40 (Id));
7401 W ("C_Pass_By_Copy", Flag125 (Id));
7402 W ("Can_Never_Be_Null", Flag38 (Id));
7403 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7404 W ("Debug_Info_Off", Flag166 (Id));
7405 W ("Default_Expressions_Processed", Flag108 (Id));
7406 W ("Delay_Cleanups", Flag114 (Id));
7407 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7408 W ("Depends_On_Private", Flag14 (Id));
7409 W ("Discard_Names", Flag88 (Id));
7410 W ("Elaboration_Entity_Required", Flag174 (Id));
7411 W ("Elaborate_Body_Desirable", Flag210 (Id));
7412 W ("Entry_Accepted", Flag152 (Id));
7413 W ("Can_Use_Internal_Rep", Flag229 (Id));
7414 W ("Finalize_Storage_Only", Flag158 (Id));
7415 W ("From_With_Type", Flag159 (Id));
7416 W ("Has_Aliased_Components", Flag135 (Id));
7417 W ("Has_Alignment_Clause", Flag46 (Id));
7418 W ("Has_All_Calls_Remote", Flag79 (Id));
7419 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7420 W ("Has_Atomic_Components", Flag86 (Id));
7421 W ("Has_Biased_Representation", Flag139 (Id));
7422 W ("Has_Completion", Flag26 (Id));
7423 W ("Has_Completion_In_Body", Flag71 (Id));
7424 W ("Has_Complex_Representation", Flag140 (Id));
7425 W ("Has_Component_Size_Clause", Flag68 (Id));
7426 W ("Has_Contiguous_Rep", Flag181 (Id));
7427 W ("Has_Controlled_Component", Flag43 (Id));
7428 W ("Has_Controlling_Result", Flag98 (Id));
7429 W ("Has_Convention_Pragma", Flag119 (Id));
7430 W ("Has_Default_Aspect", Flag39 (Id));
7431 W ("Has_Delayed_Aspects", Flag200 (Id));
7432 W ("Has_Delayed_Freeze", Flag18 (Id));
7433 W ("Has_Discriminants", Flag5 (Id));
7434 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7435 W ("Has_Exit", Flag47 (Id));
7436 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7437 W ("Has_Forward_Instantiation", Flag175 (Id));
7438 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7439 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7440 W ("Has_Homonym", Flag56 (Id));
7441 W ("Has_Implicit_Dereference", Flag251 (Id));
7442 W ("Has_Inheritable_Invariants", Flag248 (Id));
7443 W ("Has_Initial_Value", Flag219 (Id));
7444 W ("Has_Invariants", Flag232 (Id));
7445 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7446 W ("Has_Master_Entity", Flag21 (Id));
7447 W ("Has_Missing_Return", Flag142 (Id));
7448 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7449 W ("Has_Non_Standard_Rep", Flag75 (Id));
7450 W ("Has_Object_Size_Clause", Flag172 (Id));
7451 W ("Has_Per_Object_Constraint", Flag154 (Id));
7452 W ("Has_Persistent_BSS", Flag188 (Id));
7453 W ("Has_Postconditions", Flag240 (Id));
7454 W ("Has_Pragma_Controlled", Flag27 (Id));
7455 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7456 W ("Has_Pragma_Inline", Flag157 (Id));
7457 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7458 W ("Has_Pragma_Ordered", Flag198 (Id));
7459 W ("Has_Pragma_Pack", Flag121 (Id));
7460 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7461 W ("Has_Pragma_Pure", Flag203 (Id));
7462 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7463 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7464 W ("Has_Pragma_Unmodified", Flag233 (Id));
7465 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7466 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7467 W ("Has_Predicates", Flag250 (Id));
7468 W ("Has_Primitive_Operations", Flag120 (Id));
7469 W ("Has_Private_Ancestor", Flag151 (Id));
7470 W ("Has_Private_Declaration", Flag155 (Id));
7471 W ("Has_Qualified_Name", Flag161 (Id));
7472 W ("Has_RACW", Flag214 (Id));
7473 W ("Has_Record_Rep_Clause", Flag65 (Id));
7474 W ("Has_Recursive_Call", Flag143 (Id));
7475 W ("Has_Size_Clause", Flag29 (Id));
7476 W ("Has_Small_Clause", Flag67 (Id));
7477 W ("Has_Specified_Layout", Flag100 (Id));
7478 W ("Has_Specified_Stream_Input", Flag190 (Id));
7479 W ("Has_Specified_Stream_Output", Flag191 (Id));
7480 W ("Has_Specified_Stream_Read", Flag192 (Id));
7481 W ("Has_Specified_Stream_Write", Flag193 (Id));
7482 W ("Has_Static_Discriminants", Flag211 (Id));
7483 W ("Has_Storage_Size_Clause", Flag23 (Id));
7484 W ("Has_Stream_Size_Clause", Flag184 (Id));
7485 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7486 W ("Has_Task", Flag30 (Id));
7487 W ("Has_Thunks", Flag228 (Id));
7488 W ("Has_Unchecked_Union", Flag123 (Id));
7489 W ("Has_Unknown_Discriminants", Flag72 (Id));
7490 W ("Has_Up_Level_Access", Flag215 (Id));
7491 W ("Has_Volatile_Components", Flag87 (Id));
7492 W ("Has_Xref_Entry", Flag182 (Id));
7493 W ("In_Package_Body", Flag48 (Id));
7494 W ("In_Private_Part", Flag45 (Id));
7495 W ("In_Use", Flag8 (Id));
7496 W ("Is_AST_Entry", Flag132 (Id));
7497 W ("Is_Abstract_Subprogram", Flag19 (Id));
7498 W ("Is_Abstract_Type", Flag146 (Id));
7499 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7500 W ("Is_Access_Constant", Flag69 (Id));
7501 W ("Is_Ada_2005_Only", Flag185 (Id));
7502 W ("Is_Ada_2012_Only", Flag199 (Id));
7503 W ("Is_Aliased", Flag15 (Id));
7504 W ("Is_Asynchronous", Flag81 (Id));
7505 W ("Is_Atomic", Flag85 (Id));
7506 W ("Is_Bit_Packed_Array", Flag122 (Id));
7507 W ("Is_CPP_Class", Flag74 (Id));
7508 W ("Is_Called", Flag102 (Id));
7509 W ("Is_Character_Type", Flag63 (Id));
7510 W ("Is_Child_Unit", Flag73 (Id));
7511 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7512 W ("Is_Compilation_Unit", Flag149 (Id));
7513 W ("Is_Completely_Hidden", Flag103 (Id));
7514 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7515 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7516 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7517 W ("Is_Constrained", Flag12 (Id));
7518 W ("Is_Constructor", Flag76 (Id));
7519 W ("Is_Controlled", Flag42 (Id));
7520 W ("Is_Controlling_Formal", Flag97 (Id));
7521 W ("Is_Descendent_Of_Address", Flag223 (Id));
7522 W ("Is_Discrim_SO_Function", Flag176 (Id));
7523 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7524 W ("Is_Dispatching_Operation", Flag6 (Id));
7525 W ("Is_Eliminated", Flag124 (Id));
7526 W ("Is_Entry_Formal", Flag52 (Id));
7527 W ("Is_Exported", Flag99 (Id));
7528 W ("Is_First_Subtype", Flag70 (Id));
7529 W ("Is_For_Access_Subtype", Flag118 (Id));
7530 W ("Is_Formal_Subprogram", Flag111 (Id));
7531 W ("Is_Frozen", Flag4 (Id));
7532 W ("Is_Generic_Actual_Type", Flag94 (Id));
7533 W ("Is_Generic_Instance", Flag130 (Id));
7534 W ("Is_Generic_Type", Flag13 (Id));
7535 W ("Is_Hidden", Flag57 (Id));
7536 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7537 W ("Is_Immediately_Visible", Flag7 (Id));
7538 W ("Is_Imported", Flag24 (Id));
7539 W ("Is_Inlined", Flag11 (Id));
7540 W ("Is_Instantiated", Flag126 (Id));
7541 W ("Is_Interface", Flag186 (Id));
7542 W ("Is_Internal", Flag17 (Id));
7543 W ("Is_Interrupt_Handler", Flag89 (Id));
7544 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7545 W ("Is_Itype", Flag91 (Id));
7546 W ("Is_Known_Non_Null", Flag37 (Id));
7547 W ("Is_Known_Null", Flag204 (Id));
7548 W ("Is_Known_Valid", Flag170 (Id));
7549 W ("Is_Limited_Composite", Flag106 (Id));
7550 W ("Is_Limited_Interface", Flag197 (Id));
7551 W ("Is_Limited_Record", Flag25 (Id));
7552 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7553 W ("Is_Non_Static_Subtype", Flag109 (Id));
7554 W ("Is_Null_Init_Proc", Flag178 (Id));
7555 W ("Is_Obsolescent", Flag153 (Id));
7556 W ("Is_Only_Out_Parameter", Flag226 (Id));
7557 W ("Is_Optional_Parameter", Flag134 (Id));
7558 W ("Is_Package_Body_Entity", Flag160 (Id));
7559 W ("Is_Packed", Flag51 (Id));
7560 W ("Is_Packed_Array_Type", Flag138 (Id));
7561 W ("Is_Postcondition_Proc", Flag253 (Id));
7562 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7563 W ("Is_Preelaborated", Flag59 (Id));
7564 W ("Is_Primitive", Flag218 (Id));
7565 W ("Is_Primitive_Wrapper", Flag195 (Id));
7566 W ("Is_Private_Composite", Flag107 (Id));
7567 W ("Is_Private_Descendant", Flag53 (Id));
7568 W ("Is_Private_Primitive", Flag245 (Id));
7569 W ("Is_Processed_Transient", Flag252 (Id));
7570 W ("Is_Public", Flag10 (Id));
7571 W ("Is_Pure", Flag44 (Id));
7572 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7573 W ("Is_RACW_Stub_Type", Flag244 (Id));
7574 W ("Is_Raised", Flag224 (Id));
7575 W ("Is_Remote_Call_Interface", Flag62 (Id));
7576 W ("Is_Remote_Types", Flag61 (Id));
7577 W ("Is_Renaming_Of_Object", Flag112 (Id));
7578 W ("Is_Return_Object", Flag209 (Id));
7579 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7580 W ("Is_Shared_Passive", Flag60 (Id));
7581 W ("Is_Statically_Allocated", Flag28 (Id));
7582 W ("Is_Tag", Flag78 (Id));
7583 W ("Is_Tagged_Type", Flag55 (Id));
7584 W ("Is_Thunk", Flag225 (Id));
7585 W ("Is_Trivial_Subprogram", Flag235 (Id));
7586 W ("Is_True_Constant", Flag163 (Id));
7587 W ("Is_Unchecked_Union", Flag117 (Id));
7588 W ("Is_Underlying_Record_View", Flag246 (Id));
7589 W ("Is_Unsigned_Type", Flag144 (Id));
7590 W ("Is_VMS_Exception", Flag133 (Id));
7591 W ("Is_Valued_Procedure", Flag127 (Id));
7592 W ("Is_Visible_Child_Unit", Flag116 (Id));
7593 W ("Is_Visible_Formal", Flag206 (Id));
7594 W ("Is_Volatile", Flag16 (Id));
7595 W ("Itype_Printed", Flag202 (Id));
7596 W ("Kill_Elaboration_Checks", Flag32 (Id));
7597 W ("Kill_Range_Checks", Flag33 (Id));
7598 W ("Kill_Tag_Checks", Flag34 (Id));
7599 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7600 W ("Low_Bound_Tested", Flag205 (Id));
7601 W ("Machine_Radix_10", Flag84 (Id));
7602 W ("Materialize_Entity", Flag168 (Id));
7603 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7604 W ("Must_Have_Preelab_Init", Flag208 (Id));
7605 W ("Needs_Debug_Info", Flag147 (Id));
7606 W ("Needs_No_Actuals", Flag22 (Id));
7607 W ("Never_Set_In_Source", Flag115 (Id));
7608 W ("No_Pool_Assigned", Flag131 (Id));
7609 W ("No_Return", Flag113 (Id));
7610 W ("No_Strict_Aliasing", Flag136 (Id));
7611 W ("Non_Binary_Modulus", Flag58 (Id));
7612 W ("Nonzero_Is_True", Flag162 (Id));
7613 W ("OK_To_Rename", Flag247 (Id));
7614 W ("OK_To_Reorder_Components", Flag239 (Id));
7615 W ("Optimize_Alignment_Space", Flag241 (Id));
7616 W ("Optimize_Alignment_Time", Flag242 (Id));
7617 W ("Overlays_Constant", Flag243 (Id));
7618 W ("Reachable", Flag49 (Id));
7619 W ("Referenced", Flag156 (Id));
7620 W ("Referenced_As_LHS", Flag36 (Id));
7621 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7622 W ("Renamed_In_Spec", Flag231 (Id));
7623 W ("Requires_Overriding", Flag213 (Id));
7624 W ("Return_Present", Flag54 (Id));
7625 W ("Returns_By_Ref", Flag90 (Id));
7626 W ("Reverse_Bit_Order", Flag164 (Id));
7627 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7628 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7629 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7630 W ("Static_Elaboration_Desired", Flag77 (Id));
7631 W ("Strict_Alignment", Flag145 (Id));
7632 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7633 W ("Suppress_Initialization", Flag105 (Id));
7634 W ("Suppress_Style_Checks", Flag165 (Id));
7635 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7636 W ("Treat_As_Volatile", Flag41 (Id));
7637 W ("Universal_Aliasing", Flag216 (Id));
7638 W ("Used_As_Generic_Actual", Flag222 (Id));
7639 W ("Uses_Sec_Stack", Flag95 (Id));
7640 W ("Warnings_Off", Flag96 (Id));
7641 W ("Warnings_Off_Used", Flag236 (Id));
7642 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7643 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7644 W ("Was_Hidden", Flag196 (Id));
7645 end Write_Entity_Flags;
7647 -----------------------
7648 -- Write_Entity_Info --
7649 -----------------------
7651 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7653 procedure Write_Attribute (Which : String; Nam : E);
7654 -- Write attribute value with given string name
7656 procedure Write_Kind (Id : Entity_Id);
7657 -- Write Ekind field of entity
7659 ---------------------
7660 -- Write_Attribute --
7661 ---------------------
7663 procedure Write_Attribute (Which : String; Nam : E) is
7667 Write_Int (Int (Nam));
7669 Write_Name (Chars (Nam));
7671 end Write_Attribute;
7677 procedure Write_Kind (Id : Entity_Id) is
7678 K : constant String := Entity_Kind'Image (Ekind (Id));
7682 Write_Str (" Kind ");
7684 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7685 Write_Str ("TAGGED ");
7688 Write_Str (K (3 .. K'Length));
7691 if Is_Type (Id) and then Depends_On_Private (Id) then
7692 Write_Str ("Depends_On_Private ");
7696 -- Start of processing for Write_Entity_Info
7700 Write_Attribute ("Name ", Id);
7701 Write_Int (Int (Id));
7705 Write_Attribute (" Type ", Etype (Id));
7707 Write_Attribute (" Scope ", Scope (Id));
7712 when Discrete_Kind =>
7713 Write_Str ("Bounds: Id = ");
7715 if Present (Scalar_Range (Id)) then
7716 Write_Int (Int (Type_Low_Bound (Id)));
7717 Write_Str (" .. Id = ");
7718 Write_Int (Int (Type_High_Bound (Id)));
7720 Write_Str ("Empty");
7731 (" Component Type ", Component_Type (Id));
7734 Write_Str (" Indexes ");
7736 Index := First_Index (Id);
7737 while Present (Index) loop
7738 Write_Attribute (" ", Etype (Index));
7739 Index := Next_Index (Index);
7747 (" Directly Designated Type ",
7748 Directly_Designated_Type (Id));
7751 when Overloadable_Kind =>
7752 if Present (Homonym (Id)) then
7753 Write_Str (" Homonym ");
7754 Write_Name (Chars (Homonym (Id)));
7756 Write_Int (Int (Homonym (Id)));
7763 if Ekind (Scope (Id)) in Record_Kind then
7765 " Original_Record_Component ",
7766 Original_Record_Component (Id));
7767 Write_Int (Int (Original_Record_Component (Id)));
7771 when others => null;
7773 end Write_Entity_Info;
7775 -----------------------
7776 -- Write_Field6_Name --
7777 -----------------------
7779 procedure Write_Field6_Name (Id : Entity_Id) is
7780 pragma Warnings (Off, Id);
7782 Write_Str ("First_Rep_Item");
7783 end Write_Field6_Name;
7785 -----------------------
7786 -- Write_Field7_Name --
7787 -----------------------
7789 procedure Write_Field7_Name (Id : Entity_Id) is
7790 pragma Warnings (Off, Id);
7792 Write_Str ("Freeze_Node");
7793 end Write_Field7_Name;
7795 -----------------------
7796 -- Write_Field8_Name --
7797 -----------------------
7799 procedure Write_Field8_Name (Id : Entity_Id) is
7803 Write_Str ("Associated_Node_For_Itype");
7806 Write_Str ("Dependent_Instances");
7809 Write_Str ("First_Exit_Statement");
7812 Write_Str ("Hiding_Loop_Variable");
7816 E_Subprogram_Body =>
7817 Write_Str ("Mechanism");
7821 Write_Str ("Normalized_First_Bit");
7824 Write_Str ("Postcondition_Proc");
7826 when E_Return_Statement =>
7827 Write_Str ("Return_Applies_To");
7830 Write_Str ("Field8??");
7832 end Write_Field8_Name;
7834 -----------------------
7835 -- Write_Field9_Name --
7836 -----------------------
7838 procedure Write_Field9_Name (Id : Entity_Id) is
7842 Write_Str ("Class_Wide_Type");
7845 Write_Str ("Current_Value");
7848 E_Generic_Function |
7850 E_Generic_Procedure |
7853 Write_Str ("Renaming_Map");
7856 Write_Str ("Field9??");
7858 end Write_Field9_Name;
7860 ------------------------
7861 -- Write_Field10_Name --
7862 ------------------------
7864 procedure Write_Field10_Name (Id : Entity_Id) is
7867 when Class_Wide_Kind |
7873 Write_Str ("Direct_Primitive_Operations");
7876 Write_Str ("Float_Rep");
7878 when E_In_Parameter |
7880 Write_Str ("Discriminal_Link");
7886 Write_Str ("Handler_Records");
7890 Write_Str ("Normalized_Position_Max");
7893 Write_Str ("Field10??");
7895 end Write_Field10_Name;
7897 ------------------------
7898 -- Write_Field11_Name --
7899 ------------------------
7901 procedure Write_Field11_Name (Id : Entity_Id) is
7905 Write_Str ("Block_Node");
7909 Write_Str ("Component_Bit_Offset");
7912 Write_Str ("Entry_Component");
7914 when E_Enumeration_Literal =>
7915 Write_Str ("Enumeration_Pos");
7919 Write_Str ("Full_View");
7921 when E_Generic_Package =>
7922 Write_Str ("Generic_Homonym");
7928 Write_Str ("Protected_Body_Subprogram");
7931 Write_Str ("Field11??");
7933 end Write_Field11_Name;
7935 ------------------------
7936 -- Write_Field12_Name --
7937 ------------------------
7939 procedure Write_Field12_Name (Id : Entity_Id) is
7943 Write_Str ("Associated_Formal_Package");
7946 Write_Str ("Barrier_Function");
7948 when E_Enumeration_Literal =>
7949 Write_Str ("Enumeration_Rep");
7957 E_In_Out_Parameter |
7961 Write_Str ("Esize");
7965 Write_Str ("Next_Inlined_Subprogram");
7968 Write_Str ("Field12??");
7970 end Write_Field12_Name;
7972 ------------------------
7973 -- Write_Field13_Name --
7974 ------------------------
7976 procedure Write_Field13_Name (Id : Entity_Id) is
7981 Write_Str ("Component_Clause");
7984 if not Comes_From_Source (Id)
7986 Chars (Id) = Name_Op_Ne
7988 Write_Str ("Corresponding_Equality");
7990 elsif Comes_From_Source (Id) then
7991 Write_Str ("Elaboration_Entity");
7994 Write_Str ("Field13??");
7999 Generic_Unit_Kind =>
8000 Write_Str ("Elaboration_Entity");
8004 Write_Str ("Extra_Accessibility");
8007 Write_Str ("RM_Size");
8010 Write_Str ("Field13??");
8012 end Write_Field13_Name;
8014 -----------------------
8015 -- Write_Field14_Name --
8016 -----------------------
8018 procedure Write_Field14_Name (Id : Entity_Id) is
8027 Write_Str ("Alignment");
8031 Write_Str ("First_Optional_Parameter");
8035 Write_Str ("Normalized_Position");
8038 E_Generic_Package =>
8039 Write_Str ("Shadow_Entities");
8042 Write_Str ("Field14??");
8044 end Write_Field14_Name;
8046 ------------------------
8047 -- Write_Field15_Name --
8048 ------------------------
8050 procedure Write_Field15_Name (Id : Entity_Id) is
8053 when E_Discriminant =>
8054 Write_Str ("Discriminant_Number");
8057 Write_Str ("DT_Entry_Count");
8061 Write_Str ("DT_Position");
8063 when E_Protected_Type =>
8064 Write_Str ("Entry_Bodies_Array");
8067 Write_Str ("Entry_Parameters_Type");
8070 Write_Str ("Extra_Formal");
8072 when Enumeration_Kind =>
8073 Write_Str ("Lit_Indexes");
8077 Write_Str ("Related_Instance");
8081 Write_Str ("Return_Flag_Or_Transient_Decl");
8083 when Decimal_Fixed_Point_Kind =>
8084 Write_Str ("Scale_Value");
8088 Write_Str ("Storage_Size_Variable");
8090 when E_String_Literal_Subtype =>
8091 Write_Str ("String_Literal_Low_Bound");
8094 Write_Str ("Field15??");
8096 end Write_Field15_Name;
8098 ------------------------
8099 -- Write_Field16_Name --
8100 ------------------------
8102 procedure Write_Field16_Name (Id : Entity_Id) is
8105 when E_Record_Type |
8106 E_Record_Type_With_Private =>
8107 Write_Str ("Access_Disp_Table");
8109 when E_Record_Subtype |
8110 E_Class_Wide_Subtype =>
8111 Write_Str ("Cloned_Subtype");
8115 Write_Str ("DTC_Entity");
8118 Write_Str ("Entry_Formal");
8123 Write_Str ("First_Private_Entity");
8125 when Enumeration_Kind =>
8126 Write_Str ("Lit_Strings");
8128 when E_String_Literal_Subtype =>
8129 Write_Str ("String_Literal_Length");
8133 Write_Str ("Unset_Reference");
8136 Write_Str ("Field16??");
8138 end Write_Field16_Name;
8140 ------------------------
8141 -- Write_Field17_Name --
8142 ------------------------
8144 procedure Write_Field17_Name (Id : Entity_Id) is
8149 E_Generic_In_Out_Parameter |
8151 Write_Str ("Actual_Subtype");
8154 Write_Str ("Digits_Value");
8156 when E_Discriminant =>
8157 Write_Str ("Discriminal");
8166 E_Generic_Function |
8168 E_Generic_Procedure |
8176 E_Return_Statement |
8178 E_Subprogram_Type =>
8179 Write_Str ("First_Entity");
8182 Write_Str ("First_Index");
8184 when Enumeration_Kind =>
8185 Write_Str ("First_Literal");
8188 Write_Str ("Master_Id");
8190 when Modular_Integer_Kind =>
8191 Write_Str ("Modulus");
8193 when E_Incomplete_Type =>
8194 Write_Str ("Non_Limited_View");
8196 when E_Incomplete_Subtype =>
8197 if From_With_Type (Id) then
8198 Write_Str ("Non_Limited_View");
8202 Write_Str ("Prival");
8205 Write_Str ("Field17??");
8207 end Write_Field17_Name;
8209 ------------------------
8210 -- Write_Field18_Name --
8211 ------------------------
8213 procedure Write_Field18_Name (Id : Entity_Id) is
8216 when E_Enumeration_Literal |
8220 Write_Str ("Alias");
8222 when E_Record_Type =>
8223 Write_Str ("Corresponding_Concurrent_Type");
8225 when E_Subprogram_Body =>
8226 Write_Str ("Corresponding_Protected_Entry");
8228 when Concurrent_Kind =>
8229 Write_Str ("Corresponding_Record_Type");
8234 Write_Str ("Enclosing_Scope");
8236 when E_Entry_Index_Parameter =>
8237 Write_Str ("Entry_Index_Constant");
8239 when E_Class_Wide_Subtype |
8240 E_Access_Protected_Subprogram_Type |
8241 E_Anonymous_Access_Protected_Subprogram_Type |
8242 E_Access_Subprogram_Type |
8244 Write_Str ("Equivalent_Type");
8246 when Fixed_Point_Kind =>
8247 Write_Str ("Delta_Value");
8249 when Incomplete_Or_Private_Kind |
8251 Write_Str ("Private_Dependents");
8254 Write_Str ("Renamed_Object");
8258 E_Generic_Function |
8259 E_Generic_Procedure |
8260 E_Generic_Package =>
8261 Write_Str ("Renamed_Entity");
8264 Write_Str ("Field18??");
8266 end Write_Field18_Name;
8268 -----------------------
8269 -- Write_Field19_Name --
8270 -----------------------
8272 procedure Write_Field19_Name (Id : Entity_Id) is
8276 E_Generic_Package =>
8277 Write_Str ("Body_Entity");
8279 when E_Discriminant =>
8280 Write_Str ("Corresponding_Discriminant");
8282 when E_Record_Type =>
8283 Write_Str ("Parent_Subtype");
8287 Write_Str ("Related_Array_Object");
8291 Write_Str ("Size_Check_Code");
8293 when E_Package_Body |
8295 Write_Str ("Spec_Entity");
8297 when Private_Kind =>
8298 Write_Str ("Underlying_Full_View");
8301 Write_Str ("Field19??");
8303 end Write_Field19_Name;
8305 -----------------------
8306 -- Write_Field20_Name --
8307 -----------------------
8309 procedure Write_Field20_Name (Id : Entity_Id) is
8313 Write_Str ("Component_Type");
8315 when E_In_Parameter |
8316 E_Generic_In_Parameter =>
8317 Write_Str ("Default_Value");
8320 Write_Str ("Directly_Designated_Type");
8323 Write_Str ("Discriminant_Checking_Func");
8325 when E_Discriminant =>
8326 Write_Str ("Discriminant_Default_Value");
8335 E_Generic_Function |
8337 E_Generic_Procedure |
8345 E_Return_Statement |
8347 E_Subprogram_Type =>
8348 Write_Str ("Last_Entity");
8352 Write_Str ("Prival_Link");
8355 Write_Str ("Scalar_Range");
8358 Write_Str ("Register_Exception_Call");
8361 Write_Str ("Field20??");
8363 end Write_Field20_Name;
8365 -----------------------
8366 -- Write_Field21_Name --
8367 -----------------------
8369 procedure Write_Field21_Name (Id : Entity_Id) is
8373 Write_Str ("Accept_Address");
8375 when E_In_Parameter =>
8376 Write_Str ("Default_Expr_Function");
8378 when Concurrent_Kind |
8379 Incomplete_Or_Private_Kind |
8383 Write_Str ("Discriminant_Constraint");
8388 E_Generic_Function |
8390 E_Generic_Procedure |
8392 Write_Str ("Interface_Name");
8395 Modular_Integer_Kind =>
8396 Write_Str ("Original_Array_Type");
8398 when Fixed_Point_Kind =>
8399 Write_Str ("Small_Value");
8402 Write_Str ("Field21??");
8404 end Write_Field21_Name;
8406 -----------------------
8407 -- Write_Field22_Name --
8408 -----------------------
8410 procedure Write_Field22_Name (Id : Entity_Id) is
8414 Write_Str ("Associated_Storage_Pool");
8417 Write_Str ("Component_Size");
8419 when E_Record_Type =>
8420 Write_Str ("Corresponding_Remote_Type");
8424 Write_Str ("Original_Record_Component");
8426 when E_Enumeration_Literal =>
8427 Write_Str ("Enumeration_Rep_Expr");
8430 Write_Str ("Exception_Code");
8432 when E_Record_Type_With_Private |
8433 E_Record_Subtype_With_Private |
8436 E_Limited_Private_Type |
8437 E_Limited_Private_Subtype =>
8438 Write_Str ("Private_View");
8441 Write_Str ("Protected_Formal");
8451 E_Generic_Function |
8452 E_Generic_Procedure |
8455 E_Return_Statement |
8458 Write_Str ("Scope_Depth_Value");
8461 Write_Str ("Shared_Var_Procs_Instance");
8464 Write_Str ("Field22??");
8466 end Write_Field22_Name;
8468 ------------------------
8469 -- Write_Field23_Name --
8470 ------------------------
8472 procedure Write_Field23_Name (Id : Entity_Id) is
8476 Write_Str ("Associated_Collection");
8478 when E_Discriminant =>
8479 Write_Str ("CR_Discriminant");
8482 Write_Str ("Entry_Cancel_Parameter");
8484 when E_Enumeration_Type =>
8485 Write_Str ("Enum_Pos_To_Rep");
8489 Write_Str ("Extra_Constrained");
8491 when E_Generic_Function |
8493 E_Generic_Procedure =>
8494 Write_Str ("Inner_Instances");
8497 Write_Str ("Packed_Array_Type");
8500 Write_Str ("Protection_Object");
8502 when Concurrent_Kind |
8503 Incomplete_Or_Private_Kind |
8507 Write_Str ("Stored_Constraint");
8511 if Present (Scope (Id))
8512 and then Is_Protected_Type (Scope (Id))
8514 Write_Str ("Protection_Object");
8516 Write_Str ("Generic_Renamings");
8520 if Is_Generic_Instance (Id) then
8521 Write_Str ("Generic_Renamings");
8523 Write_Str ("Limited_View");
8527 Write_Str ("Field23??");
8529 end Write_Field23_Name;
8531 ------------------------
8532 -- Write_Field24_Name --
8533 ------------------------
8535 procedure Write_Field24_Name (Id : Entity_Id) is
8540 Write_Str ("Finalizer");
8545 Write_Str ("Related_Expression");
8550 Generic_Subprogram_Kind =>
8551 Write_Str ("Contract");
8554 Write_Str ("Field24???");
8556 end Write_Field24_Name;
8558 ------------------------
8559 -- Write_Field25_Name --
8560 ------------------------
8562 procedure Write_Field25_Name (Id : Entity_Id) is
8566 Write_Str ("Debug_Renaming_Link");
8569 Write_Str ("DT_Offset_To_Top_Func");
8573 Write_Str ("Interface_Alias");
8575 when E_Record_Type |
8577 E_Record_Type_With_Private |
8578 E_Record_Subtype_With_Private =>
8579 Write_Str ("Interfaces");
8582 Write_Str ("Task_Body_Procedure");
8586 Write_Str ("PPC_Wrapper");
8588 when E_Enumeration_Subtype |
8589 E_Modular_Integer_Subtype |
8590 E_Signed_Integer_Subtype =>
8591 Write_Str ("Static_Predicate");
8594 Write_Str ("Field25??");
8596 end Write_Field25_Name;
8598 ------------------------
8599 -- Write_Field26_Name --
8600 ------------------------
8602 procedure Write_Field26_Name (Id : Entity_Id) is
8605 when E_Record_Type |
8606 E_Record_Type_With_Private =>
8607 Write_Str ("Dispatch_Table_Wrappers");
8609 when E_In_Out_Parameter |
8612 Write_Str ("Last_Assignment");
8614 when E_Access_Subprogram_Type =>
8615 Write_Str ("Original_Access_Type");
8617 when E_Generic_Package |
8619 Write_Str ("Package_Instantiation");
8623 Write_Str ("Related_Type");
8626 Write_Str ("Relative_Deadline_Variable");
8630 if Ekind (Id) = E_Procedure
8631 and then not Is_Dispatching_Operation (Id)
8633 Write_Str ("Static_Initialization");
8635 Write_Str ("Overridden_Operation");
8639 Write_Str ("Field26??");
8641 end Write_Field26_Name;
8643 ------------------------
8644 -- Write_Field27_Name --
8645 ------------------------
8647 procedure Write_Field27_Name (Id : Entity_Id) is
8652 Write_Str ("Current_Use_Clause");
8657 Write_Str ("Related_Type");
8660 Write_Str ("Wrapped_Entity");
8663 Write_Str ("Field27??");
8665 end Write_Field27_Name;
8667 ------------------------
8668 -- Write_Field28_Name --
8669 ------------------------
8671 procedure Write_Field28_Name (Id : Entity_Id) is
8677 Write_Str ("Extra_Formals");
8679 when E_Record_Type =>
8680 Write_Str ("Underlying_Record_View");
8683 Write_Str ("Field28??");
8685 end Write_Field28_Name;
8687 procedure Write_Field29_Name (Id : Entity_Id) is
8691 Write_Str ("Subprograms_For_Type");
8694 Write_Str ("Field29??");
8696 end Write_Field29_Name;
8698 -------------------------
8699 -- Iterator Procedures --
8700 -------------------------
8702 procedure Proc_Next_Component (N : in out Node_Id) is
8704 N := Next_Component (N);
8705 end Proc_Next_Component;
8707 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8709 N := Next_Entity (N);
8710 while Present (N) loop
8711 exit when Ekind_In (N, E_Component, E_Discriminant);
8712 N := Next_Entity (N);
8714 end Proc_Next_Component_Or_Discriminant;
8716 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8718 N := Next_Discriminant (N);
8719 end Proc_Next_Discriminant;
8721 procedure Proc_Next_Formal (N : in out Node_Id) is
8723 N := Next_Formal (N);
8724 end Proc_Next_Formal;
8726 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8728 N := Next_Formal_With_Extras (N);
8729 end Proc_Next_Formal_With_Extras;
8731 procedure Proc_Next_Index (N : in out Node_Id) is
8733 N := Next_Index (N);
8734 end Proc_Next_Index;
8736 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8738 N := Next_Inlined_Subprogram (N);
8739 end Proc_Next_Inlined_Subprogram;
8741 procedure Proc_Next_Literal (N : in out Node_Id) is
8743 N := Next_Literal (N);
8744 end Proc_Next_Literal;
8746 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8748 N := Next_Stored_Discriminant (N);
8749 end Proc_Next_Stored_Discriminant;