1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2008, 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 2, 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 pragma Style_Checks (All_Checks);
35 -- Turn off subprogram ordering, not used for this unit
37 with Atree; use Atree;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the
55 -- base part of the node. The access routines for these fields and
56 -- the corresponding set procedures are defined in Sinfo. These fields
57 -- are present in all entities. Note that Homonym is also in the base
58 -- part of the node, but has access routines that are more properly
59 -- part of Einfo, which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Return_Applies_To Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Elaboration_Entity Node13
109 -- Extra_Accessibility Node13
113 -- First_Optional_Parameter Node14
114 -- Normalized_Position Uint14
115 -- Shadow_Entities List14
117 -- Discriminant_Number Uint15
118 -- DT_Position Uint15
119 -- DT_Entry_Count Uint15
120 -- Entry_Bodies_Array Node15
121 -- Entry_Parameters_Type Node15
122 -- Extra_Formal Node15
123 -- Lit_Indexes Node15
124 -- Primitive_Operations Elist15
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_Record_Type Node18
153 -- Delta_Value Ureal18
154 -- Enclosing_Scope Node18
155 -- Equivalent_Type Node18
156 -- Private_Dependents Elist18
157 -- Renamed_Entity Node18
158 -- Renamed_Object Node18
160 -- Body_Entity Node19
161 -- Corresponding_Discriminant Node19
162 -- Finalization_Chain_Entity Node19
163 -- Parent_Subtype Node19
164 -- Related_Array_Object Node19
165 -- Size_Check_Code Node19
166 -- Spec_Entity Node19
167 -- Underlying_Full_View Node19
169 -- Component_Type Node20
170 -- Default_Value Node20
171 -- Directly_Designated_Type Node20
172 -- Discriminant_Checking_Func Node20
173 -- Discriminant_Default_Value Node20
174 -- Last_Entity Node20
175 -- Prival_Link Node20
176 -- Register_Exception_Call Node20
177 -- Scalar_Range Node20
179 -- Accept_Address Elist21
180 -- Default_Expr_Function Node21
181 -- Discriminant_Constraint Elist21
182 -- Interface_Name Node21
183 -- Original_Array_Type Node21
184 -- Small_Value Ureal21
186 -- Associated_Storage_Pool Node22
187 -- Component_Size Uint22
188 -- Corresponding_Remote_Type Node22
189 -- Enumeration_Rep_Expr Node22
190 -- Exception_Code Uint22
191 -- Original_Record_Component Node22
192 -- Private_View Node22
193 -- Protected_Formal Node22
194 -- Scope_Depth_Value Uint22
195 -- Shared_Var_Procs_Instance Node22
197 -- Associated_Final_Chain Node23
198 -- CR_Discriminant Node23
199 -- Entry_Cancel_Parameter Node23
200 -- Enum_Pos_To_Rep Node23
201 -- Extra_Constrained Node23
202 -- Generic_Renamings Elist23
203 -- Inner_Instances Elist23
204 -- Limited_View Node23
205 -- Packed_Array_Type Node23
206 -- Protection_Object Node23
207 -- Stored_Constraint Elist23
209 -- Spec_PPC_List Node24
211 -- Interface_Alias Node25
212 -- Interfaces Elist25
213 -- Debug_Renaming_Link Node25
214 -- DT_Offset_To_Top_Func Node25
215 -- Task_Body_Procedure Node25
217 -- Dispatch_Table_Wrapper Node26
218 -- Last_Assignment Node26
219 -- Overridden_Operation Node26
220 -- Package_Instantiation Node26
221 -- Related_Type Node26
222 -- Relative_Deadline_Variable Node26
223 -- Static_Initialization Node26
225 -- Current_Use_Clause Node27
226 -- Wrapped_Entity Node27
228 -- Extra_Formals Node28
230 ---------------------------------------------
231 -- Usage of Flags in Defining Entity Nodes --
232 ---------------------------------------------
234 -- All flags are unique, there is no overlaying, so each flag is physically
235 -- present in every entity. However, for many of the flags, it only makes
236 -- sense for them to be set true for certain subsets of entity kinds. See
237 -- the spec of Einfo for further details.
239 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
240 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
241 -- which are common to all nodes, including entity nodes.
244 -- Has_Discriminants Flag5
245 -- Is_Dispatching_Operation Flag6
246 -- Is_Immediately_Visible Flag7
248 -- Is_Potentially_Use_Visible Flag9
252 -- Is_Constrained Flag12
253 -- Is_Generic_Type Flag13
254 -- Depends_On_Private Flag14
256 -- Is_Volatile Flag16
257 -- Is_Internal Flag17
258 -- Has_Delayed_Freeze Flag18
259 -- Is_Abstract_Subprogram Flag19
260 -- Is_Concurrent_Record_Type Flag20
262 -- Has_Master_Entity Flag21
263 -- Needs_No_Actuals Flag22
264 -- Has_Storage_Size_Clause Flag23
265 -- Is_Imported Flag24
266 -- Is_Limited_Record Flag25
267 -- Has_Completion Flag26
268 -- Has_Pragma_Controlled Flag27
269 -- Is_Statically_Allocated Flag28
270 -- Has_Size_Clause Flag29
273 -- Checks_May_Be_Suppressed Flag31
274 -- Kill_Elaboration_Checks Flag32
275 -- Kill_Range_Checks Flag33
276 -- Kill_Tag_Checks Flag34
277 -- Is_Class_Wide_Equivalent_Type Flag35
278 -- Referenced_As_LHS Flag36
279 -- Is_Known_Non_Null Flag37
280 -- Can_Never_Be_Null Flag38
281 -- Is_Overriding_Operation Flag39
282 -- Body_Needed_For_SAL Flag40
284 -- Treat_As_Volatile Flag41
285 -- Is_Controlled Flag42
286 -- Has_Controlled_Component Flag43
288 -- In_Private_Part Flag45
289 -- Has_Alignment_Clause Flag46
291 -- In_Package_Body Flag48
293 -- Delay_Subprogram_Descriptors Flag50
296 -- Is_Entry_Formal Flag52
297 -- Is_Private_Descendant Flag53
298 -- Return_Present Flag54
299 -- Is_Tagged_Type Flag55
300 -- Has_Homonym Flag56
302 -- Non_Binary_Modulus Flag58
303 -- Is_Preelaborated Flag59
304 -- Is_Shared_Passive Flag60
306 -- Is_Remote_Types Flag61
307 -- Is_Remote_Call_Interface Flag62
308 -- Is_Character_Type Flag63
309 -- Is_Intrinsic_Subprogram Flag64
310 -- Has_Record_Rep_Clause Flag65
311 -- Has_Enumeration_Rep_Clause Flag66
312 -- Has_Small_Clause Flag67
313 -- Has_Component_Size_Clause Flag68
314 -- Is_Access_Constant Flag69
315 -- Is_First_Subtype Flag70
317 -- Has_Completion_In_Body Flag71
318 -- Has_Unknown_Discriminants Flag72
319 -- Is_Child_Unit Flag73
320 -- Is_CPP_Class Flag74
321 -- Has_Non_Standard_Rep Flag75
322 -- Is_Constructor Flag76
323 -- Static_Elaboration_Desired Flag77
325 -- Has_All_Calls_Remote Flag79
326 -- Is_Constr_Subt_For_U_Nominal Flag80
328 -- Is_Asynchronous Flag81
329 -- Has_Gigi_Rep_Item Flag82
330 -- Has_Machine_Radix_Clause Flag83
331 -- Machine_Radix_10 Flag84
333 -- Has_Atomic_Components Flag86
334 -- Has_Volatile_Components Flag87
335 -- Discard_Names Flag88
336 -- Is_Interrupt_Handler Flag89
337 -- Returns_By_Ref Flag90
340 -- Size_Known_At_Compile_Time Flag92
341 -- Has_Subprogram_Descriptor Flag93
342 -- Is_Generic_Actual_Type Flag94
343 -- Uses_Sec_Stack Flag95
344 -- Warnings_Off Flag96
345 -- Is_Controlling_Formal Flag97
346 -- Has_Controlling_Result Flag98
347 -- Is_Exported Flag99
348 -- Has_Specified_Layout Flag100
350 -- Has_Nested_Block_With_Handler Flag101
352 -- Is_Completely_Hidden Flag103
353 -- Address_Taken Flag104
354 -- Suppress_Init_Proc Flag105
355 -- Is_Limited_Composite Flag106
356 -- Is_Private_Composite Flag107
357 -- Default_Expressions_Processed Flag108
358 -- Is_Non_Static_Subtype Flag109
359 -- Has_External_Tag_Rep_Clause Flag110
361 -- Is_Formal_Subprogram Flag111
362 -- Is_Renaming_Of_Object Flag112
364 -- Delay_Cleanups Flag114
365 -- Never_Set_In_Source Flag115
366 -- Is_Visible_Child_Unit Flag116
367 -- Is_Unchecked_Union Flag117
368 -- Is_For_Access_Subtype Flag118
369 -- Has_Convention_Pragma Flag119
370 -- Has_Primitive_Operations Flag120
372 -- Has_Pragma_Pack Flag121
373 -- Is_Bit_Packed_Array Flag122
374 -- Has_Unchecked_Union Flag123
375 -- Is_Eliminated Flag124
376 -- C_Pass_By_Copy Flag125
377 -- Is_Instantiated Flag126
378 -- Is_Valued_Procedure Flag127
379 -- (used for Component_Alignment) Flag128
380 -- (used for Component_Alignment) Flag129
381 -- Is_Generic_Instance Flag130
383 -- No_Pool_Assigned Flag131
384 -- Is_AST_Entry Flag132
385 -- Is_VMS_Exception Flag133
386 -- Is_Optional_Parameter Flag134
387 -- Has_Aliased_Components Flag135
388 -- No_Strict_Aliasing Flag136
389 -- Is_Machine_Code_Subprogram Flag137
390 -- Is_Packed_Array_Type Flag138
391 -- Has_Biased_Representation Flag139
392 -- Has_Complex_Representation Flag140
394 -- Is_Constr_Subt_For_UN_Aliased Flag141
395 -- Has_Missing_Return Flag142
396 -- Has_Recursive_Call Flag143
397 -- Is_Unsigned_Type Flag144
398 -- Strict_Alignment Flag145
399 -- Is_Abstract_Type Flag146
400 -- Needs_Debug_Info Flag147
401 -- Suppress_Elaboration_Warnings Flag148
402 -- Is_Compilation_Unit Flag149
403 -- Has_Pragma_Elaborate_Body Flag150
406 -- Entry_Accepted Flag152
407 -- Is_Obsolescent Flag153
408 -- Has_Per_Object_Constraint Flag154
409 -- Has_Private_Declaration Flag155
410 -- Referenced Flag156
411 -- Has_Pragma_Inline Flag157
412 -- Finalize_Storage_Only Flag158
413 -- From_With_Type Flag159
414 -- Is_Package_Body_Entity Flag160
416 -- Has_Qualified_Name Flag161
417 -- Nonzero_Is_True Flag162
418 -- Is_True_Constant Flag163
419 -- Reverse_Bit_Order Flag164
420 -- Suppress_Style_Checks Flag165
421 -- Debug_Info_Off Flag166
422 -- Sec_Stack_Needed_For_Return Flag167
423 -- Materialize_Entity Flag168
424 -- Has_Pragma_Thread_Local_Storage Flag169
425 -- Is_Known_Valid Flag170
427 -- Is_Hidden_Open_Scope Flag171
428 -- Has_Object_Size_Clause Flag172
429 -- Has_Fully_Qualified_Name Flag173
430 -- Elaboration_Entity_Required Flag174
431 -- Has_Forward_Instantiation Flag175
432 -- Is_Discrim_SO_Function Flag176
433 -- Size_Depends_On_Discriminant Flag177
434 -- Is_Null_Init_Proc Flag178
435 -- Has_Pragma_Pure_Function Flag179
436 -- Has_Pragma_Unreferenced Flag180
438 -- Has_Contiguous_Rep Flag181
439 -- Has_Xref_Entry Flag182
440 -- Must_Be_On_Byte_Boundary Flag183
441 -- Has_Stream_Size_Clause Flag184
442 -- Is_Ada_2005_Only Flag185
443 -- Is_Interface Flag186
444 -- Has_Constrained_Partial_View Flag187
445 -- Has_Persistent_BSS Flag188
446 -- Is_Pure_Unit_Access_Type Flag189
447 -- Has_Specified_Stream_Input Flag190
449 -- Has_Specified_Stream_Output Flag191
450 -- Has_Specified_Stream_Read Flag192
451 -- Has_Specified_Stream_Write Flag193
452 -- Is_Local_Anonymous_Access Flag194
453 -- Is_Primitive_Wrapper Flag195
454 -- Was_Hidden Flag196
455 -- Is_Limited_Interface Flag197
456 -- Is_Protected_Interface Flag198
457 -- Is_Synchronized_Interface Flag199
458 -- Is_Task_Interface Flag200
460 -- Has_Anon_Block_Suffix Flag201
461 -- Itype_Printed Flag202
462 -- Has_Pragma_Pure Flag203
463 -- Is_Known_Null Flag204
464 -- Low_Bound_Known Flag205
465 -- Is_Visible_Formal Flag206
466 -- Known_To_Have_Preelab_Init Flag207
467 -- Must_Have_Preelab_Init Flag208
468 -- Is_Return_Object Flag209
469 -- Elaborate_Body_Desirable Flag210
471 -- Has_Static_Discriminants Flag211
472 -- Has_Pragma_Unreferenced_Objects Flag212
473 -- Requires_Overriding Flag213
475 -- Has_Up_Level_Access Flag215
476 -- Universal_Aliasing Flag216
477 -- Suppress_Value_Tracking_On_Call Flag217
478 -- Is_Primitive Flag218
479 -- Has_Initial_Value Flag219
480 -- Has_Dispatch_Table Flag220
482 -- Has_Pragma_Preelab_Init Flag221
483 -- Used_As_Generic_Actual Flag222
484 -- Is_Descendent_Of_Address Flag223
487 -- Is_Only_Out_Parameter Flag226
488 -- Referenced_As_Out_Parameter Flag227
489 -- Has_Thunks Flag228
490 -- Can_Use_Internal_Rep Flag229
491 -- Has_Pragma_Inline_Always Flag230
493 -- Renamed_In_Spec Flag231
494 -- Implemented_By_Entry Flag232
495 -- Has_Pragma_Unmodified Flag233
496 -- Is_Dispatch_Table_Entity Flag234
497 -- Is_Trivial_Subprogram Flag235
498 -- Warnings_Off_Used Flag236
499 -- Warnings_Off_Used_Unmodified Flag237
500 -- Warnings_Off_Used_Unreferenced Flag238
501 -- OK_To_Reorder_Components Flag239
502 -- Has_Postconditions Flag240
504 -- Optimize_Alignment_Space Flag241
505 -- Optimize_Alignment_Time Flag242
506 -- Overlays_Constant Flag243
507 -- Is_RACW_Stub_Type Flag244
508 -- Is_Private_Primitive Flag245
513 -----------------------
514 -- Local subprograms --
515 -----------------------
517 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
518 -- Returns the attribute definition clause for Id whose name is Rep_Name.
519 -- Returns Empty if no matching attribute definition clause found for Id.
525 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
529 Ritem := First_Rep_Item (Id);
530 while Present (Ritem) loop
531 if Nkind (Ritem) = N_Attribute_Definition_Clause
532 and then Chars (Ritem) = Rep_Name
536 Ritem := Next_Rep_Item (Ritem);
543 --------------------------------
544 -- Attribute Access Functions --
545 --------------------------------
547 function Accept_Address (Id : E) return L is
552 function Access_Disp_Table (Id : E) return L is
554 pragma Assert (Is_Tagged_Type (Id));
555 return Elist16 (Implementation_Base_Type (Id));
556 end Access_Disp_Table;
558 function Actual_Subtype (Id : E) return E is
561 (Ekind (Id) = E_Constant
562 or else Ekind (Id) = E_Variable
563 or else Ekind (Id) = E_Generic_In_Out_Parameter
564 or else Is_Formal (Id));
568 function Address_Taken (Id : E) return B is
573 function Alias (Id : E) return E is
576 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
580 function Alignment (Id : E) return U is
582 pragma Assert (Is_Type (Id)
583 or else Is_Formal (Id)
584 or else Ekind (Id) = E_Loop_Parameter
585 or else Ekind (Id) = E_Constant
586 or else Ekind (Id) = E_Exception
587 or else Ekind (Id) = E_Variable);
591 function Associated_Final_Chain (Id : E) return E is
593 pragma Assert (Is_Access_Type (Id));
595 end Associated_Final_Chain;
597 function Associated_Formal_Package (Id : E) return E is
599 pragma Assert (Ekind (Id) = E_Package);
601 end Associated_Formal_Package;
603 function Associated_Node_For_Itype (Id : E) return N is
606 end Associated_Node_For_Itype;
608 function Associated_Storage_Pool (Id : E) return E is
610 pragma Assert (Is_Access_Type (Id));
611 return Node22 (Root_Type (Id));
612 end Associated_Storage_Pool;
614 function Barrier_Function (Id : E) return N is
616 pragma Assert (Is_Entry (Id));
618 end Barrier_Function;
620 function Block_Node (Id : E) return N is
622 pragma Assert (Ekind (Id) = E_Block);
626 function Body_Entity (Id : E) return E is
629 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
633 function Body_Needed_For_SAL (Id : E) return B is
636 (Ekind (Id) = E_Package
637 or else Is_Subprogram (Id)
638 or else Is_Generic_Unit (Id));
640 end Body_Needed_For_SAL;
642 function C_Pass_By_Copy (Id : E) return B is
644 pragma Assert (Is_Record_Type (Id));
645 return Flag125 (Implementation_Base_Type (Id));
648 function Can_Never_Be_Null (Id : E) return B is
651 end Can_Never_Be_Null;
653 function Checks_May_Be_Suppressed (Id : E) return B is
656 end Checks_May_Be_Suppressed;
658 function Class_Wide_Type (Id : E) return E is
660 pragma Assert (Is_Type (Id));
664 function Cloned_Subtype (Id : E) return E is
667 (Ekind (Id) = E_Record_Subtype
668 or else Ekind (Id) = E_Class_Wide_Subtype);
672 function Component_Bit_Offset (Id : E) return U is
675 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
677 end Component_Bit_Offset;
679 function Component_Clause (Id : E) return N is
682 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
684 end Component_Clause;
686 function Component_Size (Id : E) return U is
688 pragma Assert (Is_Array_Type (Id));
689 return Uint22 (Implementation_Base_Type (Id));
692 function Component_Type (Id : E) return E is
694 return Node20 (Implementation_Base_Type (Id));
697 function Corresponding_Concurrent_Type (Id : E) return E is
699 pragma Assert (Ekind (Id) = E_Record_Type);
701 end Corresponding_Concurrent_Type;
703 function Corresponding_Discriminant (Id : E) return E is
705 pragma Assert (Ekind (Id) = E_Discriminant);
707 end Corresponding_Discriminant;
709 function Corresponding_Equality (Id : E) return E is
712 (Ekind (Id) = E_Function
713 and then not Comes_From_Source (Id)
714 and then Chars (Id) = Name_Op_Ne);
716 end Corresponding_Equality;
718 function Corresponding_Record_Type (Id : E) return E is
720 pragma Assert (Is_Concurrent_Type (Id));
722 end Corresponding_Record_Type;
724 function Corresponding_Remote_Type (Id : E) return E is
727 end Corresponding_Remote_Type;
729 function Current_Use_Clause (Id : E) return E is
731 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
733 end Current_Use_Clause;
735 function Current_Value (Id : E) return N is
737 pragma Assert (Ekind (Id) in Object_Kind);
741 function CR_Discriminant (Id : E) return E is
746 function Debug_Info_Off (Id : E) return B is
751 function Debug_Renaming_Link (Id : E) return E is
754 end Debug_Renaming_Link;
756 function Default_Expr_Function (Id : E) return E is
758 pragma Assert (Is_Formal (Id));
760 end Default_Expr_Function;
762 function Default_Expressions_Processed (Id : E) return B is
765 end Default_Expressions_Processed;
767 function Default_Value (Id : E) return N is
769 pragma Assert (Is_Formal (Id));
773 function Delay_Cleanups (Id : E) return B is
778 function Delay_Subprogram_Descriptors (Id : E) return B is
781 end Delay_Subprogram_Descriptors;
783 function Delta_Value (Id : E) return R is
785 pragma Assert (Is_Fixed_Point_Type (Id));
789 function Dependent_Instances (Id : E) return L is
791 pragma Assert (Is_Generic_Instance (Id));
793 end Dependent_Instances;
795 function Depends_On_Private (Id : E) return B is
797 pragma Assert (Nkind (Id) in N_Entity);
799 end Depends_On_Private;
801 function Digits_Value (Id : E) return U is
804 (Is_Floating_Point_Type (Id)
805 or else Is_Decimal_Fixed_Point_Type (Id));
809 function Directly_Designated_Type (Id : E) return E is
812 end Directly_Designated_Type;
814 function Discard_Names (Id : E) return B is
819 function Discriminal (Id : E) return E is
821 pragma Assert (Ekind (Id) = E_Discriminant);
825 function Discriminal_Link (Id : E) return N is
828 end Discriminal_Link;
830 function Discriminant_Checking_Func (Id : E) return E is
832 pragma Assert (Ekind (Id) = E_Component);
834 end Discriminant_Checking_Func;
836 function Discriminant_Constraint (Id : E) return L is
838 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
840 end Discriminant_Constraint;
842 function Discriminant_Default_Value (Id : E) return N is
844 pragma Assert (Ekind (Id) = E_Discriminant);
846 end Discriminant_Default_Value;
848 function Discriminant_Number (Id : E) return U is
850 pragma Assert (Ekind (Id) = E_Discriminant);
852 end Discriminant_Number;
854 function Dispatch_Table_Wrapper (Id : E) return E is
856 pragma Assert (Is_Tagged_Type (Id));
857 return Node26 (Implementation_Base_Type (Id));
858 end Dispatch_Table_Wrapper;
860 function DT_Entry_Count (Id : E) return U is
862 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
866 function DT_Offset_To_Top_Func (Id : E) return E is
868 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
870 end DT_Offset_To_Top_Func;
872 function DT_Position (Id : E) return U is
875 ((Ekind (Id) = E_Function
876 or else Ekind (Id) = E_Procedure)
877 and then Present (DTC_Entity (Id)));
881 function DTC_Entity (Id : E) return E is
884 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
888 function Elaborate_Body_Desirable (Id : E) return B is
890 pragma Assert (Ekind (Id) = E_Package);
892 end Elaborate_Body_Desirable;
894 function Elaboration_Entity (Id : E) return E is
899 Ekind (Id) = E_Package
901 Is_Generic_Unit (Id));
903 end Elaboration_Entity;
905 function Elaboration_Entity_Required (Id : E) return B is
910 Ekind (Id) = E_Package
912 Is_Generic_Unit (Id));
914 end Elaboration_Entity_Required;
916 function Enclosing_Scope (Id : E) return E is
921 function Entry_Accepted (Id : E) return B is
923 pragma Assert (Is_Entry (Id));
927 function Entry_Bodies_Array (Id : E) return E is
930 end Entry_Bodies_Array;
932 function Entry_Cancel_Parameter (Id : E) return E is
935 end Entry_Cancel_Parameter;
937 function Entry_Component (Id : E) return E is
942 function Entry_Formal (Id : E) return E is
947 function Entry_Index_Constant (Id : E) return N is
949 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
951 end Entry_Index_Constant;
953 function Entry_Parameters_Type (Id : E) return E is
956 end Entry_Parameters_Type;
958 function Enum_Pos_To_Rep (Id : E) return E is
960 pragma Assert (Ekind (Id) = E_Enumeration_Type);
964 function Enumeration_Pos (Id : E) return Uint is
966 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
970 function Enumeration_Rep (Id : E) return U is
972 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
976 function Enumeration_Rep_Expr (Id : E) return N is
978 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
980 end Enumeration_Rep_Expr;
982 function Equivalent_Type (Id : E) return E is
985 (Ekind (Id) = E_Class_Wide_Subtype or else
986 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
987 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
988 Ekind (Id) = E_Access_Subprogram_Type or else
989 Ekind (Id) = E_Exception_Type);
993 function Esize (Id : E) return Uint is
998 function Exception_Code (Id : E) return Uint is
1000 pragma Assert (Ekind (Id) = E_Exception);
1004 function Extra_Accessibility (Id : E) return E is
1006 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1008 end Extra_Accessibility;
1010 function Extra_Constrained (Id : E) return E is
1012 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1014 end Extra_Constrained;
1016 function Extra_Formal (Id : E) return E is
1021 function Extra_Formals (Id : E) return E is
1024 (Is_Overloadable (Id)
1025 or else Ekind (Id) = E_Entry_Family
1026 or else Ekind (Id) = E_Subprogram_Body
1027 or else Ekind (Id) = E_Subprogram_Type);
1031 function Can_Use_Internal_Rep (Id : E) return B is
1033 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1034 return Flag229 (Base_Type (Id));
1035 end Can_Use_Internal_Rep;
1037 function Finalization_Chain_Entity (Id : E) return E is
1040 end Finalization_Chain_Entity;
1042 function Finalize_Storage_Only (Id : E) return B is
1044 pragma Assert (Is_Type (Id));
1045 return Flag158 (Base_Type (Id));
1046 end Finalize_Storage_Only;
1048 function First_Entity (Id : E) return E is
1053 function First_Index (Id : E) return N is
1055 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1059 function First_Literal (Id : E) return E is
1061 pragma Assert (Is_Enumeration_Type (Id));
1065 function First_Optional_Parameter (Id : E) return E is
1068 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1070 end First_Optional_Parameter;
1072 function First_Private_Entity (Id : E) return E is
1074 pragma Assert (Ekind (Id) = E_Package
1075 or else Ekind (Id) = E_Generic_Package
1076 or else Ekind (Id) in Concurrent_Kind);
1078 end First_Private_Entity;
1080 function First_Rep_Item (Id : E) return E is
1085 function Freeze_Node (Id : E) return N is
1090 function From_With_Type (Id : E) return B is
1092 return Flag159 (Id);
1095 function Full_View (Id : E) return E is
1097 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1101 function Generic_Homonym (Id : E) return E is
1103 pragma Assert (Ekind (Id) = E_Generic_Package);
1105 end Generic_Homonym;
1107 function Generic_Renamings (Id : E) return L is
1109 return Elist23 (Id);
1110 end Generic_Renamings;
1112 function Handler_Records (Id : E) return S is
1115 end Handler_Records;
1117 function Has_Aliased_Components (Id : E) return B is
1119 return Flag135 (Implementation_Base_Type (Id));
1120 end Has_Aliased_Components;
1122 function Has_Alignment_Clause (Id : E) return B is
1125 end Has_Alignment_Clause;
1127 function Has_All_Calls_Remote (Id : E) return B is
1130 end Has_All_Calls_Remote;
1132 function Has_Anon_Block_Suffix (Id : E) return B is
1134 return Flag201 (Id);
1135 end Has_Anon_Block_Suffix;
1137 function Has_Atomic_Components (Id : E) return B is
1139 return Flag86 (Implementation_Base_Type (Id));
1140 end Has_Atomic_Components;
1142 function Has_Biased_Representation (Id : E) return B is
1144 return Flag139 (Id);
1145 end Has_Biased_Representation;
1147 function Has_Completion (Id : E) return B is
1152 function Has_Completion_In_Body (Id : E) return B is
1154 pragma Assert (Is_Type (Id));
1156 end Has_Completion_In_Body;
1158 function Has_Complex_Representation (Id : E) return B is
1160 pragma Assert (Is_Type (Id));
1161 return Flag140 (Implementation_Base_Type (Id));
1162 end Has_Complex_Representation;
1164 function Has_Component_Size_Clause (Id : E) return B is
1166 pragma Assert (Is_Array_Type (Id));
1167 return Flag68 (Implementation_Base_Type (Id));
1168 end Has_Component_Size_Clause;
1170 function Has_Constrained_Partial_View (Id : E) return B is
1172 pragma Assert (Is_Type (Id));
1173 return Flag187 (Id);
1174 end Has_Constrained_Partial_View;
1176 function Has_Controlled_Component (Id : E) return B is
1178 return Flag43 (Base_Type (Id));
1179 end Has_Controlled_Component;
1181 function Has_Contiguous_Rep (Id : E) return B is
1183 return Flag181 (Id);
1184 end Has_Contiguous_Rep;
1186 function Has_Controlling_Result (Id : E) return B is
1189 end Has_Controlling_Result;
1191 function Has_Convention_Pragma (Id : E) return B is
1193 return Flag119 (Id);
1194 end Has_Convention_Pragma;
1196 function Has_Delayed_Freeze (Id : E) return B is
1198 pragma Assert (Nkind (Id) in N_Entity);
1200 end Has_Delayed_Freeze;
1202 function Has_Discriminants (Id : E) return B is
1204 pragma Assert (Nkind (Id) in N_Entity);
1206 end Has_Discriminants;
1208 function Has_Dispatch_Table (Id : E) return B is
1210 pragma Assert (Is_Tagged_Type (Id));
1211 return Flag220 (Id);
1212 end Has_Dispatch_Table;
1214 function Has_Enumeration_Rep_Clause (Id : E) return B is
1216 pragma Assert (Is_Enumeration_Type (Id));
1218 end Has_Enumeration_Rep_Clause;
1220 function Has_Exit (Id : E) return B is
1225 function Has_External_Tag_Rep_Clause (Id : E) return B is
1227 pragma Assert (Is_Tagged_Type (Id));
1228 return Flag110 (Id);
1229 end Has_External_Tag_Rep_Clause;
1231 function Has_Forward_Instantiation (Id : E) return B is
1233 return Flag175 (Id);
1234 end Has_Forward_Instantiation;
1236 function Has_Fully_Qualified_Name (Id : E) return B is
1238 return Flag173 (Id);
1239 end Has_Fully_Qualified_Name;
1241 function Has_Gigi_Rep_Item (Id : E) return B is
1244 end Has_Gigi_Rep_Item;
1246 function Has_Homonym (Id : E) return B is
1251 function Has_Initial_Value (Id : E) return B is
1254 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1255 return Flag219 (Id);
1256 end Has_Initial_Value;
1258 function Has_Machine_Radix_Clause (Id : E) return B is
1260 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1262 end Has_Machine_Radix_Clause;
1264 function Has_Master_Entity (Id : E) return B is
1267 end Has_Master_Entity;
1269 function Has_Missing_Return (Id : E) return B is
1272 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1273 return Flag142 (Id);
1274 end Has_Missing_Return;
1276 function Has_Nested_Block_With_Handler (Id : E) return B is
1278 return Flag101 (Id);
1279 end Has_Nested_Block_With_Handler;
1281 function Has_Non_Standard_Rep (Id : E) return B is
1283 return Flag75 (Implementation_Base_Type (Id));
1284 end Has_Non_Standard_Rep;
1286 function Has_Object_Size_Clause (Id : E) return B is
1288 pragma Assert (Is_Type (Id));
1289 return Flag172 (Id);
1290 end Has_Object_Size_Clause;
1292 function Has_Per_Object_Constraint (Id : E) return B is
1294 return Flag154 (Id);
1295 end Has_Per_Object_Constraint;
1297 function Has_Persistent_BSS (Id : E) return B is
1299 return Flag188 (Id);
1300 end Has_Persistent_BSS;
1302 function Has_Postconditions (Id : E) return B is
1304 pragma Assert (Is_Subprogram (Id));
1305 return Flag240 (Id);
1306 end Has_Postconditions;
1308 function Has_Pragma_Controlled (Id : E) return B is
1310 pragma Assert (Is_Access_Type (Id));
1311 return Flag27 (Implementation_Base_Type (Id));
1312 end Has_Pragma_Controlled;
1314 function Has_Pragma_Elaborate_Body (Id : E) return B is
1316 return Flag150 (Id);
1317 end Has_Pragma_Elaborate_Body;
1319 function Has_Pragma_Inline (Id : E) return B is
1321 return Flag157 (Id);
1322 end Has_Pragma_Inline;
1324 function Has_Pragma_Inline_Always (Id : E) return B is
1326 return Flag230 (Id);
1327 end Has_Pragma_Inline_Always;
1329 function Has_Pragma_Pack (Id : E) return B is
1331 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1332 return Flag121 (Implementation_Base_Type (Id));
1333 end Has_Pragma_Pack;
1335 function Has_Pragma_Preelab_Init (Id : E) return B is
1337 return Flag221 (Id);
1338 end Has_Pragma_Preelab_Init;
1340 function Has_Pragma_Pure (Id : E) return B is
1342 return Flag203 (Id);
1343 end Has_Pragma_Pure;
1345 function Has_Pragma_Pure_Function (Id : E) return B is
1347 return Flag179 (Id);
1348 end Has_Pragma_Pure_Function;
1350 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1352 return Flag169 (Id);
1353 end Has_Pragma_Thread_Local_Storage;
1355 function Has_Pragma_Unmodified (Id : E) return B is
1357 return Flag233 (Id);
1358 end Has_Pragma_Unmodified;
1360 function Has_Pragma_Unreferenced (Id : E) return B is
1362 return Flag180 (Id);
1363 end Has_Pragma_Unreferenced;
1365 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1367 pragma Assert (Is_Type (Id));
1368 return Flag212 (Id);
1369 end Has_Pragma_Unreferenced_Objects;
1371 function Has_Primitive_Operations (Id : E) return B is
1373 pragma Assert (Is_Type (Id));
1374 return Flag120 (Base_Type (Id));
1375 end Has_Primitive_Operations;
1377 function Has_Private_Declaration (Id : E) return B is
1379 return Flag155 (Id);
1380 end Has_Private_Declaration;
1382 function Has_Qualified_Name (Id : E) return B is
1384 return Flag161 (Id);
1385 end Has_Qualified_Name;
1387 function Has_RACW (Id : E) return B is
1389 pragma Assert (Ekind (Id) = E_Package);
1390 return Flag214 (Id);
1393 function Has_Record_Rep_Clause (Id : E) return B is
1395 pragma Assert (Is_Record_Type (Id));
1396 return Flag65 (Implementation_Base_Type (Id));
1397 end Has_Record_Rep_Clause;
1399 function Has_Recursive_Call (Id : E) return B is
1401 pragma Assert (Is_Subprogram (Id));
1402 return Flag143 (Id);
1403 end Has_Recursive_Call;
1405 function Has_Size_Clause (Id : E) return B is
1408 end Has_Size_Clause;
1410 function Has_Small_Clause (Id : E) return B is
1413 end Has_Small_Clause;
1415 function Has_Specified_Layout (Id : E) return B is
1417 pragma Assert (Is_Type (Id));
1418 return Flag100 (Implementation_Base_Type (Id));
1419 end Has_Specified_Layout;
1421 function Has_Specified_Stream_Input (Id : E) return B is
1423 pragma Assert (Is_Type (Id));
1424 return Flag190 (Id);
1425 end Has_Specified_Stream_Input;
1427 function Has_Specified_Stream_Output (Id : E) return B is
1429 pragma Assert (Is_Type (Id));
1430 return Flag191 (Id);
1431 end Has_Specified_Stream_Output;
1433 function Has_Specified_Stream_Read (Id : E) return B is
1435 pragma Assert (Is_Type (Id));
1436 return Flag192 (Id);
1437 end Has_Specified_Stream_Read;
1439 function Has_Specified_Stream_Write (Id : E) return B is
1441 pragma Assert (Is_Type (Id));
1442 return Flag193 (Id);
1443 end Has_Specified_Stream_Write;
1445 function Has_Static_Discriminants (Id : E) return B is
1447 pragma Assert (Is_Type (Id));
1448 return Flag211 (Id);
1449 end Has_Static_Discriminants;
1451 function Has_Storage_Size_Clause (Id : E) return B is
1453 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1454 return Flag23 (Implementation_Base_Type (Id));
1455 end Has_Storage_Size_Clause;
1457 function Has_Stream_Size_Clause (Id : E) return B is
1459 return Flag184 (Id);
1460 end Has_Stream_Size_Clause;
1462 function Has_Subprogram_Descriptor (Id : E) return B is
1465 end Has_Subprogram_Descriptor;
1467 function Has_Task (Id : E) return B is
1469 return Flag30 (Base_Type (Id));
1472 function Has_Thunks (Id : E) return B is
1474 pragma Assert (Ekind (Id) = E_Constant);
1475 return Flag228 (Id);
1478 function Has_Unchecked_Union (Id : E) return B is
1480 return Flag123 (Base_Type (Id));
1481 end Has_Unchecked_Union;
1483 function Has_Unknown_Discriminants (Id : E) return B is
1485 pragma Assert (Is_Type (Id));
1487 end Has_Unknown_Discriminants;
1489 function Has_Up_Level_Access (Id : E) return B is
1492 (Ekind (Id) = E_Variable
1493 or else Ekind (Id) = E_Constant
1494 or else Ekind (Id) = E_Loop_Parameter);
1495 return Flag215 (Id);
1496 end Has_Up_Level_Access;
1498 function Has_Volatile_Components (Id : E) return B is
1500 return Flag87 (Implementation_Base_Type (Id));
1501 end Has_Volatile_Components;
1503 function Has_Xref_Entry (Id : E) return B is
1505 return Flag182 (Implementation_Base_Type (Id));
1508 function Hiding_Loop_Variable (Id : E) return E is
1510 pragma Assert (Ekind (Id) = E_Variable);
1512 end Hiding_Loop_Variable;
1514 function Homonym (Id : E) return E is
1519 function Implemented_By_Entry (Id : E) return B is
1522 (Ekind (Id) = E_Function
1523 or else Ekind (Id) = E_Procedure);
1524 return Flag232 (Id);
1525 end Implemented_By_Entry;
1527 function Interfaces (Id : E) return L is
1529 pragma Assert (Is_Record_Type (Id));
1530 return Elist25 (Id);
1533 function Interface_Alias (Id : E) return E is
1535 pragma Assert (Is_Subprogram (Id));
1537 end Interface_Alias;
1539 function In_Package_Body (Id : E) return B is
1542 end In_Package_Body;
1544 function In_Private_Part (Id : E) return B is
1547 end In_Private_Part;
1549 function In_Use (Id : E) return B is
1551 pragma Assert (Nkind (Id) in N_Entity);
1555 function Inner_Instances (Id : E) return L is
1557 return Elist23 (Id);
1558 end Inner_Instances;
1560 function Interface_Name (Id : E) return N is
1565 function Is_Abstract_Subprogram (Id : E) return B is
1567 pragma Assert (Is_Overloadable (Id));
1569 end Is_Abstract_Subprogram;
1571 function Is_Abstract_Type (Id : E) return B is
1573 pragma Assert (Is_Type (Id));
1574 return Flag146 (Id);
1575 end Is_Abstract_Type;
1577 function Is_Local_Anonymous_Access (Id : E) return B is
1579 pragma Assert (Is_Access_Type (Id));
1580 return Flag194 (Id);
1581 end Is_Local_Anonymous_Access;
1583 function Is_Access_Constant (Id : E) return B is
1585 pragma Assert (Is_Access_Type (Id));
1587 end Is_Access_Constant;
1589 function Is_Ada_2005_Only (Id : E) return B is
1591 return Flag185 (Id);
1592 end Is_Ada_2005_Only;
1594 function Is_Aliased (Id : E) return B is
1596 pragma Assert (Nkind (Id) in N_Entity);
1600 function Is_AST_Entry (Id : E) return B is
1602 pragma Assert (Is_Entry (Id));
1603 return Flag132 (Id);
1606 function Is_Asynchronous (Id : E) return B is
1609 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1611 end Is_Asynchronous;
1613 function Is_Atomic (Id : E) return B is
1618 function Is_Bit_Packed_Array (Id : E) return B is
1620 return Flag122 (Implementation_Base_Type (Id));
1621 end Is_Bit_Packed_Array;
1623 function Is_Called (Id : E) return B is
1626 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1627 return Flag102 (Id);
1630 function Is_Character_Type (Id : E) return B is
1633 end Is_Character_Type;
1635 function Is_Child_Unit (Id : E) return B is
1640 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1643 end Is_Class_Wide_Equivalent_Type;
1645 function Is_Compilation_Unit (Id : E) return B is
1647 return Flag149 (Id);
1648 end Is_Compilation_Unit;
1650 function Is_Completely_Hidden (Id : E) return B is
1652 pragma Assert (Ekind (Id) = E_Discriminant);
1653 return Flag103 (Id);
1654 end Is_Completely_Hidden;
1656 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1659 end Is_Constr_Subt_For_U_Nominal;
1661 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1663 return Flag141 (Id);
1664 end Is_Constr_Subt_For_UN_Aliased;
1666 function Is_Constrained (Id : E) return B is
1668 pragma Assert (Nkind (Id) in N_Entity);
1672 function Is_Constructor (Id : E) return B is
1677 function Is_Controlled (Id : E) return B is
1679 return Flag42 (Base_Type (Id));
1682 function Is_Controlling_Formal (Id : E) return B is
1684 pragma Assert (Is_Formal (Id));
1686 end Is_Controlling_Formal;
1688 function Is_CPP_Class (Id : E) return B is
1693 function Is_Descendent_Of_Address (Id : E) return B is
1695 pragma Assert (Is_Type (Id));
1696 return Flag223 (Id);
1697 end Is_Descendent_Of_Address;
1699 function Is_Discrim_SO_Function (Id : E) return B is
1701 return Flag176 (Id);
1702 end Is_Discrim_SO_Function;
1704 function Is_Dispatch_Table_Entity (Id : E) return B is
1706 return Flag234 (Id);
1707 end Is_Dispatch_Table_Entity;
1709 function Is_Dispatching_Operation (Id : E) return B is
1711 pragma Assert (Nkind (Id) in N_Entity);
1713 end Is_Dispatching_Operation;
1715 function Is_Eliminated (Id : E) return B is
1717 return Flag124 (Id);
1720 function Is_Entry_Formal (Id : E) return B is
1723 end Is_Entry_Formal;
1725 function Is_Exported (Id : E) return B is
1730 function Is_First_Subtype (Id : E) return B is
1733 end Is_First_Subtype;
1735 function Is_For_Access_Subtype (Id : E) return B is
1738 (Ekind (Id) = E_Record_Subtype
1740 Ekind (Id) = E_Private_Subtype);
1741 return Flag118 (Id);
1742 end Is_For_Access_Subtype;
1744 function Is_Formal_Subprogram (Id : E) return B is
1746 return Flag111 (Id);
1747 end Is_Formal_Subprogram;
1749 function Is_Frozen (Id : E) return B is
1754 function Is_Generic_Actual_Type (Id : E) return B is
1756 pragma Assert (Is_Type (Id));
1758 end Is_Generic_Actual_Type;
1760 function Is_Generic_Instance (Id : E) return B is
1762 return Flag130 (Id);
1763 end Is_Generic_Instance;
1765 function Is_Generic_Type (Id : E) return B is
1767 pragma Assert (Nkind (Id) in N_Entity);
1769 end Is_Generic_Type;
1771 function Is_Hidden (Id : E) return B is
1776 function Is_Hidden_Open_Scope (Id : E) return B is
1778 return Flag171 (Id);
1779 end Is_Hidden_Open_Scope;
1781 function Is_Immediately_Visible (Id : E) return B is
1783 pragma Assert (Nkind (Id) in N_Entity);
1785 end Is_Immediately_Visible;
1787 function Is_Imported (Id : E) return B is
1792 function Is_Inlined (Id : E) return B is
1797 function Is_Interface (Id : E) return B is
1799 return Flag186 (Id);
1802 function Is_Instantiated (Id : E) return B is
1804 return Flag126 (Id);
1805 end Is_Instantiated;
1807 function Is_Internal (Id : E) return B is
1809 pragma Assert (Nkind (Id) in N_Entity);
1813 function Is_Interrupt_Handler (Id : E) return B is
1815 pragma Assert (Nkind (Id) in N_Entity);
1817 end Is_Interrupt_Handler;
1819 function Is_Intrinsic_Subprogram (Id : E) return B is
1822 end Is_Intrinsic_Subprogram;
1824 function Is_Itype (Id : E) return B is
1829 function Is_Known_Non_Null (Id : E) return B is
1832 end Is_Known_Non_Null;
1834 function Is_Known_Null (Id : E) return B is
1836 return Flag204 (Id);
1839 function Is_Known_Valid (Id : E) return B is
1841 return Flag170 (Id);
1844 function Is_Limited_Composite (Id : E) return B is
1846 return Flag106 (Id);
1847 end Is_Limited_Composite;
1849 function Is_Limited_Interface (Id : E) return B is
1851 return Flag197 (Id);
1852 end Is_Limited_Interface;
1854 function Is_Limited_Record (Id : E) return B is
1857 end Is_Limited_Record;
1859 function Is_Machine_Code_Subprogram (Id : E) return B is
1861 pragma Assert (Is_Subprogram (Id));
1862 return Flag137 (Id);
1863 end Is_Machine_Code_Subprogram;
1865 function Is_Non_Static_Subtype (Id : E) return B is
1867 pragma Assert (Is_Type (Id));
1868 return Flag109 (Id);
1869 end Is_Non_Static_Subtype;
1871 function Is_Null_Init_Proc (Id : E) return B is
1873 pragma Assert (Ekind (Id) = E_Procedure);
1874 return Flag178 (Id);
1875 end Is_Null_Init_Proc;
1877 function Is_Obsolescent (Id : E) return B is
1879 return Flag153 (Id);
1882 function Is_Only_Out_Parameter (Id : E) return B is
1884 pragma Assert (Is_Formal (Id));
1885 return Flag226 (Id);
1886 end Is_Only_Out_Parameter;
1888 function Is_Optional_Parameter (Id : E) return B is
1890 pragma Assert (Is_Formal (Id));
1891 return Flag134 (Id);
1892 end Is_Optional_Parameter;
1894 function Is_Overriding_Operation (Id : E) return B is
1896 pragma Assert (Is_Subprogram (Id));
1898 end Is_Overriding_Operation;
1900 function Is_Package_Body_Entity (Id : E) return B is
1902 return Flag160 (Id);
1903 end Is_Package_Body_Entity;
1905 function Is_Packed (Id : E) return B is
1907 return Flag51 (Implementation_Base_Type (Id));
1910 function Is_Packed_Array_Type (Id : E) return B is
1912 return Flag138 (Id);
1913 end Is_Packed_Array_Type;
1915 function Is_Potentially_Use_Visible (Id : E) return B is
1917 pragma Assert (Nkind (Id) in N_Entity);
1919 end Is_Potentially_Use_Visible;
1921 function Is_Preelaborated (Id : E) return B is
1924 end Is_Preelaborated;
1926 function Is_Primitive (Id : E) return B is
1929 (Is_Overloadable (Id)
1930 or else Ekind (Id) = E_Generic_Function
1931 or else Ekind (Id) = E_Generic_Procedure);
1932 return Flag218 (Id);
1935 function Is_Primitive_Wrapper (Id : E) return B is
1937 pragma Assert (Ekind (Id) = E_Function
1938 or else Ekind (Id) = E_Procedure);
1939 return Flag195 (Id);
1940 end Is_Primitive_Wrapper;
1942 function Is_Private_Composite (Id : E) return B is
1944 pragma Assert (Is_Type (Id));
1945 return Flag107 (Id);
1946 end Is_Private_Composite;
1948 function Is_Private_Descendant (Id : E) return B is
1951 end Is_Private_Descendant;
1953 function Is_Private_Primitive (Id : E) return B is
1955 pragma Assert (Ekind (Id) = E_Function
1956 or else Ekind (Id) = E_Procedure);
1957 return Flag245 (Id);
1958 end Is_Private_Primitive;
1960 function Is_Protected_Interface (Id : E) return B is
1962 pragma Assert (Is_Interface (Id));
1963 return Flag198 (Id);
1964 end Is_Protected_Interface;
1966 function Is_Public (Id : E) return B is
1968 pragma Assert (Nkind (Id) in N_Entity);
1972 function Is_Pure (Id : E) return B is
1977 function Is_Pure_Unit_Access_Type (Id : E) return B is
1979 pragma Assert (Is_Access_Type (Id));
1980 return Flag189 (Id);
1981 end Is_Pure_Unit_Access_Type;
1983 function Is_RACW_Stub_Type (Id : E) return B is
1985 pragma Assert (Is_Type (Id));
1986 return Flag244 (Id);
1987 end Is_RACW_Stub_Type;
1989 function Is_Raised (Id : E) return B is
1991 pragma Assert (Ekind (Id) = E_Exception);
1992 return Flag224 (Id);
1995 function Is_Remote_Call_Interface (Id : E) return B is
1998 end Is_Remote_Call_Interface;
2000 function Is_Remote_Types (Id : E) return B is
2003 end Is_Remote_Types;
2005 function Is_Renaming_Of_Object (Id : E) return B is
2007 return Flag112 (Id);
2008 end Is_Renaming_Of_Object;
2010 function Is_Return_Object (Id : E) return B is
2012 return Flag209 (Id);
2013 end Is_Return_Object;
2015 function Is_Shared_Passive (Id : E) return B is
2018 end Is_Shared_Passive;
2020 function Is_Statically_Allocated (Id : E) return B is
2023 end Is_Statically_Allocated;
2025 function Is_Synchronized_Interface (Id : E) return B is
2027 pragma Assert (Is_Interface (Id));
2028 return Flag199 (Id);
2029 end Is_Synchronized_Interface;
2031 function Is_Tag (Id : E) return B is
2033 pragma Assert (Nkind (Id) in N_Entity);
2037 function Is_Tagged_Type (Id : E) return B is
2042 function Is_Task_Interface (Id : E) return B is
2044 pragma Assert (Is_Interface (Id));
2045 return Flag200 (Id);
2046 end Is_Task_Interface;
2048 function Is_Thunk (Id : E) return B is
2050 pragma Assert (Is_Subprogram (Id));
2051 return Flag225 (Id);
2054 function Is_Trivial_Subprogram (Id : E) return B is
2056 return Flag235 (Id);
2057 end Is_Trivial_Subprogram;
2059 function Is_True_Constant (Id : E) return B is
2061 return Flag163 (Id);
2062 end Is_True_Constant;
2064 function Is_Unchecked_Union (Id : E) return B is
2066 return Flag117 (Implementation_Base_Type (Id));
2067 end Is_Unchecked_Union;
2069 function Is_Unsigned_Type (Id : E) return B is
2071 pragma Assert (Is_Type (Id));
2072 return Flag144 (Id);
2073 end Is_Unsigned_Type;
2075 function Is_Valued_Procedure (Id : E) return B is
2077 pragma Assert (Ekind (Id) = E_Procedure);
2078 return Flag127 (Id);
2079 end Is_Valued_Procedure;
2081 function Is_Visible_Child_Unit (Id : E) return B is
2083 pragma Assert (Is_Child_Unit (Id));
2084 return Flag116 (Id);
2085 end Is_Visible_Child_Unit;
2087 function Is_Visible_Formal (Id : E) return B is
2089 return Flag206 (Id);
2090 end Is_Visible_Formal;
2092 function Is_VMS_Exception (Id : E) return B is
2094 return Flag133 (Id);
2095 end Is_VMS_Exception;
2097 function Is_Volatile (Id : E) return B is
2099 pragma Assert (Nkind (Id) in N_Entity);
2101 if Is_Type (Id) then
2102 return Flag16 (Base_Type (Id));
2108 function Itype_Printed (Id : E) return B is
2110 pragma Assert (Is_Itype (Id));
2111 return Flag202 (Id);
2114 function Kill_Elaboration_Checks (Id : E) return B is
2117 end Kill_Elaboration_Checks;
2119 function Kill_Range_Checks (Id : E) return B is
2122 end Kill_Range_Checks;
2124 function Kill_Tag_Checks (Id : E) return B is
2127 end Kill_Tag_Checks;
2129 function Known_To_Have_Preelab_Init (Id : E) return B is
2131 pragma Assert (Is_Type (Id));
2132 return Flag207 (Id);
2133 end Known_To_Have_Preelab_Init;
2135 function Last_Assignment (Id : E) return N is
2137 pragma Assert (Is_Assignable (Id));
2139 end Last_Assignment;
2141 function Last_Entity (Id : E) return E is
2146 function Limited_View (Id : E) return E is
2148 pragma Assert (Ekind (Id) = E_Package);
2152 function Lit_Indexes (Id : E) return E is
2154 pragma Assert (Is_Enumeration_Type (Id));
2158 function Lit_Strings (Id : E) return E is
2160 pragma Assert (Is_Enumeration_Type (Id));
2164 function Low_Bound_Known (Id : E) return B is
2166 return Flag205 (Id);
2167 end Low_Bound_Known;
2169 function Machine_Radix_10 (Id : E) return B is
2171 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2173 end Machine_Radix_10;
2175 function Master_Id (Id : E) return E is
2177 pragma Assert (Is_Access_Type (Id));
2181 function Materialize_Entity (Id : E) return B is
2183 return Flag168 (Id);
2184 end Materialize_Entity;
2186 function Mechanism (Id : E) return M is
2188 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2189 return UI_To_Int (Uint8 (Id));
2192 function Modulus (Id : E) return Uint is
2194 pragma Assert (Is_Modular_Integer_Type (Id));
2195 return Uint17 (Base_Type (Id));
2198 function Must_Be_On_Byte_Boundary (Id : E) return B is
2200 pragma Assert (Is_Type (Id));
2201 return Flag183 (Id);
2202 end Must_Be_On_Byte_Boundary;
2204 function Must_Have_Preelab_Init (Id : E) return B is
2206 pragma Assert (Is_Type (Id));
2207 return Flag208 (Id);
2208 end Must_Have_Preelab_Init;
2210 function Needs_Debug_Info (Id : E) return B is
2212 return Flag147 (Id);
2213 end Needs_Debug_Info;
2215 function Needs_No_Actuals (Id : E) return B is
2218 (Is_Overloadable (Id)
2219 or else Ekind (Id) = E_Subprogram_Type
2220 or else Ekind (Id) = E_Entry_Family);
2222 end Needs_No_Actuals;
2224 function Never_Set_In_Source (Id : E) return B is
2226 return Flag115 (Id);
2227 end Never_Set_In_Source;
2229 function Next_Inlined_Subprogram (Id : E) return E is
2232 end Next_Inlined_Subprogram;
2234 function No_Pool_Assigned (Id : E) return B is
2236 pragma Assert (Is_Access_Type (Id));
2237 return Flag131 (Root_Type (Id));
2238 end No_Pool_Assigned;
2240 function No_Return (Id : E) return B is
2242 return Flag113 (Id);
2245 function No_Strict_Aliasing (Id : E) return B is
2247 pragma Assert (Is_Access_Type (Id));
2248 return Flag136 (Base_Type (Id));
2249 end No_Strict_Aliasing;
2251 function Non_Binary_Modulus (Id : E) return B is
2253 pragma Assert (Is_Type (Id));
2254 return Flag58 (Base_Type (Id));
2255 end Non_Binary_Modulus;
2257 function Non_Limited_View (Id : E) return E is
2259 pragma Assert (Ekind (Id) in Incomplete_Kind);
2261 end Non_Limited_View;
2263 function Nonzero_Is_True (Id : E) return B is
2265 pragma Assert (Root_Type (Id) = Standard_Boolean);
2266 return Flag162 (Base_Type (Id));
2267 end Nonzero_Is_True;
2269 function Normalized_First_Bit (Id : E) return U is
2272 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2274 end Normalized_First_Bit;
2276 function Normalized_Position (Id : E) return U is
2279 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2281 end Normalized_Position;
2283 function Normalized_Position_Max (Id : E) return U is
2286 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2288 end Normalized_Position_Max;
2290 function OK_To_Reorder_Components (Id : E) return B is
2292 pragma Assert (Is_Record_Type (Id));
2293 return Flag239 (Base_Type (Id));
2294 end OK_To_Reorder_Components;
2296 function Optimize_Alignment_Space (Id : E) return B is
2300 or else Ekind (Id) = E_Constant
2301 or else Ekind (Id) = E_Variable);
2302 return Flag241 (Id);
2303 end Optimize_Alignment_Space;
2305 function Optimize_Alignment_Time (Id : E) return B is
2309 or else Ekind (Id) = E_Constant
2310 or else Ekind (Id) = E_Variable);
2311 return Flag242 (Id);
2312 end Optimize_Alignment_Time;
2314 function Original_Array_Type (Id : E) return E is
2316 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2318 end Original_Array_Type;
2320 function Original_Record_Component (Id : E) return E is
2323 (Ekind (Id) = E_Void
2324 or else Ekind (Id) = E_Component
2325 or else Ekind (Id) = E_Discriminant);
2327 end Original_Record_Component;
2329 function Overlays_Constant (Id : E) return B is
2331 return Flag243 (Id);
2332 end Overlays_Constant;
2334 function Overridden_Operation (Id : E) return E is
2337 end Overridden_Operation;
2339 function Package_Instantiation (Id : E) return N is
2343 or else Ekind (Id) = E_Generic_Package
2344 or else Ekind (Id) = E_Package);
2346 end Package_Instantiation;
2348 function Packed_Array_Type (Id : E) return E is
2350 pragma Assert (Is_Array_Type (Id));
2352 end Packed_Array_Type;
2354 function Parent_Subtype (Id : E) return E is
2356 pragma Assert (Ekind (Id) = E_Record_Type);
2360 function Primitive_Operations (Id : E) return L is
2362 pragma Assert (Is_Tagged_Type (Id));
2363 return Elist15 (Id);
2364 end Primitive_Operations;
2366 function Prival (Id : E) return E is
2368 pragma Assert (Is_Protected_Component (Id));
2372 function Prival_Link (Id : E) return E is
2374 pragma Assert (Ekind (Id) = E_Constant
2375 or else Ekind (Id) = E_Variable);
2379 function Private_Dependents (Id : E) return L is
2381 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2382 return Elist18 (Id);
2383 end Private_Dependents;
2385 function Private_View (Id : E) return N is
2387 pragma Assert (Is_Private_Type (Id));
2391 function Protected_Body_Subprogram (Id : E) return E is
2393 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2395 end Protected_Body_Subprogram;
2397 function Protected_Formal (Id : E) return E is
2399 pragma Assert (Is_Formal (Id));
2401 end Protected_Formal;
2403 function Protection_Object (Id : E) return E is
2405 pragma Assert (Ekind (Id) = E_Entry
2406 or else Ekind (Id) = E_Entry_Family
2407 or else Ekind (Id) = E_Function
2408 or else Ekind (Id) = E_Procedure);
2410 end Protection_Object;
2412 function Reachable (Id : E) return B is
2417 function Referenced (Id : E) return B is
2419 return Flag156 (Id);
2422 function Referenced_As_LHS (Id : E) return B is
2425 end Referenced_As_LHS;
2427 function Referenced_As_Out_Parameter (Id : E) return B is
2429 return Flag227 (Id);
2430 end Referenced_As_Out_Parameter;
2432 function Referenced_Object (Id : E) return N is
2434 pragma Assert (Is_Type (Id));
2436 end Referenced_Object;
2438 function Register_Exception_Call (Id : E) return N is
2440 pragma Assert (Ekind (Id) = E_Exception);
2442 end Register_Exception_Call;
2444 function Related_Array_Object (Id : E) return E is
2446 pragma Assert (Is_Array_Type (Id));
2448 end Related_Array_Object;
2450 function Related_Instance (Id : E) return E is
2453 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2455 end Related_Instance;
2457 function Related_Type (Id : E) return E is
2460 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
2464 function Relative_Deadline_Variable (Id : E) return E is
2466 pragma Assert (Is_Task_Type (Id));
2467 return Node26 (Implementation_Base_Type (Id));
2468 end Relative_Deadline_Variable;
2470 function Renamed_Entity (Id : E) return N is
2475 function Renamed_In_Spec (Id : E) return B is
2477 pragma Assert (Ekind (Id) = E_Package);
2478 return Flag231 (Id);
2479 end Renamed_In_Spec;
2481 function Renamed_Object (Id : E) return N is
2486 function Renaming_Map (Id : E) return U is
2491 function Requires_Overriding (Id : E) return B is
2493 pragma Assert (Is_Overloadable (Id));
2494 return Flag213 (Id);
2495 end Requires_Overriding;
2497 function Return_Present (Id : E) return B is
2502 function Return_Applies_To (Id : E) return N is
2505 end Return_Applies_To;
2507 function Returns_By_Ref (Id : E) return B is
2512 function Reverse_Bit_Order (Id : E) return B is
2514 pragma Assert (Is_Record_Type (Id));
2515 return Flag164 (Base_Type (Id));
2516 end Reverse_Bit_Order;
2518 function RM_Size (Id : E) return U is
2520 pragma Assert (Is_Type (Id));
2524 function Scalar_Range (Id : E) return N is
2529 function Scale_Value (Id : E) return U is
2534 function Scope_Depth_Value (Id : E) return U is
2537 end Scope_Depth_Value;
2539 function Sec_Stack_Needed_For_Return (Id : E) return B is
2541 return Flag167 (Id);
2542 end Sec_Stack_Needed_For_Return;
2544 function Shadow_Entities (Id : E) return S is
2547 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2549 end Shadow_Entities;
2551 function Shared_Var_Procs_Instance (Id : E) return E is
2553 pragma Assert (Ekind (Id) = E_Variable);
2555 end Shared_Var_Procs_Instance;
2557 function Size_Check_Code (Id : E) return N is
2559 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2561 end Size_Check_Code;
2563 function Size_Depends_On_Discriminant (Id : E) return B is
2565 return Flag177 (Id);
2566 end Size_Depends_On_Discriminant;
2568 function Size_Known_At_Compile_Time (Id : E) return B is
2571 end Size_Known_At_Compile_Time;
2573 function Small_Value (Id : E) return R is
2575 pragma Assert (Is_Fixed_Point_Type (Id));
2576 return Ureal21 (Id);
2579 function Spec_Entity (Id : E) return E is
2582 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2586 function Spec_PPC_List (Id : E) return N is
2588 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
2592 function Storage_Size_Variable (Id : E) return E is
2594 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2595 return Node15 (Implementation_Base_Type (Id));
2596 end Storage_Size_Variable;
2598 function Static_Elaboration_Desired (Id : E) return B is
2600 pragma Assert (Ekind (Id) = E_Package);
2602 end Static_Elaboration_Desired;
2604 function Static_Initialization (Id : E) return N is
2607 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2609 end Static_Initialization;
2611 function Stored_Constraint (Id : E) return L is
2614 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2615 return Elist23 (Id);
2616 end Stored_Constraint;
2618 function Strict_Alignment (Id : E) return B is
2620 return Flag145 (Implementation_Base_Type (Id));
2621 end Strict_Alignment;
2623 function String_Literal_Length (Id : E) return U is
2626 end String_Literal_Length;
2628 function String_Literal_Low_Bound (Id : E) return N is
2631 end String_Literal_Low_Bound;
2633 function Suppress_Elaboration_Warnings (Id : E) return B is
2635 return Flag148 (Id);
2636 end Suppress_Elaboration_Warnings;
2638 function Suppress_Init_Proc (Id : E) return B is
2640 return Flag105 (Base_Type (Id));
2641 end Suppress_Init_Proc;
2643 function Suppress_Style_Checks (Id : E) return B is
2645 return Flag165 (Id);
2646 end Suppress_Style_Checks;
2648 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2650 return Flag217 (Id);
2651 end Suppress_Value_Tracking_On_Call;
2653 function Task_Body_Procedure (Id : E) return N is
2655 pragma Assert (Ekind (Id) in Task_Kind);
2657 end Task_Body_Procedure;
2659 function Treat_As_Volatile (Id : E) return B is
2662 end Treat_As_Volatile;
2664 function Underlying_Full_View (Id : E) return E is
2666 pragma Assert (Ekind (Id) in Private_Kind);
2668 end Underlying_Full_View;
2670 function Universal_Aliasing (Id : E) return B is
2672 pragma Assert (Is_Type (Id));
2673 return Flag216 (Base_Type (Id));
2674 end Universal_Aliasing;
2676 function Unset_Reference (Id : E) return N is
2679 end Unset_Reference;
2681 function Used_As_Generic_Actual (Id : E) return B is
2683 return Flag222 (Id);
2684 end Used_As_Generic_Actual;
2686 function Uses_Sec_Stack (Id : E) return B is
2691 function Vax_Float (Id : E) return B is
2693 return Flag151 (Base_Type (Id));
2696 function Warnings_Off (Id : E) return B is
2701 function Warnings_Off_Used (Id : E) return B is
2703 return Flag236 (Id);
2704 end Warnings_Off_Used;
2706 function Warnings_Off_Used_Unmodified (Id : E) return B is
2708 return Flag237 (Id);
2709 end Warnings_Off_Used_Unmodified;
2711 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2713 return Flag238 (Id);
2714 end Warnings_Off_Used_Unreferenced;
2716 function Wrapped_Entity (Id : E) return E is
2718 pragma Assert ((Ekind (Id) = E_Function
2719 or else Ekind (Id) = E_Procedure)
2720 and then Is_Primitive_Wrapper (Id));
2724 function Was_Hidden (Id : E) return B is
2726 return Flag196 (Id);
2729 ------------------------------
2730 -- Classification Functions --
2731 ------------------------------
2733 function Is_Access_Type (Id : E) return B is
2735 return Ekind (Id) in Access_Kind;
2738 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2740 return Ekind (Id) in Access_Protected_Kind;
2741 end Is_Access_Protected_Subprogram_Type;
2743 function Is_Access_Subprogram_Type (Id : E) return B is
2745 return Ekind (Id) in Access_Subprogram_Kind;
2746 end Is_Access_Subprogram_Type;
2748 function Is_Array_Type (Id : E) return B is
2750 return Ekind (Id) in Array_Kind;
2753 function Is_Assignable (Id : E) return B is
2755 return Ekind (Id) in Assignable_Kind;
2758 function Is_Class_Wide_Type (Id : E) return B is
2760 return Ekind (Id) in Class_Wide_Kind;
2761 end Is_Class_Wide_Type;
2763 function Is_Composite_Type (Id : E) return B is
2765 return Ekind (Id) in Composite_Kind;
2766 end Is_Composite_Type;
2768 function Is_Concurrent_Body (Id : E) return B is
2770 return Ekind (Id) in
2771 Concurrent_Body_Kind;
2772 end Is_Concurrent_Body;
2774 function Is_Concurrent_Record_Type (Id : E) return B is
2777 end Is_Concurrent_Record_Type;
2779 function Is_Concurrent_Type (Id : E) return B is
2781 return Ekind (Id) in Concurrent_Kind;
2782 end Is_Concurrent_Type;
2784 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2786 return Ekind (Id) in
2787 Decimal_Fixed_Point_Kind;
2788 end Is_Decimal_Fixed_Point_Type;
2790 function Is_Digits_Type (Id : E) return B is
2792 return Ekind (Id) in Digits_Kind;
2795 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2797 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2798 end Is_Discrete_Or_Fixed_Point_Type;
2800 function Is_Discrete_Type (Id : E) return B is
2802 return Ekind (Id) in Discrete_Kind;
2803 end Is_Discrete_Type;
2805 function Is_Elementary_Type (Id : E) return B is
2807 return Ekind (Id) in Elementary_Kind;
2808 end Is_Elementary_Type;
2810 function Is_Entry (Id : E) return B is
2812 return Ekind (Id) in Entry_Kind;
2815 function Is_Enumeration_Type (Id : E) return B is
2817 return Ekind (Id) in
2819 end Is_Enumeration_Type;
2821 function Is_Fixed_Point_Type (Id : E) return B is
2823 return Ekind (Id) in
2825 end Is_Fixed_Point_Type;
2827 function Is_Floating_Point_Type (Id : E) return B is
2829 return Ekind (Id) in Float_Kind;
2830 end Is_Floating_Point_Type;
2832 function Is_Formal (Id : E) return B is
2834 return Ekind (Id) in Formal_Kind;
2837 function Is_Formal_Object (Id : E) return B is
2839 return Ekind (Id) in Formal_Object_Kind;
2840 end Is_Formal_Object;
2842 function Is_Generic_Subprogram (Id : E) return B is
2844 return Ekind (Id) in Generic_Subprogram_Kind;
2845 end Is_Generic_Subprogram;
2847 function Is_Generic_Unit (Id : E) return B is
2849 return Ekind (Id) in Generic_Unit_Kind;
2850 end Is_Generic_Unit;
2852 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2854 return Ekind (Id) in
2855 Incomplete_Or_Private_Kind;
2856 end Is_Incomplete_Or_Private_Type;
2858 function Is_Incomplete_Type (Id : E) return B is
2860 return Ekind (Id) in
2862 end Is_Incomplete_Type;
2864 function Is_Integer_Type (Id : E) return B is
2866 return Ekind (Id) in Integer_Kind;
2867 end Is_Integer_Type;
2869 function Is_Modular_Integer_Type (Id : E) return B is
2871 return Ekind (Id) in
2872 Modular_Integer_Kind;
2873 end Is_Modular_Integer_Type;
2875 function Is_Named_Number (Id : E) return B is
2877 return Ekind (Id) in Named_Kind;
2878 end Is_Named_Number;
2880 function Is_Numeric_Type (Id : E) return B is
2882 return Ekind (Id) in Numeric_Kind;
2883 end Is_Numeric_Type;
2885 function Is_Object (Id : E) return B is
2887 return Ekind (Id) in Object_Kind;
2890 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2892 return Ekind (Id) in
2893 Ordinary_Fixed_Point_Kind;
2894 end Is_Ordinary_Fixed_Point_Type;
2896 function Is_Overloadable (Id : E) return B is
2898 return Ekind (Id) in Overloadable_Kind;
2899 end Is_Overloadable;
2901 function Is_Private_Type (Id : E) return B is
2903 return Ekind (Id) in Private_Kind;
2904 end Is_Private_Type;
2906 function Is_Protected_Type (Id : E) return B is
2908 return Ekind (Id) in Protected_Kind;
2909 end Is_Protected_Type;
2911 function Is_Real_Type (Id : E) return B is
2913 return Ekind (Id) in Real_Kind;
2916 function Is_Record_Type (Id : E) return B is
2918 return Ekind (Id) in Record_Kind;
2921 function Is_Scalar_Type (Id : E) return B is
2923 return Ekind (Id) in Scalar_Kind;
2926 function Is_Signed_Integer_Type (Id : E) return B is
2928 return Ekind (Id) in
2929 Signed_Integer_Kind;
2930 end Is_Signed_Integer_Type;
2932 function Is_Subprogram (Id : E) return B is
2934 return Ekind (Id) in Subprogram_Kind;
2937 function Is_Task_Type (Id : E) return B is
2939 return Ekind (Id) in Task_Kind;
2942 function Is_Type (Id : E) return B is
2944 return Ekind (Id) in Type_Kind;
2947 ------------------------------
2948 -- Attribute Set Procedures --
2949 ------------------------------
2951 procedure Set_Accept_Address (Id : E; V : L) is
2953 Set_Elist21 (Id, V);
2954 end Set_Accept_Address;
2956 procedure Set_Access_Disp_Table (Id : E; V : L) is
2958 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2959 Set_Elist16 (Id, V);
2960 end Set_Access_Disp_Table;
2962 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2964 pragma Assert (Is_Access_Type (Id));
2966 end Set_Associated_Final_Chain;
2968 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2971 end Set_Associated_Formal_Package;
2973 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2976 end Set_Associated_Node_For_Itype;
2978 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2980 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2982 end Set_Associated_Storage_Pool;
2984 procedure Set_Actual_Subtype (Id : E; V : E) is
2987 (Ekind (Id) = E_Constant
2988 or else Ekind (Id) = E_Variable
2989 or else Ekind (Id) = E_Generic_In_Out_Parameter
2990 or else Is_Formal (Id));
2992 end Set_Actual_Subtype;
2994 procedure Set_Address_Taken (Id : E; V : B := True) is
2996 Set_Flag104 (Id, V);
2997 end Set_Address_Taken;
2999 procedure Set_Alias (Id : E; V : E) is
3002 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3006 procedure Set_Alignment (Id : E; V : U) is
3008 pragma Assert (Is_Type (Id)
3009 or else Is_Formal (Id)
3010 or else Ekind (Id) = E_Loop_Parameter
3011 or else Ekind (Id) = E_Constant
3012 or else Ekind (Id) = E_Exception
3013 or else Ekind (Id) = E_Variable);
3017 procedure Set_Barrier_Function (Id : E; V : N) is
3019 pragma Assert (Is_Entry (Id));
3021 end Set_Barrier_Function;
3023 procedure Set_Block_Node (Id : E; V : N) is
3025 pragma Assert (Ekind (Id) = E_Block);
3029 procedure Set_Body_Entity (Id : E; V : E) is
3032 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
3034 end Set_Body_Entity;
3036 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3039 (Ekind (Id) = E_Package
3040 or else Is_Subprogram (Id)
3041 or else Is_Generic_Unit (Id));
3043 end Set_Body_Needed_For_SAL;
3045 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3047 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3048 Set_Flag125 (Id, V);
3049 end Set_C_Pass_By_Copy;
3051 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3054 end Set_Can_Never_Be_Null;
3056 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3059 end Set_Checks_May_Be_Suppressed;
3061 procedure Set_Class_Wide_Type (Id : E; V : E) is
3063 pragma Assert (Is_Type (Id));
3065 end Set_Class_Wide_Type;
3067 procedure Set_Cloned_Subtype (Id : E; V : E) is
3070 (Ekind (Id) = E_Record_Subtype
3071 or else Ekind (Id) = E_Class_Wide_Subtype);
3073 end Set_Cloned_Subtype;
3075 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3078 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3080 end Set_Component_Bit_Offset;
3082 procedure Set_Component_Clause (Id : E; V : N) is
3085 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3087 end Set_Component_Clause;
3089 procedure Set_Component_Size (Id : E; V : U) is
3091 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3093 end Set_Component_Size;
3095 procedure Set_Component_Type (Id : E; V : E) is
3097 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3099 end Set_Component_Type;
3101 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3104 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3106 end Set_Corresponding_Concurrent_Type;
3108 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3110 pragma Assert (Ekind (Id) = E_Discriminant);
3112 end Set_Corresponding_Discriminant;
3114 procedure Set_Corresponding_Equality (Id : E; V : E) is
3117 (Ekind (Id) = E_Function
3118 and then not Comes_From_Source (Id)
3119 and then Chars (Id) = Name_Op_Ne);
3121 end Set_Corresponding_Equality;
3123 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3125 pragma Assert (Is_Concurrent_Type (Id));
3127 end Set_Corresponding_Record_Type;
3129 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3132 end Set_Corresponding_Remote_Type;
3134 procedure Set_Current_Use_Clause (Id : E; V : E) is
3136 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3138 end Set_Current_Use_Clause;
3140 procedure Set_Current_Value (Id : E; V : N) is
3142 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3144 end Set_Current_Value;
3146 procedure Set_CR_Discriminant (Id : E; V : E) is
3149 end Set_CR_Discriminant;
3151 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3153 Set_Flag166 (Id, V);
3154 end Set_Debug_Info_Off;
3156 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3159 end Set_Debug_Renaming_Link;
3161 procedure Set_Default_Expr_Function (Id : E; V : E) is
3163 pragma Assert (Is_Formal (Id));
3165 end Set_Default_Expr_Function;
3167 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3169 Set_Flag108 (Id, V);
3170 end Set_Default_Expressions_Processed;
3172 procedure Set_Default_Value (Id : E; V : N) is
3174 pragma Assert (Is_Formal (Id));
3176 end Set_Default_Value;
3178 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3182 or else Is_Task_Type (Id)
3183 or else Ekind (Id) = E_Block);
3184 Set_Flag114 (Id, V);
3185 end Set_Delay_Cleanups;
3187 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3191 or else Ekind (Id) = E_Package
3192 or else Ekind (Id) = E_Package_Body);
3194 end Set_Delay_Subprogram_Descriptors;
3196 procedure Set_Delta_Value (Id : E; V : R) is
3198 pragma Assert (Is_Fixed_Point_Type (Id));
3199 Set_Ureal18 (Id, V);
3200 end Set_Delta_Value;
3202 procedure Set_Dependent_Instances (Id : E; V : L) is
3204 pragma Assert (Is_Generic_Instance (Id));
3206 end Set_Dependent_Instances;
3208 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3210 pragma Assert (Nkind (Id) in N_Entity);
3212 end Set_Depends_On_Private;
3214 procedure Set_Digits_Value (Id : E; V : U) is
3217 (Is_Floating_Point_Type (Id)
3218 or else Is_Decimal_Fixed_Point_Type (Id));
3220 end Set_Digits_Value;
3222 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3225 end Set_Directly_Designated_Type;
3227 procedure Set_Discard_Names (Id : E; V : B := True) is
3230 end Set_Discard_Names;
3232 procedure Set_Discriminal (Id : E; V : E) is
3234 pragma Assert (Ekind (Id) = E_Discriminant);
3236 end Set_Discriminal;
3238 procedure Set_Discriminal_Link (Id : E; V : E) is
3241 end Set_Discriminal_Link;
3243 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3245 pragma Assert (Ekind (Id) = E_Component);
3247 end Set_Discriminant_Checking_Func;
3249 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3251 pragma Assert (Nkind (Id) in N_Entity);
3252 Set_Elist21 (Id, V);
3253 end Set_Discriminant_Constraint;
3255 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3258 end Set_Discriminant_Default_Value;
3260 procedure Set_Discriminant_Number (Id : E; V : U) is
3263 end Set_Discriminant_Number;
3265 procedure Set_Dispatch_Table_Wrapper (Id : E; V : E) is
3267 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3269 end Set_Dispatch_Table_Wrapper;
3271 procedure Set_DT_Entry_Count (Id : E; V : U) is
3273 pragma Assert (Ekind (Id) = E_Component);
3275 end Set_DT_Entry_Count;
3277 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3279 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3281 end Set_DT_Offset_To_Top_Func;
3283 procedure Set_DT_Position (Id : E; V : U) is
3285 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3287 end Set_DT_Position;
3289 procedure Set_DTC_Entity (Id : E; V : E) is
3292 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3296 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3298 pragma Assert (Ekind (Id) = E_Package);
3299 Set_Flag210 (Id, V);
3300 end Set_Elaborate_Body_Desirable;
3302 procedure Set_Elaboration_Entity (Id : E; V : E) is
3307 Ekind (Id) = E_Package
3309 Is_Generic_Unit (Id));
3311 end Set_Elaboration_Entity;
3313 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3318 Ekind (Id) = E_Package
3320 Is_Generic_Unit (Id));
3321 Set_Flag174 (Id, V);
3322 end Set_Elaboration_Entity_Required;
3324 procedure Set_Enclosing_Scope (Id : E; V : E) is
3327 end Set_Enclosing_Scope;
3329 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3331 pragma Assert (Is_Entry (Id));
3332 Set_Flag152 (Id, V);
3333 end Set_Entry_Accepted;
3335 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3338 end Set_Entry_Bodies_Array;
3340 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3343 end Set_Entry_Cancel_Parameter;
3345 procedure Set_Entry_Component (Id : E; V : E) is
3348 end Set_Entry_Component;
3350 procedure Set_Entry_Formal (Id : E; V : E) is
3353 end Set_Entry_Formal;
3355 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3357 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3359 end Set_Entry_Index_Constant;
3361 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3364 end Set_Entry_Parameters_Type;
3366 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3368 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3370 end Set_Enum_Pos_To_Rep;
3372 procedure Set_Enumeration_Pos (Id : E; V : U) is
3374 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3376 end Set_Enumeration_Pos;
3378 procedure Set_Enumeration_Rep (Id : E; V : U) is
3380 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3382 end Set_Enumeration_Rep;
3384 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3386 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3388 end Set_Enumeration_Rep_Expr;
3390 procedure Set_Equivalent_Type (Id : E; V : E) is
3393 (Ekind (Id) = E_Class_Wide_Type or else
3394 Ekind (Id) = E_Class_Wide_Subtype or else
3395 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3396 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
3397 Ekind (Id) = E_Access_Subprogram_Type or else
3398 Ekind (Id) = E_Exception_Type);
3400 end Set_Equivalent_Type;
3402 procedure Set_Esize (Id : E; V : U) is
3407 procedure Set_Exception_Code (Id : E; V : U) is
3409 pragma Assert (Ekind (Id) = E_Exception);
3411 end Set_Exception_Code;
3413 procedure Set_Extra_Accessibility (Id : E; V : E) is
3415 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3417 end Set_Extra_Accessibility;
3419 procedure Set_Extra_Constrained (Id : E; V : E) is
3421 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3423 end Set_Extra_Constrained;
3425 procedure Set_Extra_Formal (Id : E; V : E) is
3428 end Set_Extra_Formal;
3430 procedure Set_Extra_Formals (Id : E; V : E) is
3433 (Is_Overloadable (Id)
3434 or else Ekind (Id) = E_Entry_Family
3435 or else Ekind (Id) = E_Subprogram_Body
3436 or else Ekind (Id) = E_Subprogram_Type);
3438 end Set_Extra_Formals;
3440 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3443 (Is_Access_Subprogram_Type (Id)
3444 and then Id = Base_Type (Id));
3445 Set_Flag229 (Id, V);
3446 end Set_Can_Use_Internal_Rep;
3448 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3451 end Set_Finalization_Chain_Entity;
3453 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3455 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3456 Set_Flag158 (Id, V);
3457 end Set_Finalize_Storage_Only;
3459 procedure Set_First_Entity (Id : E; V : E) is
3462 end Set_First_Entity;
3464 procedure Set_First_Index (Id : E; V : N) is
3466 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3468 end Set_First_Index;
3470 procedure Set_First_Literal (Id : E; V : E) is
3472 pragma Assert (Is_Enumeration_Type (Id));
3474 end Set_First_Literal;
3476 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3479 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3481 end Set_First_Optional_Parameter;
3483 procedure Set_First_Private_Entity (Id : E; V : E) is
3485 pragma Assert (Ekind (Id) = E_Package
3486 or else Ekind (Id) = E_Generic_Package
3487 or else Ekind (Id) in Concurrent_Kind);
3489 end Set_First_Private_Entity;
3491 procedure Set_First_Rep_Item (Id : E; V : N) is
3494 end Set_First_Rep_Item;
3496 procedure Set_Freeze_Node (Id : E; V : N) is
3499 end Set_Freeze_Node;
3501 procedure Set_From_With_Type (Id : E; V : B := True) is
3505 or else Ekind (Id) = E_Package);
3506 Set_Flag159 (Id, V);
3507 end Set_From_With_Type;
3509 procedure Set_Full_View (Id : E; V : E) is
3511 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3515 procedure Set_Generic_Homonym (Id : E; V : E) is
3518 end Set_Generic_Homonym;
3520 procedure Set_Generic_Renamings (Id : E; V : L) is
3522 Set_Elist23 (Id, V);
3523 end Set_Generic_Renamings;
3525 procedure Set_Handler_Records (Id : E; V : S) is
3528 end Set_Handler_Records;
3530 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3532 pragma Assert (Id = Base_Type (Id));
3533 Set_Flag135 (Id, V);
3534 end Set_Has_Aliased_Components;
3536 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3539 end Set_Has_Alignment_Clause;
3541 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3544 end Set_Has_All_Calls_Remote;
3546 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3548 Set_Flag201 (Id, V);
3549 end Set_Has_Anon_Block_Suffix;
3551 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3553 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3555 end Set_Has_Atomic_Components;
3557 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3560 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3561 Set_Flag139 (Id, V);
3562 end Set_Has_Biased_Representation;
3564 procedure Set_Has_Completion (Id : E; V : B := True) is
3567 end Set_Has_Completion;
3569 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3571 pragma Assert (Is_Type (Id));
3573 end Set_Has_Completion_In_Body;
3575 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3577 pragma Assert (Ekind (Id) = E_Record_Type);
3578 Set_Flag140 (Id, V);
3579 end Set_Has_Complex_Representation;
3581 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3583 pragma Assert (Ekind (Id) = E_Array_Type);
3585 end Set_Has_Component_Size_Clause;
3587 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3589 pragma Assert (Is_Type (Id));
3590 Set_Flag187 (Id, V);
3591 end Set_Has_Constrained_Partial_View;
3593 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3595 Set_Flag181 (Id, V);
3596 end Set_Has_Contiguous_Rep;
3598 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3600 pragma Assert (Id = Base_Type (Id));
3602 end Set_Has_Controlled_Component;
3604 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3607 end Set_Has_Controlling_Result;
3609 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3611 Set_Flag119 (Id, V);
3612 end Set_Has_Convention_Pragma;
3614 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3616 pragma Assert (Nkind (Id) in N_Entity);
3618 end Set_Has_Delayed_Freeze;
3620 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3622 pragma Assert (Nkind (Id) in N_Entity);
3624 end Set_Has_Discriminants;
3626 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3628 pragma Assert (Ekind (Id) = E_Record_Type
3629 and then Is_Tagged_Type (Id));
3630 Set_Flag220 (Id, V);
3631 end Set_Has_Dispatch_Table;
3633 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3635 pragma Assert (Is_Enumeration_Type (Id));
3637 end Set_Has_Enumeration_Rep_Clause;
3639 procedure Set_Has_Exit (Id : E; V : B := True) is
3644 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3646 pragma Assert (Is_Tagged_Type (Id));
3647 Set_Flag110 (Id, V);
3648 end Set_Has_External_Tag_Rep_Clause;
3650 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3652 Set_Flag175 (Id, V);
3653 end Set_Has_Forward_Instantiation;
3655 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3657 Set_Flag173 (Id, V);
3658 end Set_Has_Fully_Qualified_Name;
3660 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3663 end Set_Has_Gigi_Rep_Item;
3665 procedure Set_Has_Homonym (Id : E; V : B := True) is
3668 end Set_Has_Homonym;
3670 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3673 (Ekind (Id) = E_Variable or else Ekind (Id) = E_Out_Parameter);
3674 Set_Flag219 (Id, V);
3675 end Set_Has_Initial_Value;
3677 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3679 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3681 end Set_Has_Machine_Radix_Clause;
3683 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3686 end Set_Has_Master_Entity;
3688 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3691 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3692 Set_Flag142 (Id, V);
3693 end Set_Has_Missing_Return;
3695 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3697 Set_Flag101 (Id, V);
3698 end Set_Has_Nested_Block_With_Handler;
3700 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3703 (Ekind (Id) = E_Variable
3704 or else Ekind (Id) = E_Constant
3705 or else Ekind (Id) = E_Loop_Parameter);
3706 Set_Flag215 (Id, V);
3707 end Set_Has_Up_Level_Access;
3709 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3711 pragma Assert (Id = Base_Type (Id));
3713 end Set_Has_Non_Standard_Rep;
3715 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3717 pragma Assert (Is_Type (Id));
3718 Set_Flag172 (Id, V);
3719 end Set_Has_Object_Size_Clause;
3721 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3723 Set_Flag154 (Id, V);
3724 end Set_Has_Per_Object_Constraint;
3726 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3728 Set_Flag188 (Id, V);
3729 end Set_Has_Persistent_BSS;
3731 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3733 pragma Assert (Is_Subprogram (Id));
3734 Set_Flag240 (Id, V);
3735 end Set_Has_Postconditions;
3737 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3739 pragma Assert (Is_Access_Type (Id));
3740 Set_Flag27 (Base_Type (Id), V);
3741 end Set_Has_Pragma_Controlled;
3743 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3745 Set_Flag150 (Id, V);
3746 end Set_Has_Pragma_Elaborate_Body;
3748 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3750 Set_Flag157 (Id, V);
3751 end Set_Has_Pragma_Inline;
3753 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3755 Set_Flag230 (Id, V);
3756 end Set_Has_Pragma_Inline_Always;
3758 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3760 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3761 pragma Assert (Id = Base_Type (Id));
3762 Set_Flag121 (Id, V);
3763 end Set_Has_Pragma_Pack;
3765 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3767 Set_Flag221 (Id, V);
3768 end Set_Has_Pragma_Preelab_Init;
3770 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3772 Set_Flag203 (Id, V);
3773 end Set_Has_Pragma_Pure;
3775 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3777 Set_Flag179 (Id, V);
3778 end Set_Has_Pragma_Pure_Function;
3780 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3782 Set_Flag169 (Id, V);
3783 end Set_Has_Pragma_Thread_Local_Storage;
3785 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3787 Set_Flag233 (Id, V);
3788 end Set_Has_Pragma_Unmodified;
3790 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3792 Set_Flag180 (Id, V);
3793 end Set_Has_Pragma_Unreferenced;
3795 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3797 pragma Assert (Is_Type (Id));
3798 Set_Flag212 (Id, V);
3799 end Set_Has_Pragma_Unreferenced_Objects;
3801 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3803 pragma Assert (Id = Base_Type (Id));
3804 Set_Flag120 (Id, V);
3805 end Set_Has_Primitive_Operations;
3807 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3809 Set_Flag155 (Id, V);
3810 end Set_Has_Private_Declaration;
3812 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3814 Set_Flag161 (Id, V);
3815 end Set_Has_Qualified_Name;
3817 procedure Set_Has_RACW (Id : E; V : B := True) is
3819 pragma Assert (Ekind (Id) = E_Package);
3820 Set_Flag214 (Id, V);
3823 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3825 pragma Assert (Id = Base_Type (Id));
3827 end Set_Has_Record_Rep_Clause;
3829 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3831 pragma Assert (Is_Subprogram (Id));
3832 Set_Flag143 (Id, V);
3833 end Set_Has_Recursive_Call;
3835 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3838 end Set_Has_Size_Clause;
3840 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3843 end Set_Has_Small_Clause;
3845 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3847 pragma Assert (Id = Base_Type (Id));
3848 Set_Flag100 (Id, V);
3849 end Set_Has_Specified_Layout;
3851 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3853 pragma Assert (Is_Type (Id));
3854 Set_Flag190 (Id, V);
3855 end Set_Has_Specified_Stream_Input;
3857 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3859 pragma Assert (Is_Type (Id));
3860 Set_Flag191 (Id, V);
3861 end Set_Has_Specified_Stream_Output;
3863 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3865 pragma Assert (Is_Type (Id));
3866 Set_Flag192 (Id, V);
3867 end Set_Has_Specified_Stream_Read;
3869 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3871 pragma Assert (Is_Type (Id));
3872 Set_Flag193 (Id, V);
3873 end Set_Has_Specified_Stream_Write;
3875 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3877 Set_Flag211 (Id, V);
3878 end Set_Has_Static_Discriminants;
3880 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3882 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3883 pragma Assert (Id = Base_Type (Id));
3885 end Set_Has_Storage_Size_Clause;
3887 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3889 pragma Assert (Is_Elementary_Type (Id));
3890 Set_Flag184 (Id, V);
3891 end Set_Has_Stream_Size_Clause;
3893 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3896 end Set_Has_Subprogram_Descriptor;
3898 procedure Set_Has_Task (Id : E; V : B := True) is
3900 pragma Assert (Id = Base_Type (Id));
3904 procedure Set_Has_Thunks (Id : E; V : B := True) is
3906 pragma Assert (Is_Tag (Id)
3907 and then Ekind (Id) = E_Constant);
3908 Set_Flag228 (Id, V);
3911 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3913 pragma Assert (Id = Base_Type (Id));
3914 Set_Flag123 (Id, V);
3915 end Set_Has_Unchecked_Union;
3917 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3919 pragma Assert (Is_Type (Id));
3921 end Set_Has_Unknown_Discriminants;
3923 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3925 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3927 end Set_Has_Volatile_Components;
3929 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3931 Set_Flag182 (Id, V);
3932 end Set_Has_Xref_Entry;
3934 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3936 pragma Assert (Ekind (Id) = E_Variable);
3938 end Set_Hiding_Loop_Variable;
3940 procedure Set_Homonym (Id : E; V : E) is
3942 pragma Assert (Id /= V);
3946 procedure Set_Implemented_By_Entry (Id : E; V : B := True) is
3949 (Ekind (Id) = E_Function
3950 or else Ekind (Id) = E_Procedure);
3951 Set_Flag232 (Id, V);
3952 end Set_Implemented_By_Entry;
3954 procedure Set_Interfaces (Id : E; V : L) is
3956 pragma Assert (Is_Record_Type (Id));
3957 Set_Elist25 (Id, V);
3960 procedure Set_Interface_Alias (Id : E; V : E) is
3964 and then Is_Hidden (Id)
3965 and then (Ekind (Id) = E_Procedure
3966 or else Ekind (Id) = E_Function));
3968 end Set_Interface_Alias;
3970 procedure Set_In_Package_Body (Id : E; V : B := True) is
3973 end Set_In_Package_Body;
3975 procedure Set_In_Private_Part (Id : E; V : B := True) is
3978 end Set_In_Private_Part;
3980 procedure Set_In_Use (Id : E; V : B := True) is
3982 pragma Assert (Nkind (Id) in N_Entity);
3986 procedure Set_Inner_Instances (Id : E; V : L) is
3988 Set_Elist23 (Id, V);
3989 end Set_Inner_Instances;
3991 procedure Set_Interface_Name (Id : E; V : N) is
3994 end Set_Interface_Name;
3996 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3998 pragma Assert (Is_Overloadable (Id));
4000 end Set_Is_Abstract_Subprogram;
4002 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4004 pragma Assert (Is_Type (Id));
4005 Set_Flag146 (Id, V);
4006 end Set_Is_Abstract_Type;
4008 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4010 pragma Assert (Is_Access_Type (Id));
4011 Set_Flag194 (Id, V);
4012 end Set_Is_Local_Anonymous_Access;
4014 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4016 pragma Assert (Is_Access_Type (Id));
4018 end Set_Is_Access_Constant;
4020 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4022 Set_Flag185 (Id, V);
4023 end Set_Is_Ada_2005_Only;
4025 procedure Set_Is_Aliased (Id : E; V : B := True) is
4027 pragma Assert (Nkind (Id) in N_Entity);
4031 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4033 pragma Assert (Is_Entry (Id));
4034 Set_Flag132 (Id, V);
4035 end Set_Is_AST_Entry;
4037 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4040 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4042 end Set_Is_Asynchronous;
4044 procedure Set_Is_Atomic (Id : E; V : B := True) is
4049 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4051 pragma Assert ((not V)
4052 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4054 Set_Flag122 (Id, V);
4055 end Set_Is_Bit_Packed_Array;
4057 procedure Set_Is_Called (Id : E; V : B := True) is
4060 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
4061 Set_Flag102 (Id, V);
4064 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4067 end Set_Is_Character_Type;
4069 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4072 end Set_Is_Child_Unit;
4074 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4077 end Set_Is_Class_Wide_Equivalent_Type;
4079 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4081 Set_Flag149 (Id, V);
4082 end Set_Is_Compilation_Unit;
4084 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4086 pragma Assert (Ekind (Id) = E_Discriminant);
4087 Set_Flag103 (Id, V);
4088 end Set_Is_Completely_Hidden;
4090 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4093 end Set_Is_Concurrent_Record_Type;
4095 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4098 end Set_Is_Constr_Subt_For_U_Nominal;
4100 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4102 Set_Flag141 (Id, V);
4103 end Set_Is_Constr_Subt_For_UN_Aliased;
4105 procedure Set_Is_Constrained (Id : E; V : B := True) is
4107 pragma Assert (Nkind (Id) in N_Entity);
4109 end Set_Is_Constrained;
4111 procedure Set_Is_Constructor (Id : E; V : B := True) is
4114 end Set_Is_Constructor;
4116 procedure Set_Is_Controlled (Id : E; V : B := True) is
4118 pragma Assert (Id = Base_Type (Id));
4120 end Set_Is_Controlled;
4122 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4124 pragma Assert (Is_Formal (Id));
4126 end Set_Is_Controlling_Formal;
4128 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4131 end Set_Is_CPP_Class;
4133 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4135 pragma Assert (Is_Type (Id));
4136 Set_Flag223 (Id, V);
4137 end Set_Is_Descendent_Of_Address;
4139 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4141 Set_Flag176 (Id, V);
4142 end Set_Is_Discrim_SO_Function;
4144 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4146 Set_Flag234 (Id, V);
4147 end Set_Is_Dispatch_Table_Entity;
4149 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4154 Is_Overloadable (Id)
4156 Ekind (Id) = E_Subprogram_Type);
4159 end Set_Is_Dispatching_Operation;
4161 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4163 Set_Flag124 (Id, V);
4164 end Set_Is_Eliminated;
4166 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4169 end Set_Is_Entry_Formal;
4171 procedure Set_Is_Exported (Id : E; V : B := True) is
4174 end Set_Is_Exported;
4176 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4179 end Set_Is_First_Subtype;
4181 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4184 (Ekind (Id) = E_Record_Subtype
4186 Ekind (Id) = E_Private_Subtype);
4187 Set_Flag118 (Id, V);
4188 end Set_Is_For_Access_Subtype;
4190 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4192 Set_Flag111 (Id, V);
4193 end Set_Is_Formal_Subprogram;
4195 procedure Set_Is_Frozen (Id : E; V : B := True) is
4197 pragma Assert (Nkind (Id) in N_Entity);
4201 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4203 pragma Assert (Is_Type (Id));
4205 end Set_Is_Generic_Actual_Type;
4207 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4209 Set_Flag130 (Id, V);
4210 end Set_Is_Generic_Instance;
4212 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4214 pragma Assert (Nkind (Id) in N_Entity);
4216 end Set_Is_Generic_Type;
4218 procedure Set_Is_Hidden (Id : E; V : B := True) is
4223 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4225 Set_Flag171 (Id, V);
4226 end Set_Is_Hidden_Open_Scope;
4228 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4230 pragma Assert (Nkind (Id) in N_Entity);
4232 end Set_Is_Immediately_Visible;
4234 procedure Set_Is_Imported (Id : E; V : B := True) is
4237 end Set_Is_Imported;
4239 procedure Set_Is_Inlined (Id : E; V : B := True) is
4244 procedure Set_Is_Interface (Id : E; V : B := True) is
4247 (Ekind (Id) = E_Record_Type
4248 or else Ekind (Id) = E_Record_Subtype
4249 or else Ekind (Id) = E_Record_Type_With_Private
4250 or else Ekind (Id) = E_Record_Subtype_With_Private
4251 or else Ekind (Id) = E_Class_Wide_Type
4252 or else Ekind (Id) = E_Class_Wide_Subtype);
4253 Set_Flag186 (Id, V);
4254 end Set_Is_Interface;
4256 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4258 Set_Flag126 (Id, V);
4259 end Set_Is_Instantiated;
4261 procedure Set_Is_Internal (Id : E; V : B := True) is
4263 pragma Assert (Nkind (Id) in N_Entity);
4265 end Set_Is_Internal;
4267 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4269 pragma Assert (Nkind (Id) in N_Entity);
4271 end Set_Is_Interrupt_Handler;
4273 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4276 end Set_Is_Intrinsic_Subprogram;
4278 procedure Set_Is_Itype (Id : E; V : B := True) is
4283 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4286 end Set_Is_Known_Non_Null;
4288 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4290 Set_Flag204 (Id, V);
4291 end Set_Is_Known_Null;
4293 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4295 Set_Flag170 (Id, V);
4296 end Set_Is_Known_Valid;
4298 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4300 pragma Assert (Is_Type (Id));
4301 Set_Flag106 (Id, V);
4302 end Set_Is_Limited_Composite;
4304 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4306 pragma Assert (Is_Interface (Id));
4307 Set_Flag197 (Id, V);
4308 end Set_Is_Limited_Interface;
4310 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4313 end Set_Is_Limited_Record;
4315 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4317 pragma Assert (Is_Subprogram (Id));
4318 Set_Flag137 (Id, V);
4319 end Set_Is_Machine_Code_Subprogram;
4321 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4323 pragma Assert (Is_Type (Id));
4324 Set_Flag109 (Id, V);
4325 end Set_Is_Non_Static_Subtype;
4327 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4329 pragma Assert (Ekind (Id) = E_Procedure);
4330 Set_Flag178 (Id, V);
4331 end Set_Is_Null_Init_Proc;
4333 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4335 Set_Flag153 (Id, V);
4336 end Set_Is_Obsolescent;
4338 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4340 pragma Assert (Ekind (Id) = E_Out_Parameter);
4341 Set_Flag226 (Id, V);
4342 end Set_Is_Only_Out_Parameter;
4344 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4346 pragma Assert (Is_Formal (Id));
4347 Set_Flag134 (Id, V);
4348 end Set_Is_Optional_Parameter;
4350 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4352 pragma Assert (Is_Subprogram (Id));
4354 end Set_Is_Overriding_Operation;
4356 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4358 Set_Flag160 (Id, V);
4359 end Set_Is_Package_Body_Entity;
4361 procedure Set_Is_Packed (Id : E; V : B := True) is
4363 pragma Assert (Id = Base_Type (Id));
4367 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4369 Set_Flag138 (Id, V);
4370 end Set_Is_Packed_Array_Type;
4372 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4374 pragma Assert (Nkind (Id) in N_Entity);
4376 end Set_Is_Potentially_Use_Visible;
4378 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4381 end Set_Is_Preelaborated;
4383 procedure Set_Is_Primitive (Id : E; V : B := True) is
4386 (Is_Overloadable (Id)
4387 or else Ekind (Id) = E_Generic_Function
4388 or else Ekind (Id) = E_Generic_Procedure);
4389 Set_Flag218 (Id, V);
4390 end Set_Is_Primitive;
4392 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4394 pragma Assert (Ekind (Id) = E_Function
4395 or else Ekind (Id) = E_Procedure);
4396 Set_Flag195 (Id, V);
4397 end Set_Is_Primitive_Wrapper;
4399 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4401 pragma Assert (Is_Type (Id));
4402 Set_Flag107 (Id, V);
4403 end Set_Is_Private_Composite;
4405 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4408 end Set_Is_Private_Descendant;
4410 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4412 pragma Assert (Ekind (Id) = E_Function
4413 or else Ekind (Id) = E_Procedure);
4414 Set_Flag245 (Id, V);
4415 end Set_Is_Private_Primitive;
4417 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4419 pragma Assert (Is_Interface (Id));
4420 Set_Flag198 (Id, V);
4421 end Set_Is_Protected_Interface;
4423 procedure Set_Is_Public (Id : E; V : B := True) is
4425 pragma Assert (Nkind (Id) in N_Entity);
4429 procedure Set_Is_Pure (Id : E; V : B := True) is
4434 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4436 pragma Assert (Is_Access_Type (Id));
4437 Set_Flag189 (Id, V);
4438 end Set_Is_Pure_Unit_Access_Type;
4440 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4442 pragma Assert (Is_Type (Id));
4443 Set_Flag244 (Id, V);
4444 end Set_Is_RACW_Stub_Type;
4446 procedure Set_Is_Raised (Id : E; V : B := True) is
4448 pragma Assert (Ekind (Id) = E_Exception);
4449 Set_Flag224 (Id, V);
4452 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4455 end Set_Is_Remote_Call_Interface;
4457 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4460 end Set_Is_Remote_Types;
4462 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4464 Set_Flag112 (Id, V);
4465 end Set_Is_Renaming_Of_Object;
4467 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4469 Set_Flag209 (Id, V);
4470 end Set_Is_Return_Object;
4472 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4475 end Set_Is_Shared_Passive;
4477 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4480 (Ekind (Id) = E_Exception
4481 or else Ekind (Id) = E_Variable
4482 or else Ekind (Id) = E_Constant
4483 or else Is_Type (Id)
4484 or else Ekind (Id) = E_Void);
4486 end Set_Is_Statically_Allocated;
4488 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4490 pragma Assert (Is_Interface (Id));
4491 Set_Flag199 (Id, V);
4492 end Set_Is_Synchronized_Interface;
4494 procedure Set_Is_Tag (Id : E; V : B := True) is
4497 (Ekind (Id) = E_Component
4498 or else Ekind (Id) = E_Constant);
4502 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4505 end Set_Is_Tagged_Type;
4507 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4509 pragma Assert (Is_Interface (Id));
4510 Set_Flag200 (Id, V);
4511 end Set_Is_Task_Interface;
4513 procedure Set_Is_Thunk (Id : E; V : B := True) is
4515 Set_Flag225 (Id, V);
4518 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4520 Set_Flag235 (Id, V);
4521 end Set_Is_Trivial_Subprogram;
4523 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4525 Set_Flag163 (Id, V);
4526 end Set_Is_True_Constant;
4528 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4530 pragma Assert (Id = Base_Type (Id));
4531 Set_Flag117 (Id, V);
4532 end Set_Is_Unchecked_Union;
4534 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4536 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4537 Set_Flag144 (Id, V);
4538 end Set_Is_Unsigned_Type;
4540 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4542 pragma Assert (Ekind (Id) = E_Procedure);
4543 Set_Flag127 (Id, V);
4544 end Set_Is_Valued_Procedure;
4546 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4548 pragma Assert (Is_Child_Unit (Id));
4549 Set_Flag116 (Id, V);
4550 end Set_Is_Visible_Child_Unit;
4552 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4554 Set_Flag206 (Id, V);
4555 end Set_Is_Visible_Formal;
4557 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4559 pragma Assert (Ekind (Id) = E_Exception);
4560 Set_Flag133 (Id, V);
4561 end Set_Is_VMS_Exception;
4563 procedure Set_Is_Volatile (Id : E; V : B := True) is
4565 pragma Assert (Nkind (Id) in N_Entity);
4567 end Set_Is_Volatile;
4569 procedure Set_Itype_Printed (Id : E; V : B := True) is
4571 pragma Assert (Is_Itype (Id));
4572 Set_Flag202 (Id, V);
4573 end Set_Itype_Printed;
4575 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4578 end Set_Kill_Elaboration_Checks;
4580 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4583 end Set_Kill_Range_Checks;
4585 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4588 end Set_Kill_Tag_Checks;
4590 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4592 pragma Assert (Is_Type (Id));
4593 Set_Flag207 (Id, V);
4594 end Set_Known_To_Have_Preelab_Init;
4596 procedure Set_Last_Assignment (Id : E; V : N) is
4598 pragma Assert (Is_Assignable (Id));
4600 end Set_Last_Assignment;
4602 procedure Set_Last_Entity (Id : E; V : E) is
4605 end Set_Last_Entity;
4607 procedure Set_Limited_View (Id : E; V : E) is
4609 pragma Assert (Ekind (Id) = E_Package);
4611 end Set_Limited_View;
4613 procedure Set_Lit_Indexes (Id : E; V : E) is
4615 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4617 end Set_Lit_Indexes;
4619 procedure Set_Lit_Strings (Id : E; V : E) is
4621 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4623 end Set_Lit_Strings;
4625 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4627 pragma Assert (Is_Formal (Id));
4628 Set_Flag205 (Id, V);
4629 end Set_Low_Bound_Known;
4631 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4633 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4635 end Set_Machine_Radix_10;
4637 procedure Set_Master_Id (Id : E; V : E) is
4639 pragma Assert (Is_Access_Type (Id));
4643 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4645 Set_Flag168 (Id, V);
4646 end Set_Materialize_Entity;
4648 procedure Set_Mechanism (Id : E; V : M) is
4650 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4651 Set_Uint8 (Id, UI_From_Int (V));
4654 procedure Set_Modulus (Id : E; V : U) is
4656 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4660 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4662 pragma Assert (Is_Type (Id));
4663 Set_Flag183 (Id, V);
4664 end Set_Must_Be_On_Byte_Boundary;
4666 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4668 pragma Assert (Is_Type (Id));
4669 Set_Flag208 (Id, V);
4670 end Set_Must_Have_Preelab_Init;
4672 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4674 Set_Flag147 (Id, V);
4675 end Set_Needs_Debug_Info;
4677 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4680 (Is_Overloadable (Id)
4681 or else Ekind (Id) = E_Subprogram_Type
4682 or else Ekind (Id) = E_Entry_Family);
4684 end Set_Needs_No_Actuals;
4686 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4688 Set_Flag115 (Id, V);
4689 end Set_Never_Set_In_Source;
4691 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4694 end Set_Next_Inlined_Subprogram;
4696 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4698 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4699 Set_Flag131 (Id, V);
4700 end Set_No_Pool_Assigned;
4702 procedure Set_No_Return (Id : E; V : B := True) is
4706 or else Ekind (Id) = E_Procedure
4707 or else Ekind (Id) = E_Generic_Procedure);
4708 Set_Flag113 (Id, V);
4711 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4713 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4714 Set_Flag136 (Id, V);
4715 end Set_No_Strict_Aliasing;
4717 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4719 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4721 end Set_Non_Binary_Modulus;
4723 procedure Set_Non_Limited_View (Id : E; V : E) is
4725 pragma Assert (Ekind (Id) in Incomplete_Kind);
4727 end Set_Non_Limited_View;
4729 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4732 (Root_Type (Id) = Standard_Boolean
4733 and then Ekind (Id) = E_Enumeration_Type);
4734 Set_Flag162 (Id, V);
4735 end Set_Nonzero_Is_True;
4737 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4740 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4742 end Set_Normalized_First_Bit;
4744 procedure Set_Normalized_Position (Id : E; V : U) is
4747 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4749 end Set_Normalized_Position;
4751 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4754 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4756 end Set_Normalized_Position_Max;
4758 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4761 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4762 Set_Flag239 (Id, V);
4763 end Set_OK_To_Reorder_Components;
4765 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4769 or else Ekind (Id) = E_Constant
4770 or else Ekind (Id) = E_Variable);
4771 Set_Flag241 (Id, V);
4772 end Set_Optimize_Alignment_Space;
4774 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4778 or else Ekind (Id) = E_Constant
4779 or else Ekind (Id) = E_Variable);
4780 Set_Flag242 (Id, V);
4781 end Set_Optimize_Alignment_Time;
4783 procedure Set_Original_Array_Type (Id : E; V : E) is
4785 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4787 end Set_Original_Array_Type;
4789 procedure Set_Original_Record_Component (Id : E; V : E) is
4792 (Ekind (Id) = E_Void
4793 or else Ekind (Id) = E_Component
4794 or else Ekind (Id) = E_Discriminant);
4796 end Set_Original_Record_Component;
4798 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4800 Set_Flag243 (Id, V);
4801 end Set_Overlays_Constant;
4803 procedure Set_Overridden_Operation (Id : E; V : E) is
4806 end Set_Overridden_Operation;
4808 procedure Set_Package_Instantiation (Id : E; V : N) is
4811 (Ekind (Id) = E_Void
4812 or else Ekind (Id) = E_Generic_Package
4813 or else Ekind (Id) = E_Package);
4815 end Set_Package_Instantiation;
4817 procedure Set_Packed_Array_Type (Id : E; V : E) is
4819 pragma Assert (Is_Array_Type (Id));
4821 end Set_Packed_Array_Type;
4823 procedure Set_Parent_Subtype (Id : E; V : E) is
4825 pragma Assert (Ekind (Id) = E_Record_Type);
4827 end Set_Parent_Subtype;
4829 procedure Set_Primitive_Operations (Id : E; V : L) is
4831 pragma Assert (Is_Tagged_Type (Id));
4832 Set_Elist15 (Id, V);
4833 end Set_Primitive_Operations;
4835 procedure Set_Prival (Id : E; V : E) is
4837 pragma Assert (Is_Protected_Component (Id));
4841 procedure Set_Prival_Link (Id : E; V : E) is
4843 pragma Assert (Ekind (Id) = E_Constant
4844 or else Ekind (Id) = E_Variable);
4846 end Set_Prival_Link;
4848 procedure Set_Private_Dependents (Id : E; V : L) is
4850 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4851 Set_Elist18 (Id, V);
4852 end Set_Private_Dependents;
4854 procedure Set_Private_View (Id : E; V : N) is
4856 pragma Assert (Is_Private_Type (Id));
4858 end Set_Private_View;
4860 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4862 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4864 end Set_Protected_Body_Subprogram;
4866 procedure Set_Protected_Formal (Id : E; V : E) is
4868 pragma Assert (Is_Formal (Id));
4870 end Set_Protected_Formal;
4872 procedure Set_Protection_Object (Id : E; V : E) is
4874 pragma Assert (Ekind (Id) = E_Entry
4875 or else Ekind (Id) = E_Entry_Family
4876 or else Ekind (Id) = E_Function
4877 or else Ekind (Id) = E_Procedure);
4879 end Set_Protection_Object;
4881 procedure Set_Reachable (Id : E; V : B := True) is
4886 procedure Set_Referenced (Id : E; V : B := True) is
4888 Set_Flag156 (Id, V);
4891 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4894 end Set_Referenced_As_LHS;
4896 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4898 Set_Flag227 (Id, V);
4899 end Set_Referenced_As_Out_Parameter;
4901 procedure Set_Referenced_Object (Id : E; V : N) is
4903 pragma Assert (Is_Type (Id));
4905 end Set_Referenced_Object;
4907 procedure Set_Register_Exception_Call (Id : E; V : N) is
4909 pragma Assert (Ekind (Id) = E_Exception);
4911 end Set_Register_Exception_Call;
4913 procedure Set_Related_Array_Object (Id : E; V : E) is
4915 pragma Assert (Is_Array_Type (Id));
4917 end Set_Related_Array_Object;
4919 procedure Set_Related_Instance (Id : E; V : E) is
4922 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4924 end Set_Related_Instance;
4926 procedure Set_Related_Type (Id : E; V : E) is
4929 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
4931 end Set_Related_Type;
4933 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4935 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4937 end Set_Relative_Deadline_Variable;
4939 procedure Set_Renamed_Entity (Id : E; V : N) is
4942 end Set_Renamed_Entity;
4944 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4946 pragma Assert (Ekind (Id) = E_Package);
4947 Set_Flag231 (Id, V);
4948 end Set_Renamed_In_Spec;
4950 procedure Set_Renamed_Object (Id : E; V : N) is
4953 end Set_Renamed_Object;
4955 procedure Set_Renaming_Map (Id : E; V : U) is
4958 end Set_Renaming_Map;
4960 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4962 pragma Assert (Is_Overloadable (Id));
4963 Set_Flag213 (Id, V);
4964 end Set_Requires_Overriding;
4966 procedure Set_Return_Present (Id : E; V : B := True) is
4969 end Set_Return_Present;
4971 procedure Set_Return_Applies_To (Id : E; V : N) is
4974 end Set_Return_Applies_To;
4976 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4979 end Set_Returns_By_Ref;
4981 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4984 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4985 Set_Flag164 (Id, V);
4986 end Set_Reverse_Bit_Order;
4988 procedure Set_RM_Size (Id : E; V : U) is
4990 pragma Assert (Is_Type (Id));
4994 procedure Set_Scalar_Range (Id : E; V : N) is
4997 end Set_Scalar_Range;
4999 procedure Set_Scale_Value (Id : E; V : U) is
5002 end Set_Scale_Value;
5004 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5006 pragma Assert (not Is_Record_Type (Id));
5008 end Set_Scope_Depth_Value;
5010 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5012 Set_Flag167 (Id, V);
5013 end Set_Sec_Stack_Needed_For_Return;
5015 procedure Set_Shadow_Entities (Id : E; V : S) is
5018 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
5020 end Set_Shadow_Entities;
5022 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5024 pragma Assert (Ekind (Id) = E_Variable);
5026 end Set_Shared_Var_Procs_Instance;
5028 procedure Set_Size_Check_Code (Id : E; V : N) is
5030 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
5032 end Set_Size_Check_Code;
5034 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5036 Set_Flag177 (Id, V);
5037 end Set_Size_Depends_On_Discriminant;
5039 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5042 end Set_Size_Known_At_Compile_Time;
5044 procedure Set_Small_Value (Id : E; V : R) is
5046 pragma Assert (Is_Fixed_Point_Type (Id));
5047 Set_Ureal21 (Id, V);
5048 end Set_Small_Value;
5050 procedure Set_Spec_Entity (Id : E; V : E) is
5052 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5054 end Set_Spec_Entity;
5056 procedure Set_Spec_PPC_List (Id : E; V : N) is
5058 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
5060 end Set_Spec_PPC_List;
5062 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5064 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5065 pragma Assert (Id = Base_Type (Id));
5067 end Set_Storage_Size_Variable;
5069 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5071 pragma Assert (Ekind (Id) = E_Package);
5073 end Set_Static_Elaboration_Desired;
5075 procedure Set_Static_Initialization (Id : E; V : N) is
5078 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5080 end Set_Static_Initialization;
5082 procedure Set_Stored_Constraint (Id : E; V : L) is
5084 pragma Assert (Nkind (Id) in N_Entity);
5085 Set_Elist23 (Id, V);
5086 end Set_Stored_Constraint;
5088 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5090 pragma Assert (Id = Base_Type (Id));
5091 Set_Flag145 (Id, V);
5092 end Set_Strict_Alignment;
5094 procedure Set_String_Literal_Length (Id : E; V : U) is
5096 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5098 end Set_String_Literal_Length;
5100 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5102 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5104 end Set_String_Literal_Low_Bound;
5106 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5108 Set_Flag148 (Id, V);
5109 end Set_Suppress_Elaboration_Warnings;
5111 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5113 pragma Assert (Id = Base_Type (Id));
5114 Set_Flag105 (Id, V);
5115 end Set_Suppress_Init_Proc;
5117 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5119 Set_Flag165 (Id, V);
5120 end Set_Suppress_Style_Checks;
5122 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5124 Set_Flag217 (Id, V);
5125 end Set_Suppress_Value_Tracking_On_Call;
5127 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5129 pragma Assert (Ekind (Id) in Task_Kind);
5131 end Set_Task_Body_Procedure;
5133 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5136 end Set_Treat_As_Volatile;
5138 procedure Set_Underlying_Full_View (Id : E; V : E) is
5140 pragma Assert (Ekind (Id) in Private_Kind);
5142 end Set_Underlying_Full_View;
5144 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5146 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5147 Set_Flag216 (Id, V);
5148 end Set_Universal_Aliasing;
5150 procedure Set_Unset_Reference (Id : E; V : N) is
5153 end Set_Unset_Reference;
5155 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5158 end Set_Uses_Sec_Stack;
5160 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5162 Set_Flag222 (Id, V);
5163 end Set_Used_As_Generic_Actual;
5165 procedure Set_Vax_Float (Id : E; V : B := True) is
5167 pragma Assert (Id = Base_Type (Id));
5168 Set_Flag151 (Id, V);
5171 procedure Set_Warnings_Off (Id : E; V : B := True) is
5174 end Set_Warnings_Off;
5176 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5178 Set_Flag236 (Id, V);
5179 end Set_Warnings_Off_Used;
5181 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5183 Set_Flag237 (Id, V);
5184 end Set_Warnings_Off_Used_Unmodified;
5186 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5188 Set_Flag238 (Id, V);
5189 end Set_Warnings_Off_Used_Unreferenced;
5191 procedure Set_Was_Hidden (Id : E; V : B := True) is
5193 Set_Flag196 (Id, V);
5196 procedure Set_Wrapped_Entity (Id : E; V : E) is
5198 pragma Assert ((Ekind (Id) = E_Function
5199 or else Ekind (Id) = E_Procedure)
5200 and then Is_Primitive_Wrapper (Id));
5202 end Set_Wrapped_Entity;
5204 -----------------------------------
5205 -- Field Initialization Routines --
5206 -----------------------------------
5208 procedure Init_Alignment (Id : E) is
5210 Set_Uint14 (Id, Uint_0);
5213 procedure Init_Alignment (Id : E; V : Int) is
5215 Set_Uint14 (Id, UI_From_Int (V));
5218 procedure Init_Component_Bit_Offset (Id : E) is
5220 Set_Uint11 (Id, No_Uint);
5221 end Init_Component_Bit_Offset;
5223 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5225 Set_Uint11 (Id, UI_From_Int (V));
5226 end Init_Component_Bit_Offset;
5228 procedure Init_Component_Size (Id : E) is
5230 Set_Uint22 (Id, Uint_0);
5231 end Init_Component_Size;
5233 procedure Init_Component_Size (Id : E; V : Int) is
5235 Set_Uint22 (Id, UI_From_Int (V));
5236 end Init_Component_Size;
5238 procedure Init_Digits_Value (Id : E) is
5240 Set_Uint17 (Id, Uint_0);
5241 end Init_Digits_Value;
5243 procedure Init_Digits_Value (Id : E; V : Int) is
5245 Set_Uint17 (Id, UI_From_Int (V));
5246 end Init_Digits_Value;
5248 procedure Init_Esize (Id : E) is
5250 Set_Uint12 (Id, Uint_0);
5253 procedure Init_Esize (Id : E; V : Int) is
5255 Set_Uint12 (Id, UI_From_Int (V));
5258 procedure Init_Normalized_First_Bit (Id : E) is
5260 Set_Uint8 (Id, No_Uint);
5261 end Init_Normalized_First_Bit;
5263 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5265 Set_Uint8 (Id, UI_From_Int (V));
5266 end Init_Normalized_First_Bit;
5268 procedure Init_Normalized_Position (Id : E) is
5270 Set_Uint14 (Id, No_Uint);
5271 end Init_Normalized_Position;
5273 procedure Init_Normalized_Position (Id : E; V : Int) is
5275 Set_Uint14 (Id, UI_From_Int (V));
5276 end Init_Normalized_Position;
5278 procedure Init_Normalized_Position_Max (Id : E) is
5280 Set_Uint10 (Id, No_Uint);
5281 end Init_Normalized_Position_Max;
5283 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5285 Set_Uint10 (Id, UI_From_Int (V));
5286 end Init_Normalized_Position_Max;
5288 procedure Init_RM_Size (Id : E) is
5290 Set_Uint13 (Id, Uint_0);
5293 procedure Init_RM_Size (Id : E; V : Int) is
5295 Set_Uint13 (Id, UI_From_Int (V));
5298 -----------------------------
5299 -- Init_Component_Location --
5300 -----------------------------
5302 procedure Init_Component_Location (Id : E) is
5304 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5305 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5306 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5307 Set_Uint12 (Id, Uint_0); -- Esize
5308 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5309 end Init_Component_Location;
5315 procedure Init_Size (Id : E; V : Int) is
5317 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5318 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5321 ---------------------
5322 -- Init_Size_Align --
5323 ---------------------
5325 procedure Init_Size_Align (Id : E) is
5327 Set_Uint12 (Id, Uint_0); -- Esize
5328 Set_Uint13 (Id, Uint_0); -- RM_Size
5329 Set_Uint14 (Id, Uint_0); -- Alignment
5330 end Init_Size_Align;
5332 ----------------------------------------------
5333 -- Type Representation Attribute Predicates --
5334 ----------------------------------------------
5336 function Known_Alignment (E : Entity_Id) return B is
5338 return Uint14 (E) /= Uint_0
5339 and then Uint14 (E) /= No_Uint;
5340 end Known_Alignment;
5342 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5344 return Uint11 (E) /= No_Uint;
5345 end Known_Component_Bit_Offset;
5347 function Known_Component_Size (E : Entity_Id) return B is
5349 return Uint22 (Base_Type (E)) /= Uint_0
5350 and then Uint22 (Base_Type (E)) /= No_Uint;
5351 end Known_Component_Size;
5353 function Known_Esize (E : Entity_Id) return B is
5355 return Uint12 (E) /= Uint_0
5356 and then Uint12 (E) /= No_Uint;
5359 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5361 return Uint8 (E) /= No_Uint;
5362 end Known_Normalized_First_Bit;
5364 function Known_Normalized_Position (E : Entity_Id) return B is
5366 return Uint14 (E) /= No_Uint;
5367 end Known_Normalized_Position;
5369 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5371 return Uint10 (E) /= No_Uint;
5372 end Known_Normalized_Position_Max;
5374 function Known_RM_Size (E : Entity_Id) return B is
5376 return Uint13 (E) /= No_Uint
5377 and then (Uint13 (E) /= Uint_0
5378 or else Is_Discrete_Type (E)
5379 or else Is_Fixed_Point_Type (E));
5382 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5384 return Uint11 (E) /= No_Uint
5385 and then Uint11 (E) >= Uint_0;
5386 end Known_Static_Component_Bit_Offset;
5388 function Known_Static_Component_Size (E : Entity_Id) return B is
5390 return Uint22 (Base_Type (E)) > Uint_0;
5391 end Known_Static_Component_Size;
5393 function Known_Static_Esize (E : Entity_Id) return B is
5395 return Uint12 (E) > Uint_0;
5396 end Known_Static_Esize;
5398 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5400 return Uint8 (E) /= No_Uint
5401 and then Uint8 (E) >= Uint_0;
5402 end Known_Static_Normalized_First_Bit;
5404 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5406 return Uint14 (E) /= No_Uint
5407 and then Uint14 (E) >= Uint_0;
5408 end Known_Static_Normalized_Position;
5410 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5412 return Uint10 (E) /= No_Uint
5413 and then Uint10 (E) >= Uint_0;
5414 end Known_Static_Normalized_Position_Max;
5416 function Known_Static_RM_Size (E : Entity_Id) return B is
5418 return Uint13 (E) > Uint_0
5419 or else Is_Discrete_Type (E)
5420 or else Is_Fixed_Point_Type (E);
5421 end Known_Static_RM_Size;
5423 function Unknown_Alignment (E : Entity_Id) return B is
5425 return Uint14 (E) = Uint_0
5426 or else Uint14 (E) = No_Uint;
5427 end Unknown_Alignment;
5429 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5431 return Uint11 (E) = No_Uint;
5432 end Unknown_Component_Bit_Offset;
5434 function Unknown_Component_Size (E : Entity_Id) return B is
5436 return Uint22 (Base_Type (E)) = Uint_0
5438 Uint22 (Base_Type (E)) = No_Uint;
5439 end Unknown_Component_Size;
5441 function Unknown_Esize (E : Entity_Id) return B is
5443 return Uint12 (E) = No_Uint
5445 Uint12 (E) = Uint_0;
5448 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5450 return Uint8 (E) = No_Uint;
5451 end Unknown_Normalized_First_Bit;
5453 function Unknown_Normalized_Position (E : Entity_Id) return B is
5455 return Uint14 (E) = No_Uint;
5456 end Unknown_Normalized_Position;
5458 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5460 return Uint10 (E) = No_Uint;
5461 end Unknown_Normalized_Position_Max;
5463 function Unknown_RM_Size (E : Entity_Id) return B is
5465 return (Uint13 (E) = Uint_0
5466 and then not Is_Discrete_Type (E)
5467 and then not Is_Fixed_Point_Type (E))
5468 or else Uint13 (E) = No_Uint;
5469 end Unknown_RM_Size;
5471 --------------------
5472 -- Address_Clause --
5473 --------------------
5475 function Address_Clause (Id : E) return N is
5477 return Rep_Clause (Id, Name_Address);
5480 ----------------------
5481 -- Alignment_Clause --
5482 ----------------------
5484 function Alignment_Clause (Id : E) return N is
5486 return Rep_Clause (Id, Name_Alignment);
5487 end Alignment_Clause;
5489 ----------------------
5490 -- Ancestor_Subtype --
5491 ----------------------
5493 function Ancestor_Subtype (Id : E) return E is
5495 -- If this is first subtype, or is a base type, then there is no
5496 -- ancestor subtype, so we return Empty to indicate this fact.
5498 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
5503 D : constant Node_Id := Declaration_Node (Id);
5506 -- If we have a subtype declaration, get the ancestor subtype
5508 if Nkind (D) = N_Subtype_Declaration then
5509 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5510 return Entity (Subtype_Mark (Subtype_Indication (D)));
5512 return Entity (Subtype_Indication (D));
5515 -- If not, then no subtype indication is available
5521 end Ancestor_Subtype;
5527 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5529 if Last_Entity (V) = Empty then
5530 Set_First_Entity (Id => V, V => Id);
5532 Set_Next_Entity (Last_Entity (V), Id);
5535 Set_Next_Entity (Id, Empty);
5537 Set_Last_Entity (Id => V, V => Id);
5540 --------------------
5541 -- Available_View --
5542 --------------------
5544 function Available_View (Id : E) return E is
5546 if Is_Incomplete_Type (Id)
5547 and then Present (Non_Limited_View (Id))
5549 -- The non-limited view may itself be an incomplete type, in
5550 -- which case get its full view.
5552 return Get_Full_View (Non_Limited_View (Id));
5554 elsif Is_Class_Wide_Type (Id)
5555 and then Is_Incomplete_Type (Etype (Id))
5556 and then Present (Non_Limited_View (Etype (Id)))
5558 return Class_Wide_Type (Non_Limited_View (Etype (Id)));
5569 function Base_Type (Id : E) return E is
5572 when E_Enumeration_Subtype |
5574 E_Signed_Integer_Subtype |
5575 E_Modular_Integer_Subtype |
5576 E_Floating_Point_Subtype |
5577 E_Ordinary_Fixed_Point_Subtype |
5578 E_Decimal_Fixed_Point_Subtype |
5583 E_Record_Subtype_With_Private |
5584 E_Limited_Private_Subtype |
5586 E_Protected_Subtype |
5588 E_String_Literal_Subtype |
5589 E_Class_Wide_Subtype =>
5597 -------------------------
5598 -- Component_Alignment --
5599 -------------------------
5601 -- Component Alignment is encoded using two flags, Flag128/129 as
5602 -- follows. Note that both flags False = Align_Default, so that the
5603 -- default initialization of flags to False initializes component
5604 -- alignment to the default value as required.
5606 -- Flag128 Flag129 Value
5607 -- ------- ------- -----
5608 -- False False Calign_Default
5609 -- False True Calign_Component_Size
5610 -- True False Calign_Component_Size_4
5611 -- True True Calign_Storage_Unit
5613 function Component_Alignment (Id : E) return C is
5614 BT : constant Node_Id := Base_Type (Id);
5617 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5619 if Flag128 (BT) then
5620 if Flag129 (BT) then
5621 return Calign_Storage_Unit;
5623 return Calign_Component_Size_4;
5627 if Flag129 (BT) then
5628 return Calign_Component_Size;
5630 return Calign_Default;
5633 end Component_Alignment;
5635 --------------------
5636 -- Constant_Value --
5637 --------------------
5639 function Constant_Value (Id : E) return N is
5640 D : constant Node_Id := Declaration_Node (Id);
5644 -- If we have no declaration node, then return no constant value.
5645 -- Not clear how this can happen, but it does sometimes ???
5646 -- To investigate, remove this check and compile discrim_po.adb.
5651 -- Normal case where a declaration node is present
5653 elsif Nkind (D) = N_Object_Renaming_Declaration then
5654 return Renamed_Object (Id);
5656 -- If this is a component declaration whose entity is constant, it
5657 -- is a prival within a protected function. It does not have
5658 -- a constant value.
5660 elsif Nkind (D) = N_Component_Declaration then
5663 -- If there is an expression, return it
5665 elsif Present (Expression (D)) then
5666 return (Expression (D));
5668 -- For a constant, see if we have a full view
5670 elsif Ekind (Id) = E_Constant
5671 and then Present (Full_View (Id))
5673 Full_D := Parent (Full_View (Id));
5675 -- The full view may have been rewritten as an object renaming
5677 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5678 return Name (Full_D);
5680 return Expression (Full_D);
5683 -- Otherwise we have no expression to return
5690 ----------------------
5691 -- Declaration_Node --
5692 ----------------------
5694 function Declaration_Node (Id : E) return N is
5698 if Ekind (Id) = E_Incomplete_Type
5699 and then Present (Full_View (Id))
5701 P := Parent (Full_View (Id));
5707 if Nkind (P) /= N_Selected_Component
5708 and then Nkind (P) /= N_Expanded_Name
5710 not (Nkind (P) = N_Defining_Program_Unit_Name
5711 and then Is_Child_Unit (Id))
5718 end Declaration_Node;
5720 ---------------------
5721 -- Designated_Type --
5722 ---------------------
5724 function Designated_Type (Id : E) return E is
5728 Desig_Type := Directly_Designated_Type (Id);
5730 if Ekind (Desig_Type) = E_Incomplete_Type
5731 and then Present (Full_View (Desig_Type))
5733 return Full_View (Desig_Type);
5735 elsif Is_Class_Wide_Type (Desig_Type)
5736 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5737 and then Present (Full_View (Etype (Desig_Type)))
5738 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5740 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5745 end Designated_Type;
5747 -----------------------------
5748 -- Enclosing_Dynamic_Scope --
5749 -----------------------------
5751 function Enclosing_Dynamic_Scope (Id : E) return E is
5755 -- The following test is an error defense against some syntax
5756 -- errors that can leave scopes very messed up.
5758 if Id = Standard_Standard then
5762 -- Normal case, search enclosing scopes
5764 -- Note: the test for Present (S) should not be required, it is a
5765 -- defence against an ill-formed tree.
5769 -- If we somehow got an empty value for Scope, the tree must be
5770 -- malformed. Rather than blow up we return Standard in this case.
5773 return Standard_Standard;
5775 -- Quit if we get to standard or a dynamic scope
5777 elsif S = Standard_Standard
5778 or else Is_Dynamic_Scope (S)
5782 -- Otherwise keep climbing
5788 end Enclosing_Dynamic_Scope;
5790 ----------------------
5791 -- Entry_Index_Type --
5792 ----------------------
5794 function Entry_Index_Type (Id : E) return N is
5796 pragma Assert (Ekind (Id) = E_Entry_Family);
5797 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5798 end Entry_Index_Type;
5800 ---------------------
5801 -- First_Component --
5802 ---------------------
5804 function First_Component (Id : E) return E is
5809 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5811 Comp_Id := First_Entity (Id);
5812 while Present (Comp_Id) loop
5813 exit when Ekind (Comp_Id) = E_Component;
5814 Comp_Id := Next_Entity (Comp_Id);
5818 end First_Component;
5820 -------------------------------------
5821 -- First_Component_Or_Discriminant --
5822 -------------------------------------
5824 function First_Component_Or_Discriminant (Id : E) return E is
5829 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5831 Comp_Id := First_Entity (Id);
5832 while Present (Comp_Id) loop
5833 exit when Ekind (Comp_Id) = E_Component
5835 Ekind (Comp_Id) = E_Discriminant;
5836 Comp_Id := Next_Entity (Comp_Id);
5840 end First_Component_Or_Discriminant;
5842 ------------------------
5843 -- First_Discriminant --
5844 ------------------------
5846 function First_Discriminant (Id : E) return E is
5851 (Has_Discriminants (Id)
5852 or else Has_Unknown_Discriminants (Id));
5854 Ent := First_Entity (Id);
5856 -- The discriminants are not necessarily contiguous, because access
5857 -- discriminants will generate itypes. They are not the first entities
5858 -- either, because tag and controller record must be ahead of them.
5860 if Chars (Ent) = Name_uTag then
5861 Ent := Next_Entity (Ent);
5864 if Chars (Ent) = Name_uController then
5865 Ent := Next_Entity (Ent);
5868 -- Skip all hidden stored discriminants if any
5870 while Present (Ent) loop
5871 exit when Ekind (Ent) = E_Discriminant
5872 and then not Is_Completely_Hidden (Ent);
5874 Ent := Next_Entity (Ent);
5877 pragma Assert (Ekind (Ent) = E_Discriminant);
5880 end First_Discriminant;
5886 function First_Formal (Id : E) return E is
5891 (Is_Overloadable (Id)
5892 or else Ekind (Id) = E_Entry_Family
5893 or else Ekind (Id) = E_Subprogram_Body
5894 or else Ekind (Id) = E_Subprogram_Type);
5896 if Ekind (Id) = E_Enumeration_Literal then
5900 Formal := First_Entity (Id);
5902 if Present (Formal) and then Is_Formal (Formal) then
5910 ------------------------------
5911 -- First_Formal_With_Extras --
5912 ------------------------------
5914 function First_Formal_With_Extras (Id : E) return E is
5919 (Is_Overloadable (Id)
5920 or else Ekind (Id) = E_Entry_Family
5921 or else Ekind (Id) = E_Subprogram_Body
5922 or else Ekind (Id) = E_Subprogram_Type);
5924 if Ekind (Id) = E_Enumeration_Literal then
5928 Formal := First_Entity (Id);
5930 if Present (Formal) and then Is_Formal (Formal) then
5933 return Extra_Formals (Id); -- Empty if no extra formals
5936 end First_Formal_With_Extras;
5938 -------------------------------
5939 -- First_Stored_Discriminant --
5940 -------------------------------
5942 function First_Stored_Discriminant (Id : E) return E is
5945 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5946 -- Scans the Discriminants to see whether any are Completely_Hidden
5947 -- (the mechanism for describing non-specified stored discriminants)
5949 ----------------------------------------
5950 -- Has_Completely_Hidden_Discriminant --
5951 ----------------------------------------
5953 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5954 Ent : Entity_Id := Id;
5957 pragma Assert (Ekind (Id) = E_Discriminant);
5959 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5960 if Is_Completely_Hidden (Ent) then
5964 Ent := Next_Entity (Ent);
5968 end Has_Completely_Hidden_Discriminant;
5970 -- Start of processing for First_Stored_Discriminant
5974 (Has_Discriminants (Id)
5975 or else Has_Unknown_Discriminants (Id));
5977 Ent := First_Entity (Id);
5979 if Chars (Ent) = Name_uTag then
5980 Ent := Next_Entity (Ent);
5983 if Chars (Ent) = Name_uController then
5984 Ent := Next_Entity (Ent);
5987 if Has_Completely_Hidden_Discriminant (Ent) then
5989 while Present (Ent) loop
5990 exit when Is_Completely_Hidden (Ent);
5991 Ent := Next_Entity (Ent);
5996 pragma Assert (Ekind (Ent) = E_Discriminant);
5999 end First_Stored_Discriminant;
6005 function First_Subtype (Id : E) return E is
6006 B : constant Entity_Id := Base_Type (Id);
6007 F : constant Node_Id := Freeze_Node (B);
6011 -- If the base type has no freeze node, it is a type in standard,
6012 -- and always acts as its own first subtype unless it is one of
6013 -- the predefined integer types. If the type is formal, it is also
6014 -- a first subtype, and its base type has no freeze node. On the other
6015 -- hand, a subtype of a generic formal is not its own first_subtype.
6016 -- Its base type, if anonymous, is attached to the formal type decl.
6017 -- from which the first subtype is obtained.
6021 if B = Base_Type (Standard_Integer) then
6022 return Standard_Integer;
6024 elsif B = Base_Type (Standard_Long_Integer) then
6025 return Standard_Long_Integer;
6027 elsif B = Base_Type (Standard_Short_Short_Integer) then
6028 return Standard_Short_Short_Integer;
6030 elsif B = Base_Type (Standard_Short_Integer) then
6031 return Standard_Short_Integer;
6033 elsif B = Base_Type (Standard_Long_Long_Integer) then
6034 return Standard_Long_Long_Integer;
6036 elsif Is_Generic_Type (Id) then
6037 if Present (Parent (B)) then
6038 return Defining_Identifier (Parent (B));
6040 return Defining_Identifier (Associated_Node_For_Itype (B));
6047 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
6048 -- then we use that link, otherwise (happens with some Itypes), we use
6049 -- the base type itself.
6052 Ent := First_Subtype_Link (F);
6054 if Present (Ent) then
6062 -------------------------------------
6063 -- Get_Attribute_Definition_Clause --
6064 -------------------------------------
6066 function Get_Attribute_Definition_Clause
6068 Id : Attribute_Id) return Node_Id
6073 N := First_Rep_Item (E);
6074 while Present (N) loop
6075 if Nkind (N) = N_Attribute_Definition_Clause
6076 and then Get_Attribute_Id (Chars (N)) = Id
6085 end Get_Attribute_Definition_Clause;
6091 function Get_Full_View (T : Entity_Id) return Entity_Id is
6093 if Ekind (T) = E_Incomplete_Type
6094 and then Present (Full_View (T))
6096 return Full_View (T);
6098 elsif Is_Class_Wide_Type (T)
6099 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6100 and then Present (Full_View (Root_Type (T)))
6102 return Class_Wide_Type (Full_View (Root_Type (T)));
6109 --------------------
6110 -- Get_Rep_Pragma --
6111 --------------------
6113 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6117 N := First_Rep_Item (E);
6118 while Present (N) loop
6119 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6129 ------------------------
6130 -- Has_Attach_Handler --
6131 ------------------------
6133 function Has_Attach_Handler (Id : E) return B is
6137 pragma Assert (Is_Protected_Type (Id));
6139 Ritem := First_Rep_Item (Id);
6140 while Present (Ritem) loop
6141 if Nkind (Ritem) = N_Pragma
6142 and then Pragma_Name (Ritem) = Name_Attach_Handler
6146 Ritem := Next_Rep_Item (Ritem);
6151 end Has_Attach_Handler;
6153 -------------------------------------
6154 -- Has_Attribute_Definition_Clause --
6155 -------------------------------------
6157 function Has_Attribute_Definition_Clause
6159 Id : Attribute_Id) return Boolean
6162 return Present (Get_Attribute_Definition_Clause (E, Id));
6163 end Has_Attribute_Definition_Clause;
6169 function Has_Entries (Id : E) return B is
6173 pragma Assert (Is_Concurrent_Type (Id));
6175 Ent := First_Entity (Id);
6176 while Present (Ent) loop
6177 if Is_Entry (Ent) then
6181 Ent := Next_Entity (Ent);
6187 ----------------------------
6188 -- Has_Foreign_Convention --
6189 ----------------------------
6191 function Has_Foreign_Convention (Id : E) return B is
6193 return Convention (Id) in Foreign_Convention;
6194 end Has_Foreign_Convention;
6196 ---------------------------
6197 -- Has_Interrupt_Handler --
6198 ---------------------------
6200 function Has_Interrupt_Handler (Id : E) return B is
6204 pragma Assert (Is_Protected_Type (Id));
6206 Ritem := First_Rep_Item (Id);
6207 while Present (Ritem) loop
6208 if Nkind (Ritem) = N_Pragma
6209 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6213 Ritem := Next_Rep_Item (Ritem);
6218 end Has_Interrupt_Handler;
6220 --------------------------
6221 -- Has_Private_Ancestor --
6222 --------------------------
6224 function Has_Private_Ancestor (Id : E) return B is
6225 R : constant Entity_Id := Root_Type (Id);
6226 T1 : Entity_Id := Id;
6229 if Is_Private_Type (T1) then
6237 end Has_Private_Ancestor;
6239 --------------------
6240 -- Has_Rep_Pragma --
6241 --------------------
6243 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6245 return Present (Get_Rep_Pragma (E, Nam));
6248 --------------------
6249 -- Has_Unmodified --
6250 --------------------
6252 function Has_Unmodified (E : Entity_Id) return Boolean is
6254 if Has_Pragma_Unmodified (E) then
6256 elsif Warnings_Off (E) then
6257 Set_Warnings_Off_Used_Unmodified (E);
6264 ---------------------
6265 -- Has_Unreferenced --
6266 ---------------------
6268 function Has_Unreferenced (E : Entity_Id) return Boolean is
6270 if Has_Pragma_Unreferenced (E) then
6272 elsif Warnings_Off (E) then
6273 Set_Warnings_Off_Used_Unreferenced (E);
6278 end Has_Unreferenced;
6280 ----------------------
6281 -- Has_Warnings_Off --
6282 ----------------------
6284 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6286 if Warnings_Off (E) then
6287 Set_Warnings_Off_Used (E);
6292 end Has_Warnings_Off;
6294 ------------------------------
6295 -- Implementation_Base_Type --
6296 ------------------------------
6298 function Implementation_Base_Type (Id : E) return E is
6303 Bastyp := Base_Type (Id);
6305 if Is_Incomplete_Or_Private_Type (Bastyp) then
6306 Imptyp := Underlying_Type (Bastyp);
6308 -- If we have an implementation type, then just return it,
6309 -- otherwise we return the Base_Type anyway. This can only
6310 -- happen in error situations and should avoid some error bombs.
6312 if Present (Imptyp) then
6313 return Base_Type (Imptyp);
6321 end Implementation_Base_Type;
6323 ---------------------
6324 -- Is_Boolean_Type --
6325 ---------------------
6327 function Is_Boolean_Type (Id : E) return B is
6329 return Root_Type (Id) = Standard_Boolean;
6330 end Is_Boolean_Type;
6332 ---------------------
6333 -- Is_By_Copy_Type --
6334 ---------------------
6336 function Is_By_Copy_Type (Id : E) return B is
6338 -- If Id is a private type whose full declaration has not been seen,
6339 -- we assume for now that it is not a By_Copy type. Clearly this
6340 -- attribute should not be used before the type is frozen, but it is
6341 -- needed to build the associated record of a protected type. Another
6342 -- place where some lookahead for a full view is needed ???
6345 Is_Elementary_Type (Id)
6346 or else (Is_Private_Type (Id)
6347 and then Present (Underlying_Type (Id))
6348 and then Is_Elementary_Type (Underlying_Type (Id)));
6349 end Is_By_Copy_Type;
6351 --------------------------
6352 -- Is_By_Reference_Type --
6353 --------------------------
6355 -- This function knows too much semantics, it should be in sem_util ???
6357 function Is_By_Reference_Type (Id : E) return B is
6358 Btype : constant Entity_Id := Base_Type (Id);
6361 if Error_Posted (Id)
6362 or else Error_Posted (Btype)
6366 elsif Is_Private_Type (Btype) then
6368 Utyp : constant Entity_Id := Underlying_Type (Btype);
6373 return Is_By_Reference_Type (Utyp);
6377 elsif Is_Incomplete_Type (Btype) then
6379 Ftyp : constant Entity_Id := Full_View (Btype);
6384 return Is_By_Reference_Type (Ftyp);
6388 elsif Is_Concurrent_Type (Btype) then
6391 elsif Is_Record_Type (Btype) then
6392 if Is_Limited_Record (Btype)
6393 or else Is_Tagged_Type (Btype)
6394 or else Is_Volatile (Btype)
6403 C := First_Component (Btype);
6404 while Present (C) loop
6405 if Is_By_Reference_Type (Etype (C))
6406 or else Is_Volatile (Etype (C))
6411 C := Next_Component (C);
6418 elsif Is_Array_Type (Btype) then
6421 or else Is_By_Reference_Type (Component_Type (Btype))
6422 or else Is_Volatile (Component_Type (Btype))
6423 or else Has_Volatile_Components (Btype);
6428 end Is_By_Reference_Type;
6430 ------------------------
6431 -- Is_Constant_Object --
6432 ------------------------
6434 function Is_Constant_Object (Id : E) return B is
6435 K : constant Entity_Kind := Ekind (Id);
6438 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6439 end Is_Constant_Object;
6441 ---------------------
6442 -- Is_Derived_Type --
6443 ---------------------
6445 function Is_Derived_Type (Id : E) return B is
6450 and then Base_Type (Id) /= Root_Type (Id)
6451 and then not Is_Class_Wide_Type (Id)
6453 if not Is_Numeric_Type (Root_Type (Id)) then
6457 Par := Parent (First_Subtype (Id));
6459 return Present (Par)
6460 and then Nkind (Par) = N_Full_Type_Declaration
6461 and then Nkind (Type_Definition (Par)) =
6462 N_Derived_Type_Definition;
6468 end Is_Derived_Type;
6470 --------------------
6471 -- Is_Discriminal --
6472 --------------------
6474 function Is_Discriminal (Id : E) return B is
6477 (Ekind (Id) = E_Constant
6478 or else Ekind (Id) = E_In_Parameter)
6479 and then Present (Discriminal_Link (Id));
6482 ----------------------
6483 -- Is_Dynamic_Scope --
6484 ----------------------
6486 function Is_Dynamic_Scope (Id : E) return B is
6489 Ekind (Id) = E_Block
6491 Ekind (Id) = E_Function
6493 Ekind (Id) = E_Procedure
6495 Ekind (Id) = E_Subprogram_Body
6497 Ekind (Id) = E_Task_Type
6499 Ekind (Id) = E_Entry
6501 Ekind (Id) = E_Entry_Family
6503 Ekind (Id) = E_Return_Statement;
6504 end Is_Dynamic_Scope;
6506 --------------------
6507 -- Is_Entity_Name --
6508 --------------------
6510 function Is_Entity_Name (N : Node_Id) return Boolean is
6511 Kind : constant Node_Kind := Nkind (N);
6514 -- Identifiers, operator symbols, expanded names are entity names
6516 return Kind = N_Identifier
6517 or else Kind = N_Operator_Symbol
6518 or else Kind = N_Expanded_Name
6520 -- Attribute references are entity names if they refer to an entity.
6521 -- Note that we don't do this by testing for the presence of the
6522 -- Entity field in the N_Attribute_Reference node, since it may not
6523 -- have been set yet.
6525 or else (Kind = N_Attribute_Reference
6526 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6529 ---------------------------
6530 -- Is_Indefinite_Subtype --
6531 ---------------------------
6533 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
6534 K : constant Entity_Kind := Ekind (Id);
6537 if Is_Constrained (Id) then
6540 elsif K in Array_Kind
6541 or else K in Class_Wide_Kind
6542 or else Has_Unknown_Discriminants (Id)
6546 -- Known discriminants: indefinite if there are no default values
6548 elsif K in Record_Kind
6549 or else Is_Incomplete_Or_Private_Type (Id)
6550 or else Is_Concurrent_Type (Id)
6552 return (Has_Discriminants (Id)
6553 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
6558 end Is_Indefinite_Subtype;
6560 --------------------------------
6561 -- Is_Inherently_Limited_Type --
6562 --------------------------------
6564 function Is_Inherently_Limited_Type (Id : E) return B is
6565 Btype : constant Entity_Id := Base_Type (Id);
6568 if Is_Private_Type (Btype) then
6570 Utyp : constant Entity_Id := Underlying_Type (Btype);
6575 return Is_Inherently_Limited_Type (Utyp);
6579 elsif Is_Concurrent_Type (Btype) then
6582 elsif Is_Record_Type (Btype) then
6583 if Is_Limited_Record (Btype) then
6584 return not Is_Interface (Btype)
6585 or else Is_Protected_Interface (Btype)
6586 or else Is_Synchronized_Interface (Btype)
6587 or else Is_Task_Interface (Btype);
6589 elsif Is_Class_Wide_Type (Btype) then
6590 return Is_Inherently_Limited_Type (Root_Type (Btype));
6597 C := First_Component (Btype);
6598 while Present (C) loop
6599 if Is_Inherently_Limited_Type (Etype (C)) then
6603 C := Next_Component (C);
6610 elsif Is_Array_Type (Btype) then
6611 return Is_Inherently_Limited_Type (Component_Type (Btype));
6616 end Is_Inherently_Limited_Type;
6618 ---------------------
6619 -- Is_Limited_Type --
6620 ---------------------
6622 function Is_Limited_Type (Id : E) return B is
6623 Btype : constant E := Base_Type (Id);
6624 Rtype : constant E := Root_Type (Btype);
6627 if not Is_Type (Id) then
6630 elsif Ekind (Btype) = E_Limited_Private_Type
6631 or else Is_Limited_Composite (Btype)
6635 elsif Is_Concurrent_Type (Btype) then
6638 -- The Is_Limited_Record flag normally indicates that the type is
6639 -- limited. The exception is that a type does not inherit limitedness
6640 -- from its interface ancestor. So the type may be derived from a
6641 -- limited interface, but is not limited.
6643 elsif Is_Limited_Record (Id)
6644 and then not Is_Interface (Id)
6648 -- Otherwise we will look around to see if there is some other reason
6649 -- for it to be limited, except that if an error was posted on the
6650 -- entity, then just assume it is non-limited, because it can cause
6651 -- trouble to recurse into a murky erroneous entity!
6653 elsif Error_Posted (Id) then
6656 elsif Is_Record_Type (Btype) then
6658 if Is_Limited_Interface (Id) then
6661 -- AI-419: limitedness is not inherited from a limited interface
6663 elsif Is_Limited_Record (Rtype) then
6664 return not Is_Interface (Rtype)
6665 or else Is_Protected_Interface (Rtype)
6666 or else Is_Synchronized_Interface (Rtype)
6667 or else Is_Task_Interface (Rtype);
6669 elsif Is_Class_Wide_Type (Btype) then
6670 return Is_Limited_Type (Rtype);
6677 C := First_Component (Btype);
6678 while Present (C) loop
6679 if Is_Limited_Type (Etype (C)) then
6683 C := Next_Component (C);
6690 elsif Is_Array_Type (Btype) then
6691 return Is_Limited_Type (Component_Type (Btype));
6696 end Is_Limited_Type;
6698 -----------------------------------
6699 -- Is_Package_Or_Generic_Package --
6700 -----------------------------------
6702 function Is_Package_Or_Generic_Package (Id : E) return B is
6705 Ekind (Id) = E_Package
6707 Ekind (Id) = E_Generic_Package;
6708 end Is_Package_Or_Generic_Package;
6714 function Is_Prival (Id : E) return B is
6717 (Ekind (Id) = E_Constant
6718 or else Ekind (Id) = E_Variable)
6719 and then Present (Prival_Link (Id));
6722 ----------------------------
6723 -- Is_Protected_Component --
6724 ----------------------------
6726 function Is_Protected_Component (Id : E) return B is
6728 return Ekind (Id) = E_Component
6729 and then Is_Protected_Type (Scope (Id));
6730 end Is_Protected_Component;
6732 ------------------------------
6733 -- Is_Protected_Record_Type --
6734 ------------------------------
6736 function Is_Protected_Record_Type (Id : E) return B is
6739 Is_Concurrent_Record_Type (Id)
6740 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6741 end Is_Protected_Record_Type;
6743 --------------------------------
6744 -- Is_Standard_Character_Type --
6745 --------------------------------
6747 function Is_Standard_Character_Type (Id : E) return B is
6749 if Is_Type (Id) then
6751 R : constant Entity_Id := Root_Type (Id);
6754 R = Standard_Character
6756 R = Standard_Wide_Character
6758 R = Standard_Wide_Wide_Character;
6764 end Is_Standard_Character_Type;
6766 --------------------
6767 -- Is_String_Type --
6768 --------------------
6770 function Is_String_Type (Id : E) return B is
6772 return Ekind (Id) in String_Kind
6773 or else (Is_Array_Type (Id)
6774 and then Number_Dimensions (Id) = 1
6775 and then Is_Character_Type (Component_Type (Id)));
6778 -------------------------
6779 -- Is_Task_Record_Type --
6780 -------------------------
6782 function Is_Task_Record_Type (Id : E) return B is
6785 Is_Concurrent_Record_Type (Id)
6786 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6787 end Is_Task_Record_Type;
6789 ------------------------
6790 -- Is_Wrapper_Package --
6791 ------------------------
6793 function Is_Wrapper_Package (Id : E) return B is
6795 return (Ekind (Id) = E_Package
6796 and then Present (Related_Instance (Id)));
6797 end Is_Wrapper_Package;
6799 --------------------
6800 -- Next_Component --
6801 --------------------
6803 function Next_Component (Id : E) return E is
6807 Comp_Id := Next_Entity (Id);
6808 while Present (Comp_Id) loop
6809 exit when Ekind (Comp_Id) = E_Component;
6810 Comp_Id := Next_Entity (Comp_Id);
6816 ------------------------------------
6817 -- Next_Component_Or_Discriminant --
6818 ------------------------------------
6820 function Next_Component_Or_Discriminant (Id : E) return E is
6824 Comp_Id := Next_Entity (Id);
6825 while Present (Comp_Id) loop
6826 exit when Ekind (Comp_Id) = E_Component
6828 Ekind (Comp_Id) = E_Discriminant;
6829 Comp_Id := Next_Entity (Comp_Id);
6833 end Next_Component_Or_Discriminant;
6835 -----------------------
6836 -- Next_Discriminant --
6837 -----------------------
6839 -- This function actually implements both Next_Discriminant and
6840 -- Next_Stored_Discriminant by making sure that the Discriminant
6841 -- returned is of the same variety as Id.
6843 function Next_Discriminant (Id : E) return E is
6845 -- Derived Tagged types with private extensions look like this...
6847 -- E_Discriminant d1
6848 -- E_Discriminant d2
6850 -- E_Discriminant d1
6851 -- E_Discriminant d2
6854 -- so it is critical not to go past the leading discriminants
6859 pragma Assert (Ekind (Id) = E_Discriminant);
6862 D := Next_Entity (D);
6864 or else (Ekind (D) /= E_Discriminant
6865 and then not Is_Itype (D))
6870 exit when Ekind (D) = E_Discriminant
6871 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6875 end Next_Discriminant;
6881 function Next_Formal (Id : E) return E is
6885 -- Follow the chain of declared entities as long as the kind of the
6886 -- entity corresponds to a formal parameter. Skip internal entities
6887 -- that may have been created for implicit subtypes, in the process
6888 -- of analyzing default expressions.
6893 P := Next_Entity (P);
6895 if No (P) or else Is_Formal (P) then
6897 elsif not Is_Internal (P) then
6903 -----------------------------
6904 -- Next_Formal_With_Extras --
6905 -----------------------------
6907 function Next_Formal_With_Extras (Id : E) return E is
6909 if Present (Extra_Formal (Id)) then
6910 return Extra_Formal (Id);
6912 return Next_Formal (Id);
6914 end Next_Formal_With_Extras;
6920 function Next_Index (Id : Node_Id) return Node_Id is
6929 function Next_Literal (Id : E) return E is
6931 pragma Assert (Nkind (Id) in N_Entity);
6935 ------------------------------
6936 -- Next_Stored_Discriminant --
6937 ------------------------------
6939 function Next_Stored_Discriminant (Id : E) return E is
6941 -- See comment in Next_Discriminant
6943 return Next_Discriminant (Id);
6944 end Next_Stored_Discriminant;
6946 -----------------------
6947 -- Number_Dimensions --
6948 -----------------------
6950 function Number_Dimensions (Id : E) return Pos is
6955 if Ekind (Id) in String_Kind then
6960 T := First_Index (Id);
6961 while Present (T) loop
6968 end Number_Dimensions;
6970 --------------------------
6971 -- Number_Discriminants --
6972 --------------------------
6974 function Number_Discriminants (Id : E) return Pos is
6980 Discr := First_Discriminant (Id);
6981 while Present (Discr) loop
6983 Discr := Next_Discriminant (Discr);
6987 end Number_Discriminants;
6989 --------------------
6990 -- Number_Entries --
6991 --------------------
6993 function Number_Entries (Id : E) return Nat is
6998 pragma Assert (Is_Concurrent_Type (Id));
7001 Ent := First_Entity (Id);
7002 while Present (Ent) loop
7003 if Is_Entry (Ent) then
7007 Ent := Next_Entity (Ent);
7013 --------------------
7014 -- Number_Formals --
7015 --------------------
7017 function Number_Formals (Id : E) return Pos is
7023 Formal := First_Formal (Id);
7024 while Present (Formal) loop
7026 Formal := Next_Formal (Formal);
7032 --------------------
7033 -- Parameter_Mode --
7034 --------------------
7036 function Parameter_Mode (Id : E) return Formal_Kind is
7041 ---------------------
7042 -- Record_Rep_Item --
7043 ---------------------
7045 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7047 Set_Next_Rep_Item (N, First_Rep_Item (E));
7048 Set_First_Rep_Item (E, N);
7049 end Record_Rep_Item;
7055 function Root_Type (Id : E) return E is
7059 pragma Assert (Nkind (Id) in N_Entity);
7061 T := Base_Type (Id);
7063 if Ekind (T) = E_Class_Wide_Type then
7066 elsif Ekind (T) = E_Class_Wide_Subtype then
7067 return Etype (Base_Type (T));
7069 -- ??? T comes from Base_Type, how can it be a subtype?
7070 -- Also Base_Type is supposed to be idempotent, so either way
7071 -- this is equivalent to "return Etype (T)" and should be merged
7072 -- with the E_Class_Wide_Type case.
7083 -- Following test catches some error cases resulting from
7086 elsif No (Etyp) then
7089 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7092 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7098 -- Return if there is a circularity in the inheritance chain. This
7099 -- happens in some error situations and we do not want to get
7100 -- stuck in this loop.
7102 if T = Base_Type (Id) then
7113 function Scope_Depth (Id : E) return Uint is
7118 while Is_Record_Type (Scop) loop
7119 Scop := Scope (Scop);
7122 return Scope_Depth_Value (Scop);
7125 ---------------------
7126 -- Scope_Depth_Set --
7127 ---------------------
7129 function Scope_Depth_Set (Id : E) return B is
7131 return not Is_Record_Type (Id)
7132 and then Field22 (Id) /= Union_Id (Empty);
7133 end Scope_Depth_Set;
7135 -----------------------------
7136 -- Set_Component_Alignment --
7137 -----------------------------
7139 -- Component Alignment is encoded using two flags, Flag128/129 as
7140 -- follows. Note that both flags False = Align_Default, so that the
7141 -- default initialization of flags to False initializes component
7142 -- alignment to the default value as required.
7144 -- Flag128 Flag129 Value
7145 -- ------- ------- -----
7146 -- False False Calign_Default
7147 -- False True Calign_Component_Size
7148 -- True False Calign_Component_Size_4
7149 -- True True Calign_Storage_Unit
7151 procedure Set_Component_Alignment (Id : E; V : C) is
7153 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7154 and then Id = Base_Type (Id));
7157 when Calign_Default =>
7158 Set_Flag128 (Id, False);
7159 Set_Flag129 (Id, False);
7161 when Calign_Component_Size =>
7162 Set_Flag128 (Id, False);
7163 Set_Flag129 (Id, True);
7165 when Calign_Component_Size_4 =>
7166 Set_Flag128 (Id, True);
7167 Set_Flag129 (Id, False);
7169 when Calign_Storage_Unit =>
7170 Set_Flag128 (Id, True);
7171 Set_Flag129 (Id, True);
7173 end Set_Component_Alignment;
7179 function Size_Clause (Id : E) return N is
7181 return Rep_Clause (Id, Name_Size);
7184 ------------------------
7185 -- Stream_Size_Clause --
7186 ------------------------
7188 function Stream_Size_Clause (Id : E) return N is
7190 return Rep_Clause (Id, Name_Stream_Size);
7191 end Stream_Size_Clause;
7197 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7203 Kind := E_Access_Subtype;
7207 Kind := E_Array_Subtype;
7209 when E_Class_Wide_Type |
7210 E_Class_Wide_Subtype =>
7211 Kind := E_Class_Wide_Subtype;
7213 when E_Decimal_Fixed_Point_Type |
7214 E_Decimal_Fixed_Point_Subtype =>
7215 Kind := E_Decimal_Fixed_Point_Subtype;
7217 when E_Ordinary_Fixed_Point_Type |
7218 E_Ordinary_Fixed_Point_Subtype =>
7219 Kind := E_Ordinary_Fixed_Point_Subtype;
7221 when E_Private_Type |
7222 E_Private_Subtype =>
7223 Kind := E_Private_Subtype;
7225 when E_Limited_Private_Type |
7226 E_Limited_Private_Subtype =>
7227 Kind := E_Limited_Private_Subtype;
7229 when E_Record_Type_With_Private |
7230 E_Record_Subtype_With_Private =>
7231 Kind := E_Record_Subtype_With_Private;
7233 when E_Record_Type |
7235 Kind := E_Record_Subtype;
7237 when E_String_Type |
7239 Kind := E_String_Subtype;
7241 when Enumeration_Kind =>
7242 Kind := E_Enumeration_Subtype;
7245 Kind := E_Floating_Point_Subtype;
7247 when Signed_Integer_Kind =>
7248 Kind := E_Signed_Integer_Subtype;
7250 when Modular_Integer_Kind =>
7251 Kind := E_Modular_Integer_Subtype;
7253 when Protected_Kind =>
7254 Kind := E_Protected_Subtype;
7257 Kind := E_Task_Subtype;
7261 raise Program_Error;
7267 -------------------------
7268 -- First_Tag_Component --
7269 -------------------------
7271 function First_Tag_Component (Id : E) return E is
7273 Typ : Entity_Id := Id;
7276 pragma Assert (Is_Tagged_Type (Typ));
7278 if Is_Class_Wide_Type (Typ) then
7279 Typ := Root_Type (Typ);
7282 if Is_Private_Type (Typ) then
7283 Typ := Underlying_Type (Typ);
7285 -- If the underlying type is missing then the source program has
7286 -- errors and there is nothing else to do (the full-type declaration
7287 -- associated with the private type declaration is missing).
7294 Comp := First_Entity (Typ);
7295 while Present (Comp) loop
7296 if Is_Tag (Comp) then
7300 Comp := Next_Entity (Comp);
7303 -- No tag component found
7306 end First_Tag_Component;
7308 ------------------------
7309 -- Next_Tag_Component --
7310 ------------------------
7312 function Next_Tag_Component (Id : E) return E is
7316 pragma Assert (Is_Tag (Id));
7318 Comp := Next_Entity (Id);
7319 while Present (Comp) loop
7320 if Is_Tag (Comp) then
7321 pragma Assert (Chars (Comp) /= Name_uTag);
7325 Comp := Next_Entity (Comp);
7328 -- No tag component found
7331 end Next_Tag_Component;
7333 ---------------------
7334 -- Type_High_Bound --
7335 ---------------------
7337 function Type_High_Bound (Id : E) return Node_Id is
7338 Rng : constant Node_Id := Scalar_Range (Id);
7340 if Nkind (Rng) = N_Subtype_Indication then
7341 return High_Bound (Range_Expression (Constraint (Rng)));
7343 return High_Bound (Rng);
7345 end Type_High_Bound;
7347 --------------------
7348 -- Type_Low_Bound --
7349 --------------------
7351 function Type_Low_Bound (Id : E) return Node_Id is
7352 Rng : constant Node_Id := Scalar_Range (Id);
7354 if Nkind (Rng) = N_Subtype_Indication then
7355 return Low_Bound (Range_Expression (Constraint (Rng)));
7357 return Low_Bound (Rng);
7361 ---------------------
7362 -- Underlying_Type --
7363 ---------------------
7365 function Underlying_Type (Id : E) return E is
7367 -- For record_with_private the underlying type is always the direct
7368 -- full view. Never try to take the full view of the parent it
7369 -- doesn't make sense.
7371 if Ekind (Id) = E_Record_Type_With_Private then
7372 return Full_View (Id);
7374 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7376 -- If we have an incomplete or private type with a full view,
7377 -- then we return the Underlying_Type of this full view
7379 if Present (Full_View (Id)) then
7380 if Id = Full_View (Id) then
7382 -- Previous error in declaration
7387 return Underlying_Type (Full_View (Id));
7390 -- If we have an incomplete entity that comes from the limited
7391 -- view then we return the Underlying_Type of its non-limited
7394 elsif From_With_Type (Id)
7395 and then Present (Non_Limited_View (Id))
7397 return Underlying_Type (Non_Limited_View (Id));
7399 -- Otherwise check for the case where we have a derived type or
7400 -- subtype, and if so get the Underlying_Type of the parent type.
7402 elsif Etype (Id) /= Id then
7403 return Underlying_Type (Etype (Id));
7405 -- Otherwise we have an incomplete or private type that has
7406 -- no full view, which means that we have not encountered the
7407 -- completion, so return Empty to indicate the underlying type
7408 -- is not yet known.
7414 -- For non-incomplete, non-private types, return the type itself
7415 -- Also for entities that are not types at all return the entity
7421 end Underlying_Type;
7423 ------------------------
7424 -- Write_Entity_Flags --
7425 ------------------------
7427 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7429 procedure W (Flag_Name : String; Flag : Boolean);
7430 -- Write out given flag if it is set
7436 procedure W (Flag_Name : String; Flag : Boolean) is
7440 Write_Str (Flag_Name);
7441 Write_Str (" = True");
7446 -- Start of processing for Write_Entity_Flags
7449 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7450 and then Id = Base_Type (Id)
7453 Write_Str ("Component_Alignment = ");
7455 case Component_Alignment (Id) is
7456 when Calign_Default =>
7457 Write_Str ("Calign_Default");
7459 when Calign_Component_Size =>
7460 Write_Str ("Calign_Component_Size");
7462 when Calign_Component_Size_4 =>
7463 Write_Str ("Calign_Component_Size_4");
7465 when Calign_Storage_Unit =>
7466 Write_Str ("Calign_Storage_Unit");
7472 W ("Address_Taken", Flag104 (Id));
7473 W ("Body_Needed_For_SAL", Flag40 (Id));
7474 W ("C_Pass_By_Copy", Flag125 (Id));
7475 W ("Can_Never_Be_Null", Flag38 (Id));
7476 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7477 W ("Debug_Info_Off", Flag166 (Id));
7478 W ("Default_Expressions_Processed", Flag108 (Id));
7479 W ("Delay_Cleanups", Flag114 (Id));
7480 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7481 W ("Depends_On_Private", Flag14 (Id));
7482 W ("Discard_Names", Flag88 (Id));
7483 W ("Elaboration_Entity_Required", Flag174 (Id));
7484 W ("Elaborate_Body_Desirable", Flag210 (Id));
7485 W ("Entry_Accepted", Flag152 (Id));
7486 W ("Can_Use_Internal_Rep", Flag229 (Id));
7487 W ("Finalize_Storage_Only", Flag158 (Id));
7488 W ("From_With_Type", Flag159 (Id));
7489 W ("Has_Aliased_Components", Flag135 (Id));
7490 W ("Has_Alignment_Clause", Flag46 (Id));
7491 W ("Has_All_Calls_Remote", Flag79 (Id));
7492 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7493 W ("Has_Atomic_Components", Flag86 (Id));
7494 W ("Has_Biased_Representation", Flag139 (Id));
7495 W ("Has_Completion", Flag26 (Id));
7496 W ("Has_Completion_In_Body", Flag71 (Id));
7497 W ("Has_Complex_Representation", Flag140 (Id));
7498 W ("Has_Component_Size_Clause", Flag68 (Id));
7499 W ("Has_Contiguous_Rep", Flag181 (Id));
7500 W ("Has_Controlled_Component", Flag43 (Id));
7501 W ("Has_Controlling_Result", Flag98 (Id));
7502 W ("Has_Convention_Pragma", Flag119 (Id));
7503 W ("Has_Delayed_Freeze", Flag18 (Id));
7504 W ("Has_Discriminants", Flag5 (Id));
7505 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7506 W ("Has_Exit", Flag47 (Id));
7507 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7508 W ("Has_Forward_Instantiation", Flag175 (Id));
7509 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7510 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7511 W ("Has_Homonym", Flag56 (Id));
7512 W ("Has_Initial_Value", Flag219 (Id));
7513 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7514 W ("Has_Master_Entity", Flag21 (Id));
7515 W ("Has_Missing_Return", Flag142 (Id));
7516 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7517 W ("Has_Non_Standard_Rep", Flag75 (Id));
7518 W ("Has_Object_Size_Clause", Flag172 (Id));
7519 W ("Has_Per_Object_Constraint", Flag154 (Id));
7520 W ("Has_Persistent_BSS", Flag188 (Id));
7521 W ("Has_Postconditions", Flag240 (Id));
7522 W ("Has_Pragma_Controlled", Flag27 (Id));
7523 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7524 W ("Has_Pragma_Inline", Flag157 (Id));
7525 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7526 W ("Has_Pragma_Pack", Flag121 (Id));
7527 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7528 W ("Has_Pragma_Pure", Flag203 (Id));
7529 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7530 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7531 W ("Has_Pragma_Unmodified", Flag233 (Id));
7532 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7533 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7534 W ("Has_Primitive_Operations", Flag120 (Id));
7535 W ("Has_Private_Declaration", Flag155 (Id));
7536 W ("Has_Qualified_Name", Flag161 (Id));
7537 W ("Has_RACW", Flag214 (Id));
7538 W ("Has_Record_Rep_Clause", Flag65 (Id));
7539 W ("Has_Recursive_Call", Flag143 (Id));
7540 W ("Has_Size_Clause", Flag29 (Id));
7541 W ("Has_Small_Clause", Flag67 (Id));
7542 W ("Has_Specified_Layout", Flag100 (Id));
7543 W ("Has_Specified_Stream_Input", Flag190 (Id));
7544 W ("Has_Specified_Stream_Output", Flag191 (Id));
7545 W ("Has_Specified_Stream_Read", Flag192 (Id));
7546 W ("Has_Specified_Stream_Write", Flag193 (Id));
7547 W ("Has_Static_Discriminants", Flag211 (Id));
7548 W ("Has_Storage_Size_Clause", Flag23 (Id));
7549 W ("Has_Stream_Size_Clause", Flag184 (Id));
7550 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7551 W ("Has_Task", Flag30 (Id));
7552 W ("Has_Thunks", Flag228 (Id));
7553 W ("Has_Unchecked_Union", Flag123 (Id));
7554 W ("Has_Unknown_Discriminants", Flag72 (Id));
7555 W ("Has_Up_Level_Access", Flag215 (Id));
7556 W ("Has_Volatile_Components", Flag87 (Id));
7557 W ("Has_Xref_Entry", Flag182 (Id));
7558 W ("Implemented_By_Entry", Flag232 (Id));
7559 W ("In_Package_Body", Flag48 (Id));
7560 W ("In_Private_Part", Flag45 (Id));
7561 W ("In_Use", Flag8 (Id));
7562 W ("Is_AST_Entry", Flag132 (Id));
7563 W ("Is_Abstract_Subprogram", Flag19 (Id));
7564 W ("Is_Abstract_Type", Flag146 (Id));
7565 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7566 W ("Is_Access_Constant", Flag69 (Id));
7567 W ("Is_Ada_2005_Only", Flag185 (Id));
7568 W ("Is_Aliased", Flag15 (Id));
7569 W ("Is_Asynchronous", Flag81 (Id));
7570 W ("Is_Atomic", Flag85 (Id));
7571 W ("Is_Bit_Packed_Array", Flag122 (Id));
7572 W ("Is_CPP_Class", Flag74 (Id));
7573 W ("Is_Called", Flag102 (Id));
7574 W ("Is_Character_Type", Flag63 (Id));
7575 W ("Is_Child_Unit", Flag73 (Id));
7576 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7577 W ("Is_Compilation_Unit", Flag149 (Id));
7578 W ("Is_Completely_Hidden", Flag103 (Id));
7579 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7580 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7581 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7582 W ("Is_Constrained", Flag12 (Id));
7583 W ("Is_Constructor", Flag76 (Id));
7584 W ("Is_Controlled", Flag42 (Id));
7585 W ("Is_Controlling_Formal", Flag97 (Id));
7586 W ("Is_Descendent_Of_Address", Flag223 (Id));
7587 W ("Is_Discrim_SO_Function", Flag176 (Id));
7588 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7589 W ("Is_Dispatching_Operation", Flag6 (Id));
7590 W ("Is_Eliminated", Flag124 (Id));
7591 W ("Is_Entry_Formal", Flag52 (Id));
7592 W ("Is_Exported", Flag99 (Id));
7593 W ("Is_First_Subtype", Flag70 (Id));
7594 W ("Is_For_Access_Subtype", Flag118 (Id));
7595 W ("Is_Formal_Subprogram", Flag111 (Id));
7596 W ("Is_Frozen", Flag4 (Id));
7597 W ("Is_Generic_Actual_Type", Flag94 (Id));
7598 W ("Is_Generic_Instance", Flag130 (Id));
7599 W ("Is_Generic_Type", Flag13 (Id));
7600 W ("Is_Hidden", Flag57 (Id));
7601 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7602 W ("Is_Immediately_Visible", Flag7 (Id));
7603 W ("Is_Imported", Flag24 (Id));
7604 W ("Is_Inlined", Flag11 (Id));
7605 W ("Is_Instantiated", Flag126 (Id));
7606 W ("Is_Interface", Flag186 (Id));
7607 W ("Is_Internal", Flag17 (Id));
7608 W ("Is_Interrupt_Handler", Flag89 (Id));
7609 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7610 W ("Is_Itype", Flag91 (Id));
7611 W ("Is_Known_Non_Null", Flag37 (Id));
7612 W ("Is_Known_Null", Flag204 (Id));
7613 W ("Is_Known_Valid", Flag170 (Id));
7614 W ("Is_Limited_Composite", Flag106 (Id));
7615 W ("Is_Limited_Interface", Flag197 (Id));
7616 W ("Is_Limited_Record", Flag25 (Id));
7617 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7618 W ("Is_Non_Static_Subtype", Flag109 (Id));
7619 W ("Is_Null_Init_Proc", Flag178 (Id));
7620 W ("Is_Obsolescent", Flag153 (Id));
7621 W ("Is_Only_Out_Parameter", Flag226 (Id));
7622 W ("Is_Optional_Parameter", Flag134 (Id));
7623 W ("Is_Overriding_Operation", Flag39 (Id));
7624 W ("Is_Package_Body_Entity", Flag160 (Id));
7625 W ("Is_Packed", Flag51 (Id));
7626 W ("Is_Packed_Array_Type", Flag138 (Id));
7627 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7628 W ("Is_Preelaborated", Flag59 (Id));
7629 W ("Is_Primitive", Flag218 (Id));
7630 W ("Is_Primitive_Wrapper", Flag195 (Id));
7631 W ("Is_Private_Composite", Flag107 (Id));
7632 W ("Is_Private_Descendant", Flag53 (Id));
7633 W ("Is_Private_Primitive", Flag245 (Id));
7634 W ("Is_Protected_Interface", Flag198 (Id));
7635 W ("Is_Public", Flag10 (Id));
7636 W ("Is_Pure", Flag44 (Id));
7637 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7638 W ("Is_RACW_Stub_Type", Flag244 (Id));
7639 W ("Is_Raised", Flag224 (Id));
7640 W ("Is_Remote_Call_Interface", Flag62 (Id));
7641 W ("Is_Remote_Types", Flag61 (Id));
7642 W ("Is_Renaming_Of_Object", Flag112 (Id));
7643 W ("Is_Return_Object", Flag209 (Id));
7644 W ("Is_Shared_Passive", Flag60 (Id));
7645 W ("Is_Synchronized_Interface", Flag199 (Id));
7646 W ("Is_Statically_Allocated", Flag28 (Id));
7647 W ("Is_Tag", Flag78 (Id));
7648 W ("Is_Tagged_Type", Flag55 (Id));
7649 W ("Is_Task_Interface", Flag200 (Id));
7650 W ("Is_Thunk", Flag225 (Id));
7651 W ("Is_Trivial_Subprogram", Flag235 (Id));
7652 W ("Is_True_Constant", Flag163 (Id));
7653 W ("Is_Unchecked_Union", Flag117 (Id));
7654 W ("Is_Unsigned_Type", Flag144 (Id));
7655 W ("Is_VMS_Exception", Flag133 (Id));
7656 W ("Is_Valued_Procedure", Flag127 (Id));
7657 W ("Is_Visible_Child_Unit", Flag116 (Id));
7658 W ("Is_Visible_Formal", Flag206 (Id));
7659 W ("Is_Volatile", Flag16 (Id));
7660 W ("Itype_Printed", Flag202 (Id));
7661 W ("Kill_Elaboration_Checks", Flag32 (Id));
7662 W ("Kill_Range_Checks", Flag33 (Id));
7663 W ("Kill_Tag_Checks", Flag34 (Id));
7664 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7665 W ("Low_Bound_Known", Flag205 (Id));
7666 W ("Machine_Radix_10", Flag84 (Id));
7667 W ("Materialize_Entity", Flag168 (Id));
7668 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7669 W ("Must_Have_Preelab_Init", Flag208 (Id));
7670 W ("Needs_Debug_Info", Flag147 (Id));
7671 W ("Needs_No_Actuals", Flag22 (Id));
7672 W ("Never_Set_In_Source", Flag115 (Id));
7673 W ("No_Pool_Assigned", Flag131 (Id));
7674 W ("No_Return", Flag113 (Id));
7675 W ("No_Strict_Aliasing", Flag136 (Id));
7676 W ("Non_Binary_Modulus", Flag58 (Id));
7677 W ("Nonzero_Is_True", Flag162 (Id));
7678 W ("OK_To_Reorder_Components", Flag239 (Id));
7679 W ("Optimize_Alignment_Space", Flag241 (Id));
7680 W ("Optimize_Alignment_Time", Flag242 (Id));
7681 W ("Overlays_Constant", Flag243 (Id));
7682 W ("Reachable", Flag49 (Id));
7683 W ("Referenced", Flag156 (Id));
7684 W ("Referenced_As_LHS", Flag36 (Id));
7685 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7686 W ("Renamed_In_Spec", Flag231 (Id));
7687 W ("Requires_Overriding", Flag213 (Id));
7688 W ("Return_Present", Flag54 (Id));
7689 W ("Returns_By_Ref", Flag90 (Id));
7690 W ("Reverse_Bit_Order", Flag164 (Id));
7691 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7692 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7693 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7694 W ("Static_Elaboration_Desired", Flag77 (Id));
7695 W ("Strict_Alignment", Flag145 (Id));
7696 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7697 W ("Suppress_Init_Proc", Flag105 (Id));
7698 W ("Suppress_Style_Checks", Flag165 (Id));
7699 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7700 W ("Treat_As_Volatile", Flag41 (Id));
7701 W ("Universal_Aliasing", Flag216 (Id));
7702 W ("Used_As_Generic_Actual", Flag222 (Id));
7703 W ("Uses_Sec_Stack", Flag95 (Id));
7704 W ("Vax_Float", Flag151 (Id));
7705 W ("Warnings_Off", Flag96 (Id));
7706 W ("Warnings_Off_Used", Flag236 (Id));
7707 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7708 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7709 W ("Was_Hidden", Flag196 (Id));
7710 end Write_Entity_Flags;
7712 -----------------------
7713 -- Write_Entity_Info --
7714 -----------------------
7716 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7718 procedure Write_Attribute (Which : String; Nam : E);
7719 -- Write attribute value with given string name
7721 procedure Write_Kind (Id : Entity_Id);
7722 -- Write Ekind field of entity
7724 ---------------------
7725 -- Write_Attribute --
7726 ---------------------
7728 procedure Write_Attribute (Which : String; Nam : E) is
7732 Write_Int (Int (Nam));
7734 Write_Name (Chars (Nam));
7736 end Write_Attribute;
7742 procedure Write_Kind (Id : Entity_Id) is
7743 K : constant String := Entity_Kind'Image (Ekind (Id));
7747 Write_Str (" Kind ");
7749 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7750 Write_Str ("TAGGED ");
7753 Write_Str (K (3 .. K'Length));
7756 if Is_Type (Id) and then Depends_On_Private (Id) then
7757 Write_Str ("Depends_On_Private ");
7761 -- Start of processing for Write_Entity_Info
7765 Write_Attribute ("Name ", Id);
7766 Write_Int (Int (Id));
7770 Write_Attribute (" Type ", Etype (Id));
7772 Write_Attribute (" Scope ", Scope (Id));
7777 when Discrete_Kind =>
7778 Write_Str ("Bounds: Id = ");
7780 if Present (Scalar_Range (Id)) then
7781 Write_Int (Int (Type_Low_Bound (Id)));
7782 Write_Str (" .. Id = ");
7783 Write_Int (Int (Type_High_Bound (Id)));
7785 Write_Str ("Empty");
7796 (" Component Type ", Component_Type (Id));
7799 Write_Str (" Indices ");
7801 Index := First_Index (Id);
7802 while Present (Index) loop
7803 Write_Attribute (" ", Etype (Index));
7804 Index := Next_Index (Index);
7812 (" Directly Designated Type ",
7813 Directly_Designated_Type (Id));
7816 when Overloadable_Kind =>
7817 if Present (Homonym (Id)) then
7818 Write_Str (" Homonym ");
7819 Write_Name (Chars (Homonym (Id)));
7821 Write_Int (Int (Homonym (Id)));
7828 if Ekind (Scope (Id)) in Record_Kind then
7830 " Original_Record_Component ",
7831 Original_Record_Component (Id));
7832 Write_Int (Int (Original_Record_Component (Id)));
7836 when others => null;
7838 end Write_Entity_Info;
7840 -----------------------
7841 -- Write_Field6_Name --
7842 -----------------------
7844 procedure Write_Field6_Name (Id : Entity_Id) is
7845 pragma Warnings (Off, Id);
7847 Write_Str ("First_Rep_Item");
7848 end Write_Field6_Name;
7850 -----------------------
7851 -- Write_Field7_Name --
7852 -----------------------
7854 procedure Write_Field7_Name (Id : Entity_Id) is
7855 pragma Warnings (Off, Id);
7857 Write_Str ("Freeze_Node");
7858 end Write_Field7_Name;
7860 -----------------------
7861 -- Write_Field8_Name --
7862 -----------------------
7864 procedure Write_Field8_Name (Id : Entity_Id) is
7869 Write_Str ("Normalized_First_Bit");
7873 E_Subprogram_Body =>
7874 Write_Str ("Mechanism");
7877 Write_Str ("Associated_Node_For_Itype");
7880 Write_Str ("Dependent_Instances");
7882 when E_Return_Statement =>
7883 Write_Str ("Return_Applies_To");
7886 Write_Str ("Hiding_Loop_Variable");
7889 Write_Str ("Field8??");
7891 end Write_Field8_Name;
7893 -----------------------
7894 -- Write_Field9_Name --
7895 -----------------------
7897 procedure Write_Field9_Name (Id : Entity_Id) is
7901 Write_Str ("Class_Wide_Type");
7904 E_Generic_Function |
7906 E_Generic_Procedure |
7909 Write_Str ("Renaming_Map");
7912 Write_Str ("Current_Value");
7915 Write_Str ("Field9??");
7917 end Write_Field9_Name;
7919 ------------------------
7920 -- Write_Field10_Name --
7921 ------------------------
7923 procedure Write_Field10_Name (Id : Entity_Id) is
7927 Write_Str ("Referenced_Object");
7929 when E_In_Parameter |
7931 Write_Str ("Discriminal_Link");
7937 Write_Str ("Handler_Records");
7941 Write_Str ("Normalized_Position_Max");
7944 Write_Str ("Field10??");
7946 end Write_Field10_Name;
7948 ------------------------
7949 -- Write_Field11_Name --
7950 ------------------------
7952 procedure Write_Field11_Name (Id : Entity_Id) is
7956 Write_Str ("Entry_Component");
7960 Write_Str ("Component_Bit_Offset");
7963 Write_Str ("Full_View");
7965 when E_Enumeration_Literal =>
7966 Write_Str ("Enumeration_Pos");
7969 Write_Str ("Block_Node");
7975 Write_Str ("Protected_Body_Subprogram");
7977 when E_Generic_Package =>
7978 Write_Str ("Generic_Homonym");
7981 Write_Str ("Full_View");
7984 Write_Str ("Field11??");
7986 end Write_Field11_Name;
7988 ------------------------
7989 -- Write_Field12_Name --
7990 ------------------------
7992 procedure Write_Field12_Name (Id : Entity_Id) is
7996 Write_Str ("Barrier_Function");
7998 when E_Enumeration_Literal =>
7999 Write_Str ("Enumeration_Rep");
8007 E_In_Out_Parameter |
8011 Write_Str ("Esize");
8015 Write_Str ("Next_Inlined_Subprogram");
8018 Write_Str ("Associated_Formal_Package");
8021 Write_Str ("Field12??");
8023 end Write_Field12_Name;
8025 ------------------------
8026 -- Write_Field13_Name --
8027 ------------------------
8029 procedure Write_Field13_Name (Id : Entity_Id) is
8033 Write_Str ("RM_Size");
8037 Write_Str ("Component_Clause");
8040 if not Comes_From_Source (Id)
8042 Chars (Id) = Name_Op_Ne
8044 Write_Str ("Corresponding_Equality");
8046 elsif Comes_From_Source (Id) then
8047 Write_Str ("Elaboration_Entity");
8050 Write_Str ("Field13??");
8055 Write_Str ("Extra_Accessibility");
8059 Generic_Unit_Kind =>
8060 Write_Str ("Elaboration_Entity");
8063 Write_Str ("Field13??");
8065 end Write_Field13_Name;
8067 -----------------------
8068 -- Write_Field14_Name --
8069 -----------------------
8071 procedure Write_Field14_Name (Id : Entity_Id) is
8080 Write_Str ("Alignment");
8084 Write_Str ("Normalized_Position");
8088 Write_Str ("First_Optional_Parameter");
8091 E_Generic_Package =>
8092 Write_Str ("Shadow_Entities");
8095 Write_Str ("Field14??");
8097 end Write_Field14_Name;
8099 ------------------------
8100 -- Write_Field15_Name --
8101 ------------------------
8103 procedure Write_Field15_Name (Id : Entity_Id) is
8108 Write_Str ("Storage_Size_Variable");
8110 when Class_Wide_Kind |
8114 Write_Str ("Primitive_Operations");
8117 Write_Str ("DT_Entry_Count");
8119 when Decimal_Fixed_Point_Kind =>
8120 Write_Str ("Scale_Value");
8122 when E_Discriminant =>
8123 Write_Str ("Discriminant_Number");
8126 Write_Str ("Extra_Formal");
8130 Write_Str ("DT_Position");
8133 Write_Str ("Entry_Parameters_Type");
8135 when Enumeration_Kind =>
8136 Write_Str ("Lit_Indexes");
8140 Write_Str ("Related_Instance");
8142 when E_Protected_Type =>
8143 Write_Str ("Entry_Bodies_Array");
8145 when E_String_Literal_Subtype =>
8146 Write_Str ("String_Literal_Low_Bound");
8149 Write_Str ("Field15??");
8151 end Write_Field15_Name;
8153 ------------------------
8154 -- Write_Field16_Name --
8155 ------------------------
8157 procedure Write_Field16_Name (Id : Entity_Id) is
8161 Write_Str ("Entry_Formal");
8165 Write_Str ("DTC_Entity");
8170 Write_Str ("First_Private_Entity");
8172 when E_Record_Type |
8173 E_Record_Type_With_Private =>
8174 Write_Str ("Access_Disp_Table");
8176 when E_String_Literal_Subtype =>
8177 Write_Str ("String_Literal_Length");
8179 when Enumeration_Kind =>
8180 Write_Str ("Lit_Strings");
8184 Write_Str ("Unset_Reference");
8186 when E_Record_Subtype |
8187 E_Class_Wide_Subtype =>
8188 Write_Str ("Cloned_Subtype");
8191 Write_Str ("Field16??");
8193 end Write_Field16_Name;
8195 ------------------------
8196 -- Write_Field17_Name --
8197 ------------------------
8199 procedure Write_Field17_Name (Id : Entity_Id) is
8203 Write_Str ("Digits_Value");
8206 Write_Str ("Prival");
8208 when E_Discriminant =>
8209 Write_Str ("Discriminal");
8218 E_Generic_Function |
8220 E_Generic_Procedure |
8228 E_Return_Statement |
8230 E_Subprogram_Type =>
8231 Write_Str ("First_Entity");
8234 Write_Str ("First_Index");
8236 when Enumeration_Kind =>
8237 Write_Str ("First_Literal");
8240 Write_Str ("Master_Id");
8242 when Modular_Integer_Kind =>
8243 Write_Str ("Modulus");
8247 E_Generic_In_Out_Parameter |
8249 Write_Str ("Actual_Subtype");
8251 when E_Incomplete_Type =>
8252 Write_Str ("Non_Limited_View");
8254 when E_Incomplete_Subtype =>
8255 if From_With_Type (Id) then
8256 Write_Str ("Non_Limited_View");
8260 Write_Str ("Field17??");
8262 end Write_Field17_Name;
8264 ------------------------
8265 -- Write_Field18_Name --
8266 ------------------------
8268 procedure Write_Field18_Name (Id : Entity_Id) is
8271 when E_Enumeration_Literal |
8275 Write_Str ("Alias");
8277 when E_Record_Type =>
8278 Write_Str ("Corresponding_Concurrent_Type");
8280 when E_Entry_Index_Parameter =>
8281 Write_Str ("Entry_Index_Constant");
8283 when E_Class_Wide_Subtype |
8284 E_Access_Protected_Subprogram_Type |
8285 E_Anonymous_Access_Protected_Subprogram_Type |
8286 E_Access_Subprogram_Type |
8288 Write_Str ("Equivalent_Type");
8290 when Fixed_Point_Kind =>
8291 Write_Str ("Delta_Value");
8294 Write_Str ("Renamed_Object");
8298 E_Generic_Function |
8299 E_Generic_Procedure |
8300 E_Generic_Package =>
8301 Write_Str ("Renamed_Entity");
8303 when Incomplete_Or_Private_Kind =>
8304 Write_Str ("Private_Dependents");
8306 when Concurrent_Kind =>
8307 Write_Str ("Corresponding_Record_Type");
8312 Write_Str ("Enclosing_Scope");
8315 Write_Str ("Field18??");
8317 end Write_Field18_Name;
8319 -----------------------
8320 -- Write_Field19_Name --
8321 -----------------------
8323 procedure Write_Field19_Name (Id : Entity_Id) is
8328 Write_Str ("Related_Array_Object");
8334 E_Return_Statement |
8336 Write_Str ("Finalization_Chain_Entity");
8338 when E_Constant | E_Variable =>
8339 Write_Str ("Size_Check_Code");
8341 when E_Discriminant =>
8342 Write_Str ("Corresponding_Discriminant");
8345 E_Generic_Package =>
8346 Write_Str ("Body_Entity");
8348 when E_Package_Body |
8350 Write_Str ("Spec_Entity");
8352 when Private_Kind =>
8353 Write_Str ("Underlying_Full_View");
8355 when E_Record_Type =>
8356 Write_Str ("Parent_Subtype");
8359 Write_Str ("Field19??");
8361 end Write_Field19_Name;
8363 -----------------------
8364 -- Write_Field20_Name --
8365 -----------------------
8367 procedure Write_Field20_Name (Id : Entity_Id) is
8371 Write_Str ("Component_Type");
8373 when E_In_Parameter |
8374 E_Generic_In_Parameter =>
8375 Write_Str ("Default_Value");
8378 Write_Str ("Directly_Designated_Type");
8381 Write_Str ("Discriminant_Checking_Func");
8385 Write_Str ("Prival_Link");
8387 when E_Discriminant =>
8388 Write_Str ("Discriminant_Default_Value");
8397 E_Generic_Function |
8399 E_Generic_Procedure |
8407 E_Return_Statement |
8409 E_Subprogram_Type =>
8411 Write_Str ("Last_Entity");
8414 Write_Str ("Scalar_Range");
8417 Write_Str ("Register_Exception_Call");
8420 Write_Str ("Field20??");
8422 end Write_Field20_Name;
8424 -----------------------
8425 -- Write_Field21_Name --
8426 -----------------------
8428 procedure Write_Field21_Name (Id : Entity_Id) is
8434 E_Generic_Function |
8436 E_Generic_Procedure |
8438 Write_Str ("Interface_Name");
8440 when Concurrent_Kind |
8441 Incomplete_Or_Private_Kind |
8445 Write_Str ("Discriminant_Constraint");
8448 Write_Str ("Accept_Address");
8450 when Fixed_Point_Kind =>
8451 Write_Str ("Small_Value");
8453 when E_In_Parameter =>
8454 Write_Str ("Default_Expr_Function");
8457 Modular_Integer_Kind =>
8458 Write_Str ("Original_Array_Type");
8461 Write_Str ("Field21??");
8463 end Write_Field21_Name;
8465 -----------------------
8466 -- Write_Field22_Name --
8467 -----------------------
8469 procedure Write_Field22_Name (Id : Entity_Id) is
8473 Write_Str ("Associated_Storage_Pool");
8476 Write_Str ("Component_Size");
8480 Write_Str ("Original_Record_Component");
8482 when E_Enumeration_Literal =>
8483 Write_Str ("Enumeration_Rep_Expr");
8486 Write_Str ("Exception_Code");
8489 Write_Str ("Protected_Formal");
8491 when E_Record_Type =>
8492 Write_Str ("Corresponding_Remote_Type");
8502 E_Generic_Function |
8503 E_Generic_Procedure |
8506 E_Return_Statement |
8509 Write_Str ("Scope_Depth_Value");
8511 when E_Record_Type_With_Private |
8512 E_Record_Subtype_With_Private |
8515 E_Limited_Private_Type |
8516 E_Limited_Private_Subtype =>
8517 Write_Str ("Private_View");
8520 Write_Str ("Shared_Var_Procs_Instance");
8523 Write_Str ("Field22??");
8525 end Write_Field22_Name;
8527 ------------------------
8528 -- Write_Field23_Name --
8529 ------------------------
8531 procedure Write_Field23_Name (Id : Entity_Id) is
8535 Write_Str ("Associated_Final_Chain");
8538 Write_Str ("Packed_Array_Type");
8541 Write_Str ("Entry_Cancel_Parameter");
8543 when E_Discriminant =>
8544 Write_Str ("CR_Discriminant");
8546 when E_Enumeration_Type =>
8547 Write_Str ("Enum_Pos_To_Rep");
8551 Write_Str ("Extra_Constrained");
8553 when E_Generic_Function |
8555 E_Generic_Procedure =>
8556 Write_Str ("Inner_Instances");
8558 when Concurrent_Kind |
8559 Incomplete_Or_Private_Kind |
8563 Write_Str ("Stored_Constraint");
8567 if Present (Scope (Id))
8568 and then Is_Protected_Type (Scope (Id))
8570 Write_Str ("Protection_Object");
8572 Write_Str ("Generic_Renamings");
8576 if Is_Generic_Instance (Id) then
8577 Write_Str ("Generic_Renamings");
8579 Write_Str ("Limited_View");
8583 Write_Str ("Protection_Object");
8586 Write_Str ("Field23??");
8588 end Write_Field23_Name;
8590 ------------------------
8591 -- Write_Field24_Name --
8592 ------------------------
8594 procedure Write_Field24_Name (Id : Entity_Id) is
8597 when Subprogram_Kind =>
8598 Write_Str ("Spec_PPC_List");
8603 end Write_Field24_Name;
8605 ------------------------
8606 -- Write_Field25_Name --
8607 ------------------------
8609 procedure Write_Field25_Name (Id : Entity_Id) is
8613 Write_Str ("DT_Offset_To_Top_Func");
8617 Write_Str ("Interface_Alias");
8619 when E_Record_Type |
8621 E_Record_Type_With_Private |
8622 E_Record_Subtype_With_Private =>
8623 Write_Str ("Interfaces");
8626 Write_Str ("Task_Body_Procedure");
8629 Write_Str ("Debug_Renaming_Link");
8632 Write_Str ("Field25??");
8634 end Write_Field25_Name;
8636 ------------------------
8637 -- Write_Field26_Name --
8638 ------------------------
8640 procedure Write_Field26_Name (Id : Entity_Id) is
8645 Write_Str ("Related_Type");
8647 when E_Generic_Package |
8649 Write_Str ("Package_Instantiation");
8654 if Is_Dispatching_Operation (Id) then
8655 Write_Str ("Overridden_Operation");
8657 Write_Str ("Static_Initialization");
8660 when E_Record_Type |
8661 E_Record_Type_With_Private =>
8662 Write_Str ("Dispatch_Table_Wrapper");
8664 when E_In_Out_Parameter |
8667 Write_Str ("Last_Assignment");
8670 Write_Str ("Relative_Deadline_Variable");
8673 Write_Str ("Field26??");
8675 end Write_Field26_Name;
8677 ------------------------
8678 -- Write_Field27_Name --
8679 ------------------------
8681 procedure Write_Field27_Name (Id : Entity_Id) is
8685 Write_Str ("Wrapped_Entity");
8687 when E_Package | Type_Kind =>
8688 Write_Str ("Current_Use_Clause");
8691 Write_Str ("Field27??");
8693 end Write_Field27_Name;
8695 ------------------------
8696 -- Write_Field28_Name --
8697 ------------------------
8699 procedure Write_Field28_Name (Id : Entity_Id) is
8702 when E_Procedure | E_Function | E_Entry =>
8703 Write_Str ("Extra_Formals");
8706 Write_Str ("Field28??");
8708 end Write_Field28_Name;
8710 -------------------------
8711 -- Iterator Procedures --
8712 -------------------------
8714 procedure Proc_Next_Component (N : in out Node_Id) is
8716 N := Next_Component (N);
8717 end Proc_Next_Component;
8719 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8721 N := Next_Entity (N);
8722 while Present (N) loop
8723 exit when Ekind (N) = E_Component
8725 Ekind (N) = E_Discriminant;
8726 N := Next_Entity (N);
8728 end Proc_Next_Component_Or_Discriminant;
8730 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8732 N := Next_Discriminant (N);
8733 end Proc_Next_Discriminant;
8735 procedure Proc_Next_Formal (N : in out Node_Id) is
8737 N := Next_Formal (N);
8738 end Proc_Next_Formal;
8740 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8742 N := Next_Formal_With_Extras (N);
8743 end Proc_Next_Formal_With_Extras;
8745 procedure Proc_Next_Index (N : in out Node_Id) is
8747 N := Next_Index (N);
8748 end Proc_Next_Index;
8750 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8752 N := Next_Inlined_Subprogram (N);
8753 end Proc_Next_Inlined_Subprogram;
8755 procedure Proc_Next_Literal (N : in out Node_Id) is
8757 N := Next_Literal (N);
8758 end Proc_Next_Literal;
8760 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8762 N := Next_Stored_Discriminant (N);
8763 end Proc_Next_Stored_Discriminant;