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;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- 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 -- Static_Predicate List25
219 -- Task_Body_Procedure Node25
221 -- Dispatch_Table_Wrappers Elist26
222 -- Last_Assignment Node26
223 -- Overridden_Operation Node26
224 -- Package_Instantiation Node26
225 -- Relative_Deadline_Variable Node26
226 -- Static_Initialization Node26
228 -- Current_Use_Clause Node27
229 -- Related_Type Node27
230 -- Wrapped_Entity Node27
232 -- Extra_Formals Node28
233 -- Underlying_Record_View Node28
235 -- Subprograms_For_Type Node29
237 ---------------------------------------------
238 -- Usage of Flags in Defining Entity Nodes --
239 ---------------------------------------------
241 -- All flags are unique, there is no overlaying, so each flag is physically
242 -- present in every entity. However, for many of the flags, it only makes
243 -- sense for them to be set true for certain subsets of entity kinds. See
244 -- the spec of Einfo for further details.
246 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
249 -- Has_Discriminants Flag5
250 -- Is_Dispatching_Operation Flag6
251 -- Is_Immediately_Visible Flag7
253 -- Is_Potentially_Use_Visible Flag9
257 -- Is_Constrained Flag12
258 -- Is_Generic_Type Flag13
259 -- Depends_On_Private Flag14
261 -- Is_Volatile Flag16
262 -- Is_Internal Flag17
263 -- Has_Delayed_Freeze Flag18
264 -- Is_Abstract_Subprogram Flag19
265 -- Is_Concurrent_Record_Type Flag20
267 -- Has_Master_Entity Flag21
268 -- Needs_No_Actuals Flag22
269 -- Has_Storage_Size_Clause Flag23
270 -- Is_Imported Flag24
271 -- Is_Limited_Record Flag25
272 -- Has_Completion Flag26
273 -- Has_Pragma_Controlled Flag27
274 -- Is_Statically_Allocated Flag28
275 -- Has_Size_Clause Flag29
278 -- Checks_May_Be_Suppressed Flag31
279 -- Kill_Elaboration_Checks Flag32
280 -- Kill_Range_Checks Flag33
281 -- Kill_Tag_Checks Flag34
282 -- Is_Class_Wide_Equivalent_Type Flag35
283 -- Referenced_As_LHS Flag36
284 -- Is_Known_Non_Null Flag37
285 -- Can_Never_Be_Null Flag38
286 -- Has_Default_Value Flag39
287 -- Body_Needed_For_SAL Flag40
289 -- Treat_As_Volatile Flag41
290 -- Is_Controlled Flag42
291 -- Has_Controlled_Component Flag43
293 -- In_Private_Part Flag45
294 -- Has_Alignment_Clause Flag46
296 -- In_Package_Body Flag48
298 -- Delay_Subprogram_Descriptors Flag50
301 -- Is_Entry_Formal Flag52
302 -- Is_Private_Descendant Flag53
303 -- Return_Present Flag54
304 -- Is_Tagged_Type Flag55
305 -- Has_Homonym Flag56
307 -- Non_Binary_Modulus Flag58
308 -- Is_Preelaborated Flag59
309 -- Is_Shared_Passive Flag60
311 -- Is_Remote_Types Flag61
312 -- Is_Remote_Call_Interface Flag62
313 -- Is_Character_Type Flag63
314 -- Is_Intrinsic_Subprogram Flag64
315 -- Has_Record_Rep_Clause Flag65
316 -- Has_Enumeration_Rep_Clause Flag66
317 -- Has_Small_Clause Flag67
318 -- Has_Component_Size_Clause Flag68
319 -- Is_Access_Constant Flag69
320 -- Is_First_Subtype Flag70
322 -- Has_Completion_In_Body Flag71
323 -- Has_Unknown_Discriminants Flag72
324 -- Is_Child_Unit Flag73
325 -- Is_CPP_Class Flag74
326 -- Has_Non_Standard_Rep Flag75
327 -- Is_Constructor Flag76
328 -- Static_Elaboration_Desired Flag77
330 -- Has_All_Calls_Remote Flag79
331 -- Is_Constr_Subt_For_U_Nominal Flag80
333 -- Is_Asynchronous Flag81
334 -- Has_Gigi_Rep_Item Flag82
335 -- Has_Machine_Radix_Clause Flag83
336 -- Machine_Radix_10 Flag84
338 -- Has_Atomic_Components Flag86
339 -- Has_Volatile_Components Flag87
340 -- Discard_Names Flag88
341 -- Is_Interrupt_Handler Flag89
342 -- Returns_By_Ref Flag90
345 -- Size_Known_At_Compile_Time Flag92
346 -- Has_Subprogram_Descriptor Flag93
347 -- Is_Generic_Actual_Type Flag94
348 -- Uses_Sec_Stack Flag95
349 -- Warnings_Off Flag96
350 -- Is_Controlling_Formal Flag97
351 -- Has_Controlling_Result Flag98
352 -- Is_Exported Flag99
353 -- Has_Specified_Layout Flag100
355 -- Has_Nested_Block_With_Handler Flag101
357 -- Is_Completely_Hidden Flag103
358 -- Address_Taken Flag104
359 -- Suppress_Init_Proc Flag105
360 -- Is_Limited_Composite Flag106
361 -- Is_Private_Composite Flag107
362 -- Default_Expressions_Processed Flag108
363 -- Is_Non_Static_Subtype Flag109
364 -- Has_External_Tag_Rep_Clause Flag110
366 -- Is_Formal_Subprogram Flag111
367 -- Is_Renaming_Of_Object Flag112
369 -- Delay_Cleanups Flag114
370 -- Never_Set_In_Source Flag115
371 -- Is_Visible_Child_Unit Flag116
372 -- Is_Unchecked_Union Flag117
373 -- Is_For_Access_Subtype Flag118
374 -- Has_Convention_Pragma Flag119
375 -- Has_Primitive_Operations Flag120
377 -- Has_Pragma_Pack Flag121
378 -- Is_Bit_Packed_Array Flag122
379 -- Has_Unchecked_Union Flag123
380 -- Is_Eliminated Flag124
381 -- C_Pass_By_Copy Flag125
382 -- Is_Instantiated Flag126
383 -- Is_Valued_Procedure Flag127
384 -- (used for Component_Alignment) Flag128
385 -- (used for Component_Alignment) Flag129
386 -- Is_Generic_Instance Flag130
388 -- No_Pool_Assigned Flag131
389 -- Is_AST_Entry Flag132
390 -- Is_VMS_Exception Flag133
391 -- Is_Optional_Parameter Flag134
392 -- Has_Aliased_Components Flag135
393 -- No_Strict_Aliasing Flag136
394 -- Is_Machine_Code_Subprogram Flag137
395 -- Is_Packed_Array_Type Flag138
396 -- Has_Biased_Representation Flag139
397 -- Has_Complex_Representation Flag140
399 -- Is_Constr_Subt_For_UN_Aliased Flag141
400 -- Has_Missing_Return Flag142
401 -- Has_Recursive_Call Flag143
402 -- Is_Unsigned_Type Flag144
403 -- Strict_Alignment Flag145
404 -- Is_Abstract_Type Flag146
405 -- Needs_Debug_Info Flag147
406 -- Suppress_Elaboration_Warnings Flag148
407 -- Is_Compilation_Unit Flag149
408 -- Has_Pragma_Elaborate_Body Flag150
410 -- Has_Default_Component_Value Flag151
411 -- Entry_Accepted Flag152
412 -- Is_Obsolescent Flag153
413 -- Has_Per_Object_Constraint Flag154
414 -- Has_Private_Declaration Flag155
415 -- Referenced Flag156
416 -- Has_Pragma_Inline Flag157
417 -- Finalize_Storage_Only Flag158
418 -- From_With_Type Flag159
419 -- Is_Package_Body_Entity Flag160
421 -- Has_Qualified_Name Flag161
422 -- Nonzero_Is_True Flag162
423 -- Is_True_Constant Flag163
424 -- Reverse_Bit_Order Flag164
425 -- Suppress_Style_Checks Flag165
426 -- Debug_Info_Off Flag166
427 -- Sec_Stack_Needed_For_Return Flag167
428 -- Materialize_Entity Flag168
429 -- Has_Pragma_Thread_Local_Storage Flag169
430 -- Is_Known_Valid Flag170
432 -- Is_Hidden_Open_Scope Flag171
433 -- Has_Object_Size_Clause Flag172
434 -- Has_Fully_Qualified_Name Flag173
435 -- Elaboration_Entity_Required Flag174
436 -- Has_Forward_Instantiation Flag175
437 -- Is_Discrim_SO_Function Flag176
438 -- Size_Depends_On_Discriminant Flag177
439 -- Is_Null_Init_Proc Flag178
440 -- Has_Pragma_Pure_Function Flag179
441 -- Has_Pragma_Unreferenced Flag180
443 -- Has_Contiguous_Rep Flag181
444 -- Has_Xref_Entry Flag182
445 -- Must_Be_On_Byte_Boundary Flag183
446 -- Has_Stream_Size_Clause Flag184
447 -- Is_Ada_2005_Only Flag185
448 -- Is_Interface Flag186
449 -- Has_Constrained_Partial_View Flag187
450 -- Has_Persistent_BSS Flag188
451 -- Is_Pure_Unit_Access_Type Flag189
452 -- Has_Specified_Stream_Input Flag190
454 -- Has_Specified_Stream_Output Flag191
455 -- Has_Specified_Stream_Read Flag192
456 -- Has_Specified_Stream_Write Flag193
457 -- Is_Local_Anonymous_Access Flag194
458 -- Is_Primitive_Wrapper Flag195
459 -- Was_Hidden Flag196
460 -- Is_Limited_Interface Flag197
461 -- Has_Pragma_Ordered Flag198
462 -- Is_Ada_2012_Only Flag199
464 -- Has_Delayed_Aspects Flag200
465 -- Has_Anon_Block_Suffix Flag201
466 -- Itype_Printed Flag202
467 -- Has_Pragma_Pure Flag203
468 -- Is_Known_Null Flag204
469 -- Low_Bound_Tested Flag205
470 -- Is_Visible_Formal Flag206
471 -- Known_To_Have_Preelab_Init Flag207
472 -- Must_Have_Preelab_Init Flag208
473 -- Is_Return_Object Flag209
474 -- Elaborate_Body_Desirable Flag210
476 -- Has_Static_Discriminants Flag211
477 -- Has_Pragma_Unreferenced_Objects Flag212
478 -- Requires_Overriding Flag213
480 -- Has_Up_Level_Access Flag215
481 -- Universal_Aliasing Flag216
482 -- Suppress_Value_Tracking_On_Call Flag217
483 -- Is_Primitive Flag218
484 -- Has_Initial_Value Flag219
485 -- Has_Dispatch_Table Flag220
487 -- Has_Pragma_Preelab_Init Flag221
488 -- Used_As_Generic_Actual Flag222
489 -- Is_Descendent_Of_Address Flag223
492 -- Is_Only_Out_Parameter Flag226
493 -- Referenced_As_Out_Parameter Flag227
494 -- Has_Thunks Flag228
495 -- Can_Use_Internal_Rep Flag229
496 -- Has_Pragma_Inline_Always Flag230
498 -- Renamed_In_Spec Flag231
499 -- Has_Invariants Flag232
500 -- Has_Pragma_Unmodified Flag233
501 -- Is_Dispatch_Table_Entity Flag234
502 -- Is_Trivial_Subprogram Flag235
503 -- Warnings_Off_Used Flag236
504 -- Warnings_Off_Used_Unmodified Flag237
505 -- Warnings_Off_Used_Unreferenced Flag238
506 -- OK_To_Reorder_Components Flag239
507 -- Has_Postconditions Flag240
509 -- Optimize_Alignment_Space Flag241
510 -- Optimize_Alignment_Time Flag242
511 -- Overlays_Constant Flag243
512 -- Is_RACW_Stub_Type Flag244
513 -- Is_Private_Primitive Flag245
514 -- Is_Underlying_Record_View Flag246
515 -- OK_To_Rename Flag247
516 -- Has_Inheritable_Invariants Flag248
517 -- Has_Predicates Flag250
525 -----------------------
526 -- Local subprograms --
527 -----------------------
529 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
530 -- Returns the attribute definition clause for Id whose name is Rep_Name.
531 -- Returns Empty if no matching attribute definition clause found for Id.
537 function Float_Rep (Id : E) return F is
538 pragma Assert (Is_Floating_Point_Type (Id));
540 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
547 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
551 Ritem := First_Rep_Item (Id);
552 while Present (Ritem) loop
553 if Nkind (Ritem) = N_Attribute_Definition_Clause
554 and then Chars (Ritem) = Rep_Name
558 Next_Rep_Item (Ritem);
565 --------------------------------
566 -- Attribute Access Functions --
567 --------------------------------
569 function Accept_Address (Id : E) return L is
574 function Access_Disp_Table (Id : E) return L is
576 pragma Assert (Ekind_In (Id, E_Record_Type,
578 return Elist16 (Implementation_Base_Type (Id));
579 end Access_Disp_Table;
581 function Actual_Subtype (Id : E) return E is
584 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
585 or else Is_Formal (Id));
589 function Address_Taken (Id : E) return B is
594 function Alias (Id : E) return E is
597 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
601 function Alignment (Id : E) return U is
603 pragma Assert (Is_Type (Id)
604 or else Is_Formal (Id)
605 or else Ekind_In (Id, E_Loop_Parameter,
612 function Associated_Final_Chain (Id : E) return E is
614 pragma Assert (Is_Access_Type (Id));
616 end Associated_Final_Chain;
618 function Associated_Formal_Package (Id : E) return E is
620 pragma Assert (Ekind (Id) = E_Package);
622 end Associated_Formal_Package;
624 function Associated_Node_For_Itype (Id : E) return N is
627 end Associated_Node_For_Itype;
629 function Associated_Storage_Pool (Id : E) return E is
631 pragma Assert (Is_Access_Type (Id));
632 return Node22 (Root_Type (Id));
633 end Associated_Storage_Pool;
635 function Barrier_Function (Id : E) return N is
637 pragma Assert (Is_Entry (Id));
639 end Barrier_Function;
641 function Block_Node (Id : E) return N is
643 pragma Assert (Ekind (Id) = E_Block);
647 function Body_Entity (Id : E) return E is
649 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
653 function Body_Needed_For_SAL (Id : E) return B is
656 (Ekind (Id) = E_Package
657 or else Is_Subprogram (Id)
658 or else Is_Generic_Unit (Id));
660 end Body_Needed_For_SAL;
662 function C_Pass_By_Copy (Id : E) return B is
664 pragma Assert (Is_Record_Type (Id));
665 return Flag125 (Implementation_Base_Type (Id));
668 function Can_Never_Be_Null (Id : E) return B is
671 end Can_Never_Be_Null;
673 function Checks_May_Be_Suppressed (Id : E) return B is
676 end Checks_May_Be_Suppressed;
678 function Class_Wide_Type (Id : E) return E is
680 pragma Assert (Is_Type (Id));
684 function Cloned_Subtype (Id : E) return E is
686 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
690 function Component_Bit_Offset (Id : E) return U is
692 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
694 end Component_Bit_Offset;
696 function Component_Clause (Id : E) return N is
698 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
700 end Component_Clause;
702 function Component_Size (Id : E) return U is
704 pragma Assert (Is_Array_Type (Id));
705 return Uint22 (Implementation_Base_Type (Id));
708 function Component_Type (Id : E) return E is
710 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
711 return Node20 (Implementation_Base_Type (Id));
714 function Corresponding_Concurrent_Type (Id : E) return E is
716 pragma Assert (Ekind (Id) = E_Record_Type);
718 end Corresponding_Concurrent_Type;
720 function Corresponding_Discriminant (Id : E) return E is
722 pragma Assert (Ekind (Id) = E_Discriminant);
724 end Corresponding_Discriminant;
726 function Corresponding_Equality (Id : E) return E is
729 (Ekind (Id) = E_Function
730 and then not Comes_From_Source (Id)
731 and then Chars (Id) = Name_Op_Ne);
733 end Corresponding_Equality;
735 function Corresponding_Protected_Entry (Id : E) return E is
737 pragma Assert (Ekind (Id) = E_Subprogram_Body);
739 end Corresponding_Protected_Entry;
741 function Corresponding_Record_Type (Id : E) return E is
743 pragma Assert (Is_Concurrent_Type (Id));
745 end Corresponding_Record_Type;
747 function Corresponding_Remote_Type (Id : E) return E is
750 end Corresponding_Remote_Type;
752 function Current_Use_Clause (Id : E) return E is
754 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
756 end Current_Use_Clause;
758 function Current_Value (Id : E) return N is
760 pragma Assert (Ekind (Id) in Object_Kind);
764 function CR_Discriminant (Id : E) return E is
769 function Debug_Info_Off (Id : E) return B is
774 function Debug_Renaming_Link (Id : E) return E is
777 end Debug_Renaming_Link;
779 function Default_Expr_Function (Id : E) return E is
781 pragma Assert (Is_Formal (Id));
783 end Default_Expr_Function;
785 function Default_Expressions_Processed (Id : E) return B is
788 end Default_Expressions_Processed;
790 function Default_Value (Id : E) return N is
792 pragma Assert (Is_Formal (Id));
796 function Delay_Cleanups (Id : E) return B is
801 function Delay_Subprogram_Descriptors (Id : E) return B is
804 end Delay_Subprogram_Descriptors;
806 function Delta_Value (Id : E) return R is
808 pragma Assert (Is_Fixed_Point_Type (Id));
812 function Dependent_Instances (Id : E) return L is
814 pragma Assert (Is_Generic_Instance (Id));
816 end Dependent_Instances;
818 function Depends_On_Private (Id : E) return B is
820 pragma Assert (Nkind (Id) in N_Entity);
822 end Depends_On_Private;
824 function Digits_Value (Id : E) return U is
827 (Is_Floating_Point_Type (Id)
828 or else Is_Decimal_Fixed_Point_Type (Id));
832 function Direct_Primitive_Operations (Id : E) return L is
834 pragma Assert (Is_Tagged_Type (Id));
836 end Direct_Primitive_Operations;
838 function Directly_Designated_Type (Id : E) return E is
840 pragma Assert (Is_Access_Type (Id));
842 end Directly_Designated_Type;
844 function Discard_Names (Id : E) return B is
849 function Discriminal (Id : E) return E is
851 pragma Assert (Ekind (Id) = E_Discriminant);
855 function Discriminal_Link (Id : E) return N is
858 end Discriminal_Link;
860 function Discriminant_Checking_Func (Id : E) return E is
862 pragma Assert (Ekind (Id) = E_Component);
864 end Discriminant_Checking_Func;
866 function Discriminant_Constraint (Id : E) return L is
868 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
870 end Discriminant_Constraint;
872 function Discriminant_Default_Value (Id : E) return N is
874 pragma Assert (Ekind (Id) = E_Discriminant);
876 end Discriminant_Default_Value;
878 function Discriminant_Number (Id : E) return U is
880 pragma Assert (Ekind (Id) = E_Discriminant);
882 end Discriminant_Number;
884 function Dispatch_Table_Wrappers (Id : E) return L is
886 pragma Assert (Ekind_In (Id, E_Record_Type,
888 return Elist26 (Implementation_Base_Type (Id));
889 end Dispatch_Table_Wrappers;
891 function DT_Entry_Count (Id : E) return U is
893 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
897 function DT_Offset_To_Top_Func (Id : E) return E is
899 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
901 end DT_Offset_To_Top_Func;
903 function DT_Position (Id : E) return U is
905 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
906 and then Present (DTC_Entity (Id)));
910 function DTC_Entity (Id : E) return E is
912 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
916 function Elaborate_Body_Desirable (Id : E) return B is
918 pragma Assert (Ekind (Id) = E_Package);
920 end Elaborate_Body_Desirable;
922 function Elaboration_Entity (Id : E) return E is
927 Ekind (Id) = E_Package
929 Is_Generic_Unit (Id));
931 end Elaboration_Entity;
933 function Elaboration_Entity_Required (Id : E) return B is
938 Ekind (Id) = E_Package
940 Is_Generic_Unit (Id));
942 end Elaboration_Entity_Required;
944 function Enclosing_Scope (Id : E) return E is
949 function Entry_Accepted (Id : E) return B is
951 pragma Assert (Is_Entry (Id));
955 function Entry_Bodies_Array (Id : E) return E is
958 end Entry_Bodies_Array;
960 function Entry_Cancel_Parameter (Id : E) return E is
963 end Entry_Cancel_Parameter;
965 function Entry_Component (Id : E) return E is
970 function Entry_Formal (Id : E) return E is
975 function Entry_Index_Constant (Id : E) return N is
977 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
979 end Entry_Index_Constant;
981 function Entry_Parameters_Type (Id : E) return E is
984 end Entry_Parameters_Type;
986 function Enum_Pos_To_Rep (Id : E) return E is
988 pragma Assert (Ekind (Id) = E_Enumeration_Type);
992 function Enumeration_Pos (Id : E) return Uint is
994 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
998 function Enumeration_Rep (Id : E) return U is
1000 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1002 end Enumeration_Rep;
1004 function Enumeration_Rep_Expr (Id : E) return N is
1006 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1008 end Enumeration_Rep_Expr;
1010 function Equivalent_Type (Id : E) return E is
1013 (Ekind_In (Id, E_Class_Wide_Type,
1014 E_Class_Wide_Subtype,
1015 E_Access_Protected_Subprogram_Type,
1016 E_Anonymous_Access_Protected_Subprogram_Type,
1017 E_Access_Subprogram_Type,
1020 end Equivalent_Type;
1022 function Esize (Id : E) return Uint is
1027 function Exception_Code (Id : E) return Uint is
1029 pragma Assert (Ekind (Id) = E_Exception);
1033 function Extra_Accessibility (Id : E) return E is
1035 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1037 end Extra_Accessibility;
1039 function Extra_Constrained (Id : E) return E is
1041 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1043 end Extra_Constrained;
1045 function Extra_Formal (Id : E) return E is
1050 function Extra_Formals (Id : E) return E is
1053 (Is_Overloadable (Id)
1054 or else Ekind_In (Id, E_Entry_Family,
1056 E_Subprogram_Type));
1060 function Can_Use_Internal_Rep (Id : E) return B is
1062 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1063 return Flag229 (Base_Type (Id));
1064 end Can_Use_Internal_Rep;
1066 function Finalization_Chain_Entity (Id : E) return E is
1069 end Finalization_Chain_Entity;
1071 function Finalize_Storage_Only (Id : E) return B is
1073 pragma Assert (Is_Type (Id));
1074 return Flag158 (Base_Type (Id));
1075 end Finalize_Storage_Only;
1077 function First_Entity (Id : E) return E is
1082 function First_Exit_Statement (Id : E) return N is
1084 pragma Assert (Ekind (Id) = E_Loop);
1086 end First_Exit_Statement;
1088 function First_Index (Id : E) return N is
1090 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1094 function First_Literal (Id : E) return E is
1096 pragma Assert (Is_Enumeration_Type (Id));
1100 function First_Optional_Parameter (Id : E) return E is
1102 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1104 end First_Optional_Parameter;
1106 function First_Private_Entity (Id : E) return E is
1108 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1109 or else Ekind (Id) in Concurrent_Kind);
1111 end First_Private_Entity;
1113 function First_Rep_Item (Id : E) return E is
1118 function Freeze_Node (Id : E) return N is
1123 function From_With_Type (Id : E) return B is
1125 return Flag159 (Id);
1128 function Full_View (Id : E) return E is
1130 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1134 function Generic_Homonym (Id : E) return E is
1136 pragma Assert (Ekind (Id) = E_Generic_Package);
1138 end Generic_Homonym;
1140 function Generic_Renamings (Id : E) return L is
1142 return Elist23 (Id);
1143 end Generic_Renamings;
1145 function Handler_Records (Id : E) return S is
1148 end Handler_Records;
1150 function Has_Aliased_Components (Id : E) return B is
1152 return Flag135 (Implementation_Base_Type (Id));
1153 end Has_Aliased_Components;
1155 function Has_Alignment_Clause (Id : E) return B is
1158 end Has_Alignment_Clause;
1160 function Has_All_Calls_Remote (Id : E) return B is
1163 end Has_All_Calls_Remote;
1165 function Has_Anon_Block_Suffix (Id : E) return B is
1167 return Flag201 (Id);
1168 end Has_Anon_Block_Suffix;
1170 function Has_Atomic_Components (Id : E) return B is
1172 return Flag86 (Implementation_Base_Type (Id));
1173 end Has_Atomic_Components;
1175 function Has_Biased_Representation (Id : E) return B is
1177 return Flag139 (Id);
1178 end Has_Biased_Representation;
1180 function Has_Completion (Id : E) return B is
1185 function Has_Completion_In_Body (Id : E) return B is
1187 pragma Assert (Is_Type (Id));
1189 end Has_Completion_In_Body;
1191 function Has_Complex_Representation (Id : E) return B is
1193 pragma Assert (Is_Type (Id));
1194 return Flag140 (Implementation_Base_Type (Id));
1195 end Has_Complex_Representation;
1197 function Has_Component_Size_Clause (Id : E) return B is
1199 pragma Assert (Is_Array_Type (Id));
1200 return Flag68 (Implementation_Base_Type (Id));
1201 end Has_Component_Size_Clause;
1203 function Has_Constrained_Partial_View (Id : E) return B is
1205 pragma Assert (Is_Type (Id));
1206 return Flag187 (Id);
1207 end Has_Constrained_Partial_View;
1209 function Has_Controlled_Component (Id : E) return B is
1211 return Flag43 (Base_Type (Id));
1212 end Has_Controlled_Component;
1214 function Has_Contiguous_Rep (Id : E) return B is
1216 return Flag181 (Id);
1217 end Has_Contiguous_Rep;
1219 function Has_Controlling_Result (Id : E) return B is
1222 end Has_Controlling_Result;
1224 function Has_Convention_Pragma (Id : E) return B is
1226 return Flag119 (Id);
1227 end Has_Convention_Pragma;
1229 function Has_Default_Component_Value (Id : E) return B is
1231 pragma Assert (Is_Array_Type (Id));
1232 return Flag151 (Base_Type (Id));
1233 end Has_Default_Component_Value;
1235 function Has_Default_Value (Id : E) return B is
1237 pragma Assert (Is_Scalar_Type (Id));
1238 return Flag39 (Base_Type (Id));
1239 end Has_Default_Value;
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_Package_Body_Entity (Id : E) return B is
1957 return Flag160 (Id);
1958 end Is_Package_Body_Entity;
1960 function Is_Packed (Id : E) return B is
1962 return Flag51 (Implementation_Base_Type (Id));
1965 function Is_Packed_Array_Type (Id : E) return B is
1967 return Flag138 (Id);
1968 end Is_Packed_Array_Type;
1970 function Is_Potentially_Use_Visible (Id : E) return B is
1972 pragma Assert (Nkind (Id) in N_Entity);
1974 end Is_Potentially_Use_Visible;
1976 function Is_Preelaborated (Id : E) return B is
1979 end Is_Preelaborated;
1981 function Is_Primitive (Id : E) return B is
1984 (Is_Overloadable (Id)
1985 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1986 return Flag218 (Id);
1989 function Is_Primitive_Wrapper (Id : E) return B is
1991 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1992 return Flag195 (Id);
1993 end Is_Primitive_Wrapper;
1995 function Is_Private_Composite (Id : E) return B is
1997 pragma Assert (Is_Type (Id));
1998 return Flag107 (Id);
1999 end Is_Private_Composite;
2001 function Is_Private_Descendant (Id : E) return B is
2004 end Is_Private_Descendant;
2006 function Is_Private_Primitive (Id : E) return B is
2008 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2009 return Flag245 (Id);
2010 end Is_Private_Primitive;
2012 function Is_Public (Id : E) return B is
2014 pragma Assert (Nkind (Id) in N_Entity);
2018 function Is_Pure (Id : E) return B is
2023 function Is_Pure_Unit_Access_Type (Id : E) return B is
2025 pragma Assert (Is_Access_Type (Id));
2026 return Flag189 (Id);
2027 end Is_Pure_Unit_Access_Type;
2029 function Is_RACW_Stub_Type (Id : E) return B is
2031 pragma Assert (Is_Type (Id));
2032 return Flag244 (Id);
2033 end Is_RACW_Stub_Type;
2035 function Is_Raised (Id : E) return B is
2037 pragma Assert (Ekind (Id) = E_Exception);
2038 return Flag224 (Id);
2041 function Is_Remote_Call_Interface (Id : E) return B is
2044 end Is_Remote_Call_Interface;
2046 function Is_Remote_Types (Id : E) return B is
2049 end Is_Remote_Types;
2051 function Is_Renaming_Of_Object (Id : E) return B is
2053 return Flag112 (Id);
2054 end Is_Renaming_Of_Object;
2056 function Is_Return_Object (Id : E) return B is
2058 return Flag209 (Id);
2059 end Is_Return_Object;
2061 function Is_Shared_Passive (Id : E) return B is
2064 end Is_Shared_Passive;
2066 function Is_Statically_Allocated (Id : E) return B is
2069 end Is_Statically_Allocated;
2071 function Is_Tag (Id : E) return B is
2073 pragma Assert (Nkind (Id) in N_Entity);
2077 function Is_Tagged_Type (Id : E) return B is
2082 function Is_Thunk (Id : E) return B is
2084 pragma Assert (Is_Subprogram (Id));
2085 return Flag225 (Id);
2088 function Is_Trivial_Subprogram (Id : E) return B is
2090 return Flag235 (Id);
2091 end Is_Trivial_Subprogram;
2093 function Is_True_Constant (Id : E) return B is
2095 return Flag163 (Id);
2096 end Is_True_Constant;
2098 function Is_Unchecked_Union (Id : E) return B is
2100 return Flag117 (Implementation_Base_Type (Id));
2101 end Is_Unchecked_Union;
2103 function Is_Underlying_Record_View (Id : E) return B is
2105 return Flag246 (Id);
2106 end Is_Underlying_Record_View;
2108 function Is_Unsigned_Type (Id : E) return B is
2110 pragma Assert (Is_Type (Id));
2111 return Flag144 (Id);
2112 end Is_Unsigned_Type;
2114 function Is_Valued_Procedure (Id : E) return B is
2116 pragma Assert (Ekind (Id) = E_Procedure);
2117 return Flag127 (Id);
2118 end Is_Valued_Procedure;
2120 function Is_Visible_Child_Unit (Id : E) return B is
2122 pragma Assert (Is_Child_Unit (Id));
2123 return Flag116 (Id);
2124 end Is_Visible_Child_Unit;
2126 function Is_Visible_Formal (Id : E) return B is
2128 return Flag206 (Id);
2129 end Is_Visible_Formal;
2131 function Is_VMS_Exception (Id : E) return B is
2133 return Flag133 (Id);
2134 end Is_VMS_Exception;
2136 function Is_Volatile (Id : E) return B is
2138 pragma Assert (Nkind (Id) in N_Entity);
2140 if Is_Type (Id) then
2141 return Flag16 (Base_Type (Id));
2147 function Itype_Printed (Id : E) return B is
2149 pragma Assert (Is_Itype (Id));
2150 return Flag202 (Id);
2153 function Kill_Elaboration_Checks (Id : E) return B is
2156 end Kill_Elaboration_Checks;
2158 function Kill_Range_Checks (Id : E) return B is
2161 end Kill_Range_Checks;
2163 function Kill_Tag_Checks (Id : E) return B is
2166 end Kill_Tag_Checks;
2168 function Known_To_Have_Preelab_Init (Id : E) return B is
2170 pragma Assert (Is_Type (Id));
2171 return Flag207 (Id);
2172 end Known_To_Have_Preelab_Init;
2174 function Last_Assignment (Id : E) return N is
2176 pragma Assert (Is_Assignable (Id));
2178 end Last_Assignment;
2180 function Last_Entity (Id : E) return E is
2185 function Limited_View (Id : E) return E is
2187 pragma Assert (Ekind (Id) = E_Package);
2191 function Lit_Indexes (Id : E) return E is
2193 pragma Assert (Is_Enumeration_Type (Id));
2197 function Lit_Strings (Id : E) return E is
2199 pragma Assert (Is_Enumeration_Type (Id));
2203 function Low_Bound_Tested (Id : E) return B is
2205 return Flag205 (Id);
2206 end Low_Bound_Tested;
2208 function Machine_Radix_10 (Id : E) return B is
2210 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2212 end Machine_Radix_10;
2214 function Master_Id (Id : E) return E is
2216 pragma Assert (Is_Access_Type (Id));
2220 function Materialize_Entity (Id : E) return B is
2222 return Flag168 (Id);
2223 end Materialize_Entity;
2225 function Mechanism (Id : E) return M is
2227 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2228 return UI_To_Int (Uint8 (Id));
2231 function Modulus (Id : E) return Uint is
2233 pragma Assert (Is_Modular_Integer_Type (Id));
2234 return Uint17 (Base_Type (Id));
2237 function Must_Be_On_Byte_Boundary (Id : E) return B is
2239 pragma Assert (Is_Type (Id));
2240 return Flag183 (Id);
2241 end Must_Be_On_Byte_Boundary;
2243 function Must_Have_Preelab_Init (Id : E) return B is
2245 pragma Assert (Is_Type (Id));
2246 return Flag208 (Id);
2247 end Must_Have_Preelab_Init;
2249 function Needs_Debug_Info (Id : E) return B is
2251 return Flag147 (Id);
2252 end Needs_Debug_Info;
2254 function Needs_No_Actuals (Id : E) return B is
2257 (Is_Overloadable (Id)
2258 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2260 end Needs_No_Actuals;
2262 function Never_Set_In_Source (Id : E) return B is
2264 return Flag115 (Id);
2265 end Never_Set_In_Source;
2267 function Next_Inlined_Subprogram (Id : E) return E is
2270 end Next_Inlined_Subprogram;
2272 function No_Pool_Assigned (Id : E) return B is
2274 pragma Assert (Is_Access_Type (Id));
2275 return Flag131 (Root_Type (Id));
2276 end No_Pool_Assigned;
2278 function No_Return (Id : E) return B is
2280 return Flag113 (Id);
2283 function No_Strict_Aliasing (Id : E) return B is
2285 pragma Assert (Is_Access_Type (Id));
2286 return Flag136 (Base_Type (Id));
2287 end No_Strict_Aliasing;
2289 function Non_Binary_Modulus (Id : E) return B is
2291 pragma Assert (Is_Type (Id));
2292 return Flag58 (Base_Type (Id));
2293 end Non_Binary_Modulus;
2295 function Non_Limited_View (Id : E) return E is
2297 pragma Assert (Ekind (Id) in Incomplete_Kind);
2299 end Non_Limited_View;
2301 function Nonzero_Is_True (Id : E) return B is
2303 pragma Assert (Root_Type (Id) = Standard_Boolean);
2304 return Flag162 (Base_Type (Id));
2305 end Nonzero_Is_True;
2307 function Normalized_First_Bit (Id : E) return U is
2309 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2311 end Normalized_First_Bit;
2313 function Normalized_Position (Id : E) return U is
2315 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2317 end Normalized_Position;
2319 function Normalized_Position_Max (Id : E) return U is
2321 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2323 end Normalized_Position_Max;
2325 function OK_To_Rename (Id : E) return B is
2327 pragma Assert (Ekind (Id) = E_Variable);
2328 return Flag247 (Id);
2331 function OK_To_Reorder_Components (Id : E) return B is
2333 pragma Assert (Is_Record_Type (Id));
2334 return Flag239 (Base_Type (Id));
2335 end OK_To_Reorder_Components;
2337 function Optimize_Alignment_Space (Id : E) return B is
2340 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2341 return Flag241 (Id);
2342 end Optimize_Alignment_Space;
2344 function Optimize_Alignment_Time (Id : E) return B is
2347 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2348 return Flag242 (Id);
2349 end Optimize_Alignment_Time;
2351 function Original_Array_Type (Id : E) return E is
2353 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2355 end Original_Array_Type;
2357 function Original_Record_Component (Id : E) return E is
2359 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2361 end Original_Record_Component;
2363 function Overlays_Constant (Id : E) return B is
2365 return Flag243 (Id);
2366 end Overlays_Constant;
2368 function Overridden_Operation (Id : E) return E is
2371 end Overridden_Operation;
2373 function Package_Instantiation (Id : E) return N is
2375 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2377 end Package_Instantiation;
2379 function Packed_Array_Type (Id : E) return E is
2381 pragma Assert (Is_Array_Type (Id));
2383 end Packed_Array_Type;
2385 function Parent_Subtype (Id : E) return E is
2387 pragma Assert (Is_Record_Type (Id));
2388 return Node19 (Base_Type (Id));
2391 function Postcondition_Proc (Id : E) return E is
2393 pragma Assert (Ekind (Id) = E_Procedure);
2395 end Postcondition_Proc;
2397 function PPC_Wrapper (Id : E) return E is
2399 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2403 function Prival (Id : E) return E is
2405 pragma Assert (Is_Protected_Component (Id));
2409 function Prival_Link (Id : E) return E is
2411 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2415 function Private_Dependents (Id : E) return L is
2417 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2418 return Elist18 (Id);
2419 end Private_Dependents;
2421 function Private_View (Id : E) return N is
2423 pragma Assert (Is_Private_Type (Id));
2427 function Protected_Body_Subprogram (Id : E) return E is
2429 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2431 end Protected_Body_Subprogram;
2433 function Protected_Formal (Id : E) return E is
2435 pragma Assert (Is_Formal (Id));
2437 end Protected_Formal;
2439 function Protection_Object (Id : E) return E is
2442 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2444 end Protection_Object;
2446 function Reachable (Id : E) return B is
2451 function Referenced (Id : E) return B is
2453 return Flag156 (Id);
2456 function Referenced_As_LHS (Id : E) return B is
2459 end Referenced_As_LHS;
2461 function Referenced_As_Out_Parameter (Id : E) return B is
2463 return Flag227 (Id);
2464 end Referenced_As_Out_Parameter;
2466 function Register_Exception_Call (Id : E) return N is
2468 pragma Assert (Ekind (Id) = E_Exception);
2470 end Register_Exception_Call;
2472 function Related_Array_Object (Id : E) return E is
2474 pragma Assert (Is_Array_Type (Id));
2476 end Related_Array_Object;
2478 function Related_Expression (Id : E) return N is
2480 pragma Assert (Ekind (Id) in Type_Kind
2481 or else Ekind_In (Id, E_Constant, E_Variable));
2483 end Related_Expression;
2485 function Related_Instance (Id : E) return E is
2487 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2489 end Related_Instance;
2491 function Related_Type (Id : E) return E is
2493 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2497 function Relative_Deadline_Variable (Id : E) return E is
2499 pragma Assert (Is_Task_Type (Id));
2500 return Node26 (Implementation_Base_Type (Id));
2501 end Relative_Deadline_Variable;
2503 function Renamed_Entity (Id : E) return N is
2508 function Renamed_In_Spec (Id : E) return B is
2510 pragma Assert (Ekind (Id) = E_Package);
2511 return Flag231 (Id);
2512 end Renamed_In_Spec;
2514 function Renamed_Object (Id : E) return N is
2519 function Renaming_Map (Id : E) return U is
2524 function Requires_Overriding (Id : E) return B is
2526 pragma Assert (Is_Overloadable (Id));
2527 return Flag213 (Id);
2528 end Requires_Overriding;
2530 function Return_Present (Id : E) return B is
2535 function Return_Applies_To (Id : E) return N is
2538 end Return_Applies_To;
2540 function Returns_By_Ref (Id : E) return B is
2545 function Reverse_Bit_Order (Id : E) return B is
2547 pragma Assert (Is_Record_Type (Id));
2548 return Flag164 (Base_Type (Id));
2549 end Reverse_Bit_Order;
2551 function RM_Size (Id : E) return U is
2553 pragma Assert (Is_Type (Id));
2557 function Scalar_Range (Id : E) return N is
2562 function Scale_Value (Id : E) return U is
2567 function Scope_Depth_Value (Id : E) return U is
2570 end Scope_Depth_Value;
2572 function Sec_Stack_Needed_For_Return (Id : E) return B is
2574 return Flag167 (Id);
2575 end Sec_Stack_Needed_For_Return;
2577 function Shadow_Entities (Id : E) return S is
2579 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2581 end Shadow_Entities;
2583 function Shared_Var_Procs_Instance (Id : E) return E is
2585 pragma Assert (Ekind (Id) = E_Variable);
2587 end Shared_Var_Procs_Instance;
2589 function Size_Check_Code (Id : E) return N is
2591 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2593 end Size_Check_Code;
2595 function Size_Depends_On_Discriminant (Id : E) return B is
2597 return Flag177 (Id);
2598 end Size_Depends_On_Discriminant;
2600 function Size_Known_At_Compile_Time (Id : E) return B is
2603 end Size_Known_At_Compile_Time;
2605 function Small_Value (Id : E) return R is
2607 pragma Assert (Is_Fixed_Point_Type (Id));
2608 return Ureal21 (Id);
2611 function Spec_Entity (Id : E) return E is
2613 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2617 function Spec_PPC_List (Id : E) return N is
2620 (Ekind_In (Id, E_Entry, E_Entry_Family)
2621 or else Is_Subprogram (Id)
2622 or else Is_Generic_Subprogram (Id));
2626 function Static_Predicate (Id : E) return S is
2628 pragma Assert (Is_Discrete_Type (Id));
2630 end Static_Predicate;
2632 function Storage_Size_Variable (Id : E) return E is
2634 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2635 return Node15 (Implementation_Base_Type (Id));
2636 end Storage_Size_Variable;
2638 function Static_Elaboration_Desired (Id : E) return B is
2640 pragma Assert (Ekind (Id) = E_Package);
2642 end Static_Elaboration_Desired;
2644 function Static_Initialization (Id : E) return N is
2647 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2649 end Static_Initialization;
2651 function Stored_Constraint (Id : E) return L is
2654 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2655 return Elist23 (Id);
2656 end Stored_Constraint;
2658 function Strict_Alignment (Id : E) return B is
2660 return Flag145 (Implementation_Base_Type (Id));
2661 end Strict_Alignment;
2663 function String_Literal_Length (Id : E) return U is
2666 end String_Literal_Length;
2668 function String_Literal_Low_Bound (Id : E) return N is
2671 end String_Literal_Low_Bound;
2673 function Subprograms_For_Type (Id : E) return E is
2675 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2677 end Subprograms_For_Type;
2679 function Suppress_Elaboration_Warnings (Id : E) return B is
2681 return Flag148 (Id);
2682 end Suppress_Elaboration_Warnings;
2684 function Suppress_Init_Proc (Id : E) return B is
2686 return Flag105 (Base_Type (Id));
2687 end Suppress_Init_Proc;
2689 function Suppress_Style_Checks (Id : E) return B is
2691 return Flag165 (Id);
2692 end Suppress_Style_Checks;
2694 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2696 return Flag217 (Id);
2697 end Suppress_Value_Tracking_On_Call;
2699 function Task_Body_Procedure (Id : E) return N is
2701 pragma Assert (Ekind (Id) in Task_Kind);
2703 end Task_Body_Procedure;
2705 function Treat_As_Volatile (Id : E) return B is
2708 end Treat_As_Volatile;
2710 function Underlying_Full_View (Id : E) return E is
2712 pragma Assert (Ekind (Id) in Private_Kind);
2714 end Underlying_Full_View;
2716 function Underlying_Record_View (Id : E) return E is
2719 end Underlying_Record_View;
2721 function Universal_Aliasing (Id : E) return B is
2723 pragma Assert (Is_Type (Id));
2724 return Flag216 (Base_Type (Id));
2725 end Universal_Aliasing;
2727 function Unset_Reference (Id : E) return N is
2730 end Unset_Reference;
2732 function Used_As_Generic_Actual (Id : E) return B is
2734 return Flag222 (Id);
2735 end Used_As_Generic_Actual;
2737 function Uses_Sec_Stack (Id : E) return B is
2742 function Warnings_Off (Id : E) return B is
2747 function Warnings_Off_Used (Id : E) return B is
2749 return Flag236 (Id);
2750 end Warnings_Off_Used;
2752 function Warnings_Off_Used_Unmodified (Id : E) return B is
2754 return Flag237 (Id);
2755 end Warnings_Off_Used_Unmodified;
2757 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2759 return Flag238 (Id);
2760 end Warnings_Off_Used_Unreferenced;
2762 function Wrapped_Entity (Id : E) return E is
2764 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2765 and then Is_Primitive_Wrapper (Id));
2769 function Was_Hidden (Id : E) return B is
2771 return Flag196 (Id);
2774 ------------------------------
2775 -- Classification Functions --
2776 ------------------------------
2778 function Is_Access_Type (Id : E) return B is
2780 return Ekind (Id) in Access_Kind;
2783 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2785 return Ekind (Id) in Access_Protected_Kind;
2786 end Is_Access_Protected_Subprogram_Type;
2788 function Is_Access_Subprogram_Type (Id : E) return B is
2790 return Ekind (Id) in Access_Subprogram_Kind;
2791 end Is_Access_Subprogram_Type;
2793 function Is_Aggregate_Type (Id : E) return B is
2795 return Ekind (Id) in Aggregate_Kind;
2796 end Is_Aggregate_Type;
2798 function Is_Array_Type (Id : E) return B is
2800 return Ekind (Id) in Array_Kind;
2803 function Is_Assignable (Id : E) return B is
2805 return Ekind (Id) in Assignable_Kind;
2808 function Is_Class_Wide_Type (Id : E) return B is
2810 return Ekind (Id) in Class_Wide_Kind;
2811 end Is_Class_Wide_Type;
2813 function Is_Composite_Type (Id : E) return B is
2815 return Ekind (Id) in Composite_Kind;
2816 end Is_Composite_Type;
2818 function Is_Concurrent_Body (Id : E) return B is
2820 return Ekind (Id) in
2821 Concurrent_Body_Kind;
2822 end Is_Concurrent_Body;
2824 function Is_Concurrent_Record_Type (Id : E) return B is
2827 end Is_Concurrent_Record_Type;
2829 function Is_Concurrent_Type (Id : E) return B is
2831 return Ekind (Id) in Concurrent_Kind;
2832 end Is_Concurrent_Type;
2834 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2836 return Ekind (Id) in
2837 Decimal_Fixed_Point_Kind;
2838 end Is_Decimal_Fixed_Point_Type;
2840 function Is_Digits_Type (Id : E) return B is
2842 return Ekind (Id) in Digits_Kind;
2845 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2847 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2848 end Is_Discrete_Or_Fixed_Point_Type;
2850 function Is_Discrete_Type (Id : E) return B is
2852 return Ekind (Id) in Discrete_Kind;
2853 end Is_Discrete_Type;
2855 function Is_Elementary_Type (Id : E) return B is
2857 return Ekind (Id) in Elementary_Kind;
2858 end Is_Elementary_Type;
2860 function Is_Entry (Id : E) return B is
2862 return Ekind (Id) in Entry_Kind;
2865 function Is_Enumeration_Type (Id : E) return B is
2867 return Ekind (Id) in
2869 end Is_Enumeration_Type;
2871 function Is_Fixed_Point_Type (Id : E) return B is
2873 return Ekind (Id) in
2875 end Is_Fixed_Point_Type;
2877 function Is_Floating_Point_Type (Id : E) return B is
2879 return Ekind (Id) in Float_Kind;
2880 end Is_Floating_Point_Type;
2882 function Is_Formal (Id : E) return B is
2884 return Ekind (Id) in Formal_Kind;
2887 function Is_Formal_Object (Id : E) return B is
2889 return Ekind (Id) in Formal_Object_Kind;
2890 end Is_Formal_Object;
2892 function Is_Generic_Subprogram (Id : E) return B is
2894 return Ekind (Id) in Generic_Subprogram_Kind;
2895 end Is_Generic_Subprogram;
2897 function Is_Generic_Unit (Id : E) return B is
2899 return Ekind (Id) in Generic_Unit_Kind;
2900 end Is_Generic_Unit;
2902 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2904 return Ekind (Id) in
2905 Incomplete_Or_Private_Kind;
2906 end Is_Incomplete_Or_Private_Type;
2908 function Is_Incomplete_Type (Id : E) return B is
2910 return Ekind (Id) in
2912 end Is_Incomplete_Type;
2914 function Is_Integer_Type (Id : E) return B is
2916 return Ekind (Id) in Integer_Kind;
2917 end Is_Integer_Type;
2919 function Is_Modular_Integer_Type (Id : E) return B is
2921 return Ekind (Id) in
2922 Modular_Integer_Kind;
2923 end Is_Modular_Integer_Type;
2925 function Is_Named_Number (Id : E) return B is
2927 return Ekind (Id) in Named_Kind;
2928 end Is_Named_Number;
2930 function Is_Numeric_Type (Id : E) return B is
2932 return Ekind (Id) in Numeric_Kind;
2933 end Is_Numeric_Type;
2935 function Is_Object (Id : E) return B is
2937 return Ekind (Id) in Object_Kind;
2940 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2942 return Ekind (Id) in
2943 Ordinary_Fixed_Point_Kind;
2944 end Is_Ordinary_Fixed_Point_Type;
2946 function Is_Overloadable (Id : E) return B is
2948 return Ekind (Id) in Overloadable_Kind;
2949 end Is_Overloadable;
2951 function Is_Private_Type (Id : E) return B is
2953 return Ekind (Id) in Private_Kind;
2954 end Is_Private_Type;
2956 function Is_Protected_Type (Id : E) return B is
2958 return Ekind (Id) in Protected_Kind;
2959 end Is_Protected_Type;
2961 function Is_Real_Type (Id : E) return B is
2963 return Ekind (Id) in Real_Kind;
2966 function Is_Record_Type (Id : E) return B is
2968 return Ekind (Id) in Record_Kind;
2971 function Is_Scalar_Type (Id : E) return B is
2973 return Ekind (Id) in Scalar_Kind;
2976 function Is_Signed_Integer_Type (Id : E) return B is
2978 return Ekind (Id) in Signed_Integer_Kind;
2979 end Is_Signed_Integer_Type;
2981 function Is_Subprogram (Id : E) return B is
2983 return Ekind (Id) in Subprogram_Kind;
2986 function Is_Task_Type (Id : E) return B is
2988 return Ekind (Id) in Task_Kind;
2991 function Is_Type (Id : E) return B is
2993 return Ekind (Id) in Type_Kind;
2996 ------------------------------
2997 -- Attribute Set Procedures --
2998 ------------------------------
3000 -- Note: in many of these set procedures an "obvious" assertion is missing.
3001 -- The reason for this is that in many cases, a field is set before the
3002 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3003 -- it is possible to add assertions that specifically include the E_Void
3004 -- possibility, but in some cases, we just omit the assertions.
3006 procedure Set_Accept_Address (Id : E; V : L) is
3008 Set_Elist21 (Id, V);
3009 end Set_Accept_Address;
3011 procedure Set_Access_Disp_Table (Id : E; V : L) is
3013 pragma Assert (Ekind (Id) = E_Record_Type
3014 and then Id = Implementation_Base_Type (Id));
3015 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3016 Set_Elist16 (Id, V);
3017 end Set_Access_Disp_Table;
3019 procedure Set_Associated_Final_Chain (Id : E; V : E) is
3021 pragma Assert (Is_Access_Type (Id));
3023 end Set_Associated_Final_Chain;
3025 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3028 end Set_Associated_Formal_Package;
3030 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3033 end Set_Associated_Node_For_Itype;
3035 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3037 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3039 end Set_Associated_Storage_Pool;
3041 procedure Set_Actual_Subtype (Id : E; V : E) is
3044 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3045 or else Is_Formal (Id));
3047 end Set_Actual_Subtype;
3049 procedure Set_Address_Taken (Id : E; V : B := True) is
3051 Set_Flag104 (Id, V);
3052 end Set_Address_Taken;
3054 procedure Set_Alias (Id : E; V : E) is
3057 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3061 procedure Set_Alignment (Id : E; V : U) is
3063 pragma Assert (Is_Type (Id)
3064 or else Is_Formal (Id)
3065 or else Ekind_In (Id, E_Loop_Parameter,
3072 procedure Set_Barrier_Function (Id : E; V : N) is
3074 pragma Assert (Is_Entry (Id));
3076 end Set_Barrier_Function;
3078 procedure Set_Block_Node (Id : E; V : N) is
3080 pragma Assert (Ekind (Id) = E_Block);
3084 procedure Set_Body_Entity (Id : E; V : E) is
3086 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3088 end Set_Body_Entity;
3090 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3093 (Ekind (Id) = E_Package
3094 or else Is_Subprogram (Id)
3095 or else Is_Generic_Unit (Id));
3097 end Set_Body_Needed_For_SAL;
3099 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3101 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3102 Set_Flag125 (Id, V);
3103 end Set_C_Pass_By_Copy;
3105 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3108 end Set_Can_Never_Be_Null;
3110 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3113 end Set_Checks_May_Be_Suppressed;
3115 procedure Set_Class_Wide_Type (Id : E; V : E) is
3117 pragma Assert (Is_Type (Id));
3119 end Set_Class_Wide_Type;
3121 procedure Set_Cloned_Subtype (Id : E; V : E) is
3123 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3125 end Set_Cloned_Subtype;
3127 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3129 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3131 end Set_Component_Bit_Offset;
3133 procedure Set_Component_Clause (Id : E; V : N) is
3135 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3137 end Set_Component_Clause;
3139 procedure Set_Component_Size (Id : E; V : U) is
3141 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3143 end Set_Component_Size;
3145 procedure Set_Component_Type (Id : E; V : E) is
3147 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3149 end Set_Component_Type;
3151 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3154 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3156 end Set_Corresponding_Concurrent_Type;
3158 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3160 pragma Assert (Ekind (Id) = E_Discriminant);
3162 end Set_Corresponding_Discriminant;
3164 procedure Set_Corresponding_Equality (Id : E; V : E) is
3167 (Ekind (Id) = E_Function
3168 and then not Comes_From_Source (Id)
3169 and then Chars (Id) = Name_Op_Ne);
3171 end Set_Corresponding_Equality;
3173 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3175 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3177 end Set_Corresponding_Protected_Entry;
3179 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3181 pragma Assert (Is_Concurrent_Type (Id));
3183 end Set_Corresponding_Record_Type;
3185 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3188 end Set_Corresponding_Remote_Type;
3190 procedure Set_Current_Use_Clause (Id : E; V : E) is
3192 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3194 end Set_Current_Use_Clause;
3196 procedure Set_Current_Value (Id : E; V : N) is
3198 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3200 end Set_Current_Value;
3202 procedure Set_CR_Discriminant (Id : E; V : E) is
3205 end Set_CR_Discriminant;
3207 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3209 Set_Flag166 (Id, V);
3210 end Set_Debug_Info_Off;
3212 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3215 end Set_Debug_Renaming_Link;
3217 procedure Set_Default_Expr_Function (Id : E; V : E) is
3219 pragma Assert (Is_Formal (Id));
3221 end Set_Default_Expr_Function;
3223 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3225 Set_Flag108 (Id, V);
3226 end Set_Default_Expressions_Processed;
3228 procedure Set_Default_Value (Id : E; V : N) is
3230 pragma Assert (Is_Formal (Id));
3232 end Set_Default_Value;
3234 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3238 or else Is_Task_Type (Id)
3239 or else Ekind (Id) = E_Block);
3240 Set_Flag114 (Id, V);
3241 end Set_Delay_Cleanups;
3243 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3246 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3248 end Set_Delay_Subprogram_Descriptors;
3250 procedure Set_Delta_Value (Id : E; V : R) is
3252 pragma Assert (Is_Fixed_Point_Type (Id));
3253 Set_Ureal18 (Id, V);
3254 end Set_Delta_Value;
3256 procedure Set_Dependent_Instances (Id : E; V : L) is
3258 pragma Assert (Is_Generic_Instance (Id));
3260 end Set_Dependent_Instances;
3262 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3264 pragma Assert (Nkind (Id) in N_Entity);
3266 end Set_Depends_On_Private;
3268 procedure Set_Digits_Value (Id : E; V : U) is
3271 (Is_Floating_Point_Type (Id)
3272 or else Is_Decimal_Fixed_Point_Type (Id));
3274 end Set_Digits_Value;
3276 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3279 end Set_Directly_Designated_Type;
3281 procedure Set_Discard_Names (Id : E; V : B := True) is
3284 end Set_Discard_Names;
3286 procedure Set_Discriminal (Id : E; V : E) is
3288 pragma Assert (Ekind (Id) = E_Discriminant);
3290 end Set_Discriminal;
3292 procedure Set_Discriminal_Link (Id : E; V : E) is
3295 end Set_Discriminal_Link;
3297 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3299 pragma Assert (Ekind (Id) = E_Component);
3301 end Set_Discriminant_Checking_Func;
3303 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3305 pragma Assert (Nkind (Id) in N_Entity);
3306 Set_Elist21 (Id, V);
3307 end Set_Discriminant_Constraint;
3309 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3312 end Set_Discriminant_Default_Value;
3314 procedure Set_Discriminant_Number (Id : E; V : U) is
3317 end Set_Discriminant_Number;
3319 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3321 pragma Assert (Ekind (Id) = E_Record_Type
3322 and then Id = Implementation_Base_Type (Id));
3323 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3324 Set_Elist26 (Id, V);
3325 end Set_Dispatch_Table_Wrappers;
3327 procedure Set_DT_Entry_Count (Id : E; V : U) is
3329 pragma Assert (Ekind (Id) = E_Component);
3331 end Set_DT_Entry_Count;
3333 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3335 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3337 end Set_DT_Offset_To_Top_Func;
3339 procedure Set_DT_Position (Id : E; V : U) is
3341 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3343 end Set_DT_Position;
3345 procedure Set_DTC_Entity (Id : E; V : E) is
3347 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3351 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3353 pragma Assert (Ekind (Id) = E_Package);
3354 Set_Flag210 (Id, V);
3355 end Set_Elaborate_Body_Desirable;
3357 procedure Set_Elaboration_Entity (Id : E; V : E) is
3362 Ekind (Id) = E_Package
3364 Is_Generic_Unit (Id));
3366 end Set_Elaboration_Entity;
3368 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3373 Ekind (Id) = E_Package
3375 Is_Generic_Unit (Id));
3376 Set_Flag174 (Id, V);
3377 end Set_Elaboration_Entity_Required;
3379 procedure Set_Enclosing_Scope (Id : E; V : E) is
3382 end Set_Enclosing_Scope;
3384 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3386 pragma Assert (Is_Entry (Id));
3387 Set_Flag152 (Id, V);
3388 end Set_Entry_Accepted;
3390 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3393 end Set_Entry_Bodies_Array;
3395 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3398 end Set_Entry_Cancel_Parameter;
3400 procedure Set_Entry_Component (Id : E; V : E) is
3403 end Set_Entry_Component;
3405 procedure Set_Entry_Formal (Id : E; V : E) is
3408 end Set_Entry_Formal;
3410 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3412 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3414 end Set_Entry_Index_Constant;
3416 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3419 end Set_Entry_Parameters_Type;
3421 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3423 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3425 end Set_Enum_Pos_To_Rep;
3427 procedure Set_Enumeration_Pos (Id : E; V : U) is
3429 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3431 end Set_Enumeration_Pos;
3433 procedure Set_Enumeration_Rep (Id : E; V : U) is
3435 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3437 end Set_Enumeration_Rep;
3439 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3441 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3443 end Set_Enumeration_Rep_Expr;
3445 procedure Set_Equivalent_Type (Id : E; V : E) is
3448 (Ekind_In (Id, E_Class_Wide_Type,
3449 E_Class_Wide_Subtype,
3450 E_Access_Protected_Subprogram_Type,
3451 E_Anonymous_Access_Protected_Subprogram_Type,
3452 E_Access_Subprogram_Type,
3455 end Set_Equivalent_Type;
3457 procedure Set_Esize (Id : E; V : U) is
3462 procedure Set_Exception_Code (Id : E; V : U) is
3464 pragma Assert (Ekind (Id) = E_Exception);
3466 end Set_Exception_Code;
3468 procedure Set_Extra_Accessibility (Id : E; V : E) is
3470 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3472 end Set_Extra_Accessibility;
3474 procedure Set_Extra_Constrained (Id : E; V : E) is
3476 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3478 end Set_Extra_Constrained;
3480 procedure Set_Extra_Formal (Id : E; V : E) is
3483 end Set_Extra_Formal;
3485 procedure Set_Extra_Formals (Id : E; V : E) is
3488 (Is_Overloadable (Id)
3489 or else Ekind_In (Id, E_Entry_Family,
3491 E_Subprogram_Type));
3493 end Set_Extra_Formals;
3495 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3498 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3499 Set_Flag229 (Id, V);
3500 end Set_Can_Use_Internal_Rep;
3502 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3505 end Set_Finalization_Chain_Entity;
3507 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3509 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3510 Set_Flag158 (Id, V);
3511 end Set_Finalize_Storage_Only;
3513 procedure Set_First_Entity (Id : E; V : E) is
3516 end Set_First_Entity;
3518 procedure Set_First_Exit_Statement (Id : E; V : N) is
3520 pragma Assert (Ekind (Id) = E_Loop);
3522 end Set_First_Exit_Statement;
3524 procedure Set_First_Index (Id : E; V : N) is
3526 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3528 end Set_First_Index;
3530 procedure Set_First_Literal (Id : E; V : E) is
3532 pragma Assert (Is_Enumeration_Type (Id));
3534 end Set_First_Literal;
3536 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3538 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3540 end Set_First_Optional_Parameter;
3542 procedure Set_First_Private_Entity (Id : E; V : E) is
3544 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3545 or else Ekind (Id) in Concurrent_Kind);
3547 end Set_First_Private_Entity;
3549 procedure Set_First_Rep_Item (Id : E; V : N) is
3552 end Set_First_Rep_Item;
3554 procedure Set_Float_Rep (Id : E; V : F) is
3555 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3557 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3560 procedure Set_Freeze_Node (Id : E; V : N) is
3563 end Set_Freeze_Node;
3565 procedure Set_From_With_Type (Id : E; V : B := True) is
3569 or else Ekind (Id) = E_Package);
3570 Set_Flag159 (Id, V);
3571 end Set_From_With_Type;
3573 procedure Set_Full_View (Id : E; V : E) is
3575 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3579 procedure Set_Generic_Homonym (Id : E; V : E) is
3582 end Set_Generic_Homonym;
3584 procedure Set_Generic_Renamings (Id : E; V : L) is
3586 Set_Elist23 (Id, V);
3587 end Set_Generic_Renamings;
3589 procedure Set_Handler_Records (Id : E; V : S) is
3592 end Set_Handler_Records;
3594 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3596 pragma Assert (Id = Base_Type (Id));
3597 Set_Flag135 (Id, V);
3598 end Set_Has_Aliased_Components;
3600 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3603 end Set_Has_Alignment_Clause;
3605 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3608 end Set_Has_All_Calls_Remote;
3610 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3612 Set_Flag201 (Id, V);
3613 end Set_Has_Anon_Block_Suffix;
3615 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3617 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3619 end Set_Has_Atomic_Components;
3621 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3624 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3625 Set_Flag139 (Id, V);
3626 end Set_Has_Biased_Representation;
3628 procedure Set_Has_Completion (Id : E; V : B := True) is
3631 end Set_Has_Completion;
3633 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3635 pragma Assert (Is_Type (Id));
3637 end Set_Has_Completion_In_Body;
3639 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3641 pragma Assert (Ekind (Id) = E_Record_Type);
3642 Set_Flag140 (Id, V);
3643 end Set_Has_Complex_Representation;
3645 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3647 pragma Assert (Ekind (Id) = E_Array_Type);
3649 end Set_Has_Component_Size_Clause;
3651 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3653 pragma Assert (Is_Type (Id));
3654 Set_Flag187 (Id, V);
3655 end Set_Has_Constrained_Partial_View;
3657 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3659 Set_Flag181 (Id, V);
3660 end Set_Has_Contiguous_Rep;
3662 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3664 pragma Assert (Id = Base_Type (Id));
3666 end Set_Has_Controlled_Component;
3668 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3671 end Set_Has_Controlling_Result;
3673 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3675 Set_Flag119 (Id, V);
3676 end Set_Has_Convention_Pragma;
3678 procedure Set_Has_Default_Component_Value (Id : E; V : B := True) is
3680 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3681 Set_Flag151 (Id, V);
3682 end Set_Has_Default_Component_Value;
3684 procedure Set_Has_Default_Value (Id : E; V : B := True) is
3686 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3688 end Set_Has_Default_Value;
3690 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3692 pragma Assert (Nkind (Id) in N_Entity);
3693 Set_Flag200 (Id, V);
3694 end Set_Has_Delayed_Aspects;
3696 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3698 pragma Assert (Nkind (Id) in N_Entity);
3700 end Set_Has_Delayed_Freeze;
3702 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3704 pragma Assert (Nkind (Id) in N_Entity);
3706 end Set_Has_Discriminants;
3708 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3710 pragma Assert (Ekind (Id) = E_Record_Type
3711 and then Is_Tagged_Type (Id));
3712 Set_Flag220 (Id, V);
3713 end Set_Has_Dispatch_Table;
3715 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3717 pragma Assert (Is_Enumeration_Type (Id));
3719 end Set_Has_Enumeration_Rep_Clause;
3721 procedure Set_Has_Exit (Id : E; V : B := True) is
3726 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3728 pragma Assert (Is_Tagged_Type (Id));
3729 Set_Flag110 (Id, V);
3730 end Set_Has_External_Tag_Rep_Clause;
3732 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3734 Set_Flag175 (Id, V);
3735 end Set_Has_Forward_Instantiation;
3737 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3739 Set_Flag173 (Id, V);
3740 end Set_Has_Fully_Qualified_Name;
3742 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3745 end Set_Has_Gigi_Rep_Item;
3747 procedure Set_Has_Homonym (Id : E; V : B := True) is
3750 end Set_Has_Homonym;
3752 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3754 pragma Assert (Is_Type (Id));
3755 Set_Flag248 (Id, V);
3756 end Set_Has_Inheritable_Invariants;
3758 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3760 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3761 Set_Flag219 (Id, V);
3762 end Set_Has_Initial_Value;
3764 procedure Set_Has_Invariants (Id : E; V : B := True) is
3766 pragma Assert (Is_Type (Id)
3767 or else Ekind (Id) = E_Procedure
3768 or else Ekind (Id) = E_Void);
3769 Set_Flag232 (Id, V);
3770 end Set_Has_Invariants;
3772 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3774 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3776 end Set_Has_Machine_Radix_Clause;
3778 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3781 end Set_Has_Master_Entity;
3783 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3785 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3786 Set_Flag142 (Id, V);
3787 end Set_Has_Missing_Return;
3789 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3791 Set_Flag101 (Id, V);
3792 end Set_Has_Nested_Block_With_Handler;
3794 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3796 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3797 Set_Flag215 (Id, V);
3798 end Set_Has_Up_Level_Access;
3800 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3802 pragma Assert (Id = Base_Type (Id));
3804 end Set_Has_Non_Standard_Rep;
3806 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3808 pragma Assert (Is_Type (Id));
3809 Set_Flag172 (Id, V);
3810 end Set_Has_Object_Size_Clause;
3812 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3814 Set_Flag154 (Id, V);
3815 end Set_Has_Per_Object_Constraint;
3817 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3819 Set_Flag188 (Id, V);
3820 end Set_Has_Persistent_BSS;
3822 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3824 pragma Assert (Is_Subprogram (Id));
3825 Set_Flag240 (Id, V);
3826 end Set_Has_Postconditions;
3828 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3830 pragma Assert (Is_Access_Type (Id));
3831 Set_Flag27 (Base_Type (Id), V);
3832 end Set_Has_Pragma_Controlled;
3834 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3836 Set_Flag150 (Id, V);
3837 end Set_Has_Pragma_Elaborate_Body;
3839 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3841 Set_Flag157 (Id, V);
3842 end Set_Has_Pragma_Inline;
3844 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3846 Set_Flag230 (Id, V);
3847 end Set_Has_Pragma_Inline_Always;
3849 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3851 pragma Assert (Is_Enumeration_Type (Id));
3852 pragma Assert (Id = Base_Type (Id));
3853 Set_Flag198 (Id, V);
3854 end Set_Has_Pragma_Ordered;
3856 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3858 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3859 pragma Assert (Id = Base_Type (Id));
3860 Set_Flag121 (Id, V);
3861 end Set_Has_Pragma_Pack;
3863 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3865 Set_Flag221 (Id, V);
3866 end Set_Has_Pragma_Preelab_Init;
3868 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3870 Set_Flag203 (Id, V);
3871 end Set_Has_Pragma_Pure;
3873 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3875 Set_Flag179 (Id, V);
3876 end Set_Has_Pragma_Pure_Function;
3878 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3880 Set_Flag169 (Id, V);
3881 end Set_Has_Pragma_Thread_Local_Storage;
3883 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3885 Set_Flag233 (Id, V);
3886 end Set_Has_Pragma_Unmodified;
3888 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3890 Set_Flag180 (Id, V);
3891 end Set_Has_Pragma_Unreferenced;
3893 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3895 pragma Assert (Is_Type (Id));
3896 Set_Flag212 (Id, V);
3897 end Set_Has_Pragma_Unreferenced_Objects;
3899 procedure Set_Has_Predicates (Id : E; V : B := True) is
3901 Set_Flag250 (Id, V);
3902 end Set_Has_Predicates;
3904 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3906 pragma Assert (Id = Base_Type (Id));
3907 Set_Flag120 (Id, V);
3908 end Set_Has_Primitive_Operations;
3910 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3912 Set_Flag155 (Id, V);
3913 end Set_Has_Private_Declaration;
3915 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3917 Set_Flag161 (Id, V);
3918 end Set_Has_Qualified_Name;
3920 procedure Set_Has_RACW (Id : E; V : B := True) is
3922 pragma Assert (Ekind (Id) = E_Package);
3923 Set_Flag214 (Id, V);
3926 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3928 pragma Assert (Id = Base_Type (Id));
3930 end Set_Has_Record_Rep_Clause;
3932 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3934 pragma Assert (Is_Subprogram (Id));
3935 Set_Flag143 (Id, V);
3936 end Set_Has_Recursive_Call;
3938 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3941 end Set_Has_Size_Clause;
3943 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3946 end Set_Has_Small_Clause;
3948 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3950 pragma Assert (Id = Base_Type (Id));
3951 Set_Flag100 (Id, V);
3952 end Set_Has_Specified_Layout;
3954 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3956 pragma Assert (Is_Type (Id));
3957 Set_Flag190 (Id, V);
3958 end Set_Has_Specified_Stream_Input;
3960 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3962 pragma Assert (Is_Type (Id));
3963 Set_Flag191 (Id, V);
3964 end Set_Has_Specified_Stream_Output;
3966 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3968 pragma Assert (Is_Type (Id));
3969 Set_Flag192 (Id, V);
3970 end Set_Has_Specified_Stream_Read;
3972 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3974 pragma Assert (Is_Type (Id));
3975 Set_Flag193 (Id, V);
3976 end Set_Has_Specified_Stream_Write;
3978 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3980 Set_Flag211 (Id, V);
3981 end Set_Has_Static_Discriminants;
3983 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3985 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3986 pragma Assert (Id = Base_Type (Id));
3988 end Set_Has_Storage_Size_Clause;
3990 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3992 pragma Assert (Is_Elementary_Type (Id));
3993 Set_Flag184 (Id, V);
3994 end Set_Has_Stream_Size_Clause;
3996 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3999 end Set_Has_Subprogram_Descriptor;
4001 procedure Set_Has_Task (Id : E; V : B := True) is
4003 pragma Assert (Id = Base_Type (Id));
4007 procedure Set_Has_Thunks (Id : E; V : B := True) is
4009 pragma Assert (Is_Tag (Id));
4010 Set_Flag228 (Id, V);
4013 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4015 pragma Assert (Id = Base_Type (Id));
4016 Set_Flag123 (Id, V);
4017 end Set_Has_Unchecked_Union;
4019 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4021 pragma Assert (Is_Type (Id));
4023 end Set_Has_Unknown_Discriminants;
4025 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4027 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4029 end Set_Has_Volatile_Components;
4031 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4033 Set_Flag182 (Id, V);
4034 end Set_Has_Xref_Entry;
4036 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4038 pragma Assert (Ekind (Id) = E_Variable);
4040 end Set_Hiding_Loop_Variable;
4042 procedure Set_Homonym (Id : E; V : E) is
4044 pragma Assert (Id /= V);
4048 procedure Set_Interface_Alias (Id : E; V : E) is
4052 and then Is_Hidden (Id)
4053 and then (Ekind_In (Id, E_Procedure, E_Function)));
4055 end Set_Interface_Alias;
4057 procedure Set_Interfaces (Id : E; V : L) is
4059 pragma Assert (Is_Record_Type (Id));
4060 Set_Elist25 (Id, V);
4063 procedure Set_In_Package_Body (Id : E; V : B := True) is
4066 end Set_In_Package_Body;
4068 procedure Set_In_Private_Part (Id : E; V : B := True) is
4071 end Set_In_Private_Part;
4073 procedure Set_In_Use (Id : E; V : B := True) is
4075 pragma Assert (Nkind (Id) in N_Entity);
4079 procedure Set_Inner_Instances (Id : E; V : L) is
4081 Set_Elist23 (Id, V);
4082 end Set_Inner_Instances;
4084 procedure Set_Interface_Name (Id : E; V : N) is
4087 end Set_Interface_Name;
4089 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4091 pragma Assert (Is_Overloadable (Id));
4093 end Set_Is_Abstract_Subprogram;
4095 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4097 pragma Assert (Is_Type (Id));
4098 Set_Flag146 (Id, V);
4099 end Set_Is_Abstract_Type;
4101 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4103 pragma Assert (Is_Access_Type (Id));
4104 Set_Flag194 (Id, V);
4105 end Set_Is_Local_Anonymous_Access;
4107 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4109 pragma Assert (Is_Access_Type (Id));
4111 end Set_Is_Access_Constant;
4113 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4115 Set_Flag185 (Id, V);
4116 end Set_Is_Ada_2005_Only;
4118 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4120 Set_Flag199 (Id, V);
4121 end Set_Is_Ada_2012_Only;
4123 procedure Set_Is_Aliased (Id : E; V : B := True) is
4125 pragma Assert (Nkind (Id) in N_Entity);
4129 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4131 pragma Assert (Is_Entry (Id));
4132 Set_Flag132 (Id, V);
4133 end Set_Is_AST_Entry;
4135 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4138 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4140 end Set_Is_Asynchronous;
4142 procedure Set_Is_Atomic (Id : E; V : B := True) is
4147 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4149 pragma Assert ((not V)
4150 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4152 Set_Flag122 (Id, V);
4153 end Set_Is_Bit_Packed_Array;
4155 procedure Set_Is_Called (Id : E; V : B := True) is
4157 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4158 Set_Flag102 (Id, V);
4161 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4164 end Set_Is_Character_Type;
4166 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4169 end Set_Is_Child_Unit;
4171 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4174 end Set_Is_Class_Wide_Equivalent_Type;
4176 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4178 Set_Flag149 (Id, V);
4179 end Set_Is_Compilation_Unit;
4181 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4183 pragma Assert (Ekind (Id) = E_Discriminant);
4184 Set_Flag103 (Id, V);
4185 end Set_Is_Completely_Hidden;
4187 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4190 end Set_Is_Concurrent_Record_Type;
4192 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4195 end Set_Is_Constr_Subt_For_U_Nominal;
4197 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4199 Set_Flag141 (Id, V);
4200 end Set_Is_Constr_Subt_For_UN_Aliased;
4202 procedure Set_Is_Constrained (Id : E; V : B := True) is
4204 pragma Assert (Nkind (Id) in N_Entity);
4206 end Set_Is_Constrained;
4208 procedure Set_Is_Constructor (Id : E; V : B := True) is
4211 end Set_Is_Constructor;
4213 procedure Set_Is_Controlled (Id : E; V : B := True) is
4215 pragma Assert (Id = Base_Type (Id));
4217 end Set_Is_Controlled;
4219 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4221 pragma Assert (Is_Formal (Id));
4223 end Set_Is_Controlling_Formal;
4225 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4228 end Set_Is_CPP_Class;
4230 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4232 pragma Assert (Is_Type (Id));
4233 Set_Flag223 (Id, V);
4234 end Set_Is_Descendent_Of_Address;
4236 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4238 Set_Flag176 (Id, V);
4239 end Set_Is_Discrim_SO_Function;
4241 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4243 Set_Flag234 (Id, V);
4244 end Set_Is_Dispatch_Table_Entity;
4246 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4251 Is_Overloadable (Id)
4253 Ekind (Id) = E_Subprogram_Type);
4256 end Set_Is_Dispatching_Operation;
4258 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4260 Set_Flag124 (Id, V);
4261 end Set_Is_Eliminated;
4263 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4266 end Set_Is_Entry_Formal;
4268 procedure Set_Is_Exported (Id : E; V : B := True) is
4271 end Set_Is_Exported;
4273 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4276 end Set_Is_First_Subtype;
4278 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4280 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4281 Set_Flag118 (Id, V);
4282 end Set_Is_For_Access_Subtype;
4284 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4286 Set_Flag111 (Id, V);
4287 end Set_Is_Formal_Subprogram;
4289 procedure Set_Is_Frozen (Id : E; V : B := True) is
4291 pragma Assert (Nkind (Id) in N_Entity);
4295 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4297 pragma Assert (Is_Type (Id));
4299 end Set_Is_Generic_Actual_Type;
4301 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4303 Set_Flag130 (Id, V);
4304 end Set_Is_Generic_Instance;
4306 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4308 pragma Assert (Nkind (Id) in N_Entity);
4310 end Set_Is_Generic_Type;
4312 procedure Set_Is_Hidden (Id : E; V : B := True) is
4317 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4319 Set_Flag171 (Id, V);
4320 end Set_Is_Hidden_Open_Scope;
4322 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4324 pragma Assert (Nkind (Id) in N_Entity);
4326 end Set_Is_Immediately_Visible;
4328 procedure Set_Is_Imported (Id : E; V : B := True) is
4331 end Set_Is_Imported;
4333 procedure Set_Is_Inlined (Id : E; V : B := True) is
4338 procedure Set_Is_Interface (Id : E; V : B := True) is
4340 pragma Assert (Is_Record_Type (Id));
4341 Set_Flag186 (Id, V);
4342 end Set_Is_Interface;
4344 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4346 Set_Flag126 (Id, V);
4347 end Set_Is_Instantiated;
4349 procedure Set_Is_Internal (Id : E; V : B := True) is
4351 pragma Assert (Nkind (Id) in N_Entity);
4353 end Set_Is_Internal;
4355 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4357 pragma Assert (Nkind (Id) in N_Entity);
4359 end Set_Is_Interrupt_Handler;
4361 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4364 end Set_Is_Intrinsic_Subprogram;
4366 procedure Set_Is_Itype (Id : E; V : B := True) is
4371 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4374 end Set_Is_Known_Non_Null;
4376 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4378 Set_Flag204 (Id, V);
4379 end Set_Is_Known_Null;
4381 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4383 Set_Flag170 (Id, V);
4384 end Set_Is_Known_Valid;
4386 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4388 pragma Assert (Is_Type (Id));
4389 Set_Flag106 (Id, V);
4390 end Set_Is_Limited_Composite;
4392 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4394 pragma Assert (Is_Interface (Id));
4395 Set_Flag197 (Id, V);
4396 end Set_Is_Limited_Interface;
4398 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4401 end Set_Is_Limited_Record;
4403 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4405 pragma Assert (Is_Subprogram (Id));
4406 Set_Flag137 (Id, V);
4407 end Set_Is_Machine_Code_Subprogram;
4409 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4411 pragma Assert (Is_Type (Id));
4412 Set_Flag109 (Id, V);
4413 end Set_Is_Non_Static_Subtype;
4415 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4417 pragma Assert (Ekind (Id) = E_Procedure);
4418 Set_Flag178 (Id, V);
4419 end Set_Is_Null_Init_Proc;
4421 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4423 Set_Flag153 (Id, V);
4424 end Set_Is_Obsolescent;
4426 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4428 pragma Assert (Ekind (Id) = E_Out_Parameter);
4429 Set_Flag226 (Id, V);
4430 end Set_Is_Only_Out_Parameter;
4432 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4434 pragma Assert (Is_Formal (Id));
4435 Set_Flag134 (Id, V);
4436 end Set_Is_Optional_Parameter;
4438 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4440 Set_Flag160 (Id, V);
4441 end Set_Is_Package_Body_Entity;
4443 procedure Set_Is_Packed (Id : E; V : B := True) is
4445 pragma Assert (Id = Base_Type (Id));
4449 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4451 Set_Flag138 (Id, V);
4452 end Set_Is_Packed_Array_Type;
4454 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4456 pragma Assert (Nkind (Id) in N_Entity);
4458 end Set_Is_Potentially_Use_Visible;
4460 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4463 end Set_Is_Preelaborated;
4465 procedure Set_Is_Primitive (Id : E; V : B := True) is
4468 (Is_Overloadable (Id)
4469 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4470 Set_Flag218 (Id, V);
4471 end Set_Is_Primitive;
4473 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4475 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4476 Set_Flag195 (Id, V);
4477 end Set_Is_Primitive_Wrapper;
4479 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4481 pragma Assert (Is_Type (Id));
4482 Set_Flag107 (Id, V);
4483 end Set_Is_Private_Composite;
4485 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4488 end Set_Is_Private_Descendant;
4490 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4492 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4493 Set_Flag245 (Id, V);
4494 end Set_Is_Private_Primitive;
4496 procedure Set_Is_Public (Id : E; V : B := True) is
4498 pragma Assert (Nkind (Id) in N_Entity);
4502 procedure Set_Is_Pure (Id : E; V : B := True) is
4507 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4509 pragma Assert (Is_Access_Type (Id));
4510 Set_Flag189 (Id, V);
4511 end Set_Is_Pure_Unit_Access_Type;
4513 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4515 pragma Assert (Is_Type (Id));
4516 Set_Flag244 (Id, V);
4517 end Set_Is_RACW_Stub_Type;
4519 procedure Set_Is_Raised (Id : E; V : B := True) is
4521 pragma Assert (Ekind (Id) = E_Exception);
4522 Set_Flag224 (Id, V);
4525 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4528 end Set_Is_Remote_Call_Interface;
4530 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4533 end Set_Is_Remote_Types;
4535 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4537 Set_Flag112 (Id, V);
4538 end Set_Is_Renaming_Of_Object;
4540 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4542 Set_Flag209 (Id, V);
4543 end Set_Is_Return_Object;
4545 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4548 end Set_Is_Shared_Passive;
4550 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4554 or else Ekind_In (Id, E_Exception,
4559 end Set_Is_Statically_Allocated;
4561 procedure Set_Is_Tag (Id : E; V : B := True) is
4563 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4567 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4570 end Set_Is_Tagged_Type;
4572 procedure Set_Is_Thunk (Id : E; V : B := True) is
4574 Set_Flag225 (Id, V);
4577 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4579 Set_Flag235 (Id, V);
4580 end Set_Is_Trivial_Subprogram;
4582 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4584 Set_Flag163 (Id, V);
4585 end Set_Is_True_Constant;
4587 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4589 pragma Assert (Id = Base_Type (Id));
4590 Set_Flag117 (Id, V);
4591 end Set_Is_Unchecked_Union;
4593 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4595 pragma Assert (Ekind (Id) = E_Record_Type);
4596 Set_Flag246 (Id, V);
4597 end Set_Is_Underlying_Record_View;
4599 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4601 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4602 Set_Flag144 (Id, V);
4603 end Set_Is_Unsigned_Type;
4605 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4607 pragma Assert (Ekind (Id) = E_Procedure);
4608 Set_Flag127 (Id, V);
4609 end Set_Is_Valued_Procedure;
4611 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4613 pragma Assert (Is_Child_Unit (Id));
4614 Set_Flag116 (Id, V);
4615 end Set_Is_Visible_Child_Unit;
4617 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4619 Set_Flag206 (Id, V);
4620 end Set_Is_Visible_Formal;
4622 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4624 pragma Assert (Ekind (Id) = E_Exception);
4625 Set_Flag133 (Id, V);
4626 end Set_Is_VMS_Exception;
4628 procedure Set_Is_Volatile (Id : E; V : B := True) is
4630 pragma Assert (Nkind (Id) in N_Entity);
4632 end Set_Is_Volatile;
4634 procedure Set_Itype_Printed (Id : E; V : B := True) is
4636 pragma Assert (Is_Itype (Id));
4637 Set_Flag202 (Id, V);
4638 end Set_Itype_Printed;
4640 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4643 end Set_Kill_Elaboration_Checks;
4645 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4648 end Set_Kill_Range_Checks;
4650 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4653 end Set_Kill_Tag_Checks;
4655 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4657 pragma Assert (Is_Type (Id));
4658 Set_Flag207 (Id, V);
4659 end Set_Known_To_Have_Preelab_Init;
4661 procedure Set_Last_Assignment (Id : E; V : N) is
4663 pragma Assert (Is_Assignable (Id));
4665 end Set_Last_Assignment;
4667 procedure Set_Last_Entity (Id : E; V : E) is
4670 end Set_Last_Entity;
4672 procedure Set_Limited_View (Id : E; V : E) is
4674 pragma Assert (Ekind (Id) = E_Package);
4676 end Set_Limited_View;
4678 procedure Set_Lit_Indexes (Id : E; V : E) is
4680 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4682 end Set_Lit_Indexes;
4684 procedure Set_Lit_Strings (Id : E; V : E) is
4686 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4688 end Set_Lit_Strings;
4690 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4692 pragma Assert (Is_Formal (Id));
4693 Set_Flag205 (Id, V);
4694 end Set_Low_Bound_Tested;
4696 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4698 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4700 end Set_Machine_Radix_10;
4702 procedure Set_Master_Id (Id : E; V : E) is
4704 pragma Assert (Is_Access_Type (Id));
4708 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4710 Set_Flag168 (Id, V);
4711 end Set_Materialize_Entity;
4713 procedure Set_Mechanism (Id : E; V : M) is
4715 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4716 Set_Uint8 (Id, UI_From_Int (V));
4719 procedure Set_Modulus (Id : E; V : U) is
4721 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4725 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4727 pragma Assert (Is_Type (Id));
4728 Set_Flag183 (Id, V);
4729 end Set_Must_Be_On_Byte_Boundary;
4731 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4733 pragma Assert (Is_Type (Id));
4734 Set_Flag208 (Id, V);
4735 end Set_Must_Have_Preelab_Init;
4737 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4739 Set_Flag147 (Id, V);
4740 end Set_Needs_Debug_Info;
4742 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4745 (Is_Overloadable (Id)
4746 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4748 end Set_Needs_No_Actuals;
4750 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4752 Set_Flag115 (Id, V);
4753 end Set_Never_Set_In_Source;
4755 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4758 end Set_Next_Inlined_Subprogram;
4760 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4762 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4763 Set_Flag131 (Id, V);
4764 end Set_No_Pool_Assigned;
4766 procedure Set_No_Return (Id : E; V : B := True) is
4769 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4770 Set_Flag113 (Id, V);
4773 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4775 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4776 Set_Flag136 (Id, V);
4777 end Set_No_Strict_Aliasing;
4779 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4781 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4783 end Set_Non_Binary_Modulus;
4785 procedure Set_Non_Limited_View (Id : E; V : E) is
4787 pragma Assert (Ekind (Id) in Incomplete_Kind);
4789 end Set_Non_Limited_View;
4791 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4794 (Root_Type (Id) = Standard_Boolean
4795 and then Ekind (Id) = E_Enumeration_Type);
4796 Set_Flag162 (Id, V);
4797 end Set_Nonzero_Is_True;
4799 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4801 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4803 end Set_Normalized_First_Bit;
4805 procedure Set_Normalized_Position (Id : E; V : U) is
4807 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4809 end Set_Normalized_Position;
4811 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4813 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4815 end Set_Normalized_Position_Max;
4817 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4819 pragma Assert (Ekind (Id) = E_Variable);
4820 Set_Flag247 (Id, V);
4821 end Set_OK_To_Rename;
4823 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4826 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4827 Set_Flag239 (Id, V);
4828 end Set_OK_To_Reorder_Components;
4830 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4833 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4834 Set_Flag241 (Id, V);
4835 end Set_Optimize_Alignment_Space;
4837 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4840 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4841 Set_Flag242 (Id, V);
4842 end Set_Optimize_Alignment_Time;
4844 procedure Set_Original_Array_Type (Id : E; V : E) is
4846 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4848 end Set_Original_Array_Type;
4850 procedure Set_Original_Record_Component (Id : E; V : E) is
4852 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4854 end Set_Original_Record_Component;
4856 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4858 Set_Flag243 (Id, V);
4859 end Set_Overlays_Constant;
4861 procedure Set_Overridden_Operation (Id : E; V : E) is
4864 end Set_Overridden_Operation;
4866 procedure Set_Package_Instantiation (Id : E; V : N) is
4868 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4870 end Set_Package_Instantiation;
4872 procedure Set_Packed_Array_Type (Id : E; V : E) is
4874 pragma Assert (Is_Array_Type (Id));
4876 end Set_Packed_Array_Type;
4878 procedure Set_Parent_Subtype (Id : E; V : E) is
4880 pragma Assert (Ekind (Id) = E_Record_Type);
4882 end Set_Parent_Subtype;
4884 procedure Set_Postcondition_Proc (Id : E; V : E) is
4886 pragma Assert (Ekind (Id) = E_Procedure);
4888 end Set_Postcondition_Proc;
4890 procedure Set_PPC_Wrapper (Id : E; V : E) is
4892 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4894 end Set_PPC_Wrapper;
4896 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4898 pragma Assert (Is_Tagged_Type (Id));
4899 Set_Elist10 (Id, V);
4900 end Set_Direct_Primitive_Operations;
4902 procedure Set_Prival (Id : E; V : E) is
4904 pragma Assert (Is_Protected_Component (Id));
4908 procedure Set_Prival_Link (Id : E; V : E) is
4910 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4912 end Set_Prival_Link;
4914 procedure Set_Private_Dependents (Id : E; V : L) is
4916 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4917 Set_Elist18 (Id, V);
4918 end Set_Private_Dependents;
4920 procedure Set_Private_View (Id : E; V : N) is
4922 pragma Assert (Is_Private_Type (Id));
4924 end Set_Private_View;
4926 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4928 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4930 end Set_Protected_Body_Subprogram;
4932 procedure Set_Protected_Formal (Id : E; V : E) is
4934 pragma Assert (Is_Formal (Id));
4936 end Set_Protected_Formal;
4938 procedure Set_Protection_Object (Id : E; V : E) is
4940 pragma Assert (Ekind_In (Id, E_Entry,
4945 end Set_Protection_Object;
4947 procedure Set_Reachable (Id : E; V : B := True) is
4952 procedure Set_Referenced (Id : E; V : B := True) is
4954 Set_Flag156 (Id, V);
4957 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4960 end Set_Referenced_As_LHS;
4962 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4964 Set_Flag227 (Id, V);
4965 end Set_Referenced_As_Out_Parameter;
4967 procedure Set_Register_Exception_Call (Id : E; V : N) is
4969 pragma Assert (Ekind (Id) = E_Exception);
4971 end Set_Register_Exception_Call;
4973 procedure Set_Related_Array_Object (Id : E; V : E) is
4975 pragma Assert (Is_Array_Type (Id));
4977 end Set_Related_Array_Object;
4979 procedure Set_Related_Expression (Id : E; V : N) is
4981 pragma Assert (Ekind (Id) in Type_Kind
4982 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4984 end Set_Related_Expression;
4986 procedure Set_Related_Instance (Id : E; V : E) is
4988 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4990 end Set_Related_Instance;
4992 procedure Set_Related_Type (Id : E; V : E) is
4994 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4996 end Set_Related_Type;
4998 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5000 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5002 end Set_Relative_Deadline_Variable;
5004 procedure Set_Renamed_Entity (Id : E; V : N) is
5007 end Set_Renamed_Entity;
5009 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5011 pragma Assert (Ekind (Id) = E_Package);
5012 Set_Flag231 (Id, V);
5013 end Set_Renamed_In_Spec;
5015 procedure Set_Renamed_Object (Id : E; V : N) is
5018 end Set_Renamed_Object;
5020 procedure Set_Renaming_Map (Id : E; V : U) is
5023 end Set_Renaming_Map;
5025 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5027 pragma Assert (Is_Overloadable (Id));
5028 Set_Flag213 (Id, V);
5029 end Set_Requires_Overriding;
5031 procedure Set_Return_Present (Id : E; V : B := True) is
5034 end Set_Return_Present;
5036 procedure Set_Return_Applies_To (Id : E; V : N) is
5039 end Set_Return_Applies_To;
5041 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5044 end Set_Returns_By_Ref;
5046 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5049 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5050 Set_Flag164 (Id, V);
5051 end Set_Reverse_Bit_Order;
5053 procedure Set_RM_Size (Id : E; V : U) is
5055 pragma Assert (Is_Type (Id));
5059 procedure Set_Scalar_Range (Id : E; V : N) is
5062 end Set_Scalar_Range;
5064 procedure Set_Scale_Value (Id : E; V : U) is
5067 end Set_Scale_Value;
5069 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5071 pragma Assert (not Is_Record_Type (Id));
5073 end Set_Scope_Depth_Value;
5075 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5077 Set_Flag167 (Id, V);
5078 end Set_Sec_Stack_Needed_For_Return;
5080 procedure Set_Shadow_Entities (Id : E; V : S) is
5082 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5084 end Set_Shadow_Entities;
5086 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5088 pragma Assert (Ekind (Id) = E_Variable);
5090 end Set_Shared_Var_Procs_Instance;
5092 procedure Set_Size_Check_Code (Id : E; V : N) is
5094 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5096 end Set_Size_Check_Code;
5098 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5100 Set_Flag177 (Id, V);
5101 end Set_Size_Depends_On_Discriminant;
5103 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5106 end Set_Size_Known_At_Compile_Time;
5108 procedure Set_Small_Value (Id : E; V : R) is
5110 pragma Assert (Is_Fixed_Point_Type (Id));
5111 Set_Ureal21 (Id, V);
5112 end Set_Small_Value;
5114 procedure Set_Spec_Entity (Id : E; V : E) is
5116 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5118 end Set_Spec_Entity;
5120 procedure Set_Spec_PPC_List (Id : E; V : N) is
5123 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5124 or else Is_Subprogram (Id)
5125 or else Is_Generic_Subprogram (Id));
5127 end Set_Spec_PPC_List;
5129 procedure Set_Static_Predicate (Id : E; V : S) is
5132 (Ekind_In (Id, E_Enumeration_Subtype,
5133 E_Modular_Integer_Subtype,
5134 E_Signed_Integer_Subtype)
5135 and then Has_Predicates (Id));
5137 end Set_Static_Predicate;
5139 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5141 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5142 pragma Assert (Id = Base_Type (Id));
5144 end Set_Storage_Size_Variable;
5146 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5148 pragma Assert (Ekind (Id) = E_Package);
5150 end Set_Static_Elaboration_Desired;
5152 procedure Set_Static_Initialization (Id : E; V : N) is
5155 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5157 end Set_Static_Initialization;
5159 procedure Set_Stored_Constraint (Id : E; V : L) is
5161 pragma Assert (Nkind (Id) in N_Entity);
5162 Set_Elist23 (Id, V);
5163 end Set_Stored_Constraint;
5165 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5167 pragma Assert (Id = Base_Type (Id));
5168 Set_Flag145 (Id, V);
5169 end Set_Strict_Alignment;
5171 procedure Set_String_Literal_Length (Id : E; V : U) is
5173 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5175 end Set_String_Literal_Length;
5177 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5179 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5181 end Set_String_Literal_Low_Bound;
5183 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5185 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5187 end Set_Subprograms_For_Type;
5189 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5191 Set_Flag148 (Id, V);
5192 end Set_Suppress_Elaboration_Warnings;
5194 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5196 pragma Assert (Id = Base_Type (Id));
5197 Set_Flag105 (Id, V);
5198 end Set_Suppress_Init_Proc;
5200 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5202 Set_Flag165 (Id, V);
5203 end Set_Suppress_Style_Checks;
5205 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5207 Set_Flag217 (Id, V);
5208 end Set_Suppress_Value_Tracking_On_Call;
5210 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5212 pragma Assert (Ekind (Id) in Task_Kind);
5214 end Set_Task_Body_Procedure;
5216 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5219 end Set_Treat_As_Volatile;
5221 procedure Set_Underlying_Full_View (Id : E; V : E) is
5223 pragma Assert (Ekind (Id) in Private_Kind);
5225 end Set_Underlying_Full_View;
5227 procedure Set_Underlying_Record_View (Id : E; V : E) is
5229 pragma Assert (Ekind (Id) = E_Record_Type);
5231 end Set_Underlying_Record_View;
5233 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5235 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5236 Set_Flag216 (Id, V);
5237 end Set_Universal_Aliasing;
5239 procedure Set_Unset_Reference (Id : E; V : N) is
5242 end Set_Unset_Reference;
5244 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5247 end Set_Uses_Sec_Stack;
5249 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5251 Set_Flag222 (Id, V);
5252 end Set_Used_As_Generic_Actual;
5254 procedure Set_Warnings_Off (Id : E; V : B := True) is
5257 end Set_Warnings_Off;
5259 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5261 Set_Flag236 (Id, V);
5262 end Set_Warnings_Off_Used;
5264 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5266 Set_Flag237 (Id, V);
5267 end Set_Warnings_Off_Used_Unmodified;
5269 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5271 Set_Flag238 (Id, V);
5272 end Set_Warnings_Off_Used_Unreferenced;
5274 procedure Set_Was_Hidden (Id : E; V : B := True) is
5276 Set_Flag196 (Id, V);
5279 procedure Set_Wrapped_Entity (Id : E; V : E) is
5281 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5282 and then Is_Primitive_Wrapper (Id));
5284 end Set_Wrapped_Entity;
5286 -----------------------------------
5287 -- Field Initialization Routines --
5288 -----------------------------------
5290 procedure Init_Alignment (Id : E) is
5292 Set_Uint14 (Id, Uint_0);
5295 procedure Init_Alignment (Id : E; V : Int) is
5297 Set_Uint14 (Id, UI_From_Int (V));
5300 procedure Init_Component_Bit_Offset (Id : E) is
5302 Set_Uint11 (Id, No_Uint);
5303 end Init_Component_Bit_Offset;
5305 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5307 Set_Uint11 (Id, UI_From_Int (V));
5308 end Init_Component_Bit_Offset;
5310 procedure Init_Component_Size (Id : E) is
5312 Set_Uint22 (Id, Uint_0);
5313 end Init_Component_Size;
5315 procedure Init_Component_Size (Id : E; V : Int) is
5317 Set_Uint22 (Id, UI_From_Int (V));
5318 end Init_Component_Size;
5320 procedure Init_Digits_Value (Id : E) is
5322 Set_Uint17 (Id, Uint_0);
5323 end Init_Digits_Value;
5325 procedure Init_Digits_Value (Id : E; V : Int) is
5327 Set_Uint17 (Id, UI_From_Int (V));
5328 end Init_Digits_Value;
5330 procedure Init_Esize (Id : E) is
5332 Set_Uint12 (Id, Uint_0);
5335 procedure Init_Esize (Id : E; V : Int) is
5337 Set_Uint12 (Id, UI_From_Int (V));
5340 procedure Init_Normalized_First_Bit (Id : E) is
5342 Set_Uint8 (Id, No_Uint);
5343 end Init_Normalized_First_Bit;
5345 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5347 Set_Uint8 (Id, UI_From_Int (V));
5348 end Init_Normalized_First_Bit;
5350 procedure Init_Normalized_Position (Id : E) is
5352 Set_Uint14 (Id, No_Uint);
5353 end Init_Normalized_Position;
5355 procedure Init_Normalized_Position (Id : E; V : Int) is
5357 Set_Uint14 (Id, UI_From_Int (V));
5358 end Init_Normalized_Position;
5360 procedure Init_Normalized_Position_Max (Id : E) is
5362 Set_Uint10 (Id, No_Uint);
5363 end Init_Normalized_Position_Max;
5365 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5367 Set_Uint10 (Id, UI_From_Int (V));
5368 end Init_Normalized_Position_Max;
5370 procedure Init_RM_Size (Id : E) is
5372 Set_Uint13 (Id, Uint_0);
5375 procedure Init_RM_Size (Id : E; V : Int) is
5377 Set_Uint13 (Id, UI_From_Int (V));
5380 -----------------------------
5381 -- Init_Component_Location --
5382 -----------------------------
5384 procedure Init_Component_Location (Id : E) is
5386 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5387 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5388 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5389 Set_Uint12 (Id, Uint_0); -- Esize
5390 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5391 end Init_Component_Location;
5397 procedure Init_Size (Id : E; V : Int) is
5399 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5400 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5403 ---------------------
5404 -- Init_Size_Align --
5405 ---------------------
5407 procedure Init_Size_Align (Id : E) is
5409 Set_Uint12 (Id, Uint_0); -- Esize
5410 Set_Uint13 (Id, Uint_0); -- RM_Size
5411 Set_Uint14 (Id, Uint_0); -- Alignment
5412 end Init_Size_Align;
5414 ----------------------------------------------
5415 -- Type Representation Attribute Predicates --
5416 ----------------------------------------------
5418 function Known_Alignment (E : Entity_Id) return B is
5420 return Uint14 (E) /= Uint_0
5421 and then Uint14 (E) /= No_Uint;
5422 end Known_Alignment;
5424 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5426 return Uint11 (E) /= No_Uint;
5427 end Known_Component_Bit_Offset;
5429 function Known_Component_Size (E : Entity_Id) return B is
5431 return Uint22 (Base_Type (E)) /= Uint_0
5432 and then Uint22 (Base_Type (E)) /= No_Uint;
5433 end Known_Component_Size;
5435 function Known_Esize (E : Entity_Id) return B is
5437 return Uint12 (E) /= Uint_0
5438 and then Uint12 (E) /= No_Uint;
5441 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5443 return Uint8 (E) /= No_Uint;
5444 end Known_Normalized_First_Bit;
5446 function Known_Normalized_Position (E : Entity_Id) return B is
5448 return Uint14 (E) /= No_Uint;
5449 end Known_Normalized_Position;
5451 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5453 return Uint10 (E) /= No_Uint;
5454 end Known_Normalized_Position_Max;
5456 function Known_RM_Size (E : Entity_Id) return B is
5458 return Uint13 (E) /= No_Uint
5459 and then (Uint13 (E) /= Uint_0
5460 or else Is_Discrete_Type (E)
5461 or else Is_Fixed_Point_Type (E));
5464 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5466 return Uint11 (E) /= No_Uint
5467 and then Uint11 (E) >= Uint_0;
5468 end Known_Static_Component_Bit_Offset;
5470 function Known_Static_Component_Size (E : Entity_Id) return B is
5472 return Uint22 (Base_Type (E)) > Uint_0;
5473 end Known_Static_Component_Size;
5475 function Known_Static_Esize (E : Entity_Id) return B is
5477 return Uint12 (E) > Uint_0
5478 and then not Is_Generic_Type (E);
5479 end Known_Static_Esize;
5481 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5483 return Uint8 (E) /= No_Uint
5484 and then Uint8 (E) >= Uint_0;
5485 end Known_Static_Normalized_First_Bit;
5487 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5489 return Uint14 (E) /= No_Uint
5490 and then Uint14 (E) >= Uint_0;
5491 end Known_Static_Normalized_Position;
5493 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5495 return Uint10 (E) /= No_Uint
5496 and then Uint10 (E) >= Uint_0;
5497 end Known_Static_Normalized_Position_Max;
5499 function Known_Static_RM_Size (E : Entity_Id) return B is
5501 return (Uint13 (E) > Uint_0
5502 or else Is_Discrete_Type (E)
5503 or else Is_Fixed_Point_Type (E))
5504 and then not Is_Generic_Type (E);
5505 end Known_Static_RM_Size;
5507 function Unknown_Alignment (E : Entity_Id) return B is
5509 return Uint14 (E) = Uint_0
5510 or else Uint14 (E) = No_Uint;
5511 end Unknown_Alignment;
5513 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5515 return Uint11 (E) = No_Uint;
5516 end Unknown_Component_Bit_Offset;
5518 function Unknown_Component_Size (E : Entity_Id) return B is
5520 return Uint22 (Base_Type (E)) = Uint_0
5522 Uint22 (Base_Type (E)) = No_Uint;
5523 end Unknown_Component_Size;
5525 function Unknown_Esize (E : Entity_Id) return B is
5527 return Uint12 (E) = No_Uint
5529 Uint12 (E) = Uint_0;
5532 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5534 return Uint8 (E) = No_Uint;
5535 end Unknown_Normalized_First_Bit;
5537 function Unknown_Normalized_Position (E : Entity_Id) return B is
5539 return Uint14 (E) = No_Uint;
5540 end Unknown_Normalized_Position;
5542 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5544 return Uint10 (E) = No_Uint;
5545 end Unknown_Normalized_Position_Max;
5547 function Unknown_RM_Size (E : Entity_Id) return B is
5549 return (Uint13 (E) = Uint_0
5550 and then not Is_Discrete_Type (E)
5551 and then not Is_Fixed_Point_Type (E))
5552 or else Uint13 (E) = No_Uint;
5553 end Unknown_RM_Size;
5555 --------------------
5556 -- Address_Clause --
5557 --------------------
5559 function Address_Clause (Id : E) return N is
5561 return Rep_Clause (Id, Name_Address);
5568 function Aft_Value (Id : E) return U is
5570 Delta_Val : Ureal := Delta_Value (Id);
5572 while Delta_Val < Ureal_Tenth loop
5573 Delta_Val := Delta_Val * Ureal_10;
5574 Result := Result + 1;
5577 return UI_From_Int (Result);
5580 ----------------------
5581 -- Alignment_Clause --
5582 ----------------------
5584 function Alignment_Clause (Id : E) return N is
5586 return Rep_Clause (Id, Name_Alignment);
5587 end Alignment_Clause;
5593 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5595 if Last_Entity (V) = Empty then
5596 Set_First_Entity (Id => V, V => Id);
5598 Set_Next_Entity (Last_Entity (V), Id);
5601 Set_Next_Entity (Id, Empty);
5603 Set_Last_Entity (Id => V, V => Id);
5610 function Base_Type (Id : E) return E is
5613 when E_Enumeration_Subtype |
5615 E_Signed_Integer_Subtype |
5616 E_Modular_Integer_Subtype |
5617 E_Floating_Point_Subtype |
5618 E_Ordinary_Fixed_Point_Subtype |
5619 E_Decimal_Fixed_Point_Subtype |
5624 E_Record_Subtype_With_Private |
5625 E_Limited_Private_Subtype |
5627 E_Protected_Subtype |
5629 E_String_Literal_Subtype |
5630 E_Class_Wide_Subtype =>
5638 -------------------------
5639 -- Component_Alignment --
5640 -------------------------
5642 -- Component Alignment is encoded using two flags, Flag128/129 as
5643 -- follows. Note that both flags False = Align_Default, so that the
5644 -- default initialization of flags to False initializes component
5645 -- alignment to the default value as required.
5647 -- Flag128 Flag129 Value
5648 -- ------- ------- -----
5649 -- False False Calign_Default
5650 -- False True Calign_Component_Size
5651 -- True False Calign_Component_Size_4
5652 -- True True Calign_Storage_Unit
5654 function Component_Alignment (Id : E) return C is
5655 BT : constant Node_Id := Base_Type (Id);
5658 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5660 if Flag128 (BT) then
5661 if Flag129 (BT) then
5662 return Calign_Storage_Unit;
5664 return Calign_Component_Size_4;
5668 if Flag129 (BT) then
5669 return Calign_Component_Size;
5671 return Calign_Default;
5674 end Component_Alignment;
5676 ----------------------
5677 -- Declaration_Node --
5678 ----------------------
5680 function Declaration_Node (Id : E) return N is
5684 if Ekind (Id) = E_Incomplete_Type
5685 and then Present (Full_View (Id))
5687 P := Parent (Full_View (Id));
5693 if Nkind (P) /= N_Selected_Component
5694 and then Nkind (P) /= N_Expanded_Name
5696 not (Nkind (P) = N_Defining_Program_Unit_Name
5697 and then Is_Child_Unit (Id))
5704 end Declaration_Node;
5706 ---------------------
5707 -- Designated_Type --
5708 ---------------------
5710 function Designated_Type (Id : E) return E is
5714 Desig_Type := Directly_Designated_Type (Id);
5716 if Ekind (Desig_Type) = E_Incomplete_Type
5717 and then Present (Full_View (Desig_Type))
5719 return Full_View (Desig_Type);
5721 elsif Is_Class_Wide_Type (Desig_Type)
5722 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5723 and then Present (Full_View (Etype (Desig_Type)))
5724 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5726 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5731 end Designated_Type;
5733 ----------------------
5734 -- Entry_Index_Type --
5735 ----------------------
5737 function Entry_Index_Type (Id : E) return N is
5739 pragma Assert (Ekind (Id) = E_Entry_Family);
5740 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5741 end Entry_Index_Type;
5743 ---------------------
5744 -- First_Component --
5745 ---------------------
5747 function First_Component (Id : E) return E is
5752 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5754 Comp_Id := First_Entity (Id);
5755 while Present (Comp_Id) loop
5756 exit when Ekind (Comp_Id) = E_Component;
5757 Comp_Id := Next_Entity (Comp_Id);
5761 end First_Component;
5763 -------------------------------------
5764 -- First_Component_Or_Discriminant --
5765 -------------------------------------
5767 function First_Component_Or_Discriminant (Id : E) return E is
5772 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5774 Comp_Id := First_Entity (Id);
5775 while Present (Comp_Id) loop
5776 exit when Ekind (Comp_Id) = E_Component
5778 Ekind (Comp_Id) = E_Discriminant;
5779 Comp_Id := Next_Entity (Comp_Id);
5783 end First_Component_Or_Discriminant;
5789 function First_Formal (Id : E) return E is
5794 (Is_Overloadable (Id)
5795 or else Ekind_In (Id, E_Entry_Family,
5797 E_Subprogram_Type));
5799 if Ekind (Id) = E_Enumeration_Literal then
5803 Formal := First_Entity (Id);
5805 if Present (Formal) and then Is_Formal (Formal) then
5813 ------------------------------
5814 -- First_Formal_With_Extras --
5815 ------------------------------
5817 function First_Formal_With_Extras (Id : E) return E is
5822 (Is_Overloadable (Id)
5823 or else Ekind_In (Id, E_Entry_Family,
5825 E_Subprogram_Type));
5827 if Ekind (Id) = E_Enumeration_Literal then
5831 Formal := First_Entity (Id);
5833 if Present (Formal) and then Is_Formal (Formal) then
5836 return Extra_Formals (Id); -- Empty if no extra formals
5839 end First_Formal_With_Extras;
5841 -------------------------------------
5842 -- Get_Attribute_Definition_Clause --
5843 -------------------------------------
5845 function Get_Attribute_Definition_Clause
5847 Id : Attribute_Id) return Node_Id
5852 N := First_Rep_Item (E);
5853 while Present (N) loop
5854 if Nkind (N) = N_Attribute_Definition_Clause
5855 and then Get_Attribute_Id (Chars (N)) = Id
5864 end Get_Attribute_Definition_Clause;
5870 function Get_Full_View (T : Entity_Id) return Entity_Id is
5872 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5873 return Full_View (T);
5875 elsif Is_Class_Wide_Type (T)
5876 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5877 and then Present (Full_View (Root_Type (T)))
5879 return Class_Wide_Type (Full_View (Root_Type (T)));
5886 --------------------------------------
5887 -- Get_Record_Representation_Clause --
5888 --------------------------------------
5890 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5894 N := First_Rep_Item (E);
5895 while Present (N) loop
5896 if Nkind (N) = N_Record_Representation_Clause then
5904 end Get_Record_Representation_Clause;
5906 -----------------------------
5907 -- Get_Rep_Item_For_Entity --
5908 -----------------------------
5910 function Get_Rep_Item_For_Entity
5912 Nam : Name_Id) return Node_Id
5918 N := First_Rep_Item (E);
5919 while Present (N) loop
5920 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5921 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5923 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5927 elsif Nkind (N) = N_Attribute_Definition_Clause
5928 and then Chars (N) = Nam
5929 and then Entity (N) = E
5933 elsif Nkind (N) = N_Aspect_Specification
5934 and then Chars (Identifier (N)) = Nam
5935 and then Entity (N) = E
5944 end Get_Rep_Item_For_Entity;
5946 --------------------
5947 -- Get_Rep_Pragma --
5948 --------------------
5950 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5954 N := First_Rep_Item (E);
5955 while Present (N) loop
5956 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5966 ------------------------
5967 -- Has_Attach_Handler --
5968 ------------------------
5970 function Has_Attach_Handler (Id : E) return B is
5974 pragma Assert (Is_Protected_Type (Id));
5976 Ritem := First_Rep_Item (Id);
5977 while Present (Ritem) loop
5978 if Nkind (Ritem) = N_Pragma
5979 and then Pragma_Name (Ritem) = Name_Attach_Handler
5983 Next_Rep_Item (Ritem);
5988 end Has_Attach_Handler;
5990 -------------------------------------
5991 -- Has_Attribute_Definition_Clause --
5992 -------------------------------------
5994 function Has_Attribute_Definition_Clause
5996 Id : Attribute_Id) return Boolean
5999 return Present (Get_Attribute_Definition_Clause (E, Id));
6000 end Has_Attribute_Definition_Clause;
6006 function Has_Entries (Id : E) return B is
6010 pragma Assert (Is_Concurrent_Type (Id));
6012 Ent := First_Entity (Id);
6013 while Present (Ent) loop
6014 if Is_Entry (Ent) then
6018 Ent := Next_Entity (Ent);
6024 ----------------------------
6025 -- Has_Foreign_Convention --
6026 ----------------------------
6028 function Has_Foreign_Convention (Id : E) return B is
6030 -- While regular Intrinsics such as the Standard operators fit in the
6031 -- "Ada" convention, those with an Interface_Name materialize GCC
6032 -- builtin imports for which Ada special treatments shouldn't apply.
6034 return Convention (Id) in Foreign_Convention
6035 or else (Convention (Id) = Convention_Intrinsic
6036 and then Present (Interface_Name (Id)));
6037 end Has_Foreign_Convention;
6039 ---------------------------
6040 -- Has_Interrupt_Handler --
6041 ---------------------------
6043 function Has_Interrupt_Handler (Id : E) return B is
6047 pragma Assert (Is_Protected_Type (Id));
6049 Ritem := First_Rep_Item (Id);
6050 while Present (Ritem) loop
6051 if Nkind (Ritem) = N_Pragma
6052 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6056 Next_Rep_Item (Ritem);
6061 end Has_Interrupt_Handler;
6063 --------------------------
6064 -- Has_Private_Ancestor --
6065 --------------------------
6067 function Has_Private_Ancestor (Id : E) return B is
6068 R : constant Entity_Id := Root_Type (Id);
6069 T1 : Entity_Id := Id;
6072 if Is_Private_Type (T1) then
6080 end Has_Private_Ancestor;
6082 --------------------
6083 -- Has_Rep_Pragma --
6084 --------------------
6086 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6088 return Present (Get_Rep_Pragma (E, Nam));
6091 --------------------
6092 -- Has_Unmodified --
6093 --------------------
6095 function Has_Unmodified (E : Entity_Id) return Boolean is
6097 if Has_Pragma_Unmodified (E) then
6099 elsif Warnings_Off (E) then
6100 Set_Warnings_Off_Used_Unmodified (E);
6107 ---------------------
6108 -- Has_Unreferenced --
6109 ---------------------
6111 function Has_Unreferenced (E : Entity_Id) return Boolean is
6113 if Has_Pragma_Unreferenced (E) then
6115 elsif Warnings_Off (E) then
6116 Set_Warnings_Off_Used_Unreferenced (E);
6121 end Has_Unreferenced;
6123 ----------------------
6124 -- Has_Warnings_Off --
6125 ----------------------
6127 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6129 if Warnings_Off (E) then
6130 Set_Warnings_Off_Used (E);
6135 end Has_Warnings_Off;
6137 ------------------------------
6138 -- Implementation_Base_Type --
6139 ------------------------------
6141 function Implementation_Base_Type (Id : E) return E is
6146 Bastyp := Base_Type (Id);
6148 if Is_Incomplete_Or_Private_Type (Bastyp) then
6149 Imptyp := Underlying_Type (Bastyp);
6151 -- If we have an implementation type, then just return it,
6152 -- otherwise we return the Base_Type anyway. This can only
6153 -- happen in error situations and should avoid some error bombs.
6155 if Present (Imptyp) then
6156 return Base_Type (Imptyp);
6164 end Implementation_Base_Type;
6166 -------------------------
6167 -- Invariant_Procedure --
6168 -------------------------
6170 function Invariant_Procedure (Id : E) return E is
6174 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6176 if No (Subprograms_For_Type (Id)) then
6180 S := Subprograms_For_Type (Id);
6181 while Present (S) loop
6182 if Has_Invariants (S) then
6185 S := Subprograms_For_Type (S);
6191 end Invariant_Procedure;
6197 function Is_Base_Type (Id : E) return Boolean is
6199 return Id = Base_Type (Id);
6202 ---------------------
6203 -- Is_Boolean_Type --
6204 ---------------------
6206 function Is_Boolean_Type (Id : E) return B is
6208 return Root_Type (Id) = Standard_Boolean;
6209 end Is_Boolean_Type;
6211 ------------------------
6212 -- Is_Constant_Object --
6213 ------------------------
6215 function Is_Constant_Object (Id : E) return B is
6216 K : constant Entity_Kind := Ekind (Id);
6219 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6220 end Is_Constant_Object;
6222 --------------------
6223 -- Is_Discriminal --
6224 --------------------
6226 function Is_Discriminal (Id : E) return B is
6228 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6229 and then Present (Discriminal_Link (Id)));
6232 ----------------------
6233 -- Is_Dynamic_Scope --
6234 ----------------------
6236 function Is_Dynamic_Scope (Id : E) return B is
6239 Ekind (Id) = E_Block
6241 Ekind (Id) = E_Function
6243 Ekind (Id) = E_Procedure
6245 Ekind (Id) = E_Subprogram_Body
6247 Ekind (Id) = E_Task_Type
6249 (Ekind (Id) = E_Limited_Private_Type
6250 and then Present (Full_View (Id))
6251 and then Ekind (Full_View (Id)) = E_Task_Type)
6253 Ekind (Id) = E_Entry
6255 Ekind (Id) = E_Entry_Family
6257 Ekind (Id) = E_Return_Statement;
6258 end Is_Dynamic_Scope;
6260 --------------------
6261 -- Is_Entity_Name --
6262 --------------------
6264 function Is_Entity_Name (N : Node_Id) return Boolean is
6265 Kind : constant Node_Kind := Nkind (N);
6268 -- Identifiers, operator symbols, expanded names are entity names
6270 return Kind = N_Identifier
6271 or else Kind = N_Operator_Symbol
6272 or else Kind = N_Expanded_Name
6274 -- Attribute references are entity names if they refer to an entity.
6275 -- Note that we don't do this by testing for the presence of the
6276 -- Entity field in the N_Attribute_Reference node, since it may not
6277 -- have been set yet.
6279 or else (Kind = N_Attribute_Reference
6280 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6283 -----------------------------------
6284 -- Is_Package_Or_Generic_Package --
6285 -----------------------------------
6287 function Is_Package_Or_Generic_Package (Id : E) return B is
6290 Ekind (Id) = E_Package
6292 Ekind (Id) = E_Generic_Package;
6293 end Is_Package_Or_Generic_Package;
6295 ------------------------
6296 -- Predicate_Function --
6297 ------------------------
6299 function Predicate_Function (Id : E) return E is
6303 pragma Assert (Is_Type (Id));
6305 if No (Subprograms_For_Type (Id)) then
6309 S := Subprograms_For_Type (Id);
6310 while Present (S) loop
6311 if Has_Predicates (S) then
6314 S := Subprograms_For_Type (S);
6320 end Predicate_Function;
6326 function Is_Prival (Id : E) return B is
6328 return (Ekind_In (Id, E_Constant, E_Variable)
6329 and then Present (Prival_Link (Id)));
6332 ----------------------------
6333 -- Is_Protected_Component --
6334 ----------------------------
6336 function Is_Protected_Component (Id : E) return B is
6338 return Ekind (Id) = E_Component
6339 and then Is_Protected_Type (Scope (Id));
6340 end Is_Protected_Component;
6342 ----------------------------
6343 -- Is_Protected_Interface --
6344 ----------------------------
6346 function Is_Protected_Interface (Id : E) return B is
6347 Typ : constant Entity_Id := Base_Type (Id);
6349 if not Is_Interface (Typ) then
6351 elsif Is_Class_Wide_Type (Typ) then
6352 return Is_Protected_Interface (Etype (Typ));
6354 return Protected_Present (Type_Definition (Parent (Typ)));
6356 end Is_Protected_Interface;
6358 ------------------------------
6359 -- Is_Protected_Record_Type --
6360 ------------------------------
6362 function Is_Protected_Record_Type (Id : E) return B is
6365 Is_Concurrent_Record_Type (Id)
6366 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6367 end Is_Protected_Record_Type;
6369 --------------------------------
6370 -- Is_Standard_Character_Type --
6371 --------------------------------
6373 function Is_Standard_Character_Type (Id : E) return B is
6375 if Is_Type (Id) then
6377 R : constant Entity_Id := Root_Type (Id);
6380 R = Standard_Character
6382 R = Standard_Wide_Character
6384 R = Standard_Wide_Wide_Character;
6390 end Is_Standard_Character_Type;
6392 --------------------
6393 -- Is_String_Type --
6394 --------------------
6396 function Is_String_Type (Id : E) return B is
6398 return Ekind (Id) in String_Kind
6399 or else (Is_Array_Type (Id)
6400 and then Id /= Any_Composite
6401 and then Number_Dimensions (Id) = 1
6402 and then Is_Character_Type (Component_Type (Id)));
6405 -------------------------------
6406 -- Is_Synchronized_Interface --
6407 -------------------------------
6409 function Is_Synchronized_Interface (Id : E) return B is
6410 Typ : constant Entity_Id := Base_Type (Id);
6413 if not Is_Interface (Typ) then
6416 elsif Is_Class_Wide_Type (Typ) then
6417 return Is_Synchronized_Interface (Etype (Typ));
6420 return Protected_Present (Type_Definition (Parent (Typ)))
6421 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6422 or else Task_Present (Type_Definition (Parent (Typ)));
6424 end Is_Synchronized_Interface;
6426 -----------------------
6427 -- Is_Task_Interface --
6428 -----------------------
6430 function Is_Task_Interface (Id : E) return B is
6431 Typ : constant Entity_Id := Base_Type (Id);
6433 if not Is_Interface (Typ) then
6435 elsif Is_Class_Wide_Type (Typ) then
6436 return Is_Task_Interface (Etype (Typ));
6438 return Task_Present (Type_Definition (Parent (Typ)));
6440 end Is_Task_Interface;
6442 -------------------------
6443 -- Is_Task_Record_Type --
6444 -------------------------
6446 function Is_Task_Record_Type (Id : E) return B is
6449 Is_Concurrent_Record_Type (Id)
6450 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6451 end Is_Task_Record_Type;
6453 ------------------------
6454 -- Is_Wrapper_Package --
6455 ------------------------
6457 function Is_Wrapper_Package (Id : E) return B is
6459 return (Ekind (Id) = E_Package
6460 and then Present (Related_Instance (Id)));
6461 end Is_Wrapper_Package;
6467 function Last_Formal (Id : E) return E is
6472 (Is_Overloadable (Id)
6473 or else Ekind_In (Id, E_Entry_Family,
6475 E_Subprogram_Type));
6477 if Ekind (Id) = E_Enumeration_Literal then
6481 Formal := First_Formal (Id);
6483 if Present (Formal) then
6484 while Present (Next_Formal (Formal)) loop
6485 Formal := Next_Formal (Formal);
6493 function Model_Emin_Value (Id : E) return Uint is
6495 return Machine_Emin_Value (Id);
6496 end Model_Emin_Value;
6498 -------------------------
6499 -- Model_Epsilon_Value --
6500 -------------------------
6502 function Model_Epsilon_Value (Id : E) return Ureal is
6503 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6505 return Radix ** (1 - Model_Mantissa_Value (Id));
6506 end Model_Epsilon_Value;
6508 --------------------------
6509 -- Model_Mantissa_Value --
6510 --------------------------
6512 function Model_Mantissa_Value (Id : E) return Uint is
6514 return Machine_Mantissa_Value (Id);
6515 end Model_Mantissa_Value;
6517 -----------------------
6518 -- Model_Small_Value --
6519 -----------------------
6521 function Model_Small_Value (Id : E) return Ureal is
6522 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6524 return Radix ** (Model_Emin_Value (Id) - 1);
6525 end Model_Small_Value;
6527 ------------------------
6528 -- Machine_Emax_Value --
6529 ------------------------
6531 function Machine_Emax_Value (Id : E) return Uint is
6532 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6535 case Float_Rep (Id) is
6538 when 1 .. 6 => return Uint_128;
6539 when 7 .. 15 => return 2**10;
6540 when 16 .. 33 => return 2**14;
6541 when others => return No_Uint;
6546 when 1 .. 9 => return 2**7 - 1;
6547 when 10 .. 15 => return 2**10 - 1;
6548 when others => return No_Uint;
6552 return Uint_2 ** Uint_7 - Uint_1;
6554 end Machine_Emax_Value;
6556 ------------------------
6557 -- Machine_Emin_Value --
6558 ------------------------
6560 function Machine_Emin_Value (Id : E) return Uint is
6562 case Float_Rep (Id) is
6563 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6564 when VAX_Native => return -Machine_Emax_Value (Id);
6565 when AAMP => return -Machine_Emax_Value (Id);
6567 end Machine_Emin_Value;
6569 ----------------------------
6570 -- Machine_Mantissa_Value --
6571 ----------------------------
6573 function Machine_Mantissa_Value (Id : E) return Uint is
6574 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6577 case Float_Rep (Id) is
6580 when 1 .. 6 => return Uint_24;
6581 when 7 .. 15 => return UI_From_Int (53);
6582 when 16 .. 18 => return Uint_64;
6583 when 19 .. 33 => return UI_From_Int (113);
6584 when others => return No_Uint;
6589 when 1 .. 6 => return Uint_24;
6590 when 7 .. 9 => return UI_From_Int (56);
6591 when 10 .. 15 => return UI_From_Int (53);
6592 when others => return No_Uint;
6597 when 1 .. 6 => return Uint_24;
6598 when 7 .. 9 => return UI_From_Int (40);
6599 when others => return No_Uint;
6602 end Machine_Mantissa_Value;
6604 -------------------------
6605 -- Machine_Radix_Value --
6606 -------------------------
6608 function Machine_Radix_Value (Id : E) return U is
6610 case Float_Rep (Id) is
6611 when IEEE_Binary | VAX_Native | AAMP =>
6614 end Machine_Radix_Value;
6616 --------------------
6617 -- Next_Component --
6618 --------------------
6620 function Next_Component (Id : E) return E is
6624 Comp_Id := Next_Entity (Id);
6625 while Present (Comp_Id) loop
6626 exit when Ekind (Comp_Id) = E_Component;
6627 Comp_Id := Next_Entity (Comp_Id);
6633 ------------------------------------
6634 -- Next_Component_Or_Discriminant --
6635 ------------------------------------
6637 function Next_Component_Or_Discriminant (Id : E) return E is
6641 Comp_Id := Next_Entity (Id);
6642 while Present (Comp_Id) loop
6643 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6644 Comp_Id := Next_Entity (Comp_Id);
6648 end Next_Component_Or_Discriminant;
6650 -----------------------
6651 -- Next_Discriminant --
6652 -----------------------
6654 -- This function actually implements both Next_Discriminant and
6655 -- Next_Stored_Discriminant by making sure that the Discriminant
6656 -- returned is of the same variety as Id.
6658 function Next_Discriminant (Id : E) return E is
6660 -- Derived Tagged types with private extensions look like this...
6662 -- E_Discriminant d1
6663 -- E_Discriminant d2
6665 -- E_Discriminant d1
6666 -- E_Discriminant d2
6669 -- so it is critical not to go past the leading discriminants
6674 pragma Assert (Ekind (Id) = E_Discriminant);
6677 D := Next_Entity (D);
6679 or else (Ekind (D) /= E_Discriminant
6680 and then not Is_Itype (D))
6685 exit when Ekind (D) = E_Discriminant
6686 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6690 end Next_Discriminant;
6696 function Next_Formal (Id : E) return E is
6700 -- Follow the chain of declared entities as long as the kind of the
6701 -- entity corresponds to a formal parameter. Skip internal entities
6702 -- that may have been created for implicit subtypes, in the process
6703 -- of analyzing default expressions.
6707 P := Next_Entity (P);
6709 if No (P) or else Is_Formal (P) then
6711 elsif not Is_Internal (P) then
6717 -----------------------------
6718 -- Next_Formal_With_Extras --
6719 -----------------------------
6721 function Next_Formal_With_Extras (Id : E) return E is
6723 if Present (Extra_Formal (Id)) then
6724 return Extra_Formal (Id);
6726 return Next_Formal (Id);
6728 end Next_Formal_With_Extras;
6734 function Next_Index (Id : Node_Id) return Node_Id is
6743 function Next_Literal (Id : E) return E is
6745 pragma Assert (Nkind (Id) in N_Entity);
6749 ------------------------------
6750 -- Next_Stored_Discriminant --
6751 ------------------------------
6753 function Next_Stored_Discriminant (Id : E) return E is
6755 -- See comment in Next_Discriminant
6757 return Next_Discriminant (Id);
6758 end Next_Stored_Discriminant;
6760 -----------------------
6761 -- Number_Dimensions --
6762 -----------------------
6764 function Number_Dimensions (Id : E) return Pos is
6769 if Ekind (Id) in String_Kind then
6774 T := First_Index (Id);
6775 while Present (T) loop
6782 end Number_Dimensions;
6784 --------------------
6785 -- Number_Entries --
6786 --------------------
6788 function Number_Entries (Id : E) return Nat is
6793 pragma Assert (Is_Concurrent_Type (Id));
6796 Ent := First_Entity (Id);
6797 while Present (Ent) loop
6798 if Is_Entry (Ent) then
6802 Ent := Next_Entity (Ent);
6808 --------------------
6809 -- Number_Formals --
6810 --------------------
6812 function Number_Formals (Id : E) return Pos is
6818 Formal := First_Formal (Id);
6819 while Present (Formal) loop
6821 Formal := Next_Formal (Formal);
6827 --------------------
6828 -- Parameter_Mode --
6829 --------------------
6831 function Parameter_Mode (Id : E) return Formal_Kind is
6836 --------------------------
6837 -- Primitive_Operations --
6838 --------------------------
6840 function Primitive_Operations (Id : E) return L is
6842 if Is_Concurrent_Type (Id) then
6843 if Present (Corresponding_Record_Type (Id)) then
6844 return Direct_Primitive_Operations
6845 (Corresponding_Record_Type (Id));
6850 return Direct_Primitive_Operations (Id);
6852 end Primitive_Operations;
6854 ---------------------
6855 -- Record_Rep_Item --
6856 ---------------------
6858 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6860 Set_Next_Rep_Item (N, First_Rep_Item (E));
6861 Set_First_Rep_Item (E, N);
6862 end Record_Rep_Item;
6868 function Root_Type (Id : E) return E is
6872 pragma Assert (Nkind (Id) in N_Entity);
6874 T := Base_Type (Id);
6876 if Ekind (T) = E_Class_Wide_Type then
6879 elsif Ekind (T) = E_Class_Wide_Subtype then
6880 return Etype (Base_Type (T));
6882 -- ??? T comes from Base_Type, how can it be a subtype?
6883 -- Also Base_Type is supposed to be idempotent, so either way
6884 -- this is equivalent to "return Etype (T)" and should be merged
6885 -- with the E_Class_Wide_Type case.
6896 -- Following test catches some error cases resulting from
6899 elsif No (Etyp) then
6902 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6905 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6911 -- Return if there is a circularity in the inheritance chain. This
6912 -- happens in some error situations and we do not want to get
6913 -- stuck in this loop.
6915 if T = Base_Type (Id) then
6922 ---------------------
6923 -- Safe_Emax_Value --
6924 ---------------------
6926 function Safe_Emax_Value (Id : E) return Uint is
6928 return Machine_Emax_Value (Id);
6929 end Safe_Emax_Value;
6931 ----------------------
6932 -- Safe_First_Value --
6933 ----------------------
6935 function Safe_First_Value (Id : E) return Ureal is
6937 return -Safe_Last_Value (Id);
6938 end Safe_First_Value;
6940 ---------------------
6941 -- Safe_Last_Value --
6942 ---------------------
6944 function Safe_Last_Value (Id : E) return Ureal is
6945 Radix : constant Uint := Machine_Radix_Value (Id);
6946 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
6947 Emax : constant Uint := Safe_Emax_Value (Id);
6948 Significand : constant Uint := Radix ** Mantissa - 1;
6949 Exponent : constant Uint := Emax - Mantissa;
6955 (Num => Significand * 2 ** (Exponent mod 4),
6956 Den => -Exponent / 4,
6962 (Num => Significand,
6966 end Safe_Last_Value;
6972 function Scope_Depth (Id : E) return Uint is
6977 while Is_Record_Type (Scop) loop
6978 Scop := Scope (Scop);
6981 return Scope_Depth_Value (Scop);
6984 ---------------------
6985 -- Scope_Depth_Set --
6986 ---------------------
6988 function Scope_Depth_Set (Id : E) return B is
6990 return not Is_Record_Type (Id)
6991 and then Field22 (Id) /= Union_Id (Empty);
6992 end Scope_Depth_Set;
6994 -----------------------------
6995 -- Set_Component_Alignment --
6996 -----------------------------
6998 -- Component Alignment is encoded using two flags, Flag128/129 as
6999 -- follows. Note that both flags False = Align_Default, so that the
7000 -- default initialization of flags to False initializes component
7001 -- alignment to the default value as required.
7003 -- Flag128 Flag129 Value
7004 -- ------- ------- -----
7005 -- False False Calign_Default
7006 -- False True Calign_Component_Size
7007 -- True False Calign_Component_Size_4
7008 -- True True Calign_Storage_Unit
7010 procedure Set_Component_Alignment (Id : E; V : C) is
7012 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7013 and then Is_Base_Type (Id));
7016 when Calign_Default =>
7017 Set_Flag128 (Id, False);
7018 Set_Flag129 (Id, False);
7020 when Calign_Component_Size =>
7021 Set_Flag128 (Id, False);
7022 Set_Flag129 (Id, True);
7024 when Calign_Component_Size_4 =>
7025 Set_Flag128 (Id, True);
7026 Set_Flag129 (Id, False);
7028 when Calign_Storage_Unit =>
7029 Set_Flag128 (Id, True);
7030 Set_Flag129 (Id, True);
7032 end Set_Component_Alignment;
7034 -----------------------------
7035 -- Set_Invariant_Procedure --
7036 -----------------------------
7038 procedure Set_Invariant_Procedure (Id : E; V : E) is
7042 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7044 S := Subprograms_For_Type (Id);
7045 Set_Subprograms_For_Type (Id, V);
7047 while Present (S) loop
7048 if Has_Invariants (S) then
7049 raise Program_Error;
7051 S := Subprograms_For_Type (S);
7055 Set_Subprograms_For_Type (Id, V);
7056 end Set_Invariant_Procedure;
7058 ----------------------------
7059 -- Set_Predicate_Function --
7060 ----------------------------
7062 procedure Set_Predicate_Function (Id : E; V : E) is
7066 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7068 S := Subprograms_For_Type (Id);
7069 Set_Subprograms_For_Type (Id, V);
7071 while Present (S) loop
7072 if Has_Predicates (S) then
7073 raise Program_Error;
7075 S := Subprograms_For_Type (S);
7079 Set_Subprograms_For_Type (Id, V);
7080 end Set_Predicate_Function;
7086 function Size_Clause (Id : E) return N is
7088 return Rep_Clause (Id, Name_Size);
7091 ------------------------
7092 -- Stream_Size_Clause --
7093 ------------------------
7095 function Stream_Size_Clause (Id : E) return N is
7097 return Rep_Clause (Id, Name_Stream_Size);
7098 end Stream_Size_Clause;
7104 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7110 Kind := E_Access_Subtype;
7114 Kind := E_Array_Subtype;
7116 when E_Class_Wide_Type |
7117 E_Class_Wide_Subtype =>
7118 Kind := E_Class_Wide_Subtype;
7120 when E_Decimal_Fixed_Point_Type |
7121 E_Decimal_Fixed_Point_Subtype =>
7122 Kind := E_Decimal_Fixed_Point_Subtype;
7124 when E_Ordinary_Fixed_Point_Type |
7125 E_Ordinary_Fixed_Point_Subtype =>
7126 Kind := E_Ordinary_Fixed_Point_Subtype;
7128 when E_Private_Type |
7129 E_Private_Subtype =>
7130 Kind := E_Private_Subtype;
7132 when E_Limited_Private_Type |
7133 E_Limited_Private_Subtype =>
7134 Kind := E_Limited_Private_Subtype;
7136 when E_Record_Type_With_Private |
7137 E_Record_Subtype_With_Private =>
7138 Kind := E_Record_Subtype_With_Private;
7140 when E_Record_Type |
7142 Kind := E_Record_Subtype;
7144 when E_String_Type |
7146 Kind := E_String_Subtype;
7148 when Enumeration_Kind =>
7149 Kind := E_Enumeration_Subtype;
7152 Kind := E_Floating_Point_Subtype;
7154 when Signed_Integer_Kind =>
7155 Kind := E_Signed_Integer_Subtype;
7157 when Modular_Integer_Kind =>
7158 Kind := E_Modular_Integer_Subtype;
7160 when Protected_Kind =>
7161 Kind := E_Protected_Subtype;
7164 Kind := E_Task_Subtype;
7168 raise Program_Error;
7174 ---------------------
7175 -- Type_High_Bound --
7176 ---------------------
7178 function Type_High_Bound (Id : E) return Node_Id is
7179 Rng : constant Node_Id := Scalar_Range (Id);
7181 if Nkind (Rng) = N_Subtype_Indication then
7182 return High_Bound (Range_Expression (Constraint (Rng)));
7184 return High_Bound (Rng);
7186 end Type_High_Bound;
7188 --------------------
7189 -- Type_Low_Bound --
7190 --------------------
7192 function Type_Low_Bound (Id : E) return Node_Id is
7193 Rng : constant Node_Id := Scalar_Range (Id);
7195 if Nkind (Rng) = N_Subtype_Indication then
7196 return Low_Bound (Range_Expression (Constraint (Rng)));
7198 return Low_Bound (Rng);
7202 ---------------------
7203 -- Underlying_Type --
7204 ---------------------
7206 function Underlying_Type (Id : E) return E is
7208 -- For record_with_private the underlying type is always the direct
7209 -- full view. Never try to take the full view of the parent it
7210 -- doesn't make sense.
7212 if Ekind (Id) = E_Record_Type_With_Private then
7213 return Full_View (Id);
7215 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7217 -- If we have an incomplete or private type with a full view,
7218 -- then we return the Underlying_Type of this full view
7220 if Present (Full_View (Id)) then
7221 if Id = Full_View (Id) then
7223 -- Previous error in declaration
7228 return Underlying_Type (Full_View (Id));
7231 -- If we have an incomplete entity that comes from the limited
7232 -- view then we return the Underlying_Type of its non-limited
7235 elsif From_With_Type (Id)
7236 and then Present (Non_Limited_View (Id))
7238 return Underlying_Type (Non_Limited_View (Id));
7240 -- Otherwise check for the case where we have a derived type or
7241 -- subtype, and if so get the Underlying_Type of the parent type.
7243 elsif Etype (Id) /= Id then
7244 return Underlying_Type (Etype (Id));
7246 -- Otherwise we have an incomplete or private type that has
7247 -- no full view, which means that we have not encountered the
7248 -- completion, so return Empty to indicate the underlying type
7249 -- is not yet known.
7255 -- For non-incomplete, non-private types, return the type itself
7256 -- Also for entities that are not types at all return the entity
7262 end Underlying_Type;
7268 function Vax_Float (Id : E) return B is
7270 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7273 ------------------------
7274 -- Write_Entity_Flags --
7275 ------------------------
7277 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7279 procedure W (Flag_Name : String; Flag : Boolean);
7280 -- Write out given flag if it is set
7286 procedure W (Flag_Name : String; Flag : Boolean) is
7290 Write_Str (Flag_Name);
7291 Write_Str (" = True");
7296 -- Start of processing for Write_Entity_Flags
7299 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7300 and then Is_Base_Type (Id)
7303 Write_Str ("Component_Alignment = ");
7305 case Component_Alignment (Id) is
7306 when Calign_Default =>
7307 Write_Str ("Calign_Default");
7309 when Calign_Component_Size =>
7310 Write_Str ("Calign_Component_Size");
7312 when Calign_Component_Size_4 =>
7313 Write_Str ("Calign_Component_Size_4");
7315 when Calign_Storage_Unit =>
7316 Write_Str ("Calign_Storage_Unit");
7322 W ("Address_Taken", Flag104 (Id));
7323 W ("Body_Needed_For_SAL", Flag40 (Id));
7324 W ("C_Pass_By_Copy", Flag125 (Id));
7325 W ("Can_Never_Be_Null", Flag38 (Id));
7326 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7327 W ("Debug_Info_Off", Flag166 (Id));
7328 W ("Default_Expressions_Processed", Flag108 (Id));
7329 W ("Delay_Cleanups", Flag114 (Id));
7330 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7331 W ("Depends_On_Private", Flag14 (Id));
7332 W ("Discard_Names", Flag88 (Id));
7333 W ("Elaboration_Entity_Required", Flag174 (Id));
7334 W ("Elaborate_Body_Desirable", Flag210 (Id));
7335 W ("Entry_Accepted", Flag152 (Id));
7336 W ("Can_Use_Internal_Rep", Flag229 (Id));
7337 W ("Finalize_Storage_Only", Flag158 (Id));
7338 W ("From_With_Type", Flag159 (Id));
7339 W ("Has_Aliased_Components", Flag135 (Id));
7340 W ("Has_Alignment_Clause", Flag46 (Id));
7341 W ("Has_All_Calls_Remote", Flag79 (Id));
7342 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7343 W ("Has_Atomic_Components", Flag86 (Id));
7344 W ("Has_Biased_Representation", Flag139 (Id));
7345 W ("Has_Completion", Flag26 (Id));
7346 W ("Has_Completion_In_Body", Flag71 (Id));
7347 W ("Has_Complex_Representation", Flag140 (Id));
7348 W ("Has_Component_Size_Clause", Flag68 (Id));
7349 W ("Has_Contiguous_Rep", Flag181 (Id));
7350 W ("Has_Controlled_Component", Flag43 (Id));
7351 W ("Has_Controlling_Result", Flag98 (Id));
7352 W ("Has_Convention_Pragma", Flag119 (Id));
7353 W ("Has_Default_Component_Value", Flag151 (Id));
7354 W ("Has_Default_Value", Flag39 (Id));
7355 W ("Has_Delayed_Aspects", Flag200 (Id));
7356 W ("Has_Delayed_Freeze", Flag18 (Id));
7357 W ("Has_Discriminants", Flag5 (Id));
7358 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7359 W ("Has_Exit", Flag47 (Id));
7360 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7361 W ("Has_Forward_Instantiation", Flag175 (Id));
7362 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7363 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7364 W ("Has_Homonym", Flag56 (Id));
7365 W ("Has_Inheritable_Invariants", Flag248 (Id));
7366 W ("Has_Initial_Value", Flag219 (Id));
7367 W ("Has_Invariants", Flag232 (Id));
7368 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7369 W ("Has_Master_Entity", Flag21 (Id));
7370 W ("Has_Missing_Return", Flag142 (Id));
7371 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7372 W ("Has_Non_Standard_Rep", Flag75 (Id));
7373 W ("Has_Object_Size_Clause", Flag172 (Id));
7374 W ("Has_Per_Object_Constraint", Flag154 (Id));
7375 W ("Has_Persistent_BSS", Flag188 (Id));
7376 W ("Has_Postconditions", Flag240 (Id));
7377 W ("Has_Pragma_Controlled", Flag27 (Id));
7378 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7379 W ("Has_Pragma_Inline", Flag157 (Id));
7380 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7381 W ("Has_Pragma_Ordered", Flag198 (Id));
7382 W ("Has_Pragma_Pack", Flag121 (Id));
7383 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7384 W ("Has_Pragma_Pure", Flag203 (Id));
7385 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7386 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7387 W ("Has_Pragma_Unmodified", Flag233 (Id));
7388 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7389 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7390 W ("Has_Predicates", Flag250 (Id));
7391 W ("Has_Primitive_Operations", Flag120 (Id));
7392 W ("Has_Private_Declaration", Flag155 (Id));
7393 W ("Has_Qualified_Name", Flag161 (Id));
7394 W ("Has_RACW", Flag214 (Id));
7395 W ("Has_Record_Rep_Clause", Flag65 (Id));
7396 W ("Has_Recursive_Call", Flag143 (Id));
7397 W ("Has_Size_Clause", Flag29 (Id));
7398 W ("Has_Small_Clause", Flag67 (Id));
7399 W ("Has_Specified_Layout", Flag100 (Id));
7400 W ("Has_Specified_Stream_Input", Flag190 (Id));
7401 W ("Has_Specified_Stream_Output", Flag191 (Id));
7402 W ("Has_Specified_Stream_Read", Flag192 (Id));
7403 W ("Has_Specified_Stream_Write", Flag193 (Id));
7404 W ("Has_Static_Discriminants", Flag211 (Id));
7405 W ("Has_Storage_Size_Clause", Flag23 (Id));
7406 W ("Has_Stream_Size_Clause", Flag184 (Id));
7407 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7408 W ("Has_Task", Flag30 (Id));
7409 W ("Has_Thunks", Flag228 (Id));
7410 W ("Has_Unchecked_Union", Flag123 (Id));
7411 W ("Has_Unknown_Discriminants", Flag72 (Id));
7412 W ("Has_Up_Level_Access", Flag215 (Id));
7413 W ("Has_Volatile_Components", Flag87 (Id));
7414 W ("Has_Xref_Entry", Flag182 (Id));
7415 W ("In_Package_Body", Flag48 (Id));
7416 W ("In_Private_Part", Flag45 (Id));
7417 W ("In_Use", Flag8 (Id));
7418 W ("Is_AST_Entry", Flag132 (Id));
7419 W ("Is_Abstract_Subprogram", Flag19 (Id));
7420 W ("Is_Abstract_Type", Flag146 (Id));
7421 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7422 W ("Is_Access_Constant", Flag69 (Id));
7423 W ("Is_Ada_2005_Only", Flag185 (Id));
7424 W ("Is_Ada_2012_Only", Flag199 (Id));
7425 W ("Is_Aliased", Flag15 (Id));
7426 W ("Is_Asynchronous", Flag81 (Id));
7427 W ("Is_Atomic", Flag85 (Id));
7428 W ("Is_Bit_Packed_Array", Flag122 (Id));
7429 W ("Is_CPP_Class", Flag74 (Id));
7430 W ("Is_Called", Flag102 (Id));
7431 W ("Is_Character_Type", Flag63 (Id));
7432 W ("Is_Child_Unit", Flag73 (Id));
7433 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7434 W ("Is_Compilation_Unit", Flag149 (Id));
7435 W ("Is_Completely_Hidden", Flag103 (Id));
7436 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7437 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7438 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7439 W ("Is_Constrained", Flag12 (Id));
7440 W ("Is_Constructor", Flag76 (Id));
7441 W ("Is_Controlled", Flag42 (Id));
7442 W ("Is_Controlling_Formal", Flag97 (Id));
7443 W ("Is_Descendent_Of_Address", Flag223 (Id));
7444 W ("Is_Discrim_SO_Function", Flag176 (Id));
7445 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7446 W ("Is_Dispatching_Operation", Flag6 (Id));
7447 W ("Is_Eliminated", Flag124 (Id));
7448 W ("Is_Entry_Formal", Flag52 (Id));
7449 W ("Is_Exported", Flag99 (Id));
7450 W ("Is_First_Subtype", Flag70 (Id));
7451 W ("Is_For_Access_Subtype", Flag118 (Id));
7452 W ("Is_Formal_Subprogram", Flag111 (Id));
7453 W ("Is_Frozen", Flag4 (Id));
7454 W ("Is_Generic_Actual_Type", Flag94 (Id));
7455 W ("Is_Generic_Instance", Flag130 (Id));
7456 W ("Is_Generic_Type", Flag13 (Id));
7457 W ("Is_Hidden", Flag57 (Id));
7458 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7459 W ("Is_Immediately_Visible", Flag7 (Id));
7460 W ("Is_Imported", Flag24 (Id));
7461 W ("Is_Inlined", Flag11 (Id));
7462 W ("Is_Instantiated", Flag126 (Id));
7463 W ("Is_Interface", Flag186 (Id));
7464 W ("Is_Internal", Flag17 (Id));
7465 W ("Is_Interrupt_Handler", Flag89 (Id));
7466 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7467 W ("Is_Itype", Flag91 (Id));
7468 W ("Is_Known_Non_Null", Flag37 (Id));
7469 W ("Is_Known_Null", Flag204 (Id));
7470 W ("Is_Known_Valid", Flag170 (Id));
7471 W ("Is_Limited_Composite", Flag106 (Id));
7472 W ("Is_Limited_Interface", Flag197 (Id));
7473 W ("Is_Limited_Record", Flag25 (Id));
7474 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7475 W ("Is_Non_Static_Subtype", Flag109 (Id));
7476 W ("Is_Null_Init_Proc", Flag178 (Id));
7477 W ("Is_Obsolescent", Flag153 (Id));
7478 W ("Is_Only_Out_Parameter", Flag226 (Id));
7479 W ("Is_Optional_Parameter", Flag134 (Id));
7480 W ("Is_Package_Body_Entity", Flag160 (Id));
7481 W ("Is_Packed", Flag51 (Id));
7482 W ("Is_Packed_Array_Type", Flag138 (Id));
7483 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7484 W ("Is_Preelaborated", Flag59 (Id));
7485 W ("Is_Primitive", Flag218 (Id));
7486 W ("Is_Primitive_Wrapper", Flag195 (Id));
7487 W ("Is_Private_Composite", Flag107 (Id));
7488 W ("Is_Private_Descendant", Flag53 (Id));
7489 W ("Is_Private_Primitive", Flag245 (Id));
7490 W ("Is_Public", Flag10 (Id));
7491 W ("Is_Pure", Flag44 (Id));
7492 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7493 W ("Is_RACW_Stub_Type", Flag244 (Id));
7494 W ("Is_Raised", Flag224 (Id));
7495 W ("Is_Remote_Call_Interface", Flag62 (Id));
7496 W ("Is_Remote_Types", Flag61 (Id));
7497 W ("Is_Renaming_Of_Object", Flag112 (Id));
7498 W ("Is_Return_Object", Flag209 (Id));
7499 W ("Is_Shared_Passive", Flag60 (Id));
7500 W ("Is_Statically_Allocated", Flag28 (Id));
7501 W ("Is_Tag", Flag78 (Id));
7502 W ("Is_Tagged_Type", Flag55 (Id));
7503 W ("Is_Thunk", Flag225 (Id));
7504 W ("Is_Trivial_Subprogram", Flag235 (Id));
7505 W ("Is_True_Constant", Flag163 (Id));
7506 W ("Is_Unchecked_Union", Flag117 (Id));
7507 W ("Is_Underlying_Record_View", Flag246 (Id));
7508 W ("Is_Unsigned_Type", Flag144 (Id));
7509 W ("Is_VMS_Exception", Flag133 (Id));
7510 W ("Is_Valued_Procedure", Flag127 (Id));
7511 W ("Is_Visible_Child_Unit", Flag116 (Id));
7512 W ("Is_Visible_Formal", Flag206 (Id));
7513 W ("Is_Volatile", Flag16 (Id));
7514 W ("Itype_Printed", Flag202 (Id));
7515 W ("Kill_Elaboration_Checks", Flag32 (Id));
7516 W ("Kill_Range_Checks", Flag33 (Id));
7517 W ("Kill_Tag_Checks", Flag34 (Id));
7518 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7519 W ("Low_Bound_Tested", Flag205 (Id));
7520 W ("Machine_Radix_10", Flag84 (Id));
7521 W ("Materialize_Entity", Flag168 (Id));
7522 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7523 W ("Must_Have_Preelab_Init", Flag208 (Id));
7524 W ("Needs_Debug_Info", Flag147 (Id));
7525 W ("Needs_No_Actuals", Flag22 (Id));
7526 W ("Never_Set_In_Source", Flag115 (Id));
7527 W ("No_Pool_Assigned", Flag131 (Id));
7528 W ("No_Return", Flag113 (Id));
7529 W ("No_Strict_Aliasing", Flag136 (Id));
7530 W ("Non_Binary_Modulus", Flag58 (Id));
7531 W ("Nonzero_Is_True", Flag162 (Id));
7532 W ("OK_To_Rename", Flag247 (Id));
7533 W ("OK_To_Reorder_Components", Flag239 (Id));
7534 W ("Optimize_Alignment_Space", Flag241 (Id));
7535 W ("Optimize_Alignment_Time", Flag242 (Id));
7536 W ("Overlays_Constant", Flag243 (Id));
7537 W ("Reachable", Flag49 (Id));
7538 W ("Referenced", Flag156 (Id));
7539 W ("Referenced_As_LHS", Flag36 (Id));
7540 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7541 W ("Renamed_In_Spec", Flag231 (Id));
7542 W ("Requires_Overriding", Flag213 (Id));
7543 W ("Return_Present", Flag54 (Id));
7544 W ("Returns_By_Ref", Flag90 (Id));
7545 W ("Reverse_Bit_Order", Flag164 (Id));
7546 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7547 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7548 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7549 W ("Static_Elaboration_Desired", Flag77 (Id));
7550 W ("Strict_Alignment", Flag145 (Id));
7551 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7552 W ("Suppress_Init_Proc", Flag105 (Id));
7553 W ("Suppress_Style_Checks", Flag165 (Id));
7554 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7555 W ("Treat_As_Volatile", Flag41 (Id));
7556 W ("Universal_Aliasing", Flag216 (Id));
7557 W ("Used_As_Generic_Actual", Flag222 (Id));
7558 W ("Uses_Sec_Stack", Flag95 (Id));
7559 W ("Warnings_Off", Flag96 (Id));
7560 W ("Warnings_Off_Used", Flag236 (Id));
7561 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7562 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7563 W ("Was_Hidden", Flag196 (Id));
7564 end Write_Entity_Flags;
7566 -----------------------
7567 -- Write_Entity_Info --
7568 -----------------------
7570 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7572 procedure Write_Attribute (Which : String; Nam : E);
7573 -- Write attribute value with given string name
7575 procedure Write_Kind (Id : Entity_Id);
7576 -- Write Ekind field of entity
7578 ---------------------
7579 -- Write_Attribute --
7580 ---------------------
7582 procedure Write_Attribute (Which : String; Nam : E) is
7586 Write_Int (Int (Nam));
7588 Write_Name (Chars (Nam));
7590 end Write_Attribute;
7596 procedure Write_Kind (Id : Entity_Id) is
7597 K : constant String := Entity_Kind'Image (Ekind (Id));
7601 Write_Str (" Kind ");
7603 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7604 Write_Str ("TAGGED ");
7607 Write_Str (K (3 .. K'Length));
7610 if Is_Type (Id) and then Depends_On_Private (Id) then
7611 Write_Str ("Depends_On_Private ");
7615 -- Start of processing for Write_Entity_Info
7619 Write_Attribute ("Name ", Id);
7620 Write_Int (Int (Id));
7624 Write_Attribute (" Type ", Etype (Id));
7626 Write_Attribute (" Scope ", Scope (Id));
7631 when Discrete_Kind =>
7632 Write_Str ("Bounds: Id = ");
7634 if Present (Scalar_Range (Id)) then
7635 Write_Int (Int (Type_Low_Bound (Id)));
7636 Write_Str (" .. Id = ");
7637 Write_Int (Int (Type_High_Bound (Id)));
7639 Write_Str ("Empty");
7650 (" Component Type ", Component_Type (Id));
7653 Write_Str (" Indexes ");
7655 Index := First_Index (Id);
7656 while Present (Index) loop
7657 Write_Attribute (" ", Etype (Index));
7658 Index := Next_Index (Index);
7666 (" Directly Designated Type ",
7667 Directly_Designated_Type (Id));
7670 when Overloadable_Kind =>
7671 if Present (Homonym (Id)) then
7672 Write_Str (" Homonym ");
7673 Write_Name (Chars (Homonym (Id)));
7675 Write_Int (Int (Homonym (Id)));
7682 if Ekind (Scope (Id)) in Record_Kind then
7684 " Original_Record_Component ",
7685 Original_Record_Component (Id));
7686 Write_Int (Int (Original_Record_Component (Id)));
7690 when others => null;
7692 end Write_Entity_Info;
7694 -----------------------
7695 -- Write_Field6_Name --
7696 -----------------------
7698 procedure Write_Field6_Name (Id : Entity_Id) is
7699 pragma Warnings (Off, Id);
7701 Write_Str ("First_Rep_Item");
7702 end Write_Field6_Name;
7704 -----------------------
7705 -- Write_Field7_Name --
7706 -----------------------
7708 procedure Write_Field7_Name (Id : Entity_Id) is
7709 pragma Warnings (Off, Id);
7711 Write_Str ("Freeze_Node");
7712 end Write_Field7_Name;
7714 -----------------------
7715 -- Write_Field8_Name --
7716 -----------------------
7718 procedure Write_Field8_Name (Id : Entity_Id) is
7723 Write_Str ("Normalized_First_Bit");
7727 E_Subprogram_Body =>
7728 Write_Str ("Mechanism");
7731 Write_Str ("Associated_Node_For_Itype");
7734 Write_Str ("First_Exit_Statement");
7737 Write_Str ("Dependent_Instances");
7740 Write_Str ("Postcondition_Proc");
7742 when E_Return_Statement =>
7743 Write_Str ("Return_Applies_To");
7746 Write_Str ("Hiding_Loop_Variable");
7749 Write_Str ("Field8??");
7751 end Write_Field8_Name;
7753 -----------------------
7754 -- Write_Field9_Name --
7755 -----------------------
7757 procedure Write_Field9_Name (Id : Entity_Id) is
7761 Write_Str ("Class_Wide_Type");
7764 E_Generic_Function |
7766 E_Generic_Procedure |
7769 Write_Str ("Renaming_Map");
7772 Write_Str ("Current_Value");
7775 Write_Str ("Field9??");
7777 end Write_Field9_Name;
7779 ------------------------
7780 -- Write_Field10_Name --
7781 ------------------------
7783 procedure Write_Field10_Name (Id : Entity_Id) is
7786 when Class_Wide_Kind |
7792 Write_Str ("Direct_Primitive_Operations");
7795 Write_Str ("Float_Rep");
7797 when E_In_Parameter |
7799 Write_Str ("Discriminal_Link");
7805 Write_Str ("Handler_Records");
7809 Write_Str ("Normalized_Position_Max");
7812 Write_Str ("Field10??");
7814 end Write_Field10_Name;
7816 ------------------------
7817 -- Write_Field11_Name --
7818 ------------------------
7820 procedure Write_Field11_Name (Id : Entity_Id) is
7824 Write_Str ("Entry_Component");
7828 Write_Str ("Component_Bit_Offset");
7831 Write_Str ("Full_View");
7833 when E_Enumeration_Literal =>
7834 Write_Str ("Enumeration_Pos");
7837 Write_Str ("Block_Node");
7843 Write_Str ("Protected_Body_Subprogram");
7845 when E_Generic_Package =>
7846 Write_Str ("Generic_Homonym");
7849 Write_Str ("Full_View");
7852 Write_Str ("Field11??");
7854 end Write_Field11_Name;
7856 ------------------------
7857 -- Write_Field12_Name --
7858 ------------------------
7860 procedure Write_Field12_Name (Id : Entity_Id) is
7864 Write_Str ("Barrier_Function");
7866 when E_Enumeration_Literal =>
7867 Write_Str ("Enumeration_Rep");
7875 E_In_Out_Parameter |
7879 Write_Str ("Esize");
7883 Write_Str ("Next_Inlined_Subprogram");
7886 Write_Str ("Associated_Formal_Package");
7889 Write_Str ("Field12??");
7891 end Write_Field12_Name;
7893 ------------------------
7894 -- Write_Field13_Name --
7895 ------------------------
7897 procedure Write_Field13_Name (Id : Entity_Id) is
7901 Write_Str ("RM_Size");
7905 Write_Str ("Component_Clause");
7908 if not Comes_From_Source (Id)
7910 Chars (Id) = Name_Op_Ne
7912 Write_Str ("Corresponding_Equality");
7914 elsif Comes_From_Source (Id) then
7915 Write_Str ("Elaboration_Entity");
7918 Write_Str ("Field13??");
7923 Write_Str ("Extra_Accessibility");
7927 Generic_Unit_Kind =>
7928 Write_Str ("Elaboration_Entity");
7931 Write_Str ("Field13??");
7933 end Write_Field13_Name;
7935 -----------------------
7936 -- Write_Field14_Name --
7937 -----------------------
7939 procedure Write_Field14_Name (Id : Entity_Id) is
7948 Write_Str ("Alignment");
7952 Write_Str ("Normalized_Position");
7956 Write_Str ("First_Optional_Parameter");
7959 E_Generic_Package =>
7960 Write_Str ("Shadow_Entities");
7963 Write_Str ("Field14??");
7965 end Write_Field14_Name;
7967 ------------------------
7968 -- Write_Field15_Name --
7969 ------------------------
7971 procedure Write_Field15_Name (Id : Entity_Id) is
7976 Write_Str ("Storage_Size_Variable");
7979 Write_Str ("DT_Entry_Count");
7981 when Decimal_Fixed_Point_Kind =>
7982 Write_Str ("Scale_Value");
7984 when E_Discriminant =>
7985 Write_Str ("Discriminant_Number");
7988 Write_Str ("Extra_Formal");
7992 Write_Str ("DT_Position");
7995 Write_Str ("Entry_Parameters_Type");
7997 when Enumeration_Kind =>
7998 Write_Str ("Lit_Indexes");
8002 Write_Str ("Related_Instance");
8004 when E_Protected_Type =>
8005 Write_Str ("Entry_Bodies_Array");
8007 when E_String_Literal_Subtype =>
8008 Write_Str ("String_Literal_Low_Bound");
8011 Write_Str ("Field15??");
8013 end Write_Field15_Name;
8015 ------------------------
8016 -- Write_Field16_Name --
8017 ------------------------
8019 procedure Write_Field16_Name (Id : Entity_Id) is
8023 Write_Str ("Entry_Formal");
8027 Write_Str ("DTC_Entity");
8032 Write_Str ("First_Private_Entity");
8034 when E_Record_Type |
8035 E_Record_Type_With_Private =>
8036 Write_Str ("Access_Disp_Table");
8038 when E_String_Literal_Subtype =>
8039 Write_Str ("String_Literal_Length");
8041 when Enumeration_Kind =>
8042 Write_Str ("Lit_Strings");
8046 Write_Str ("Unset_Reference");
8048 when E_Record_Subtype |
8049 E_Class_Wide_Subtype =>
8050 Write_Str ("Cloned_Subtype");
8053 Write_Str ("Field16??");
8055 end Write_Field16_Name;
8057 ------------------------
8058 -- Write_Field17_Name --
8059 ------------------------
8061 procedure Write_Field17_Name (Id : Entity_Id) is
8065 Write_Str ("Digits_Value");
8068 Write_Str ("Prival");
8070 when E_Discriminant =>
8071 Write_Str ("Discriminal");
8080 E_Generic_Function |
8082 E_Generic_Procedure |
8090 E_Return_Statement |
8092 E_Subprogram_Type =>
8093 Write_Str ("First_Entity");
8096 Write_Str ("First_Index");
8098 when Enumeration_Kind =>
8099 Write_Str ("First_Literal");
8102 Write_Str ("Master_Id");
8104 when Modular_Integer_Kind =>
8105 Write_Str ("Modulus");
8109 E_Generic_In_Out_Parameter |
8111 Write_Str ("Actual_Subtype");
8113 when E_Incomplete_Type =>
8114 Write_Str ("Non_Limited_View");
8116 when E_Incomplete_Subtype =>
8117 if From_With_Type (Id) then
8118 Write_Str ("Non_Limited_View");
8122 Write_Str ("Field17??");
8124 end Write_Field17_Name;
8126 ------------------------
8127 -- Write_Field18_Name --
8128 ------------------------
8130 procedure Write_Field18_Name (Id : Entity_Id) is
8133 when E_Enumeration_Literal |
8137 Write_Str ("Alias");
8139 when E_Record_Type =>
8140 Write_Str ("Corresponding_Concurrent_Type");
8142 when E_Subprogram_Body =>
8143 Write_Str ("Corresponding_Protected_Entry");
8145 when E_Entry_Index_Parameter =>
8146 Write_Str ("Entry_Index_Constant");
8148 when E_Class_Wide_Subtype |
8149 E_Access_Protected_Subprogram_Type |
8150 E_Anonymous_Access_Protected_Subprogram_Type |
8151 E_Access_Subprogram_Type |
8153 Write_Str ("Equivalent_Type");
8155 when Fixed_Point_Kind =>
8156 Write_Str ("Delta_Value");
8159 Write_Str ("Renamed_Object");
8163 E_Generic_Function |
8164 E_Generic_Procedure |
8165 E_Generic_Package =>
8166 Write_Str ("Renamed_Entity");
8168 when Incomplete_Or_Private_Kind |
8170 Write_Str ("Private_Dependents");
8172 when Concurrent_Kind =>
8173 Write_Str ("Corresponding_Record_Type");
8178 Write_Str ("Enclosing_Scope");
8181 Write_Str ("Field18??");
8183 end Write_Field18_Name;
8185 -----------------------
8186 -- Write_Field19_Name --
8187 -----------------------
8189 procedure Write_Field19_Name (Id : Entity_Id) is
8194 Write_Str ("Related_Array_Object");
8200 E_Return_Statement |
8202 Write_Str ("Finalization_Chain_Entity");
8204 when E_Constant | E_Variable =>
8205 Write_Str ("Size_Check_Code");
8207 when E_Discriminant =>
8208 Write_Str ("Corresponding_Discriminant");
8211 E_Generic_Package =>
8212 Write_Str ("Body_Entity");
8214 when E_Package_Body |
8216 Write_Str ("Spec_Entity");
8218 when Private_Kind =>
8219 Write_Str ("Underlying_Full_View");
8221 when E_Record_Type =>
8222 Write_Str ("Parent_Subtype");
8225 Write_Str ("Field19??");
8227 end Write_Field19_Name;
8229 -----------------------
8230 -- Write_Field20_Name --
8231 -----------------------
8233 procedure Write_Field20_Name (Id : Entity_Id) is
8237 Write_Str ("Component_Type");
8239 when E_In_Parameter |
8240 E_Generic_In_Parameter =>
8241 Write_Str ("Default_Value");
8244 Write_Str ("Directly_Designated_Type");
8247 Write_Str ("Discriminant_Checking_Func");
8251 Write_Str ("Prival_Link");
8253 when E_Discriminant =>
8254 Write_Str ("Discriminant_Default_Value");
8263 E_Generic_Function |
8265 E_Generic_Procedure |
8273 E_Return_Statement |
8275 E_Subprogram_Type =>
8276 Write_Str ("Last_Entity");
8279 Write_Str ("Scalar_Range");
8282 Write_Str ("Register_Exception_Call");
8285 Write_Str ("Field20??");
8287 end Write_Field20_Name;
8289 -----------------------
8290 -- Write_Field21_Name --
8291 -----------------------
8293 procedure Write_Field21_Name (Id : Entity_Id) is
8299 E_Generic_Function |
8301 E_Generic_Procedure |
8303 Write_Str ("Interface_Name");
8305 when Concurrent_Kind |
8306 Incomplete_Or_Private_Kind |
8310 Write_Str ("Discriminant_Constraint");
8313 Write_Str ("Accept_Address");
8315 when Fixed_Point_Kind =>
8316 Write_Str ("Small_Value");
8318 when E_In_Parameter =>
8319 Write_Str ("Default_Expr_Function");
8322 Modular_Integer_Kind =>
8323 Write_Str ("Original_Array_Type");
8326 Write_Str ("Field21??");
8328 end Write_Field21_Name;
8330 -----------------------
8331 -- Write_Field22_Name --
8332 -----------------------
8334 procedure Write_Field22_Name (Id : Entity_Id) is
8338 Write_Str ("Associated_Storage_Pool");
8341 Write_Str ("Component_Size");
8345 Write_Str ("Original_Record_Component");
8347 when E_Enumeration_Literal =>
8348 Write_Str ("Enumeration_Rep_Expr");
8351 Write_Str ("Exception_Code");
8354 Write_Str ("Protected_Formal");
8356 when E_Record_Type =>
8357 Write_Str ("Corresponding_Remote_Type");
8367 E_Generic_Function |
8368 E_Generic_Procedure |
8371 E_Return_Statement |
8374 Write_Str ("Scope_Depth_Value");
8376 when E_Record_Type_With_Private |
8377 E_Record_Subtype_With_Private |
8380 E_Limited_Private_Type |
8381 E_Limited_Private_Subtype =>
8382 Write_Str ("Private_View");
8385 Write_Str ("Shared_Var_Procs_Instance");
8388 Write_Str ("Field22??");
8390 end Write_Field22_Name;
8392 ------------------------
8393 -- Write_Field23_Name --
8394 ------------------------
8396 procedure Write_Field23_Name (Id : Entity_Id) is
8400 Write_Str ("Associated_Final_Chain");
8403 Write_Str ("Packed_Array_Type");
8406 Write_Str ("Entry_Cancel_Parameter");
8408 when E_Discriminant =>
8409 Write_Str ("CR_Discriminant");
8411 when E_Enumeration_Type =>
8412 Write_Str ("Enum_Pos_To_Rep");
8416 Write_Str ("Extra_Constrained");
8418 when E_Generic_Function |
8420 E_Generic_Procedure =>
8421 Write_Str ("Inner_Instances");
8423 when Concurrent_Kind |
8424 Incomplete_Or_Private_Kind |
8428 Write_Str ("Stored_Constraint");
8432 if Present (Scope (Id))
8433 and then Is_Protected_Type (Scope (Id))
8435 Write_Str ("Protection_Object");
8437 Write_Str ("Generic_Renamings");
8441 if Is_Generic_Instance (Id) then
8442 Write_Str ("Generic_Renamings");
8444 Write_Str ("Limited_View");
8448 Write_Str ("Protection_Object");
8451 Write_Str ("Field23??");
8453 end Write_Field23_Name;
8455 ------------------------
8456 -- Write_Field24_Name --
8457 ------------------------
8459 procedure Write_Field24_Name (Id : Entity_Id) is
8462 when Subprogram_Kind =>
8463 Write_Str ("Spec_PPC_List");
8465 when E_Variable | E_Constant | Type_Kind =>
8466 Write_Str ("Related_Expression");
8469 Write_Str ("Field24???");
8471 end Write_Field24_Name;
8473 ------------------------
8474 -- Write_Field25_Name --
8475 ------------------------
8477 procedure Write_Field25_Name (Id : Entity_Id) is
8481 Write_Str ("DT_Offset_To_Top_Func");
8485 Write_Str ("Interface_Alias");
8487 when E_Record_Type |
8489 E_Record_Type_With_Private |
8490 E_Record_Subtype_With_Private =>
8491 Write_Str ("Interfaces");
8494 Write_Str ("Task_Body_Procedure");
8497 Write_Str ("Debug_Renaming_Link");
8501 Write_Str ("PPC_Wrapper");
8503 when E_Enumeration_Subtype |
8504 E_Modular_Integer_Subtype |
8505 E_Signed_Integer_Subtype =>
8506 Write_Str ("Static_Predicate");
8509 Write_Str ("Field25??");
8511 end Write_Field25_Name;
8513 ------------------------
8514 -- Write_Field26_Name --
8515 ------------------------
8517 procedure Write_Field26_Name (Id : Entity_Id) is
8520 when E_Generic_Package |
8522 Write_Str ("Package_Instantiation");
8526 if Ekind (Id) = E_Procedure
8527 and then not Is_Dispatching_Operation (Id)
8529 Write_Str ("Static_Initialization");
8531 Write_Str ("Overridden_Operation");
8534 when E_Record_Type |
8535 E_Record_Type_With_Private =>
8536 Write_Str ("Dispatch_Table_Wrappers");
8538 when E_In_Out_Parameter |
8541 Write_Str ("Last_Assignment");
8544 Write_Str ("Relative_Deadline_Variable");
8547 Write_Str ("Field26??");
8549 end Write_Field26_Name;
8551 ------------------------
8552 -- Write_Field27_Name --
8553 ------------------------
8555 procedure Write_Field27_Name (Id : Entity_Id) is
8561 Write_Str ("Related_Type");
8564 Write_Str ("Wrapped_Entity");
8566 when E_Package | Type_Kind =>
8567 Write_Str ("Current_Use_Clause");
8570 Write_Str ("Field27??");
8572 end Write_Field27_Name;
8574 ------------------------
8575 -- Write_Field28_Name --
8576 ------------------------
8578 procedure Write_Field28_Name (Id : Entity_Id) is
8581 when E_Procedure | E_Function | E_Entry =>
8582 Write_Str ("Extra_Formals");
8584 when E_Record_Type =>
8585 Write_Str ("Underlying_Record_View");
8588 Write_Str ("Field28??");
8590 end Write_Field28_Name;
8592 procedure Write_Field29_Name (Id : Entity_Id) is
8596 Write_Str ("Subprograms_For_Type");
8599 Write_Str ("Field29??");
8601 end Write_Field29_Name;
8603 -------------------------
8604 -- Iterator Procedures --
8605 -------------------------
8607 procedure Proc_Next_Component (N : in out Node_Id) is
8609 N := Next_Component (N);
8610 end Proc_Next_Component;
8612 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8614 N := Next_Entity (N);
8615 while Present (N) loop
8616 exit when Ekind_In (N, E_Component, E_Discriminant);
8617 N := Next_Entity (N);
8619 end Proc_Next_Component_Or_Discriminant;
8621 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8623 N := Next_Discriminant (N);
8624 end Proc_Next_Discriminant;
8626 procedure Proc_Next_Formal (N : in out Node_Id) is
8628 N := Next_Formal (N);
8629 end Proc_Next_Formal;
8631 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8633 N := Next_Formal_With_Extras (N);
8634 end Proc_Next_Formal_With_Extras;
8636 procedure Proc_Next_Index (N : in out Node_Id) is
8638 N := Next_Index (N);
8639 end Proc_Next_Index;
8641 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8643 N := Next_Inlined_Subprogram (N);
8644 end Proc_Next_Inlined_Subprogram;
8646 procedure Proc_Next_Literal (N : in out Node_Id) is
8648 N := Next_Literal (N);
8649 end Proc_Next_Literal;
8651 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8653 N := Next_Stored_Discriminant (N);
8654 end Proc_Next_Stored_Discriminant;