1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2007, 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 Sinfo; use Sinfo;
40 with Stand; use Stand;
41 with Output; use Output;
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
73 -- Obsolescent_Warning Node24
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Return_Applies_To Node8
85 -- Class_Wide_Type Node9
86 -- Current_Value Node9
89 -- Discriminal_Link Node10
90 -- Handler_Records List10
91 -- Normalized_Position_Max Uint10
92 -- Referenced_Object Node10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Primitive_Operations Elist15
126 -- Related_Instance Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
130 -- Shared_Var_Read_Proc Node15
132 -- Access_Disp_Table Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
163 -- Body_Entity Node19
164 -- Corresponding_Discriminant Node19
165 -- Finalization_Chain_Entity Node19
166 -- Parent_Subtype Node19
167 -- Related_Array_Object Node19
168 -- Size_Check_Code Node19
169 -- Spec_Entity Node19
170 -- Underlying_Full_View Node19
172 -- Component_Type Node20
173 -- Default_Value Node20
174 -- Directly_Designated_Type Node20
175 -- Discriminant_Checking_Func Node20
176 -- Discriminant_Default_Value Node20
177 -- Last_Entity Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Interface_Name Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Exception_Code Uint22
193 -- Original_Record_Component Node22
194 -- Private_View Node22
195 -- Protected_Formal Node22
196 -- Scope_Depth_Value Uint22
197 -- Shared_Var_Assign_Proc Node22
199 -- Associated_Final_Chain Node23
200 -- CR_Discriminant Node23
201 -- Stored_Constraint Elist23
202 -- Entry_Cancel_Parameter Node23
203 -- Extra_Constrained Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Enum_Pos_To_Rep Node23
207 -- Packed_Array_Type Node23
208 -- Limited_View Node23
209 -- Privals_Chain Elist23
210 -- Protected_Operation Node23
212 -- Abstract_Interface_Alias Node25
213 -- Abstract_Interfaces Elist25
214 -- Current_Use_Clause Node25
215 -- Debug_Renaming_Link Node25
216 -- DT_Offset_To_Top_Func Node25
217 -- Task_Body_Procedure Node25
219 -- Dispatch_Table_Wrapper Node26
220 -- Last_Assignment Node26
221 -- Overridden_Operation Node26
222 -- Package_Instantiation Node26
223 -- Related_Interface Node26
224 -- Static_Initialization Node26
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 -- Function_Returns_With_DSP 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
494 -----------------------
495 -- Local subprograms --
496 -----------------------
498 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
499 -- Returns the attribute definition clause whose name is Rep_Name. Returns
500 -- Empty if not found.
506 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
510 Ritem := First_Rep_Item (Id);
511 while Present (Ritem) loop
512 if Nkind (Ritem) = N_Attribute_Definition_Clause
513 and then Chars (Ritem) = Rep_Name
517 Ritem := Next_Rep_Item (Ritem);
524 --------------------------------
525 -- Attribute Access Functions --
526 --------------------------------
528 function Abstract_Interfaces (Id : E) return L is
530 pragma Assert (Is_Record_Type (Id));
532 end Abstract_Interfaces;
534 function Abstract_Interface_Alias (Id : E) return E is
536 pragma Assert (Is_Subprogram (Id));
538 end Abstract_Interface_Alias;
540 function Accept_Address (Id : E) return L is
545 function Access_Disp_Table (Id : E) return L is
547 pragma Assert (Is_Tagged_Type (Id));
548 return Elist16 (Implementation_Base_Type (Id));
549 end Access_Disp_Table;
551 function Actual_Subtype (Id : E) return E is
554 (Ekind (Id) = E_Constant
555 or else Ekind (Id) = E_Variable
556 or else Ekind (Id) = E_Generic_In_Out_Parameter
557 or else Is_Formal (Id));
561 function Address_Taken (Id : E) return B is
566 function Alias (Id : E) return E is
569 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
573 function Alignment (Id : E) return U is
575 pragma Assert (Is_Type (Id)
576 or else Is_Formal (Id)
577 or else Ekind (Id) = E_Loop_Parameter
578 or else Ekind (Id) = E_Constant
579 or else Ekind (Id) = E_Exception
580 or else Ekind (Id) = E_Variable);
584 function Associated_Final_Chain (Id : E) return E is
586 pragma Assert (Is_Access_Type (Id));
588 end Associated_Final_Chain;
590 function Associated_Formal_Package (Id : E) return E is
592 pragma Assert (Ekind (Id) = E_Package);
594 end Associated_Formal_Package;
596 function Associated_Node_For_Itype (Id : E) return N is
599 end Associated_Node_For_Itype;
601 function Associated_Storage_Pool (Id : E) return E is
603 pragma Assert (Is_Access_Type (Id));
604 return Node22 (Root_Type (Id));
605 end Associated_Storage_Pool;
607 function Barrier_Function (Id : E) return N is
609 pragma Assert (Is_Entry (Id));
611 end Barrier_Function;
613 function Block_Node (Id : E) return N is
615 pragma Assert (Ekind (Id) = E_Block);
619 function Body_Entity (Id : E) return E is
622 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
626 function Body_Needed_For_SAL (Id : E) return B is
629 (Ekind (Id) = E_Package
630 or else Is_Subprogram (Id)
631 or else Is_Generic_Unit (Id));
633 end Body_Needed_For_SAL;
635 function C_Pass_By_Copy (Id : E) return B is
637 pragma Assert (Is_Record_Type (Id));
638 return Flag125 (Implementation_Base_Type (Id));
641 function Can_Never_Be_Null (Id : E) return B is
644 end Can_Never_Be_Null;
646 function Checks_May_Be_Suppressed (Id : E) return B is
649 end Checks_May_Be_Suppressed;
651 function Class_Wide_Type (Id : E) return E is
653 pragma Assert (Is_Type (Id));
657 function Cloned_Subtype (Id : E) return E is
660 (Ekind (Id) = E_Record_Subtype
661 or else Ekind (Id) = E_Class_Wide_Subtype);
665 function Component_Bit_Offset (Id : E) return U is
668 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
670 end Component_Bit_Offset;
672 function Component_Clause (Id : E) return N is
675 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
677 end Component_Clause;
679 function Component_Size (Id : E) return U is
681 pragma Assert (Is_Array_Type (Id));
682 return Uint22 (Implementation_Base_Type (Id));
685 function Component_Type (Id : E) return E is
687 return Node20 (Implementation_Base_Type (Id));
690 function Corresponding_Concurrent_Type (Id : E) return E is
692 pragma Assert (Ekind (Id) = E_Record_Type);
694 end Corresponding_Concurrent_Type;
696 function Corresponding_Discriminant (Id : E) return E is
698 pragma Assert (Ekind (Id) = E_Discriminant);
700 end Corresponding_Discriminant;
702 function Corresponding_Equality (Id : E) return E is
705 (Ekind (Id) = E_Function
706 and then not Comes_From_Source (Id)
707 and then Chars (Id) = Name_Op_Ne);
709 end Corresponding_Equality;
711 function Corresponding_Record_Type (Id : E) return E is
713 pragma Assert (Is_Concurrent_Type (Id));
715 end Corresponding_Record_Type;
717 function Corresponding_Remote_Type (Id : E) return E is
720 end Corresponding_Remote_Type;
722 function Current_Use_Clause (Id : E) return E is
724 pragma Assert (Ekind (Id) = E_Package);
726 end Current_Use_Clause;
728 function Current_Value (Id : E) return N is
730 pragma Assert (Ekind (Id) in Object_Kind);
734 function CR_Discriminant (Id : E) return E is
739 function Debug_Info_Off (Id : E) return B is
744 function Debug_Renaming_Link (Id : E) return E is
747 end Debug_Renaming_Link;
749 function Default_Expr_Function (Id : E) return E is
751 pragma Assert (Is_Formal (Id));
753 end Default_Expr_Function;
755 function Default_Expressions_Processed (Id : E) return B is
758 end Default_Expressions_Processed;
760 function Default_Value (Id : E) return N is
762 pragma Assert (Is_Formal (Id));
766 function Delay_Cleanups (Id : E) return B is
771 function Delay_Subprogram_Descriptors (Id : E) return B is
774 end Delay_Subprogram_Descriptors;
776 function Delta_Value (Id : E) return R is
778 pragma Assert (Is_Fixed_Point_Type (Id));
782 function Dependent_Instances (Id : E) return L is
784 pragma Assert (Is_Generic_Instance (Id));
786 end Dependent_Instances;
788 function Depends_On_Private (Id : E) return B is
790 pragma Assert (Nkind (Id) in N_Entity);
792 end Depends_On_Private;
794 function Digits_Value (Id : E) return U is
797 (Is_Floating_Point_Type (Id)
798 or else Is_Decimal_Fixed_Point_Type (Id));
802 function Directly_Designated_Type (Id : E) return E is
805 end Directly_Designated_Type;
807 function Discard_Names (Id : E) return B is
812 function Discriminal (Id : E) return E is
814 pragma Assert (Ekind (Id) = E_Discriminant);
818 function Discriminal_Link (Id : E) return N is
821 end Discriminal_Link;
823 function Discriminant_Checking_Func (Id : E) return E is
825 pragma Assert (Ekind (Id) = E_Component);
827 end Discriminant_Checking_Func;
829 function Discriminant_Constraint (Id : E) return L is
831 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
833 end Discriminant_Constraint;
835 function Discriminant_Default_Value (Id : E) return N is
837 pragma Assert (Ekind (Id) = E_Discriminant);
839 end Discriminant_Default_Value;
841 function Discriminant_Number (Id : E) return U is
843 pragma Assert (Ekind (Id) = E_Discriminant);
845 end Discriminant_Number;
847 function Dispatch_Table_Wrapper (Id : E) return E is
849 pragma Assert (Is_Tagged_Type (Id));
850 return Node26 (Implementation_Base_Type (Id));
851 end Dispatch_Table_Wrapper;
853 function DT_Entry_Count (Id : E) return U is
855 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
859 function DT_Offset_To_Top_Func (Id : E) return E is
861 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
863 end DT_Offset_To_Top_Func;
865 function DT_Position (Id : E) return U is
868 ((Ekind (Id) = E_Function
869 or else Ekind (Id) = E_Procedure)
870 and then Present (DTC_Entity (Id)));
874 function DTC_Entity (Id : E) return E is
877 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
881 function Elaborate_Body_Desirable (Id : E) return B is
883 pragma Assert (Ekind (Id) = E_Package);
885 end Elaborate_Body_Desirable;
887 function Elaboration_Entity (Id : E) return E is
892 Ekind (Id) = E_Package
894 Is_Generic_Unit (Id));
896 end Elaboration_Entity;
898 function Elaboration_Entity_Required (Id : E) return B is
903 Ekind (Id) = E_Package
905 Is_Generic_Unit (Id));
907 end Elaboration_Entity_Required;
909 function Enclosing_Scope (Id : E) return E is
914 function Entry_Accepted (Id : E) return B is
916 pragma Assert (Is_Entry (Id));
920 function Entry_Bodies_Array (Id : E) return E is
923 end Entry_Bodies_Array;
925 function Entry_Cancel_Parameter (Id : E) return E is
928 end Entry_Cancel_Parameter;
930 function Entry_Component (Id : E) return E is
935 function Entry_Formal (Id : E) return E is
940 function Entry_Index_Constant (Id : E) return N is
942 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
944 end Entry_Index_Constant;
946 function Entry_Parameters_Type (Id : E) return E is
949 end Entry_Parameters_Type;
951 function Enum_Pos_To_Rep (Id : E) return E is
953 pragma Assert (Ekind (Id) = E_Enumeration_Type);
957 function Enumeration_Pos (Id : E) return Uint is
959 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
963 function Enumeration_Rep (Id : E) return U is
965 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
969 function Enumeration_Rep_Expr (Id : E) return N is
971 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
973 end Enumeration_Rep_Expr;
975 function Equivalent_Type (Id : E) return E is
978 (Ekind (Id) = E_Class_Wide_Subtype or else
979 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
980 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
981 Ekind (Id) = E_Access_Subprogram_Type or else
982 Ekind (Id) = E_Exception_Type);
986 function Esize (Id : E) return Uint is
991 function Exception_Code (Id : E) return Uint is
993 pragma Assert (Ekind (Id) = E_Exception);
997 function Extra_Accessibility (Id : E) return E is
999 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1001 end Extra_Accessibility;
1003 function Extra_Constrained (Id : E) return E is
1005 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1007 end Extra_Constrained;
1009 function Extra_Formal (Id : E) return E is
1014 function Extra_Formals (Id : E) return E is
1017 (Is_Overloadable (Id)
1018 or else Ekind (Id) = E_Entry_Family
1019 or else Ekind (Id) = E_Subprogram_Body
1020 or else Ekind (Id) = E_Subprogram_Type);
1024 function Finalization_Chain_Entity (Id : E) return E is
1027 end Finalization_Chain_Entity;
1029 function Finalize_Storage_Only (Id : E) return B is
1031 pragma Assert (Is_Type (Id));
1032 return Flag158 (Base_Type (Id));
1033 end Finalize_Storage_Only;
1035 function First_Entity (Id : E) return E is
1040 function First_Index (Id : E) return N is
1042 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1046 function First_Literal (Id : E) return E is
1048 pragma Assert (Is_Enumeration_Type (Id));
1052 function First_Optional_Parameter (Id : E) return E is
1055 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1057 end First_Optional_Parameter;
1059 function First_Private_Entity (Id : E) return E is
1061 pragma Assert (Ekind (Id) = E_Package
1062 or else Ekind (Id) = E_Generic_Package
1063 or else Ekind (Id) in Concurrent_Kind);
1065 end First_Private_Entity;
1067 function First_Rep_Item (Id : E) return E is
1072 function Freeze_Node (Id : E) return N is
1077 function From_With_Type (Id : E) return B is
1079 return Flag159 (Id);
1082 function Full_View (Id : E) return E is
1084 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1088 function Function_Returns_With_DSP (Id : E) return B is
1091 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1092 return Flag169 (Id);
1093 end Function_Returns_With_DSP;
1095 function Generic_Homonym (Id : E) return E is
1097 pragma Assert (Ekind (Id) = E_Generic_Package);
1099 end Generic_Homonym;
1101 function Generic_Renamings (Id : E) return L is
1103 return Elist23 (Id);
1104 end Generic_Renamings;
1106 function Handler_Records (Id : E) return S is
1109 end Handler_Records;
1111 function Has_Aliased_Components (Id : E) return B is
1113 return Flag135 (Implementation_Base_Type (Id));
1114 end Has_Aliased_Components;
1116 function Has_Alignment_Clause (Id : E) return B is
1119 end Has_Alignment_Clause;
1121 function Has_All_Calls_Remote (Id : E) return B is
1124 end Has_All_Calls_Remote;
1126 function Has_Anon_Block_Suffix (Id : E) return B is
1128 return Flag201 (Id);
1129 end Has_Anon_Block_Suffix;
1131 function Has_Atomic_Components (Id : E) return B is
1133 return Flag86 (Implementation_Base_Type (Id));
1134 end Has_Atomic_Components;
1136 function Has_Biased_Representation (Id : E) return B is
1138 return Flag139 (Id);
1139 end Has_Biased_Representation;
1141 function Has_Completion (Id : E) return B is
1146 function Has_Completion_In_Body (Id : E) return B is
1148 pragma Assert (Is_Type (Id));
1150 end Has_Completion_In_Body;
1152 function Has_Complex_Representation (Id : E) return B is
1154 pragma Assert (Is_Type (Id));
1155 return Flag140 (Implementation_Base_Type (Id));
1156 end Has_Complex_Representation;
1158 function Has_Component_Size_Clause (Id : E) return B is
1160 pragma Assert (Is_Array_Type (Id));
1161 return Flag68 (Implementation_Base_Type (Id));
1162 end Has_Component_Size_Clause;
1164 function Has_Constrained_Partial_View (Id : E) return B is
1166 pragma Assert (Is_Type (Id));
1167 return Flag187 (Id);
1168 end Has_Constrained_Partial_View;
1170 function Has_Controlled_Component (Id : E) return B is
1172 return Flag43 (Base_Type (Id));
1173 end Has_Controlled_Component;
1175 function Has_Contiguous_Rep (Id : E) return B is
1177 return Flag181 (Id);
1178 end Has_Contiguous_Rep;
1180 function Has_Controlling_Result (Id : E) return B is
1183 end Has_Controlling_Result;
1185 function Has_Convention_Pragma (Id : E) return B is
1187 return Flag119 (Id);
1188 end Has_Convention_Pragma;
1190 function Has_Delayed_Freeze (Id : E) return B is
1192 pragma Assert (Nkind (Id) in N_Entity);
1194 end Has_Delayed_Freeze;
1196 function Has_Discriminants (Id : E) return B is
1198 pragma Assert (Nkind (Id) in N_Entity);
1200 end Has_Discriminants;
1202 function Has_Dispatch_Table (Id : E) return B is
1204 pragma Assert (Is_Tagged_Type (Id));
1205 return Flag220 (Id);
1206 end Has_Dispatch_Table;
1208 function Has_Enumeration_Rep_Clause (Id : E) return B is
1210 pragma Assert (Is_Enumeration_Type (Id));
1212 end Has_Enumeration_Rep_Clause;
1214 function Has_Exit (Id : E) return B is
1219 function Has_External_Tag_Rep_Clause (Id : E) return B is
1221 pragma Assert (Is_Tagged_Type (Id));
1222 return Flag110 (Id);
1223 end Has_External_Tag_Rep_Clause;
1225 function Has_Forward_Instantiation (Id : E) return B is
1227 return Flag175 (Id);
1228 end Has_Forward_Instantiation;
1230 function Has_Fully_Qualified_Name (Id : E) return B is
1232 return Flag173 (Id);
1233 end Has_Fully_Qualified_Name;
1235 function Has_Gigi_Rep_Item (Id : E) return B is
1238 end Has_Gigi_Rep_Item;
1240 function Has_Homonym (Id : E) return B is
1245 function Has_Initial_Value (Id : E) return B is
1248 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1249 return Flag219 (Id);
1250 end Has_Initial_Value;
1252 function Has_Machine_Radix_Clause (Id : E) return B is
1254 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1256 end Has_Machine_Radix_Clause;
1258 function Has_Master_Entity (Id : E) return B is
1261 end Has_Master_Entity;
1263 function Has_Missing_Return (Id : E) return B is
1266 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1267 return Flag142 (Id);
1268 end Has_Missing_Return;
1270 function Has_Nested_Block_With_Handler (Id : E) return B is
1272 return Flag101 (Id);
1273 end Has_Nested_Block_With_Handler;
1275 function Has_Non_Standard_Rep (Id : E) return B is
1277 return Flag75 (Implementation_Base_Type (Id));
1278 end Has_Non_Standard_Rep;
1280 function Has_Object_Size_Clause (Id : E) return B is
1282 pragma Assert (Is_Type (Id));
1283 return Flag172 (Id);
1284 end Has_Object_Size_Clause;
1286 function Has_Per_Object_Constraint (Id : E) return B is
1288 return Flag154 (Id);
1289 end Has_Per_Object_Constraint;
1291 function Has_Persistent_BSS (Id : E) return B is
1293 return Flag188 (Id);
1294 end Has_Persistent_BSS;
1296 function Has_Pragma_Controlled (Id : E) return B is
1298 pragma Assert (Is_Access_Type (Id));
1299 return Flag27 (Implementation_Base_Type (Id));
1300 end Has_Pragma_Controlled;
1302 function Has_Pragma_Elaborate_Body (Id : E) return B is
1304 return Flag150 (Id);
1305 end Has_Pragma_Elaborate_Body;
1307 function Has_Pragma_Inline (Id : E) return B is
1309 return Flag157 (Id);
1310 end Has_Pragma_Inline;
1312 function Has_Pragma_Pack (Id : E) return B is
1314 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1315 return Flag121 (Implementation_Base_Type (Id));
1316 end Has_Pragma_Pack;
1318 function Has_Pragma_Preelab_Init (Id : E) return B is
1320 return Flag221 (Id);
1321 end Has_Pragma_Preelab_Init;
1323 function Has_Pragma_Pure (Id : E) return B is
1325 return Flag203 (Id);
1326 end Has_Pragma_Pure;
1328 function Has_Pragma_Pure_Function (Id : E) return B is
1330 return Flag179 (Id);
1331 end Has_Pragma_Pure_Function;
1333 function Has_Pragma_Unreferenced (Id : E) return B is
1335 return Flag180 (Id);
1336 end Has_Pragma_Unreferenced;
1338 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1340 pragma Assert (Is_Type (Id));
1341 return Flag212 (Id);
1342 end Has_Pragma_Unreferenced_Objects;
1344 function Has_Primitive_Operations (Id : E) return B is
1346 pragma Assert (Is_Type (Id));
1347 return Flag120 (Base_Type (Id));
1348 end Has_Primitive_Operations;
1350 function Has_Private_Declaration (Id : E) return B is
1352 return Flag155 (Id);
1353 end Has_Private_Declaration;
1355 function Has_Qualified_Name (Id : E) return B is
1357 return Flag161 (Id);
1358 end Has_Qualified_Name;
1360 function Has_RACW (Id : E) return B is
1362 pragma Assert (Ekind (Id) = E_Package);
1363 return Flag214 (Id);
1366 function Has_Record_Rep_Clause (Id : E) return B is
1368 pragma Assert (Is_Record_Type (Id));
1369 return Flag65 (Implementation_Base_Type (Id));
1370 end Has_Record_Rep_Clause;
1372 function Has_Recursive_Call (Id : E) return B is
1374 pragma Assert (Is_Subprogram (Id));
1375 return Flag143 (Id);
1376 end Has_Recursive_Call;
1378 function Has_Size_Clause (Id : E) return B is
1381 end Has_Size_Clause;
1383 function Has_Small_Clause (Id : E) return B is
1386 end Has_Small_Clause;
1388 function Has_Specified_Layout (Id : E) return B is
1390 pragma Assert (Is_Type (Id));
1391 return Flag100 (Implementation_Base_Type (Id));
1392 end Has_Specified_Layout;
1394 function Has_Specified_Stream_Input (Id : E) return B is
1396 pragma Assert (Is_Type (Id));
1397 return Flag190 (Id);
1398 end Has_Specified_Stream_Input;
1400 function Has_Specified_Stream_Output (Id : E) return B is
1402 pragma Assert (Is_Type (Id));
1403 return Flag191 (Id);
1404 end Has_Specified_Stream_Output;
1406 function Has_Specified_Stream_Read (Id : E) return B is
1408 pragma Assert (Is_Type (Id));
1409 return Flag192 (Id);
1410 end Has_Specified_Stream_Read;
1412 function Has_Specified_Stream_Write (Id : E) return B is
1414 pragma Assert (Is_Type (Id));
1415 return Flag193 (Id);
1416 end Has_Specified_Stream_Write;
1418 function Has_Static_Discriminants (Id : E) return B is
1420 pragma Assert (Is_Type (Id));
1421 return Flag211 (Id);
1422 end Has_Static_Discriminants;
1424 function Has_Storage_Size_Clause (Id : E) return B is
1426 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1427 return Flag23 (Implementation_Base_Type (Id));
1428 end Has_Storage_Size_Clause;
1430 function Has_Stream_Size_Clause (Id : E) return B is
1432 return Flag184 (Id);
1433 end Has_Stream_Size_Clause;
1435 function Has_Subprogram_Descriptor (Id : E) return B is
1438 end Has_Subprogram_Descriptor;
1440 function Has_Task (Id : E) return B is
1442 return Flag30 (Base_Type (Id));
1445 function Has_Unchecked_Union (Id : E) return B is
1447 return Flag123 (Base_Type (Id));
1448 end Has_Unchecked_Union;
1450 function Has_Unknown_Discriminants (Id : E) return B is
1452 pragma Assert (Is_Type (Id));
1454 end Has_Unknown_Discriminants;
1456 function Has_Up_Level_Access (Id : E) return B is
1459 (Ekind (Id) = E_Variable
1460 or else Ekind (Id) = E_Constant
1461 or else Ekind (Id) = E_Loop_Parameter);
1462 return Flag215 (Id);
1463 end Has_Up_Level_Access;
1465 function Has_Volatile_Components (Id : E) return B is
1467 return Flag87 (Implementation_Base_Type (Id));
1468 end Has_Volatile_Components;
1470 function Has_Xref_Entry (Id : E) return B is
1472 return Flag182 (Implementation_Base_Type (Id));
1475 function Hiding_Loop_Variable (Id : E) return E is
1477 pragma Assert (Ekind (Id) = E_Variable);
1479 end Hiding_Loop_Variable;
1481 function Homonym (Id : E) return E is
1486 function In_Package_Body (Id : E) return B is
1489 end In_Package_Body;
1491 function In_Private_Part (Id : E) return B is
1494 end In_Private_Part;
1496 function In_Use (Id : E) return B is
1498 pragma Assert (Nkind (Id) in N_Entity);
1502 function Inner_Instances (Id : E) return L is
1504 return Elist23 (Id);
1505 end Inner_Instances;
1507 function Interface_Name (Id : E) return N is
1512 function Is_Abstract_Subprogram (Id : E) return B is
1514 pragma Assert (Is_Overloadable (Id));
1516 end Is_Abstract_Subprogram;
1518 function Is_Abstract_Type (Id : E) return B is
1520 pragma Assert (Is_Type (Id));
1521 return Flag146 (Id);
1522 end Is_Abstract_Type;
1524 function Is_Local_Anonymous_Access (Id : E) return B is
1526 pragma Assert (Is_Access_Type (Id));
1527 return Flag194 (Id);
1528 end Is_Local_Anonymous_Access;
1530 function Is_Access_Constant (Id : E) return B is
1532 pragma Assert (Is_Access_Type (Id));
1534 end Is_Access_Constant;
1536 function Is_Ada_2005_Only (Id : E) return B is
1538 return Flag185 (Id);
1539 end Is_Ada_2005_Only;
1541 function Is_Aliased (Id : E) return B is
1543 pragma Assert (Nkind (Id) in N_Entity);
1547 function Is_AST_Entry (Id : E) return B is
1549 pragma Assert (Is_Entry (Id));
1550 return Flag132 (Id);
1553 function Is_Asynchronous (Id : E) return B is
1556 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1558 end Is_Asynchronous;
1560 function Is_Atomic (Id : E) return B is
1565 function Is_Bit_Packed_Array (Id : E) return B is
1567 return Flag122 (Implementation_Base_Type (Id));
1568 end Is_Bit_Packed_Array;
1570 function Is_Called (Id : E) return B is
1573 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1574 return Flag102 (Id);
1577 function Is_Character_Type (Id : E) return B is
1580 end Is_Character_Type;
1582 function Is_Child_Unit (Id : E) return B is
1587 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1590 end Is_Class_Wide_Equivalent_Type;
1592 function Is_Compilation_Unit (Id : E) return B is
1594 return Flag149 (Id);
1595 end Is_Compilation_Unit;
1597 function Is_Completely_Hidden (Id : E) return B is
1599 pragma Assert (Ekind (Id) = E_Discriminant);
1600 return Flag103 (Id);
1601 end Is_Completely_Hidden;
1603 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1606 end Is_Constr_Subt_For_U_Nominal;
1608 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1610 return Flag141 (Id);
1611 end Is_Constr_Subt_For_UN_Aliased;
1613 function Is_Constrained (Id : E) return B is
1615 pragma Assert (Nkind (Id) in N_Entity);
1619 function Is_Constructor (Id : E) return B is
1624 function Is_Controlled (Id : E) return B is
1626 return Flag42 (Base_Type (Id));
1629 function Is_Controlling_Formal (Id : E) return B is
1631 pragma Assert (Is_Formal (Id));
1633 end Is_Controlling_Formal;
1635 function Is_CPP_Class (Id : E) return B is
1640 function Is_Discrim_SO_Function (Id : E) return B is
1642 return Flag176 (Id);
1643 end Is_Discrim_SO_Function;
1645 function Is_Descendent_Of_Address (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag223 (Id);
1649 end Is_Descendent_Of_Address;
1651 function Is_Dispatching_Operation (Id : E) return B is
1653 pragma Assert (Nkind (Id) in N_Entity);
1655 end Is_Dispatching_Operation;
1657 function Is_Eliminated (Id : E) return B is
1659 return Flag124 (Id);
1662 function Is_Entry_Formal (Id : E) return B is
1665 end Is_Entry_Formal;
1667 function Is_Exported (Id : E) return B is
1672 function Is_First_Subtype (Id : E) return B is
1675 end Is_First_Subtype;
1677 function Is_For_Access_Subtype (Id : E) return B is
1680 (Ekind (Id) = E_Record_Subtype
1682 Ekind (Id) = E_Private_Subtype);
1683 return Flag118 (Id);
1684 end Is_For_Access_Subtype;
1686 function Is_Formal_Subprogram (Id : E) return B is
1688 return Flag111 (Id);
1689 end Is_Formal_Subprogram;
1691 function Is_Frozen (Id : E) return B is
1696 function Is_Generic_Actual_Type (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1700 end Is_Generic_Actual_Type;
1702 function Is_Generic_Instance (Id : E) return B is
1704 return Flag130 (Id);
1705 end Is_Generic_Instance;
1707 function Is_Generic_Type (Id : E) return B is
1709 pragma Assert (Nkind (Id) in N_Entity);
1711 end Is_Generic_Type;
1713 function Is_Hidden (Id : E) return B is
1718 function Is_Hidden_Open_Scope (Id : E) return B is
1720 return Flag171 (Id);
1721 end Is_Hidden_Open_Scope;
1723 function Is_Immediately_Visible (Id : E) return B is
1725 pragma Assert (Nkind (Id) in N_Entity);
1727 end Is_Immediately_Visible;
1729 function Is_Imported (Id : E) return B is
1734 function Is_Inlined (Id : E) return B is
1739 function Is_Interface (Id : E) return B is
1741 return Flag186 (Id);
1744 function Is_Instantiated (Id : E) return B is
1746 return Flag126 (Id);
1747 end Is_Instantiated;
1749 function Is_Internal (Id : E) return B is
1751 pragma Assert (Nkind (Id) in N_Entity);
1755 function Is_Interrupt_Handler (Id : E) return B is
1757 pragma Assert (Nkind (Id) in N_Entity);
1759 end Is_Interrupt_Handler;
1761 function Is_Intrinsic_Subprogram (Id : E) return B is
1764 end Is_Intrinsic_Subprogram;
1766 function Is_Itype (Id : E) return B is
1771 function Is_Known_Non_Null (Id : E) return B is
1774 end Is_Known_Non_Null;
1776 function Is_Known_Null (Id : E) return B is
1778 return Flag204 (Id);
1781 function Is_Known_Valid (Id : E) return B is
1783 return Flag170 (Id);
1786 function Is_Limited_Composite (Id : E) return B is
1788 return Flag106 (Id);
1789 end Is_Limited_Composite;
1791 function Is_Limited_Interface (Id : E) return B is
1793 return Flag197 (Id);
1794 end Is_Limited_Interface;
1796 function Is_Limited_Record (Id : E) return B is
1799 end Is_Limited_Record;
1801 function Is_Machine_Code_Subprogram (Id : E) return B is
1803 pragma Assert (Is_Subprogram (Id));
1804 return Flag137 (Id);
1805 end Is_Machine_Code_Subprogram;
1807 function Is_Non_Static_Subtype (Id : E) return B is
1809 pragma Assert (Is_Type (Id));
1810 return Flag109 (Id);
1811 end Is_Non_Static_Subtype;
1813 function Is_Null_Init_Proc (Id : E) return B is
1815 pragma Assert (Ekind (Id) = E_Procedure);
1816 return Flag178 (Id);
1817 end Is_Null_Init_Proc;
1819 function Is_Obsolescent (Id : E) return B is
1821 return Flag153 (Id);
1824 function Is_Optional_Parameter (Id : E) return B is
1826 pragma Assert (Is_Formal (Id));
1827 return Flag134 (Id);
1828 end Is_Optional_Parameter;
1830 function Is_Overriding_Operation (Id : E) return B is
1832 pragma Assert (Is_Subprogram (Id));
1834 end Is_Overriding_Operation;
1836 function Is_Package_Body_Entity (Id : E) return B is
1838 return Flag160 (Id);
1839 end Is_Package_Body_Entity;
1841 function Is_Packed (Id : E) return B is
1843 return Flag51 (Implementation_Base_Type (Id));
1846 function Is_Packed_Array_Type (Id : E) return B is
1848 return Flag138 (Id);
1849 end Is_Packed_Array_Type;
1851 function Is_Potentially_Use_Visible (Id : E) return B is
1853 pragma Assert (Nkind (Id) in N_Entity);
1855 end Is_Potentially_Use_Visible;
1857 function Is_Preelaborated (Id : E) return B is
1860 end Is_Preelaborated;
1862 function Is_Primitive (Id : E) return B is
1865 (Is_Overloadable (Id)
1866 or else Ekind (Id) = E_Generic_Function
1867 or else Ekind (Id) = E_Generic_Procedure);
1868 return Flag218 (Id);
1871 function Is_Primitive_Wrapper (Id : E) return B is
1873 pragma Assert (Ekind (Id) = E_Procedure);
1874 return Flag195 (Id);
1875 end Is_Primitive_Wrapper;
1877 function Is_Private_Composite (Id : E) return B is
1879 pragma Assert (Is_Type (Id));
1880 return Flag107 (Id);
1881 end Is_Private_Composite;
1883 function Is_Private_Descendant (Id : E) return B is
1886 end Is_Private_Descendant;
1888 function Is_Protected_Interface (Id : E) return B is
1890 pragma Assert (Is_Interface (Id));
1891 return Flag198 (Id);
1892 end Is_Protected_Interface;
1894 function Is_Public (Id : E) return B is
1896 pragma Assert (Nkind (Id) in N_Entity);
1900 function Is_Pure (Id : E) return B is
1905 function Is_Pure_Unit_Access_Type (Id : E) return B is
1907 pragma Assert (Is_Access_Type (Id));
1908 return Flag189 (Id);
1909 end Is_Pure_Unit_Access_Type;
1911 function Is_Raised (Id : E) return B is
1913 pragma Assert (Ekind (Id) = E_Exception);
1914 return Flag224 (Id);
1917 function Is_Remote_Call_Interface (Id : E) return B is
1920 end Is_Remote_Call_Interface;
1922 function Is_Remote_Types (Id : E) return B is
1925 end Is_Remote_Types;
1927 function Is_Renaming_Of_Object (Id : E) return B is
1929 return Flag112 (Id);
1930 end Is_Renaming_Of_Object;
1932 function Is_Return_Object (Id : E) return B is
1934 return Flag209 (Id);
1935 end Is_Return_Object;
1937 function Is_Shared_Passive (Id : E) return B is
1940 end Is_Shared_Passive;
1942 function Is_Statically_Allocated (Id : E) return B is
1945 end Is_Statically_Allocated;
1947 function Is_Synchronized_Interface (Id : E) return B is
1949 pragma Assert (Is_Interface (Id));
1950 return Flag199 (Id);
1951 end Is_Synchronized_Interface;
1953 function Is_Tag (Id : E) return B is
1955 pragma Assert (Nkind (Id) in N_Entity);
1959 function Is_Tagged_Type (Id : E) return B is
1964 function Is_Task_Interface (Id : E) return B is
1966 pragma Assert (Is_Interface (Id));
1967 return Flag200 (Id);
1968 end Is_Task_Interface;
1970 function Is_Thunk (Id : E) return B is
1972 pragma Assert (Is_Subprogram (Id));
1973 return Flag225 (Id);
1976 function Is_True_Constant (Id : E) return B is
1978 return Flag163 (Id);
1979 end Is_True_Constant;
1981 function Is_Unchecked_Union (Id : E) return B is
1983 return Flag117 (Implementation_Base_Type (Id));
1984 end Is_Unchecked_Union;
1986 function Is_Unsigned_Type (Id : E) return B is
1988 pragma Assert (Is_Type (Id));
1989 return Flag144 (Id);
1990 end Is_Unsigned_Type;
1992 function Is_Valued_Procedure (Id : E) return B is
1994 pragma Assert (Ekind (Id) = E_Procedure);
1995 return Flag127 (Id);
1996 end Is_Valued_Procedure;
1998 function Is_Visible_Child_Unit (Id : E) return B is
2000 pragma Assert (Is_Child_Unit (Id));
2001 return Flag116 (Id);
2002 end Is_Visible_Child_Unit;
2004 function Is_Visible_Formal (Id : E) return B is
2006 return Flag206 (Id);
2007 end Is_Visible_Formal;
2009 function Is_VMS_Exception (Id : E) return B is
2011 return Flag133 (Id);
2012 end Is_VMS_Exception;
2014 function Is_Volatile (Id : E) return B is
2016 pragma Assert (Nkind (Id) in N_Entity);
2018 if Is_Type (Id) then
2019 return Flag16 (Base_Type (Id));
2025 function Itype_Printed (Id : E) return B is
2027 pragma Assert (Is_Itype (Id));
2028 return Flag202 (Id);
2031 function Kill_Elaboration_Checks (Id : E) return B is
2034 end Kill_Elaboration_Checks;
2036 function Kill_Range_Checks (Id : E) return B is
2039 end Kill_Range_Checks;
2041 function Kill_Tag_Checks (Id : E) return B is
2044 end Kill_Tag_Checks;
2046 function Known_To_Have_Preelab_Init (Id : E) return B is
2048 pragma Assert (Is_Type (Id));
2049 return Flag207 (Id);
2050 end Known_To_Have_Preelab_Init;
2052 function Last_Assignment (Id : E) return N is
2054 pragma Assert (Is_Assignable (Id));
2056 end Last_Assignment;
2058 function Last_Entity (Id : E) return E is
2063 function Limited_View (Id : E) return E is
2065 pragma Assert (Ekind (Id) = E_Package);
2069 function Lit_Indexes (Id : E) return E is
2071 pragma Assert (Is_Enumeration_Type (Id));
2075 function Lit_Strings (Id : E) return E is
2077 pragma Assert (Is_Enumeration_Type (Id));
2081 function Low_Bound_Known (Id : E) return B is
2083 return Flag205 (Id);
2084 end Low_Bound_Known;
2086 function Machine_Radix_10 (Id : E) return B is
2088 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2090 end Machine_Radix_10;
2092 function Master_Id (Id : E) return E is
2094 pragma Assert (Is_Access_Type (Id));
2098 function Materialize_Entity (Id : E) return B is
2100 return Flag168 (Id);
2101 end Materialize_Entity;
2103 function Mechanism (Id : E) return M is
2105 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2106 return UI_To_Int (Uint8 (Id));
2109 function Modulus (Id : E) return Uint is
2111 pragma Assert (Is_Modular_Integer_Type (Id));
2112 return Uint17 (Base_Type (Id));
2115 function Must_Be_On_Byte_Boundary (Id : E) return B is
2117 pragma Assert (Is_Type (Id));
2118 return Flag183 (Id);
2119 end Must_Be_On_Byte_Boundary;
2121 function Must_Have_Preelab_Init (Id : E) return B is
2123 pragma Assert (Is_Type (Id));
2124 return Flag208 (Id);
2125 end Must_Have_Preelab_Init;
2127 function Needs_Debug_Info (Id : E) return B is
2129 return Flag147 (Id);
2130 end Needs_Debug_Info;
2132 function Needs_No_Actuals (Id : E) return B is
2135 (Is_Overloadable (Id)
2136 or else Ekind (Id) = E_Subprogram_Type
2137 or else Ekind (Id) = E_Entry_Family);
2139 end Needs_No_Actuals;
2141 function Never_Set_In_Source (Id : E) return B is
2143 return Flag115 (Id);
2144 end Never_Set_In_Source;
2146 function Next_Inlined_Subprogram (Id : E) return E is
2149 end Next_Inlined_Subprogram;
2151 function No_Pool_Assigned (Id : E) return B is
2153 pragma Assert (Is_Access_Type (Id));
2154 return Flag131 (Root_Type (Id));
2155 end No_Pool_Assigned;
2157 function No_Return (Id : E) return B is
2159 return Flag113 (Id);
2162 function No_Strict_Aliasing (Id : E) return B is
2164 pragma Assert (Is_Access_Type (Id));
2165 return Flag136 (Base_Type (Id));
2166 end No_Strict_Aliasing;
2168 function Non_Binary_Modulus (Id : E) return B is
2170 pragma Assert (Is_Modular_Integer_Type (Id));
2171 return Flag58 (Base_Type (Id));
2172 end Non_Binary_Modulus;
2174 function Non_Limited_View (Id : E) return E is
2176 pragma Assert (Ekind (Id) in Incomplete_Kind);
2178 end Non_Limited_View;
2180 function Nonzero_Is_True (Id : E) return B is
2182 pragma Assert (Root_Type (Id) = Standard_Boolean);
2183 return Flag162 (Base_Type (Id));
2184 end Nonzero_Is_True;
2186 function Normalized_First_Bit (Id : E) return U is
2189 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2191 end Normalized_First_Bit;
2193 function Normalized_Position (Id : E) return U is
2196 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2198 end Normalized_Position;
2200 function Normalized_Position_Max (Id : E) return U is
2203 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2205 end Normalized_Position_Max;
2207 function Object_Ref (Id : E) return E is
2209 pragma Assert (Ekind (Id) = E_Protected_Body);
2213 function Obsolescent_Warning (Id : E) return N is
2216 end Obsolescent_Warning;
2218 function Original_Array_Type (Id : E) return E is
2220 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2222 end Original_Array_Type;
2224 function Original_Record_Component (Id : E) return E is
2227 (Ekind (Id) = E_Void
2228 or else Ekind (Id) = E_Component
2229 or else Ekind (Id) = E_Discriminant);
2231 end Original_Record_Component;
2233 function Overridden_Operation (Id : E) return E is
2236 end Overridden_Operation;
2238 function Package_Instantiation (Id : E) return N is
2242 or else Ekind (Id) = E_Generic_Package
2243 or else Ekind (Id) = E_Package);
2245 end Package_Instantiation;
2247 function Packed_Array_Type (Id : E) return E is
2249 pragma Assert (Is_Array_Type (Id));
2251 end Packed_Array_Type;
2253 function Parent_Subtype (Id : E) return E is
2255 pragma Assert (Ekind (Id) = E_Record_Type);
2259 function Primitive_Operations (Id : E) return L is
2261 pragma Assert (Is_Tagged_Type (Id));
2262 return Elist15 (Id);
2263 end Primitive_Operations;
2265 function Prival (Id : E) return E is
2267 pragma Assert (Is_Protected_Private (Id));
2271 function Privals_Chain (Id : E) return L is
2273 pragma Assert (Is_Overloadable (Id)
2274 or else Ekind (Id) = E_Entry_Family);
2275 return Elist23 (Id);
2278 function Private_Dependents (Id : E) return L is
2280 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2281 return Elist18 (Id);
2282 end Private_Dependents;
2284 function Private_View (Id : E) return N is
2286 pragma Assert (Is_Private_Type (Id));
2290 function Protected_Body_Subprogram (Id : E) return E is
2292 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2294 end Protected_Body_Subprogram;
2296 function Protected_Formal (Id : E) return E is
2298 pragma Assert (Is_Formal (Id));
2300 end Protected_Formal;
2302 function Protected_Operation (Id : E) return N is
2304 pragma Assert (Is_Protected_Private (Id));
2306 end Protected_Operation;
2308 function Reachable (Id : E) return B is
2313 function Referenced (Id : E) return B is
2315 return Flag156 (Id);
2318 function Referenced_As_LHS (Id : E) return B is
2321 end Referenced_As_LHS;
2323 function Referenced_Object (Id : E) return N is
2325 pragma Assert (Is_Type (Id));
2327 end Referenced_Object;
2329 function Register_Exception_Call (Id : E) return N is
2331 pragma Assert (Ekind (Id) = E_Exception);
2333 end Register_Exception_Call;
2335 function Related_Array_Object (Id : E) return E is
2337 pragma Assert (Is_Array_Type (Id));
2339 end Related_Array_Object;
2341 function Related_Instance (Id : E) return E is
2344 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2346 end Related_Instance;
2348 function Related_Interface (Id : E) return E is
2351 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
2353 end Related_Interface;
2355 function Renamed_Entity (Id : E) return N is
2360 function Renamed_Object (Id : E) return N is
2365 function Renaming_Map (Id : E) return U is
2370 function Requires_Overriding (Id : E) return B is
2372 pragma Assert (Is_Overloadable (Id));
2373 return Flag213 (Id);
2374 end Requires_Overriding;
2376 function Return_Present (Id : E) return B is
2381 function Return_Applies_To (Id : E) return N is
2384 end Return_Applies_To;
2386 function Returns_By_Ref (Id : E) return B is
2391 function Reverse_Bit_Order (Id : E) return B is
2393 pragma Assert (Is_Record_Type (Id));
2394 return Flag164 (Base_Type (Id));
2395 end Reverse_Bit_Order;
2397 function RM_Size (Id : E) return U is
2399 pragma Assert (Is_Type (Id));
2403 function Scalar_Range (Id : E) return N is
2408 function Scale_Value (Id : E) return U is
2413 function Scope_Depth_Value (Id : E) return U is
2416 end Scope_Depth_Value;
2418 function Sec_Stack_Needed_For_Return (Id : E) return B is
2420 return Flag167 (Id);
2421 end Sec_Stack_Needed_For_Return;
2423 function Shadow_Entities (Id : E) return S is
2426 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2428 end Shadow_Entities;
2430 function Shared_Var_Assign_Proc (Id : E) return E is
2432 pragma Assert (Ekind (Id) = E_Variable);
2434 end Shared_Var_Assign_Proc;
2436 function Shared_Var_Read_Proc (Id : E) return E is
2438 pragma Assert (Ekind (Id) = E_Variable);
2440 end Shared_Var_Read_Proc;
2442 function Size_Check_Code (Id : E) return N is
2444 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2446 end Size_Check_Code;
2448 function Size_Depends_On_Discriminant (Id : E) return B is
2450 return Flag177 (Id);
2451 end Size_Depends_On_Discriminant;
2453 function Size_Known_At_Compile_Time (Id : E) return B is
2456 end Size_Known_At_Compile_Time;
2458 function Small_Value (Id : E) return R is
2460 pragma Assert (Is_Fixed_Point_Type (Id));
2461 return Ureal21 (Id);
2464 function Spec_Entity (Id : E) return E is
2467 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2471 function Storage_Size_Variable (Id : E) return E is
2473 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2474 return Node15 (Implementation_Base_Type (Id));
2475 end Storage_Size_Variable;
2477 function Static_Elaboration_Desired (Id : E) return B is
2479 pragma Assert (Ekind (Id) = E_Package);
2481 end Static_Elaboration_Desired;
2483 function Static_Initialization (Id : E) return N is
2486 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2488 end Static_Initialization;
2490 function Stored_Constraint (Id : E) return L is
2493 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2494 return Elist23 (Id);
2495 end Stored_Constraint;
2497 function Strict_Alignment (Id : E) return B is
2499 return Flag145 (Implementation_Base_Type (Id));
2500 end Strict_Alignment;
2502 function String_Literal_Length (Id : E) return U is
2505 end String_Literal_Length;
2507 function String_Literal_Low_Bound (Id : E) return N is
2510 end String_Literal_Low_Bound;
2512 function Suppress_Elaboration_Warnings (Id : E) return B is
2514 return Flag148 (Id);
2515 end Suppress_Elaboration_Warnings;
2517 function Suppress_Init_Proc (Id : E) return B is
2519 return Flag105 (Base_Type (Id));
2520 end Suppress_Init_Proc;
2522 function Suppress_Style_Checks (Id : E) return B is
2524 return Flag165 (Id);
2525 end Suppress_Style_Checks;
2527 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2529 return Flag217 (Id);
2530 end Suppress_Value_Tracking_On_Call;
2532 function Task_Body_Procedure (Id : E) return N is
2534 pragma Assert (Ekind (Id) in Task_Kind);
2536 end Task_Body_Procedure;
2538 function Treat_As_Volatile (Id : E) return B is
2541 end Treat_As_Volatile;
2543 function Underlying_Full_View (Id : E) return E is
2545 pragma Assert (Ekind (Id) in Private_Kind);
2547 end Underlying_Full_View;
2549 function Universal_Aliasing (Id : E) return B is
2551 pragma Assert (Is_Type (Id));
2552 return Flag216 (Base_Type (Id));
2553 end Universal_Aliasing;
2555 function Unset_Reference (Id : E) return N is
2558 end Unset_Reference;
2560 function Used_As_Generic_Actual (Id : E) return B is
2562 return Flag222 (Id);
2563 end Used_As_Generic_Actual;
2565 function Uses_Sec_Stack (Id : E) return B is
2570 function Vax_Float (Id : E) return B is
2572 return Flag151 (Base_Type (Id));
2575 function Warnings_Off (Id : E) return B is
2580 function Wrapped_Entity (Id : E) return E is
2582 pragma Assert (Ekind (Id) = E_Procedure
2583 and then Is_Primitive_Wrapper (Id));
2587 function Was_Hidden (Id : E) return B is
2589 return Flag196 (Id);
2592 ------------------------------
2593 -- Classification Functions --
2594 ------------------------------
2596 function Is_Access_Type (Id : E) return B is
2598 return Ekind (Id) in Access_Kind;
2601 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2603 return Ekind (Id) in Access_Protected_Kind;
2604 end Is_Access_Protected_Subprogram_Type;
2606 function Is_Array_Type (Id : E) return B is
2608 return Ekind (Id) in Array_Kind;
2611 function Is_Assignable (Id : E) return B is
2613 return Ekind (Id) in Assignable_Kind;
2616 function Is_Class_Wide_Type (Id : E) return B is
2618 return Ekind (Id) in Class_Wide_Kind;
2619 end Is_Class_Wide_Type;
2621 function Is_Composite_Type (Id : E) return B is
2623 return Ekind (Id) in Composite_Kind;
2624 end Is_Composite_Type;
2626 function Is_Concurrent_Body (Id : E) return B is
2628 return Ekind (Id) in
2629 Concurrent_Body_Kind;
2630 end Is_Concurrent_Body;
2632 function Is_Concurrent_Record_Type (Id : E) return B is
2635 end Is_Concurrent_Record_Type;
2637 function Is_Concurrent_Type (Id : E) return B is
2639 return Ekind (Id) in Concurrent_Kind;
2640 end Is_Concurrent_Type;
2642 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2644 return Ekind (Id) in
2645 Decimal_Fixed_Point_Kind;
2646 end Is_Decimal_Fixed_Point_Type;
2648 function Is_Digits_Type (Id : E) return B is
2650 return Ekind (Id) in Digits_Kind;
2653 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2655 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2656 end Is_Discrete_Or_Fixed_Point_Type;
2658 function Is_Discrete_Type (Id : E) return B is
2660 return Ekind (Id) in Discrete_Kind;
2661 end Is_Discrete_Type;
2663 function Is_Elementary_Type (Id : E) return B is
2665 return Ekind (Id) in Elementary_Kind;
2666 end Is_Elementary_Type;
2668 function Is_Entry (Id : E) return B is
2670 return Ekind (Id) in Entry_Kind;
2673 function Is_Enumeration_Type (Id : E) return B is
2675 return Ekind (Id) in
2677 end Is_Enumeration_Type;
2679 function Is_Fixed_Point_Type (Id : E) return B is
2681 return Ekind (Id) in
2683 end Is_Fixed_Point_Type;
2685 function Is_Floating_Point_Type (Id : E) return B is
2687 return Ekind (Id) in Float_Kind;
2688 end Is_Floating_Point_Type;
2690 function Is_Formal (Id : E) return B is
2692 return Ekind (Id) in Formal_Kind;
2695 function Is_Formal_Object (Id : E) return B is
2697 return Ekind (Id) in Formal_Object_Kind;
2698 end Is_Formal_Object;
2700 function Is_Generic_Subprogram (Id : E) return B is
2702 return Ekind (Id) in Generic_Subprogram_Kind;
2703 end Is_Generic_Subprogram;
2705 function Is_Generic_Unit (Id : E) return B is
2707 return Ekind (Id) in Generic_Unit_Kind;
2708 end Is_Generic_Unit;
2710 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2712 return Ekind (Id) in
2713 Incomplete_Or_Private_Kind;
2714 end Is_Incomplete_Or_Private_Type;
2716 function Is_Incomplete_Type (Id : E) return B is
2718 return Ekind (Id) in
2720 end Is_Incomplete_Type;
2722 function Is_Integer_Type (Id : E) return B is
2724 return Ekind (Id) in Integer_Kind;
2725 end Is_Integer_Type;
2727 function Is_Modular_Integer_Type (Id : E) return B is
2729 return Ekind (Id) in
2730 Modular_Integer_Kind;
2731 end Is_Modular_Integer_Type;
2733 function Is_Named_Number (Id : E) return B is
2735 return Ekind (Id) in Named_Kind;
2736 end Is_Named_Number;
2738 function Is_Numeric_Type (Id : E) return B is
2740 return Ekind (Id) in Numeric_Kind;
2741 end Is_Numeric_Type;
2743 function Is_Object (Id : E) return B is
2745 return Ekind (Id) in Object_Kind;
2748 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2750 return Ekind (Id) in
2751 Ordinary_Fixed_Point_Kind;
2752 end Is_Ordinary_Fixed_Point_Type;
2754 function Is_Overloadable (Id : E) return B is
2756 return Ekind (Id) in Overloadable_Kind;
2757 end Is_Overloadable;
2759 function Is_Private_Type (Id : E) return B is
2761 return Ekind (Id) in Private_Kind;
2762 end Is_Private_Type;
2764 function Is_Protected_Type (Id : E) return B is
2766 return Ekind (Id) in Protected_Kind;
2767 end Is_Protected_Type;
2769 function Is_Real_Type (Id : E) return B is
2771 return Ekind (Id) in Real_Kind;
2774 function Is_Record_Type (Id : E) return B is
2776 return Ekind (Id) in Record_Kind;
2779 function Is_Scalar_Type (Id : E) return B is
2781 return Ekind (Id) in Scalar_Kind;
2784 function Is_Signed_Integer_Type (Id : E) return B is
2786 return Ekind (Id) in
2787 Signed_Integer_Kind;
2788 end Is_Signed_Integer_Type;
2790 function Is_Subprogram (Id : E) return B is
2792 return Ekind (Id) in Subprogram_Kind;
2795 function Is_Task_Type (Id : E) return B is
2797 return Ekind (Id) in Task_Kind;
2800 function Is_Type (Id : E) return B is
2802 return Ekind (Id) in Type_Kind;
2805 ------------------------------
2806 -- Attribute Set Procedures --
2807 ------------------------------
2809 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2811 pragma Assert (Is_Record_Type (Id));
2812 Set_Elist25 (Id, V);
2813 end Set_Abstract_Interfaces;
2815 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2820 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function));
2822 end Set_Abstract_Interface_Alias;
2824 procedure Set_Accept_Address (Id : E; V : L) is
2826 Set_Elist21 (Id, V);
2827 end Set_Accept_Address;
2829 procedure Set_Access_Disp_Table (Id : E; V : L) is
2831 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2832 Set_Elist16 (Id, V);
2833 end Set_Access_Disp_Table;
2835 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2837 pragma Assert (Is_Access_Type (Id));
2839 end Set_Associated_Final_Chain;
2841 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2844 end Set_Associated_Formal_Package;
2846 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2849 end Set_Associated_Node_For_Itype;
2851 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2853 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2855 end Set_Associated_Storage_Pool;
2857 procedure Set_Actual_Subtype (Id : E; V : E) is
2860 (Ekind (Id) = E_Constant
2861 or else Ekind (Id) = E_Variable
2862 or else Ekind (Id) = E_Generic_In_Out_Parameter
2863 or else Is_Formal (Id));
2865 end Set_Actual_Subtype;
2867 procedure Set_Address_Taken (Id : E; V : B := True) is
2869 Set_Flag104 (Id, V);
2870 end Set_Address_Taken;
2872 procedure Set_Alias (Id : E; V : E) is
2875 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2879 procedure Set_Alignment (Id : E; V : U) is
2881 pragma Assert (Is_Type (Id)
2882 or else Is_Formal (Id)
2883 or else Ekind (Id) = E_Loop_Parameter
2884 or else Ekind (Id) = E_Constant
2885 or else Ekind (Id) = E_Exception
2886 or else Ekind (Id) = E_Variable);
2890 procedure Set_Barrier_Function (Id : E; V : N) is
2892 pragma Assert (Is_Entry (Id));
2894 end Set_Barrier_Function;
2896 procedure Set_Block_Node (Id : E; V : N) is
2898 pragma Assert (Ekind (Id) = E_Block);
2902 procedure Set_Body_Entity (Id : E; V : E) is
2905 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2907 end Set_Body_Entity;
2909 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
2912 (Ekind (Id) = E_Package
2913 or else Is_Subprogram (Id)
2914 or else Is_Generic_Unit (Id));
2916 end Set_Body_Needed_For_SAL;
2918 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2920 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2921 Set_Flag125 (Id, V);
2922 end Set_C_Pass_By_Copy;
2924 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
2927 end Set_Can_Never_Be_Null;
2929 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
2932 end Set_Checks_May_Be_Suppressed;
2934 procedure Set_Class_Wide_Type (Id : E; V : E) is
2936 pragma Assert (Is_Type (Id));
2938 end Set_Class_Wide_Type;
2940 procedure Set_Cloned_Subtype (Id : E; V : E) is
2943 (Ekind (Id) = E_Record_Subtype
2944 or else Ekind (Id) = E_Class_Wide_Subtype);
2946 end Set_Cloned_Subtype;
2948 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2951 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2953 end Set_Component_Bit_Offset;
2955 procedure Set_Component_Clause (Id : E; V : N) is
2958 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2960 end Set_Component_Clause;
2962 procedure Set_Component_Size (Id : E; V : U) is
2964 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2966 end Set_Component_Size;
2968 procedure Set_Component_Type (Id : E; V : E) is
2970 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2972 end Set_Component_Type;
2974 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2977 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2979 end Set_Corresponding_Concurrent_Type;
2981 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2983 pragma Assert (Ekind (Id) = E_Discriminant);
2985 end Set_Corresponding_Discriminant;
2987 procedure Set_Corresponding_Equality (Id : E; V : E) is
2990 (Ekind (Id) = E_Function
2991 and then not Comes_From_Source (Id)
2992 and then Chars (Id) = Name_Op_Ne);
2994 end Set_Corresponding_Equality;
2996 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2998 pragma Assert (Is_Concurrent_Type (Id));
3000 end Set_Corresponding_Record_Type;
3002 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3005 end Set_Corresponding_Remote_Type;
3007 procedure Set_Current_Use_Clause (Id : E; V : E) is
3009 pragma Assert (Ekind (Id) = E_Package);
3011 end Set_Current_Use_Clause;
3013 procedure Set_Current_Value (Id : E; V : N) is
3015 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3017 end Set_Current_Value;
3019 procedure Set_CR_Discriminant (Id : E; V : E) is
3022 end Set_CR_Discriminant;
3024 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3026 Set_Flag166 (Id, V);
3027 end Set_Debug_Info_Off;
3029 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3032 end Set_Debug_Renaming_Link;
3034 procedure Set_Default_Expr_Function (Id : E; V : E) is
3036 pragma Assert (Is_Formal (Id));
3038 end Set_Default_Expr_Function;
3040 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3042 Set_Flag108 (Id, V);
3043 end Set_Default_Expressions_Processed;
3045 procedure Set_Default_Value (Id : E; V : N) is
3047 pragma Assert (Is_Formal (Id));
3049 end Set_Default_Value;
3051 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3055 or else Is_Task_Type (Id)
3056 or else Ekind (Id) = E_Block);
3057 Set_Flag114 (Id, V);
3058 end Set_Delay_Cleanups;
3060 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3064 or else Ekind (Id) = E_Package
3065 or else Ekind (Id) = E_Package_Body);
3067 end Set_Delay_Subprogram_Descriptors;
3069 procedure Set_Delta_Value (Id : E; V : R) is
3071 pragma Assert (Is_Fixed_Point_Type (Id));
3072 Set_Ureal18 (Id, V);
3073 end Set_Delta_Value;
3075 procedure Set_Dependent_Instances (Id : E; V : L) is
3077 pragma Assert (Is_Generic_Instance (Id));
3079 end Set_Dependent_Instances;
3081 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3083 pragma Assert (Nkind (Id) in N_Entity);
3085 end Set_Depends_On_Private;
3087 procedure Set_Digits_Value (Id : E; V : U) is
3090 (Is_Floating_Point_Type (Id)
3091 or else Is_Decimal_Fixed_Point_Type (Id));
3093 end Set_Digits_Value;
3095 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3098 end Set_Directly_Designated_Type;
3100 procedure Set_Discard_Names (Id : E; V : B := True) is
3103 end Set_Discard_Names;
3105 procedure Set_Discriminal (Id : E; V : E) is
3107 pragma Assert (Ekind (Id) = E_Discriminant);
3109 end Set_Discriminal;
3111 procedure Set_Discriminal_Link (Id : E; V : E) is
3114 end Set_Discriminal_Link;
3116 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3118 pragma Assert (Ekind (Id) = E_Component);
3120 end Set_Discriminant_Checking_Func;
3122 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3124 pragma Assert (Nkind (Id) in N_Entity);
3125 Set_Elist21 (Id, V);
3126 end Set_Discriminant_Constraint;
3128 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3131 end Set_Discriminant_Default_Value;
3133 procedure Set_Discriminant_Number (Id : E; V : U) is
3136 end Set_Discriminant_Number;
3138 procedure Set_Dispatch_Table_Wrapper (Id : E; V : E) is
3140 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3142 end Set_Dispatch_Table_Wrapper;
3144 procedure Set_DT_Entry_Count (Id : E; V : U) is
3146 pragma Assert (Ekind (Id) = E_Component);
3148 end Set_DT_Entry_Count;
3150 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3152 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3154 end Set_DT_Offset_To_Top_Func;
3156 procedure Set_DT_Position (Id : E; V : U) is
3158 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3160 end Set_DT_Position;
3162 procedure Set_DTC_Entity (Id : E; V : E) is
3165 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3169 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3171 pragma Assert (Ekind (Id) = E_Package);
3172 Set_Flag210 (Id, V);
3173 end Set_Elaborate_Body_Desirable;
3175 procedure Set_Elaboration_Entity (Id : E; V : E) is
3180 Ekind (Id) = E_Package
3182 Is_Generic_Unit (Id));
3184 end Set_Elaboration_Entity;
3186 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3191 Ekind (Id) = E_Package
3193 Is_Generic_Unit (Id));
3194 Set_Flag174 (Id, V);
3195 end Set_Elaboration_Entity_Required;
3197 procedure Set_Enclosing_Scope (Id : E; V : E) is
3200 end Set_Enclosing_Scope;
3202 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3204 pragma Assert (Is_Entry (Id));
3205 Set_Flag152 (Id, V);
3206 end Set_Entry_Accepted;
3208 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3211 end Set_Entry_Bodies_Array;
3213 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3216 end Set_Entry_Cancel_Parameter;
3218 procedure Set_Entry_Component (Id : E; V : E) is
3221 end Set_Entry_Component;
3223 procedure Set_Entry_Formal (Id : E; V : E) is
3226 end Set_Entry_Formal;
3228 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3230 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3232 end Set_Entry_Index_Constant;
3234 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3237 end Set_Entry_Parameters_Type;
3239 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3241 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3243 end Set_Enum_Pos_To_Rep;
3245 procedure Set_Enumeration_Pos (Id : E; V : U) is
3247 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3249 end Set_Enumeration_Pos;
3251 procedure Set_Enumeration_Rep (Id : E; V : U) is
3253 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3255 end Set_Enumeration_Rep;
3257 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3259 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3261 end Set_Enumeration_Rep_Expr;
3263 procedure Set_Equivalent_Type (Id : E; V : E) is
3266 (Ekind (Id) = E_Class_Wide_Type or else
3267 Ekind (Id) = E_Class_Wide_Subtype or else
3268 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3269 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
3270 Ekind (Id) = E_Access_Subprogram_Type or else
3271 Ekind (Id) = E_Exception_Type);
3273 end Set_Equivalent_Type;
3275 procedure Set_Esize (Id : E; V : U) is
3280 procedure Set_Exception_Code (Id : E; V : U) is
3282 pragma Assert (Ekind (Id) = E_Exception);
3284 end Set_Exception_Code;
3286 procedure Set_Extra_Accessibility (Id : E; V : E) is
3288 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3290 end Set_Extra_Accessibility;
3292 procedure Set_Extra_Constrained (Id : E; V : E) is
3294 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3296 end Set_Extra_Constrained;
3298 procedure Set_Extra_Formal (Id : E; V : E) is
3301 end Set_Extra_Formal;
3303 procedure Set_Extra_Formals (Id : E; V : E) is
3306 (Is_Overloadable (Id)
3307 or else Ekind (Id) = E_Entry_Family
3308 or else Ekind (Id) = E_Subprogram_Body
3309 or else Ekind (Id) = E_Subprogram_Type);
3311 end Set_Extra_Formals;
3313 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3316 end Set_Finalization_Chain_Entity;
3318 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3320 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3321 Set_Flag158 (Id, V);
3322 end Set_Finalize_Storage_Only;
3324 procedure Set_First_Entity (Id : E; V : E) is
3327 end Set_First_Entity;
3329 procedure Set_First_Index (Id : E; V : N) is
3331 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3333 end Set_First_Index;
3335 procedure Set_First_Literal (Id : E; V : E) is
3337 pragma Assert (Is_Enumeration_Type (Id));
3339 end Set_First_Literal;
3341 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3344 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3346 end Set_First_Optional_Parameter;
3348 procedure Set_First_Private_Entity (Id : E; V : E) is
3350 pragma Assert (Ekind (Id) = E_Package
3351 or else Ekind (Id) = E_Generic_Package
3352 or else Ekind (Id) in Concurrent_Kind);
3354 end Set_First_Private_Entity;
3356 procedure Set_First_Rep_Item (Id : E; V : N) is
3359 end Set_First_Rep_Item;
3361 procedure Set_Freeze_Node (Id : E; V : N) is
3364 end Set_Freeze_Node;
3366 procedure Set_From_With_Type (Id : E; V : B := True) is
3370 or else Ekind (Id) = E_Package);
3371 Set_Flag159 (Id, V);
3372 end Set_From_With_Type;
3374 procedure Set_Full_View (Id : E; V : E) is
3376 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3380 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3383 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3384 Set_Flag169 (Id, V);
3385 end Set_Function_Returns_With_DSP;
3387 procedure Set_Generic_Homonym (Id : E; V : E) is
3390 end Set_Generic_Homonym;
3392 procedure Set_Generic_Renamings (Id : E; V : L) is
3394 Set_Elist23 (Id, V);
3395 end Set_Generic_Renamings;
3397 procedure Set_Handler_Records (Id : E; V : S) is
3400 end Set_Handler_Records;
3402 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3404 pragma Assert (Base_Type (Id) = Id);
3405 Set_Flag135 (Id, V);
3406 end Set_Has_Aliased_Components;
3408 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3411 end Set_Has_Alignment_Clause;
3413 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3416 end Set_Has_All_Calls_Remote;
3418 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3420 Set_Flag201 (Id, V);
3421 end Set_Has_Anon_Block_Suffix;
3423 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3425 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3427 end Set_Has_Atomic_Components;
3429 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3432 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3433 Set_Flag139 (Id, V);
3434 end Set_Has_Biased_Representation;
3436 procedure Set_Has_Completion (Id : E; V : B := True) is
3439 end Set_Has_Completion;
3441 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3443 pragma Assert (Is_Type (Id));
3445 end Set_Has_Completion_In_Body;
3447 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3449 pragma Assert (Ekind (Id) = E_Record_Type);
3450 Set_Flag140 (Id, V);
3451 end Set_Has_Complex_Representation;
3453 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3455 pragma Assert (Ekind (Id) = E_Array_Type);
3457 end Set_Has_Component_Size_Clause;
3459 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3461 pragma Assert (Is_Type (Id));
3462 Set_Flag187 (Id, V);
3463 end Set_Has_Constrained_Partial_View;
3465 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3467 Set_Flag181 (Id, V);
3468 end Set_Has_Contiguous_Rep;
3470 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3472 pragma Assert (Base_Type (Id) = Id);
3474 end Set_Has_Controlled_Component;
3476 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3479 end Set_Has_Controlling_Result;
3481 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3483 Set_Flag119 (Id, V);
3484 end Set_Has_Convention_Pragma;
3486 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3488 pragma Assert (Nkind (Id) in N_Entity);
3490 end Set_Has_Delayed_Freeze;
3492 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3494 pragma Assert (Nkind (Id) in N_Entity);
3496 end Set_Has_Discriminants;
3498 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3500 pragma Assert (Ekind (Id) = E_Record_Type
3501 and then Is_Tagged_Type (Id));
3502 Set_Flag220 (Id, V);
3503 end Set_Has_Dispatch_Table;
3505 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3507 pragma Assert (Is_Enumeration_Type (Id));
3509 end Set_Has_Enumeration_Rep_Clause;
3511 procedure Set_Has_Exit (Id : E; V : B := True) is
3516 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3518 pragma Assert (Is_Tagged_Type (Id));
3519 Set_Flag110 (Id, V);
3520 end Set_Has_External_Tag_Rep_Clause;
3522 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3524 Set_Flag175 (Id, V);
3525 end Set_Has_Forward_Instantiation;
3527 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3529 Set_Flag173 (Id, V);
3530 end Set_Has_Fully_Qualified_Name;
3532 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3535 end Set_Has_Gigi_Rep_Item;
3537 procedure Set_Has_Homonym (Id : E; V : B := True) is
3540 end Set_Has_Homonym;
3542 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3545 (Ekind (Id) = E_Variable or else Ekind (Id) = E_Out_Parameter);
3546 Set_Flag219 (Id, V);
3547 end Set_Has_Initial_Value;
3549 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3551 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3553 end Set_Has_Machine_Radix_Clause;
3555 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3558 end Set_Has_Master_Entity;
3560 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3563 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3564 Set_Flag142 (Id, V);
3565 end Set_Has_Missing_Return;
3567 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3569 Set_Flag101 (Id, V);
3570 end Set_Has_Nested_Block_With_Handler;
3572 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3575 (Ekind (Id) = E_Variable
3576 or else Ekind (Id) = E_Constant
3577 or else Ekind (Id) = E_Loop_Parameter);
3578 Set_Flag215 (Id, V);
3579 end Set_Has_Up_Level_Access;
3581 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3583 pragma Assert (Base_Type (Id) = Id);
3585 end Set_Has_Non_Standard_Rep;
3587 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3589 pragma Assert (Is_Type (Id));
3590 Set_Flag172 (Id, V);
3591 end Set_Has_Object_Size_Clause;
3593 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3595 Set_Flag154 (Id, V);
3596 end Set_Has_Per_Object_Constraint;
3598 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3600 Set_Flag188 (Id, V);
3601 end Set_Has_Persistent_BSS;
3603 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3605 pragma Assert (Is_Access_Type (Id));
3606 Set_Flag27 (Base_Type (Id), V);
3607 end Set_Has_Pragma_Controlled;
3609 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3611 Set_Flag150 (Id, V);
3612 end Set_Has_Pragma_Elaborate_Body;
3614 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3616 Set_Flag157 (Id, V);
3617 end Set_Has_Pragma_Inline;
3619 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3621 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3622 pragma Assert (Id = Base_Type (Id));
3623 Set_Flag121 (Id, V);
3624 end Set_Has_Pragma_Pack;
3626 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3628 Set_Flag221 (Id, V);
3629 end Set_Has_Pragma_Preelab_Init;
3631 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3633 Set_Flag203 (Id, V);
3634 end Set_Has_Pragma_Pure;
3636 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3638 Set_Flag179 (Id, V);
3639 end Set_Has_Pragma_Pure_Function;
3641 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3643 Set_Flag180 (Id, V);
3644 end Set_Has_Pragma_Unreferenced;
3646 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3648 pragma Assert (Is_Type (Id));
3649 Set_Flag212 (Id, V);
3650 end Set_Has_Pragma_Unreferenced_Objects;
3652 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3654 pragma Assert (Id = Base_Type (Id));
3655 Set_Flag120 (Id, V);
3656 end Set_Has_Primitive_Operations;
3658 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3660 Set_Flag155 (Id, V);
3661 end Set_Has_Private_Declaration;
3663 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3665 Set_Flag161 (Id, V);
3666 end Set_Has_Qualified_Name;
3668 procedure Set_Has_RACW (Id : E; V : B := True) is
3670 pragma Assert (Ekind (Id) = E_Package);
3671 Set_Flag214 (Id, V);
3674 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3676 pragma Assert (Id = Base_Type (Id));
3678 end Set_Has_Record_Rep_Clause;
3680 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3682 pragma Assert (Is_Subprogram (Id));
3683 Set_Flag143 (Id, V);
3684 end Set_Has_Recursive_Call;
3686 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3689 end Set_Has_Size_Clause;
3691 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3694 end Set_Has_Small_Clause;
3696 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3698 pragma Assert (Id = Base_Type (Id));
3699 Set_Flag100 (Id, V);
3700 end Set_Has_Specified_Layout;
3702 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3704 pragma Assert (Is_Type (Id));
3705 Set_Flag190 (Id, V);
3706 end Set_Has_Specified_Stream_Input;
3708 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3710 pragma Assert (Is_Type (Id));
3711 Set_Flag191 (Id, V);
3712 end Set_Has_Specified_Stream_Output;
3714 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3716 pragma Assert (Is_Type (Id));
3717 Set_Flag192 (Id, V);
3718 end Set_Has_Specified_Stream_Read;
3720 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3722 pragma Assert (Is_Type (Id));
3723 Set_Flag193 (Id, V);
3724 end Set_Has_Specified_Stream_Write;
3726 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3728 Set_Flag211 (Id, V);
3729 end Set_Has_Static_Discriminants;
3731 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3733 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3734 pragma Assert (Base_Type (Id) = Id);
3736 end Set_Has_Storage_Size_Clause;
3738 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3740 pragma Assert (Is_Elementary_Type (Id));
3741 Set_Flag184 (Id, V);
3742 end Set_Has_Stream_Size_Clause;
3744 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3747 end Set_Has_Subprogram_Descriptor;
3749 procedure Set_Has_Task (Id : E; V : B := True) is
3751 pragma Assert (Base_Type (Id) = Id);
3755 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3757 pragma Assert (Base_Type (Id) = Id);
3758 Set_Flag123 (Id, V);
3759 end Set_Has_Unchecked_Union;
3761 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3763 pragma Assert (Is_Type (Id));
3765 end Set_Has_Unknown_Discriminants;
3767 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3769 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3771 end Set_Has_Volatile_Components;
3773 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3775 Set_Flag182 (Id, V);
3776 end Set_Has_Xref_Entry;
3778 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3780 pragma Assert (Ekind (Id) = E_Variable);
3782 end Set_Hiding_Loop_Variable;
3784 procedure Set_Homonym (Id : E; V : E) is
3786 pragma Assert (Id /= V);
3790 procedure Set_In_Package_Body (Id : E; V : B := True) is
3793 end Set_In_Package_Body;
3795 procedure Set_In_Private_Part (Id : E; V : B := True) is
3798 end Set_In_Private_Part;
3800 procedure Set_In_Use (Id : E; V : B := True) is
3802 pragma Assert (Nkind (Id) in N_Entity);
3806 procedure Set_Inner_Instances (Id : E; V : L) is
3808 Set_Elist23 (Id, V);
3809 end Set_Inner_Instances;
3811 procedure Set_Interface_Name (Id : E; V : N) is
3814 end Set_Interface_Name;
3816 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3818 pragma Assert (Is_Overloadable (Id));
3820 end Set_Is_Abstract_Subprogram;
3822 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3824 pragma Assert (Is_Type (Id));
3825 Set_Flag146 (Id, V);
3826 end Set_Is_Abstract_Type;
3828 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3830 pragma Assert (Is_Access_Type (Id));
3831 Set_Flag194 (Id, V);
3832 end Set_Is_Local_Anonymous_Access;
3834 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3836 pragma Assert (Is_Access_Type (Id));
3838 end Set_Is_Access_Constant;
3840 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3842 Set_Flag185 (Id, V);
3843 end Set_Is_Ada_2005_Only;
3845 procedure Set_Is_Aliased (Id : E; V : B := True) is
3847 pragma Assert (Nkind (Id) in N_Entity);
3851 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3853 pragma Assert (Is_Entry (Id));
3854 Set_Flag132 (Id, V);
3855 end Set_Is_AST_Entry;
3857 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3860 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3862 end Set_Is_Asynchronous;
3864 procedure Set_Is_Atomic (Id : E; V : B := True) is
3869 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3871 pragma Assert ((not V)
3872 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3874 Set_Flag122 (Id, V);
3875 end Set_Is_Bit_Packed_Array;
3877 procedure Set_Is_Called (Id : E; V : B := True) is
3880 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3881 Set_Flag102 (Id, V);
3884 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3887 end Set_Is_Character_Type;
3889 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3892 end Set_Is_Child_Unit;
3894 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
3897 end Set_Is_Class_Wide_Equivalent_Type;
3899 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3901 Set_Flag149 (Id, V);
3902 end Set_Is_Compilation_Unit;
3904 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3906 pragma Assert (Ekind (Id) = E_Discriminant);
3907 Set_Flag103 (Id, V);
3908 end Set_Is_Completely_Hidden;
3910 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3913 end Set_Is_Concurrent_Record_Type;
3915 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3918 end Set_Is_Constr_Subt_For_U_Nominal;
3920 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3922 Set_Flag141 (Id, V);
3923 end Set_Is_Constr_Subt_For_UN_Aliased;
3925 procedure Set_Is_Constrained (Id : E; V : B := True) is
3927 pragma Assert (Nkind (Id) in N_Entity);
3929 end Set_Is_Constrained;
3931 procedure Set_Is_Constructor (Id : E; V : B := True) is
3934 end Set_Is_Constructor;
3936 procedure Set_Is_Controlled (Id : E; V : B := True) is
3938 pragma Assert (Id = Base_Type (Id));
3940 end Set_Is_Controlled;
3942 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3944 pragma Assert (Is_Formal (Id));
3946 end Set_Is_Controlling_Formal;
3948 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3951 end Set_Is_CPP_Class;
3953 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
3955 pragma Assert (Is_Type (Id));
3956 Set_Flag223 (Id, V);
3957 end Set_Is_Descendent_Of_Address;
3959 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3961 Set_Flag176 (Id, V);
3962 end Set_Is_Discrim_SO_Function;
3964 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3969 Is_Overloadable (Id)
3971 Ekind (Id) = E_Subprogram_Type);
3974 end Set_Is_Dispatching_Operation;
3976 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3978 Set_Flag124 (Id, V);
3979 end Set_Is_Eliminated;
3981 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3984 end Set_Is_Entry_Formal;
3986 procedure Set_Is_Exported (Id : E; V : B := True) is
3989 end Set_Is_Exported;
3991 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3994 end Set_Is_First_Subtype;
3996 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3999 (Ekind (Id) = E_Record_Subtype
4001 Ekind (Id) = E_Private_Subtype);
4002 Set_Flag118 (Id, V);
4003 end Set_Is_For_Access_Subtype;
4005 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4007 Set_Flag111 (Id, V);
4008 end Set_Is_Formal_Subprogram;
4010 procedure Set_Is_Frozen (Id : E; V : B := True) is
4012 pragma Assert (Nkind (Id) in N_Entity);
4016 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4018 pragma Assert (Is_Type (Id));
4020 end Set_Is_Generic_Actual_Type;
4022 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4024 Set_Flag130 (Id, V);
4025 end Set_Is_Generic_Instance;
4027 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4029 pragma Assert (Nkind (Id) in N_Entity);
4031 end Set_Is_Generic_Type;
4033 procedure Set_Is_Hidden (Id : E; V : B := True) is
4038 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4040 Set_Flag171 (Id, V);
4041 end Set_Is_Hidden_Open_Scope;
4043 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4045 pragma Assert (Nkind (Id) in N_Entity);
4047 end Set_Is_Immediately_Visible;
4049 procedure Set_Is_Imported (Id : E; V : B := True) is
4052 end Set_Is_Imported;
4054 procedure Set_Is_Inlined (Id : E; V : B := True) is
4059 procedure Set_Is_Interface (Id : E; V : B := True) is
4062 (Ekind (Id) = E_Record_Type
4063 or else Ekind (Id) = E_Record_Subtype
4064 or else Ekind (Id) = E_Record_Type_With_Private
4065 or else Ekind (Id) = E_Record_Subtype_With_Private
4066 or else Ekind (Id) = E_Class_Wide_Type
4067 or else Ekind (Id) = E_Class_Wide_Subtype);
4068 Set_Flag186 (Id, V);
4069 end Set_Is_Interface;
4071 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4073 Set_Flag126 (Id, V);
4074 end Set_Is_Instantiated;
4076 procedure Set_Is_Internal (Id : E; V : B := True) is
4078 pragma Assert (Nkind (Id) in N_Entity);
4080 end Set_Is_Internal;
4082 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4084 pragma Assert (Nkind (Id) in N_Entity);
4086 end Set_Is_Interrupt_Handler;
4088 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4091 end Set_Is_Intrinsic_Subprogram;
4093 procedure Set_Is_Itype (Id : E; V : B := True) is
4098 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4101 end Set_Is_Known_Non_Null;
4103 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4105 Set_Flag204 (Id, V);
4106 end Set_Is_Known_Null;
4108 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4110 Set_Flag170 (Id, V);
4111 end Set_Is_Known_Valid;
4113 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4115 pragma Assert (Is_Type (Id));
4116 Set_Flag106 (Id, V);
4117 end Set_Is_Limited_Composite;
4119 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4121 pragma Assert (Is_Interface (Id));
4122 Set_Flag197 (Id, V);
4123 end Set_Is_Limited_Interface;
4125 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4128 end Set_Is_Limited_Record;
4130 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4132 pragma Assert (Is_Subprogram (Id));
4133 Set_Flag137 (Id, V);
4134 end Set_Is_Machine_Code_Subprogram;
4136 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4138 pragma Assert (Is_Type (Id));
4139 Set_Flag109 (Id, V);
4140 end Set_Is_Non_Static_Subtype;
4142 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4144 pragma Assert (Ekind (Id) = E_Procedure);
4145 Set_Flag178 (Id, V);
4146 end Set_Is_Null_Init_Proc;
4148 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4150 Set_Flag153 (Id, V);
4151 end Set_Is_Obsolescent;
4153 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4155 pragma Assert (Is_Formal (Id));
4156 Set_Flag134 (Id, V);
4157 end Set_Is_Optional_Parameter;
4159 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4161 pragma Assert (Is_Subprogram (Id));
4163 end Set_Is_Overriding_Operation;
4165 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4167 Set_Flag160 (Id, V);
4168 end Set_Is_Package_Body_Entity;
4170 procedure Set_Is_Packed (Id : E; V : B := True) is
4172 pragma Assert (Base_Type (Id) = Id);
4176 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4178 Set_Flag138 (Id, V);
4179 end Set_Is_Packed_Array_Type;
4181 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4183 pragma Assert (Nkind (Id) in N_Entity);
4185 end Set_Is_Potentially_Use_Visible;
4187 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4190 end Set_Is_Preelaborated;
4192 procedure Set_Is_Primitive (Id : E; V : B := True) is
4195 (Is_Overloadable (Id)
4196 or else Ekind (Id) = E_Generic_Function
4197 or else Ekind (Id) = E_Generic_Procedure);
4198 Set_Flag218 (Id, V);
4199 end Set_Is_Primitive;
4201 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4203 pragma Assert (Ekind (Id) = E_Procedure);
4204 Set_Flag195 (Id, V);
4205 end Set_Is_Primitive_Wrapper;
4207 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4209 pragma Assert (Is_Type (Id));
4210 Set_Flag107 (Id, V);
4211 end Set_Is_Private_Composite;
4213 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4216 end Set_Is_Private_Descendant;
4218 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4220 pragma Assert (Is_Interface (Id));
4221 Set_Flag198 (Id, V);
4222 end Set_Is_Protected_Interface;
4224 procedure Set_Is_Public (Id : E; V : B := True) is
4226 pragma Assert (Nkind (Id) in N_Entity);
4230 procedure Set_Is_Pure (Id : E; V : B := True) is
4235 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4237 pragma Assert (Is_Access_Type (Id));
4238 Set_Flag189 (Id, V);
4239 end Set_Is_Pure_Unit_Access_Type;
4241 procedure Set_Is_Raised (Id : E; V : B := True) is
4243 pragma Assert (Ekind (Id) = E_Exception);
4244 Set_Flag224 (Id, V);
4247 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4250 end Set_Is_Remote_Call_Interface;
4252 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4255 end Set_Is_Remote_Types;
4257 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4259 Set_Flag112 (Id, V);
4260 end Set_Is_Renaming_Of_Object;
4262 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4264 Set_Flag209 (Id, V);
4265 end Set_Is_Return_Object;
4267 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4270 end Set_Is_Shared_Passive;
4272 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4275 (Ekind (Id) = E_Exception
4276 or else Ekind (Id) = E_Variable
4277 or else Ekind (Id) = E_Constant
4278 or else Is_Type (Id)
4279 or else Ekind (Id) = E_Void);
4281 end Set_Is_Statically_Allocated;
4283 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4285 pragma Assert (Is_Interface (Id));
4286 Set_Flag199 (Id, V);
4287 end Set_Is_Synchronized_Interface;
4289 procedure Set_Is_Tag (Id : E; V : B := True) is
4291 pragma Assert (Nkind (Id) in N_Entity);
4295 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4298 end Set_Is_Tagged_Type;
4300 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4302 pragma Assert (Is_Interface (Id));
4303 Set_Flag200 (Id, V);
4304 end Set_Is_Task_Interface;
4306 procedure Set_Is_Thunk (Id : E; V : B := True) is
4308 Set_Flag225 (Id, V);
4311 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4313 Set_Flag163 (Id, V);
4314 end Set_Is_True_Constant;
4316 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4318 pragma Assert (Base_Type (Id) = Id);
4319 Set_Flag117 (Id, V);
4320 end Set_Is_Unchecked_Union;
4322 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4324 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4325 Set_Flag144 (Id, V);
4326 end Set_Is_Unsigned_Type;
4328 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4330 pragma Assert (Ekind (Id) = E_Procedure);
4331 Set_Flag127 (Id, V);
4332 end Set_Is_Valued_Procedure;
4334 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4336 pragma Assert (Is_Child_Unit (Id));
4337 Set_Flag116 (Id, V);
4338 end Set_Is_Visible_Child_Unit;
4340 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4342 Set_Flag206 (Id, V);
4343 end Set_Is_Visible_Formal;
4345 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4347 pragma Assert (Ekind (Id) = E_Exception);
4348 Set_Flag133 (Id, V);
4349 end Set_Is_VMS_Exception;
4351 procedure Set_Is_Volatile (Id : E; V : B := True) is
4353 pragma Assert (Nkind (Id) in N_Entity);
4355 end Set_Is_Volatile;
4357 procedure Set_Itype_Printed (Id : E; V : B := True) is
4359 pragma Assert (Is_Itype (Id));
4360 Set_Flag202 (Id, V);
4361 end Set_Itype_Printed;
4363 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4366 end Set_Kill_Elaboration_Checks;
4368 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4371 end Set_Kill_Range_Checks;
4373 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4376 end Set_Kill_Tag_Checks;
4378 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4380 pragma Assert (Is_Type (Id));
4381 Set_Flag207 (Id, V);
4382 end Set_Known_To_Have_Preelab_Init;
4384 procedure Set_Last_Assignment (Id : E; V : N) is
4386 pragma Assert (Is_Assignable (Id));
4388 end Set_Last_Assignment;
4390 procedure Set_Last_Entity (Id : E; V : E) is
4393 end Set_Last_Entity;
4395 procedure Set_Limited_View (Id : E; V : E) is
4397 pragma Assert (Ekind (Id) = E_Package);
4399 end Set_Limited_View;
4401 procedure Set_Lit_Indexes (Id : E; V : E) is
4403 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4405 end Set_Lit_Indexes;
4407 procedure Set_Lit_Strings (Id : E; V : E) is
4409 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4411 end Set_Lit_Strings;
4413 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4415 pragma Assert (Is_Formal (Id));
4416 Set_Flag205 (Id, V);
4417 end Set_Low_Bound_Known;
4419 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4421 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4423 end Set_Machine_Radix_10;
4425 procedure Set_Master_Id (Id : E; V : E) is
4427 pragma Assert (Is_Access_Type (Id));
4431 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4433 Set_Flag168 (Id, V);
4434 end Set_Materialize_Entity;
4436 procedure Set_Mechanism (Id : E; V : M) is
4438 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4439 Set_Uint8 (Id, UI_From_Int (V));
4442 procedure Set_Modulus (Id : E; V : U) is
4444 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4448 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4450 pragma Assert (Is_Type (Id));
4451 Set_Flag183 (Id, V);
4452 end Set_Must_Be_On_Byte_Boundary;
4454 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4456 pragma Assert (Is_Type (Id));
4457 Set_Flag208 (Id, V);
4458 end Set_Must_Have_Preelab_Init;
4460 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4462 Set_Flag147 (Id, V);
4463 end Set_Needs_Debug_Info;
4465 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4468 (Is_Overloadable (Id)
4469 or else Ekind (Id) = E_Subprogram_Type
4470 or else Ekind (Id) = E_Entry_Family);
4472 end Set_Needs_No_Actuals;
4474 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4476 Set_Flag115 (Id, V);
4477 end Set_Never_Set_In_Source;
4479 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4482 end Set_Next_Inlined_Subprogram;
4484 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4486 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4487 Set_Flag131 (Id, V);
4488 end Set_No_Pool_Assigned;
4490 procedure Set_No_Return (Id : E; V : B := True) is
4494 or else Ekind (Id) = E_Procedure
4495 or else Ekind (Id) = E_Generic_Procedure);
4496 Set_Flag113 (Id, V);
4499 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4501 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4502 Set_Flag136 (Id, V);
4503 end Set_No_Strict_Aliasing;
4505 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4507 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4509 end Set_Non_Binary_Modulus;
4511 procedure Set_Non_Limited_View (Id : E; V : E) is
4513 pragma Assert (Ekind (Id) in Incomplete_Kind);
4515 end Set_Non_Limited_View;
4517 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4520 (Root_Type (Id) = Standard_Boolean
4521 and then Ekind (Id) = E_Enumeration_Type);
4522 Set_Flag162 (Id, V);
4523 end Set_Nonzero_Is_True;
4525 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4528 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4530 end Set_Normalized_First_Bit;
4532 procedure Set_Normalized_Position (Id : E; V : U) is
4535 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4537 end Set_Normalized_Position;
4539 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4542 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4544 end Set_Normalized_Position_Max;
4546 procedure Set_Object_Ref (Id : E; V : E) is
4548 pragma Assert (Ekind (Id) = E_Protected_Body);
4552 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4555 end Set_Obsolescent_Warning;
4557 procedure Set_Original_Array_Type (Id : E; V : E) is
4559 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4561 end Set_Original_Array_Type;
4563 procedure Set_Original_Record_Component (Id : E; V : E) is
4566 (Ekind (Id) = E_Void
4567 or else Ekind (Id) = E_Component
4568 or else Ekind (Id) = E_Discriminant);
4570 end Set_Original_Record_Component;
4572 procedure Set_Overridden_Operation (Id : E; V : E) is
4575 end Set_Overridden_Operation;
4577 procedure Set_Package_Instantiation (Id : E; V : N) is
4580 (Ekind (Id) = E_Void
4581 or else Ekind (Id) = E_Generic_Package
4582 or else Ekind (Id) = E_Package);
4584 end Set_Package_Instantiation;
4586 procedure Set_Packed_Array_Type (Id : E; V : E) is
4588 pragma Assert (Is_Array_Type (Id));
4590 end Set_Packed_Array_Type;
4592 procedure Set_Parent_Subtype (Id : E; V : E) is
4594 pragma Assert (Ekind (Id) = E_Record_Type);
4596 end Set_Parent_Subtype;
4598 procedure Set_Primitive_Operations (Id : E; V : L) is
4600 pragma Assert (Is_Tagged_Type (Id));
4601 Set_Elist15 (Id, V);
4602 end Set_Primitive_Operations;
4604 procedure Set_Prival (Id : E; V : E) is
4606 pragma Assert (Is_Protected_Private (Id));
4610 procedure Set_Privals_Chain (Id : E; V : L) is
4612 pragma Assert (Is_Overloadable (Id)
4613 or else Ekind (Id) = E_Entry_Family);
4614 Set_Elist23 (Id, V);
4615 end Set_Privals_Chain;
4617 procedure Set_Private_Dependents (Id : E; V : L) is
4619 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4620 Set_Elist18 (Id, V);
4621 end Set_Private_Dependents;
4623 procedure Set_Private_View (Id : E; V : N) is
4625 pragma Assert (Is_Private_Type (Id));
4627 end Set_Private_View;
4629 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4631 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4633 end Set_Protected_Body_Subprogram;
4635 procedure Set_Protected_Formal (Id : E; V : E) is
4637 pragma Assert (Is_Formal (Id));
4639 end Set_Protected_Formal;
4641 procedure Set_Protected_Operation (Id : E; V : N) is
4643 pragma Assert (Is_Protected_Private (Id));
4645 end Set_Protected_Operation;
4647 procedure Set_Reachable (Id : E; V : B := True) is
4652 procedure Set_Referenced (Id : E; V : B := True) is
4654 Set_Flag156 (Id, V);
4657 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4660 end Set_Referenced_As_LHS;
4662 procedure Set_Referenced_Object (Id : E; V : N) is
4664 pragma Assert (Is_Type (Id));
4666 end Set_Referenced_Object;
4668 procedure Set_Register_Exception_Call (Id : E; V : N) is
4670 pragma Assert (Ekind (Id) = E_Exception);
4672 end Set_Register_Exception_Call;
4674 procedure Set_Related_Array_Object (Id : E; V : E) is
4676 pragma Assert (Is_Array_Type (Id));
4678 end Set_Related_Array_Object;
4680 procedure Set_Related_Instance (Id : E; V : E) is
4683 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4685 end Set_Related_Instance;
4687 procedure Set_Related_Interface (Id : E; V : E) is
4690 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
4692 end Set_Related_Interface;
4694 procedure Set_Renamed_Entity (Id : E; V : N) is
4697 end Set_Renamed_Entity;
4699 procedure Set_Renamed_Object (Id : E; V : N) is
4702 end Set_Renamed_Object;
4704 procedure Set_Renaming_Map (Id : E; V : U) is
4707 end Set_Renaming_Map;
4709 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4711 pragma Assert (Is_Overloadable (Id));
4712 Set_Flag213 (Id, V);
4713 end Set_Requires_Overriding;
4715 procedure Set_Return_Present (Id : E; V : B := True) is
4718 end Set_Return_Present;
4720 procedure Set_Return_Applies_To (Id : E; V : N) is
4723 end Set_Return_Applies_To;
4725 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4728 end Set_Returns_By_Ref;
4730 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4733 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4734 Set_Flag164 (Id, V);
4735 end Set_Reverse_Bit_Order;
4737 procedure Set_RM_Size (Id : E; V : U) is
4739 pragma Assert (Is_Type (Id));
4743 procedure Set_Scalar_Range (Id : E; V : N) is
4746 end Set_Scalar_Range;
4748 procedure Set_Scale_Value (Id : E; V : U) is
4751 end Set_Scale_Value;
4753 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4755 pragma Assert (not Is_Record_Type (Id));
4757 end Set_Scope_Depth_Value;
4759 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4761 Set_Flag167 (Id, V);
4762 end Set_Sec_Stack_Needed_For_Return;
4764 procedure Set_Shadow_Entities (Id : E; V : S) is
4767 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4769 end Set_Shadow_Entities;
4771 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4773 pragma Assert (Ekind (Id) = E_Variable);
4775 end Set_Shared_Var_Assign_Proc;
4777 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4779 pragma Assert (Ekind (Id) = E_Variable);
4781 end Set_Shared_Var_Read_Proc;
4783 procedure Set_Size_Check_Code (Id : E; V : N) is
4785 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4787 end Set_Size_Check_Code;
4789 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4791 Set_Flag177 (Id, V);
4792 end Set_Size_Depends_On_Discriminant;
4794 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4797 end Set_Size_Known_At_Compile_Time;
4799 procedure Set_Small_Value (Id : E; V : R) is
4801 pragma Assert (Is_Fixed_Point_Type (Id));
4802 Set_Ureal21 (Id, V);
4803 end Set_Small_Value;
4805 procedure Set_Spec_Entity (Id : E; V : E) is
4807 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4809 end Set_Spec_Entity;
4811 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4813 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4814 pragma Assert (Base_Type (Id) = Id);
4816 end Set_Storage_Size_Variable;
4818 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
4820 pragma Assert (Ekind (Id) = E_Package);
4822 end Set_Static_Elaboration_Desired;
4824 procedure Set_Static_Initialization (Id : E; V : N) is
4827 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
4829 end Set_Static_Initialization;
4831 procedure Set_Stored_Constraint (Id : E; V : L) is
4833 pragma Assert (Nkind (Id) in N_Entity);
4834 Set_Elist23 (Id, V);
4835 end Set_Stored_Constraint;
4837 procedure Set_Strict_Alignment (Id : E; V : B := True) is
4839 pragma Assert (Base_Type (Id) = Id);
4840 Set_Flag145 (Id, V);
4841 end Set_Strict_Alignment;
4843 procedure Set_String_Literal_Length (Id : E; V : U) is
4845 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4847 end Set_String_Literal_Length;
4849 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
4851 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4853 end Set_String_Literal_Low_Bound;
4855 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
4857 Set_Flag148 (Id, V);
4858 end Set_Suppress_Elaboration_Warnings;
4860 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
4862 pragma Assert (Id = Base_Type (Id));
4863 Set_Flag105 (Id, V);
4864 end Set_Suppress_Init_Proc;
4866 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
4868 Set_Flag165 (Id, V);
4869 end Set_Suppress_Style_Checks;
4871 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
4873 Set_Flag217 (Id, V);
4874 end Set_Suppress_Value_Tracking_On_Call;
4876 procedure Set_Task_Body_Procedure (Id : E; V : N) is
4878 pragma Assert (Ekind (Id) in Task_Kind);
4880 end Set_Task_Body_Procedure;
4882 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
4885 end Set_Treat_As_Volatile;
4887 procedure Set_Underlying_Full_View (Id : E; V : E) is
4889 pragma Assert (Ekind (Id) in Private_Kind);
4891 end Set_Underlying_Full_View;
4893 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
4895 pragma Assert (Is_Type (Id) and then Base_Type (Id) = Id);
4896 Set_Flag216 (Id, V);
4897 end Set_Universal_Aliasing;
4899 procedure Set_Unset_Reference (Id : E; V : N) is
4902 end Set_Unset_Reference;
4904 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
4907 end Set_Uses_Sec_Stack;
4909 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
4911 Set_Flag222 (Id, V);
4912 end Set_Used_As_Generic_Actual;
4914 procedure Set_Vax_Float (Id : E; V : B := True) is
4916 pragma Assert (Id = Base_Type (Id));
4917 Set_Flag151 (Id, V);
4920 procedure Set_Warnings_Off (Id : E; V : B := True) is
4923 end Set_Warnings_Off;
4925 procedure Set_Was_Hidden (Id : E; V : B := True) is
4927 Set_Flag196 (Id, V);
4930 procedure Set_Wrapped_Entity (Id : E; V : E) is
4932 pragma Assert (Ekind (Id) = E_Procedure
4933 and then Is_Primitive_Wrapper (Id));
4935 end Set_Wrapped_Entity;
4937 -----------------------------------
4938 -- Field Initialization Routines --
4939 -----------------------------------
4941 procedure Init_Alignment (Id : E) is
4943 Set_Uint14 (Id, Uint_0);
4946 procedure Init_Alignment (Id : E; V : Int) is
4948 Set_Uint14 (Id, UI_From_Int (V));
4951 procedure Init_Component_Bit_Offset (Id : E) is
4953 Set_Uint11 (Id, No_Uint);
4954 end Init_Component_Bit_Offset;
4956 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
4958 Set_Uint11 (Id, UI_From_Int (V));
4959 end Init_Component_Bit_Offset;
4961 procedure Init_Component_Size (Id : E) is
4963 Set_Uint22 (Id, Uint_0);
4964 end Init_Component_Size;
4966 procedure Init_Component_Size (Id : E; V : Int) is
4968 Set_Uint22 (Id, UI_From_Int (V));
4969 end Init_Component_Size;
4971 procedure Init_Digits_Value (Id : E) is
4973 Set_Uint17 (Id, Uint_0);
4974 end Init_Digits_Value;
4976 procedure Init_Digits_Value (Id : E; V : Int) is
4978 Set_Uint17 (Id, UI_From_Int (V));
4979 end Init_Digits_Value;
4981 procedure Init_Esize (Id : E) is
4983 Set_Uint12 (Id, Uint_0);
4986 procedure Init_Esize (Id : E; V : Int) is
4988 Set_Uint12 (Id, UI_From_Int (V));
4991 procedure Init_Normalized_First_Bit (Id : E) is
4993 Set_Uint8 (Id, No_Uint);
4994 end Init_Normalized_First_Bit;
4996 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
4998 Set_Uint8 (Id, UI_From_Int (V));
4999 end Init_Normalized_First_Bit;
5001 procedure Init_Normalized_Position (Id : E) is
5003 Set_Uint14 (Id, No_Uint);
5004 end Init_Normalized_Position;
5006 procedure Init_Normalized_Position (Id : E; V : Int) is
5008 Set_Uint14 (Id, UI_From_Int (V));
5009 end Init_Normalized_Position;
5011 procedure Init_Normalized_Position_Max (Id : E) is
5013 Set_Uint10 (Id, No_Uint);
5014 end Init_Normalized_Position_Max;
5016 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5018 Set_Uint10 (Id, UI_From_Int (V));
5019 end Init_Normalized_Position_Max;
5021 procedure Init_RM_Size (Id : E) is
5023 Set_Uint13 (Id, Uint_0);
5026 procedure Init_RM_Size (Id : E; V : Int) is
5028 Set_Uint13 (Id, UI_From_Int (V));
5031 -----------------------------
5032 -- Init_Component_Location --
5033 -----------------------------
5035 procedure Init_Component_Location (Id : E) is
5037 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5038 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5039 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5040 Set_Uint12 (Id, Uint_0); -- Esize
5041 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5042 end Init_Component_Location;
5048 procedure Init_Size (Id : E; V : Int) is
5050 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5051 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5054 ---------------------
5055 -- Init_Size_Align --
5056 ---------------------
5058 procedure Init_Size_Align (Id : E) is
5060 Set_Uint12 (Id, Uint_0); -- Esize
5061 Set_Uint13 (Id, Uint_0); -- RM_Size
5062 Set_Uint14 (Id, Uint_0); -- Alignment
5063 end Init_Size_Align;
5065 ----------------------------------------------
5066 -- Type Representation Attribute Predicates --
5067 ----------------------------------------------
5069 function Known_Alignment (E : Entity_Id) return B is
5071 return Uint14 (E) /= Uint_0
5072 and then Uint14 (E) /= No_Uint;
5073 end Known_Alignment;
5075 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5077 return Uint11 (E) /= No_Uint;
5078 end Known_Component_Bit_Offset;
5080 function Known_Component_Size (E : Entity_Id) return B is
5082 return Uint22 (Base_Type (E)) /= Uint_0
5083 and then Uint22 (Base_Type (E)) /= No_Uint;
5084 end Known_Component_Size;
5086 function Known_Esize (E : Entity_Id) return B is
5088 return Uint12 (E) /= Uint_0
5089 and then Uint12 (E) /= No_Uint;
5092 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5094 return Uint8 (E) /= No_Uint;
5095 end Known_Normalized_First_Bit;
5097 function Known_Normalized_Position (E : Entity_Id) return B is
5099 return Uint14 (E) /= No_Uint;
5100 end Known_Normalized_Position;
5102 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5104 return Uint10 (E) /= No_Uint;
5105 end Known_Normalized_Position_Max;
5107 function Known_RM_Size (E : Entity_Id) return B is
5109 return Uint13 (E) /= No_Uint
5110 and then (Uint13 (E) /= Uint_0
5111 or else Is_Discrete_Type (E)
5112 or else Is_Fixed_Point_Type (E));
5115 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5117 return Uint11 (E) /= No_Uint
5118 and then Uint11 (E) >= Uint_0;
5119 end Known_Static_Component_Bit_Offset;
5121 function Known_Static_Component_Size (E : Entity_Id) return B is
5123 return Uint22 (Base_Type (E)) > Uint_0;
5124 end Known_Static_Component_Size;
5126 function Known_Static_Esize (E : Entity_Id) return B is
5128 return Uint12 (E) > Uint_0;
5129 end Known_Static_Esize;
5131 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5133 return Uint8 (E) /= No_Uint
5134 and then Uint8 (E) >= Uint_0;
5135 end Known_Static_Normalized_First_Bit;
5137 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5139 return Uint14 (E) /= No_Uint
5140 and then Uint14 (E) >= Uint_0;
5141 end Known_Static_Normalized_Position;
5143 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5145 return Uint10 (E) /= No_Uint
5146 and then Uint10 (E) >= Uint_0;
5147 end Known_Static_Normalized_Position_Max;
5149 function Known_Static_RM_Size (E : Entity_Id) return B is
5151 return Uint13 (E) > Uint_0
5152 or else Is_Discrete_Type (E)
5153 or else Is_Fixed_Point_Type (E);
5154 end Known_Static_RM_Size;
5156 function Unknown_Alignment (E : Entity_Id) return B is
5158 return Uint14 (E) = Uint_0
5159 or else Uint14 (E) = No_Uint;
5160 end Unknown_Alignment;
5162 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5164 return Uint11 (E) = No_Uint;
5165 end Unknown_Component_Bit_Offset;
5167 function Unknown_Component_Size (E : Entity_Id) return B is
5169 return Uint22 (Base_Type (E)) = Uint_0
5171 Uint22 (Base_Type (E)) = No_Uint;
5172 end Unknown_Component_Size;
5174 function Unknown_Esize (E : Entity_Id) return B is
5176 return Uint12 (E) = No_Uint
5178 Uint12 (E) = Uint_0;
5181 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5183 return Uint8 (E) = No_Uint;
5184 end Unknown_Normalized_First_Bit;
5186 function Unknown_Normalized_Position (E : Entity_Id) return B is
5188 return Uint14 (E) = No_Uint;
5189 end Unknown_Normalized_Position;
5191 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5193 return Uint10 (E) = No_Uint;
5194 end Unknown_Normalized_Position_Max;
5196 function Unknown_RM_Size (E : Entity_Id) return B is
5198 return (Uint13 (E) = Uint_0
5199 and then not Is_Discrete_Type (E)
5200 and then not Is_Fixed_Point_Type (E))
5201 or else Uint13 (E) = No_Uint;
5202 end Unknown_RM_Size;
5204 --------------------
5205 -- Address_Clause --
5206 --------------------
5208 function Address_Clause (Id : E) return N is
5210 return Rep_Clause (Id, Name_Address);
5213 ----------------------
5214 -- Alignment_Clause --
5215 ----------------------
5217 function Alignment_Clause (Id : E) return N is
5219 return Rep_Clause (Id, Name_Alignment);
5220 end Alignment_Clause;
5222 ----------------------
5223 -- Ancestor_Subtype --
5224 ----------------------
5226 function Ancestor_Subtype (Id : E) return E is
5228 -- If this is first subtype, or is a base type, then there is no
5229 -- ancestor subtype, so we return Empty to indicate this fact.
5231 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
5236 D : constant Node_Id := Declaration_Node (Id);
5239 -- If we have a subtype declaration, get the ancestor subtype
5241 if Nkind (D) = N_Subtype_Declaration then
5242 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5243 return Entity (Subtype_Mark (Subtype_Indication (D)));
5245 return Entity (Subtype_Indication (D));
5248 -- If not, then no subtype indication is available
5254 end Ancestor_Subtype;
5260 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5262 if Last_Entity (V) = Empty then
5263 Set_First_Entity (V, Id);
5265 Set_Next_Entity (Last_Entity (V), Id);
5268 Set_Next_Entity (Id, Empty);
5270 Set_Last_Entity (V, Id);
5273 --------------------
5274 -- Available_View --
5275 --------------------
5277 function Available_View (Id : E) return E is
5279 if Is_Incomplete_Type (Id)
5280 and then Present (Non_Limited_View (Id))
5282 -- The non-limited view may itself be an incomplete type, in
5283 -- which case get its full view.
5285 return Get_Full_View (Non_Limited_View (Id));
5287 elsif Is_Class_Wide_Type (Id)
5288 and then Is_Incomplete_Type (Etype (Id))
5289 and then Present (Non_Limited_View (Etype (Id)))
5291 return Class_Wide_Type (Non_Limited_View (Etype (Id)));
5302 function Base_Type (Id : E) return E is
5305 when E_Enumeration_Subtype |
5307 E_Signed_Integer_Subtype |
5308 E_Modular_Integer_Subtype |
5309 E_Floating_Point_Subtype |
5310 E_Ordinary_Fixed_Point_Subtype |
5311 E_Decimal_Fixed_Point_Subtype |
5316 E_Record_Subtype_With_Private |
5317 E_Limited_Private_Subtype |
5319 E_Protected_Subtype |
5321 E_String_Literal_Subtype |
5322 E_Class_Wide_Subtype =>
5330 -------------------------
5331 -- Component_Alignment --
5332 -------------------------
5334 -- Component Alignment is encoded using two flags, Flag128/129 as
5335 -- follows. Note that both flags False = Align_Default, so that the
5336 -- default initialization of flags to False initializes component
5337 -- alignment to the default value as required.
5339 -- Flag128 Flag129 Value
5340 -- ------- ------- -----
5341 -- False False Calign_Default
5342 -- False True Calign_Component_Size
5343 -- True False Calign_Component_Size_4
5344 -- True True Calign_Storage_Unit
5346 function Component_Alignment (Id : E) return C is
5347 BT : constant Node_Id := Base_Type (Id);
5350 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5352 if Flag128 (BT) then
5353 if Flag129 (BT) then
5354 return Calign_Storage_Unit;
5356 return Calign_Component_Size_4;
5360 if Flag129 (BT) then
5361 return Calign_Component_Size;
5363 return Calign_Default;
5366 end Component_Alignment;
5368 --------------------
5369 -- Constant_Value --
5370 --------------------
5372 function Constant_Value (Id : E) return N is
5373 D : constant Node_Id := Declaration_Node (Id);
5377 -- If we have no declaration node, then return no constant value.
5378 -- Not clear how this can happen, but it does sometimes ???
5379 -- To investigate, remove this check and compile discrim_po.adb.
5384 -- Normal case where a declaration node is present
5386 elsif Nkind (D) = N_Object_Renaming_Declaration then
5387 return Renamed_Object (Id);
5389 -- If this is a component declaration whose entity is constant, it
5390 -- is a prival within a protected function. It does not have
5391 -- a constant value.
5393 elsif Nkind (D) = N_Component_Declaration then
5396 -- If there is an expression, return it
5398 elsif Present (Expression (D)) then
5399 return (Expression (D));
5401 -- For a constant, see if we have a full view
5403 elsif Ekind (Id) = E_Constant
5404 and then Present (Full_View (Id))
5406 Full_D := Parent (Full_View (Id));
5408 -- The full view may have been rewritten as an object renaming
5410 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5411 return Name (Full_D);
5413 return Expression (Full_D);
5416 -- Otherwise we have no expression to return
5423 ----------------------
5424 -- Declaration_Node --
5425 ----------------------
5427 function Declaration_Node (Id : E) return N is
5431 if Ekind (Id) = E_Incomplete_Type
5432 and then Present (Full_View (Id))
5434 P := Parent (Full_View (Id));
5440 if Nkind (P) /= N_Selected_Component
5441 and then Nkind (P) /= N_Expanded_Name
5443 not (Nkind (P) = N_Defining_Program_Unit_Name
5444 and then Is_Child_Unit (Id))
5451 end Declaration_Node;
5453 ---------------------
5454 -- Designated_Type --
5455 ---------------------
5457 function Designated_Type (Id : E) return E is
5461 Desig_Type := Directly_Designated_Type (Id);
5463 if Ekind (Desig_Type) = E_Incomplete_Type
5464 and then Present (Full_View (Desig_Type))
5466 return Full_View (Desig_Type);
5468 elsif Is_Class_Wide_Type (Desig_Type)
5469 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5470 and then Present (Full_View (Etype (Desig_Type)))
5471 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5473 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5478 end Designated_Type;
5480 -----------------------------
5481 -- Enclosing_Dynamic_Scope --
5482 -----------------------------
5484 function Enclosing_Dynamic_Scope (Id : E) return E is
5488 -- The following test is an error defense against some syntax
5489 -- errors that can leave scopes very messed up.
5491 if Id = Standard_Standard then
5495 -- Normal case, search enclosing scopes
5497 -- Note: the test for Present (S) should not be required, it is a
5498 -- defence against an ill-formed tree.
5502 -- If we somehow got an empty value for Scope, the tree must be
5503 -- malformed. Rather than blow up we return Standard in this case.
5506 return Standard_Standard;
5508 -- Quit if we get to standard or a dynamic scope
5510 elsif S = Standard_Standard
5511 or else Is_Dynamic_Scope (S)
5515 -- Otherwise keep climbing
5523 end Enclosing_Dynamic_Scope;
5525 ----------------------
5526 -- Entry_Index_Type --
5527 ----------------------
5529 function Entry_Index_Type (Id : E) return N is
5531 pragma Assert (Ekind (Id) = E_Entry_Family);
5532 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5533 end Entry_Index_Type;
5535 ---------------------
5536 -- First_Component --
5537 ---------------------
5539 function First_Component (Id : E) return E is
5544 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5546 Comp_Id := First_Entity (Id);
5547 while Present (Comp_Id) loop
5548 exit when Ekind (Comp_Id) = E_Component;
5549 Comp_Id := Next_Entity (Comp_Id);
5553 end First_Component;
5555 -------------------------------------
5556 -- First_Component_Or_Discriminant --
5557 -------------------------------------
5559 function First_Component_Or_Discriminant (Id : E) return E is
5564 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5566 Comp_Id := First_Entity (Id);
5567 while Present (Comp_Id) loop
5568 exit when Ekind (Comp_Id) = E_Component
5570 Ekind (Comp_Id) = E_Discriminant;
5571 Comp_Id := Next_Entity (Comp_Id);
5575 end First_Component_Or_Discriminant;
5577 ------------------------
5578 -- First_Discriminant --
5579 ------------------------
5581 function First_Discriminant (Id : E) return E is
5586 (Has_Discriminants (Id)
5587 or else Has_Unknown_Discriminants (Id));
5589 Ent := First_Entity (Id);
5591 -- The discriminants are not necessarily contiguous, because access
5592 -- discriminants will generate itypes. They are not the first entities
5593 -- either, because tag and controller record must be ahead of them.
5595 if Chars (Ent) = Name_uTag then
5596 Ent := Next_Entity (Ent);
5599 if Chars (Ent) = Name_uController then
5600 Ent := Next_Entity (Ent);
5603 -- Skip all hidden stored discriminants if any
5605 while Present (Ent) loop
5606 exit when Ekind (Ent) = E_Discriminant
5607 and then not Is_Completely_Hidden (Ent);
5609 Ent := Next_Entity (Ent);
5612 pragma Assert (Ekind (Ent) = E_Discriminant);
5615 end First_Discriminant;
5621 function First_Formal (Id : E) return E is
5626 (Is_Overloadable (Id)
5627 or else Ekind (Id) = E_Entry_Family
5628 or else Ekind (Id) = E_Subprogram_Body
5629 or else Ekind (Id) = E_Subprogram_Type);
5631 if Ekind (Id) = E_Enumeration_Literal then
5635 Formal := First_Entity (Id);
5637 if Present (Formal) and then Is_Formal (Formal) then
5645 ------------------------------
5646 -- First_Formal_With_Extras --
5647 ------------------------------
5649 function First_Formal_With_Extras (Id : E) return E is
5654 (Is_Overloadable (Id)
5655 or else Ekind (Id) = E_Entry_Family
5656 or else Ekind (Id) = E_Subprogram_Body
5657 or else Ekind (Id) = E_Subprogram_Type);
5659 if Ekind (Id) = E_Enumeration_Literal then
5663 Formal := First_Entity (Id);
5665 if Present (Formal) and then Is_Formal (Formal) then
5668 return Extra_Formals (Id); -- Empty if no extra formals
5671 end First_Formal_With_Extras;
5673 -------------------------------
5674 -- First_Stored_Discriminant --
5675 -------------------------------
5677 function First_Stored_Discriminant (Id : E) return E is
5680 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5681 -- Scans the Discriminants to see whether any are Completely_Hidden
5682 -- (the mechanism for describing non-specified stored discriminants)
5684 ----------------------------------------
5685 -- Has_Completely_Hidden_Discriminant --
5686 ----------------------------------------
5688 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5689 Ent : Entity_Id := Id;
5692 pragma Assert (Ekind (Id) = E_Discriminant);
5694 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5695 if Is_Completely_Hidden (Ent) then
5699 Ent := Next_Entity (Ent);
5703 end Has_Completely_Hidden_Discriminant;
5705 -- Start of processing for First_Stored_Discriminant
5709 (Has_Discriminants (Id)
5710 or else Has_Unknown_Discriminants (Id));
5712 Ent := First_Entity (Id);
5714 if Chars (Ent) = Name_uTag then
5715 Ent := Next_Entity (Ent);
5718 if Chars (Ent) = Name_uController then
5719 Ent := Next_Entity (Ent);
5722 if Has_Completely_Hidden_Discriminant (Ent) then
5724 while Present (Ent) loop
5725 exit when Is_Completely_Hidden (Ent);
5726 Ent := Next_Entity (Ent);
5731 pragma Assert (Ekind (Ent) = E_Discriminant);
5734 end First_Stored_Discriminant;
5740 function First_Subtype (Id : E) return E is
5741 B : constant Entity_Id := Base_Type (Id);
5742 F : constant Node_Id := Freeze_Node (B);
5746 -- If the base type has no freeze node, it is a type in standard,
5747 -- and always acts as its own first subtype unless it is one of
5748 -- the predefined integer types. If the type is formal, it is also
5749 -- a first subtype, and its base type has no freeze node. On the other
5750 -- hand, a subtype of a generic formal is not its own first_subtype.
5751 -- Its base type, if anonymous, is attached to the formal type decl.
5752 -- from which the first subtype is obtained.
5756 if B = Base_Type (Standard_Integer) then
5757 return Standard_Integer;
5759 elsif B = Base_Type (Standard_Long_Integer) then
5760 return Standard_Long_Integer;
5762 elsif B = Base_Type (Standard_Short_Short_Integer) then
5763 return Standard_Short_Short_Integer;
5765 elsif B = Base_Type (Standard_Short_Integer) then
5766 return Standard_Short_Integer;
5768 elsif B = Base_Type (Standard_Long_Long_Integer) then
5769 return Standard_Long_Long_Integer;
5771 elsif Is_Generic_Type (Id) then
5772 if Present (Parent (B)) then
5773 return Defining_Identifier (Parent (B));
5775 return Defining_Identifier (Associated_Node_For_Itype (B));
5782 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5783 -- then we use that link, otherwise (happens with some Itypes), we use
5784 -- the base type itself.
5787 Ent := First_Subtype_Link (F);
5789 if Present (Ent) then
5797 -------------------------------------
5798 -- Get_Attribute_Definition_Clause --
5799 -------------------------------------
5801 function Get_Attribute_Definition_Clause
5803 Id : Attribute_Id) return Node_Id
5808 N := First_Rep_Item (E);
5809 while Present (N) loop
5810 if Nkind (N) = N_Attribute_Definition_Clause
5811 and then Get_Attribute_Id (Chars (N)) = Id
5820 end Get_Attribute_Definition_Clause;
5826 function Get_Full_View (T : Entity_Id) return Entity_Id is
5828 if Ekind (T) = E_Incomplete_Type
5829 and then Present (Full_View (T))
5831 return Full_View (T);
5833 elsif Is_Class_Wide_Type (T)
5834 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5835 and then Present (Full_View (Root_Type (T)))
5837 return Class_Wide_Type (Full_View (Root_Type (T)));
5844 --------------------
5845 -- Get_Rep_Pragma --
5846 --------------------
5848 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5852 N := First_Rep_Item (E);
5853 while Present (N) loop
5854 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
5864 ------------------------
5865 -- Has_Attach_Handler --
5866 ------------------------
5868 function Has_Attach_Handler (Id : E) return B is
5872 pragma Assert (Is_Protected_Type (Id));
5874 Ritem := First_Rep_Item (Id);
5875 while Present (Ritem) loop
5876 if Nkind (Ritem) = N_Pragma
5877 and then Chars (Ritem) = Name_Attach_Handler
5881 Ritem := Next_Rep_Item (Ritem);
5886 end Has_Attach_Handler;
5888 -------------------------------------
5889 -- Has_Attribute_Definition_Clause --
5890 -------------------------------------
5892 function Has_Attribute_Definition_Clause
5894 Id : Attribute_Id) return Boolean
5897 return Present (Get_Attribute_Definition_Clause (E, Id));
5898 end Has_Attribute_Definition_Clause;
5904 function Has_Entries (Id : E) return B is
5905 Result : Boolean := False;
5909 pragma Assert (Is_Concurrent_Type (Id));
5911 Ent := First_Entity (Id);
5912 while Present (Ent) loop
5913 if Is_Entry (Ent) then
5918 Ent := Next_Entity (Ent);
5924 ----------------------------
5925 -- Has_Foreign_Convention --
5926 ----------------------------
5928 function Has_Foreign_Convention (Id : E) return B is
5930 return Convention (Id) >= Foreign_Convention'First;
5931 end Has_Foreign_Convention;
5933 ---------------------------
5934 -- Has_Interrupt_Handler --
5935 ---------------------------
5937 function Has_Interrupt_Handler (Id : E) return B is
5941 pragma Assert (Is_Protected_Type (Id));
5943 Ritem := First_Rep_Item (Id);
5944 while Present (Ritem) loop
5945 if Nkind (Ritem) = N_Pragma
5946 and then Chars (Ritem) = Name_Interrupt_Handler
5950 Ritem := Next_Rep_Item (Ritem);
5955 end Has_Interrupt_Handler;
5957 --------------------------
5958 -- Has_Private_Ancestor --
5959 --------------------------
5961 function Has_Private_Ancestor (Id : E) return B is
5962 R : constant Entity_Id := Root_Type (Id);
5963 T1 : Entity_Id := Id;
5967 if Is_Private_Type (T1) then
5977 end Has_Private_Ancestor;
5979 --------------------
5980 -- Has_Rep_Pragma --
5981 --------------------
5983 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5985 return Present (Get_Rep_Pragma (E, Nam));
5988 ------------------------------
5989 -- Implementation_Base_Type --
5990 ------------------------------
5992 function Implementation_Base_Type (Id : E) return E is
5997 Bastyp := Base_Type (Id);
5999 if Is_Incomplete_Or_Private_Type (Bastyp) then
6000 Imptyp := Underlying_Type (Bastyp);
6002 -- If we have an implementation type, then just return it,
6003 -- otherwise we return the Base_Type anyway. This can only
6004 -- happen in error situations and should avoid some error bombs.
6006 if Present (Imptyp) then
6007 return Base_Type (Imptyp);
6015 end Implementation_Base_Type;
6017 -----------------------
6018 -- Is_Always_Inlined --
6019 -----------------------
6021 function Is_Always_Inlined (Id : E) return B is
6025 Item := First_Rep_Item (Id);
6026 while Present (Item) loop
6027 if Nkind (Item) = N_Pragma
6028 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
6033 Next_Rep_Item (Item);
6037 end Is_Always_Inlined;
6039 ---------------------
6040 -- Is_Boolean_Type --
6041 ---------------------
6043 function Is_Boolean_Type (Id : E) return B is
6045 return Root_Type (Id) = Standard_Boolean;
6046 end Is_Boolean_Type;
6048 ---------------------
6049 -- Is_By_Copy_Type --
6050 ---------------------
6052 function Is_By_Copy_Type (Id : E) return B is
6054 -- If Id is a private type whose full declaration has not been seen,
6055 -- we assume for now that it is not a By_Copy type. Clearly this
6056 -- attribute should not be used before the type is frozen, but it is
6057 -- needed to build the associated record of a protected type. Another
6058 -- place where some lookahead for a full view is needed ???
6061 Is_Elementary_Type (Id)
6062 or else (Is_Private_Type (Id)
6063 and then Present (Underlying_Type (Id))
6064 and then Is_Elementary_Type (Underlying_Type (Id)));
6065 end Is_By_Copy_Type;
6067 --------------------------
6068 -- Is_By_Reference_Type --
6069 --------------------------
6071 -- This function knows too much semantics, it should be in sem_util ???
6073 function Is_By_Reference_Type (Id : E) return B is
6074 Btype : constant Entity_Id := Base_Type (Id);
6077 if Error_Posted (Id)
6078 or else Error_Posted (Btype)
6082 elsif Is_Private_Type (Btype) then
6084 Utyp : constant Entity_Id := Underlying_Type (Btype);
6089 return Is_By_Reference_Type (Utyp);
6093 elsif Is_Incomplete_Type (Btype) then
6095 Ftyp : constant Entity_Id := Full_View (Btype);
6100 return Is_By_Reference_Type (Ftyp);
6104 elsif Is_Concurrent_Type (Btype) then
6107 elsif Is_Record_Type (Btype) then
6108 if Is_Limited_Record (Btype)
6109 or else Is_Tagged_Type (Btype)
6110 or else Is_Volatile (Btype)
6119 C := First_Component (Btype);
6120 while Present (C) loop
6121 if Is_By_Reference_Type (Etype (C))
6122 or else Is_Volatile (Etype (C))
6127 C := Next_Component (C);
6134 elsif Is_Array_Type (Btype) then
6137 or else Is_By_Reference_Type (Component_Type (Btype))
6138 or else Is_Volatile (Component_Type (Btype))
6139 or else Has_Volatile_Components (Btype);
6144 end Is_By_Reference_Type;
6146 ---------------------
6147 -- Is_Derived_Type --
6148 ---------------------
6150 function Is_Derived_Type (Id : E) return B is
6155 and then Base_Type (Id) /= Root_Type (Id)
6156 and then not Is_Generic_Type (Id)
6157 and then not Is_Class_Wide_Type (Id)
6159 if not Is_Numeric_Type (Root_Type (Id)) then
6163 Par := Parent (First_Subtype (Id));
6165 return Present (Par)
6166 and then Nkind (Par) = N_Full_Type_Declaration
6167 and then Nkind (Type_Definition (Par))
6168 = N_Derived_Type_Definition;
6174 end Is_Derived_Type;
6176 ----------------------
6177 -- Is_Dynamic_Scope --
6178 ----------------------
6180 function Is_Dynamic_Scope (Id : E) return B is
6183 Ekind (Id) = E_Block
6185 Ekind (Id) = E_Function
6187 Ekind (Id) = E_Procedure
6189 Ekind (Id) = E_Subprogram_Body
6191 Ekind (Id) = E_Task_Type
6193 Ekind (Id) = E_Entry
6195 Ekind (Id) = E_Entry_Family
6197 Ekind (Id) = E_Return_Statement;
6198 end Is_Dynamic_Scope;
6200 --------------------
6201 -- Is_Entity_Name --
6202 --------------------
6204 function Is_Entity_Name (N : Node_Id) return Boolean is
6205 Kind : constant Node_Kind := Nkind (N);
6208 -- Identifiers, operator symbols, expanded names are entity names
6210 return Kind = N_Identifier
6211 or else Kind = N_Operator_Symbol
6212 or else Kind = N_Expanded_Name
6214 -- Attribute references are entity names if they refer to an entity.
6215 -- Note that we don't do this by testing for the presence of the
6216 -- Entity field in the N_Attribute_Reference node, since it may not
6217 -- have been set yet.
6219 or else (Kind = N_Attribute_Reference
6220 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6223 ---------------------------
6224 -- Is_Indefinite_Subtype --
6225 ---------------------------
6227 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
6228 K : constant Entity_Kind := Ekind (Id);
6231 if Is_Constrained (Id) then
6234 elsif K in Array_Kind
6235 or else K in Class_Wide_Kind
6236 or else Has_Unknown_Discriminants (Id)
6240 -- Known discriminants: indefinite if there are no default values
6242 elsif K in Record_Kind
6243 or else Is_Incomplete_Or_Private_Type (Id)
6244 or else Is_Concurrent_Type (Id)
6246 return (Has_Discriminants (Id)
6247 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
6252 end Is_Indefinite_Subtype;
6254 ---------------------
6255 -- Is_Limited_Type --
6256 ---------------------
6258 function Is_Limited_Type (Id : E) return B is
6259 Btype : constant E := Base_Type (Id);
6260 Rtype : constant E := Root_Type (Btype);
6263 if not Is_Type (Id) then
6266 elsif Ekind (Btype) = E_Limited_Private_Type
6267 or else Is_Limited_Composite (Btype)
6271 elsif Is_Concurrent_Type (Btype) then
6274 -- The Is_Limited_Record flag normally indicates that the type is
6275 -- limited. The exception is that a type does not inherit limitedness
6276 -- from its interface ancestor. So the type may be derived from a
6277 -- limited interface, but is not limited.
6279 elsif Is_Limited_Record (Id)
6280 and then not Is_Interface (Id)
6284 -- Otherwise we will look around to see if there is some other reason
6285 -- for it to be limited, except that if an error was posted on the
6286 -- entity, then just assume it is non-limited, because it can cause
6287 -- trouble to recurse into a murky erroneous entity!
6289 elsif Error_Posted (Id) then
6292 elsif Is_Record_Type (Btype) then
6294 if Is_Limited_Interface (Id) then
6297 -- AI-419: limitedness is not inherited from a limited interface
6299 elsif Is_Limited_Record (Rtype) then
6300 return not Is_Interface (Rtype)
6301 or else Is_Protected_Interface (Rtype)
6302 or else Is_Synchronized_Interface (Rtype)
6303 or else Is_Task_Interface (Rtype);
6305 elsif Is_Class_Wide_Type (Btype) then
6306 return Is_Limited_Type (Rtype);
6313 C := First_Component (Btype);
6314 while Present (C) loop
6315 if Is_Limited_Type (Etype (C)) then
6319 C := Next_Component (C);
6326 elsif Is_Array_Type (Btype) then
6327 return Is_Limited_Type (Component_Type (Btype));
6332 end Is_Limited_Type;
6334 -----------------------------------
6335 -- Is_Package_Or_Generic_Package --
6336 -----------------------------------
6338 function Is_Package_Or_Generic_Package (Id : E) return B is
6341 Ekind (Id) = E_Package
6343 Ekind (Id) = E_Generic_Package;
6344 end Is_Package_Or_Generic_Package;
6346 --------------------------
6347 -- Is_Protected_Private --
6348 --------------------------
6350 function Is_Protected_Private (Id : E) return B is
6352 pragma Assert (Ekind (Id) = E_Component);
6353 return Is_Protected_Type (Scope (Id));
6354 end Is_Protected_Private;
6356 ------------------------------
6357 -- Is_Protected_Record_Type --
6358 ------------------------------
6360 function Is_Protected_Record_Type (Id : E) return B is
6363 Is_Concurrent_Record_Type (Id)
6364 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6365 end Is_Protected_Record_Type;
6367 --------------------------------
6368 -- Is_Inherently_Limited_Type --
6369 --------------------------------
6371 function Is_Inherently_Limited_Type (Id : E) return B is
6372 Btype : constant Entity_Id := Base_Type (Id);
6375 if Is_Private_Type (Btype) then
6377 Utyp : constant Entity_Id := Underlying_Type (Btype);
6382 return Is_Inherently_Limited_Type (Utyp);
6386 elsif Is_Concurrent_Type (Btype) then
6389 elsif Is_Record_Type (Btype) then
6390 if Is_Limited_Record (Btype) then
6391 return not Is_Interface (Btype)
6392 or else Is_Protected_Interface (Btype)
6393 or else Is_Synchronized_Interface (Btype)
6394 or else Is_Task_Interface (Btype);
6396 elsif Is_Class_Wide_Type (Btype) then
6397 return Is_Inherently_Limited_Type (Root_Type (Btype));
6404 C := First_Component (Btype);
6405 while Present (C) loop
6406 if Is_Inherently_Limited_Type (Etype (C)) then
6410 C := Next_Component (C);
6417 elsif Is_Array_Type (Btype) then
6418 return Is_Inherently_Limited_Type (Component_Type (Btype));
6423 end Is_Inherently_Limited_Type;
6425 --------------------
6426 -- Is_String_Type --
6427 --------------------
6429 function Is_String_Type (Id : E) return B is
6431 return Ekind (Id) in String_Kind
6432 or else (Is_Array_Type (Id)
6433 and then Number_Dimensions (Id) = 1
6434 and then Is_Character_Type (Component_Type (Id)));
6437 -------------------------
6438 -- Is_Task_Record_Type --
6439 -------------------------
6441 function Is_Task_Record_Type (Id : E) return B is
6444 Is_Concurrent_Record_Type (Id)
6445 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6446 end Is_Task_Record_Type;
6448 ------------------------
6449 -- Is_Wrapper_Package --
6450 ------------------------
6452 function Is_Wrapper_Package (Id : E) return B is
6454 return (Ekind (Id) = E_Package
6455 and then Present (Related_Instance (Id)));
6456 end Is_Wrapper_Package;
6458 --------------------
6459 -- Next_Component --
6460 --------------------
6462 function Next_Component (Id : E) return E is
6466 Comp_Id := Next_Entity (Id);
6467 while Present (Comp_Id) loop
6468 exit when Ekind (Comp_Id) = E_Component;
6469 Comp_Id := Next_Entity (Comp_Id);
6475 ------------------------------------
6476 -- Next_Component_Or_Discriminant --
6477 ------------------------------------
6479 function Next_Component_Or_Discriminant (Id : E) return E is
6483 Comp_Id := Next_Entity (Id);
6484 while Present (Comp_Id) loop
6485 exit when Ekind (Comp_Id) = E_Component
6487 Ekind (Comp_Id) = E_Discriminant;
6488 Comp_Id := Next_Entity (Comp_Id);
6492 end Next_Component_Or_Discriminant;
6494 -----------------------
6495 -- Next_Discriminant --
6496 -----------------------
6498 -- This function actually implements both Next_Discriminant and
6499 -- Next_Stored_Discriminant by making sure that the Discriminant
6500 -- returned is of the same variety as Id.
6502 function Next_Discriminant (Id : E) return E is
6504 -- Derived Tagged types with private extensions look like this...
6506 -- E_Discriminant d1
6507 -- E_Discriminant d2
6509 -- E_Discriminant d1
6510 -- E_Discriminant d2
6513 -- so it is critical not to go past the leading discriminants
6518 pragma Assert (Ekind (Id) = E_Discriminant);
6521 D := Next_Entity (D);
6523 or else (Ekind (D) /= E_Discriminant
6524 and then not Is_Itype (D))
6529 exit when Ekind (D) = E_Discriminant
6530 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6534 end Next_Discriminant;
6540 function Next_Formal (Id : E) return E is
6544 -- Follow the chain of declared entities as long as the kind of the
6545 -- entity corresponds to a formal parameter. Skip internal entities
6546 -- that may have been created for implicit subtypes, in the process
6547 -- of analyzing default expressions.
6552 P := Next_Entity (P);
6554 if No (P) or else Is_Formal (P) then
6556 elsif not Is_Internal (P) then
6562 -----------------------------
6563 -- Next_Formal_With_Extras --
6564 -----------------------------
6566 function Next_Formal_With_Extras (Id : E) return E is
6568 if Present (Extra_Formal (Id)) then
6569 return Extra_Formal (Id);
6571 return Next_Formal (Id);
6573 end Next_Formal_With_Extras;
6579 function Next_Index (Id : Node_Id) return Node_Id is
6588 function Next_Literal (Id : E) return E is
6590 pragma Assert (Nkind (Id) in N_Entity);
6594 ------------------------------
6595 -- Next_Stored_Discriminant --
6596 ------------------------------
6598 function Next_Stored_Discriminant (Id : E) return E is
6600 -- See comment in Next_Discriminant
6602 return Next_Discriminant (Id);
6603 end Next_Stored_Discriminant;
6605 -----------------------
6606 -- Number_Dimensions --
6607 -----------------------
6609 function Number_Dimensions (Id : E) return Pos is
6614 if Ekind (Id) in String_Kind then
6619 T := First_Index (Id);
6620 while Present (T) loop
6627 end Number_Dimensions;
6629 --------------------------
6630 -- Number_Discriminants --
6631 --------------------------
6633 function Number_Discriminants (Id : E) return Pos is
6639 Discr := First_Discriminant (Id);
6640 while Present (Discr) loop
6642 Discr := Next_Discriminant (Discr);
6646 end Number_Discriminants;
6648 --------------------
6649 -- Number_Entries --
6650 --------------------
6652 function Number_Entries (Id : E) return Nat is
6657 pragma Assert (Is_Concurrent_Type (Id));
6660 Ent := First_Entity (Id);
6661 while Present (Ent) loop
6662 if Is_Entry (Ent) then
6666 Ent := Next_Entity (Ent);
6672 --------------------
6673 -- Number_Formals --
6674 --------------------
6676 function Number_Formals (Id : E) return Pos is
6682 Formal := First_Formal (Id);
6683 while Present (Formal) loop
6685 Formal := Next_Formal (Formal);
6691 --------------------
6692 -- Parameter_Mode --
6693 --------------------
6695 function Parameter_Mode (Id : E) return Formal_Kind is
6700 ---------------------
6701 -- Record_Rep_Item --
6702 ---------------------
6704 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6706 Set_Next_Rep_Item (N, First_Rep_Item (E));
6707 Set_First_Rep_Item (E, N);
6708 end Record_Rep_Item;
6714 function Root_Type (Id : E) return E is
6718 pragma Assert (Nkind (Id) in N_Entity);
6720 T := Base_Type (Id);
6722 if Ekind (T) = E_Class_Wide_Type then
6725 elsif Ekind (T) = E_Class_Wide_Subtype then
6726 return Etype (Base_Type (T));
6728 -- ??? T comes from Base_Type, how can it be a subtype?
6729 -- Also Base_Type is supposed to be idempotent, so either way
6730 -- this is equivalent to "return Etype (T)" and should be merged
6731 -- with the E_Class_Wide_Type case.
6742 -- Following test catches some error cases resulting from
6745 elsif No (Etyp) then
6748 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6751 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6757 -- Return if there is a circularity in the inheritance chain.
6758 -- This happens in some error situations and we do not want
6759 -- to get stuck in this loop.
6761 if T = Base_Type (Id) then
6767 raise Program_Error;
6774 function Scope_Depth (Id : E) return Uint is
6779 while Is_Record_Type (Scop) loop
6780 Scop := Scope (Scop);
6783 return Scope_Depth_Value (Scop);
6786 ---------------------
6787 -- Scope_Depth_Set --
6788 ---------------------
6790 function Scope_Depth_Set (Id : E) return B is
6792 return not Is_Record_Type (Id)
6793 and then Field22 (Id) /= Union_Id (Empty);
6794 end Scope_Depth_Set;
6796 -----------------------------
6797 -- Set_Component_Alignment --
6798 -----------------------------
6800 -- Component Alignment is encoded using two flags, Flag128/129 as
6801 -- follows. Note that both flags False = Align_Default, so that the
6802 -- default initialization of flags to False initializes component
6803 -- alignment to the default value as required.
6805 -- Flag128 Flag129 Value
6806 -- ------- ------- -----
6807 -- False False Calign_Default
6808 -- False True Calign_Component_Size
6809 -- True False Calign_Component_Size_4
6810 -- True True Calign_Storage_Unit
6812 procedure Set_Component_Alignment (Id : E; V : C) is
6814 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6815 and then Id = Base_Type (Id));
6818 when Calign_Default =>
6819 Set_Flag128 (Id, False);
6820 Set_Flag129 (Id, False);
6822 when Calign_Component_Size =>
6823 Set_Flag128 (Id, False);
6824 Set_Flag129 (Id, True);
6826 when Calign_Component_Size_4 =>
6827 Set_Flag128 (Id, True);
6828 Set_Flag129 (Id, False);
6830 when Calign_Storage_Unit =>
6831 Set_Flag128 (Id, True);
6832 Set_Flag129 (Id, True);
6834 end Set_Component_Alignment;
6840 function Size_Clause (Id : E) return N is
6842 return Rep_Clause (Id, Name_Size);
6845 ------------------------
6846 -- Stream_Size_Clause --
6847 ------------------------
6849 function Stream_Size_Clause (Id : E) return N is
6851 return Rep_Clause (Id, Name_Stream_Size);
6852 end Stream_Size_Clause;
6858 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6864 Kind := E_Access_Subtype;
6868 Kind := E_Array_Subtype;
6870 when E_Class_Wide_Type |
6871 E_Class_Wide_Subtype =>
6872 Kind := E_Class_Wide_Subtype;
6874 when E_Decimal_Fixed_Point_Type |
6875 E_Decimal_Fixed_Point_Subtype =>
6876 Kind := E_Decimal_Fixed_Point_Subtype;
6878 when E_Ordinary_Fixed_Point_Type |
6879 E_Ordinary_Fixed_Point_Subtype =>
6880 Kind := E_Ordinary_Fixed_Point_Subtype;
6882 when E_Private_Type |
6883 E_Private_Subtype =>
6884 Kind := E_Private_Subtype;
6886 when E_Limited_Private_Type |
6887 E_Limited_Private_Subtype =>
6888 Kind := E_Limited_Private_Subtype;
6890 when E_Record_Type_With_Private |
6891 E_Record_Subtype_With_Private =>
6892 Kind := E_Record_Subtype_With_Private;
6894 when E_Record_Type |
6896 Kind := E_Record_Subtype;
6898 when E_String_Type |
6900 Kind := E_String_Subtype;
6902 when Enumeration_Kind =>
6903 Kind := E_Enumeration_Subtype;
6906 Kind := E_Floating_Point_Subtype;
6908 when Signed_Integer_Kind =>
6909 Kind := E_Signed_Integer_Subtype;
6911 when Modular_Integer_Kind =>
6912 Kind := E_Modular_Integer_Subtype;
6914 when Protected_Kind =>
6915 Kind := E_Protected_Subtype;
6918 Kind := E_Task_Subtype;
6922 raise Program_Error;
6928 -------------------------
6929 -- First_Tag_Component --
6930 -------------------------
6932 function First_Tag_Component (Id : E) return E is
6934 Typ : Entity_Id := Id;
6937 pragma Assert (Is_Tagged_Type (Typ));
6939 if Is_Class_Wide_Type (Typ) then
6940 Typ := Root_Type (Typ);
6943 if Is_Private_Type (Typ) then
6944 Typ := Underlying_Type (Typ);
6946 -- If the underlying type is missing then the source program has
6947 -- errors and there is nothing else to do (the full-type declaration
6948 -- associated with the private type declaration is missing).
6955 Comp := First_Entity (Typ);
6956 while Present (Comp) loop
6957 if Is_Tag (Comp) then
6961 Comp := Next_Entity (Comp);
6964 -- No tag component found
6967 end First_Tag_Component;
6969 ------------------------
6970 -- Next_Tag_Component --
6971 ------------------------
6973 function Next_Tag_Component (Id : E) return E is
6975 Typ : constant Entity_Id := Scope (Id);
6978 pragma Assert (Ekind (Id) = E_Component
6979 and then Is_Tagged_Type (Typ));
6981 Comp := Next_Entity (Id);
6982 while Present (Comp) loop
6983 if Is_Tag (Comp) then
6984 pragma Assert (Chars (Comp) /= Name_uTag);
6988 Comp := Next_Entity (Comp);
6991 -- No tag component found
6994 end Next_Tag_Component;
6996 ---------------------
6997 -- Type_High_Bound --
6998 ---------------------
7000 function Type_High_Bound (Id : E) return Node_Id is
7001 Rng : constant Node_Id := Scalar_Range (Id);
7003 if Nkind (Rng) = N_Subtype_Indication then
7004 return High_Bound (Range_Expression (Constraint (Rng)));
7006 return High_Bound (Rng);
7008 end Type_High_Bound;
7010 --------------------
7011 -- Type_Low_Bound --
7012 --------------------
7014 function Type_Low_Bound (Id : E) return Node_Id is
7015 Rng : constant Node_Id := Scalar_Range (Id);
7017 if Nkind (Rng) = N_Subtype_Indication then
7018 return Low_Bound (Range_Expression (Constraint (Rng)));
7020 return Low_Bound (Rng);
7024 ---------------------
7025 -- Underlying_Type --
7026 ---------------------
7028 function Underlying_Type (Id : E) return E is
7030 -- For record_with_private the underlying type is always the direct
7031 -- full view. Never try to take the full view of the parent it
7032 -- doesn't make sense.
7034 if Ekind (Id) = E_Record_Type_With_Private then
7035 return Full_View (Id);
7037 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7039 -- If we have an incomplete or private type with a full view,
7040 -- then we return the Underlying_Type of this full view
7042 if Present (Full_View (Id)) then
7043 if Id = Full_View (Id) then
7045 -- Previous error in declaration
7050 return Underlying_Type (Full_View (Id));
7053 -- If we have an incomplete entity that comes from the limited
7054 -- view then we return the Underlying_Type of its non-limited
7057 elsif From_With_Type (Id)
7058 and then Present (Non_Limited_View (Id))
7060 return Underlying_Type (Non_Limited_View (Id));
7062 -- Otherwise check for the case where we have a derived type or
7063 -- subtype, and if so get the Underlying_Type of the parent type.
7065 elsif Etype (Id) /= Id then
7066 return Underlying_Type (Etype (Id));
7068 -- Otherwise we have an incomplete or private type that has
7069 -- no full view, which means that we have not encountered the
7070 -- completion, so return Empty to indicate the underlying type
7071 -- is not yet known.
7077 -- For non-incomplete, non-private types, return the type itself
7078 -- Also for entities that are not types at all return the entity
7084 end Underlying_Type;
7086 ------------------------
7087 -- Write_Entity_Flags --
7088 ------------------------
7090 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7092 procedure W (Flag_Name : String; Flag : Boolean);
7093 -- Write out given flag if it is set
7099 procedure W (Flag_Name : String; Flag : Boolean) is
7103 Write_Str (Flag_Name);
7104 Write_Str (" = True");
7109 -- Start of processing for Write_Entity_Flags
7112 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7113 and then Base_Type (Id) = Id
7116 Write_Str ("Component_Alignment = ");
7118 case Component_Alignment (Id) is
7119 when Calign_Default =>
7120 Write_Str ("Calign_Default");
7122 when Calign_Component_Size =>
7123 Write_Str ("Calign_Component_Size");
7125 when Calign_Component_Size_4 =>
7126 Write_Str ("Calign_Component_Size_4");
7128 when Calign_Storage_Unit =>
7129 Write_Str ("Calign_Storage_Unit");
7135 W ("Address_Taken", Flag104 (Id));
7136 W ("Body_Needed_For_SAL", Flag40 (Id));
7137 W ("C_Pass_By_Copy", Flag125 (Id));
7138 W ("Can_Never_Be_Null", Flag38 (Id));
7139 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7140 W ("Debug_Info_Off", Flag166 (Id));
7141 W ("Default_Expressions_Processed", Flag108 (Id));
7142 W ("Delay_Cleanups", Flag114 (Id));
7143 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7144 W ("Depends_On_Private", Flag14 (Id));
7145 W ("Discard_Names", Flag88 (Id));
7146 W ("Elaboration_Entity_Required", Flag174 (Id));
7147 W ("Elaborate_Body_Desirable", Flag210 (Id));
7148 W ("Entry_Accepted", Flag152 (Id));
7149 W ("Finalize_Storage_Only", Flag158 (Id));
7150 W ("From_With_Type", Flag159 (Id));
7151 W ("Function_Returns_With_DSP", Flag169 (Id));
7152 W ("Has_Aliased_Components", Flag135 (Id));
7153 W ("Has_Alignment_Clause", Flag46 (Id));
7154 W ("Has_All_Calls_Remote", Flag79 (Id));
7155 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7156 W ("Has_Atomic_Components", Flag86 (Id));
7157 W ("Has_Biased_Representation", Flag139 (Id));
7158 W ("Has_Completion", Flag26 (Id));
7159 W ("Has_Completion_In_Body", Flag71 (Id));
7160 W ("Has_Complex_Representation", Flag140 (Id));
7161 W ("Has_Component_Size_Clause", Flag68 (Id));
7162 W ("Has_Contiguous_Rep", Flag181 (Id));
7163 W ("Has_Controlled_Component", Flag43 (Id));
7164 W ("Has_Controlling_Result", Flag98 (Id));
7165 W ("Has_Convention_Pragma", Flag119 (Id));
7166 W ("Has_Delayed_Freeze", Flag18 (Id));
7167 W ("Has_Discriminants", Flag5 (Id));
7168 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7169 W ("Has_Exit", Flag47 (Id));
7170 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7171 W ("Has_Forward_Instantiation", Flag175 (Id));
7172 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7173 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7174 W ("Has_Homonym", Flag56 (Id));
7175 W ("Has_Initial_Value", Flag219 (Id));
7176 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7177 W ("Has_Master_Entity", Flag21 (Id));
7178 W ("Has_Missing_Return", Flag142 (Id));
7179 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7180 W ("Has_Non_Standard_Rep", Flag75 (Id));
7181 W ("Has_Object_Size_Clause", Flag172 (Id));
7182 W ("Has_Per_Object_Constraint", Flag154 (Id));
7183 W ("Has_Persistent_BSS", Flag188 (Id));
7184 W ("Has_Pragma_Controlled", Flag27 (Id));
7185 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7186 W ("Has_Pragma_Inline", Flag157 (Id));
7187 W ("Has_Pragma_Pack", Flag121 (Id));
7188 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7189 W ("Has_Pragma_Pure", Flag203 (Id));
7190 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7191 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7192 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7193 W ("Has_Primitive_Operations", Flag120 (Id));
7194 W ("Has_Private_Declaration", Flag155 (Id));
7195 W ("Has_Qualified_Name", Flag161 (Id));
7196 W ("Has_RACW", Flag214 (Id));
7197 W ("Has_Record_Rep_Clause", Flag65 (Id));
7198 W ("Has_Recursive_Call", Flag143 (Id));
7199 W ("Has_Size_Clause", Flag29 (Id));
7200 W ("Has_Small_Clause", Flag67 (Id));
7201 W ("Has_Specified_Layout", Flag100 (Id));
7202 W ("Has_Specified_Stream_Input", Flag190 (Id));
7203 W ("Has_Specified_Stream_Output", Flag191 (Id));
7204 W ("Has_Specified_Stream_Read", Flag192 (Id));
7205 W ("Has_Specified_Stream_Write", Flag193 (Id));
7206 W ("Has_Static_Discriminants", Flag211 (Id));
7207 W ("Has_Storage_Size_Clause", Flag23 (Id));
7208 W ("Has_Stream_Size_Clause", Flag184 (Id));
7209 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7210 W ("Has_Task", Flag30 (Id));
7211 W ("Has_Unchecked_Union", Flag123 (Id));
7212 W ("Has_Unknown_Discriminants", Flag72 (Id));
7213 W ("Has_Up_Level_Access", Flag215 (Id));
7214 W ("Has_Volatile_Components", Flag87 (Id));
7215 W ("Has_Xref_Entry", Flag182 (Id));
7216 W ("In_Package_Body", Flag48 (Id));
7217 W ("In_Private_Part", Flag45 (Id));
7218 W ("In_Use", Flag8 (Id));
7219 W ("Is_AST_Entry", Flag132 (Id));
7220 W ("Is_Abstract_Subprogram", Flag19 (Id));
7221 W ("Is_Abstract_Type", Flag146 (Id));
7222 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7223 W ("Is_Access_Constant", Flag69 (Id));
7224 W ("Is_Ada_2005_Only", Flag185 (Id));
7225 W ("Is_Aliased", Flag15 (Id));
7226 W ("Is_Asynchronous", Flag81 (Id));
7227 W ("Is_Atomic", Flag85 (Id));
7228 W ("Is_Bit_Packed_Array", Flag122 (Id));
7229 W ("Is_CPP_Class", Flag74 (Id));
7230 W ("Is_Called", Flag102 (Id));
7231 W ("Is_Character_Type", Flag63 (Id));
7232 W ("Is_Child_Unit", Flag73 (Id));
7233 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7234 W ("Is_Compilation_Unit", Flag149 (Id));
7235 W ("Is_Completely_Hidden", Flag103 (Id));
7236 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7237 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7238 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7239 W ("Is_Constrained", Flag12 (Id));
7240 W ("Is_Constructor", Flag76 (Id));
7241 W ("Is_Controlled", Flag42 (Id));
7242 W ("Is_Controlling_Formal", Flag97 (Id));
7243 W ("Is_Descendent_Of_Address", Flag223 (Id));
7244 W ("Is_Discrim_SO_Function", Flag176 (Id));
7245 W ("Is_Dispatching_Operation", Flag6 (Id));
7246 W ("Is_Eliminated", Flag124 (Id));
7247 W ("Is_Entry_Formal", Flag52 (Id));
7248 W ("Is_Exported", Flag99 (Id));
7249 W ("Is_First_Subtype", Flag70 (Id));
7250 W ("Is_For_Access_Subtype", Flag118 (Id));
7251 W ("Is_Formal_Subprogram", Flag111 (Id));
7252 W ("Is_Frozen", Flag4 (Id));
7253 W ("Is_Generic_Actual_Type", Flag94 (Id));
7254 W ("Is_Generic_Instance", Flag130 (Id));
7255 W ("Is_Generic_Type", Flag13 (Id));
7256 W ("Is_Hidden", Flag57 (Id));
7257 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7258 W ("Is_Immediately_Visible", Flag7 (Id));
7259 W ("Is_Imported", Flag24 (Id));
7260 W ("Is_Inlined", Flag11 (Id));
7261 W ("Is_Instantiated", Flag126 (Id));
7262 W ("Is_Interface", Flag186 (Id));
7263 W ("Is_Internal", Flag17 (Id));
7264 W ("Is_Interrupt_Handler", Flag89 (Id));
7265 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7266 W ("Is_Itype", Flag91 (Id));
7267 W ("Is_Known_Non_Null", Flag37 (Id));
7268 W ("Is_Known_Null", Flag204 (Id));
7269 W ("Is_Known_Valid", Flag170 (Id));
7270 W ("Is_Limited_Composite", Flag106 (Id));
7271 W ("Is_Limited_Interface", Flag197 (Id));
7272 W ("Is_Limited_Record", Flag25 (Id));
7273 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7274 W ("Is_Non_Static_Subtype", Flag109 (Id));
7275 W ("Is_Null_Init_Proc", Flag178 (Id));
7276 W ("Is_Obsolescent", Flag153 (Id));
7277 W ("Is_Optional_Parameter", Flag134 (Id));
7278 W ("Is_Overriding_Operation", Flag39 (Id));
7279 W ("Is_Package_Body_Entity", Flag160 (Id));
7280 W ("Is_Packed", Flag51 (Id));
7281 W ("Is_Packed_Array_Type", Flag138 (Id));
7282 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7283 W ("Is_Preelaborated", Flag59 (Id));
7284 W ("Is_Primitive_Wrapper", Flag195 (Id));
7285 W ("Is_Private_Composite", Flag107 (Id));
7286 W ("Is_Private_Descendant", Flag53 (Id));
7287 W ("Is_Protected_Interface", Flag198 (Id));
7288 W ("Is_Public", Flag10 (Id));
7289 W ("Is_Pure", Flag44 (Id));
7290 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7291 W ("Is_Raised", Flag224 (Id));
7292 W ("Is_Remote_Call_Interface", Flag62 (Id));
7293 W ("Is_Remote_Types", Flag61 (Id));
7294 W ("Is_Renaming_Of_Object", Flag112 (Id));
7295 W ("Is_Return_Object", Flag209 (Id));
7296 W ("Is_Shared_Passive", Flag60 (Id));
7297 W ("Is_Synchronized_Interface", Flag199 (Id));
7298 W ("Is_Statically_Allocated", Flag28 (Id));
7299 W ("Is_Tag", Flag78 (Id));
7300 W ("Is_Tagged_Type", Flag55 (Id));
7301 W ("Is_Task_Interface", Flag200 (Id));
7302 W ("Is_Thunk", Flag225 (Id));
7303 W ("Is_True_Constant", Flag163 (Id));
7304 W ("Is_Unchecked_Union", Flag117 (Id));
7305 W ("Is_Unsigned_Type", Flag144 (Id));
7306 W ("Is_VMS_Exception", Flag133 (Id));
7307 W ("Is_Valued_Procedure", Flag127 (Id));
7308 W ("Is_Visible_Child_Unit", Flag116 (Id));
7309 W ("Is_Visible_Formal", Flag206 (Id));
7310 W ("Is_Volatile", Flag16 (Id));
7311 W ("Itype_Printed", Flag202 (Id));
7312 W ("Kill_Elaboration_Checks", Flag32 (Id));
7313 W ("Kill_Range_Checks", Flag33 (Id));
7314 W ("Kill_Tag_Checks", Flag34 (Id));
7315 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7316 W ("Low_Bound_Known", Flag205 (Id));
7317 W ("Machine_Radix_10", Flag84 (Id));
7318 W ("Materialize_Entity", Flag168 (Id));
7319 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7320 W ("Must_Have_Preelab_Init", Flag208 (Id));
7321 W ("Needs_Debug_Info", Flag147 (Id));
7322 W ("Needs_No_Actuals", Flag22 (Id));
7323 W ("Never_Set_In_Source", Flag115 (Id));
7324 W ("No_Pool_Assigned", Flag131 (Id));
7325 W ("No_Return", Flag113 (Id));
7326 W ("No_Strict_Aliasing", Flag136 (Id));
7327 W ("Non_Binary_Modulus", Flag58 (Id));
7328 W ("Nonzero_Is_True", Flag162 (Id));
7329 W ("Reachable", Flag49 (Id));
7330 W ("Referenced", Flag156 (Id));
7331 W ("Referenced_As_LHS", Flag36 (Id));
7332 W ("Requires_Overriding", Flag213 (Id));
7333 W ("Return_Present", Flag54 (Id));
7334 W ("Returns_By_Ref", Flag90 (Id));
7335 W ("Reverse_Bit_Order", Flag164 (Id));
7336 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7337 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7338 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7339 W ("Static_Elaboration_Desired", Flag77 (Id));
7340 W ("Strict_Alignment", Flag145 (Id));
7341 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7342 W ("Suppress_Init_Proc", Flag105 (Id));
7343 W ("Suppress_Style_Checks", Flag165 (Id));
7344 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7345 W ("Is_Primitive", Flag218 (Id));
7346 W ("Treat_As_Volatile", Flag41 (Id));
7347 W ("Universal_Aliasing", Flag216 (Id));
7348 W ("Used_As_Generic_Actual", Flag222 (Id));
7349 W ("Uses_Sec_Stack", Flag95 (Id));
7350 W ("Vax_Float", Flag151 (Id));
7351 W ("Warnings_Off", Flag96 (Id));
7352 W ("Was_Hidden", Flag196 (Id));
7353 end Write_Entity_Flags;
7355 -----------------------
7356 -- Write_Entity_Info --
7357 -----------------------
7359 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7361 procedure Write_Attribute (Which : String; Nam : E);
7362 -- Write attribute value with given string name
7364 procedure Write_Kind (Id : Entity_Id);
7365 -- Write Ekind field of entity
7367 ---------------------
7368 -- Write_Attribute --
7369 ---------------------
7371 procedure Write_Attribute (Which : String; Nam : E) is
7375 Write_Int (Int (Nam));
7377 Write_Name (Chars (Nam));
7379 end Write_Attribute;
7385 procedure Write_Kind (Id : Entity_Id) is
7386 K : constant String := Entity_Kind'Image (Ekind (Id));
7390 Write_Str (" Kind ");
7392 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7393 Write_Str ("TAGGED ");
7396 Write_Str (K (3 .. K'Length));
7399 if Is_Type (Id) and then Depends_On_Private (Id) then
7400 Write_Str ("Depends_On_Private ");
7404 -- Start of processing for Write_Entity_Info
7408 Write_Attribute ("Name ", Id);
7409 Write_Int (Int (Id));
7413 Write_Attribute (" Type ", Etype (Id));
7415 Write_Attribute (" Scope ", Scope (Id));
7420 when Discrete_Kind =>
7421 Write_Str ("Bounds: Id = ");
7423 if Present (Scalar_Range (Id)) then
7424 Write_Int (Int (Type_Low_Bound (Id)));
7425 Write_Str (" .. Id = ");
7426 Write_Int (Int (Type_High_Bound (Id)));
7428 Write_Str ("Empty");
7439 (" Component Type ", Component_Type (Id));
7442 Write_Str (" Indices ");
7444 Index := First_Index (Id);
7445 while Present (Index) loop
7446 Write_Attribute (" ", Etype (Index));
7447 Index := Next_Index (Index);
7455 (" Directly Designated Type ",
7456 Directly_Designated_Type (Id));
7459 when Overloadable_Kind =>
7460 if Present (Homonym (Id)) then
7461 Write_Str (" Homonym ");
7462 Write_Name (Chars (Homonym (Id)));
7464 Write_Int (Int (Homonym (Id)));
7471 if Ekind (Scope (Id)) in Record_Kind then
7473 " Original_Record_Component ",
7474 Original_Record_Component (Id));
7475 Write_Int (Int (Original_Record_Component (Id)));
7479 when others => null;
7481 end Write_Entity_Info;
7483 -----------------------
7484 -- Write_Field6_Name --
7485 -----------------------
7487 procedure Write_Field6_Name (Id : Entity_Id) is
7488 pragma Warnings (Off, Id);
7490 Write_Str ("First_Rep_Item");
7491 end Write_Field6_Name;
7493 -----------------------
7494 -- Write_Field7_Name --
7495 -----------------------
7497 procedure Write_Field7_Name (Id : Entity_Id) is
7498 pragma Warnings (Off, Id);
7500 Write_Str ("Freeze_Node");
7501 end Write_Field7_Name;
7503 -----------------------
7504 -- Write_Field8_Name --
7505 -----------------------
7507 procedure Write_Field8_Name (Id : Entity_Id) is
7512 Write_Str ("Normalized_First_Bit");
7516 E_Subprogram_Body =>
7517 Write_Str ("Mechanism");
7520 Write_Str ("Associated_Node_For_Itype");
7523 Write_Str ("Dependent_Instances");
7525 when E_Return_Statement =>
7526 Write_Str ("Return_Applies_To");
7529 Write_Str ("Hiding_Loop_Variable");
7532 Write_Str ("Field8??");
7534 end Write_Field8_Name;
7536 -----------------------
7537 -- Write_Field9_Name --
7538 -----------------------
7540 procedure Write_Field9_Name (Id : Entity_Id) is
7544 Write_Str ("Class_Wide_Type");
7547 E_Generic_Function |
7549 E_Generic_Procedure |
7552 Write_Str ("Renaming_Map");
7555 Write_Str ("Current_Value");
7558 Write_Str ("Field9??");
7560 end Write_Field9_Name;
7562 ------------------------
7563 -- Write_Field10_Name --
7564 ------------------------
7566 procedure Write_Field10_Name (Id : Entity_Id) is
7570 Write_Str ("Referenced_Object");
7572 when E_In_Parameter |
7574 Write_Str ("Discriminal_Link");
7580 Write_Str ("Handler_Records");
7584 Write_Str ("Normalized_Position_Max");
7587 Write_Str ("Field10??");
7589 end Write_Field10_Name;
7591 ------------------------
7592 -- Write_Field11_Name --
7593 ------------------------
7595 procedure Write_Field11_Name (Id : Entity_Id) is
7599 Write_Str ("Entry_Component");
7603 Write_Str ("Component_Bit_Offset");
7606 Write_Str ("Full_View");
7608 when E_Enumeration_Literal =>
7609 Write_Str ("Enumeration_Pos");
7612 Write_Str ("Block_Node");
7618 Write_Str ("Protected_Body_Subprogram");
7620 when E_Generic_Package =>
7621 Write_Str ("Generic_Homonym");
7624 Write_Str ("Full_View");
7627 Write_Str ("Field11??");
7629 end Write_Field11_Name;
7631 ------------------------
7632 -- Write_Field12_Name --
7633 ------------------------
7635 procedure Write_Field12_Name (Id : Entity_Id) is
7639 Write_Str ("Barrier_Function");
7641 when E_Enumeration_Literal =>
7642 Write_Str ("Enumeration_Rep");
7650 E_In_Out_Parameter |
7654 Write_Str ("Esize");
7658 Write_Str ("Next_Inlined_Subprogram");
7661 Write_Str ("Associated_Formal_Package");
7664 Write_Str ("Field12??");
7666 end Write_Field12_Name;
7668 ------------------------
7669 -- Write_Field13_Name --
7670 ------------------------
7672 procedure Write_Field13_Name (Id : Entity_Id) is
7676 Write_Str ("RM_Size");
7680 Write_Str ("Component_Clause");
7683 if not Comes_From_Source (Id)
7685 Chars (Id) = Name_Op_Ne
7687 Write_Str ("Corresponding_Equality");
7689 elsif Comes_From_Source (Id) then
7690 Write_Str ("Elaboration_Entity");
7693 Write_Str ("Field13??");
7698 Write_Str ("Extra_Accessibility");
7702 Generic_Unit_Kind =>
7703 Write_Str ("Elaboration_Entity");
7706 Write_Str ("Field13??");
7708 end Write_Field13_Name;
7710 -----------------------
7711 -- Write_Field14_Name --
7712 -----------------------
7714 procedure Write_Field14_Name (Id : Entity_Id) is
7723 Write_Str ("Alignment");
7727 Write_Str ("Normalized_Position");
7731 Write_Str ("First_Optional_Parameter");
7734 E_Generic_Package =>
7735 Write_Str ("Shadow_Entities");
7738 Write_Str ("Field14??");
7740 end Write_Field14_Name;
7742 ------------------------
7743 -- Write_Field15_Name --
7744 ------------------------
7746 procedure Write_Field15_Name (Id : Entity_Id) is
7751 Write_Str ("Storage_Size_Variable");
7753 when Class_Wide_Kind |
7757 Write_Str ("Primitive_Operations");
7760 Write_Str ("DT_Entry_Count");
7762 when Decimal_Fixed_Point_Kind =>
7763 Write_Str ("Scale_Value");
7765 when E_Discriminant =>
7766 Write_Str ("Discriminant_Number");
7769 Write_Str ("Extra_Formal");
7773 Write_Str ("DT_Position");
7776 Write_Str ("Entry_Parameters_Type");
7778 when Enumeration_Kind =>
7779 Write_Str ("Lit_Indexes");
7783 Write_Str ("Related_Instance");
7785 when E_Protected_Type =>
7786 Write_Str ("Entry_Bodies_Array");
7788 when E_String_Literal_Subtype =>
7789 Write_Str ("String_Literal_Low_Bound");
7792 Write_Str ("Shared_Var_Read_Proc");
7795 Write_Str ("Field15??");
7797 end Write_Field15_Name;
7799 ------------------------
7800 -- Write_Field16_Name --
7801 ------------------------
7803 procedure Write_Field16_Name (Id : Entity_Id) is
7807 Write_Str ("Entry_Formal");
7811 Write_Str ("DTC_Entity");
7816 Write_Str ("First_Private_Entity");
7818 when E_Record_Type |
7819 E_Record_Type_With_Private =>
7820 Write_Str ("Access_Disp_Table");
7822 when E_String_Literal_Subtype =>
7823 Write_Str ("String_Literal_Length");
7825 when Enumeration_Kind =>
7826 Write_Str ("Lit_Strings");
7830 Write_Str ("Unset_Reference");
7832 when E_Record_Subtype |
7833 E_Class_Wide_Subtype =>
7834 Write_Str ("Cloned_Subtype");
7837 Write_Str ("Field16??");
7839 end Write_Field16_Name;
7841 ------------------------
7842 -- Write_Field17_Name --
7843 ------------------------
7845 procedure Write_Field17_Name (Id : Entity_Id) is
7849 Write_Str ("Digits_Value");
7852 Write_Str ("Prival");
7854 when E_Discriminant =>
7855 Write_Str ("Discriminal");
7864 E_Generic_Function |
7866 E_Generic_Procedure |
7874 E_Return_Statement |
7876 E_Subprogram_Type =>
7877 Write_Str ("First_Entity");
7880 Write_Str ("First_Index");
7882 when E_Protected_Body =>
7883 Write_Str ("Object_Ref");
7885 when Enumeration_Kind =>
7886 Write_Str ("First_Literal");
7889 Write_Str ("Master_Id");
7891 when Modular_Integer_Kind =>
7892 Write_Str ("Modulus");
7896 E_Generic_In_Out_Parameter |
7898 Write_Str ("Actual_Subtype");
7900 when E_Incomplete_Type =>
7901 Write_Str ("Non_Limited_View");
7903 when E_Incomplete_Subtype =>
7904 if From_With_Type (Id) then
7905 Write_Str ("Non_Limited_View");
7909 Write_Str ("Field17??");
7911 end Write_Field17_Name;
7913 ------------------------
7914 -- Write_Field18_Name --
7915 ------------------------
7917 procedure Write_Field18_Name (Id : Entity_Id) is
7920 when E_Enumeration_Literal |
7924 Write_Str ("Alias");
7926 when E_Record_Type =>
7927 Write_Str ("Corresponding_Concurrent_Type");
7929 when E_Entry_Index_Parameter =>
7930 Write_Str ("Entry_Index_Constant");
7932 when E_Class_Wide_Subtype |
7933 E_Access_Protected_Subprogram_Type |
7934 E_Anonymous_Access_Protected_Subprogram_Type |
7935 E_Access_Subprogram_Type |
7937 Write_Str ("Equivalent_Type");
7939 when Fixed_Point_Kind =>
7940 Write_Str ("Delta_Value");
7943 Write_Str ("Renamed_Object");
7947 E_Generic_Function |
7948 E_Generic_Procedure |
7949 E_Generic_Package =>
7950 Write_Str ("Renamed_Entity");
7952 when Incomplete_Or_Private_Kind =>
7953 Write_Str ("Private_Dependents");
7955 when Concurrent_Kind =>
7956 Write_Str ("Corresponding_Record_Type");
7961 Write_Str ("Enclosing_Scope");
7964 Write_Str ("Field18??");
7966 end Write_Field18_Name;
7968 -----------------------
7969 -- Write_Field19_Name --
7970 -----------------------
7972 procedure Write_Field19_Name (Id : Entity_Id) is
7977 Write_Str ("Related_Array_Object");
7983 E_Return_Statement |
7985 Write_Str ("Finalization_Chain_Entity");
7987 when E_Constant | E_Variable =>
7988 Write_Str ("Size_Check_Code");
7990 when E_Discriminant =>
7991 Write_Str ("Corresponding_Discriminant");
7994 E_Generic_Package =>
7995 Write_Str ("Body_Entity");
7997 when E_Package_Body |
7999 Write_Str ("Spec_Entity");
8001 when Private_Kind =>
8002 Write_Str ("Underlying_Full_View");
8004 when E_Record_Type =>
8005 Write_Str ("Parent_Subtype");
8008 Write_Str ("Field19??");
8010 end Write_Field19_Name;
8012 -----------------------
8013 -- Write_Field20_Name --
8014 -----------------------
8016 procedure Write_Field20_Name (Id : Entity_Id) is
8020 Write_Str ("Component_Type");
8022 when E_In_Parameter |
8023 E_Generic_In_Parameter =>
8024 Write_Str ("Default_Value");
8027 Write_Str ("Directly_Designated_Type");
8030 Write_Str ("Discriminant_Checking_Func");
8032 when E_Discriminant =>
8033 Write_Str ("Discriminant_Default_Value");
8042 E_Generic_Function |
8044 E_Generic_Procedure |
8052 E_Return_Statement |
8054 E_Subprogram_Type =>
8056 Write_Str ("Last_Entity");
8059 Write_Str ("Scalar_Range");
8062 Write_Str ("Register_Exception_Call");
8065 Write_Str ("Field20??");
8067 end Write_Field20_Name;
8069 -----------------------
8070 -- Write_Field21_Name --
8071 -----------------------
8073 procedure Write_Field21_Name (Id : Entity_Id) is
8079 E_Generic_Function |
8081 E_Generic_Procedure |
8083 Write_Str ("Interface_Name");
8085 when Concurrent_Kind |
8086 Incomplete_Or_Private_Kind |
8090 Write_Str ("Discriminant_Constraint");
8093 Write_Str ("Accept_Address");
8095 when Fixed_Point_Kind =>
8096 Write_Str ("Small_Value");
8098 when E_In_Parameter =>
8099 Write_Str ("Default_Expr_Function");
8102 Modular_Integer_Kind =>
8103 Write_Str ("Original_Array_Type");
8106 Write_Str ("Field21??");
8108 end Write_Field21_Name;
8110 -----------------------
8111 -- Write_Field22_Name --
8112 -----------------------
8114 procedure Write_Field22_Name (Id : Entity_Id) is
8118 Write_Str ("Associated_Storage_Pool");
8121 Write_Str ("Component_Size");
8125 Write_Str ("Original_Record_Component");
8127 when E_Enumeration_Literal =>
8128 Write_Str ("Enumeration_Rep_Expr");
8131 Write_Str ("Exception_Code");
8134 Write_Str ("Protected_Formal");
8136 when E_Record_Type =>
8137 Write_Str ("Corresponding_Remote_Type");
8147 E_Generic_Function |
8148 E_Generic_Procedure |
8151 E_Return_Statement |
8154 Write_Str ("Scope_Depth_Value");
8156 when E_Record_Type_With_Private |
8157 E_Record_Subtype_With_Private |
8160 E_Limited_Private_Type |
8161 E_Limited_Private_Subtype =>
8162 Write_Str ("Private_View");
8165 Write_Str ("Shared_Var_Assign_Proc");
8168 Write_Str ("Field22??");
8170 end Write_Field22_Name;
8172 ------------------------
8173 -- Write_Field23_Name --
8174 ------------------------
8176 procedure Write_Field23_Name (Id : Entity_Id) is
8180 Write_Str ("Associated_Final_Chain");
8183 Write_Str ("Packed_Array_Type");
8186 Write_Str ("Entry_Cancel_Parameter");
8189 Write_Str ("Protected_Operation");
8191 when E_Discriminant =>
8192 Write_Str ("CR_Discriminant");
8194 when E_Enumeration_Type =>
8195 Write_Str ("Enum_Pos_To_Rep");
8199 Write_Str ("Extra_Constrained");
8201 when E_Generic_Function |
8203 E_Generic_Procedure =>
8204 Write_Str ("Inner_Instances");
8206 when Concurrent_Kind |
8207 Incomplete_Or_Private_Kind |
8211 Write_Str ("Stored_Constraint");
8215 Write_Str ("Generic_Renamings");
8218 if Is_Generic_Instance (Id) then
8219 Write_Str ("Generic_Renamings");
8221 Write_Str ("Limited_View");
8224 -- What about Privals_Chain for protected operations ???
8227 Write_Str ("Privals_Chain");
8230 Write_Str ("Field23??");
8232 end Write_Field23_Name;
8234 ------------------------
8235 -- Write_Field24_Name --
8236 ------------------------
8238 procedure Write_Field24_Name (Id : Entity_Id) is
8239 pragma Warnings (Off, Id);
8241 Write_Str ("Obsolescent_Warning");
8242 end Write_Field24_Name;
8244 ------------------------
8245 -- Write_Field25_Name --
8246 ------------------------
8248 procedure Write_Field25_Name (Id : Entity_Id) is
8252 Write_Str ("DT_Offset_To_Top_Func");
8256 Write_Str ("Abstract_Interface_Alias");
8259 Write_Str ("Current_Use_Clause");
8261 when E_Record_Type |
8263 E_Record_Type_With_Private |
8264 E_Record_Subtype_With_Private =>
8265 Write_Str ("Abstract_Interfaces");
8268 Write_Str ("Task_Body_Procedure");
8271 Write_Str ("Debug_Renaming_Link");
8274 Write_Str ("Field25??");
8276 end Write_Field25_Name;
8278 ------------------------
8279 -- Write_Field26_Name --
8280 ------------------------
8282 procedure Write_Field26_Name (Id : Entity_Id) is
8287 Write_Str ("Related_Interface");
8289 when E_Generic_Package |
8291 Write_Str ("Package_Instantiation");
8296 if Is_Dispatching_Operation (Id) then
8297 Write_Str ("Overridden_Operation");
8299 Write_Str ("Static_Initialization");
8302 when E_Record_Type |
8303 E_Record_Type_With_Private =>
8304 Write_Str ("Dispatch_Table_Wrapper");
8306 when E_In_Out_Parameter |
8309 Write_Str ("Last_Assignment");
8312 Write_Str ("Field26??");
8314 end Write_Field26_Name;
8316 ------------------------
8317 -- Write_Field27_Name --
8318 ------------------------
8320 procedure Write_Field27_Name (Id : Entity_Id) is
8324 Write_Str ("Wrapped_Entity");
8327 Write_Str ("Field27??");
8329 end Write_Field27_Name;
8331 ------------------------
8332 -- Write_Field28_Name --
8333 ------------------------
8335 procedure Write_Field28_Name (Id : Entity_Id) is
8338 when E_Procedure | E_Function | E_Entry =>
8339 Write_Str ("Extra_Formals");
8342 Write_Str ("Field28??");
8344 end Write_Field28_Name;
8346 -------------------------
8347 -- Iterator Procedures --
8348 -------------------------
8350 procedure Proc_Next_Component (N : in out Node_Id) is
8352 N := Next_Component (N);
8353 end Proc_Next_Component;
8355 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8357 N := Next_Component (N);
8358 end Proc_Next_Component_Or_Discriminant;
8360 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8362 N := Next_Discriminant (N);
8363 end Proc_Next_Discriminant;
8365 procedure Proc_Next_Formal (N : in out Node_Id) is
8367 N := Next_Formal (N);
8368 end Proc_Next_Formal;
8370 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8372 N := Next_Formal_With_Extras (N);
8373 end Proc_Next_Formal_With_Extras;
8375 procedure Proc_Next_Index (N : in out Node_Id) is
8377 N := Next_Index (N);
8378 end Proc_Next_Index;
8380 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8382 N := Next_Inlined_Subprogram (N);
8383 end Proc_Next_Inlined_Subprogram;
8385 procedure Proc_Next_Literal (N : in out Node_Id) is
8387 N := Next_Literal (N);
8388 end Proc_Next_Literal;
8390 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8392 N := Next_Stored_Discriminant (N);
8393 end Proc_Next_Stored_Discriminant;