1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2010, 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;
40 with Targparm; use Targparm;
44 use Atree.Unchecked_Access;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
70 -- First_Rep_Item Node6
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
79 -- Mechanism Uint8 (but returns Mechanism_Type)
80 -- Normalized_First_Bit Uint8
81 -- Postcondition_Proc Node8
82 -- Return_Applies_To Node8
83 -- First_Exit_Statement Node8
85 -- Class_Wide_Type Node9
86 -- Current_Value Node9
89 -- Direct_Primitive_Operations Elist10
90 -- Discriminal_Link Node10
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 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
130 -- Access_Disp_Table Elist16
131 -- Cloned_Subtype Node16
133 -- Entry_Formal Node16
134 -- First_Private_Entity Node16
135 -- Lit_Strings Node16
136 -- String_Literal_Length Uint16
137 -- Unset_Reference Node16
139 -- Actual_Subtype Node17
140 -- Digits_Value Uint17
141 -- Discriminal Node17
142 -- First_Entity Node17
143 -- First_Index Node17
144 -- First_Literal Node17
147 -- Non_Limited_View Node17
151 -- Corresponding_Concurrent_Type Node18
152 -- Corresponding_Protected_Entry Node18
153 -- Corresponding_Record_Type Node18
154 -- Delta_Value Ureal18
155 -- Enclosing_Scope Node18
156 -- Equivalent_Type Node18
157 -- Private_Dependents Elist18
158 -- Renamed_Entity Node18
159 -- Renamed_Object Node18
161 -- Body_Entity Node19
162 -- Corresponding_Discriminant Node19
163 -- Finalization_Chain_Entity 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_Final_Chain 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
210 -- Related_Expression Node24
211 -- Spec_PPC_List Node24
213 -- Interface_Alias Node25
214 -- Interfaces Elist25
215 -- Debug_Renaming_Link Node25
216 -- DT_Offset_To_Top_Func Node25
217 -- PPC_Wrapper Node25
218 -- Task_Body_Procedure Node25
220 -- Dispatch_Table_Wrappers Elist26
221 -- Last_Assignment Node26
222 -- Overridden_Operation Node26
223 -- Package_Instantiation Node26
224 -- Relative_Deadline_Variable Node26
225 -- Static_Initialization Node26
227 -- Current_Use_Clause Node27
228 -- Related_Type Node27
229 -- Wrapped_Entity Node27
231 -- Extra_Formals Node28
232 -- Underlying_Record_View Node28
234 -- Subprograms_For_Type Node29
236 ---------------------------------------------
237 -- Usage of Flags in Defining Entity Nodes --
238 ---------------------------------------------
240 -- All flags are unique, there is no overlaying, so each flag is physically
241 -- present in every entity. However, for many of the flags, it only makes
242 -- sense for them to be set true for certain subsets of entity kinds. See
243 -- the spec of Einfo for further details.
245 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
248 -- Has_Discriminants Flag5
249 -- Is_Dispatching_Operation Flag6
250 -- Is_Immediately_Visible Flag7
252 -- Is_Potentially_Use_Visible Flag9
256 -- Is_Constrained Flag12
257 -- Is_Generic_Type Flag13
258 -- Depends_On_Private Flag14
260 -- Is_Volatile Flag16
261 -- Is_Internal Flag17
262 -- Has_Delayed_Freeze Flag18
263 -- Is_Abstract_Subprogram Flag19
264 -- Is_Concurrent_Record_Type Flag20
266 -- Has_Master_Entity Flag21
267 -- Needs_No_Actuals Flag22
268 -- Has_Storage_Size_Clause Flag23
269 -- Is_Imported Flag24
270 -- Is_Limited_Record Flag25
271 -- Has_Completion Flag26
272 -- Has_Pragma_Controlled Flag27
273 -- Is_Statically_Allocated Flag28
274 -- Has_Size_Clause Flag29
277 -- Checks_May_Be_Suppressed Flag31
278 -- Kill_Elaboration_Checks Flag32
279 -- Kill_Range_Checks Flag33
280 -- Kill_Tag_Checks Flag34
281 -- Is_Class_Wide_Equivalent_Type Flag35
282 -- Referenced_As_LHS Flag36
283 -- Is_Known_Non_Null Flag37
284 -- Can_Never_Be_Null Flag38
285 -- Is_Overriding_Operation Flag39
286 -- Body_Needed_For_SAL Flag40
288 -- Treat_As_Volatile Flag41
289 -- Is_Controlled Flag42
290 -- Has_Controlled_Component Flag43
292 -- In_Private_Part Flag45
293 -- Has_Alignment_Clause Flag46
295 -- In_Package_Body Flag48
297 -- Delay_Subprogram_Descriptors Flag50
300 -- Is_Entry_Formal Flag52
301 -- Is_Private_Descendant Flag53
302 -- Return_Present Flag54
303 -- Is_Tagged_Type Flag55
304 -- Has_Homonym Flag56
306 -- Non_Binary_Modulus Flag58
307 -- Is_Preelaborated Flag59
308 -- Is_Shared_Passive Flag60
310 -- Is_Remote_Types Flag61
311 -- Is_Remote_Call_Interface Flag62
312 -- Is_Character_Type Flag63
313 -- Is_Intrinsic_Subprogram Flag64
314 -- Has_Record_Rep_Clause Flag65
315 -- Has_Enumeration_Rep_Clause Flag66
316 -- Has_Small_Clause Flag67
317 -- Has_Component_Size_Clause Flag68
318 -- Is_Access_Constant Flag69
319 -- Is_First_Subtype Flag70
321 -- Has_Completion_In_Body Flag71
322 -- Has_Unknown_Discriminants Flag72
323 -- Is_Child_Unit Flag73
324 -- Is_CPP_Class Flag74
325 -- Has_Non_Standard_Rep Flag75
326 -- Is_Constructor Flag76
327 -- Static_Elaboration_Desired Flag77
329 -- Has_All_Calls_Remote Flag79
330 -- Is_Constr_Subt_For_U_Nominal Flag80
332 -- Is_Asynchronous Flag81
333 -- Has_Gigi_Rep_Item Flag82
334 -- Has_Machine_Radix_Clause Flag83
335 -- Machine_Radix_10 Flag84
337 -- Has_Atomic_Components Flag86
338 -- Has_Volatile_Components Flag87
339 -- Discard_Names Flag88
340 -- Is_Interrupt_Handler Flag89
341 -- Returns_By_Ref Flag90
344 -- Size_Known_At_Compile_Time Flag92
345 -- Has_Subprogram_Descriptor Flag93
346 -- Is_Generic_Actual_Type Flag94
347 -- Uses_Sec_Stack Flag95
348 -- Warnings_Off Flag96
349 -- Is_Controlling_Formal Flag97
350 -- Has_Controlling_Result Flag98
351 -- Is_Exported Flag99
352 -- Has_Specified_Layout Flag100
354 -- Has_Nested_Block_With_Handler Flag101
356 -- Is_Completely_Hidden Flag103
357 -- Address_Taken Flag104
358 -- Suppress_Init_Proc Flag105
359 -- Is_Limited_Composite Flag106
360 -- Is_Private_Composite Flag107
361 -- Default_Expressions_Processed Flag108
362 -- Is_Non_Static_Subtype Flag109
363 -- Has_External_Tag_Rep_Clause Flag110
365 -- Is_Formal_Subprogram Flag111
366 -- Is_Renaming_Of_Object Flag112
368 -- Delay_Cleanups Flag114
369 -- Never_Set_In_Source Flag115
370 -- Is_Visible_Child_Unit Flag116
371 -- Is_Unchecked_Union Flag117
372 -- Is_For_Access_Subtype Flag118
373 -- Has_Convention_Pragma Flag119
374 -- Has_Primitive_Operations Flag120
376 -- Has_Pragma_Pack Flag121
377 -- Is_Bit_Packed_Array Flag122
378 -- Has_Unchecked_Union Flag123
379 -- Is_Eliminated Flag124
380 -- C_Pass_By_Copy Flag125
381 -- Is_Instantiated Flag126
382 -- Is_Valued_Procedure Flag127
383 -- (used for Component_Alignment) Flag128
384 -- (used for Component_Alignment) Flag129
385 -- Is_Generic_Instance Flag130
387 -- No_Pool_Assigned Flag131
388 -- Is_AST_Entry Flag132
389 -- Is_VMS_Exception Flag133
390 -- Is_Optional_Parameter Flag134
391 -- Has_Aliased_Components Flag135
392 -- No_Strict_Aliasing Flag136
393 -- Is_Machine_Code_Subprogram Flag137
394 -- Is_Packed_Array_Type Flag138
395 -- Has_Biased_Representation Flag139
396 -- Has_Complex_Representation Flag140
398 -- Is_Constr_Subt_For_UN_Aliased Flag141
399 -- Has_Missing_Return Flag142
400 -- Has_Recursive_Call Flag143
401 -- Is_Unsigned_Type Flag144
402 -- Strict_Alignment Flag145
403 -- Is_Abstract_Type Flag146
404 -- Needs_Debug_Info Flag147
405 -- Suppress_Elaboration_Warnings Flag148
406 -- Is_Compilation_Unit Flag149
407 -- Has_Pragma_Elaborate_Body Flag150
410 -- Entry_Accepted Flag152
411 -- Is_Obsolescent Flag153
412 -- Has_Per_Object_Constraint Flag154
413 -- Has_Private_Declaration Flag155
414 -- Referenced Flag156
415 -- Has_Pragma_Inline Flag157
416 -- Finalize_Storage_Only Flag158
417 -- From_With_Type Flag159
418 -- Is_Package_Body_Entity Flag160
420 -- Has_Qualified_Name Flag161
421 -- Nonzero_Is_True Flag162
422 -- Is_True_Constant Flag163
423 -- Reverse_Bit_Order Flag164
424 -- Suppress_Style_Checks Flag165
425 -- Debug_Info_Off Flag166
426 -- Sec_Stack_Needed_For_Return Flag167
427 -- Materialize_Entity Flag168
428 -- Has_Pragma_Thread_Local_Storage Flag169
429 -- Is_Known_Valid Flag170
431 -- Is_Hidden_Open_Scope Flag171
432 -- Has_Object_Size_Clause Flag172
433 -- Has_Fully_Qualified_Name Flag173
434 -- Elaboration_Entity_Required Flag174
435 -- Has_Forward_Instantiation Flag175
436 -- Is_Discrim_SO_Function Flag176
437 -- Size_Depends_On_Discriminant Flag177
438 -- Is_Null_Init_Proc Flag178
439 -- Has_Pragma_Pure_Function Flag179
440 -- Has_Pragma_Unreferenced Flag180
442 -- Has_Contiguous_Rep Flag181
443 -- Has_Xref_Entry Flag182
444 -- Must_Be_On_Byte_Boundary Flag183
445 -- Has_Stream_Size_Clause Flag184
446 -- Is_Ada_2005_Only Flag185
447 -- Is_Interface Flag186
448 -- Has_Constrained_Partial_View Flag187
449 -- Has_Persistent_BSS Flag188
450 -- Is_Pure_Unit_Access_Type Flag189
451 -- Has_Specified_Stream_Input Flag190
453 -- Has_Specified_Stream_Output Flag191
454 -- Has_Specified_Stream_Read Flag192
455 -- Has_Specified_Stream_Write Flag193
456 -- Is_Local_Anonymous_Access Flag194
457 -- Is_Primitive_Wrapper Flag195
458 -- Was_Hidden Flag196
459 -- Is_Limited_Interface Flag197
460 -- Has_Pragma_Ordered Flag198
461 -- Is_Ada_2012_Only Flag199
463 -- Has_Delayed_Aspects Flag200
464 -- Has_Anon_Block_Suffix Flag201
465 -- Itype_Printed Flag202
466 -- Has_Pragma_Pure Flag203
467 -- Is_Known_Null Flag204
468 -- Low_Bound_Tested Flag205
469 -- Is_Visible_Formal Flag206
470 -- Known_To_Have_Preelab_Init Flag207
471 -- Must_Have_Preelab_Init Flag208
472 -- Is_Return_Object Flag209
473 -- Elaborate_Body_Desirable Flag210
475 -- Has_Static_Discriminants Flag211
476 -- Has_Pragma_Unreferenced_Objects Flag212
477 -- Requires_Overriding Flag213
479 -- Has_Up_Level_Access Flag215
480 -- Universal_Aliasing Flag216
481 -- Suppress_Value_Tracking_On_Call Flag217
482 -- Is_Primitive Flag218
483 -- Has_Initial_Value Flag219
484 -- Has_Dispatch_Table Flag220
486 -- Has_Pragma_Preelab_Init Flag221
487 -- Used_As_Generic_Actual Flag222
488 -- Is_Descendent_Of_Address Flag223
491 -- Is_Only_Out_Parameter Flag226
492 -- Referenced_As_Out_Parameter Flag227
493 -- Has_Thunks Flag228
494 -- Can_Use_Internal_Rep Flag229
495 -- Has_Pragma_Inline_Always Flag230
497 -- Renamed_In_Spec Flag231
498 -- Has_Invariants Flag232
499 -- Has_Pragma_Unmodified Flag233
500 -- Is_Dispatch_Table_Entity Flag234
501 -- Is_Trivial_Subprogram Flag235
502 -- Warnings_Off_Used Flag236
503 -- Warnings_Off_Used_Unmodified Flag237
504 -- Warnings_Off_Used_Unreferenced Flag238
505 -- OK_To_Reorder_Components Flag239
506 -- Has_Postconditions Flag240
508 -- Optimize_Alignment_Space Flag241
509 -- Optimize_Alignment_Time Flag242
510 -- Overlays_Constant Flag243
511 -- Is_RACW_Stub_Type Flag244
512 -- Is_Private_Primitive Flag245
513 -- Is_Underlying_Record_View Flag246
514 -- OK_To_Rename Flag247
515 -- Has_Inheritable_Invariants Flag248
516 -- OK_To_Reference Flag249
517 -- Has_Predicates Flag250
528 type Float_Rep_Kind is (IEEE_Binary, VAX_Native, AAMP);
530 -----------------------
531 -- Local subprograms --
532 -----------------------
534 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
535 -- Returns the attribute definition clause for Id whose name is Rep_Name.
536 -- Returns Empty if no matching attribute definition clause found for Id.
538 function Float_Rep (Id : E) return Float_Rep_Kind;
539 -- Returns the floating point representation used for the given type
545 function Float_Rep (Id : E) return Float_Rep_Kind is
546 pragma Assert (Is_Floating_Point_Type (Id));
548 if AAMP_On_Target then
550 elsif Vax_Float (Id) then
561 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
565 Ritem := First_Rep_Item (Id);
566 while Present (Ritem) loop
567 if Nkind (Ritem) = N_Attribute_Definition_Clause
568 and then Chars (Ritem) = Rep_Name
572 Next_Rep_Item (Ritem);
579 --------------------------------
580 -- Attribute Access Functions --
581 --------------------------------
583 function Accept_Address (Id : E) return L is
588 function Access_Disp_Table (Id : E) return L is
590 pragma Assert (Is_Tagged_Type (Id));
591 return Elist16 (Implementation_Base_Type (Id));
592 end Access_Disp_Table;
594 function Actual_Subtype (Id : E) return E is
597 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
598 or else Is_Formal (Id));
602 function Address_Taken (Id : E) return B is
607 function Alias (Id : E) return E is
610 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
614 function Alignment (Id : E) return U is
616 pragma Assert (Is_Type (Id)
617 or else Is_Formal (Id)
618 or else Ekind_In (Id, E_Loop_Parameter,
625 function Associated_Final_Chain (Id : E) return E is
627 pragma Assert (Is_Access_Type (Id));
629 end Associated_Final_Chain;
631 function Associated_Formal_Package (Id : E) return E is
633 pragma Assert (Ekind (Id) = E_Package);
635 end Associated_Formal_Package;
637 function Associated_Node_For_Itype (Id : E) return N is
640 end Associated_Node_For_Itype;
642 function Associated_Storage_Pool (Id : E) return E is
644 pragma Assert (Is_Access_Type (Id));
645 return Node22 (Root_Type (Id));
646 end Associated_Storage_Pool;
648 function Barrier_Function (Id : E) return N is
650 pragma Assert (Is_Entry (Id));
652 end Barrier_Function;
654 function Block_Node (Id : E) return N is
656 pragma Assert (Ekind (Id) = E_Block);
660 function Body_Entity (Id : E) return E is
662 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
666 function Body_Needed_For_SAL (Id : E) return B is
669 (Ekind (Id) = E_Package
670 or else Is_Subprogram (Id)
671 or else Is_Generic_Unit (Id));
673 end Body_Needed_For_SAL;
675 function C_Pass_By_Copy (Id : E) return B is
677 pragma Assert (Is_Record_Type (Id));
678 return Flag125 (Implementation_Base_Type (Id));
681 function Can_Never_Be_Null (Id : E) return B is
684 end Can_Never_Be_Null;
686 function Checks_May_Be_Suppressed (Id : E) return B is
689 end Checks_May_Be_Suppressed;
691 function Class_Wide_Type (Id : E) return E is
693 pragma Assert (Is_Type (Id));
697 function Cloned_Subtype (Id : E) return E is
699 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
703 function Component_Bit_Offset (Id : E) return U is
705 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
707 end Component_Bit_Offset;
709 function Component_Clause (Id : E) return N is
711 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
713 end Component_Clause;
715 function Component_Size (Id : E) return U is
717 pragma Assert (Is_Array_Type (Id));
718 return Uint22 (Implementation_Base_Type (Id));
721 function Component_Type (Id : E) return E is
723 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
724 return Node20 (Implementation_Base_Type (Id));
727 function Corresponding_Concurrent_Type (Id : E) return E is
729 pragma Assert (Ekind (Id) = E_Record_Type);
731 end Corresponding_Concurrent_Type;
733 function Corresponding_Discriminant (Id : E) return E is
735 pragma Assert (Ekind (Id) = E_Discriminant);
737 end Corresponding_Discriminant;
739 function Corresponding_Equality (Id : E) return E is
742 (Ekind (Id) = E_Function
743 and then not Comes_From_Source (Id)
744 and then Chars (Id) = Name_Op_Ne);
746 end Corresponding_Equality;
748 function Corresponding_Protected_Entry (Id : E) return E is
750 pragma Assert (Ekind (Id) = E_Subprogram_Body);
752 end Corresponding_Protected_Entry;
754 function Corresponding_Record_Type (Id : E) return E is
756 pragma Assert (Is_Concurrent_Type (Id));
758 end Corresponding_Record_Type;
760 function Corresponding_Remote_Type (Id : E) return E is
763 end Corresponding_Remote_Type;
765 function Current_Use_Clause (Id : E) return E is
767 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
769 end Current_Use_Clause;
771 function Current_Value (Id : E) return N is
773 pragma Assert (Ekind (Id) in Object_Kind);
777 function CR_Discriminant (Id : E) return E is
782 function Debug_Info_Off (Id : E) return B is
787 function Debug_Renaming_Link (Id : E) return E is
790 end Debug_Renaming_Link;
792 function Default_Expr_Function (Id : E) return E is
794 pragma Assert (Is_Formal (Id));
796 end Default_Expr_Function;
798 function Default_Expressions_Processed (Id : E) return B is
801 end Default_Expressions_Processed;
803 function Default_Value (Id : E) return N is
805 pragma Assert (Is_Formal (Id));
809 function Delay_Cleanups (Id : E) return B is
814 function Delay_Subprogram_Descriptors (Id : E) return B is
817 end Delay_Subprogram_Descriptors;
819 function Delta_Value (Id : E) return R is
821 pragma Assert (Is_Fixed_Point_Type (Id));
825 function Dependent_Instances (Id : E) return L is
827 pragma Assert (Is_Generic_Instance (Id));
829 end Dependent_Instances;
831 function Depends_On_Private (Id : E) return B is
833 pragma Assert (Nkind (Id) in N_Entity);
835 end Depends_On_Private;
837 function Digits_Value (Id : E) return U is
840 (Is_Floating_Point_Type (Id)
841 or else Is_Decimal_Fixed_Point_Type (Id));
845 function Direct_Primitive_Operations (Id : E) return L is
847 pragma Assert (Is_Tagged_Type (Id));
849 end Direct_Primitive_Operations;
851 function Directly_Designated_Type (Id : E) return E is
853 pragma Assert (Is_Access_Type (Id));
855 end Directly_Designated_Type;
857 function Discard_Names (Id : E) return B is
862 function Discriminal (Id : E) return E is
864 pragma Assert (Ekind (Id) = E_Discriminant);
868 function Discriminal_Link (Id : E) return N is
871 end Discriminal_Link;
873 function Discriminant_Checking_Func (Id : E) return E is
875 pragma Assert (Ekind (Id) = E_Component);
877 end Discriminant_Checking_Func;
879 function Discriminant_Constraint (Id : E) return L is
881 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
883 end Discriminant_Constraint;
885 function Discriminant_Default_Value (Id : E) return N is
887 pragma Assert (Ekind (Id) = E_Discriminant);
889 end Discriminant_Default_Value;
891 function Discriminant_Number (Id : E) return U is
893 pragma Assert (Ekind (Id) = E_Discriminant);
895 end Discriminant_Number;
897 function Dispatch_Table_Wrappers (Id : E) return L is
899 pragma Assert (Is_Tagged_Type (Id));
900 return Elist26 (Implementation_Base_Type (Id));
901 end Dispatch_Table_Wrappers;
903 function DT_Entry_Count (Id : E) return U is
905 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
909 function DT_Offset_To_Top_Func (Id : E) return E is
911 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
913 end DT_Offset_To_Top_Func;
915 function DT_Position (Id : E) return U is
917 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
918 and then Present (DTC_Entity (Id)));
922 function DTC_Entity (Id : E) return E is
924 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
928 function Elaborate_Body_Desirable (Id : E) return B is
930 pragma Assert (Ekind (Id) = E_Package);
932 end Elaborate_Body_Desirable;
934 function Elaboration_Entity (Id : E) return E is
939 Ekind (Id) = E_Package
941 Is_Generic_Unit (Id));
943 end Elaboration_Entity;
945 function Elaboration_Entity_Required (Id : E) return B is
950 Ekind (Id) = E_Package
952 Is_Generic_Unit (Id));
954 end Elaboration_Entity_Required;
956 function Enclosing_Scope (Id : E) return E is
961 function Entry_Accepted (Id : E) return B is
963 pragma Assert (Is_Entry (Id));
967 function Entry_Bodies_Array (Id : E) return E is
970 end Entry_Bodies_Array;
972 function Entry_Cancel_Parameter (Id : E) return E is
975 end Entry_Cancel_Parameter;
977 function Entry_Component (Id : E) return E is
982 function Entry_Formal (Id : E) return E is
987 function Entry_Index_Constant (Id : E) return N is
989 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
991 end Entry_Index_Constant;
993 function Entry_Parameters_Type (Id : E) return E is
996 end Entry_Parameters_Type;
998 function Enum_Pos_To_Rep (Id : E) return E is
1000 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1002 end Enum_Pos_To_Rep;
1004 function Enumeration_Pos (Id : E) return Uint is
1006 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1008 end Enumeration_Pos;
1010 function Enumeration_Rep (Id : E) return U is
1012 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1014 end Enumeration_Rep;
1016 function Enumeration_Rep_Expr (Id : E) return N is
1018 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1020 end Enumeration_Rep_Expr;
1022 function Equivalent_Type (Id : E) return E is
1025 (Ekind_In (Id, E_Class_Wide_Type,
1026 E_Class_Wide_Subtype,
1027 E_Access_Protected_Subprogram_Type,
1028 E_Anonymous_Access_Protected_Subprogram_Type,
1029 E_Access_Subprogram_Type,
1032 end Equivalent_Type;
1034 function Esize (Id : E) return Uint is
1039 function Exception_Code (Id : E) return Uint is
1041 pragma Assert (Ekind (Id) = E_Exception);
1045 function Extra_Accessibility (Id : E) return E is
1047 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1049 end Extra_Accessibility;
1051 function Extra_Constrained (Id : E) return E is
1053 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1055 end Extra_Constrained;
1057 function Extra_Formal (Id : E) return E is
1062 function Extra_Formals (Id : E) return E is
1065 (Is_Overloadable (Id)
1066 or else Ekind_In (Id, E_Entry_Family,
1068 E_Subprogram_Type));
1072 function Can_Use_Internal_Rep (Id : E) return B is
1074 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1075 return Flag229 (Base_Type (Id));
1076 end Can_Use_Internal_Rep;
1078 function Finalization_Chain_Entity (Id : E) return E is
1081 end Finalization_Chain_Entity;
1083 function Finalize_Storage_Only (Id : E) return B is
1085 pragma Assert (Is_Type (Id));
1086 return Flag158 (Base_Type (Id));
1087 end Finalize_Storage_Only;
1089 function First_Entity (Id : E) return E is
1094 function First_Exit_Statement (Id : E) return N is
1096 pragma Assert (Ekind (Id) = E_Loop);
1098 end First_Exit_Statement;
1100 function First_Index (Id : E) return N is
1102 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1106 function First_Literal (Id : E) return E is
1108 pragma Assert (Is_Enumeration_Type (Id));
1112 function First_Optional_Parameter (Id : E) return E is
1114 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1116 end First_Optional_Parameter;
1118 function First_Private_Entity (Id : E) return E is
1120 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1121 or else Ekind (Id) in Concurrent_Kind);
1123 end First_Private_Entity;
1125 function First_Rep_Item (Id : E) return E is
1130 function Freeze_Node (Id : E) return N is
1135 function From_With_Type (Id : E) return B is
1137 return Flag159 (Id);
1140 function Full_View (Id : E) return E is
1142 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1146 function Generic_Homonym (Id : E) return E is
1148 pragma Assert (Ekind (Id) = E_Generic_Package);
1150 end Generic_Homonym;
1152 function Generic_Renamings (Id : E) return L is
1154 return Elist23 (Id);
1155 end Generic_Renamings;
1157 function Handler_Records (Id : E) return S is
1160 end Handler_Records;
1162 function Has_Aliased_Components (Id : E) return B is
1164 return Flag135 (Implementation_Base_Type (Id));
1165 end Has_Aliased_Components;
1167 function Has_Alignment_Clause (Id : E) return B is
1170 end Has_Alignment_Clause;
1172 function Has_All_Calls_Remote (Id : E) return B is
1175 end Has_All_Calls_Remote;
1177 function Has_Anon_Block_Suffix (Id : E) return B is
1179 return Flag201 (Id);
1180 end Has_Anon_Block_Suffix;
1182 function Has_Atomic_Components (Id : E) return B is
1184 return Flag86 (Implementation_Base_Type (Id));
1185 end Has_Atomic_Components;
1187 function Has_Biased_Representation (Id : E) return B is
1189 return Flag139 (Id);
1190 end Has_Biased_Representation;
1192 function Has_Completion (Id : E) return B is
1197 function Has_Completion_In_Body (Id : E) return B is
1199 pragma Assert (Is_Type (Id));
1201 end Has_Completion_In_Body;
1203 function Has_Complex_Representation (Id : E) return B is
1205 pragma Assert (Is_Type (Id));
1206 return Flag140 (Implementation_Base_Type (Id));
1207 end Has_Complex_Representation;
1209 function Has_Component_Size_Clause (Id : E) return B is
1211 pragma Assert (Is_Array_Type (Id));
1212 return Flag68 (Implementation_Base_Type (Id));
1213 end Has_Component_Size_Clause;
1215 function Has_Constrained_Partial_View (Id : E) return B is
1217 pragma Assert (Is_Type (Id));
1218 return Flag187 (Id);
1219 end Has_Constrained_Partial_View;
1221 function Has_Controlled_Component (Id : E) return B is
1223 return Flag43 (Base_Type (Id));
1224 end Has_Controlled_Component;
1226 function Has_Contiguous_Rep (Id : E) return B is
1228 return Flag181 (Id);
1229 end Has_Contiguous_Rep;
1231 function Has_Controlling_Result (Id : E) return B is
1234 end Has_Controlling_Result;
1236 function Has_Convention_Pragma (Id : E) return B is
1238 return Flag119 (Id);
1239 end Has_Convention_Pragma;
1241 function Has_Delayed_Aspects (Id : E) return B is
1243 pragma Assert (Nkind (Id) in N_Entity);
1244 return Flag200 (Id);
1245 end Has_Delayed_Aspects;
1247 function Has_Delayed_Freeze (Id : E) return B is
1249 pragma Assert (Nkind (Id) in N_Entity);
1251 end Has_Delayed_Freeze;
1253 function Has_Discriminants (Id : E) return B is
1255 pragma Assert (Nkind (Id) in N_Entity);
1257 end Has_Discriminants;
1259 function Has_Dispatch_Table (Id : E) return B is
1261 pragma Assert (Is_Tagged_Type (Id));
1262 return Flag220 (Id);
1263 end Has_Dispatch_Table;
1265 function Has_Enumeration_Rep_Clause (Id : E) return B is
1267 pragma Assert (Is_Enumeration_Type (Id));
1269 end Has_Enumeration_Rep_Clause;
1271 function Has_Exit (Id : E) return B is
1276 function Has_External_Tag_Rep_Clause (Id : E) return B is
1278 pragma Assert (Is_Tagged_Type (Id));
1279 return Flag110 (Id);
1280 end Has_External_Tag_Rep_Clause;
1282 function Has_Forward_Instantiation (Id : E) return B is
1284 return Flag175 (Id);
1285 end Has_Forward_Instantiation;
1287 function Has_Fully_Qualified_Name (Id : E) return B is
1289 return Flag173 (Id);
1290 end Has_Fully_Qualified_Name;
1292 function Has_Gigi_Rep_Item (Id : E) return B is
1295 end Has_Gigi_Rep_Item;
1297 function Has_Homonym (Id : E) return B is
1302 function Has_Inheritable_Invariants (Id : E) return B is
1304 pragma Assert (Is_Type (Id));
1305 return Flag248 (Id);
1306 end Has_Inheritable_Invariants;
1308 function Has_Initial_Value (Id : E) return B is
1310 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1311 return Flag219 (Id);
1312 end Has_Initial_Value;
1314 function Has_Invariants (Id : E) return B is
1316 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Procedure);
1317 return Flag232 (Id);
1320 function Has_Machine_Radix_Clause (Id : E) return B is
1322 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1324 end Has_Machine_Radix_Clause;
1326 function Has_Master_Entity (Id : E) return B is
1329 end Has_Master_Entity;
1331 function Has_Missing_Return (Id : E) return B is
1333 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1334 return Flag142 (Id);
1335 end Has_Missing_Return;
1337 function Has_Nested_Block_With_Handler (Id : E) return B is
1339 return Flag101 (Id);
1340 end Has_Nested_Block_With_Handler;
1342 function Has_Non_Standard_Rep (Id : E) return B is
1344 return Flag75 (Implementation_Base_Type (Id));
1345 end Has_Non_Standard_Rep;
1347 function Has_Object_Size_Clause (Id : E) return B is
1349 pragma Assert (Is_Type (Id));
1350 return Flag172 (Id);
1351 end Has_Object_Size_Clause;
1353 function Has_Per_Object_Constraint (Id : E) return B is
1355 return Flag154 (Id);
1356 end Has_Per_Object_Constraint;
1358 function Has_Persistent_BSS (Id : E) return B is
1360 return Flag188 (Id);
1361 end Has_Persistent_BSS;
1363 function Has_Postconditions (Id : E) return B is
1365 pragma Assert (Is_Subprogram (Id));
1366 return Flag240 (Id);
1367 end Has_Postconditions;
1369 function Has_Pragma_Controlled (Id : E) return B is
1371 pragma Assert (Is_Access_Type (Id));
1372 return Flag27 (Implementation_Base_Type (Id));
1373 end Has_Pragma_Controlled;
1375 function Has_Pragma_Elaborate_Body (Id : E) return B is
1377 return Flag150 (Id);
1378 end Has_Pragma_Elaborate_Body;
1380 function Has_Pragma_Inline (Id : E) return B is
1382 return Flag157 (Id);
1383 end Has_Pragma_Inline;
1385 function Has_Pragma_Inline_Always (Id : E) return B is
1387 return Flag230 (Id);
1388 end Has_Pragma_Inline_Always;
1390 function Has_Pragma_Ordered (Id : E) return B is
1392 pragma Assert (Is_Enumeration_Type (Id));
1393 return Flag198 (Implementation_Base_Type (Id));
1394 end Has_Pragma_Ordered;
1396 function Has_Pragma_Pack (Id : E) return B is
1398 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1399 return Flag121 (Implementation_Base_Type (Id));
1400 end Has_Pragma_Pack;
1402 function Has_Pragma_Preelab_Init (Id : E) return B is
1404 return Flag221 (Id);
1405 end Has_Pragma_Preelab_Init;
1407 function Has_Pragma_Pure (Id : E) return B is
1409 return Flag203 (Id);
1410 end Has_Pragma_Pure;
1412 function Has_Pragma_Pure_Function (Id : E) return B is
1414 return Flag179 (Id);
1415 end Has_Pragma_Pure_Function;
1417 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1419 return Flag169 (Id);
1420 end Has_Pragma_Thread_Local_Storage;
1422 function Has_Pragma_Unmodified (Id : E) return B is
1424 return Flag233 (Id);
1425 end Has_Pragma_Unmodified;
1427 function Has_Pragma_Unreferenced (Id : E) return B is
1429 return Flag180 (Id);
1430 end Has_Pragma_Unreferenced;
1432 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1434 pragma Assert (Is_Type (Id));
1435 return Flag212 (Id);
1436 end Has_Pragma_Unreferenced_Objects;
1438 function Has_Predicates (Id : E) return B is
1440 return Flag250 (Id);
1443 function Has_Primitive_Operations (Id : E) return B is
1445 pragma Assert (Is_Type (Id));
1446 return Flag120 (Base_Type (Id));
1447 end Has_Primitive_Operations;
1449 function Has_Private_Declaration (Id : E) return B is
1451 return Flag155 (Id);
1452 end Has_Private_Declaration;
1454 function Has_Qualified_Name (Id : E) return B is
1456 return Flag161 (Id);
1457 end Has_Qualified_Name;
1459 function Has_RACW (Id : E) return B is
1461 pragma Assert (Ekind (Id) = E_Package);
1462 return Flag214 (Id);
1465 function Has_Record_Rep_Clause (Id : E) return B is
1467 pragma Assert (Is_Record_Type (Id));
1468 return Flag65 (Implementation_Base_Type (Id));
1469 end Has_Record_Rep_Clause;
1471 function Has_Recursive_Call (Id : E) return B is
1473 pragma Assert (Is_Subprogram (Id));
1474 return Flag143 (Id);
1475 end Has_Recursive_Call;
1477 function Has_Size_Clause (Id : E) return B is
1480 end Has_Size_Clause;
1482 function Has_Small_Clause (Id : E) return B is
1485 end Has_Small_Clause;
1487 function Has_Specified_Layout (Id : E) return B is
1489 pragma Assert (Is_Type (Id));
1490 return Flag100 (Implementation_Base_Type (Id));
1491 end Has_Specified_Layout;
1493 function Has_Specified_Stream_Input (Id : E) return B is
1495 pragma Assert (Is_Type (Id));
1496 return Flag190 (Id);
1497 end Has_Specified_Stream_Input;
1499 function Has_Specified_Stream_Output (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1502 return Flag191 (Id);
1503 end Has_Specified_Stream_Output;
1505 function Has_Specified_Stream_Read (Id : E) return B is
1507 pragma Assert (Is_Type (Id));
1508 return Flag192 (Id);
1509 end Has_Specified_Stream_Read;
1511 function Has_Specified_Stream_Write (Id : E) return B is
1513 pragma Assert (Is_Type (Id));
1514 return Flag193 (Id);
1515 end Has_Specified_Stream_Write;
1517 function Has_Static_Discriminants (Id : E) return B is
1519 pragma Assert (Is_Type (Id));
1520 return Flag211 (Id);
1521 end Has_Static_Discriminants;
1523 function Has_Storage_Size_Clause (Id : E) return B is
1525 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1526 return Flag23 (Implementation_Base_Type (Id));
1527 end Has_Storage_Size_Clause;
1529 function Has_Stream_Size_Clause (Id : E) return B is
1531 return Flag184 (Id);
1532 end Has_Stream_Size_Clause;
1534 function Has_Subprogram_Descriptor (Id : E) return B is
1537 end Has_Subprogram_Descriptor;
1539 function Has_Task (Id : E) return B is
1541 return Flag30 (Base_Type (Id));
1544 function Has_Thunks (Id : E) return B is
1546 return Flag228 (Id);
1549 function Has_Unchecked_Union (Id : E) return B is
1551 return Flag123 (Base_Type (Id));
1552 end Has_Unchecked_Union;
1554 function Has_Unknown_Discriminants (Id : E) return B is
1556 pragma Assert (Is_Type (Id));
1558 end Has_Unknown_Discriminants;
1560 function Has_Up_Level_Access (Id : E) return B is
1563 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1564 return Flag215 (Id);
1565 end Has_Up_Level_Access;
1567 function Has_Volatile_Components (Id : E) return B is
1569 return Flag87 (Implementation_Base_Type (Id));
1570 end Has_Volatile_Components;
1572 function Has_Xref_Entry (Id : E) return B is
1574 return Flag182 (Implementation_Base_Type (Id));
1577 function Hiding_Loop_Variable (Id : E) return E is
1579 pragma Assert (Ekind (Id) = E_Variable);
1581 end Hiding_Loop_Variable;
1583 function Homonym (Id : E) return E is
1588 function Interface_Alias (Id : E) return E is
1590 pragma Assert (Is_Subprogram (Id));
1592 end Interface_Alias;
1594 function Interfaces (Id : E) return L is
1596 pragma Assert (Is_Record_Type (Id));
1597 return Elist25 (Id);
1600 function In_Package_Body (Id : E) return B is
1603 end In_Package_Body;
1605 function In_Private_Part (Id : E) return B is
1608 end In_Private_Part;
1610 function In_Use (Id : E) return B is
1612 pragma Assert (Nkind (Id) in N_Entity);
1616 function Inner_Instances (Id : E) return L is
1618 return Elist23 (Id);
1619 end Inner_Instances;
1621 function Interface_Name (Id : E) return N is
1626 function Is_Abstract_Subprogram (Id : E) return B is
1628 pragma Assert (Is_Overloadable (Id));
1630 end Is_Abstract_Subprogram;
1632 function Is_Abstract_Type (Id : E) return B is
1634 pragma Assert (Is_Type (Id));
1635 return Flag146 (Id);
1636 end Is_Abstract_Type;
1638 function Is_Local_Anonymous_Access (Id : E) return B is
1640 pragma Assert (Is_Access_Type (Id));
1641 return Flag194 (Id);
1642 end Is_Local_Anonymous_Access;
1644 function Is_Access_Constant (Id : E) return B is
1646 pragma Assert (Is_Access_Type (Id));
1648 end Is_Access_Constant;
1650 function Is_Ada_2005_Only (Id : E) return B is
1652 return Flag185 (Id);
1653 end Is_Ada_2005_Only;
1655 function Is_Ada_2012_Only (Id : E) return B is
1657 return Flag199 (Id);
1658 end Is_Ada_2012_Only;
1660 function Is_Aliased (Id : E) return B is
1662 pragma Assert (Nkind (Id) in N_Entity);
1666 function Is_AST_Entry (Id : E) return B is
1668 pragma Assert (Is_Entry (Id));
1669 return Flag132 (Id);
1672 function Is_Asynchronous (Id : E) return B is
1674 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1676 end Is_Asynchronous;
1678 function Is_Atomic (Id : E) return B is
1683 function Is_Bit_Packed_Array (Id : E) return B is
1685 return Flag122 (Implementation_Base_Type (Id));
1686 end Is_Bit_Packed_Array;
1688 function Is_Called (Id : E) return B is
1690 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1691 return Flag102 (Id);
1694 function Is_Character_Type (Id : E) return B is
1697 end Is_Character_Type;
1699 function Is_Child_Unit (Id : E) return B is
1704 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1707 end Is_Class_Wide_Equivalent_Type;
1709 function Is_Compilation_Unit (Id : E) return B is
1711 return Flag149 (Id);
1712 end Is_Compilation_Unit;
1714 function Is_Completely_Hidden (Id : E) return B is
1716 pragma Assert (Ekind (Id) = E_Discriminant);
1717 return Flag103 (Id);
1718 end Is_Completely_Hidden;
1720 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1723 end Is_Constr_Subt_For_U_Nominal;
1725 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1727 return Flag141 (Id);
1728 end Is_Constr_Subt_For_UN_Aliased;
1730 function Is_Constrained (Id : E) return B is
1732 pragma Assert (Nkind (Id) in N_Entity);
1736 function Is_Constructor (Id : E) return B is
1741 function Is_Controlled (Id : E) return B is
1743 return Flag42 (Base_Type (Id));
1746 function Is_Controlling_Formal (Id : E) return B is
1748 pragma Assert (Is_Formal (Id));
1750 end Is_Controlling_Formal;
1752 function Is_CPP_Class (Id : E) return B is
1757 function Is_Descendent_Of_Address (Id : E) return B is
1759 pragma Assert (Is_Type (Id));
1760 return Flag223 (Id);
1761 end Is_Descendent_Of_Address;
1763 function Is_Discrim_SO_Function (Id : E) return B is
1765 return Flag176 (Id);
1766 end Is_Discrim_SO_Function;
1768 function Is_Dispatch_Table_Entity (Id : E) return B is
1770 return Flag234 (Id);
1771 end Is_Dispatch_Table_Entity;
1773 function Is_Dispatching_Operation (Id : E) return B is
1775 pragma Assert (Nkind (Id) in N_Entity);
1777 end Is_Dispatching_Operation;
1779 function Is_Eliminated (Id : E) return B is
1781 return Flag124 (Id);
1784 function Is_Entry_Formal (Id : E) return B is
1787 end Is_Entry_Formal;
1789 function Is_Exported (Id : E) return B is
1794 function Is_First_Subtype (Id : E) return B is
1797 end Is_First_Subtype;
1799 function Is_For_Access_Subtype (Id : E) return B is
1801 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1802 return Flag118 (Id);
1803 end Is_For_Access_Subtype;
1805 function Is_Formal_Subprogram (Id : E) return B is
1807 return Flag111 (Id);
1808 end Is_Formal_Subprogram;
1810 function Is_Frozen (Id : E) return B is
1815 function Is_Generic_Actual_Type (Id : E) return B is
1817 pragma Assert (Is_Type (Id));
1819 end Is_Generic_Actual_Type;
1821 function Is_Generic_Instance (Id : E) return B is
1823 return Flag130 (Id);
1824 end Is_Generic_Instance;
1826 function Is_Generic_Type (Id : E) return B is
1828 pragma Assert (Nkind (Id) in N_Entity);
1830 end Is_Generic_Type;
1832 function Is_Hidden (Id : E) return B is
1837 function Is_Hidden_Open_Scope (Id : E) return B is
1839 return Flag171 (Id);
1840 end Is_Hidden_Open_Scope;
1842 function Is_Immediately_Visible (Id : E) return B is
1844 pragma Assert (Nkind (Id) in N_Entity);
1846 end Is_Immediately_Visible;
1848 function Is_Imported (Id : E) return B is
1853 function Is_Inlined (Id : E) return B is
1858 function Is_Interface (Id : E) return B is
1860 return Flag186 (Id);
1863 function Is_Instantiated (Id : E) return B is
1865 return Flag126 (Id);
1866 end Is_Instantiated;
1868 function Is_Internal (Id : E) return B is
1870 pragma Assert (Nkind (Id) in N_Entity);
1874 function Is_Interrupt_Handler (Id : E) return B is
1876 pragma Assert (Nkind (Id) in N_Entity);
1878 end Is_Interrupt_Handler;
1880 function Is_Intrinsic_Subprogram (Id : E) return B is
1883 end Is_Intrinsic_Subprogram;
1885 function Is_Itype (Id : E) return B is
1890 function Is_Known_Non_Null (Id : E) return B is
1893 end Is_Known_Non_Null;
1895 function Is_Known_Null (Id : E) return B is
1897 return Flag204 (Id);
1900 function Is_Known_Valid (Id : E) return B is
1902 return Flag170 (Id);
1905 function Is_Limited_Composite (Id : E) return B is
1907 return Flag106 (Id);
1908 end Is_Limited_Composite;
1910 function Is_Limited_Interface (Id : E) return B is
1912 return Flag197 (Id);
1913 end Is_Limited_Interface;
1915 function Is_Limited_Record (Id : E) return B is
1918 end Is_Limited_Record;
1920 function Is_Machine_Code_Subprogram (Id : E) return B is
1922 pragma Assert (Is_Subprogram (Id));
1923 return Flag137 (Id);
1924 end Is_Machine_Code_Subprogram;
1926 function Is_Non_Static_Subtype (Id : E) return B is
1928 pragma Assert (Is_Type (Id));
1929 return Flag109 (Id);
1930 end Is_Non_Static_Subtype;
1932 function Is_Null_Init_Proc (Id : E) return B is
1934 pragma Assert (Ekind (Id) = E_Procedure);
1935 return Flag178 (Id);
1936 end Is_Null_Init_Proc;
1938 function Is_Obsolescent (Id : E) return B is
1940 return Flag153 (Id);
1943 function Is_Only_Out_Parameter (Id : E) return B is
1945 pragma Assert (Is_Formal (Id));
1946 return Flag226 (Id);
1947 end Is_Only_Out_Parameter;
1949 function Is_Optional_Parameter (Id : E) return B is
1951 pragma Assert (Is_Formal (Id));
1952 return Flag134 (Id);
1953 end Is_Optional_Parameter;
1955 function Is_Overriding_Operation (Id : E) return B is
1957 pragma Assert (Is_Subprogram (Id));
1959 end Is_Overriding_Operation;
1961 function Is_Package_Body_Entity (Id : E) return B is
1963 return Flag160 (Id);
1964 end Is_Package_Body_Entity;
1966 function Is_Packed (Id : E) return B is
1968 return Flag51 (Implementation_Base_Type (Id));
1971 function Is_Packed_Array_Type (Id : E) return B is
1973 return Flag138 (Id);
1974 end Is_Packed_Array_Type;
1976 function Is_Potentially_Use_Visible (Id : E) return B is
1978 pragma Assert (Nkind (Id) in N_Entity);
1980 end Is_Potentially_Use_Visible;
1982 function Is_Preelaborated (Id : E) return B is
1985 end Is_Preelaborated;
1987 function Is_Primitive (Id : E) return B is
1990 (Is_Overloadable (Id)
1991 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1992 return Flag218 (Id);
1995 function Is_Primitive_Wrapper (Id : E) return B is
1997 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1998 return Flag195 (Id);
1999 end Is_Primitive_Wrapper;
2001 function Is_Private_Composite (Id : E) return B is
2003 pragma Assert (Is_Type (Id));
2004 return Flag107 (Id);
2005 end Is_Private_Composite;
2007 function Is_Private_Descendant (Id : E) return B is
2010 end Is_Private_Descendant;
2012 function Is_Private_Primitive (Id : E) return B is
2014 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2015 return Flag245 (Id);
2016 end Is_Private_Primitive;
2018 function Is_Public (Id : E) return B is
2020 pragma Assert (Nkind (Id) in N_Entity);
2024 function Is_Pure (Id : E) return B is
2029 function Is_Pure_Unit_Access_Type (Id : E) return B is
2031 pragma Assert (Is_Access_Type (Id));
2032 return Flag189 (Id);
2033 end Is_Pure_Unit_Access_Type;
2035 function Is_RACW_Stub_Type (Id : E) return B is
2037 pragma Assert (Is_Type (Id));
2038 return Flag244 (Id);
2039 end Is_RACW_Stub_Type;
2041 function Is_Raised (Id : E) return B is
2043 pragma Assert (Ekind (Id) = E_Exception);
2044 return Flag224 (Id);
2047 function Is_Remote_Call_Interface (Id : E) return B is
2050 end Is_Remote_Call_Interface;
2052 function Is_Remote_Types (Id : E) return B is
2055 end Is_Remote_Types;
2057 function Is_Renaming_Of_Object (Id : E) return B is
2059 return Flag112 (Id);
2060 end Is_Renaming_Of_Object;
2062 function Is_Return_Object (Id : E) return B is
2064 return Flag209 (Id);
2065 end Is_Return_Object;
2067 function Is_Shared_Passive (Id : E) return B is
2070 end Is_Shared_Passive;
2072 function Is_Statically_Allocated (Id : E) return B is
2075 end Is_Statically_Allocated;
2077 function Is_Tag (Id : E) return B is
2079 pragma Assert (Nkind (Id) in N_Entity);
2083 function Is_Tagged_Type (Id : E) return B is
2088 function Is_Thunk (Id : E) return B is
2090 pragma Assert (Is_Subprogram (Id));
2091 return Flag225 (Id);
2094 function Is_Trivial_Subprogram (Id : E) return B is
2096 return Flag235 (Id);
2097 end Is_Trivial_Subprogram;
2099 function Is_True_Constant (Id : E) return B is
2101 return Flag163 (Id);
2102 end Is_True_Constant;
2104 function Is_Unchecked_Union (Id : E) return B is
2106 return Flag117 (Implementation_Base_Type (Id));
2107 end Is_Unchecked_Union;
2109 function Is_Underlying_Record_View (Id : E) return B is
2111 return Flag246 (Id);
2112 end Is_Underlying_Record_View;
2114 function Is_Unsigned_Type (Id : E) return B is
2116 pragma Assert (Is_Type (Id));
2117 return Flag144 (Id);
2118 end Is_Unsigned_Type;
2120 function Is_Valued_Procedure (Id : E) return B is
2122 pragma Assert (Ekind (Id) = E_Procedure);
2123 return Flag127 (Id);
2124 end Is_Valued_Procedure;
2126 function Is_Visible_Child_Unit (Id : E) return B is
2128 pragma Assert (Is_Child_Unit (Id));
2129 return Flag116 (Id);
2130 end Is_Visible_Child_Unit;
2132 function Is_Visible_Formal (Id : E) return B is
2134 return Flag206 (Id);
2135 end Is_Visible_Formal;
2137 function Is_VMS_Exception (Id : E) return B is
2139 return Flag133 (Id);
2140 end Is_VMS_Exception;
2142 function Is_Volatile (Id : E) return B is
2144 pragma Assert (Nkind (Id) in N_Entity);
2146 if Is_Type (Id) then
2147 return Flag16 (Base_Type (Id));
2153 function Itype_Printed (Id : E) return B is
2155 pragma Assert (Is_Itype (Id));
2156 return Flag202 (Id);
2159 function Kill_Elaboration_Checks (Id : E) return B is
2162 end Kill_Elaboration_Checks;
2164 function Kill_Range_Checks (Id : E) return B is
2167 end Kill_Range_Checks;
2169 function Kill_Tag_Checks (Id : E) return B is
2172 end Kill_Tag_Checks;
2174 function Known_To_Have_Preelab_Init (Id : E) return B is
2176 pragma Assert (Is_Type (Id));
2177 return Flag207 (Id);
2178 end Known_To_Have_Preelab_Init;
2180 function Last_Assignment (Id : E) return N is
2182 pragma Assert (Is_Assignable (Id));
2184 end Last_Assignment;
2186 function Last_Entity (Id : E) return E is
2191 function Limited_View (Id : E) return E is
2193 pragma Assert (Ekind (Id) = E_Package);
2197 function Lit_Indexes (Id : E) return E is
2199 pragma Assert (Is_Enumeration_Type (Id));
2203 function Lit_Strings (Id : E) return E is
2205 pragma Assert (Is_Enumeration_Type (Id));
2209 function Low_Bound_Tested (Id : E) return B is
2211 return Flag205 (Id);
2212 end Low_Bound_Tested;
2214 function Machine_Emax_Value (Id : E) return Uint is
2215 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
2218 case Float_Rep (Id) is
2221 when 1 .. 6 => return Uint_128;
2222 when 7 .. 15 => return 2**10;
2223 when 16 .. 18 => return 2**14;
2224 when others => return No_Uint;
2229 when 1 .. 9 => return 2**7 - 1;
2230 when 10 .. 15 => return 2**10 - 1;
2231 when others => return No_Uint;
2235 return Uint_2 ** Uint_7 - Uint_1;
2237 end Machine_Emax_Value;
2239 function Machine_Emin_Value (Id : E) return Uint is
2241 case Float_Rep (Id) is
2242 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
2243 when VAX_Native => return -Machine_Emax_Value (Id);
2244 when AAMP => return -Machine_Emax_Value (Id);
2246 end Machine_Emin_Value;
2248 function Machine_Mantissa_Value (Id : E) return Uint is
2249 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
2252 case Float_Rep (Id) is
2255 when 1 .. 6 => return Uint_24;
2256 when 7 .. 15 => return UI_From_Int (53);
2257 when 16 .. 18 => return Uint_64;
2258 when others => return No_Uint;
2263 when 1 .. 6 => return Uint_24;
2264 when 7 .. 9 => return UI_From_Int (56);
2265 when 10 .. 15 => return UI_From_Int (53);
2266 when others => return No_Uint;
2271 when 1 .. 6 => return Uint_24;
2272 when 7 .. 9 => return UI_From_Int (40);
2273 when others => return No_Uint;
2276 end Machine_Mantissa_Value;
2278 function Machine_Radix_10 (Id : E) return B is
2280 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2282 end Machine_Radix_10;
2284 function Machine_Radix_Value (Id : E) return U is
2286 case Float_Rep (Id) is
2287 when IEEE_Binary | VAX_Native | AAMP =>
2290 end Machine_Radix_Value;
2292 function Master_Id (Id : E) return E is
2294 pragma Assert (Is_Access_Type (Id));
2298 function Materialize_Entity (Id : E) return B is
2300 return Flag168 (Id);
2301 end Materialize_Entity;
2303 function Mechanism (Id : E) return M is
2305 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2306 return UI_To_Int (Uint8 (Id));
2309 function Model_Emin_Value (Id : E) return Uint is
2311 return Machine_Emin_Value (Id);
2312 end Model_Emin_Value;
2314 function Model_Epsilon_Value (Id : E) return Ureal is
2315 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
2317 return Radix ** (1 - Model_Mantissa_Value (Id));
2318 end Model_Epsilon_Value;
2320 function Model_Mantissa_Value (Id : E) return Uint is
2322 return Machine_Mantissa_Value (Id);
2323 end Model_Mantissa_Value;
2325 function Model_Small_Value (Id : E) return Ureal is
2326 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
2328 return Radix ** (Model_Emin_Value (Id) - 1);
2329 end Model_Small_Value;
2331 function Modulus (Id : E) return Uint is
2333 pragma Assert (Is_Modular_Integer_Type (Id));
2334 return Uint17 (Base_Type (Id));
2337 function Must_Be_On_Byte_Boundary (Id : E) return B is
2339 pragma Assert (Is_Type (Id));
2340 return Flag183 (Id);
2341 end Must_Be_On_Byte_Boundary;
2343 function Must_Have_Preelab_Init (Id : E) return B is
2345 pragma Assert (Is_Type (Id));
2346 return Flag208 (Id);
2347 end Must_Have_Preelab_Init;
2349 function Needs_Debug_Info (Id : E) return B is
2351 return Flag147 (Id);
2352 end Needs_Debug_Info;
2354 function Needs_No_Actuals (Id : E) return B is
2357 (Is_Overloadable (Id)
2358 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2360 end Needs_No_Actuals;
2362 function Never_Set_In_Source (Id : E) return B is
2364 return Flag115 (Id);
2365 end Never_Set_In_Source;
2367 function Next_Inlined_Subprogram (Id : E) return E is
2370 end Next_Inlined_Subprogram;
2372 function No_Pool_Assigned (Id : E) return B is
2374 pragma Assert (Is_Access_Type (Id));
2375 return Flag131 (Root_Type (Id));
2376 end No_Pool_Assigned;
2378 function No_Return (Id : E) return B is
2380 return Flag113 (Id);
2383 function No_Strict_Aliasing (Id : E) return B is
2385 pragma Assert (Is_Access_Type (Id));
2386 return Flag136 (Base_Type (Id));
2387 end No_Strict_Aliasing;
2389 function Non_Binary_Modulus (Id : E) return B is
2391 pragma Assert (Is_Type (Id));
2392 return Flag58 (Base_Type (Id));
2393 end Non_Binary_Modulus;
2395 function Non_Limited_View (Id : E) return E is
2397 pragma Assert (Ekind (Id) in Incomplete_Kind);
2399 end Non_Limited_View;
2401 function Nonzero_Is_True (Id : E) return B is
2403 pragma Assert (Root_Type (Id) = Standard_Boolean);
2404 return Flag162 (Base_Type (Id));
2405 end Nonzero_Is_True;
2407 function Normalized_First_Bit (Id : E) return U is
2409 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2411 end Normalized_First_Bit;
2413 function Normalized_Position (Id : E) return U is
2415 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2417 end Normalized_Position;
2419 function Normalized_Position_Max (Id : E) return U is
2421 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2423 end Normalized_Position_Max;
2425 function OK_To_Reference (Id : E) return B is
2427 pragma Assert (Is_Type (Id));
2428 return Flag249 (Id);
2429 end OK_To_Reference;
2431 function OK_To_Rename (Id : E) return B is
2433 pragma Assert (Ekind (Id) = E_Variable);
2434 return Flag247 (Id);
2437 function OK_To_Reorder_Components (Id : E) return B is
2439 pragma Assert (Is_Record_Type (Id));
2440 return Flag239 (Base_Type (Id));
2441 end OK_To_Reorder_Components;
2443 function Optimize_Alignment_Space (Id : E) return B is
2446 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2447 return Flag241 (Id);
2448 end Optimize_Alignment_Space;
2450 function Optimize_Alignment_Time (Id : E) return B is
2453 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2454 return Flag242 (Id);
2455 end Optimize_Alignment_Time;
2457 function Original_Array_Type (Id : E) return E is
2459 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2461 end Original_Array_Type;
2463 function Original_Record_Component (Id : E) return E is
2465 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2467 end Original_Record_Component;
2469 function Overlays_Constant (Id : E) return B is
2471 return Flag243 (Id);
2472 end Overlays_Constant;
2474 function Overridden_Operation (Id : E) return E is
2477 end Overridden_Operation;
2479 function Package_Instantiation (Id : E) return N is
2481 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2483 end Package_Instantiation;
2485 function Packed_Array_Type (Id : E) return E is
2487 pragma Assert (Is_Array_Type (Id));
2489 end Packed_Array_Type;
2491 function Parent_Subtype (Id : E) return E is
2493 pragma Assert (Is_Record_Type (Id));
2494 return Node19 (Base_Type (Id));
2497 function Postcondition_Proc (Id : E) return E is
2499 pragma Assert (Ekind (Id) = E_Procedure);
2501 end Postcondition_Proc;
2503 function PPC_Wrapper (Id : E) return E is
2505 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2509 function Prival (Id : E) return E is
2511 pragma Assert (Is_Protected_Component (Id));
2515 function Prival_Link (Id : E) return E is
2517 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2521 function Private_Dependents (Id : E) return L is
2523 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2524 return Elist18 (Id);
2525 end Private_Dependents;
2527 function Private_View (Id : E) return N is
2529 pragma Assert (Is_Private_Type (Id));
2533 function Protected_Body_Subprogram (Id : E) return E is
2535 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2537 end Protected_Body_Subprogram;
2539 function Protected_Formal (Id : E) return E is
2541 pragma Assert (Is_Formal (Id));
2543 end Protected_Formal;
2545 function Protection_Object (Id : E) return E is
2548 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2550 end Protection_Object;
2552 function Reachable (Id : E) return B is
2557 function Referenced (Id : E) return B is
2559 return Flag156 (Id);
2562 function Referenced_As_LHS (Id : E) return B is
2565 end Referenced_As_LHS;
2567 function Referenced_As_Out_Parameter (Id : E) return B is
2569 return Flag227 (Id);
2570 end Referenced_As_Out_Parameter;
2572 function Register_Exception_Call (Id : E) return N is
2574 pragma Assert (Ekind (Id) = E_Exception);
2576 end Register_Exception_Call;
2578 function Related_Array_Object (Id : E) return E is
2580 pragma Assert (Is_Array_Type (Id));
2582 end Related_Array_Object;
2584 function Related_Expression (Id : E) return N is
2586 pragma Assert (Ekind (Id) in Type_Kind
2587 or else Ekind_In (Id, E_Constant, E_Variable));
2589 end Related_Expression;
2591 function Related_Instance (Id : E) return E is
2593 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2595 end Related_Instance;
2597 function Related_Type (Id : E) return E is
2599 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2603 function Relative_Deadline_Variable (Id : E) return E is
2605 pragma Assert (Is_Task_Type (Id));
2606 return Node26 (Implementation_Base_Type (Id));
2607 end Relative_Deadline_Variable;
2609 function Renamed_Entity (Id : E) return N is
2614 function Renamed_In_Spec (Id : E) return B is
2616 pragma Assert (Ekind (Id) = E_Package);
2617 return Flag231 (Id);
2618 end Renamed_In_Spec;
2620 function Renamed_Object (Id : E) return N is
2625 function Renaming_Map (Id : E) return U is
2630 function Requires_Overriding (Id : E) return B is
2632 pragma Assert (Is_Overloadable (Id));
2633 return Flag213 (Id);
2634 end Requires_Overriding;
2636 function Return_Present (Id : E) return B is
2641 function Return_Applies_To (Id : E) return N is
2644 end Return_Applies_To;
2646 function Returns_By_Ref (Id : E) return B is
2651 function Reverse_Bit_Order (Id : E) return B is
2653 pragma Assert (Is_Record_Type (Id));
2654 return Flag164 (Base_Type (Id));
2655 end Reverse_Bit_Order;
2657 function RM_Size (Id : E) return U is
2659 pragma Assert (Is_Type (Id));
2663 function Safe_Emax_Value (Id : E) return Uint is
2665 return Machine_Emax_Value (Id);
2666 end Safe_Emax_Value;
2668 function Safe_First_Value (Id : E) return Ureal is
2670 return -Safe_Last_Value (Id);
2671 end Safe_First_Value;
2673 function Safe_Last_Value (Id : E) return Ureal is
2674 Radix : constant Uint := Machine_Radix_Value (Id);
2675 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
2676 Emax : constant Uint := Safe_Emax_Value (Id);
2677 Significand : constant Uint := Radix ** Mantissa - 1;
2678 Exponent : constant Uint := Emax - Mantissa;
2683 (Num => Significand * 2 ** (Exponent mod 4),
2684 Den => -Exponent / 4,
2689 (Num => Significand,
2693 end Safe_Last_Value;
2695 function Scalar_Range (Id : E) return N is
2700 function Scale_Value (Id : E) return U is
2705 function Scope_Depth_Value (Id : E) return U is
2708 end Scope_Depth_Value;
2710 function Sec_Stack_Needed_For_Return (Id : E) return B is
2712 return Flag167 (Id);
2713 end Sec_Stack_Needed_For_Return;
2715 function Shadow_Entities (Id : E) return S is
2717 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2719 end Shadow_Entities;
2721 function Shared_Var_Procs_Instance (Id : E) return E is
2723 pragma Assert (Ekind (Id) = E_Variable);
2725 end Shared_Var_Procs_Instance;
2727 function Size_Check_Code (Id : E) return N is
2729 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2731 end Size_Check_Code;
2733 function Size_Depends_On_Discriminant (Id : E) return B is
2735 return Flag177 (Id);
2736 end Size_Depends_On_Discriminant;
2738 function Size_Known_At_Compile_Time (Id : E) return B is
2741 end Size_Known_At_Compile_Time;
2743 function Small_Value (Id : E) return R is
2745 pragma Assert (Is_Fixed_Point_Type (Id));
2746 return Ureal21 (Id);
2749 function Spec_Entity (Id : E) return E is
2751 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2755 function Spec_PPC_List (Id : E) return N is
2758 (Ekind_In (Id, E_Entry, E_Entry_Family)
2759 or else Is_Subprogram (Id)
2760 or else Is_Generic_Subprogram (Id));
2764 function Storage_Size_Variable (Id : E) return E is
2766 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2767 return Node15 (Implementation_Base_Type (Id));
2768 end Storage_Size_Variable;
2770 function Static_Elaboration_Desired (Id : E) return B is
2772 pragma Assert (Ekind (Id) = E_Package);
2774 end Static_Elaboration_Desired;
2776 function Static_Initialization (Id : E) return N is
2779 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2781 end Static_Initialization;
2783 function Stored_Constraint (Id : E) return L is
2786 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2787 return Elist23 (Id);
2788 end Stored_Constraint;
2790 function Strict_Alignment (Id : E) return B is
2792 return Flag145 (Implementation_Base_Type (Id));
2793 end Strict_Alignment;
2795 function String_Literal_Length (Id : E) return U is
2798 end String_Literal_Length;
2800 function String_Literal_Low_Bound (Id : E) return N is
2803 end String_Literal_Low_Bound;
2805 function Subprograms_For_Type (Id : E) return E is
2807 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2809 end Subprograms_For_Type;
2811 function Suppress_Elaboration_Warnings (Id : E) return B is
2813 return Flag148 (Id);
2814 end Suppress_Elaboration_Warnings;
2816 function Suppress_Init_Proc (Id : E) return B is
2818 return Flag105 (Base_Type (Id));
2819 end Suppress_Init_Proc;
2821 function Suppress_Style_Checks (Id : E) return B is
2823 return Flag165 (Id);
2824 end Suppress_Style_Checks;
2826 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2828 return Flag217 (Id);
2829 end Suppress_Value_Tracking_On_Call;
2831 function Task_Body_Procedure (Id : E) return N is
2833 pragma Assert (Ekind (Id) in Task_Kind);
2835 end Task_Body_Procedure;
2837 function Treat_As_Volatile (Id : E) return B is
2840 end Treat_As_Volatile;
2842 function Underlying_Full_View (Id : E) return E is
2844 pragma Assert (Ekind (Id) in Private_Kind);
2846 end Underlying_Full_View;
2848 function Underlying_Record_View (Id : E) return E is
2851 end Underlying_Record_View;
2853 function Universal_Aliasing (Id : E) return B is
2855 pragma Assert (Is_Type (Id));
2856 return Flag216 (Base_Type (Id));
2857 end Universal_Aliasing;
2859 function Unset_Reference (Id : E) return N is
2862 end Unset_Reference;
2864 function Used_As_Generic_Actual (Id : E) return B is
2866 return Flag222 (Id);
2867 end Used_As_Generic_Actual;
2869 function Uses_Sec_Stack (Id : E) return B is
2874 function Vax_Float (Id : E) return B is
2876 return Flag151 (Base_Type (Id));
2879 function Warnings_Off (Id : E) return B is
2884 function Warnings_Off_Used (Id : E) return B is
2886 return Flag236 (Id);
2887 end Warnings_Off_Used;
2889 function Warnings_Off_Used_Unmodified (Id : E) return B is
2891 return Flag237 (Id);
2892 end Warnings_Off_Used_Unmodified;
2894 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2896 return Flag238 (Id);
2897 end Warnings_Off_Used_Unreferenced;
2899 function Wrapped_Entity (Id : E) return E is
2901 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2902 and then Is_Primitive_Wrapper (Id));
2906 function Was_Hidden (Id : E) return B is
2908 return Flag196 (Id);
2911 ------------------------------
2912 -- Classification Functions --
2913 ------------------------------
2915 function Is_Access_Type (Id : E) return B is
2917 return Ekind (Id) in Access_Kind;
2920 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2922 return Ekind (Id) in Access_Protected_Kind;
2923 end Is_Access_Protected_Subprogram_Type;
2925 function Is_Access_Subprogram_Type (Id : E) return B is
2927 return Ekind (Id) in Access_Subprogram_Kind;
2928 end Is_Access_Subprogram_Type;
2930 function Is_Aggregate_Type (Id : E) return B is
2932 return Ekind (Id) in Aggregate_Kind;
2933 end Is_Aggregate_Type;
2935 function Is_Array_Type (Id : E) return B is
2937 return Ekind (Id) in Array_Kind;
2940 function Is_Assignable (Id : E) return B is
2942 return Ekind (Id) in Assignable_Kind;
2945 function Is_Class_Wide_Type (Id : E) return B is
2947 return Ekind (Id) in Class_Wide_Kind;
2948 end Is_Class_Wide_Type;
2950 function Is_Composite_Type (Id : E) return B is
2952 return Ekind (Id) in Composite_Kind;
2953 end Is_Composite_Type;
2955 function Is_Concurrent_Body (Id : E) return B is
2957 return Ekind (Id) in
2958 Concurrent_Body_Kind;
2959 end Is_Concurrent_Body;
2961 function Is_Concurrent_Record_Type (Id : E) return B is
2964 end Is_Concurrent_Record_Type;
2966 function Is_Concurrent_Type (Id : E) return B is
2968 return Ekind (Id) in Concurrent_Kind;
2969 end Is_Concurrent_Type;
2971 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2973 return Ekind (Id) in
2974 Decimal_Fixed_Point_Kind;
2975 end Is_Decimal_Fixed_Point_Type;
2977 function Is_Digits_Type (Id : E) return B is
2979 return Ekind (Id) in Digits_Kind;
2982 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2984 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2985 end Is_Discrete_Or_Fixed_Point_Type;
2987 function Is_Discrete_Type (Id : E) return B is
2989 return Ekind (Id) in Discrete_Kind;
2990 end Is_Discrete_Type;
2992 function Is_Elementary_Type (Id : E) return B is
2994 return Ekind (Id) in Elementary_Kind;
2995 end Is_Elementary_Type;
2997 function Is_Entry (Id : E) return B is
2999 return Ekind (Id) in Entry_Kind;
3002 function Is_Enumeration_Type (Id : E) return B is
3004 return Ekind (Id) in
3006 end Is_Enumeration_Type;
3008 function Is_Fixed_Point_Type (Id : E) return B is
3010 return Ekind (Id) in
3012 end Is_Fixed_Point_Type;
3014 function Is_Floating_Point_Type (Id : E) return B is
3016 return Ekind (Id) in Float_Kind;
3017 end Is_Floating_Point_Type;
3019 function Is_Formal (Id : E) return B is
3021 return Ekind (Id) in Formal_Kind;
3024 function Is_Formal_Object (Id : E) return B is
3026 return Ekind (Id) in Formal_Object_Kind;
3027 end Is_Formal_Object;
3029 function Is_Generic_Subprogram (Id : E) return B is
3031 return Ekind (Id) in Generic_Subprogram_Kind;
3032 end Is_Generic_Subprogram;
3034 function Is_Generic_Unit (Id : E) return B is
3036 return Ekind (Id) in Generic_Unit_Kind;
3037 end Is_Generic_Unit;
3039 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3041 return Ekind (Id) in
3042 Incomplete_Or_Private_Kind;
3043 end Is_Incomplete_Or_Private_Type;
3045 function Is_Incomplete_Type (Id : E) return B is
3047 return Ekind (Id) in
3049 end Is_Incomplete_Type;
3051 function Is_Integer_Type (Id : E) return B is
3053 return Ekind (Id) in Integer_Kind;
3054 end Is_Integer_Type;
3056 function Is_Modular_Integer_Type (Id : E) return B is
3058 return Ekind (Id) in
3059 Modular_Integer_Kind;
3060 end Is_Modular_Integer_Type;
3062 function Is_Named_Number (Id : E) return B is
3064 return Ekind (Id) in Named_Kind;
3065 end Is_Named_Number;
3067 function Is_Numeric_Type (Id : E) return B is
3069 return Ekind (Id) in Numeric_Kind;
3070 end Is_Numeric_Type;
3072 function Is_Object (Id : E) return B is
3074 return Ekind (Id) in Object_Kind;
3077 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3079 return Ekind (Id) in
3080 Ordinary_Fixed_Point_Kind;
3081 end Is_Ordinary_Fixed_Point_Type;
3083 function Is_Overloadable (Id : E) return B is
3085 return Ekind (Id) in Overloadable_Kind;
3086 end Is_Overloadable;
3088 function Is_Private_Type (Id : E) return B is
3090 return Ekind (Id) in Private_Kind;
3091 end Is_Private_Type;
3093 function Is_Protected_Type (Id : E) return B is
3095 return Ekind (Id) in Protected_Kind;
3096 end Is_Protected_Type;
3098 function Is_Real_Type (Id : E) return B is
3100 return Ekind (Id) in Real_Kind;
3103 function Is_Record_Type (Id : E) return B is
3105 return Ekind (Id) in Record_Kind;
3108 function Is_Scalar_Type (Id : E) return B is
3110 return Ekind (Id) in Scalar_Kind;
3113 function Is_Signed_Integer_Type (Id : E) return B is
3115 return Ekind (Id) in Signed_Integer_Kind;
3116 end Is_Signed_Integer_Type;
3118 function Is_Subprogram (Id : E) return B is
3120 return Ekind (Id) in Subprogram_Kind;
3123 function Is_Task_Type (Id : E) return B is
3125 return Ekind (Id) in Task_Kind;
3128 function Is_Type (Id : E) return B is
3130 return Ekind (Id) in Type_Kind;
3133 ------------------------------
3134 -- Attribute Set Procedures --
3135 ------------------------------
3137 -- Note: in many of these set procedures an "obvious" assertion is missing.
3138 -- The reason for this is that in many cases, a field is set before the
3139 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3140 -- it is possible to add assertions that specifically include the E_Void
3141 -- possibility, but in some cases, we just omit the assertions.
3143 procedure Set_Accept_Address (Id : E; V : L) is
3145 Set_Elist21 (Id, V);
3146 end Set_Accept_Address;
3148 procedure Set_Access_Disp_Table (Id : E; V : L) is
3150 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3151 Set_Elist16 (Id, V);
3152 end Set_Access_Disp_Table;
3154 procedure Set_Associated_Final_Chain (Id : E; V : E) is
3156 pragma Assert (Is_Access_Type (Id));
3158 end Set_Associated_Final_Chain;
3160 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3163 end Set_Associated_Formal_Package;
3165 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3168 end Set_Associated_Node_For_Itype;
3170 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3172 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
3174 end Set_Associated_Storage_Pool;
3176 procedure Set_Actual_Subtype (Id : E; V : E) is
3179 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3180 or else Is_Formal (Id));
3182 end Set_Actual_Subtype;
3184 procedure Set_Address_Taken (Id : E; V : B := True) is
3186 Set_Flag104 (Id, V);
3187 end Set_Address_Taken;
3189 procedure Set_Alias (Id : E; V : E) is
3192 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3196 procedure Set_Alignment (Id : E; V : U) is
3198 pragma Assert (Is_Type (Id)
3199 or else Is_Formal (Id)
3200 or else Ekind_In (Id, E_Loop_Parameter,
3207 procedure Set_Barrier_Function (Id : E; V : N) is
3209 pragma Assert (Is_Entry (Id));
3211 end Set_Barrier_Function;
3213 procedure Set_Block_Node (Id : E; V : N) is
3215 pragma Assert (Ekind (Id) = E_Block);
3219 procedure Set_Body_Entity (Id : E; V : E) is
3221 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3223 end Set_Body_Entity;
3225 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3228 (Ekind (Id) = E_Package
3229 or else Is_Subprogram (Id)
3230 or else Is_Generic_Unit (Id));
3232 end Set_Body_Needed_For_SAL;
3234 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3236 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3237 Set_Flag125 (Id, V);
3238 end Set_C_Pass_By_Copy;
3240 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3243 end Set_Can_Never_Be_Null;
3245 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3248 end Set_Checks_May_Be_Suppressed;
3250 procedure Set_Class_Wide_Type (Id : E; V : E) is
3252 pragma Assert (Is_Type (Id));
3254 end Set_Class_Wide_Type;
3256 procedure Set_Cloned_Subtype (Id : E; V : E) is
3258 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3260 end Set_Cloned_Subtype;
3262 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3264 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3266 end Set_Component_Bit_Offset;
3268 procedure Set_Component_Clause (Id : E; V : N) is
3270 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3272 end Set_Component_Clause;
3274 procedure Set_Component_Size (Id : E; V : U) is
3276 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3278 end Set_Component_Size;
3280 procedure Set_Component_Type (Id : E; V : E) is
3282 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3284 end Set_Component_Type;
3286 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3289 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3291 end Set_Corresponding_Concurrent_Type;
3293 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3295 pragma Assert (Ekind (Id) = E_Discriminant);
3297 end Set_Corresponding_Discriminant;
3299 procedure Set_Corresponding_Equality (Id : E; V : E) is
3302 (Ekind (Id) = E_Function
3303 and then not Comes_From_Source (Id)
3304 and then Chars (Id) = Name_Op_Ne);
3306 end Set_Corresponding_Equality;
3308 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3310 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3312 end Set_Corresponding_Protected_Entry;
3314 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3316 pragma Assert (Is_Concurrent_Type (Id));
3318 end Set_Corresponding_Record_Type;
3320 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3323 end Set_Corresponding_Remote_Type;
3325 procedure Set_Current_Use_Clause (Id : E; V : E) is
3327 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3329 end Set_Current_Use_Clause;
3331 procedure Set_Current_Value (Id : E; V : N) is
3333 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3335 end Set_Current_Value;
3337 procedure Set_CR_Discriminant (Id : E; V : E) is
3340 end Set_CR_Discriminant;
3342 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3344 Set_Flag166 (Id, V);
3345 end Set_Debug_Info_Off;
3347 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3350 end Set_Debug_Renaming_Link;
3352 procedure Set_Default_Expr_Function (Id : E; V : E) is
3354 pragma Assert (Is_Formal (Id));
3356 end Set_Default_Expr_Function;
3358 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3360 Set_Flag108 (Id, V);
3361 end Set_Default_Expressions_Processed;
3363 procedure Set_Default_Value (Id : E; V : N) is
3365 pragma Assert (Is_Formal (Id));
3367 end Set_Default_Value;
3369 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3373 or else Is_Task_Type (Id)
3374 or else Ekind (Id) = E_Block);
3375 Set_Flag114 (Id, V);
3376 end Set_Delay_Cleanups;
3378 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3381 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3383 end Set_Delay_Subprogram_Descriptors;
3385 procedure Set_Delta_Value (Id : E; V : R) is
3387 pragma Assert (Is_Fixed_Point_Type (Id));
3388 Set_Ureal18 (Id, V);
3389 end Set_Delta_Value;
3391 procedure Set_Dependent_Instances (Id : E; V : L) is
3393 pragma Assert (Is_Generic_Instance (Id));
3395 end Set_Dependent_Instances;
3397 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3399 pragma Assert (Nkind (Id) in N_Entity);
3401 end Set_Depends_On_Private;
3403 procedure Set_Digits_Value (Id : E; V : U) is
3406 (Is_Floating_Point_Type (Id)
3407 or else Is_Decimal_Fixed_Point_Type (Id));
3409 end Set_Digits_Value;
3411 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3414 end Set_Directly_Designated_Type;
3416 procedure Set_Discard_Names (Id : E; V : B := True) is
3419 end Set_Discard_Names;
3421 procedure Set_Discriminal (Id : E; V : E) is
3423 pragma Assert (Ekind (Id) = E_Discriminant);
3425 end Set_Discriminal;
3427 procedure Set_Discriminal_Link (Id : E; V : E) is
3430 end Set_Discriminal_Link;
3432 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3434 pragma Assert (Ekind (Id) = E_Component);
3436 end Set_Discriminant_Checking_Func;
3438 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3440 pragma Assert (Nkind (Id) in N_Entity);
3441 Set_Elist21 (Id, V);
3442 end Set_Discriminant_Constraint;
3444 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3447 end Set_Discriminant_Default_Value;
3449 procedure Set_Discriminant_Number (Id : E; V : U) is
3452 end Set_Discriminant_Number;
3454 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3456 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3457 Set_Elist26 (Id, V);
3458 end Set_Dispatch_Table_Wrappers;
3460 procedure Set_DT_Entry_Count (Id : E; V : U) is
3462 pragma Assert (Ekind (Id) = E_Component);
3464 end Set_DT_Entry_Count;
3466 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3468 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3470 end Set_DT_Offset_To_Top_Func;
3472 procedure Set_DT_Position (Id : E; V : U) is
3474 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3476 end Set_DT_Position;
3478 procedure Set_DTC_Entity (Id : E; V : E) is
3480 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3484 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3486 pragma Assert (Ekind (Id) = E_Package);
3487 Set_Flag210 (Id, V);
3488 end Set_Elaborate_Body_Desirable;
3490 procedure Set_Elaboration_Entity (Id : E; V : E) is
3495 Ekind (Id) = E_Package
3497 Is_Generic_Unit (Id));
3499 end Set_Elaboration_Entity;
3501 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3506 Ekind (Id) = E_Package
3508 Is_Generic_Unit (Id));
3509 Set_Flag174 (Id, V);
3510 end Set_Elaboration_Entity_Required;
3512 procedure Set_Enclosing_Scope (Id : E; V : E) is
3515 end Set_Enclosing_Scope;
3517 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3519 pragma Assert (Is_Entry (Id));
3520 Set_Flag152 (Id, V);
3521 end Set_Entry_Accepted;
3523 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3526 end Set_Entry_Bodies_Array;
3528 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3531 end Set_Entry_Cancel_Parameter;
3533 procedure Set_Entry_Component (Id : E; V : E) is
3536 end Set_Entry_Component;
3538 procedure Set_Entry_Formal (Id : E; V : E) is
3541 end Set_Entry_Formal;
3543 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3545 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3547 end Set_Entry_Index_Constant;
3549 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3552 end Set_Entry_Parameters_Type;
3554 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3556 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3558 end Set_Enum_Pos_To_Rep;
3560 procedure Set_Enumeration_Pos (Id : E; V : U) is
3562 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3564 end Set_Enumeration_Pos;
3566 procedure Set_Enumeration_Rep (Id : E; V : U) is
3568 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3570 end Set_Enumeration_Rep;
3572 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3574 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3576 end Set_Enumeration_Rep_Expr;
3578 procedure Set_Equivalent_Type (Id : E; V : E) is
3581 (Ekind_In (Id, E_Class_Wide_Type,
3582 E_Class_Wide_Subtype,
3583 E_Access_Protected_Subprogram_Type,
3584 E_Anonymous_Access_Protected_Subprogram_Type,
3585 E_Access_Subprogram_Type,
3588 end Set_Equivalent_Type;
3590 procedure Set_Esize (Id : E; V : U) is
3595 procedure Set_Exception_Code (Id : E; V : U) is
3597 pragma Assert (Ekind (Id) = E_Exception);
3599 end Set_Exception_Code;
3601 procedure Set_Extra_Accessibility (Id : E; V : E) is
3603 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3605 end Set_Extra_Accessibility;
3607 procedure Set_Extra_Constrained (Id : E; V : E) is
3609 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3611 end Set_Extra_Constrained;
3613 procedure Set_Extra_Formal (Id : E; V : E) is
3616 end Set_Extra_Formal;
3618 procedure Set_Extra_Formals (Id : E; V : E) is
3621 (Is_Overloadable (Id)
3622 or else Ekind_In (Id, E_Entry_Family,
3624 E_Subprogram_Type));
3626 end Set_Extra_Formals;
3628 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3631 (Is_Access_Subprogram_Type (Id)
3632 and then Id = Base_Type (Id));
3633 Set_Flag229 (Id, V);
3634 end Set_Can_Use_Internal_Rep;
3636 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3639 end Set_Finalization_Chain_Entity;
3641 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3643 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3644 Set_Flag158 (Id, V);
3645 end Set_Finalize_Storage_Only;
3647 procedure Set_First_Entity (Id : E; V : E) is
3650 end Set_First_Entity;
3652 procedure Set_First_Exit_Statement (Id : E; V : N) is
3654 pragma Assert (Ekind (Id) = E_Loop);
3656 end Set_First_Exit_Statement;
3658 procedure Set_First_Index (Id : E; V : N) is
3660 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3662 end Set_First_Index;
3664 procedure Set_First_Literal (Id : E; V : E) is
3666 pragma Assert (Is_Enumeration_Type (Id));
3668 end Set_First_Literal;
3670 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3672 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3674 end Set_First_Optional_Parameter;
3676 procedure Set_First_Private_Entity (Id : E; V : E) is
3678 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3679 or else Ekind (Id) in Concurrent_Kind);
3681 end Set_First_Private_Entity;
3683 procedure Set_First_Rep_Item (Id : E; V : N) is
3686 end Set_First_Rep_Item;
3688 procedure Set_Freeze_Node (Id : E; V : N) is
3691 end Set_Freeze_Node;
3693 procedure Set_From_With_Type (Id : E; V : B := True) is
3697 or else Ekind (Id) = E_Package);
3698 Set_Flag159 (Id, V);
3699 end Set_From_With_Type;
3701 procedure Set_Full_View (Id : E; V : E) is
3703 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3707 procedure Set_Generic_Homonym (Id : E; V : E) is
3710 end Set_Generic_Homonym;
3712 procedure Set_Generic_Renamings (Id : E; V : L) is
3714 Set_Elist23 (Id, V);
3715 end Set_Generic_Renamings;
3717 procedure Set_Handler_Records (Id : E; V : S) is
3720 end Set_Handler_Records;
3722 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3724 pragma Assert (Id = Base_Type (Id));
3725 Set_Flag135 (Id, V);
3726 end Set_Has_Aliased_Components;
3728 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3731 end Set_Has_Alignment_Clause;
3733 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3736 end Set_Has_All_Calls_Remote;
3738 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3740 Set_Flag201 (Id, V);
3741 end Set_Has_Anon_Block_Suffix;
3743 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3745 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3747 end Set_Has_Atomic_Components;
3749 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3752 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3753 Set_Flag139 (Id, V);
3754 end Set_Has_Biased_Representation;
3756 procedure Set_Has_Completion (Id : E; V : B := True) is
3759 end Set_Has_Completion;
3761 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3763 pragma Assert (Is_Type (Id));
3765 end Set_Has_Completion_In_Body;
3767 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3769 pragma Assert (Ekind (Id) = E_Record_Type);
3770 Set_Flag140 (Id, V);
3771 end Set_Has_Complex_Representation;
3773 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3775 pragma Assert (Ekind (Id) = E_Array_Type);
3777 end Set_Has_Component_Size_Clause;
3779 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3781 pragma Assert (Is_Type (Id));
3782 Set_Flag187 (Id, V);
3783 end Set_Has_Constrained_Partial_View;
3785 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3787 Set_Flag181 (Id, V);
3788 end Set_Has_Contiguous_Rep;
3790 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3792 pragma Assert (Id = Base_Type (Id));
3794 end Set_Has_Controlled_Component;
3796 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3799 end Set_Has_Controlling_Result;
3801 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3803 Set_Flag119 (Id, V);
3804 end Set_Has_Convention_Pragma;
3806 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3808 pragma Assert (Nkind (Id) in N_Entity);
3809 Set_Flag200 (Id, V);
3810 end Set_Has_Delayed_Aspects;
3812 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3814 pragma Assert (Nkind (Id) in N_Entity);
3816 end Set_Has_Delayed_Freeze;
3818 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3820 pragma Assert (Nkind (Id) in N_Entity);
3822 end Set_Has_Discriminants;
3824 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3826 pragma Assert (Ekind (Id) = E_Record_Type
3827 and then Is_Tagged_Type (Id));
3828 Set_Flag220 (Id, V);
3829 end Set_Has_Dispatch_Table;
3831 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3833 pragma Assert (Is_Enumeration_Type (Id));
3835 end Set_Has_Enumeration_Rep_Clause;
3837 procedure Set_Has_Exit (Id : E; V : B := True) is
3842 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3844 pragma Assert (Is_Tagged_Type (Id));
3845 Set_Flag110 (Id, V);
3846 end Set_Has_External_Tag_Rep_Clause;
3848 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3850 Set_Flag175 (Id, V);
3851 end Set_Has_Forward_Instantiation;
3853 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3855 Set_Flag173 (Id, V);
3856 end Set_Has_Fully_Qualified_Name;
3858 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3861 end Set_Has_Gigi_Rep_Item;
3863 procedure Set_Has_Homonym (Id : E; V : B := True) is
3866 end Set_Has_Homonym;
3868 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3870 pragma Assert (Is_Type (Id));
3871 Set_Flag248 (Id, V);
3872 end Set_Has_Inheritable_Invariants;
3874 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3876 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3877 Set_Flag219 (Id, V);
3878 end Set_Has_Initial_Value;
3880 procedure Set_Has_Invariants (Id : E; V : B := True) is
3882 pragma Assert (Is_Type (Id)
3883 or else Ekind (Id) = E_Procedure
3884 or else Ekind (Id) = E_Void);
3885 Set_Flag232 (Id, V);
3886 end Set_Has_Invariants;
3888 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3890 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3892 end Set_Has_Machine_Radix_Clause;
3894 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3897 end Set_Has_Master_Entity;
3899 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3901 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3902 Set_Flag142 (Id, V);
3903 end Set_Has_Missing_Return;
3905 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3907 Set_Flag101 (Id, V);
3908 end Set_Has_Nested_Block_With_Handler;
3910 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3912 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3913 Set_Flag215 (Id, V);
3914 end Set_Has_Up_Level_Access;
3916 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3918 pragma Assert (Id = Base_Type (Id));
3920 end Set_Has_Non_Standard_Rep;
3922 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3924 pragma Assert (Is_Type (Id));
3925 Set_Flag172 (Id, V);
3926 end Set_Has_Object_Size_Clause;
3928 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3930 Set_Flag154 (Id, V);
3931 end Set_Has_Per_Object_Constraint;
3933 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3935 Set_Flag188 (Id, V);
3936 end Set_Has_Persistent_BSS;
3938 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3940 pragma Assert (Is_Subprogram (Id));
3941 Set_Flag240 (Id, V);
3942 end Set_Has_Postconditions;
3944 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3946 pragma Assert (Is_Access_Type (Id));
3947 Set_Flag27 (Base_Type (Id), V);
3948 end Set_Has_Pragma_Controlled;
3950 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3952 Set_Flag150 (Id, V);
3953 end Set_Has_Pragma_Elaborate_Body;
3955 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3957 Set_Flag157 (Id, V);
3958 end Set_Has_Pragma_Inline;
3960 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3962 Set_Flag230 (Id, V);
3963 end Set_Has_Pragma_Inline_Always;
3965 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3967 pragma Assert (Is_Enumeration_Type (Id));
3968 pragma Assert (Id = Base_Type (Id));
3969 Set_Flag198 (Id, V);
3970 end Set_Has_Pragma_Ordered;
3972 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3974 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3975 pragma Assert (Id = Base_Type (Id));
3976 Set_Flag121 (Id, V);
3977 end Set_Has_Pragma_Pack;
3979 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3981 Set_Flag221 (Id, V);
3982 end Set_Has_Pragma_Preelab_Init;
3984 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3986 Set_Flag203 (Id, V);
3987 end Set_Has_Pragma_Pure;
3989 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3991 Set_Flag179 (Id, V);
3992 end Set_Has_Pragma_Pure_Function;
3994 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3996 Set_Flag169 (Id, V);
3997 end Set_Has_Pragma_Thread_Local_Storage;
3999 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4001 Set_Flag233 (Id, V);
4002 end Set_Has_Pragma_Unmodified;
4004 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4006 Set_Flag180 (Id, V);
4007 end Set_Has_Pragma_Unreferenced;
4009 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4011 pragma Assert (Is_Type (Id));
4012 Set_Flag212 (Id, V);
4013 end Set_Has_Pragma_Unreferenced_Objects;
4015 procedure Set_Has_Predicates (Id : E; V : B := True) is
4017 Set_Flag250 (Id, V);
4018 end Set_Has_Predicates;
4020 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4022 pragma Assert (Id = Base_Type (Id));
4023 Set_Flag120 (Id, V);
4024 end Set_Has_Primitive_Operations;
4026 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4028 Set_Flag155 (Id, V);
4029 end Set_Has_Private_Declaration;
4031 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4033 Set_Flag161 (Id, V);
4034 end Set_Has_Qualified_Name;
4036 procedure Set_Has_RACW (Id : E; V : B := True) is
4038 pragma Assert (Ekind (Id) = E_Package);
4039 Set_Flag214 (Id, V);
4042 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4044 pragma Assert (Id = Base_Type (Id));
4046 end Set_Has_Record_Rep_Clause;
4048 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4050 pragma Assert (Is_Subprogram (Id));
4051 Set_Flag143 (Id, V);
4052 end Set_Has_Recursive_Call;
4054 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4057 end Set_Has_Size_Clause;
4059 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4062 end Set_Has_Small_Clause;
4064 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4066 pragma Assert (Id = Base_Type (Id));
4067 Set_Flag100 (Id, V);
4068 end Set_Has_Specified_Layout;
4070 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4072 pragma Assert (Is_Type (Id));
4073 Set_Flag190 (Id, V);
4074 end Set_Has_Specified_Stream_Input;
4076 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4078 pragma Assert (Is_Type (Id));
4079 Set_Flag191 (Id, V);
4080 end Set_Has_Specified_Stream_Output;
4082 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4084 pragma Assert (Is_Type (Id));
4085 Set_Flag192 (Id, V);
4086 end Set_Has_Specified_Stream_Read;
4088 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4090 pragma Assert (Is_Type (Id));
4091 Set_Flag193 (Id, V);
4092 end Set_Has_Specified_Stream_Write;
4094 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4096 Set_Flag211 (Id, V);
4097 end Set_Has_Static_Discriminants;
4099 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4101 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4102 pragma Assert (Id = Base_Type (Id));
4104 end Set_Has_Storage_Size_Clause;
4106 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4108 pragma Assert (Is_Elementary_Type (Id));
4109 Set_Flag184 (Id, V);
4110 end Set_Has_Stream_Size_Clause;
4112 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4115 end Set_Has_Subprogram_Descriptor;
4117 procedure Set_Has_Task (Id : E; V : B := True) is
4119 pragma Assert (Id = Base_Type (Id));
4123 procedure Set_Has_Thunks (Id : E; V : B := True) is
4125 pragma Assert (Is_Tag (Id));
4126 Set_Flag228 (Id, V);
4129 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4131 pragma Assert (Id = Base_Type (Id));
4132 Set_Flag123 (Id, V);
4133 end Set_Has_Unchecked_Union;
4135 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4137 pragma Assert (Is_Type (Id));
4139 end Set_Has_Unknown_Discriminants;
4141 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4143 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
4145 end Set_Has_Volatile_Components;
4147 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4149 Set_Flag182 (Id, V);
4150 end Set_Has_Xref_Entry;
4152 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4154 pragma Assert (Ekind (Id) = E_Variable);
4156 end Set_Hiding_Loop_Variable;
4158 procedure Set_Homonym (Id : E; V : E) is
4160 pragma Assert (Id /= V);
4164 procedure Set_Interface_Alias (Id : E; V : E) is
4168 and then Is_Hidden (Id)
4169 and then (Ekind_In (Id, E_Procedure, E_Function)));
4171 end Set_Interface_Alias;
4173 procedure Set_Interfaces (Id : E; V : L) is
4175 pragma Assert (Is_Record_Type (Id));
4176 Set_Elist25 (Id, V);
4179 procedure Set_In_Package_Body (Id : E; V : B := True) is
4182 end Set_In_Package_Body;
4184 procedure Set_In_Private_Part (Id : E; V : B := True) is
4187 end Set_In_Private_Part;
4189 procedure Set_In_Use (Id : E; V : B := True) is
4191 pragma Assert (Nkind (Id) in N_Entity);
4195 procedure Set_Inner_Instances (Id : E; V : L) is
4197 Set_Elist23 (Id, V);
4198 end Set_Inner_Instances;
4200 procedure Set_Interface_Name (Id : E; V : N) is
4203 end Set_Interface_Name;
4205 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4207 pragma Assert (Is_Overloadable (Id));
4209 end Set_Is_Abstract_Subprogram;
4211 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4213 pragma Assert (Is_Type (Id));
4214 Set_Flag146 (Id, V);
4215 end Set_Is_Abstract_Type;
4217 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4219 pragma Assert (Is_Access_Type (Id));
4220 Set_Flag194 (Id, V);
4221 end Set_Is_Local_Anonymous_Access;
4223 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4225 pragma Assert (Is_Access_Type (Id));
4227 end Set_Is_Access_Constant;
4229 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4231 Set_Flag185 (Id, V);
4232 end Set_Is_Ada_2005_Only;
4234 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4236 Set_Flag199 (Id, V);
4237 end Set_Is_Ada_2012_Only;
4239 procedure Set_Is_Aliased (Id : E; V : B := True) is
4241 pragma Assert (Nkind (Id) in N_Entity);
4245 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4247 pragma Assert (Is_Entry (Id));
4248 Set_Flag132 (Id, V);
4249 end Set_Is_AST_Entry;
4251 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4254 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4256 end Set_Is_Asynchronous;
4258 procedure Set_Is_Atomic (Id : E; V : B := True) is
4263 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4265 pragma Assert ((not V)
4266 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4268 Set_Flag122 (Id, V);
4269 end Set_Is_Bit_Packed_Array;
4271 procedure Set_Is_Called (Id : E; V : B := True) is
4273 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4274 Set_Flag102 (Id, V);
4277 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4280 end Set_Is_Character_Type;
4282 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4285 end Set_Is_Child_Unit;
4287 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4290 end Set_Is_Class_Wide_Equivalent_Type;
4292 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4294 Set_Flag149 (Id, V);
4295 end Set_Is_Compilation_Unit;
4297 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4299 pragma Assert (Ekind (Id) = E_Discriminant);
4300 Set_Flag103 (Id, V);
4301 end Set_Is_Completely_Hidden;
4303 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4306 end Set_Is_Concurrent_Record_Type;
4308 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4311 end Set_Is_Constr_Subt_For_U_Nominal;
4313 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4315 Set_Flag141 (Id, V);
4316 end Set_Is_Constr_Subt_For_UN_Aliased;
4318 procedure Set_Is_Constrained (Id : E; V : B := True) is
4320 pragma Assert (Nkind (Id) in N_Entity);
4322 end Set_Is_Constrained;
4324 procedure Set_Is_Constructor (Id : E; V : B := True) is
4327 end Set_Is_Constructor;
4329 procedure Set_Is_Controlled (Id : E; V : B := True) is
4331 pragma Assert (Id = Base_Type (Id));
4333 end Set_Is_Controlled;
4335 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4337 pragma Assert (Is_Formal (Id));
4339 end Set_Is_Controlling_Formal;
4341 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4344 end Set_Is_CPP_Class;
4346 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4348 pragma Assert (Is_Type (Id));
4349 Set_Flag223 (Id, V);
4350 end Set_Is_Descendent_Of_Address;
4352 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4354 Set_Flag176 (Id, V);
4355 end Set_Is_Discrim_SO_Function;
4357 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4359 Set_Flag234 (Id, V);
4360 end Set_Is_Dispatch_Table_Entity;
4362 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4367 Is_Overloadable (Id)
4369 Ekind (Id) = E_Subprogram_Type);
4372 end Set_Is_Dispatching_Operation;
4374 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4376 Set_Flag124 (Id, V);
4377 end Set_Is_Eliminated;
4379 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4382 end Set_Is_Entry_Formal;
4384 procedure Set_Is_Exported (Id : E; V : B := True) is
4387 end Set_Is_Exported;
4389 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4392 end Set_Is_First_Subtype;
4394 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4396 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4397 Set_Flag118 (Id, V);
4398 end Set_Is_For_Access_Subtype;
4400 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4402 Set_Flag111 (Id, V);
4403 end Set_Is_Formal_Subprogram;
4405 procedure Set_Is_Frozen (Id : E; V : B := True) is
4407 pragma Assert (Nkind (Id) in N_Entity);
4411 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4413 pragma Assert (Is_Type (Id));
4415 end Set_Is_Generic_Actual_Type;
4417 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4419 Set_Flag130 (Id, V);
4420 end Set_Is_Generic_Instance;
4422 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4424 pragma Assert (Nkind (Id) in N_Entity);
4426 end Set_Is_Generic_Type;
4428 procedure Set_Is_Hidden (Id : E; V : B := True) is
4433 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4435 Set_Flag171 (Id, V);
4436 end Set_Is_Hidden_Open_Scope;
4438 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4440 pragma Assert (Nkind (Id) in N_Entity);
4442 end Set_Is_Immediately_Visible;
4444 procedure Set_Is_Imported (Id : E; V : B := True) is
4447 end Set_Is_Imported;
4449 procedure Set_Is_Inlined (Id : E; V : B := True) is
4454 procedure Set_Is_Interface (Id : E; V : B := True) is
4457 (Ekind_In (Id, E_Record_Type,
4459 E_Record_Type_With_Private,
4460 E_Record_Subtype_With_Private,
4462 E_Class_Wide_Subtype));
4463 Set_Flag186 (Id, V);
4464 end Set_Is_Interface;
4466 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4468 Set_Flag126 (Id, V);
4469 end Set_Is_Instantiated;
4471 procedure Set_Is_Internal (Id : E; V : B := True) is
4473 pragma Assert (Nkind (Id) in N_Entity);
4475 end Set_Is_Internal;
4477 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4479 pragma Assert (Nkind (Id) in N_Entity);
4481 end Set_Is_Interrupt_Handler;
4483 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4486 end Set_Is_Intrinsic_Subprogram;
4488 procedure Set_Is_Itype (Id : E; V : B := True) is
4493 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4496 end Set_Is_Known_Non_Null;
4498 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4500 Set_Flag204 (Id, V);
4501 end Set_Is_Known_Null;
4503 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4505 Set_Flag170 (Id, V);
4506 end Set_Is_Known_Valid;
4508 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4510 pragma Assert (Is_Type (Id));
4511 Set_Flag106 (Id, V);
4512 end Set_Is_Limited_Composite;
4514 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4516 pragma Assert (Is_Interface (Id));
4517 Set_Flag197 (Id, V);
4518 end Set_Is_Limited_Interface;
4520 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4523 end Set_Is_Limited_Record;
4525 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4527 pragma Assert (Is_Subprogram (Id));
4528 Set_Flag137 (Id, V);
4529 end Set_Is_Machine_Code_Subprogram;
4531 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4533 pragma Assert (Is_Type (Id));
4534 Set_Flag109 (Id, V);
4535 end Set_Is_Non_Static_Subtype;
4537 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4539 pragma Assert (Ekind (Id) = E_Procedure);
4540 Set_Flag178 (Id, V);
4541 end Set_Is_Null_Init_Proc;
4543 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4545 Set_Flag153 (Id, V);
4546 end Set_Is_Obsolescent;
4548 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4550 pragma Assert (Ekind (Id) = E_Out_Parameter);
4551 Set_Flag226 (Id, V);
4552 end Set_Is_Only_Out_Parameter;
4554 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4556 pragma Assert (Is_Formal (Id));
4557 Set_Flag134 (Id, V);
4558 end Set_Is_Optional_Parameter;
4560 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4562 pragma Assert (Is_Subprogram (Id));
4564 end Set_Is_Overriding_Operation;
4566 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4568 Set_Flag160 (Id, V);
4569 end Set_Is_Package_Body_Entity;
4571 procedure Set_Is_Packed (Id : E; V : B := True) is
4573 pragma Assert (Id = Base_Type (Id));
4577 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4579 Set_Flag138 (Id, V);
4580 end Set_Is_Packed_Array_Type;
4582 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4584 pragma Assert (Nkind (Id) in N_Entity);
4586 end Set_Is_Potentially_Use_Visible;
4588 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4591 end Set_Is_Preelaborated;
4593 procedure Set_Is_Primitive (Id : E; V : B := True) is
4596 (Is_Overloadable (Id)
4597 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4598 Set_Flag218 (Id, V);
4599 end Set_Is_Primitive;
4601 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4603 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4604 Set_Flag195 (Id, V);
4605 end Set_Is_Primitive_Wrapper;
4607 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4609 pragma Assert (Is_Type (Id));
4610 Set_Flag107 (Id, V);
4611 end Set_Is_Private_Composite;
4613 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4616 end Set_Is_Private_Descendant;
4618 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4620 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4621 Set_Flag245 (Id, V);
4622 end Set_Is_Private_Primitive;
4624 procedure Set_Is_Public (Id : E; V : B := True) is
4626 pragma Assert (Nkind (Id) in N_Entity);
4630 procedure Set_Is_Pure (Id : E; V : B := True) is
4635 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4637 pragma Assert (Is_Access_Type (Id));
4638 Set_Flag189 (Id, V);
4639 end Set_Is_Pure_Unit_Access_Type;
4641 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4643 pragma Assert (Is_Type (Id));
4644 Set_Flag244 (Id, V);
4645 end Set_Is_RACW_Stub_Type;
4647 procedure Set_Is_Raised (Id : E; V : B := True) is
4649 pragma Assert (Ekind (Id) = E_Exception);
4650 Set_Flag224 (Id, V);
4653 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4656 end Set_Is_Remote_Call_Interface;
4658 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4661 end Set_Is_Remote_Types;
4663 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4665 Set_Flag112 (Id, V);
4666 end Set_Is_Renaming_Of_Object;
4668 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4670 Set_Flag209 (Id, V);
4671 end Set_Is_Return_Object;
4673 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4676 end Set_Is_Shared_Passive;
4678 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4682 or else Ekind_In (Id, E_Exception,
4687 end Set_Is_Statically_Allocated;
4689 procedure Set_Is_Tag (Id : E; V : B := True) is
4691 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4695 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4698 end Set_Is_Tagged_Type;
4700 procedure Set_Is_Thunk (Id : E; V : B := True) is
4702 Set_Flag225 (Id, V);
4705 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4707 Set_Flag235 (Id, V);
4708 end Set_Is_Trivial_Subprogram;
4710 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4712 Set_Flag163 (Id, V);
4713 end Set_Is_True_Constant;
4715 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4717 pragma Assert (Id = Base_Type (Id));
4718 Set_Flag117 (Id, V);
4719 end Set_Is_Unchecked_Union;
4721 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4723 pragma Assert (Ekind (Id) = E_Record_Type);
4724 Set_Flag246 (Id, V);
4725 end Set_Is_Underlying_Record_View;
4727 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4729 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4730 Set_Flag144 (Id, V);
4731 end Set_Is_Unsigned_Type;
4733 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4735 pragma Assert (Ekind (Id) = E_Procedure);
4736 Set_Flag127 (Id, V);
4737 end Set_Is_Valued_Procedure;
4739 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4741 pragma Assert (Is_Child_Unit (Id));
4742 Set_Flag116 (Id, V);
4743 end Set_Is_Visible_Child_Unit;
4745 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4747 Set_Flag206 (Id, V);
4748 end Set_Is_Visible_Formal;
4750 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4752 pragma Assert (Ekind (Id) = E_Exception);
4753 Set_Flag133 (Id, V);
4754 end Set_Is_VMS_Exception;
4756 procedure Set_Is_Volatile (Id : E; V : B := True) is
4758 pragma Assert (Nkind (Id) in N_Entity);
4760 end Set_Is_Volatile;
4762 procedure Set_Itype_Printed (Id : E; V : B := True) is
4764 pragma Assert (Is_Itype (Id));
4765 Set_Flag202 (Id, V);
4766 end Set_Itype_Printed;
4768 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4771 end Set_Kill_Elaboration_Checks;
4773 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4776 end Set_Kill_Range_Checks;
4778 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4781 end Set_Kill_Tag_Checks;
4783 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4785 pragma Assert (Is_Type (Id));
4786 Set_Flag207 (Id, V);
4787 end Set_Known_To_Have_Preelab_Init;
4789 procedure Set_Last_Assignment (Id : E; V : N) is
4791 pragma Assert (Is_Assignable (Id));
4793 end Set_Last_Assignment;
4795 procedure Set_Last_Entity (Id : E; V : E) is
4798 end Set_Last_Entity;
4800 procedure Set_Limited_View (Id : E; V : E) is
4802 pragma Assert (Ekind (Id) = E_Package);
4804 end Set_Limited_View;
4806 procedure Set_Lit_Indexes (Id : E; V : E) is
4808 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4810 end Set_Lit_Indexes;
4812 procedure Set_Lit_Strings (Id : E; V : E) is
4814 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4816 end Set_Lit_Strings;
4818 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4820 pragma Assert (Is_Formal (Id));
4821 Set_Flag205 (Id, V);
4822 end Set_Low_Bound_Tested;
4824 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4826 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4828 end Set_Machine_Radix_10;
4830 procedure Set_Master_Id (Id : E; V : E) is
4832 pragma Assert (Is_Access_Type (Id));
4836 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4838 Set_Flag168 (Id, V);
4839 end Set_Materialize_Entity;
4841 procedure Set_Mechanism (Id : E; V : M) is
4843 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4844 Set_Uint8 (Id, UI_From_Int (V));
4847 procedure Set_Modulus (Id : E; V : U) is
4849 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4853 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4855 pragma Assert (Is_Type (Id));
4856 Set_Flag183 (Id, V);
4857 end Set_Must_Be_On_Byte_Boundary;
4859 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4861 pragma Assert (Is_Type (Id));
4862 Set_Flag208 (Id, V);
4863 end Set_Must_Have_Preelab_Init;
4865 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4867 Set_Flag147 (Id, V);
4868 end Set_Needs_Debug_Info;
4870 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4873 (Is_Overloadable (Id)
4874 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4876 end Set_Needs_No_Actuals;
4878 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4880 Set_Flag115 (Id, V);
4881 end Set_Never_Set_In_Source;
4883 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4886 end Set_Next_Inlined_Subprogram;
4888 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4890 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4891 Set_Flag131 (Id, V);
4892 end Set_No_Pool_Assigned;
4894 procedure Set_No_Return (Id : E; V : B := True) is
4897 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4898 Set_Flag113 (Id, V);
4901 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4903 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4904 Set_Flag136 (Id, V);
4905 end Set_No_Strict_Aliasing;
4907 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4909 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4911 end Set_Non_Binary_Modulus;
4913 procedure Set_Non_Limited_View (Id : E; V : E) is
4915 pragma Assert (Ekind (Id) in Incomplete_Kind);
4917 end Set_Non_Limited_View;
4919 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4922 (Root_Type (Id) = Standard_Boolean
4923 and then Ekind (Id) = E_Enumeration_Type);
4924 Set_Flag162 (Id, V);
4925 end Set_Nonzero_Is_True;
4927 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4929 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4931 end Set_Normalized_First_Bit;
4933 procedure Set_Normalized_Position (Id : E; V : U) is
4935 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4937 end Set_Normalized_Position;
4939 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4941 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4943 end Set_Normalized_Position_Max;
4945 procedure Set_OK_To_Reference (Id : E; V : B := True) is
4947 pragma Assert (Is_Type (Id));
4948 Set_Flag249 (Id, V);
4949 end Set_OK_To_Reference;
4951 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4953 pragma Assert (Ekind (Id) = E_Variable);
4954 Set_Flag247 (Id, V);
4955 end Set_OK_To_Rename;
4957 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4960 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4961 Set_Flag239 (Id, V);
4962 end Set_OK_To_Reorder_Components;
4964 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4967 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4968 Set_Flag241 (Id, V);
4969 end Set_Optimize_Alignment_Space;
4971 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4974 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4975 Set_Flag242 (Id, V);
4976 end Set_Optimize_Alignment_Time;
4978 procedure Set_Original_Array_Type (Id : E; V : E) is
4980 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4982 end Set_Original_Array_Type;
4984 procedure Set_Original_Record_Component (Id : E; V : E) is
4986 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4988 end Set_Original_Record_Component;
4990 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4992 Set_Flag243 (Id, V);
4993 end Set_Overlays_Constant;
4995 procedure Set_Overridden_Operation (Id : E; V : E) is
4998 end Set_Overridden_Operation;
5000 procedure Set_Package_Instantiation (Id : E; V : N) is
5002 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5004 end Set_Package_Instantiation;
5006 procedure Set_Packed_Array_Type (Id : E; V : E) is
5008 pragma Assert (Is_Array_Type (Id));
5010 end Set_Packed_Array_Type;
5012 procedure Set_Parent_Subtype (Id : E; V : E) is
5014 pragma Assert (Ekind (Id) = E_Record_Type);
5016 end Set_Parent_Subtype;
5018 procedure Set_Postcondition_Proc (Id : E; V : E) is
5020 pragma Assert (Ekind (Id) = E_Procedure);
5022 end Set_Postcondition_Proc;
5024 procedure Set_PPC_Wrapper (Id : E; V : E) is
5026 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5028 end Set_PPC_Wrapper;
5030 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5032 pragma Assert (Is_Tagged_Type (Id));
5033 Set_Elist10 (Id, V);
5034 end Set_Direct_Primitive_Operations;
5036 procedure Set_Prival (Id : E; V : E) is
5038 pragma Assert (Is_Protected_Component (Id));
5042 procedure Set_Prival_Link (Id : E; V : E) is
5044 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5046 end Set_Prival_Link;
5048 procedure Set_Private_Dependents (Id : E; V : L) is
5050 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5051 Set_Elist18 (Id, V);
5052 end Set_Private_Dependents;
5054 procedure Set_Private_View (Id : E; V : N) is
5056 pragma Assert (Is_Private_Type (Id));
5058 end Set_Private_View;
5060 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5062 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5064 end Set_Protected_Body_Subprogram;
5066 procedure Set_Protected_Formal (Id : E; V : E) is
5068 pragma Assert (Is_Formal (Id));
5070 end Set_Protected_Formal;
5072 procedure Set_Protection_Object (Id : E; V : E) is
5074 pragma Assert (Ekind_In (Id, E_Entry,
5079 end Set_Protection_Object;
5081 procedure Set_Reachable (Id : E; V : B := True) is
5086 procedure Set_Referenced (Id : E; V : B := True) is
5088 Set_Flag156 (Id, V);
5091 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5094 end Set_Referenced_As_LHS;
5096 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5098 Set_Flag227 (Id, V);
5099 end Set_Referenced_As_Out_Parameter;
5101 procedure Set_Register_Exception_Call (Id : E; V : N) is
5103 pragma Assert (Ekind (Id) = E_Exception);
5105 end Set_Register_Exception_Call;
5107 procedure Set_Related_Array_Object (Id : E; V : E) is
5109 pragma Assert (Is_Array_Type (Id));
5111 end Set_Related_Array_Object;
5113 procedure Set_Related_Expression (Id : E; V : N) is
5115 pragma Assert (Ekind (Id) in Type_Kind
5116 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5118 end Set_Related_Expression;
5120 procedure Set_Related_Instance (Id : E; V : E) is
5122 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5124 end Set_Related_Instance;
5126 procedure Set_Related_Type (Id : E; V : E) is
5128 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5130 end Set_Related_Type;
5132 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5134 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
5136 end Set_Relative_Deadline_Variable;
5138 procedure Set_Renamed_Entity (Id : E; V : N) is
5141 end Set_Renamed_Entity;
5143 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5145 pragma Assert (Ekind (Id) = E_Package);
5146 Set_Flag231 (Id, V);
5147 end Set_Renamed_In_Spec;
5149 procedure Set_Renamed_Object (Id : E; V : N) is
5152 end Set_Renamed_Object;
5154 procedure Set_Renaming_Map (Id : E; V : U) is
5157 end Set_Renaming_Map;
5159 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5161 pragma Assert (Is_Overloadable (Id));
5162 Set_Flag213 (Id, V);
5163 end Set_Requires_Overriding;
5165 procedure Set_Return_Present (Id : E; V : B := True) is
5168 end Set_Return_Present;
5170 procedure Set_Return_Applies_To (Id : E; V : N) is
5173 end Set_Return_Applies_To;
5175 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5178 end Set_Returns_By_Ref;
5180 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5183 (Is_Record_Type (Id) and then Id = Base_Type (Id));
5184 Set_Flag164 (Id, V);
5185 end Set_Reverse_Bit_Order;
5187 procedure Set_RM_Size (Id : E; V : U) is
5189 pragma Assert (Is_Type (Id));
5193 procedure Set_Scalar_Range (Id : E; V : N) is
5196 end Set_Scalar_Range;
5198 procedure Set_Scale_Value (Id : E; V : U) is
5201 end Set_Scale_Value;
5203 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5205 pragma Assert (not Is_Record_Type (Id));
5207 end Set_Scope_Depth_Value;
5209 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5211 Set_Flag167 (Id, V);
5212 end Set_Sec_Stack_Needed_For_Return;
5214 procedure Set_Shadow_Entities (Id : E; V : S) is
5216 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5218 end Set_Shadow_Entities;
5220 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5222 pragma Assert (Ekind (Id) = E_Variable);
5224 end Set_Shared_Var_Procs_Instance;
5226 procedure Set_Size_Check_Code (Id : E; V : N) is
5228 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5230 end Set_Size_Check_Code;
5232 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5234 Set_Flag177 (Id, V);
5235 end Set_Size_Depends_On_Discriminant;
5237 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5240 end Set_Size_Known_At_Compile_Time;
5242 procedure Set_Small_Value (Id : E; V : R) is
5244 pragma Assert (Is_Fixed_Point_Type (Id));
5245 Set_Ureal21 (Id, V);
5246 end Set_Small_Value;
5248 procedure Set_Spec_Entity (Id : E; V : E) is
5250 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5252 end Set_Spec_Entity;
5254 procedure Set_Spec_PPC_List (Id : E; V : N) is
5257 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5258 or else Is_Subprogram (Id)
5259 or else Is_Generic_Subprogram (Id));
5261 end Set_Spec_PPC_List;
5263 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5265 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5266 pragma Assert (Id = Base_Type (Id));
5268 end Set_Storage_Size_Variable;
5270 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5272 pragma Assert (Ekind (Id) = E_Package);
5274 end Set_Static_Elaboration_Desired;
5276 procedure Set_Static_Initialization (Id : E; V : N) is
5279 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5281 end Set_Static_Initialization;
5283 procedure Set_Stored_Constraint (Id : E; V : L) is
5285 pragma Assert (Nkind (Id) in N_Entity);
5286 Set_Elist23 (Id, V);
5287 end Set_Stored_Constraint;
5289 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5291 pragma Assert (Id = Base_Type (Id));
5292 Set_Flag145 (Id, V);
5293 end Set_Strict_Alignment;
5295 procedure Set_String_Literal_Length (Id : E; V : U) is
5297 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5299 end Set_String_Literal_Length;
5301 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5303 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5305 end Set_String_Literal_Low_Bound;
5307 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5309 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5311 end Set_Subprograms_For_Type;
5313 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5315 Set_Flag148 (Id, V);
5316 end Set_Suppress_Elaboration_Warnings;
5318 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5320 pragma Assert (Id = Base_Type (Id));
5321 Set_Flag105 (Id, V);
5322 end Set_Suppress_Init_Proc;
5324 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5326 Set_Flag165 (Id, V);
5327 end Set_Suppress_Style_Checks;
5329 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5331 Set_Flag217 (Id, V);
5332 end Set_Suppress_Value_Tracking_On_Call;
5334 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5336 pragma Assert (Ekind (Id) in Task_Kind);
5338 end Set_Task_Body_Procedure;
5340 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5343 end Set_Treat_As_Volatile;
5345 procedure Set_Underlying_Full_View (Id : E; V : E) is
5347 pragma Assert (Ekind (Id) in Private_Kind);
5349 end Set_Underlying_Full_View;
5351 procedure Set_Underlying_Record_View (Id : E; V : E) is
5353 pragma Assert (Ekind (Id) = E_Record_Type);
5355 end Set_Underlying_Record_View;
5357 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5359 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5360 Set_Flag216 (Id, V);
5361 end Set_Universal_Aliasing;
5363 procedure Set_Unset_Reference (Id : E; V : N) is
5366 end Set_Unset_Reference;
5368 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5371 end Set_Uses_Sec_Stack;
5373 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5375 Set_Flag222 (Id, V);
5376 end Set_Used_As_Generic_Actual;
5378 procedure Set_Vax_Float (Id : E; V : B := True) is
5380 pragma Assert (Id = Base_Type (Id));
5381 Set_Flag151 (Id, V);
5384 procedure Set_Warnings_Off (Id : E; V : B := True) is
5387 end Set_Warnings_Off;
5389 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5391 Set_Flag236 (Id, V);
5392 end Set_Warnings_Off_Used;
5394 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5396 Set_Flag237 (Id, V);
5397 end Set_Warnings_Off_Used_Unmodified;
5399 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5401 Set_Flag238 (Id, V);
5402 end Set_Warnings_Off_Used_Unreferenced;
5404 procedure Set_Was_Hidden (Id : E; V : B := True) is
5406 Set_Flag196 (Id, V);
5409 procedure Set_Wrapped_Entity (Id : E; V : E) is
5411 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5412 and then Is_Primitive_Wrapper (Id));
5414 end Set_Wrapped_Entity;
5416 -----------------------------------
5417 -- Field Initialization Routines --
5418 -----------------------------------
5420 procedure Init_Alignment (Id : E) is
5422 Set_Uint14 (Id, Uint_0);
5425 procedure Init_Alignment (Id : E; V : Int) is
5427 Set_Uint14 (Id, UI_From_Int (V));
5430 procedure Init_Component_Bit_Offset (Id : E) is
5432 Set_Uint11 (Id, No_Uint);
5433 end Init_Component_Bit_Offset;
5435 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5437 Set_Uint11 (Id, UI_From_Int (V));
5438 end Init_Component_Bit_Offset;
5440 procedure Init_Component_Size (Id : E) is
5442 Set_Uint22 (Id, Uint_0);
5443 end Init_Component_Size;
5445 procedure Init_Component_Size (Id : E; V : Int) is
5447 Set_Uint22 (Id, UI_From_Int (V));
5448 end Init_Component_Size;
5450 procedure Init_Digits_Value (Id : E) is
5452 Set_Uint17 (Id, Uint_0);
5453 end Init_Digits_Value;
5455 procedure Init_Digits_Value (Id : E; V : Int) is
5457 Set_Uint17 (Id, UI_From_Int (V));
5458 end Init_Digits_Value;
5460 procedure Init_Esize (Id : E) is
5462 Set_Uint12 (Id, Uint_0);
5465 procedure Init_Esize (Id : E; V : Int) is
5467 Set_Uint12 (Id, UI_From_Int (V));
5470 procedure Init_Normalized_First_Bit (Id : E) is
5472 Set_Uint8 (Id, No_Uint);
5473 end Init_Normalized_First_Bit;
5475 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5477 Set_Uint8 (Id, UI_From_Int (V));
5478 end Init_Normalized_First_Bit;
5480 procedure Init_Normalized_Position (Id : E) is
5482 Set_Uint14 (Id, No_Uint);
5483 end Init_Normalized_Position;
5485 procedure Init_Normalized_Position (Id : E; V : Int) is
5487 Set_Uint14 (Id, UI_From_Int (V));
5488 end Init_Normalized_Position;
5490 procedure Init_Normalized_Position_Max (Id : E) is
5492 Set_Uint10 (Id, No_Uint);
5493 end Init_Normalized_Position_Max;
5495 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5497 Set_Uint10 (Id, UI_From_Int (V));
5498 end Init_Normalized_Position_Max;
5500 procedure Init_RM_Size (Id : E) is
5502 Set_Uint13 (Id, Uint_0);
5505 procedure Init_RM_Size (Id : E; V : Int) is
5507 Set_Uint13 (Id, UI_From_Int (V));
5510 -----------------------------
5511 -- Init_Component_Location --
5512 -----------------------------
5514 procedure Init_Component_Location (Id : E) is
5516 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5517 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5518 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5519 Set_Uint12 (Id, Uint_0); -- Esize
5520 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5521 end Init_Component_Location;
5527 procedure Init_Size (Id : E; V : Int) is
5529 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5530 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5533 ---------------------
5534 -- Init_Size_Align --
5535 ---------------------
5537 procedure Init_Size_Align (Id : E) is
5539 Set_Uint12 (Id, Uint_0); -- Esize
5540 Set_Uint13 (Id, Uint_0); -- RM_Size
5541 Set_Uint14 (Id, Uint_0); -- Alignment
5542 end Init_Size_Align;
5544 ----------------------------------------------
5545 -- Type Representation Attribute Predicates --
5546 ----------------------------------------------
5548 function Known_Alignment (E : Entity_Id) return B is
5550 return Uint14 (E) /= Uint_0
5551 and then Uint14 (E) /= No_Uint;
5552 end Known_Alignment;
5554 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5556 return Uint11 (E) /= No_Uint;
5557 end Known_Component_Bit_Offset;
5559 function Known_Component_Size (E : Entity_Id) return B is
5561 return Uint22 (Base_Type (E)) /= Uint_0
5562 and then Uint22 (Base_Type (E)) /= No_Uint;
5563 end Known_Component_Size;
5565 function Known_Esize (E : Entity_Id) return B is
5567 return Uint12 (E) /= Uint_0
5568 and then Uint12 (E) /= No_Uint;
5571 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5573 return Uint8 (E) /= No_Uint;
5574 end Known_Normalized_First_Bit;
5576 function Known_Normalized_Position (E : Entity_Id) return B is
5578 return Uint14 (E) /= No_Uint;
5579 end Known_Normalized_Position;
5581 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5583 return Uint10 (E) /= No_Uint;
5584 end Known_Normalized_Position_Max;
5586 function Known_RM_Size (E : Entity_Id) return B is
5588 return Uint13 (E) /= No_Uint
5589 and then (Uint13 (E) /= Uint_0
5590 or else Is_Discrete_Type (E)
5591 or else Is_Fixed_Point_Type (E));
5594 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5596 return Uint11 (E) /= No_Uint
5597 and then Uint11 (E) >= Uint_0;
5598 end Known_Static_Component_Bit_Offset;
5600 function Known_Static_Component_Size (E : Entity_Id) return B is
5602 return Uint22 (Base_Type (E)) > Uint_0;
5603 end Known_Static_Component_Size;
5605 function Known_Static_Esize (E : Entity_Id) return B is
5607 return Uint12 (E) > Uint_0
5608 and then not Is_Generic_Type (E);
5609 end Known_Static_Esize;
5611 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5613 return Uint8 (E) /= No_Uint
5614 and then Uint8 (E) >= Uint_0;
5615 end Known_Static_Normalized_First_Bit;
5617 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5619 return Uint14 (E) /= No_Uint
5620 and then Uint14 (E) >= Uint_0;
5621 end Known_Static_Normalized_Position;
5623 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5625 return Uint10 (E) /= No_Uint
5626 and then Uint10 (E) >= Uint_0;
5627 end Known_Static_Normalized_Position_Max;
5629 function Known_Static_RM_Size (E : Entity_Id) return B is
5631 return (Uint13 (E) > Uint_0
5632 or else Is_Discrete_Type (E)
5633 or else Is_Fixed_Point_Type (E))
5634 and then not Is_Generic_Type (E);
5635 end Known_Static_RM_Size;
5637 function Unknown_Alignment (E : Entity_Id) return B is
5639 return Uint14 (E) = Uint_0
5640 or else Uint14 (E) = No_Uint;
5641 end Unknown_Alignment;
5643 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5645 return Uint11 (E) = No_Uint;
5646 end Unknown_Component_Bit_Offset;
5648 function Unknown_Component_Size (E : Entity_Id) return B is
5650 return Uint22 (Base_Type (E)) = Uint_0
5652 Uint22 (Base_Type (E)) = No_Uint;
5653 end Unknown_Component_Size;
5655 function Unknown_Esize (E : Entity_Id) return B is
5657 return Uint12 (E) = No_Uint
5659 Uint12 (E) = Uint_0;
5662 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5664 return Uint8 (E) = No_Uint;
5665 end Unknown_Normalized_First_Bit;
5667 function Unknown_Normalized_Position (E : Entity_Id) return B is
5669 return Uint14 (E) = No_Uint;
5670 end Unknown_Normalized_Position;
5672 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5674 return Uint10 (E) = No_Uint;
5675 end Unknown_Normalized_Position_Max;
5677 function Unknown_RM_Size (E : Entity_Id) return B is
5679 return (Uint13 (E) = Uint_0
5680 and then not Is_Discrete_Type (E)
5681 and then not Is_Fixed_Point_Type (E))
5682 or else Uint13 (E) = No_Uint;
5683 end Unknown_RM_Size;
5685 --------------------
5686 -- Address_Clause --
5687 --------------------
5689 function Address_Clause (Id : E) return N is
5691 return Rep_Clause (Id, Name_Address);
5698 function Aft_Value (Id : E) return U is
5700 Delta_Val : Ureal := Delta_Value (Id);
5702 while Delta_Val < Ureal_Tenth loop
5703 Delta_Val := Delta_Val * Ureal_10;
5704 Result := Result + 1;
5707 return UI_From_Int (Result);
5710 ----------------------
5711 -- Alignment_Clause --
5712 ----------------------
5714 function Alignment_Clause (Id : E) return N is
5716 return Rep_Clause (Id, Name_Alignment);
5717 end Alignment_Clause;
5723 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5725 if Last_Entity (V) = Empty then
5726 Set_First_Entity (Id => V, V => Id);
5728 Set_Next_Entity (Last_Entity (V), Id);
5731 Set_Next_Entity (Id, Empty);
5733 Set_Last_Entity (Id => V, V => Id);
5740 function Base_Type (Id : E) return E is
5743 when E_Enumeration_Subtype |
5745 E_Signed_Integer_Subtype |
5746 E_Modular_Integer_Subtype |
5747 E_Floating_Point_Subtype |
5748 E_Ordinary_Fixed_Point_Subtype |
5749 E_Decimal_Fixed_Point_Subtype |
5754 E_Record_Subtype_With_Private |
5755 E_Limited_Private_Subtype |
5757 E_Protected_Subtype |
5759 E_String_Literal_Subtype |
5760 E_Class_Wide_Subtype =>
5768 -------------------------
5769 -- Component_Alignment --
5770 -------------------------
5772 -- Component Alignment is encoded using two flags, Flag128/129 as
5773 -- follows. Note that both flags False = Align_Default, so that the
5774 -- default initialization of flags to False initializes component
5775 -- alignment to the default value as required.
5777 -- Flag128 Flag129 Value
5778 -- ------- ------- -----
5779 -- False False Calign_Default
5780 -- False True Calign_Component_Size
5781 -- True False Calign_Component_Size_4
5782 -- True True Calign_Storage_Unit
5784 function Component_Alignment (Id : E) return C is
5785 BT : constant Node_Id := Base_Type (Id);
5788 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5790 if Flag128 (BT) then
5791 if Flag129 (BT) then
5792 return Calign_Storage_Unit;
5794 return Calign_Component_Size_4;
5798 if Flag129 (BT) then
5799 return Calign_Component_Size;
5801 return Calign_Default;
5804 end Component_Alignment;
5806 ----------------------
5807 -- Declaration_Node --
5808 ----------------------
5810 function Declaration_Node (Id : E) return N is
5814 if Ekind (Id) = E_Incomplete_Type
5815 and then Present (Full_View (Id))
5817 P := Parent (Full_View (Id));
5823 if Nkind (P) /= N_Selected_Component
5824 and then Nkind (P) /= N_Expanded_Name
5826 not (Nkind (P) = N_Defining_Program_Unit_Name
5827 and then Is_Child_Unit (Id))
5834 end Declaration_Node;
5836 ---------------------
5837 -- Designated_Type --
5838 ---------------------
5840 function Designated_Type (Id : E) return E is
5844 Desig_Type := Directly_Designated_Type (Id);
5846 if Ekind (Desig_Type) = E_Incomplete_Type
5847 and then Present (Full_View (Desig_Type))
5849 return Full_View (Desig_Type);
5851 elsif Is_Class_Wide_Type (Desig_Type)
5852 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5853 and then Present (Full_View (Etype (Desig_Type)))
5854 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5856 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5861 end Designated_Type;
5863 ----------------------
5864 -- Entry_Index_Type --
5865 ----------------------
5867 function Entry_Index_Type (Id : E) return N is
5869 pragma Assert (Ekind (Id) = E_Entry_Family);
5870 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5871 end Entry_Index_Type;
5873 ---------------------
5874 -- First_Component --
5875 ---------------------
5877 function First_Component (Id : E) return E is
5882 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5884 Comp_Id := First_Entity (Id);
5885 while Present (Comp_Id) loop
5886 exit when Ekind (Comp_Id) = E_Component;
5887 Comp_Id := Next_Entity (Comp_Id);
5891 end First_Component;
5893 -------------------------------------
5894 -- First_Component_Or_Discriminant --
5895 -------------------------------------
5897 function First_Component_Or_Discriminant (Id : E) return E is
5902 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5904 Comp_Id := First_Entity (Id);
5905 while Present (Comp_Id) loop
5906 exit when Ekind (Comp_Id) = E_Component
5908 Ekind (Comp_Id) = E_Discriminant;
5909 Comp_Id := Next_Entity (Comp_Id);
5913 end First_Component_Or_Discriminant;
5919 function First_Formal (Id : E) return E is
5924 (Is_Overloadable (Id)
5925 or else Ekind_In (Id, E_Entry_Family,
5927 E_Subprogram_Type));
5929 if Ekind (Id) = E_Enumeration_Literal then
5933 Formal := First_Entity (Id);
5935 if Present (Formal) and then Is_Formal (Formal) then
5943 ------------------------------
5944 -- First_Formal_With_Extras --
5945 ------------------------------
5947 function First_Formal_With_Extras (Id : E) return E is
5952 (Is_Overloadable (Id)
5953 or else Ekind_In (Id, E_Entry_Family,
5955 E_Subprogram_Type));
5957 if Ekind (Id) = E_Enumeration_Literal then
5961 Formal := First_Entity (Id);
5963 if Present (Formal) and then Is_Formal (Formal) then
5966 return Extra_Formals (Id); -- Empty if no extra formals
5969 end First_Formal_With_Extras;
5971 -------------------------------------
5972 -- Get_Attribute_Definition_Clause --
5973 -------------------------------------
5975 function Get_Attribute_Definition_Clause
5977 Id : Attribute_Id) return Node_Id
5982 N := First_Rep_Item (E);
5983 while Present (N) loop
5984 if Nkind (N) = N_Attribute_Definition_Clause
5985 and then Get_Attribute_Id (Chars (N)) = Id
5994 end Get_Attribute_Definition_Clause;
6000 function Get_Full_View (T : Entity_Id) return Entity_Id is
6002 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6003 return Full_View (T);
6005 elsif Is_Class_Wide_Type (T)
6006 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6007 and then Present (Full_View (Root_Type (T)))
6009 return Class_Wide_Type (Full_View (Root_Type (T)));
6016 --------------------------------------
6017 -- Get_Record_Representation_Clause --
6018 --------------------------------------
6020 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6024 N := First_Rep_Item (E);
6025 while Present (N) loop
6026 if Nkind (N) = N_Record_Representation_Clause then
6034 end Get_Record_Representation_Clause;
6036 -----------------------------
6037 -- Get_Rep_Item_For_Entity --
6038 -----------------------------
6040 function Get_Rep_Item_For_Entity
6042 Nam : Name_Id) return Node_Id
6048 N := First_Rep_Item (E);
6049 while Present (N) loop
6050 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6051 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
6053 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
6057 elsif Nkind (N) = N_Attribute_Definition_Clause
6058 and then Chars (N) = Nam
6059 and then Entity (N) = E
6063 elsif Nkind (N) = N_Aspect_Specification
6064 and then Chars (Identifier (N)) = Nam
6065 and then Entity (N) = E
6074 end Get_Rep_Item_For_Entity;
6076 --------------------
6077 -- Get_Rep_Pragma --
6078 --------------------
6080 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6084 N := First_Rep_Item (E);
6085 while Present (N) loop
6086 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6096 ------------------------
6097 -- Has_Attach_Handler --
6098 ------------------------
6100 function Has_Attach_Handler (Id : E) return B is
6104 pragma Assert (Is_Protected_Type (Id));
6106 Ritem := First_Rep_Item (Id);
6107 while Present (Ritem) loop
6108 if Nkind (Ritem) = N_Pragma
6109 and then Pragma_Name (Ritem) = Name_Attach_Handler
6113 Next_Rep_Item (Ritem);
6118 end Has_Attach_Handler;
6120 -------------------------------------
6121 -- Has_Attribute_Definition_Clause --
6122 -------------------------------------
6124 function Has_Attribute_Definition_Clause
6126 Id : Attribute_Id) return Boolean
6129 return Present (Get_Attribute_Definition_Clause (E, Id));
6130 end Has_Attribute_Definition_Clause;
6136 function Has_Entries (Id : E) return B is
6140 pragma Assert (Is_Concurrent_Type (Id));
6142 Ent := First_Entity (Id);
6143 while Present (Ent) loop
6144 if Is_Entry (Ent) then
6148 Ent := Next_Entity (Ent);
6154 ----------------------------
6155 -- Has_Foreign_Convention --
6156 ----------------------------
6158 function Has_Foreign_Convention (Id : E) return B is
6160 -- While regular Intrinsics such as the Standard operators fit in the
6161 -- "Ada" convention, those with an Interface_Name materialize GCC
6162 -- builtin imports for which Ada special treatments shouldn't apply.
6164 return Convention (Id) in Foreign_Convention
6165 or else (Convention (Id) = Convention_Intrinsic
6166 and then Present (Interface_Name (Id)));
6167 end Has_Foreign_Convention;
6169 ---------------------------
6170 -- Has_Interrupt_Handler --
6171 ---------------------------
6173 function Has_Interrupt_Handler (Id : E) return B is
6177 pragma Assert (Is_Protected_Type (Id));
6179 Ritem := First_Rep_Item (Id);
6180 while Present (Ritem) loop
6181 if Nkind (Ritem) = N_Pragma
6182 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6186 Next_Rep_Item (Ritem);
6191 end Has_Interrupt_Handler;
6193 --------------------------
6194 -- Has_Private_Ancestor --
6195 --------------------------
6197 function Has_Private_Ancestor (Id : E) return B is
6198 R : constant Entity_Id := Root_Type (Id);
6199 T1 : Entity_Id := Id;
6202 if Is_Private_Type (T1) then
6210 end Has_Private_Ancestor;
6212 --------------------
6213 -- Has_Rep_Pragma --
6214 --------------------
6216 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6218 return Present (Get_Rep_Pragma (E, Nam));
6221 --------------------
6222 -- Has_Unmodified --
6223 --------------------
6225 function Has_Unmodified (E : Entity_Id) return Boolean is
6227 if Has_Pragma_Unmodified (E) then
6229 elsif Warnings_Off (E) then
6230 Set_Warnings_Off_Used_Unmodified (E);
6237 ---------------------
6238 -- Has_Unreferenced --
6239 ---------------------
6241 function Has_Unreferenced (E : Entity_Id) return Boolean is
6243 if Has_Pragma_Unreferenced (E) then
6245 elsif Warnings_Off (E) then
6246 Set_Warnings_Off_Used_Unreferenced (E);
6251 end Has_Unreferenced;
6253 ----------------------
6254 -- Has_Warnings_Off --
6255 ----------------------
6257 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6259 if Warnings_Off (E) then
6260 Set_Warnings_Off_Used (E);
6265 end Has_Warnings_Off;
6267 ------------------------------
6268 -- Implementation_Base_Type --
6269 ------------------------------
6271 function Implementation_Base_Type (Id : E) return E is
6276 Bastyp := Base_Type (Id);
6278 if Is_Incomplete_Or_Private_Type (Bastyp) then
6279 Imptyp := Underlying_Type (Bastyp);
6281 -- If we have an implementation type, then just return it,
6282 -- otherwise we return the Base_Type anyway. This can only
6283 -- happen in error situations and should avoid some error bombs.
6285 if Present (Imptyp) then
6286 return Base_Type (Imptyp);
6294 end Implementation_Base_Type;
6296 -------------------------
6297 -- Invariant_Procedure --
6298 -------------------------
6300 function Invariant_Procedure (Id : E) return E is
6304 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6306 if No (Subprograms_For_Type (Id)) then
6310 S := Subprograms_For_Type (Id);
6311 while Present (S) loop
6312 if Has_Invariants (S) then
6315 S := Subprograms_For_Type (S);
6321 end Invariant_Procedure;
6323 ---------------------
6324 -- Is_Boolean_Type --
6325 ---------------------
6327 function Is_Boolean_Type (Id : E) return B is
6329 return Root_Type (Id) = Standard_Boolean;
6330 end Is_Boolean_Type;
6332 ------------------------
6333 -- Is_Constant_Object --
6334 ------------------------
6336 function Is_Constant_Object (Id : E) return B is
6337 K : constant Entity_Kind := Ekind (Id);
6340 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6341 end Is_Constant_Object;
6343 --------------------
6344 -- Is_Discriminal --
6345 --------------------
6347 function Is_Discriminal (Id : E) return B is
6349 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6350 and then Present (Discriminal_Link (Id)));
6353 ----------------------
6354 -- Is_Dynamic_Scope --
6355 ----------------------
6357 function Is_Dynamic_Scope (Id : E) return B is
6360 Ekind (Id) = E_Block
6362 Ekind (Id) = E_Function
6364 Ekind (Id) = E_Procedure
6366 Ekind (Id) = E_Subprogram_Body
6368 Ekind (Id) = E_Task_Type
6370 (Ekind (Id) = E_Limited_Private_Type
6371 and then Present (Full_View (Id))
6372 and then Ekind (Full_View (Id)) = E_Task_Type)
6374 Ekind (Id) = E_Entry
6376 Ekind (Id) = E_Entry_Family
6378 Ekind (Id) = E_Return_Statement;
6379 end Is_Dynamic_Scope;
6381 --------------------
6382 -- Is_Entity_Name --
6383 --------------------
6385 function Is_Entity_Name (N : Node_Id) return Boolean is
6386 Kind : constant Node_Kind := Nkind (N);
6389 -- Identifiers, operator symbols, expanded names are entity names
6391 return Kind = N_Identifier
6392 or else Kind = N_Operator_Symbol
6393 or else Kind = N_Expanded_Name
6395 -- Attribute references are entity names if they refer to an entity.
6396 -- Note that we don't do this by testing for the presence of the
6397 -- Entity field in the N_Attribute_Reference node, since it may not
6398 -- have been set yet.
6400 or else (Kind = N_Attribute_Reference
6401 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6404 -----------------------------------
6405 -- Is_Package_Or_Generic_Package --
6406 -----------------------------------
6408 function Is_Package_Or_Generic_Package (Id : E) return B is
6411 Ekind (Id) = E_Package
6413 Ekind (Id) = E_Generic_Package;
6414 end Is_Package_Or_Generic_Package;
6416 ------------------------
6417 -- Predicate_Function --
6418 ------------------------
6420 function Predicate_Function (Id : E) return E is
6424 pragma Assert (Is_Type (Id));
6426 if No (Subprograms_For_Type (Id)) then
6430 S := Subprograms_For_Type (Id);
6431 while Present (S) loop
6432 if Has_Predicates (S) then
6435 S := Subprograms_For_Type (S);
6441 end Predicate_Function;
6447 function Is_Prival (Id : E) return B is
6449 return (Ekind_In (Id, E_Constant, E_Variable)
6450 and then Present (Prival_Link (Id)));
6453 ----------------------------
6454 -- Is_Protected_Component --
6455 ----------------------------
6457 function Is_Protected_Component (Id : E) return B is
6459 return Ekind (Id) = E_Component
6460 and then Is_Protected_Type (Scope (Id));
6461 end Is_Protected_Component;
6463 ----------------------------
6464 -- Is_Protected_Interface --
6465 ----------------------------
6467 function Is_Protected_Interface (Id : E) return B is
6468 Typ : constant Entity_Id := Base_Type (Id);
6470 if not Is_Interface (Typ) then
6472 elsif Is_Class_Wide_Type (Typ) then
6473 return Is_Protected_Interface (Etype (Typ));
6475 return Protected_Present (Type_Definition (Parent (Typ)));
6477 end Is_Protected_Interface;
6479 ------------------------------
6480 -- Is_Protected_Record_Type --
6481 ------------------------------
6483 function Is_Protected_Record_Type (Id : E) return B is
6486 Is_Concurrent_Record_Type (Id)
6487 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6488 end Is_Protected_Record_Type;
6490 --------------------------------
6491 -- Is_Standard_Character_Type --
6492 --------------------------------
6494 function Is_Standard_Character_Type (Id : E) return B is
6496 if Is_Type (Id) then
6498 R : constant Entity_Id := Root_Type (Id);
6501 R = Standard_Character
6503 R = Standard_Wide_Character
6505 R = Standard_Wide_Wide_Character;
6511 end Is_Standard_Character_Type;
6513 --------------------
6514 -- Is_String_Type --
6515 --------------------
6517 function Is_String_Type (Id : E) return B is
6519 return Ekind (Id) in String_Kind
6520 or else (Is_Array_Type (Id)
6521 and then Id /= Any_Composite
6522 and then Number_Dimensions (Id) = 1
6523 and then Is_Character_Type (Component_Type (Id)));
6526 -------------------------------
6527 -- Is_Synchronized_Interface --
6528 -------------------------------
6530 function Is_Synchronized_Interface (Id : E) return B is
6531 Typ : constant Entity_Id := Base_Type (Id);
6534 if not Is_Interface (Typ) then
6537 elsif Is_Class_Wide_Type (Typ) then
6538 return Is_Synchronized_Interface (Etype (Typ));
6541 return Protected_Present (Type_Definition (Parent (Typ)))
6542 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6543 or else Task_Present (Type_Definition (Parent (Typ)));
6545 end Is_Synchronized_Interface;
6547 -----------------------
6548 -- Is_Task_Interface --
6549 -----------------------
6551 function Is_Task_Interface (Id : E) return B is
6552 Typ : constant Entity_Id := Base_Type (Id);
6554 if not Is_Interface (Typ) then
6556 elsif Is_Class_Wide_Type (Typ) then
6557 return Is_Task_Interface (Etype (Typ));
6559 return Task_Present (Type_Definition (Parent (Typ)));
6561 end Is_Task_Interface;
6563 -------------------------
6564 -- Is_Task_Record_Type --
6565 -------------------------
6567 function Is_Task_Record_Type (Id : E) return B is
6570 Is_Concurrent_Record_Type (Id)
6571 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6572 end Is_Task_Record_Type;
6574 ------------------------
6575 -- Is_Wrapper_Package --
6576 ------------------------
6578 function Is_Wrapper_Package (Id : E) return B is
6580 return (Ekind (Id) = E_Package
6581 and then Present (Related_Instance (Id)));
6582 end Is_Wrapper_Package;
6588 function Last_Formal (Id : E) return E is
6593 (Is_Overloadable (Id)
6594 or else Ekind_In (Id, E_Entry_Family,
6596 E_Subprogram_Type));
6598 if Ekind (Id) = E_Enumeration_Literal then
6602 Formal := First_Formal (Id);
6604 if Present (Formal) then
6605 while Present (Next_Formal (Formal)) loop
6606 Formal := Next_Formal (Formal);
6614 --------------------
6615 -- Next_Component --
6616 --------------------
6618 function Next_Component (Id : E) return E is
6622 Comp_Id := Next_Entity (Id);
6623 while Present (Comp_Id) loop
6624 exit when Ekind (Comp_Id) = E_Component;
6625 Comp_Id := Next_Entity (Comp_Id);
6631 ------------------------------------
6632 -- Next_Component_Or_Discriminant --
6633 ------------------------------------
6635 function Next_Component_Or_Discriminant (Id : E) return E is
6639 Comp_Id := Next_Entity (Id);
6640 while Present (Comp_Id) loop
6641 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6642 Comp_Id := Next_Entity (Comp_Id);
6646 end Next_Component_Or_Discriminant;
6648 -----------------------
6649 -- Next_Discriminant --
6650 -----------------------
6652 -- This function actually implements both Next_Discriminant and
6653 -- Next_Stored_Discriminant by making sure that the Discriminant
6654 -- returned is of the same variety as Id.
6656 function Next_Discriminant (Id : E) return E is
6658 -- Derived Tagged types with private extensions look like this...
6660 -- E_Discriminant d1
6661 -- E_Discriminant d2
6663 -- E_Discriminant d1
6664 -- E_Discriminant d2
6667 -- so it is critical not to go past the leading discriminants
6672 pragma Assert (Ekind (Id) = E_Discriminant);
6675 D := Next_Entity (D);
6677 or else (Ekind (D) /= E_Discriminant
6678 and then not Is_Itype (D))
6683 exit when Ekind (D) = E_Discriminant
6684 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6688 end Next_Discriminant;
6694 function Next_Formal (Id : E) return E is
6698 -- Follow the chain of declared entities as long as the kind of the
6699 -- entity corresponds to a formal parameter. Skip internal entities
6700 -- that may have been created for implicit subtypes, in the process
6701 -- of analyzing default expressions.
6705 P := Next_Entity (P);
6707 if No (P) or else Is_Formal (P) then
6709 elsif not Is_Internal (P) then
6715 -----------------------------
6716 -- Next_Formal_With_Extras --
6717 -----------------------------
6719 function Next_Formal_With_Extras (Id : E) return E is
6721 if Present (Extra_Formal (Id)) then
6722 return Extra_Formal (Id);
6724 return Next_Formal (Id);
6726 end Next_Formal_With_Extras;
6732 function Next_Index (Id : Node_Id) return Node_Id is
6741 function Next_Literal (Id : E) return E is
6743 pragma Assert (Nkind (Id) in N_Entity);
6747 ------------------------------
6748 -- Next_Stored_Discriminant --
6749 ------------------------------
6751 function Next_Stored_Discriminant (Id : E) return E is
6753 -- See comment in Next_Discriminant
6755 return Next_Discriminant (Id);
6756 end Next_Stored_Discriminant;
6758 -----------------------
6759 -- Number_Dimensions --
6760 -----------------------
6762 function Number_Dimensions (Id : E) return Pos is
6767 if Ekind (Id) in String_Kind then
6772 T := First_Index (Id);
6773 while Present (T) loop
6780 end Number_Dimensions;
6782 --------------------
6783 -- Number_Entries --
6784 --------------------
6786 function Number_Entries (Id : E) return Nat is
6791 pragma Assert (Is_Concurrent_Type (Id));
6794 Ent := First_Entity (Id);
6795 while Present (Ent) loop
6796 if Is_Entry (Ent) then
6800 Ent := Next_Entity (Ent);
6806 --------------------
6807 -- Number_Formals --
6808 --------------------
6810 function Number_Formals (Id : E) return Pos is
6816 Formal := First_Formal (Id);
6817 while Present (Formal) loop
6819 Formal := Next_Formal (Formal);
6825 --------------------
6826 -- Parameter_Mode --
6827 --------------------
6829 function Parameter_Mode (Id : E) return Formal_Kind is
6834 --------------------------
6835 -- Primitive_Operations --
6836 --------------------------
6838 function Primitive_Operations (Id : E) return L is
6840 if Is_Concurrent_Type (Id) then
6841 if Present (Corresponding_Record_Type (Id)) then
6842 return Direct_Primitive_Operations
6843 (Corresponding_Record_Type (Id));
6848 return Direct_Primitive_Operations (Id);
6850 end Primitive_Operations;
6852 ---------------------
6853 -- Record_Rep_Item --
6854 ---------------------
6856 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6858 Set_Next_Rep_Item (N, First_Rep_Item (E));
6859 Set_First_Rep_Item (E, N);
6860 end Record_Rep_Item;
6866 function Root_Type (Id : E) return E is
6870 pragma Assert (Nkind (Id) in N_Entity);
6872 T := Base_Type (Id);
6874 if Ekind (T) = E_Class_Wide_Type then
6877 elsif Ekind (T) = E_Class_Wide_Subtype then
6878 return Etype (Base_Type (T));
6880 -- ??? T comes from Base_Type, how can it be a subtype?
6881 -- Also Base_Type is supposed to be idempotent, so either way
6882 -- this is equivalent to "return Etype (T)" and should be merged
6883 -- with the E_Class_Wide_Type case.
6894 -- Following test catches some error cases resulting from
6897 elsif No (Etyp) then
6900 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6903 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6909 -- Return if there is a circularity in the inheritance chain. This
6910 -- happens in some error situations and we do not want to get
6911 -- stuck in this loop.
6913 if T = Base_Type (Id) then
6924 function Scope_Depth (Id : E) return Uint is
6929 while Is_Record_Type (Scop) loop
6930 Scop := Scope (Scop);
6933 return Scope_Depth_Value (Scop);
6936 ---------------------
6937 -- Scope_Depth_Set --
6938 ---------------------
6940 function Scope_Depth_Set (Id : E) return B is
6942 return not Is_Record_Type (Id)
6943 and then Field22 (Id) /= Union_Id (Empty);
6944 end Scope_Depth_Set;
6946 -----------------------------
6947 -- Set_Component_Alignment --
6948 -----------------------------
6950 -- Component Alignment is encoded using two flags, Flag128/129 as
6951 -- follows. Note that both flags False = Align_Default, so that the
6952 -- default initialization of flags to False initializes component
6953 -- alignment to the default value as required.
6955 -- Flag128 Flag129 Value
6956 -- ------- ------- -----
6957 -- False False Calign_Default
6958 -- False True Calign_Component_Size
6959 -- True False Calign_Component_Size_4
6960 -- True True Calign_Storage_Unit
6962 procedure Set_Component_Alignment (Id : E; V : C) is
6964 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6965 and then Id = Base_Type (Id));
6968 when Calign_Default =>
6969 Set_Flag128 (Id, False);
6970 Set_Flag129 (Id, False);
6972 when Calign_Component_Size =>
6973 Set_Flag128 (Id, False);
6974 Set_Flag129 (Id, True);
6976 when Calign_Component_Size_4 =>
6977 Set_Flag128 (Id, True);
6978 Set_Flag129 (Id, False);
6980 when Calign_Storage_Unit =>
6981 Set_Flag128 (Id, True);
6982 Set_Flag129 (Id, True);
6984 end Set_Component_Alignment;
6986 -----------------------------
6987 -- Set_Invariant_Procedure --
6988 -----------------------------
6990 procedure Set_Invariant_Procedure (Id : E; V : E) is
6994 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6996 S := Subprograms_For_Type (Id);
6997 Set_Subprograms_For_Type (Id, V);
6999 while Present (S) loop
7000 if Has_Invariants (S) then
7001 raise Program_Error;
7003 S := Subprograms_For_Type (S);
7007 Set_Subprograms_For_Type (Id, V);
7008 end Set_Invariant_Procedure;
7010 ----------------------------
7011 -- Set_Predicate_Function --
7012 ----------------------------
7014 procedure Set_Predicate_Function (Id : E; V : E) is
7018 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7020 S := Subprograms_For_Type (Id);
7021 Set_Subprograms_For_Type (Id, V);
7023 while Present (S) loop
7024 if Has_Predicates (S) then
7025 raise Program_Error;
7027 S := Subprograms_For_Type (S);
7031 Set_Subprograms_For_Type (Id, V);
7032 end Set_Predicate_Function;
7038 function Size_Clause (Id : E) return N is
7040 return Rep_Clause (Id, Name_Size);
7043 ------------------------
7044 -- Stream_Size_Clause --
7045 ------------------------
7047 function Stream_Size_Clause (Id : E) return N is
7049 return Rep_Clause (Id, Name_Stream_Size);
7050 end Stream_Size_Clause;
7056 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7062 Kind := E_Access_Subtype;
7066 Kind := E_Array_Subtype;
7068 when E_Class_Wide_Type |
7069 E_Class_Wide_Subtype =>
7070 Kind := E_Class_Wide_Subtype;
7072 when E_Decimal_Fixed_Point_Type |
7073 E_Decimal_Fixed_Point_Subtype =>
7074 Kind := E_Decimal_Fixed_Point_Subtype;
7076 when E_Ordinary_Fixed_Point_Type |
7077 E_Ordinary_Fixed_Point_Subtype =>
7078 Kind := E_Ordinary_Fixed_Point_Subtype;
7080 when E_Private_Type |
7081 E_Private_Subtype =>
7082 Kind := E_Private_Subtype;
7084 when E_Limited_Private_Type |
7085 E_Limited_Private_Subtype =>
7086 Kind := E_Limited_Private_Subtype;
7088 when E_Record_Type_With_Private |
7089 E_Record_Subtype_With_Private =>
7090 Kind := E_Record_Subtype_With_Private;
7092 when E_Record_Type |
7094 Kind := E_Record_Subtype;
7096 when E_String_Type |
7098 Kind := E_String_Subtype;
7100 when Enumeration_Kind =>
7101 Kind := E_Enumeration_Subtype;
7104 Kind := E_Floating_Point_Subtype;
7106 when Signed_Integer_Kind =>
7107 Kind := E_Signed_Integer_Subtype;
7109 when Modular_Integer_Kind =>
7110 Kind := E_Modular_Integer_Subtype;
7112 when Protected_Kind =>
7113 Kind := E_Protected_Subtype;
7116 Kind := E_Task_Subtype;
7120 raise Program_Error;
7126 ---------------------
7127 -- Type_High_Bound --
7128 ---------------------
7130 function Type_High_Bound (Id : E) return Node_Id is
7131 Rng : constant Node_Id := Scalar_Range (Id);
7133 if Nkind (Rng) = N_Subtype_Indication then
7134 return High_Bound (Range_Expression (Constraint (Rng)));
7136 return High_Bound (Rng);
7138 end Type_High_Bound;
7140 --------------------
7141 -- Type_Low_Bound --
7142 --------------------
7144 function Type_Low_Bound (Id : E) return Node_Id is
7145 Rng : constant Node_Id := Scalar_Range (Id);
7147 if Nkind (Rng) = N_Subtype_Indication then
7148 return Low_Bound (Range_Expression (Constraint (Rng)));
7150 return Low_Bound (Rng);
7154 ---------------------
7155 -- Underlying_Type --
7156 ---------------------
7158 function Underlying_Type (Id : E) return E is
7160 -- For record_with_private the underlying type is always the direct
7161 -- full view. Never try to take the full view of the parent it
7162 -- doesn't make sense.
7164 if Ekind (Id) = E_Record_Type_With_Private then
7165 return Full_View (Id);
7167 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7169 -- If we have an incomplete or private type with a full view,
7170 -- then we return the Underlying_Type of this full view
7172 if Present (Full_View (Id)) then
7173 if Id = Full_View (Id) then
7175 -- Previous error in declaration
7180 return Underlying_Type (Full_View (Id));
7183 -- If we have an incomplete entity that comes from the limited
7184 -- view then we return the Underlying_Type of its non-limited
7187 elsif From_With_Type (Id)
7188 and then Present (Non_Limited_View (Id))
7190 return Underlying_Type (Non_Limited_View (Id));
7192 -- Otherwise check for the case where we have a derived type or
7193 -- subtype, and if so get the Underlying_Type of the parent type.
7195 elsif Etype (Id) /= Id then
7196 return Underlying_Type (Etype (Id));
7198 -- Otherwise we have an incomplete or private type that has
7199 -- no full view, which means that we have not encountered the
7200 -- completion, so return Empty to indicate the underlying type
7201 -- is not yet known.
7207 -- For non-incomplete, non-private types, return the type itself
7208 -- Also for entities that are not types at all return the entity
7214 end Underlying_Type;
7216 ------------------------
7217 -- Write_Entity_Flags --
7218 ------------------------
7220 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7222 procedure W (Flag_Name : String; Flag : Boolean);
7223 -- Write out given flag if it is set
7229 procedure W (Flag_Name : String; Flag : Boolean) is
7233 Write_Str (Flag_Name);
7234 Write_Str (" = True");
7239 -- Start of processing for Write_Entity_Flags
7242 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7243 and then Id = Base_Type (Id)
7246 Write_Str ("Component_Alignment = ");
7248 case Component_Alignment (Id) is
7249 when Calign_Default =>
7250 Write_Str ("Calign_Default");
7252 when Calign_Component_Size =>
7253 Write_Str ("Calign_Component_Size");
7255 when Calign_Component_Size_4 =>
7256 Write_Str ("Calign_Component_Size_4");
7258 when Calign_Storage_Unit =>
7259 Write_Str ("Calign_Storage_Unit");
7265 W ("Address_Taken", Flag104 (Id));
7266 W ("Body_Needed_For_SAL", Flag40 (Id));
7267 W ("C_Pass_By_Copy", Flag125 (Id));
7268 W ("Can_Never_Be_Null", Flag38 (Id));
7269 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7270 W ("Debug_Info_Off", Flag166 (Id));
7271 W ("Default_Expressions_Processed", Flag108 (Id));
7272 W ("Delay_Cleanups", Flag114 (Id));
7273 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7274 W ("Depends_On_Private", Flag14 (Id));
7275 W ("Discard_Names", Flag88 (Id));
7276 W ("Elaboration_Entity_Required", Flag174 (Id));
7277 W ("Elaborate_Body_Desirable", Flag210 (Id));
7278 W ("Entry_Accepted", Flag152 (Id));
7279 W ("Can_Use_Internal_Rep", Flag229 (Id));
7280 W ("Finalize_Storage_Only", Flag158 (Id));
7281 W ("From_With_Type", Flag159 (Id));
7282 W ("Has_Aliased_Components", Flag135 (Id));
7283 W ("Has_Alignment_Clause", Flag46 (Id));
7284 W ("Has_All_Calls_Remote", Flag79 (Id));
7285 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7286 W ("Has_Atomic_Components", Flag86 (Id));
7287 W ("Has_Biased_Representation", Flag139 (Id));
7288 W ("Has_Completion", Flag26 (Id));
7289 W ("Has_Completion_In_Body", Flag71 (Id));
7290 W ("Has_Complex_Representation", Flag140 (Id));
7291 W ("Has_Component_Size_Clause", Flag68 (Id));
7292 W ("Has_Contiguous_Rep", Flag181 (Id));
7293 W ("Has_Controlled_Component", Flag43 (Id));
7294 W ("Has_Controlling_Result", Flag98 (Id));
7295 W ("Has_Convention_Pragma", Flag119 (Id));
7296 W ("Has_Delayed_Aspects", Flag200 (Id));
7297 W ("Has_Delayed_Freeze", Flag18 (Id));
7298 W ("Has_Discriminants", Flag5 (Id));
7299 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7300 W ("Has_Exit", Flag47 (Id));
7301 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7302 W ("Has_Forward_Instantiation", Flag175 (Id));
7303 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7304 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7305 W ("Has_Homonym", Flag56 (Id));
7306 W ("Has_Inheritable_Invariants", Flag248 (Id));
7307 W ("Has_Initial_Value", Flag219 (Id));
7308 W ("Has_Invariants", Flag232 (Id));
7309 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7310 W ("Has_Master_Entity", Flag21 (Id));
7311 W ("Has_Missing_Return", Flag142 (Id));
7312 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7313 W ("Has_Non_Standard_Rep", Flag75 (Id));
7314 W ("Has_Object_Size_Clause", Flag172 (Id));
7315 W ("Has_Per_Object_Constraint", Flag154 (Id));
7316 W ("Has_Persistent_BSS", Flag188 (Id));
7317 W ("Has_Postconditions", Flag240 (Id));
7318 W ("Has_Pragma_Controlled", Flag27 (Id));
7319 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7320 W ("Has_Pragma_Inline", Flag157 (Id));
7321 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7322 W ("Has_Pragma_Ordered", Flag198 (Id));
7323 W ("Has_Pragma_Pack", Flag121 (Id));
7324 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7325 W ("Has_Pragma_Pure", Flag203 (Id));
7326 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7327 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7328 W ("Has_Pragma_Unmodified", Flag233 (Id));
7329 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7330 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7331 W ("Has_Predicates", Flag250 (Id));
7332 W ("Has_Primitive_Operations", Flag120 (Id));
7333 W ("Has_Private_Declaration", Flag155 (Id));
7334 W ("Has_Qualified_Name", Flag161 (Id));
7335 W ("Has_RACW", Flag214 (Id));
7336 W ("Has_Record_Rep_Clause", Flag65 (Id));
7337 W ("Has_Recursive_Call", Flag143 (Id));
7338 W ("Has_Size_Clause", Flag29 (Id));
7339 W ("Has_Small_Clause", Flag67 (Id));
7340 W ("Has_Specified_Layout", Flag100 (Id));
7341 W ("Has_Specified_Stream_Input", Flag190 (Id));
7342 W ("Has_Specified_Stream_Output", Flag191 (Id));
7343 W ("Has_Specified_Stream_Read", Flag192 (Id));
7344 W ("Has_Specified_Stream_Write", Flag193 (Id));
7345 W ("Has_Static_Discriminants", Flag211 (Id));
7346 W ("Has_Storage_Size_Clause", Flag23 (Id));
7347 W ("Has_Stream_Size_Clause", Flag184 (Id));
7348 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7349 W ("Has_Task", Flag30 (Id));
7350 W ("Has_Thunks", Flag228 (Id));
7351 W ("Has_Unchecked_Union", Flag123 (Id));
7352 W ("Has_Unknown_Discriminants", Flag72 (Id));
7353 W ("Has_Up_Level_Access", Flag215 (Id));
7354 W ("Has_Volatile_Components", Flag87 (Id));
7355 W ("Has_Xref_Entry", Flag182 (Id));
7356 W ("In_Package_Body", Flag48 (Id));
7357 W ("In_Private_Part", Flag45 (Id));
7358 W ("In_Use", Flag8 (Id));
7359 W ("Is_AST_Entry", Flag132 (Id));
7360 W ("Is_Abstract_Subprogram", Flag19 (Id));
7361 W ("Is_Abstract_Type", Flag146 (Id));
7362 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7363 W ("Is_Access_Constant", Flag69 (Id));
7364 W ("Is_Ada_2005_Only", Flag185 (Id));
7365 W ("Is_Ada_2012_Only", Flag199 (Id));
7366 W ("Is_Aliased", Flag15 (Id));
7367 W ("Is_Asynchronous", Flag81 (Id));
7368 W ("Is_Atomic", Flag85 (Id));
7369 W ("Is_Bit_Packed_Array", Flag122 (Id));
7370 W ("Is_CPP_Class", Flag74 (Id));
7371 W ("Is_Called", Flag102 (Id));
7372 W ("Is_Character_Type", Flag63 (Id));
7373 W ("Is_Child_Unit", Flag73 (Id));
7374 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7375 W ("Is_Compilation_Unit", Flag149 (Id));
7376 W ("Is_Completely_Hidden", Flag103 (Id));
7377 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7378 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7379 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7380 W ("Is_Constrained", Flag12 (Id));
7381 W ("Is_Constructor", Flag76 (Id));
7382 W ("Is_Controlled", Flag42 (Id));
7383 W ("Is_Controlling_Formal", Flag97 (Id));
7384 W ("Is_Descendent_Of_Address", Flag223 (Id));
7385 W ("Is_Discrim_SO_Function", Flag176 (Id));
7386 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7387 W ("Is_Dispatching_Operation", Flag6 (Id));
7388 W ("Is_Eliminated", Flag124 (Id));
7389 W ("Is_Entry_Formal", Flag52 (Id));
7390 W ("Is_Exported", Flag99 (Id));
7391 W ("Is_First_Subtype", Flag70 (Id));
7392 W ("Is_For_Access_Subtype", Flag118 (Id));
7393 W ("Is_Formal_Subprogram", Flag111 (Id));
7394 W ("Is_Frozen", Flag4 (Id));
7395 W ("Is_Generic_Actual_Type", Flag94 (Id));
7396 W ("Is_Generic_Instance", Flag130 (Id));
7397 W ("Is_Generic_Type", Flag13 (Id));
7398 W ("Is_Hidden", Flag57 (Id));
7399 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7400 W ("Is_Immediately_Visible", Flag7 (Id));
7401 W ("Is_Imported", Flag24 (Id));
7402 W ("Is_Inlined", Flag11 (Id));
7403 W ("Is_Instantiated", Flag126 (Id));
7404 W ("Is_Interface", Flag186 (Id));
7405 W ("Is_Internal", Flag17 (Id));
7406 W ("Is_Interrupt_Handler", Flag89 (Id));
7407 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7408 W ("Is_Itype", Flag91 (Id));
7409 W ("Is_Known_Non_Null", Flag37 (Id));
7410 W ("Is_Known_Null", Flag204 (Id));
7411 W ("Is_Known_Valid", Flag170 (Id));
7412 W ("Is_Limited_Composite", Flag106 (Id));
7413 W ("Is_Limited_Interface", Flag197 (Id));
7414 W ("Is_Limited_Record", Flag25 (Id));
7415 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7416 W ("Is_Non_Static_Subtype", Flag109 (Id));
7417 W ("Is_Null_Init_Proc", Flag178 (Id));
7418 W ("Is_Obsolescent", Flag153 (Id));
7419 W ("Is_Only_Out_Parameter", Flag226 (Id));
7420 W ("Is_Optional_Parameter", Flag134 (Id));
7421 W ("Is_Overriding_Operation", Flag39 (Id));
7422 W ("Is_Package_Body_Entity", Flag160 (Id));
7423 W ("Is_Packed", Flag51 (Id));
7424 W ("Is_Packed_Array_Type", Flag138 (Id));
7425 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7426 W ("Is_Preelaborated", Flag59 (Id));
7427 W ("Is_Primitive", Flag218 (Id));
7428 W ("Is_Primitive_Wrapper", Flag195 (Id));
7429 W ("Is_Private_Composite", Flag107 (Id));
7430 W ("Is_Private_Descendant", Flag53 (Id));
7431 W ("Is_Private_Primitive", Flag245 (Id));
7432 W ("Is_Public", Flag10 (Id));
7433 W ("Is_Pure", Flag44 (Id));
7434 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7435 W ("Is_RACW_Stub_Type", Flag244 (Id));
7436 W ("Is_Raised", Flag224 (Id));
7437 W ("Is_Remote_Call_Interface", Flag62 (Id));
7438 W ("Is_Remote_Types", Flag61 (Id));
7439 W ("Is_Renaming_Of_Object", Flag112 (Id));
7440 W ("Is_Return_Object", Flag209 (Id));
7441 W ("Is_Shared_Passive", Flag60 (Id));
7442 W ("Is_Statically_Allocated", Flag28 (Id));
7443 W ("Is_Tag", Flag78 (Id));
7444 W ("Is_Tagged_Type", Flag55 (Id));
7445 W ("Is_Thunk", Flag225 (Id));
7446 W ("Is_Trivial_Subprogram", Flag235 (Id));
7447 W ("Is_True_Constant", Flag163 (Id));
7448 W ("Is_Unchecked_Union", Flag117 (Id));
7449 W ("Is_Underlying_Record_View", Flag246 (Id));
7450 W ("Is_Unsigned_Type", Flag144 (Id));
7451 W ("Is_VMS_Exception", Flag133 (Id));
7452 W ("Is_Valued_Procedure", Flag127 (Id));
7453 W ("Is_Visible_Child_Unit", Flag116 (Id));
7454 W ("Is_Visible_Formal", Flag206 (Id));
7455 W ("Is_Volatile", Flag16 (Id));
7456 W ("Itype_Printed", Flag202 (Id));
7457 W ("Kill_Elaboration_Checks", Flag32 (Id));
7458 W ("Kill_Range_Checks", Flag33 (Id));
7459 W ("Kill_Tag_Checks", Flag34 (Id));
7460 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7461 W ("Low_Bound_Tested", Flag205 (Id));
7462 W ("Machine_Radix_10", Flag84 (Id));
7463 W ("Materialize_Entity", Flag168 (Id));
7464 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7465 W ("Must_Have_Preelab_Init", Flag208 (Id));
7466 W ("Needs_Debug_Info", Flag147 (Id));
7467 W ("Needs_No_Actuals", Flag22 (Id));
7468 W ("Never_Set_In_Source", Flag115 (Id));
7469 W ("No_Pool_Assigned", Flag131 (Id));
7470 W ("No_Return", Flag113 (Id));
7471 W ("No_Strict_Aliasing", Flag136 (Id));
7472 W ("Non_Binary_Modulus", Flag58 (Id));
7473 W ("Nonzero_Is_True", Flag162 (Id));
7474 W ("OK_To_Reference", Flag249 (Id));
7475 W ("OK_To_Rename", Flag247 (Id));
7476 W ("OK_To_Reorder_Components", Flag239 (Id));
7477 W ("Optimize_Alignment_Space", Flag241 (Id));
7478 W ("Optimize_Alignment_Time", Flag242 (Id));
7479 W ("Overlays_Constant", Flag243 (Id));
7480 W ("Reachable", Flag49 (Id));
7481 W ("Referenced", Flag156 (Id));
7482 W ("Referenced_As_LHS", Flag36 (Id));
7483 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7484 W ("Renamed_In_Spec", Flag231 (Id));
7485 W ("Requires_Overriding", Flag213 (Id));
7486 W ("Return_Present", Flag54 (Id));
7487 W ("Returns_By_Ref", Flag90 (Id));
7488 W ("Reverse_Bit_Order", Flag164 (Id));
7489 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7490 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7491 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7492 W ("Static_Elaboration_Desired", Flag77 (Id));
7493 W ("Strict_Alignment", Flag145 (Id));
7494 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7495 W ("Suppress_Init_Proc", Flag105 (Id));
7496 W ("Suppress_Style_Checks", Flag165 (Id));
7497 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7498 W ("Treat_As_Volatile", Flag41 (Id));
7499 W ("Universal_Aliasing", Flag216 (Id));
7500 W ("Used_As_Generic_Actual", Flag222 (Id));
7501 W ("Uses_Sec_Stack", Flag95 (Id));
7502 W ("Vax_Float", Flag151 (Id));
7503 W ("Warnings_Off", Flag96 (Id));
7504 W ("Warnings_Off_Used", Flag236 (Id));
7505 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7506 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7507 W ("Was_Hidden", Flag196 (Id));
7508 end Write_Entity_Flags;
7510 -----------------------
7511 -- Write_Entity_Info --
7512 -----------------------
7514 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7516 procedure Write_Attribute (Which : String; Nam : E);
7517 -- Write attribute value with given string name
7519 procedure Write_Kind (Id : Entity_Id);
7520 -- Write Ekind field of entity
7522 ---------------------
7523 -- Write_Attribute --
7524 ---------------------
7526 procedure Write_Attribute (Which : String; Nam : E) is
7530 Write_Int (Int (Nam));
7532 Write_Name (Chars (Nam));
7534 end Write_Attribute;
7540 procedure Write_Kind (Id : Entity_Id) is
7541 K : constant String := Entity_Kind'Image (Ekind (Id));
7545 Write_Str (" Kind ");
7547 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7548 Write_Str ("TAGGED ");
7551 Write_Str (K (3 .. K'Length));
7554 if Is_Type (Id) and then Depends_On_Private (Id) then
7555 Write_Str ("Depends_On_Private ");
7559 -- Start of processing for Write_Entity_Info
7563 Write_Attribute ("Name ", Id);
7564 Write_Int (Int (Id));
7568 Write_Attribute (" Type ", Etype (Id));
7570 Write_Attribute (" Scope ", Scope (Id));
7575 when Discrete_Kind =>
7576 Write_Str ("Bounds: Id = ");
7578 if Present (Scalar_Range (Id)) then
7579 Write_Int (Int (Type_Low_Bound (Id)));
7580 Write_Str (" .. Id = ");
7581 Write_Int (Int (Type_High_Bound (Id)));
7583 Write_Str ("Empty");
7594 (" Component Type ", Component_Type (Id));
7597 Write_Str (" Indexes ");
7599 Index := First_Index (Id);
7600 while Present (Index) loop
7601 Write_Attribute (" ", Etype (Index));
7602 Index := Next_Index (Index);
7610 (" Directly Designated Type ",
7611 Directly_Designated_Type (Id));
7614 when Overloadable_Kind =>
7615 if Present (Homonym (Id)) then
7616 Write_Str (" Homonym ");
7617 Write_Name (Chars (Homonym (Id)));
7619 Write_Int (Int (Homonym (Id)));
7626 if Ekind (Scope (Id)) in Record_Kind then
7628 " Original_Record_Component ",
7629 Original_Record_Component (Id));
7630 Write_Int (Int (Original_Record_Component (Id)));
7634 when others => null;
7636 end Write_Entity_Info;
7638 -----------------------
7639 -- Write_Field6_Name --
7640 -----------------------
7642 procedure Write_Field6_Name (Id : Entity_Id) is
7643 pragma Warnings (Off, Id);
7645 Write_Str ("First_Rep_Item");
7646 end Write_Field6_Name;
7648 -----------------------
7649 -- Write_Field7_Name --
7650 -----------------------
7652 procedure Write_Field7_Name (Id : Entity_Id) is
7653 pragma Warnings (Off, Id);
7655 Write_Str ("Freeze_Node");
7656 end Write_Field7_Name;
7658 -----------------------
7659 -- Write_Field8_Name --
7660 -----------------------
7662 procedure Write_Field8_Name (Id : Entity_Id) is
7667 Write_Str ("Normalized_First_Bit");
7671 E_Subprogram_Body =>
7672 Write_Str ("Mechanism");
7675 Write_Str ("Associated_Node_For_Itype");
7678 Write_Str ("First_Exit_Statement");
7681 Write_Str ("Dependent_Instances");
7684 Write_Str ("Postcondition_Proc");
7686 when E_Return_Statement =>
7687 Write_Str ("Return_Applies_To");
7690 Write_Str ("Hiding_Loop_Variable");
7693 Write_Str ("Field8??");
7695 end Write_Field8_Name;
7697 -----------------------
7698 -- Write_Field9_Name --
7699 -----------------------
7701 procedure Write_Field9_Name (Id : Entity_Id) is
7705 Write_Str ("Class_Wide_Type");
7708 E_Generic_Function |
7710 E_Generic_Procedure |
7713 Write_Str ("Renaming_Map");
7716 Write_Str ("Current_Value");
7719 Write_Str ("Field9??");
7721 end Write_Field9_Name;
7723 ------------------------
7724 -- Write_Field10_Name --
7725 ------------------------
7727 procedure Write_Field10_Name (Id : Entity_Id) is
7730 when Class_Wide_Kind |
7736 Write_Str ("Direct_Primitive_Operations");
7738 when E_In_Parameter |
7740 Write_Str ("Discriminal_Link");
7746 Write_Str ("Handler_Records");
7750 Write_Str ("Normalized_Position_Max");
7753 Write_Str ("Field10??");
7755 end Write_Field10_Name;
7757 ------------------------
7758 -- Write_Field11_Name --
7759 ------------------------
7761 procedure Write_Field11_Name (Id : Entity_Id) is
7765 Write_Str ("Entry_Component");
7769 Write_Str ("Component_Bit_Offset");
7772 Write_Str ("Full_View");
7774 when E_Enumeration_Literal =>
7775 Write_Str ("Enumeration_Pos");
7778 Write_Str ("Block_Node");
7784 Write_Str ("Protected_Body_Subprogram");
7786 when E_Generic_Package =>
7787 Write_Str ("Generic_Homonym");
7790 Write_Str ("Full_View");
7793 Write_Str ("Field11??");
7795 end Write_Field11_Name;
7797 ------------------------
7798 -- Write_Field12_Name --
7799 ------------------------
7801 procedure Write_Field12_Name (Id : Entity_Id) is
7805 Write_Str ("Barrier_Function");
7807 when E_Enumeration_Literal =>
7808 Write_Str ("Enumeration_Rep");
7816 E_In_Out_Parameter |
7820 Write_Str ("Esize");
7824 Write_Str ("Next_Inlined_Subprogram");
7827 Write_Str ("Associated_Formal_Package");
7830 Write_Str ("Field12??");
7832 end Write_Field12_Name;
7834 ------------------------
7835 -- Write_Field13_Name --
7836 ------------------------
7838 procedure Write_Field13_Name (Id : Entity_Id) is
7842 Write_Str ("RM_Size");
7846 Write_Str ("Component_Clause");
7849 if not Comes_From_Source (Id)
7851 Chars (Id) = Name_Op_Ne
7853 Write_Str ("Corresponding_Equality");
7855 elsif Comes_From_Source (Id) then
7856 Write_Str ("Elaboration_Entity");
7859 Write_Str ("Field13??");
7864 Write_Str ("Extra_Accessibility");
7868 Generic_Unit_Kind =>
7869 Write_Str ("Elaboration_Entity");
7872 Write_Str ("Field13??");
7874 end Write_Field13_Name;
7876 -----------------------
7877 -- Write_Field14_Name --
7878 -----------------------
7880 procedure Write_Field14_Name (Id : Entity_Id) is
7889 Write_Str ("Alignment");
7893 Write_Str ("Normalized_Position");
7897 Write_Str ("First_Optional_Parameter");
7900 E_Generic_Package =>
7901 Write_Str ("Shadow_Entities");
7904 Write_Str ("Field14??");
7906 end Write_Field14_Name;
7908 ------------------------
7909 -- Write_Field15_Name --
7910 ------------------------
7912 procedure Write_Field15_Name (Id : Entity_Id) is
7917 Write_Str ("Storage_Size_Variable");
7920 Write_Str ("DT_Entry_Count");
7922 when Decimal_Fixed_Point_Kind =>
7923 Write_Str ("Scale_Value");
7925 when E_Discriminant =>
7926 Write_Str ("Discriminant_Number");
7929 Write_Str ("Extra_Formal");
7933 Write_Str ("DT_Position");
7936 Write_Str ("Entry_Parameters_Type");
7938 when Enumeration_Kind =>
7939 Write_Str ("Lit_Indexes");
7943 Write_Str ("Related_Instance");
7945 when E_Protected_Type =>
7946 Write_Str ("Entry_Bodies_Array");
7948 when E_String_Literal_Subtype =>
7949 Write_Str ("String_Literal_Low_Bound");
7952 Write_Str ("Field15??");
7954 end Write_Field15_Name;
7956 ------------------------
7957 -- Write_Field16_Name --
7958 ------------------------
7960 procedure Write_Field16_Name (Id : Entity_Id) is
7964 Write_Str ("Entry_Formal");
7968 Write_Str ("DTC_Entity");
7973 Write_Str ("First_Private_Entity");
7975 when E_Record_Type |
7976 E_Record_Type_With_Private =>
7977 Write_Str ("Access_Disp_Table");
7979 when E_String_Literal_Subtype =>
7980 Write_Str ("String_Literal_Length");
7982 when Enumeration_Kind =>
7983 Write_Str ("Lit_Strings");
7987 Write_Str ("Unset_Reference");
7989 when E_Record_Subtype |
7990 E_Class_Wide_Subtype =>
7991 Write_Str ("Cloned_Subtype");
7994 Write_Str ("Field16??");
7996 end Write_Field16_Name;
7998 ------------------------
7999 -- Write_Field17_Name --
8000 ------------------------
8002 procedure Write_Field17_Name (Id : Entity_Id) is
8006 Write_Str ("Digits_Value");
8009 Write_Str ("Prival");
8011 when E_Discriminant =>
8012 Write_Str ("Discriminal");
8021 E_Generic_Function |
8023 E_Generic_Procedure |
8031 E_Return_Statement |
8033 E_Subprogram_Type =>
8034 Write_Str ("First_Entity");
8037 Write_Str ("First_Index");
8039 when Enumeration_Kind =>
8040 Write_Str ("First_Literal");
8043 Write_Str ("Master_Id");
8045 when Modular_Integer_Kind =>
8046 Write_Str ("Modulus");
8050 E_Generic_In_Out_Parameter |
8052 Write_Str ("Actual_Subtype");
8054 when E_Incomplete_Type =>
8055 Write_Str ("Non_Limited_View");
8057 when E_Incomplete_Subtype =>
8058 if From_With_Type (Id) then
8059 Write_Str ("Non_Limited_View");
8063 Write_Str ("Field17??");
8065 end Write_Field17_Name;
8067 ------------------------
8068 -- Write_Field18_Name --
8069 ------------------------
8071 procedure Write_Field18_Name (Id : Entity_Id) is
8074 when E_Enumeration_Literal |
8078 Write_Str ("Alias");
8080 when E_Record_Type =>
8081 Write_Str ("Corresponding_Concurrent_Type");
8083 when E_Subprogram_Body =>
8084 Write_Str ("Corresponding_Protected_Entry");
8086 when E_Entry_Index_Parameter =>
8087 Write_Str ("Entry_Index_Constant");
8089 when E_Class_Wide_Subtype |
8090 E_Access_Protected_Subprogram_Type |
8091 E_Anonymous_Access_Protected_Subprogram_Type |
8092 E_Access_Subprogram_Type |
8094 Write_Str ("Equivalent_Type");
8096 when Fixed_Point_Kind =>
8097 Write_Str ("Delta_Value");
8100 Write_Str ("Renamed_Object");
8104 E_Generic_Function |
8105 E_Generic_Procedure |
8106 E_Generic_Package =>
8107 Write_Str ("Renamed_Entity");
8109 when Incomplete_Or_Private_Kind |
8111 Write_Str ("Private_Dependents");
8113 when Concurrent_Kind =>
8114 Write_Str ("Corresponding_Record_Type");
8119 Write_Str ("Enclosing_Scope");
8122 Write_Str ("Field18??");
8124 end Write_Field18_Name;
8126 -----------------------
8127 -- Write_Field19_Name --
8128 -----------------------
8130 procedure Write_Field19_Name (Id : Entity_Id) is
8135 Write_Str ("Related_Array_Object");
8141 E_Return_Statement |
8143 Write_Str ("Finalization_Chain_Entity");
8145 when E_Constant | E_Variable =>
8146 Write_Str ("Size_Check_Code");
8148 when E_Discriminant =>
8149 Write_Str ("Corresponding_Discriminant");
8152 E_Generic_Package =>
8153 Write_Str ("Body_Entity");
8155 when E_Package_Body |
8157 Write_Str ("Spec_Entity");
8159 when Private_Kind =>
8160 Write_Str ("Underlying_Full_View");
8162 when E_Record_Type =>
8163 Write_Str ("Parent_Subtype");
8166 Write_Str ("Field19??");
8168 end Write_Field19_Name;
8170 -----------------------
8171 -- Write_Field20_Name --
8172 -----------------------
8174 procedure Write_Field20_Name (Id : Entity_Id) is
8178 Write_Str ("Component_Type");
8180 when E_In_Parameter |
8181 E_Generic_In_Parameter =>
8182 Write_Str ("Default_Value");
8185 Write_Str ("Directly_Designated_Type");
8188 Write_Str ("Discriminant_Checking_Func");
8192 Write_Str ("Prival_Link");
8194 when E_Discriminant =>
8195 Write_Str ("Discriminant_Default_Value");
8204 E_Generic_Function |
8206 E_Generic_Procedure |
8214 E_Return_Statement |
8216 E_Subprogram_Type =>
8217 Write_Str ("Last_Entity");
8220 Write_Str ("Scalar_Range");
8223 Write_Str ("Register_Exception_Call");
8226 Write_Str ("Field20??");
8228 end Write_Field20_Name;
8230 -----------------------
8231 -- Write_Field21_Name --
8232 -----------------------
8234 procedure Write_Field21_Name (Id : Entity_Id) is
8240 E_Generic_Function |
8242 E_Generic_Procedure |
8244 Write_Str ("Interface_Name");
8246 when Concurrent_Kind |
8247 Incomplete_Or_Private_Kind |
8251 Write_Str ("Discriminant_Constraint");
8254 Write_Str ("Accept_Address");
8256 when Fixed_Point_Kind =>
8257 Write_Str ("Small_Value");
8259 when E_In_Parameter =>
8260 Write_Str ("Default_Expr_Function");
8263 Modular_Integer_Kind =>
8264 Write_Str ("Original_Array_Type");
8267 Write_Str ("Field21??");
8269 end Write_Field21_Name;
8271 -----------------------
8272 -- Write_Field22_Name --
8273 -----------------------
8275 procedure Write_Field22_Name (Id : Entity_Id) is
8279 Write_Str ("Associated_Storage_Pool");
8282 Write_Str ("Component_Size");
8286 Write_Str ("Original_Record_Component");
8288 when E_Enumeration_Literal =>
8289 Write_Str ("Enumeration_Rep_Expr");
8292 Write_Str ("Exception_Code");
8295 Write_Str ("Protected_Formal");
8297 when E_Record_Type =>
8298 Write_Str ("Corresponding_Remote_Type");
8308 E_Generic_Function |
8309 E_Generic_Procedure |
8312 E_Return_Statement |
8315 Write_Str ("Scope_Depth_Value");
8317 when E_Record_Type_With_Private |
8318 E_Record_Subtype_With_Private |
8321 E_Limited_Private_Type |
8322 E_Limited_Private_Subtype =>
8323 Write_Str ("Private_View");
8326 Write_Str ("Shared_Var_Procs_Instance");
8329 Write_Str ("Field22??");
8331 end Write_Field22_Name;
8333 ------------------------
8334 -- Write_Field23_Name --
8335 ------------------------
8337 procedure Write_Field23_Name (Id : Entity_Id) is
8341 Write_Str ("Associated_Final_Chain");
8344 Write_Str ("Packed_Array_Type");
8347 Write_Str ("Entry_Cancel_Parameter");
8349 when E_Discriminant =>
8350 Write_Str ("CR_Discriminant");
8352 when E_Enumeration_Type =>
8353 Write_Str ("Enum_Pos_To_Rep");
8357 Write_Str ("Extra_Constrained");
8359 when E_Generic_Function |
8361 E_Generic_Procedure =>
8362 Write_Str ("Inner_Instances");
8364 when Concurrent_Kind |
8365 Incomplete_Or_Private_Kind |
8369 Write_Str ("Stored_Constraint");
8373 if Present (Scope (Id))
8374 and then Is_Protected_Type (Scope (Id))
8376 Write_Str ("Protection_Object");
8378 Write_Str ("Generic_Renamings");
8382 if Is_Generic_Instance (Id) then
8383 Write_Str ("Generic_Renamings");
8385 Write_Str ("Limited_View");
8389 Write_Str ("Protection_Object");
8392 Write_Str ("Field23??");
8394 end Write_Field23_Name;
8396 ------------------------
8397 -- Write_Field24_Name --
8398 ------------------------
8400 procedure Write_Field24_Name (Id : Entity_Id) is
8403 when Subprogram_Kind =>
8404 Write_Str ("Spec_PPC_List");
8406 when E_Variable | E_Constant | Type_Kind =>
8407 Write_Str ("Related_Expression");
8410 Write_Str ("Field24???");
8412 end Write_Field24_Name;
8414 ------------------------
8415 -- Write_Field25_Name --
8416 ------------------------
8418 procedure Write_Field25_Name (Id : Entity_Id) is
8422 Write_Str ("DT_Offset_To_Top_Func");
8426 Write_Str ("Interface_Alias");
8428 when E_Record_Type |
8430 E_Record_Type_With_Private |
8431 E_Record_Subtype_With_Private =>
8432 Write_Str ("Interfaces");
8435 Write_Str ("Task_Body_Procedure");
8438 Write_Str ("Debug_Renaming_Link");
8442 Write_Str ("PPC_Wrapper");
8445 Write_Str ("Field25??");
8447 end Write_Field25_Name;
8449 ------------------------
8450 -- Write_Field26_Name --
8451 ------------------------
8453 procedure Write_Field26_Name (Id : Entity_Id) is
8456 when E_Generic_Package |
8458 Write_Str ("Package_Instantiation");
8462 if Is_Dispatching_Operation (Id) then
8463 Write_Str ("Overridden_Operation");
8465 Write_Str ("Static_Initialization");
8468 when E_Record_Type |
8469 E_Record_Type_With_Private =>
8470 Write_Str ("Dispatch_Table_Wrappers");
8472 when E_In_Out_Parameter |
8475 Write_Str ("Last_Assignment");
8478 Write_Str ("Relative_Deadline_Variable");
8481 Write_Str ("Field26??");
8483 end Write_Field26_Name;
8485 ------------------------
8486 -- Write_Field27_Name --
8487 ------------------------
8489 procedure Write_Field27_Name (Id : Entity_Id) is
8495 Write_Str ("Related_Type");
8498 Write_Str ("Wrapped_Entity");
8500 when E_Package | Type_Kind =>
8501 Write_Str ("Current_Use_Clause");
8504 Write_Str ("Field27??");
8506 end Write_Field27_Name;
8508 ------------------------
8509 -- Write_Field28_Name --
8510 ------------------------
8512 procedure Write_Field28_Name (Id : Entity_Id) is
8515 when E_Procedure | E_Function | E_Entry =>
8516 Write_Str ("Extra_Formals");
8518 when E_Record_Type =>
8519 Write_Str ("Underlying_Record_View");
8522 Write_Str ("Field28??");
8524 end Write_Field28_Name;
8526 procedure Write_Field29_Name (Id : Entity_Id) is
8530 Write_Str ("Subprograms_For_Type");
8533 Write_Str ("Field29??");
8535 end Write_Field29_Name;
8537 -------------------------
8538 -- Iterator Procedures --
8539 -------------------------
8541 procedure Proc_Next_Component (N : in out Node_Id) is
8543 N := Next_Component (N);
8544 end Proc_Next_Component;
8546 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8548 N := Next_Entity (N);
8549 while Present (N) loop
8550 exit when Ekind_In (N, E_Component, E_Discriminant);
8551 N := Next_Entity (N);
8553 end Proc_Next_Component_Or_Discriminant;
8555 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8557 N := Next_Discriminant (N);
8558 end Proc_Next_Discriminant;
8560 procedure Proc_Next_Formal (N : in out Node_Id) is
8562 N := Next_Formal (N);
8563 end Proc_Next_Formal;
8565 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8567 N := Next_Formal_With_Extras (N);
8568 end Proc_Next_Formal_With_Extras;
8570 procedure Proc_Next_Index (N : in out Node_Id) is
8572 N := Next_Index (N);
8573 end Proc_Next_Index;
8575 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8577 N := Next_Inlined_Subprogram (N);
8578 end Proc_Next_Inlined_Subprogram;
8580 procedure Proc_Next_Literal (N : in out Node_Id) is
8582 N := Next_Literal (N);
8583 end Proc_Next_Literal;
8585 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8587 N := Next_Stored_Discriminant (N);
8588 end Proc_Next_Stored_Discriminant;