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_Assignment Node20
178 -- Last_Entity Node20
179 -- Register_Exception_Call Node20
180 -- Scalar_Range Node20
182 -- Accept_Address Elist21
183 -- Default_Expr_Function Node21
184 -- Discriminant_Constraint Elist21
185 -- Interface_Name Node21
186 -- Original_Array_Type Node21
187 -- Small_Value Ureal21
189 -- Associated_Storage_Pool Node22
190 -- Component_Size Uint22
191 -- Corresponding_Remote_Type Node22
192 -- Enumeration_Rep_Expr Node22
193 -- Exception_Code Uint22
194 -- Original_Record_Component Node22
195 -- Private_View Node22
196 -- Protected_Formal Node22
197 -- Scope_Depth_Value Uint22
198 -- Shared_Var_Assign_Proc Node22
200 -- Associated_Final_Chain Node23
201 -- CR_Discriminant Node23
202 -- Stored_Constraint Elist23
203 -- Entry_Cancel_Parameter Node23
204 -- Extra_Constrained Node23
205 -- Generic_Renamings Elist23
206 -- Inner_Instances Elist23
207 -- Enum_Pos_To_Rep Node23
208 -- Packed_Array_Type Node23
209 -- Limited_View Node23
210 -- Privals_Chain Elist23
211 -- Protected_Operation Node23
213 -- Abstract_Interface_Alias Node25
214 -- Abstract_Interfaces Elist25
215 -- Current_Use_Clause Node25
216 -- Debug_Renaming_Link Node25
217 -- DT_Offset_To_Top_Func Node25
218 -- Task_Body_Procedure Node25
220 -- Overridden_Operation Node26
221 -- Package_Instantiation Node26
222 -- Related_Interface Node26
223 -- Static_Initialization Node26
225 -- Wrapped_Entity Node27
227 -- Extra_Formals Node28
229 ---------------------------------------------
230 -- Usage of Flags in Defining Entity Nodes --
231 ---------------------------------------------
233 -- All flags are unique, there is no overlaying, so each flag is physically
234 -- present in every entity. However, for many of the flags, it only makes
235 -- sense for them to be set true for certain subsets of entity kinds. See
236 -- the spec of Einfo for further details.
238 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
239 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
240 -- which are common to all nodes, including entity nodes.
243 -- Has_Discriminants Flag5
244 -- Is_Dispatching_Operation Flag6
245 -- Is_Immediately_Visible Flag7
247 -- Is_Potentially_Use_Visible Flag9
251 -- Is_Constrained Flag12
252 -- Is_Generic_Type Flag13
253 -- Depends_On_Private Flag14
255 -- Is_Volatile Flag16
256 -- Is_Internal Flag17
257 -- Has_Delayed_Freeze Flag18
258 -- Is_Abstract_Subprogram Flag19
259 -- Is_Concurrent_Record_Type Flag20
261 -- Has_Master_Entity Flag21
262 -- Needs_No_Actuals Flag22
263 -- Has_Storage_Size_Clause Flag23
264 -- Is_Imported Flag24
265 -- Is_Limited_Record Flag25
266 -- Has_Completion Flag26
267 -- Has_Pragma_Controlled Flag27
268 -- Is_Statically_Allocated Flag28
269 -- Has_Size_Clause Flag29
272 -- Checks_May_Be_Suppressed Flag31
273 -- Kill_Elaboration_Checks Flag32
274 -- Kill_Range_Checks Flag33
275 -- Kill_Tag_Checks Flag34
276 -- Is_Class_Wide_Equivalent_Type Flag35
277 -- Referenced_As_LHS Flag36
278 -- Is_Known_Non_Null Flag37
279 -- Can_Never_Be_Null Flag38
280 -- Is_Overriding_Operation Flag39
281 -- Body_Needed_For_SAL Flag40
283 -- Treat_As_Volatile Flag41
284 -- Is_Controlled Flag42
285 -- Has_Controlled_Component Flag43
287 -- In_Private_Part Flag45
288 -- Has_Alignment_Clause Flag46
290 -- In_Package_Body Flag48
292 -- Delay_Subprogram_Descriptors Flag50
295 -- Is_Entry_Formal Flag52
296 -- Is_Private_Descendant Flag53
297 -- Return_Present Flag54
298 -- Is_Tagged_Type Flag55
299 -- Has_Homonym Flag56
301 -- Non_Binary_Modulus Flag58
302 -- Is_Preelaborated Flag59
303 -- Is_Shared_Passive Flag60
305 -- Is_Remote_Types Flag61
306 -- Is_Remote_Call_Interface Flag62
307 -- Is_Character_Type Flag63
308 -- Is_Intrinsic_Subprogram Flag64
309 -- Has_Record_Rep_Clause Flag65
310 -- Has_Enumeration_Rep_Clause Flag66
311 -- Has_Small_Clause Flag67
312 -- Has_Component_Size_Clause Flag68
313 -- Is_Access_Constant Flag69
314 -- Is_First_Subtype Flag70
316 -- Has_Completion_In_Body Flag71
317 -- Has_Unknown_Discriminants Flag72
318 -- Is_Child_Unit Flag73
319 -- Is_CPP_Class Flag74
320 -- Has_Non_Standard_Rep Flag75
321 -- Is_Constructor Flag76
322 -- Static_Elaboration_Desired Flag77
324 -- Has_All_Calls_Remote Flag79
325 -- Is_Constr_Subt_For_U_Nominal Flag80
327 -- Is_Asynchronous Flag81
328 -- Has_Gigi_Rep_Item Flag82
329 -- Has_Machine_Radix_Clause Flag83
330 -- Machine_Radix_10 Flag84
332 -- Has_Atomic_Components Flag86
333 -- Has_Volatile_Components Flag87
334 -- Discard_Names Flag88
335 -- Is_Interrupt_Handler Flag89
336 -- Returns_By_Ref Flag90
339 -- Size_Known_At_Compile_Time Flag92
340 -- Has_Subprogram_Descriptor Flag93
341 -- Is_Generic_Actual_Type Flag94
342 -- Uses_Sec_Stack Flag95
343 -- Warnings_Off Flag96
344 -- Is_Controlling_Formal Flag97
345 -- Has_Controlling_Result Flag98
346 -- Is_Exported Flag99
347 -- Has_Specified_Layout Flag100
349 -- Has_Nested_Block_With_Handler Flag101
351 -- Is_Completely_Hidden Flag103
352 -- Address_Taken Flag104
353 -- Suppress_Init_Proc Flag105
354 -- Is_Limited_Composite Flag106
355 -- Is_Private_Composite Flag107
356 -- Default_Expressions_Processed Flag108
357 -- Is_Non_Static_Subtype Flag109
358 -- Has_External_Tag_Rep_Clause Flag110
360 -- Is_Formal_Subprogram Flag111
361 -- Is_Renaming_Of_Object Flag112
363 -- Delay_Cleanups Flag114
364 -- Never_Set_In_Source Flag115
365 -- Is_Visible_Child_Unit Flag116
366 -- Is_Unchecked_Union Flag117
367 -- Is_For_Access_Subtype Flag118
368 -- Has_Convention_Pragma Flag119
369 -- Has_Primitive_Operations Flag120
371 -- Has_Pragma_Pack Flag121
372 -- Is_Bit_Packed_Array Flag122
373 -- Has_Unchecked_Union Flag123
374 -- Is_Eliminated Flag124
375 -- C_Pass_By_Copy Flag125
376 -- Is_Instantiated Flag126
377 -- Is_Valued_Procedure Flag127
378 -- (used for Component_Alignment) Flag128
379 -- (used for Component_Alignment) Flag129
380 -- Is_Generic_Instance Flag130
382 -- No_Pool_Assigned Flag131
383 -- Is_AST_Entry Flag132
384 -- Is_VMS_Exception Flag133
385 -- Is_Optional_Parameter Flag134
386 -- Has_Aliased_Components Flag135
387 -- No_Strict_Aliasing Flag136
388 -- Is_Machine_Code_Subprogram Flag137
389 -- Is_Packed_Array_Type Flag138
390 -- Has_Biased_Representation Flag139
391 -- Has_Complex_Representation Flag140
393 -- Is_Constr_Subt_For_UN_Aliased Flag141
394 -- Has_Missing_Return Flag142
395 -- Has_Recursive_Call Flag143
396 -- Is_Unsigned_Type Flag144
397 -- Strict_Alignment Flag145
398 -- Is_Abstract_Type Flag146
399 -- Needs_Debug_Info Flag147
400 -- Suppress_Elaboration_Warnings Flag148
401 -- Is_Compilation_Unit Flag149
402 -- Has_Pragma_Elaborate_Body Flag150
405 -- Entry_Accepted Flag152
406 -- Is_Obsolescent Flag153
407 -- Has_Per_Object_Constraint Flag154
408 -- Has_Private_Declaration Flag155
409 -- Referenced Flag156
410 -- Has_Pragma_Inline Flag157
411 -- Finalize_Storage_Only Flag158
412 -- From_With_Type Flag159
413 -- Is_Package_Body_Entity Flag160
415 -- Has_Qualified_Name Flag161
416 -- Nonzero_Is_True Flag162
417 -- Is_True_Constant Flag163
418 -- Reverse_Bit_Order Flag164
419 -- Suppress_Style_Checks Flag165
420 -- Debug_Info_Off Flag166
421 -- Sec_Stack_Needed_For_Return Flag167
422 -- Materialize_Entity Flag168
423 -- Function_Returns_With_DSP Flag169
424 -- Is_Known_Valid Flag170
426 -- Is_Hidden_Open_Scope Flag171
427 -- Has_Object_Size_Clause Flag172
428 -- Has_Fully_Qualified_Name Flag173
429 -- Elaboration_Entity_Required Flag174
430 -- Has_Forward_Instantiation Flag175
431 -- Is_Discrim_SO_Function Flag176
432 -- Size_Depends_On_Discriminant Flag177
433 -- Is_Null_Init_Proc Flag178
434 -- Has_Pragma_Pure_Function Flag179
435 -- Has_Pragma_Unreferenced Flag180
437 -- Has_Contiguous_Rep Flag181
438 -- Has_Xref_Entry Flag182
439 -- Must_Be_On_Byte_Boundary Flag183
440 -- Has_Stream_Size_Clause Flag184
441 -- Is_Ada_2005_Only Flag185
442 -- Is_Interface Flag186
443 -- Has_Constrained_Partial_View Flag187
444 -- Has_Persistent_BSS Flag188
445 -- Is_Pure_Unit_Access_Type Flag189
446 -- Has_Specified_Stream_Input Flag190
448 -- Has_Specified_Stream_Output Flag191
449 -- Has_Specified_Stream_Read Flag192
450 -- Has_Specified_Stream_Write Flag193
451 -- Is_Local_Anonymous_Access Flag194
452 -- Is_Primitive_Wrapper Flag195
453 -- Was_Hidden Flag196
454 -- Is_Limited_Interface Flag197
455 -- Is_Protected_Interface Flag198
456 -- Is_Synchronized_Interface Flag199
457 -- Is_Task_Interface Flag200
459 -- Has_Anon_Block_Suffix Flag201
460 -- Itype_Printed Flag202
461 -- Has_Pragma_Pure Flag203
462 -- Is_Known_Null Flag204
463 -- Low_Bound_Known Flag205
464 -- Is_Visible_Formal Flag206
465 -- Known_To_Have_Preelab_Init Flag207
466 -- Must_Have_Preelab_Init Flag208
467 -- Is_Return_Object Flag209
468 -- Elaborate_Body_Desirable Flag210
470 -- Has_Static_Discriminants Flag211
471 -- Has_Pragma_Unreferenced_Objects Flag212
472 -- Requires_Overriding Flag213
474 -- Has_Up_Level_Access Flag215
475 -- Universal_Aliasing Flag216
476 -- Suppress_Value_Tracking_On_Call Flag217
477 -- Is_Primitive Flag218
478 -- Has_Initial_Value Flag219
479 -- Has_Dispatch_Table Flag220
481 -- Has_Pragma_Preelab_Init Flag221
482 -- Used_As_Generic_Actual Flag222
492 -----------------------
493 -- Local subprograms --
494 -----------------------
496 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
497 -- Returns the attribute definition clause whose name is Rep_Name. Returns
498 -- Empty if not found.
504 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
508 Ritem := First_Rep_Item (Id);
509 while Present (Ritem) loop
510 if Nkind (Ritem) = N_Attribute_Definition_Clause
511 and then Chars (Ritem) = Rep_Name
515 Ritem := Next_Rep_Item (Ritem);
522 --------------------------------
523 -- Attribute Access Functions --
524 --------------------------------
526 function Abstract_Interfaces (Id : E) return L is
528 pragma Assert (Is_Record_Type (Id));
530 end Abstract_Interfaces;
532 function Abstract_Interface_Alias (Id : E) return E is
534 pragma Assert (Is_Subprogram (Id));
536 end Abstract_Interface_Alias;
538 function Accept_Address (Id : E) return L is
543 function Access_Disp_Table (Id : E) return L is
545 pragma Assert (Is_Tagged_Type (Id));
546 return Elist16 (Implementation_Base_Type (Id));
547 end Access_Disp_Table;
549 function Actual_Subtype (Id : E) return E is
552 (Ekind (Id) = E_Constant
553 or else Ekind (Id) = E_Variable
554 or else Ekind (Id) = E_Generic_In_Out_Parameter
555 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
559 function Address_Taken (Id : E) return B is
564 function Alias (Id : E) return E is
567 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
571 function Alignment (Id : E) return U is
573 pragma Assert (Is_Type (Id)
574 or else Is_Formal (Id)
575 or else Ekind (Id) = E_Loop_Parameter
576 or else Ekind (Id) = E_Constant
577 or else Ekind (Id) = E_Exception
578 or else Ekind (Id) = E_Variable);
582 function Associated_Final_Chain (Id : E) return E is
584 pragma Assert (Is_Access_Type (Id));
586 end Associated_Final_Chain;
588 function Associated_Formal_Package (Id : E) return E is
590 pragma Assert (Ekind (Id) = E_Package);
592 end Associated_Formal_Package;
594 function Associated_Node_For_Itype (Id : E) return N is
597 end Associated_Node_For_Itype;
599 function Associated_Storage_Pool (Id : E) return E is
601 pragma Assert (Is_Access_Type (Id));
602 return Node22 (Root_Type (Id));
603 end Associated_Storage_Pool;
605 function Barrier_Function (Id : E) return N is
607 pragma Assert (Is_Entry (Id));
609 end Barrier_Function;
611 function Block_Node (Id : E) return N is
613 pragma Assert (Ekind (Id) = E_Block);
617 function Body_Entity (Id : E) return E is
620 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
624 function Body_Needed_For_SAL (Id : E) return B is
627 (Ekind (Id) = E_Package
628 or else Is_Subprogram (Id)
629 or else Is_Generic_Unit (Id));
631 end Body_Needed_For_SAL;
633 function C_Pass_By_Copy (Id : E) return B is
635 pragma Assert (Is_Record_Type (Id));
636 return Flag125 (Implementation_Base_Type (Id));
639 function Can_Never_Be_Null (Id : E) return B is
642 end Can_Never_Be_Null;
644 function Checks_May_Be_Suppressed (Id : E) return B is
647 end Checks_May_Be_Suppressed;
649 function Class_Wide_Type (Id : E) return E is
651 pragma Assert (Is_Type (Id));
655 function Cloned_Subtype (Id : E) return E is
658 (Ekind (Id) = E_Record_Subtype
659 or else Ekind (Id) = E_Class_Wide_Subtype);
663 function Component_Bit_Offset (Id : E) return U is
666 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
668 end Component_Bit_Offset;
670 function Component_Clause (Id : E) return N is
673 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
675 end Component_Clause;
677 function Component_Size (Id : E) return U is
679 pragma Assert (Is_Array_Type (Id));
680 return Uint22 (Implementation_Base_Type (Id));
683 function Component_Type (Id : E) return E is
685 return Node20 (Implementation_Base_Type (Id));
688 function Corresponding_Concurrent_Type (Id : E) return E is
690 pragma Assert (Ekind (Id) = E_Record_Type);
692 end Corresponding_Concurrent_Type;
694 function Corresponding_Discriminant (Id : E) return E is
696 pragma Assert (Ekind (Id) = E_Discriminant);
698 end Corresponding_Discriminant;
700 function Corresponding_Equality (Id : E) return E is
703 (Ekind (Id) = E_Function
704 and then not Comes_From_Source (Id)
705 and then Chars (Id) = Name_Op_Ne);
707 end Corresponding_Equality;
709 function Corresponding_Record_Type (Id : E) return E is
711 pragma Assert (Is_Concurrent_Type (Id));
713 end Corresponding_Record_Type;
715 function Corresponding_Remote_Type (Id : E) return E is
718 end Corresponding_Remote_Type;
720 function Current_Use_Clause (Id : E) return E is
722 pragma Assert (Ekind (Id) = E_Package);
724 end Current_Use_Clause;
726 function Current_Value (Id : E) return N is
728 pragma Assert (Ekind (Id) in Object_Kind);
732 function CR_Discriminant (Id : E) return E is
737 function Debug_Info_Off (Id : E) return B is
742 function Debug_Renaming_Link (Id : E) return E is
745 end Debug_Renaming_Link;
747 function Default_Expr_Function (Id : E) return E is
749 pragma Assert (Is_Formal (Id));
751 end Default_Expr_Function;
753 function Default_Expressions_Processed (Id : E) return B is
756 end Default_Expressions_Processed;
758 function Default_Value (Id : E) return N is
760 pragma Assert (Is_Formal (Id));
764 function Delay_Cleanups (Id : E) return B is
769 function Delay_Subprogram_Descriptors (Id : E) return B is
772 end Delay_Subprogram_Descriptors;
774 function Delta_Value (Id : E) return R is
776 pragma Assert (Is_Fixed_Point_Type (Id));
780 function Dependent_Instances (Id : E) return L is
782 pragma Assert (Is_Generic_Instance (Id));
784 end Dependent_Instances;
786 function Depends_On_Private (Id : E) return B is
788 pragma Assert (Nkind (Id) in N_Entity);
790 end Depends_On_Private;
792 function Digits_Value (Id : E) return U is
795 (Is_Floating_Point_Type (Id)
796 or else Is_Decimal_Fixed_Point_Type (Id));
800 function Directly_Designated_Type (Id : E) return E is
803 end Directly_Designated_Type;
805 function Discard_Names (Id : E) return B is
810 function Discriminal (Id : E) return E is
812 pragma Assert (Ekind (Id) = E_Discriminant);
816 function Discriminal_Link (Id : E) return N is
819 end Discriminal_Link;
821 function Discriminant_Checking_Func (Id : E) return E is
823 pragma Assert (Ekind (Id) = E_Component);
825 end Discriminant_Checking_Func;
827 function Discriminant_Constraint (Id : E) return L is
829 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
831 end Discriminant_Constraint;
833 function Discriminant_Default_Value (Id : E) return N is
835 pragma Assert (Ekind (Id) = E_Discriminant);
837 end Discriminant_Default_Value;
839 function Discriminant_Number (Id : E) return U is
841 pragma Assert (Ekind (Id) = E_Discriminant);
843 end Discriminant_Number;
845 function DT_Entry_Count (Id : E) return U is
847 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
851 function DT_Offset_To_Top_Func (Id : E) return E is
853 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
855 end DT_Offset_To_Top_Func;
857 function DT_Position (Id : E) return U is
860 ((Ekind (Id) = E_Function
861 or else Ekind (Id) = E_Procedure)
862 and then Present (DTC_Entity (Id)));
866 function DTC_Entity (Id : E) return E is
869 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
873 function Elaborate_Body_Desirable (Id : E) return B is
875 pragma Assert (Ekind (Id) = E_Package);
877 end Elaborate_Body_Desirable;
879 function Elaboration_Entity (Id : E) return E is
884 Ekind (Id) = E_Package
886 Is_Generic_Unit (Id));
888 end Elaboration_Entity;
890 function Elaboration_Entity_Required (Id : E) return B is
895 Ekind (Id) = E_Package
897 Is_Generic_Unit (Id));
899 end Elaboration_Entity_Required;
901 function Enclosing_Scope (Id : E) return E is
906 function Entry_Accepted (Id : E) return B is
908 pragma Assert (Is_Entry (Id));
912 function Entry_Bodies_Array (Id : E) return E is
915 end Entry_Bodies_Array;
917 function Entry_Cancel_Parameter (Id : E) return E is
920 end Entry_Cancel_Parameter;
922 function Entry_Component (Id : E) return E is
927 function Entry_Formal (Id : E) return E is
932 function Entry_Index_Constant (Id : E) return N is
934 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
936 end Entry_Index_Constant;
938 function Entry_Parameters_Type (Id : E) return E is
941 end Entry_Parameters_Type;
943 function Enum_Pos_To_Rep (Id : E) return E is
945 pragma Assert (Ekind (Id) = E_Enumeration_Type);
949 function Enumeration_Pos (Id : E) return Uint is
951 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
955 function Enumeration_Rep (Id : E) return U is
957 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
961 function Enumeration_Rep_Expr (Id : E) return N is
963 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
965 end Enumeration_Rep_Expr;
967 function Equivalent_Type (Id : E) return E is
970 (Ekind (Id) = E_Class_Wide_Subtype or else
971 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
972 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
973 Ekind (Id) = E_Access_Subprogram_Type or else
974 Ekind (Id) = E_Exception_Type);
978 function Esize (Id : E) return Uint is
983 function Exception_Code (Id : E) return Uint is
985 pragma Assert (Ekind (Id) = E_Exception);
989 function Extra_Accessibility (Id : E) return E is
991 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
993 end Extra_Accessibility;
995 function Extra_Constrained (Id : E) return E is
997 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
999 end Extra_Constrained;
1001 function Extra_Formal (Id : E) return E is
1006 function Extra_Formals (Id : E) return E is
1009 (Is_Overloadable (Id)
1010 or else Ekind (Id) = E_Entry_Family
1011 or else Ekind (Id) = E_Subprogram_Body
1012 or else Ekind (Id) = E_Subprogram_Type);
1016 function Finalization_Chain_Entity (Id : E) return E is
1019 end Finalization_Chain_Entity;
1021 function Finalize_Storage_Only (Id : E) return B is
1023 pragma Assert (Is_Type (Id));
1024 return Flag158 (Base_Type (Id));
1025 end Finalize_Storage_Only;
1027 function First_Entity (Id : E) return E is
1032 function First_Index (Id : E) return N is
1034 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1038 function First_Literal (Id : E) return E is
1040 pragma Assert (Is_Enumeration_Type (Id));
1044 function First_Optional_Parameter (Id : E) return E is
1047 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1049 end First_Optional_Parameter;
1051 function First_Private_Entity (Id : E) return E is
1053 pragma Assert (Ekind (Id) = E_Package
1054 or else Ekind (Id) = E_Generic_Package
1055 or else Ekind (Id) in Concurrent_Kind);
1057 end First_Private_Entity;
1059 function First_Rep_Item (Id : E) return E is
1064 function Freeze_Node (Id : E) return N is
1069 function From_With_Type (Id : E) return B is
1071 return Flag159 (Id);
1074 function Full_View (Id : E) return E is
1076 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1080 function Function_Returns_With_DSP (Id : E) return B is
1083 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1084 return Flag169 (Id);
1085 end Function_Returns_With_DSP;
1087 function Generic_Homonym (Id : E) return E is
1089 pragma Assert (Ekind (Id) = E_Generic_Package);
1091 end Generic_Homonym;
1093 function Generic_Renamings (Id : E) return L is
1095 return Elist23 (Id);
1096 end Generic_Renamings;
1098 function Handler_Records (Id : E) return S is
1101 end Handler_Records;
1103 function Has_Aliased_Components (Id : E) return B is
1105 return Flag135 (Implementation_Base_Type (Id));
1106 end Has_Aliased_Components;
1108 function Has_Alignment_Clause (Id : E) return B is
1111 end Has_Alignment_Clause;
1113 function Has_All_Calls_Remote (Id : E) return B is
1116 end Has_All_Calls_Remote;
1118 function Has_Anon_Block_Suffix (Id : E) return B is
1120 return Flag201 (Id);
1121 end Has_Anon_Block_Suffix;
1123 function Has_Atomic_Components (Id : E) return B is
1125 return Flag86 (Implementation_Base_Type (Id));
1126 end Has_Atomic_Components;
1128 function Has_Biased_Representation (Id : E) return B is
1130 return Flag139 (Id);
1131 end Has_Biased_Representation;
1133 function Has_Completion (Id : E) return B is
1138 function Has_Completion_In_Body (Id : E) return B is
1140 pragma Assert (Is_Type (Id));
1142 end Has_Completion_In_Body;
1144 function Has_Complex_Representation (Id : E) return B is
1146 pragma Assert (Is_Type (Id));
1147 return Flag140 (Implementation_Base_Type (Id));
1148 end Has_Complex_Representation;
1150 function Has_Component_Size_Clause (Id : E) return B is
1152 pragma Assert (Is_Array_Type (Id));
1153 return Flag68 (Implementation_Base_Type (Id));
1154 end Has_Component_Size_Clause;
1156 function Has_Constrained_Partial_View (Id : E) return B is
1158 pragma Assert (Is_Type (Id));
1159 return Flag187 (Id);
1160 end Has_Constrained_Partial_View;
1162 function Has_Controlled_Component (Id : E) return B is
1164 return Flag43 (Base_Type (Id));
1165 end Has_Controlled_Component;
1167 function Has_Contiguous_Rep (Id : E) return B is
1169 return Flag181 (Id);
1170 end Has_Contiguous_Rep;
1172 function Has_Controlling_Result (Id : E) return B is
1175 end Has_Controlling_Result;
1177 function Has_Convention_Pragma (Id : E) return B is
1179 return Flag119 (Id);
1180 end Has_Convention_Pragma;
1182 function Has_Delayed_Freeze (Id : E) return B is
1184 pragma Assert (Nkind (Id) in N_Entity);
1186 end Has_Delayed_Freeze;
1188 function Has_Discriminants (Id : E) return B is
1190 pragma Assert (Nkind (Id) in N_Entity);
1192 end Has_Discriminants;
1194 function Has_Dispatch_Table (Id : E) return B is
1196 pragma Assert (Is_Tagged_Type (Id));
1197 return Flag220 (Id);
1198 end Has_Dispatch_Table;
1200 function Has_Enumeration_Rep_Clause (Id : E) return B is
1202 pragma Assert (Is_Enumeration_Type (Id));
1204 end Has_Enumeration_Rep_Clause;
1206 function Has_Exit (Id : E) return B is
1211 function Has_External_Tag_Rep_Clause (Id : E) return B is
1213 pragma Assert (Is_Tagged_Type (Id));
1214 return Flag110 (Id);
1215 end Has_External_Tag_Rep_Clause;
1217 function Has_Forward_Instantiation (Id : E) return B is
1219 return Flag175 (Id);
1220 end Has_Forward_Instantiation;
1222 function Has_Fully_Qualified_Name (Id : E) return B is
1224 return Flag173 (Id);
1225 end Has_Fully_Qualified_Name;
1227 function Has_Gigi_Rep_Item (Id : E) return B is
1230 end Has_Gigi_Rep_Item;
1232 function Has_Homonym (Id : E) return B is
1237 function Has_Initial_Value (Id : E) return B is
1240 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1241 return Flag219 (Id);
1242 end Has_Initial_Value;
1244 function Has_Machine_Radix_Clause (Id : E) return B is
1246 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1248 end Has_Machine_Radix_Clause;
1250 function Has_Master_Entity (Id : E) return B is
1253 end Has_Master_Entity;
1255 function Has_Missing_Return (Id : E) return B is
1258 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1259 return Flag142 (Id);
1260 end Has_Missing_Return;
1262 function Has_Nested_Block_With_Handler (Id : E) return B is
1264 return Flag101 (Id);
1265 end Has_Nested_Block_With_Handler;
1267 function Has_Non_Standard_Rep (Id : E) return B is
1269 return Flag75 (Implementation_Base_Type (Id));
1270 end Has_Non_Standard_Rep;
1272 function Has_Object_Size_Clause (Id : E) return B is
1274 pragma Assert (Is_Type (Id));
1275 return Flag172 (Id);
1276 end Has_Object_Size_Clause;
1278 function Has_Per_Object_Constraint (Id : E) return B is
1280 return Flag154 (Id);
1281 end Has_Per_Object_Constraint;
1283 function Has_Persistent_BSS (Id : E) return B is
1285 return Flag188 (Id);
1286 end Has_Persistent_BSS;
1288 function Has_Pragma_Controlled (Id : E) return B is
1290 pragma Assert (Is_Access_Type (Id));
1291 return Flag27 (Implementation_Base_Type (Id));
1292 end Has_Pragma_Controlled;
1294 function Has_Pragma_Elaborate_Body (Id : E) return B is
1296 return Flag150 (Id);
1297 end Has_Pragma_Elaborate_Body;
1299 function Has_Pragma_Inline (Id : E) return B is
1301 return Flag157 (Id);
1302 end Has_Pragma_Inline;
1304 function Has_Pragma_Pack (Id : E) return B is
1306 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1307 return Flag121 (Implementation_Base_Type (Id));
1308 end Has_Pragma_Pack;
1310 function Has_Pragma_Preelab_Init (Id : E) return B is
1312 return Flag221 (Id);
1313 end Has_Pragma_Preelab_Init;
1315 function Has_Pragma_Pure (Id : E) return B is
1317 return Flag203 (Id);
1318 end Has_Pragma_Pure;
1320 function Has_Pragma_Pure_Function (Id : E) return B is
1322 return Flag179 (Id);
1323 end Has_Pragma_Pure_Function;
1325 function Has_Pragma_Unreferenced (Id : E) return B is
1327 return Flag180 (Id);
1328 end Has_Pragma_Unreferenced;
1330 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1332 pragma Assert (Is_Type (Id));
1333 return Flag212 (Id);
1334 end Has_Pragma_Unreferenced_Objects;
1336 function Has_Primitive_Operations (Id : E) return B is
1338 pragma Assert (Is_Type (Id));
1339 return Flag120 (Base_Type (Id));
1340 end Has_Primitive_Operations;
1342 function Has_Private_Declaration (Id : E) return B is
1344 return Flag155 (Id);
1345 end Has_Private_Declaration;
1347 function Has_Qualified_Name (Id : E) return B is
1349 return Flag161 (Id);
1350 end Has_Qualified_Name;
1352 function Has_RACW (Id : E) return B is
1354 pragma Assert (Ekind (Id) = E_Package);
1355 return Flag214 (Id);
1358 function Has_Record_Rep_Clause (Id : E) return B is
1360 pragma Assert (Is_Record_Type (Id));
1361 return Flag65 (Implementation_Base_Type (Id));
1362 end Has_Record_Rep_Clause;
1364 function Has_Recursive_Call (Id : E) return B is
1366 pragma Assert (Is_Subprogram (Id));
1367 return Flag143 (Id);
1368 end Has_Recursive_Call;
1370 function Has_Size_Clause (Id : E) return B is
1373 end Has_Size_Clause;
1375 function Has_Small_Clause (Id : E) return B is
1378 end Has_Small_Clause;
1380 function Has_Specified_Layout (Id : E) return B is
1382 pragma Assert (Is_Type (Id));
1383 return Flag100 (Implementation_Base_Type (Id));
1384 end Has_Specified_Layout;
1386 function Has_Specified_Stream_Input (Id : E) return B is
1388 pragma Assert (Is_Type (Id));
1389 return Flag190 (Id);
1390 end Has_Specified_Stream_Input;
1392 function Has_Specified_Stream_Output (Id : E) return B is
1394 pragma Assert (Is_Type (Id));
1395 return Flag191 (Id);
1396 end Has_Specified_Stream_Output;
1398 function Has_Specified_Stream_Read (Id : E) return B is
1400 pragma Assert (Is_Type (Id));
1401 return Flag192 (Id);
1402 end Has_Specified_Stream_Read;
1404 function Has_Specified_Stream_Write (Id : E) return B is
1406 pragma Assert (Is_Type (Id));
1407 return Flag193 (Id);
1408 end Has_Specified_Stream_Write;
1410 function Has_Static_Discriminants (Id : E) return B is
1412 pragma Assert (Is_Type (Id));
1413 return Flag211 (Id);
1414 end Has_Static_Discriminants;
1416 function Has_Storage_Size_Clause (Id : E) return B is
1418 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1419 return Flag23 (Implementation_Base_Type (Id));
1420 end Has_Storage_Size_Clause;
1422 function Has_Stream_Size_Clause (Id : E) return B is
1424 return Flag184 (Id);
1425 end Has_Stream_Size_Clause;
1427 function Has_Subprogram_Descriptor (Id : E) return B is
1430 end Has_Subprogram_Descriptor;
1432 function Has_Task (Id : E) return B is
1434 return Flag30 (Base_Type (Id));
1437 function Has_Unchecked_Union (Id : E) return B is
1439 return Flag123 (Base_Type (Id));
1440 end Has_Unchecked_Union;
1442 function Has_Unknown_Discriminants (Id : E) return B is
1444 pragma Assert (Is_Type (Id));
1446 end Has_Unknown_Discriminants;
1448 function Has_Up_Level_Access (Id : E) return B is
1451 (Ekind (Id) = E_Variable
1452 or else Ekind (Id) = E_Constant
1453 or else Ekind (Id) = E_Loop_Parameter);
1454 return Flag215 (Id);
1455 end Has_Up_Level_Access;
1457 function Has_Volatile_Components (Id : E) return B is
1459 return Flag87 (Implementation_Base_Type (Id));
1460 end Has_Volatile_Components;
1462 function Has_Xref_Entry (Id : E) return B is
1464 return Flag182 (Implementation_Base_Type (Id));
1467 function Hiding_Loop_Variable (Id : E) return E is
1469 pragma Assert (Ekind (Id) = E_Variable);
1471 end Hiding_Loop_Variable;
1473 function Homonym (Id : E) return E is
1478 function In_Package_Body (Id : E) return B is
1481 end In_Package_Body;
1483 function In_Private_Part (Id : E) return B is
1486 end In_Private_Part;
1488 function In_Use (Id : E) return B is
1490 pragma Assert (Nkind (Id) in N_Entity);
1494 function Inner_Instances (Id : E) return L is
1496 return Elist23 (Id);
1497 end Inner_Instances;
1499 function Interface_Name (Id : E) return N is
1504 function Is_Abstract_Subprogram (Id : E) return B is
1506 pragma Assert (Is_Overloadable (Id));
1508 end Is_Abstract_Subprogram;
1510 function Is_Abstract_Type (Id : E) return B is
1512 pragma Assert (Is_Type (Id));
1513 return Flag146 (Id);
1514 end Is_Abstract_Type;
1516 function Is_Local_Anonymous_Access (Id : E) return B is
1518 pragma Assert (Is_Access_Type (Id));
1519 return Flag194 (Id);
1520 end Is_Local_Anonymous_Access;
1522 function Is_Access_Constant (Id : E) return B is
1524 pragma Assert (Is_Access_Type (Id));
1526 end Is_Access_Constant;
1528 function Is_Ada_2005_Only (Id : E) return B is
1530 return Flag185 (Id);
1531 end Is_Ada_2005_Only;
1533 function Is_Aliased (Id : E) return B is
1535 pragma Assert (Nkind (Id) in N_Entity);
1539 function Is_AST_Entry (Id : E) return B is
1541 pragma Assert (Is_Entry (Id));
1542 return Flag132 (Id);
1545 function Is_Asynchronous (Id : E) return B is
1548 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1550 end Is_Asynchronous;
1552 function Is_Atomic (Id : E) return B is
1557 function Is_Bit_Packed_Array (Id : E) return B is
1559 return Flag122 (Implementation_Base_Type (Id));
1560 end Is_Bit_Packed_Array;
1562 function Is_Called (Id : E) return B is
1565 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1566 return Flag102 (Id);
1569 function Is_Character_Type (Id : E) return B is
1572 end Is_Character_Type;
1574 function Is_Child_Unit (Id : E) return B is
1579 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1582 end Is_Class_Wide_Equivalent_Type;
1584 function Is_Compilation_Unit (Id : E) return B is
1586 return Flag149 (Id);
1587 end Is_Compilation_Unit;
1589 function Is_Completely_Hidden (Id : E) return B is
1591 pragma Assert (Ekind (Id) = E_Discriminant);
1592 return Flag103 (Id);
1593 end Is_Completely_Hidden;
1595 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1598 end Is_Constr_Subt_For_U_Nominal;
1600 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1602 return Flag141 (Id);
1603 end Is_Constr_Subt_For_UN_Aliased;
1605 function Is_Constrained (Id : E) return B is
1607 pragma Assert (Nkind (Id) in N_Entity);
1611 function Is_Constructor (Id : E) return B is
1616 function Is_Controlled (Id : E) return B is
1618 return Flag42 (Base_Type (Id));
1621 function Is_Controlling_Formal (Id : E) return B is
1623 pragma Assert (Is_Formal (Id));
1625 end Is_Controlling_Formal;
1627 function Is_CPP_Class (Id : E) return B is
1632 function Is_Discrim_SO_Function (Id : E) return B is
1634 return Flag176 (Id);
1635 end Is_Discrim_SO_Function;
1637 function Is_Dispatching_Operation (Id : E) return B is
1639 pragma Assert (Nkind (Id) in N_Entity);
1641 end Is_Dispatching_Operation;
1643 function Is_Eliminated (Id : E) return B is
1645 return Flag124 (Id);
1648 function Is_Entry_Formal (Id : E) return B is
1651 end Is_Entry_Formal;
1653 function Is_Exported (Id : E) return B is
1658 function Is_First_Subtype (Id : E) return B is
1661 end Is_First_Subtype;
1663 function Is_For_Access_Subtype (Id : E) return B is
1666 (Ekind (Id) = E_Record_Subtype
1668 Ekind (Id) = E_Private_Subtype);
1669 return Flag118 (Id);
1670 end Is_For_Access_Subtype;
1672 function Is_Formal_Subprogram (Id : E) return B is
1674 return Flag111 (Id);
1675 end Is_Formal_Subprogram;
1677 function Is_Frozen (Id : E) return B is
1682 function Is_Generic_Actual_Type (Id : E) return B is
1684 pragma Assert (Is_Type (Id));
1686 end Is_Generic_Actual_Type;
1688 function Is_Generic_Instance (Id : E) return B is
1690 return Flag130 (Id);
1691 end Is_Generic_Instance;
1693 function Is_Generic_Type (Id : E) return B is
1695 pragma Assert (Nkind (Id) in N_Entity);
1697 end Is_Generic_Type;
1699 function Is_Hidden (Id : E) return B is
1704 function Is_Hidden_Open_Scope (Id : E) return B is
1706 return Flag171 (Id);
1707 end Is_Hidden_Open_Scope;
1709 function Is_Immediately_Visible (Id : E) return B is
1711 pragma Assert (Nkind (Id) in N_Entity);
1713 end Is_Immediately_Visible;
1715 function Is_Imported (Id : E) return B is
1720 function Is_Inlined (Id : E) return B is
1725 function Is_Interface (Id : E) return B is
1727 return Flag186 (Id);
1730 function Is_Instantiated (Id : E) return B is
1732 return Flag126 (Id);
1733 end Is_Instantiated;
1735 function Is_Internal (Id : E) return B is
1737 pragma Assert (Nkind (Id) in N_Entity);
1741 function Is_Interrupt_Handler (Id : E) return B is
1743 pragma Assert (Nkind (Id) in N_Entity);
1745 end Is_Interrupt_Handler;
1747 function Is_Intrinsic_Subprogram (Id : E) return B is
1750 end Is_Intrinsic_Subprogram;
1752 function Is_Itype (Id : E) return B is
1757 function Is_Known_Non_Null (Id : E) return B is
1760 end Is_Known_Non_Null;
1762 function Is_Known_Null (Id : E) return B is
1764 return Flag204 (Id);
1767 function Is_Known_Valid (Id : E) return B is
1769 return Flag170 (Id);
1772 function Is_Limited_Composite (Id : E) return B is
1774 return Flag106 (Id);
1775 end Is_Limited_Composite;
1777 function Is_Limited_Interface (Id : E) return B is
1779 return Flag197 (Id);
1780 end Is_Limited_Interface;
1782 function Is_Limited_Record (Id : E) return B is
1785 end Is_Limited_Record;
1787 function Is_Machine_Code_Subprogram (Id : E) return B is
1789 pragma Assert (Is_Subprogram (Id));
1790 return Flag137 (Id);
1791 end Is_Machine_Code_Subprogram;
1793 function Is_Non_Static_Subtype (Id : E) return B is
1795 pragma Assert (Is_Type (Id));
1796 return Flag109 (Id);
1797 end Is_Non_Static_Subtype;
1799 function Is_Null_Init_Proc (Id : E) return B is
1801 pragma Assert (Ekind (Id) = E_Procedure);
1802 return Flag178 (Id);
1803 end Is_Null_Init_Proc;
1805 function Is_Obsolescent (Id : E) return B is
1807 return Flag153 (Id);
1810 function Is_Optional_Parameter (Id : E) return B is
1812 pragma Assert (Is_Formal (Id));
1813 return Flag134 (Id);
1814 end Is_Optional_Parameter;
1816 function Is_Overriding_Operation (Id : E) return B is
1818 pragma Assert (Is_Subprogram (Id));
1820 end Is_Overriding_Operation;
1822 function Is_Package_Body_Entity (Id : E) return B is
1824 return Flag160 (Id);
1825 end Is_Package_Body_Entity;
1827 function Is_Packed (Id : E) return B is
1829 return Flag51 (Implementation_Base_Type (Id));
1832 function Is_Packed_Array_Type (Id : E) return B is
1834 return Flag138 (Id);
1835 end Is_Packed_Array_Type;
1837 function Is_Potentially_Use_Visible (Id : E) return B is
1839 pragma Assert (Nkind (Id) in N_Entity);
1841 end Is_Potentially_Use_Visible;
1843 function Is_Preelaborated (Id : E) return B is
1846 end Is_Preelaborated;
1848 function Is_Primitive (Id : E) return B is
1851 (Is_Overloadable (Id)
1852 or else Ekind (Id) = E_Generic_Function
1853 or else Ekind (Id) = E_Generic_Procedure);
1854 return Flag218 (Id);
1857 function Is_Primitive_Wrapper (Id : E) return B is
1859 pragma Assert (Ekind (Id) = E_Procedure);
1860 return Flag195 (Id);
1861 end Is_Primitive_Wrapper;
1863 function Is_Private_Composite (Id : E) return B is
1865 pragma Assert (Is_Type (Id));
1866 return Flag107 (Id);
1867 end Is_Private_Composite;
1869 function Is_Private_Descendant (Id : E) return B is
1872 end Is_Private_Descendant;
1874 function Is_Protected_Interface (Id : E) return B is
1876 pragma Assert (Is_Interface (Id));
1877 return Flag198 (Id);
1878 end Is_Protected_Interface;
1880 function Is_Public (Id : E) return B is
1882 pragma Assert (Nkind (Id) in N_Entity);
1886 function Is_Pure (Id : E) return B is
1891 function Is_Pure_Unit_Access_Type (Id : E) return B is
1893 pragma Assert (Is_Access_Type (Id));
1894 return Flag189 (Id);
1895 end Is_Pure_Unit_Access_Type;
1897 function Is_Remote_Call_Interface (Id : E) return B is
1900 end Is_Remote_Call_Interface;
1902 function Is_Remote_Types (Id : E) return B is
1905 end Is_Remote_Types;
1907 function Is_Renaming_Of_Object (Id : E) return B is
1909 return Flag112 (Id);
1910 end Is_Renaming_Of_Object;
1912 function Is_Return_Object (Id : E) return B is
1914 return Flag209 (Id);
1915 end Is_Return_Object;
1917 function Is_Shared_Passive (Id : E) return B is
1920 end Is_Shared_Passive;
1922 function Is_Statically_Allocated (Id : E) return B is
1925 end Is_Statically_Allocated;
1927 function Is_Synchronized_Interface (Id : E) return B is
1929 pragma Assert (Is_Interface (Id));
1930 return Flag199 (Id);
1931 end Is_Synchronized_Interface;
1933 function Is_Tag (Id : E) return B is
1935 pragma Assert (Nkind (Id) in N_Entity);
1939 function Is_Tagged_Type (Id : E) return B is
1944 function Is_Task_Interface (Id : E) return B is
1946 pragma Assert (Is_Interface (Id));
1947 return Flag200 (Id);
1948 end Is_Task_Interface;
1950 function Is_True_Constant (Id : E) return B is
1952 return Flag163 (Id);
1953 end Is_True_Constant;
1955 function Is_Unchecked_Union (Id : E) return B is
1957 return Flag117 (Implementation_Base_Type (Id));
1958 end Is_Unchecked_Union;
1960 function Is_Unsigned_Type (Id : E) return B is
1962 pragma Assert (Is_Type (Id));
1963 return Flag144 (Id);
1964 end Is_Unsigned_Type;
1966 function Is_Valued_Procedure (Id : E) return B is
1968 pragma Assert (Ekind (Id) = E_Procedure);
1969 return Flag127 (Id);
1970 end Is_Valued_Procedure;
1972 function Is_Visible_Child_Unit (Id : E) return B is
1974 pragma Assert (Is_Child_Unit (Id));
1975 return Flag116 (Id);
1976 end Is_Visible_Child_Unit;
1978 function Is_Visible_Formal (Id : E) return B is
1980 return Flag206 (Id);
1981 end Is_Visible_Formal;
1983 function Is_VMS_Exception (Id : E) return B is
1985 return Flag133 (Id);
1986 end Is_VMS_Exception;
1988 function Is_Volatile (Id : E) return B is
1990 pragma Assert (Nkind (Id) in N_Entity);
1992 if Is_Type (Id) then
1993 return Flag16 (Base_Type (Id));
1999 function Itype_Printed (Id : E) return B is
2001 pragma Assert (Is_Itype (Id));
2002 return Flag202 (Id);
2005 function Kill_Elaboration_Checks (Id : E) return B is
2008 end Kill_Elaboration_Checks;
2010 function Kill_Range_Checks (Id : E) return B is
2013 end Kill_Range_Checks;
2015 function Kill_Tag_Checks (Id : E) return B is
2018 end Kill_Tag_Checks;
2020 function Known_To_Have_Preelab_Init (Id : E) return B is
2022 pragma Assert (Is_Type (Id));
2023 return Flag207 (Id);
2024 end Known_To_Have_Preelab_Init;
2026 function Last_Assignment (Id : E) return N is
2028 pragma Assert (Ekind (Id) = E_Variable);
2030 end Last_Assignment;
2032 function Last_Entity (Id : E) return E is
2037 function Limited_View (Id : E) return E is
2039 pragma Assert (Ekind (Id) = E_Package);
2043 function Lit_Indexes (Id : E) return E is
2045 pragma Assert (Is_Enumeration_Type (Id));
2049 function Lit_Strings (Id : E) return E is
2051 pragma Assert (Is_Enumeration_Type (Id));
2055 function Low_Bound_Known (Id : E) return B is
2057 return Flag205 (Id);
2058 end Low_Bound_Known;
2060 function Machine_Radix_10 (Id : E) return B is
2062 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2064 end Machine_Radix_10;
2066 function Master_Id (Id : E) return E is
2068 pragma Assert (Is_Access_Type (Id));
2072 function Materialize_Entity (Id : E) return B is
2074 return Flag168 (Id);
2075 end Materialize_Entity;
2077 function Mechanism (Id : E) return M is
2079 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2080 return UI_To_Int (Uint8 (Id));
2083 function Modulus (Id : E) return Uint is
2085 pragma Assert (Is_Modular_Integer_Type (Id));
2086 return Uint17 (Base_Type (Id));
2089 function Must_Be_On_Byte_Boundary (Id : E) return B is
2091 pragma Assert (Is_Type (Id));
2092 return Flag183 (Id);
2093 end Must_Be_On_Byte_Boundary;
2095 function Must_Have_Preelab_Init (Id : E) return B is
2097 pragma Assert (Is_Type (Id));
2098 return Flag208 (Id);
2099 end Must_Have_Preelab_Init;
2101 function Needs_Debug_Info (Id : E) return B is
2103 return Flag147 (Id);
2104 end Needs_Debug_Info;
2106 function Needs_No_Actuals (Id : E) return B is
2109 (Is_Overloadable (Id)
2110 or else Ekind (Id) = E_Subprogram_Type
2111 or else Ekind (Id) = E_Entry_Family);
2113 end Needs_No_Actuals;
2115 function Never_Set_In_Source (Id : E) return B is
2117 return Flag115 (Id);
2118 end Never_Set_In_Source;
2120 function Next_Inlined_Subprogram (Id : E) return E is
2123 end Next_Inlined_Subprogram;
2125 function No_Pool_Assigned (Id : E) return B is
2127 pragma Assert (Is_Access_Type (Id));
2128 return Flag131 (Root_Type (Id));
2129 end No_Pool_Assigned;
2131 function No_Return (Id : E) return B is
2133 return Flag113 (Id);
2136 function No_Strict_Aliasing (Id : E) return B is
2138 pragma Assert (Is_Access_Type (Id));
2139 return Flag136 (Base_Type (Id));
2140 end No_Strict_Aliasing;
2142 function Non_Binary_Modulus (Id : E) return B is
2144 pragma Assert (Is_Modular_Integer_Type (Id));
2145 return Flag58 (Base_Type (Id));
2146 end Non_Binary_Modulus;
2148 function Non_Limited_View (Id : E) return E is
2150 pragma Assert (Ekind (Id) in Incomplete_Kind);
2152 end Non_Limited_View;
2154 function Nonzero_Is_True (Id : E) return B is
2156 pragma Assert (Root_Type (Id) = Standard_Boolean);
2157 return Flag162 (Base_Type (Id));
2158 end Nonzero_Is_True;
2160 function Normalized_First_Bit (Id : E) return U is
2163 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2165 end Normalized_First_Bit;
2167 function Normalized_Position (Id : E) return U is
2170 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2172 end Normalized_Position;
2174 function Normalized_Position_Max (Id : E) return U is
2177 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2179 end Normalized_Position_Max;
2181 function Object_Ref (Id : E) return E is
2183 pragma Assert (Ekind (Id) = E_Protected_Body);
2187 function Obsolescent_Warning (Id : E) return N is
2190 end Obsolescent_Warning;
2192 function Original_Array_Type (Id : E) return E is
2194 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2196 end Original_Array_Type;
2198 function Original_Record_Component (Id : E) return E is
2201 (Ekind (Id) = E_Void
2202 or else Ekind (Id) = E_Component
2203 or else Ekind (Id) = E_Discriminant);
2205 end Original_Record_Component;
2207 function Overridden_Operation (Id : E) return E is
2210 end Overridden_Operation;
2212 function Package_Instantiation (Id : E) return N is
2216 or else Ekind (Id) = E_Generic_Package
2217 or else Ekind (Id) = E_Package);
2219 end Package_Instantiation;
2221 function Packed_Array_Type (Id : E) return E is
2223 pragma Assert (Is_Array_Type (Id));
2225 end Packed_Array_Type;
2227 function Parent_Subtype (Id : E) return E is
2229 pragma Assert (Ekind (Id) = E_Record_Type);
2233 function Primitive_Operations (Id : E) return L is
2235 pragma Assert (Is_Tagged_Type (Id));
2236 return Elist15 (Id);
2237 end Primitive_Operations;
2239 function Prival (Id : E) return E is
2241 pragma Assert (Is_Protected_Private (Id));
2245 function Privals_Chain (Id : E) return L is
2247 pragma Assert (Is_Overloadable (Id)
2248 or else Ekind (Id) = E_Entry_Family);
2249 return Elist23 (Id);
2252 function Private_Dependents (Id : E) return L is
2254 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2255 return Elist18 (Id);
2256 end Private_Dependents;
2258 function Private_View (Id : E) return N is
2260 pragma Assert (Is_Private_Type (Id));
2264 function Protected_Body_Subprogram (Id : E) return E is
2266 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2268 end Protected_Body_Subprogram;
2270 function Protected_Formal (Id : E) return E is
2272 pragma Assert (Is_Formal (Id));
2274 end Protected_Formal;
2276 function Protected_Operation (Id : E) return N is
2278 pragma Assert (Is_Protected_Private (Id));
2280 end Protected_Operation;
2282 function Reachable (Id : E) return B is
2287 function Referenced (Id : E) return B is
2289 return Flag156 (Id);
2292 function Referenced_As_LHS (Id : E) return B is
2295 end Referenced_As_LHS;
2297 function Referenced_Object (Id : E) return N is
2299 pragma Assert (Is_Type (Id));
2301 end Referenced_Object;
2303 function Register_Exception_Call (Id : E) return N is
2305 pragma Assert (Ekind (Id) = E_Exception);
2307 end Register_Exception_Call;
2309 function Related_Array_Object (Id : E) return E is
2311 pragma Assert (Is_Array_Type (Id));
2313 end Related_Array_Object;
2315 function Related_Instance (Id : E) return E is
2318 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2320 end Related_Instance;
2322 function Related_Interface (Id : E) return E is
2325 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
2327 end Related_Interface;
2329 function Renamed_Entity (Id : E) return N is
2334 function Renamed_Object (Id : E) return N is
2339 function Renaming_Map (Id : E) return U is
2344 function Requires_Overriding (Id : E) return B is
2346 pragma Assert (Is_Overloadable (Id));
2347 return Flag213 (Id);
2348 end Requires_Overriding;
2350 function Return_Present (Id : E) return B is
2355 function Return_Applies_To (Id : E) return N is
2358 end Return_Applies_To;
2360 function Returns_By_Ref (Id : E) return B is
2365 function Reverse_Bit_Order (Id : E) return B is
2367 pragma Assert (Is_Record_Type (Id));
2368 return Flag164 (Base_Type (Id));
2369 end Reverse_Bit_Order;
2371 function RM_Size (Id : E) return U is
2373 pragma Assert (Is_Type (Id));
2377 function Scalar_Range (Id : E) return N is
2382 function Scale_Value (Id : E) return U is
2387 function Scope_Depth_Value (Id : E) return U is
2390 end Scope_Depth_Value;
2392 function Sec_Stack_Needed_For_Return (Id : E) return B is
2394 return Flag167 (Id);
2395 end Sec_Stack_Needed_For_Return;
2397 function Shadow_Entities (Id : E) return S is
2400 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2402 end Shadow_Entities;
2404 function Shared_Var_Assign_Proc (Id : E) return E is
2406 pragma Assert (Ekind (Id) = E_Variable);
2408 end Shared_Var_Assign_Proc;
2410 function Shared_Var_Read_Proc (Id : E) return E is
2412 pragma Assert (Ekind (Id) = E_Variable);
2414 end Shared_Var_Read_Proc;
2416 function Size_Check_Code (Id : E) return N is
2418 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2420 end Size_Check_Code;
2422 function Size_Depends_On_Discriminant (Id : E) return B is
2424 return Flag177 (Id);
2425 end Size_Depends_On_Discriminant;
2427 function Size_Known_At_Compile_Time (Id : E) return B is
2430 end Size_Known_At_Compile_Time;
2432 function Small_Value (Id : E) return R is
2434 pragma Assert (Is_Fixed_Point_Type (Id));
2435 return Ureal21 (Id);
2438 function Spec_Entity (Id : E) return E is
2441 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2445 function Storage_Size_Variable (Id : E) return E is
2447 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2448 return Node15 (Implementation_Base_Type (Id));
2449 end Storage_Size_Variable;
2451 function Static_Elaboration_Desired (Id : E) return B is
2453 pragma Assert (Ekind (Id) = E_Package);
2455 end Static_Elaboration_Desired;
2457 function Static_Initialization (Id : E) return N is
2460 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2462 end Static_Initialization;
2464 function Stored_Constraint (Id : E) return L is
2467 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2468 return Elist23 (Id);
2469 end Stored_Constraint;
2471 function Strict_Alignment (Id : E) return B is
2473 return Flag145 (Implementation_Base_Type (Id));
2474 end Strict_Alignment;
2476 function String_Literal_Length (Id : E) return U is
2479 end String_Literal_Length;
2481 function String_Literal_Low_Bound (Id : E) return N is
2484 end String_Literal_Low_Bound;
2486 function Suppress_Elaboration_Warnings (Id : E) return B is
2488 return Flag148 (Id);
2489 end Suppress_Elaboration_Warnings;
2491 function Suppress_Init_Proc (Id : E) return B is
2493 return Flag105 (Base_Type (Id));
2494 end Suppress_Init_Proc;
2496 function Suppress_Style_Checks (Id : E) return B is
2498 return Flag165 (Id);
2499 end Suppress_Style_Checks;
2501 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2503 return Flag217 (Id);
2504 end Suppress_Value_Tracking_On_Call;
2506 function Task_Body_Procedure (Id : E) return N is
2508 pragma Assert (Ekind (Id) in Task_Kind);
2510 end Task_Body_Procedure;
2512 function Treat_As_Volatile (Id : E) return B is
2515 end Treat_As_Volatile;
2517 function Underlying_Full_View (Id : E) return E is
2519 pragma Assert (Ekind (Id) in Private_Kind);
2521 end Underlying_Full_View;
2523 function Universal_Aliasing (Id : E) return B is
2525 pragma Assert (Is_Type (Id));
2526 return Flag216 (Base_Type (Id));
2527 end Universal_Aliasing;
2529 function Unset_Reference (Id : E) return N is
2532 end Unset_Reference;
2534 function Used_As_Generic_Actual (Id : E) return B is
2536 return Flag222 (Id);
2537 end Used_As_Generic_Actual;
2539 function Uses_Sec_Stack (Id : E) return B is
2544 function Vax_Float (Id : E) return B is
2546 return Flag151 (Base_Type (Id));
2549 function Warnings_Off (Id : E) return B is
2554 function Wrapped_Entity (Id : E) return E is
2556 pragma Assert (Ekind (Id) = E_Procedure
2557 and then Is_Primitive_Wrapper (Id));
2561 function Was_Hidden (Id : E) return B is
2563 return Flag196 (Id);
2566 ------------------------------
2567 -- Classification Functions --
2568 ------------------------------
2570 function Is_Access_Type (Id : E) return B is
2572 return Ekind (Id) in Access_Kind;
2575 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2577 return Ekind (Id) in Access_Protected_Kind;
2578 end Is_Access_Protected_Subprogram_Type;
2580 function Is_Array_Type (Id : E) return B is
2582 return Ekind (Id) in Array_Kind;
2585 function Is_Class_Wide_Type (Id : E) return B is
2587 return Ekind (Id) in Class_Wide_Kind;
2588 end Is_Class_Wide_Type;
2590 function Is_Composite_Type (Id : E) return B is
2592 return Ekind (Id) in Composite_Kind;
2593 end Is_Composite_Type;
2595 function Is_Concurrent_Body (Id : E) return B is
2597 return Ekind (Id) in
2598 Concurrent_Body_Kind;
2599 end Is_Concurrent_Body;
2601 function Is_Concurrent_Record_Type (Id : E) return B is
2604 end Is_Concurrent_Record_Type;
2606 function Is_Concurrent_Type (Id : E) return B is
2608 return Ekind (Id) in Concurrent_Kind;
2609 end Is_Concurrent_Type;
2611 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2613 return Ekind (Id) in
2614 Decimal_Fixed_Point_Kind;
2615 end Is_Decimal_Fixed_Point_Type;
2617 function Is_Digits_Type (Id : E) return B is
2619 return Ekind (Id) in Digits_Kind;
2622 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2624 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2625 end Is_Discrete_Or_Fixed_Point_Type;
2627 function Is_Discrete_Type (Id : E) return B is
2629 return Ekind (Id) in Discrete_Kind;
2630 end Is_Discrete_Type;
2632 function Is_Elementary_Type (Id : E) return B is
2634 return Ekind (Id) in Elementary_Kind;
2635 end Is_Elementary_Type;
2637 function Is_Entry (Id : E) return B is
2639 return Ekind (Id) in Entry_Kind;
2642 function Is_Enumeration_Type (Id : E) return B is
2644 return Ekind (Id) in
2646 end Is_Enumeration_Type;
2648 function Is_Fixed_Point_Type (Id : E) return B is
2650 return Ekind (Id) in
2652 end Is_Fixed_Point_Type;
2654 function Is_Floating_Point_Type (Id : E) return B is
2656 return Ekind (Id) in Float_Kind;
2657 end Is_Floating_Point_Type;
2659 function Is_Formal (Id : E) return B is
2661 return Ekind (Id) in Formal_Kind;
2664 function Is_Formal_Object (Id : E) return B is
2666 return Ekind (Id) in Formal_Object_Kind;
2667 end Is_Formal_Object;
2669 function Is_Generic_Subprogram (Id : E) return B is
2671 return Ekind (Id) in Generic_Subprogram_Kind;
2672 end Is_Generic_Subprogram;
2674 function Is_Generic_Unit (Id : E) return B is
2676 return Ekind (Id) in Generic_Unit_Kind;
2677 end Is_Generic_Unit;
2679 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2681 return Ekind (Id) in
2682 Incomplete_Or_Private_Kind;
2683 end Is_Incomplete_Or_Private_Type;
2685 function Is_Incomplete_Type (Id : E) return B is
2687 return Ekind (Id) in
2689 end Is_Incomplete_Type;
2691 function Is_Integer_Type (Id : E) return B is
2693 return Ekind (Id) in Integer_Kind;
2694 end Is_Integer_Type;
2696 function Is_Modular_Integer_Type (Id : E) return B is
2698 return Ekind (Id) in
2699 Modular_Integer_Kind;
2700 end Is_Modular_Integer_Type;
2702 function Is_Named_Number (Id : E) return B is
2704 return Ekind (Id) in Named_Kind;
2705 end Is_Named_Number;
2707 function Is_Numeric_Type (Id : E) return B is
2709 return Ekind (Id) in Numeric_Kind;
2710 end Is_Numeric_Type;
2712 function Is_Object (Id : E) return B is
2714 return Ekind (Id) in Object_Kind;
2717 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2719 return Ekind (Id) in
2720 Ordinary_Fixed_Point_Kind;
2721 end Is_Ordinary_Fixed_Point_Type;
2723 function Is_Overloadable (Id : E) return B is
2725 return Ekind (Id) in Overloadable_Kind;
2726 end Is_Overloadable;
2728 function Is_Private_Type (Id : E) return B is
2730 return Ekind (Id) in Private_Kind;
2731 end Is_Private_Type;
2733 function Is_Protected_Type (Id : E) return B is
2735 return Ekind (Id) in Protected_Kind;
2736 end Is_Protected_Type;
2738 function Is_Real_Type (Id : E) return B is
2740 return Ekind (Id) in Real_Kind;
2743 function Is_Record_Type (Id : E) return B is
2745 return Ekind (Id) in Record_Kind;
2748 function Is_Scalar_Type (Id : E) return B is
2750 return Ekind (Id) in Scalar_Kind;
2753 function Is_Signed_Integer_Type (Id : E) return B is
2755 return Ekind (Id) in
2756 Signed_Integer_Kind;
2757 end Is_Signed_Integer_Type;
2759 function Is_Subprogram (Id : E) return B is
2761 return Ekind (Id) in Subprogram_Kind;
2764 function Is_Task_Type (Id : E) return B is
2766 return Ekind (Id) in Task_Kind;
2769 function Is_Type (Id : E) return B is
2771 return Ekind (Id) in Type_Kind;
2774 ------------------------------
2775 -- Attribute Set Procedures --
2776 ------------------------------
2778 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2780 pragma Assert (Is_Record_Type (Id));
2781 Set_Elist25 (Id, V);
2782 end Set_Abstract_Interfaces;
2784 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2789 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function));
2791 end Set_Abstract_Interface_Alias;
2793 procedure Set_Accept_Address (Id : E; V : L) is
2795 Set_Elist21 (Id, V);
2796 end Set_Accept_Address;
2798 procedure Set_Access_Disp_Table (Id : E; V : L) is
2800 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2801 Set_Elist16 (Id, V);
2802 end Set_Access_Disp_Table;
2804 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2806 pragma Assert (Is_Access_Type (Id));
2808 end Set_Associated_Final_Chain;
2810 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2813 end Set_Associated_Formal_Package;
2815 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2818 end Set_Associated_Node_For_Itype;
2820 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2822 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2824 end Set_Associated_Storage_Pool;
2826 procedure Set_Actual_Subtype (Id : E; V : E) is
2829 (Ekind (Id) = E_Constant
2830 or else Ekind (Id) = E_Variable
2831 or else Ekind (Id) = E_Generic_In_Out_Parameter
2832 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
2834 end Set_Actual_Subtype;
2836 procedure Set_Address_Taken (Id : E; V : B := True) is
2838 Set_Flag104 (Id, V);
2839 end Set_Address_Taken;
2841 procedure Set_Alias (Id : E; V : E) is
2844 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2848 procedure Set_Alignment (Id : E; V : U) is
2850 pragma Assert (Is_Type (Id)
2851 or else Is_Formal (Id)
2852 or else Ekind (Id) = E_Loop_Parameter
2853 or else Ekind (Id) = E_Constant
2854 or else Ekind (Id) = E_Exception
2855 or else Ekind (Id) = E_Variable);
2859 procedure Set_Barrier_Function (Id : E; V : N) is
2861 pragma Assert (Is_Entry (Id));
2863 end Set_Barrier_Function;
2865 procedure Set_Block_Node (Id : E; V : N) is
2867 pragma Assert (Ekind (Id) = E_Block);
2871 procedure Set_Body_Entity (Id : E; V : E) is
2874 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2876 end Set_Body_Entity;
2878 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
2881 (Ekind (Id) = E_Package
2882 or else Is_Subprogram (Id)
2883 or else Is_Generic_Unit (Id));
2885 end Set_Body_Needed_For_SAL;
2887 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2889 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2890 Set_Flag125 (Id, V);
2891 end Set_C_Pass_By_Copy;
2893 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
2896 end Set_Can_Never_Be_Null;
2898 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
2901 end Set_Checks_May_Be_Suppressed;
2903 procedure Set_Class_Wide_Type (Id : E; V : E) is
2905 pragma Assert (Is_Type (Id));
2907 end Set_Class_Wide_Type;
2909 procedure Set_Cloned_Subtype (Id : E; V : E) is
2912 (Ekind (Id) = E_Record_Subtype
2913 or else Ekind (Id) = E_Class_Wide_Subtype);
2915 end Set_Cloned_Subtype;
2917 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2920 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2922 end Set_Component_Bit_Offset;
2924 procedure Set_Component_Clause (Id : E; V : N) is
2927 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2929 end Set_Component_Clause;
2931 procedure Set_Component_Size (Id : E; V : U) is
2933 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2935 end Set_Component_Size;
2937 procedure Set_Component_Type (Id : E; V : E) is
2939 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2941 end Set_Component_Type;
2943 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2946 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2948 end Set_Corresponding_Concurrent_Type;
2950 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2952 pragma Assert (Ekind (Id) = E_Discriminant);
2954 end Set_Corresponding_Discriminant;
2956 procedure Set_Corresponding_Equality (Id : E; V : E) is
2959 (Ekind (Id) = E_Function
2960 and then not Comes_From_Source (Id)
2961 and then Chars (Id) = Name_Op_Ne);
2963 end Set_Corresponding_Equality;
2965 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2967 pragma Assert (Is_Concurrent_Type (Id));
2969 end Set_Corresponding_Record_Type;
2971 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
2974 end Set_Corresponding_Remote_Type;
2976 procedure Set_Current_Use_Clause (Id : E; V : E) is
2978 pragma Assert (Ekind (Id) = E_Package);
2980 end Set_Current_Use_Clause;
2982 procedure Set_Current_Value (Id : E; V : N) is
2984 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
2986 end Set_Current_Value;
2988 procedure Set_CR_Discriminant (Id : E; V : E) is
2991 end Set_CR_Discriminant;
2993 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
2995 Set_Flag166 (Id, V);
2996 end Set_Debug_Info_Off;
2998 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3001 end Set_Debug_Renaming_Link;
3003 procedure Set_Default_Expr_Function (Id : E; V : E) is
3005 pragma Assert (Is_Formal (Id));
3007 end Set_Default_Expr_Function;
3009 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3011 Set_Flag108 (Id, V);
3012 end Set_Default_Expressions_Processed;
3014 procedure Set_Default_Value (Id : E; V : N) is
3016 pragma Assert (Is_Formal (Id));
3018 end Set_Default_Value;
3020 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3024 or else Is_Task_Type (Id)
3025 or else Ekind (Id) = E_Block);
3026 Set_Flag114 (Id, V);
3027 end Set_Delay_Cleanups;
3029 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3033 or else Ekind (Id) = E_Package
3034 or else Ekind (Id) = E_Package_Body);
3036 end Set_Delay_Subprogram_Descriptors;
3038 procedure Set_Delta_Value (Id : E; V : R) is
3040 pragma Assert (Is_Fixed_Point_Type (Id));
3041 Set_Ureal18 (Id, V);
3042 end Set_Delta_Value;
3044 procedure Set_Dependent_Instances (Id : E; V : L) is
3046 pragma Assert (Is_Generic_Instance (Id));
3048 end Set_Dependent_Instances;
3050 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3052 pragma Assert (Nkind (Id) in N_Entity);
3054 end Set_Depends_On_Private;
3056 procedure Set_Digits_Value (Id : E; V : U) is
3059 (Is_Floating_Point_Type (Id)
3060 or else Is_Decimal_Fixed_Point_Type (Id));
3062 end Set_Digits_Value;
3064 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3067 end Set_Directly_Designated_Type;
3069 procedure Set_Discard_Names (Id : E; V : B := True) is
3072 end Set_Discard_Names;
3074 procedure Set_Discriminal (Id : E; V : E) is
3076 pragma Assert (Ekind (Id) = E_Discriminant);
3078 end Set_Discriminal;
3080 procedure Set_Discriminal_Link (Id : E; V : E) is
3083 end Set_Discriminal_Link;
3085 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3087 pragma Assert (Ekind (Id) = E_Component);
3089 end Set_Discriminant_Checking_Func;
3091 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3093 pragma Assert (Nkind (Id) in N_Entity);
3094 Set_Elist21 (Id, V);
3095 end Set_Discriminant_Constraint;
3097 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3100 end Set_Discriminant_Default_Value;
3102 procedure Set_Discriminant_Number (Id : E; V : U) is
3105 end Set_Discriminant_Number;
3107 procedure Set_DT_Entry_Count (Id : E; V : U) is
3109 pragma Assert (Ekind (Id) = E_Component);
3111 end Set_DT_Entry_Count;
3113 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3115 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3117 end Set_DT_Offset_To_Top_Func;
3119 procedure Set_DT_Position (Id : E; V : U) is
3121 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3123 end Set_DT_Position;
3125 procedure Set_DTC_Entity (Id : E; V : E) is
3128 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3132 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3134 pragma Assert (Ekind (Id) = E_Package);
3135 Set_Flag210 (Id, V);
3136 end Set_Elaborate_Body_Desirable;
3138 procedure Set_Elaboration_Entity (Id : E; V : E) is
3143 Ekind (Id) = E_Package
3145 Is_Generic_Unit (Id));
3147 end Set_Elaboration_Entity;
3149 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3154 Ekind (Id) = E_Package
3156 Is_Generic_Unit (Id));
3157 Set_Flag174 (Id, V);
3158 end Set_Elaboration_Entity_Required;
3160 procedure Set_Enclosing_Scope (Id : E; V : E) is
3163 end Set_Enclosing_Scope;
3165 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3167 pragma Assert (Is_Entry (Id));
3168 Set_Flag152 (Id, V);
3169 end Set_Entry_Accepted;
3171 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3174 end Set_Entry_Bodies_Array;
3176 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3179 end Set_Entry_Cancel_Parameter;
3181 procedure Set_Entry_Component (Id : E; V : E) is
3184 end Set_Entry_Component;
3186 procedure Set_Entry_Formal (Id : E; V : E) is
3189 end Set_Entry_Formal;
3191 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3193 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3195 end Set_Entry_Index_Constant;
3197 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3200 end Set_Entry_Parameters_Type;
3202 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3204 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3206 end Set_Enum_Pos_To_Rep;
3208 procedure Set_Enumeration_Pos (Id : E; V : U) is
3210 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3212 end Set_Enumeration_Pos;
3214 procedure Set_Enumeration_Rep (Id : E; V : U) is
3216 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3218 end Set_Enumeration_Rep;
3220 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3222 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3224 end Set_Enumeration_Rep_Expr;
3226 procedure Set_Equivalent_Type (Id : E; V : E) is
3229 (Ekind (Id) = E_Class_Wide_Type or else
3230 Ekind (Id) = E_Class_Wide_Subtype or else
3231 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3232 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
3233 Ekind (Id) = E_Access_Subprogram_Type or else
3234 Ekind (Id) = E_Exception_Type);
3236 end Set_Equivalent_Type;
3238 procedure Set_Esize (Id : E; V : U) is
3243 procedure Set_Exception_Code (Id : E; V : U) is
3245 pragma Assert (Ekind (Id) = E_Exception);
3247 end Set_Exception_Code;
3249 procedure Set_Extra_Accessibility (Id : E; V : E) is
3251 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3253 end Set_Extra_Accessibility;
3255 procedure Set_Extra_Constrained (Id : E; V : E) is
3257 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3259 end Set_Extra_Constrained;
3261 procedure Set_Extra_Formal (Id : E; V : E) is
3264 end Set_Extra_Formal;
3266 procedure Set_Extra_Formals (Id : E; V : E) is
3269 (Is_Overloadable (Id)
3270 or else Ekind (Id) = E_Entry_Family
3271 or else Ekind (Id) = E_Subprogram_Body
3272 or else Ekind (Id) = E_Subprogram_Type);
3274 end Set_Extra_Formals;
3276 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3279 end Set_Finalization_Chain_Entity;
3281 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3283 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3284 Set_Flag158 (Id, V);
3285 end Set_Finalize_Storage_Only;
3287 procedure Set_First_Entity (Id : E; V : E) is
3290 end Set_First_Entity;
3292 procedure Set_First_Index (Id : E; V : N) is
3294 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3296 end Set_First_Index;
3298 procedure Set_First_Literal (Id : E; V : E) is
3300 pragma Assert (Is_Enumeration_Type (Id));
3302 end Set_First_Literal;
3304 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3307 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3309 end Set_First_Optional_Parameter;
3311 procedure Set_First_Private_Entity (Id : E; V : E) is
3313 pragma Assert (Ekind (Id) = E_Package
3314 or else Ekind (Id) = E_Generic_Package
3315 or else Ekind (Id) in Concurrent_Kind);
3317 end Set_First_Private_Entity;
3319 procedure Set_First_Rep_Item (Id : E; V : N) is
3322 end Set_First_Rep_Item;
3324 procedure Set_Freeze_Node (Id : E; V : N) is
3327 end Set_Freeze_Node;
3329 procedure Set_From_With_Type (Id : E; V : B := True) is
3333 or else Ekind (Id) = E_Package);
3334 Set_Flag159 (Id, V);
3335 end Set_From_With_Type;
3337 procedure Set_Full_View (Id : E; V : E) is
3339 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3343 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3346 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3347 Set_Flag169 (Id, V);
3348 end Set_Function_Returns_With_DSP;
3350 procedure Set_Generic_Homonym (Id : E; V : E) is
3353 end Set_Generic_Homonym;
3355 procedure Set_Generic_Renamings (Id : E; V : L) is
3357 Set_Elist23 (Id, V);
3358 end Set_Generic_Renamings;
3360 procedure Set_Handler_Records (Id : E; V : S) is
3363 end Set_Handler_Records;
3365 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3367 pragma Assert (Base_Type (Id) = Id);
3368 Set_Flag135 (Id, V);
3369 end Set_Has_Aliased_Components;
3371 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3374 end Set_Has_Alignment_Clause;
3376 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3379 end Set_Has_All_Calls_Remote;
3381 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3383 Set_Flag201 (Id, V);
3384 end Set_Has_Anon_Block_Suffix;
3386 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3388 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3390 end Set_Has_Atomic_Components;
3392 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3395 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3396 Set_Flag139 (Id, V);
3397 end Set_Has_Biased_Representation;
3399 procedure Set_Has_Completion (Id : E; V : B := True) is
3402 end Set_Has_Completion;
3404 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3406 pragma Assert (Is_Type (Id));
3408 end Set_Has_Completion_In_Body;
3410 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3412 pragma Assert (Ekind (Id) = E_Record_Type);
3413 Set_Flag140 (Id, V);
3414 end Set_Has_Complex_Representation;
3416 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3418 pragma Assert (Ekind (Id) = E_Array_Type);
3420 end Set_Has_Component_Size_Clause;
3422 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3424 pragma Assert (Is_Type (Id));
3425 Set_Flag187 (Id, V);
3426 end Set_Has_Constrained_Partial_View;
3428 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3430 Set_Flag181 (Id, V);
3431 end Set_Has_Contiguous_Rep;
3433 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3435 pragma Assert (Base_Type (Id) = Id);
3437 end Set_Has_Controlled_Component;
3439 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3442 end Set_Has_Controlling_Result;
3444 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3446 Set_Flag119 (Id, V);
3447 end Set_Has_Convention_Pragma;
3449 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3451 pragma Assert (Nkind (Id) in N_Entity);
3453 end Set_Has_Delayed_Freeze;
3455 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3457 pragma Assert (Nkind (Id) in N_Entity);
3459 end Set_Has_Discriminants;
3461 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3463 pragma Assert (Ekind (Id) = E_Record_Type
3464 and then Is_Tagged_Type (Id));
3465 Set_Flag220 (Id, V);
3466 end Set_Has_Dispatch_Table;
3468 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3470 pragma Assert (Is_Enumeration_Type (Id));
3472 end Set_Has_Enumeration_Rep_Clause;
3474 procedure Set_Has_Exit (Id : E; V : B := True) is
3479 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3481 pragma Assert (Is_Tagged_Type (Id));
3482 Set_Flag110 (Id, V);
3483 end Set_Has_External_Tag_Rep_Clause;
3485 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3487 Set_Flag175 (Id, V);
3488 end Set_Has_Forward_Instantiation;
3490 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3492 Set_Flag173 (Id, V);
3493 end Set_Has_Fully_Qualified_Name;
3495 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3498 end Set_Has_Gigi_Rep_Item;
3500 procedure Set_Has_Homonym (Id : E; V : B := True) is
3503 end Set_Has_Homonym;
3505 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3508 (Ekind (Id) = E_Variable or else Ekind (Id) = E_Out_Parameter);
3509 Set_Flag219 (Id, V);
3510 end Set_Has_Initial_Value;
3512 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3514 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3516 end Set_Has_Machine_Radix_Clause;
3518 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3521 end Set_Has_Master_Entity;
3523 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3526 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3527 Set_Flag142 (Id, V);
3528 end Set_Has_Missing_Return;
3530 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3532 Set_Flag101 (Id, V);
3533 end Set_Has_Nested_Block_With_Handler;
3535 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3538 (Ekind (Id) = E_Variable
3539 or else Ekind (Id) = E_Constant
3540 or else Ekind (Id) = E_Loop_Parameter);
3541 Set_Flag215 (Id, V);
3542 end Set_Has_Up_Level_Access;
3544 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3546 pragma Assert (Base_Type (Id) = Id);
3548 end Set_Has_Non_Standard_Rep;
3550 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3552 pragma Assert (Is_Type (Id));
3553 Set_Flag172 (Id, V);
3554 end Set_Has_Object_Size_Clause;
3556 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3558 Set_Flag154 (Id, V);
3559 end Set_Has_Per_Object_Constraint;
3561 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3563 Set_Flag188 (Id, V);
3564 end Set_Has_Persistent_BSS;
3566 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3568 pragma Assert (Is_Access_Type (Id));
3569 Set_Flag27 (Base_Type (Id), V);
3570 end Set_Has_Pragma_Controlled;
3572 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3574 Set_Flag150 (Id, V);
3575 end Set_Has_Pragma_Elaborate_Body;
3577 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3579 Set_Flag157 (Id, V);
3580 end Set_Has_Pragma_Inline;
3582 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3584 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3585 pragma Assert (Id = Base_Type (Id));
3586 Set_Flag121 (Id, V);
3587 end Set_Has_Pragma_Pack;
3589 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3591 Set_Flag221 (Id, V);
3592 end Set_Has_Pragma_Preelab_Init;
3594 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3596 Set_Flag203 (Id, V);
3597 end Set_Has_Pragma_Pure;
3599 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3601 Set_Flag179 (Id, V);
3602 end Set_Has_Pragma_Pure_Function;
3604 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3606 Set_Flag180 (Id, V);
3607 end Set_Has_Pragma_Unreferenced;
3609 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3611 pragma Assert (Is_Type (Id));
3612 Set_Flag212 (Id, V);
3613 end Set_Has_Pragma_Unreferenced_Objects;
3615 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3617 pragma Assert (Id = Base_Type (Id));
3618 Set_Flag120 (Id, V);
3619 end Set_Has_Primitive_Operations;
3621 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3623 Set_Flag155 (Id, V);
3624 end Set_Has_Private_Declaration;
3626 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3628 Set_Flag161 (Id, V);
3629 end Set_Has_Qualified_Name;
3631 procedure Set_Has_RACW (Id : E; V : B := True) is
3633 pragma Assert (Ekind (Id) = E_Package);
3634 Set_Flag214 (Id, V);
3637 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3639 pragma Assert (Id = Base_Type (Id));
3641 end Set_Has_Record_Rep_Clause;
3643 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3645 pragma Assert (Is_Subprogram (Id));
3646 Set_Flag143 (Id, V);
3647 end Set_Has_Recursive_Call;
3649 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3652 end Set_Has_Size_Clause;
3654 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3657 end Set_Has_Small_Clause;
3659 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3661 pragma Assert (Id = Base_Type (Id));
3662 Set_Flag100 (Id, V);
3663 end Set_Has_Specified_Layout;
3665 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3667 pragma Assert (Is_Type (Id));
3668 Set_Flag190 (Id, V);
3669 end Set_Has_Specified_Stream_Input;
3671 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3673 pragma Assert (Is_Type (Id));
3674 Set_Flag191 (Id, V);
3675 end Set_Has_Specified_Stream_Output;
3677 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3679 pragma Assert (Is_Type (Id));
3680 Set_Flag192 (Id, V);
3681 end Set_Has_Specified_Stream_Read;
3683 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3685 pragma Assert (Is_Type (Id));
3686 Set_Flag193 (Id, V);
3687 end Set_Has_Specified_Stream_Write;
3689 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3691 Set_Flag211 (Id, V);
3692 end Set_Has_Static_Discriminants;
3694 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3696 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3697 pragma Assert (Base_Type (Id) = Id);
3699 end Set_Has_Storage_Size_Clause;
3701 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3703 pragma Assert (Is_Elementary_Type (Id));
3704 Set_Flag184 (Id, V);
3705 end Set_Has_Stream_Size_Clause;
3707 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3710 end Set_Has_Subprogram_Descriptor;
3712 procedure Set_Has_Task (Id : E; V : B := True) is
3714 pragma Assert (Base_Type (Id) = Id);
3718 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3720 pragma Assert (Base_Type (Id) = Id);
3721 Set_Flag123 (Id, V);
3722 end Set_Has_Unchecked_Union;
3724 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3726 pragma Assert (Is_Type (Id));
3728 end Set_Has_Unknown_Discriminants;
3730 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3732 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3734 end Set_Has_Volatile_Components;
3736 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3738 Set_Flag182 (Id, V);
3739 end Set_Has_Xref_Entry;
3741 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3743 pragma Assert (Ekind (Id) = E_Variable);
3745 end Set_Hiding_Loop_Variable;
3747 procedure Set_Homonym (Id : E; V : E) is
3749 pragma Assert (Id /= V);
3753 procedure Set_In_Package_Body (Id : E; V : B := True) is
3756 end Set_In_Package_Body;
3758 procedure Set_In_Private_Part (Id : E; V : B := True) is
3761 end Set_In_Private_Part;
3763 procedure Set_In_Use (Id : E; V : B := True) is
3765 pragma Assert (Nkind (Id) in N_Entity);
3769 procedure Set_Inner_Instances (Id : E; V : L) is
3771 Set_Elist23 (Id, V);
3772 end Set_Inner_Instances;
3774 procedure Set_Interface_Name (Id : E; V : N) is
3777 end Set_Interface_Name;
3779 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3781 pragma Assert (Is_Overloadable (Id));
3783 end Set_Is_Abstract_Subprogram;
3785 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3787 pragma Assert (Is_Type (Id));
3788 Set_Flag146 (Id, V);
3789 end Set_Is_Abstract_Type;
3791 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3793 pragma Assert (Is_Access_Type (Id));
3794 Set_Flag194 (Id, V);
3795 end Set_Is_Local_Anonymous_Access;
3797 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3799 pragma Assert (Is_Access_Type (Id));
3801 end Set_Is_Access_Constant;
3803 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3805 Set_Flag185 (Id, V);
3806 end Set_Is_Ada_2005_Only;
3808 procedure Set_Is_Aliased (Id : E; V : B := True) is
3810 pragma Assert (Nkind (Id) in N_Entity);
3814 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3816 pragma Assert (Is_Entry (Id));
3817 Set_Flag132 (Id, V);
3818 end Set_Is_AST_Entry;
3820 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3823 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3825 end Set_Is_Asynchronous;
3827 procedure Set_Is_Atomic (Id : E; V : B := True) is
3832 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3834 pragma Assert ((not V)
3835 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3837 Set_Flag122 (Id, V);
3838 end Set_Is_Bit_Packed_Array;
3840 procedure Set_Is_Called (Id : E; V : B := True) is
3843 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3844 Set_Flag102 (Id, V);
3847 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3850 end Set_Is_Character_Type;
3852 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3855 end Set_Is_Child_Unit;
3857 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
3860 end Set_Is_Class_Wide_Equivalent_Type;
3862 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3864 Set_Flag149 (Id, V);
3865 end Set_Is_Compilation_Unit;
3867 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3869 pragma Assert (Ekind (Id) = E_Discriminant);
3870 Set_Flag103 (Id, V);
3871 end Set_Is_Completely_Hidden;
3873 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3876 end Set_Is_Concurrent_Record_Type;
3878 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3881 end Set_Is_Constr_Subt_For_U_Nominal;
3883 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3885 Set_Flag141 (Id, V);
3886 end Set_Is_Constr_Subt_For_UN_Aliased;
3888 procedure Set_Is_Constrained (Id : E; V : B := True) is
3890 pragma Assert (Nkind (Id) in N_Entity);
3892 end Set_Is_Constrained;
3894 procedure Set_Is_Constructor (Id : E; V : B := True) is
3897 end Set_Is_Constructor;
3899 procedure Set_Is_Controlled (Id : E; V : B := True) is
3901 pragma Assert (Id = Base_Type (Id));
3903 end Set_Is_Controlled;
3905 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3907 pragma Assert (Is_Formal (Id));
3909 end Set_Is_Controlling_Formal;
3911 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3914 end Set_Is_CPP_Class;
3916 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3918 Set_Flag176 (Id, V);
3919 end Set_Is_Discrim_SO_Function;
3921 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3926 Is_Overloadable (Id)
3928 Ekind (Id) = E_Subprogram_Type);
3931 end Set_Is_Dispatching_Operation;
3933 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3935 Set_Flag124 (Id, V);
3936 end Set_Is_Eliminated;
3938 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3941 end Set_Is_Entry_Formal;
3943 procedure Set_Is_Exported (Id : E; V : B := True) is
3946 end Set_Is_Exported;
3948 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3951 end Set_Is_First_Subtype;
3953 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3956 (Ekind (Id) = E_Record_Subtype
3958 Ekind (Id) = E_Private_Subtype);
3959 Set_Flag118 (Id, V);
3960 end Set_Is_For_Access_Subtype;
3962 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
3964 Set_Flag111 (Id, V);
3965 end Set_Is_Formal_Subprogram;
3967 procedure Set_Is_Frozen (Id : E; V : B := True) is
3969 pragma Assert (Nkind (Id) in N_Entity);
3973 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
3975 pragma Assert (Is_Type (Id));
3977 end Set_Is_Generic_Actual_Type;
3979 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
3981 Set_Flag130 (Id, V);
3982 end Set_Is_Generic_Instance;
3984 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
3986 pragma Assert (Nkind (Id) in N_Entity);
3988 end Set_Is_Generic_Type;
3990 procedure Set_Is_Hidden (Id : E; V : B := True) is
3995 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
3997 Set_Flag171 (Id, V);
3998 end Set_Is_Hidden_Open_Scope;
4000 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4002 pragma Assert (Nkind (Id) in N_Entity);
4004 end Set_Is_Immediately_Visible;
4006 procedure Set_Is_Imported (Id : E; V : B := True) is
4009 end Set_Is_Imported;
4011 procedure Set_Is_Inlined (Id : E; V : B := True) is
4016 procedure Set_Is_Interface (Id : E; V : B := True) is
4019 (Ekind (Id) = E_Record_Type
4020 or else Ekind (Id) = E_Record_Subtype
4021 or else Ekind (Id) = E_Record_Type_With_Private
4022 or else Ekind (Id) = E_Record_Subtype_With_Private
4023 or else Ekind (Id) = E_Class_Wide_Type
4024 or else Ekind (Id) = E_Class_Wide_Subtype);
4025 Set_Flag186 (Id, V);
4026 end Set_Is_Interface;
4028 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4030 Set_Flag126 (Id, V);
4031 end Set_Is_Instantiated;
4033 procedure Set_Is_Internal (Id : E; V : B := True) is
4035 pragma Assert (Nkind (Id) in N_Entity);
4037 end Set_Is_Internal;
4039 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4041 pragma Assert (Nkind (Id) in N_Entity);
4043 end Set_Is_Interrupt_Handler;
4045 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4048 end Set_Is_Intrinsic_Subprogram;
4050 procedure Set_Is_Itype (Id : E; V : B := True) is
4055 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4058 end Set_Is_Known_Non_Null;
4060 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4062 Set_Flag204 (Id, V);
4063 end Set_Is_Known_Null;
4065 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4067 Set_Flag170 (Id, V);
4068 end Set_Is_Known_Valid;
4070 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4072 pragma Assert (Is_Type (Id));
4073 Set_Flag106 (Id, V);
4074 end Set_Is_Limited_Composite;
4076 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4078 pragma Assert (Is_Interface (Id));
4079 Set_Flag197 (Id, V);
4080 end Set_Is_Limited_Interface;
4082 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4085 end Set_Is_Limited_Record;
4087 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4089 pragma Assert (Is_Subprogram (Id));
4090 Set_Flag137 (Id, V);
4091 end Set_Is_Machine_Code_Subprogram;
4093 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4095 pragma Assert (Is_Type (Id));
4096 Set_Flag109 (Id, V);
4097 end Set_Is_Non_Static_Subtype;
4099 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4101 pragma Assert (Ekind (Id) = E_Procedure);
4102 Set_Flag178 (Id, V);
4103 end Set_Is_Null_Init_Proc;
4105 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4107 Set_Flag153 (Id, V);
4108 end Set_Is_Obsolescent;
4110 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4112 pragma Assert (Is_Formal (Id));
4113 Set_Flag134 (Id, V);
4114 end Set_Is_Optional_Parameter;
4116 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4118 pragma Assert (Is_Subprogram (Id));
4120 end Set_Is_Overriding_Operation;
4122 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4124 Set_Flag160 (Id, V);
4125 end Set_Is_Package_Body_Entity;
4127 procedure Set_Is_Packed (Id : E; V : B := True) is
4129 pragma Assert (Base_Type (Id) = Id);
4133 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4135 Set_Flag138 (Id, V);
4136 end Set_Is_Packed_Array_Type;
4138 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4140 pragma Assert (Nkind (Id) in N_Entity);
4142 end Set_Is_Potentially_Use_Visible;
4144 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4147 end Set_Is_Preelaborated;
4149 procedure Set_Is_Primitive (Id : E; V : B := True) is
4152 (Is_Overloadable (Id)
4153 or else Ekind (Id) = E_Generic_Function
4154 or else Ekind (Id) = E_Generic_Procedure);
4155 Set_Flag218 (Id, V);
4156 end Set_Is_Primitive;
4158 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4160 pragma Assert (Ekind (Id) = E_Procedure);
4161 Set_Flag195 (Id, V);
4162 end Set_Is_Primitive_Wrapper;
4164 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4166 pragma Assert (Is_Type (Id));
4167 Set_Flag107 (Id, V);
4168 end Set_Is_Private_Composite;
4170 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4173 end Set_Is_Private_Descendant;
4175 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4177 pragma Assert (Is_Interface (Id));
4178 Set_Flag198 (Id, V);
4179 end Set_Is_Protected_Interface;
4181 procedure Set_Is_Public (Id : E; V : B := True) is
4183 pragma Assert (Nkind (Id) in N_Entity);
4187 procedure Set_Is_Pure (Id : E; V : B := True) is
4192 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4194 pragma Assert (Is_Access_Type (Id));
4195 Set_Flag189 (Id, V);
4196 end Set_Is_Pure_Unit_Access_Type;
4198 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4201 end Set_Is_Remote_Call_Interface;
4203 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4206 end Set_Is_Remote_Types;
4208 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4210 Set_Flag112 (Id, V);
4211 end Set_Is_Renaming_Of_Object;
4213 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4215 Set_Flag209 (Id, V);
4216 end Set_Is_Return_Object;
4218 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4221 end Set_Is_Shared_Passive;
4223 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4226 (Ekind (Id) = E_Exception
4227 or else Ekind (Id) = E_Variable
4228 or else Ekind (Id) = E_Constant
4229 or else Is_Type (Id)
4230 or else Ekind (Id) = E_Void);
4232 end Set_Is_Statically_Allocated;
4234 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4236 pragma Assert (Is_Interface (Id));
4237 Set_Flag199 (Id, V);
4238 end Set_Is_Synchronized_Interface;
4240 procedure Set_Is_Tag (Id : E; V : B := True) is
4242 pragma Assert (Nkind (Id) in N_Entity);
4246 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4249 end Set_Is_Tagged_Type;
4251 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4253 pragma Assert (Is_Interface (Id));
4254 Set_Flag200 (Id, V);
4255 end Set_Is_Task_Interface;
4257 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4259 Set_Flag163 (Id, V);
4260 end Set_Is_True_Constant;
4262 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4264 pragma Assert (Base_Type (Id) = Id);
4265 Set_Flag117 (Id, V);
4266 end Set_Is_Unchecked_Union;
4268 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4270 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4271 Set_Flag144 (Id, V);
4272 end Set_Is_Unsigned_Type;
4274 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4276 pragma Assert (Ekind (Id) = E_Procedure);
4277 Set_Flag127 (Id, V);
4278 end Set_Is_Valued_Procedure;
4280 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4282 pragma Assert (Is_Child_Unit (Id));
4283 Set_Flag116 (Id, V);
4284 end Set_Is_Visible_Child_Unit;
4286 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4288 Set_Flag206 (Id, V);
4289 end Set_Is_Visible_Formal;
4291 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4293 pragma Assert (Ekind (Id) = E_Exception);
4294 Set_Flag133 (Id, V);
4295 end Set_Is_VMS_Exception;
4297 procedure Set_Is_Volatile (Id : E; V : B := True) is
4299 pragma Assert (Nkind (Id) in N_Entity);
4301 end Set_Is_Volatile;
4303 procedure Set_Itype_Printed (Id : E; V : B := True) is
4305 pragma Assert (Is_Itype (Id));
4306 Set_Flag202 (Id, V);
4307 end Set_Itype_Printed;
4309 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4312 end Set_Kill_Elaboration_Checks;
4314 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4317 end Set_Kill_Range_Checks;
4319 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4322 end Set_Kill_Tag_Checks;
4324 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4326 pragma Assert (Is_Type (Id));
4327 Set_Flag207 (Id, V);
4328 end Set_Known_To_Have_Preelab_Init;
4330 procedure Set_Last_Assignment (Id : E; V : N) is
4332 pragma Assert (Ekind (Id) = E_Variable);
4334 end Set_Last_Assignment;
4336 procedure Set_Last_Entity (Id : E; V : E) is
4339 end Set_Last_Entity;
4341 procedure Set_Limited_View (Id : E; V : E) is
4343 pragma Assert (Ekind (Id) = E_Package);
4345 end Set_Limited_View;
4347 procedure Set_Lit_Indexes (Id : E; V : E) is
4349 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4351 end Set_Lit_Indexes;
4353 procedure Set_Lit_Strings (Id : E; V : E) is
4355 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4357 end Set_Lit_Strings;
4359 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4361 pragma Assert (Is_Formal (Id));
4362 Set_Flag205 (Id, V);
4363 end Set_Low_Bound_Known;
4365 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4367 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4369 end Set_Machine_Radix_10;
4371 procedure Set_Master_Id (Id : E; V : E) is
4373 pragma Assert (Is_Access_Type (Id));
4377 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4379 Set_Flag168 (Id, V);
4380 end Set_Materialize_Entity;
4382 procedure Set_Mechanism (Id : E; V : M) is
4384 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4385 Set_Uint8 (Id, UI_From_Int (V));
4388 procedure Set_Modulus (Id : E; V : U) is
4390 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4394 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4396 pragma Assert (Is_Type (Id));
4397 Set_Flag183 (Id, V);
4398 end Set_Must_Be_On_Byte_Boundary;
4400 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4402 pragma Assert (Is_Type (Id));
4403 Set_Flag208 (Id, V);
4404 end Set_Must_Have_Preelab_Init;
4406 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4408 Set_Flag147 (Id, V);
4409 end Set_Needs_Debug_Info;
4411 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4414 (Is_Overloadable (Id)
4415 or else Ekind (Id) = E_Subprogram_Type
4416 or else Ekind (Id) = E_Entry_Family);
4418 end Set_Needs_No_Actuals;
4420 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4422 Set_Flag115 (Id, V);
4423 end Set_Never_Set_In_Source;
4425 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4428 end Set_Next_Inlined_Subprogram;
4430 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4432 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4433 Set_Flag131 (Id, V);
4434 end Set_No_Pool_Assigned;
4436 procedure Set_No_Return (Id : E; V : B := True) is
4440 or else Ekind (Id) = E_Procedure
4441 or else Ekind (Id) = E_Generic_Procedure);
4442 Set_Flag113 (Id, V);
4445 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4447 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4448 Set_Flag136 (Id, V);
4449 end Set_No_Strict_Aliasing;
4451 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4453 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4455 end Set_Non_Binary_Modulus;
4457 procedure Set_Non_Limited_View (Id : E; V : E) is
4459 pragma Assert (Ekind (Id) in Incomplete_Kind);
4461 end Set_Non_Limited_View;
4463 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4466 (Root_Type (Id) = Standard_Boolean
4467 and then Ekind (Id) = E_Enumeration_Type);
4468 Set_Flag162 (Id, V);
4469 end Set_Nonzero_Is_True;
4471 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4474 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4476 end Set_Normalized_First_Bit;
4478 procedure Set_Normalized_Position (Id : E; V : U) is
4481 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4483 end Set_Normalized_Position;
4485 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4488 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4490 end Set_Normalized_Position_Max;
4492 procedure Set_Object_Ref (Id : E; V : E) is
4494 pragma Assert (Ekind (Id) = E_Protected_Body);
4498 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4501 end Set_Obsolescent_Warning;
4503 procedure Set_Original_Array_Type (Id : E; V : E) is
4505 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4507 end Set_Original_Array_Type;
4509 procedure Set_Original_Record_Component (Id : E; V : E) is
4512 (Ekind (Id) = E_Void
4513 or else Ekind (Id) = E_Component
4514 or else Ekind (Id) = E_Discriminant);
4516 end Set_Original_Record_Component;
4518 procedure Set_Overridden_Operation (Id : E; V : E) is
4521 end Set_Overridden_Operation;
4523 procedure Set_Package_Instantiation (Id : E; V : N) is
4526 (Ekind (Id) = E_Void
4527 or else Ekind (Id) = E_Generic_Package
4528 or else Ekind (Id) = E_Package);
4530 end Set_Package_Instantiation;
4532 procedure Set_Packed_Array_Type (Id : E; V : E) is
4534 pragma Assert (Is_Array_Type (Id));
4536 end Set_Packed_Array_Type;
4538 procedure Set_Parent_Subtype (Id : E; V : E) is
4540 pragma Assert (Ekind (Id) = E_Record_Type);
4542 end Set_Parent_Subtype;
4544 procedure Set_Primitive_Operations (Id : E; V : L) is
4546 pragma Assert (Is_Tagged_Type (Id));
4547 Set_Elist15 (Id, V);
4548 end Set_Primitive_Operations;
4550 procedure Set_Prival (Id : E; V : E) is
4552 pragma Assert (Is_Protected_Private (Id));
4556 procedure Set_Privals_Chain (Id : E; V : L) is
4558 pragma Assert (Is_Overloadable (Id)
4559 or else Ekind (Id) = E_Entry_Family);
4560 Set_Elist23 (Id, V);
4561 end Set_Privals_Chain;
4563 procedure Set_Private_Dependents (Id : E; V : L) is
4565 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4566 Set_Elist18 (Id, V);
4567 end Set_Private_Dependents;
4569 procedure Set_Private_View (Id : E; V : N) is
4571 pragma Assert (Is_Private_Type (Id));
4573 end Set_Private_View;
4575 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4577 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4579 end Set_Protected_Body_Subprogram;
4581 procedure Set_Protected_Formal (Id : E; V : E) is
4583 pragma Assert (Is_Formal (Id));
4585 end Set_Protected_Formal;
4587 procedure Set_Protected_Operation (Id : E; V : N) is
4589 pragma Assert (Is_Protected_Private (Id));
4591 end Set_Protected_Operation;
4593 procedure Set_Reachable (Id : E; V : B := True) is
4598 procedure Set_Referenced (Id : E; V : B := True) is
4600 Set_Flag156 (Id, V);
4603 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4606 end Set_Referenced_As_LHS;
4608 procedure Set_Referenced_Object (Id : E; V : N) is
4610 pragma Assert (Is_Type (Id));
4612 end Set_Referenced_Object;
4614 procedure Set_Register_Exception_Call (Id : E; V : N) is
4616 pragma Assert (Ekind (Id) = E_Exception);
4618 end Set_Register_Exception_Call;
4620 procedure Set_Related_Array_Object (Id : E; V : E) is
4622 pragma Assert (Is_Array_Type (Id));
4624 end Set_Related_Array_Object;
4626 procedure Set_Related_Instance (Id : E; V : E) is
4629 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4631 end Set_Related_Instance;
4633 procedure Set_Related_Interface (Id : E; V : E) is
4636 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
4638 end Set_Related_Interface;
4640 procedure Set_Renamed_Entity (Id : E; V : N) is
4643 end Set_Renamed_Entity;
4645 procedure Set_Renamed_Object (Id : E; V : N) is
4648 end Set_Renamed_Object;
4650 procedure Set_Renaming_Map (Id : E; V : U) is
4653 end Set_Renaming_Map;
4655 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4657 pragma Assert (Is_Overloadable (Id));
4658 Set_Flag213 (Id, V);
4659 end Set_Requires_Overriding;
4661 procedure Set_Return_Present (Id : E; V : B := True) is
4664 end Set_Return_Present;
4666 procedure Set_Return_Applies_To (Id : E; V : N) is
4669 end Set_Return_Applies_To;
4671 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4674 end Set_Returns_By_Ref;
4676 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4679 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4680 Set_Flag164 (Id, V);
4681 end Set_Reverse_Bit_Order;
4683 procedure Set_RM_Size (Id : E; V : U) is
4685 pragma Assert (Is_Type (Id));
4689 procedure Set_Scalar_Range (Id : E; V : N) is
4692 end Set_Scalar_Range;
4694 procedure Set_Scale_Value (Id : E; V : U) is
4697 end Set_Scale_Value;
4699 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4701 pragma Assert (not Is_Record_Type (Id));
4703 end Set_Scope_Depth_Value;
4705 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4707 Set_Flag167 (Id, V);
4708 end Set_Sec_Stack_Needed_For_Return;
4710 procedure Set_Shadow_Entities (Id : E; V : S) is
4713 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4715 end Set_Shadow_Entities;
4717 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4719 pragma Assert (Ekind (Id) = E_Variable);
4721 end Set_Shared_Var_Assign_Proc;
4723 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4725 pragma Assert (Ekind (Id) = E_Variable);
4727 end Set_Shared_Var_Read_Proc;
4729 procedure Set_Size_Check_Code (Id : E; V : N) is
4731 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4733 end Set_Size_Check_Code;
4735 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4737 Set_Flag177 (Id, V);
4738 end Set_Size_Depends_On_Discriminant;
4740 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4743 end Set_Size_Known_At_Compile_Time;
4745 procedure Set_Small_Value (Id : E; V : R) is
4747 pragma Assert (Is_Fixed_Point_Type (Id));
4748 Set_Ureal21 (Id, V);
4749 end Set_Small_Value;
4751 procedure Set_Spec_Entity (Id : E; V : E) is
4753 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4755 end Set_Spec_Entity;
4757 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4759 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4760 pragma Assert (Base_Type (Id) = Id);
4762 end Set_Storage_Size_Variable;
4764 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
4766 pragma Assert (Ekind (Id) = E_Package);
4768 end Set_Static_Elaboration_Desired;
4770 procedure Set_Static_Initialization (Id : E; V : N) is
4773 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
4775 end Set_Static_Initialization;
4777 procedure Set_Stored_Constraint (Id : E; V : L) is
4779 pragma Assert (Nkind (Id) in N_Entity);
4780 Set_Elist23 (Id, V);
4781 end Set_Stored_Constraint;
4783 procedure Set_Strict_Alignment (Id : E; V : B := True) is
4785 pragma Assert (Base_Type (Id) = Id);
4786 Set_Flag145 (Id, V);
4787 end Set_Strict_Alignment;
4789 procedure Set_String_Literal_Length (Id : E; V : U) is
4791 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4793 end Set_String_Literal_Length;
4795 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
4797 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4799 end Set_String_Literal_Low_Bound;
4801 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
4803 Set_Flag148 (Id, V);
4804 end Set_Suppress_Elaboration_Warnings;
4806 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
4808 pragma Assert (Id = Base_Type (Id));
4809 Set_Flag105 (Id, V);
4810 end Set_Suppress_Init_Proc;
4812 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
4814 Set_Flag165 (Id, V);
4815 end Set_Suppress_Style_Checks;
4817 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
4819 Set_Flag217 (Id, V);
4820 end Set_Suppress_Value_Tracking_On_Call;
4822 procedure Set_Task_Body_Procedure (Id : E; V : N) is
4824 pragma Assert (Ekind (Id) in Task_Kind);
4826 end Set_Task_Body_Procedure;
4828 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
4831 end Set_Treat_As_Volatile;
4833 procedure Set_Underlying_Full_View (Id : E; V : E) is
4835 pragma Assert (Ekind (Id) in Private_Kind);
4837 end Set_Underlying_Full_View;
4839 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
4841 pragma Assert (Is_Type (Id) and then Base_Type (Id) = Id);
4842 Set_Flag216 (Id, V);
4843 end Set_Universal_Aliasing;
4845 procedure Set_Unset_Reference (Id : E; V : N) is
4848 end Set_Unset_Reference;
4850 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
4853 end Set_Uses_Sec_Stack;
4855 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
4857 Set_Flag222 (Id, V);
4858 end Set_Used_As_Generic_Actual;
4860 procedure Set_Vax_Float (Id : E; V : B := True) is
4862 pragma Assert (Id = Base_Type (Id));
4863 Set_Flag151 (Id, V);
4866 procedure Set_Warnings_Off (Id : E; V : B := True) is
4869 end Set_Warnings_Off;
4871 procedure Set_Was_Hidden (Id : E; V : B := True) is
4873 Set_Flag196 (Id, V);
4876 procedure Set_Wrapped_Entity (Id : E; V : E) is
4878 pragma Assert (Ekind (Id) = E_Procedure
4879 and then Is_Primitive_Wrapper (Id));
4881 end Set_Wrapped_Entity;
4883 -----------------------------------
4884 -- Field Initialization Routines --
4885 -----------------------------------
4887 procedure Init_Alignment (Id : E) is
4889 Set_Uint14 (Id, Uint_0);
4892 procedure Init_Alignment (Id : E; V : Int) is
4894 Set_Uint14 (Id, UI_From_Int (V));
4897 procedure Init_Component_Bit_Offset (Id : E) is
4899 Set_Uint11 (Id, No_Uint);
4900 end Init_Component_Bit_Offset;
4902 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
4904 Set_Uint11 (Id, UI_From_Int (V));
4905 end Init_Component_Bit_Offset;
4907 procedure Init_Component_Size (Id : E) is
4909 Set_Uint22 (Id, Uint_0);
4910 end Init_Component_Size;
4912 procedure Init_Component_Size (Id : E; V : Int) is
4914 Set_Uint22 (Id, UI_From_Int (V));
4915 end Init_Component_Size;
4917 procedure Init_Digits_Value (Id : E) is
4919 Set_Uint17 (Id, Uint_0);
4920 end Init_Digits_Value;
4922 procedure Init_Digits_Value (Id : E; V : Int) is
4924 Set_Uint17 (Id, UI_From_Int (V));
4925 end Init_Digits_Value;
4927 procedure Init_Esize (Id : E) is
4929 Set_Uint12 (Id, Uint_0);
4932 procedure Init_Esize (Id : E; V : Int) is
4934 Set_Uint12 (Id, UI_From_Int (V));
4937 procedure Init_Normalized_First_Bit (Id : E) is
4939 Set_Uint8 (Id, No_Uint);
4940 end Init_Normalized_First_Bit;
4942 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
4944 Set_Uint8 (Id, UI_From_Int (V));
4945 end Init_Normalized_First_Bit;
4947 procedure Init_Normalized_Position (Id : E) is
4949 Set_Uint14 (Id, No_Uint);
4950 end Init_Normalized_Position;
4952 procedure Init_Normalized_Position (Id : E; V : Int) is
4954 Set_Uint14 (Id, UI_From_Int (V));
4955 end Init_Normalized_Position;
4957 procedure Init_Normalized_Position_Max (Id : E) is
4959 Set_Uint10 (Id, No_Uint);
4960 end Init_Normalized_Position_Max;
4962 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
4964 Set_Uint10 (Id, UI_From_Int (V));
4965 end Init_Normalized_Position_Max;
4967 procedure Init_RM_Size (Id : E) is
4969 Set_Uint13 (Id, Uint_0);
4972 procedure Init_RM_Size (Id : E; V : Int) is
4974 Set_Uint13 (Id, UI_From_Int (V));
4977 -----------------------------
4978 -- Init_Component_Location --
4979 -----------------------------
4981 procedure Init_Component_Location (Id : E) is
4983 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
4984 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
4985 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
4986 Set_Uint12 (Id, Uint_0); -- Esize
4987 Set_Uint14 (Id, No_Uint); -- Normalized_Position
4988 end Init_Component_Location;
4994 procedure Init_Size (Id : E; V : Int) is
4996 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
4997 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5000 ---------------------
5001 -- Init_Size_Align --
5002 ---------------------
5004 procedure Init_Size_Align (Id : E) is
5006 Set_Uint12 (Id, Uint_0); -- Esize
5007 Set_Uint13 (Id, Uint_0); -- RM_Size
5008 Set_Uint14 (Id, Uint_0); -- Alignment
5009 end Init_Size_Align;
5011 ----------------------------------------------
5012 -- Type Representation Attribute Predicates --
5013 ----------------------------------------------
5015 function Known_Alignment (E : Entity_Id) return B is
5017 return Uint14 (E) /= Uint_0
5018 and then Uint14 (E) /= No_Uint;
5019 end Known_Alignment;
5021 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5023 return Uint11 (E) /= No_Uint;
5024 end Known_Component_Bit_Offset;
5026 function Known_Component_Size (E : Entity_Id) return B is
5028 return Uint22 (Base_Type (E)) /= Uint_0
5029 and then Uint22 (Base_Type (E)) /= No_Uint;
5030 end Known_Component_Size;
5032 function Known_Esize (E : Entity_Id) return B is
5034 return Uint12 (E) /= Uint_0
5035 and then Uint12 (E) /= No_Uint;
5038 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5040 return Uint8 (E) /= No_Uint;
5041 end Known_Normalized_First_Bit;
5043 function Known_Normalized_Position (E : Entity_Id) return B is
5045 return Uint14 (E) /= No_Uint;
5046 end Known_Normalized_Position;
5048 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5050 return Uint10 (E) /= No_Uint;
5051 end Known_Normalized_Position_Max;
5053 function Known_RM_Size (E : Entity_Id) return B is
5055 return Uint13 (E) /= No_Uint
5056 and then (Uint13 (E) /= Uint_0
5057 or else Is_Discrete_Type (E)
5058 or else Is_Fixed_Point_Type (E));
5061 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5063 return Uint11 (E) /= No_Uint
5064 and then Uint11 (E) >= Uint_0;
5065 end Known_Static_Component_Bit_Offset;
5067 function Known_Static_Component_Size (E : Entity_Id) return B is
5069 return Uint22 (Base_Type (E)) > Uint_0;
5070 end Known_Static_Component_Size;
5072 function Known_Static_Esize (E : Entity_Id) return B is
5074 return Uint12 (E) > Uint_0;
5075 end Known_Static_Esize;
5077 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5079 return Uint8 (E) /= No_Uint
5080 and then Uint8 (E) >= Uint_0;
5081 end Known_Static_Normalized_First_Bit;
5083 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5085 return Uint14 (E) /= No_Uint
5086 and then Uint14 (E) >= Uint_0;
5087 end Known_Static_Normalized_Position;
5089 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5091 return Uint10 (E) /= No_Uint
5092 and then Uint10 (E) >= Uint_0;
5093 end Known_Static_Normalized_Position_Max;
5095 function Known_Static_RM_Size (E : Entity_Id) return B is
5097 return Uint13 (E) > Uint_0
5098 or else Is_Discrete_Type (E)
5099 or else Is_Fixed_Point_Type (E);
5100 end Known_Static_RM_Size;
5102 function Unknown_Alignment (E : Entity_Id) return B is
5104 return Uint14 (E) = Uint_0
5105 or else Uint14 (E) = No_Uint;
5106 end Unknown_Alignment;
5108 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5110 return Uint11 (E) = No_Uint;
5111 end Unknown_Component_Bit_Offset;
5113 function Unknown_Component_Size (E : Entity_Id) return B is
5115 return Uint22 (Base_Type (E)) = Uint_0
5117 Uint22 (Base_Type (E)) = No_Uint;
5118 end Unknown_Component_Size;
5120 function Unknown_Esize (E : Entity_Id) return B is
5122 return Uint12 (E) = No_Uint
5124 Uint12 (E) = Uint_0;
5127 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5129 return Uint8 (E) = No_Uint;
5130 end Unknown_Normalized_First_Bit;
5132 function Unknown_Normalized_Position (E : Entity_Id) return B is
5134 return Uint14 (E) = No_Uint;
5135 end Unknown_Normalized_Position;
5137 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5139 return Uint10 (E) = No_Uint;
5140 end Unknown_Normalized_Position_Max;
5142 function Unknown_RM_Size (E : Entity_Id) return B is
5144 return (Uint13 (E) = Uint_0
5145 and then not Is_Discrete_Type (E)
5146 and then not Is_Fixed_Point_Type (E))
5147 or else Uint13 (E) = No_Uint;
5148 end Unknown_RM_Size;
5150 --------------------
5151 -- Address_Clause --
5152 --------------------
5154 function Address_Clause (Id : E) return N is
5156 return Rep_Clause (Id, Name_Address);
5159 ----------------------
5160 -- Alignment_Clause --
5161 ----------------------
5163 function Alignment_Clause (Id : E) return N is
5165 return Rep_Clause (Id, Name_Alignment);
5166 end Alignment_Clause;
5168 ----------------------
5169 -- Ancestor_Subtype --
5170 ----------------------
5172 function Ancestor_Subtype (Id : E) return E is
5174 -- If this is first subtype, or is a base type, then there is no
5175 -- ancestor subtype, so we return Empty to indicate this fact.
5177 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
5182 D : constant Node_Id := Declaration_Node (Id);
5185 -- If we have a subtype declaration, get the ancestor subtype
5187 if Nkind (D) = N_Subtype_Declaration then
5188 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5189 return Entity (Subtype_Mark (Subtype_Indication (D)));
5191 return Entity (Subtype_Indication (D));
5194 -- If not, then no subtype indication is available
5200 end Ancestor_Subtype;
5206 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5208 if Last_Entity (V) = Empty then
5209 Set_First_Entity (V, Id);
5211 Set_Next_Entity (Last_Entity (V), Id);
5214 Set_Next_Entity (Id, Empty);
5216 Set_Last_Entity (V, Id);
5219 --------------------
5220 -- Available_View --
5221 --------------------
5223 function Available_View (Id : E) return E is
5225 if Is_Incomplete_Type (Id)
5226 and then Present (Non_Limited_View (Id))
5228 -- The non-limited view may itself be an incomplete type, in
5229 -- which case get its full view.
5231 return Get_Full_View (Non_Limited_View (Id));
5233 elsif Is_Class_Wide_Type (Id)
5234 and then Is_Incomplete_Type (Etype (Id))
5235 and then Present (Non_Limited_View (Etype (Id)))
5237 return Class_Wide_Type (Non_Limited_View (Etype (Id)));
5248 function Base_Type (Id : E) return E is
5251 when E_Enumeration_Subtype |
5253 E_Signed_Integer_Subtype |
5254 E_Modular_Integer_Subtype |
5255 E_Floating_Point_Subtype |
5256 E_Ordinary_Fixed_Point_Subtype |
5257 E_Decimal_Fixed_Point_Subtype |
5262 E_Record_Subtype_With_Private |
5263 E_Limited_Private_Subtype |
5265 E_Protected_Subtype |
5267 E_String_Literal_Subtype |
5268 E_Class_Wide_Subtype =>
5276 -------------------------
5277 -- Component_Alignment --
5278 -------------------------
5280 -- Component Alignment is encoded using two flags, Flag128/129 as
5281 -- follows. Note that both flags False = Align_Default, so that the
5282 -- default initialization of flags to False initializes component
5283 -- alignment to the default value as required.
5285 -- Flag128 Flag129 Value
5286 -- ------- ------- -----
5287 -- False False Calign_Default
5288 -- False True Calign_Component_Size
5289 -- True False Calign_Component_Size_4
5290 -- True True Calign_Storage_Unit
5292 function Component_Alignment (Id : E) return C is
5293 BT : constant Node_Id := Base_Type (Id);
5296 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5298 if Flag128 (BT) then
5299 if Flag129 (BT) then
5300 return Calign_Storage_Unit;
5302 return Calign_Component_Size_4;
5306 if Flag129 (BT) then
5307 return Calign_Component_Size;
5309 return Calign_Default;
5312 end Component_Alignment;
5314 --------------------
5315 -- Constant_Value --
5316 --------------------
5318 function Constant_Value (Id : E) return N is
5319 D : constant Node_Id := Declaration_Node (Id);
5323 -- If we have no declaration node, then return no constant value.
5324 -- Not clear how this can happen, but it does sometimes ???
5325 -- To investigate, remove this check and compile discrim_po.adb.
5330 -- Normal case where a declaration node is present
5332 elsif Nkind (D) = N_Object_Renaming_Declaration then
5333 return Renamed_Object (Id);
5335 -- If this is a component declaration whose entity is constant, it
5336 -- is a prival within a protected function. It does not have
5337 -- a constant value.
5339 elsif Nkind (D) = N_Component_Declaration then
5342 -- If there is an expression, return it
5344 elsif Present (Expression (D)) then
5345 return (Expression (D));
5347 -- For a constant, see if we have a full view
5349 elsif Ekind (Id) = E_Constant
5350 and then Present (Full_View (Id))
5352 Full_D := Parent (Full_View (Id));
5354 -- The full view may have been rewritten as an object renaming
5356 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5357 return Name (Full_D);
5359 return Expression (Full_D);
5362 -- Otherwise we have no expression to return
5369 ----------------------
5370 -- Declaration_Node --
5371 ----------------------
5373 function Declaration_Node (Id : E) return N is
5377 if Ekind (Id) = E_Incomplete_Type
5378 and then Present (Full_View (Id))
5380 P := Parent (Full_View (Id));
5386 if Nkind (P) /= N_Selected_Component
5387 and then Nkind (P) /= N_Expanded_Name
5389 not (Nkind (P) = N_Defining_Program_Unit_Name
5390 and then Is_Child_Unit (Id))
5397 end Declaration_Node;
5399 ---------------------
5400 -- Designated_Type --
5401 ---------------------
5403 function Designated_Type (Id : E) return E is
5407 Desig_Type := Directly_Designated_Type (Id);
5409 if Ekind (Desig_Type) = E_Incomplete_Type
5410 and then Present (Full_View (Desig_Type))
5412 return Full_View (Desig_Type);
5414 elsif Is_Class_Wide_Type (Desig_Type)
5415 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5416 and then Present (Full_View (Etype (Desig_Type)))
5417 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5419 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5424 end Designated_Type;
5426 -----------------------------
5427 -- Enclosing_Dynamic_Scope --
5428 -----------------------------
5430 function Enclosing_Dynamic_Scope (Id : E) return E is
5434 -- The following test is an error defense against some syntax
5435 -- errors that can leave scopes very messed up.
5437 if Id = Standard_Standard then
5441 -- Normal case, search enclosing scopes
5444 while S /= Standard_Standard
5445 and then not Is_Dynamic_Scope (S)
5451 end Enclosing_Dynamic_Scope;
5453 ----------------------
5454 -- Entry_Index_Type --
5455 ----------------------
5457 function Entry_Index_Type (Id : E) return N is
5459 pragma Assert (Ekind (Id) = E_Entry_Family);
5460 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5461 end Entry_Index_Type;
5463 ---------------------
5464 -- First_Component --
5465 ---------------------
5467 function First_Component (Id : E) return E is
5472 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5474 Comp_Id := First_Entity (Id);
5475 while Present (Comp_Id) loop
5476 exit when Ekind (Comp_Id) = E_Component;
5477 Comp_Id := Next_Entity (Comp_Id);
5481 end First_Component;
5483 -------------------------------------
5484 -- First_Component_Or_Discriminant --
5485 -------------------------------------
5487 function First_Component_Or_Discriminant (Id : E) return E is
5492 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5494 Comp_Id := First_Entity (Id);
5495 while Present (Comp_Id) loop
5496 exit when Ekind (Comp_Id) = E_Component
5498 Ekind (Comp_Id) = E_Discriminant;
5499 Comp_Id := Next_Entity (Comp_Id);
5503 end First_Component_Or_Discriminant;
5505 ------------------------
5506 -- First_Discriminant --
5507 ------------------------
5509 function First_Discriminant (Id : E) return E is
5514 (Has_Discriminants (Id)
5515 or else Has_Unknown_Discriminants (Id));
5517 Ent := First_Entity (Id);
5519 -- The discriminants are not necessarily contiguous, because access
5520 -- discriminants will generate itypes. They are not the first entities
5521 -- either, because tag and controller record must be ahead of them.
5523 if Chars (Ent) = Name_uTag then
5524 Ent := Next_Entity (Ent);
5527 if Chars (Ent) = Name_uController then
5528 Ent := Next_Entity (Ent);
5531 -- Skip all hidden stored discriminants if any
5533 while Present (Ent) loop
5534 exit when Ekind (Ent) = E_Discriminant
5535 and then not Is_Completely_Hidden (Ent);
5537 Ent := Next_Entity (Ent);
5540 pragma Assert (Ekind (Ent) = E_Discriminant);
5543 end First_Discriminant;
5549 function First_Formal (Id : E) return E is
5554 (Is_Overloadable (Id)
5555 or else Ekind (Id) = E_Entry_Family
5556 or else Ekind (Id) = E_Subprogram_Body
5557 or else Ekind (Id) = E_Subprogram_Type);
5559 if Ekind (Id) = E_Enumeration_Literal then
5563 Formal := First_Entity (Id);
5565 if Present (Formal) and then Is_Formal (Formal) then
5573 ------------------------------
5574 -- First_Formal_With_Extras --
5575 ------------------------------
5577 function First_Formal_With_Extras (Id : E) return E is
5582 (Is_Overloadable (Id)
5583 or else Ekind (Id) = E_Entry_Family
5584 or else Ekind (Id) = E_Subprogram_Body
5585 or else Ekind (Id) = E_Subprogram_Type);
5587 if Ekind (Id) = E_Enumeration_Literal then
5591 Formal := First_Entity (Id);
5593 if Present (Formal) and then Is_Formal (Formal) then
5596 return Extra_Formals (Id); -- Empty if no extra formals
5599 end First_Formal_With_Extras;
5601 -------------------------------
5602 -- First_Stored_Discriminant --
5603 -------------------------------
5605 function First_Stored_Discriminant (Id : E) return E is
5608 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5609 -- Scans the Discriminants to see whether any are Completely_Hidden
5610 -- (the mechanism for describing non-specified stored discriminants)
5612 ----------------------------------------
5613 -- Has_Completely_Hidden_Discriminant --
5614 ----------------------------------------
5616 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5617 Ent : Entity_Id := Id;
5620 pragma Assert (Ekind (Id) = E_Discriminant);
5622 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5623 if Is_Completely_Hidden (Ent) then
5627 Ent := Next_Entity (Ent);
5631 end Has_Completely_Hidden_Discriminant;
5633 -- Start of processing for First_Stored_Discriminant
5637 (Has_Discriminants (Id)
5638 or else Has_Unknown_Discriminants (Id));
5640 Ent := First_Entity (Id);
5642 if Chars (Ent) = Name_uTag then
5643 Ent := Next_Entity (Ent);
5646 if Chars (Ent) = Name_uController then
5647 Ent := Next_Entity (Ent);
5650 if Has_Completely_Hidden_Discriminant (Ent) then
5652 while Present (Ent) loop
5653 exit when Is_Completely_Hidden (Ent);
5654 Ent := Next_Entity (Ent);
5659 pragma Assert (Ekind (Ent) = E_Discriminant);
5662 end First_Stored_Discriminant;
5668 function First_Subtype (Id : E) return E is
5669 B : constant Entity_Id := Base_Type (Id);
5670 F : constant Node_Id := Freeze_Node (B);
5674 -- If the base type has no freeze node, it is a type in standard,
5675 -- and always acts as its own first subtype unless it is one of
5676 -- the predefined integer types. If the type is formal, it is also
5677 -- a first subtype, and its base type has no freeze node. On the other
5678 -- hand, a subtype of a generic formal is not its own first_subtype.
5679 -- Its base type, if anonymous, is attached to the formal type decl.
5680 -- from which the first subtype is obtained.
5684 if B = Base_Type (Standard_Integer) then
5685 return Standard_Integer;
5687 elsif B = Base_Type (Standard_Long_Integer) then
5688 return Standard_Long_Integer;
5690 elsif B = Base_Type (Standard_Short_Short_Integer) then
5691 return Standard_Short_Short_Integer;
5693 elsif B = Base_Type (Standard_Short_Integer) then
5694 return Standard_Short_Integer;
5696 elsif B = Base_Type (Standard_Long_Long_Integer) then
5697 return Standard_Long_Long_Integer;
5699 elsif Is_Generic_Type (Id) then
5700 if Present (Parent (B)) then
5701 return Defining_Identifier (Parent (B));
5703 return Defining_Identifier (Associated_Node_For_Itype (B));
5710 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5711 -- then we use that link, otherwise (happens with some Itypes), we use
5712 -- the base type itself.
5715 Ent := First_Subtype_Link (F);
5717 if Present (Ent) then
5725 -------------------------------------
5726 -- Get_Attribute_Definition_Clause --
5727 -------------------------------------
5729 function Get_Attribute_Definition_Clause
5731 Id : Attribute_Id) return Node_Id
5736 N := First_Rep_Item (E);
5737 while Present (N) loop
5738 if Nkind (N) = N_Attribute_Definition_Clause
5739 and then Get_Attribute_Id (Chars (N)) = Id
5748 end Get_Attribute_Definition_Clause;
5754 function Get_Full_View (T : Entity_Id) return Entity_Id is
5756 if Ekind (T) = E_Incomplete_Type
5757 and then Present (Full_View (T))
5759 return Full_View (T);
5761 elsif Is_Class_Wide_Type (T)
5762 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5763 and then Present (Full_View (Root_Type (T)))
5765 return Class_Wide_Type (Full_View (Root_Type (T)));
5772 --------------------
5773 -- Get_Rep_Pragma --
5774 --------------------
5776 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5780 N := First_Rep_Item (E);
5781 while Present (N) loop
5782 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
5792 ------------------------
5793 -- Has_Attach_Handler --
5794 ------------------------
5796 function Has_Attach_Handler (Id : E) return B is
5800 pragma Assert (Is_Protected_Type (Id));
5802 Ritem := First_Rep_Item (Id);
5803 while Present (Ritem) loop
5804 if Nkind (Ritem) = N_Pragma
5805 and then Chars (Ritem) = Name_Attach_Handler
5809 Ritem := Next_Rep_Item (Ritem);
5814 end Has_Attach_Handler;
5816 -------------------------------------
5817 -- Has_Attribute_Definition_Clause --
5818 -------------------------------------
5820 function Has_Attribute_Definition_Clause
5822 Id : Attribute_Id) return Boolean
5825 return Present (Get_Attribute_Definition_Clause (E, Id));
5826 end Has_Attribute_Definition_Clause;
5832 function Has_Entries (Id : E) return B is
5833 Result : Boolean := False;
5837 pragma Assert (Is_Concurrent_Type (Id));
5839 Ent := First_Entity (Id);
5840 while Present (Ent) loop
5841 if Is_Entry (Ent) then
5846 Ent := Next_Entity (Ent);
5852 ----------------------------
5853 -- Has_Foreign_Convention --
5854 ----------------------------
5856 function Has_Foreign_Convention (Id : E) return B is
5858 return Convention (Id) >= Foreign_Convention'First;
5859 end Has_Foreign_Convention;
5861 ---------------------------
5862 -- Has_Interrupt_Handler --
5863 ---------------------------
5865 function Has_Interrupt_Handler (Id : E) return B is
5869 pragma Assert (Is_Protected_Type (Id));
5871 Ritem := First_Rep_Item (Id);
5872 while Present (Ritem) loop
5873 if Nkind (Ritem) = N_Pragma
5874 and then Chars (Ritem) = Name_Interrupt_Handler
5878 Ritem := Next_Rep_Item (Ritem);
5883 end Has_Interrupt_Handler;
5885 --------------------------
5886 -- Has_Private_Ancestor --
5887 --------------------------
5889 function Has_Private_Ancestor (Id : E) return B is
5890 R : constant Entity_Id := Root_Type (Id);
5891 T1 : Entity_Id := Id;
5895 if Is_Private_Type (T1) then
5905 end Has_Private_Ancestor;
5907 --------------------
5908 -- Has_Rep_Pragma --
5909 --------------------
5911 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5913 return Present (Get_Rep_Pragma (E, Nam));
5916 ------------------------------
5917 -- Implementation_Base_Type --
5918 ------------------------------
5920 function Implementation_Base_Type (Id : E) return E is
5925 Bastyp := Base_Type (Id);
5927 if Is_Incomplete_Or_Private_Type (Bastyp) then
5928 Imptyp := Underlying_Type (Bastyp);
5930 -- If we have an implementation type, then just return it,
5931 -- otherwise we return the Base_Type anyway. This can only
5932 -- happen in error situations and should avoid some error bombs.
5934 if Present (Imptyp) then
5935 return Base_Type (Imptyp);
5943 end Implementation_Base_Type;
5945 -----------------------
5946 -- Is_Always_Inlined --
5947 -----------------------
5949 function Is_Always_Inlined (Id : E) return B is
5953 Item := First_Rep_Item (Id);
5954 while Present (Item) loop
5955 if Nkind (Item) = N_Pragma
5956 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
5961 Next_Rep_Item (Item);
5965 end Is_Always_Inlined;
5967 ---------------------
5968 -- Is_Boolean_Type --
5969 ---------------------
5971 function Is_Boolean_Type (Id : E) return B is
5973 return Root_Type (Id) = Standard_Boolean;
5974 end Is_Boolean_Type;
5976 ---------------------
5977 -- Is_By_Copy_Type --
5978 ---------------------
5980 function Is_By_Copy_Type (Id : E) return B is
5982 -- If Id is a private type whose full declaration has not been seen,
5983 -- we assume for now that it is not a By_Copy type. Clearly this
5984 -- attribute should not be used before the type is frozen, but it is
5985 -- needed to build the associated record of a protected type. Another
5986 -- place where some lookahead for a full view is needed ???
5989 Is_Elementary_Type (Id)
5990 or else (Is_Private_Type (Id)
5991 and then Present (Underlying_Type (Id))
5992 and then Is_Elementary_Type (Underlying_Type (Id)));
5993 end Is_By_Copy_Type;
5995 --------------------------
5996 -- Is_By_Reference_Type --
5997 --------------------------
5999 -- This function knows too much semantics, it should be in sem_util ???
6001 function Is_By_Reference_Type (Id : E) return B is
6002 Btype : constant Entity_Id := Base_Type (Id);
6005 if Error_Posted (Id)
6006 or else Error_Posted (Btype)
6010 elsif Is_Private_Type (Btype) then
6012 Utyp : constant Entity_Id := Underlying_Type (Btype);
6017 return Is_By_Reference_Type (Utyp);
6021 elsif Is_Incomplete_Type (Btype) then
6023 Ftyp : constant Entity_Id := Full_View (Btype);
6028 return Is_By_Reference_Type (Ftyp);
6032 elsif Is_Concurrent_Type (Btype) then
6035 elsif Is_Record_Type (Btype) then
6036 if Is_Limited_Record (Btype)
6037 or else Is_Tagged_Type (Btype)
6038 or else Is_Volatile (Btype)
6047 C := First_Component (Btype);
6048 while Present (C) loop
6049 if Is_By_Reference_Type (Etype (C))
6050 or else Is_Volatile (Etype (C))
6055 C := Next_Component (C);
6062 elsif Is_Array_Type (Btype) then
6065 or else Is_By_Reference_Type (Component_Type (Btype))
6066 or else Is_Volatile (Component_Type (Btype))
6067 or else Has_Volatile_Components (Btype);
6072 end Is_By_Reference_Type;
6074 ---------------------
6075 -- Is_Derived_Type --
6076 ---------------------
6078 function Is_Derived_Type (Id : E) return B is
6083 and then Base_Type (Id) /= Root_Type (Id)
6084 and then not Is_Generic_Type (Id)
6085 and then not Is_Class_Wide_Type (Id)
6087 if not Is_Numeric_Type (Root_Type (Id)) then
6091 Par := Parent (First_Subtype (Id));
6093 return Present (Par)
6094 and then Nkind (Par) = N_Full_Type_Declaration
6095 and then Nkind (Type_Definition (Par))
6096 = N_Derived_Type_Definition;
6102 end Is_Derived_Type;
6104 ----------------------
6105 -- Is_Dynamic_Scope --
6106 ----------------------
6108 function Is_Dynamic_Scope (Id : E) return B is
6111 Ekind (Id) = E_Block
6113 Ekind (Id) = E_Function
6115 Ekind (Id) = E_Procedure
6117 Ekind (Id) = E_Subprogram_Body
6119 Ekind (Id) = E_Task_Type
6121 Ekind (Id) = E_Entry
6123 Ekind (Id) = E_Entry_Family
6125 Ekind (Id) = E_Return_Statement;
6126 end Is_Dynamic_Scope;
6128 --------------------
6129 -- Is_Entity_Name --
6130 --------------------
6132 function Is_Entity_Name (N : Node_Id) return Boolean is
6133 Kind : constant Node_Kind := Nkind (N);
6136 -- Identifiers, operator symbols, expanded names are entity names
6138 return Kind = N_Identifier
6139 or else Kind = N_Operator_Symbol
6140 or else Kind = N_Expanded_Name
6142 -- Attribute references are entity names if they refer to an entity.
6143 -- Note that we don't do this by testing for the presence of the
6144 -- Entity field in the N_Attribute_Reference node, since it may not
6145 -- have been set yet.
6147 or else (Kind = N_Attribute_Reference
6148 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6151 ---------------------------
6152 -- Is_Indefinite_Subtype --
6153 ---------------------------
6155 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
6156 K : constant Entity_Kind := Ekind (Id);
6159 if Is_Constrained (Id) then
6162 elsif K in Array_Kind
6163 or else K in Class_Wide_Kind
6164 or else Has_Unknown_Discriminants (Id)
6168 -- Known discriminants: indefinite if there are no default values
6170 elsif K in Record_Kind
6171 or else Is_Incomplete_Or_Private_Type (Id)
6172 or else Is_Concurrent_Type (Id)
6174 return (Has_Discriminants (Id)
6175 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
6180 end Is_Indefinite_Subtype;
6182 ---------------------
6183 -- Is_Limited_Type --
6184 ---------------------
6186 function Is_Limited_Type (Id : E) return B is
6187 Btype : constant E := Base_Type (Id);
6188 Rtype : constant E := Root_Type (Btype);
6191 if not Is_Type (Id) then
6194 elsif Ekind (Btype) = E_Limited_Private_Type
6195 or else Is_Limited_Composite (Btype)
6199 elsif Is_Concurrent_Type (Btype) then
6202 -- The Is_Limited_Record flag normally indicates that the type is
6203 -- limited. The exception is that a type does not inherit limitedness
6204 -- from its interface ancestor. So the type may be derived from a
6205 -- limited interface, but is not limited.
6207 elsif Is_Limited_Record (Id)
6208 and then not Is_Interface (Id)
6212 -- Otherwise we will look around to see if there is some other reason
6213 -- for it to be limited, except that if an error was posted on the
6214 -- entity, then just assume it is non-limited, because it can cause
6215 -- trouble to recurse into a murky erroneous entity!
6217 elsif Error_Posted (Id) then
6220 elsif Is_Record_Type (Btype) then
6222 if Is_Limited_Interface (Id) then
6225 -- AI-419: limitedness is not inherited from a limited interface
6227 elsif Is_Limited_Record (Rtype) then
6228 return not Is_Interface (Rtype)
6229 or else Is_Protected_Interface (Rtype)
6230 or else Is_Synchronized_Interface (Rtype)
6231 or else Is_Task_Interface (Rtype);
6233 elsif Is_Class_Wide_Type (Btype) then
6234 return Is_Limited_Type (Rtype);
6241 C := First_Component (Btype);
6242 while Present (C) loop
6243 if Is_Limited_Type (Etype (C)) then
6247 C := Next_Component (C);
6254 elsif Is_Array_Type (Btype) then
6255 return Is_Limited_Type (Component_Type (Btype));
6260 end Is_Limited_Type;
6262 -----------------------------------
6263 -- Is_Package_Or_Generic_Package --
6264 -----------------------------------
6266 function Is_Package_Or_Generic_Package (Id : E) return B is
6269 Ekind (Id) = E_Package
6271 Ekind (Id) = E_Generic_Package;
6272 end Is_Package_Or_Generic_Package;
6274 --------------------------
6275 -- Is_Protected_Private --
6276 --------------------------
6278 function Is_Protected_Private (Id : E) return B is
6280 pragma Assert (Ekind (Id) = E_Component);
6281 return Is_Protected_Type (Scope (Id));
6282 end Is_Protected_Private;
6284 ------------------------------
6285 -- Is_Protected_Record_Type --
6286 ------------------------------
6288 function Is_Protected_Record_Type (Id : E) return B is
6291 Is_Concurrent_Record_Type (Id)
6292 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6293 end Is_Protected_Record_Type;
6295 --------------------------------
6296 -- Is_Inherently_Limited_Type --
6297 --------------------------------
6299 function Is_Inherently_Limited_Type (Id : E) return B is
6300 Btype : constant Entity_Id := Base_Type (Id);
6303 if Is_Private_Type (Btype) then
6305 Utyp : constant Entity_Id := Underlying_Type (Btype);
6310 return Is_Inherently_Limited_Type (Utyp);
6314 elsif Is_Concurrent_Type (Btype) then
6317 elsif Is_Record_Type (Btype) then
6318 if Is_Limited_Record (Btype) then
6319 return not Is_Interface (Btype)
6320 or else Is_Protected_Interface (Btype)
6321 or else Is_Synchronized_Interface (Btype)
6322 or else Is_Task_Interface (Btype);
6324 elsif Is_Class_Wide_Type (Btype) then
6325 return Is_Inherently_Limited_Type (Root_Type (Btype));
6332 C := First_Component (Btype);
6333 while Present (C) loop
6334 if Is_Inherently_Limited_Type (Etype (C)) then
6338 C := Next_Component (C);
6345 elsif Is_Array_Type (Btype) then
6346 return Is_Inherently_Limited_Type (Component_Type (Btype));
6351 end Is_Inherently_Limited_Type;
6353 --------------------
6354 -- Is_String_Type --
6355 --------------------
6357 function Is_String_Type (Id : E) return B is
6359 return Ekind (Id) in String_Kind
6360 or else (Is_Array_Type (Id)
6361 and then Number_Dimensions (Id) = 1
6362 and then Is_Character_Type (Component_Type (Id)));
6365 -------------------------
6366 -- Is_Task_Record_Type --
6367 -------------------------
6369 function Is_Task_Record_Type (Id : E) return B is
6372 Is_Concurrent_Record_Type (Id)
6373 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6374 end Is_Task_Record_Type;
6376 ------------------------
6377 -- Is_Wrapper_Package --
6378 ------------------------
6380 function Is_Wrapper_Package (Id : E) return B is
6382 return (Ekind (Id) = E_Package
6383 and then Present (Related_Instance (Id)));
6384 end Is_Wrapper_Package;
6386 --------------------
6387 -- Next_Component --
6388 --------------------
6390 function Next_Component (Id : E) return E is
6394 Comp_Id := Next_Entity (Id);
6395 while Present (Comp_Id) loop
6396 exit when Ekind (Comp_Id) = E_Component;
6397 Comp_Id := Next_Entity (Comp_Id);
6403 ------------------------------------
6404 -- Next_Component_Or_Discriminant --
6405 ------------------------------------
6407 function Next_Component_Or_Discriminant (Id : E) return E is
6411 Comp_Id := Next_Entity (Id);
6412 while Present (Comp_Id) loop
6413 exit when Ekind (Comp_Id) = E_Component
6415 Ekind (Comp_Id) = E_Discriminant;
6416 Comp_Id := Next_Entity (Comp_Id);
6420 end Next_Component_Or_Discriminant;
6422 -----------------------
6423 -- Next_Discriminant --
6424 -----------------------
6426 -- This function actually implements both Next_Discriminant and
6427 -- Next_Stored_Discriminant by making sure that the Discriminant
6428 -- returned is of the same variety as Id.
6430 function Next_Discriminant (Id : E) return E is
6432 -- Derived Tagged types with private extensions look like this...
6434 -- E_Discriminant d1
6435 -- E_Discriminant d2
6437 -- E_Discriminant d1
6438 -- E_Discriminant d2
6441 -- so it is critical not to go past the leading discriminants
6446 pragma Assert (Ekind (Id) = E_Discriminant);
6449 D := Next_Entity (D);
6451 or else (Ekind (D) /= E_Discriminant
6452 and then not Is_Itype (D))
6457 exit when Ekind (D) = E_Discriminant
6458 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6462 end Next_Discriminant;
6468 function Next_Formal (Id : E) return E is
6472 -- Follow the chain of declared entities as long as the kind of the
6473 -- entity corresponds to a formal parameter. Skip internal entities
6474 -- that may have been created for implicit subtypes, in the process
6475 -- of analyzing default expressions.
6480 P := Next_Entity (P);
6482 if No (P) or else Is_Formal (P) then
6484 elsif not Is_Internal (P) then
6490 -----------------------------
6491 -- Next_Formal_With_Extras --
6492 -----------------------------
6494 function Next_Formal_With_Extras (Id : E) return E is
6496 if Present (Extra_Formal (Id)) then
6497 return Extra_Formal (Id);
6499 return Next_Formal (Id);
6501 end Next_Formal_With_Extras;
6507 function Next_Index (Id : Node_Id) return Node_Id is
6516 function Next_Literal (Id : E) return E is
6518 pragma Assert (Nkind (Id) in N_Entity);
6522 ------------------------------
6523 -- Next_Stored_Discriminant --
6524 ------------------------------
6526 function Next_Stored_Discriminant (Id : E) return E is
6528 -- See comment in Next_Discriminant
6530 return Next_Discriminant (Id);
6531 end Next_Stored_Discriminant;
6533 -----------------------
6534 -- Number_Dimensions --
6535 -----------------------
6537 function Number_Dimensions (Id : E) return Pos is
6542 if Ekind (Id) in String_Kind then
6547 T := First_Index (Id);
6548 while Present (T) loop
6555 end Number_Dimensions;
6557 --------------------------
6558 -- Number_Discriminants --
6559 --------------------------
6561 function Number_Discriminants (Id : E) return Pos is
6567 Discr := First_Discriminant (Id);
6568 while Present (Discr) loop
6570 Discr := Next_Discriminant (Discr);
6574 end Number_Discriminants;
6576 --------------------
6577 -- Number_Entries --
6578 --------------------
6580 function Number_Entries (Id : E) return Nat is
6585 pragma Assert (Is_Concurrent_Type (Id));
6588 Ent := First_Entity (Id);
6589 while Present (Ent) loop
6590 if Is_Entry (Ent) then
6594 Ent := Next_Entity (Ent);
6600 --------------------
6601 -- Number_Formals --
6602 --------------------
6604 function Number_Formals (Id : E) return Pos is
6610 Formal := First_Formal (Id);
6611 while Present (Formal) loop
6613 Formal := Next_Formal (Formal);
6619 --------------------
6620 -- Parameter_Mode --
6621 --------------------
6623 function Parameter_Mode (Id : E) return Formal_Kind is
6628 ---------------------
6629 -- Record_Rep_Item --
6630 ---------------------
6632 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6634 Set_Next_Rep_Item (N, First_Rep_Item (E));
6635 Set_First_Rep_Item (E, N);
6636 end Record_Rep_Item;
6642 function Root_Type (Id : E) return E is
6646 pragma Assert (Nkind (Id) in N_Entity);
6648 T := Base_Type (Id);
6650 if Ekind (T) = E_Class_Wide_Type then
6653 elsif Ekind (T) = E_Class_Wide_Subtype then
6654 return Etype (Base_Type (T));
6656 -- ??? T comes from Base_Type, how can it be a subtype?
6657 -- Also Base_Type is supposed to be idempotent, so either way
6658 -- this is equivalent to "return Etype (T)" and should be merged
6659 -- with the E_Class_Wide_Type case.
6670 -- Following test catches some error cases resulting from
6673 elsif No (Etyp) then
6676 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6679 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6685 -- Return if there is a circularity in the inheritance chain.
6686 -- This happens in some error situations and we do not want
6687 -- to get stuck in this loop.
6689 if T = Base_Type (Id) then
6695 raise Program_Error;
6702 function Scope_Depth (Id : E) return Uint is
6707 while Is_Record_Type (Scop) loop
6708 Scop := Scope (Scop);
6711 return Scope_Depth_Value (Scop);
6714 ---------------------
6715 -- Scope_Depth_Set --
6716 ---------------------
6718 function Scope_Depth_Set (Id : E) return B is
6720 return not Is_Record_Type (Id)
6721 and then Field22 (Id) /= Union_Id (Empty);
6722 end Scope_Depth_Set;
6724 -----------------------------
6725 -- Set_Component_Alignment --
6726 -----------------------------
6728 -- Component Alignment is encoded using two flags, Flag128/129 as
6729 -- follows. Note that both flags False = Align_Default, so that the
6730 -- default initialization of flags to False initializes component
6731 -- alignment to the default value as required.
6733 -- Flag128 Flag129 Value
6734 -- ------- ------- -----
6735 -- False False Calign_Default
6736 -- False True Calign_Component_Size
6737 -- True False Calign_Component_Size_4
6738 -- True True Calign_Storage_Unit
6740 procedure Set_Component_Alignment (Id : E; V : C) is
6742 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6743 and then Id = Base_Type (Id));
6746 when Calign_Default =>
6747 Set_Flag128 (Id, False);
6748 Set_Flag129 (Id, False);
6750 when Calign_Component_Size =>
6751 Set_Flag128 (Id, False);
6752 Set_Flag129 (Id, True);
6754 when Calign_Component_Size_4 =>
6755 Set_Flag128 (Id, True);
6756 Set_Flag129 (Id, False);
6758 when Calign_Storage_Unit =>
6759 Set_Flag128 (Id, True);
6760 Set_Flag129 (Id, True);
6762 end Set_Component_Alignment;
6768 function Size_Clause (Id : E) return N is
6770 return Rep_Clause (Id, Name_Size);
6773 ------------------------
6774 -- Stream_Size_Clause --
6775 ------------------------
6777 function Stream_Size_Clause (Id : E) return N is
6779 return Rep_Clause (Id, Name_Stream_Size);
6780 end Stream_Size_Clause;
6786 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6792 Kind := E_Access_Subtype;
6796 Kind := E_Array_Subtype;
6798 when E_Class_Wide_Type |
6799 E_Class_Wide_Subtype =>
6800 Kind := E_Class_Wide_Subtype;
6802 when E_Decimal_Fixed_Point_Type |
6803 E_Decimal_Fixed_Point_Subtype =>
6804 Kind := E_Decimal_Fixed_Point_Subtype;
6806 when E_Ordinary_Fixed_Point_Type |
6807 E_Ordinary_Fixed_Point_Subtype =>
6808 Kind := E_Ordinary_Fixed_Point_Subtype;
6810 when E_Private_Type |
6811 E_Private_Subtype =>
6812 Kind := E_Private_Subtype;
6814 when E_Limited_Private_Type |
6815 E_Limited_Private_Subtype =>
6816 Kind := E_Limited_Private_Subtype;
6818 when E_Record_Type_With_Private |
6819 E_Record_Subtype_With_Private =>
6820 Kind := E_Record_Subtype_With_Private;
6822 when E_Record_Type |
6824 Kind := E_Record_Subtype;
6826 when E_String_Type |
6828 Kind := E_String_Subtype;
6830 when Enumeration_Kind =>
6831 Kind := E_Enumeration_Subtype;
6834 Kind := E_Floating_Point_Subtype;
6836 when Signed_Integer_Kind =>
6837 Kind := E_Signed_Integer_Subtype;
6839 when Modular_Integer_Kind =>
6840 Kind := E_Modular_Integer_Subtype;
6842 when Protected_Kind =>
6843 Kind := E_Protected_Subtype;
6846 Kind := E_Task_Subtype;
6850 raise Program_Error;
6856 -------------------------
6857 -- First_Tag_Component --
6858 -------------------------
6860 function First_Tag_Component (Id : E) return E is
6862 Typ : Entity_Id := Id;
6865 pragma Assert (Is_Tagged_Type (Typ));
6867 if Is_Class_Wide_Type (Typ) then
6868 Typ := Root_Type (Typ);
6871 if Is_Private_Type (Typ) then
6872 Typ := Underlying_Type (Typ);
6874 -- If the underlying type is missing then the source program has
6875 -- errors and there is nothing else to do (the full-type declaration
6876 -- associated with the private type declaration is missing).
6883 Comp := First_Entity (Typ);
6884 while Present (Comp) loop
6885 if Is_Tag (Comp) then
6889 Comp := Next_Entity (Comp);
6892 -- No tag component found
6895 end First_Tag_Component;
6897 ------------------------
6898 -- Next_Tag_Component --
6899 ------------------------
6901 function Next_Tag_Component (Id : E) return E is
6903 Typ : constant Entity_Id := Scope (Id);
6906 pragma Assert (Ekind (Id) = E_Component
6907 and then Is_Tagged_Type (Typ));
6909 Comp := Next_Entity (Id);
6910 while Present (Comp) loop
6911 if Is_Tag (Comp) then
6912 pragma Assert (Chars (Comp) /= Name_uTag);
6916 Comp := Next_Entity (Comp);
6919 -- No tag component found
6922 end Next_Tag_Component;
6924 ---------------------
6925 -- Type_High_Bound --
6926 ---------------------
6928 function Type_High_Bound (Id : E) return Node_Id is
6929 Rng : constant Node_Id := Scalar_Range (Id);
6931 if Nkind (Rng) = N_Subtype_Indication then
6932 return High_Bound (Range_Expression (Constraint (Rng)));
6934 return High_Bound (Rng);
6936 end Type_High_Bound;
6938 --------------------
6939 -- Type_Low_Bound --
6940 --------------------
6942 function Type_Low_Bound (Id : E) return Node_Id is
6943 Rng : constant Node_Id := Scalar_Range (Id);
6945 if Nkind (Rng) = N_Subtype_Indication then
6946 return Low_Bound (Range_Expression (Constraint (Rng)));
6948 return Low_Bound (Rng);
6952 ---------------------
6953 -- Underlying_Type --
6954 ---------------------
6956 function Underlying_Type (Id : E) return E is
6958 -- For record_with_private the underlying type is always the direct
6959 -- full view. Never try to take the full view of the parent it
6960 -- doesn't make sense.
6962 if Ekind (Id) = E_Record_Type_With_Private then
6963 return Full_View (Id);
6965 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6967 -- If we have an incomplete or private type with a full view,
6968 -- then we return the Underlying_Type of this full view
6970 if Present (Full_View (Id)) then
6971 if Id = Full_View (Id) then
6973 -- Previous error in declaration
6978 return Underlying_Type (Full_View (Id));
6981 -- If we have an incomplete entity that comes from the limited
6982 -- view then we return the Underlying_Type of its non-limited
6985 elsif From_With_Type (Id)
6986 and then Present (Non_Limited_View (Id))
6988 return Underlying_Type (Non_Limited_View (Id));
6990 -- Otherwise check for the case where we have a derived type or
6991 -- subtype, and if so get the Underlying_Type of the parent type.
6993 elsif Etype (Id) /= Id then
6994 return Underlying_Type (Etype (Id));
6996 -- Otherwise we have an incomplete or private type that has
6997 -- no full view, which means that we have not encountered the
6998 -- completion, so return Empty to indicate the underlying type
6999 -- is not yet known.
7005 -- For non-incomplete, non-private types, return the type itself
7006 -- Also for entities that are not types at all return the entity
7012 end Underlying_Type;
7014 ------------------------
7015 -- Write_Entity_Flags --
7016 ------------------------
7018 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7020 procedure W (Flag_Name : String; Flag : Boolean);
7021 -- Write out given flag if it is set
7027 procedure W (Flag_Name : String; Flag : Boolean) is
7031 Write_Str (Flag_Name);
7032 Write_Str (" = True");
7037 -- Start of processing for Write_Entity_Flags
7040 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7041 and then Base_Type (Id) = Id
7044 Write_Str ("Component_Alignment = ");
7046 case Component_Alignment (Id) is
7047 when Calign_Default =>
7048 Write_Str ("Calign_Default");
7050 when Calign_Component_Size =>
7051 Write_Str ("Calign_Component_Size");
7053 when Calign_Component_Size_4 =>
7054 Write_Str ("Calign_Component_Size_4");
7056 when Calign_Storage_Unit =>
7057 Write_Str ("Calign_Storage_Unit");
7063 W ("Address_Taken", Flag104 (Id));
7064 W ("Body_Needed_For_SAL", Flag40 (Id));
7065 W ("C_Pass_By_Copy", Flag125 (Id));
7066 W ("Can_Never_Be_Null", Flag38 (Id));
7067 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7068 W ("Debug_Info_Off", Flag166 (Id));
7069 W ("Default_Expressions_Processed", Flag108 (Id));
7070 W ("Delay_Cleanups", Flag114 (Id));
7071 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7072 W ("Depends_On_Private", Flag14 (Id));
7073 W ("Discard_Names", Flag88 (Id));
7074 W ("Elaboration_Entity_Required", Flag174 (Id));
7075 W ("Elaborate_Body_Desirable", Flag210 (Id));
7076 W ("Entry_Accepted", Flag152 (Id));
7077 W ("Finalize_Storage_Only", Flag158 (Id));
7078 W ("From_With_Type", Flag159 (Id));
7079 W ("Function_Returns_With_DSP", Flag169 (Id));
7080 W ("Has_Aliased_Components", Flag135 (Id));
7081 W ("Has_Alignment_Clause", Flag46 (Id));
7082 W ("Has_All_Calls_Remote", Flag79 (Id));
7083 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7084 W ("Has_Atomic_Components", Flag86 (Id));
7085 W ("Has_Biased_Representation", Flag139 (Id));
7086 W ("Has_Completion", Flag26 (Id));
7087 W ("Has_Completion_In_Body", Flag71 (Id));
7088 W ("Has_Complex_Representation", Flag140 (Id));
7089 W ("Has_Component_Size_Clause", Flag68 (Id));
7090 W ("Has_Contiguous_Rep", Flag181 (Id));
7091 W ("Has_Controlled_Component", Flag43 (Id));
7092 W ("Has_Controlling_Result", Flag98 (Id));
7093 W ("Has_Convention_Pragma", Flag119 (Id));
7094 W ("Has_Delayed_Freeze", Flag18 (Id));
7095 W ("Has_Discriminants", Flag5 (Id));
7096 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7097 W ("Has_Exit", Flag47 (Id));
7098 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7099 W ("Has_Forward_Instantiation", Flag175 (Id));
7100 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7101 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7102 W ("Has_Homonym", Flag56 (Id));
7103 W ("Has_Initial_Value", Flag219 (Id));
7104 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7105 W ("Has_Master_Entity", Flag21 (Id));
7106 W ("Has_Missing_Return", Flag142 (Id));
7107 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7108 W ("Has_Non_Standard_Rep", Flag75 (Id));
7109 W ("Has_Object_Size_Clause", Flag172 (Id));
7110 W ("Has_Per_Object_Constraint", Flag154 (Id));
7111 W ("Has_Persistent_BSS", Flag188 (Id));
7112 W ("Has_Pragma_Controlled", Flag27 (Id));
7113 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7114 W ("Has_Pragma_Inline", Flag157 (Id));
7115 W ("Has_Pragma_Pack", Flag121 (Id));
7116 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7117 W ("Has_Pragma_Pure", Flag203 (Id));
7118 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7119 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7120 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7121 W ("Has_Primitive_Operations", Flag120 (Id));
7122 W ("Has_Private_Declaration", Flag155 (Id));
7123 W ("Has_Qualified_Name", Flag161 (Id));
7124 W ("Has_RACW", Flag214 (Id));
7125 W ("Has_Record_Rep_Clause", Flag65 (Id));
7126 W ("Has_Recursive_Call", Flag143 (Id));
7127 W ("Has_Size_Clause", Flag29 (Id));
7128 W ("Has_Small_Clause", Flag67 (Id));
7129 W ("Has_Specified_Layout", Flag100 (Id));
7130 W ("Has_Specified_Stream_Input", Flag190 (Id));
7131 W ("Has_Specified_Stream_Output", Flag191 (Id));
7132 W ("Has_Specified_Stream_Read", Flag192 (Id));
7133 W ("Has_Specified_Stream_Write", Flag193 (Id));
7134 W ("Has_Static_Discriminants", Flag211 (Id));
7135 W ("Has_Storage_Size_Clause", Flag23 (Id));
7136 W ("Has_Stream_Size_Clause", Flag184 (Id));
7137 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7138 W ("Has_Task", Flag30 (Id));
7139 W ("Has_Unchecked_Union", Flag123 (Id));
7140 W ("Has_Unknown_Discriminants", Flag72 (Id));
7141 W ("Has_Up_Level_Access", Flag215 (Id));
7142 W ("Has_Volatile_Components", Flag87 (Id));
7143 W ("Has_Xref_Entry", Flag182 (Id));
7144 W ("In_Package_Body", Flag48 (Id));
7145 W ("In_Private_Part", Flag45 (Id));
7146 W ("In_Use", Flag8 (Id));
7147 W ("Is_AST_Entry", Flag132 (Id));
7148 W ("Is_Abstract_Subprogram", Flag19 (Id));
7149 W ("Is_Abstract_Type", Flag146 (Id));
7150 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7151 W ("Is_Access_Constant", Flag69 (Id));
7152 W ("Is_Ada_2005_Only", Flag185 (Id));
7153 W ("Is_Aliased", Flag15 (Id));
7154 W ("Is_Asynchronous", Flag81 (Id));
7155 W ("Is_Atomic", Flag85 (Id));
7156 W ("Is_Bit_Packed_Array", Flag122 (Id));
7157 W ("Is_CPP_Class", Flag74 (Id));
7158 W ("Is_Called", Flag102 (Id));
7159 W ("Is_Character_Type", Flag63 (Id));
7160 W ("Is_Child_Unit", Flag73 (Id));
7161 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7162 W ("Is_Compilation_Unit", Flag149 (Id));
7163 W ("Is_Completely_Hidden", Flag103 (Id));
7164 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7165 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7166 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7167 W ("Is_Constrained", Flag12 (Id));
7168 W ("Is_Constructor", Flag76 (Id));
7169 W ("Is_Controlled", Flag42 (Id));
7170 W ("Is_Controlling_Formal", Flag97 (Id));
7171 W ("Is_Discrim_SO_Function", Flag176 (Id));
7172 W ("Is_Dispatching_Operation", Flag6 (Id));
7173 W ("Is_Eliminated", Flag124 (Id));
7174 W ("Is_Entry_Formal", Flag52 (Id));
7175 W ("Is_Exported", Flag99 (Id));
7176 W ("Is_First_Subtype", Flag70 (Id));
7177 W ("Is_For_Access_Subtype", Flag118 (Id));
7178 W ("Is_Formal_Subprogram", Flag111 (Id));
7179 W ("Is_Frozen", Flag4 (Id));
7180 W ("Is_Generic_Actual_Type", Flag94 (Id));
7181 W ("Is_Generic_Instance", Flag130 (Id));
7182 W ("Is_Generic_Type", Flag13 (Id));
7183 W ("Is_Hidden", Flag57 (Id));
7184 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7185 W ("Is_Immediately_Visible", Flag7 (Id));
7186 W ("Is_Imported", Flag24 (Id));
7187 W ("Is_Inlined", Flag11 (Id));
7188 W ("Is_Instantiated", Flag126 (Id));
7189 W ("Is_Interface", Flag186 (Id));
7190 W ("Is_Internal", Flag17 (Id));
7191 W ("Is_Interrupt_Handler", Flag89 (Id));
7192 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7193 W ("Is_Itype", Flag91 (Id));
7194 W ("Is_Known_Non_Null", Flag37 (Id));
7195 W ("Is_Known_Null", Flag204 (Id));
7196 W ("Is_Known_Valid", Flag170 (Id));
7197 W ("Is_Limited_Composite", Flag106 (Id));
7198 W ("Is_Limited_Interface", Flag197 (Id));
7199 W ("Is_Limited_Record", Flag25 (Id));
7200 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7201 W ("Is_Non_Static_Subtype", Flag109 (Id));
7202 W ("Is_Null_Init_Proc", Flag178 (Id));
7203 W ("Is_Obsolescent", Flag153 (Id));
7204 W ("Is_Optional_Parameter", Flag134 (Id));
7205 W ("Is_Overriding_Operation", Flag39 (Id));
7206 W ("Is_Package_Body_Entity", Flag160 (Id));
7207 W ("Is_Packed", Flag51 (Id));
7208 W ("Is_Packed_Array_Type", Flag138 (Id));
7209 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7210 W ("Is_Preelaborated", Flag59 (Id));
7211 W ("Is_Primitive_Wrapper", Flag195 (Id));
7212 W ("Is_Private_Composite", Flag107 (Id));
7213 W ("Is_Private_Descendant", Flag53 (Id));
7214 W ("Is_Protected_Interface", Flag198 (Id));
7215 W ("Is_Public", Flag10 (Id));
7216 W ("Is_Pure", Flag44 (Id));
7217 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7218 W ("Is_Remote_Call_Interface", Flag62 (Id));
7219 W ("Is_Remote_Types", Flag61 (Id));
7220 W ("Is_Renaming_Of_Object", Flag112 (Id));
7221 W ("Is_Return_Object", Flag209 (Id));
7222 W ("Is_Shared_Passive", Flag60 (Id));
7223 W ("Is_Synchronized_Interface", Flag199 (Id));
7224 W ("Is_Statically_Allocated", Flag28 (Id));
7225 W ("Is_Tag", Flag78 (Id));
7226 W ("Is_Tagged_Type", Flag55 (Id));
7227 W ("Is_Task_Interface", Flag200 (Id));
7228 W ("Is_True_Constant", Flag163 (Id));
7229 W ("Is_Unchecked_Union", Flag117 (Id));
7230 W ("Is_Unsigned_Type", Flag144 (Id));
7231 W ("Is_VMS_Exception", Flag133 (Id));
7232 W ("Is_Valued_Procedure", Flag127 (Id));
7233 W ("Is_Visible_Child_Unit", Flag116 (Id));
7234 W ("Is_Visible_Formal", Flag206 (Id));
7235 W ("Is_Volatile", Flag16 (Id));
7236 W ("Itype_Printed", Flag202 (Id));
7237 W ("Kill_Elaboration_Checks", Flag32 (Id));
7238 W ("Kill_Range_Checks", Flag33 (Id));
7239 W ("Kill_Tag_Checks", Flag34 (Id));
7240 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7241 W ("Low_Bound_Known", Flag205 (Id));
7242 W ("Machine_Radix_10", Flag84 (Id));
7243 W ("Materialize_Entity", Flag168 (Id));
7244 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7245 W ("Must_Have_Preelab_Init", Flag208 (Id));
7246 W ("Needs_Debug_Info", Flag147 (Id));
7247 W ("Needs_No_Actuals", Flag22 (Id));
7248 W ("Never_Set_In_Source", Flag115 (Id));
7249 W ("No_Pool_Assigned", Flag131 (Id));
7250 W ("No_Return", Flag113 (Id));
7251 W ("No_Strict_Aliasing", Flag136 (Id));
7252 W ("Non_Binary_Modulus", Flag58 (Id));
7253 W ("Nonzero_Is_True", Flag162 (Id));
7254 W ("Reachable", Flag49 (Id));
7255 W ("Referenced", Flag156 (Id));
7256 W ("Referenced_As_LHS", Flag36 (Id));
7257 W ("Requires_Overriding", Flag213 (Id));
7258 W ("Return_Present", Flag54 (Id));
7259 W ("Returns_By_Ref", Flag90 (Id));
7260 W ("Reverse_Bit_Order", Flag164 (Id));
7261 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7262 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7263 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7264 W ("Static_Elaboration_Desired", Flag77 (Id));
7265 W ("Strict_Alignment", Flag145 (Id));
7266 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7267 W ("Suppress_Init_Proc", Flag105 (Id));
7268 W ("Suppress_Style_Checks", Flag165 (Id));
7269 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7270 W ("Is_Primitive", Flag218 (Id));
7271 W ("Treat_As_Volatile", Flag41 (Id));
7272 W ("Universal_Aliasing", Flag216 (Id));
7273 W ("Used_As_Generic_Actual", Flag222 (Id));
7274 W ("Uses_Sec_Stack", Flag95 (Id));
7275 W ("Vax_Float", Flag151 (Id));
7276 W ("Warnings_Off", Flag96 (Id));
7277 W ("Was_Hidden", Flag196 (Id));
7278 end Write_Entity_Flags;
7280 -----------------------
7281 -- Write_Entity_Info --
7282 -----------------------
7284 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7286 procedure Write_Attribute (Which : String; Nam : E);
7287 -- Write attribute value with given string name
7289 procedure Write_Kind (Id : Entity_Id);
7290 -- Write Ekind field of entity
7292 ---------------------
7293 -- Write_Attribute --
7294 ---------------------
7296 procedure Write_Attribute (Which : String; Nam : E) is
7300 Write_Int (Int (Nam));
7302 Write_Name (Chars (Nam));
7304 end Write_Attribute;
7310 procedure Write_Kind (Id : Entity_Id) is
7311 K : constant String := Entity_Kind'Image (Ekind (Id));
7315 Write_Str (" Kind ");
7317 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7318 Write_Str ("TAGGED ");
7321 Write_Str (K (3 .. K'Length));
7324 if Is_Type (Id) and then Depends_On_Private (Id) then
7325 Write_Str ("Depends_On_Private ");
7329 -- Start of processing for Write_Entity_Info
7333 Write_Attribute ("Name ", Id);
7334 Write_Int (Int (Id));
7338 Write_Attribute (" Type ", Etype (Id));
7340 Write_Attribute (" Scope ", Scope (Id));
7345 when Discrete_Kind =>
7346 Write_Str ("Bounds: Id = ");
7348 if Present (Scalar_Range (Id)) then
7349 Write_Int (Int (Type_Low_Bound (Id)));
7350 Write_Str (" .. Id = ");
7351 Write_Int (Int (Type_High_Bound (Id)));
7353 Write_Str ("Empty");
7364 (" Component Type ", Component_Type (Id));
7367 Write_Str (" Indices ");
7369 Index := First_Index (Id);
7370 while Present (Index) loop
7371 Write_Attribute (" ", Etype (Index));
7372 Index := Next_Index (Index);
7380 (" Directly Designated Type ",
7381 Directly_Designated_Type (Id));
7384 when Overloadable_Kind =>
7385 if Present (Homonym (Id)) then
7386 Write_Str (" Homonym ");
7387 Write_Name (Chars (Homonym (Id)));
7389 Write_Int (Int (Homonym (Id)));
7396 if Ekind (Scope (Id)) in Record_Kind then
7398 " Original_Record_Component ",
7399 Original_Record_Component (Id));
7400 Write_Int (Int (Original_Record_Component (Id)));
7404 when others => null;
7406 end Write_Entity_Info;
7408 -----------------------
7409 -- Write_Field6_Name --
7410 -----------------------
7412 procedure Write_Field6_Name (Id : Entity_Id) is
7413 pragma Warnings (Off, Id);
7415 Write_Str ("First_Rep_Item");
7416 end Write_Field6_Name;
7418 -----------------------
7419 -- Write_Field7_Name --
7420 -----------------------
7422 procedure Write_Field7_Name (Id : Entity_Id) is
7423 pragma Warnings (Off, Id);
7425 Write_Str ("Freeze_Node");
7426 end Write_Field7_Name;
7428 -----------------------
7429 -- Write_Field8_Name --
7430 -----------------------
7432 procedure Write_Field8_Name (Id : Entity_Id) is
7437 Write_Str ("Normalized_First_Bit");
7441 E_Subprogram_Body =>
7442 Write_Str ("Mechanism");
7445 Write_Str ("Associated_Node_For_Itype");
7448 Write_Str ("Dependent_Instances");
7450 when E_Return_Statement =>
7451 Write_Str ("Return_Applies_To");
7454 Write_Str ("Hiding_Loop_Variable");
7457 Write_Str ("Field8??");
7459 end Write_Field8_Name;
7461 -----------------------
7462 -- Write_Field9_Name --
7463 -----------------------
7465 procedure Write_Field9_Name (Id : Entity_Id) is
7469 Write_Str ("Class_Wide_Type");
7472 E_Generic_Function |
7474 E_Generic_Procedure |
7477 Write_Str ("Renaming_Map");
7480 Write_Str ("Current_Value");
7483 Write_Str ("Field9??");
7485 end Write_Field9_Name;
7487 ------------------------
7488 -- Write_Field10_Name --
7489 ------------------------
7491 procedure Write_Field10_Name (Id : Entity_Id) is
7495 Write_Str ("Referenced_Object");
7497 when E_In_Parameter |
7499 Write_Str ("Discriminal_Link");
7505 Write_Str ("Handler_Records");
7509 Write_Str ("Normalized_Position_Max");
7512 Write_Str ("Field10??");
7514 end Write_Field10_Name;
7516 ------------------------
7517 -- Write_Field11_Name --
7518 ------------------------
7520 procedure Write_Field11_Name (Id : Entity_Id) is
7524 Write_Str ("Entry_Component");
7528 Write_Str ("Component_Bit_Offset");
7531 Write_Str ("Full_View");
7533 when E_Enumeration_Literal =>
7534 Write_Str ("Enumeration_Pos");
7537 Write_Str ("Block_Node");
7543 Write_Str ("Protected_Body_Subprogram");
7545 when E_Generic_Package =>
7546 Write_Str ("Generic_Homonym");
7549 Write_Str ("Full_View");
7552 Write_Str ("Field11??");
7554 end Write_Field11_Name;
7556 ------------------------
7557 -- Write_Field12_Name --
7558 ------------------------
7560 procedure Write_Field12_Name (Id : Entity_Id) is
7564 Write_Str ("Barrier_Function");
7566 when E_Enumeration_Literal =>
7567 Write_Str ("Enumeration_Rep");
7575 E_In_Out_Parameter |
7579 Write_Str ("Esize");
7583 Write_Str ("Next_Inlined_Subprogram");
7586 Write_Str ("Associated_Formal_Package");
7589 Write_Str ("Field12??");
7591 end Write_Field12_Name;
7593 ------------------------
7594 -- Write_Field13_Name --
7595 ------------------------
7597 procedure Write_Field13_Name (Id : Entity_Id) is
7601 Write_Str ("RM_Size");
7605 Write_Str ("Component_Clause");
7608 if not Comes_From_Source (Id)
7610 Chars (Id) = Name_Op_Ne
7612 Write_Str ("Corresponding_Equality");
7614 elsif Comes_From_Source (Id) then
7615 Write_Str ("Elaboration_Entity");
7618 Write_Str ("Field13??");
7623 Write_Str ("Extra_Accessibility");
7627 Generic_Unit_Kind =>
7628 Write_Str ("Elaboration_Entity");
7631 Write_Str ("Field13??");
7633 end Write_Field13_Name;
7635 -----------------------
7636 -- Write_Field14_Name --
7637 -----------------------
7639 procedure Write_Field14_Name (Id : Entity_Id) is
7648 Write_Str ("Alignment");
7652 Write_Str ("Normalized_Position");
7656 Write_Str ("First_Optional_Parameter");
7659 E_Generic_Package =>
7660 Write_Str ("Shadow_Entities");
7663 Write_Str ("Field14??");
7665 end Write_Field14_Name;
7667 ------------------------
7668 -- Write_Field15_Name --
7669 ------------------------
7671 procedure Write_Field15_Name (Id : Entity_Id) is
7676 Write_Str ("Storage_Size_Variable");
7678 when Class_Wide_Kind |
7682 Write_Str ("Primitive_Operations");
7685 Write_Str ("DT_Entry_Count");
7687 when Decimal_Fixed_Point_Kind =>
7688 Write_Str ("Scale_Value");
7690 when E_Discriminant =>
7691 Write_Str ("Discriminant_Number");
7694 Write_Str ("Extra_Formal");
7698 Write_Str ("DT_Position");
7701 Write_Str ("Entry_Parameters_Type");
7703 when Enumeration_Kind =>
7704 Write_Str ("Lit_Indexes");
7708 Write_Str ("Related_Instance");
7710 when E_Protected_Type =>
7711 Write_Str ("Entry_Bodies_Array");
7713 when E_String_Literal_Subtype =>
7714 Write_Str ("String_Literal_Low_Bound");
7717 Write_Str ("Shared_Var_Read_Proc");
7720 Write_Str ("Field15??");
7722 end Write_Field15_Name;
7724 ------------------------
7725 -- Write_Field16_Name --
7726 ------------------------
7728 procedure Write_Field16_Name (Id : Entity_Id) is
7732 Write_Str ("Entry_Formal");
7736 Write_Str ("DTC_Entity");
7741 Write_Str ("First_Private_Entity");
7743 when E_Record_Type |
7744 E_Record_Type_With_Private =>
7745 Write_Str ("Access_Disp_Table");
7747 when E_String_Literal_Subtype =>
7748 Write_Str ("String_Literal_Length");
7750 when Enumeration_Kind =>
7751 Write_Str ("Lit_Strings");
7755 Write_Str ("Unset_Reference");
7757 when E_Record_Subtype |
7758 E_Class_Wide_Subtype =>
7759 Write_Str ("Cloned_Subtype");
7762 Write_Str ("Field16??");
7764 end Write_Field16_Name;
7766 ------------------------
7767 -- Write_Field17_Name --
7768 ------------------------
7770 procedure Write_Field17_Name (Id : Entity_Id) is
7774 Write_Str ("Digits_Value");
7777 Write_Str ("Prival");
7779 when E_Discriminant =>
7780 Write_Str ("Discriminal");
7789 E_Generic_Function |
7791 E_Generic_Procedure |
7799 E_Return_Statement |
7801 E_Subprogram_Type =>
7802 Write_Str ("First_Entity");
7805 Write_Str ("First_Index");
7807 when E_Protected_Body =>
7808 Write_Str ("Object_Ref");
7810 when Enumeration_Kind =>
7811 Write_Str ("First_Literal");
7814 Write_Str ("Master_Id");
7816 when Modular_Integer_Kind =>
7817 Write_Str ("Modulus");
7821 E_Generic_In_Out_Parameter |
7823 Write_Str ("Actual_Subtype");
7825 when E_Incomplete_Type =>
7826 Write_Str ("Non_Limited_View");
7828 when E_Incomplete_Subtype =>
7829 if From_With_Type (Id) then
7830 Write_Str ("Non_Limited_View");
7834 Write_Str ("Field17??");
7836 end Write_Field17_Name;
7838 ------------------------
7839 -- Write_Field18_Name --
7840 ------------------------
7842 procedure Write_Field18_Name (Id : Entity_Id) is
7845 when E_Enumeration_Literal |
7849 Write_Str ("Alias");
7851 when E_Record_Type =>
7852 Write_Str ("Corresponding_Concurrent_Type");
7854 when E_Entry_Index_Parameter =>
7855 Write_Str ("Entry_Index_Constant");
7857 when E_Class_Wide_Subtype |
7858 E_Access_Protected_Subprogram_Type |
7859 E_Anonymous_Access_Protected_Subprogram_Type |
7860 E_Access_Subprogram_Type |
7862 Write_Str ("Equivalent_Type");
7864 when Fixed_Point_Kind =>
7865 Write_Str ("Delta_Value");
7868 Write_Str ("Renamed_Object");
7872 E_Generic_Function |
7873 E_Generic_Procedure |
7874 E_Generic_Package =>
7875 Write_Str ("Renamed_Entity");
7877 when Incomplete_Or_Private_Kind =>
7878 Write_Str ("Private_Dependents");
7880 when Concurrent_Kind =>
7881 Write_Str ("Corresponding_Record_Type");
7886 Write_Str ("Enclosing_Scope");
7889 Write_Str ("Field18??");
7891 end Write_Field18_Name;
7893 -----------------------
7894 -- Write_Field19_Name --
7895 -----------------------
7897 procedure Write_Field19_Name (Id : Entity_Id) is
7902 Write_Str ("Related_Array_Object");
7908 E_Return_Statement |
7910 Write_Str ("Finalization_Chain_Entity");
7912 when E_Constant | E_Variable =>
7913 Write_Str ("Size_Check_Code");
7915 when E_Discriminant =>
7916 Write_Str ("Corresponding_Discriminant");
7919 E_Generic_Package =>
7920 Write_Str ("Body_Entity");
7922 when E_Package_Body |
7924 Write_Str ("Spec_Entity");
7926 when Private_Kind =>
7927 Write_Str ("Underlying_Full_View");
7929 when E_Record_Type =>
7930 Write_Str ("Parent_Subtype");
7933 Write_Str ("Field19??");
7935 end Write_Field19_Name;
7937 -----------------------
7938 -- Write_Field20_Name --
7939 -----------------------
7941 procedure Write_Field20_Name (Id : Entity_Id) is
7945 Write_Str ("Component_Type");
7947 when E_In_Parameter |
7948 E_Generic_In_Parameter =>
7949 Write_Str ("Default_Value");
7952 Write_Str ("Directly_Designated_Type");
7955 Write_Str ("Discriminant_Checking_Func");
7957 when E_Discriminant =>
7958 Write_Str ("Discriminant_Default_Value");
7967 E_Generic_Function |
7969 E_Generic_Procedure |
7977 E_Return_Statement |
7979 E_Subprogram_Type =>
7981 Write_Str ("Last_Entity");
7984 Write_Str ("Scalar_Range");
7987 Write_Str ("Register_Exception_Call");
7990 Write_Str ("Last_Assignment");
7993 Write_Str ("Field20??");
7995 end Write_Field20_Name;
7997 -----------------------
7998 -- Write_Field21_Name --
7999 -----------------------
8001 procedure Write_Field21_Name (Id : Entity_Id) is
8007 E_Generic_Function |
8009 E_Generic_Procedure |
8011 Write_Str ("Interface_Name");
8013 when Concurrent_Kind |
8014 Incomplete_Or_Private_Kind |
8018 Write_Str ("Discriminant_Constraint");
8021 Write_Str ("Accept_Address");
8023 when Fixed_Point_Kind =>
8024 Write_Str ("Small_Value");
8026 when E_In_Parameter =>
8027 Write_Str ("Default_Expr_Function");
8030 Modular_Integer_Kind =>
8031 Write_Str ("Original_Array_Type");
8034 Write_Str ("Field21??");
8036 end Write_Field21_Name;
8038 -----------------------
8039 -- Write_Field22_Name --
8040 -----------------------
8042 procedure Write_Field22_Name (Id : Entity_Id) is
8046 Write_Str ("Associated_Storage_Pool");
8049 Write_Str ("Component_Size");
8053 Write_Str ("Original_Record_Component");
8055 when E_Enumeration_Literal =>
8056 Write_Str ("Enumeration_Rep_Expr");
8059 Write_Str ("Exception_Code");
8062 Write_Str ("Protected_Formal");
8064 when E_Record_Type =>
8065 Write_Str ("Corresponding_Remote_Type");
8075 E_Generic_Function |
8076 E_Generic_Procedure |
8079 E_Return_Statement |
8082 Write_Str ("Scope_Depth_Value");
8084 when E_Record_Type_With_Private |
8085 E_Record_Subtype_With_Private |
8088 E_Limited_Private_Type |
8089 E_Limited_Private_Subtype =>
8090 Write_Str ("Private_View");
8093 Write_Str ("Shared_Var_Assign_Proc");
8096 Write_Str ("Field22??");
8098 end Write_Field22_Name;
8100 ------------------------
8101 -- Write_Field23_Name --
8102 ------------------------
8104 procedure Write_Field23_Name (Id : Entity_Id) is
8108 Write_Str ("Associated_Final_Chain");
8111 Write_Str ("Packed_Array_Type");
8114 Write_Str ("Entry_Cancel_Parameter");
8117 Write_Str ("Protected_Operation");
8119 when E_Discriminant =>
8120 Write_Str ("CR_Discriminant");
8122 when E_Enumeration_Type =>
8123 Write_Str ("Enum_Pos_To_Rep");
8127 Write_Str ("Extra_Constrained");
8129 when E_Generic_Function |
8131 E_Generic_Procedure =>
8132 Write_Str ("Inner_Instances");
8134 when Concurrent_Kind |
8135 Incomplete_Or_Private_Kind |
8139 Write_Str ("Stored_Constraint");
8143 Write_Str ("Generic_Renamings");
8146 if Is_Generic_Instance (Id) then
8147 Write_Str ("Generic_Renamings");
8149 Write_Str ("Limited_View");
8152 -- What about Privals_Chain for protected operations ???
8155 Write_Str ("Privals_Chain");
8158 Write_Str ("Field23??");
8160 end Write_Field23_Name;
8162 ------------------------
8163 -- Write_Field24_Name --
8164 ------------------------
8166 procedure Write_Field24_Name (Id : Entity_Id) is
8167 pragma Warnings (Off, Id);
8169 Write_Str ("Obsolescent_Warning");
8170 end Write_Field24_Name;
8172 ------------------------
8173 -- Write_Field25_Name --
8174 ------------------------
8176 procedure Write_Field25_Name (Id : Entity_Id) is
8180 Write_Str ("DT_Offset_To_Top_Func");
8184 Write_Str ("Abstract_Interface_Alias");
8187 Write_Str ("Current_Use_Clause");
8189 when E_Record_Type |
8191 E_Record_Type_With_Private |
8192 E_Record_Subtype_With_Private =>
8193 Write_Str ("Abstract_Interfaces");
8196 Write_Str ("Task_Body_Procedure");
8199 Write_Str ("Debug_Renaming_Link");
8202 Write_Str ("Field25??");
8204 end Write_Field25_Name;
8206 ------------------------
8207 -- Write_Field26_Name --
8208 ------------------------
8210 procedure Write_Field26_Name (Id : Entity_Id) is
8215 Write_Str ("Related_Interface");
8217 when E_Generic_Package |
8219 Write_Str ("Package_Instantiation");
8224 if Is_Dispatching_Operation (Id) then
8225 Write_Str ("Overridden_Operation");
8227 Write_Str ("Static_Initialization");
8231 Write_Str ("Field26??");
8233 end Write_Field26_Name;
8235 ------------------------
8236 -- Write_Field27_Name --
8237 ------------------------
8239 procedure Write_Field27_Name (Id : Entity_Id) is
8243 Write_Str ("Wrapped_Entity");
8246 Write_Str ("Field27??");
8248 end Write_Field27_Name;
8250 ------------------------
8251 -- Write_Field28_Name --
8252 ------------------------
8254 procedure Write_Field28_Name (Id : Entity_Id) is
8257 when E_Procedure | E_Function | E_Entry =>
8258 Write_Str ("Extra_Formals");
8261 Write_Str ("Field28??");
8263 end Write_Field28_Name;
8265 -------------------------
8266 -- Iterator Procedures --
8267 -------------------------
8269 procedure Proc_Next_Component (N : in out Node_Id) is
8271 N := Next_Component (N);
8272 end Proc_Next_Component;
8274 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8276 N := Next_Component (N);
8277 end Proc_Next_Component_Or_Discriminant;
8279 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8281 N := Next_Discriminant (N);
8282 end Proc_Next_Discriminant;
8284 procedure Proc_Next_Formal (N : in out Node_Id) is
8286 N := Next_Formal (N);
8287 end Proc_Next_Formal;
8289 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8291 N := Next_Formal_With_Extras (N);
8292 end Proc_Next_Formal_With_Extras;
8294 procedure Proc_Next_Index (N : in out Node_Id) is
8296 N := Next_Index (N);
8297 end Proc_Next_Index;
8299 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8301 N := Next_Inlined_Subprogram (N);
8302 end Proc_Next_Inlined_Subprogram;
8304 procedure Proc_Next_Literal (N : in out Node_Id) is
8306 N := Next_Literal (N);
8307 end Proc_Next_Literal;
8309 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8311 N := Next_Stored_Discriminant (N);
8312 end Proc_Next_Stored_Discriminant;