1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2005, 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 Namet; use Namet;
39 with Nlists; use Nlists;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
42 with Output; use Output;
46 use Atree.Unchecked_Access;
47 -- This is one of the packages that is allowed direct untyped access to
48 -- the fields in a node, since it provides the next level abstraction
49 -- which incorporates appropriate checks.
51 ----------------------------------------------
52 -- Usage of Fields in Defining Entity Nodes --
53 ----------------------------------------------
55 -- Four of these fields are defined in Sinfo, since they in are the
56 -- base part of the node. The access routines for these fields and
57 -- the corresponding set procedures are defined in Sinfo. These fields
58 -- are present in all entities. Note that Homonym is also in the base
59 -- part of the node, but has access routines that are more properly
60 -- part of Einfo, which is why they are defined here.
67 -- Remaining fields are present only in extended nodes (i.e. entities)
69 -- The following fields are present in all entities
72 -- First_Rep_Item Node6
75 -- The usage of each field (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
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Debug_Renaming_Link Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Primitive_Operations Elist15
126 -- Related_Instance Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
130 -- Shared_Var_Read_Proc Node15
132 -- Access_Disp_Table Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
163 -- Body_Entity Node19
164 -- Corresponding_Discriminant Node19
165 -- Finalization_Chain_Entity Node19
166 -- Parent_Subtype Node19
167 -- Related_Array_Object Node19
168 -- Size_Check_Code Node19
169 -- Spec_Entity Node19
170 -- Underlying_Full_View Node19
172 -- Component_Type Node20
173 -- Default_Value Node20
174 -- Directly_Designated_Type Node20
175 -- Discriminant_Checking_Func Node20
176 -- Discriminant_Default_Value Node20
177 -- Last_Entity Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Interface_Name Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Exception_Code Uint22
193 -- Original_Record_Component Node22
194 -- Private_View Node22
195 -- Protected_Formal Node22
196 -- Scope_Depth_Value Uint22
197 -- Shared_Var_Assign_Proc Node22
199 -- Associated_Final_Chain Node23
200 -- CR_Discriminant Node23
201 -- Stored_Constraint Elist23
202 -- Entry_Cancel_Parameter Node23
203 -- Extra_Constrained Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Enum_Pos_To_Rep Node23
207 -- Packed_Array_Type Node23
208 -- Limited_View Node23
209 -- Privals_Chain Elist23
210 -- Protected_Operation Node23
212 -- Obsolescent_Warning Node24
213 -- Task_Body_Procedure Node24
214 -- Abstract_Interfaces Elist24
216 -- Abstract_Interface_Alias Node25
217 -- Current_Use_Clause Node25
219 -- Overridden_Operation Node26
220 -- Package_Instantiation Node26
222 -- Wrapped_Entity Node27
224 ---------------------------------------------
225 -- Usage of Flags in Defining Entity Nodes --
226 ---------------------------------------------
228 -- All flags are unique, there is no overlaying, so each flag is physically
229 -- present in every entity. However, for many of the flags, it only makes
230 -- sense for them to be set true for certain subsets of entity kinds. See
231 -- the spec of Einfo for further details.
233 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
234 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
235 -- which are common to all nodes, including entity nodes.
238 -- Has_Discriminants Flag5
239 -- Is_Dispatching_Operation Flag6
240 -- Is_Immediately_Visible Flag7
242 -- Is_Potentially_Use_Visible Flag9
246 -- Is_Constrained Flag12
247 -- Is_Generic_Type Flag13
248 -- Depends_On_Private Flag14
250 -- Is_Volatile Flag16
251 -- Is_Internal Flag17
252 -- Has_Delayed_Freeze Flag18
253 -- Is_Abstract Flag19
254 -- Is_Concurrent_Record_Type Flag20
256 -- Has_Master_Entity Flag21
257 -- Needs_No_Actuals Flag22
258 -- Has_Storage_Size_Clause Flag23
259 -- Is_Imported Flag24
260 -- Is_Limited_Record Flag25
261 -- Has_Completion Flag26
262 -- Has_Pragma_Controlled Flag27
263 -- Is_Statically_Allocated Flag28
264 -- Has_Size_Clause Flag29
267 -- Checks_May_Be_Suppressed Flag31
268 -- Kill_Elaboration_Checks Flag32
269 -- Kill_Range_Checks Flag33
270 -- Kill_Tag_Checks Flag34
271 -- Is_Class_Wide_Equivalent_Type Flag35
272 -- Referenced_As_LHS Flag36
273 -- Is_Known_Non_Null Flag37
274 -- Can_Never_Be_Null Flag38
275 -- Is_Overriding_Operation Flag39
276 -- Body_Needed_For_SAL Flag40
278 -- Treat_As_Volatile Flag41
279 -- Is_Controlled Flag42
280 -- Has_Controlled_Component Flag43
282 -- In_Private_Part Flag45
283 -- Has_Alignment_Clause Flag46
285 -- In_Package_Body Flag48
287 -- Delay_Subprogram_Descriptors Flag50
290 -- Is_Entry_Formal Flag52
291 -- Is_Private_Descendant Flag53
292 -- Return_Present Flag54
293 -- Is_Tagged_Type Flag55
294 -- Has_Homonym Flag56
296 -- Non_Binary_Modulus Flag58
297 -- Is_Preelaborated Flag59
298 -- Is_Shared_Passive Flag60
300 -- Is_Remote_Types Flag61
301 -- Is_Remote_Call_Interface Flag62
302 -- Is_Character_Type Flag63
303 -- Is_Intrinsic_Subprogram Flag64
304 -- Has_Record_Rep_Clause Flag65
305 -- Has_Enumeration_Rep_Clause Flag66
306 -- Has_Small_Clause Flag67
307 -- Has_Component_Size_Clause Flag68
308 -- Is_Access_Constant Flag69
309 -- Is_First_Subtype Flag70
311 -- Has_Completion_In_Body Flag71
312 -- Has_Unknown_Discriminants Flag72
313 -- Is_Child_Unit Flag73
314 -- Is_CPP_Class Flag74
315 -- Has_Non_Standard_Rep Flag75
316 -- Is_Constructor Flag76
317 -- Is_Thread_Body Flag77
319 -- Has_All_Calls_Remote Flag79
320 -- Is_Constr_Subt_For_U_Nominal Flag80
322 -- Is_Asynchronous Flag81
323 -- Has_Gigi_Rep_Item Flag82
324 -- Has_Machine_Radix_Clause Flag83
325 -- Machine_Radix_10 Flag84
327 -- Has_Atomic_Components Flag86
328 -- Has_Volatile_Components Flag87
329 -- Discard_Names Flag88
330 -- Is_Interrupt_Handler Flag89
331 -- Returns_By_Ref Flag90
334 -- Size_Known_At_Compile_Time Flag92
335 -- Has_Subprogram_Descriptor Flag93
336 -- Is_Generic_Actual_Type Flag94
337 -- Uses_Sec_Stack Flag95
338 -- Warnings_Off Flag96
339 -- Is_Controlling_Formal Flag97
340 -- Has_Controlling_Result Flag98
341 -- Is_Exported Flag99
342 -- Has_Specified_Layout Flag100
344 -- Has_Nested_Block_With_Handler Flag101
346 -- Is_Completely_Hidden Flag103
347 -- Address_Taken Flag104
348 -- Suppress_Init_Proc Flag105
349 -- Is_Limited_Composite Flag106
350 -- Is_Private_Composite Flag107
351 -- Default_Expressions_Processed Flag108
352 -- Is_Non_Static_Subtype Flag109
353 -- Has_External_Tag_Rep_Clause Flag110
355 -- Is_Formal_Subprogram Flag111
356 -- Is_Renaming_Of_Object Flag112
358 -- Delay_Cleanups Flag114
359 -- Never_Set_In_Source Flag115
360 -- Is_Visible_Child_Unit Flag116
361 -- Is_Unchecked_Union Flag117
362 -- Is_For_Access_Subtype Flag118
363 -- Has_Convention_Pragma Flag119
364 -- Has_Primitive_Operations Flag120
366 -- Has_Pragma_Pack Flag121
367 -- Is_Bit_Packed_Array Flag122
368 -- Has_Unchecked_Union Flag123
369 -- Is_Eliminated Flag124
370 -- C_Pass_By_Copy Flag125
371 -- Is_Instantiated Flag126
372 -- Is_Valued_Procedure Flag127
373 -- (used for Component_Alignment) Flag128
374 -- (used for Component_Alignment) Flag129
375 -- Is_Generic_Instance Flag130
377 -- No_Pool_Assigned Flag131
378 -- Is_AST_Entry Flag132
379 -- Is_VMS_Exception Flag133
380 -- Is_Optional_Parameter Flag134
381 -- Has_Aliased_Components Flag135
382 -- No_Strict_Aliasing Flag136
383 -- Is_Machine_Code_Subprogram Flag137
384 -- Is_Packed_Array_Type Flag138
385 -- Has_Biased_Representation Flag139
386 -- Has_Complex_Representation Flag140
388 -- Is_Constr_Subt_For_UN_Aliased Flag141
389 -- Has_Missing_Return Flag142
390 -- Has_Recursive_Call Flag143
391 -- Is_Unsigned_Type Flag144
392 -- Strict_Alignment Flag145
394 -- Needs_Debug_Info Flag147
395 -- Suppress_Elaboration_Warnings Flag148
396 -- Is_Compilation_Unit Flag149
397 -- Has_Pragma_Elaborate_Body Flag150
400 -- Entry_Accepted Flag152
401 -- Is_Obsolescent Flag153
402 -- Has_Per_Object_Constraint Flag154
403 -- Has_Private_Declaration Flag155
404 -- Referenced Flag156
405 -- Has_Pragma_Inline Flag157
406 -- Finalize_Storage_Only Flag158
407 -- From_With_Type Flag159
408 -- Is_Package_Body_Entity Flag160
410 -- Has_Qualified_Name Flag161
411 -- Nonzero_Is_True Flag162
412 -- Is_True_Constant Flag163
413 -- Reverse_Bit_Order Flag164
414 -- Suppress_Style_Checks Flag165
415 -- Debug_Info_Off Flag166
416 -- Sec_Stack_Needed_For_Return Flag167
417 -- Materialize_Entity Flag168
418 -- Function_Returns_With_DSP Flag169
419 -- Is_Known_Valid Flag170
421 -- Is_Hidden_Open_Scope Flag171
422 -- Has_Object_Size_Clause Flag172
423 -- Has_Fully_Qualified_Name Flag173
424 -- Elaboration_Entity_Required Flag174
425 -- Has_Forward_Instantiation Flag175
426 -- Is_Discrim_SO_Function Flag176
427 -- Size_Depends_On_Discriminant Flag177
428 -- Is_Null_Init_Proc Flag178
429 -- Has_Pragma_Pure_Function Flag179
430 -- Has_Pragma_Unreferenced Flag180
432 -- Has_Contiguous_Rep Flag181
433 -- Has_Xref_Entry Flag182
434 -- Must_Be_On_Byte_Boundary Flag183
435 -- Has_Stream_Size_Clause Flag184
436 -- Is_Ada_2005 Flag185
437 -- Is_Interface Flag186
438 -- Has_Constrained_Partial_View Flag187
439 -- Has_Persistent_BSS Flag188
440 -- Is_Pure_Unit_Access_Type Flag189
441 -- Has_Specified_Stream_Input Flag190
443 -- Has_Specified_Stream_Output Flag191
444 -- Has_Specified_Stream_Read Flag192
445 -- Has_Specified_Stream_Write Flag193
446 -- Is_Local_Anonymous_Access Flag194
447 -- Is_Primitive_Wrapper Flag195
448 -- Was_Hidden Flag196
449 -- Is_Limited_Interface Flag197
450 -- Is_Protected_Interface Flag198
451 -- Is_Synchronized_Interface Flag199
452 -- Is_Task_Interface Flag200
454 -- Has_Anon_Block_Suffix Flag201
455 -- Itype_Printed Flag202
471 -----------------------
472 -- Local subprograms --
473 -----------------------
475 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
476 -- Returns the attribute definition clause whose name is Rep_Name. Returns
477 -- Empty if not found.
483 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
487 Ritem := First_Rep_Item (Id);
488 while Present (Ritem) loop
489 if Nkind (Ritem) = N_Attribute_Definition_Clause
490 and then Chars (Ritem) = Rep_Name
494 Ritem := Next_Rep_Item (Ritem);
501 --------------------------------
502 -- Attribute Access Functions --
503 --------------------------------
505 function Abstract_Interfaces (Id : E) return L is
508 (Ekind (Id) = E_Record_Type
509 or else Ekind (Id) = E_Record_Subtype
510 or else Ekind (Id) = E_Record_Type_With_Private
511 or else Ekind (Id) = E_Record_Subtype_With_Private
512 or else Ekind (Id) = E_Class_Wide_Type);
514 end Abstract_Interfaces;
516 function Abstract_Interface_Alias (Id : E) return E is
518 pragma Assert (Is_Subprogram (Id));
520 end Abstract_Interface_Alias;
522 function Accept_Address (Id : E) return L is
527 function Access_Disp_Table (Id : E) return L is
529 pragma Assert (Is_Tagged_Type (Id));
530 return Elist16 (Implementation_Base_Type (Id));
531 end Access_Disp_Table;
533 function Actual_Subtype (Id : E) return E is
536 (Ekind (Id) = E_Constant
537 or else Ekind (Id) = E_Variable
538 or else Ekind (Id) = E_Generic_In_Out_Parameter
539 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
543 function Address_Taken (Id : E) return B is
548 function Alias (Id : E) return E is
551 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
555 function Alignment (Id : E) return U is
557 pragma Assert (Is_Type (Id)
558 or else Is_Formal (Id)
559 or else Ekind (Id) = E_Loop_Parameter
560 or else Ekind (Id) = E_Constant
561 or else Ekind (Id) = E_Exception
562 or else Ekind (Id) = E_Variable);
566 function Associated_Final_Chain (Id : E) return E is
568 pragma Assert (Is_Access_Type (Id));
570 end Associated_Final_Chain;
572 function Associated_Formal_Package (Id : E) return E is
574 pragma Assert (Ekind (Id) = E_Package);
576 end Associated_Formal_Package;
578 function Associated_Node_For_Itype (Id : E) return N is
581 end Associated_Node_For_Itype;
583 function Associated_Storage_Pool (Id : E) return E is
585 pragma Assert (Is_Access_Type (Id));
586 return Node22 (Root_Type (Id));
587 end Associated_Storage_Pool;
589 function Barrier_Function (Id : E) return N is
591 pragma Assert (Is_Entry (Id));
593 end Barrier_Function;
595 function Block_Node (Id : E) return N is
597 pragma Assert (Ekind (Id) = E_Block);
601 function Body_Entity (Id : E) return E is
604 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
608 function Body_Needed_For_SAL (Id : E) return B is
611 (Ekind (Id) = E_Package
612 or else Is_Subprogram (Id)
613 or else Is_Generic_Unit (Id));
615 end Body_Needed_For_SAL;
617 function C_Pass_By_Copy (Id : E) return B is
619 pragma Assert (Is_Record_Type (Id));
620 return Flag125 (Implementation_Base_Type (Id));
623 function Can_Never_Be_Null (Id : E) return B is
626 end Can_Never_Be_Null;
628 function Checks_May_Be_Suppressed (Id : E) return B is
631 end Checks_May_Be_Suppressed;
633 function Class_Wide_Type (Id : E) return E is
635 pragma Assert (Is_Type (Id));
639 function Cloned_Subtype (Id : E) return E is
642 (Ekind (Id) = E_Record_Subtype
643 or else Ekind (Id) = E_Class_Wide_Subtype);
647 function Component_Bit_Offset (Id : E) return U is
650 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
652 end Component_Bit_Offset;
654 function Component_Clause (Id : E) return N is
657 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
659 end Component_Clause;
661 function Component_Size (Id : E) return U is
663 pragma Assert (Is_Array_Type (Id));
664 return Uint22 (Implementation_Base_Type (Id));
667 function Component_Type (Id : E) return E is
669 return Node20 (Implementation_Base_Type (Id));
672 function Corresponding_Concurrent_Type (Id : E) return E is
674 pragma Assert (Ekind (Id) = E_Record_Type);
676 end Corresponding_Concurrent_Type;
678 function Corresponding_Discriminant (Id : E) return E is
680 pragma Assert (Ekind (Id) = E_Discriminant);
682 end Corresponding_Discriminant;
684 function Corresponding_Equality (Id : E) return E is
687 (Ekind (Id) = E_Function
688 and then not Comes_From_Source (Id)
689 and then Chars (Id) = Name_Op_Ne);
691 end Corresponding_Equality;
693 function Corresponding_Record_Type (Id : E) return E is
695 pragma Assert (Is_Concurrent_Type (Id));
697 end Corresponding_Record_Type;
699 function Corresponding_Remote_Type (Id : E) return E is
702 end Corresponding_Remote_Type;
704 function Current_Use_Clause (Id : E) return E is
706 pragma Assert (Ekind (Id) = E_Package);
708 end Current_Use_Clause;
710 function Current_Value (Id : E) return N is
712 pragma Assert (Ekind (Id) in Object_Kind);
716 function CR_Discriminant (Id : E) return E is
721 function Debug_Info_Off (Id : E) return B is
726 function Debug_Renaming_Link (Id : E) return E is
729 end Debug_Renaming_Link;
731 function Default_Expr_Function (Id : E) return E is
733 pragma Assert (Is_Formal (Id));
735 end Default_Expr_Function;
737 function Default_Expressions_Processed (Id : E) return B is
740 end Default_Expressions_Processed;
742 function Default_Value (Id : E) return N is
744 pragma Assert (Is_Formal (Id));
748 function Delay_Cleanups (Id : E) return B is
753 function Delay_Subprogram_Descriptors (Id : E) return B is
756 end Delay_Subprogram_Descriptors;
758 function Delta_Value (Id : E) return R is
760 pragma Assert (Is_Fixed_Point_Type (Id));
764 function Dependent_Instances (Id : E) return L is
766 pragma Assert (Is_Generic_Instance (Id));
768 end Dependent_Instances;
770 function Depends_On_Private (Id : E) return B is
772 pragma Assert (Nkind (Id) in N_Entity);
774 end Depends_On_Private;
776 function Digits_Value (Id : E) return U is
779 (Is_Floating_Point_Type (Id)
780 or else Is_Decimal_Fixed_Point_Type (Id));
784 function Directly_Designated_Type (Id : E) return E is
787 end Directly_Designated_Type;
789 function Discard_Names (Id : E) return B is
794 function Discriminal (Id : E) return E is
796 pragma Assert (Ekind (Id) = E_Discriminant);
800 function Discriminal_Link (Id : E) return N is
803 end Discriminal_Link;
805 function Discriminant_Checking_Func (Id : E) return E is
807 pragma Assert (Ekind (Id) = E_Component);
809 end Discriminant_Checking_Func;
811 function Discriminant_Constraint (Id : E) return L is
813 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
815 end Discriminant_Constraint;
817 function Discriminant_Default_Value (Id : E) return N is
819 pragma Assert (Ekind (Id) = E_Discriminant);
821 end Discriminant_Default_Value;
823 function Discriminant_Number (Id : E) return U is
825 pragma Assert (Ekind (Id) = E_Discriminant);
827 end Discriminant_Number;
829 function DT_Entry_Count (Id : E) return U is
831 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
835 function DT_Position (Id : E) return U is
838 ((Ekind (Id) = E_Function
839 or else Ekind (Id) = E_Procedure)
840 and then Present (DTC_Entity (Id)));
844 function DTC_Entity (Id : E) return E is
847 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
851 function Elaboration_Entity (Id : E) return E is
856 Ekind (Id) = E_Package
858 Is_Generic_Unit (Id));
860 end Elaboration_Entity;
862 function Elaboration_Entity_Required (Id : E) return B is
867 Ekind (Id) = E_Package
869 Is_Generic_Unit (Id));
871 end Elaboration_Entity_Required;
873 function Enclosing_Scope (Id : E) return E is
878 function Entry_Accepted (Id : E) return B is
880 pragma Assert (Is_Entry (Id));
884 function Entry_Bodies_Array (Id : E) return E is
887 end Entry_Bodies_Array;
889 function Entry_Cancel_Parameter (Id : E) return E is
892 end Entry_Cancel_Parameter;
894 function Entry_Component (Id : E) return E is
899 function Entry_Formal (Id : E) return E is
904 function Entry_Index_Constant (Id : E) return N is
906 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
908 end Entry_Index_Constant;
910 function Entry_Parameters_Type (Id : E) return E is
913 end Entry_Parameters_Type;
915 function Enum_Pos_To_Rep (Id : E) return E is
917 pragma Assert (Ekind (Id) = E_Enumeration_Type);
921 function Enumeration_Pos (Id : E) return Uint is
923 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
927 function Enumeration_Rep (Id : E) return U is
929 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
933 function Enumeration_Rep_Expr (Id : E) return N is
935 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
937 end Enumeration_Rep_Expr;
939 function Equivalent_Type (Id : E) return E is
942 (Ekind (Id) = E_Class_Wide_Subtype or else
943 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
944 Ekind (Id) = E_Access_Subprogram_Type or else
945 Ekind (Id) = E_Exception_Type);
949 function Esize (Id : E) return Uint is
954 function Exception_Code (Id : E) return Uint is
956 pragma Assert (Ekind (Id) = E_Exception);
960 function Extra_Accessibility (Id : E) return E is
962 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
964 end Extra_Accessibility;
966 function Extra_Constrained (Id : E) return E is
968 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
970 end Extra_Constrained;
972 function Extra_Formal (Id : E) return E is
977 function Finalization_Chain_Entity (Id : E) return E is
980 end Finalization_Chain_Entity;
982 function Finalize_Storage_Only (Id : E) return B is
984 pragma Assert (Is_Type (Id));
985 return Flag158 (Base_Type (Id));
986 end Finalize_Storage_Only;
988 function First_Entity (Id : E) return E is
993 function First_Index (Id : E) return N is
998 function First_Literal (Id : E) return E is
1003 function First_Optional_Parameter (Id : E) return E is
1006 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1008 end First_Optional_Parameter;
1010 function First_Private_Entity (Id : E) return E is
1012 pragma Assert (Ekind (Id) = E_Package
1013 or else Ekind (Id) = E_Generic_Package
1014 or else Ekind (Id) = E_Protected_Type
1015 or else Ekind (Id) = E_Protected_Subtype
1016 or else Ekind (Id) = E_Task_Type
1017 or else Ekind (Id) = E_Task_Subtype);
1019 end First_Private_Entity;
1021 function First_Rep_Item (Id : E) return E is
1026 function Freeze_Node (Id : E) return N is
1031 function From_With_Type (Id : E) return B is
1033 return Flag159 (Id);
1036 function Full_View (Id : E) return E is
1038 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1042 function Function_Returns_With_DSP (Id : E) return B is
1045 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1046 return Flag169 (Id);
1047 end Function_Returns_With_DSP;
1049 function Generic_Homonym (Id : E) return E is
1051 pragma Assert (Ekind (Id) = E_Generic_Package);
1053 end Generic_Homonym;
1055 function Generic_Renamings (Id : E) return L is
1057 return Elist23 (Id);
1058 end Generic_Renamings;
1060 function Handler_Records (Id : E) return S is
1063 end Handler_Records;
1065 function Has_Aliased_Components (Id : E) return B is
1067 return Flag135 (Implementation_Base_Type (Id));
1068 end Has_Aliased_Components;
1070 function Has_Alignment_Clause (Id : E) return B is
1073 end Has_Alignment_Clause;
1075 function Has_All_Calls_Remote (Id : E) return B is
1078 end Has_All_Calls_Remote;
1080 function Has_Anon_Block_Suffix (Id : E) return B is
1082 return Flag201 (Id);
1083 end Has_Anon_Block_Suffix;
1085 function Has_Atomic_Components (Id : E) return B is
1087 return Flag86 (Implementation_Base_Type (Id));
1088 end Has_Atomic_Components;
1090 function Has_Biased_Representation (Id : E) return B is
1092 return Flag139 (Id);
1093 end Has_Biased_Representation;
1095 function Has_Completion (Id : E) return B is
1100 function Has_Completion_In_Body (Id : E) return B is
1102 pragma Assert (Is_Type (Id));
1104 end Has_Completion_In_Body;
1106 function Has_Complex_Representation (Id : E) return B is
1108 pragma Assert (Is_Type (Id));
1109 return Flag140 (Implementation_Base_Type (Id));
1110 end Has_Complex_Representation;
1112 function Has_Component_Size_Clause (Id : E) return B is
1114 pragma Assert (Is_Array_Type (Id));
1115 return Flag68 (Implementation_Base_Type (Id));
1116 end Has_Component_Size_Clause;
1118 function Has_Constrained_Partial_View (Id : E) return B is
1120 pragma Assert (Is_Type (Id));
1121 return Flag187 (Id);
1122 end Has_Constrained_Partial_View;
1124 function Has_Controlled_Component (Id : E) return B is
1126 return Flag43 (Base_Type (Id));
1127 end Has_Controlled_Component;
1129 function Has_Contiguous_Rep (Id : E) return B is
1131 return Flag181 (Id);
1132 end Has_Contiguous_Rep;
1134 function Has_Controlling_Result (Id : E) return B is
1137 end Has_Controlling_Result;
1139 function Has_Convention_Pragma (Id : E) return B is
1141 return Flag119 (Id);
1142 end Has_Convention_Pragma;
1144 function Has_Delayed_Freeze (Id : E) return B is
1146 pragma Assert (Nkind (Id) in N_Entity);
1148 end Has_Delayed_Freeze;
1150 function Has_Discriminants (Id : E) return B is
1152 pragma Assert (Nkind (Id) in N_Entity);
1154 end Has_Discriminants;
1156 function Has_Enumeration_Rep_Clause (Id : E) return B is
1158 pragma Assert (Is_Enumeration_Type (Id));
1160 end Has_Enumeration_Rep_Clause;
1162 function Has_Exit (Id : E) return B is
1167 function Has_External_Tag_Rep_Clause (Id : E) return B is
1169 pragma Assert (Is_Tagged_Type (Id));
1170 return Flag110 (Id);
1171 end Has_External_Tag_Rep_Clause;
1173 function Has_Forward_Instantiation (Id : E) return B is
1175 return Flag175 (Id);
1176 end Has_Forward_Instantiation;
1178 function Has_Fully_Qualified_Name (Id : E) return B is
1180 return Flag173 (Id);
1181 end Has_Fully_Qualified_Name;
1183 function Has_Gigi_Rep_Item (Id : E) return B is
1186 end Has_Gigi_Rep_Item;
1188 function Has_Homonym (Id : E) return B is
1193 function Has_Machine_Radix_Clause (Id : E) return B is
1195 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1197 end Has_Machine_Radix_Clause;
1199 function Has_Master_Entity (Id : E) return B is
1202 end Has_Master_Entity;
1204 function Has_Missing_Return (Id : E) return B is
1207 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1208 return Flag142 (Id);
1209 end Has_Missing_Return;
1211 function Has_Nested_Block_With_Handler (Id : E) return B is
1213 return Flag101 (Id);
1214 end Has_Nested_Block_With_Handler;
1216 function Has_Non_Standard_Rep (Id : E) return B is
1218 return Flag75 (Implementation_Base_Type (Id));
1219 end Has_Non_Standard_Rep;
1221 function Has_Object_Size_Clause (Id : E) return B is
1223 pragma Assert (Is_Type (Id));
1224 return Flag172 (Id);
1225 end Has_Object_Size_Clause;
1227 function Has_Per_Object_Constraint (Id : E) return B is
1229 return Flag154 (Id);
1230 end Has_Per_Object_Constraint;
1232 function Has_Persistent_BSS (Id : E) return B is
1234 return Flag188 (Id);
1235 end Has_Persistent_BSS;
1237 function Has_Pragma_Controlled (Id : E) return B is
1239 pragma Assert (Is_Access_Type (Id));
1240 return Flag27 (Implementation_Base_Type (Id));
1241 end Has_Pragma_Controlled;
1243 function Has_Pragma_Elaborate_Body (Id : E) return B is
1245 return Flag150 (Id);
1246 end Has_Pragma_Elaborate_Body;
1248 function Has_Pragma_Inline (Id : E) return B is
1250 return Flag157 (Id);
1251 end Has_Pragma_Inline;
1253 function Has_Pragma_Pack (Id : E) return B is
1255 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1256 return Flag121 (Implementation_Base_Type (Id));
1257 end Has_Pragma_Pack;
1259 function Has_Pragma_Pure_Function (Id : E) return B is
1261 pragma Assert (Is_Subprogram (Id));
1262 return Flag179 (Id);
1263 end Has_Pragma_Pure_Function;
1265 function Has_Pragma_Unreferenced (Id : E) return B is
1267 return Flag180 (Id);
1268 end Has_Pragma_Unreferenced;
1270 function Has_Primitive_Operations (Id : E) return B is
1272 pragma Assert (Is_Type (Id));
1273 return Flag120 (Base_Type (Id));
1274 end Has_Primitive_Operations;
1276 function Has_Private_Declaration (Id : E) return B is
1278 return Flag155 (Id);
1279 end Has_Private_Declaration;
1281 function Has_Qualified_Name (Id : E) return B is
1283 return Flag161 (Id);
1284 end Has_Qualified_Name;
1286 function Has_Record_Rep_Clause (Id : E) return B is
1288 pragma Assert (Is_Record_Type (Id));
1289 return Flag65 (Implementation_Base_Type (Id));
1290 end Has_Record_Rep_Clause;
1292 function Has_Recursive_Call (Id : E) return B is
1294 pragma Assert (Is_Subprogram (Id));
1295 return Flag143 (Id);
1296 end Has_Recursive_Call;
1298 function Has_Size_Clause (Id : E) return B is
1301 end Has_Size_Clause;
1303 function Has_Small_Clause (Id : E) return B is
1306 end Has_Small_Clause;
1308 function Has_Specified_Layout (Id : E) return B is
1310 pragma Assert (Is_Type (Id));
1311 return Flag100 (Implementation_Base_Type (Id));
1312 end Has_Specified_Layout;
1314 function Has_Specified_Stream_Input (Id : E) return B is
1316 pragma Assert (Is_Type (Id));
1317 return Flag190 (Id);
1318 end Has_Specified_Stream_Input;
1320 function Has_Specified_Stream_Output (Id : E) return B is
1322 pragma Assert (Is_Type (Id));
1323 return Flag191 (Id);
1324 end Has_Specified_Stream_Output;
1326 function Has_Specified_Stream_Read (Id : E) return B is
1328 pragma Assert (Is_Type (Id));
1329 return Flag192 (Id);
1330 end Has_Specified_Stream_Read;
1332 function Has_Specified_Stream_Write (Id : E) return B is
1334 pragma Assert (Is_Type (Id));
1335 return Flag193 (Id);
1336 end Has_Specified_Stream_Write;
1338 function Has_Storage_Size_Clause (Id : E) return B is
1340 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1341 return Flag23 (Implementation_Base_Type (Id));
1342 end Has_Storage_Size_Clause;
1344 function Has_Stream_Size_Clause (Id : E) return B is
1346 pragma Assert (Is_Elementary_Type (Id));
1347 return Flag184 (Id);
1348 end Has_Stream_Size_Clause;
1350 function Has_Subprogram_Descriptor (Id : E) return B is
1353 end Has_Subprogram_Descriptor;
1355 function Has_Task (Id : E) return B is
1357 return Flag30 (Base_Type (Id));
1360 function Has_Unchecked_Union (Id : E) return B is
1362 return Flag123 (Base_Type (Id));
1363 end Has_Unchecked_Union;
1365 function Has_Unknown_Discriminants (Id : E) return B is
1367 pragma Assert (Is_Type (Id));
1369 end Has_Unknown_Discriminants;
1371 function Has_Volatile_Components (Id : E) return B is
1373 return Flag87 (Implementation_Base_Type (Id));
1374 end Has_Volatile_Components;
1376 function Has_Xref_Entry (Id : E) return B is
1378 return Flag182 (Implementation_Base_Type (Id));
1381 function Hiding_Loop_Variable (Id : E) return E is
1383 pragma Assert (Ekind (Id) = E_Variable);
1385 end Hiding_Loop_Variable;
1387 function Homonym (Id : E) return E is
1392 function In_Package_Body (Id : E) return B is
1395 end In_Package_Body;
1397 function In_Private_Part (Id : E) return B is
1400 end In_Private_Part;
1402 function In_Use (Id : E) return B is
1404 pragma Assert (Nkind (Id) in N_Entity);
1408 function Inner_Instances (Id : E) return L is
1410 return Elist23 (Id);
1411 end Inner_Instances;
1413 function Interface_Name (Id : E) return N is
1418 function Is_Abstract (Id : E) return B is
1423 function Is_Local_Anonymous_Access (Id : E) return B is
1425 pragma Assert (Is_Access_Type (Id));
1426 return Flag194 (Id);
1427 end Is_Local_Anonymous_Access;
1429 function Is_Access_Constant (Id : E) return B is
1431 pragma Assert (Is_Access_Type (Id));
1433 end Is_Access_Constant;
1435 function Is_Ada_2005 (Id : E) return B is
1437 return Flag185 (Id);
1440 function Is_Aliased (Id : E) return B is
1442 pragma Assert (Nkind (Id) in N_Entity);
1446 function Is_AST_Entry (Id : E) return B is
1448 pragma Assert (Is_Entry (Id));
1449 return Flag132 (Id);
1452 function Is_Asynchronous (Id : E) return B is
1455 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1457 end Is_Asynchronous;
1459 function Is_Atomic (Id : E) return B is
1464 function Is_Bit_Packed_Array (Id : E) return B is
1466 return Flag122 (Implementation_Base_Type (Id));
1467 end Is_Bit_Packed_Array;
1469 function Is_Called (Id : E) return B is
1472 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1473 return Flag102 (Id);
1476 function Is_Character_Type (Id : E) return B is
1479 end Is_Character_Type;
1481 function Is_Child_Unit (Id : E) return B is
1486 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1489 end Is_Class_Wide_Equivalent_Type;
1491 function Is_Compilation_Unit (Id : E) return B is
1493 return Flag149 (Id);
1494 end Is_Compilation_Unit;
1496 function Is_Completely_Hidden (Id : E) return B is
1498 pragma Assert (Ekind (Id) = E_Discriminant);
1499 return Flag103 (Id);
1500 end Is_Completely_Hidden;
1502 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1505 end Is_Constr_Subt_For_U_Nominal;
1507 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1509 return Flag141 (Id);
1510 end Is_Constr_Subt_For_UN_Aliased;
1512 function Is_Constrained (Id : E) return B is
1514 pragma Assert (Nkind (Id) in N_Entity);
1518 function Is_Constructor (Id : E) return B is
1523 function Is_Controlled (Id : E) return B is
1525 return Flag42 (Base_Type (Id));
1528 function Is_Controlling_Formal (Id : E) return B is
1530 pragma Assert (Is_Formal (Id));
1532 end Is_Controlling_Formal;
1534 function Is_CPP_Class (Id : E) return B is
1539 function Is_Discrim_SO_Function (Id : E) return B is
1541 return Flag176 (Id);
1542 end Is_Discrim_SO_Function;
1544 function Is_Dispatching_Operation (Id : E) return B is
1546 pragma Assert (Nkind (Id) in N_Entity);
1548 end Is_Dispatching_Operation;
1550 function Is_Eliminated (Id : E) return B is
1552 return Flag124 (Id);
1555 function Is_Entry_Formal (Id : E) return B is
1558 end Is_Entry_Formal;
1560 function Is_Exported (Id : E) return B is
1565 function Is_First_Subtype (Id : E) return B is
1568 end Is_First_Subtype;
1570 function Is_For_Access_Subtype (Id : E) return B is
1573 (Ekind (Id) = E_Record_Subtype
1575 Ekind (Id) = E_Private_Subtype);
1576 return Flag118 (Id);
1577 end Is_For_Access_Subtype;
1579 function Is_Formal_Subprogram (Id : E) return B is
1581 return Flag111 (Id);
1582 end Is_Formal_Subprogram;
1584 function Is_Frozen (Id : E) return B is
1589 function Is_Generic_Actual_Type (Id : E) return B is
1591 pragma Assert (Is_Type (Id));
1593 end Is_Generic_Actual_Type;
1595 function Is_Generic_Instance (Id : E) return B is
1597 return Flag130 (Id);
1598 end Is_Generic_Instance;
1600 function Is_Generic_Type (Id : E) return B is
1602 pragma Assert (Nkind (Id) in N_Entity);
1604 end Is_Generic_Type;
1606 function Is_Hidden (Id : E) return B is
1611 function Is_Hidden_Open_Scope (Id : E) return B is
1613 return Flag171 (Id);
1614 end Is_Hidden_Open_Scope;
1616 function Is_Immediately_Visible (Id : E) return B is
1618 pragma Assert (Nkind (Id) in N_Entity);
1620 end Is_Immediately_Visible;
1622 function Is_Imported (Id : E) return B is
1627 function Is_Inlined (Id : E) return B is
1632 function Is_Interface (Id : E) return B is
1634 return Flag186 (Id);
1637 function Is_Instantiated (Id : E) return B is
1639 return Flag126 (Id);
1640 end Is_Instantiated;
1642 function Is_Internal (Id : E) return B is
1644 pragma Assert (Nkind (Id) in N_Entity);
1648 function Is_Interrupt_Handler (Id : E) return B is
1650 pragma Assert (Nkind (Id) in N_Entity);
1652 end Is_Interrupt_Handler;
1654 function Is_Intrinsic_Subprogram (Id : E) return B is
1657 end Is_Intrinsic_Subprogram;
1659 function Is_Itype (Id : E) return B is
1664 function Is_Known_Non_Null (Id : E) return B is
1667 end Is_Known_Non_Null;
1669 function Is_Known_Valid (Id : E) return B is
1671 return Flag170 (Id);
1674 function Is_Limited_Composite (Id : E) return B is
1676 return Flag106 (Id);
1677 end Is_Limited_Composite;
1679 function Is_Limited_Interface (Id : E) return B is
1681 pragma Assert (Is_Interface (Id));
1682 return Flag197 (Id);
1683 end Is_Limited_Interface;
1685 function Is_Limited_Record (Id : E) return B is
1688 end Is_Limited_Record;
1690 function Is_Machine_Code_Subprogram (Id : E) return B is
1692 pragma Assert (Is_Subprogram (Id));
1693 return Flag137 (Id);
1694 end Is_Machine_Code_Subprogram;
1696 function Is_Non_Static_Subtype (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1699 return Flag109 (Id);
1700 end Is_Non_Static_Subtype;
1702 function Is_Null_Init_Proc (Id : E) return B is
1704 pragma Assert (Ekind (Id) = E_Procedure);
1705 return Flag178 (Id);
1706 end Is_Null_Init_Proc;
1708 function Is_Obsolescent (Id : E) return B is
1710 return Flag153 (Id);
1713 function Is_Optional_Parameter (Id : E) return B is
1715 pragma Assert (Is_Formal (Id));
1716 return Flag134 (Id);
1717 end Is_Optional_Parameter;
1719 function Is_Overriding_Operation (Id : E) return B is
1721 pragma Assert (Is_Subprogram (Id));
1723 end Is_Overriding_Operation;
1725 function Is_Package_Body_Entity (Id : E) return B is
1727 return Flag160 (Id);
1728 end Is_Package_Body_Entity;
1730 function Is_Packed (Id : E) return B is
1732 return Flag51 (Implementation_Base_Type (Id));
1735 function Is_Packed_Array_Type (Id : E) return B is
1737 return Flag138 (Id);
1738 end Is_Packed_Array_Type;
1740 function Is_Potentially_Use_Visible (Id : E) return B is
1742 pragma Assert (Nkind (Id) in N_Entity);
1744 end Is_Potentially_Use_Visible;
1746 function Is_Preelaborated (Id : E) return B is
1749 end Is_Preelaborated;
1751 function Is_Primitive_Wrapper (Id : E) return B is
1753 pragma Assert (Ekind (Id) = E_Procedure);
1754 return Flag195 (Id);
1755 end Is_Primitive_Wrapper;
1757 function Is_Private_Composite (Id : E) return B is
1759 pragma Assert (Is_Type (Id));
1760 return Flag107 (Id);
1761 end Is_Private_Composite;
1763 function Is_Private_Descendant (Id : E) return B is
1766 end Is_Private_Descendant;
1768 function Is_Protected_Interface (Id : E) return B is
1770 pragma Assert (Is_Interface (Id));
1771 return Flag198 (Id);
1772 end Is_Protected_Interface;
1774 function Is_Public (Id : E) return B is
1776 pragma Assert (Nkind (Id) in N_Entity);
1780 function Is_Pure (Id : E) return B is
1785 function Is_Pure_Unit_Access_Type (Id : E) return B is
1787 pragma Assert (Is_Access_Type (Id));
1788 return Flag189 (Id);
1789 end Is_Pure_Unit_Access_Type;
1791 function Is_Remote_Call_Interface (Id : E) return B is
1794 end Is_Remote_Call_Interface;
1796 function Is_Remote_Types (Id : E) return B is
1799 end Is_Remote_Types;
1801 function Is_Renaming_Of_Object (Id : E) return B is
1803 return Flag112 (Id);
1804 end Is_Renaming_Of_Object;
1806 function Is_Shared_Passive (Id : E) return B is
1809 end Is_Shared_Passive;
1811 function Is_Statically_Allocated (Id : E) return B is
1814 end Is_Statically_Allocated;
1816 function Is_Synchronized_Interface (Id : E) return B is
1818 pragma Assert (Is_Interface (Id));
1819 return Flag199 (Id);
1820 end Is_Synchronized_Interface;
1822 function Is_Tag (Id : E) return B is
1824 pragma Assert (Nkind (Id) in N_Entity);
1828 function Is_Tagged_Type (Id : E) return B is
1833 function Is_Task_Interface (Id : E) return B is
1835 pragma Assert (Is_Interface (Id));
1836 return Flag200 (Id);
1837 end Is_Task_Interface;
1839 function Is_Thread_Body (Id : E) return B is
1844 function Is_True_Constant (Id : E) return B is
1846 return Flag163 (Id);
1847 end Is_True_Constant;
1849 function Is_Unchecked_Union (Id : E) return B is
1851 return Flag117 (Id);
1852 end Is_Unchecked_Union;
1854 function Is_Unsigned_Type (Id : E) return B is
1856 pragma Assert (Is_Type (Id));
1857 return Flag144 (Id);
1858 end Is_Unsigned_Type;
1860 function Is_Valued_Procedure (Id : E) return B is
1862 pragma Assert (Ekind (Id) = E_Procedure);
1863 return Flag127 (Id);
1864 end Is_Valued_Procedure;
1866 function Is_Visible_Child_Unit (Id : E) return B is
1868 pragma Assert (Is_Child_Unit (Id));
1869 return Flag116 (Id);
1870 end Is_Visible_Child_Unit;
1872 function Is_VMS_Exception (Id : E) return B is
1874 return Flag133 (Id);
1875 end Is_VMS_Exception;
1877 function Is_Volatile (Id : E) return B is
1879 pragma Assert (Nkind (Id) in N_Entity);
1881 if Is_Type (Id) then
1882 return Flag16 (Base_Type (Id));
1888 function Itype_Printed (Id : E) return B is
1890 pragma Assert (Is_Itype (Id));
1891 return Flag202 (Id);
1894 function Kill_Elaboration_Checks (Id : E) return B is
1897 end Kill_Elaboration_Checks;
1899 function Kill_Range_Checks (Id : E) return B is
1902 end Kill_Range_Checks;
1904 function Kill_Tag_Checks (Id : E) return B is
1907 end Kill_Tag_Checks;
1909 function Last_Entity (Id : E) return E is
1914 function Limited_View (Id : E) return E is
1916 pragma Assert (Ekind (Id) = E_Package);
1920 function Lit_Indexes (Id : E) return E is
1922 pragma Assert (Is_Enumeration_Type (Id));
1926 function Lit_Strings (Id : E) return E is
1928 pragma Assert (Is_Enumeration_Type (Id));
1932 function Machine_Radix_10 (Id : E) return B is
1934 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1936 end Machine_Radix_10;
1938 function Master_Id (Id : E) return E is
1943 function Materialize_Entity (Id : E) return B is
1945 return Flag168 (Id);
1946 end Materialize_Entity;
1948 function Mechanism (Id : E) return M is
1950 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
1951 return UI_To_Int (Uint8 (Id));
1954 function Modulus (Id : E) return Uint is
1956 pragma Assert (Is_Modular_Integer_Type (Id));
1957 return Uint17 (Base_Type (Id));
1960 function Must_Be_On_Byte_Boundary (Id : E) return B is
1962 pragma Assert (Is_Type (Id));
1963 return Flag183 (Id);
1964 end Must_Be_On_Byte_Boundary;
1966 function Needs_Debug_Info (Id : E) return B is
1968 return Flag147 (Id);
1969 end Needs_Debug_Info;
1971 function Needs_No_Actuals (Id : E) return B is
1974 (Is_Overloadable (Id)
1975 or else Ekind (Id) = E_Subprogram_Type
1976 or else Ekind (Id) = E_Entry_Family);
1978 end Needs_No_Actuals;
1980 function Never_Set_In_Source (Id : E) return B is
1982 return Flag115 (Id);
1983 end Never_Set_In_Source;
1985 function Next_Inlined_Subprogram (Id : E) return E is
1988 end Next_Inlined_Subprogram;
1990 function No_Pool_Assigned (Id : E) return B is
1992 pragma Assert (Is_Access_Type (Id));
1993 return Flag131 (Root_Type (Id));
1994 end No_Pool_Assigned;
1996 function No_Return (Id : E) return B is
2000 or else Ekind (Id) = E_Procedure
2001 or else Ekind (Id) = E_Generic_Procedure);
2002 return Flag113 (Id);
2005 function No_Strict_Aliasing (Id : E) return B is
2007 pragma Assert (Is_Access_Type (Id));
2008 return Flag136 (Base_Type (Id));
2009 end No_Strict_Aliasing;
2011 function Non_Binary_Modulus (Id : E) return B is
2013 pragma Assert (Is_Modular_Integer_Type (Id));
2014 return Flag58 (Base_Type (Id));
2015 end Non_Binary_Modulus;
2017 function Non_Limited_View (Id : E) return E is
2019 pragma Assert (False
2020 or else Ekind (Id) = E_Incomplete_Type);
2022 end Non_Limited_View;
2024 function Nonzero_Is_True (Id : E) return B is
2026 pragma Assert (Root_Type (Id) = Standard_Boolean);
2027 return Flag162 (Base_Type (Id));
2028 end Nonzero_Is_True;
2030 function Normalized_First_Bit (Id : E) return U is
2033 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2035 end Normalized_First_Bit;
2037 function Normalized_Position (Id : E) return U is
2040 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2042 end Normalized_Position;
2044 function Normalized_Position_Max (Id : E) return U is
2047 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2049 end Normalized_Position_Max;
2051 function Object_Ref (Id : E) return E is
2053 pragma Assert (Ekind (Id) = E_Protected_Body);
2057 function Obsolescent_Warning (Id : E) return N is
2060 (Is_Subprogram (Id) or else Is_Package_Or_Generic_Package (Id));
2062 end Obsolescent_Warning;
2064 function Original_Access_Type (Id : E) return E is
2067 (Ekind (Id) = E_Access_Subprogram_Type
2068 or else Ekind (Id) = E_Access_Protected_Subprogram_Type);
2070 end Original_Access_Type;
2072 function Original_Array_Type (Id : E) return E is
2074 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2076 end Original_Array_Type;
2078 function Original_Record_Component (Id : E) return E is
2081 (Ekind (Id) = E_Void
2082 or else Ekind (Id) = E_Component
2083 or else Ekind (Id) = E_Discriminant);
2085 end Original_Record_Component;
2087 function Overridden_Operation (Id : E) return E is
2090 end Overridden_Operation;
2092 function Package_Instantiation (Id : E) return N is
2096 or else Ekind (Id) = E_Generic_Package
2097 or else Ekind (Id) = E_Package);
2099 end Package_Instantiation;
2101 function Packed_Array_Type (Id : E) return E is
2103 pragma Assert (Is_Array_Type (Id));
2105 end Packed_Array_Type;
2107 function Parent_Subtype (Id : E) return E is
2109 pragma Assert (Ekind (Id) = E_Record_Type);
2113 function Primitive_Operations (Id : E) return L is
2115 pragma Assert (Is_Tagged_Type (Id));
2116 return Elist15 (Id);
2117 end Primitive_Operations;
2119 function Prival (Id : E) return E is
2121 pragma Assert (Is_Protected_Private (Id));
2125 function Privals_Chain (Id : E) return L is
2127 pragma Assert (Is_Overloadable (Id)
2128 or else Ekind (Id) = E_Entry_Family);
2129 return Elist23 (Id);
2132 function Private_Dependents (Id : E) return L is
2134 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2135 return Elist18 (Id);
2136 end Private_Dependents;
2138 function Private_View (Id : E) return N is
2140 pragma Assert (Is_Private_Type (Id));
2144 function Protected_Body_Subprogram (Id : E) return E is
2146 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2148 end Protected_Body_Subprogram;
2150 function Protected_Formal (Id : E) return E is
2152 pragma Assert (Is_Formal (Id));
2154 end Protected_Formal;
2156 function Protected_Operation (Id : E) return N is
2158 pragma Assert (Is_Protected_Private (Id));
2160 end Protected_Operation;
2162 function Reachable (Id : E) return B is
2167 function Referenced (Id : E) return B is
2169 return Flag156 (Id);
2172 function Referenced_As_LHS (Id : E) return B is
2175 end Referenced_As_LHS;
2177 function Referenced_Object (Id : E) return N is
2179 pragma Assert (Is_Type (Id));
2181 end Referenced_Object;
2183 function Register_Exception_Call (Id : E) return N is
2185 pragma Assert (Ekind (Id) = E_Exception);
2187 end Register_Exception_Call;
2189 function Related_Array_Object (Id : E) return E is
2191 pragma Assert (Is_Array_Type (Id));
2193 end Related_Array_Object;
2195 function Related_Instance (Id : E) return E is
2198 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2200 end Related_Instance;
2202 function Renamed_Entity (Id : E) return N is
2207 function Renamed_Object (Id : E) return N is
2212 function Renaming_Map (Id : E) return U is
2217 function Return_Present (Id : E) return B is
2222 function Returns_By_Ref (Id : E) return B is
2227 function Reverse_Bit_Order (Id : E) return B is
2229 pragma Assert (Is_Record_Type (Id));
2230 return Flag164 (Base_Type (Id));
2231 end Reverse_Bit_Order;
2233 function RM_Size (Id : E) return U is
2235 pragma Assert (Is_Type (Id));
2239 function Scalar_Range (Id : E) return N is
2244 function Scale_Value (Id : E) return U is
2249 function Scope_Depth_Value (Id : E) return U is
2252 end Scope_Depth_Value;
2254 function Sec_Stack_Needed_For_Return (Id : E) return B is
2256 return Flag167 (Id);
2257 end Sec_Stack_Needed_For_Return;
2259 function Shadow_Entities (Id : E) return S is
2262 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2264 end Shadow_Entities;
2266 function Shared_Var_Assign_Proc (Id : E) return E is
2268 pragma Assert (Ekind (Id) = E_Variable);
2270 end Shared_Var_Assign_Proc;
2272 function Shared_Var_Read_Proc (Id : E) return E is
2274 pragma Assert (Ekind (Id) = E_Variable);
2276 end Shared_Var_Read_Proc;
2278 function Size_Check_Code (Id : E) return N is
2280 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2282 end Size_Check_Code;
2284 function Size_Depends_On_Discriminant (Id : E) return B is
2286 return Flag177 (Id);
2287 end Size_Depends_On_Discriminant;
2289 function Size_Known_At_Compile_Time (Id : E) return B is
2292 end Size_Known_At_Compile_Time;
2294 function Small_Value (Id : E) return R is
2296 pragma Assert (Is_Fixed_Point_Type (Id));
2297 return Ureal21 (Id);
2300 function Spec_Entity (Id : E) return E is
2303 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2307 function Storage_Size_Variable (Id : E) return E is
2309 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2310 return Node15 (Implementation_Base_Type (Id));
2311 end Storage_Size_Variable;
2313 function Stored_Constraint (Id : E) return L is
2316 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2317 return Elist23 (Id);
2318 end Stored_Constraint;
2320 function Strict_Alignment (Id : E) return B is
2322 return Flag145 (Implementation_Base_Type (Id));
2323 end Strict_Alignment;
2325 function String_Literal_Length (Id : E) return U is
2328 end String_Literal_Length;
2330 function String_Literal_Low_Bound (Id : E) return N is
2333 end String_Literal_Low_Bound;
2335 function Suppress_Elaboration_Warnings (Id : E) return B is
2337 return Flag148 (Id);
2338 end Suppress_Elaboration_Warnings;
2340 function Suppress_Init_Proc (Id : E) return B is
2342 return Flag105 (Base_Type (Id));
2343 end Suppress_Init_Proc;
2345 function Suppress_Style_Checks (Id : E) return B is
2347 return Flag165 (Id);
2348 end Suppress_Style_Checks;
2350 function Task_Body_Procedure (Id : E) return N is
2352 pragma Assert (Ekind (Id) = E_Task_Type
2353 or else Ekind (Id) = E_Task_Subtype);
2355 end Task_Body_Procedure;
2357 function Treat_As_Volatile (Id : E) return B is
2360 end Treat_As_Volatile;
2362 function Underlying_Full_View (Id : E) return E is
2364 pragma Assert (Ekind (Id) in Private_Kind);
2366 end Underlying_Full_View;
2368 function Unset_Reference (Id : E) return N is
2371 end Unset_Reference;
2373 function Uses_Sec_Stack (Id : E) return B is
2378 function Vax_Float (Id : E) return B is
2380 return Flag151 (Base_Type (Id));
2383 function Warnings_Off (Id : E) return B is
2388 function Wrapped_Entity (Id : E) return E is
2390 pragma Assert (Ekind (Id) = E_Procedure
2391 and then Is_Primitive_Wrapper (Id));
2395 function Was_Hidden (Id : E) return B is
2397 return Flag196 (Id);
2400 ------------------------------
2401 -- Classification Functions --
2402 ------------------------------
2404 function Is_Access_Type (Id : E) return B is
2406 return Ekind (Id) in Access_Kind;
2409 function Is_Array_Type (Id : E) return B is
2411 return Ekind (Id) in Array_Kind;
2414 function Is_Class_Wide_Type (Id : E) return B is
2416 return Ekind (Id) in Class_Wide_Kind;
2417 end Is_Class_Wide_Type;
2419 function Is_Composite_Type (Id : E) return B is
2421 return Ekind (Id) in Composite_Kind;
2422 end Is_Composite_Type;
2424 function Is_Concurrent_Body (Id : E) return B is
2426 return Ekind (Id) in
2427 Concurrent_Body_Kind;
2428 end Is_Concurrent_Body;
2430 function Is_Concurrent_Record_Type (Id : E) return B is
2433 end Is_Concurrent_Record_Type;
2435 function Is_Concurrent_Type (Id : E) return B is
2437 return Ekind (Id) in Concurrent_Kind;
2438 end Is_Concurrent_Type;
2440 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2442 return Ekind (Id) in
2443 Decimal_Fixed_Point_Kind;
2444 end Is_Decimal_Fixed_Point_Type;
2446 function Is_Digits_Type (Id : E) return B is
2448 return Ekind (Id) in Digits_Kind;
2451 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2453 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2454 end Is_Discrete_Or_Fixed_Point_Type;
2456 function Is_Discrete_Type (Id : E) return B is
2458 return Ekind (Id) in Discrete_Kind;
2459 end Is_Discrete_Type;
2461 function Is_Elementary_Type (Id : E) return B is
2463 return Ekind (Id) in Elementary_Kind;
2464 end Is_Elementary_Type;
2466 function Is_Entry (Id : E) return B is
2468 return Ekind (Id) in Entry_Kind;
2471 function Is_Enumeration_Type (Id : E) return B is
2473 return Ekind (Id) in
2475 end Is_Enumeration_Type;
2477 function Is_Fixed_Point_Type (Id : E) return B is
2479 return Ekind (Id) in
2481 end Is_Fixed_Point_Type;
2483 function Is_Floating_Point_Type (Id : E) return B is
2485 return Ekind (Id) in Float_Kind;
2486 end Is_Floating_Point_Type;
2488 function Is_Formal (Id : E) return B is
2490 return Ekind (Id) in Formal_Kind;
2493 function Is_Generic_Subprogram (Id : E) return B is
2495 return Ekind (Id) in Generic_Subprogram_Kind;
2496 end Is_Generic_Subprogram;
2498 function Is_Generic_Unit (Id : E) return B is
2500 return Ekind (Id) in Generic_Unit_Kind;
2501 end Is_Generic_Unit;
2503 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2505 return Ekind (Id) in
2506 Incomplete_Or_Private_Kind;
2507 end Is_Incomplete_Or_Private_Type;
2509 function Is_Integer_Type (Id : E) return B is
2511 return Ekind (Id) in Integer_Kind;
2512 end Is_Integer_Type;
2514 function Is_Modular_Integer_Type (Id : E) return B is
2516 return Ekind (Id) in
2517 Modular_Integer_Kind;
2518 end Is_Modular_Integer_Type;
2520 function Is_Named_Number (Id : E) return B is
2522 return Ekind (Id) in Named_Kind;
2523 end Is_Named_Number;
2525 function Is_Numeric_Type (Id : E) return B is
2527 return Ekind (Id) in Numeric_Kind;
2528 end Is_Numeric_Type;
2530 function Is_Object (Id : E) return B is
2532 return Ekind (Id) in Object_Kind;
2535 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2537 return Ekind (Id) in
2538 Ordinary_Fixed_Point_Kind;
2539 end Is_Ordinary_Fixed_Point_Type;
2541 function Is_Overloadable (Id : E) return B is
2543 return Ekind (Id) in Overloadable_Kind;
2544 end Is_Overloadable;
2546 function Is_Private_Type (Id : E) return B is
2548 return Ekind (Id) in Private_Kind;
2549 end Is_Private_Type;
2551 function Is_Protected_Type (Id : E) return B is
2553 return Ekind (Id) in Protected_Kind;
2554 end Is_Protected_Type;
2556 function Is_Real_Type (Id : E) return B is
2558 return Ekind (Id) in Real_Kind;
2561 function Is_Record_Type (Id : E) return B is
2563 return Ekind (Id) in Record_Kind;
2566 function Is_Scalar_Type (Id : E) return B is
2568 return Ekind (Id) in Scalar_Kind;
2571 function Is_Signed_Integer_Type (Id : E) return B is
2573 return Ekind (Id) in
2574 Signed_Integer_Kind;
2575 end Is_Signed_Integer_Type;
2577 function Is_Subprogram (Id : E) return B is
2579 return Ekind (Id) in Subprogram_Kind;
2582 function Is_Task_Type (Id : E) return B is
2584 return Ekind (Id) in Task_Kind;
2587 function Is_Type (Id : E) return B is
2589 return Ekind (Id) in Type_Kind;
2592 ------------------------------
2593 -- Attribute Set Procedures --
2594 ------------------------------
2596 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2599 (Ekind (Id) = E_Record_Type
2600 or else Ekind (Id) = E_Record_Subtype
2601 or else Ekind (Id) = E_Record_Type_With_Private
2602 or else Ekind (Id) = E_Record_Subtype_With_Private
2603 or else Ekind (Id) = E_Class_Wide_Type);
2604 Set_Elist24 (Id, V);
2605 end Set_Abstract_Interfaces;
2607 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2610 (Ekind (Id) = E_Procedure or Ekind (Id) = E_Function);
2612 end Set_Abstract_Interface_Alias;
2614 procedure Set_Accept_Address (Id : E; V : L) is
2616 Set_Elist21 (Id, V);
2617 end Set_Accept_Address;
2619 procedure Set_Access_Disp_Table (Id : E; V : L) is
2621 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2622 Set_Elist16 (Id, V);
2623 end Set_Access_Disp_Table;
2625 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2627 pragma Assert (Is_Access_Type (Id));
2629 end Set_Associated_Final_Chain;
2631 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2634 end Set_Associated_Formal_Package;
2636 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2639 end Set_Associated_Node_For_Itype;
2641 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2643 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2645 end Set_Associated_Storage_Pool;
2647 procedure Set_Actual_Subtype (Id : E; V : E) is
2650 (Ekind (Id) = E_Constant
2651 or else Ekind (Id) = E_Variable
2652 or else Ekind (Id) = E_Generic_In_Out_Parameter
2653 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
2655 end Set_Actual_Subtype;
2657 procedure Set_Address_Taken (Id : E; V : B := True) is
2659 Set_Flag104 (Id, V);
2660 end Set_Address_Taken;
2662 procedure Set_Alias (Id : E; V : E) is
2665 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2669 procedure Set_Alignment (Id : E; V : U) is
2671 pragma Assert (Is_Type (Id)
2672 or else Is_Formal (Id)
2673 or else Ekind (Id) = E_Loop_Parameter
2674 or else Ekind (Id) = E_Constant
2675 or else Ekind (Id) = E_Exception
2676 or else Ekind (Id) = E_Variable);
2680 procedure Set_Barrier_Function (Id : E; V : N) is
2682 pragma Assert (Is_Entry (Id));
2684 end Set_Barrier_Function;
2686 procedure Set_Block_Node (Id : E; V : N) is
2688 pragma Assert (Ekind (Id) = E_Block);
2692 procedure Set_Body_Entity (Id : E; V : E) is
2695 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2697 end Set_Body_Entity;
2699 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
2702 (Ekind (Id) = E_Package
2703 or else Is_Subprogram (Id)
2704 or else Is_Generic_Unit (Id));
2706 end Set_Body_Needed_For_SAL;
2708 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2710 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2711 Set_Flag125 (Id, V);
2712 end Set_C_Pass_By_Copy;
2714 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
2717 end Set_Can_Never_Be_Null;
2719 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
2722 end Set_Checks_May_Be_Suppressed;
2724 procedure Set_Class_Wide_Type (Id : E; V : E) is
2726 pragma Assert (Is_Type (Id));
2728 end Set_Class_Wide_Type;
2730 procedure Set_Cloned_Subtype (Id : E; V : E) is
2733 (Ekind (Id) = E_Record_Subtype
2734 or else Ekind (Id) = E_Class_Wide_Subtype);
2736 end Set_Cloned_Subtype;
2738 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2741 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2743 end Set_Component_Bit_Offset;
2745 procedure Set_Component_Clause (Id : E; V : N) is
2748 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2750 end Set_Component_Clause;
2752 procedure Set_Component_Size (Id : E; V : U) is
2754 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2756 end Set_Component_Size;
2758 procedure Set_Component_Type (Id : E; V : E) is
2760 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2762 end Set_Component_Type;
2764 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2767 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2769 end Set_Corresponding_Concurrent_Type;
2771 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2773 pragma Assert (Ekind (Id) = E_Discriminant);
2775 end Set_Corresponding_Discriminant;
2777 procedure Set_Corresponding_Equality (Id : E; V : E) is
2780 (Ekind (Id) = E_Function
2781 and then not Comes_From_Source (Id)
2782 and then Chars (Id) = Name_Op_Ne);
2784 end Set_Corresponding_Equality;
2786 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2788 pragma Assert (Is_Concurrent_Type (Id));
2790 end Set_Corresponding_Record_Type;
2792 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
2795 end Set_Corresponding_Remote_Type;
2797 procedure Set_Current_Use_Clause (Id : E; V : E) is
2799 pragma Assert (Ekind (Id) = E_Package);
2801 end Set_Current_Use_Clause;
2803 procedure Set_Current_Value (Id : E; V : N) is
2805 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
2807 end Set_Current_Value;
2809 procedure Set_CR_Discriminant (Id : E; V : E) is
2812 end Set_CR_Discriminant;
2814 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
2816 Set_Flag166 (Id, V);
2817 end Set_Debug_Info_Off;
2819 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
2822 end Set_Debug_Renaming_Link;
2824 procedure Set_Default_Expr_Function (Id : E; V : E) is
2826 pragma Assert (Is_Formal (Id));
2828 end Set_Default_Expr_Function;
2830 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
2832 Set_Flag108 (Id, V);
2833 end Set_Default_Expressions_Processed;
2835 procedure Set_Default_Value (Id : E; V : N) is
2837 pragma Assert (Is_Formal (Id));
2839 end Set_Default_Value;
2841 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
2845 or else Is_Task_Type (Id)
2846 or else Ekind (Id) = E_Block);
2847 Set_Flag114 (Id, V);
2848 end Set_Delay_Cleanups;
2850 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
2854 or else Ekind (Id) = E_Package
2855 or else Ekind (Id) = E_Package_Body);
2857 end Set_Delay_Subprogram_Descriptors;
2859 procedure Set_Delta_Value (Id : E; V : R) is
2861 pragma Assert (Is_Fixed_Point_Type (Id));
2862 Set_Ureal18 (Id, V);
2863 end Set_Delta_Value;
2865 procedure Set_Dependent_Instances (Id : E; V : L) is
2867 pragma Assert (Is_Generic_Instance (Id));
2869 end Set_Dependent_Instances;
2871 procedure Set_Depends_On_Private (Id : E; V : B := True) is
2873 pragma Assert (Nkind (Id) in N_Entity);
2875 end Set_Depends_On_Private;
2877 procedure Set_Digits_Value (Id : E; V : U) is
2880 (Is_Floating_Point_Type (Id)
2881 or else Is_Decimal_Fixed_Point_Type (Id));
2883 end Set_Digits_Value;
2885 procedure Set_Directly_Designated_Type (Id : E; V : E) is
2888 end Set_Directly_Designated_Type;
2890 procedure Set_Discard_Names (Id : E; V : B := True) is
2893 end Set_Discard_Names;
2895 procedure Set_Discriminal (Id : E; V : E) is
2897 pragma Assert (Ekind (Id) = E_Discriminant);
2899 end Set_Discriminal;
2901 procedure Set_Discriminal_Link (Id : E; V : E) is
2904 end Set_Discriminal_Link;
2906 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
2908 pragma Assert (Ekind (Id) = E_Component);
2910 end Set_Discriminant_Checking_Func;
2912 procedure Set_Discriminant_Constraint (Id : E; V : L) is
2914 pragma Assert (Nkind (Id) in N_Entity);
2915 Set_Elist21 (Id, V);
2916 end Set_Discriminant_Constraint;
2918 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
2921 end Set_Discriminant_Default_Value;
2923 procedure Set_Discriminant_Number (Id : E; V : U) is
2926 end Set_Discriminant_Number;
2928 procedure Set_DT_Entry_Count (Id : E; V : U) is
2930 pragma Assert (Ekind (Id) = E_Component);
2932 end Set_DT_Entry_Count;
2934 procedure Set_DT_Position (Id : E; V : U) is
2936 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2938 end Set_DT_Position;
2940 procedure Set_DTC_Entity (Id : E; V : E) is
2943 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2947 procedure Set_Elaboration_Entity (Id : E; V : E) is
2952 Ekind (Id) = E_Package
2954 Is_Generic_Unit (Id));
2956 end Set_Elaboration_Entity;
2958 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
2963 Ekind (Id) = E_Package
2965 Is_Generic_Unit (Id));
2966 Set_Flag174 (Id, V);
2967 end Set_Elaboration_Entity_Required;
2969 procedure Set_Enclosing_Scope (Id : E; V : E) is
2972 end Set_Enclosing_Scope;
2974 procedure Set_Entry_Accepted (Id : E; V : B := True) is
2976 pragma Assert (Is_Entry (Id));
2977 Set_Flag152 (Id, V);
2978 end Set_Entry_Accepted;
2980 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
2983 end Set_Entry_Bodies_Array;
2985 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
2988 end Set_Entry_Cancel_Parameter;
2990 procedure Set_Entry_Component (Id : E; V : E) is
2993 end Set_Entry_Component;
2995 procedure Set_Entry_Formal (Id : E; V : E) is
2998 end Set_Entry_Formal;
3000 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3002 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3004 end Set_Entry_Index_Constant;
3006 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3009 end Set_Entry_Parameters_Type;
3011 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3013 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3015 end Set_Enum_Pos_To_Rep;
3017 procedure Set_Enumeration_Pos (Id : E; V : U) is
3019 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3021 end Set_Enumeration_Pos;
3023 procedure Set_Enumeration_Rep (Id : E; V : U) is
3025 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3027 end Set_Enumeration_Rep;
3029 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3031 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3033 end Set_Enumeration_Rep_Expr;
3035 procedure Set_Equivalent_Type (Id : E; V : E) is
3038 (Ekind (Id) = E_Class_Wide_Type or else
3039 Ekind (Id) = E_Class_Wide_Subtype or else
3040 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3041 Ekind (Id) = E_Access_Subprogram_Type or else
3042 Ekind (Id) = E_Exception_Type);
3044 end Set_Equivalent_Type;
3046 procedure Set_Esize (Id : E; V : U) is
3051 procedure Set_Exception_Code (Id : E; V : U) is
3053 pragma Assert (Ekind (Id) = E_Exception);
3055 end Set_Exception_Code;
3057 procedure Set_Extra_Accessibility (Id : E; V : E) is
3059 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3061 end Set_Extra_Accessibility;
3063 procedure Set_Extra_Constrained (Id : E; V : E) is
3065 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3067 end Set_Extra_Constrained;
3069 procedure Set_Extra_Formal (Id : E; V : E) is
3072 end Set_Extra_Formal;
3074 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3077 end Set_Finalization_Chain_Entity;
3079 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3081 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3082 Set_Flag158 (Id, V);
3083 end Set_Finalize_Storage_Only;
3085 procedure Set_First_Entity (Id : E; V : E) is
3088 end Set_First_Entity;
3090 procedure Set_First_Index (Id : E; V : N) is
3093 end Set_First_Index;
3095 procedure Set_First_Literal (Id : E; V : E) is
3098 end Set_First_Literal;
3100 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3103 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3105 end Set_First_Optional_Parameter;
3107 procedure Set_First_Private_Entity (Id : E; V : E) is
3109 pragma Assert (Ekind (Id) = E_Package
3110 or else Ekind (Id) = E_Generic_Package
3111 or else Ekind (Id) = E_Protected_Type
3112 or else Ekind (Id) = E_Protected_Subtype
3113 or else Ekind (Id) = E_Task_Type
3114 or else Ekind (Id) = E_Task_Subtype);
3116 end Set_First_Private_Entity;
3118 procedure Set_First_Rep_Item (Id : E; V : N) is
3121 end Set_First_Rep_Item;
3123 procedure Set_Freeze_Node (Id : E; V : N) is
3126 end Set_Freeze_Node;
3128 procedure Set_From_With_Type (Id : E; V : B := True) is
3132 or else Ekind (Id) = E_Package);
3133 Set_Flag159 (Id, V);
3134 end Set_From_With_Type;
3136 procedure Set_Full_View (Id : E; V : E) is
3138 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3142 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3145 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3146 Set_Flag169 (Id, V);
3147 end Set_Function_Returns_With_DSP;
3149 procedure Set_Generic_Homonym (Id : E; V : E) is
3152 end Set_Generic_Homonym;
3154 procedure Set_Generic_Renamings (Id : E; V : L) is
3156 Set_Elist23 (Id, V);
3157 end Set_Generic_Renamings;
3159 procedure Set_Handler_Records (Id : E; V : S) is
3162 end Set_Handler_Records;
3164 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3166 pragma Assert (Base_Type (Id) = Id);
3167 Set_Flag135 (Id, V);
3168 end Set_Has_Aliased_Components;
3170 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3173 end Set_Has_Alignment_Clause;
3175 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3178 end Set_Has_All_Calls_Remote;
3180 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3182 Set_Flag201 (Id, V);
3183 end Set_Has_Anon_Block_Suffix;
3185 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3187 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3189 end Set_Has_Atomic_Components;
3191 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3194 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3195 Set_Flag139 (Id, V);
3196 end Set_Has_Biased_Representation;
3198 procedure Set_Has_Completion (Id : E; V : B := True) is
3201 end Set_Has_Completion;
3203 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3205 pragma Assert (Ekind (Id) = E_Incomplete_Type);
3207 end Set_Has_Completion_In_Body;
3209 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3211 pragma Assert (Ekind (Id) = E_Record_Type);
3212 Set_Flag140 (Id, V);
3213 end Set_Has_Complex_Representation;
3215 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3217 pragma Assert (Ekind (Id) = E_Array_Type);
3219 end Set_Has_Component_Size_Clause;
3221 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3223 pragma Assert (Is_Type (Id));
3224 Set_Flag187 (Id, V);
3225 end Set_Has_Constrained_Partial_View;
3227 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3229 Set_Flag181 (Id, V);
3230 end Set_Has_Contiguous_Rep;
3232 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3234 pragma Assert (Base_Type (Id) = Id);
3236 end Set_Has_Controlled_Component;
3238 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3241 end Set_Has_Controlling_Result;
3243 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3245 Set_Flag119 (Id, V);
3246 end Set_Has_Convention_Pragma;
3248 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3250 pragma Assert (Nkind (Id) in N_Entity);
3252 end Set_Has_Delayed_Freeze;
3254 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3256 pragma Assert (Nkind (Id) in N_Entity);
3258 end Set_Has_Discriminants;
3260 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3262 pragma Assert (Is_Enumeration_Type (Id));
3264 end Set_Has_Enumeration_Rep_Clause;
3266 procedure Set_Has_Exit (Id : E; V : B := True) is
3271 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3273 pragma Assert (Is_Tagged_Type (Id));
3274 Set_Flag110 (Id, V);
3275 end Set_Has_External_Tag_Rep_Clause;
3277 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3279 Set_Flag175 (Id, V);
3280 end Set_Has_Forward_Instantiation;
3282 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3284 Set_Flag173 (Id, V);
3285 end Set_Has_Fully_Qualified_Name;
3287 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3290 end Set_Has_Gigi_Rep_Item;
3292 procedure Set_Has_Homonym (Id : E; V : B := True) is
3295 end Set_Has_Homonym;
3297 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3299 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3301 end Set_Has_Machine_Radix_Clause;
3303 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3306 end Set_Has_Master_Entity;
3308 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3311 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3312 Set_Flag142 (Id, V);
3313 end Set_Has_Missing_Return;
3315 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3317 Set_Flag101 (Id, V);
3318 end Set_Has_Nested_Block_With_Handler;
3320 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3322 pragma Assert (Base_Type (Id) = Id);
3324 end Set_Has_Non_Standard_Rep;
3326 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3328 pragma Assert (Is_Type (Id));
3329 Set_Flag172 (Id, V);
3330 end Set_Has_Object_Size_Clause;
3332 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3334 Set_Flag154 (Id, V);
3335 end Set_Has_Per_Object_Constraint;
3337 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3339 Set_Flag188 (Id, V);
3340 end Set_Has_Persistent_BSS;
3342 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3344 pragma Assert (Is_Access_Type (Id));
3345 Set_Flag27 (Base_Type (Id), V);
3346 end Set_Has_Pragma_Controlled;
3348 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3350 Set_Flag150 (Id, V);
3351 end Set_Has_Pragma_Elaborate_Body;
3353 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3355 Set_Flag157 (Id, V);
3356 end Set_Has_Pragma_Inline;
3358 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3360 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3361 pragma Assert (Id = Base_Type (Id));
3362 Set_Flag121 (Id, V);
3363 end Set_Has_Pragma_Pack;
3365 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3367 pragma Assert (Is_Subprogram (Id));
3368 Set_Flag179 (Id, V);
3369 end Set_Has_Pragma_Pure_Function;
3371 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3373 Set_Flag180 (Id, V);
3374 end Set_Has_Pragma_Unreferenced;
3376 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3378 pragma Assert (Id = Base_Type (Id));
3379 Set_Flag120 (Id, V);
3380 end Set_Has_Primitive_Operations;
3382 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3384 Set_Flag155 (Id, V);
3385 end Set_Has_Private_Declaration;
3387 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3389 Set_Flag161 (Id, V);
3390 end Set_Has_Qualified_Name;
3392 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3394 pragma Assert (Id = Base_Type (Id));
3396 end Set_Has_Record_Rep_Clause;
3398 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3400 pragma Assert (Is_Subprogram (Id));
3401 Set_Flag143 (Id, V);
3402 end Set_Has_Recursive_Call;
3404 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3407 end Set_Has_Size_Clause;
3409 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3412 end Set_Has_Small_Clause;
3414 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3416 pragma Assert (Id = Base_Type (Id));
3417 Set_Flag100 (Id, V);
3418 end Set_Has_Specified_Layout;
3420 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3422 pragma Assert (Is_Type (Id));
3423 Set_Flag190 (Id, V);
3424 end Set_Has_Specified_Stream_Input;
3426 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3428 pragma Assert (Is_Type (Id));
3429 Set_Flag191 (Id, V);
3430 end Set_Has_Specified_Stream_Output;
3432 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3434 pragma Assert (Is_Type (Id));
3435 Set_Flag192 (Id, V);
3436 end Set_Has_Specified_Stream_Read;
3438 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3440 pragma Assert (Is_Type (Id));
3441 Set_Flag193 (Id, V);
3442 end Set_Has_Specified_Stream_Write;
3444 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3446 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3447 pragma Assert (Base_Type (Id) = Id);
3449 end Set_Has_Storage_Size_Clause;
3451 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3453 pragma Assert (Is_Elementary_Type (Id));
3454 Set_Flag184 (Id, V);
3455 end Set_Has_Stream_Size_Clause;
3457 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3460 end Set_Has_Subprogram_Descriptor;
3462 procedure Set_Has_Task (Id : E; V : B := True) is
3464 pragma Assert (Base_Type (Id) = Id);
3468 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3470 pragma Assert (Base_Type (Id) = Id);
3471 Set_Flag123 (Id, V);
3472 end Set_Has_Unchecked_Union;
3474 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3476 pragma Assert (Is_Type (Id));
3478 end Set_Has_Unknown_Discriminants;
3480 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3482 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3484 end Set_Has_Volatile_Components;
3486 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3488 Set_Flag182 (Id, V);
3489 end Set_Has_Xref_Entry;
3491 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3493 pragma Assert (Ekind (Id) = E_Variable);
3495 end Set_Hiding_Loop_Variable;
3497 procedure Set_Homonym (Id : E; V : E) is
3499 pragma Assert (Id /= V);
3503 procedure Set_In_Package_Body (Id : E; V : B := True) is
3506 end Set_In_Package_Body;
3508 procedure Set_In_Private_Part (Id : E; V : B := True) is
3511 end Set_In_Private_Part;
3513 procedure Set_In_Use (Id : E; V : B := True) is
3515 pragma Assert (Nkind (Id) in N_Entity);
3519 procedure Set_Inner_Instances (Id : E; V : L) is
3521 Set_Elist23 (Id, V);
3522 end Set_Inner_Instances;
3524 procedure Set_Interface_Name (Id : E; V : N) is
3527 end Set_Interface_Name;
3529 procedure Set_Is_Abstract (Id : E; V : B := True) is
3532 end Set_Is_Abstract;
3534 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3536 pragma Assert (Is_Access_Type (Id));
3537 Set_Flag194 (Id, V);
3538 end Set_Is_Local_Anonymous_Access;
3540 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3542 pragma Assert (Is_Access_Type (Id));
3544 end Set_Is_Access_Constant;
3546 procedure Set_Is_Ada_2005 (Id : E; V : B := True) is
3548 Set_Flag185 (Id, V);
3549 end Set_Is_Ada_2005;
3551 procedure Set_Is_Aliased (Id : E; V : B := True) is
3553 pragma Assert (Nkind (Id) in N_Entity);
3557 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3559 pragma Assert (Is_Entry (Id));
3560 Set_Flag132 (Id, V);
3561 end Set_Is_AST_Entry;
3563 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3566 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3568 end Set_Is_Asynchronous;
3570 procedure Set_Is_Atomic (Id : E; V : B := True) is
3575 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3577 pragma Assert ((not V)
3578 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3580 Set_Flag122 (Id, V);
3581 end Set_Is_Bit_Packed_Array;
3583 procedure Set_Is_Called (Id : E; V : B := True) is
3586 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3587 Set_Flag102 (Id, V);
3590 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3593 end Set_Is_Character_Type;
3595 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3598 end Set_Is_Child_Unit;
3600 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
3603 end Set_Is_Class_Wide_Equivalent_Type;
3605 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3607 Set_Flag149 (Id, V);
3608 end Set_Is_Compilation_Unit;
3610 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3612 pragma Assert (Ekind (Id) = E_Discriminant);
3613 Set_Flag103 (Id, V);
3614 end Set_Is_Completely_Hidden;
3616 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3619 end Set_Is_Concurrent_Record_Type;
3621 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3624 end Set_Is_Constr_Subt_For_U_Nominal;
3626 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3628 Set_Flag141 (Id, V);
3629 end Set_Is_Constr_Subt_For_UN_Aliased;
3631 procedure Set_Is_Constrained (Id : E; V : B := True) is
3633 pragma Assert (Nkind (Id) in N_Entity);
3635 end Set_Is_Constrained;
3637 procedure Set_Is_Constructor (Id : E; V : B := True) is
3640 end Set_Is_Constructor;
3642 procedure Set_Is_Controlled (Id : E; V : B := True) is
3644 pragma Assert (Id = Base_Type (Id));
3646 end Set_Is_Controlled;
3648 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3650 pragma Assert (Is_Formal (Id));
3652 end Set_Is_Controlling_Formal;
3654 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3657 end Set_Is_CPP_Class;
3659 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3661 Set_Flag176 (Id, V);
3662 end Set_Is_Discrim_SO_Function;
3664 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3669 Is_Overloadable (Id)
3671 Ekind (Id) = E_Subprogram_Type);
3674 end Set_Is_Dispatching_Operation;
3676 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3678 Set_Flag124 (Id, V);
3679 end Set_Is_Eliminated;
3681 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3684 end Set_Is_Entry_Formal;
3686 procedure Set_Is_Exported (Id : E; V : B := True) is
3689 end Set_Is_Exported;
3691 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3694 end Set_Is_First_Subtype;
3696 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3699 (Ekind (Id) = E_Record_Subtype
3701 Ekind (Id) = E_Private_Subtype);
3702 Set_Flag118 (Id, V);
3703 end Set_Is_For_Access_Subtype;
3705 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
3707 Set_Flag111 (Id, V);
3708 end Set_Is_Formal_Subprogram;
3710 procedure Set_Is_Frozen (Id : E; V : B := True) is
3712 pragma Assert (Nkind (Id) in N_Entity);
3716 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
3718 pragma Assert (Is_Type (Id));
3720 end Set_Is_Generic_Actual_Type;
3722 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
3724 Set_Flag130 (Id, V);
3725 end Set_Is_Generic_Instance;
3727 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
3729 pragma Assert (Nkind (Id) in N_Entity);
3731 end Set_Is_Generic_Type;
3733 procedure Set_Is_Hidden (Id : E; V : B := True) is
3738 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
3740 Set_Flag171 (Id, V);
3741 end Set_Is_Hidden_Open_Scope;
3743 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
3745 pragma Assert (Nkind (Id) in N_Entity);
3747 end Set_Is_Immediately_Visible;
3749 procedure Set_Is_Imported (Id : E; V : B := True) is
3752 end Set_Is_Imported;
3754 procedure Set_Is_Inlined (Id : E; V : B := True) is
3759 procedure Set_Is_Interface (Id : E; V : B := True) is
3762 (Ekind (Id) = E_Record_Type
3763 or else Ekind (Id) = E_Record_Subtype
3764 or else Ekind (Id) = E_Record_Type_With_Private
3765 or else Ekind (Id) = E_Record_Subtype_With_Private
3766 or else Ekind (Id) = E_Class_Wide_Type);
3767 Set_Flag186 (Id, V);
3768 end Set_Is_Interface;
3770 procedure Set_Is_Instantiated (Id : E; V : B := True) is
3772 Set_Flag126 (Id, V);
3773 end Set_Is_Instantiated;
3775 procedure Set_Is_Internal (Id : E; V : B := True) is
3777 pragma Assert (Nkind (Id) in N_Entity);
3779 end Set_Is_Internal;
3781 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
3783 pragma Assert (Nkind (Id) in N_Entity);
3785 end Set_Is_Interrupt_Handler;
3787 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
3790 end Set_Is_Intrinsic_Subprogram;
3792 procedure Set_Is_Itype (Id : E; V : B := True) is
3797 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
3800 end Set_Is_Known_Non_Null;
3802 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
3804 Set_Flag170 (Id, V);
3805 end Set_Is_Known_Valid;
3807 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
3809 pragma Assert (Is_Type (Id));
3810 Set_Flag106 (Id, V);
3811 end Set_Is_Limited_Composite;
3813 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
3815 pragma Assert (Is_Interface (Id));
3816 Set_Flag197 (Id, V);
3817 end Set_Is_Limited_Interface;
3819 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
3822 end Set_Is_Limited_Record;
3824 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
3826 pragma Assert (Is_Subprogram (Id));
3827 Set_Flag137 (Id, V);
3828 end Set_Is_Machine_Code_Subprogram;
3830 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
3832 pragma Assert (Is_Type (Id));
3833 Set_Flag109 (Id, V);
3834 end Set_Is_Non_Static_Subtype;
3836 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
3838 pragma Assert (Ekind (Id) = E_Procedure);
3839 Set_Flag178 (Id, V);
3840 end Set_Is_Null_Init_Proc;
3842 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
3844 Set_Flag153 (Id, V);
3845 end Set_Is_Obsolescent;
3847 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
3849 pragma Assert (Is_Formal (Id));
3850 Set_Flag134 (Id, V);
3851 end Set_Is_Optional_Parameter;
3853 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
3855 pragma Assert (Is_Subprogram (Id));
3857 end Set_Is_Overriding_Operation;
3859 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
3861 Set_Flag160 (Id, V);
3862 end Set_Is_Package_Body_Entity;
3864 procedure Set_Is_Packed (Id : E; V : B := True) is
3866 pragma Assert (Base_Type (Id) = Id);
3870 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
3872 Set_Flag138 (Id, V);
3873 end Set_Is_Packed_Array_Type;
3875 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
3877 pragma Assert (Nkind (Id) in N_Entity);
3879 end Set_Is_Potentially_Use_Visible;
3881 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
3884 end Set_Is_Preelaborated;
3886 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
3888 pragma Assert (Ekind (Id) = E_Procedure);
3889 Set_Flag195 (Id, V);
3890 end Set_Is_Primitive_Wrapper;
3892 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
3894 pragma Assert (Is_Type (Id));
3895 Set_Flag107 (Id, V);
3896 end Set_Is_Private_Composite;
3898 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
3901 end Set_Is_Private_Descendant;
3903 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
3905 pragma Assert (Is_Interface (Id));
3906 Set_Flag198 (Id, V);
3907 end Set_Is_Protected_Interface;
3909 procedure Set_Is_Public (Id : E; V : B := True) is
3911 pragma Assert (Nkind (Id) in N_Entity);
3915 procedure Set_Is_Pure (Id : E; V : B := True) is
3920 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
3922 pragma Assert (Is_Access_Type (Id));
3923 Set_Flag189 (Id, V);
3924 end Set_Is_Pure_Unit_Access_Type;
3926 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
3929 end Set_Is_Remote_Call_Interface;
3931 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
3934 end Set_Is_Remote_Types;
3936 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
3938 Set_Flag112 (Id, V);
3939 end Set_Is_Renaming_Of_Object;
3941 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
3944 end Set_Is_Shared_Passive;
3946 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
3949 (Ekind (Id) = E_Exception
3950 or else Ekind (Id) = E_Variable
3951 or else Ekind (Id) = E_Constant
3952 or else Is_Type (Id)
3953 or else Ekind (Id) = E_Void);
3955 end Set_Is_Statically_Allocated;
3957 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
3959 pragma Assert (Is_Interface (Id));
3960 Set_Flag199 (Id, V);
3961 end Set_Is_Synchronized_Interface;
3963 procedure Set_Is_Tag (Id : E; V : B := True) is
3965 pragma Assert (Nkind (Id) in N_Entity);
3969 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
3972 end Set_Is_Tagged_Type;
3974 procedure Set_Is_Thread_Body (Id : E; V : B := True) is
3977 end Set_Is_Thread_Body;
3979 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
3981 pragma Assert (Is_Interface (Id));
3982 Set_Flag200 (Id, V);
3983 end Set_Is_Task_Interface;
3985 procedure Set_Is_True_Constant (Id : E; V : B := True) is
3987 Set_Flag163 (Id, V);
3988 end Set_Is_True_Constant;
3990 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
3992 pragma Assert (Base_Type (Id) = Id);
3993 Set_Flag117 (Id, V);
3994 end Set_Is_Unchecked_Union;
3996 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
3998 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
3999 Set_Flag144 (Id, V);
4000 end Set_Is_Unsigned_Type;
4002 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4004 pragma Assert (Ekind (Id) = E_Procedure);
4005 Set_Flag127 (Id, V);
4006 end Set_Is_Valued_Procedure;
4008 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4010 pragma Assert (Is_Child_Unit (Id));
4011 Set_Flag116 (Id, V);
4012 end Set_Is_Visible_Child_Unit;
4014 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4016 pragma Assert (Ekind (Id) = E_Exception);
4017 Set_Flag133 (Id, V);
4018 end Set_Is_VMS_Exception;
4020 procedure Set_Is_Volatile (Id : E; V : B := True) is
4022 pragma Assert (Nkind (Id) in N_Entity);
4024 end Set_Is_Volatile;
4026 procedure Set_Itype_Printed (Id : E; V : B := True) is
4028 pragma Assert (Is_Itype (Id));
4029 Set_Flag202 (Id, V);
4030 end Set_Itype_Printed;
4032 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4035 end Set_Kill_Elaboration_Checks;
4037 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4040 end Set_Kill_Range_Checks;
4042 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4045 end Set_Kill_Tag_Checks;
4047 procedure Set_Last_Entity (Id : E; V : E) is
4050 end Set_Last_Entity;
4052 procedure Set_Limited_View (Id : E; V : E) is
4054 pragma Assert (Ekind (Id) = E_Package);
4056 end Set_Limited_View;
4058 procedure Set_Lit_Indexes (Id : E; V : E) is
4060 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4062 end Set_Lit_Indexes;
4064 procedure Set_Lit_Strings (Id : E; V : E) is
4066 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4068 end Set_Lit_Strings;
4070 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4072 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4074 end Set_Machine_Radix_10;
4076 procedure Set_Master_Id (Id : E; V : E) is
4081 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4083 Set_Flag168 (Id, V);
4084 end Set_Materialize_Entity;
4086 procedure Set_Mechanism (Id : E; V : M) is
4088 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4089 Set_Uint8 (Id, UI_From_Int (V));
4092 procedure Set_Modulus (Id : E; V : U) is
4094 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4098 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4100 pragma Assert (Is_Type (Id));
4101 Set_Flag183 (Id, V);
4102 end Set_Must_Be_On_Byte_Boundary;
4104 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4106 Set_Flag147 (Id, V);
4107 end Set_Needs_Debug_Info;
4109 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4112 (Is_Overloadable (Id)
4113 or else Ekind (Id) = E_Subprogram_Type
4114 or else Ekind (Id) = E_Entry_Family);
4116 end Set_Needs_No_Actuals;
4118 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4120 Set_Flag115 (Id, V);
4121 end Set_Never_Set_In_Source;
4123 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4126 end Set_Next_Inlined_Subprogram;
4128 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4130 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4131 Set_Flag131 (Id, V);
4132 end Set_No_Pool_Assigned;
4134 procedure Set_No_Return (Id : E; V : B := True) is
4137 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Generic_Procedure);
4138 Set_Flag113 (Id, V);
4141 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4143 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4144 Set_Flag136 (Id, V);
4145 end Set_No_Strict_Aliasing;
4147 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4149 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4151 end Set_Non_Binary_Modulus;
4153 procedure Set_Non_Limited_View (Id : E; V : E) is
4154 pragma Assert (False
4155 or else Ekind (Id) = E_Incomplete_Type);
4158 end Set_Non_Limited_View;
4160 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4163 (Root_Type (Id) = Standard_Boolean
4164 and then Ekind (Id) = E_Enumeration_Type);
4165 Set_Flag162 (Id, V);
4166 end Set_Nonzero_Is_True;
4168 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4171 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4173 end Set_Normalized_First_Bit;
4175 procedure Set_Normalized_Position (Id : E; V : U) is
4178 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4180 end Set_Normalized_Position;
4182 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4185 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4187 end Set_Normalized_Position_Max;
4189 procedure Set_Object_Ref (Id : E; V : E) is
4191 pragma Assert (Ekind (Id) = E_Protected_Body);
4195 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4198 (Is_Subprogram (Id) or else Is_Package_Or_Generic_Package (Id));
4200 end Set_Obsolescent_Warning;
4202 procedure Set_Original_Access_Type (Id : E; V : E) is
4205 (Ekind (Id) = E_Access_Subprogram_Type
4206 or else Ekind (Id) = E_Access_Protected_Subprogram_Type);
4208 end Set_Original_Access_Type;
4210 procedure Set_Original_Array_Type (Id : E; V : E) is
4212 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4214 end Set_Original_Array_Type;
4216 procedure Set_Original_Record_Component (Id : E; V : E) is
4219 (Ekind (Id) = E_Void
4220 or else Ekind (Id) = E_Component
4221 or else Ekind (Id) = E_Discriminant);
4223 end Set_Original_Record_Component;
4225 procedure Set_Overridden_Operation (Id : E; V : E) is
4228 end Set_Overridden_Operation;
4230 procedure Set_Package_Instantiation (Id : E; V : N) is
4233 (Ekind (Id) = E_Void
4234 or else Ekind (Id) = E_Generic_Package
4235 or else Ekind (Id) = E_Package);
4237 end Set_Package_Instantiation;
4239 procedure Set_Packed_Array_Type (Id : E; V : E) is
4241 pragma Assert (Is_Array_Type (Id));
4243 end Set_Packed_Array_Type;
4245 procedure Set_Parent_Subtype (Id : E; V : E) is
4247 pragma Assert (Ekind (Id) = E_Record_Type);
4249 end Set_Parent_Subtype;
4251 procedure Set_Primitive_Operations (Id : E; V : L) is
4253 pragma Assert (Is_Tagged_Type (Id));
4254 Set_Elist15 (Id, V);
4255 end Set_Primitive_Operations;
4257 procedure Set_Prival (Id : E; V : E) is
4259 pragma Assert (Is_Protected_Private (Id));
4263 procedure Set_Privals_Chain (Id : E; V : L) is
4265 pragma Assert (Is_Overloadable (Id)
4266 or else Ekind (Id) = E_Entry_Family);
4267 Set_Elist23 (Id, V);
4268 end Set_Privals_Chain;
4270 procedure Set_Private_Dependents (Id : E; V : L) is
4272 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4273 Set_Elist18 (Id, V);
4274 end Set_Private_Dependents;
4276 procedure Set_Private_View (Id : E; V : N) is
4278 pragma Assert (Is_Private_Type (Id));
4280 end Set_Private_View;
4282 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4284 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4286 end Set_Protected_Body_Subprogram;
4288 procedure Set_Protected_Formal (Id : E; V : E) is
4290 pragma Assert (Is_Formal (Id));
4292 end Set_Protected_Formal;
4294 procedure Set_Protected_Operation (Id : E; V : N) is
4296 pragma Assert (Is_Protected_Private (Id));
4298 end Set_Protected_Operation;
4300 procedure Set_Reachable (Id : E; V : B := True) is
4305 procedure Set_Referenced (Id : E; V : B := True) is
4307 Set_Flag156 (Id, V);
4310 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4313 end Set_Referenced_As_LHS;
4315 procedure Set_Referenced_Object (Id : E; V : N) is
4317 pragma Assert (Is_Type (Id));
4319 end Set_Referenced_Object;
4321 procedure Set_Register_Exception_Call (Id : E; V : N) is
4323 pragma Assert (Ekind (Id) = E_Exception);
4325 end Set_Register_Exception_Call;
4327 procedure Set_Related_Array_Object (Id : E; V : E) is
4329 pragma Assert (Is_Array_Type (Id));
4331 end Set_Related_Array_Object;
4333 procedure Set_Related_Instance (Id : E; V : E) is
4336 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4338 end Set_Related_Instance;
4340 procedure Set_Renamed_Entity (Id : E; V : N) is
4343 end Set_Renamed_Entity;
4345 procedure Set_Renamed_Object (Id : E; V : N) is
4348 end Set_Renamed_Object;
4350 procedure Set_Renaming_Map (Id : E; V : U) is
4353 end Set_Renaming_Map;
4355 procedure Set_Return_Present (Id : E; V : B := True) is
4358 end Set_Return_Present;
4360 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4363 end Set_Returns_By_Ref;
4365 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4368 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4369 Set_Flag164 (Id, V);
4370 end Set_Reverse_Bit_Order;
4372 procedure Set_RM_Size (Id : E; V : U) is
4374 pragma Assert (Is_Type (Id));
4378 procedure Set_Scalar_Range (Id : E; V : N) is
4381 end Set_Scalar_Range;
4383 procedure Set_Scale_Value (Id : E; V : U) is
4386 end Set_Scale_Value;
4388 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4390 pragma Assert (not Is_Record_Type (Id));
4392 end Set_Scope_Depth_Value;
4394 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4396 Set_Flag167 (Id, V);
4397 end Set_Sec_Stack_Needed_For_Return;
4399 procedure Set_Shadow_Entities (Id : E; V : S) is
4402 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4404 end Set_Shadow_Entities;
4406 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4408 pragma Assert (Ekind (Id) = E_Variable);
4410 end Set_Shared_Var_Assign_Proc;
4412 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4414 pragma Assert (Ekind (Id) = E_Variable);
4416 end Set_Shared_Var_Read_Proc;
4418 procedure Set_Size_Check_Code (Id : E; V : N) is
4420 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4422 end Set_Size_Check_Code;
4424 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4426 Set_Flag177 (Id, V);
4427 end Set_Size_Depends_On_Discriminant;
4429 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4432 end Set_Size_Known_At_Compile_Time;
4434 procedure Set_Small_Value (Id : E; V : R) is
4436 pragma Assert (Is_Fixed_Point_Type (Id));
4437 Set_Ureal21 (Id, V);
4438 end Set_Small_Value;
4440 procedure Set_Spec_Entity (Id : E; V : E) is
4442 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4444 end Set_Spec_Entity;
4446 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4448 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4449 pragma Assert (Base_Type (Id) = Id);
4451 end Set_Storage_Size_Variable;
4453 procedure Set_Stored_Constraint (Id : E; V : L) is
4455 pragma Assert (Nkind (Id) in N_Entity);
4456 Set_Elist23 (Id, V);
4457 end Set_Stored_Constraint;
4459 procedure Set_Strict_Alignment (Id : E; V : B := True) is
4461 pragma Assert (Base_Type (Id) = Id);
4462 Set_Flag145 (Id, V);
4463 end Set_Strict_Alignment;
4465 procedure Set_String_Literal_Length (Id : E; V : U) is
4467 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4469 end Set_String_Literal_Length;
4471 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
4473 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4475 end Set_String_Literal_Low_Bound;
4477 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
4479 Set_Flag148 (Id, V);
4480 end Set_Suppress_Elaboration_Warnings;
4482 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
4484 pragma Assert (Id = Base_Type (Id));
4485 Set_Flag105 (Id, V);
4486 end Set_Suppress_Init_Proc;
4488 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
4490 Set_Flag165 (Id, V);
4491 end Set_Suppress_Style_Checks;
4493 procedure Set_Task_Body_Procedure (Id : E; V : N) is
4495 pragma Assert (Ekind (Id) = E_Task_Type
4496 or else Ekind (Id) = E_Task_Subtype);
4498 end Set_Task_Body_Procedure;
4500 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
4503 end Set_Treat_As_Volatile;
4505 procedure Set_Underlying_Full_View (Id : E; V : E) is
4507 pragma Assert (Ekind (Id) in Private_Kind);
4509 end Set_Underlying_Full_View;
4511 procedure Set_Unset_Reference (Id : E; V : N) is
4514 end Set_Unset_Reference;
4516 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
4519 end Set_Uses_Sec_Stack;
4521 procedure Set_Vax_Float (Id : E; V : B := True) is
4523 pragma Assert (Id = Base_Type (Id));
4524 Set_Flag151 (Id, V);
4527 procedure Set_Warnings_Off (Id : E; V : B := True) is
4530 end Set_Warnings_Off;
4532 procedure Set_Was_Hidden (Id : E; V : B := True) is
4534 Set_Flag196 (Id, V);
4537 procedure Set_Wrapped_Entity (Id : E; V : E) is
4539 pragma Assert (Ekind (Id) = E_Procedure
4540 and then Is_Primitive_Wrapper (Id));
4542 end Set_Wrapped_Entity;
4544 -----------------------------------
4545 -- Field Initialization Routines --
4546 -----------------------------------
4548 procedure Init_Alignment (Id : E) is
4550 Set_Uint14 (Id, Uint_0);
4553 procedure Init_Alignment (Id : E; V : Int) is
4555 Set_Uint14 (Id, UI_From_Int (V));
4558 procedure Init_Component_Bit_Offset (Id : E) is
4560 Set_Uint11 (Id, No_Uint);
4561 end Init_Component_Bit_Offset;
4563 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
4565 Set_Uint11 (Id, UI_From_Int (V));
4566 end Init_Component_Bit_Offset;
4568 procedure Init_Component_Size (Id : E) is
4570 Set_Uint22 (Id, Uint_0);
4571 end Init_Component_Size;
4573 procedure Init_Component_Size (Id : E; V : Int) is
4575 Set_Uint22 (Id, UI_From_Int (V));
4576 end Init_Component_Size;
4578 procedure Init_Digits_Value (Id : E) is
4580 Set_Uint17 (Id, Uint_0);
4581 end Init_Digits_Value;
4583 procedure Init_Digits_Value (Id : E; V : Int) is
4585 Set_Uint17 (Id, UI_From_Int (V));
4586 end Init_Digits_Value;
4588 procedure Init_Esize (Id : E) is
4590 Set_Uint12 (Id, Uint_0);
4593 procedure Init_Esize (Id : E; V : Int) is
4595 Set_Uint12 (Id, UI_From_Int (V));
4598 procedure Init_Normalized_First_Bit (Id : E) is
4600 Set_Uint8 (Id, No_Uint);
4601 end Init_Normalized_First_Bit;
4603 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
4605 Set_Uint8 (Id, UI_From_Int (V));
4606 end Init_Normalized_First_Bit;
4608 procedure Init_Normalized_Position (Id : E) is
4610 Set_Uint14 (Id, No_Uint);
4611 end Init_Normalized_Position;
4613 procedure Init_Normalized_Position (Id : E; V : Int) is
4615 Set_Uint14 (Id, UI_From_Int (V));
4616 end Init_Normalized_Position;
4618 procedure Init_Normalized_Position_Max (Id : E) is
4620 Set_Uint10 (Id, No_Uint);
4621 end Init_Normalized_Position_Max;
4623 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
4625 Set_Uint10 (Id, UI_From_Int (V));
4626 end Init_Normalized_Position_Max;
4628 procedure Init_RM_Size (Id : E) is
4630 Set_Uint13 (Id, Uint_0);
4633 procedure Init_RM_Size (Id : E; V : Int) is
4635 Set_Uint13 (Id, UI_From_Int (V));
4638 -----------------------------
4639 -- Init_Component_Location --
4640 -----------------------------
4642 procedure Init_Component_Location (Id : E) is
4644 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
4645 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
4646 Set_Uint11 (Id, No_Uint); -- Component_First_Bit
4647 Set_Uint12 (Id, Uint_0); -- Esize
4648 Set_Uint14 (Id, No_Uint); -- Normalized_Position
4649 end Init_Component_Location;
4655 procedure Init_Size (Id : E; V : Int) is
4657 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
4658 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
4661 ---------------------
4662 -- Init_Size_Align --
4663 ---------------------
4665 procedure Init_Size_Align (Id : E) is
4667 Set_Uint12 (Id, Uint_0); -- Esize
4668 Set_Uint13 (Id, Uint_0); -- RM_Size
4669 Set_Uint14 (Id, Uint_0); -- Alignment
4670 end Init_Size_Align;
4672 ----------------------------------------------
4673 -- Type Representation Attribute Predicates --
4674 ----------------------------------------------
4676 function Known_Alignment (E : Entity_Id) return B is
4678 return Uint14 (E) /= Uint_0
4679 and then Uint14 (E) /= No_Uint;
4680 end Known_Alignment;
4682 function Known_Component_Bit_Offset (E : Entity_Id) return B is
4684 return Uint11 (E) /= No_Uint;
4685 end Known_Component_Bit_Offset;
4687 function Known_Component_Size (E : Entity_Id) return B is
4689 return Uint22 (Base_Type (E)) /= Uint_0
4690 and then Uint22 (Base_Type (E)) /= No_Uint;
4691 end Known_Component_Size;
4693 function Known_Esize (E : Entity_Id) return B is
4695 return Uint12 (E) /= Uint_0
4696 and then Uint12 (E) /= No_Uint;
4699 function Known_Normalized_First_Bit (E : Entity_Id) return B is
4701 return Uint8 (E) /= No_Uint;
4702 end Known_Normalized_First_Bit;
4704 function Known_Normalized_Position (E : Entity_Id) return B is
4706 return Uint14 (E) /= No_Uint;
4707 end Known_Normalized_Position;
4709 function Known_Normalized_Position_Max (E : Entity_Id) return B is
4711 return Uint10 (E) /= No_Uint;
4712 end Known_Normalized_Position_Max;
4714 function Known_RM_Size (E : Entity_Id) return B is
4716 return Uint13 (E) /= No_Uint
4717 and then (Uint13 (E) /= Uint_0
4718 or else Is_Discrete_Type (E)
4719 or else Is_Fixed_Point_Type (E));
4722 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
4724 return Uint11 (E) /= No_Uint
4725 and then Uint11 (E) >= Uint_0;
4726 end Known_Static_Component_Bit_Offset;
4728 function Known_Static_Component_Size (E : Entity_Id) return B is
4730 return Uint22 (Base_Type (E)) > Uint_0;
4731 end Known_Static_Component_Size;
4733 function Known_Static_Esize (E : Entity_Id) return B is
4735 return Uint12 (E) > Uint_0;
4736 end Known_Static_Esize;
4738 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
4740 return Uint8 (E) /= No_Uint
4741 and then Uint8 (E) >= Uint_0;
4742 end Known_Static_Normalized_First_Bit;
4744 function Known_Static_Normalized_Position (E : Entity_Id) return B is
4746 return Uint14 (E) /= No_Uint
4747 and then Uint14 (E) >= Uint_0;
4748 end Known_Static_Normalized_Position;
4750 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
4752 return Uint10 (E) /= No_Uint
4753 and then Uint10 (E) >= Uint_0;
4754 end Known_Static_Normalized_Position_Max;
4756 function Known_Static_RM_Size (E : Entity_Id) return B is
4758 return Uint13 (E) > Uint_0
4759 or else Is_Discrete_Type (E)
4760 or else Is_Fixed_Point_Type (E);
4761 end Known_Static_RM_Size;
4763 function Unknown_Alignment (E : Entity_Id) return B is
4765 return Uint14 (E) = Uint_0
4766 or else Uint14 (E) = No_Uint;
4767 end Unknown_Alignment;
4769 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
4771 return Uint11 (E) = No_Uint;
4772 end Unknown_Component_Bit_Offset;
4774 function Unknown_Component_Size (E : Entity_Id) return B is
4776 return Uint22 (Base_Type (E)) = Uint_0
4778 Uint22 (Base_Type (E)) = No_Uint;
4779 end Unknown_Component_Size;
4781 function Unknown_Esize (E : Entity_Id) return B is
4783 return Uint12 (E) = No_Uint
4785 Uint12 (E) = Uint_0;
4788 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
4790 return Uint8 (E) = No_Uint;
4791 end Unknown_Normalized_First_Bit;
4793 function Unknown_Normalized_Position (E : Entity_Id) return B is
4795 return Uint14 (E) = No_Uint;
4796 end Unknown_Normalized_Position;
4798 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
4800 return Uint10 (E) = No_Uint;
4801 end Unknown_Normalized_Position_Max;
4803 function Unknown_RM_Size (E : Entity_Id) return B is
4805 return (Uint13 (E) = Uint_0
4806 and then not Is_Discrete_Type (E)
4807 and then not Is_Fixed_Point_Type (E))
4808 or else Uint13 (E) = No_Uint;
4809 end Unknown_RM_Size;
4811 --------------------
4812 -- Address_Clause --
4813 --------------------
4815 function Address_Clause (Id : E) return N is
4817 return Rep_Clause (Id, Name_Address);
4820 ----------------------
4821 -- Alignment_Clause --
4822 ----------------------
4824 function Alignment_Clause (Id : E) return N is
4826 return Rep_Clause (Id, Name_Alignment);
4827 end Alignment_Clause;
4829 ----------------------
4830 -- Ancestor_Subtype --
4831 ----------------------
4833 function Ancestor_Subtype (Id : E) return E is
4835 -- If this is first subtype, or is a base type, then there is no
4836 -- ancestor subtype, so we return Empty to indicate this fact.
4838 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
4843 D : constant Node_Id := Declaration_Node (Id);
4846 -- If we have a subtype declaration, get the ancestor subtype
4848 if Nkind (D) = N_Subtype_Declaration then
4849 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
4850 return Entity (Subtype_Mark (Subtype_Indication (D)));
4852 return Entity (Subtype_Indication (D));
4855 -- If not, then no subtype indication is available
4861 end Ancestor_Subtype;
4867 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
4869 if Last_Entity (V) = Empty then
4870 Set_First_Entity (V, Id);
4872 Set_Next_Entity (Last_Entity (V), Id);
4875 Set_Next_Entity (Id, Empty);
4877 Set_Last_Entity (V, Id);
4884 function Base_Type (Id : E) return E is
4887 when E_Enumeration_Subtype |
4889 E_Signed_Integer_Subtype |
4890 E_Modular_Integer_Subtype |
4891 E_Floating_Point_Subtype |
4892 E_Ordinary_Fixed_Point_Subtype |
4893 E_Decimal_Fixed_Point_Subtype |
4898 E_Record_Subtype_With_Private |
4899 E_Limited_Private_Subtype |
4901 E_Protected_Subtype |
4903 E_String_Literal_Subtype |
4904 E_Class_Wide_Subtype =>
4912 -------------------------
4913 -- Component_Alignment --
4914 -------------------------
4916 -- Component Alignment is encoded using two flags, Flag128/129 as
4917 -- follows. Note that both flags False = Align_Default, so that the
4918 -- default initialization of flags to False initializes component
4919 -- alignment to the default value as required.
4921 -- Flag128 Flag129 Value
4922 -- ------- ------- -----
4923 -- False False Calign_Default
4924 -- False True Calign_Component_Size
4925 -- True False Calign_Component_Size_4
4926 -- True True Calign_Storage_Unit
4928 function Component_Alignment (Id : E) return C is
4929 BT : constant Node_Id := Base_Type (Id);
4932 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4934 if Flag128 (BT) then
4935 if Flag129 (BT) then
4936 return Calign_Storage_Unit;
4938 return Calign_Component_Size_4;
4942 if Flag129 (BT) then
4943 return Calign_Component_Size;
4945 return Calign_Default;
4948 end Component_Alignment;
4950 --------------------
4951 -- Constant_Value --
4952 --------------------
4954 function Constant_Value (Id : E) return N is
4955 D : constant Node_Id := Declaration_Node (Id);
4959 -- If we have no declaration node, then return no constant value.
4960 -- Not clear how this can happen, but it does sometimes ???
4961 -- To investigate, remove this check and compile discrim_po.adb.
4966 -- Normal case where a declaration node is present
4968 elsif Nkind (D) = N_Object_Renaming_Declaration then
4969 return Renamed_Object (Id);
4971 -- If this is a component declaration whose entity is constant, it
4972 -- is a prival within a protected function. It does not have
4973 -- a constant value.
4975 elsif Nkind (D) = N_Component_Declaration then
4978 -- If there is an expression, return it
4980 elsif Present (Expression (D)) then
4981 return (Expression (D));
4983 -- For a constant, see if we have a full view
4985 elsif Ekind (Id) = E_Constant
4986 and then Present (Full_View (Id))
4988 Full_D := Parent (Full_View (Id));
4990 -- The full view may have been rewritten as an object renaming
4992 if Nkind (Full_D) = N_Object_Renaming_Declaration then
4993 return Name (Full_D);
4995 return Expression (Full_D);
4998 -- Otherwise we have no expression to return
5005 ----------------------
5006 -- Declaration_Node --
5007 ----------------------
5009 function Declaration_Node (Id : E) return N is
5013 if Ekind (Id) = E_Incomplete_Type
5014 and then Present (Full_View (Id))
5016 P := Parent (Full_View (Id));
5022 if Nkind (P) /= N_Selected_Component
5023 and then Nkind (P) /= N_Expanded_Name
5025 not (Nkind (P) = N_Defining_Program_Unit_Name
5026 and then Is_Child_Unit (Id))
5034 end Declaration_Node;
5036 ---------------------
5037 -- Designated_Type --
5038 ---------------------
5040 function Designated_Type (Id : E) return E is
5044 Desig_Type := Directly_Designated_Type (Id);
5046 if Ekind (Desig_Type) = E_Incomplete_Type
5047 and then Present (Full_View (Desig_Type))
5049 return Full_View (Desig_Type);
5051 elsif Is_Class_Wide_Type (Desig_Type)
5052 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5053 and then Present (Full_View (Etype (Desig_Type)))
5054 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5056 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5061 end Designated_Type;
5063 -----------------------------
5064 -- Enclosing_Dynamic_Scope --
5065 -----------------------------
5067 function Enclosing_Dynamic_Scope (Id : E) return E is
5071 -- The following test is an error defense against some syntax
5072 -- errors that can leave scopes very messed up.
5074 if Id = Standard_Standard then
5078 -- Normal case, search enclosing scopes
5081 while S /= Standard_Standard
5082 and then not Is_Dynamic_Scope (S)
5088 end Enclosing_Dynamic_Scope;
5090 ----------------------
5091 -- Entry_Index_Type --
5092 ----------------------
5094 function Entry_Index_Type (Id : E) return N is
5096 pragma Assert (Ekind (Id) = E_Entry_Family);
5097 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5098 end Entry_Index_Type;
5100 ---------------------
5102 ---------------------
5104 function First_Component (Id : E) return E is
5109 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5111 Comp_Id := First_Entity (Id);
5112 while Present (Comp_Id) loop
5113 exit when Ekind (Comp_Id) = E_Component;
5114 Comp_Id := Next_Entity (Comp_Id);
5118 end First_Component;
5120 ------------------------
5121 -- First_Discriminant --
5122 ------------------------
5124 function First_Discriminant (Id : E) return E is
5129 (Has_Discriminants (Id)
5130 or else Has_Unknown_Discriminants (Id));
5132 Ent := First_Entity (Id);
5134 -- The discriminants are not necessarily contiguous, because access
5135 -- discriminants will generate itypes. They are not the first entities
5136 -- either, because tag and controller record must be ahead of them.
5138 if Chars (Ent) = Name_uTag then
5139 Ent := Next_Entity (Ent);
5142 if Chars (Ent) = Name_uController then
5143 Ent := Next_Entity (Ent);
5146 -- Skip all hidden stored discriminants if any
5148 while Present (Ent) loop
5149 exit when Ekind (Ent) = E_Discriminant
5150 and then not Is_Completely_Hidden (Ent);
5152 Ent := Next_Entity (Ent);
5155 pragma Assert (Ekind (Ent) = E_Discriminant);
5158 end First_Discriminant;
5164 function First_Formal (Id : E) return E is
5169 (Is_Overloadable (Id)
5170 or else Ekind (Id) = E_Entry_Family
5171 or else Ekind (Id) = E_Subprogram_Body
5172 or else Ekind (Id) = E_Subprogram_Type);
5174 if Ekind (Id) = E_Enumeration_Literal then
5178 Formal := First_Entity (Id);
5180 if Present (Formal) and then Is_Formal (Formal) then
5188 -------------------------------
5189 -- First_Stored_Discriminant --
5190 -------------------------------
5192 function First_Stored_Discriminant (Id : E) return E is
5195 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5196 -- Scans the Discriminants to see whether any are Completely_Hidden
5197 -- (the mechanism for describing non-specified stored discriminants)
5199 ----------------------------------------
5200 -- Has_Completely_Hidden_Discriminant --
5201 ----------------------------------------
5203 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5204 Ent : Entity_Id := Id;
5207 pragma Assert (Ekind (Id) = E_Discriminant);
5209 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5210 if Is_Completely_Hidden (Ent) then
5214 Ent := Next_Entity (Ent);
5218 end Has_Completely_Hidden_Discriminant;
5220 -- Start of processing for First_Stored_Discriminant
5224 (Has_Discriminants (Id)
5225 or else Has_Unknown_Discriminants (Id));
5227 Ent := First_Entity (Id);
5229 if Chars (Ent) = Name_uTag then
5230 Ent := Next_Entity (Ent);
5233 if Chars (Ent) = Name_uController then
5234 Ent := Next_Entity (Ent);
5237 if Has_Completely_Hidden_Discriminant (Ent) then
5239 while Present (Ent) loop
5240 exit when Is_Completely_Hidden (Ent);
5241 Ent := Next_Entity (Ent);
5246 pragma Assert (Ekind (Ent) = E_Discriminant);
5249 end First_Stored_Discriminant;
5255 function First_Subtype (Id : E) return E is
5256 B : constant Entity_Id := Base_Type (Id);
5257 F : constant Node_Id := Freeze_Node (B);
5261 -- If the base type has no freeze node, it is a type in standard,
5262 -- and always acts as its own first subtype unless it is one of
5263 -- the predefined integer types. If the type is formal, it is also
5264 -- a first subtype, and its base type has no freeze node. On the other
5265 -- hand, a subtype of a generic formal is not its own first_subtype.
5266 -- Its base type, if anonymous, is attached to the formal type decl.
5267 -- from which the first subtype is obtained.
5271 if B = Base_Type (Standard_Integer) then
5272 return Standard_Integer;
5274 elsif B = Base_Type (Standard_Long_Integer) then
5275 return Standard_Long_Integer;
5277 elsif B = Base_Type (Standard_Short_Short_Integer) then
5278 return Standard_Short_Short_Integer;
5280 elsif B = Base_Type (Standard_Short_Integer) then
5281 return Standard_Short_Integer;
5283 elsif B = Base_Type (Standard_Long_Long_Integer) then
5284 return Standard_Long_Long_Integer;
5286 elsif Is_Generic_Type (Id) then
5287 if Present (Parent (B)) then
5288 return Defining_Identifier (Parent (B));
5290 return Defining_Identifier (Associated_Node_For_Itype (B));
5297 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5298 -- then we use that link, otherwise (happens with some Itypes), we use
5299 -- the base type itself.
5302 Ent := First_Subtype_Link (F);
5304 if Present (Ent) then
5312 -------------------------------------
5313 -- Get_Attribute_Definition_Clause --
5314 -------------------------------------
5316 function Get_Attribute_Definition_Clause
5318 Id : Attribute_Id) return Node_Id
5323 N := First_Rep_Item (E);
5324 while Present (N) loop
5325 if Nkind (N) = N_Attribute_Definition_Clause
5326 and then Get_Attribute_Id (Chars (N)) = Id
5335 end Get_Attribute_Definition_Clause;
5337 --------------------
5338 -- Get_Rep_Pragma --
5339 --------------------
5341 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5345 N := First_Rep_Item (E);
5346 while Present (N) loop
5347 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
5357 ------------------------
5358 -- Has_Attach_Handler --
5359 ------------------------
5361 function Has_Attach_Handler (Id : E) return B is
5365 pragma Assert (Is_Protected_Type (Id));
5367 Ritem := First_Rep_Item (Id);
5368 while Present (Ritem) loop
5369 if Nkind (Ritem) = N_Pragma
5370 and then Chars (Ritem) = Name_Attach_Handler
5374 Ritem := Next_Rep_Item (Ritem);
5379 end Has_Attach_Handler;
5381 -------------------------------------
5382 -- Has_Attribute_Definition_Clause --
5383 -------------------------------------
5385 function Has_Attribute_Definition_Clause
5387 Id : Attribute_Id) return Boolean
5390 return Present (Get_Attribute_Definition_Clause (E, Id));
5391 end Has_Attribute_Definition_Clause;
5397 function Has_Entries (Id : E) return B is
5398 Result : Boolean := False;
5402 pragma Assert (Is_Concurrent_Type (Id));
5404 Ent := First_Entity (Id);
5405 while Present (Ent) loop
5406 if Is_Entry (Ent) then
5411 Ent := Next_Entity (Ent);
5417 ----------------------------
5418 -- Has_Foreign_Convention --
5419 ----------------------------
5421 function Has_Foreign_Convention (Id : E) return B is
5423 return Convention (Id) >= Foreign_Convention'First;
5424 end Has_Foreign_Convention;
5426 ---------------------------
5427 -- Has_Interrupt_Handler --
5428 ---------------------------
5430 function Has_Interrupt_Handler (Id : E) return B is
5434 pragma Assert (Is_Protected_Type (Id));
5436 Ritem := First_Rep_Item (Id);
5437 while Present (Ritem) loop
5438 if Nkind (Ritem) = N_Pragma
5439 and then Chars (Ritem) = Name_Interrupt_Handler
5443 Ritem := Next_Rep_Item (Ritem);
5448 end Has_Interrupt_Handler;
5450 --------------------------
5451 -- Has_Private_Ancestor --
5452 --------------------------
5454 function Has_Private_Ancestor (Id : E) return B is
5455 R : constant Entity_Id := Root_Type (Id);
5456 T1 : Entity_Id := Id;
5460 if Is_Private_Type (T1) then
5470 end Has_Private_Ancestor;
5472 --------------------
5473 -- Has_Rep_Pragma --
5474 --------------------
5476 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5478 return Present (Get_Rep_Pragma (E, Nam));
5481 ------------------------------
5482 -- Implementation_Base_Type --
5483 ------------------------------
5485 function Implementation_Base_Type (Id : E) return E is
5490 Bastyp := Base_Type (Id);
5492 if Is_Incomplete_Or_Private_Type (Bastyp) then
5493 Imptyp := Underlying_Type (Bastyp);
5495 -- If we have an implementation type, then just return it,
5496 -- otherwise we return the Base_Type anyway. This can only
5497 -- happen in error situations and should avoid some error bombs.
5499 if Present (Imptyp) then
5500 return Base_Type (Imptyp);
5508 end Implementation_Base_Type;
5510 -----------------------
5511 -- Is_Always_Inlined --
5512 -----------------------
5514 function Is_Always_Inlined (Id : E) return B is
5518 Item := First_Rep_Item (Id);
5519 while Present (Item) loop
5520 if Nkind (Item) = N_Pragma
5521 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
5526 Next_Rep_Item (Item);
5530 end Is_Always_Inlined;
5532 ---------------------
5533 -- Is_Boolean_Type --
5534 ---------------------
5536 function Is_Boolean_Type (Id : E) return B is
5538 return Root_Type (Id) = Standard_Boolean;
5539 end Is_Boolean_Type;
5541 ---------------------
5542 -- Is_By_Copy_Type --
5543 ---------------------
5545 function Is_By_Copy_Type (Id : E) return B is
5547 -- If Id is a private type whose full declaration has not been seen,
5548 -- we assume for now that it is not a By_Copy type. Clearly this
5549 -- attribute should not be used before the type is frozen, but it is
5550 -- needed to build the associated record of a protected type. Another
5551 -- place where some lookahead for a full view is needed ???
5554 Is_Elementary_Type (Id)
5555 or else (Is_Private_Type (Id)
5556 and then Present (Underlying_Type (Id))
5557 and then Is_Elementary_Type (Underlying_Type (Id)));
5558 end Is_By_Copy_Type;
5560 --------------------------
5561 -- Is_By_Reference_Type --
5562 --------------------------
5564 function Is_By_Reference_Type (Id : E) return B is
5565 Btype : constant Entity_Id := Base_Type (Id);
5568 if Error_Posted (Id)
5569 or else Error_Posted (Btype)
5573 elsif Is_Private_Type (Btype) then
5575 Utyp : constant Entity_Id := Underlying_Type (Btype);
5581 return Is_By_Reference_Type (Utyp);
5585 elsif Is_Concurrent_Type (Btype) then
5588 elsif Is_Record_Type (Btype) then
5589 if Is_Limited_Record (Btype)
5590 or else Is_Tagged_Type (Btype)
5591 or else Is_Volatile (Btype)
5600 C := First_Component (Btype);
5601 while Present (C) loop
5602 if Is_By_Reference_Type (Etype (C))
5603 or else Is_Volatile (Etype (C))
5608 C := Next_Component (C);
5615 elsif Is_Array_Type (Btype) then
5618 or else Is_By_Reference_Type (Component_Type (Btype))
5619 or else Is_Volatile (Component_Type (Btype))
5620 or else Has_Volatile_Components (Btype);
5625 end Is_By_Reference_Type;
5627 ---------------------
5628 -- Is_Derived_Type --
5629 ---------------------
5631 function Is_Derived_Type (Id : E) return B is
5635 if Base_Type (Id) /= Root_Type (Id)
5636 and then not Is_Generic_Type (Id)
5637 and then not Is_Class_Wide_Type (Id)
5639 if not Is_Numeric_Type (Root_Type (Id)) then
5643 Par := Parent (First_Subtype (Id));
5645 return Present (Par)
5646 and then Nkind (Par) = N_Full_Type_Declaration
5647 and then Nkind (Type_Definition (Par))
5648 = N_Derived_Type_Definition;
5654 end Is_Derived_Type;
5656 ----------------------
5657 -- Is_Dynamic_Scope --
5658 ----------------------
5660 function Is_Dynamic_Scope (Id : E) return B is
5663 Ekind (Id) = E_Block
5665 Ekind (Id) = E_Function
5667 Ekind (Id) = E_Procedure
5669 Ekind (Id) = E_Subprogram_Body
5671 Ekind (Id) = E_Task_Type
5673 Ekind (Id) = E_Entry
5675 Ekind (Id) = E_Entry_Family;
5676 end Is_Dynamic_Scope;
5678 --------------------
5679 -- Is_Entity_Name --
5680 --------------------
5682 function Is_Entity_Name (N : Node_Id) return Boolean is
5683 Kind : constant Node_Kind := Nkind (N);
5686 -- Identifiers, operator symbols, expanded names are entity names
5688 return Kind = N_Identifier
5689 or else Kind = N_Operator_Symbol
5690 or else Kind = N_Expanded_Name
5692 -- Attribute references are entity names if they refer to an entity.
5693 -- Note that we don't do this by testing for the presence of the
5694 -- Entity field in the N_Attribute_Reference node, since it may not
5695 -- have been set yet.
5697 or else (Kind = N_Attribute_Reference
5698 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
5701 ---------------------------
5702 -- Is_Indefinite_Subtype --
5703 ---------------------------
5705 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
5706 K : constant Entity_Kind := Ekind (Id);
5709 if Is_Constrained (Id) then
5712 elsif K in Array_Kind
5713 or else K in Class_Wide_Kind
5714 or else Has_Unknown_Discriminants (Id)
5718 -- Known discriminants: indefinite if there are no default values
5720 elsif K in Record_Kind
5721 or else Is_Incomplete_Or_Private_Type (Id)
5722 or else Is_Concurrent_Type (Id)
5724 return (Has_Discriminants (Id)
5725 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
5730 end Is_Indefinite_Subtype;
5732 ---------------------
5733 -- Is_Limited_Type --
5734 ---------------------
5736 function Is_Limited_Type (Id : E) return B is
5737 Btype : constant E := Base_Type (Id);
5738 Rtype : constant E := Root_Type (Btype);
5741 if not Is_Type (Id) then
5744 elsif Ekind (Btype) = E_Limited_Private_Type
5745 or else Is_Limited_Composite (Btype)
5749 elsif Is_Concurrent_Type (Btype) then
5752 -- Otherwise we will look around to see if there is some other reason
5753 -- for it to be limited, except that if an error was posted on the
5754 -- entity, then just assume it is non-limited, because it can cause
5755 -- trouble to recurse into a murky erroneous entity!
5757 elsif Error_Posted (Id) then
5760 elsif Is_Record_Type (Btype) then
5762 -- AI-419: limitedness is not inherited from a limited interface
5764 if Is_Limited_Record (Rtype) then
5765 return not Is_Interface (Rtype)
5766 or else Is_Protected_Interface (Rtype)
5767 or else Is_Synchronized_Interface (Rtype)
5768 or else Is_Task_Interface (Rtype);
5770 elsif Is_Class_Wide_Type (Btype) then
5771 return Is_Limited_Type (Rtype);
5778 C := First_Component (Btype);
5779 while Present (C) loop
5780 if Is_Limited_Type (Etype (C)) then
5784 C := Next_Component (C);
5791 elsif Is_Array_Type (Btype) then
5792 return Is_Limited_Type (Component_Type (Btype));
5797 end Is_Limited_Type;
5799 -----------------------------------
5800 -- Is_Package_Or_Generic_Package --
5801 -----------------------------------
5803 function Is_Package_Or_Generic_Package (Id : E) return B is
5806 Ekind (Id) = E_Package
5808 Ekind (Id) = E_Generic_Package;
5809 end Is_Package_Or_Generic_Package;
5811 --------------------------
5812 -- Is_Protected_Private --
5813 --------------------------
5815 function Is_Protected_Private (Id : E) return B is
5817 pragma Assert (Ekind (Id) = E_Component);
5818 return Is_Protected_Type (Scope (Id));
5819 end Is_Protected_Private;
5821 ------------------------------
5822 -- Is_Protected_Record_Type --
5823 ------------------------------
5825 function Is_Protected_Record_Type (Id : E) return B is
5828 Is_Concurrent_Record_Type (Id)
5829 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
5830 end Is_Protected_Record_Type;
5832 ---------------------------------
5833 -- Is_Return_By_Reference_Type --
5834 ---------------------------------
5836 -- Note: this predicate has disappeared from Ada 2005: see AI-318-2
5838 function Is_Return_By_Reference_Type (Id : E) return B is
5839 Btype : constant Entity_Id := Base_Type (Id);
5842 if Is_Private_Type (Btype) then
5844 Utyp : constant Entity_Id := Underlying_Type (Btype);
5849 return Is_Return_By_Reference_Type (Utyp);
5853 elsif Is_Concurrent_Type (Btype) then
5856 elsif Is_Record_Type (Btype) then
5857 if Is_Limited_Record (Btype) then
5858 return not Is_Interface (Btype)
5859 or else Is_Protected_Interface (Btype)
5860 or else Is_Synchronized_Interface (Btype)
5861 or else Is_Task_Interface (Btype);
5863 elsif Is_Class_Wide_Type (Btype) then
5864 return Is_Return_By_Reference_Type (Root_Type (Btype));
5871 C := First_Component (Btype);
5872 while Present (C) loop
5873 if Is_Return_By_Reference_Type (Etype (C)) then
5877 C := Next_Component (C);
5884 elsif Is_Array_Type (Btype) then
5885 return Is_Return_By_Reference_Type (Component_Type (Btype));
5890 end Is_Return_By_Reference_Type;
5892 --------------------
5893 -- Is_String_Type --
5894 --------------------
5896 function Is_String_Type (Id : E) return B is
5898 return Ekind (Id) in String_Kind
5899 or else (Is_Array_Type (Id)
5900 and then Number_Dimensions (Id) = 1
5901 and then Is_Character_Type (Component_Type (Id)));
5904 -------------------------
5905 -- Is_Task_Record_Type --
5906 -------------------------
5908 function Is_Task_Record_Type (Id : E) return B is
5911 Is_Concurrent_Record_Type (Id)
5912 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
5913 end Is_Task_Record_Type;
5915 ------------------------
5916 -- Is_Wrapper_Package --
5917 ------------------------
5919 function Is_Wrapper_Package (Id : E) return B is
5921 return (Ekind (Id) = E_Package
5922 and then Present (Related_Instance (Id)));
5923 end Is_Wrapper_Package;
5925 --------------------
5926 -- Next_Component --
5927 --------------------
5929 function Next_Component (Id : E) return E is
5933 Comp_Id := Next_Entity (Id);
5934 while Present (Comp_Id) loop
5935 exit when Ekind (Comp_Id) = E_Component;
5936 Comp_Id := Next_Entity (Comp_Id);
5942 -----------------------
5943 -- Next_Discriminant --
5944 -----------------------
5946 -- This function actually implements both Next_Discriminant and
5947 -- Next_Stored_Discriminant by making sure that the Discriminant
5948 -- returned is of the same variety as Id.
5950 function Next_Discriminant (Id : E) return E is
5952 -- Derived Tagged types with private extensions look like this...
5954 -- E_Discriminant d1
5955 -- E_Discriminant d2
5957 -- E_Discriminant d1
5958 -- E_Discriminant d2
5961 -- so it is critical not to go past the leading discriminants
5966 pragma Assert (Ekind (Id) = E_Discriminant);
5969 D := Next_Entity (D);
5971 or else (Ekind (D) /= E_Discriminant
5972 and then not Is_Itype (D))
5977 exit when Ekind (D) = E_Discriminant
5978 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
5982 end Next_Discriminant;
5988 function Next_Formal (Id : E) return E is
5992 -- Follow the chain of declared entities as long as the kind of
5993 -- the entity corresponds to a formal parameter. Skip internal
5994 -- entities that may have been created for implicit subtypes,
5995 -- in the process of analyzing default expressions.
6000 P := Next_Entity (P);
6002 if No (P) or else Is_Formal (P) then
6004 elsif not Is_Internal (P) then
6010 -----------------------------
6011 -- Next_Formal_With_Extras --
6012 -----------------------------
6014 function Next_Formal_With_Extras (Id : E) return E is
6016 if Present (Extra_Formal (Id)) then
6017 return Extra_Formal (Id);
6019 return Next_Formal (Id);
6021 end Next_Formal_With_Extras;
6027 function Next_Index (Id : Node_Id) return Node_Id is
6036 function Next_Literal (Id : E) return E is
6038 pragma Assert (Nkind (Id) in N_Entity);
6042 ------------------------------
6043 -- Next_Stored_Discriminant --
6044 ------------------------------
6046 function Next_Stored_Discriminant (Id : E) return E is
6048 -- See comment in Next_Discriminant
6050 return Next_Discriminant (Id);
6051 end Next_Stored_Discriminant;
6053 -----------------------
6054 -- Number_Dimensions --
6055 -----------------------
6057 function Number_Dimensions (Id : E) return Pos is
6062 if Ekind (Id) in String_Kind then
6067 T := First_Index (Id);
6068 while Present (T) loop
6075 end Number_Dimensions;
6077 --------------------------
6078 -- Number_Discriminants --
6079 --------------------------
6081 function Number_Discriminants (Id : E) return Pos is
6087 Discr := First_Discriminant (Id);
6088 while Present (Discr) loop
6090 Discr := Next_Discriminant (Discr);
6094 end Number_Discriminants;
6096 --------------------
6097 -- Number_Entries --
6098 --------------------
6100 function Number_Entries (Id : E) return Nat is
6105 pragma Assert (Is_Concurrent_Type (Id));
6108 Ent := First_Entity (Id);
6109 while Present (Ent) loop
6110 if Is_Entry (Ent) then
6114 Ent := Next_Entity (Ent);
6120 --------------------
6121 -- Number_Formals --
6122 --------------------
6124 function Number_Formals (Id : E) return Pos is
6130 Formal := First_Formal (Id);
6131 while Present (Formal) loop
6133 Formal := Next_Formal (Formal);
6139 --------------------
6140 -- Parameter_Mode --
6141 --------------------
6143 function Parameter_Mode (Id : E) return Formal_Kind is
6148 ---------------------
6149 -- Record_Rep_Item --
6150 ---------------------
6152 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6154 Set_Next_Rep_Item (N, First_Rep_Item (E));
6155 Set_First_Rep_Item (E, N);
6156 end Record_Rep_Item;
6162 function Root_Type (Id : E) return E is
6166 pragma Assert (Nkind (Id) in N_Entity);
6168 T := Base_Type (Id);
6170 if Ekind (T) = E_Class_Wide_Type then
6182 -- Following test catches some error cases resulting from
6185 elsif No (Etyp) then
6188 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6191 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6197 -- Return if there is a circularity in the inheritance chain.
6198 -- This happens in some error situations and we do not want
6199 -- to get stuck in this loop.
6201 if T = Base_Type (Id) then
6207 raise Program_Error;
6214 function Scope_Depth (Id : E) return Uint is
6219 while Is_Record_Type (Scop) loop
6220 Scop := Scope (Scop);
6223 return Scope_Depth_Value (Scop);
6226 ---------------------
6227 -- Scope_Depth_Set --
6228 ---------------------
6230 function Scope_Depth_Set (Id : E) return B is
6232 return not Is_Record_Type (Id)
6233 and then Field22 (Id) /= Union_Id (Empty);
6234 end Scope_Depth_Set;
6236 -----------------------------
6237 -- Set_Component_Alignment --
6238 -----------------------------
6240 -- Component Alignment is encoded using two flags, Flag128/129 as
6241 -- follows. Note that both flags False = Align_Default, so that the
6242 -- default initialization of flags to False initializes component
6243 -- alignment to the default value as required.
6245 -- Flag128 Flag129 Value
6246 -- ------- ------- -----
6247 -- False False Calign_Default
6248 -- False True Calign_Component_Size
6249 -- True False Calign_Component_Size_4
6250 -- True True Calign_Storage_Unit
6252 procedure Set_Component_Alignment (Id : E; V : C) is
6254 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6255 and then Id = Base_Type (Id));
6258 when Calign_Default =>
6259 Set_Flag128 (Id, False);
6260 Set_Flag129 (Id, False);
6262 when Calign_Component_Size =>
6263 Set_Flag128 (Id, False);
6264 Set_Flag129 (Id, True);
6266 when Calign_Component_Size_4 =>
6267 Set_Flag128 (Id, True);
6268 Set_Flag129 (Id, False);
6270 when Calign_Storage_Unit =>
6271 Set_Flag128 (Id, True);
6272 Set_Flag129 (Id, True);
6274 end Set_Component_Alignment;
6280 function Size_Clause (Id : E) return N is
6282 return Rep_Clause (Id, Name_Size);
6285 ------------------------
6286 -- Stream_Size_Clause --
6287 ------------------------
6289 function Stream_Size_Clause (Id : E) return N is
6291 return Rep_Clause (Id, Name_Stream_Size);
6292 end Stream_Size_Clause;
6298 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6304 Kind := E_Access_Subtype;
6308 Kind := E_Array_Subtype;
6310 when E_Class_Wide_Type |
6311 E_Class_Wide_Subtype =>
6312 Kind := E_Class_Wide_Subtype;
6314 when E_Decimal_Fixed_Point_Type |
6315 E_Decimal_Fixed_Point_Subtype =>
6316 Kind := E_Decimal_Fixed_Point_Subtype;
6318 when E_Ordinary_Fixed_Point_Type |
6319 E_Ordinary_Fixed_Point_Subtype =>
6320 Kind := E_Ordinary_Fixed_Point_Subtype;
6322 when E_Private_Type |
6323 E_Private_Subtype =>
6324 Kind := E_Private_Subtype;
6326 when E_Limited_Private_Type |
6327 E_Limited_Private_Subtype =>
6328 Kind := E_Limited_Private_Subtype;
6330 when E_Record_Type_With_Private |
6331 E_Record_Subtype_With_Private =>
6332 Kind := E_Record_Subtype_With_Private;
6334 when E_Record_Type |
6336 Kind := E_Record_Subtype;
6338 when E_String_Type |
6340 Kind := E_String_Subtype;
6342 when Enumeration_Kind =>
6343 Kind := E_Enumeration_Subtype;
6346 Kind := E_Floating_Point_Subtype;
6348 when Signed_Integer_Kind =>
6349 Kind := E_Signed_Integer_Subtype;
6351 when Modular_Integer_Kind =>
6352 Kind := E_Modular_Integer_Subtype;
6354 when Protected_Kind =>
6355 Kind := E_Protected_Subtype;
6358 Kind := E_Task_Subtype;
6362 raise Program_Error;
6368 -------------------------
6369 -- First_Tag_Component --
6370 -------------------------
6372 function First_Tag_Component (Id : E) return E is
6374 Typ : Entity_Id := Id;
6377 pragma Assert (Is_Tagged_Type (Typ));
6379 if Is_Class_Wide_Type (Typ) then
6380 Typ := Root_Type (Typ);
6383 if Is_Private_Type (Typ) then
6384 Typ := Underlying_Type (Typ);
6387 Comp := First_Entity (Typ);
6388 while Present (Comp) loop
6389 if Is_Tag (Comp) then
6393 Comp := Next_Entity (Comp);
6396 -- No tag component found
6399 end First_Tag_Component;
6401 ------------------------
6402 -- Next_Tag_Component --
6403 ------------------------
6405 function Next_Tag_Component (Id : E) return E is
6407 Typ : constant Entity_Id := Scope (Id);
6410 pragma Assert (Ekind (Id) = E_Component
6411 and then Is_Tagged_Type (Typ));
6413 Comp := Next_Entity (Id);
6414 while Present (Comp) loop
6415 if Is_Tag (Comp) then
6416 pragma Assert (Chars (Comp) /= Name_uTag);
6420 Comp := Next_Entity (Comp);
6423 -- No tag component found
6426 end Next_Tag_Component;
6428 ---------------------
6429 -- Type_High_Bound --
6430 ---------------------
6432 function Type_High_Bound (Id : E) return Node_Id is
6434 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
6435 return High_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
6437 return High_Bound (Scalar_Range (Id));
6439 end Type_High_Bound;
6441 --------------------
6442 -- Type_Low_Bound --
6443 --------------------
6445 function Type_Low_Bound (Id : E) return Node_Id is
6447 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
6448 return Low_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
6450 return Low_Bound (Scalar_Range (Id));
6454 ---------------------
6455 -- Underlying_Type --
6456 ---------------------
6458 function Underlying_Type (Id : E) return E is
6460 -- For record_with_private the underlying type is always the direct
6461 -- full view. Never try to take the full view of the parent it
6462 -- doesn't make sense.
6464 if Ekind (Id) = E_Record_Type_With_Private then
6465 return Full_View (Id);
6467 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6469 -- If we have an incomplete or private type with a full view,
6470 -- then we return the Underlying_Type of this full view
6472 if Present (Full_View (Id)) then
6473 if Id = Full_View (Id) then
6475 -- Previous error in declaration
6480 return Underlying_Type (Full_View (Id));
6483 -- If we have an incomplete entity that comes from the limited
6484 -- view then we return the Underlying_Type of its non-limited
6487 elsif From_With_Type (Id)
6488 and then Present (Non_Limited_View (Id))
6490 return Underlying_Type (Non_Limited_View (Id));
6492 -- Otherwise check for the case where we have a derived type or
6493 -- subtype, and if so get the Underlying_Type of the parent type.
6495 elsif Etype (Id) /= Id then
6496 return Underlying_Type (Etype (Id));
6498 -- Otherwise we have an incomplete or private type that has
6499 -- no full view, which means that we have not encountered the
6500 -- completion, so return Empty to indicate the underlying type
6501 -- is not yet known.
6507 -- For non-incomplete, non-private types, return the type itself
6508 -- Also for entities that are not types at all return the entity
6514 end Underlying_Type;
6516 ------------------------
6517 -- Write_Entity_Flags --
6518 ------------------------
6520 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
6522 procedure W (Flag_Name : String; Flag : Boolean);
6523 -- Write out given flag if it is set
6529 procedure W (Flag_Name : String; Flag : Boolean) is
6533 Write_Str (Flag_Name);
6534 Write_Str (" = True");
6539 -- Start of processing for Write_Entity_Flags
6542 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
6543 and then Base_Type (Id) = Id
6546 Write_Str ("Component_Alignment = ");
6548 case Component_Alignment (Id) is
6549 when Calign_Default =>
6550 Write_Str ("Calign_Default");
6552 when Calign_Component_Size =>
6553 Write_Str ("Calign_Component_Size");
6555 when Calign_Component_Size_4 =>
6556 Write_Str ("Calign_Component_Size_4");
6558 when Calign_Storage_Unit =>
6559 Write_Str ("Calign_Storage_Unit");
6565 W ("Address_Taken", Flag104 (Id));
6566 W ("Body_Needed_For_SAL", Flag40 (Id));
6567 W ("C_Pass_By_Copy", Flag125 (Id));
6568 W ("Can_Never_Be_Null", Flag38 (Id));
6569 W ("Checks_May_Be_Suppressed", Flag31 (Id));
6570 W ("Debug_Info_Off", Flag166 (Id));
6571 W ("Default_Expressions_Processed", Flag108 (Id));
6572 W ("Delay_Cleanups", Flag114 (Id));
6573 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
6574 W ("Depends_On_Private", Flag14 (Id));
6575 W ("Discard_Names", Flag88 (Id));
6576 W ("Elaboration_Entity_Required", Flag174 (Id));
6577 W ("Entry_Accepted", Flag152 (Id));
6578 W ("Finalize_Storage_Only", Flag158 (Id));
6579 W ("From_With_Type", Flag159 (Id));
6580 W ("Function_Returns_With_DSP", Flag169 (Id));
6581 W ("Has_Aliased_Components", Flag135 (Id));
6582 W ("Has_Alignment_Clause", Flag46 (Id));
6583 W ("Has_All_Calls_Remote", Flag79 (Id));
6584 W ("Has_Anon_Block_Suffix", Flag201 (Id));
6585 W ("Has_Atomic_Components", Flag86 (Id));
6586 W ("Has_Biased_Representation", Flag139 (Id));
6587 W ("Has_Completion", Flag26 (Id));
6588 W ("Has_Completion_In_Body", Flag71 (Id));
6589 W ("Has_Complex_Representation", Flag140 (Id));
6590 W ("Has_Component_Size_Clause", Flag68 (Id));
6591 W ("Has_Contiguous_Rep", Flag181 (Id));
6592 W ("Has_Controlled_Component", Flag43 (Id));
6593 W ("Has_Controlling_Result", Flag98 (Id));
6594 W ("Has_Convention_Pragma", Flag119 (Id));
6595 W ("Has_Delayed_Freeze", Flag18 (Id));
6596 W ("Has_Discriminants", Flag5 (Id));
6597 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
6598 W ("Has_Exit", Flag47 (Id));
6599 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
6600 W ("Has_Forward_Instantiation", Flag175 (Id));
6601 W ("Has_Fully_Qualified_Name", Flag173 (Id));
6602 W ("Has_Gigi_Rep_Item", Flag82 (Id));
6603 W ("Has_Homonym", Flag56 (Id));
6604 W ("Has_Machine_Radix_Clause", Flag83 (Id));
6605 W ("Has_Master_Entity", Flag21 (Id));
6606 W ("Has_Missing_Return", Flag142 (Id));
6607 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
6608 W ("Has_Non_Standard_Rep", Flag75 (Id));
6609 W ("Has_Object_Size_Clause", Flag172 (Id));
6610 W ("Has_Per_Object_Constraint", Flag154 (Id));
6611 W ("Has_Persistent_BSS", Flag188 (Id));
6612 W ("Has_Pragma_Controlled", Flag27 (Id));
6613 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
6614 W ("Has_Pragma_Inline", Flag157 (Id));
6615 W ("Has_Pragma_Pack", Flag121 (Id));
6616 W ("Has_Pragma_Pure_Function", Flag179 (Id));
6617 W ("Has_Pragma_Unreferenced", Flag180 (Id));
6618 W ("Has_Primitive_Operations", Flag120 (Id));
6619 W ("Has_Private_Declaration", Flag155 (Id));
6620 W ("Has_Qualified_Name", Flag161 (Id));
6621 W ("Has_Record_Rep_Clause", Flag65 (Id));
6622 W ("Has_Recursive_Call", Flag143 (Id));
6623 W ("Has_Size_Clause", Flag29 (Id));
6624 W ("Has_Small_Clause", Flag67 (Id));
6625 W ("Has_Specified_Layout", Flag100 (Id));
6626 W ("Has_Specified_Stream_Input", Flag190 (Id));
6627 W ("Has_Specified_Stream_Output", Flag191 (Id));
6628 W ("Has_Specified_Stream_Read", Flag192 (Id));
6629 W ("Has_Specified_Stream_Write", Flag193 (Id));
6630 W ("Has_Storage_Size_Clause", Flag23 (Id));
6631 W ("Has_Stream_Size_Clause", Flag184 (Id));
6632 W ("Has_Subprogram_Descriptor", Flag93 (Id));
6633 W ("Has_Task", Flag30 (Id));
6634 W ("Has_Unchecked_Union", Flag123 (Id));
6635 W ("Has_Unknown_Discriminants", Flag72 (Id));
6636 W ("Has_Volatile_Components", Flag87 (Id));
6637 W ("Has_Xref_Entry", Flag182 (Id));
6638 W ("In_Package_Body", Flag48 (Id));
6639 W ("In_Private_Part", Flag45 (Id));
6640 W ("In_Use", Flag8 (Id));
6641 W ("Is_AST_Entry", Flag132 (Id));
6642 W ("Is_Abstract", Flag19 (Id));
6643 W ("Is_Local_Anonymous_Access", Flag194 (Id));
6644 W ("Is_Access_Constant", Flag69 (Id));
6645 W ("Is_Ada_2005", Flag185 (Id));
6646 W ("Is_Aliased", Flag15 (Id));
6647 W ("Is_Asynchronous", Flag81 (Id));
6648 W ("Is_Atomic", Flag85 (Id));
6649 W ("Is_Bit_Packed_Array", Flag122 (Id));
6650 W ("Is_CPP_Class", Flag74 (Id));
6651 W ("Is_Called", Flag102 (Id));
6652 W ("Is_Character_Type", Flag63 (Id));
6653 W ("Is_Child_Unit", Flag73 (Id));
6654 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
6655 W ("Is_Compilation_Unit", Flag149 (Id));
6656 W ("Is_Completely_Hidden", Flag103 (Id));
6657 W ("Is_Concurrent_Record_Type", Flag20 (Id));
6658 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
6659 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
6660 W ("Is_Constrained", Flag12 (Id));
6661 W ("Is_Constructor", Flag76 (Id));
6662 W ("Is_Controlled", Flag42 (Id));
6663 W ("Is_Controlling_Formal", Flag97 (Id));
6664 W ("Is_Discrim_SO_Function", Flag176 (Id));
6665 W ("Is_Dispatching_Operation", Flag6 (Id));
6666 W ("Is_Eliminated", Flag124 (Id));
6667 W ("Is_Entry_Formal", Flag52 (Id));
6668 W ("Is_Exported", Flag99 (Id));
6669 W ("Is_First_Subtype", Flag70 (Id));
6670 W ("Is_For_Access_Subtype", Flag118 (Id));
6671 W ("Is_Formal_Subprogram", Flag111 (Id));
6672 W ("Is_Frozen", Flag4 (Id));
6673 W ("Is_Generic_Actual_Type", Flag94 (Id));
6674 W ("Is_Generic_Instance", Flag130 (Id));
6675 W ("Is_Generic_Type", Flag13 (Id));
6676 W ("Is_Hidden", Flag57 (Id));
6677 W ("Is_Hidden_Open_Scope", Flag171 (Id));
6678 W ("Is_Immediately_Visible", Flag7 (Id));
6679 W ("Is_Imported", Flag24 (Id));
6680 W ("Is_Inlined", Flag11 (Id));
6681 W ("Is_Instantiated", Flag126 (Id));
6682 W ("Is_Interface", Flag186 (Id));
6683 W ("Is_Internal", Flag17 (Id));
6684 W ("Is_Interrupt_Handler", Flag89 (Id));
6685 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
6686 W ("Is_Itype", Flag91 (Id));
6687 W ("Is_Known_Valid", Flag37 (Id));
6688 W ("Is_Known_Valid", Flag170 (Id));
6689 W ("Is_Limited_Composite", Flag106 (Id));
6690 W ("Is_Limited_Interface", Flag197 (Id));
6691 W ("Is_Limited_Record", Flag25 (Id));
6692 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
6693 W ("Is_Non_Static_Subtype", Flag109 (Id));
6694 W ("Is_Null_Init_Proc", Flag178 (Id));
6695 W ("Is_Obsolescent", Flag153 (Id));
6696 W ("Is_Optional_Parameter", Flag134 (Id));
6697 W ("Is_Overriding_Operation", Flag39 (Id));
6698 W ("Is_Package_Body_Entity", Flag160 (Id));
6699 W ("Is_Packed", Flag51 (Id));
6700 W ("Is_Packed_Array_Type", Flag138 (Id));
6701 W ("Is_Potentially_Use_Visible", Flag9 (Id));
6702 W ("Is_Preelaborated", Flag59 (Id));
6703 W ("Is_Primitive_Wrapper", Flag195 (Id));
6704 W ("Is_Private_Composite", Flag107 (Id));
6705 W ("Is_Private_Descendant", Flag53 (Id));
6706 W ("Is_Protected_Interface", Flag198 (Id));
6707 W ("Is_Public", Flag10 (Id));
6708 W ("Is_Pure", Flag44 (Id));
6709 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
6710 W ("Is_Remote_Call_Interface", Flag62 (Id));
6711 W ("Is_Remote_Types", Flag61 (Id));
6712 W ("Is_Renaming_Of_Object", Flag112 (Id));
6713 W ("Is_Shared_Passive", Flag60 (Id));
6714 W ("Is_Synchronized_Interface", Flag199 (Id));
6715 W ("Is_Statically_Allocated", Flag28 (Id));
6716 W ("Is_Tag", Flag78 (Id));
6717 W ("Is_Tagged_Type", Flag55 (Id));
6718 W ("Is_Task_Interface", Flag200 (Id));
6719 W ("Is_Thread_Body", Flag77 (Id));
6720 W ("Is_True_Constant", Flag163 (Id));
6721 W ("Is_Unchecked_Union", Flag117 (Id));
6722 W ("Is_Unsigned_Type", Flag144 (Id));
6723 W ("Is_VMS_Exception", Flag133 (Id));
6724 W ("Is_Valued_Procedure", Flag127 (Id));
6725 W ("Is_Visible_Child_Unit", Flag116 (Id));
6726 W ("Is_Volatile", Flag16 (Id));
6727 W ("Itype_Printed", Flag202 (Id));
6728 W ("Kill_Elaboration_Checks", Flag32 (Id));
6729 W ("Kill_Range_Checks", Flag33 (Id));
6730 W ("Kill_Tag_Checks", Flag34 (Id));
6731 W ("Machine_Radix_10", Flag84 (Id));
6732 W ("Materialize_Entity", Flag168 (Id));
6733 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
6734 W ("Needs_Debug_Info", Flag147 (Id));
6735 W ("Needs_No_Actuals", Flag22 (Id));
6736 W ("Never_Set_In_Source", Flag115 (Id));
6737 W ("No_Pool_Assigned", Flag131 (Id));
6738 W ("No_Return", Flag113 (Id));
6739 W ("No_Strict_Aliasing", Flag136 (Id));
6740 W ("Non_Binary_Modulus", Flag58 (Id));
6741 W ("Nonzero_Is_True", Flag162 (Id));
6742 W ("Reachable", Flag49 (Id));
6743 W ("Referenced", Flag156 (Id));
6744 W ("Referenced_As_LHS", Flag36 (Id));
6745 W ("Return_Present", Flag54 (Id));
6746 W ("Returns_By_Ref", Flag90 (Id));
6747 W ("Reverse_Bit_Order", Flag164 (Id));
6748 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
6749 W ("Size_Depends_On_Discriminant", Flag177 (Id));
6750 W ("Size_Known_At_Compile_Time", Flag92 (Id));
6751 W ("Strict_Alignment", Flag145 (Id));
6752 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
6753 W ("Suppress_Init_Proc", Flag105 (Id));
6754 W ("Suppress_Style_Checks", Flag165 (Id));
6755 W ("Treat_As_Volatile", Flag41 (Id));
6756 W ("Uses_Sec_Stack", Flag95 (Id));
6757 W ("Vax_Float", Flag151 (Id));
6758 W ("Warnings_Off", Flag96 (Id));
6759 W ("Was_Hidden", Flag196 (Id));
6760 end Write_Entity_Flags;
6762 -----------------------
6763 -- Write_Entity_Info --
6764 -----------------------
6766 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
6768 procedure Write_Attribute (Which : String; Nam : E);
6769 -- Write attribute value with given string name
6771 procedure Write_Kind (Id : Entity_Id);
6772 -- Write Ekind field of entity
6774 procedure Write_Attribute (Which : String; Nam : E) is
6778 Write_Int (Int (Nam));
6780 Write_Name (Chars (Nam));
6782 end Write_Attribute;
6784 procedure Write_Kind (Id : Entity_Id) is
6785 K : constant String := Entity_Kind'Image (Ekind (Id));
6789 Write_Str (" Kind ");
6791 if Is_Type (Id) and then Is_Tagged_Type (Id) then
6792 Write_Str ("TAGGED ");
6795 Write_Str (K (3 .. K'Length));
6798 if Is_Type (Id) and then Depends_On_Private (Id) then
6799 Write_Str ("Depends_On_Private ");
6803 -- Start of processing for Write_Entity_Info
6807 Write_Attribute ("Name ", Id);
6808 Write_Int (Int (Id));
6812 Write_Attribute (" Type ", Etype (Id));
6814 Write_Attribute (" Scope ", Scope (Id));
6819 when Discrete_Kind =>
6820 Write_Str ("Bounds: Id = ");
6822 if Present (Scalar_Range (Id)) then
6823 Write_Int (Int (Type_Low_Bound (Id)));
6824 Write_Str (" .. Id = ");
6825 Write_Int (Int (Type_High_Bound (Id)));
6827 Write_Str ("Empty");
6838 (" Component Type ", Component_Type (Id));
6841 Write_Str (" Indices ");
6843 Index := First_Index (Id);
6844 while Present (Index) loop
6845 Write_Attribute (" ", Etype (Index));
6846 Index := Next_Index (Index);
6854 (" Directly Designated Type ",
6855 Directly_Designated_Type (Id));
6858 when Overloadable_Kind =>
6859 if Present (Homonym (Id)) then
6860 Write_Str (" Homonym ");
6861 Write_Name (Chars (Homonym (Id)));
6863 Write_Int (Int (Homonym (Id)));
6870 if Ekind (Scope (Id)) in Record_Kind then
6872 " Original_Record_Component ",
6873 Original_Record_Component (Id));
6874 Write_Int (Int (Original_Record_Component (Id)));
6878 when others => null;
6880 end Write_Entity_Info;
6882 -----------------------
6883 -- Write_Field6_Name --
6884 -----------------------
6886 procedure Write_Field6_Name (Id : Entity_Id) is
6887 pragma Warnings (Off, Id);
6890 Write_Str ("First_Rep_Item");
6891 end Write_Field6_Name;
6893 -----------------------
6894 -- Write_Field7_Name --
6895 -----------------------
6897 procedure Write_Field7_Name (Id : Entity_Id) is
6898 pragma Warnings (Off, Id);
6901 Write_Str ("Freeze_Node");
6902 end Write_Field7_Name;
6904 -----------------------
6905 -- Write_Field8_Name --
6906 -----------------------
6908 procedure Write_Field8_Name (Id : Entity_Id) is
6913 Write_Str ("Normalized_First_Bit");
6917 E_Subprogram_Body =>
6918 Write_Str ("Mechanism");
6921 Write_Str ("Associated_Node_For_Itype");
6924 Write_Str ("Dependent_Instances");
6927 Write_Str ("Hiding_Loop_Variable");
6930 Write_Str ("Field8??");
6932 end Write_Field8_Name;
6934 -----------------------
6935 -- Write_Field9_Name --
6936 -----------------------
6938 procedure Write_Field9_Name (Id : Entity_Id) is
6942 Write_Str ("Class_Wide_Type");
6945 E_Generic_Function |
6947 E_Generic_Procedure |
6950 Write_Str ("Renaming_Map");
6953 Write_Str ("Current_Value");
6956 Write_Str ("Field9??");
6958 end Write_Field9_Name;
6960 ------------------------
6961 -- Write_Field10_Name --
6962 ------------------------
6964 procedure Write_Field10_Name (Id : Entity_Id) is
6968 Write_Str ("Referenced_Object");
6970 when E_In_Parameter |
6972 Write_Str ("Discriminal_Link");
6978 Write_Str ("Handler_Records");
6982 Write_Str ("Normalized_Position_Max");
6985 Write_Str ("Field10??");
6987 end Write_Field10_Name;
6989 ------------------------
6990 -- Write_Field11_Name --
6991 ------------------------
6993 procedure Write_Field11_Name (Id : Entity_Id) is
6997 Write_Str ("Entry_Component");
7001 Write_Str ("Component_Bit_Offset");
7004 Write_Str ("Full_View");
7006 when E_Enumeration_Literal =>
7007 Write_Str ("Enumeration_Pos");
7010 Write_Str ("Block_Node");
7016 Write_Str ("Protected_Body_Subprogram");
7018 when E_Generic_Package =>
7019 Write_Str ("Generic_Homonym");
7022 Write_Str ("Full_View");
7025 Write_Str ("Field11??");
7027 end Write_Field11_Name;
7029 ------------------------
7030 -- Write_Field12_Name --
7031 ------------------------
7033 procedure Write_Field12_Name (Id : Entity_Id) is
7037 Write_Str ("Barrier_Function");
7039 when E_Enumeration_Literal =>
7040 Write_Str ("Enumeration_Rep");
7047 E_In_Out_Parameter |
7051 Write_Str ("Esize");
7055 Write_Str ("Next_Inlined_Subprogram");
7058 Write_Str ("Associated_Formal_Package");
7061 Write_Str ("Field12??");
7063 end Write_Field12_Name;
7065 ------------------------
7066 -- Write_Field13_Name --
7067 ------------------------
7069 procedure Write_Field13_Name (Id : Entity_Id) is
7073 Write_Str ("RM_Size");
7077 Write_Str ("Component_Clause");
7079 when E_Enumeration_Literal =>
7080 Write_Str ("Debug_Renaming_Link");
7083 if not Comes_From_Source (Id)
7085 Chars (Id) = Name_Op_Ne
7087 Write_Str ("Corresponding_Equality");
7089 elsif Comes_From_Source (Id) then
7090 Write_Str ("Elaboration_Entity");
7093 Write_Str ("Field13??");
7098 Write_Str ("Extra_Accessibility");
7102 Generic_Unit_Kind =>
7103 Write_Str ("Elaboration_Entity");
7106 Write_Str ("Field13??");
7108 end Write_Field13_Name;
7110 -----------------------
7111 -- Write_Field14_Name --
7112 -----------------------
7114 procedure Write_Field14_Name (Id : Entity_Id) is
7122 Write_Str ("Alignment");
7126 Write_Str ("Normalized_Position");
7130 Write_Str ("First_Optional_Parameter");
7133 E_Generic_Package =>
7134 Write_Str ("Shadow_Entities");
7137 Write_Str ("Field14??");
7139 end Write_Field14_Name;
7141 ------------------------
7142 -- Write_Field15_Name --
7143 ------------------------
7145 procedure Write_Field15_Name (Id : Entity_Id) is
7150 Write_Str ("Storage_Size_Variable");
7152 when Class_Wide_Kind |
7156 Write_Str ("Primitive_Operations");
7159 Write_Str ("DT_Entry_Count");
7161 when Decimal_Fixed_Point_Kind =>
7162 Write_Str ("Scale_Value");
7164 when E_Discriminant =>
7165 Write_Str ("Discriminant_Number");
7168 Write_Str ("Extra_Formal");
7172 Write_Str ("DT_Position");
7175 Write_Str ("Entry_Parameters_Type");
7177 when Enumeration_Kind =>
7178 Write_Str ("Lit_Indexes");
7182 Write_Str ("Related_Instance");
7184 when E_Protected_Type =>
7185 Write_Str ("Entry_Bodies_Array");
7187 when E_String_Literal_Subtype =>
7188 Write_Str ("String_Literal_Low_Bound");
7191 Write_Str ("Shared_Var_Read_Proc");
7194 Write_Str ("Field15??");
7196 end Write_Field15_Name;
7198 ------------------------
7199 -- Write_Field16_Name --
7200 ------------------------
7202 procedure Write_Field16_Name (Id : Entity_Id) is
7206 Write_Str ("Entry_Formal");
7210 Write_Str ("DTC_Entity");
7215 Write_Str ("First_Private_Entity");
7217 when E_Record_Type |
7218 E_Record_Type_With_Private =>
7219 Write_Str ("Access_Disp_Table");
7221 when E_String_Literal_Subtype =>
7222 Write_Str ("String_Literal_Length");
7224 when Enumeration_Kind =>
7225 Write_Str ("Lit_Strings");
7229 Write_Str ("Unset_Reference");
7231 when E_Record_Subtype |
7232 E_Class_Wide_Subtype =>
7233 Write_Str ("Cloned_Subtype");
7236 Write_Str ("Field16??");
7238 end Write_Field16_Name;
7240 ------------------------
7241 -- Write_Field17_Name --
7242 ------------------------
7244 procedure Write_Field17_Name (Id : Entity_Id) is
7248 Write_Str ("Digits_Value");
7251 Write_Str ("Prival");
7253 when E_Discriminant =>
7254 Write_Str ("Discriminal");
7263 E_Generic_Function |
7265 E_Generic_Procedure |
7274 E_Subprogram_Type =>
7275 Write_Str ("First_Entity");
7278 Write_Str ("First_Index");
7280 when E_Protected_Body =>
7281 Write_Str ("Object_Ref");
7283 when Enumeration_Kind =>
7284 Write_Str ("First_Literal");
7287 Write_Str ("Master_Id");
7289 when Modular_Integer_Kind =>
7290 Write_Str ("Modulus");
7294 E_Generic_In_Out_Parameter |
7296 Write_Str ("Actual_Subtype");
7298 when E_Incomplete_Type =>
7299 Write_Str ("Non-limited view");
7302 Write_Str ("Field17??");
7304 end Write_Field17_Name;
7306 -----------------------
7307 -- Write_Field18_Name --
7308 -----------------------
7310 procedure Write_Field18_Name (Id : Entity_Id) is
7313 when E_Enumeration_Literal |
7317 Write_Str ("Alias");
7319 when E_Record_Type =>
7320 Write_Str ("Corresponding_Concurrent_Type");
7322 when E_Entry_Index_Parameter =>
7323 Write_Str ("Entry_Index_Constant");
7325 when E_Class_Wide_Subtype |
7326 E_Access_Protected_Subprogram_Type |
7327 E_Access_Subprogram_Type |
7329 Write_Str ("Equivalent_Type");
7331 when Fixed_Point_Kind =>
7332 Write_Str ("Delta_Value");
7336 Write_Str ("Renamed_Object");
7340 E_Generic_Function |
7341 E_Generic_Procedure |
7342 E_Generic_Package =>
7343 Write_Str ("Renamed_Entity");
7345 when Incomplete_Or_Private_Kind =>
7346 Write_Str ("Private_Dependents");
7348 when Concurrent_Kind =>
7349 Write_Str ("Corresponding_Record_Type");
7354 Write_Str ("Enclosing_Scope");
7357 Write_Str ("Field18??");
7359 end Write_Field18_Name;
7361 -----------------------
7362 -- Write_Field19_Name --
7363 -----------------------
7365 procedure Write_Field19_Name (Id : Entity_Id) is
7370 Write_Str ("Related_Array_Object");
7377 Write_Str ("Finalization_Chain_Entity");
7379 when E_Constant | E_Variable =>
7380 Write_Str ("Size_Check_Code");
7382 when E_Discriminant =>
7383 Write_Str ("Corresponding_Discriminant");
7386 E_Generic_Package =>
7387 Write_Str ("Body_Entity");
7389 when E_Package_Body |
7391 Write_Str ("Spec_Entity");
7393 when Private_Kind =>
7394 Write_Str ("Underlying_Full_View");
7396 when E_Record_Type =>
7397 Write_Str ("Parent_Subtype");
7400 Write_Str ("Field19??");
7402 end Write_Field19_Name;
7404 -----------------------
7405 -- Write_Field20_Name --
7406 -----------------------
7408 procedure Write_Field20_Name (Id : Entity_Id) is
7412 Write_Str ("Component_Type");
7414 when E_In_Parameter |
7415 E_Generic_In_Parameter =>
7416 Write_Str ("Default_Value");
7419 Write_Str ("Directly_Designated_Type");
7422 Write_Str ("Discriminant_Checking_Func");
7424 when E_Discriminant =>
7425 Write_Str ("Discriminant_Default_Value");
7434 E_Generic_Function |
7436 E_Generic_Procedure |
7445 E_Subprogram_Type =>
7447 Write_Str ("Last_Entity");
7450 Write_Str ("Scalar_Range");
7453 Write_Str ("Register_Exception_Call");
7456 Write_Str ("Field20??");
7458 end Write_Field20_Name;
7460 -----------------------
7461 -- Write_Field21_Name --
7462 -----------------------
7464 procedure Write_Field21_Name (Id : Entity_Id) is
7470 E_Generic_Function |
7472 E_Generic_Procedure |
7474 Write_Str ("Interface_Name");
7476 when Concurrent_Kind |
7477 Incomplete_Or_Private_Kind |
7481 Write_Str ("Discriminant_Constraint");
7484 Write_Str ("Accept_Address");
7486 when Fixed_Point_Kind =>
7487 Write_Str ("Small_Value");
7489 when E_In_Parameter =>
7490 Write_Str ("Default_Expr_Function");
7493 Modular_Integer_Kind =>
7494 Write_Str ("Original_Array_Type");
7496 when E_Access_Subprogram_Type |
7497 E_Access_Protected_Subprogram_Type =>
7498 Write_Str ("Original_Access_Type");
7501 Write_Str ("Field21??");
7503 end Write_Field21_Name;
7505 -----------------------
7506 -- Write_Field22_Name --
7507 -----------------------
7509 procedure Write_Field22_Name (Id : Entity_Id) is
7513 Write_Str ("Associated_Storage_Pool");
7516 Write_Str ("Component_Size");
7520 Write_Str ("Original_Record_Component");
7522 when E_Enumeration_Literal =>
7523 Write_Str ("Enumeration_Rep_Expr");
7526 Write_Str ("Exception_Code");
7529 Write_Str ("Protected_Formal");
7531 when E_Record_Type =>
7532 Write_Str ("Corresponding_Remote_Type");
7542 E_Generic_Function |
7543 E_Generic_Procedure |
7548 Write_Str ("Scope_Depth_Value");
7550 when E_Record_Type_With_Private |
7551 E_Record_Subtype_With_Private |
7554 E_Limited_Private_Type |
7555 E_Limited_Private_Subtype =>
7556 Write_Str ("Private_View");
7559 Write_Str ("Shared_Var_Assign_Proc");
7562 Write_Str ("Field22??");
7564 end Write_Field22_Name;
7566 ------------------------
7567 -- Write_Field23_Name --
7568 ------------------------
7570 procedure Write_Field23_Name (Id : Entity_Id) is
7574 Write_Str ("Associated_Final_Chain");
7577 Write_Str ("Packed_Array_Type");
7580 Write_Str ("Entry_Cancel_Parameter");
7583 Write_Str ("Protected_Operation");
7585 when E_Discriminant =>
7586 Write_Str ("CR_Discriminant");
7588 when E_Enumeration_Type =>
7589 Write_Str ("Enum_Pos_To_Rep");
7593 Write_Str ("Extra_Constrained");
7595 when E_Generic_Function |
7597 E_Generic_Procedure =>
7598 Write_Str ("Inner_Instances");
7600 when Concurrent_Kind |
7601 Incomplete_Or_Private_Kind |
7605 Write_Str ("Stored_Constraint");
7609 Write_Str ("Generic_Renamings");
7612 if Is_Generic_Instance (Id) then
7613 Write_Str ("Generic_Renamings");
7615 Write_Str ("Limited Views");
7618 -- What about Privals_Chain for protected operations ???
7621 Write_Str ("Privals_Chain");
7624 Write_Str ("Field23??");
7626 end Write_Field23_Name;
7628 ------------------------
7629 -- Write_Field24_Name --
7630 ------------------------
7632 procedure Write_Field24_Name (Id : Entity_Id) is
7635 when E_Record_Type |
7637 E_Record_Type_With_Private |
7638 E_Record_Subtype_With_Private =>
7639 Write_Str ("Abstract_Interfaces");
7641 when Subprogram_Kind |
7643 E_Generic_Package =>
7644 Write_Str ("Obsolescent_Warning");
7647 Write_Str ("Task_Body_Procedure");
7650 Write_Str ("Field24??");
7652 end Write_Field24_Name;
7654 ------------------------
7655 -- Write_Field25_Name --
7656 ------------------------
7658 procedure Write_Field25_Name (Id : Entity_Id) is
7663 Write_Str ("Abstract_Interface_Alias");
7666 Write_Str ("Current_Use_Clause");
7669 Write_Str ("Field25??");
7671 end Write_Field25_Name;
7673 ------------------------
7674 -- Write_Field26_Name --
7675 ------------------------
7677 procedure Write_Field26_Name (Id : Entity_Id) is
7680 when E_Generic_Package |
7682 Write_Str ("Package_Instantiation");
7686 Write_Str ("Overridden_Operation");
7689 Write_Str ("Field26??");
7691 end Write_Field26_Name;
7693 ------------------------
7694 -- Write_Field27_Name --
7695 ------------------------
7697 procedure Write_Field27_Name (Id : Entity_Id) is
7701 Write_Str ("Wrapped_Entity");
7704 Write_Str ("Field27??");
7706 end Write_Field27_Name;
7708 -------------------------
7709 -- Iterator Procedures --
7710 -------------------------
7712 procedure Proc_Next_Component (N : in out Node_Id) is
7714 N := Next_Component (N);
7715 end Proc_Next_Component;
7717 procedure Proc_Next_Discriminant (N : in out Node_Id) is
7719 N := Next_Discriminant (N);
7720 end Proc_Next_Discriminant;
7722 procedure Proc_Next_Formal (N : in out Node_Id) is
7724 N := Next_Formal (N);
7725 end Proc_Next_Formal;
7727 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
7729 N := Next_Formal_With_Extras (N);
7730 end Proc_Next_Formal_With_Extras;
7732 procedure Proc_Next_Index (N : in out Node_Id) is
7734 N := Next_Index (N);
7735 end Proc_Next_Index;
7737 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
7739 N := Next_Inlined_Subprogram (N);
7740 end Proc_Next_Inlined_Subprogram;
7742 procedure Proc_Next_Literal (N : in out Node_Id) is
7744 N := Next_Literal (N);
7745 end Proc_Next_Literal;
7747 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
7749 N := Next_Stored_Discriminant (N);
7750 end Proc_Next_Stored_Discriminant;