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
212 -- Spec_PPC_List Node24
214 -- Interface_Alias Node25
215 -- Interfaces Elist25
216 -- Debug_Renaming_Link Node25
217 -- DT_Offset_To_Top_Func Node25
218 -- PPC_Wrapper Node25
219 -- Static_Predicate List25
220 -- Task_Body_Procedure Node25
222 -- Dispatch_Table_Wrappers Elist26
223 -- Last_Assignment Node26
224 -- Original_Access_Type Node26
225 -- Overridden_Operation Node26
226 -- Package_Instantiation Node26
227 -- Relative_Deadline_Variable Node26
228 -- Static_Initialization Node26
230 -- Current_Use_Clause Node27
231 -- Related_Type Node27
232 -- Wrapped_Entity Node27
234 -- Extra_Formals Node28
235 -- Underlying_Record_View Node28
237 -- Subprograms_For_Type Node29
239 ---------------------------------------------
240 -- Usage of Flags in Defining Entity Nodes --
241 ---------------------------------------------
243 -- All flags are unique, there is no overlaying, so each flag is physically
244 -- present in every entity. However, for many of the flags, it only makes
245 -- sense for them to be set true for certain subsets of entity kinds. See
246 -- the spec of Einfo for further details.
248 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
251 -- Has_Discriminants Flag5
252 -- Is_Dispatching_Operation Flag6
253 -- Is_Immediately_Visible Flag7
255 -- Is_Potentially_Use_Visible Flag9
259 -- Is_Constrained Flag12
260 -- Is_Generic_Type Flag13
261 -- Depends_On_Private Flag14
263 -- Is_Volatile Flag16
264 -- Is_Internal Flag17
265 -- Has_Delayed_Freeze Flag18
266 -- Is_Abstract_Subprogram Flag19
267 -- Is_Concurrent_Record_Type Flag20
269 -- Has_Master_Entity Flag21
270 -- Needs_No_Actuals Flag22
271 -- Has_Storage_Size_Clause Flag23
272 -- Is_Imported Flag24
273 -- Is_Limited_Record Flag25
274 -- Has_Completion Flag26
275 -- Has_Pragma_Controlled Flag27
276 -- Is_Statically_Allocated Flag28
277 -- Has_Size_Clause Flag29
280 -- Checks_May_Be_Suppressed Flag31
281 -- Kill_Elaboration_Checks Flag32
282 -- Kill_Range_Checks Flag33
283 -- Kill_Tag_Checks Flag34
284 -- Is_Class_Wide_Equivalent_Type Flag35
285 -- Referenced_As_LHS Flag36
286 -- Is_Known_Non_Null Flag37
287 -- Can_Never_Be_Null Flag38
288 -- Has_Default_Aspect Flag39
289 -- Body_Needed_For_SAL Flag40
291 -- Treat_As_Volatile Flag41
292 -- Is_Controlled Flag42
293 -- Has_Controlled_Component Flag43
295 -- In_Private_Part Flag45
296 -- Has_Alignment_Clause Flag46
298 -- In_Package_Body Flag48
300 -- Delay_Subprogram_Descriptors Flag50
303 -- Is_Entry_Formal Flag52
304 -- Is_Private_Descendant Flag53
305 -- Return_Present Flag54
306 -- Is_Tagged_Type Flag55
307 -- Has_Homonym Flag56
309 -- Non_Binary_Modulus Flag58
310 -- Is_Preelaborated Flag59
311 -- Is_Shared_Passive Flag60
313 -- Is_Remote_Types Flag61
314 -- Is_Remote_Call_Interface Flag62
315 -- Is_Character_Type Flag63
316 -- Is_Intrinsic_Subprogram Flag64
317 -- Has_Record_Rep_Clause Flag65
318 -- Has_Enumeration_Rep_Clause Flag66
319 -- Has_Small_Clause Flag67
320 -- Has_Component_Size_Clause Flag68
321 -- Is_Access_Constant Flag69
322 -- Is_First_Subtype Flag70
324 -- Has_Completion_In_Body Flag71
325 -- Has_Unknown_Discriminants Flag72
326 -- Is_Child_Unit Flag73
327 -- Is_CPP_Class Flag74
328 -- Has_Non_Standard_Rep Flag75
329 -- Is_Constructor Flag76
330 -- Static_Elaboration_Desired Flag77
332 -- Has_All_Calls_Remote Flag79
333 -- Is_Constr_Subt_For_U_Nominal Flag80
335 -- Is_Asynchronous Flag81
336 -- Has_Gigi_Rep_Item Flag82
337 -- Has_Machine_Radix_Clause Flag83
338 -- Machine_Radix_10 Flag84
340 -- Has_Atomic_Components Flag86
341 -- Has_Volatile_Components Flag87
342 -- Discard_Names Flag88
343 -- Is_Interrupt_Handler Flag89
344 -- Returns_By_Ref Flag90
347 -- Size_Known_At_Compile_Time Flag92
348 -- Has_Subprogram_Descriptor Flag93
349 -- Is_Generic_Actual_Type Flag94
350 -- Uses_Sec_Stack Flag95
351 -- Warnings_Off Flag96
352 -- Is_Controlling_Formal Flag97
353 -- Has_Controlling_Result Flag98
354 -- Is_Exported Flag99
355 -- Has_Specified_Layout Flag100
357 -- Has_Nested_Block_With_Handler Flag101
359 -- Is_Completely_Hidden Flag103
360 -- Address_Taken Flag104
361 -- Suppress_Initialization Flag105
362 -- Is_Limited_Composite Flag106
363 -- Is_Private_Composite Flag107
364 -- Default_Expressions_Processed Flag108
365 -- Is_Non_Static_Subtype Flag109
366 -- Has_External_Tag_Rep_Clause Flag110
368 -- Is_Formal_Subprogram Flag111
369 -- Is_Renaming_Of_Object Flag112
371 -- Delay_Cleanups Flag114
372 -- Never_Set_In_Source Flag115
373 -- Is_Visible_Child_Unit Flag116
374 -- Is_Unchecked_Union Flag117
375 -- Is_For_Access_Subtype Flag118
376 -- Has_Convention_Pragma Flag119
377 -- Has_Primitive_Operations Flag120
379 -- Has_Pragma_Pack Flag121
380 -- Is_Bit_Packed_Array Flag122
381 -- Has_Unchecked_Union Flag123
382 -- Is_Eliminated Flag124
383 -- C_Pass_By_Copy Flag125
384 -- Is_Instantiated Flag126
385 -- Is_Valued_Procedure Flag127
386 -- (used for Component_Alignment) Flag128
387 -- (used for Component_Alignment) Flag129
388 -- Is_Generic_Instance Flag130
390 -- No_Pool_Assigned Flag131
391 -- Is_AST_Entry Flag132
392 -- Is_VMS_Exception Flag133
393 -- Is_Optional_Parameter Flag134
394 -- Has_Aliased_Components Flag135
395 -- No_Strict_Aliasing Flag136
396 -- Is_Machine_Code_Subprogram Flag137
397 -- Is_Packed_Array_Type Flag138
398 -- Has_Biased_Representation Flag139
399 -- Has_Complex_Representation Flag140
401 -- Is_Constr_Subt_For_UN_Aliased Flag141
402 -- Has_Missing_Return Flag142
403 -- Has_Recursive_Call Flag143
404 -- Is_Unsigned_Type Flag144
405 -- Strict_Alignment Flag145
406 -- Is_Abstract_Type Flag146
407 -- Needs_Debug_Info Flag147
408 -- Suppress_Elaboration_Warnings Flag148
409 -- Is_Compilation_Unit Flag149
410 -- Has_Pragma_Elaborate_Body Flag150
412 -- Entry_Accepted Flag152
413 -- Is_Obsolescent Flag153
414 -- Has_Per_Object_Constraint Flag154
415 -- Has_Private_Declaration Flag155
416 -- Referenced Flag156
417 -- Has_Pragma_Inline Flag157
418 -- Finalize_Storage_Only Flag158
419 -- From_With_Type Flag159
420 -- Is_Package_Body_Entity Flag160
422 -- Has_Qualified_Name Flag161
423 -- Nonzero_Is_True Flag162
424 -- Is_True_Constant Flag163
425 -- Reverse_Bit_Order Flag164
426 -- Suppress_Style_Checks Flag165
427 -- Debug_Info_Off Flag166
428 -- Sec_Stack_Needed_For_Return Flag167
429 -- Materialize_Entity Flag168
430 -- Has_Pragma_Thread_Local_Storage Flag169
431 -- Is_Known_Valid Flag170
433 -- Is_Hidden_Open_Scope Flag171
434 -- Has_Object_Size_Clause Flag172
435 -- Has_Fully_Qualified_Name Flag173
436 -- Elaboration_Entity_Required Flag174
437 -- Has_Forward_Instantiation Flag175
438 -- Is_Discrim_SO_Function Flag176
439 -- Size_Depends_On_Discriminant Flag177
440 -- Is_Null_Init_Proc Flag178
441 -- Has_Pragma_Pure_Function Flag179
442 -- Has_Pragma_Unreferenced Flag180
444 -- Has_Contiguous_Rep Flag181
445 -- Has_Xref_Entry Flag182
446 -- Must_Be_On_Byte_Boundary Flag183
447 -- Has_Stream_Size_Clause Flag184
448 -- Is_Ada_2005_Only Flag185
449 -- Is_Interface Flag186
450 -- Has_Constrained_Partial_View Flag187
451 -- Has_Persistent_BSS Flag188
452 -- Is_Pure_Unit_Access_Type Flag189
453 -- Has_Specified_Stream_Input Flag190
455 -- Has_Specified_Stream_Output Flag191
456 -- Has_Specified_Stream_Read Flag192
457 -- Has_Specified_Stream_Write Flag193
458 -- Is_Local_Anonymous_Access Flag194
459 -- Is_Primitive_Wrapper Flag195
460 -- Was_Hidden Flag196
461 -- Is_Limited_Interface Flag197
462 -- Has_Pragma_Ordered Flag198
463 -- Is_Ada_2012_Only Flag199
465 -- Has_Delayed_Aspects Flag200
466 -- Has_Anon_Block_Suffix Flag201
467 -- Itype_Printed Flag202
468 -- Has_Pragma_Pure Flag203
469 -- Is_Known_Null Flag204
470 -- Low_Bound_Tested Flag205
471 -- Is_Visible_Formal Flag206
472 -- Known_To_Have_Preelab_Init Flag207
473 -- Must_Have_Preelab_Init Flag208
474 -- Is_Return_Object Flag209
475 -- Elaborate_Body_Desirable Flag210
477 -- Has_Static_Discriminants Flag211
478 -- Has_Pragma_Unreferenced_Objects Flag212
479 -- Requires_Overriding Flag213
481 -- Has_Up_Level_Access Flag215
482 -- Universal_Aliasing Flag216
483 -- Suppress_Value_Tracking_On_Call Flag217
484 -- Is_Primitive Flag218
485 -- Has_Initial_Value Flag219
486 -- Has_Dispatch_Table Flag220
488 -- Has_Pragma_Preelab_Init Flag221
489 -- Used_As_Generic_Actual Flag222
490 -- Is_Descendent_Of_Address Flag223
493 -- Is_Only_Out_Parameter Flag226
494 -- Referenced_As_Out_Parameter Flag227
495 -- Has_Thunks Flag228
496 -- Can_Use_Internal_Rep Flag229
497 -- Has_Pragma_Inline_Always Flag230
499 -- Renamed_In_Spec Flag231
500 -- Has_Invariants Flag232
501 -- Has_Pragma_Unmodified Flag233
502 -- Is_Dispatch_Table_Entity Flag234
503 -- Is_Trivial_Subprogram Flag235
504 -- Warnings_Off_Used Flag236
505 -- Warnings_Off_Used_Unmodified Flag237
506 -- Warnings_Off_Used_Unreferenced Flag238
507 -- OK_To_Reorder_Components Flag239
508 -- Has_Postconditions Flag240
510 -- Optimize_Alignment_Space Flag241
511 -- Optimize_Alignment_Time Flag242
512 -- Overlays_Constant Flag243
513 -- Is_RACW_Stub_Type Flag244
514 -- Is_Private_Primitive Flag245
515 -- Is_Underlying_Record_View Flag246
516 -- OK_To_Rename Flag247
517 -- Has_Inheritable_Invariants Flag248
518 -- Is_Safe_To_Reevaluate Flag249
519 -- Has_Predicates Flag250
521 -- Is_Processed_Transient Flag252
522 -- 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 Entry_Parameters_Type (Id : E) return E is
987 end Entry_Parameters_Type;
989 function Enum_Pos_To_Rep (Id : E) return E is
991 pragma Assert (Ekind (Id) = E_Enumeration_Type);
995 function Enumeration_Pos (Id : E) return Uint is
997 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1001 function Enumeration_Rep (Id : E) return U is
1003 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1005 end Enumeration_Rep;
1007 function Enumeration_Rep_Expr (Id : E) return N is
1009 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1011 end Enumeration_Rep_Expr;
1013 function Equivalent_Type (Id : E) return E is
1016 (Ekind_In (Id, E_Class_Wide_Type,
1017 E_Class_Wide_Subtype,
1018 E_Access_Protected_Subprogram_Type,
1019 E_Anonymous_Access_Protected_Subprogram_Type,
1020 E_Access_Subprogram_Type,
1023 end Equivalent_Type;
1025 function Esize (Id : E) return Uint is
1030 function Exception_Code (Id : E) return Uint is
1032 pragma Assert (Ekind (Id) = E_Exception);
1036 function Extra_Accessibility (Id : E) return E is
1038 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1040 end Extra_Accessibility;
1042 function Extra_Constrained (Id : E) return E is
1044 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1046 end Extra_Constrained;
1048 function Extra_Formal (Id : E) return E is
1053 function Extra_Formals (Id : E) return E is
1056 (Is_Overloadable (Id)
1057 or else Ekind_In (Id, E_Entry_Family,
1059 E_Subprogram_Type));
1063 function Can_Use_Internal_Rep (Id : E) return B is
1065 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1066 return Flag229 (Base_Type (Id));
1067 end Can_Use_Internal_Rep;
1069 function Finalize_Storage_Only (Id : E) return B is
1071 pragma Assert (Is_Type (Id));
1072 return Flag158 (Base_Type (Id));
1073 end Finalize_Storage_Only;
1075 function Finalizer (Id : E) return E is
1078 (Ekind (Id) = E_Package
1079 or else Ekind (Id) = E_Package_Body);
1083 function First_Entity (Id : E) return E is
1088 function First_Exit_Statement (Id : E) return N is
1090 pragma Assert (Ekind (Id) = E_Loop);
1092 end First_Exit_Statement;
1094 function First_Index (Id : E) return N is
1096 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1100 function First_Literal (Id : E) return E is
1102 pragma Assert (Is_Enumeration_Type (Id));
1106 function First_Optional_Parameter (Id : E) return E is
1108 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1110 end First_Optional_Parameter;
1112 function First_Private_Entity (Id : E) return E is
1114 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1115 or else Ekind (Id) in Concurrent_Kind);
1117 end First_Private_Entity;
1119 function First_Rep_Item (Id : E) return E is
1124 function Freeze_Node (Id : E) return N is
1129 function From_With_Type (Id : E) return B is
1131 return Flag159 (Id);
1134 function Full_View (Id : E) return E is
1136 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1140 function Generic_Homonym (Id : E) return E is
1142 pragma Assert (Ekind (Id) = E_Generic_Package);
1144 end Generic_Homonym;
1146 function Generic_Renamings (Id : E) return L is
1148 return Elist23 (Id);
1149 end Generic_Renamings;
1151 function Handler_Records (Id : E) return S is
1154 end Handler_Records;
1156 function Has_Aliased_Components (Id : E) return B is
1158 return Flag135 (Implementation_Base_Type (Id));
1159 end Has_Aliased_Components;
1161 function Has_Alignment_Clause (Id : E) return B is
1164 end Has_Alignment_Clause;
1166 function Has_All_Calls_Remote (Id : E) return B is
1169 end Has_All_Calls_Remote;
1171 function Has_Anon_Block_Suffix (Id : E) return B is
1173 return Flag201 (Id);
1174 end Has_Anon_Block_Suffix;
1176 function Has_Atomic_Components (Id : E) return B is
1178 return Flag86 (Implementation_Base_Type (Id));
1179 end Has_Atomic_Components;
1181 function Has_Biased_Representation (Id : E) return B is
1183 return Flag139 (Id);
1184 end Has_Biased_Representation;
1186 function Has_Completion (Id : E) return B is
1191 function Has_Completion_In_Body (Id : E) return B is
1193 pragma Assert (Is_Type (Id));
1195 end Has_Completion_In_Body;
1197 function Has_Complex_Representation (Id : E) return B is
1199 pragma Assert (Is_Type (Id));
1200 return Flag140 (Implementation_Base_Type (Id));
1201 end Has_Complex_Representation;
1203 function Has_Component_Size_Clause (Id : E) return B is
1205 pragma Assert (Is_Array_Type (Id));
1206 return Flag68 (Implementation_Base_Type (Id));
1207 end Has_Component_Size_Clause;
1209 function Has_Constrained_Partial_View (Id : E) return B is
1211 pragma Assert (Is_Type (Id));
1212 return Flag187 (Id);
1213 end Has_Constrained_Partial_View;
1215 function Has_Controlled_Component (Id : E) return B is
1217 return Flag43 (Base_Type (Id));
1218 end Has_Controlled_Component;
1220 function Has_Contiguous_Rep (Id : E) return B is
1222 return Flag181 (Id);
1223 end Has_Contiguous_Rep;
1225 function Has_Controlling_Result (Id : E) return B is
1228 end Has_Controlling_Result;
1230 function Has_Convention_Pragma (Id : E) return B is
1232 return Flag119 (Id);
1233 end Has_Convention_Pragma;
1235 function Has_Default_Aspect (Id : E) return B is
1237 return Flag39 (Base_Type (Id));
1238 end Has_Default_Aspect;
1240 function Has_Delayed_Aspects (Id : E) return B is
1242 pragma Assert (Nkind (Id) in N_Entity);
1243 return Flag200 (Id);
1244 end Has_Delayed_Aspects;
1246 function Has_Delayed_Freeze (Id : E) return B is
1248 pragma Assert (Nkind (Id) in N_Entity);
1250 end Has_Delayed_Freeze;
1252 function Has_Discriminants (Id : E) return B is
1254 pragma Assert (Nkind (Id) in N_Entity);
1256 end Has_Discriminants;
1258 function Has_Dispatch_Table (Id : E) return B is
1260 pragma Assert (Is_Tagged_Type (Id));
1261 return Flag220 (Id);
1262 end Has_Dispatch_Table;
1264 function Has_Enumeration_Rep_Clause (Id : E) return B is
1266 pragma Assert (Is_Enumeration_Type (Id));
1268 end Has_Enumeration_Rep_Clause;
1270 function Has_Exit (Id : E) return B is
1275 function Has_External_Tag_Rep_Clause (Id : E) return B is
1277 pragma Assert (Is_Tagged_Type (Id));
1278 return Flag110 (Id);
1279 end Has_External_Tag_Rep_Clause;
1281 function Has_Forward_Instantiation (Id : E) return B is
1283 return Flag175 (Id);
1284 end Has_Forward_Instantiation;
1286 function Has_Fully_Qualified_Name (Id : E) return B is
1288 return Flag173 (Id);
1289 end Has_Fully_Qualified_Name;
1291 function Has_Gigi_Rep_Item (Id : E) return B is
1294 end Has_Gigi_Rep_Item;
1296 function Has_Homonym (Id : E) return B is
1301 function Has_Inheritable_Invariants (Id : E) return B is
1303 pragma Assert (Is_Type (Id));
1304 return Flag248 (Id);
1305 end Has_Inheritable_Invariants;
1307 function Has_Initial_Value (Id : E) return B is
1309 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1310 return Flag219 (Id);
1311 end Has_Initial_Value;
1313 function Has_Invariants (Id : E) return B is
1315 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Procedure);
1316 return Flag232 (Id);
1319 function Has_Machine_Radix_Clause (Id : E) return B is
1321 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1323 end Has_Machine_Radix_Clause;
1325 function Has_Master_Entity (Id : E) return B is
1328 end Has_Master_Entity;
1330 function Has_Missing_Return (Id : E) return B is
1332 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1333 return Flag142 (Id);
1334 end Has_Missing_Return;
1336 function Has_Nested_Block_With_Handler (Id : E) return B is
1338 return Flag101 (Id);
1339 end Has_Nested_Block_With_Handler;
1341 function Has_Non_Standard_Rep (Id : E) return B is
1343 return Flag75 (Implementation_Base_Type (Id));
1344 end Has_Non_Standard_Rep;
1346 function Has_Object_Size_Clause (Id : E) return B is
1348 pragma Assert (Is_Type (Id));
1349 return Flag172 (Id);
1350 end Has_Object_Size_Clause;
1352 function Has_Per_Object_Constraint (Id : E) return B is
1354 return Flag154 (Id);
1355 end Has_Per_Object_Constraint;
1357 function Has_Persistent_BSS (Id : E) return B is
1359 return Flag188 (Id);
1360 end Has_Persistent_BSS;
1362 function Has_Postconditions (Id : E) return B is
1364 pragma Assert (Is_Subprogram (Id));
1365 return Flag240 (Id);
1366 end Has_Postconditions;
1368 function Has_Pragma_Controlled (Id : E) return B is
1370 pragma Assert (Is_Access_Type (Id));
1371 return Flag27 (Implementation_Base_Type (Id));
1372 end Has_Pragma_Controlled;
1374 function Has_Pragma_Elaborate_Body (Id : E) return B is
1376 return Flag150 (Id);
1377 end Has_Pragma_Elaborate_Body;
1379 function Has_Pragma_Inline (Id : E) return B is
1381 return Flag157 (Id);
1382 end Has_Pragma_Inline;
1384 function Has_Pragma_Inline_Always (Id : E) return B is
1386 return Flag230 (Id);
1387 end Has_Pragma_Inline_Always;
1389 function Has_Pragma_Ordered (Id : E) return B is
1391 pragma Assert (Is_Enumeration_Type (Id));
1392 return Flag198 (Implementation_Base_Type (Id));
1393 end Has_Pragma_Ordered;
1395 function Has_Pragma_Pack (Id : E) return B is
1397 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1398 return Flag121 (Implementation_Base_Type (Id));
1399 end Has_Pragma_Pack;
1401 function Has_Pragma_Preelab_Init (Id : E) return B is
1403 return Flag221 (Id);
1404 end Has_Pragma_Preelab_Init;
1406 function Has_Pragma_Pure (Id : E) return B is
1408 return Flag203 (Id);
1409 end Has_Pragma_Pure;
1411 function Has_Pragma_Pure_Function (Id : E) return B is
1413 return Flag179 (Id);
1414 end Has_Pragma_Pure_Function;
1416 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1418 return Flag169 (Id);
1419 end Has_Pragma_Thread_Local_Storage;
1421 function Has_Pragma_Unmodified (Id : E) return B is
1423 return Flag233 (Id);
1424 end Has_Pragma_Unmodified;
1426 function Has_Pragma_Unreferenced (Id : E) return B is
1428 return Flag180 (Id);
1429 end Has_Pragma_Unreferenced;
1431 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1433 pragma Assert (Is_Type (Id));
1434 return Flag212 (Id);
1435 end Has_Pragma_Unreferenced_Objects;
1437 function Has_Predicates (Id : E) return B is
1439 return Flag250 (Id);
1442 function Has_Primitive_Operations (Id : E) return B is
1444 pragma Assert (Is_Type (Id));
1445 return Flag120 (Base_Type (Id));
1446 end Has_Primitive_Operations;
1448 function Has_Private_Declaration (Id : E) return B is
1450 return Flag155 (Id);
1451 end Has_Private_Declaration;
1453 function Has_Qualified_Name (Id : E) return B is
1455 return Flag161 (Id);
1456 end Has_Qualified_Name;
1458 function Has_RACW (Id : E) return B is
1460 pragma Assert (Ekind (Id) = E_Package);
1461 return Flag214 (Id);
1464 function Has_Record_Rep_Clause (Id : E) return B is
1466 pragma Assert (Is_Record_Type (Id));
1467 return Flag65 (Implementation_Base_Type (Id));
1468 end Has_Record_Rep_Clause;
1470 function Has_Recursive_Call (Id : E) return B is
1472 pragma Assert (Is_Subprogram (Id));
1473 return Flag143 (Id);
1474 end Has_Recursive_Call;
1476 function Has_Size_Clause (Id : E) return B is
1479 end Has_Size_Clause;
1481 function Has_Small_Clause (Id : E) return B is
1484 end Has_Small_Clause;
1486 function Has_Specified_Layout (Id : E) return B is
1488 pragma Assert (Is_Type (Id));
1489 return Flag100 (Implementation_Base_Type (Id));
1490 end Has_Specified_Layout;
1492 function Has_Specified_Stream_Input (Id : E) return B is
1494 pragma Assert (Is_Type (Id));
1495 return Flag190 (Id);
1496 end Has_Specified_Stream_Input;
1498 function Has_Specified_Stream_Output (Id : E) return B is
1500 pragma Assert (Is_Type (Id));
1501 return Flag191 (Id);
1502 end Has_Specified_Stream_Output;
1504 function Has_Specified_Stream_Read (Id : E) return B is
1506 pragma Assert (Is_Type (Id));
1507 return Flag192 (Id);
1508 end Has_Specified_Stream_Read;
1510 function Has_Specified_Stream_Write (Id : E) return B is
1512 pragma Assert (Is_Type (Id));
1513 return Flag193 (Id);
1514 end Has_Specified_Stream_Write;
1516 function Has_Static_Discriminants (Id : E) return B is
1518 pragma Assert (Is_Type (Id));
1519 return Flag211 (Id);
1520 end Has_Static_Discriminants;
1522 function Has_Storage_Size_Clause (Id : E) return B is
1524 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1525 return Flag23 (Implementation_Base_Type (Id));
1526 end Has_Storage_Size_Clause;
1528 function Has_Stream_Size_Clause (Id : E) return B is
1530 return Flag184 (Id);
1531 end Has_Stream_Size_Clause;
1533 function Has_Subprogram_Descriptor (Id : E) return B is
1536 end Has_Subprogram_Descriptor;
1538 function Has_Task (Id : E) return B is
1540 return Flag30 (Base_Type (Id));
1543 function Has_Thunks (Id : E) return B is
1545 return Flag228 (Id);
1548 function Has_Unchecked_Union (Id : E) return B is
1550 return Flag123 (Base_Type (Id));
1551 end Has_Unchecked_Union;
1553 function Has_Unknown_Discriminants (Id : E) return B is
1555 pragma Assert (Is_Type (Id));
1557 end Has_Unknown_Discriminants;
1559 function Has_Up_Level_Access (Id : E) return B is
1562 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1563 return Flag215 (Id);
1564 end Has_Up_Level_Access;
1566 function Has_Volatile_Components (Id : E) return B is
1568 return Flag87 (Implementation_Base_Type (Id));
1569 end Has_Volatile_Components;
1571 function Has_Xref_Entry (Id : E) return B is
1573 return Flag182 (Implementation_Base_Type (Id));
1576 function Hiding_Loop_Variable (Id : E) return E is
1578 pragma Assert (Ekind (Id) = E_Variable);
1580 end Hiding_Loop_Variable;
1582 function Homonym (Id : E) return E is
1587 function Interface_Alias (Id : E) return E is
1589 pragma Assert (Is_Subprogram (Id));
1591 end Interface_Alias;
1593 function Interfaces (Id : E) return L is
1595 pragma Assert (Is_Record_Type (Id));
1596 return Elist25 (Id);
1599 function In_Package_Body (Id : E) return B is
1602 end In_Package_Body;
1604 function In_Private_Part (Id : E) return B is
1607 end In_Private_Part;
1609 function In_Use (Id : E) return B is
1611 pragma Assert (Nkind (Id) in N_Entity);
1615 function Inner_Instances (Id : E) return L is
1617 return Elist23 (Id);
1618 end Inner_Instances;
1620 function Interface_Name (Id : E) return N is
1625 function Is_Abstract_Subprogram (Id : E) return B is
1627 pragma Assert (Is_Overloadable (Id));
1629 end Is_Abstract_Subprogram;
1631 function Is_Abstract_Type (Id : E) return B is
1633 pragma Assert (Is_Type (Id));
1634 return Flag146 (Id);
1635 end Is_Abstract_Type;
1637 function Is_Local_Anonymous_Access (Id : E) return B is
1639 pragma Assert (Is_Access_Type (Id));
1640 return Flag194 (Id);
1641 end Is_Local_Anonymous_Access;
1643 function Is_Access_Constant (Id : E) return B is
1645 pragma Assert (Is_Access_Type (Id));
1647 end Is_Access_Constant;
1649 function Is_Ada_2005_Only (Id : E) return B is
1651 return Flag185 (Id);
1652 end Is_Ada_2005_Only;
1654 function Is_Ada_2012_Only (Id : E) return B is
1656 return Flag199 (Id);
1657 end Is_Ada_2012_Only;
1659 function Is_Aliased (Id : E) return B is
1661 pragma Assert (Nkind (Id) in N_Entity);
1665 function Is_AST_Entry (Id : E) return B is
1667 pragma Assert (Is_Entry (Id));
1668 return Flag132 (Id);
1671 function Is_Asynchronous (Id : E) return B is
1673 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1675 end Is_Asynchronous;
1677 function Is_Atomic (Id : E) return B is
1682 function Is_Bit_Packed_Array (Id : E) return B is
1684 return Flag122 (Implementation_Base_Type (Id));
1685 end Is_Bit_Packed_Array;
1687 function Is_Called (Id : E) return B is
1689 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1690 return Flag102 (Id);
1693 function Is_Character_Type (Id : E) return B is
1696 end Is_Character_Type;
1698 function Is_Child_Unit (Id : E) return B is
1703 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1706 end Is_Class_Wide_Equivalent_Type;
1708 function Is_Compilation_Unit (Id : E) return B is
1710 return Flag149 (Id);
1711 end Is_Compilation_Unit;
1713 function Is_Completely_Hidden (Id : E) return B is
1715 pragma Assert (Ekind (Id) = E_Discriminant);
1716 return Flag103 (Id);
1717 end Is_Completely_Hidden;
1719 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1722 end Is_Constr_Subt_For_U_Nominal;
1724 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1726 return Flag141 (Id);
1727 end Is_Constr_Subt_For_UN_Aliased;
1729 function Is_Constrained (Id : E) return B is
1731 pragma Assert (Nkind (Id) in N_Entity);
1735 function Is_Constructor (Id : E) return B is
1740 function Is_Controlled (Id : E) return B is
1742 return Flag42 (Base_Type (Id));
1745 function Is_Controlling_Formal (Id : E) return B is
1747 pragma Assert (Is_Formal (Id));
1749 end Is_Controlling_Formal;
1751 function Is_CPP_Class (Id : E) return B is
1756 function Is_Descendent_Of_Address (Id : E) return B is
1758 pragma Assert (Is_Type (Id));
1759 return Flag223 (Id);
1760 end Is_Descendent_Of_Address;
1762 function Is_Discrim_SO_Function (Id : E) return B is
1764 return Flag176 (Id);
1765 end Is_Discrim_SO_Function;
1767 function Is_Dispatch_Table_Entity (Id : E) return B is
1769 return Flag234 (Id);
1770 end Is_Dispatch_Table_Entity;
1772 function Is_Dispatching_Operation (Id : E) return B is
1774 pragma Assert (Nkind (Id) in N_Entity);
1776 end Is_Dispatching_Operation;
1778 function Is_Eliminated (Id : E) return B is
1780 return Flag124 (Id);
1783 function Is_Entry_Formal (Id : E) return B is
1786 end Is_Entry_Formal;
1788 function Is_Exported (Id : E) return B is
1793 function Is_First_Subtype (Id : E) return B is
1796 end Is_First_Subtype;
1798 function Is_For_Access_Subtype (Id : E) return B is
1800 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1801 return Flag118 (Id);
1802 end Is_For_Access_Subtype;
1804 function Is_Formal_Subprogram (Id : E) return B is
1806 return Flag111 (Id);
1807 end Is_Formal_Subprogram;
1809 function Is_Frozen (Id : E) return B is
1814 function Is_Generic_Actual_Type (Id : E) return B is
1816 pragma Assert (Is_Type (Id));
1818 end Is_Generic_Actual_Type;
1820 function Is_Generic_Instance (Id : E) return B is
1822 return Flag130 (Id);
1823 end Is_Generic_Instance;
1825 function Is_Generic_Type (Id : E) return B is
1827 pragma Assert (Nkind (Id) in N_Entity);
1829 end Is_Generic_Type;
1831 function Is_Hidden (Id : E) return B is
1836 function Is_Hidden_Open_Scope (Id : E) return B is
1838 return Flag171 (Id);
1839 end Is_Hidden_Open_Scope;
1841 function Is_Immediately_Visible (Id : E) return B is
1843 pragma Assert (Nkind (Id) in N_Entity);
1845 end Is_Immediately_Visible;
1847 function Is_Imported (Id : E) return B is
1852 function Is_Inlined (Id : E) return B is
1857 function Is_Interface (Id : E) return B is
1859 return Flag186 (Id);
1862 function Is_Instantiated (Id : E) return B is
1864 return Flag126 (Id);
1865 end Is_Instantiated;
1867 function Is_Internal (Id : E) return B is
1869 pragma Assert (Nkind (Id) in N_Entity);
1873 function Is_Interrupt_Handler (Id : E) return B is
1875 pragma Assert (Nkind (Id) in N_Entity);
1877 end Is_Interrupt_Handler;
1879 function Is_Intrinsic_Subprogram (Id : E) return B is
1882 end Is_Intrinsic_Subprogram;
1884 function Is_Itype (Id : E) return B is
1889 function Is_Known_Non_Null (Id : E) return B is
1892 end Is_Known_Non_Null;
1894 function Is_Known_Null (Id : E) return B is
1896 return Flag204 (Id);
1899 function Is_Known_Valid (Id : E) return B is
1901 return Flag170 (Id);
1904 function Is_Limited_Composite (Id : E) return B is
1906 return Flag106 (Id);
1907 end Is_Limited_Composite;
1909 function Is_Limited_Interface (Id : E) return B is
1911 return Flag197 (Id);
1912 end Is_Limited_Interface;
1914 function Is_Limited_Record (Id : E) return B is
1917 end Is_Limited_Record;
1919 function Is_Machine_Code_Subprogram (Id : E) return B is
1921 pragma Assert (Is_Subprogram (Id));
1922 return Flag137 (Id);
1923 end Is_Machine_Code_Subprogram;
1925 function Is_Non_Static_Subtype (Id : E) return B is
1927 pragma Assert (Is_Type (Id));
1928 return Flag109 (Id);
1929 end Is_Non_Static_Subtype;
1931 function Is_Null_Init_Proc (Id : E) return B is
1933 pragma Assert (Ekind (Id) = E_Procedure);
1934 return Flag178 (Id);
1935 end Is_Null_Init_Proc;
1937 function Is_Obsolescent (Id : E) return B is
1939 return Flag153 (Id);
1942 function Is_Only_Out_Parameter (Id : E) return B is
1944 pragma Assert (Is_Formal (Id));
1945 return Flag226 (Id);
1946 end Is_Only_Out_Parameter;
1948 function Is_Optional_Parameter (Id : E) return B is
1950 pragma Assert (Is_Formal (Id));
1951 return Flag134 (Id);
1952 end Is_Optional_Parameter;
1954 function Is_Package_Body_Entity (Id : E) return B is
1956 return Flag160 (Id);
1957 end Is_Package_Body_Entity;
1959 function Is_Packed (Id : E) return B is
1961 return Flag51 (Implementation_Base_Type (Id));
1964 function Is_Packed_Array_Type (Id : E) return B is
1966 return Flag138 (Id);
1967 end Is_Packed_Array_Type;
1969 function Is_Postcondition_Proc (Id : E) return B is
1971 pragma Assert (Ekind (Id) = E_Procedure);
1972 return Flag253 (Id);
1973 end Is_Postcondition_Proc;
1975 function Is_Potentially_Use_Visible (Id : E) return B is
1977 pragma Assert (Nkind (Id) in N_Entity);
1979 end Is_Potentially_Use_Visible;
1981 function Is_Preelaborated (Id : E) return B is
1984 end Is_Preelaborated;
1986 function Is_Primitive (Id : E) return B is
1989 (Is_Overloadable (Id)
1990 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1991 return Flag218 (Id);
1994 function Is_Primitive_Wrapper (Id : E) return B is
1996 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1997 return Flag195 (Id);
1998 end Is_Primitive_Wrapper;
2000 function Is_Private_Composite (Id : E) return B is
2002 pragma Assert (Is_Type (Id));
2003 return Flag107 (Id);
2004 end Is_Private_Composite;
2006 function Is_Private_Descendant (Id : E) return B is
2009 end Is_Private_Descendant;
2011 function Is_Private_Primitive (Id : E) return B is
2013 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2014 return Flag245 (Id);
2015 end Is_Private_Primitive;
2017 function Is_Processed_Transient (Id : E) return B is
2019 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2020 return Flag252 (Id);
2021 end Is_Processed_Transient;
2023 function Is_Public (Id : E) return B is
2025 pragma Assert (Nkind (Id) in N_Entity);
2029 function Is_Pure (Id : E) return B is
2034 function Is_Pure_Unit_Access_Type (Id : E) return B is
2036 pragma Assert (Is_Access_Type (Id));
2037 return Flag189 (Id);
2038 end Is_Pure_Unit_Access_Type;
2040 function Is_RACW_Stub_Type (Id : E) return B is
2042 pragma Assert (Is_Type (Id));
2043 return Flag244 (Id);
2044 end Is_RACW_Stub_Type;
2046 function Is_Raised (Id : E) return B is
2048 pragma Assert (Ekind (Id) = E_Exception);
2049 return Flag224 (Id);
2052 function Is_Remote_Call_Interface (Id : E) return B is
2055 end Is_Remote_Call_Interface;
2057 function Is_Remote_Types (Id : E) return B is
2060 end Is_Remote_Types;
2062 function Is_Renaming_Of_Object (Id : E) return B is
2064 return Flag112 (Id);
2065 end Is_Renaming_Of_Object;
2067 function Is_Return_Object (Id : E) return B is
2069 return Flag209 (Id);
2070 end Is_Return_Object;
2072 function Is_Safe_To_Reevaluate (Id : E) return B is
2074 return Flag249 (Id);
2075 end Is_Safe_To_Reevaluate;
2077 function Is_Shared_Passive (Id : E) return B is
2080 end Is_Shared_Passive;
2082 function Is_Statically_Allocated (Id : E) return B is
2085 end Is_Statically_Allocated;
2087 function Is_Tag (Id : E) return B is
2089 pragma Assert (Nkind (Id) in N_Entity);
2093 function Is_Tagged_Type (Id : E) return B is
2098 function Is_Thunk (Id : E) return B is
2100 pragma Assert (Is_Subprogram (Id));
2101 return Flag225 (Id);
2104 function Is_Trivial_Subprogram (Id : E) return B is
2106 return Flag235 (Id);
2107 end Is_Trivial_Subprogram;
2109 function Is_True_Constant (Id : E) return B is
2111 return Flag163 (Id);
2112 end Is_True_Constant;
2114 function Is_Unchecked_Union (Id : E) return B is
2116 return Flag117 (Implementation_Base_Type (Id));
2117 end Is_Unchecked_Union;
2119 function Is_Underlying_Record_View (Id : E) return B is
2121 return Flag246 (Id);
2122 end Is_Underlying_Record_View;
2124 function Is_Unsigned_Type (Id : E) return B is
2126 pragma Assert (Is_Type (Id));
2127 return Flag144 (Id);
2128 end Is_Unsigned_Type;
2130 function Is_Valued_Procedure (Id : E) return B is
2132 pragma Assert (Ekind (Id) = E_Procedure);
2133 return Flag127 (Id);
2134 end Is_Valued_Procedure;
2136 function Is_Visible_Child_Unit (Id : E) return B is
2138 pragma Assert (Is_Child_Unit (Id));
2139 return Flag116 (Id);
2140 end Is_Visible_Child_Unit;
2142 function Is_Visible_Formal (Id : E) return B is
2144 return Flag206 (Id);
2145 end Is_Visible_Formal;
2147 function Is_VMS_Exception (Id : E) return B is
2149 return Flag133 (Id);
2150 end Is_VMS_Exception;
2152 function Is_Volatile (Id : E) return B is
2154 pragma Assert (Nkind (Id) in N_Entity);
2156 if Is_Type (Id) then
2157 return Flag16 (Base_Type (Id));
2163 function Itype_Printed (Id : E) return B is
2165 pragma Assert (Is_Itype (Id));
2166 return Flag202 (Id);
2169 function Kill_Elaboration_Checks (Id : E) return B is
2172 end Kill_Elaboration_Checks;
2174 function Kill_Range_Checks (Id : E) return B is
2177 end Kill_Range_Checks;
2179 function Kill_Tag_Checks (Id : E) return B is
2182 end Kill_Tag_Checks;
2184 function Known_To_Have_Preelab_Init (Id : E) return B is
2186 pragma Assert (Is_Type (Id));
2187 return Flag207 (Id);
2188 end Known_To_Have_Preelab_Init;
2190 function Last_Assignment (Id : E) return N is
2192 pragma Assert (Is_Assignable (Id));
2194 end Last_Assignment;
2196 function Last_Entity (Id : E) return E is
2201 function Limited_View (Id : E) return E is
2203 pragma Assert (Ekind (Id) = E_Package);
2207 function Lit_Indexes (Id : E) return E is
2209 pragma Assert (Is_Enumeration_Type (Id));
2213 function Lit_Strings (Id : E) return E is
2215 pragma Assert (Is_Enumeration_Type (Id));
2219 function Low_Bound_Tested (Id : E) return B is
2221 return Flag205 (Id);
2222 end Low_Bound_Tested;
2224 function Machine_Radix_10 (Id : E) return B is
2226 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2228 end Machine_Radix_10;
2230 function Master_Id (Id : E) return E is
2232 pragma Assert (Is_Access_Type (Id));
2236 function Materialize_Entity (Id : E) return B is
2238 return Flag168 (Id);
2239 end Materialize_Entity;
2241 function Mechanism (Id : E) return M is
2243 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2244 return UI_To_Int (Uint8 (Id));
2247 function Modulus (Id : E) return Uint is
2249 pragma Assert (Is_Modular_Integer_Type (Id));
2250 return Uint17 (Base_Type (Id));
2253 function Must_Be_On_Byte_Boundary (Id : E) return B is
2255 pragma Assert (Is_Type (Id));
2256 return Flag183 (Id);
2257 end Must_Be_On_Byte_Boundary;
2259 function Must_Have_Preelab_Init (Id : E) return B is
2261 pragma Assert (Is_Type (Id));
2262 return Flag208 (Id);
2263 end Must_Have_Preelab_Init;
2265 function Needs_Debug_Info (Id : E) return B is
2267 return Flag147 (Id);
2268 end Needs_Debug_Info;
2270 function Needs_No_Actuals (Id : E) return B is
2273 (Is_Overloadable (Id)
2274 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2276 end Needs_No_Actuals;
2278 function Never_Set_In_Source (Id : E) return B is
2280 return Flag115 (Id);
2281 end Never_Set_In_Source;
2283 function Next_Inlined_Subprogram (Id : E) return E is
2286 end Next_Inlined_Subprogram;
2288 function No_Pool_Assigned (Id : E) return B is
2290 pragma Assert (Is_Access_Type (Id));
2291 return Flag131 (Root_Type (Id));
2292 end No_Pool_Assigned;
2294 function No_Return (Id : E) return B is
2296 return Flag113 (Id);
2299 function No_Strict_Aliasing (Id : E) return B is
2301 pragma Assert (Is_Access_Type (Id));
2302 return Flag136 (Base_Type (Id));
2303 end No_Strict_Aliasing;
2305 function Non_Binary_Modulus (Id : E) return B is
2307 pragma Assert (Is_Type (Id));
2308 return Flag58 (Base_Type (Id));
2309 end Non_Binary_Modulus;
2311 function Non_Limited_View (Id : E) return E is
2313 pragma Assert (Ekind (Id) in Incomplete_Kind);
2315 end Non_Limited_View;
2317 function Nonzero_Is_True (Id : E) return B is
2319 pragma Assert (Root_Type (Id) = Standard_Boolean);
2320 return Flag162 (Base_Type (Id));
2321 end Nonzero_Is_True;
2323 function Normalized_First_Bit (Id : E) return U is
2325 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2327 end Normalized_First_Bit;
2329 function Normalized_Position (Id : E) return U is
2331 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2333 end Normalized_Position;
2335 function Normalized_Position_Max (Id : E) return U is
2337 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2339 end Normalized_Position_Max;
2341 function OK_To_Rename (Id : E) return B is
2343 pragma Assert (Ekind (Id) = E_Variable);
2344 return Flag247 (Id);
2347 function OK_To_Reorder_Components (Id : E) return B is
2349 pragma Assert (Is_Record_Type (Id));
2350 return Flag239 (Base_Type (Id));
2351 end OK_To_Reorder_Components;
2353 function Optimize_Alignment_Space (Id : E) return B is
2356 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2357 return Flag241 (Id);
2358 end Optimize_Alignment_Space;
2360 function Optimize_Alignment_Time (Id : E) return B is
2363 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2364 return Flag242 (Id);
2365 end Optimize_Alignment_Time;
2367 function Original_Access_Type (Id : E) return E is
2369 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2371 end Original_Access_Type;
2373 function Original_Array_Type (Id : E) return E is
2375 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2377 end Original_Array_Type;
2379 function Original_Record_Component (Id : E) return E is
2381 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2383 end Original_Record_Component;
2385 function Overlays_Constant (Id : E) return B is
2387 return Flag243 (Id);
2388 end Overlays_Constant;
2390 function Overridden_Operation (Id : E) return E is
2393 end Overridden_Operation;
2395 function Package_Instantiation (Id : E) return N is
2397 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2399 end Package_Instantiation;
2401 function Packed_Array_Type (Id : E) return E is
2403 pragma Assert (Is_Array_Type (Id));
2405 end Packed_Array_Type;
2407 function Parent_Subtype (Id : E) return E is
2409 pragma Assert (Is_Record_Type (Id));
2410 return Node19 (Base_Type (Id));
2413 function Postcondition_Proc (Id : E) return E is
2415 pragma Assert (Ekind (Id) = E_Procedure);
2417 end Postcondition_Proc;
2419 function PPC_Wrapper (Id : E) return E is
2421 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2425 function Prival (Id : E) return E is
2427 pragma Assert (Is_Protected_Component (Id));
2431 function Prival_Link (Id : E) return E is
2433 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2437 function Private_Dependents (Id : E) return L is
2439 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2440 return Elist18 (Id);
2441 end Private_Dependents;
2443 function Private_View (Id : E) return N is
2445 pragma Assert (Is_Private_Type (Id));
2449 function Protected_Body_Subprogram (Id : E) return E is
2451 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2453 end Protected_Body_Subprogram;
2455 function Protected_Formal (Id : E) return E is
2457 pragma Assert (Is_Formal (Id));
2459 end Protected_Formal;
2461 function Protection_Object (Id : E) return E is
2464 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2466 end Protection_Object;
2468 function Reachable (Id : E) return B is
2473 function Referenced (Id : E) return B is
2475 return Flag156 (Id);
2478 function Referenced_As_LHS (Id : E) return B is
2481 end Referenced_As_LHS;
2483 function Referenced_As_Out_Parameter (Id : E) return B is
2485 return Flag227 (Id);
2486 end Referenced_As_Out_Parameter;
2488 function Register_Exception_Call (Id : E) return N is
2490 pragma Assert (Ekind (Id) = E_Exception);
2492 end Register_Exception_Call;
2494 function Related_Array_Object (Id : E) return E is
2496 pragma Assert (Is_Array_Type (Id));
2498 end Related_Array_Object;
2500 function Related_Expression (Id : E) return N is
2502 pragma Assert (Ekind (Id) in Type_Kind
2503 or else Ekind_In (Id, E_Constant, E_Variable));
2505 end Related_Expression;
2507 function Related_Instance (Id : E) return E is
2509 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2511 end Related_Instance;
2513 function Related_Type (Id : E) return E is
2515 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2519 function Relative_Deadline_Variable (Id : E) return E is
2521 pragma Assert (Is_Task_Type (Id));
2522 return Node26 (Implementation_Base_Type (Id));
2523 end Relative_Deadline_Variable;
2525 function Renamed_Entity (Id : E) return N is
2530 function Renamed_In_Spec (Id : E) return B is
2532 pragma Assert (Ekind (Id) = E_Package);
2533 return Flag231 (Id);
2534 end Renamed_In_Spec;
2536 function Renamed_Object (Id : E) return N is
2541 function Renaming_Map (Id : E) return U is
2546 function Requires_Overriding (Id : E) return B is
2548 pragma Assert (Is_Overloadable (Id));
2549 return Flag213 (Id);
2550 end Requires_Overriding;
2552 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2554 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2556 end Return_Flag_Or_Transient_Decl;
2558 function Return_Present (Id : E) return B is
2563 function Return_Applies_To (Id : E) return N is
2566 end Return_Applies_To;
2568 function Returns_By_Ref (Id : E) return B is
2573 function Reverse_Bit_Order (Id : E) return B is
2575 pragma Assert (Is_Record_Type (Id));
2576 return Flag164 (Base_Type (Id));
2577 end Reverse_Bit_Order;
2579 function RM_Size (Id : E) return U is
2581 pragma Assert (Is_Type (Id));
2585 function Scalar_Range (Id : E) return N is
2590 function Scale_Value (Id : E) return U is
2595 function Scope_Depth_Value (Id : E) return U is
2598 end Scope_Depth_Value;
2600 function Sec_Stack_Needed_For_Return (Id : E) return B is
2602 return Flag167 (Id);
2603 end Sec_Stack_Needed_For_Return;
2605 function Shadow_Entities (Id : E) return S is
2607 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2609 end Shadow_Entities;
2611 function Shared_Var_Procs_Instance (Id : E) return E is
2613 pragma Assert (Ekind (Id) = E_Variable);
2615 end Shared_Var_Procs_Instance;
2617 function Size_Check_Code (Id : E) return N is
2619 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2621 end Size_Check_Code;
2623 function Size_Depends_On_Discriminant (Id : E) return B is
2625 return Flag177 (Id);
2626 end Size_Depends_On_Discriminant;
2628 function Size_Known_At_Compile_Time (Id : E) return B is
2631 end Size_Known_At_Compile_Time;
2633 function Small_Value (Id : E) return R is
2635 pragma Assert (Is_Fixed_Point_Type (Id));
2636 return Ureal21 (Id);
2639 function Spec_Entity (Id : E) return E is
2641 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2645 function Spec_PPC_List (Id : E) return N is
2648 (Ekind_In (Id, E_Entry, E_Entry_Family)
2649 or else Is_Subprogram (Id)
2650 or else Is_Generic_Subprogram (Id));
2654 function Static_Predicate (Id : E) return S is
2656 pragma Assert (Is_Discrete_Type (Id));
2658 end Static_Predicate;
2660 function Storage_Size_Variable (Id : E) return E is
2662 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2663 return Node15 (Implementation_Base_Type (Id));
2664 end Storage_Size_Variable;
2666 function Static_Elaboration_Desired (Id : E) return B is
2668 pragma Assert (Ekind (Id) = E_Package);
2670 end Static_Elaboration_Desired;
2672 function Static_Initialization (Id : E) return N is
2675 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2677 end Static_Initialization;
2679 function Stored_Constraint (Id : E) return L is
2682 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2683 return Elist23 (Id);
2684 end Stored_Constraint;
2686 function Strict_Alignment (Id : E) return B is
2688 return Flag145 (Implementation_Base_Type (Id));
2689 end Strict_Alignment;
2691 function String_Literal_Length (Id : E) return U is
2694 end String_Literal_Length;
2696 function String_Literal_Low_Bound (Id : E) return N is
2699 end String_Literal_Low_Bound;
2701 function Subprograms_For_Type (Id : E) return E is
2703 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2705 end Subprograms_For_Type;
2707 function Suppress_Elaboration_Warnings (Id : E) return B is
2709 return Flag148 (Id);
2710 end Suppress_Elaboration_Warnings;
2712 function Suppress_Initialization (Id : E) return B is
2714 pragma Assert (Is_Type (Id));
2715 return Flag105 (Id);
2716 end Suppress_Initialization;
2718 function Suppress_Style_Checks (Id : E) return B is
2720 return Flag165 (Id);
2721 end Suppress_Style_Checks;
2723 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2725 return Flag217 (Id);
2726 end Suppress_Value_Tracking_On_Call;
2728 function Task_Body_Procedure (Id : E) return N is
2730 pragma Assert (Ekind (Id) in Task_Kind);
2732 end Task_Body_Procedure;
2734 function Treat_As_Volatile (Id : E) return B is
2737 end Treat_As_Volatile;
2739 function Underlying_Full_View (Id : E) return E is
2741 pragma Assert (Ekind (Id) in Private_Kind);
2743 end Underlying_Full_View;
2745 function Underlying_Record_View (Id : E) return E is
2748 end Underlying_Record_View;
2750 function Universal_Aliasing (Id : E) return B is
2752 pragma Assert (Is_Type (Id));
2753 return Flag216 (Base_Type (Id));
2754 end Universal_Aliasing;
2756 function Unset_Reference (Id : E) return N is
2759 end Unset_Reference;
2761 function Used_As_Generic_Actual (Id : E) return B is
2763 return Flag222 (Id);
2764 end Used_As_Generic_Actual;
2766 function Uses_Sec_Stack (Id : E) return B is
2771 function Warnings_Off (Id : E) return B is
2776 function Warnings_Off_Used (Id : E) return B is
2778 return Flag236 (Id);
2779 end Warnings_Off_Used;
2781 function Warnings_Off_Used_Unmodified (Id : E) return B is
2783 return Flag237 (Id);
2784 end Warnings_Off_Used_Unmodified;
2786 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2788 return Flag238 (Id);
2789 end Warnings_Off_Used_Unreferenced;
2791 function Wrapped_Entity (Id : E) return E is
2793 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2794 and then Is_Primitive_Wrapper (Id));
2798 function Was_Hidden (Id : E) return B is
2800 return Flag196 (Id);
2803 ------------------------------
2804 -- Classification Functions --
2805 ------------------------------
2807 function Is_Access_Type (Id : E) return B is
2809 return Ekind (Id) in Access_Kind;
2812 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2814 return Ekind (Id) in Access_Protected_Kind;
2815 end Is_Access_Protected_Subprogram_Type;
2817 function Is_Access_Subprogram_Type (Id : E) return B is
2819 return Ekind (Id) in Access_Subprogram_Kind;
2820 end Is_Access_Subprogram_Type;
2822 function Is_Aggregate_Type (Id : E) return B is
2824 return Ekind (Id) in Aggregate_Kind;
2825 end Is_Aggregate_Type;
2827 function Is_Array_Type (Id : E) return B is
2829 return Ekind (Id) in Array_Kind;
2832 function Is_Assignable (Id : E) return B is
2834 return Ekind (Id) in Assignable_Kind;
2837 function Is_Class_Wide_Type (Id : E) return B is
2839 return Ekind (Id) in Class_Wide_Kind;
2840 end Is_Class_Wide_Type;
2842 function Is_Composite_Type (Id : E) return B is
2844 return Ekind (Id) in Composite_Kind;
2845 end Is_Composite_Type;
2847 function Is_Concurrent_Body (Id : E) return B is
2849 return Ekind (Id) in
2850 Concurrent_Body_Kind;
2851 end Is_Concurrent_Body;
2853 function Is_Concurrent_Record_Type (Id : E) return B is
2856 end Is_Concurrent_Record_Type;
2858 function Is_Concurrent_Type (Id : E) return B is
2860 return Ekind (Id) in Concurrent_Kind;
2861 end Is_Concurrent_Type;
2863 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2865 return Ekind (Id) in
2866 Decimal_Fixed_Point_Kind;
2867 end Is_Decimal_Fixed_Point_Type;
2869 function Is_Digits_Type (Id : E) return B is
2871 return Ekind (Id) in Digits_Kind;
2874 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2876 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2877 end Is_Discrete_Or_Fixed_Point_Type;
2879 function Is_Discrete_Type (Id : E) return B is
2881 return Ekind (Id) in Discrete_Kind;
2882 end Is_Discrete_Type;
2884 function Is_Elementary_Type (Id : E) return B is
2886 return Ekind (Id) in Elementary_Kind;
2887 end Is_Elementary_Type;
2889 function Is_Entry (Id : E) return B is
2891 return Ekind (Id) in Entry_Kind;
2894 function Is_Enumeration_Type (Id : E) return B is
2896 return Ekind (Id) in
2898 end Is_Enumeration_Type;
2900 function Is_Fixed_Point_Type (Id : E) return B is
2902 return Ekind (Id) in
2904 end Is_Fixed_Point_Type;
2906 function Is_Floating_Point_Type (Id : E) return B is
2908 return Ekind (Id) in Float_Kind;
2909 end Is_Floating_Point_Type;
2911 function Is_Formal (Id : E) return B is
2913 return Ekind (Id) in Formal_Kind;
2916 function Is_Formal_Object (Id : E) return B is
2918 return Ekind (Id) in Formal_Object_Kind;
2919 end Is_Formal_Object;
2921 function Is_Generic_Subprogram (Id : E) return B is
2923 return Ekind (Id) in Generic_Subprogram_Kind;
2924 end Is_Generic_Subprogram;
2926 function Is_Generic_Unit (Id : E) return B is
2928 return Ekind (Id) in Generic_Unit_Kind;
2929 end Is_Generic_Unit;
2931 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2933 return Ekind (Id) in
2934 Incomplete_Or_Private_Kind;
2935 end Is_Incomplete_Or_Private_Type;
2937 function Is_Incomplete_Type (Id : E) return B is
2939 return Ekind (Id) in
2941 end Is_Incomplete_Type;
2943 function Is_Integer_Type (Id : E) return B is
2945 return Ekind (Id) in Integer_Kind;
2946 end Is_Integer_Type;
2948 function Is_Modular_Integer_Type (Id : E) return B is
2950 return Ekind (Id) in
2951 Modular_Integer_Kind;
2952 end Is_Modular_Integer_Type;
2954 function Is_Named_Number (Id : E) return B is
2956 return Ekind (Id) in Named_Kind;
2957 end Is_Named_Number;
2959 function Is_Numeric_Type (Id : E) return B is
2961 return Ekind (Id) in Numeric_Kind;
2962 end Is_Numeric_Type;
2964 function Is_Object (Id : E) return B is
2966 return Ekind (Id) in Object_Kind;
2969 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2971 return Ekind (Id) in
2972 Ordinary_Fixed_Point_Kind;
2973 end Is_Ordinary_Fixed_Point_Type;
2975 function Is_Overloadable (Id : E) return B is
2977 return Ekind (Id) in Overloadable_Kind;
2978 end Is_Overloadable;
2980 function Is_Private_Type (Id : E) return B is
2982 return Ekind (Id) in Private_Kind;
2983 end Is_Private_Type;
2985 function Is_Protected_Type (Id : E) return B is
2987 return Ekind (Id) in Protected_Kind;
2988 end Is_Protected_Type;
2990 function Is_Real_Type (Id : E) return B is
2992 return Ekind (Id) in Real_Kind;
2995 function Is_Record_Type (Id : E) return B is
2997 return Ekind (Id) in Record_Kind;
3000 function Is_Scalar_Type (Id : E) return B is
3002 return Ekind (Id) in Scalar_Kind;
3005 function Is_Signed_Integer_Type (Id : E) return B is
3007 return Ekind (Id) in Signed_Integer_Kind;
3008 end Is_Signed_Integer_Type;
3010 function Is_Subprogram (Id : E) return B is
3012 return Ekind (Id) in Subprogram_Kind;
3015 function Is_Task_Type (Id : E) return B is
3017 return Ekind (Id) in Task_Kind;
3020 function Is_Type (Id : E) return B is
3022 return Ekind (Id) in Type_Kind;
3025 ------------------------------
3026 -- Attribute Set Procedures --
3027 ------------------------------
3029 -- Note: in many of these set procedures an "obvious" assertion is missing.
3030 -- The reason for this is that in many cases, a field is set before the
3031 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3032 -- it is possible to add assertions that specifically include the E_Void
3033 -- possibility, but in some cases, we just omit the assertions.
3035 procedure Set_Accept_Address (Id : E; V : L) is
3037 Set_Elist21 (Id, V);
3038 end Set_Accept_Address;
3040 procedure Set_Access_Disp_Table (Id : E; V : L) is
3042 pragma Assert (Ekind (Id) = E_Record_Type
3043 and then Id = Implementation_Base_Type (Id));
3044 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3045 Set_Elist16 (Id, V);
3046 end Set_Access_Disp_Table;
3048 procedure Set_Associated_Collection (Id : E; V : E) is
3050 pragma Assert (Is_Access_Type (Id));
3052 end Set_Associated_Collection;
3054 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3057 end Set_Associated_Formal_Package;
3059 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3062 end Set_Associated_Node_For_Itype;
3064 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3066 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3068 end Set_Associated_Storage_Pool;
3070 procedure Set_Actual_Subtype (Id : E; V : E) is
3073 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3074 or else Is_Formal (Id));
3076 end Set_Actual_Subtype;
3078 procedure Set_Address_Taken (Id : E; V : B := True) is
3080 Set_Flag104 (Id, V);
3081 end Set_Address_Taken;
3083 procedure Set_Alias (Id : E; V : E) is
3086 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3090 procedure Set_Alignment (Id : E; V : U) is
3092 pragma Assert (Is_Type (Id)
3093 or else Is_Formal (Id)
3094 or else Ekind_In (Id, E_Loop_Parameter,
3101 procedure Set_Barrier_Function (Id : E; V : N) is
3103 pragma Assert (Is_Entry (Id));
3105 end Set_Barrier_Function;
3107 procedure Set_Block_Node (Id : E; V : N) is
3109 pragma Assert (Ekind (Id) = E_Block);
3113 procedure Set_Body_Entity (Id : E; V : E) is
3115 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3117 end Set_Body_Entity;
3119 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3122 (Ekind (Id) = E_Package
3123 or else Is_Subprogram (Id)
3124 or else Is_Generic_Unit (Id));
3126 end Set_Body_Needed_For_SAL;
3128 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3130 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3131 Set_Flag125 (Id, V);
3132 end Set_C_Pass_By_Copy;
3134 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3137 end Set_Can_Never_Be_Null;
3139 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3142 end Set_Checks_May_Be_Suppressed;
3144 procedure Set_Class_Wide_Type (Id : E; V : E) is
3146 pragma Assert (Is_Type (Id));
3148 end Set_Class_Wide_Type;
3150 procedure Set_Cloned_Subtype (Id : E; V : E) is
3152 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3154 end Set_Cloned_Subtype;
3156 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3158 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3160 end Set_Component_Bit_Offset;
3162 procedure Set_Component_Clause (Id : E; V : N) is
3164 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3166 end Set_Component_Clause;
3168 procedure Set_Component_Size (Id : E; V : U) is
3170 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3172 end Set_Component_Size;
3174 procedure Set_Component_Type (Id : E; V : E) is
3176 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3178 end Set_Component_Type;
3180 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3183 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3185 end Set_Corresponding_Concurrent_Type;
3187 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3189 pragma Assert (Ekind (Id) = E_Discriminant);
3191 end Set_Corresponding_Discriminant;
3193 procedure Set_Corresponding_Equality (Id : E; V : E) is
3196 (Ekind (Id) = E_Function
3197 and then not Comes_From_Source (Id)
3198 and then Chars (Id) = Name_Op_Ne);
3200 end Set_Corresponding_Equality;
3202 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3204 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3206 end Set_Corresponding_Protected_Entry;
3208 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3210 pragma Assert (Is_Concurrent_Type (Id));
3212 end Set_Corresponding_Record_Type;
3214 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3217 end Set_Corresponding_Remote_Type;
3219 procedure Set_Current_Use_Clause (Id : E; V : E) is
3221 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3223 end Set_Current_Use_Clause;
3225 procedure Set_Current_Value (Id : E; V : N) is
3227 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3229 end Set_Current_Value;
3231 procedure Set_CR_Discriminant (Id : E; V : E) is
3234 end Set_CR_Discriminant;
3236 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3238 Set_Flag166 (Id, V);
3239 end Set_Debug_Info_Off;
3241 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3244 end Set_Debug_Renaming_Link;
3246 procedure Set_Default_Expr_Function (Id : E; V : E) is
3248 pragma Assert (Is_Formal (Id));
3250 end Set_Default_Expr_Function;
3252 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3254 Set_Flag108 (Id, V);
3255 end Set_Default_Expressions_Processed;
3257 procedure Set_Default_Value (Id : E; V : N) is
3259 pragma Assert (Is_Formal (Id));
3261 end Set_Default_Value;
3263 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3267 or else Is_Task_Type (Id)
3268 or else Ekind (Id) = E_Block);
3269 Set_Flag114 (Id, V);
3270 end Set_Delay_Cleanups;
3272 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3275 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3278 end Set_Delay_Subprogram_Descriptors;
3280 procedure Set_Delta_Value (Id : E; V : R) is
3282 pragma Assert (Is_Fixed_Point_Type (Id));
3283 Set_Ureal18 (Id, V);
3284 end Set_Delta_Value;
3286 procedure Set_Dependent_Instances (Id : E; V : L) is
3288 pragma Assert (Is_Generic_Instance (Id));
3290 end Set_Dependent_Instances;
3292 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3294 pragma Assert (Nkind (Id) in N_Entity);
3296 end Set_Depends_On_Private;
3298 procedure Set_Digits_Value (Id : E; V : U) is
3301 (Is_Floating_Point_Type (Id)
3302 or else Is_Decimal_Fixed_Point_Type (Id));
3304 end Set_Digits_Value;
3306 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3309 end Set_Directly_Designated_Type;
3311 procedure Set_Discard_Names (Id : E; V : B := True) is
3314 end Set_Discard_Names;
3316 procedure Set_Discriminal (Id : E; V : E) is
3318 pragma Assert (Ekind (Id) = E_Discriminant);
3320 end Set_Discriminal;
3322 procedure Set_Discriminal_Link (Id : E; V : E) is
3325 end Set_Discriminal_Link;
3327 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3329 pragma Assert (Ekind (Id) = E_Component);
3331 end Set_Discriminant_Checking_Func;
3333 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3335 pragma Assert (Nkind (Id) in N_Entity);
3336 Set_Elist21 (Id, V);
3337 end Set_Discriminant_Constraint;
3339 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3342 end Set_Discriminant_Default_Value;
3344 procedure Set_Discriminant_Number (Id : E; V : U) is
3347 end Set_Discriminant_Number;
3349 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3351 pragma Assert (Ekind (Id) = E_Record_Type
3352 and then Id = Implementation_Base_Type (Id));
3353 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3354 Set_Elist26 (Id, V);
3355 end Set_Dispatch_Table_Wrappers;
3357 procedure Set_DT_Entry_Count (Id : E; V : U) is
3359 pragma Assert (Ekind (Id) = E_Component);
3361 end Set_DT_Entry_Count;
3363 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3365 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3367 end Set_DT_Offset_To_Top_Func;
3369 procedure Set_DT_Position (Id : E; V : U) is
3371 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3373 end Set_DT_Position;
3375 procedure Set_DTC_Entity (Id : E; V : E) is
3377 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3381 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3383 pragma Assert (Ekind (Id) = E_Package);
3384 Set_Flag210 (Id, V);
3385 end Set_Elaborate_Body_Desirable;
3387 procedure Set_Elaboration_Entity (Id : E; V : E) is
3392 Ekind (Id) = E_Package
3394 Is_Generic_Unit (Id));
3396 end Set_Elaboration_Entity;
3398 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3403 Ekind (Id) = E_Package
3405 Is_Generic_Unit (Id));
3406 Set_Flag174 (Id, V);
3407 end Set_Elaboration_Entity_Required;
3409 procedure Set_Enclosing_Scope (Id : E; V : E) is
3412 end Set_Enclosing_Scope;
3414 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3416 pragma Assert (Is_Entry (Id));
3417 Set_Flag152 (Id, V);
3418 end Set_Entry_Accepted;
3420 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3423 end Set_Entry_Bodies_Array;
3425 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3428 end Set_Entry_Cancel_Parameter;
3430 procedure Set_Entry_Component (Id : E; V : E) is
3433 end Set_Entry_Component;
3435 procedure Set_Entry_Formal (Id : E; V : E) is
3438 end Set_Entry_Formal;
3440 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3442 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3444 end Set_Entry_Index_Constant;
3446 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3449 end Set_Entry_Parameters_Type;
3451 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3453 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3455 end Set_Enum_Pos_To_Rep;
3457 procedure Set_Enumeration_Pos (Id : E; V : U) is
3459 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3461 end Set_Enumeration_Pos;
3463 procedure Set_Enumeration_Rep (Id : E; V : U) is
3465 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3467 end Set_Enumeration_Rep;
3469 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3471 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3473 end Set_Enumeration_Rep_Expr;
3475 procedure Set_Equivalent_Type (Id : E; V : E) is
3478 (Ekind_In (Id, E_Class_Wide_Type,
3479 E_Class_Wide_Subtype,
3480 E_Access_Protected_Subprogram_Type,
3481 E_Anonymous_Access_Protected_Subprogram_Type,
3482 E_Access_Subprogram_Type,
3485 end Set_Equivalent_Type;
3487 procedure Set_Esize (Id : E; V : U) is
3492 procedure Set_Exception_Code (Id : E; V : U) is
3494 pragma Assert (Ekind (Id) = E_Exception);
3496 end Set_Exception_Code;
3498 procedure Set_Extra_Accessibility (Id : E; V : E) is
3500 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3502 end Set_Extra_Accessibility;
3504 procedure Set_Extra_Constrained (Id : E; V : E) is
3506 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3508 end Set_Extra_Constrained;
3510 procedure Set_Extra_Formal (Id : E; V : E) is
3513 end Set_Extra_Formal;
3515 procedure Set_Extra_Formals (Id : E; V : E) is
3518 (Is_Overloadable (Id)
3519 or else Ekind_In (Id, E_Entry_Family,
3521 E_Subprogram_Type));
3523 end Set_Extra_Formals;
3525 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3528 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3529 Set_Flag229 (Id, V);
3530 end Set_Can_Use_Internal_Rep;
3532 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3534 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3535 Set_Flag158 (Id, V);
3536 end Set_Finalize_Storage_Only;
3538 procedure Set_Finalizer (Id : E; V : E) is
3541 (Ekind (Id) = E_Package
3542 or else Ekind (Id) = E_Package_Body);
3546 procedure Set_First_Entity (Id : E; V : E) is
3549 end Set_First_Entity;
3551 procedure Set_First_Exit_Statement (Id : E; V : N) is
3553 pragma Assert (Ekind (Id) = E_Loop);
3555 end Set_First_Exit_Statement;
3557 procedure Set_First_Index (Id : E; V : N) is
3559 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3561 end Set_First_Index;
3563 procedure Set_First_Literal (Id : E; V : E) is
3565 pragma Assert (Is_Enumeration_Type (Id));
3567 end Set_First_Literal;
3569 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3571 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3573 end Set_First_Optional_Parameter;
3575 procedure Set_First_Private_Entity (Id : E; V : E) is
3577 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3578 or else Ekind (Id) in Concurrent_Kind);
3580 end Set_First_Private_Entity;
3582 procedure Set_First_Rep_Item (Id : E; V : N) is
3585 end Set_First_Rep_Item;
3587 procedure Set_Float_Rep (Id : E; V : F) is
3588 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3590 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3593 procedure Set_Freeze_Node (Id : E; V : N) is
3596 end Set_Freeze_Node;
3598 procedure Set_From_With_Type (Id : E; V : B := True) is
3602 or else Ekind (Id) = E_Package);
3603 Set_Flag159 (Id, V);
3604 end Set_From_With_Type;
3606 procedure Set_Full_View (Id : E; V : E) is
3608 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3612 procedure Set_Generic_Homonym (Id : E; V : E) is
3615 end Set_Generic_Homonym;
3617 procedure Set_Generic_Renamings (Id : E; V : L) is
3619 Set_Elist23 (Id, V);
3620 end Set_Generic_Renamings;
3622 procedure Set_Handler_Records (Id : E; V : S) is
3625 end Set_Handler_Records;
3627 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3629 pragma Assert (Id = Base_Type (Id));
3630 Set_Flag135 (Id, V);
3631 end Set_Has_Aliased_Components;
3633 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3636 end Set_Has_Alignment_Clause;
3638 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3641 end Set_Has_All_Calls_Remote;
3643 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3645 Set_Flag201 (Id, V);
3646 end Set_Has_Anon_Block_Suffix;
3648 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3650 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3652 end Set_Has_Atomic_Components;
3654 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3657 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3658 Set_Flag139 (Id, V);
3659 end Set_Has_Biased_Representation;
3661 procedure Set_Has_Completion (Id : E; V : B := True) is
3664 end Set_Has_Completion;
3666 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3668 pragma Assert (Is_Type (Id));
3670 end Set_Has_Completion_In_Body;
3672 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3674 pragma Assert (Ekind (Id) = E_Record_Type);
3675 Set_Flag140 (Id, V);
3676 end Set_Has_Complex_Representation;
3678 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3680 pragma Assert (Ekind (Id) = E_Array_Type);
3682 end Set_Has_Component_Size_Clause;
3684 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3686 pragma Assert (Is_Type (Id));
3687 Set_Flag187 (Id, V);
3688 end Set_Has_Constrained_Partial_View;
3690 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3692 Set_Flag181 (Id, V);
3693 end Set_Has_Contiguous_Rep;
3695 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3697 pragma Assert (Id = Base_Type (Id));
3699 end Set_Has_Controlled_Component;
3701 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3704 end Set_Has_Controlling_Result;
3706 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3708 Set_Flag119 (Id, V);
3709 end Set_Has_Convention_Pragma;
3711 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3714 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3715 and then Is_Base_Type (Id));
3717 end Set_Has_Default_Aspect;
3719 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3721 pragma Assert (Nkind (Id) in N_Entity);
3722 Set_Flag200 (Id, V);
3723 end Set_Has_Delayed_Aspects;
3725 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3727 pragma Assert (Nkind (Id) in N_Entity);
3729 end Set_Has_Delayed_Freeze;
3731 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3733 pragma Assert (Nkind (Id) in N_Entity);
3735 end Set_Has_Discriminants;
3737 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3739 pragma Assert (Ekind (Id) = E_Record_Type
3740 and then Is_Tagged_Type (Id));
3741 Set_Flag220 (Id, V);
3742 end Set_Has_Dispatch_Table;
3744 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3746 pragma Assert (Is_Enumeration_Type (Id));
3748 end Set_Has_Enumeration_Rep_Clause;
3750 procedure Set_Has_Exit (Id : E; V : B := True) is
3755 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3757 pragma Assert (Is_Tagged_Type (Id));
3758 Set_Flag110 (Id, V);
3759 end Set_Has_External_Tag_Rep_Clause;
3761 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3763 Set_Flag175 (Id, V);
3764 end Set_Has_Forward_Instantiation;
3766 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3768 Set_Flag173 (Id, V);
3769 end Set_Has_Fully_Qualified_Name;
3771 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3774 end Set_Has_Gigi_Rep_Item;
3776 procedure Set_Has_Homonym (Id : E; V : B := True) is
3779 end Set_Has_Homonym;
3781 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3783 pragma Assert (Is_Type (Id));
3784 Set_Flag248 (Id, V);
3785 end Set_Has_Inheritable_Invariants;
3787 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3789 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3790 Set_Flag219 (Id, V);
3791 end Set_Has_Initial_Value;
3793 procedure Set_Has_Invariants (Id : E; V : B := True) is
3795 pragma Assert (Is_Type (Id)
3796 or else Ekind (Id) = E_Procedure
3797 or else Ekind (Id) = E_Void);
3798 Set_Flag232 (Id, V);
3799 end Set_Has_Invariants;
3801 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3803 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3805 end Set_Has_Machine_Radix_Clause;
3807 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3810 end Set_Has_Master_Entity;
3812 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3814 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3815 Set_Flag142 (Id, V);
3816 end Set_Has_Missing_Return;
3818 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3820 Set_Flag101 (Id, V);
3821 end Set_Has_Nested_Block_With_Handler;
3823 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3825 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3826 Set_Flag215 (Id, V);
3827 end Set_Has_Up_Level_Access;
3829 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3831 pragma Assert (Id = Base_Type (Id));
3833 end Set_Has_Non_Standard_Rep;
3835 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3837 pragma Assert (Is_Type (Id));
3838 Set_Flag172 (Id, V);
3839 end Set_Has_Object_Size_Clause;
3841 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3843 Set_Flag154 (Id, V);
3844 end Set_Has_Per_Object_Constraint;
3846 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3848 Set_Flag188 (Id, V);
3849 end Set_Has_Persistent_BSS;
3851 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3853 pragma Assert (Is_Subprogram (Id));
3854 Set_Flag240 (Id, V);
3855 end Set_Has_Postconditions;
3857 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3859 pragma Assert (Is_Access_Type (Id));
3860 Set_Flag27 (Base_Type (Id), V);
3861 end Set_Has_Pragma_Controlled;
3863 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3865 Set_Flag150 (Id, V);
3866 end Set_Has_Pragma_Elaborate_Body;
3868 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3870 Set_Flag157 (Id, V);
3871 end Set_Has_Pragma_Inline;
3873 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3875 Set_Flag230 (Id, V);
3876 end Set_Has_Pragma_Inline_Always;
3878 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3880 pragma Assert (Is_Enumeration_Type (Id));
3881 pragma Assert (Id = Base_Type (Id));
3882 Set_Flag198 (Id, V);
3883 end Set_Has_Pragma_Ordered;
3885 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3887 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3888 pragma Assert (Id = Base_Type (Id));
3889 Set_Flag121 (Id, V);
3890 end Set_Has_Pragma_Pack;
3892 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3894 Set_Flag221 (Id, V);
3895 end Set_Has_Pragma_Preelab_Init;
3897 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3899 Set_Flag203 (Id, V);
3900 end Set_Has_Pragma_Pure;
3902 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3904 Set_Flag179 (Id, V);
3905 end Set_Has_Pragma_Pure_Function;
3907 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3909 Set_Flag169 (Id, V);
3910 end Set_Has_Pragma_Thread_Local_Storage;
3912 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3914 Set_Flag233 (Id, V);
3915 end Set_Has_Pragma_Unmodified;
3917 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3919 Set_Flag180 (Id, V);
3920 end Set_Has_Pragma_Unreferenced;
3922 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3924 pragma Assert (Is_Type (Id));
3925 Set_Flag212 (Id, V);
3926 end Set_Has_Pragma_Unreferenced_Objects;
3928 procedure Set_Has_Predicates (Id : E; V : B := True) is
3930 Set_Flag250 (Id, V);
3931 end Set_Has_Predicates;
3933 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3935 pragma Assert (Id = Base_Type (Id));
3936 Set_Flag120 (Id, V);
3937 end Set_Has_Primitive_Operations;
3939 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3941 Set_Flag155 (Id, V);
3942 end Set_Has_Private_Declaration;
3944 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3946 Set_Flag161 (Id, V);
3947 end Set_Has_Qualified_Name;
3949 procedure Set_Has_RACW (Id : E; V : B := True) is
3951 pragma Assert (Ekind (Id) = E_Package);
3952 Set_Flag214 (Id, V);
3955 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3957 pragma Assert (Id = Base_Type (Id));
3959 end Set_Has_Record_Rep_Clause;
3961 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3963 pragma Assert (Is_Subprogram (Id));
3964 Set_Flag143 (Id, V);
3965 end Set_Has_Recursive_Call;
3967 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3970 end Set_Has_Size_Clause;
3972 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3975 end Set_Has_Small_Clause;
3977 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3979 pragma Assert (Id = Base_Type (Id));
3980 Set_Flag100 (Id, V);
3981 end Set_Has_Specified_Layout;
3983 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3985 pragma Assert (Is_Type (Id));
3986 Set_Flag190 (Id, V);
3987 end Set_Has_Specified_Stream_Input;
3989 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3991 pragma Assert (Is_Type (Id));
3992 Set_Flag191 (Id, V);
3993 end Set_Has_Specified_Stream_Output;
3995 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3997 pragma Assert (Is_Type (Id));
3998 Set_Flag192 (Id, V);
3999 end Set_Has_Specified_Stream_Read;
4001 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4003 pragma Assert (Is_Type (Id));
4004 Set_Flag193 (Id, V);
4005 end Set_Has_Specified_Stream_Write;
4007 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4009 Set_Flag211 (Id, V);
4010 end Set_Has_Static_Discriminants;
4012 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4014 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4015 pragma Assert (Id = Base_Type (Id));
4017 end Set_Has_Storage_Size_Clause;
4019 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4021 pragma Assert (Is_Elementary_Type (Id));
4022 Set_Flag184 (Id, V);
4023 end Set_Has_Stream_Size_Clause;
4025 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4028 end Set_Has_Subprogram_Descriptor;
4030 procedure Set_Has_Task (Id : E; V : B := True) is
4032 pragma Assert (Id = Base_Type (Id));
4036 procedure Set_Has_Thunks (Id : E; V : B := True) is
4038 pragma Assert (Is_Tag (Id));
4039 Set_Flag228 (Id, V);
4042 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4044 pragma Assert (Id = Base_Type (Id));
4045 Set_Flag123 (Id, V);
4046 end Set_Has_Unchecked_Union;
4048 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4050 pragma Assert (Is_Type (Id));
4052 end Set_Has_Unknown_Discriminants;
4054 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4056 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4058 end Set_Has_Volatile_Components;
4060 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4062 Set_Flag182 (Id, V);
4063 end Set_Has_Xref_Entry;
4065 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4067 pragma Assert (Ekind (Id) = E_Variable);
4069 end Set_Hiding_Loop_Variable;
4071 procedure Set_Homonym (Id : E; V : E) is
4073 pragma Assert (Id /= V);
4077 procedure Set_Interface_Alias (Id : E; V : E) is
4081 and then Is_Hidden (Id)
4082 and then (Ekind_In (Id, E_Procedure, E_Function)));
4084 end Set_Interface_Alias;
4086 procedure Set_Interfaces (Id : E; V : L) is
4088 pragma Assert (Is_Record_Type (Id));
4089 Set_Elist25 (Id, V);
4092 procedure Set_In_Package_Body (Id : E; V : B := True) is
4095 end Set_In_Package_Body;
4097 procedure Set_In_Private_Part (Id : E; V : B := True) is
4100 end Set_In_Private_Part;
4102 procedure Set_In_Use (Id : E; V : B := True) is
4104 pragma Assert (Nkind (Id) in N_Entity);
4108 procedure Set_Inner_Instances (Id : E; V : L) is
4110 Set_Elist23 (Id, V);
4111 end Set_Inner_Instances;
4113 procedure Set_Interface_Name (Id : E; V : N) is
4116 end Set_Interface_Name;
4118 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4120 pragma Assert (Is_Overloadable (Id));
4122 end Set_Is_Abstract_Subprogram;
4124 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4126 pragma Assert (Is_Type (Id));
4127 Set_Flag146 (Id, V);
4128 end Set_Is_Abstract_Type;
4130 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4132 pragma Assert (Is_Access_Type (Id));
4133 Set_Flag194 (Id, V);
4134 end Set_Is_Local_Anonymous_Access;
4136 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4138 pragma Assert (Is_Access_Type (Id));
4140 end Set_Is_Access_Constant;
4142 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4144 Set_Flag185 (Id, V);
4145 end Set_Is_Ada_2005_Only;
4147 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4149 Set_Flag199 (Id, V);
4150 end Set_Is_Ada_2012_Only;
4152 procedure Set_Is_Aliased (Id : E; V : B := True) is
4154 pragma Assert (Nkind (Id) in N_Entity);
4158 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4160 pragma Assert (Is_Entry (Id));
4161 Set_Flag132 (Id, V);
4162 end Set_Is_AST_Entry;
4164 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4167 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4169 end Set_Is_Asynchronous;
4171 procedure Set_Is_Atomic (Id : E; V : B := True) is
4176 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4178 pragma Assert ((not V)
4179 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4180 Set_Flag122 (Id, V);
4181 end Set_Is_Bit_Packed_Array;
4183 procedure Set_Is_Called (Id : E; V : B := True) is
4185 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4186 Set_Flag102 (Id, V);
4189 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4192 end Set_Is_Character_Type;
4194 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4197 end Set_Is_Child_Unit;
4199 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4202 end Set_Is_Class_Wide_Equivalent_Type;
4204 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4206 Set_Flag149 (Id, V);
4207 end Set_Is_Compilation_Unit;
4209 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4211 pragma Assert (Ekind (Id) = E_Discriminant);
4212 Set_Flag103 (Id, V);
4213 end Set_Is_Completely_Hidden;
4215 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4218 end Set_Is_Concurrent_Record_Type;
4220 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4223 end Set_Is_Constr_Subt_For_U_Nominal;
4225 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4227 Set_Flag141 (Id, V);
4228 end Set_Is_Constr_Subt_For_UN_Aliased;
4230 procedure Set_Is_Constrained (Id : E; V : B := True) is
4232 pragma Assert (Nkind (Id) in N_Entity);
4234 end Set_Is_Constrained;
4236 procedure Set_Is_Constructor (Id : E; V : B := True) is
4239 end Set_Is_Constructor;
4241 procedure Set_Is_Controlled (Id : E; V : B := True) is
4243 pragma Assert (Id = Base_Type (Id));
4245 end Set_Is_Controlled;
4247 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4249 pragma Assert (Is_Formal (Id));
4251 end Set_Is_Controlling_Formal;
4253 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4256 end Set_Is_CPP_Class;
4258 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4260 pragma Assert (Is_Type (Id));
4261 Set_Flag223 (Id, V);
4262 end Set_Is_Descendent_Of_Address;
4264 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4266 Set_Flag176 (Id, V);
4267 end Set_Is_Discrim_SO_Function;
4269 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4271 Set_Flag234 (Id, V);
4272 end Set_Is_Dispatch_Table_Entity;
4274 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4279 Is_Overloadable (Id)
4281 Ekind (Id) = E_Subprogram_Type);
4284 end Set_Is_Dispatching_Operation;
4286 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4288 Set_Flag124 (Id, V);
4289 end Set_Is_Eliminated;
4291 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4294 end Set_Is_Entry_Formal;
4296 procedure Set_Is_Exported (Id : E; V : B := True) is
4299 end Set_Is_Exported;
4301 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4304 end Set_Is_First_Subtype;
4306 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4308 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4309 Set_Flag118 (Id, V);
4310 end Set_Is_For_Access_Subtype;
4312 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4314 Set_Flag111 (Id, V);
4315 end Set_Is_Formal_Subprogram;
4317 procedure Set_Is_Frozen (Id : E; V : B := True) is
4319 pragma Assert (Nkind (Id) in N_Entity);
4323 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4325 pragma Assert (Is_Type (Id));
4327 end Set_Is_Generic_Actual_Type;
4329 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4331 Set_Flag130 (Id, V);
4332 end Set_Is_Generic_Instance;
4334 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4336 pragma Assert (Nkind (Id) in N_Entity);
4338 end Set_Is_Generic_Type;
4340 procedure Set_Is_Hidden (Id : E; V : B := True) is
4345 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4347 Set_Flag171 (Id, V);
4348 end Set_Is_Hidden_Open_Scope;
4350 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4352 pragma Assert (Nkind (Id) in N_Entity);
4354 end Set_Is_Immediately_Visible;
4356 procedure Set_Is_Imported (Id : E; V : B := True) is
4359 end Set_Is_Imported;
4361 procedure Set_Is_Inlined (Id : E; V : B := True) is
4366 procedure Set_Is_Interface (Id : E; V : B := True) is
4368 pragma Assert (Is_Record_Type (Id));
4369 Set_Flag186 (Id, V);
4370 end Set_Is_Interface;
4372 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4374 Set_Flag126 (Id, V);
4375 end Set_Is_Instantiated;
4377 procedure Set_Is_Internal (Id : E; V : B := True) is
4379 pragma Assert (Nkind (Id) in N_Entity);
4381 end Set_Is_Internal;
4383 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4385 pragma Assert (Nkind (Id) in N_Entity);
4387 end Set_Is_Interrupt_Handler;
4389 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4392 end Set_Is_Intrinsic_Subprogram;
4394 procedure Set_Is_Itype (Id : E; V : B := True) is
4399 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4402 end Set_Is_Known_Non_Null;
4404 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4406 Set_Flag204 (Id, V);
4407 end Set_Is_Known_Null;
4409 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4411 Set_Flag170 (Id, V);
4412 end Set_Is_Known_Valid;
4414 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4416 pragma Assert (Is_Type (Id));
4417 Set_Flag106 (Id, V);
4418 end Set_Is_Limited_Composite;
4420 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4422 pragma Assert (Is_Interface (Id));
4423 Set_Flag197 (Id, V);
4424 end Set_Is_Limited_Interface;
4426 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4429 end Set_Is_Limited_Record;
4431 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4433 pragma Assert (Is_Subprogram (Id));
4434 Set_Flag137 (Id, V);
4435 end Set_Is_Machine_Code_Subprogram;
4437 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4439 pragma Assert (Is_Type (Id));
4440 Set_Flag109 (Id, V);
4441 end Set_Is_Non_Static_Subtype;
4443 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4445 pragma Assert (Ekind (Id) = E_Procedure);
4446 Set_Flag178 (Id, V);
4447 end Set_Is_Null_Init_Proc;
4449 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4451 Set_Flag153 (Id, V);
4452 end Set_Is_Obsolescent;
4454 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4456 pragma Assert (Ekind (Id) = E_Out_Parameter);
4457 Set_Flag226 (Id, V);
4458 end Set_Is_Only_Out_Parameter;
4460 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4462 pragma Assert (Is_Formal (Id));
4463 Set_Flag134 (Id, V);
4464 end Set_Is_Optional_Parameter;
4466 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4468 Set_Flag160 (Id, V);
4469 end Set_Is_Package_Body_Entity;
4471 procedure Set_Is_Packed (Id : E; V : B := True) is
4473 pragma Assert (Id = Base_Type (Id));
4477 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4479 Set_Flag138 (Id, V);
4480 end Set_Is_Packed_Array_Type;
4482 procedure Set_Is_Postcondition_Proc (Id : E; V : B := True) is
4484 pragma Assert (Ekind (Id) = E_Procedure);
4485 Set_Flag253 (Id, V);
4486 end Set_Is_Postcondition_Proc;
4488 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4490 pragma Assert (Nkind (Id) in N_Entity);
4492 end Set_Is_Potentially_Use_Visible;
4494 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4497 end Set_Is_Preelaborated;
4499 procedure Set_Is_Primitive (Id : E; V : B := True) is
4502 (Is_Overloadable (Id)
4503 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4504 Set_Flag218 (Id, V);
4505 end Set_Is_Primitive;
4507 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4509 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4510 Set_Flag195 (Id, V);
4511 end Set_Is_Primitive_Wrapper;
4513 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4515 pragma Assert (Is_Type (Id));
4516 Set_Flag107 (Id, V);
4517 end Set_Is_Private_Composite;
4519 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4522 end Set_Is_Private_Descendant;
4524 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4526 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4527 Set_Flag245 (Id, V);
4528 end Set_Is_Private_Primitive;
4530 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4532 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4533 Set_Flag252 (Id, V);
4534 end Set_Is_Processed_Transient;
4536 procedure Set_Is_Public (Id : E; V : B := True) is
4538 pragma Assert (Nkind (Id) in N_Entity);
4542 procedure Set_Is_Pure (Id : E; V : B := True) is
4547 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4549 pragma Assert (Is_Access_Type (Id));
4550 Set_Flag189 (Id, V);
4551 end Set_Is_Pure_Unit_Access_Type;
4553 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4555 pragma Assert (Is_Type (Id));
4556 Set_Flag244 (Id, V);
4557 end Set_Is_RACW_Stub_Type;
4559 procedure Set_Is_Raised (Id : E; V : B := True) is
4561 pragma Assert (Ekind (Id) = E_Exception);
4562 Set_Flag224 (Id, V);
4565 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4568 end Set_Is_Remote_Call_Interface;
4570 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4573 end Set_Is_Remote_Types;
4575 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4577 Set_Flag112 (Id, V);
4578 end Set_Is_Renaming_Of_Object;
4580 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4582 Set_Flag209 (Id, V);
4583 end Set_Is_Return_Object;
4585 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4587 pragma Assert (Ekind (Id) = E_Variable);
4588 Set_Flag249 (Id, V);
4589 end Set_Is_Safe_To_Reevaluate;
4591 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4594 end Set_Is_Shared_Passive;
4596 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4600 or else Ekind_In (Id, E_Exception,
4605 end Set_Is_Statically_Allocated;
4607 procedure Set_Is_Tag (Id : E; V : B := True) is
4609 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4613 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4616 end Set_Is_Tagged_Type;
4618 procedure Set_Is_Thunk (Id : E; V : B := True) is
4620 Set_Flag225 (Id, V);
4623 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4625 Set_Flag235 (Id, V);
4626 end Set_Is_Trivial_Subprogram;
4628 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4630 Set_Flag163 (Id, V);
4631 end Set_Is_True_Constant;
4633 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4635 pragma Assert (Id = Base_Type (Id));
4636 Set_Flag117 (Id, V);
4637 end Set_Is_Unchecked_Union;
4639 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4641 pragma Assert (Ekind (Id) = E_Record_Type);
4642 Set_Flag246 (Id, V);
4643 end Set_Is_Underlying_Record_View;
4645 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4647 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4648 Set_Flag144 (Id, V);
4649 end Set_Is_Unsigned_Type;
4651 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4653 pragma Assert (Ekind (Id) = E_Procedure);
4654 Set_Flag127 (Id, V);
4655 end Set_Is_Valued_Procedure;
4657 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4659 pragma Assert (Is_Child_Unit (Id));
4660 Set_Flag116 (Id, V);
4661 end Set_Is_Visible_Child_Unit;
4663 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4665 Set_Flag206 (Id, V);
4666 end Set_Is_Visible_Formal;
4668 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4670 pragma Assert (Ekind (Id) = E_Exception);
4671 Set_Flag133 (Id, V);
4672 end Set_Is_VMS_Exception;
4674 procedure Set_Is_Volatile (Id : E; V : B := True) is
4676 pragma Assert (Nkind (Id) in N_Entity);
4678 end Set_Is_Volatile;
4680 procedure Set_Itype_Printed (Id : E; V : B := True) is
4682 pragma Assert (Is_Itype (Id));
4683 Set_Flag202 (Id, V);
4684 end Set_Itype_Printed;
4686 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4689 end Set_Kill_Elaboration_Checks;
4691 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4694 end Set_Kill_Range_Checks;
4696 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4699 end Set_Kill_Tag_Checks;
4701 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4703 pragma Assert (Is_Type (Id));
4704 Set_Flag207 (Id, V);
4705 end Set_Known_To_Have_Preelab_Init;
4707 procedure Set_Last_Assignment (Id : E; V : N) is
4709 pragma Assert (Is_Assignable (Id));
4711 end Set_Last_Assignment;
4713 procedure Set_Last_Entity (Id : E; V : E) is
4716 end Set_Last_Entity;
4718 procedure Set_Limited_View (Id : E; V : E) is
4720 pragma Assert (Ekind (Id) = E_Package);
4722 end Set_Limited_View;
4724 procedure Set_Lit_Indexes (Id : E; V : E) is
4726 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4728 end Set_Lit_Indexes;
4730 procedure Set_Lit_Strings (Id : E; V : E) is
4732 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4734 end Set_Lit_Strings;
4736 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4738 pragma Assert (Is_Formal (Id));
4739 Set_Flag205 (Id, V);
4740 end Set_Low_Bound_Tested;
4742 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4744 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4746 end Set_Machine_Radix_10;
4748 procedure Set_Master_Id (Id : E; V : E) is
4750 pragma Assert (Is_Access_Type (Id));
4754 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4756 Set_Flag168 (Id, V);
4757 end Set_Materialize_Entity;
4759 procedure Set_Mechanism (Id : E; V : M) is
4761 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4762 Set_Uint8 (Id, UI_From_Int (V));
4765 procedure Set_Modulus (Id : E; V : U) is
4767 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4771 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4773 pragma Assert (Is_Type (Id));
4774 Set_Flag183 (Id, V);
4775 end Set_Must_Be_On_Byte_Boundary;
4777 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4779 pragma Assert (Is_Type (Id));
4780 Set_Flag208 (Id, V);
4781 end Set_Must_Have_Preelab_Init;
4783 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4785 Set_Flag147 (Id, V);
4786 end Set_Needs_Debug_Info;
4788 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4791 (Is_Overloadable (Id)
4792 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4794 end Set_Needs_No_Actuals;
4796 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4798 Set_Flag115 (Id, V);
4799 end Set_Never_Set_In_Source;
4801 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4804 end Set_Next_Inlined_Subprogram;
4806 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4808 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4809 Set_Flag131 (Id, V);
4810 end Set_No_Pool_Assigned;
4812 procedure Set_No_Return (Id : E; V : B := True) is
4815 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4816 Set_Flag113 (Id, V);
4819 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4821 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4822 Set_Flag136 (Id, V);
4823 end Set_No_Strict_Aliasing;
4825 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4827 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4829 end Set_Non_Binary_Modulus;
4831 procedure Set_Non_Limited_View (Id : E; V : E) is
4833 pragma Assert (Ekind (Id) in Incomplete_Kind);
4835 end Set_Non_Limited_View;
4837 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4840 (Root_Type (Id) = Standard_Boolean
4841 and then Ekind (Id) = E_Enumeration_Type);
4842 Set_Flag162 (Id, V);
4843 end Set_Nonzero_Is_True;
4845 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4847 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4849 end Set_Normalized_First_Bit;
4851 procedure Set_Normalized_Position (Id : E; V : U) is
4853 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4855 end Set_Normalized_Position;
4857 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4859 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4861 end Set_Normalized_Position_Max;
4863 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4865 pragma Assert (Ekind (Id) = E_Variable);
4866 Set_Flag247 (Id, V);
4867 end Set_OK_To_Rename;
4869 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4872 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4873 Set_Flag239 (Id, V);
4874 end Set_OK_To_Reorder_Components;
4876 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4879 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4880 Set_Flag241 (Id, V);
4881 end Set_Optimize_Alignment_Space;
4883 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4886 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4887 Set_Flag242 (Id, V);
4888 end Set_Optimize_Alignment_Time;
4890 procedure Set_Original_Access_Type (Id : E; V : E) is
4892 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4894 end Set_Original_Access_Type;
4896 procedure Set_Original_Array_Type (Id : E; V : E) is
4898 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4900 end Set_Original_Array_Type;
4902 procedure Set_Original_Record_Component (Id : E; V : E) is
4904 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4906 end Set_Original_Record_Component;
4908 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4910 Set_Flag243 (Id, V);
4911 end Set_Overlays_Constant;
4913 procedure Set_Overridden_Operation (Id : E; V : E) is
4916 end Set_Overridden_Operation;
4918 procedure Set_Package_Instantiation (Id : E; V : N) is
4920 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4922 end Set_Package_Instantiation;
4924 procedure Set_Packed_Array_Type (Id : E; V : E) is
4926 pragma Assert (Is_Array_Type (Id));
4928 end Set_Packed_Array_Type;
4930 procedure Set_Parent_Subtype (Id : E; V : E) is
4932 pragma Assert (Ekind (Id) = E_Record_Type);
4934 end Set_Parent_Subtype;
4936 procedure Set_Postcondition_Proc (Id : E; V : E) is
4938 pragma Assert (Ekind (Id) = E_Procedure);
4940 end Set_Postcondition_Proc;
4942 procedure Set_PPC_Wrapper (Id : E; V : E) is
4944 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4946 end Set_PPC_Wrapper;
4948 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4950 pragma Assert (Is_Tagged_Type (Id));
4951 Set_Elist10 (Id, V);
4952 end Set_Direct_Primitive_Operations;
4954 procedure Set_Prival (Id : E; V : E) is
4956 pragma Assert (Is_Protected_Component (Id));
4960 procedure Set_Prival_Link (Id : E; V : E) is
4962 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4964 end Set_Prival_Link;
4966 procedure Set_Private_Dependents (Id : E; V : L) is
4968 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4969 Set_Elist18 (Id, V);
4970 end Set_Private_Dependents;
4972 procedure Set_Private_View (Id : E; V : N) is
4974 pragma Assert (Is_Private_Type (Id));
4976 end Set_Private_View;
4978 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4980 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4982 end Set_Protected_Body_Subprogram;
4984 procedure Set_Protected_Formal (Id : E; V : E) is
4986 pragma Assert (Is_Formal (Id));
4988 end Set_Protected_Formal;
4990 procedure Set_Protection_Object (Id : E; V : E) is
4992 pragma Assert (Ekind_In (Id, E_Entry,
4997 end Set_Protection_Object;
4999 procedure Set_Reachable (Id : E; V : B := True) is
5004 procedure Set_Referenced (Id : E; V : B := True) is
5006 Set_Flag156 (Id, V);
5009 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5012 end Set_Referenced_As_LHS;
5014 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5016 Set_Flag227 (Id, V);
5017 end Set_Referenced_As_Out_Parameter;
5019 procedure Set_Register_Exception_Call (Id : E; V : N) is
5021 pragma Assert (Ekind (Id) = E_Exception);
5023 end Set_Register_Exception_Call;
5025 procedure Set_Related_Array_Object (Id : E; V : E) is
5027 pragma Assert (Is_Array_Type (Id));
5029 end Set_Related_Array_Object;
5031 procedure Set_Related_Expression (Id : E; V : N) is
5033 pragma Assert (Ekind (Id) in Type_Kind
5034 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5036 end Set_Related_Expression;
5038 procedure Set_Related_Instance (Id : E; V : E) is
5040 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5042 end Set_Related_Instance;
5044 procedure Set_Related_Type (Id : E; V : E) is
5046 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5048 end Set_Related_Type;
5050 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5052 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5054 end Set_Relative_Deadline_Variable;
5056 procedure Set_Renamed_Entity (Id : E; V : N) is
5059 end Set_Renamed_Entity;
5061 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5063 pragma Assert (Ekind (Id) = E_Package);
5064 Set_Flag231 (Id, V);
5065 end Set_Renamed_In_Spec;
5067 procedure Set_Renamed_Object (Id : E; V : N) is
5070 end Set_Renamed_Object;
5072 procedure Set_Renaming_Map (Id : E; V : U) is
5075 end Set_Renaming_Map;
5077 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5079 pragma Assert (Is_Overloadable (Id));
5080 Set_Flag213 (Id, V);
5081 end Set_Requires_Overriding;
5083 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5085 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5087 end Set_Return_Flag_Or_Transient_Decl;
5089 procedure Set_Return_Present (Id : E; V : B := True) is
5092 end Set_Return_Present;
5094 procedure Set_Return_Applies_To (Id : E; V : N) is
5097 end Set_Return_Applies_To;
5099 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5102 end Set_Returns_By_Ref;
5104 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5107 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5108 Set_Flag164 (Id, V);
5109 end Set_Reverse_Bit_Order;
5111 procedure Set_RM_Size (Id : E; V : U) is
5113 pragma Assert (Is_Type (Id));
5117 procedure Set_Scalar_Range (Id : E; V : N) is
5120 end Set_Scalar_Range;
5122 procedure Set_Scale_Value (Id : E; V : U) is
5125 end Set_Scale_Value;
5127 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5129 pragma Assert (not Is_Record_Type (Id));
5131 end Set_Scope_Depth_Value;
5133 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5135 Set_Flag167 (Id, V);
5136 end Set_Sec_Stack_Needed_For_Return;
5138 procedure Set_Shadow_Entities (Id : E; V : S) is
5140 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5142 end Set_Shadow_Entities;
5144 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5146 pragma Assert (Ekind (Id) = E_Variable);
5148 end Set_Shared_Var_Procs_Instance;
5150 procedure Set_Size_Check_Code (Id : E; V : N) is
5152 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5154 end Set_Size_Check_Code;
5156 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5158 Set_Flag177 (Id, V);
5159 end Set_Size_Depends_On_Discriminant;
5161 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5164 end Set_Size_Known_At_Compile_Time;
5166 procedure Set_Small_Value (Id : E; V : R) is
5168 pragma Assert (Is_Fixed_Point_Type (Id));
5169 Set_Ureal21 (Id, V);
5170 end Set_Small_Value;
5172 procedure Set_Spec_Entity (Id : E; V : E) is
5174 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5176 end Set_Spec_Entity;
5178 procedure Set_Spec_PPC_List (Id : E; V : N) is
5181 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5182 or else Is_Subprogram (Id)
5183 or else Is_Generic_Subprogram (Id));
5185 end Set_Spec_PPC_List;
5187 procedure Set_Static_Predicate (Id : E; V : S) is
5190 (Ekind_In (Id, E_Enumeration_Subtype,
5191 E_Modular_Integer_Subtype,
5192 E_Signed_Integer_Subtype)
5193 and then Has_Predicates (Id));
5195 end Set_Static_Predicate;
5197 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5199 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5200 pragma Assert (Id = Base_Type (Id));
5202 end Set_Storage_Size_Variable;
5204 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5206 pragma Assert (Ekind (Id) = E_Package);
5208 end Set_Static_Elaboration_Desired;
5210 procedure Set_Static_Initialization (Id : E; V : N) is
5213 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5215 end Set_Static_Initialization;
5217 procedure Set_Stored_Constraint (Id : E; V : L) is
5219 pragma Assert (Nkind (Id) in N_Entity);
5220 Set_Elist23 (Id, V);
5221 end Set_Stored_Constraint;
5223 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5225 pragma Assert (Id = Base_Type (Id));
5226 Set_Flag145 (Id, V);
5227 end Set_Strict_Alignment;
5229 procedure Set_String_Literal_Length (Id : E; V : U) is
5231 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5233 end Set_String_Literal_Length;
5235 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5237 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5239 end Set_String_Literal_Low_Bound;
5241 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5243 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5245 end Set_Subprograms_For_Type;
5247 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5249 Set_Flag148 (Id, V);
5250 end Set_Suppress_Elaboration_Warnings;
5252 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5254 pragma Assert (Is_Type (Id));
5255 Set_Flag105 (Id, V);
5256 end Set_Suppress_Initialization;
5258 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5260 Set_Flag165 (Id, V);
5261 end Set_Suppress_Style_Checks;
5263 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5265 Set_Flag217 (Id, V);
5266 end Set_Suppress_Value_Tracking_On_Call;
5268 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5270 pragma Assert (Ekind (Id) in Task_Kind);
5272 end Set_Task_Body_Procedure;
5274 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5277 end Set_Treat_As_Volatile;
5279 procedure Set_Underlying_Full_View (Id : E; V : E) is
5281 pragma Assert (Ekind (Id) in Private_Kind);
5283 end Set_Underlying_Full_View;
5285 procedure Set_Underlying_Record_View (Id : E; V : E) is
5287 pragma Assert (Ekind (Id) = E_Record_Type);
5289 end Set_Underlying_Record_View;
5291 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5293 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5294 Set_Flag216 (Id, V);
5295 end Set_Universal_Aliasing;
5297 procedure Set_Unset_Reference (Id : E; V : N) is
5300 end Set_Unset_Reference;
5302 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5305 end Set_Uses_Sec_Stack;
5307 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5309 Set_Flag222 (Id, V);
5310 end Set_Used_As_Generic_Actual;
5312 procedure Set_Warnings_Off (Id : E; V : B := True) is
5315 end Set_Warnings_Off;
5317 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5319 Set_Flag236 (Id, V);
5320 end Set_Warnings_Off_Used;
5322 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5324 Set_Flag237 (Id, V);
5325 end Set_Warnings_Off_Used_Unmodified;
5327 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5329 Set_Flag238 (Id, V);
5330 end Set_Warnings_Off_Used_Unreferenced;
5332 procedure Set_Was_Hidden (Id : E; V : B := True) is
5334 Set_Flag196 (Id, V);
5337 procedure Set_Wrapped_Entity (Id : E; V : E) is
5339 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5340 and then Is_Primitive_Wrapper (Id));
5342 end Set_Wrapped_Entity;
5344 -----------------------------------
5345 -- Field Initialization Routines --
5346 -----------------------------------
5348 procedure Init_Alignment (Id : E) is
5350 Set_Uint14 (Id, Uint_0);
5353 procedure Init_Alignment (Id : E; V : Int) is
5355 Set_Uint14 (Id, UI_From_Int (V));
5358 procedure Init_Component_Bit_Offset (Id : E) is
5360 Set_Uint11 (Id, No_Uint);
5361 end Init_Component_Bit_Offset;
5363 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5365 Set_Uint11 (Id, UI_From_Int (V));
5366 end Init_Component_Bit_Offset;
5368 procedure Init_Component_Size (Id : E) is
5370 Set_Uint22 (Id, Uint_0);
5371 end Init_Component_Size;
5373 procedure Init_Component_Size (Id : E; V : Int) is
5375 Set_Uint22 (Id, UI_From_Int (V));
5376 end Init_Component_Size;
5378 procedure Init_Digits_Value (Id : E) is
5380 Set_Uint17 (Id, Uint_0);
5381 end Init_Digits_Value;
5383 procedure Init_Digits_Value (Id : E; V : Int) is
5385 Set_Uint17 (Id, UI_From_Int (V));
5386 end Init_Digits_Value;
5388 procedure Init_Esize (Id : E) is
5390 Set_Uint12 (Id, Uint_0);
5393 procedure Init_Esize (Id : E; V : Int) is
5395 Set_Uint12 (Id, UI_From_Int (V));
5398 procedure Init_Normalized_First_Bit (Id : E) is
5400 Set_Uint8 (Id, No_Uint);
5401 end Init_Normalized_First_Bit;
5403 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5405 Set_Uint8 (Id, UI_From_Int (V));
5406 end Init_Normalized_First_Bit;
5408 procedure Init_Normalized_Position (Id : E) is
5410 Set_Uint14 (Id, No_Uint);
5411 end Init_Normalized_Position;
5413 procedure Init_Normalized_Position (Id : E; V : Int) is
5415 Set_Uint14 (Id, UI_From_Int (V));
5416 end Init_Normalized_Position;
5418 procedure Init_Normalized_Position_Max (Id : E) is
5420 Set_Uint10 (Id, No_Uint);
5421 end Init_Normalized_Position_Max;
5423 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5425 Set_Uint10 (Id, UI_From_Int (V));
5426 end Init_Normalized_Position_Max;
5428 procedure Init_RM_Size (Id : E) is
5430 Set_Uint13 (Id, Uint_0);
5433 procedure Init_RM_Size (Id : E; V : Int) is
5435 Set_Uint13 (Id, UI_From_Int (V));
5438 -----------------------------
5439 -- Init_Component_Location --
5440 -----------------------------
5442 procedure Init_Component_Location (Id : E) is
5444 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5445 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5446 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5447 Set_Uint12 (Id, Uint_0); -- Esize
5448 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5449 end Init_Component_Location;
5455 procedure Init_Size (Id : E; V : Int) is
5457 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5458 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5461 ---------------------
5462 -- Init_Size_Align --
5463 ---------------------
5465 procedure Init_Size_Align (Id : E) is
5467 Set_Uint12 (Id, Uint_0); -- Esize
5468 Set_Uint13 (Id, Uint_0); -- RM_Size
5469 Set_Uint14 (Id, Uint_0); -- Alignment
5470 end Init_Size_Align;
5472 ----------------------------------------------
5473 -- Type Representation Attribute Predicates --
5474 ----------------------------------------------
5476 function Known_Alignment (E : Entity_Id) return B is
5478 return Uint14 (E) /= Uint_0
5479 and then Uint14 (E) /= No_Uint;
5480 end Known_Alignment;
5482 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5484 return Uint11 (E) /= No_Uint;
5485 end Known_Component_Bit_Offset;
5487 function Known_Component_Size (E : Entity_Id) return B is
5489 return Uint22 (Base_Type (E)) /= Uint_0
5490 and then Uint22 (Base_Type (E)) /= No_Uint;
5491 end Known_Component_Size;
5493 function Known_Esize (E : Entity_Id) return B is
5495 return Uint12 (E) /= Uint_0
5496 and then Uint12 (E) /= No_Uint;
5499 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5501 return Uint8 (E) /= No_Uint;
5502 end Known_Normalized_First_Bit;
5504 function Known_Normalized_Position (E : Entity_Id) return B is
5506 return Uint14 (E) /= No_Uint;
5507 end Known_Normalized_Position;
5509 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5511 return Uint10 (E) /= No_Uint;
5512 end Known_Normalized_Position_Max;
5514 function Known_RM_Size (E : Entity_Id) return B is
5516 return Uint13 (E) /= No_Uint
5517 and then (Uint13 (E) /= Uint_0
5518 or else Is_Discrete_Type (E)
5519 or else Is_Fixed_Point_Type (E));
5522 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5524 return Uint11 (E) /= No_Uint
5525 and then Uint11 (E) >= Uint_0;
5526 end Known_Static_Component_Bit_Offset;
5528 function Known_Static_Component_Size (E : Entity_Id) return B is
5530 return Uint22 (Base_Type (E)) > Uint_0;
5531 end Known_Static_Component_Size;
5533 function Known_Static_Esize (E : Entity_Id) return B is
5535 return Uint12 (E) > Uint_0
5536 and then not Is_Generic_Type (E);
5537 end Known_Static_Esize;
5539 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5541 return Uint8 (E) /= No_Uint
5542 and then Uint8 (E) >= Uint_0;
5543 end Known_Static_Normalized_First_Bit;
5545 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5547 return Uint14 (E) /= No_Uint
5548 and then Uint14 (E) >= Uint_0;
5549 end Known_Static_Normalized_Position;
5551 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5553 return Uint10 (E) /= No_Uint
5554 and then Uint10 (E) >= Uint_0;
5555 end Known_Static_Normalized_Position_Max;
5557 function Known_Static_RM_Size (E : Entity_Id) return B is
5559 return (Uint13 (E) > Uint_0
5560 or else Is_Discrete_Type (E)
5561 or else Is_Fixed_Point_Type (E))
5562 and then not Is_Generic_Type (E);
5563 end Known_Static_RM_Size;
5565 function Unknown_Alignment (E : Entity_Id) return B is
5567 return Uint14 (E) = Uint_0
5568 or else Uint14 (E) = No_Uint;
5569 end Unknown_Alignment;
5571 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5573 return Uint11 (E) = No_Uint;
5574 end Unknown_Component_Bit_Offset;
5576 function Unknown_Component_Size (E : Entity_Id) return B is
5578 return Uint22 (Base_Type (E)) = Uint_0
5580 Uint22 (Base_Type (E)) = No_Uint;
5581 end Unknown_Component_Size;
5583 function Unknown_Esize (E : Entity_Id) return B is
5585 return Uint12 (E) = No_Uint
5587 Uint12 (E) = Uint_0;
5590 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5592 return Uint8 (E) = No_Uint;
5593 end Unknown_Normalized_First_Bit;
5595 function Unknown_Normalized_Position (E : Entity_Id) return B is
5597 return Uint14 (E) = No_Uint;
5598 end Unknown_Normalized_Position;
5600 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5602 return Uint10 (E) = No_Uint;
5603 end Unknown_Normalized_Position_Max;
5605 function Unknown_RM_Size (E : Entity_Id) return B is
5607 return (Uint13 (E) = Uint_0
5608 and then not Is_Discrete_Type (E)
5609 and then not Is_Fixed_Point_Type (E))
5610 or else Uint13 (E) = No_Uint;
5611 end Unknown_RM_Size;
5613 --------------------
5614 -- Address_Clause --
5615 --------------------
5617 function Address_Clause (Id : E) return N is
5619 return Rep_Clause (Id, Name_Address);
5626 function Aft_Value (Id : E) return U is
5628 Delta_Val : Ureal := Delta_Value (Id);
5630 while Delta_Val < Ureal_Tenth loop
5631 Delta_Val := Delta_Val * Ureal_10;
5632 Result := Result + 1;
5635 return UI_From_Int (Result);
5638 ----------------------
5639 -- Alignment_Clause --
5640 ----------------------
5642 function Alignment_Clause (Id : E) return N is
5644 return Rep_Clause (Id, Name_Alignment);
5645 end Alignment_Clause;
5651 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5653 if Last_Entity (V) = Empty then
5654 Set_First_Entity (Id => V, V => Id);
5656 Set_Next_Entity (Last_Entity (V), Id);
5659 Set_Next_Entity (Id, Empty);
5661 Set_Last_Entity (Id => V, V => Id);
5668 function Base_Type (Id : E) return E is
5670 if Is_Base_Type (Id) then
5673 pragma Assert (Is_Type (Id));
5678 -------------------------
5679 -- Component_Alignment --
5680 -------------------------
5682 -- Component Alignment is encoded using two flags, Flag128/129 as
5683 -- follows. Note that both flags False = Align_Default, so that the
5684 -- default initialization of flags to False initializes component
5685 -- alignment to the default value as required.
5687 -- Flag128 Flag129 Value
5688 -- ------- ------- -----
5689 -- False False Calign_Default
5690 -- False True Calign_Component_Size
5691 -- True False Calign_Component_Size_4
5692 -- True True Calign_Storage_Unit
5694 function Component_Alignment (Id : E) return C is
5695 BT : constant Node_Id := Base_Type (Id);
5698 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5700 if Flag128 (BT) then
5701 if Flag129 (BT) then
5702 return Calign_Storage_Unit;
5704 return Calign_Component_Size_4;
5708 if Flag129 (BT) then
5709 return Calign_Component_Size;
5711 return Calign_Default;
5714 end Component_Alignment;
5716 ----------------------
5717 -- Declaration_Node --
5718 ----------------------
5720 function Declaration_Node (Id : E) return N is
5724 if Ekind (Id) = E_Incomplete_Type
5725 and then Present (Full_View (Id))
5727 P := Parent (Full_View (Id));
5733 if Nkind (P) /= N_Selected_Component
5734 and then Nkind (P) /= N_Expanded_Name
5736 not (Nkind (P) = N_Defining_Program_Unit_Name
5737 and then Is_Child_Unit (Id))
5744 end Declaration_Node;
5746 ---------------------
5747 -- Designated_Type --
5748 ---------------------
5750 function Designated_Type (Id : E) return E is
5754 Desig_Type := Directly_Designated_Type (Id);
5756 if Ekind (Desig_Type) = E_Incomplete_Type
5757 and then Present (Full_View (Desig_Type))
5759 return Full_View (Desig_Type);
5761 elsif Is_Class_Wide_Type (Desig_Type)
5762 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5763 and then Present (Full_View (Etype (Desig_Type)))
5764 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5766 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5771 end Designated_Type;
5773 ----------------------
5774 -- Entry_Index_Type --
5775 ----------------------
5777 function Entry_Index_Type (Id : E) return N is
5779 pragma Assert (Ekind (Id) = E_Entry_Family);
5780 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5781 end Entry_Index_Type;
5783 ---------------------
5784 -- First_Component --
5785 ---------------------
5787 function First_Component (Id : E) return E is
5792 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5794 Comp_Id := First_Entity (Id);
5795 while Present (Comp_Id) loop
5796 exit when Ekind (Comp_Id) = E_Component;
5797 Comp_Id := Next_Entity (Comp_Id);
5801 end First_Component;
5803 -------------------------------------
5804 -- First_Component_Or_Discriminant --
5805 -------------------------------------
5807 function First_Component_Or_Discriminant (Id : E) return E is
5812 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5814 Comp_Id := First_Entity (Id);
5815 while Present (Comp_Id) loop
5816 exit when Ekind (Comp_Id) = E_Component
5818 Ekind (Comp_Id) = E_Discriminant;
5819 Comp_Id := Next_Entity (Comp_Id);
5823 end First_Component_Or_Discriminant;
5829 function First_Formal (Id : E) return E is
5834 (Is_Overloadable (Id)
5835 or else Ekind_In (Id, E_Entry_Family,
5837 E_Subprogram_Type));
5839 if Ekind (Id) = E_Enumeration_Literal then
5843 Formal := First_Entity (Id);
5845 if Present (Formal) and then Is_Formal (Formal) then
5853 ------------------------------
5854 -- First_Formal_With_Extras --
5855 ------------------------------
5857 function First_Formal_With_Extras (Id : E) return E is
5862 (Is_Overloadable (Id)
5863 or else Ekind_In (Id, E_Entry_Family,
5865 E_Subprogram_Type));
5867 if Ekind (Id) = E_Enumeration_Literal then
5871 Formal := First_Entity (Id);
5873 if Present (Formal) and then Is_Formal (Formal) then
5876 return Extra_Formals (Id); -- Empty if no extra formals
5879 end First_Formal_With_Extras;
5881 -------------------------------------
5882 -- Get_Attribute_Definition_Clause --
5883 -------------------------------------
5885 function Get_Attribute_Definition_Clause
5887 Id : Attribute_Id) return Node_Id
5892 N := First_Rep_Item (E);
5893 while Present (N) loop
5894 if Nkind (N) = N_Attribute_Definition_Clause
5895 and then Get_Attribute_Id (Chars (N)) = Id
5904 end Get_Attribute_Definition_Clause;
5910 function Get_Full_View (T : Entity_Id) return Entity_Id is
5912 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5913 return Full_View (T);
5915 elsif Is_Class_Wide_Type (T)
5916 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5917 and then Present (Full_View (Root_Type (T)))
5919 return Class_Wide_Type (Full_View (Root_Type (T)));
5926 --------------------------------------
5927 -- Get_Record_Representation_Clause --
5928 --------------------------------------
5930 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5934 N := First_Rep_Item (E);
5935 while Present (N) loop
5936 if Nkind (N) = N_Record_Representation_Clause then
5944 end Get_Record_Representation_Clause;
5946 -----------------------------
5947 -- Get_Rep_Item_For_Entity --
5948 -----------------------------
5950 function Get_Rep_Item_For_Entity
5952 Nam : Name_Id) return Node_Id
5958 N := First_Rep_Item (E);
5959 while Present (N) loop
5960 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5961 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5963 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5967 elsif Nkind (N) = N_Attribute_Definition_Clause
5968 and then Chars (N) = Nam
5969 and then Entity (N) = E
5973 elsif Nkind (N) = N_Aspect_Specification
5974 and then Chars (Identifier (N)) = Nam
5975 and then Entity (N) = E
5984 end Get_Rep_Item_For_Entity;
5986 --------------------
5987 -- Get_Rep_Pragma --
5988 --------------------
5990 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5994 N := First_Rep_Item (E);
5995 while Present (N) loop
5996 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6006 ------------------------
6007 -- Has_Attach_Handler --
6008 ------------------------
6010 function Has_Attach_Handler (Id : E) return B is
6014 pragma Assert (Is_Protected_Type (Id));
6016 Ritem := First_Rep_Item (Id);
6017 while Present (Ritem) loop
6018 if Nkind (Ritem) = N_Pragma
6019 and then Pragma_Name (Ritem) = Name_Attach_Handler
6023 Next_Rep_Item (Ritem);
6028 end Has_Attach_Handler;
6030 -------------------------------------
6031 -- Has_Attribute_Definition_Clause --
6032 -------------------------------------
6034 function Has_Attribute_Definition_Clause
6036 Id : Attribute_Id) return Boolean
6039 return Present (Get_Attribute_Definition_Clause (E, Id));
6040 end Has_Attribute_Definition_Clause;
6046 function Has_Entries (Id : E) return B is
6050 pragma Assert (Is_Concurrent_Type (Id));
6052 Ent := First_Entity (Id);
6053 while Present (Ent) loop
6054 if Is_Entry (Ent) then
6058 Ent := Next_Entity (Ent);
6064 ----------------------------
6065 -- Has_Foreign_Convention --
6066 ----------------------------
6068 function Has_Foreign_Convention (Id : E) return B is
6070 -- While regular Intrinsics such as the Standard operators fit in the
6071 -- "Ada" convention, those with an Interface_Name materialize GCC
6072 -- builtin imports for which Ada special treatments shouldn't apply.
6074 return Convention (Id) in Foreign_Convention
6075 or else (Convention (Id) = Convention_Intrinsic
6076 and then Present (Interface_Name (Id)));
6077 end Has_Foreign_Convention;
6079 ---------------------------
6080 -- Has_Interrupt_Handler --
6081 ---------------------------
6083 function Has_Interrupt_Handler (Id : E) return B is
6087 pragma Assert (Is_Protected_Type (Id));
6089 Ritem := First_Rep_Item (Id);
6090 while Present (Ritem) loop
6091 if Nkind (Ritem) = N_Pragma
6092 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6096 Next_Rep_Item (Ritem);
6101 end Has_Interrupt_Handler;
6103 --------------------------
6104 -- Has_Private_Ancestor --
6105 --------------------------
6107 function Has_Private_Ancestor (Id : E) return B is
6108 R : constant Entity_Id := Root_Type (Id);
6109 T1 : Entity_Id := Id;
6112 if Is_Private_Type (T1) then
6120 end Has_Private_Ancestor;
6122 --------------------
6123 -- Has_Rep_Pragma --
6124 --------------------
6126 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6128 return Present (Get_Rep_Pragma (E, Nam));
6131 --------------------
6132 -- Has_Unmodified --
6133 --------------------
6135 function Has_Unmodified (E : Entity_Id) return Boolean is
6137 if Has_Pragma_Unmodified (E) then
6139 elsif Warnings_Off (E) then
6140 Set_Warnings_Off_Used_Unmodified (E);
6147 ---------------------
6148 -- Has_Unreferenced --
6149 ---------------------
6151 function Has_Unreferenced (E : Entity_Id) return Boolean is
6153 if Has_Pragma_Unreferenced (E) then
6155 elsif Warnings_Off (E) then
6156 Set_Warnings_Off_Used_Unreferenced (E);
6161 end Has_Unreferenced;
6163 ----------------------
6164 -- Has_Warnings_Off --
6165 ----------------------
6167 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6169 if Warnings_Off (E) then
6170 Set_Warnings_Off_Used (E);
6175 end Has_Warnings_Off;
6177 ------------------------------
6178 -- Implementation_Base_Type --
6179 ------------------------------
6181 function Implementation_Base_Type (Id : E) return E is
6186 Bastyp := Base_Type (Id);
6188 if Is_Incomplete_Or_Private_Type (Bastyp) then
6189 Imptyp := Underlying_Type (Bastyp);
6191 -- If we have an implementation type, then just return it,
6192 -- otherwise we return the Base_Type anyway. This can only
6193 -- happen in error situations and should avoid some error bombs.
6195 if Present (Imptyp) then
6196 return Base_Type (Imptyp);
6204 end Implementation_Base_Type;
6206 -------------------------
6207 -- Invariant_Procedure --
6208 -------------------------
6210 function Invariant_Procedure (Id : E) return E is
6214 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6216 if No (Subprograms_For_Type (Id)) then
6220 S := Subprograms_For_Type (Id);
6221 while Present (S) loop
6222 if Has_Invariants (S) then
6225 S := Subprograms_For_Type (S);
6231 end Invariant_Procedure;
6237 -- Global flag table allowing rapid computation of this function
6239 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6240 (E_Enumeration_Subtype |
6242 E_Signed_Integer_Subtype |
6243 E_Modular_Integer_Subtype |
6244 E_Floating_Point_Subtype |
6245 E_Ordinary_Fixed_Point_Subtype |
6246 E_Decimal_Fixed_Point_Subtype |
6251 E_Record_Subtype_With_Private |
6252 E_Limited_Private_Subtype |
6254 E_Protected_Subtype |
6256 E_String_Literal_Subtype |
6257 E_Class_Wide_Subtype => False,
6260 function Is_Base_Type (Id : E) return Boolean is
6262 return Entity_Is_Base_Type (Ekind (Id));
6265 ---------------------
6266 -- Is_Boolean_Type --
6267 ---------------------
6269 function Is_Boolean_Type (Id : E) return B is
6271 return Root_Type (Id) = Standard_Boolean;
6272 end Is_Boolean_Type;
6274 ------------------------
6275 -- Is_Constant_Object --
6276 ------------------------
6278 function Is_Constant_Object (Id : E) return B is
6279 K : constant Entity_Kind := Ekind (Id);
6282 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6283 end Is_Constant_Object;
6285 --------------------
6286 -- Is_Discriminal --
6287 --------------------
6289 function Is_Discriminal (Id : E) return B is
6291 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6292 and then Present (Discriminal_Link (Id)));
6295 ----------------------
6296 -- Is_Dynamic_Scope --
6297 ----------------------
6299 function Is_Dynamic_Scope (Id : E) return B is
6302 Ekind (Id) = E_Block
6304 Ekind (Id) = E_Function
6306 Ekind (Id) = E_Procedure
6308 Ekind (Id) = E_Subprogram_Body
6310 Ekind (Id) = E_Task_Type
6312 (Ekind (Id) = E_Limited_Private_Type
6313 and then Present (Full_View (Id))
6314 and then Ekind (Full_View (Id)) = E_Task_Type)
6316 Ekind (Id) = E_Entry
6318 Ekind (Id) = E_Entry_Family
6320 Ekind (Id) = E_Return_Statement;
6321 end Is_Dynamic_Scope;
6323 --------------------
6324 -- Is_Entity_Name --
6325 --------------------
6327 function Is_Entity_Name (N : Node_Id) return Boolean is
6328 Kind : constant Node_Kind := Nkind (N);
6331 -- Identifiers, operator symbols, expanded names are entity names
6333 return Kind = N_Identifier
6334 or else Kind = N_Operator_Symbol
6335 or else Kind = N_Expanded_Name
6337 -- Attribute references are entity names if they refer to an entity.
6338 -- Note that we don't do this by testing for the presence of the
6339 -- Entity field in the N_Attribute_Reference node, since it may not
6340 -- have been set yet.
6342 or else (Kind = N_Attribute_Reference
6343 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6350 function Is_Finalizer (Id : E) return B is
6352 return Ekind (Id) = E_Procedure
6353 and then Chars (Id) = Name_uFinalizer;
6356 -----------------------------------
6357 -- Is_Package_Or_Generic_Package --
6358 -----------------------------------
6360 function Is_Package_Or_Generic_Package (Id : E) return B is
6363 Ekind (Id) = E_Package
6365 Ekind (Id) = E_Generic_Package;
6366 end Is_Package_Or_Generic_Package;
6368 ------------------------
6369 -- Predicate_Function --
6370 ------------------------
6372 function Predicate_Function (Id : E) return E is
6376 pragma Assert (Is_Type (Id));
6378 if No (Subprograms_For_Type (Id)) then
6382 S := Subprograms_For_Type (Id);
6383 while Present (S) loop
6384 if Has_Predicates (S) then
6387 S := Subprograms_For_Type (S);
6393 end Predicate_Function;
6399 function Is_Prival (Id : E) return B is
6401 return (Ekind_In (Id, E_Constant, E_Variable)
6402 and then Present (Prival_Link (Id)));
6405 ----------------------------
6406 -- Is_Protected_Component --
6407 ----------------------------
6409 function Is_Protected_Component (Id : E) return B is
6411 return Ekind (Id) = E_Component
6412 and then Is_Protected_Type (Scope (Id));
6413 end Is_Protected_Component;
6415 ----------------------------
6416 -- Is_Protected_Interface --
6417 ----------------------------
6419 function Is_Protected_Interface (Id : E) return B is
6420 Typ : constant Entity_Id := Base_Type (Id);
6422 if not Is_Interface (Typ) then
6424 elsif Is_Class_Wide_Type (Typ) then
6425 return Is_Protected_Interface (Etype (Typ));
6427 return Protected_Present (Type_Definition (Parent (Typ)));
6429 end Is_Protected_Interface;
6431 ------------------------------
6432 -- Is_Protected_Record_Type --
6433 ------------------------------
6435 function Is_Protected_Record_Type (Id : E) return B is
6438 Is_Concurrent_Record_Type (Id)
6439 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6440 end Is_Protected_Record_Type;
6442 --------------------------------
6443 -- Is_Standard_Character_Type --
6444 --------------------------------
6446 function Is_Standard_Character_Type (Id : E) return B is
6448 if Is_Type (Id) then
6450 R : constant Entity_Id := Root_Type (Id);
6453 R = Standard_Character
6455 R = Standard_Wide_Character
6457 R = Standard_Wide_Wide_Character;
6463 end Is_Standard_Character_Type;
6465 --------------------
6466 -- Is_String_Type --
6467 --------------------
6469 function Is_String_Type (Id : E) return B is
6471 return Ekind (Id) in String_Kind
6472 or else (Is_Array_Type (Id)
6473 and then Id /= Any_Composite
6474 and then Number_Dimensions (Id) = 1
6475 and then Is_Character_Type (Component_Type (Id)));
6478 -------------------------------
6479 -- Is_Synchronized_Interface --
6480 -------------------------------
6482 function Is_Synchronized_Interface (Id : E) return B is
6483 Typ : constant Entity_Id := Base_Type (Id);
6486 if not Is_Interface (Typ) then
6489 elsif Is_Class_Wide_Type (Typ) then
6490 return Is_Synchronized_Interface (Etype (Typ));
6493 return Protected_Present (Type_Definition (Parent (Typ)))
6494 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6495 or else Task_Present (Type_Definition (Parent (Typ)));
6497 end Is_Synchronized_Interface;
6499 -----------------------
6500 -- Is_Task_Interface --
6501 -----------------------
6503 function Is_Task_Interface (Id : E) return B is
6504 Typ : constant Entity_Id := Base_Type (Id);
6506 if not Is_Interface (Typ) then
6508 elsif Is_Class_Wide_Type (Typ) then
6509 return Is_Task_Interface (Etype (Typ));
6511 return Task_Present (Type_Definition (Parent (Typ)));
6513 end Is_Task_Interface;
6515 -------------------------
6516 -- Is_Task_Record_Type --
6517 -------------------------
6519 function Is_Task_Record_Type (Id : E) return B is
6522 Is_Concurrent_Record_Type (Id)
6523 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6524 end Is_Task_Record_Type;
6526 ------------------------
6527 -- Is_Wrapper_Package --
6528 ------------------------
6530 function Is_Wrapper_Package (Id : E) return B is
6532 return (Ekind (Id) = E_Package
6533 and then Present (Related_Instance (Id)));
6534 end Is_Wrapper_Package;
6540 function Last_Formal (Id : E) return E is
6545 (Is_Overloadable (Id)
6546 or else Ekind_In (Id, E_Entry_Family,
6548 E_Subprogram_Type));
6550 if Ekind (Id) = E_Enumeration_Literal then
6554 Formal := First_Formal (Id);
6556 if Present (Formal) then
6557 while Present (Next_Formal (Formal)) loop
6558 Formal := Next_Formal (Formal);
6566 function Model_Emin_Value (Id : E) return Uint is
6568 return Machine_Emin_Value (Id);
6569 end Model_Emin_Value;
6571 -------------------------
6572 -- Model_Epsilon_Value --
6573 -------------------------
6575 function Model_Epsilon_Value (Id : E) return Ureal is
6576 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6578 return Radix ** (1 - Model_Mantissa_Value (Id));
6579 end Model_Epsilon_Value;
6581 --------------------------
6582 -- Model_Mantissa_Value --
6583 --------------------------
6585 function Model_Mantissa_Value (Id : E) return Uint is
6587 return Machine_Mantissa_Value (Id);
6588 end Model_Mantissa_Value;
6590 -----------------------
6591 -- Model_Small_Value --
6592 -----------------------
6594 function Model_Small_Value (Id : E) return Ureal is
6595 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6597 return Radix ** (Model_Emin_Value (Id) - 1);
6598 end Model_Small_Value;
6600 ------------------------
6601 -- Machine_Emax_Value --
6602 ------------------------
6604 function Machine_Emax_Value (Id : E) return Uint is
6605 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6608 case Float_Rep (Id) is
6611 when 1 .. 6 => return Uint_128;
6612 when 7 .. 15 => return 2**10;
6613 when 16 .. 33 => return 2**14;
6614 when others => return No_Uint;
6619 when 1 .. 9 => return 2**7 - 1;
6620 when 10 .. 15 => return 2**10 - 1;
6621 when others => return No_Uint;
6625 return Uint_2 ** Uint_7 - Uint_1;
6627 end Machine_Emax_Value;
6629 ------------------------
6630 -- Machine_Emin_Value --
6631 ------------------------
6633 function Machine_Emin_Value (Id : E) return Uint is
6635 case Float_Rep (Id) is
6636 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6637 when VAX_Native => return -Machine_Emax_Value (Id);
6638 when AAMP => return -Machine_Emax_Value (Id);
6640 end Machine_Emin_Value;
6642 ----------------------------
6643 -- Machine_Mantissa_Value --
6644 ----------------------------
6646 function Machine_Mantissa_Value (Id : E) return Uint is
6647 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6650 case Float_Rep (Id) is
6653 when 1 .. 6 => return Uint_24;
6654 when 7 .. 15 => return UI_From_Int (53);
6655 when 16 .. 18 => return Uint_64;
6656 when 19 .. 33 => return UI_From_Int (113);
6657 when others => return No_Uint;
6662 when 1 .. 6 => return Uint_24;
6663 when 7 .. 9 => return UI_From_Int (56);
6664 when 10 .. 15 => return UI_From_Int (53);
6665 when others => return No_Uint;
6670 when 1 .. 6 => return Uint_24;
6671 when 7 .. 9 => return UI_From_Int (40);
6672 when others => return No_Uint;
6675 end Machine_Mantissa_Value;
6677 -------------------------
6678 -- Machine_Radix_Value --
6679 -------------------------
6681 function Machine_Radix_Value (Id : E) return U is
6683 case Float_Rep (Id) is
6684 when IEEE_Binary | VAX_Native | AAMP =>
6687 end Machine_Radix_Value;
6689 --------------------
6690 -- Next_Component --
6691 --------------------
6693 function Next_Component (Id : E) return E is
6697 Comp_Id := Next_Entity (Id);
6698 while Present (Comp_Id) loop
6699 exit when Ekind (Comp_Id) = E_Component;
6700 Comp_Id := Next_Entity (Comp_Id);
6706 ------------------------------------
6707 -- Next_Component_Or_Discriminant --
6708 ------------------------------------
6710 function Next_Component_Or_Discriminant (Id : E) return E is
6714 Comp_Id := Next_Entity (Id);
6715 while Present (Comp_Id) loop
6716 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6717 Comp_Id := Next_Entity (Comp_Id);
6721 end Next_Component_Or_Discriminant;
6723 -----------------------
6724 -- Next_Discriminant --
6725 -----------------------
6727 -- This function actually implements both Next_Discriminant and
6728 -- Next_Stored_Discriminant by making sure that the Discriminant
6729 -- returned is of the same variety as Id.
6731 function Next_Discriminant (Id : E) return E is
6733 -- Derived Tagged types with private extensions look like this...
6735 -- E_Discriminant d1
6736 -- E_Discriminant d2
6738 -- E_Discriminant d1
6739 -- E_Discriminant d2
6742 -- so it is critical not to go past the leading discriminants
6747 pragma Assert (Ekind (Id) = E_Discriminant);
6750 D := Next_Entity (D);
6752 or else (Ekind (D) /= E_Discriminant
6753 and then not Is_Itype (D))
6758 exit when Ekind (D) = E_Discriminant
6759 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6763 end Next_Discriminant;
6769 function Next_Formal (Id : E) return E is
6773 -- Follow the chain of declared entities as long as the kind of the
6774 -- entity corresponds to a formal parameter. Skip internal entities
6775 -- that may have been created for implicit subtypes, in the process
6776 -- of analyzing default expressions.
6780 P := Next_Entity (P);
6782 if No (P) or else Is_Formal (P) then
6784 elsif not Is_Internal (P) then
6790 -----------------------------
6791 -- Next_Formal_With_Extras --
6792 -----------------------------
6794 function Next_Formal_With_Extras (Id : E) return E is
6796 if Present (Extra_Formal (Id)) then
6797 return Extra_Formal (Id);
6799 return Next_Formal (Id);
6801 end Next_Formal_With_Extras;
6807 function Next_Index (Id : Node_Id) return Node_Id is
6816 function Next_Literal (Id : E) return E is
6818 pragma Assert (Nkind (Id) in N_Entity);
6822 ------------------------------
6823 -- Next_Stored_Discriminant --
6824 ------------------------------
6826 function Next_Stored_Discriminant (Id : E) return E is
6828 -- See comment in Next_Discriminant
6830 return Next_Discriminant (Id);
6831 end Next_Stored_Discriminant;
6833 -----------------------
6834 -- Number_Dimensions --
6835 -----------------------
6837 function Number_Dimensions (Id : E) return Pos is
6842 if Ekind (Id) in String_Kind then
6847 T := First_Index (Id);
6848 while Present (T) loop
6855 end Number_Dimensions;
6857 --------------------
6858 -- Number_Entries --
6859 --------------------
6861 function Number_Entries (Id : E) return Nat is
6866 pragma Assert (Is_Concurrent_Type (Id));
6869 Ent := First_Entity (Id);
6870 while Present (Ent) loop
6871 if Is_Entry (Ent) then
6875 Ent := Next_Entity (Ent);
6881 --------------------
6882 -- Number_Formals --
6883 --------------------
6885 function Number_Formals (Id : E) return Pos is
6891 Formal := First_Formal (Id);
6892 while Present (Formal) loop
6894 Formal := Next_Formal (Formal);
6900 --------------------
6901 -- Parameter_Mode --
6902 --------------------
6904 function Parameter_Mode (Id : E) return Formal_Kind is
6909 --------------------------
6910 -- Primitive_Operations --
6911 --------------------------
6913 function Primitive_Operations (Id : E) return L is
6915 if Is_Concurrent_Type (Id) then
6916 if Present (Corresponding_Record_Type (Id)) then
6917 return Direct_Primitive_Operations
6918 (Corresponding_Record_Type (Id));
6923 return Direct_Primitive_Operations (Id);
6925 end Primitive_Operations;
6927 ---------------------
6928 -- Record_Rep_Item --
6929 ---------------------
6931 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6933 Set_Next_Rep_Item (N, First_Rep_Item (E));
6934 Set_First_Rep_Item (E, N);
6935 end Record_Rep_Item;
6941 function Root_Type (Id : E) return E is
6945 pragma Assert (Nkind (Id) in N_Entity);
6947 T := Base_Type (Id);
6949 if Ekind (T) = E_Class_Wide_Type then
6952 elsif Ekind (T) = E_Class_Wide_Subtype then
6953 return Etype (Base_Type (T));
6955 -- ??? T comes from Base_Type, how can it be a subtype?
6956 -- Also Base_Type is supposed to be idempotent, so either way
6957 -- this is equivalent to "return Etype (T)" and should be merged
6958 -- with the E_Class_Wide_Type case.
6969 -- Following test catches some error cases resulting from
6972 elsif No (Etyp) then
6975 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6978 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6984 -- Return if there is a circularity in the inheritance chain. This
6985 -- happens in some error situations and we do not want to get
6986 -- stuck in this loop.
6988 if T = Base_Type (Id) then
6995 ---------------------
6996 -- Safe_Emax_Value --
6997 ---------------------
6999 function Safe_Emax_Value (Id : E) return Uint is
7001 return Machine_Emax_Value (Id);
7002 end Safe_Emax_Value;
7004 ----------------------
7005 -- Safe_First_Value --
7006 ----------------------
7008 function Safe_First_Value (Id : E) return Ureal is
7010 return -Safe_Last_Value (Id);
7011 end Safe_First_Value;
7013 ---------------------
7014 -- Safe_Last_Value --
7015 ---------------------
7017 function Safe_Last_Value (Id : E) return Ureal is
7018 Radix : constant Uint := Machine_Radix_Value (Id);
7019 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7020 Emax : constant Uint := Safe_Emax_Value (Id);
7021 Significand : constant Uint := Radix ** Mantissa - 1;
7022 Exponent : constant Uint := Emax - Mantissa;
7028 (Num => Significand * 2 ** (Exponent mod 4),
7029 Den => -Exponent / 4,
7035 (Num => Significand,
7039 end Safe_Last_Value;
7045 function Scope_Depth (Id : E) return Uint is
7050 while Is_Record_Type (Scop) loop
7051 Scop := Scope (Scop);
7054 return Scope_Depth_Value (Scop);
7057 ---------------------
7058 -- Scope_Depth_Set --
7059 ---------------------
7061 function Scope_Depth_Set (Id : E) return B is
7063 return not Is_Record_Type (Id)
7064 and then Field22 (Id) /= Union_Id (Empty);
7065 end Scope_Depth_Set;
7067 -----------------------------
7068 -- Set_Component_Alignment --
7069 -----------------------------
7071 -- Component Alignment is encoded using two flags, Flag128/129 as
7072 -- follows. Note that both flags False = Align_Default, so that the
7073 -- default initialization of flags to False initializes component
7074 -- alignment to the default value as required.
7076 -- Flag128 Flag129 Value
7077 -- ------- ------- -----
7078 -- False False Calign_Default
7079 -- False True Calign_Component_Size
7080 -- True False Calign_Component_Size_4
7081 -- True True Calign_Storage_Unit
7083 procedure Set_Component_Alignment (Id : E; V : C) is
7085 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7086 and then Is_Base_Type (Id));
7089 when Calign_Default =>
7090 Set_Flag128 (Id, False);
7091 Set_Flag129 (Id, False);
7093 when Calign_Component_Size =>
7094 Set_Flag128 (Id, False);
7095 Set_Flag129 (Id, True);
7097 when Calign_Component_Size_4 =>
7098 Set_Flag128 (Id, True);
7099 Set_Flag129 (Id, False);
7101 when Calign_Storage_Unit =>
7102 Set_Flag128 (Id, True);
7103 Set_Flag129 (Id, True);
7105 end Set_Component_Alignment;
7107 -----------------------------
7108 -- Set_Invariant_Procedure --
7109 -----------------------------
7111 procedure Set_Invariant_Procedure (Id : E; V : E) is
7115 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7117 S := Subprograms_For_Type (Id);
7118 Set_Subprograms_For_Type (Id, V);
7120 while Present (S) loop
7121 if Has_Invariants (S) then
7122 raise Program_Error;
7124 S := Subprograms_For_Type (S);
7128 Set_Subprograms_For_Type (Id, V);
7129 end Set_Invariant_Procedure;
7131 ----------------------------
7132 -- Set_Predicate_Function --
7133 ----------------------------
7135 procedure Set_Predicate_Function (Id : E; V : E) is
7139 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7141 S := Subprograms_For_Type (Id);
7142 Set_Subprograms_For_Type (Id, V);
7144 while Present (S) loop
7145 if Has_Predicates (S) then
7146 raise Program_Error;
7148 S := Subprograms_For_Type (S);
7152 Set_Subprograms_For_Type (Id, V);
7153 end Set_Predicate_Function;
7159 function Size_Clause (Id : E) return N is
7161 return Rep_Clause (Id, Name_Size);
7164 ------------------------
7165 -- Stream_Size_Clause --
7166 ------------------------
7168 function Stream_Size_Clause (Id : E) return N is
7170 return Rep_Clause (Id, Name_Stream_Size);
7171 end Stream_Size_Clause;
7177 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7183 Kind := E_Access_Subtype;
7187 Kind := E_Array_Subtype;
7189 when E_Class_Wide_Type |
7190 E_Class_Wide_Subtype =>
7191 Kind := E_Class_Wide_Subtype;
7193 when E_Decimal_Fixed_Point_Type |
7194 E_Decimal_Fixed_Point_Subtype =>
7195 Kind := E_Decimal_Fixed_Point_Subtype;
7197 when E_Ordinary_Fixed_Point_Type |
7198 E_Ordinary_Fixed_Point_Subtype =>
7199 Kind := E_Ordinary_Fixed_Point_Subtype;
7201 when E_Private_Type |
7202 E_Private_Subtype =>
7203 Kind := E_Private_Subtype;
7205 when E_Limited_Private_Type |
7206 E_Limited_Private_Subtype =>
7207 Kind := E_Limited_Private_Subtype;
7209 when E_Record_Type_With_Private |
7210 E_Record_Subtype_With_Private =>
7211 Kind := E_Record_Subtype_With_Private;
7213 when E_Record_Type |
7215 Kind := E_Record_Subtype;
7217 when E_String_Type |
7219 Kind := E_String_Subtype;
7221 when Enumeration_Kind =>
7222 Kind := E_Enumeration_Subtype;
7225 Kind := E_Floating_Point_Subtype;
7227 when Signed_Integer_Kind =>
7228 Kind := E_Signed_Integer_Subtype;
7230 when Modular_Integer_Kind =>
7231 Kind := E_Modular_Integer_Subtype;
7233 when Protected_Kind =>
7234 Kind := E_Protected_Subtype;
7237 Kind := E_Task_Subtype;
7241 raise Program_Error;
7247 ---------------------
7248 -- Type_High_Bound --
7249 ---------------------
7251 function Type_High_Bound (Id : E) return Node_Id is
7252 Rng : constant Node_Id := Scalar_Range (Id);
7254 if Nkind (Rng) = N_Subtype_Indication then
7255 return High_Bound (Range_Expression (Constraint (Rng)));
7257 return High_Bound (Rng);
7259 end Type_High_Bound;
7261 --------------------
7262 -- Type_Low_Bound --
7263 --------------------
7265 function Type_Low_Bound (Id : E) return Node_Id is
7266 Rng : constant Node_Id := Scalar_Range (Id);
7268 if Nkind (Rng) = N_Subtype_Indication then
7269 return Low_Bound (Range_Expression (Constraint (Rng)));
7271 return Low_Bound (Rng);
7275 ---------------------
7276 -- Underlying_Type --
7277 ---------------------
7279 function Underlying_Type (Id : E) return E is
7281 -- For record_with_private the underlying type is always the direct
7282 -- full view. Never try to take the full view of the parent it
7283 -- doesn't make sense.
7285 if Ekind (Id) = E_Record_Type_With_Private then
7286 return Full_View (Id);
7288 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7290 -- If we have an incomplete or private type with a full view,
7291 -- then we return the Underlying_Type of this full view
7293 if Present (Full_View (Id)) then
7294 if Id = Full_View (Id) then
7296 -- Previous error in declaration
7301 return Underlying_Type (Full_View (Id));
7304 -- If we have an incomplete entity that comes from the limited
7305 -- view then we return the Underlying_Type of its non-limited
7308 elsif From_With_Type (Id)
7309 and then Present (Non_Limited_View (Id))
7311 return Underlying_Type (Non_Limited_View (Id));
7313 -- Otherwise check for the case where we have a derived type or
7314 -- subtype, and if so get the Underlying_Type of the parent type.
7316 elsif Etype (Id) /= Id then
7317 return Underlying_Type (Etype (Id));
7319 -- Otherwise we have an incomplete or private type that has
7320 -- no full view, which means that we have not encountered the
7321 -- completion, so return Empty to indicate the underlying type
7322 -- is not yet known.
7328 -- For non-incomplete, non-private types, return the type itself
7329 -- Also for entities that are not types at all return the entity
7335 end Underlying_Type;
7341 function Vax_Float (Id : E) return B is
7343 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7346 ------------------------
7347 -- Write_Entity_Flags --
7348 ------------------------
7350 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7352 procedure W (Flag_Name : String; Flag : Boolean);
7353 -- Write out given flag if it is set
7359 procedure W (Flag_Name : String; Flag : Boolean) is
7363 Write_Str (Flag_Name);
7364 Write_Str (" = True");
7369 -- Start of processing for Write_Entity_Flags
7372 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7373 and then Is_Base_Type (Id)
7376 Write_Str ("Component_Alignment = ");
7378 case Component_Alignment (Id) is
7379 when Calign_Default =>
7380 Write_Str ("Calign_Default");
7382 when Calign_Component_Size =>
7383 Write_Str ("Calign_Component_Size");
7385 when Calign_Component_Size_4 =>
7386 Write_Str ("Calign_Component_Size_4");
7388 when Calign_Storage_Unit =>
7389 Write_Str ("Calign_Storage_Unit");
7395 W ("Address_Taken", Flag104 (Id));
7396 W ("Body_Needed_For_SAL", Flag40 (Id));
7397 W ("C_Pass_By_Copy", Flag125 (Id));
7398 W ("Can_Never_Be_Null", Flag38 (Id));
7399 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7400 W ("Debug_Info_Off", Flag166 (Id));
7401 W ("Default_Expressions_Processed", Flag108 (Id));
7402 W ("Delay_Cleanups", Flag114 (Id));
7403 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7404 W ("Depends_On_Private", Flag14 (Id));
7405 W ("Discard_Names", Flag88 (Id));
7406 W ("Elaboration_Entity_Required", Flag174 (Id));
7407 W ("Elaborate_Body_Desirable", Flag210 (Id));
7408 W ("Entry_Accepted", Flag152 (Id));
7409 W ("Can_Use_Internal_Rep", Flag229 (Id));
7410 W ("Finalize_Storage_Only", Flag158 (Id));
7411 W ("From_With_Type", Flag159 (Id));
7412 W ("Has_Aliased_Components", Flag135 (Id));
7413 W ("Has_Alignment_Clause", Flag46 (Id));
7414 W ("Has_All_Calls_Remote", Flag79 (Id));
7415 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7416 W ("Has_Atomic_Components", Flag86 (Id));
7417 W ("Has_Biased_Representation", Flag139 (Id));
7418 W ("Has_Completion", Flag26 (Id));
7419 W ("Has_Completion_In_Body", Flag71 (Id));
7420 W ("Has_Complex_Representation", Flag140 (Id));
7421 W ("Has_Component_Size_Clause", Flag68 (Id));
7422 W ("Has_Contiguous_Rep", Flag181 (Id));
7423 W ("Has_Controlled_Component", Flag43 (Id));
7424 W ("Has_Controlling_Result", Flag98 (Id));
7425 W ("Has_Convention_Pragma", Flag119 (Id));
7426 W ("Has_Default_Aspect", Flag39 (Id));
7427 W ("Has_Delayed_Aspects", Flag200 (Id));
7428 W ("Has_Delayed_Freeze", Flag18 (Id));
7429 W ("Has_Discriminants", Flag5 (Id));
7430 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7431 W ("Has_Exit", Flag47 (Id));
7432 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7433 W ("Has_Forward_Instantiation", Flag175 (Id));
7434 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7435 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7436 W ("Has_Homonym", Flag56 (Id));
7437 W ("Has_Inheritable_Invariants", Flag248 (Id));
7438 W ("Has_Initial_Value", Flag219 (Id));
7439 W ("Has_Invariants", Flag232 (Id));
7440 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7441 W ("Has_Master_Entity", Flag21 (Id));
7442 W ("Has_Missing_Return", Flag142 (Id));
7443 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7444 W ("Has_Non_Standard_Rep", Flag75 (Id));
7445 W ("Has_Object_Size_Clause", Flag172 (Id));
7446 W ("Has_Per_Object_Constraint", Flag154 (Id));
7447 W ("Has_Persistent_BSS", Flag188 (Id));
7448 W ("Has_Postconditions", Flag240 (Id));
7449 W ("Has_Pragma_Controlled", Flag27 (Id));
7450 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7451 W ("Has_Pragma_Inline", Flag157 (Id));
7452 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7453 W ("Has_Pragma_Ordered", Flag198 (Id));
7454 W ("Has_Pragma_Pack", Flag121 (Id));
7455 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7456 W ("Has_Pragma_Pure", Flag203 (Id));
7457 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7458 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7459 W ("Has_Pragma_Unmodified", Flag233 (Id));
7460 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7461 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7462 W ("Has_Predicates", Flag250 (Id));
7463 W ("Has_Primitive_Operations", Flag120 (Id));
7464 W ("Has_Private_Declaration", Flag155 (Id));
7465 W ("Has_Qualified_Name", Flag161 (Id));
7466 W ("Has_RACW", Flag214 (Id));
7467 W ("Has_Record_Rep_Clause", Flag65 (Id));
7468 W ("Has_Recursive_Call", Flag143 (Id));
7469 W ("Has_Size_Clause", Flag29 (Id));
7470 W ("Has_Small_Clause", Flag67 (Id));
7471 W ("Has_Specified_Layout", Flag100 (Id));
7472 W ("Has_Specified_Stream_Input", Flag190 (Id));
7473 W ("Has_Specified_Stream_Output", Flag191 (Id));
7474 W ("Has_Specified_Stream_Read", Flag192 (Id));
7475 W ("Has_Specified_Stream_Write", Flag193 (Id));
7476 W ("Has_Static_Discriminants", Flag211 (Id));
7477 W ("Has_Storage_Size_Clause", Flag23 (Id));
7478 W ("Has_Stream_Size_Clause", Flag184 (Id));
7479 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7480 W ("Has_Task", Flag30 (Id));
7481 W ("Has_Thunks", Flag228 (Id));
7482 W ("Has_Unchecked_Union", Flag123 (Id));
7483 W ("Has_Unknown_Discriminants", Flag72 (Id));
7484 W ("Has_Up_Level_Access", Flag215 (Id));
7485 W ("Has_Volatile_Components", Flag87 (Id));
7486 W ("Has_Xref_Entry", Flag182 (Id));
7487 W ("In_Package_Body", Flag48 (Id));
7488 W ("In_Private_Part", Flag45 (Id));
7489 W ("In_Use", Flag8 (Id));
7490 W ("Is_AST_Entry", Flag132 (Id));
7491 W ("Is_Abstract_Subprogram", Flag19 (Id));
7492 W ("Is_Abstract_Type", Flag146 (Id));
7493 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7494 W ("Is_Access_Constant", Flag69 (Id));
7495 W ("Is_Ada_2005_Only", Flag185 (Id));
7496 W ("Is_Ada_2012_Only", Flag199 (Id));
7497 W ("Is_Aliased", Flag15 (Id));
7498 W ("Is_Asynchronous", Flag81 (Id));
7499 W ("Is_Atomic", Flag85 (Id));
7500 W ("Is_Bit_Packed_Array", Flag122 (Id));
7501 W ("Is_CPP_Class", Flag74 (Id));
7502 W ("Is_Called", Flag102 (Id));
7503 W ("Is_Character_Type", Flag63 (Id));
7504 W ("Is_Child_Unit", Flag73 (Id));
7505 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7506 W ("Is_Compilation_Unit", Flag149 (Id));
7507 W ("Is_Completely_Hidden", Flag103 (Id));
7508 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7509 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7510 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7511 W ("Is_Constrained", Flag12 (Id));
7512 W ("Is_Constructor", Flag76 (Id));
7513 W ("Is_Controlled", Flag42 (Id));
7514 W ("Is_Controlling_Formal", Flag97 (Id));
7515 W ("Is_Descendent_Of_Address", Flag223 (Id));
7516 W ("Is_Discrim_SO_Function", Flag176 (Id));
7517 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7518 W ("Is_Dispatching_Operation", Flag6 (Id));
7519 W ("Is_Eliminated", Flag124 (Id));
7520 W ("Is_Entry_Formal", Flag52 (Id));
7521 W ("Is_Exported", Flag99 (Id));
7522 W ("Is_First_Subtype", Flag70 (Id));
7523 W ("Is_For_Access_Subtype", Flag118 (Id));
7524 W ("Is_Formal_Subprogram", Flag111 (Id));
7525 W ("Is_Frozen", Flag4 (Id));
7526 W ("Is_Generic_Actual_Type", Flag94 (Id));
7527 W ("Is_Generic_Instance", Flag130 (Id));
7528 W ("Is_Generic_Type", Flag13 (Id));
7529 W ("Is_Hidden", Flag57 (Id));
7530 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7531 W ("Is_Immediately_Visible", Flag7 (Id));
7532 W ("Is_Imported", Flag24 (Id));
7533 W ("Is_Inlined", Flag11 (Id));
7534 W ("Is_Instantiated", Flag126 (Id));
7535 W ("Is_Interface", Flag186 (Id));
7536 W ("Is_Internal", Flag17 (Id));
7537 W ("Is_Interrupt_Handler", Flag89 (Id));
7538 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7539 W ("Is_Itype", Flag91 (Id));
7540 W ("Is_Known_Non_Null", Flag37 (Id));
7541 W ("Is_Known_Null", Flag204 (Id));
7542 W ("Is_Known_Valid", Flag170 (Id));
7543 W ("Is_Limited_Composite", Flag106 (Id));
7544 W ("Is_Limited_Interface", Flag197 (Id));
7545 W ("Is_Limited_Record", Flag25 (Id));
7546 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7547 W ("Is_Non_Static_Subtype", Flag109 (Id));
7548 W ("Is_Null_Init_Proc", Flag178 (Id));
7549 W ("Is_Obsolescent", Flag153 (Id));
7550 W ("Is_Only_Out_Parameter", Flag226 (Id));
7551 W ("Is_Optional_Parameter", Flag134 (Id));
7552 W ("Is_Package_Body_Entity", Flag160 (Id));
7553 W ("Is_Packed", Flag51 (Id));
7554 W ("Is_Packed_Array_Type", Flag138 (Id));
7555 W ("Is_Postcondition_Proc", Flag253 (Id));
7556 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7557 W ("Is_Preelaborated", Flag59 (Id));
7558 W ("Is_Primitive", Flag218 (Id));
7559 W ("Is_Primitive_Wrapper", Flag195 (Id));
7560 W ("Is_Private_Composite", Flag107 (Id));
7561 W ("Is_Private_Descendant", Flag53 (Id));
7562 W ("Is_Private_Primitive", Flag245 (Id));
7563 W ("Is_Processed_Transient", Flag252 (Id));
7564 W ("Is_Public", Flag10 (Id));
7565 W ("Is_Pure", Flag44 (Id));
7566 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7567 W ("Is_RACW_Stub_Type", Flag244 (Id));
7568 W ("Is_Raised", Flag224 (Id));
7569 W ("Is_Remote_Call_Interface", Flag62 (Id));
7570 W ("Is_Remote_Types", Flag61 (Id));
7571 W ("Is_Renaming_Of_Object", Flag112 (Id));
7572 W ("Is_Return_Object", Flag209 (Id));
7573 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7574 W ("Is_Shared_Passive", Flag60 (Id));
7575 W ("Is_Statically_Allocated", Flag28 (Id));
7576 W ("Is_Tag", Flag78 (Id));
7577 W ("Is_Tagged_Type", Flag55 (Id));
7578 W ("Is_Thunk", Flag225 (Id));
7579 W ("Is_Trivial_Subprogram", Flag235 (Id));
7580 W ("Is_True_Constant", Flag163 (Id));
7581 W ("Is_Unchecked_Union", Flag117 (Id));
7582 W ("Is_Underlying_Record_View", Flag246 (Id));
7583 W ("Is_Unsigned_Type", Flag144 (Id));
7584 W ("Is_VMS_Exception", Flag133 (Id));
7585 W ("Is_Valued_Procedure", Flag127 (Id));
7586 W ("Is_Visible_Child_Unit", Flag116 (Id));
7587 W ("Is_Visible_Formal", Flag206 (Id));
7588 W ("Is_Volatile", Flag16 (Id));
7589 W ("Itype_Printed", Flag202 (Id));
7590 W ("Kill_Elaboration_Checks", Flag32 (Id));
7591 W ("Kill_Range_Checks", Flag33 (Id));
7592 W ("Kill_Tag_Checks", Flag34 (Id));
7593 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7594 W ("Low_Bound_Tested", Flag205 (Id));
7595 W ("Machine_Radix_10", Flag84 (Id));
7596 W ("Materialize_Entity", Flag168 (Id));
7597 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7598 W ("Must_Have_Preelab_Init", Flag208 (Id));
7599 W ("Needs_Debug_Info", Flag147 (Id));
7600 W ("Needs_No_Actuals", Flag22 (Id));
7601 W ("Never_Set_In_Source", Flag115 (Id));
7602 W ("No_Pool_Assigned", Flag131 (Id));
7603 W ("No_Return", Flag113 (Id));
7604 W ("No_Strict_Aliasing", Flag136 (Id));
7605 W ("Non_Binary_Modulus", Flag58 (Id));
7606 W ("Nonzero_Is_True", Flag162 (Id));
7607 W ("OK_To_Rename", Flag247 (Id));
7608 W ("OK_To_Reorder_Components", Flag239 (Id));
7609 W ("Optimize_Alignment_Space", Flag241 (Id));
7610 W ("Optimize_Alignment_Time", Flag242 (Id));
7611 W ("Overlays_Constant", Flag243 (Id));
7612 W ("Reachable", Flag49 (Id));
7613 W ("Referenced", Flag156 (Id));
7614 W ("Referenced_As_LHS", Flag36 (Id));
7615 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7616 W ("Renamed_In_Spec", Flag231 (Id));
7617 W ("Requires_Overriding", Flag213 (Id));
7618 W ("Return_Present", Flag54 (Id));
7619 W ("Returns_By_Ref", Flag90 (Id));
7620 W ("Reverse_Bit_Order", Flag164 (Id));
7621 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7622 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7623 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7624 W ("Static_Elaboration_Desired", Flag77 (Id));
7625 W ("Strict_Alignment", Flag145 (Id));
7626 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7627 W ("Suppress_Initialization", Flag105 (Id));
7628 W ("Suppress_Style_Checks", Flag165 (Id));
7629 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7630 W ("Treat_As_Volatile", Flag41 (Id));
7631 W ("Universal_Aliasing", Flag216 (Id));
7632 W ("Used_As_Generic_Actual", Flag222 (Id));
7633 W ("Uses_Sec_Stack", Flag95 (Id));
7634 W ("Warnings_Off", Flag96 (Id));
7635 W ("Warnings_Off_Used", Flag236 (Id));
7636 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7637 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7638 W ("Was_Hidden", Flag196 (Id));
7639 end Write_Entity_Flags;
7641 -----------------------
7642 -- Write_Entity_Info --
7643 -----------------------
7645 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7647 procedure Write_Attribute (Which : String; Nam : E);
7648 -- Write attribute value with given string name
7650 procedure Write_Kind (Id : Entity_Id);
7651 -- Write Ekind field of entity
7653 ---------------------
7654 -- Write_Attribute --
7655 ---------------------
7657 procedure Write_Attribute (Which : String; Nam : E) is
7661 Write_Int (Int (Nam));
7663 Write_Name (Chars (Nam));
7665 end Write_Attribute;
7671 procedure Write_Kind (Id : Entity_Id) is
7672 K : constant String := Entity_Kind'Image (Ekind (Id));
7676 Write_Str (" Kind ");
7678 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7679 Write_Str ("TAGGED ");
7682 Write_Str (K (3 .. K'Length));
7685 if Is_Type (Id) and then Depends_On_Private (Id) then
7686 Write_Str ("Depends_On_Private ");
7690 -- Start of processing for Write_Entity_Info
7694 Write_Attribute ("Name ", Id);
7695 Write_Int (Int (Id));
7699 Write_Attribute (" Type ", Etype (Id));
7701 Write_Attribute (" Scope ", Scope (Id));
7706 when Discrete_Kind =>
7707 Write_Str ("Bounds: Id = ");
7709 if Present (Scalar_Range (Id)) then
7710 Write_Int (Int (Type_Low_Bound (Id)));
7711 Write_Str (" .. Id = ");
7712 Write_Int (Int (Type_High_Bound (Id)));
7714 Write_Str ("Empty");
7725 (" Component Type ", Component_Type (Id));
7728 Write_Str (" Indexes ");
7730 Index := First_Index (Id);
7731 while Present (Index) loop
7732 Write_Attribute (" ", Etype (Index));
7733 Index := Next_Index (Index);
7741 (" Directly Designated Type ",
7742 Directly_Designated_Type (Id));
7745 when Overloadable_Kind =>
7746 if Present (Homonym (Id)) then
7747 Write_Str (" Homonym ");
7748 Write_Name (Chars (Homonym (Id)));
7750 Write_Int (Int (Homonym (Id)));
7757 if Ekind (Scope (Id)) in Record_Kind then
7759 " Original_Record_Component ",
7760 Original_Record_Component (Id));
7761 Write_Int (Int (Original_Record_Component (Id)));
7765 when others => null;
7767 end Write_Entity_Info;
7769 -----------------------
7770 -- Write_Field6_Name --
7771 -----------------------
7773 procedure Write_Field6_Name (Id : Entity_Id) is
7774 pragma Warnings (Off, Id);
7776 Write_Str ("First_Rep_Item");
7777 end Write_Field6_Name;
7779 -----------------------
7780 -- Write_Field7_Name --
7781 -----------------------
7783 procedure Write_Field7_Name (Id : Entity_Id) is
7784 pragma Warnings (Off, Id);
7786 Write_Str ("Freeze_Node");
7787 end Write_Field7_Name;
7789 -----------------------
7790 -- Write_Field8_Name --
7791 -----------------------
7793 procedure Write_Field8_Name (Id : Entity_Id) is
7797 Write_Str ("Associated_Node_For_Itype");
7800 Write_Str ("Dependent_Instances");
7803 Write_Str ("First_Exit_Statement");
7806 Write_Str ("Hiding_Loop_Variable");
7810 E_Subprogram_Body =>
7811 Write_Str ("Mechanism");
7815 Write_Str ("Normalized_First_Bit");
7818 Write_Str ("Postcondition_Proc");
7820 when E_Return_Statement =>
7821 Write_Str ("Return_Applies_To");
7824 Write_Str ("Field8??");
7826 end Write_Field8_Name;
7828 -----------------------
7829 -- Write_Field9_Name --
7830 -----------------------
7832 procedure Write_Field9_Name (Id : Entity_Id) is
7836 Write_Str ("Class_Wide_Type");
7839 Write_Str ("Current_Value");
7842 E_Generic_Function |
7844 E_Generic_Procedure |
7847 Write_Str ("Renaming_Map");
7850 Write_Str ("Field9??");
7852 end Write_Field9_Name;
7854 ------------------------
7855 -- Write_Field10_Name --
7856 ------------------------
7858 procedure Write_Field10_Name (Id : Entity_Id) is
7861 when Class_Wide_Kind |
7867 Write_Str ("Direct_Primitive_Operations");
7870 Write_Str ("Float_Rep");
7872 when E_In_Parameter |
7874 Write_Str ("Discriminal_Link");
7880 Write_Str ("Handler_Records");
7884 Write_Str ("Normalized_Position_Max");
7887 Write_Str ("Field10??");
7889 end Write_Field10_Name;
7891 ------------------------
7892 -- Write_Field11_Name --
7893 ------------------------
7895 procedure Write_Field11_Name (Id : Entity_Id) is
7899 Write_Str ("Block_Node");
7903 Write_Str ("Component_Bit_Offset");
7906 Write_Str ("Entry_Component");
7908 when E_Enumeration_Literal =>
7909 Write_Str ("Enumeration_Pos");
7913 Write_Str ("Full_View");
7915 when E_Generic_Package =>
7916 Write_Str ("Generic_Homonym");
7922 Write_Str ("Protected_Body_Subprogram");
7925 Write_Str ("Field11??");
7927 end Write_Field11_Name;
7929 ------------------------
7930 -- Write_Field12_Name --
7931 ------------------------
7933 procedure Write_Field12_Name (Id : Entity_Id) is
7937 Write_Str ("Associated_Formal_Package");
7940 Write_Str ("Barrier_Function");
7942 when E_Enumeration_Literal =>
7943 Write_Str ("Enumeration_Rep");
7951 E_In_Out_Parameter |
7955 Write_Str ("Esize");
7959 Write_Str ("Next_Inlined_Subprogram");
7962 Write_Str ("Field12??");
7964 end Write_Field12_Name;
7966 ------------------------
7967 -- Write_Field13_Name --
7968 ------------------------
7970 procedure Write_Field13_Name (Id : Entity_Id) is
7975 Write_Str ("Component_Clause");
7978 if not Comes_From_Source (Id)
7980 Chars (Id) = Name_Op_Ne
7982 Write_Str ("Corresponding_Equality");
7984 elsif Comes_From_Source (Id) then
7985 Write_Str ("Elaboration_Entity");
7988 Write_Str ("Field13??");
7993 Generic_Unit_Kind =>
7994 Write_Str ("Elaboration_Entity");
7998 Write_Str ("Extra_Accessibility");
8001 Write_Str ("RM_Size");
8004 Write_Str ("Field13??");
8006 end Write_Field13_Name;
8008 -----------------------
8009 -- Write_Field14_Name --
8010 -----------------------
8012 procedure Write_Field14_Name (Id : Entity_Id) is
8021 Write_Str ("Alignment");
8025 Write_Str ("First_Optional_Parameter");
8029 Write_Str ("Normalized_Position");
8032 E_Generic_Package =>
8033 Write_Str ("Shadow_Entities");
8036 Write_Str ("Field14??");
8038 end Write_Field14_Name;
8040 ------------------------
8041 -- Write_Field15_Name --
8042 ------------------------
8044 procedure Write_Field15_Name (Id : Entity_Id) is
8047 when E_Discriminant =>
8048 Write_Str ("Discriminant_Number");
8051 Write_Str ("DT_Entry_Count");
8055 Write_Str ("DT_Position");
8057 when E_Protected_Type =>
8058 Write_Str ("Entry_Bodies_Array");
8061 Write_Str ("Entry_Parameters_Type");
8064 Write_Str ("Extra_Formal");
8066 when Enumeration_Kind =>
8067 Write_Str ("Lit_Indexes");
8071 Write_Str ("Related_Instance");
8075 Write_Str ("Return_Flag_Or_Transient_Decl");
8077 when Decimal_Fixed_Point_Kind =>
8078 Write_Str ("Scale_Value");
8082 Write_Str ("Storage_Size_Variable");
8084 when E_String_Literal_Subtype =>
8085 Write_Str ("String_Literal_Low_Bound");
8088 Write_Str ("Field15??");
8090 end Write_Field15_Name;
8092 ------------------------
8093 -- Write_Field16_Name --
8094 ------------------------
8096 procedure Write_Field16_Name (Id : Entity_Id) is
8099 when E_Record_Type |
8100 E_Record_Type_With_Private =>
8101 Write_Str ("Access_Disp_Table");
8103 when E_Record_Subtype |
8104 E_Class_Wide_Subtype =>
8105 Write_Str ("Cloned_Subtype");
8109 Write_Str ("DTC_Entity");
8112 Write_Str ("Entry_Formal");
8117 Write_Str ("First_Private_Entity");
8119 when Enumeration_Kind =>
8120 Write_Str ("Lit_Strings");
8122 when E_String_Literal_Subtype =>
8123 Write_Str ("String_Literal_Length");
8127 Write_Str ("Unset_Reference");
8130 Write_Str ("Field16??");
8132 end Write_Field16_Name;
8134 ------------------------
8135 -- Write_Field17_Name --
8136 ------------------------
8138 procedure Write_Field17_Name (Id : Entity_Id) is
8143 E_Generic_In_Out_Parameter |
8145 Write_Str ("Actual_Subtype");
8148 Write_Str ("Digits_Value");
8150 when E_Discriminant =>
8151 Write_Str ("Discriminal");
8160 E_Generic_Function |
8162 E_Generic_Procedure |
8170 E_Return_Statement |
8172 E_Subprogram_Type =>
8173 Write_Str ("First_Entity");
8176 Write_Str ("First_Index");
8178 when Enumeration_Kind =>
8179 Write_Str ("First_Literal");
8182 Write_Str ("Master_Id");
8184 when Modular_Integer_Kind =>
8185 Write_Str ("Modulus");
8187 when E_Incomplete_Type =>
8188 Write_Str ("Non_Limited_View");
8190 when E_Incomplete_Subtype =>
8191 if From_With_Type (Id) then
8192 Write_Str ("Non_Limited_View");
8196 Write_Str ("Prival");
8199 Write_Str ("Field17??");
8201 end Write_Field17_Name;
8203 ------------------------
8204 -- Write_Field18_Name --
8205 ------------------------
8207 procedure Write_Field18_Name (Id : Entity_Id) is
8210 when E_Enumeration_Literal |
8214 Write_Str ("Alias");
8216 when E_Record_Type =>
8217 Write_Str ("Corresponding_Concurrent_Type");
8219 when E_Subprogram_Body =>
8220 Write_Str ("Corresponding_Protected_Entry");
8222 when Concurrent_Kind =>
8223 Write_Str ("Corresponding_Record_Type");
8228 Write_Str ("Enclosing_Scope");
8230 when E_Entry_Index_Parameter =>
8231 Write_Str ("Entry_Index_Constant");
8233 when E_Class_Wide_Subtype |
8234 E_Access_Protected_Subprogram_Type |
8235 E_Anonymous_Access_Protected_Subprogram_Type |
8236 E_Access_Subprogram_Type |
8238 Write_Str ("Equivalent_Type");
8240 when Fixed_Point_Kind =>
8241 Write_Str ("Delta_Value");
8243 when Incomplete_Or_Private_Kind |
8245 Write_Str ("Private_Dependents");
8248 Write_Str ("Renamed_Object");
8252 E_Generic_Function |
8253 E_Generic_Procedure |
8254 E_Generic_Package =>
8255 Write_Str ("Renamed_Entity");
8258 Write_Str ("Field18??");
8260 end Write_Field18_Name;
8262 -----------------------
8263 -- Write_Field19_Name --
8264 -----------------------
8266 procedure Write_Field19_Name (Id : Entity_Id) is
8270 E_Generic_Package =>
8271 Write_Str ("Body_Entity");
8273 when E_Discriminant =>
8274 Write_Str ("Corresponding_Discriminant");
8276 when E_Record_Type =>
8277 Write_Str ("Parent_Subtype");
8281 Write_Str ("Related_Array_Object");
8285 Write_Str ("Size_Check_Code");
8287 when E_Package_Body |
8289 Write_Str ("Spec_Entity");
8291 when Private_Kind =>
8292 Write_Str ("Underlying_Full_View");
8295 Write_Str ("Field19??");
8297 end Write_Field19_Name;
8299 -----------------------
8300 -- Write_Field20_Name --
8301 -----------------------
8303 procedure Write_Field20_Name (Id : Entity_Id) is
8307 Write_Str ("Component_Type");
8309 when E_In_Parameter |
8310 E_Generic_In_Parameter =>
8311 Write_Str ("Default_Value");
8314 Write_Str ("Directly_Designated_Type");
8317 Write_Str ("Discriminant_Checking_Func");
8319 when E_Discriminant =>
8320 Write_Str ("Discriminant_Default_Value");
8329 E_Generic_Function |
8331 E_Generic_Procedure |
8339 E_Return_Statement |
8341 E_Subprogram_Type =>
8342 Write_Str ("Last_Entity");
8346 Write_Str ("Prival_Link");
8349 Write_Str ("Scalar_Range");
8352 Write_Str ("Register_Exception_Call");
8355 Write_Str ("Field20??");
8357 end Write_Field20_Name;
8359 -----------------------
8360 -- Write_Field21_Name --
8361 -----------------------
8363 procedure Write_Field21_Name (Id : Entity_Id) is
8367 Write_Str ("Accept_Address");
8369 when E_In_Parameter =>
8370 Write_Str ("Default_Expr_Function");
8372 when Concurrent_Kind |
8373 Incomplete_Or_Private_Kind |
8377 Write_Str ("Discriminant_Constraint");
8382 E_Generic_Function |
8384 E_Generic_Procedure |
8386 Write_Str ("Interface_Name");
8389 Modular_Integer_Kind =>
8390 Write_Str ("Original_Array_Type");
8392 when Fixed_Point_Kind =>
8393 Write_Str ("Small_Value");
8396 Write_Str ("Field21??");
8398 end Write_Field21_Name;
8400 -----------------------
8401 -- Write_Field22_Name --
8402 -----------------------
8404 procedure Write_Field22_Name (Id : Entity_Id) is
8408 Write_Str ("Associated_Storage_Pool");
8411 Write_Str ("Component_Size");
8413 when E_Record_Type =>
8414 Write_Str ("Corresponding_Remote_Type");
8418 Write_Str ("Original_Record_Component");
8420 when E_Enumeration_Literal =>
8421 Write_Str ("Enumeration_Rep_Expr");
8424 Write_Str ("Exception_Code");
8426 when E_Record_Type_With_Private |
8427 E_Record_Subtype_With_Private |
8430 E_Limited_Private_Type |
8431 E_Limited_Private_Subtype =>
8432 Write_Str ("Private_View");
8435 Write_Str ("Protected_Formal");
8445 E_Generic_Function |
8446 E_Generic_Procedure |
8449 E_Return_Statement |
8452 Write_Str ("Scope_Depth_Value");
8455 Write_Str ("Shared_Var_Procs_Instance");
8458 Write_Str ("Field22??");
8460 end Write_Field22_Name;
8462 ------------------------
8463 -- Write_Field23_Name --
8464 ------------------------
8466 procedure Write_Field23_Name (Id : Entity_Id) is
8470 Write_Str ("Associated_Collection");
8472 when E_Discriminant =>
8473 Write_Str ("CR_Discriminant");
8476 Write_Str ("Entry_Cancel_Parameter");
8478 when E_Enumeration_Type =>
8479 Write_Str ("Enum_Pos_To_Rep");
8483 Write_Str ("Extra_Constrained");
8485 when E_Generic_Function |
8487 E_Generic_Procedure =>
8488 Write_Str ("Inner_Instances");
8491 Write_Str ("Packed_Array_Type");
8494 Write_Str ("Protection_Object");
8496 when Concurrent_Kind |
8497 Incomplete_Or_Private_Kind |
8501 Write_Str ("Stored_Constraint");
8505 if Present (Scope (Id))
8506 and then Is_Protected_Type (Scope (Id))
8508 Write_Str ("Protection_Object");
8510 Write_Str ("Generic_Renamings");
8514 if Is_Generic_Instance (Id) then
8515 Write_Str ("Generic_Renamings");
8517 Write_Str ("Limited_View");
8521 Write_Str ("Field23??");
8523 end Write_Field23_Name;
8525 ------------------------
8526 -- Write_Field24_Name --
8527 ------------------------
8529 procedure Write_Field24_Name (Id : Entity_Id) is
8534 Write_Str ("Finalizer");
8539 Write_Str ("Related_Expression");
8541 when Subprogram_Kind =>
8542 Write_Str ("Spec_PPC_List");
8545 Write_Str ("Field24???");
8547 end Write_Field24_Name;
8549 ------------------------
8550 -- Write_Field25_Name --
8551 ------------------------
8553 procedure Write_Field25_Name (Id : Entity_Id) is
8557 Write_Str ("Debug_Renaming_Link");
8560 Write_Str ("DT_Offset_To_Top_Func");
8564 Write_Str ("Interface_Alias");
8566 when E_Record_Type |
8568 E_Record_Type_With_Private |
8569 E_Record_Subtype_With_Private =>
8570 Write_Str ("Interfaces");
8573 Write_Str ("Task_Body_Procedure");
8577 Write_Str ("PPC_Wrapper");
8579 when E_Enumeration_Subtype |
8580 E_Modular_Integer_Subtype |
8581 E_Signed_Integer_Subtype =>
8582 Write_Str ("Static_Predicate");
8585 Write_Str ("Field25??");
8587 end Write_Field25_Name;
8589 ------------------------
8590 -- Write_Field26_Name --
8591 ------------------------
8593 procedure Write_Field26_Name (Id : Entity_Id) is
8596 when E_Record_Type |
8597 E_Record_Type_With_Private =>
8598 Write_Str ("Dispatch_Table_Wrappers");
8600 when E_In_Out_Parameter |
8603 Write_Str ("Last_Assignment");
8605 when E_Access_Subprogram_Type =>
8606 Write_Str ("Original_Access_Type");
8608 when E_Generic_Package |
8610 Write_Str ("Package_Instantiation");
8614 Write_Str ("Related_Type");
8617 Write_Str ("Relative_Deadline_Variable");
8621 if Ekind (Id) = E_Procedure
8622 and then not Is_Dispatching_Operation (Id)
8624 Write_Str ("Static_Initialization");
8626 Write_Str ("Overridden_Operation");
8630 Write_Str ("Field26??");
8632 end Write_Field26_Name;
8634 ------------------------
8635 -- Write_Field27_Name --
8636 ------------------------
8638 procedure Write_Field27_Name (Id : Entity_Id) is
8643 Write_Str ("Current_Use_Clause");
8648 Write_Str ("Related_Type");
8651 Write_Str ("Wrapped_Entity");
8654 Write_Str ("Field27??");
8656 end Write_Field27_Name;
8658 ------------------------
8659 -- Write_Field28_Name --
8660 ------------------------
8662 procedure Write_Field28_Name (Id : Entity_Id) is
8668 Write_Str ("Extra_Formals");
8670 when E_Record_Type =>
8671 Write_Str ("Underlying_Record_View");
8674 Write_Str ("Field28??");
8676 end Write_Field28_Name;
8678 procedure Write_Field29_Name (Id : Entity_Id) is
8682 Write_Str ("Subprograms_For_Type");
8685 Write_Str ("Field29??");
8687 end Write_Field29_Name;
8689 -------------------------
8690 -- Iterator Procedures --
8691 -------------------------
8693 procedure Proc_Next_Component (N : in out Node_Id) is
8695 N := Next_Component (N);
8696 end Proc_Next_Component;
8698 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8700 N := Next_Entity (N);
8701 while Present (N) loop
8702 exit when Ekind_In (N, E_Component, E_Discriminant);
8703 N := Next_Entity (N);
8705 end Proc_Next_Component_Or_Discriminant;
8707 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8709 N := Next_Discriminant (N);
8710 end Proc_Next_Discriminant;
8712 procedure Proc_Next_Formal (N : in out Node_Id) is
8714 N := Next_Formal (N);
8715 end Proc_Next_Formal;
8717 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8719 N := Next_Formal_With_Extras (N);
8720 end Proc_Next_Formal_With_Extras;
8722 procedure Proc_Next_Index (N : in out Node_Id) is
8724 N := Next_Index (N);
8725 end Proc_Next_Index;
8727 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8729 N := Next_Inlined_Subprogram (N);
8730 end Proc_Next_Inlined_Subprogram;
8732 procedure Proc_Next_Literal (N : in out Node_Id) is
8734 N := Next_Literal (N);
8735 end Proc_Next_Literal;
8737 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8739 N := Next_Stored_Discriminant (N);
8740 end Proc_Next_Stored_Discriminant;