1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 pragma Style_Checks (All_Checks);
35 -- Turn off subprogram ordering, not used for this unit
37 with Atree; use Atree;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the
55 -- base part of the node. The access routines for these fields and
56 -- the corresponding set procedures are defined in Sinfo. These fields
57 -- are present in all entities. Note that Homonym is also in the base
58 -- part of the node, but has access routines that are more properly
59 -- part of Einfo, which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Return_Applies_To Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Elaboration_Entity Node13
109 -- Extra_Accessibility Node13
113 -- First_Optional_Parameter Node14
114 -- Normalized_Position Uint14
115 -- Shadow_Entities List14
117 -- Discriminant_Number Uint15
118 -- DT_Position Uint15
119 -- DT_Entry_Count Uint15
120 -- Entry_Bodies_Array Node15
121 -- Entry_Parameters_Type Node15
122 -- Extra_Formal Node15
123 -- Lit_Indexes Node15
124 -- Primitive_Operations Elist15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
129 -- Shared_Var_Read_Proc Node15
131 -- Access_Disp_Table Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- String_Literal_Length Uint16
138 -- Unset_Reference Node16
140 -- Actual_Subtype Node17
141 -- Digits_Value Uint17
142 -- Discriminal Node17
143 -- First_Entity Node17
144 -- First_Index Node17
145 -- First_Literal Node17
148 -- Non_Limited_View Node17
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Record_Type Node18
154 -- Delta_Value Ureal18
155 -- Enclosing_Scope Node18
156 -- Equivalent_Type Node18
157 -- Private_Dependents Elist18
158 -- Renamed_Entity Node18
159 -- Renamed_Object Node18
161 -- Body_Entity Node19
162 -- Corresponding_Discriminant Node19
163 -- Finalization_Chain_Entity Node19
164 -- Parent_Subtype Node19
165 -- Related_Array_Object Node19
166 -- Size_Check_Code Node19
167 -- Spec_Entity Node19
168 -- Underlying_Full_View Node19
170 -- Component_Type Node20
171 -- Default_Value Node20
172 -- Directly_Designated_Type Node20
173 -- Discriminant_Checking_Func Node20
174 -- Discriminant_Default_Value Node20
175 -- Last_Entity Node20
176 -- Prival_Link Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Array_Type Node21
185 -- Small_Value Ureal21
187 -- Associated_Storage_Pool Node22
188 -- Component_Size Uint22
189 -- Corresponding_Remote_Type Node22
190 -- Enumeration_Rep_Expr Node22
191 -- Exception_Code Uint22
192 -- Original_Record_Component Node22
193 -- Private_View Node22
194 -- Protected_Formal Node22
195 -- Scope_Depth_Value Uint22
196 -- Shared_Var_Assign_Proc Node22
198 -- Associated_Final_Chain Node23
199 -- CR_Discriminant Node23
200 -- Entry_Cancel_Parameter Node23
201 -- Enum_Pos_To_Rep Node23
202 -- Extra_Constrained Node23
203 -- Generic_Renamings Elist23
204 -- Inner_Instances Elist23
205 -- Limited_View Node23
206 -- Packed_Array_Type Node23
207 -- Protection_Object Node23
208 -- Stored_Constraint Elist23
210 -- Spec_PPC_List Node24
212 -- Abstract_Interface_Alias Node25
213 -- Abstract_Interfaces Elist25
214 -- Debug_Renaming_Link Node25
215 -- DT_Offset_To_Top_Func Node25
216 -- Task_Body_Procedure Node25
218 -- Dispatch_Table_Wrapper Node26
219 -- Last_Assignment Node26
220 -- Overridden_Operation Node26
221 -- Package_Instantiation Node26
222 -- Related_Type Node26
223 -- Relative_Deadline_Variable Node26
224 -- Static_Initialization Node26
226 -- Current_Use_Clause Node27
227 -- Wrapped_Entity Node27
229 -- Extra_Formals Node28
231 ---------------------------------------------
232 -- Usage of Flags in Defining Entity Nodes --
233 ---------------------------------------------
235 -- All flags are unique, there is no overlaying, so each flag is physically
236 -- present in every entity. However, for many of the flags, it only makes
237 -- sense for them to be set true for certain subsets of entity kinds. See
238 -- the spec of Einfo for further details.
240 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
241 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
242 -- which are common to all nodes, including entity nodes.
245 -- Has_Discriminants Flag5
246 -- Is_Dispatching_Operation Flag6
247 -- Is_Immediately_Visible Flag7
249 -- Is_Potentially_Use_Visible Flag9
253 -- Is_Constrained Flag12
254 -- Is_Generic_Type Flag13
255 -- Depends_On_Private Flag14
257 -- Is_Volatile Flag16
258 -- Is_Internal Flag17
259 -- Has_Delayed_Freeze Flag18
260 -- Is_Abstract_Subprogram Flag19
261 -- Is_Concurrent_Record_Type Flag20
263 -- Has_Master_Entity Flag21
264 -- Needs_No_Actuals Flag22
265 -- Has_Storage_Size_Clause Flag23
266 -- Is_Imported Flag24
267 -- Is_Limited_Record Flag25
268 -- Has_Completion Flag26
269 -- Has_Pragma_Controlled Flag27
270 -- Is_Statically_Allocated Flag28
271 -- Has_Size_Clause Flag29
274 -- Checks_May_Be_Suppressed Flag31
275 -- Kill_Elaboration_Checks Flag32
276 -- Kill_Range_Checks Flag33
277 -- Kill_Tag_Checks Flag34
278 -- Is_Class_Wide_Equivalent_Type Flag35
279 -- Referenced_As_LHS Flag36
280 -- Is_Known_Non_Null Flag37
281 -- Can_Never_Be_Null Flag38
282 -- Is_Overriding_Operation Flag39
283 -- Body_Needed_For_SAL Flag40
285 -- Treat_As_Volatile Flag41
286 -- Is_Controlled Flag42
287 -- Has_Controlled_Component Flag43
289 -- In_Private_Part Flag45
290 -- Has_Alignment_Clause Flag46
292 -- In_Package_Body Flag48
294 -- Delay_Subprogram_Descriptors Flag50
297 -- Is_Entry_Formal Flag52
298 -- Is_Private_Descendant Flag53
299 -- Return_Present Flag54
300 -- Is_Tagged_Type Flag55
301 -- Has_Homonym Flag56
303 -- Non_Binary_Modulus Flag58
304 -- Is_Preelaborated Flag59
305 -- Is_Shared_Passive Flag60
307 -- Is_Remote_Types Flag61
308 -- Is_Remote_Call_Interface Flag62
309 -- Is_Character_Type Flag63
310 -- Is_Intrinsic_Subprogram Flag64
311 -- Has_Record_Rep_Clause Flag65
312 -- Has_Enumeration_Rep_Clause Flag66
313 -- Has_Small_Clause Flag67
314 -- Has_Component_Size_Clause Flag68
315 -- Is_Access_Constant Flag69
316 -- Is_First_Subtype Flag70
318 -- Has_Completion_In_Body Flag71
319 -- Has_Unknown_Discriminants Flag72
320 -- Is_Child_Unit Flag73
321 -- Is_CPP_Class Flag74
322 -- Has_Non_Standard_Rep Flag75
323 -- Is_Constructor Flag76
324 -- Static_Elaboration_Desired Flag77
326 -- Has_All_Calls_Remote Flag79
327 -- Is_Constr_Subt_For_U_Nominal Flag80
329 -- Is_Asynchronous Flag81
330 -- Has_Gigi_Rep_Item Flag82
331 -- Has_Machine_Radix_Clause Flag83
332 -- Machine_Radix_10 Flag84
334 -- Has_Atomic_Components Flag86
335 -- Has_Volatile_Components Flag87
336 -- Discard_Names Flag88
337 -- Is_Interrupt_Handler Flag89
338 -- Returns_By_Ref Flag90
341 -- Size_Known_At_Compile_Time Flag92
342 -- Has_Subprogram_Descriptor Flag93
343 -- Is_Generic_Actual_Type Flag94
344 -- Uses_Sec_Stack Flag95
345 -- Warnings_Off Flag96
346 -- Is_Controlling_Formal Flag97
347 -- Has_Controlling_Result Flag98
348 -- Is_Exported Flag99
349 -- Has_Specified_Layout Flag100
351 -- Has_Nested_Block_With_Handler Flag101
353 -- Is_Completely_Hidden Flag103
354 -- Address_Taken Flag104
355 -- Suppress_Init_Proc Flag105
356 -- Is_Limited_Composite Flag106
357 -- Is_Private_Composite Flag107
358 -- Default_Expressions_Processed Flag108
359 -- Is_Non_Static_Subtype Flag109
360 -- Has_External_Tag_Rep_Clause Flag110
362 -- Is_Formal_Subprogram Flag111
363 -- Is_Renaming_Of_Object Flag112
365 -- Delay_Cleanups Flag114
366 -- Never_Set_In_Source Flag115
367 -- Is_Visible_Child_Unit Flag116
368 -- Is_Unchecked_Union Flag117
369 -- Is_For_Access_Subtype Flag118
370 -- Has_Convention_Pragma Flag119
371 -- Has_Primitive_Operations Flag120
373 -- Has_Pragma_Pack Flag121
374 -- Is_Bit_Packed_Array Flag122
375 -- Has_Unchecked_Union Flag123
376 -- Is_Eliminated Flag124
377 -- C_Pass_By_Copy Flag125
378 -- Is_Instantiated Flag126
379 -- Is_Valued_Procedure Flag127
380 -- (used for Component_Alignment) Flag128
381 -- (used for Component_Alignment) Flag129
382 -- Is_Generic_Instance Flag130
384 -- No_Pool_Assigned Flag131
385 -- Is_AST_Entry Flag132
386 -- Is_VMS_Exception Flag133
387 -- Is_Optional_Parameter Flag134
388 -- Has_Aliased_Components Flag135
389 -- No_Strict_Aliasing Flag136
390 -- Is_Machine_Code_Subprogram Flag137
391 -- Is_Packed_Array_Type Flag138
392 -- Has_Biased_Representation Flag139
393 -- Has_Complex_Representation Flag140
395 -- Is_Constr_Subt_For_UN_Aliased Flag141
396 -- Has_Missing_Return Flag142
397 -- Has_Recursive_Call Flag143
398 -- Is_Unsigned_Type Flag144
399 -- Strict_Alignment Flag145
400 -- Is_Abstract_Type Flag146
401 -- Needs_Debug_Info Flag147
402 -- Suppress_Elaboration_Warnings Flag148
403 -- Is_Compilation_Unit Flag149
404 -- Has_Pragma_Elaborate_Body Flag150
407 -- Entry_Accepted Flag152
408 -- Is_Obsolescent Flag153
409 -- Has_Per_Object_Constraint Flag154
410 -- Has_Private_Declaration Flag155
411 -- Referenced Flag156
412 -- Has_Pragma_Inline Flag157
413 -- Finalize_Storage_Only Flag158
414 -- From_With_Type Flag159
415 -- Is_Package_Body_Entity Flag160
417 -- Has_Qualified_Name Flag161
418 -- Nonzero_Is_True Flag162
419 -- Is_True_Constant Flag163
420 -- Reverse_Bit_Order Flag164
421 -- Suppress_Style_Checks Flag165
422 -- Debug_Info_Off Flag166
423 -- Sec_Stack_Needed_For_Return Flag167
424 -- Materialize_Entity Flag168
425 -- Function_Returns_With_DSP Flag169
426 -- Is_Known_Valid Flag170
428 -- Is_Hidden_Open_Scope Flag171
429 -- Has_Object_Size_Clause Flag172
430 -- Has_Fully_Qualified_Name Flag173
431 -- Elaboration_Entity_Required Flag174
432 -- Has_Forward_Instantiation Flag175
433 -- Is_Discrim_SO_Function Flag176
434 -- Size_Depends_On_Discriminant Flag177
435 -- Is_Null_Init_Proc Flag178
436 -- Has_Pragma_Pure_Function Flag179
437 -- Has_Pragma_Unreferenced Flag180
439 -- Has_Contiguous_Rep Flag181
440 -- Has_Xref_Entry Flag182
441 -- Must_Be_On_Byte_Boundary Flag183
442 -- Has_Stream_Size_Clause Flag184
443 -- Is_Ada_2005_Only Flag185
444 -- Is_Interface Flag186
445 -- Has_Constrained_Partial_View Flag187
446 -- Has_Persistent_BSS Flag188
447 -- Is_Pure_Unit_Access_Type Flag189
448 -- Has_Specified_Stream_Input Flag190
450 -- Has_Specified_Stream_Output Flag191
451 -- Has_Specified_Stream_Read Flag192
452 -- Has_Specified_Stream_Write Flag193
453 -- Is_Local_Anonymous_Access Flag194
454 -- Is_Primitive_Wrapper Flag195
455 -- Was_Hidden Flag196
456 -- Is_Limited_Interface Flag197
457 -- Is_Protected_Interface Flag198
458 -- Is_Synchronized_Interface Flag199
459 -- Is_Task_Interface Flag200
461 -- Has_Anon_Block_Suffix Flag201
462 -- Itype_Printed Flag202
463 -- Has_Pragma_Pure Flag203
464 -- Is_Known_Null Flag204
465 -- Low_Bound_Known Flag205
466 -- Is_Visible_Formal Flag206
467 -- Known_To_Have_Preelab_Init Flag207
468 -- Must_Have_Preelab_Init Flag208
469 -- Is_Return_Object Flag209
470 -- Elaborate_Body_Desirable Flag210
472 -- Has_Static_Discriminants Flag211
473 -- Has_Pragma_Unreferenced_Objects Flag212
474 -- Requires_Overriding Flag213
476 -- Has_Up_Level_Access Flag215
477 -- Universal_Aliasing Flag216
478 -- Suppress_Value_Tracking_On_Call Flag217
479 -- Is_Primitive Flag218
480 -- Has_Initial_Value Flag219
481 -- Has_Dispatch_Table Flag220
483 -- Has_Pragma_Preelab_Init Flag221
484 -- Used_As_Generic_Actual Flag222
485 -- Is_Descendent_Of_Address Flag223
488 -- Is_Only_Out_Parameter Flag226
489 -- Referenced_As_Out_Parameter Flag227
490 -- Has_Thunks Flag228
491 -- Can_Use_Internal_Rep Flag229
492 -- Has_Pragma_Inline_Always Flag230
494 -- Renamed_In_Spec Flag231
495 -- Implemented_By_Entry Flag232
496 -- Has_Pragma_Unmodified Flag233
497 -- Is_Dispatch_Table_Entity Flag234
498 -- Is_Trivial_Subprogram Flag235
499 -- Warnings_Off_Used Flag236
500 -- Warnings_Off_Used_Unmodified Flag237
501 -- Warnings_Off_Used_Unreferenced Flag238
502 -- OK_To_Reorder_Components Flag239
503 -- Has_Postconditions Flag240
505 -- Optimize_Alignment_Space Flag241
506 -- Optimize_Alignment_Time Flag242
507 -- Overlays_Constant Flag243
514 -----------------------
515 -- Local subprograms --
516 -----------------------
518 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
519 -- Returns the attribute definition clause for Id whose name is Rep_Name.
520 -- Returns Empty if no matching attribute definition clause found for Id.
526 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
530 Ritem := First_Rep_Item (Id);
531 while Present (Ritem) loop
532 if Nkind (Ritem) = N_Attribute_Definition_Clause
533 and then Chars (Ritem) = Rep_Name
537 Ritem := Next_Rep_Item (Ritem);
544 --------------------------------
545 -- Attribute Access Functions --
546 --------------------------------
548 function Abstract_Interfaces (Id : E) return L is
550 pragma Assert (Is_Record_Type (Id));
552 end Abstract_Interfaces;
554 function Abstract_Interface_Alias (Id : E) return E is
556 pragma Assert (Is_Subprogram (Id));
558 end Abstract_Interface_Alias;
560 function Accept_Address (Id : E) return L is
565 function Access_Disp_Table (Id : E) return L is
567 pragma Assert (Is_Tagged_Type (Id));
568 return Elist16 (Implementation_Base_Type (Id));
569 end Access_Disp_Table;
571 function Actual_Subtype (Id : E) return E is
574 (Ekind (Id) = E_Constant
575 or else Ekind (Id) = E_Variable
576 or else Ekind (Id) = E_Generic_In_Out_Parameter
577 or else Is_Formal (Id));
581 function Address_Taken (Id : E) return B is
586 function Alias (Id : E) return E is
589 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
593 function Alignment (Id : E) return U is
595 pragma Assert (Is_Type (Id)
596 or else Is_Formal (Id)
597 or else Ekind (Id) = E_Loop_Parameter
598 or else Ekind (Id) = E_Constant
599 or else Ekind (Id) = E_Exception
600 or else Ekind (Id) = E_Variable);
604 function Associated_Final_Chain (Id : E) return E is
606 pragma Assert (Is_Access_Type (Id));
608 end Associated_Final_Chain;
610 function Associated_Formal_Package (Id : E) return E is
612 pragma Assert (Ekind (Id) = E_Package);
614 end Associated_Formal_Package;
616 function Associated_Node_For_Itype (Id : E) return N is
619 end Associated_Node_For_Itype;
621 function Associated_Storage_Pool (Id : E) return E is
623 pragma Assert (Is_Access_Type (Id));
624 return Node22 (Root_Type (Id));
625 end Associated_Storage_Pool;
627 function Barrier_Function (Id : E) return N is
629 pragma Assert (Is_Entry (Id));
631 end Barrier_Function;
633 function Block_Node (Id : E) return N is
635 pragma Assert (Ekind (Id) = E_Block);
639 function Body_Entity (Id : E) return E is
642 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
646 function Body_Needed_For_SAL (Id : E) return B is
649 (Ekind (Id) = E_Package
650 or else Is_Subprogram (Id)
651 or else Is_Generic_Unit (Id));
653 end Body_Needed_For_SAL;
655 function C_Pass_By_Copy (Id : E) return B is
657 pragma Assert (Is_Record_Type (Id));
658 return Flag125 (Implementation_Base_Type (Id));
661 function Can_Never_Be_Null (Id : E) return B is
664 end Can_Never_Be_Null;
666 function Checks_May_Be_Suppressed (Id : E) return B is
669 end Checks_May_Be_Suppressed;
671 function Class_Wide_Type (Id : E) return E is
673 pragma Assert (Is_Type (Id));
677 function Cloned_Subtype (Id : E) return E is
680 (Ekind (Id) = E_Record_Subtype
681 or else Ekind (Id) = E_Class_Wide_Subtype);
685 function Component_Bit_Offset (Id : E) return U is
688 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
690 end Component_Bit_Offset;
692 function Component_Clause (Id : E) return N is
695 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
697 end Component_Clause;
699 function Component_Size (Id : E) return U is
701 pragma Assert (Is_Array_Type (Id));
702 return Uint22 (Implementation_Base_Type (Id));
705 function Component_Type (Id : E) return E is
707 return Node20 (Implementation_Base_Type (Id));
710 function Corresponding_Concurrent_Type (Id : E) return E is
712 pragma Assert (Ekind (Id) = E_Record_Type);
714 end Corresponding_Concurrent_Type;
716 function Corresponding_Discriminant (Id : E) return E is
718 pragma Assert (Ekind (Id) = E_Discriminant);
720 end Corresponding_Discriminant;
722 function Corresponding_Equality (Id : E) return E is
725 (Ekind (Id) = E_Function
726 and then not Comes_From_Source (Id)
727 and then Chars (Id) = Name_Op_Ne);
729 end Corresponding_Equality;
731 function Corresponding_Record_Type (Id : E) return E is
733 pragma Assert (Is_Concurrent_Type (Id));
735 end Corresponding_Record_Type;
737 function Corresponding_Remote_Type (Id : E) return E is
740 end Corresponding_Remote_Type;
742 function Current_Use_Clause (Id : E) return E is
744 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
746 end Current_Use_Clause;
748 function Current_Value (Id : E) return N is
750 pragma Assert (Ekind (Id) in Object_Kind);
754 function CR_Discriminant (Id : E) return E is
759 function Debug_Info_Off (Id : E) return B is
764 function Debug_Renaming_Link (Id : E) return E is
767 end Debug_Renaming_Link;
769 function Default_Expr_Function (Id : E) return E is
771 pragma Assert (Is_Formal (Id));
773 end Default_Expr_Function;
775 function Default_Expressions_Processed (Id : E) return B is
778 end Default_Expressions_Processed;
780 function Default_Value (Id : E) return N is
782 pragma Assert (Is_Formal (Id));
786 function Delay_Cleanups (Id : E) return B is
791 function Delay_Subprogram_Descriptors (Id : E) return B is
794 end Delay_Subprogram_Descriptors;
796 function Delta_Value (Id : E) return R is
798 pragma Assert (Is_Fixed_Point_Type (Id));
802 function Dependent_Instances (Id : E) return L is
804 pragma Assert (Is_Generic_Instance (Id));
806 end Dependent_Instances;
808 function Depends_On_Private (Id : E) return B is
810 pragma Assert (Nkind (Id) in N_Entity);
812 end Depends_On_Private;
814 function Digits_Value (Id : E) return U is
817 (Is_Floating_Point_Type (Id)
818 or else Is_Decimal_Fixed_Point_Type (Id));
822 function Directly_Designated_Type (Id : E) return E is
825 end Directly_Designated_Type;
827 function Discard_Names (Id : E) return B is
832 function Discriminal (Id : E) return E is
834 pragma Assert (Ekind (Id) = E_Discriminant);
838 function Discriminal_Link (Id : E) return N is
841 end Discriminal_Link;
843 function Discriminant_Checking_Func (Id : E) return E is
845 pragma Assert (Ekind (Id) = E_Component);
847 end Discriminant_Checking_Func;
849 function Discriminant_Constraint (Id : E) return L is
851 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
853 end Discriminant_Constraint;
855 function Discriminant_Default_Value (Id : E) return N is
857 pragma Assert (Ekind (Id) = E_Discriminant);
859 end Discriminant_Default_Value;
861 function Discriminant_Number (Id : E) return U is
863 pragma Assert (Ekind (Id) = E_Discriminant);
865 end Discriminant_Number;
867 function Dispatch_Table_Wrapper (Id : E) return E is
869 pragma Assert (Is_Tagged_Type (Id));
870 return Node26 (Implementation_Base_Type (Id));
871 end Dispatch_Table_Wrapper;
873 function DT_Entry_Count (Id : E) return U is
875 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
879 function DT_Offset_To_Top_Func (Id : E) return E is
881 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
883 end DT_Offset_To_Top_Func;
885 function DT_Position (Id : E) return U is
888 ((Ekind (Id) = E_Function
889 or else Ekind (Id) = E_Procedure)
890 and then Present (DTC_Entity (Id)));
894 function DTC_Entity (Id : E) return E is
897 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
901 function Elaborate_Body_Desirable (Id : E) return B is
903 pragma Assert (Ekind (Id) = E_Package);
905 end Elaborate_Body_Desirable;
907 function Elaboration_Entity (Id : E) return E is
912 Ekind (Id) = E_Package
914 Is_Generic_Unit (Id));
916 end Elaboration_Entity;
918 function Elaboration_Entity_Required (Id : E) return B is
923 Ekind (Id) = E_Package
925 Is_Generic_Unit (Id));
927 end Elaboration_Entity_Required;
929 function Enclosing_Scope (Id : E) return E is
934 function Entry_Accepted (Id : E) return B is
936 pragma Assert (Is_Entry (Id));
940 function Entry_Bodies_Array (Id : E) return E is
943 end Entry_Bodies_Array;
945 function Entry_Cancel_Parameter (Id : E) return E is
948 end Entry_Cancel_Parameter;
950 function Entry_Component (Id : E) return E is
955 function Entry_Formal (Id : E) return E is
960 function Entry_Index_Constant (Id : E) return N is
962 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
964 end Entry_Index_Constant;
966 function Entry_Parameters_Type (Id : E) return E is
969 end Entry_Parameters_Type;
971 function Enum_Pos_To_Rep (Id : E) return E is
973 pragma Assert (Ekind (Id) = E_Enumeration_Type);
977 function Enumeration_Pos (Id : E) return Uint is
979 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
983 function Enumeration_Rep (Id : E) return U is
985 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
989 function Enumeration_Rep_Expr (Id : E) return N is
991 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
993 end Enumeration_Rep_Expr;
995 function Equivalent_Type (Id : E) return E is
998 (Ekind (Id) = E_Class_Wide_Subtype or else
999 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
1000 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
1001 Ekind (Id) = E_Access_Subprogram_Type or else
1002 Ekind (Id) = E_Exception_Type);
1004 end Equivalent_Type;
1006 function Esize (Id : E) return Uint is
1011 function Exception_Code (Id : E) return Uint is
1013 pragma Assert (Ekind (Id) = E_Exception);
1017 function Extra_Accessibility (Id : E) return E is
1019 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1021 end Extra_Accessibility;
1023 function Extra_Constrained (Id : E) return E is
1025 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1027 end Extra_Constrained;
1029 function Extra_Formal (Id : E) return E is
1034 function Extra_Formals (Id : E) return E is
1037 (Is_Overloadable (Id)
1038 or else Ekind (Id) = E_Entry_Family
1039 or else Ekind (Id) = E_Subprogram_Body
1040 or else Ekind (Id) = E_Subprogram_Type);
1044 function Can_Use_Internal_Rep (Id : E) return B is
1046 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1047 return Flag229 (Base_Type (Id));
1048 end Can_Use_Internal_Rep;
1050 function Finalization_Chain_Entity (Id : E) return E is
1053 end Finalization_Chain_Entity;
1055 function Finalize_Storage_Only (Id : E) return B is
1057 pragma Assert (Is_Type (Id));
1058 return Flag158 (Base_Type (Id));
1059 end Finalize_Storage_Only;
1061 function First_Entity (Id : E) return E is
1066 function First_Index (Id : E) return N is
1068 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1072 function First_Literal (Id : E) return E is
1074 pragma Assert (Is_Enumeration_Type (Id));
1078 function First_Optional_Parameter (Id : E) return E is
1081 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1083 end First_Optional_Parameter;
1085 function First_Private_Entity (Id : E) return E is
1087 pragma Assert (Ekind (Id) = E_Package
1088 or else Ekind (Id) = E_Generic_Package
1089 or else Ekind (Id) in Concurrent_Kind);
1091 end First_Private_Entity;
1093 function First_Rep_Item (Id : E) return E is
1098 function Freeze_Node (Id : E) return N is
1103 function From_With_Type (Id : E) return B is
1105 return Flag159 (Id);
1108 function Full_View (Id : E) return E is
1110 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1114 function Function_Returns_With_DSP (Id : E) return B is
1117 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1118 return Flag169 (Id);
1119 end Function_Returns_With_DSP;
1121 function Generic_Homonym (Id : E) return E is
1123 pragma Assert (Ekind (Id) = E_Generic_Package);
1125 end Generic_Homonym;
1127 function Generic_Renamings (Id : E) return L is
1129 return Elist23 (Id);
1130 end Generic_Renamings;
1132 function Handler_Records (Id : E) return S is
1135 end Handler_Records;
1137 function Has_Aliased_Components (Id : E) return B is
1139 return Flag135 (Implementation_Base_Type (Id));
1140 end Has_Aliased_Components;
1142 function Has_Alignment_Clause (Id : E) return B is
1145 end Has_Alignment_Clause;
1147 function Has_All_Calls_Remote (Id : E) return B is
1150 end Has_All_Calls_Remote;
1152 function Has_Anon_Block_Suffix (Id : E) return B is
1154 return Flag201 (Id);
1155 end Has_Anon_Block_Suffix;
1157 function Has_Atomic_Components (Id : E) return B is
1159 return Flag86 (Implementation_Base_Type (Id));
1160 end Has_Atomic_Components;
1162 function Has_Biased_Representation (Id : E) return B is
1164 return Flag139 (Id);
1165 end Has_Biased_Representation;
1167 function Has_Completion (Id : E) return B is
1172 function Has_Completion_In_Body (Id : E) return B is
1174 pragma Assert (Is_Type (Id));
1176 end Has_Completion_In_Body;
1178 function Has_Complex_Representation (Id : E) return B is
1180 pragma Assert (Is_Type (Id));
1181 return Flag140 (Implementation_Base_Type (Id));
1182 end Has_Complex_Representation;
1184 function Has_Component_Size_Clause (Id : E) return B is
1186 pragma Assert (Is_Array_Type (Id));
1187 return Flag68 (Implementation_Base_Type (Id));
1188 end Has_Component_Size_Clause;
1190 function Has_Constrained_Partial_View (Id : E) return B is
1192 pragma Assert (Is_Type (Id));
1193 return Flag187 (Id);
1194 end Has_Constrained_Partial_View;
1196 function Has_Controlled_Component (Id : E) return B is
1198 return Flag43 (Base_Type (Id));
1199 end Has_Controlled_Component;
1201 function Has_Contiguous_Rep (Id : E) return B is
1203 return Flag181 (Id);
1204 end Has_Contiguous_Rep;
1206 function Has_Controlling_Result (Id : E) return B is
1209 end Has_Controlling_Result;
1211 function Has_Convention_Pragma (Id : E) return B is
1213 return Flag119 (Id);
1214 end Has_Convention_Pragma;
1216 function Has_Delayed_Freeze (Id : E) return B is
1218 pragma Assert (Nkind (Id) in N_Entity);
1220 end Has_Delayed_Freeze;
1222 function Has_Discriminants (Id : E) return B is
1224 pragma Assert (Nkind (Id) in N_Entity);
1226 end Has_Discriminants;
1228 function Has_Dispatch_Table (Id : E) return B is
1230 pragma Assert (Is_Tagged_Type (Id));
1231 return Flag220 (Id);
1232 end Has_Dispatch_Table;
1234 function Has_Enumeration_Rep_Clause (Id : E) return B is
1236 pragma Assert (Is_Enumeration_Type (Id));
1238 end Has_Enumeration_Rep_Clause;
1240 function Has_Exit (Id : E) return B is
1245 function Has_External_Tag_Rep_Clause (Id : E) return B is
1247 pragma Assert (Is_Tagged_Type (Id));
1248 return Flag110 (Id);
1249 end Has_External_Tag_Rep_Clause;
1251 function Has_Forward_Instantiation (Id : E) return B is
1253 return Flag175 (Id);
1254 end Has_Forward_Instantiation;
1256 function Has_Fully_Qualified_Name (Id : E) return B is
1258 return Flag173 (Id);
1259 end Has_Fully_Qualified_Name;
1261 function Has_Gigi_Rep_Item (Id : E) return B is
1264 end Has_Gigi_Rep_Item;
1266 function Has_Homonym (Id : E) return B is
1271 function Has_Initial_Value (Id : E) return B is
1274 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1275 return Flag219 (Id);
1276 end Has_Initial_Value;
1278 function Has_Machine_Radix_Clause (Id : E) return B is
1280 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1282 end Has_Machine_Radix_Clause;
1284 function Has_Master_Entity (Id : E) return B is
1287 end Has_Master_Entity;
1289 function Has_Missing_Return (Id : E) return B is
1292 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1293 return Flag142 (Id);
1294 end Has_Missing_Return;
1296 function Has_Nested_Block_With_Handler (Id : E) return B is
1298 return Flag101 (Id);
1299 end Has_Nested_Block_With_Handler;
1301 function Has_Non_Standard_Rep (Id : E) return B is
1303 return Flag75 (Implementation_Base_Type (Id));
1304 end Has_Non_Standard_Rep;
1306 function Has_Object_Size_Clause (Id : E) return B is
1308 pragma Assert (Is_Type (Id));
1309 return Flag172 (Id);
1310 end Has_Object_Size_Clause;
1312 function Has_Per_Object_Constraint (Id : E) return B is
1314 return Flag154 (Id);
1315 end Has_Per_Object_Constraint;
1317 function Has_Persistent_BSS (Id : E) return B is
1319 return Flag188 (Id);
1320 end Has_Persistent_BSS;
1322 function Has_Postconditions (Id : E) return B is
1324 pragma Assert (Is_Subprogram (Id));
1325 return Flag240 (Id);
1326 end Has_Postconditions;
1328 function Has_Pragma_Controlled (Id : E) return B is
1330 pragma Assert (Is_Access_Type (Id));
1331 return Flag27 (Implementation_Base_Type (Id));
1332 end Has_Pragma_Controlled;
1334 function Has_Pragma_Elaborate_Body (Id : E) return B is
1336 return Flag150 (Id);
1337 end Has_Pragma_Elaborate_Body;
1339 function Has_Pragma_Inline (Id : E) return B is
1341 return Flag157 (Id);
1342 end Has_Pragma_Inline;
1344 function Has_Pragma_Inline_Always (Id : E) return B is
1346 return Flag230 (Id);
1347 end Has_Pragma_Inline_Always;
1349 function Has_Pragma_Pack (Id : E) return B is
1351 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1352 return Flag121 (Implementation_Base_Type (Id));
1353 end Has_Pragma_Pack;
1355 function Has_Pragma_Preelab_Init (Id : E) return B is
1357 return Flag221 (Id);
1358 end Has_Pragma_Preelab_Init;
1360 function Has_Pragma_Pure (Id : E) return B is
1362 return Flag203 (Id);
1363 end Has_Pragma_Pure;
1365 function Has_Pragma_Pure_Function (Id : E) return B is
1367 return Flag179 (Id);
1368 end Has_Pragma_Pure_Function;
1370 function Has_Pragma_Unmodified (Id : E) return B is
1372 return Flag233 (Id);
1373 end Has_Pragma_Unmodified;
1375 function Has_Pragma_Unreferenced (Id : E) return B is
1377 return Flag180 (Id);
1378 end Has_Pragma_Unreferenced;
1380 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1382 pragma Assert (Is_Type (Id));
1383 return Flag212 (Id);
1384 end Has_Pragma_Unreferenced_Objects;
1386 function Has_Primitive_Operations (Id : E) return B is
1388 pragma Assert (Is_Type (Id));
1389 return Flag120 (Base_Type (Id));
1390 end Has_Primitive_Operations;
1392 function Has_Private_Declaration (Id : E) return B is
1394 return Flag155 (Id);
1395 end Has_Private_Declaration;
1397 function Has_Qualified_Name (Id : E) return B is
1399 return Flag161 (Id);
1400 end Has_Qualified_Name;
1402 function Has_RACW (Id : E) return B is
1404 pragma Assert (Ekind (Id) = E_Package);
1405 return Flag214 (Id);
1408 function Has_Record_Rep_Clause (Id : E) return B is
1410 pragma Assert (Is_Record_Type (Id));
1411 return Flag65 (Implementation_Base_Type (Id));
1412 end Has_Record_Rep_Clause;
1414 function Has_Recursive_Call (Id : E) return B is
1416 pragma Assert (Is_Subprogram (Id));
1417 return Flag143 (Id);
1418 end Has_Recursive_Call;
1420 function Has_Size_Clause (Id : E) return B is
1423 end Has_Size_Clause;
1425 function Has_Small_Clause (Id : E) return B is
1428 end Has_Small_Clause;
1430 function Has_Specified_Layout (Id : E) return B is
1432 pragma Assert (Is_Type (Id));
1433 return Flag100 (Implementation_Base_Type (Id));
1434 end Has_Specified_Layout;
1436 function Has_Specified_Stream_Input (Id : E) return B is
1438 pragma Assert (Is_Type (Id));
1439 return Flag190 (Id);
1440 end Has_Specified_Stream_Input;
1442 function Has_Specified_Stream_Output (Id : E) return B is
1444 pragma Assert (Is_Type (Id));
1445 return Flag191 (Id);
1446 end Has_Specified_Stream_Output;
1448 function Has_Specified_Stream_Read (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag192 (Id);
1452 end Has_Specified_Stream_Read;
1454 function Has_Specified_Stream_Write (Id : E) return B is
1456 pragma Assert (Is_Type (Id));
1457 return Flag193 (Id);
1458 end Has_Specified_Stream_Write;
1460 function Has_Static_Discriminants (Id : E) return B is
1462 pragma Assert (Is_Type (Id));
1463 return Flag211 (Id);
1464 end Has_Static_Discriminants;
1466 function Has_Storage_Size_Clause (Id : E) return B is
1468 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1469 return Flag23 (Implementation_Base_Type (Id));
1470 end Has_Storage_Size_Clause;
1472 function Has_Stream_Size_Clause (Id : E) return B is
1474 return Flag184 (Id);
1475 end Has_Stream_Size_Clause;
1477 function Has_Subprogram_Descriptor (Id : E) return B is
1480 end Has_Subprogram_Descriptor;
1482 function Has_Task (Id : E) return B is
1484 return Flag30 (Base_Type (Id));
1487 function Has_Thunks (Id : E) return B is
1489 pragma Assert (Ekind (Id) = E_Constant);
1490 return Flag228 (Id);
1493 function Has_Unchecked_Union (Id : E) return B is
1495 return Flag123 (Base_Type (Id));
1496 end Has_Unchecked_Union;
1498 function Has_Unknown_Discriminants (Id : E) return B is
1500 pragma Assert (Is_Type (Id));
1502 end Has_Unknown_Discriminants;
1504 function Has_Up_Level_Access (Id : E) return B is
1507 (Ekind (Id) = E_Variable
1508 or else Ekind (Id) = E_Constant
1509 or else Ekind (Id) = E_Loop_Parameter);
1510 return Flag215 (Id);
1511 end Has_Up_Level_Access;
1513 function Has_Volatile_Components (Id : E) return B is
1515 return Flag87 (Implementation_Base_Type (Id));
1516 end Has_Volatile_Components;
1518 function Has_Xref_Entry (Id : E) return B is
1520 return Flag182 (Implementation_Base_Type (Id));
1523 function Hiding_Loop_Variable (Id : E) return E is
1525 pragma Assert (Ekind (Id) = E_Variable);
1527 end Hiding_Loop_Variable;
1529 function Homonym (Id : E) return E is
1534 function Implemented_By_Entry (Id : E) return B is
1537 (Ekind (Id) = E_Function
1538 or else Ekind (Id) = E_Procedure);
1539 return Flag232 (Id);
1540 end Implemented_By_Entry;
1542 function In_Package_Body (Id : E) return B is
1545 end In_Package_Body;
1547 function In_Private_Part (Id : E) return B is
1550 end In_Private_Part;
1552 function In_Use (Id : E) return B is
1554 pragma Assert (Nkind (Id) in N_Entity);
1558 function Inner_Instances (Id : E) return L is
1560 return Elist23 (Id);
1561 end Inner_Instances;
1563 function Interface_Name (Id : E) return N is
1568 function Is_Abstract_Subprogram (Id : E) return B is
1570 pragma Assert (Is_Overloadable (Id));
1572 end Is_Abstract_Subprogram;
1574 function Is_Abstract_Type (Id : E) return B is
1576 pragma Assert (Is_Type (Id));
1577 return Flag146 (Id);
1578 end Is_Abstract_Type;
1580 function Is_Local_Anonymous_Access (Id : E) return B is
1582 pragma Assert (Is_Access_Type (Id));
1583 return Flag194 (Id);
1584 end Is_Local_Anonymous_Access;
1586 function Is_Access_Constant (Id : E) return B is
1588 pragma Assert (Is_Access_Type (Id));
1590 end Is_Access_Constant;
1592 function Is_Ada_2005_Only (Id : E) return B is
1594 return Flag185 (Id);
1595 end Is_Ada_2005_Only;
1597 function Is_Aliased (Id : E) return B is
1599 pragma Assert (Nkind (Id) in N_Entity);
1603 function Is_AST_Entry (Id : E) return B is
1605 pragma Assert (Is_Entry (Id));
1606 return Flag132 (Id);
1609 function Is_Asynchronous (Id : E) return B is
1612 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1614 end Is_Asynchronous;
1616 function Is_Atomic (Id : E) return B is
1621 function Is_Bit_Packed_Array (Id : E) return B is
1623 return Flag122 (Implementation_Base_Type (Id));
1624 end Is_Bit_Packed_Array;
1626 function Is_Called (Id : E) return B is
1629 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1630 return Flag102 (Id);
1633 function Is_Character_Type (Id : E) return B is
1636 end Is_Character_Type;
1638 function Is_Child_Unit (Id : E) return B is
1643 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1646 end Is_Class_Wide_Equivalent_Type;
1648 function Is_Compilation_Unit (Id : E) return B is
1650 return Flag149 (Id);
1651 end Is_Compilation_Unit;
1653 function Is_Completely_Hidden (Id : E) return B is
1655 pragma Assert (Ekind (Id) = E_Discriminant);
1656 return Flag103 (Id);
1657 end Is_Completely_Hidden;
1659 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1662 end Is_Constr_Subt_For_U_Nominal;
1664 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1666 return Flag141 (Id);
1667 end Is_Constr_Subt_For_UN_Aliased;
1669 function Is_Constrained (Id : E) return B is
1671 pragma Assert (Nkind (Id) in N_Entity);
1675 function Is_Constructor (Id : E) return B is
1680 function Is_Controlled (Id : E) return B is
1682 return Flag42 (Base_Type (Id));
1685 function Is_Controlling_Formal (Id : E) return B is
1687 pragma Assert (Is_Formal (Id));
1689 end Is_Controlling_Formal;
1691 function Is_CPP_Class (Id : E) return B is
1696 function Is_Descendent_Of_Address (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1699 return Flag223 (Id);
1700 end Is_Descendent_Of_Address;
1702 function Is_Discrim_SO_Function (Id : E) return B is
1704 return Flag176 (Id);
1705 end Is_Discrim_SO_Function;
1707 function Is_Dispatch_Table_Entity (Id : E) return B is
1709 return Flag234 (Id);
1710 end Is_Dispatch_Table_Entity;
1712 function Is_Dispatching_Operation (Id : E) return B is
1714 pragma Assert (Nkind (Id) in N_Entity);
1716 end Is_Dispatching_Operation;
1718 function Is_Eliminated (Id : E) return B is
1720 return Flag124 (Id);
1723 function Is_Entry_Formal (Id : E) return B is
1726 end Is_Entry_Formal;
1728 function Is_Exported (Id : E) return B is
1733 function Is_First_Subtype (Id : E) return B is
1736 end Is_First_Subtype;
1738 function Is_For_Access_Subtype (Id : E) return B is
1741 (Ekind (Id) = E_Record_Subtype
1743 Ekind (Id) = E_Private_Subtype);
1744 return Flag118 (Id);
1745 end Is_For_Access_Subtype;
1747 function Is_Formal_Subprogram (Id : E) return B is
1749 return Flag111 (Id);
1750 end Is_Formal_Subprogram;
1752 function Is_Frozen (Id : E) return B is
1757 function Is_Generic_Actual_Type (Id : E) return B is
1759 pragma Assert (Is_Type (Id));
1761 end Is_Generic_Actual_Type;
1763 function Is_Generic_Instance (Id : E) return B is
1765 return Flag130 (Id);
1766 end Is_Generic_Instance;
1768 function Is_Generic_Type (Id : E) return B is
1770 pragma Assert (Nkind (Id) in N_Entity);
1772 end Is_Generic_Type;
1774 function Is_Hidden (Id : E) return B is
1779 function Is_Hidden_Open_Scope (Id : E) return B is
1781 return Flag171 (Id);
1782 end Is_Hidden_Open_Scope;
1784 function Is_Immediately_Visible (Id : E) return B is
1786 pragma Assert (Nkind (Id) in N_Entity);
1788 end Is_Immediately_Visible;
1790 function Is_Imported (Id : E) return B is
1795 function Is_Inlined (Id : E) return B is
1800 function Is_Interface (Id : E) return B is
1802 return Flag186 (Id);
1805 function Is_Instantiated (Id : E) return B is
1807 return Flag126 (Id);
1808 end Is_Instantiated;
1810 function Is_Internal (Id : E) return B is
1812 pragma Assert (Nkind (Id) in N_Entity);
1816 function Is_Interrupt_Handler (Id : E) return B is
1818 pragma Assert (Nkind (Id) in N_Entity);
1820 end Is_Interrupt_Handler;
1822 function Is_Intrinsic_Subprogram (Id : E) return B is
1825 end Is_Intrinsic_Subprogram;
1827 function Is_Itype (Id : E) return B is
1832 function Is_Known_Non_Null (Id : E) return B is
1835 end Is_Known_Non_Null;
1837 function Is_Known_Null (Id : E) return B is
1839 return Flag204 (Id);
1842 function Is_Known_Valid (Id : E) return B is
1844 return Flag170 (Id);
1847 function Is_Limited_Composite (Id : E) return B is
1849 return Flag106 (Id);
1850 end Is_Limited_Composite;
1852 function Is_Limited_Interface (Id : E) return B is
1854 return Flag197 (Id);
1855 end Is_Limited_Interface;
1857 function Is_Limited_Record (Id : E) return B is
1860 end Is_Limited_Record;
1862 function Is_Machine_Code_Subprogram (Id : E) return B is
1864 pragma Assert (Is_Subprogram (Id));
1865 return Flag137 (Id);
1866 end Is_Machine_Code_Subprogram;
1868 function Is_Non_Static_Subtype (Id : E) return B is
1870 pragma Assert (Is_Type (Id));
1871 return Flag109 (Id);
1872 end Is_Non_Static_Subtype;
1874 function Is_Null_Init_Proc (Id : E) return B is
1876 pragma Assert (Ekind (Id) = E_Procedure);
1877 return Flag178 (Id);
1878 end Is_Null_Init_Proc;
1880 function Is_Obsolescent (Id : E) return B is
1882 return Flag153 (Id);
1885 function Is_Only_Out_Parameter (Id : E) return B is
1887 pragma Assert (Is_Formal (Id));
1888 return Flag226 (Id);
1889 end Is_Only_Out_Parameter;
1891 function Is_Optional_Parameter (Id : E) return B is
1893 pragma Assert (Is_Formal (Id));
1894 return Flag134 (Id);
1895 end Is_Optional_Parameter;
1897 function Is_Overriding_Operation (Id : E) return B is
1899 pragma Assert (Is_Subprogram (Id));
1901 end Is_Overriding_Operation;
1903 function Is_Package_Body_Entity (Id : E) return B is
1905 return Flag160 (Id);
1906 end Is_Package_Body_Entity;
1908 function Is_Packed (Id : E) return B is
1910 return Flag51 (Implementation_Base_Type (Id));
1913 function Is_Packed_Array_Type (Id : E) return B is
1915 return Flag138 (Id);
1916 end Is_Packed_Array_Type;
1918 function Is_Potentially_Use_Visible (Id : E) return B is
1920 pragma Assert (Nkind (Id) in N_Entity);
1922 end Is_Potentially_Use_Visible;
1924 function Is_Preelaborated (Id : E) return B is
1927 end Is_Preelaborated;
1929 function Is_Primitive (Id : E) return B is
1932 (Is_Overloadable (Id)
1933 or else Ekind (Id) = E_Generic_Function
1934 or else Ekind (Id) = E_Generic_Procedure);
1935 return Flag218 (Id);
1938 function Is_Primitive_Wrapper (Id : E) return B is
1940 pragma Assert (Ekind (Id) = E_Procedure);
1941 return Flag195 (Id);
1942 end Is_Primitive_Wrapper;
1944 function Is_Private_Composite (Id : E) return B is
1946 pragma Assert (Is_Type (Id));
1947 return Flag107 (Id);
1948 end Is_Private_Composite;
1950 function Is_Private_Descendant (Id : E) return B is
1953 end Is_Private_Descendant;
1955 function Is_Protected_Interface (Id : E) return B is
1957 pragma Assert (Is_Interface (Id));
1958 return Flag198 (Id);
1959 end Is_Protected_Interface;
1961 function Is_Public (Id : E) return B is
1963 pragma Assert (Nkind (Id) in N_Entity);
1967 function Is_Pure (Id : E) return B is
1972 function Is_Pure_Unit_Access_Type (Id : E) return B is
1974 pragma Assert (Is_Access_Type (Id));
1975 return Flag189 (Id);
1976 end Is_Pure_Unit_Access_Type;
1978 function Is_Raised (Id : E) return B is
1980 pragma Assert (Ekind (Id) = E_Exception);
1981 return Flag224 (Id);
1984 function Is_Remote_Call_Interface (Id : E) return B is
1987 end Is_Remote_Call_Interface;
1989 function Is_Remote_Types (Id : E) return B is
1992 end Is_Remote_Types;
1994 function Is_Renaming_Of_Object (Id : E) return B is
1996 return Flag112 (Id);
1997 end Is_Renaming_Of_Object;
1999 function Is_Return_Object (Id : E) return B is
2001 return Flag209 (Id);
2002 end Is_Return_Object;
2004 function Is_Shared_Passive (Id : E) return B is
2007 end Is_Shared_Passive;
2009 function Is_Statically_Allocated (Id : E) return B is
2012 end Is_Statically_Allocated;
2014 function Is_Synchronized_Interface (Id : E) return B is
2016 pragma Assert (Is_Interface (Id));
2017 return Flag199 (Id);
2018 end Is_Synchronized_Interface;
2020 function Is_Tag (Id : E) return B is
2022 pragma Assert (Nkind (Id) in N_Entity);
2026 function Is_Tagged_Type (Id : E) return B is
2031 function Is_Task_Interface (Id : E) return B is
2033 pragma Assert (Is_Interface (Id));
2034 return Flag200 (Id);
2035 end Is_Task_Interface;
2037 function Is_Thunk (Id : E) return B is
2039 pragma Assert (Is_Subprogram (Id));
2040 return Flag225 (Id);
2043 function Is_Trivial_Subprogram (Id : E) return B is
2045 return Flag235 (Id);
2046 end Is_Trivial_Subprogram;
2048 function Is_True_Constant (Id : E) return B is
2050 return Flag163 (Id);
2051 end Is_True_Constant;
2053 function Is_Unchecked_Union (Id : E) return B is
2055 return Flag117 (Implementation_Base_Type (Id));
2056 end Is_Unchecked_Union;
2058 function Is_Unsigned_Type (Id : E) return B is
2060 pragma Assert (Is_Type (Id));
2061 return Flag144 (Id);
2062 end Is_Unsigned_Type;
2064 function Is_Valued_Procedure (Id : E) return B is
2066 pragma Assert (Ekind (Id) = E_Procedure);
2067 return Flag127 (Id);
2068 end Is_Valued_Procedure;
2070 function Is_Visible_Child_Unit (Id : E) return B is
2072 pragma Assert (Is_Child_Unit (Id));
2073 return Flag116 (Id);
2074 end Is_Visible_Child_Unit;
2076 function Is_Visible_Formal (Id : E) return B is
2078 return Flag206 (Id);
2079 end Is_Visible_Formal;
2081 function Is_VMS_Exception (Id : E) return B is
2083 return Flag133 (Id);
2084 end Is_VMS_Exception;
2086 function Is_Volatile (Id : E) return B is
2088 pragma Assert (Nkind (Id) in N_Entity);
2090 if Is_Type (Id) then
2091 return Flag16 (Base_Type (Id));
2097 function Itype_Printed (Id : E) return B is
2099 pragma Assert (Is_Itype (Id));
2100 return Flag202 (Id);
2103 function Kill_Elaboration_Checks (Id : E) return B is
2106 end Kill_Elaboration_Checks;
2108 function Kill_Range_Checks (Id : E) return B is
2111 end Kill_Range_Checks;
2113 function Kill_Tag_Checks (Id : E) return B is
2116 end Kill_Tag_Checks;
2118 function Known_To_Have_Preelab_Init (Id : E) return B is
2120 pragma Assert (Is_Type (Id));
2121 return Flag207 (Id);
2122 end Known_To_Have_Preelab_Init;
2124 function Last_Assignment (Id : E) return N is
2126 pragma Assert (Is_Assignable (Id));
2128 end Last_Assignment;
2130 function Last_Entity (Id : E) return E is
2135 function Limited_View (Id : E) return E is
2137 pragma Assert (Ekind (Id) = E_Package);
2141 function Lit_Indexes (Id : E) return E is
2143 pragma Assert (Is_Enumeration_Type (Id));
2147 function Lit_Strings (Id : E) return E is
2149 pragma Assert (Is_Enumeration_Type (Id));
2153 function Low_Bound_Known (Id : E) return B is
2155 return Flag205 (Id);
2156 end Low_Bound_Known;
2158 function Machine_Radix_10 (Id : E) return B is
2160 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2162 end Machine_Radix_10;
2164 function Master_Id (Id : E) return E is
2166 pragma Assert (Is_Access_Type (Id));
2170 function Materialize_Entity (Id : E) return B is
2172 return Flag168 (Id);
2173 end Materialize_Entity;
2175 function Mechanism (Id : E) return M is
2177 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2178 return UI_To_Int (Uint8 (Id));
2181 function Modulus (Id : E) return Uint is
2183 pragma Assert (Is_Modular_Integer_Type (Id));
2184 return Uint17 (Base_Type (Id));
2187 function Must_Be_On_Byte_Boundary (Id : E) return B is
2189 pragma Assert (Is_Type (Id));
2190 return Flag183 (Id);
2191 end Must_Be_On_Byte_Boundary;
2193 function Must_Have_Preelab_Init (Id : E) return B is
2195 pragma Assert (Is_Type (Id));
2196 return Flag208 (Id);
2197 end Must_Have_Preelab_Init;
2199 function Needs_Debug_Info (Id : E) return B is
2201 return Flag147 (Id);
2202 end Needs_Debug_Info;
2204 function Needs_No_Actuals (Id : E) return B is
2207 (Is_Overloadable (Id)
2208 or else Ekind (Id) = E_Subprogram_Type
2209 or else Ekind (Id) = E_Entry_Family);
2211 end Needs_No_Actuals;
2213 function Never_Set_In_Source (Id : E) return B is
2215 return Flag115 (Id);
2216 end Never_Set_In_Source;
2218 function Next_Inlined_Subprogram (Id : E) return E is
2221 end Next_Inlined_Subprogram;
2223 function No_Pool_Assigned (Id : E) return B is
2225 pragma Assert (Is_Access_Type (Id));
2226 return Flag131 (Root_Type (Id));
2227 end No_Pool_Assigned;
2229 function No_Return (Id : E) return B is
2231 return Flag113 (Id);
2234 function No_Strict_Aliasing (Id : E) return B is
2236 pragma Assert (Is_Access_Type (Id));
2237 return Flag136 (Base_Type (Id));
2238 end No_Strict_Aliasing;
2240 function Non_Binary_Modulus (Id : E) return B is
2242 pragma Assert (Is_Modular_Integer_Type (Id));
2243 return Flag58 (Base_Type (Id));
2244 end Non_Binary_Modulus;
2246 function Non_Limited_View (Id : E) return E is
2248 pragma Assert (Ekind (Id) in Incomplete_Kind);
2250 end Non_Limited_View;
2252 function Nonzero_Is_True (Id : E) return B is
2254 pragma Assert (Root_Type (Id) = Standard_Boolean);
2255 return Flag162 (Base_Type (Id));
2256 end Nonzero_Is_True;
2258 function Normalized_First_Bit (Id : E) return U is
2261 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2263 end Normalized_First_Bit;
2265 function Normalized_Position (Id : E) return U is
2268 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2270 end Normalized_Position;
2272 function Normalized_Position_Max (Id : E) return U is
2275 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2277 end Normalized_Position_Max;
2279 function OK_To_Reorder_Components (Id : E) return B is
2281 pragma Assert (Is_Record_Type (Id));
2282 return Flag239 (Base_Type (Id));
2283 end OK_To_Reorder_Components;
2285 function Optimize_Alignment_Space (Id : E) return B is
2289 or else Ekind (Id) = E_Constant
2290 or else Ekind (Id) = E_Variable);
2291 return Flag241 (Id);
2292 end Optimize_Alignment_Space;
2294 function Optimize_Alignment_Time (Id : E) return B is
2298 or else Ekind (Id) = E_Constant
2299 or else Ekind (Id) = E_Variable);
2300 return Flag242 (Id);
2301 end Optimize_Alignment_Time;
2303 function Original_Array_Type (Id : E) return E is
2305 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2307 end Original_Array_Type;
2309 function Original_Record_Component (Id : E) return E is
2312 (Ekind (Id) = E_Void
2313 or else Ekind (Id) = E_Component
2314 or else Ekind (Id) = E_Discriminant);
2316 end Original_Record_Component;
2318 function Overlays_Constant (Id : E) return B is
2320 return Flag243 (Id);
2321 end Overlays_Constant;
2323 function Overridden_Operation (Id : E) return E is
2326 end Overridden_Operation;
2328 function Package_Instantiation (Id : E) return N is
2332 or else Ekind (Id) = E_Generic_Package
2333 or else Ekind (Id) = E_Package);
2335 end Package_Instantiation;
2337 function Packed_Array_Type (Id : E) return E is
2339 pragma Assert (Is_Array_Type (Id));
2341 end Packed_Array_Type;
2343 function Parent_Subtype (Id : E) return E is
2345 pragma Assert (Ekind (Id) = E_Record_Type);
2349 function Primitive_Operations (Id : E) return L is
2351 pragma Assert (Is_Tagged_Type (Id));
2352 return Elist15 (Id);
2353 end Primitive_Operations;
2355 function Prival (Id : E) return E is
2357 pragma Assert (Is_Protected_Component (Id));
2361 function Prival_Link (Id : E) return E is
2363 pragma Assert (Ekind (Id) = E_Constant
2364 or else Ekind (Id) = E_Variable);
2368 function Private_Dependents (Id : E) return L is
2370 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2371 return Elist18 (Id);
2372 end Private_Dependents;
2374 function Private_View (Id : E) return N is
2376 pragma Assert (Is_Private_Type (Id));
2380 function Protected_Body_Subprogram (Id : E) return E is
2382 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2384 end Protected_Body_Subprogram;
2386 function Protected_Formal (Id : E) return E is
2388 pragma Assert (Is_Formal (Id));
2390 end Protected_Formal;
2392 function Protection_Object (Id : E) return E is
2394 pragma Assert (Ekind (Id) = E_Entry
2395 or else Ekind (Id) = E_Entry_Family
2396 or else Ekind (Id) = E_Function
2397 or else Ekind (Id) = E_Procedure);
2399 end Protection_Object;
2401 function Reachable (Id : E) return B is
2406 function Referenced (Id : E) return B is
2408 return Flag156 (Id);
2411 function Referenced_As_LHS (Id : E) return B is
2414 end Referenced_As_LHS;
2416 function Referenced_As_Out_Parameter (Id : E) return B is
2418 return Flag227 (Id);
2419 end Referenced_As_Out_Parameter;
2421 function Referenced_Object (Id : E) return N is
2423 pragma Assert (Is_Type (Id));
2425 end Referenced_Object;
2427 function Register_Exception_Call (Id : E) return N is
2429 pragma Assert (Ekind (Id) = E_Exception);
2431 end Register_Exception_Call;
2433 function Related_Array_Object (Id : E) return E is
2435 pragma Assert (Is_Array_Type (Id));
2437 end Related_Array_Object;
2439 function Related_Instance (Id : E) return E is
2442 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2444 end Related_Instance;
2446 function Related_Type (Id : E) return E is
2449 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
2453 function Relative_Deadline_Variable (Id : E) return E is
2455 pragma Assert (Is_Task_Type (Id));
2456 return Node26 (Implementation_Base_Type (Id));
2457 end Relative_Deadline_Variable;
2459 function Renamed_Entity (Id : E) return N is
2464 function Renamed_In_Spec (Id : E) return B is
2466 pragma Assert (Ekind (Id) = E_Package);
2467 return Flag231 (Id);
2468 end Renamed_In_Spec;
2470 function Renamed_Object (Id : E) return N is
2475 function Renaming_Map (Id : E) return U is
2480 function Requires_Overriding (Id : E) return B is
2482 pragma Assert (Is_Overloadable (Id));
2483 return Flag213 (Id);
2484 end Requires_Overriding;
2486 function Return_Present (Id : E) return B is
2491 function Return_Applies_To (Id : E) return N is
2494 end Return_Applies_To;
2496 function Returns_By_Ref (Id : E) return B is
2501 function Reverse_Bit_Order (Id : E) return B is
2503 pragma Assert (Is_Record_Type (Id));
2504 return Flag164 (Base_Type (Id));
2505 end Reverse_Bit_Order;
2507 function RM_Size (Id : E) return U is
2509 pragma Assert (Is_Type (Id));
2513 function Scalar_Range (Id : E) return N is
2518 function Scale_Value (Id : E) return U is
2523 function Scope_Depth_Value (Id : E) return U is
2526 end Scope_Depth_Value;
2528 function Sec_Stack_Needed_For_Return (Id : E) return B is
2530 return Flag167 (Id);
2531 end Sec_Stack_Needed_For_Return;
2533 function Shadow_Entities (Id : E) return S is
2536 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2538 end Shadow_Entities;
2540 function Shared_Var_Assign_Proc (Id : E) return E is
2542 pragma Assert (Ekind (Id) = E_Variable);
2544 end Shared_Var_Assign_Proc;
2546 function Shared_Var_Read_Proc (Id : E) return E is
2548 pragma Assert (Ekind (Id) = E_Variable);
2550 end Shared_Var_Read_Proc;
2552 function Size_Check_Code (Id : E) return N is
2554 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2556 end Size_Check_Code;
2558 function Size_Depends_On_Discriminant (Id : E) return B is
2560 return Flag177 (Id);
2561 end Size_Depends_On_Discriminant;
2563 function Size_Known_At_Compile_Time (Id : E) return B is
2566 end Size_Known_At_Compile_Time;
2568 function Small_Value (Id : E) return R is
2570 pragma Assert (Is_Fixed_Point_Type (Id));
2571 return Ureal21 (Id);
2574 function Spec_Entity (Id : E) return E is
2577 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2581 function Spec_PPC_List (Id : E) return N is
2583 pragma Assert (Is_Subprogram (Id));
2587 function Storage_Size_Variable (Id : E) return E is
2589 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2590 return Node15 (Implementation_Base_Type (Id));
2591 end Storage_Size_Variable;
2593 function Static_Elaboration_Desired (Id : E) return B is
2595 pragma Assert (Ekind (Id) = E_Package);
2597 end Static_Elaboration_Desired;
2599 function Static_Initialization (Id : E) return N is
2602 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2604 end Static_Initialization;
2606 function Stored_Constraint (Id : E) return L is
2609 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2610 return Elist23 (Id);
2611 end Stored_Constraint;
2613 function Strict_Alignment (Id : E) return B is
2615 return Flag145 (Implementation_Base_Type (Id));
2616 end Strict_Alignment;
2618 function String_Literal_Length (Id : E) return U is
2621 end String_Literal_Length;
2623 function String_Literal_Low_Bound (Id : E) return N is
2626 end String_Literal_Low_Bound;
2628 function Suppress_Elaboration_Warnings (Id : E) return B is
2630 return Flag148 (Id);
2631 end Suppress_Elaboration_Warnings;
2633 function Suppress_Init_Proc (Id : E) return B is
2635 return Flag105 (Base_Type (Id));
2636 end Suppress_Init_Proc;
2638 function Suppress_Style_Checks (Id : E) return B is
2640 return Flag165 (Id);
2641 end Suppress_Style_Checks;
2643 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2645 return Flag217 (Id);
2646 end Suppress_Value_Tracking_On_Call;
2648 function Task_Body_Procedure (Id : E) return N is
2650 pragma Assert (Ekind (Id) in Task_Kind);
2652 end Task_Body_Procedure;
2654 function Treat_As_Volatile (Id : E) return B is
2657 end Treat_As_Volatile;
2659 function Underlying_Full_View (Id : E) return E is
2661 pragma Assert (Ekind (Id) in Private_Kind);
2663 end Underlying_Full_View;
2665 function Universal_Aliasing (Id : E) return B is
2667 pragma Assert (Is_Type (Id));
2668 return Flag216 (Base_Type (Id));
2669 end Universal_Aliasing;
2671 function Unset_Reference (Id : E) return N is
2674 end Unset_Reference;
2676 function Used_As_Generic_Actual (Id : E) return B is
2678 return Flag222 (Id);
2679 end Used_As_Generic_Actual;
2681 function Uses_Sec_Stack (Id : E) return B is
2686 function Vax_Float (Id : E) return B is
2688 return Flag151 (Base_Type (Id));
2691 function Warnings_Off (Id : E) return B is
2696 function Warnings_Off_Used (Id : E) return B is
2698 return Flag236 (Id);
2699 end Warnings_Off_Used;
2701 function Warnings_Off_Used_Unmodified (Id : E) return B is
2703 return Flag237 (Id);
2704 end Warnings_Off_Used_Unmodified;
2706 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2708 return Flag238 (Id);
2709 end Warnings_Off_Used_Unreferenced;
2711 function Wrapped_Entity (Id : E) return E is
2713 pragma Assert (Ekind (Id) = E_Procedure
2714 and then Is_Primitive_Wrapper (Id));
2718 function Was_Hidden (Id : E) return B is
2720 return Flag196 (Id);
2723 ------------------------------
2724 -- Classification Functions --
2725 ------------------------------
2727 function Is_Access_Type (Id : E) return B is
2729 return Ekind (Id) in Access_Kind;
2732 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2734 return Ekind (Id) in Access_Protected_Kind;
2735 end Is_Access_Protected_Subprogram_Type;
2737 function Is_Access_Subprogram_Type (Id : E) return B is
2739 return Ekind (Id) in Access_Subprogram_Kind;
2740 end Is_Access_Subprogram_Type;
2742 function Is_Array_Type (Id : E) return B is
2744 return Ekind (Id) in Array_Kind;
2747 function Is_Assignable (Id : E) return B is
2749 return Ekind (Id) in Assignable_Kind;
2752 function Is_Class_Wide_Type (Id : E) return B is
2754 return Ekind (Id) in Class_Wide_Kind;
2755 end Is_Class_Wide_Type;
2757 function Is_Composite_Type (Id : E) return B is
2759 return Ekind (Id) in Composite_Kind;
2760 end Is_Composite_Type;
2762 function Is_Concurrent_Body (Id : E) return B is
2764 return Ekind (Id) in
2765 Concurrent_Body_Kind;
2766 end Is_Concurrent_Body;
2768 function Is_Concurrent_Record_Type (Id : E) return B is
2771 end Is_Concurrent_Record_Type;
2773 function Is_Concurrent_Type (Id : E) return B is
2775 return Ekind (Id) in Concurrent_Kind;
2776 end Is_Concurrent_Type;
2778 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2780 return Ekind (Id) in
2781 Decimal_Fixed_Point_Kind;
2782 end Is_Decimal_Fixed_Point_Type;
2784 function Is_Digits_Type (Id : E) return B is
2786 return Ekind (Id) in Digits_Kind;
2789 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2791 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2792 end Is_Discrete_Or_Fixed_Point_Type;
2794 function Is_Discrete_Type (Id : E) return B is
2796 return Ekind (Id) in Discrete_Kind;
2797 end Is_Discrete_Type;
2799 function Is_Elementary_Type (Id : E) return B is
2801 return Ekind (Id) in Elementary_Kind;
2802 end Is_Elementary_Type;
2804 function Is_Entry (Id : E) return B is
2806 return Ekind (Id) in Entry_Kind;
2809 function Is_Enumeration_Type (Id : E) return B is
2811 return Ekind (Id) in
2813 end Is_Enumeration_Type;
2815 function Is_Fixed_Point_Type (Id : E) return B is
2817 return Ekind (Id) in
2819 end Is_Fixed_Point_Type;
2821 function Is_Floating_Point_Type (Id : E) return B is
2823 return Ekind (Id) in Float_Kind;
2824 end Is_Floating_Point_Type;
2826 function Is_Formal (Id : E) return B is
2828 return Ekind (Id) in Formal_Kind;
2831 function Is_Formal_Object (Id : E) return B is
2833 return Ekind (Id) in Formal_Object_Kind;
2834 end Is_Formal_Object;
2836 function Is_Generic_Subprogram (Id : E) return B is
2838 return Ekind (Id) in Generic_Subprogram_Kind;
2839 end Is_Generic_Subprogram;
2841 function Is_Generic_Unit (Id : E) return B is
2843 return Ekind (Id) in Generic_Unit_Kind;
2844 end Is_Generic_Unit;
2846 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2848 return Ekind (Id) in
2849 Incomplete_Or_Private_Kind;
2850 end Is_Incomplete_Or_Private_Type;
2852 function Is_Incomplete_Type (Id : E) return B is
2854 return Ekind (Id) in
2856 end Is_Incomplete_Type;
2858 function Is_Integer_Type (Id : E) return B is
2860 return Ekind (Id) in Integer_Kind;
2861 end Is_Integer_Type;
2863 function Is_Modular_Integer_Type (Id : E) return B is
2865 return Ekind (Id) in
2866 Modular_Integer_Kind;
2867 end Is_Modular_Integer_Type;
2869 function Is_Named_Number (Id : E) return B is
2871 return Ekind (Id) in Named_Kind;
2872 end Is_Named_Number;
2874 function Is_Numeric_Type (Id : E) return B is
2876 return Ekind (Id) in Numeric_Kind;
2877 end Is_Numeric_Type;
2879 function Is_Object (Id : E) return B is
2881 return Ekind (Id) in Object_Kind;
2884 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2886 return Ekind (Id) in
2887 Ordinary_Fixed_Point_Kind;
2888 end Is_Ordinary_Fixed_Point_Type;
2890 function Is_Overloadable (Id : E) return B is
2892 return Ekind (Id) in Overloadable_Kind;
2893 end Is_Overloadable;
2895 function Is_Private_Type (Id : E) return B is
2897 return Ekind (Id) in Private_Kind;
2898 end Is_Private_Type;
2900 function Is_Protected_Type (Id : E) return B is
2902 return Ekind (Id) in Protected_Kind;
2903 end Is_Protected_Type;
2905 function Is_Real_Type (Id : E) return B is
2907 return Ekind (Id) in Real_Kind;
2910 function Is_Record_Type (Id : E) return B is
2912 return Ekind (Id) in Record_Kind;
2915 function Is_Scalar_Type (Id : E) return B is
2917 return Ekind (Id) in Scalar_Kind;
2920 function Is_Signed_Integer_Type (Id : E) return B is
2922 return Ekind (Id) in
2923 Signed_Integer_Kind;
2924 end Is_Signed_Integer_Type;
2926 function Is_Subprogram (Id : E) return B is
2928 return Ekind (Id) in Subprogram_Kind;
2931 function Is_Task_Type (Id : E) return B is
2933 return Ekind (Id) in Task_Kind;
2936 function Is_Type (Id : E) return B is
2938 return Ekind (Id) in Type_Kind;
2941 ------------------------------
2942 -- Attribute Set Procedures --
2943 ------------------------------
2945 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2947 pragma Assert (Is_Record_Type (Id));
2948 Set_Elist25 (Id, V);
2949 end Set_Abstract_Interfaces;
2951 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2956 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function));
2958 end Set_Abstract_Interface_Alias;
2960 procedure Set_Accept_Address (Id : E; V : L) is
2962 Set_Elist21 (Id, V);
2963 end Set_Accept_Address;
2965 procedure Set_Access_Disp_Table (Id : E; V : L) is
2967 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2968 Set_Elist16 (Id, V);
2969 end Set_Access_Disp_Table;
2971 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2973 pragma Assert (Is_Access_Type (Id));
2975 end Set_Associated_Final_Chain;
2977 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2980 end Set_Associated_Formal_Package;
2982 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2985 end Set_Associated_Node_For_Itype;
2987 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2989 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2991 end Set_Associated_Storage_Pool;
2993 procedure Set_Actual_Subtype (Id : E; V : E) is
2996 (Ekind (Id) = E_Constant
2997 or else Ekind (Id) = E_Variable
2998 or else Ekind (Id) = E_Generic_In_Out_Parameter
2999 or else Is_Formal (Id));
3001 end Set_Actual_Subtype;
3003 procedure Set_Address_Taken (Id : E; V : B := True) is
3005 Set_Flag104 (Id, V);
3006 end Set_Address_Taken;
3008 procedure Set_Alias (Id : E; V : E) is
3011 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3015 procedure Set_Alignment (Id : E; V : U) is
3017 pragma Assert (Is_Type (Id)
3018 or else Is_Formal (Id)
3019 or else Ekind (Id) = E_Loop_Parameter
3020 or else Ekind (Id) = E_Constant
3021 or else Ekind (Id) = E_Exception
3022 or else Ekind (Id) = E_Variable);
3026 procedure Set_Barrier_Function (Id : E; V : N) is
3028 pragma Assert (Is_Entry (Id));
3030 end Set_Barrier_Function;
3032 procedure Set_Block_Node (Id : E; V : N) is
3034 pragma Assert (Ekind (Id) = E_Block);
3038 procedure Set_Body_Entity (Id : E; V : E) is
3041 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
3043 end Set_Body_Entity;
3045 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3048 (Ekind (Id) = E_Package
3049 or else Is_Subprogram (Id)
3050 or else Is_Generic_Unit (Id));
3052 end Set_Body_Needed_For_SAL;
3054 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3056 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3057 Set_Flag125 (Id, V);
3058 end Set_C_Pass_By_Copy;
3060 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3063 end Set_Can_Never_Be_Null;
3065 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3068 end Set_Checks_May_Be_Suppressed;
3070 procedure Set_Class_Wide_Type (Id : E; V : E) is
3072 pragma Assert (Is_Type (Id));
3074 end Set_Class_Wide_Type;
3076 procedure Set_Cloned_Subtype (Id : E; V : E) is
3079 (Ekind (Id) = E_Record_Subtype
3080 or else Ekind (Id) = E_Class_Wide_Subtype);
3082 end Set_Cloned_Subtype;
3084 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3087 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3089 end Set_Component_Bit_Offset;
3091 procedure Set_Component_Clause (Id : E; V : N) is
3094 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3096 end Set_Component_Clause;
3098 procedure Set_Component_Size (Id : E; V : U) is
3100 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3102 end Set_Component_Size;
3104 procedure Set_Component_Type (Id : E; V : E) is
3106 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3108 end Set_Component_Type;
3110 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3113 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3115 end Set_Corresponding_Concurrent_Type;
3117 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3119 pragma Assert (Ekind (Id) = E_Discriminant);
3121 end Set_Corresponding_Discriminant;
3123 procedure Set_Corresponding_Equality (Id : E; V : E) is
3126 (Ekind (Id) = E_Function
3127 and then not Comes_From_Source (Id)
3128 and then Chars (Id) = Name_Op_Ne);
3130 end Set_Corresponding_Equality;
3132 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3134 pragma Assert (Is_Concurrent_Type (Id));
3136 end Set_Corresponding_Record_Type;
3138 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3141 end Set_Corresponding_Remote_Type;
3143 procedure Set_Current_Use_Clause (Id : E; V : E) is
3145 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3147 end Set_Current_Use_Clause;
3149 procedure Set_Current_Value (Id : E; V : N) is
3151 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3153 end Set_Current_Value;
3155 procedure Set_CR_Discriminant (Id : E; V : E) is
3158 end Set_CR_Discriminant;
3160 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3162 Set_Flag166 (Id, V);
3163 end Set_Debug_Info_Off;
3165 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3168 end Set_Debug_Renaming_Link;
3170 procedure Set_Default_Expr_Function (Id : E; V : E) is
3172 pragma Assert (Is_Formal (Id));
3174 end Set_Default_Expr_Function;
3176 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3178 Set_Flag108 (Id, V);
3179 end Set_Default_Expressions_Processed;
3181 procedure Set_Default_Value (Id : E; V : N) is
3183 pragma Assert (Is_Formal (Id));
3185 end Set_Default_Value;
3187 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3191 or else Is_Task_Type (Id)
3192 or else Ekind (Id) = E_Block);
3193 Set_Flag114 (Id, V);
3194 end Set_Delay_Cleanups;
3196 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3200 or else Ekind (Id) = E_Package
3201 or else Ekind (Id) = E_Package_Body);
3203 end Set_Delay_Subprogram_Descriptors;
3205 procedure Set_Delta_Value (Id : E; V : R) is
3207 pragma Assert (Is_Fixed_Point_Type (Id));
3208 Set_Ureal18 (Id, V);
3209 end Set_Delta_Value;
3211 procedure Set_Dependent_Instances (Id : E; V : L) is
3213 pragma Assert (Is_Generic_Instance (Id));
3215 end Set_Dependent_Instances;
3217 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3219 pragma Assert (Nkind (Id) in N_Entity);
3221 end Set_Depends_On_Private;
3223 procedure Set_Digits_Value (Id : E; V : U) is
3226 (Is_Floating_Point_Type (Id)
3227 or else Is_Decimal_Fixed_Point_Type (Id));
3229 end Set_Digits_Value;
3231 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3234 end Set_Directly_Designated_Type;
3236 procedure Set_Discard_Names (Id : E; V : B := True) is
3239 end Set_Discard_Names;
3241 procedure Set_Discriminal (Id : E; V : E) is
3243 pragma Assert (Ekind (Id) = E_Discriminant);
3245 end Set_Discriminal;
3247 procedure Set_Discriminal_Link (Id : E; V : E) is
3250 end Set_Discriminal_Link;
3252 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3254 pragma Assert (Ekind (Id) = E_Component);
3256 end Set_Discriminant_Checking_Func;
3258 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3260 pragma Assert (Nkind (Id) in N_Entity);
3261 Set_Elist21 (Id, V);
3262 end Set_Discriminant_Constraint;
3264 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3267 end Set_Discriminant_Default_Value;
3269 procedure Set_Discriminant_Number (Id : E; V : U) is
3272 end Set_Discriminant_Number;
3274 procedure Set_Dispatch_Table_Wrapper (Id : E; V : E) is
3276 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3278 end Set_Dispatch_Table_Wrapper;
3280 procedure Set_DT_Entry_Count (Id : E; V : U) is
3282 pragma Assert (Ekind (Id) = E_Component);
3284 end Set_DT_Entry_Count;
3286 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3288 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3290 end Set_DT_Offset_To_Top_Func;
3292 procedure Set_DT_Position (Id : E; V : U) is
3294 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3296 end Set_DT_Position;
3298 procedure Set_DTC_Entity (Id : E; V : E) is
3301 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3305 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3307 pragma Assert (Ekind (Id) = E_Package);
3308 Set_Flag210 (Id, V);
3309 end Set_Elaborate_Body_Desirable;
3311 procedure Set_Elaboration_Entity (Id : E; V : E) is
3316 Ekind (Id) = E_Package
3318 Is_Generic_Unit (Id));
3320 end Set_Elaboration_Entity;
3322 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3327 Ekind (Id) = E_Package
3329 Is_Generic_Unit (Id));
3330 Set_Flag174 (Id, V);
3331 end Set_Elaboration_Entity_Required;
3333 procedure Set_Enclosing_Scope (Id : E; V : E) is
3336 end Set_Enclosing_Scope;
3338 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3340 pragma Assert (Is_Entry (Id));
3341 Set_Flag152 (Id, V);
3342 end Set_Entry_Accepted;
3344 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3347 end Set_Entry_Bodies_Array;
3349 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3352 end Set_Entry_Cancel_Parameter;
3354 procedure Set_Entry_Component (Id : E; V : E) is
3357 end Set_Entry_Component;
3359 procedure Set_Entry_Formal (Id : E; V : E) is
3362 end Set_Entry_Formal;
3364 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3366 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3368 end Set_Entry_Index_Constant;
3370 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3373 end Set_Entry_Parameters_Type;
3375 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3377 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3379 end Set_Enum_Pos_To_Rep;
3381 procedure Set_Enumeration_Pos (Id : E; V : U) is
3383 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3385 end Set_Enumeration_Pos;
3387 procedure Set_Enumeration_Rep (Id : E; V : U) is
3389 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3391 end Set_Enumeration_Rep;
3393 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3395 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3397 end Set_Enumeration_Rep_Expr;
3399 procedure Set_Equivalent_Type (Id : E; V : E) is
3402 (Ekind (Id) = E_Class_Wide_Type or else
3403 Ekind (Id) = E_Class_Wide_Subtype or else
3404 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3405 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
3406 Ekind (Id) = E_Access_Subprogram_Type or else
3407 Ekind (Id) = E_Exception_Type);
3409 end Set_Equivalent_Type;
3411 procedure Set_Esize (Id : E; V : U) is
3416 procedure Set_Exception_Code (Id : E; V : U) is
3418 pragma Assert (Ekind (Id) = E_Exception);
3420 end Set_Exception_Code;
3422 procedure Set_Extra_Accessibility (Id : E; V : E) is
3424 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3426 end Set_Extra_Accessibility;
3428 procedure Set_Extra_Constrained (Id : E; V : E) is
3430 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3432 end Set_Extra_Constrained;
3434 procedure Set_Extra_Formal (Id : E; V : E) is
3437 end Set_Extra_Formal;
3439 procedure Set_Extra_Formals (Id : E; V : E) is
3442 (Is_Overloadable (Id)
3443 or else Ekind (Id) = E_Entry_Family
3444 or else Ekind (Id) = E_Subprogram_Body
3445 or else Ekind (Id) = E_Subprogram_Type);
3447 end Set_Extra_Formals;
3449 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3452 (Is_Access_Subprogram_Type (Id)
3453 and then Id = Base_Type (Id));
3454 Set_Flag229 (Id, V);
3455 end Set_Can_Use_Internal_Rep;
3457 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3460 end Set_Finalization_Chain_Entity;
3462 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3464 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3465 Set_Flag158 (Id, V);
3466 end Set_Finalize_Storage_Only;
3468 procedure Set_First_Entity (Id : E; V : E) is
3471 end Set_First_Entity;
3473 procedure Set_First_Index (Id : E; V : N) is
3475 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3477 end Set_First_Index;
3479 procedure Set_First_Literal (Id : E; V : E) is
3481 pragma Assert (Is_Enumeration_Type (Id));
3483 end Set_First_Literal;
3485 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3488 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3490 end Set_First_Optional_Parameter;
3492 procedure Set_First_Private_Entity (Id : E; V : E) is
3494 pragma Assert (Ekind (Id) = E_Package
3495 or else Ekind (Id) = E_Generic_Package
3496 or else Ekind (Id) in Concurrent_Kind);
3498 end Set_First_Private_Entity;
3500 procedure Set_First_Rep_Item (Id : E; V : N) is
3503 end Set_First_Rep_Item;
3505 procedure Set_Freeze_Node (Id : E; V : N) is
3508 end Set_Freeze_Node;
3510 procedure Set_From_With_Type (Id : E; V : B := True) is
3514 or else Ekind (Id) = E_Package);
3515 Set_Flag159 (Id, V);
3516 end Set_From_With_Type;
3518 procedure Set_Full_View (Id : E; V : E) is
3520 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3524 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3527 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3528 Set_Flag169 (Id, V);
3529 end Set_Function_Returns_With_DSP;
3531 procedure Set_Generic_Homonym (Id : E; V : E) is
3534 end Set_Generic_Homonym;
3536 procedure Set_Generic_Renamings (Id : E; V : L) is
3538 Set_Elist23 (Id, V);
3539 end Set_Generic_Renamings;
3541 procedure Set_Handler_Records (Id : E; V : S) is
3544 end Set_Handler_Records;
3546 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3548 pragma Assert (Id = Base_Type (Id));
3549 Set_Flag135 (Id, V);
3550 end Set_Has_Aliased_Components;
3552 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3555 end Set_Has_Alignment_Clause;
3557 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3560 end Set_Has_All_Calls_Remote;
3562 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3564 Set_Flag201 (Id, V);
3565 end Set_Has_Anon_Block_Suffix;
3567 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3569 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3571 end Set_Has_Atomic_Components;
3573 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3576 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3577 Set_Flag139 (Id, V);
3578 end Set_Has_Biased_Representation;
3580 procedure Set_Has_Completion (Id : E; V : B := True) is
3583 end Set_Has_Completion;
3585 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3587 pragma Assert (Is_Type (Id));
3589 end Set_Has_Completion_In_Body;
3591 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3593 pragma Assert (Ekind (Id) = E_Record_Type);
3594 Set_Flag140 (Id, V);
3595 end Set_Has_Complex_Representation;
3597 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3599 pragma Assert (Ekind (Id) = E_Array_Type);
3601 end Set_Has_Component_Size_Clause;
3603 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3605 pragma Assert (Is_Type (Id));
3606 Set_Flag187 (Id, V);
3607 end Set_Has_Constrained_Partial_View;
3609 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3611 Set_Flag181 (Id, V);
3612 end Set_Has_Contiguous_Rep;
3614 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3616 pragma Assert (Id = Base_Type (Id));
3618 end Set_Has_Controlled_Component;
3620 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3623 end Set_Has_Controlling_Result;
3625 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3627 Set_Flag119 (Id, V);
3628 end Set_Has_Convention_Pragma;
3630 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3632 pragma Assert (Nkind (Id) in N_Entity);
3634 end Set_Has_Delayed_Freeze;
3636 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3638 pragma Assert (Nkind (Id) in N_Entity);
3640 end Set_Has_Discriminants;
3642 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3644 pragma Assert (Ekind (Id) = E_Record_Type
3645 and then Is_Tagged_Type (Id));
3646 Set_Flag220 (Id, V);
3647 end Set_Has_Dispatch_Table;
3649 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3651 pragma Assert (Is_Enumeration_Type (Id));
3653 end Set_Has_Enumeration_Rep_Clause;
3655 procedure Set_Has_Exit (Id : E; V : B := True) is
3660 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3662 pragma Assert (Is_Tagged_Type (Id));
3663 Set_Flag110 (Id, V);
3664 end Set_Has_External_Tag_Rep_Clause;
3666 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3668 Set_Flag175 (Id, V);
3669 end Set_Has_Forward_Instantiation;
3671 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3673 Set_Flag173 (Id, V);
3674 end Set_Has_Fully_Qualified_Name;
3676 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3679 end Set_Has_Gigi_Rep_Item;
3681 procedure Set_Has_Homonym (Id : E; V : B := True) is
3684 end Set_Has_Homonym;
3686 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3689 (Ekind (Id) = E_Variable or else Ekind (Id) = E_Out_Parameter);
3690 Set_Flag219 (Id, V);
3691 end Set_Has_Initial_Value;
3693 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3695 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3697 end Set_Has_Machine_Radix_Clause;
3699 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3702 end Set_Has_Master_Entity;
3704 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3707 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3708 Set_Flag142 (Id, V);
3709 end Set_Has_Missing_Return;
3711 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3713 Set_Flag101 (Id, V);
3714 end Set_Has_Nested_Block_With_Handler;
3716 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3719 (Ekind (Id) = E_Variable
3720 or else Ekind (Id) = E_Constant
3721 or else Ekind (Id) = E_Loop_Parameter);
3722 Set_Flag215 (Id, V);
3723 end Set_Has_Up_Level_Access;
3725 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3727 pragma Assert (Id = Base_Type (Id));
3729 end Set_Has_Non_Standard_Rep;
3731 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3733 pragma Assert (Is_Type (Id));
3734 Set_Flag172 (Id, V);
3735 end Set_Has_Object_Size_Clause;
3737 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3739 Set_Flag154 (Id, V);
3740 end Set_Has_Per_Object_Constraint;
3742 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3744 Set_Flag188 (Id, V);
3745 end Set_Has_Persistent_BSS;
3747 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3749 pragma Assert (Is_Subprogram (Id));
3750 Set_Flag240 (Id, V);
3751 end Set_Has_Postconditions;
3753 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3755 pragma Assert (Is_Access_Type (Id));
3756 Set_Flag27 (Base_Type (Id), V);
3757 end Set_Has_Pragma_Controlled;
3759 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3761 Set_Flag150 (Id, V);
3762 end Set_Has_Pragma_Elaborate_Body;
3764 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3766 Set_Flag157 (Id, V);
3767 end Set_Has_Pragma_Inline;
3769 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3771 Set_Flag230 (Id, V);
3772 end Set_Has_Pragma_Inline_Always;
3774 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3776 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3777 pragma Assert (Id = Base_Type (Id));
3778 Set_Flag121 (Id, V);
3779 end Set_Has_Pragma_Pack;
3781 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3783 Set_Flag221 (Id, V);
3784 end Set_Has_Pragma_Preelab_Init;
3786 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3788 Set_Flag203 (Id, V);
3789 end Set_Has_Pragma_Pure;
3791 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3793 Set_Flag179 (Id, V);
3794 end Set_Has_Pragma_Pure_Function;
3796 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3798 Set_Flag233 (Id, V);
3799 end Set_Has_Pragma_Unmodified;
3801 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3803 Set_Flag180 (Id, V);
3804 end Set_Has_Pragma_Unreferenced;
3806 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3808 pragma Assert (Is_Type (Id));
3809 Set_Flag212 (Id, V);
3810 end Set_Has_Pragma_Unreferenced_Objects;
3812 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3814 pragma Assert (Id = Base_Type (Id));
3815 Set_Flag120 (Id, V);
3816 end Set_Has_Primitive_Operations;
3818 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3820 Set_Flag155 (Id, V);
3821 end Set_Has_Private_Declaration;
3823 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3825 Set_Flag161 (Id, V);
3826 end Set_Has_Qualified_Name;
3828 procedure Set_Has_RACW (Id : E; V : B := True) is
3830 pragma Assert (Ekind (Id) = E_Package);
3831 Set_Flag214 (Id, V);
3834 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3836 pragma Assert (Id = Base_Type (Id));
3838 end Set_Has_Record_Rep_Clause;
3840 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3842 pragma Assert (Is_Subprogram (Id));
3843 Set_Flag143 (Id, V);
3844 end Set_Has_Recursive_Call;
3846 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3849 end Set_Has_Size_Clause;
3851 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3854 end Set_Has_Small_Clause;
3856 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3858 pragma Assert (Id = Base_Type (Id));
3859 Set_Flag100 (Id, V);
3860 end Set_Has_Specified_Layout;
3862 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3864 pragma Assert (Is_Type (Id));
3865 Set_Flag190 (Id, V);
3866 end Set_Has_Specified_Stream_Input;
3868 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3870 pragma Assert (Is_Type (Id));
3871 Set_Flag191 (Id, V);
3872 end Set_Has_Specified_Stream_Output;
3874 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3876 pragma Assert (Is_Type (Id));
3877 Set_Flag192 (Id, V);
3878 end Set_Has_Specified_Stream_Read;
3880 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3882 pragma Assert (Is_Type (Id));
3883 Set_Flag193 (Id, V);
3884 end Set_Has_Specified_Stream_Write;
3886 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3888 Set_Flag211 (Id, V);
3889 end Set_Has_Static_Discriminants;
3891 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3893 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3894 pragma Assert (Id = Base_Type (Id));
3896 end Set_Has_Storage_Size_Clause;
3898 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3900 pragma Assert (Is_Elementary_Type (Id));
3901 Set_Flag184 (Id, V);
3902 end Set_Has_Stream_Size_Clause;
3904 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3907 end Set_Has_Subprogram_Descriptor;
3909 procedure Set_Has_Task (Id : E; V : B := True) is
3911 pragma Assert (Id = Base_Type (Id));
3915 procedure Set_Has_Thunks (Id : E; V : B := True) is
3917 pragma Assert (Is_Tag (Id)
3918 and then Ekind (Id) = E_Constant);
3919 Set_Flag228 (Id, V);
3922 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3924 pragma Assert (Id = Base_Type (Id));
3925 Set_Flag123 (Id, V);
3926 end Set_Has_Unchecked_Union;
3928 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3930 pragma Assert (Is_Type (Id));
3932 end Set_Has_Unknown_Discriminants;
3934 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3936 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3938 end Set_Has_Volatile_Components;
3940 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3942 Set_Flag182 (Id, V);
3943 end Set_Has_Xref_Entry;
3945 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3947 pragma Assert (Ekind (Id) = E_Variable);
3949 end Set_Hiding_Loop_Variable;
3951 procedure Set_Homonym (Id : E; V : E) is
3953 pragma Assert (Id /= V);
3957 procedure Set_Implemented_By_Entry (Id : E; V : B := True) is
3960 (Ekind (Id) = E_Function
3961 or else Ekind (Id) = E_Procedure);
3962 Set_Flag232 (Id, V);
3963 end Set_Implemented_By_Entry;
3965 procedure Set_In_Package_Body (Id : E; V : B := True) is
3968 end Set_In_Package_Body;
3970 procedure Set_In_Private_Part (Id : E; V : B := True) is
3973 end Set_In_Private_Part;
3975 procedure Set_In_Use (Id : E; V : B := True) is
3977 pragma Assert (Nkind (Id) in N_Entity);
3981 procedure Set_Inner_Instances (Id : E; V : L) is
3983 Set_Elist23 (Id, V);
3984 end Set_Inner_Instances;
3986 procedure Set_Interface_Name (Id : E; V : N) is
3989 end Set_Interface_Name;
3991 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3993 pragma Assert (Is_Overloadable (Id));
3995 end Set_Is_Abstract_Subprogram;
3997 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3999 pragma Assert (Is_Type (Id));
4000 Set_Flag146 (Id, V);
4001 end Set_Is_Abstract_Type;
4003 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4005 pragma Assert (Is_Access_Type (Id));
4006 Set_Flag194 (Id, V);
4007 end Set_Is_Local_Anonymous_Access;
4009 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4011 pragma Assert (Is_Access_Type (Id));
4013 end Set_Is_Access_Constant;
4015 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4017 Set_Flag185 (Id, V);
4018 end Set_Is_Ada_2005_Only;
4020 procedure Set_Is_Aliased (Id : E; V : B := True) is
4022 pragma Assert (Nkind (Id) in N_Entity);
4026 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4028 pragma Assert (Is_Entry (Id));
4029 Set_Flag132 (Id, V);
4030 end Set_Is_AST_Entry;
4032 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4035 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4037 end Set_Is_Asynchronous;
4039 procedure Set_Is_Atomic (Id : E; V : B := True) is
4044 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4046 pragma Assert ((not V)
4047 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4049 Set_Flag122 (Id, V);
4050 end Set_Is_Bit_Packed_Array;
4052 procedure Set_Is_Called (Id : E; V : B := True) is
4055 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
4056 Set_Flag102 (Id, V);
4059 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4062 end Set_Is_Character_Type;
4064 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4067 end Set_Is_Child_Unit;
4069 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4072 end Set_Is_Class_Wide_Equivalent_Type;
4074 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4076 Set_Flag149 (Id, V);
4077 end Set_Is_Compilation_Unit;
4079 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4081 pragma Assert (Ekind (Id) = E_Discriminant);
4082 Set_Flag103 (Id, V);
4083 end Set_Is_Completely_Hidden;
4085 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4088 end Set_Is_Concurrent_Record_Type;
4090 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4093 end Set_Is_Constr_Subt_For_U_Nominal;
4095 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4097 Set_Flag141 (Id, V);
4098 end Set_Is_Constr_Subt_For_UN_Aliased;
4100 procedure Set_Is_Constrained (Id : E; V : B := True) is
4102 pragma Assert (Nkind (Id) in N_Entity);
4104 end Set_Is_Constrained;
4106 procedure Set_Is_Constructor (Id : E; V : B := True) is
4109 end Set_Is_Constructor;
4111 procedure Set_Is_Controlled (Id : E; V : B := True) is
4113 pragma Assert (Id = Base_Type (Id));
4115 end Set_Is_Controlled;
4117 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4119 pragma Assert (Is_Formal (Id));
4121 end Set_Is_Controlling_Formal;
4123 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4126 end Set_Is_CPP_Class;
4128 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4130 pragma Assert (Is_Type (Id));
4131 Set_Flag223 (Id, V);
4132 end Set_Is_Descendent_Of_Address;
4134 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4136 Set_Flag176 (Id, V);
4137 end Set_Is_Discrim_SO_Function;
4139 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4141 Set_Flag234 (Id, V);
4142 end Set_Is_Dispatch_Table_Entity;
4144 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4149 Is_Overloadable (Id)
4151 Ekind (Id) = E_Subprogram_Type);
4154 end Set_Is_Dispatching_Operation;
4156 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4158 Set_Flag124 (Id, V);
4159 end Set_Is_Eliminated;
4161 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4164 end Set_Is_Entry_Formal;
4166 procedure Set_Is_Exported (Id : E; V : B := True) is
4169 end Set_Is_Exported;
4171 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4174 end Set_Is_First_Subtype;
4176 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4179 (Ekind (Id) = E_Record_Subtype
4181 Ekind (Id) = E_Private_Subtype);
4182 Set_Flag118 (Id, V);
4183 end Set_Is_For_Access_Subtype;
4185 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4187 Set_Flag111 (Id, V);
4188 end Set_Is_Formal_Subprogram;
4190 procedure Set_Is_Frozen (Id : E; V : B := True) is
4192 pragma Assert (Nkind (Id) in N_Entity);
4196 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4198 pragma Assert (Is_Type (Id));
4200 end Set_Is_Generic_Actual_Type;
4202 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4204 Set_Flag130 (Id, V);
4205 end Set_Is_Generic_Instance;
4207 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4209 pragma Assert (Nkind (Id) in N_Entity);
4211 end Set_Is_Generic_Type;
4213 procedure Set_Is_Hidden (Id : E; V : B := True) is
4218 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4220 Set_Flag171 (Id, V);
4221 end Set_Is_Hidden_Open_Scope;
4223 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4225 pragma Assert (Nkind (Id) in N_Entity);
4227 end Set_Is_Immediately_Visible;
4229 procedure Set_Is_Imported (Id : E; V : B := True) is
4232 end Set_Is_Imported;
4234 procedure Set_Is_Inlined (Id : E; V : B := True) is
4239 procedure Set_Is_Interface (Id : E; V : B := True) is
4242 (Ekind (Id) = E_Record_Type
4243 or else Ekind (Id) = E_Record_Subtype
4244 or else Ekind (Id) = E_Record_Type_With_Private
4245 or else Ekind (Id) = E_Record_Subtype_With_Private
4246 or else Ekind (Id) = E_Class_Wide_Type
4247 or else Ekind (Id) = E_Class_Wide_Subtype);
4248 Set_Flag186 (Id, V);
4249 end Set_Is_Interface;
4251 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4253 Set_Flag126 (Id, V);
4254 end Set_Is_Instantiated;
4256 procedure Set_Is_Internal (Id : E; V : B := True) is
4258 pragma Assert (Nkind (Id) in N_Entity);
4260 end Set_Is_Internal;
4262 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4264 pragma Assert (Nkind (Id) in N_Entity);
4266 end Set_Is_Interrupt_Handler;
4268 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4271 end Set_Is_Intrinsic_Subprogram;
4273 procedure Set_Is_Itype (Id : E; V : B := True) is
4278 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4281 end Set_Is_Known_Non_Null;
4283 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4285 Set_Flag204 (Id, V);
4286 end Set_Is_Known_Null;
4288 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4290 Set_Flag170 (Id, V);
4291 end Set_Is_Known_Valid;
4293 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4295 pragma Assert (Is_Type (Id));
4296 Set_Flag106 (Id, V);
4297 end Set_Is_Limited_Composite;
4299 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4301 pragma Assert (Is_Interface (Id));
4302 Set_Flag197 (Id, V);
4303 end Set_Is_Limited_Interface;
4305 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4308 end Set_Is_Limited_Record;
4310 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4312 pragma Assert (Is_Subprogram (Id));
4313 Set_Flag137 (Id, V);
4314 end Set_Is_Machine_Code_Subprogram;
4316 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4318 pragma Assert (Is_Type (Id));
4319 Set_Flag109 (Id, V);
4320 end Set_Is_Non_Static_Subtype;
4322 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4324 pragma Assert (Ekind (Id) = E_Procedure);
4325 Set_Flag178 (Id, V);
4326 end Set_Is_Null_Init_Proc;
4328 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4330 Set_Flag153 (Id, V);
4331 end Set_Is_Obsolescent;
4333 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4335 pragma Assert (Ekind (Id) = E_Out_Parameter);
4336 Set_Flag226 (Id, V);
4337 end Set_Is_Only_Out_Parameter;
4339 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4341 pragma Assert (Is_Formal (Id));
4342 Set_Flag134 (Id, V);
4343 end Set_Is_Optional_Parameter;
4345 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4347 pragma Assert (Is_Subprogram (Id));
4349 end Set_Is_Overriding_Operation;
4351 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4353 Set_Flag160 (Id, V);
4354 end Set_Is_Package_Body_Entity;
4356 procedure Set_Is_Packed (Id : E; V : B := True) is
4358 pragma Assert (Id = Base_Type (Id));
4362 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4364 Set_Flag138 (Id, V);
4365 end Set_Is_Packed_Array_Type;
4367 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4369 pragma Assert (Nkind (Id) in N_Entity);
4371 end Set_Is_Potentially_Use_Visible;
4373 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4376 end Set_Is_Preelaborated;
4378 procedure Set_Is_Primitive (Id : E; V : B := True) is
4381 (Is_Overloadable (Id)
4382 or else Ekind (Id) = E_Generic_Function
4383 or else Ekind (Id) = E_Generic_Procedure);
4384 Set_Flag218 (Id, V);
4385 end Set_Is_Primitive;
4387 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4389 pragma Assert (Ekind (Id) = E_Procedure);
4390 Set_Flag195 (Id, V);
4391 end Set_Is_Primitive_Wrapper;
4393 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4395 pragma Assert (Is_Type (Id));
4396 Set_Flag107 (Id, V);
4397 end Set_Is_Private_Composite;
4399 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4402 end Set_Is_Private_Descendant;
4404 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4406 pragma Assert (Is_Interface (Id));
4407 Set_Flag198 (Id, V);
4408 end Set_Is_Protected_Interface;
4410 procedure Set_Is_Public (Id : E; V : B := True) is
4412 pragma Assert (Nkind (Id) in N_Entity);
4416 procedure Set_Is_Pure (Id : E; V : B := True) is
4421 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4423 pragma Assert (Is_Access_Type (Id));
4424 Set_Flag189 (Id, V);
4425 end Set_Is_Pure_Unit_Access_Type;
4427 procedure Set_Is_Raised (Id : E; V : B := True) is
4429 pragma Assert (Ekind (Id) = E_Exception);
4430 Set_Flag224 (Id, V);
4433 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4436 end Set_Is_Remote_Call_Interface;
4438 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4441 end Set_Is_Remote_Types;
4443 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4445 Set_Flag112 (Id, V);
4446 end Set_Is_Renaming_Of_Object;
4448 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4450 Set_Flag209 (Id, V);
4451 end Set_Is_Return_Object;
4453 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4456 end Set_Is_Shared_Passive;
4458 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4461 (Ekind (Id) = E_Exception
4462 or else Ekind (Id) = E_Variable
4463 or else Ekind (Id) = E_Constant
4464 or else Is_Type (Id)
4465 or else Ekind (Id) = E_Void);
4467 end Set_Is_Statically_Allocated;
4469 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4471 pragma Assert (Is_Interface (Id));
4472 Set_Flag199 (Id, V);
4473 end Set_Is_Synchronized_Interface;
4475 procedure Set_Is_Tag (Id : E; V : B := True) is
4478 (Ekind (Id) = E_Component
4479 or else Ekind (Id) = E_Constant);
4483 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4486 end Set_Is_Tagged_Type;
4488 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4490 pragma Assert (Is_Interface (Id));
4491 Set_Flag200 (Id, V);
4492 end Set_Is_Task_Interface;
4494 procedure Set_Is_Thunk (Id : E; V : B := True) is
4496 Set_Flag225 (Id, V);
4499 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4501 Set_Flag235 (Id, V);
4502 end Set_Is_Trivial_Subprogram;
4504 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4506 Set_Flag163 (Id, V);
4507 end Set_Is_True_Constant;
4509 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4511 pragma Assert (Id = Base_Type (Id));
4512 Set_Flag117 (Id, V);
4513 end Set_Is_Unchecked_Union;
4515 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4517 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4518 Set_Flag144 (Id, V);
4519 end Set_Is_Unsigned_Type;
4521 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4523 pragma Assert (Ekind (Id) = E_Procedure);
4524 Set_Flag127 (Id, V);
4525 end Set_Is_Valued_Procedure;
4527 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4529 pragma Assert (Is_Child_Unit (Id));
4530 Set_Flag116 (Id, V);
4531 end Set_Is_Visible_Child_Unit;
4533 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4535 Set_Flag206 (Id, V);
4536 end Set_Is_Visible_Formal;
4538 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4540 pragma Assert (Ekind (Id) = E_Exception);
4541 Set_Flag133 (Id, V);
4542 end Set_Is_VMS_Exception;
4544 procedure Set_Is_Volatile (Id : E; V : B := True) is
4546 pragma Assert (Nkind (Id) in N_Entity);
4548 end Set_Is_Volatile;
4550 procedure Set_Itype_Printed (Id : E; V : B := True) is
4552 pragma Assert (Is_Itype (Id));
4553 Set_Flag202 (Id, V);
4554 end Set_Itype_Printed;
4556 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4559 end Set_Kill_Elaboration_Checks;
4561 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4564 end Set_Kill_Range_Checks;
4566 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4569 end Set_Kill_Tag_Checks;
4571 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4573 pragma Assert (Is_Type (Id));
4574 Set_Flag207 (Id, V);
4575 end Set_Known_To_Have_Preelab_Init;
4577 procedure Set_Last_Assignment (Id : E; V : N) is
4579 pragma Assert (Is_Assignable (Id));
4581 end Set_Last_Assignment;
4583 procedure Set_Last_Entity (Id : E; V : E) is
4586 end Set_Last_Entity;
4588 procedure Set_Limited_View (Id : E; V : E) is
4590 pragma Assert (Ekind (Id) = E_Package);
4592 end Set_Limited_View;
4594 procedure Set_Lit_Indexes (Id : E; V : E) is
4596 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4598 end Set_Lit_Indexes;
4600 procedure Set_Lit_Strings (Id : E; V : E) is
4602 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4604 end Set_Lit_Strings;
4606 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4608 pragma Assert (Is_Formal (Id));
4609 Set_Flag205 (Id, V);
4610 end Set_Low_Bound_Known;
4612 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4614 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4616 end Set_Machine_Radix_10;
4618 procedure Set_Master_Id (Id : E; V : E) is
4620 pragma Assert (Is_Access_Type (Id));
4624 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4626 Set_Flag168 (Id, V);
4627 end Set_Materialize_Entity;
4629 procedure Set_Mechanism (Id : E; V : M) is
4631 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4632 Set_Uint8 (Id, UI_From_Int (V));
4635 procedure Set_Modulus (Id : E; V : U) is
4637 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4641 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4643 pragma Assert (Is_Type (Id));
4644 Set_Flag183 (Id, V);
4645 end Set_Must_Be_On_Byte_Boundary;
4647 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4649 pragma Assert (Is_Type (Id));
4650 Set_Flag208 (Id, V);
4651 end Set_Must_Have_Preelab_Init;
4653 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4655 Set_Flag147 (Id, V);
4656 end Set_Needs_Debug_Info;
4658 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4661 (Is_Overloadable (Id)
4662 or else Ekind (Id) = E_Subprogram_Type
4663 or else Ekind (Id) = E_Entry_Family);
4665 end Set_Needs_No_Actuals;
4667 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4669 Set_Flag115 (Id, V);
4670 end Set_Never_Set_In_Source;
4672 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4675 end Set_Next_Inlined_Subprogram;
4677 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4679 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4680 Set_Flag131 (Id, V);
4681 end Set_No_Pool_Assigned;
4683 procedure Set_No_Return (Id : E; V : B := True) is
4687 or else Ekind (Id) = E_Procedure
4688 or else Ekind (Id) = E_Generic_Procedure);
4689 Set_Flag113 (Id, V);
4692 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4694 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4695 Set_Flag136 (Id, V);
4696 end Set_No_Strict_Aliasing;
4698 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4700 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4702 end Set_Non_Binary_Modulus;
4704 procedure Set_Non_Limited_View (Id : E; V : E) is
4706 pragma Assert (Ekind (Id) in Incomplete_Kind);
4708 end Set_Non_Limited_View;
4710 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4713 (Root_Type (Id) = Standard_Boolean
4714 and then Ekind (Id) = E_Enumeration_Type);
4715 Set_Flag162 (Id, V);
4716 end Set_Nonzero_Is_True;
4718 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4721 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4723 end Set_Normalized_First_Bit;
4725 procedure Set_Normalized_Position (Id : E; V : U) is
4728 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4730 end Set_Normalized_Position;
4732 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4735 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4737 end Set_Normalized_Position_Max;
4739 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4742 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4743 Set_Flag239 (Id, V);
4744 end Set_OK_To_Reorder_Components;
4746 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4750 or else Ekind (Id) = E_Constant
4751 or else Ekind (Id) = E_Variable);
4752 Set_Flag241 (Id, V);
4753 end Set_Optimize_Alignment_Space;
4755 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4759 or else Ekind (Id) = E_Constant
4760 or else Ekind (Id) = E_Variable);
4761 Set_Flag242 (Id, V);
4762 end Set_Optimize_Alignment_Time;
4764 procedure Set_Original_Array_Type (Id : E; V : E) is
4766 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4768 end Set_Original_Array_Type;
4770 procedure Set_Original_Record_Component (Id : E; V : E) is
4773 (Ekind (Id) = E_Void
4774 or else Ekind (Id) = E_Component
4775 or else Ekind (Id) = E_Discriminant);
4777 end Set_Original_Record_Component;
4779 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4781 Set_Flag243 (Id, V);
4782 end Set_Overlays_Constant;
4784 procedure Set_Overridden_Operation (Id : E; V : E) is
4787 end Set_Overridden_Operation;
4789 procedure Set_Package_Instantiation (Id : E; V : N) is
4792 (Ekind (Id) = E_Void
4793 or else Ekind (Id) = E_Generic_Package
4794 or else Ekind (Id) = E_Package);
4796 end Set_Package_Instantiation;
4798 procedure Set_Packed_Array_Type (Id : E; V : E) is
4800 pragma Assert (Is_Array_Type (Id));
4802 end Set_Packed_Array_Type;
4804 procedure Set_Parent_Subtype (Id : E; V : E) is
4806 pragma Assert (Ekind (Id) = E_Record_Type);
4808 end Set_Parent_Subtype;
4810 procedure Set_Primitive_Operations (Id : E; V : L) is
4812 pragma Assert (Is_Tagged_Type (Id));
4813 Set_Elist15 (Id, V);
4814 end Set_Primitive_Operations;
4816 procedure Set_Prival (Id : E; V : E) is
4818 pragma Assert (Is_Protected_Component (Id));
4822 procedure Set_Prival_Link (Id : E; V : E) is
4824 pragma Assert (Ekind (Id) = E_Constant
4825 or else Ekind (Id) = E_Variable);
4827 end Set_Prival_Link;
4829 procedure Set_Private_Dependents (Id : E; V : L) is
4831 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4832 Set_Elist18 (Id, V);
4833 end Set_Private_Dependents;
4835 procedure Set_Private_View (Id : E; V : N) is
4837 pragma Assert (Is_Private_Type (Id));
4839 end Set_Private_View;
4841 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4843 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4845 end Set_Protected_Body_Subprogram;
4847 procedure Set_Protected_Formal (Id : E; V : E) is
4849 pragma Assert (Is_Formal (Id));
4851 end Set_Protected_Formal;
4853 procedure Set_Protection_Object (Id : E; V : E) is
4855 pragma Assert (Ekind (Id) = E_Entry
4856 or else Ekind (Id) = E_Entry_Family
4857 or else Ekind (Id) = E_Function
4858 or else Ekind (Id) = E_Procedure);
4860 end Set_Protection_Object;
4862 procedure Set_Reachable (Id : E; V : B := True) is
4867 procedure Set_Referenced (Id : E; V : B := True) is
4869 Set_Flag156 (Id, V);
4872 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4875 end Set_Referenced_As_LHS;
4877 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4879 Set_Flag227 (Id, V);
4880 end Set_Referenced_As_Out_Parameter;
4882 procedure Set_Referenced_Object (Id : E; V : N) is
4884 pragma Assert (Is_Type (Id));
4886 end Set_Referenced_Object;
4888 procedure Set_Register_Exception_Call (Id : E; V : N) is
4890 pragma Assert (Ekind (Id) = E_Exception);
4892 end Set_Register_Exception_Call;
4894 procedure Set_Related_Array_Object (Id : E; V : E) is
4896 pragma Assert (Is_Array_Type (Id));
4898 end Set_Related_Array_Object;
4900 procedure Set_Related_Instance (Id : E; V : E) is
4903 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4905 end Set_Related_Instance;
4907 procedure Set_Related_Type (Id : E; V : E) is
4910 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
4912 end Set_Related_Type;
4914 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4916 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4918 end Set_Relative_Deadline_Variable;
4920 procedure Set_Renamed_Entity (Id : E; V : N) is
4923 end Set_Renamed_Entity;
4925 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4927 pragma Assert (Ekind (Id) = E_Package);
4928 Set_Flag231 (Id, V);
4929 end Set_Renamed_In_Spec;
4931 procedure Set_Renamed_Object (Id : E; V : N) is
4934 end Set_Renamed_Object;
4936 procedure Set_Renaming_Map (Id : E; V : U) is
4939 end Set_Renaming_Map;
4941 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4943 pragma Assert (Is_Overloadable (Id));
4944 Set_Flag213 (Id, V);
4945 end Set_Requires_Overriding;
4947 procedure Set_Return_Present (Id : E; V : B := True) is
4950 end Set_Return_Present;
4952 procedure Set_Return_Applies_To (Id : E; V : N) is
4955 end Set_Return_Applies_To;
4957 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4960 end Set_Returns_By_Ref;
4962 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4965 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4966 Set_Flag164 (Id, V);
4967 end Set_Reverse_Bit_Order;
4969 procedure Set_RM_Size (Id : E; V : U) is
4971 pragma Assert (Is_Type (Id));
4975 procedure Set_Scalar_Range (Id : E; V : N) is
4978 end Set_Scalar_Range;
4980 procedure Set_Scale_Value (Id : E; V : U) is
4983 end Set_Scale_Value;
4985 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4987 pragma Assert (not Is_Record_Type (Id));
4989 end Set_Scope_Depth_Value;
4991 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4993 Set_Flag167 (Id, V);
4994 end Set_Sec_Stack_Needed_For_Return;
4996 procedure Set_Shadow_Entities (Id : E; V : S) is
4999 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
5001 end Set_Shadow_Entities;
5003 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
5005 pragma Assert (Ekind (Id) = E_Variable);
5007 end Set_Shared_Var_Assign_Proc;
5009 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
5011 pragma Assert (Ekind (Id) = E_Variable);
5013 end Set_Shared_Var_Read_Proc;
5015 procedure Set_Size_Check_Code (Id : E; V : N) is
5017 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
5019 end Set_Size_Check_Code;
5021 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5023 Set_Flag177 (Id, V);
5024 end Set_Size_Depends_On_Discriminant;
5026 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5029 end Set_Size_Known_At_Compile_Time;
5031 procedure Set_Small_Value (Id : E; V : R) is
5033 pragma Assert (Is_Fixed_Point_Type (Id));
5034 Set_Ureal21 (Id, V);
5035 end Set_Small_Value;
5037 procedure Set_Spec_Entity (Id : E; V : E) is
5039 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5041 end Set_Spec_Entity;
5043 procedure Set_Spec_PPC_List (Id : E; V : N) is
5045 pragma Assert (Is_Subprogram (Id));
5047 end Set_Spec_PPC_List;
5049 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5051 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5052 pragma Assert (Id = Base_Type (Id));
5054 end Set_Storage_Size_Variable;
5056 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5058 pragma Assert (Ekind (Id) = E_Package);
5060 end Set_Static_Elaboration_Desired;
5062 procedure Set_Static_Initialization (Id : E; V : N) is
5065 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5067 end Set_Static_Initialization;
5069 procedure Set_Stored_Constraint (Id : E; V : L) is
5071 pragma Assert (Nkind (Id) in N_Entity);
5072 Set_Elist23 (Id, V);
5073 end Set_Stored_Constraint;
5075 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5077 pragma Assert (Id = Base_Type (Id));
5078 Set_Flag145 (Id, V);
5079 end Set_Strict_Alignment;
5081 procedure Set_String_Literal_Length (Id : E; V : U) is
5083 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5085 end Set_String_Literal_Length;
5087 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5089 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5091 end Set_String_Literal_Low_Bound;
5093 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5095 Set_Flag148 (Id, V);
5096 end Set_Suppress_Elaboration_Warnings;
5098 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5100 pragma Assert (Id = Base_Type (Id));
5101 Set_Flag105 (Id, V);
5102 end Set_Suppress_Init_Proc;
5104 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5106 Set_Flag165 (Id, V);
5107 end Set_Suppress_Style_Checks;
5109 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5111 Set_Flag217 (Id, V);
5112 end Set_Suppress_Value_Tracking_On_Call;
5114 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5116 pragma Assert (Ekind (Id) in Task_Kind);
5118 end Set_Task_Body_Procedure;
5120 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5123 end Set_Treat_As_Volatile;
5125 procedure Set_Underlying_Full_View (Id : E; V : E) is
5127 pragma Assert (Ekind (Id) in Private_Kind);
5129 end Set_Underlying_Full_View;
5131 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5133 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5134 Set_Flag216 (Id, V);
5135 end Set_Universal_Aliasing;
5137 procedure Set_Unset_Reference (Id : E; V : N) is
5140 end Set_Unset_Reference;
5142 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5145 end Set_Uses_Sec_Stack;
5147 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5149 Set_Flag222 (Id, V);
5150 end Set_Used_As_Generic_Actual;
5152 procedure Set_Vax_Float (Id : E; V : B := True) is
5154 pragma Assert (Id = Base_Type (Id));
5155 Set_Flag151 (Id, V);
5158 procedure Set_Warnings_Off (Id : E; V : B := True) is
5161 end Set_Warnings_Off;
5163 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5165 Set_Flag236 (Id, V);
5166 end Set_Warnings_Off_Used;
5168 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5170 Set_Flag237 (Id, V);
5171 end Set_Warnings_Off_Used_Unmodified;
5173 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5175 Set_Flag238 (Id, V);
5176 end Set_Warnings_Off_Used_Unreferenced;
5178 procedure Set_Was_Hidden (Id : E; V : B := True) is
5180 Set_Flag196 (Id, V);
5183 procedure Set_Wrapped_Entity (Id : E; V : E) is
5185 pragma Assert (Ekind (Id) = E_Procedure
5186 and then Is_Primitive_Wrapper (Id));
5188 end Set_Wrapped_Entity;
5190 -----------------------------------
5191 -- Field Initialization Routines --
5192 -----------------------------------
5194 procedure Init_Alignment (Id : E) is
5196 Set_Uint14 (Id, Uint_0);
5199 procedure Init_Alignment (Id : E; V : Int) is
5201 Set_Uint14 (Id, UI_From_Int (V));
5204 procedure Init_Component_Bit_Offset (Id : E) is
5206 Set_Uint11 (Id, No_Uint);
5207 end Init_Component_Bit_Offset;
5209 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5211 Set_Uint11 (Id, UI_From_Int (V));
5212 end Init_Component_Bit_Offset;
5214 procedure Init_Component_Size (Id : E) is
5216 Set_Uint22 (Id, Uint_0);
5217 end Init_Component_Size;
5219 procedure Init_Component_Size (Id : E; V : Int) is
5221 Set_Uint22 (Id, UI_From_Int (V));
5222 end Init_Component_Size;
5224 procedure Init_Digits_Value (Id : E) is
5226 Set_Uint17 (Id, Uint_0);
5227 end Init_Digits_Value;
5229 procedure Init_Digits_Value (Id : E; V : Int) is
5231 Set_Uint17 (Id, UI_From_Int (V));
5232 end Init_Digits_Value;
5234 procedure Init_Esize (Id : E) is
5236 Set_Uint12 (Id, Uint_0);
5239 procedure Init_Esize (Id : E; V : Int) is
5241 Set_Uint12 (Id, UI_From_Int (V));
5244 procedure Init_Normalized_First_Bit (Id : E) is
5246 Set_Uint8 (Id, No_Uint);
5247 end Init_Normalized_First_Bit;
5249 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5251 Set_Uint8 (Id, UI_From_Int (V));
5252 end Init_Normalized_First_Bit;
5254 procedure Init_Normalized_Position (Id : E) is
5256 Set_Uint14 (Id, No_Uint);
5257 end Init_Normalized_Position;
5259 procedure Init_Normalized_Position (Id : E; V : Int) is
5261 Set_Uint14 (Id, UI_From_Int (V));
5262 end Init_Normalized_Position;
5264 procedure Init_Normalized_Position_Max (Id : E) is
5266 Set_Uint10 (Id, No_Uint);
5267 end Init_Normalized_Position_Max;
5269 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5271 Set_Uint10 (Id, UI_From_Int (V));
5272 end Init_Normalized_Position_Max;
5274 procedure Init_RM_Size (Id : E) is
5276 Set_Uint13 (Id, Uint_0);
5279 procedure Init_RM_Size (Id : E; V : Int) is
5281 Set_Uint13 (Id, UI_From_Int (V));
5284 -----------------------------
5285 -- Init_Component_Location --
5286 -----------------------------
5288 procedure Init_Component_Location (Id : E) is
5290 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5291 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5292 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5293 Set_Uint12 (Id, Uint_0); -- Esize
5294 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5295 end Init_Component_Location;
5301 procedure Init_Size (Id : E; V : Int) is
5303 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5304 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5307 ---------------------
5308 -- Init_Size_Align --
5309 ---------------------
5311 procedure Init_Size_Align (Id : E) is
5313 Set_Uint12 (Id, Uint_0); -- Esize
5314 Set_Uint13 (Id, Uint_0); -- RM_Size
5315 Set_Uint14 (Id, Uint_0); -- Alignment
5316 end Init_Size_Align;
5318 ----------------------------------------------
5319 -- Type Representation Attribute Predicates --
5320 ----------------------------------------------
5322 function Known_Alignment (E : Entity_Id) return B is
5324 return Uint14 (E) /= Uint_0
5325 and then Uint14 (E) /= No_Uint;
5326 end Known_Alignment;
5328 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5330 return Uint11 (E) /= No_Uint;
5331 end Known_Component_Bit_Offset;
5333 function Known_Component_Size (E : Entity_Id) return B is
5335 return Uint22 (Base_Type (E)) /= Uint_0
5336 and then Uint22 (Base_Type (E)) /= No_Uint;
5337 end Known_Component_Size;
5339 function Known_Esize (E : Entity_Id) return B is
5341 return Uint12 (E) /= Uint_0
5342 and then Uint12 (E) /= No_Uint;
5345 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5347 return Uint8 (E) /= No_Uint;
5348 end Known_Normalized_First_Bit;
5350 function Known_Normalized_Position (E : Entity_Id) return B is
5352 return Uint14 (E) /= No_Uint;
5353 end Known_Normalized_Position;
5355 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5357 return Uint10 (E) /= No_Uint;
5358 end Known_Normalized_Position_Max;
5360 function Known_RM_Size (E : Entity_Id) return B is
5362 return Uint13 (E) /= No_Uint
5363 and then (Uint13 (E) /= Uint_0
5364 or else Is_Discrete_Type (E)
5365 or else Is_Fixed_Point_Type (E));
5368 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5370 return Uint11 (E) /= No_Uint
5371 and then Uint11 (E) >= Uint_0;
5372 end Known_Static_Component_Bit_Offset;
5374 function Known_Static_Component_Size (E : Entity_Id) return B is
5376 return Uint22 (Base_Type (E)) > Uint_0;
5377 end Known_Static_Component_Size;
5379 function Known_Static_Esize (E : Entity_Id) return B is
5381 return Uint12 (E) > Uint_0;
5382 end Known_Static_Esize;
5384 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5386 return Uint8 (E) /= No_Uint
5387 and then Uint8 (E) >= Uint_0;
5388 end Known_Static_Normalized_First_Bit;
5390 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5392 return Uint14 (E) /= No_Uint
5393 and then Uint14 (E) >= Uint_0;
5394 end Known_Static_Normalized_Position;
5396 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5398 return Uint10 (E) /= No_Uint
5399 and then Uint10 (E) >= Uint_0;
5400 end Known_Static_Normalized_Position_Max;
5402 function Known_Static_RM_Size (E : Entity_Id) return B is
5404 return Uint13 (E) > Uint_0
5405 or else Is_Discrete_Type (E)
5406 or else Is_Fixed_Point_Type (E);
5407 end Known_Static_RM_Size;
5409 function Unknown_Alignment (E : Entity_Id) return B is
5411 return Uint14 (E) = Uint_0
5412 or else Uint14 (E) = No_Uint;
5413 end Unknown_Alignment;
5415 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5417 return Uint11 (E) = No_Uint;
5418 end Unknown_Component_Bit_Offset;
5420 function Unknown_Component_Size (E : Entity_Id) return B is
5422 return Uint22 (Base_Type (E)) = Uint_0
5424 Uint22 (Base_Type (E)) = No_Uint;
5425 end Unknown_Component_Size;
5427 function Unknown_Esize (E : Entity_Id) return B is
5429 return Uint12 (E) = No_Uint
5431 Uint12 (E) = Uint_0;
5434 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5436 return Uint8 (E) = No_Uint;
5437 end Unknown_Normalized_First_Bit;
5439 function Unknown_Normalized_Position (E : Entity_Id) return B is
5441 return Uint14 (E) = No_Uint;
5442 end Unknown_Normalized_Position;
5444 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5446 return Uint10 (E) = No_Uint;
5447 end Unknown_Normalized_Position_Max;
5449 function Unknown_RM_Size (E : Entity_Id) return B is
5451 return (Uint13 (E) = Uint_0
5452 and then not Is_Discrete_Type (E)
5453 and then not Is_Fixed_Point_Type (E))
5454 or else Uint13 (E) = No_Uint;
5455 end Unknown_RM_Size;
5457 --------------------
5458 -- Address_Clause --
5459 --------------------
5461 function Address_Clause (Id : E) return N is
5463 return Rep_Clause (Id, Name_Address);
5466 ----------------------
5467 -- Alignment_Clause --
5468 ----------------------
5470 function Alignment_Clause (Id : E) return N is
5472 return Rep_Clause (Id, Name_Alignment);
5473 end Alignment_Clause;
5475 ----------------------
5476 -- Ancestor_Subtype --
5477 ----------------------
5479 function Ancestor_Subtype (Id : E) return E is
5481 -- If this is first subtype, or is a base type, then there is no
5482 -- ancestor subtype, so we return Empty to indicate this fact.
5484 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
5489 D : constant Node_Id := Declaration_Node (Id);
5492 -- If we have a subtype declaration, get the ancestor subtype
5494 if Nkind (D) = N_Subtype_Declaration then
5495 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5496 return Entity (Subtype_Mark (Subtype_Indication (D)));
5498 return Entity (Subtype_Indication (D));
5501 -- If not, then no subtype indication is available
5507 end Ancestor_Subtype;
5513 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5515 if Last_Entity (V) = Empty then
5516 Set_First_Entity (Id => V, V => Id);
5518 Set_Next_Entity (Last_Entity (V), Id);
5521 Set_Next_Entity (Id, Empty);
5523 Set_Last_Entity (Id => V, V => Id);
5526 --------------------
5527 -- Available_View --
5528 --------------------
5530 function Available_View (Id : E) return E is
5532 if Is_Incomplete_Type (Id)
5533 and then Present (Non_Limited_View (Id))
5535 -- The non-limited view may itself be an incomplete type, in
5536 -- which case get its full view.
5538 return Get_Full_View (Non_Limited_View (Id));
5540 elsif Is_Class_Wide_Type (Id)
5541 and then Is_Incomplete_Type (Etype (Id))
5542 and then Present (Non_Limited_View (Etype (Id)))
5544 return Class_Wide_Type (Non_Limited_View (Etype (Id)));
5555 function Base_Type (Id : E) return E is
5558 when E_Enumeration_Subtype |
5560 E_Signed_Integer_Subtype |
5561 E_Modular_Integer_Subtype |
5562 E_Floating_Point_Subtype |
5563 E_Ordinary_Fixed_Point_Subtype |
5564 E_Decimal_Fixed_Point_Subtype |
5569 E_Record_Subtype_With_Private |
5570 E_Limited_Private_Subtype |
5572 E_Protected_Subtype |
5574 E_String_Literal_Subtype |
5575 E_Class_Wide_Subtype =>
5583 -------------------------
5584 -- Component_Alignment --
5585 -------------------------
5587 -- Component Alignment is encoded using two flags, Flag128/129 as
5588 -- follows. Note that both flags False = Align_Default, so that the
5589 -- default initialization of flags to False initializes component
5590 -- alignment to the default value as required.
5592 -- Flag128 Flag129 Value
5593 -- ------- ------- -----
5594 -- False False Calign_Default
5595 -- False True Calign_Component_Size
5596 -- True False Calign_Component_Size_4
5597 -- True True Calign_Storage_Unit
5599 function Component_Alignment (Id : E) return C is
5600 BT : constant Node_Id := Base_Type (Id);
5603 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5605 if Flag128 (BT) then
5606 if Flag129 (BT) then
5607 return Calign_Storage_Unit;
5609 return Calign_Component_Size_4;
5613 if Flag129 (BT) then
5614 return Calign_Component_Size;
5616 return Calign_Default;
5619 end Component_Alignment;
5621 --------------------
5622 -- Constant_Value --
5623 --------------------
5625 function Constant_Value (Id : E) return N is
5626 D : constant Node_Id := Declaration_Node (Id);
5630 -- If we have no declaration node, then return no constant value.
5631 -- Not clear how this can happen, but it does sometimes ???
5632 -- To investigate, remove this check and compile discrim_po.adb.
5637 -- Normal case where a declaration node is present
5639 elsif Nkind (D) = N_Object_Renaming_Declaration then
5640 return Renamed_Object (Id);
5642 -- If this is a component declaration whose entity is constant, it
5643 -- is a prival within a protected function. It does not have
5644 -- a constant value.
5646 elsif Nkind (D) = N_Component_Declaration then
5649 -- If there is an expression, return it
5651 elsif Present (Expression (D)) then
5652 return (Expression (D));
5654 -- For a constant, see if we have a full view
5656 elsif Ekind (Id) = E_Constant
5657 and then Present (Full_View (Id))
5659 Full_D := Parent (Full_View (Id));
5661 -- The full view may have been rewritten as an object renaming
5663 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5664 return Name (Full_D);
5666 return Expression (Full_D);
5669 -- Otherwise we have no expression to return
5676 ----------------------
5677 -- Declaration_Node --
5678 ----------------------
5680 function Declaration_Node (Id : E) return N is
5684 if Ekind (Id) = E_Incomplete_Type
5685 and then Present (Full_View (Id))
5687 P := Parent (Full_View (Id));
5693 if Nkind (P) /= N_Selected_Component
5694 and then Nkind (P) /= N_Expanded_Name
5696 not (Nkind (P) = N_Defining_Program_Unit_Name
5697 and then Is_Child_Unit (Id))
5704 end Declaration_Node;
5706 ---------------------
5707 -- Designated_Type --
5708 ---------------------
5710 function Designated_Type (Id : E) return E is
5714 Desig_Type := Directly_Designated_Type (Id);
5716 if Ekind (Desig_Type) = E_Incomplete_Type
5717 and then Present (Full_View (Desig_Type))
5719 return Full_View (Desig_Type);
5721 elsif Is_Class_Wide_Type (Desig_Type)
5722 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5723 and then Present (Full_View (Etype (Desig_Type)))
5724 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5726 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5731 end Designated_Type;
5733 -----------------------------
5734 -- Enclosing_Dynamic_Scope --
5735 -----------------------------
5737 function Enclosing_Dynamic_Scope (Id : E) return E is
5741 -- The following test is an error defense against some syntax
5742 -- errors that can leave scopes very messed up.
5744 if Id = Standard_Standard then
5748 -- Normal case, search enclosing scopes
5750 -- Note: the test for Present (S) should not be required, it is a
5751 -- defence against an ill-formed tree.
5755 -- If we somehow got an empty value for Scope, the tree must be
5756 -- malformed. Rather than blow up we return Standard in this case.
5759 return Standard_Standard;
5761 -- Quit if we get to standard or a dynamic scope
5763 elsif S = Standard_Standard
5764 or else Is_Dynamic_Scope (S)
5768 -- Otherwise keep climbing
5774 end Enclosing_Dynamic_Scope;
5776 ----------------------
5777 -- Entry_Index_Type --
5778 ----------------------
5780 function Entry_Index_Type (Id : E) return N is
5782 pragma Assert (Ekind (Id) = E_Entry_Family);
5783 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5784 end Entry_Index_Type;
5786 ---------------------
5787 -- First_Component --
5788 ---------------------
5790 function First_Component (Id : E) return E is
5795 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5797 Comp_Id := First_Entity (Id);
5798 while Present (Comp_Id) loop
5799 exit when Ekind (Comp_Id) = E_Component;
5800 Comp_Id := Next_Entity (Comp_Id);
5804 end First_Component;
5806 -------------------------------------
5807 -- First_Component_Or_Discriminant --
5808 -------------------------------------
5810 function First_Component_Or_Discriminant (Id : E) return E is
5815 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5817 Comp_Id := First_Entity (Id);
5818 while Present (Comp_Id) loop
5819 exit when Ekind (Comp_Id) = E_Component
5821 Ekind (Comp_Id) = E_Discriminant;
5822 Comp_Id := Next_Entity (Comp_Id);
5826 end First_Component_Or_Discriminant;
5828 ------------------------
5829 -- First_Discriminant --
5830 ------------------------
5832 function First_Discriminant (Id : E) return E is
5837 (Has_Discriminants (Id)
5838 or else Has_Unknown_Discriminants (Id));
5840 Ent := First_Entity (Id);
5842 -- The discriminants are not necessarily contiguous, because access
5843 -- discriminants will generate itypes. They are not the first entities
5844 -- either, because tag and controller record must be ahead of them.
5846 if Chars (Ent) = Name_uTag then
5847 Ent := Next_Entity (Ent);
5850 if Chars (Ent) = Name_uController then
5851 Ent := Next_Entity (Ent);
5854 -- Skip all hidden stored discriminants if any
5856 while Present (Ent) loop
5857 exit when Ekind (Ent) = E_Discriminant
5858 and then not Is_Completely_Hidden (Ent);
5860 Ent := Next_Entity (Ent);
5863 pragma Assert (Ekind (Ent) = E_Discriminant);
5866 end First_Discriminant;
5872 function First_Formal (Id : E) return E is
5877 (Is_Overloadable (Id)
5878 or else Ekind (Id) = E_Entry_Family
5879 or else Ekind (Id) = E_Subprogram_Body
5880 or else Ekind (Id) = E_Subprogram_Type);
5882 if Ekind (Id) = E_Enumeration_Literal then
5886 Formal := First_Entity (Id);
5888 if Present (Formal) and then Is_Formal (Formal) then
5896 ------------------------------
5897 -- First_Formal_With_Extras --
5898 ------------------------------
5900 function First_Formal_With_Extras (Id : E) return E is
5905 (Is_Overloadable (Id)
5906 or else Ekind (Id) = E_Entry_Family
5907 or else Ekind (Id) = E_Subprogram_Body
5908 or else Ekind (Id) = E_Subprogram_Type);
5910 if Ekind (Id) = E_Enumeration_Literal then
5914 Formal := First_Entity (Id);
5916 if Present (Formal) and then Is_Formal (Formal) then
5919 return Extra_Formals (Id); -- Empty if no extra formals
5922 end First_Formal_With_Extras;
5924 -------------------------------
5925 -- First_Stored_Discriminant --
5926 -------------------------------
5928 function First_Stored_Discriminant (Id : E) return E is
5931 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5932 -- Scans the Discriminants to see whether any are Completely_Hidden
5933 -- (the mechanism for describing non-specified stored discriminants)
5935 ----------------------------------------
5936 -- Has_Completely_Hidden_Discriminant --
5937 ----------------------------------------
5939 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5940 Ent : Entity_Id := Id;
5943 pragma Assert (Ekind (Id) = E_Discriminant);
5945 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5946 if Is_Completely_Hidden (Ent) then
5950 Ent := Next_Entity (Ent);
5954 end Has_Completely_Hidden_Discriminant;
5956 -- Start of processing for First_Stored_Discriminant
5960 (Has_Discriminants (Id)
5961 or else Has_Unknown_Discriminants (Id));
5963 Ent := First_Entity (Id);
5965 if Chars (Ent) = Name_uTag then
5966 Ent := Next_Entity (Ent);
5969 if Chars (Ent) = Name_uController then
5970 Ent := Next_Entity (Ent);
5973 if Has_Completely_Hidden_Discriminant (Ent) then
5975 while Present (Ent) loop
5976 exit when Is_Completely_Hidden (Ent);
5977 Ent := Next_Entity (Ent);
5982 pragma Assert (Ekind (Ent) = E_Discriminant);
5985 end First_Stored_Discriminant;
5991 function First_Subtype (Id : E) return E is
5992 B : constant Entity_Id := Base_Type (Id);
5993 F : constant Node_Id := Freeze_Node (B);
5997 -- If the base type has no freeze node, it is a type in standard,
5998 -- and always acts as its own first subtype unless it is one of
5999 -- the predefined integer types. If the type is formal, it is also
6000 -- a first subtype, and its base type has no freeze node. On the other
6001 -- hand, a subtype of a generic formal is not its own first_subtype.
6002 -- Its base type, if anonymous, is attached to the formal type decl.
6003 -- from which the first subtype is obtained.
6007 if B = Base_Type (Standard_Integer) then
6008 return Standard_Integer;
6010 elsif B = Base_Type (Standard_Long_Integer) then
6011 return Standard_Long_Integer;
6013 elsif B = Base_Type (Standard_Short_Short_Integer) then
6014 return Standard_Short_Short_Integer;
6016 elsif B = Base_Type (Standard_Short_Integer) then
6017 return Standard_Short_Integer;
6019 elsif B = Base_Type (Standard_Long_Long_Integer) then
6020 return Standard_Long_Long_Integer;
6022 elsif Is_Generic_Type (Id) then
6023 if Present (Parent (B)) then
6024 return Defining_Identifier (Parent (B));
6026 return Defining_Identifier (Associated_Node_For_Itype (B));
6033 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
6034 -- then we use that link, otherwise (happens with some Itypes), we use
6035 -- the base type itself.
6038 Ent := First_Subtype_Link (F);
6040 if Present (Ent) then
6048 -------------------------------------
6049 -- Get_Attribute_Definition_Clause --
6050 -------------------------------------
6052 function Get_Attribute_Definition_Clause
6054 Id : Attribute_Id) return Node_Id
6059 N := First_Rep_Item (E);
6060 while Present (N) loop
6061 if Nkind (N) = N_Attribute_Definition_Clause
6062 and then Get_Attribute_Id (Chars (N)) = Id
6071 end Get_Attribute_Definition_Clause;
6077 function Get_Full_View (T : Entity_Id) return Entity_Id is
6079 if Ekind (T) = E_Incomplete_Type
6080 and then Present (Full_View (T))
6082 return Full_View (T);
6084 elsif Is_Class_Wide_Type (T)
6085 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6086 and then Present (Full_View (Root_Type (T)))
6088 return Class_Wide_Type (Full_View (Root_Type (T)));
6095 --------------------
6096 -- Get_Rep_Pragma --
6097 --------------------
6099 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6103 N := First_Rep_Item (E);
6104 while Present (N) loop
6105 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6115 ------------------------
6116 -- Has_Attach_Handler --
6117 ------------------------
6119 function Has_Attach_Handler (Id : E) return B is
6123 pragma Assert (Is_Protected_Type (Id));
6125 Ritem := First_Rep_Item (Id);
6126 while Present (Ritem) loop
6127 if Nkind (Ritem) = N_Pragma
6128 and then Pragma_Name (Ritem) = Name_Attach_Handler
6132 Ritem := Next_Rep_Item (Ritem);
6137 end Has_Attach_Handler;
6139 -------------------------------------
6140 -- Has_Attribute_Definition_Clause --
6141 -------------------------------------
6143 function Has_Attribute_Definition_Clause
6145 Id : Attribute_Id) return Boolean
6148 return Present (Get_Attribute_Definition_Clause (E, Id));
6149 end Has_Attribute_Definition_Clause;
6155 function Has_Entries (Id : E) return B is
6159 pragma Assert (Is_Concurrent_Type (Id));
6161 Ent := First_Entity (Id);
6162 while Present (Ent) loop
6163 if Is_Entry (Ent) then
6167 Ent := Next_Entity (Ent);
6173 ----------------------------
6174 -- Has_Foreign_Convention --
6175 ----------------------------
6177 function Has_Foreign_Convention (Id : E) return B is
6179 return Convention (Id) in Foreign_Convention;
6180 end Has_Foreign_Convention;
6182 ---------------------------
6183 -- Has_Interrupt_Handler --
6184 ---------------------------
6186 function Has_Interrupt_Handler (Id : E) return B is
6190 pragma Assert (Is_Protected_Type (Id));
6192 Ritem := First_Rep_Item (Id);
6193 while Present (Ritem) loop
6194 if Nkind (Ritem) = N_Pragma
6195 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6199 Ritem := Next_Rep_Item (Ritem);
6204 end Has_Interrupt_Handler;
6206 --------------------------
6207 -- Has_Private_Ancestor --
6208 --------------------------
6210 function Has_Private_Ancestor (Id : E) return B is
6211 R : constant Entity_Id := Root_Type (Id);
6212 T1 : Entity_Id := Id;
6215 if Is_Private_Type (T1) then
6223 end Has_Private_Ancestor;
6225 --------------------
6226 -- Has_Rep_Pragma --
6227 --------------------
6229 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6231 return Present (Get_Rep_Pragma (E, Nam));
6234 --------------------
6235 -- Has_Unmodified --
6236 --------------------
6238 function Has_Unmodified (E : Entity_Id) return Boolean is
6240 if Has_Pragma_Unmodified (E) then
6242 elsif Warnings_Off (E) then
6243 Set_Warnings_Off_Used_Unmodified (E);
6250 ---------------------
6251 -- Has_Unreferenced --
6252 ---------------------
6254 function Has_Unreferenced (E : Entity_Id) return Boolean is
6256 if Has_Pragma_Unreferenced (E) then
6258 elsif Warnings_Off (E) then
6259 Set_Warnings_Off_Used_Unreferenced (E);
6264 end Has_Unreferenced;
6266 ----------------------
6267 -- Has_Warnings_Off --
6268 ----------------------
6270 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6272 if Warnings_Off (E) then
6273 Set_Warnings_Off_Used (E);
6278 end Has_Warnings_Off;
6280 ------------------------------
6281 -- Implementation_Base_Type --
6282 ------------------------------
6284 function Implementation_Base_Type (Id : E) return E is
6289 Bastyp := Base_Type (Id);
6291 if Is_Incomplete_Or_Private_Type (Bastyp) then
6292 Imptyp := Underlying_Type (Bastyp);
6294 -- If we have an implementation type, then just return it,
6295 -- otherwise we return the Base_Type anyway. This can only
6296 -- happen in error situations and should avoid some error bombs.
6298 if Present (Imptyp) then
6299 return Base_Type (Imptyp);
6307 end Implementation_Base_Type;
6309 ---------------------
6310 -- Is_Boolean_Type --
6311 ---------------------
6313 function Is_Boolean_Type (Id : E) return B is
6315 return Root_Type (Id) = Standard_Boolean;
6316 end Is_Boolean_Type;
6318 ---------------------
6319 -- Is_By_Copy_Type --
6320 ---------------------
6322 function Is_By_Copy_Type (Id : E) return B is
6324 -- If Id is a private type whose full declaration has not been seen,
6325 -- we assume for now that it is not a By_Copy type. Clearly this
6326 -- attribute should not be used before the type is frozen, but it is
6327 -- needed to build the associated record of a protected type. Another
6328 -- place where some lookahead for a full view is needed ???
6331 Is_Elementary_Type (Id)
6332 or else (Is_Private_Type (Id)
6333 and then Present (Underlying_Type (Id))
6334 and then Is_Elementary_Type (Underlying_Type (Id)));
6335 end Is_By_Copy_Type;
6337 --------------------------
6338 -- Is_By_Reference_Type --
6339 --------------------------
6341 -- This function knows too much semantics, it should be in sem_util ???
6343 function Is_By_Reference_Type (Id : E) return B is
6344 Btype : constant Entity_Id := Base_Type (Id);
6347 if Error_Posted (Id)
6348 or else Error_Posted (Btype)
6352 elsif Is_Private_Type (Btype) then
6354 Utyp : constant Entity_Id := Underlying_Type (Btype);
6359 return Is_By_Reference_Type (Utyp);
6363 elsif Is_Incomplete_Type (Btype) then
6365 Ftyp : constant Entity_Id := Full_View (Btype);
6370 return Is_By_Reference_Type (Ftyp);
6374 elsif Is_Concurrent_Type (Btype) then
6377 elsif Is_Record_Type (Btype) then
6378 if Is_Limited_Record (Btype)
6379 or else Is_Tagged_Type (Btype)
6380 or else Is_Volatile (Btype)
6389 C := First_Component (Btype);
6390 while Present (C) loop
6391 if Is_By_Reference_Type (Etype (C))
6392 or else Is_Volatile (Etype (C))
6397 C := Next_Component (C);
6404 elsif Is_Array_Type (Btype) then
6407 or else Is_By_Reference_Type (Component_Type (Btype))
6408 or else Is_Volatile (Component_Type (Btype))
6409 or else Has_Volatile_Components (Btype);
6414 end Is_By_Reference_Type;
6416 ------------------------
6417 -- Is_Constant_Object --
6418 ------------------------
6420 function Is_Constant_Object (Id : E) return B is
6421 K : constant Entity_Kind := Ekind (Id);
6424 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6425 end Is_Constant_Object;
6427 ---------------------
6428 -- Is_Derived_Type --
6429 ---------------------
6431 function Is_Derived_Type (Id : E) return B is
6436 and then Base_Type (Id) /= Root_Type (Id)
6437 and then not Is_Class_Wide_Type (Id)
6439 if not Is_Numeric_Type (Root_Type (Id)) then
6443 Par := Parent (First_Subtype (Id));
6445 return Present (Par)
6446 and then Nkind (Par) = N_Full_Type_Declaration
6447 and then Nkind (Type_Definition (Par)) =
6448 N_Derived_Type_Definition;
6454 end Is_Derived_Type;
6456 --------------------
6457 -- Is_Discriminal --
6458 --------------------
6460 function Is_Discriminal (Id : E) return B is
6463 (Ekind (Id) = E_Constant
6464 or else Ekind (Id) = E_In_Parameter)
6465 and then Present (Discriminal_Link (Id));
6468 ----------------------
6469 -- Is_Dynamic_Scope --
6470 ----------------------
6472 function Is_Dynamic_Scope (Id : E) return B is
6475 Ekind (Id) = E_Block
6477 Ekind (Id) = E_Function
6479 Ekind (Id) = E_Procedure
6481 Ekind (Id) = E_Subprogram_Body
6483 Ekind (Id) = E_Task_Type
6485 Ekind (Id) = E_Entry
6487 Ekind (Id) = E_Entry_Family
6489 Ekind (Id) = E_Return_Statement;
6490 end Is_Dynamic_Scope;
6492 --------------------
6493 -- Is_Entity_Name --
6494 --------------------
6496 function Is_Entity_Name (N : Node_Id) return Boolean is
6497 Kind : constant Node_Kind := Nkind (N);
6500 -- Identifiers, operator symbols, expanded names are entity names
6502 return Kind = N_Identifier
6503 or else Kind = N_Operator_Symbol
6504 or else Kind = N_Expanded_Name
6506 -- Attribute references are entity names if they refer to an entity.
6507 -- Note that we don't do this by testing for the presence of the
6508 -- Entity field in the N_Attribute_Reference node, since it may not
6509 -- have been set yet.
6511 or else (Kind = N_Attribute_Reference
6512 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6515 ---------------------------
6516 -- Is_Indefinite_Subtype --
6517 ---------------------------
6519 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
6520 K : constant Entity_Kind := Ekind (Id);
6523 if Is_Constrained (Id) then
6526 elsif K in Array_Kind
6527 or else K in Class_Wide_Kind
6528 or else Has_Unknown_Discriminants (Id)
6532 -- Known discriminants: indefinite if there are no default values
6534 elsif K in Record_Kind
6535 or else Is_Incomplete_Or_Private_Type (Id)
6536 or else Is_Concurrent_Type (Id)
6538 return (Has_Discriminants (Id)
6539 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
6544 end Is_Indefinite_Subtype;
6546 --------------------------------
6547 -- Is_Inherently_Limited_Type --
6548 --------------------------------
6550 function Is_Inherently_Limited_Type (Id : E) return B is
6551 Btype : constant Entity_Id := Base_Type (Id);
6554 if Is_Private_Type (Btype) then
6556 Utyp : constant Entity_Id := Underlying_Type (Btype);
6561 return Is_Inherently_Limited_Type (Utyp);
6565 elsif Is_Concurrent_Type (Btype) then
6568 elsif Is_Record_Type (Btype) then
6569 if Is_Limited_Record (Btype) then
6570 return not Is_Interface (Btype)
6571 or else Is_Protected_Interface (Btype)
6572 or else Is_Synchronized_Interface (Btype)
6573 or else Is_Task_Interface (Btype);
6575 elsif Is_Class_Wide_Type (Btype) then
6576 return Is_Inherently_Limited_Type (Root_Type (Btype));
6583 C := First_Component (Btype);
6584 while Present (C) loop
6585 if Is_Inherently_Limited_Type (Etype (C)) then
6589 C := Next_Component (C);
6596 elsif Is_Array_Type (Btype) then
6597 return Is_Inherently_Limited_Type (Component_Type (Btype));
6602 end Is_Inherently_Limited_Type;
6604 ---------------------
6605 -- Is_Limited_Type --
6606 ---------------------
6608 function Is_Limited_Type (Id : E) return B is
6609 Btype : constant E := Base_Type (Id);
6610 Rtype : constant E := Root_Type (Btype);
6613 if not Is_Type (Id) then
6616 elsif Ekind (Btype) = E_Limited_Private_Type
6617 or else Is_Limited_Composite (Btype)
6621 elsif Is_Concurrent_Type (Btype) then
6624 -- The Is_Limited_Record flag normally indicates that the type is
6625 -- limited. The exception is that a type does not inherit limitedness
6626 -- from its interface ancestor. So the type may be derived from a
6627 -- limited interface, but is not limited.
6629 elsif Is_Limited_Record (Id)
6630 and then not Is_Interface (Id)
6634 -- Otherwise we will look around to see if there is some other reason
6635 -- for it to be limited, except that if an error was posted on the
6636 -- entity, then just assume it is non-limited, because it can cause
6637 -- trouble to recurse into a murky erroneous entity!
6639 elsif Error_Posted (Id) then
6642 elsif Is_Record_Type (Btype) then
6644 if Is_Limited_Interface (Id) then
6647 -- AI-419: limitedness is not inherited from a limited interface
6649 elsif Is_Limited_Record (Rtype) then
6650 return not Is_Interface (Rtype)
6651 or else Is_Protected_Interface (Rtype)
6652 or else Is_Synchronized_Interface (Rtype)
6653 or else Is_Task_Interface (Rtype);
6655 elsif Is_Class_Wide_Type (Btype) then
6656 return Is_Limited_Type (Rtype);
6663 C := First_Component (Btype);
6664 while Present (C) loop
6665 if Is_Limited_Type (Etype (C)) then
6669 C := Next_Component (C);
6676 elsif Is_Array_Type (Btype) then
6677 return Is_Limited_Type (Component_Type (Btype));
6682 end Is_Limited_Type;
6684 -----------------------------------
6685 -- Is_Package_Or_Generic_Package --
6686 -----------------------------------
6688 function Is_Package_Or_Generic_Package (Id : E) return B is
6691 Ekind (Id) = E_Package
6693 Ekind (Id) = E_Generic_Package;
6694 end Is_Package_Or_Generic_Package;
6700 function Is_Prival (Id : E) return B is
6703 (Ekind (Id) = E_Constant
6704 or else Ekind (Id) = E_Variable)
6705 and then Present (Prival_Link (Id));
6708 ----------------------------
6709 -- Is_Protected_Component --
6710 ----------------------------
6712 function Is_Protected_Component (Id : E) return B is
6714 return Ekind (Id) = E_Component
6715 and then Is_Protected_Type (Scope (Id));
6716 end Is_Protected_Component;
6718 ------------------------------
6719 -- Is_Protected_Record_Type --
6720 ------------------------------
6722 function Is_Protected_Record_Type (Id : E) return B is
6725 Is_Concurrent_Record_Type (Id)
6726 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6727 end Is_Protected_Record_Type;
6729 --------------------------------
6730 -- Is_Standard_Character_Type --
6731 --------------------------------
6733 function Is_Standard_Character_Type (Id : E) return B is
6735 if Is_Type (Id) then
6737 R : constant Entity_Id := Root_Type (Id);
6740 R = Standard_Character
6742 R = Standard_Wide_Character
6744 R = Standard_Wide_Wide_Character;
6750 end Is_Standard_Character_Type;
6752 --------------------
6753 -- Is_String_Type --
6754 --------------------
6756 function Is_String_Type (Id : E) return B is
6758 return Ekind (Id) in String_Kind
6759 or else (Is_Array_Type (Id)
6760 and then Number_Dimensions (Id) = 1
6761 and then Is_Character_Type (Component_Type (Id)));
6764 -------------------------
6765 -- Is_Task_Record_Type --
6766 -------------------------
6768 function Is_Task_Record_Type (Id : E) return B is
6771 Is_Concurrent_Record_Type (Id)
6772 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6773 end Is_Task_Record_Type;
6775 ------------------------
6776 -- Is_Wrapper_Package --
6777 ------------------------
6779 function Is_Wrapper_Package (Id : E) return B is
6781 return (Ekind (Id) = E_Package
6782 and then Present (Related_Instance (Id)));
6783 end Is_Wrapper_Package;
6785 --------------------
6786 -- Next_Component --
6787 --------------------
6789 function Next_Component (Id : E) return E is
6793 Comp_Id := Next_Entity (Id);
6794 while Present (Comp_Id) loop
6795 exit when Ekind (Comp_Id) = E_Component;
6796 Comp_Id := Next_Entity (Comp_Id);
6802 ------------------------------------
6803 -- Next_Component_Or_Discriminant --
6804 ------------------------------------
6806 function Next_Component_Or_Discriminant (Id : E) return E is
6810 Comp_Id := Next_Entity (Id);
6811 while Present (Comp_Id) loop
6812 exit when Ekind (Comp_Id) = E_Component
6814 Ekind (Comp_Id) = E_Discriminant;
6815 Comp_Id := Next_Entity (Comp_Id);
6819 end Next_Component_Or_Discriminant;
6821 -----------------------
6822 -- Next_Discriminant --
6823 -----------------------
6825 -- This function actually implements both Next_Discriminant and
6826 -- Next_Stored_Discriminant by making sure that the Discriminant
6827 -- returned is of the same variety as Id.
6829 function Next_Discriminant (Id : E) return E is
6831 -- Derived Tagged types with private extensions look like this...
6833 -- E_Discriminant d1
6834 -- E_Discriminant d2
6836 -- E_Discriminant d1
6837 -- E_Discriminant d2
6840 -- so it is critical not to go past the leading discriminants
6845 pragma Assert (Ekind (Id) = E_Discriminant);
6848 D := Next_Entity (D);
6850 or else (Ekind (D) /= E_Discriminant
6851 and then not Is_Itype (D))
6856 exit when Ekind (D) = E_Discriminant
6857 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6861 end Next_Discriminant;
6867 function Next_Formal (Id : E) return E is
6871 -- Follow the chain of declared entities as long as the kind of the
6872 -- entity corresponds to a formal parameter. Skip internal entities
6873 -- that may have been created for implicit subtypes, in the process
6874 -- of analyzing default expressions.
6879 P := Next_Entity (P);
6881 if No (P) or else Is_Formal (P) then
6883 elsif not Is_Internal (P) then
6889 -----------------------------
6890 -- Next_Formal_With_Extras --
6891 -----------------------------
6893 function Next_Formal_With_Extras (Id : E) return E is
6895 if Present (Extra_Formal (Id)) then
6896 return Extra_Formal (Id);
6898 return Next_Formal (Id);
6900 end Next_Formal_With_Extras;
6906 function Next_Index (Id : Node_Id) return Node_Id is
6915 function Next_Literal (Id : E) return E is
6917 pragma Assert (Nkind (Id) in N_Entity);
6921 ------------------------------
6922 -- Next_Stored_Discriminant --
6923 ------------------------------
6925 function Next_Stored_Discriminant (Id : E) return E is
6927 -- See comment in Next_Discriminant
6929 return Next_Discriminant (Id);
6930 end Next_Stored_Discriminant;
6932 -----------------------
6933 -- Number_Dimensions --
6934 -----------------------
6936 function Number_Dimensions (Id : E) return Pos is
6941 if Ekind (Id) in String_Kind then
6946 T := First_Index (Id);
6947 while Present (T) loop
6954 end Number_Dimensions;
6956 --------------------------
6957 -- Number_Discriminants --
6958 --------------------------
6960 function Number_Discriminants (Id : E) return Pos is
6966 Discr := First_Discriminant (Id);
6967 while Present (Discr) loop
6969 Discr := Next_Discriminant (Discr);
6973 end Number_Discriminants;
6975 --------------------
6976 -- Number_Entries --
6977 --------------------
6979 function Number_Entries (Id : E) return Nat is
6984 pragma Assert (Is_Concurrent_Type (Id));
6987 Ent := First_Entity (Id);
6988 while Present (Ent) loop
6989 if Is_Entry (Ent) then
6993 Ent := Next_Entity (Ent);
6999 --------------------
7000 -- Number_Formals --
7001 --------------------
7003 function Number_Formals (Id : E) return Pos is
7009 Formal := First_Formal (Id);
7010 while Present (Formal) loop
7012 Formal := Next_Formal (Formal);
7018 --------------------
7019 -- Parameter_Mode --
7020 --------------------
7022 function Parameter_Mode (Id : E) return Formal_Kind is
7027 ---------------------
7028 -- Record_Rep_Item --
7029 ---------------------
7031 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7033 Set_Next_Rep_Item (N, First_Rep_Item (E));
7034 Set_First_Rep_Item (E, N);
7035 end Record_Rep_Item;
7041 function Root_Type (Id : E) return E is
7045 pragma Assert (Nkind (Id) in N_Entity);
7047 T := Base_Type (Id);
7049 if Ekind (T) = E_Class_Wide_Type then
7052 elsif Ekind (T) = E_Class_Wide_Subtype then
7053 return Etype (Base_Type (T));
7055 -- ??? T comes from Base_Type, how can it be a subtype?
7056 -- Also Base_Type is supposed to be idempotent, so either way
7057 -- this is equivalent to "return Etype (T)" and should be merged
7058 -- with the E_Class_Wide_Type case.
7069 -- Following test catches some error cases resulting from
7072 elsif No (Etyp) then
7075 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7078 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7084 -- Return if there is a circularity in the inheritance chain. This
7085 -- happens in some error situations and we do not want to get
7086 -- stuck in this loop.
7088 if T = Base_Type (Id) then
7099 function Scope_Depth (Id : E) return Uint is
7104 while Is_Record_Type (Scop) loop
7105 Scop := Scope (Scop);
7108 return Scope_Depth_Value (Scop);
7111 ---------------------
7112 -- Scope_Depth_Set --
7113 ---------------------
7115 function Scope_Depth_Set (Id : E) return B is
7117 return not Is_Record_Type (Id)
7118 and then Field22 (Id) /= Union_Id (Empty);
7119 end Scope_Depth_Set;
7121 -----------------------------
7122 -- Set_Component_Alignment --
7123 -----------------------------
7125 -- Component Alignment is encoded using two flags, Flag128/129 as
7126 -- follows. Note that both flags False = Align_Default, so that the
7127 -- default initialization of flags to False initializes component
7128 -- alignment to the default value as required.
7130 -- Flag128 Flag129 Value
7131 -- ------- ------- -----
7132 -- False False Calign_Default
7133 -- False True Calign_Component_Size
7134 -- True False Calign_Component_Size_4
7135 -- True True Calign_Storage_Unit
7137 procedure Set_Component_Alignment (Id : E; V : C) is
7139 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7140 and then Id = Base_Type (Id));
7143 when Calign_Default =>
7144 Set_Flag128 (Id, False);
7145 Set_Flag129 (Id, False);
7147 when Calign_Component_Size =>
7148 Set_Flag128 (Id, False);
7149 Set_Flag129 (Id, True);
7151 when Calign_Component_Size_4 =>
7152 Set_Flag128 (Id, True);
7153 Set_Flag129 (Id, False);
7155 when Calign_Storage_Unit =>
7156 Set_Flag128 (Id, True);
7157 Set_Flag129 (Id, True);
7159 end Set_Component_Alignment;
7165 function Size_Clause (Id : E) return N is
7167 return Rep_Clause (Id, Name_Size);
7170 ------------------------
7171 -- Stream_Size_Clause --
7172 ------------------------
7174 function Stream_Size_Clause (Id : E) return N is
7176 return Rep_Clause (Id, Name_Stream_Size);
7177 end Stream_Size_Clause;
7183 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7189 Kind := E_Access_Subtype;
7193 Kind := E_Array_Subtype;
7195 when E_Class_Wide_Type |
7196 E_Class_Wide_Subtype =>
7197 Kind := E_Class_Wide_Subtype;
7199 when E_Decimal_Fixed_Point_Type |
7200 E_Decimal_Fixed_Point_Subtype =>
7201 Kind := E_Decimal_Fixed_Point_Subtype;
7203 when E_Ordinary_Fixed_Point_Type |
7204 E_Ordinary_Fixed_Point_Subtype =>
7205 Kind := E_Ordinary_Fixed_Point_Subtype;
7207 when E_Private_Type |
7208 E_Private_Subtype =>
7209 Kind := E_Private_Subtype;
7211 when E_Limited_Private_Type |
7212 E_Limited_Private_Subtype =>
7213 Kind := E_Limited_Private_Subtype;
7215 when E_Record_Type_With_Private |
7216 E_Record_Subtype_With_Private =>
7217 Kind := E_Record_Subtype_With_Private;
7219 when E_Record_Type |
7221 Kind := E_Record_Subtype;
7223 when E_String_Type |
7225 Kind := E_String_Subtype;
7227 when Enumeration_Kind =>
7228 Kind := E_Enumeration_Subtype;
7231 Kind := E_Floating_Point_Subtype;
7233 when Signed_Integer_Kind =>
7234 Kind := E_Signed_Integer_Subtype;
7236 when Modular_Integer_Kind =>
7237 Kind := E_Modular_Integer_Subtype;
7239 when Protected_Kind =>
7240 Kind := E_Protected_Subtype;
7243 Kind := E_Task_Subtype;
7247 raise Program_Error;
7253 -------------------------
7254 -- First_Tag_Component --
7255 -------------------------
7257 function First_Tag_Component (Id : E) return E is
7259 Typ : Entity_Id := Id;
7262 pragma Assert (Is_Tagged_Type (Typ));
7264 if Is_Class_Wide_Type (Typ) then
7265 Typ := Root_Type (Typ);
7268 if Is_Private_Type (Typ) then
7269 Typ := Underlying_Type (Typ);
7271 -- If the underlying type is missing then the source program has
7272 -- errors and there is nothing else to do (the full-type declaration
7273 -- associated with the private type declaration is missing).
7280 Comp := First_Entity (Typ);
7281 while Present (Comp) loop
7282 if Is_Tag (Comp) then
7286 Comp := Next_Entity (Comp);
7289 -- No tag component found
7292 end First_Tag_Component;
7294 ------------------------
7295 -- Next_Tag_Component --
7296 ------------------------
7298 function Next_Tag_Component (Id : E) return E is
7300 Typ : constant Entity_Id := Scope (Id);
7303 pragma Assert (Ekind (Id) = E_Component
7304 and then Is_Tagged_Type (Typ));
7306 Comp := Next_Entity (Id);
7307 while Present (Comp) loop
7308 if Is_Tag (Comp) then
7309 pragma Assert (Chars (Comp) /= Name_uTag);
7313 Comp := Next_Entity (Comp);
7316 -- No tag component found
7319 end Next_Tag_Component;
7321 ---------------------
7322 -- Type_High_Bound --
7323 ---------------------
7325 function Type_High_Bound (Id : E) return Node_Id is
7326 Rng : constant Node_Id := Scalar_Range (Id);
7328 if Nkind (Rng) = N_Subtype_Indication then
7329 return High_Bound (Range_Expression (Constraint (Rng)));
7331 return High_Bound (Rng);
7333 end Type_High_Bound;
7335 --------------------
7336 -- Type_Low_Bound --
7337 --------------------
7339 function Type_Low_Bound (Id : E) return Node_Id is
7340 Rng : constant Node_Id := Scalar_Range (Id);
7342 if Nkind (Rng) = N_Subtype_Indication then
7343 return Low_Bound (Range_Expression (Constraint (Rng)));
7345 return Low_Bound (Rng);
7349 ---------------------
7350 -- Underlying_Type --
7351 ---------------------
7353 function Underlying_Type (Id : E) return E is
7355 -- For record_with_private the underlying type is always the direct
7356 -- full view. Never try to take the full view of the parent it
7357 -- doesn't make sense.
7359 if Ekind (Id) = E_Record_Type_With_Private then
7360 return Full_View (Id);
7362 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7364 -- If we have an incomplete or private type with a full view,
7365 -- then we return the Underlying_Type of this full view
7367 if Present (Full_View (Id)) then
7368 if Id = Full_View (Id) then
7370 -- Previous error in declaration
7375 return Underlying_Type (Full_View (Id));
7378 -- If we have an incomplete entity that comes from the limited
7379 -- view then we return the Underlying_Type of its non-limited
7382 elsif From_With_Type (Id)
7383 and then Present (Non_Limited_View (Id))
7385 return Underlying_Type (Non_Limited_View (Id));
7387 -- Otherwise check for the case where we have a derived type or
7388 -- subtype, and if so get the Underlying_Type of the parent type.
7390 elsif Etype (Id) /= Id then
7391 return Underlying_Type (Etype (Id));
7393 -- Otherwise we have an incomplete or private type that has
7394 -- no full view, which means that we have not encountered the
7395 -- completion, so return Empty to indicate the underlying type
7396 -- is not yet known.
7402 -- For non-incomplete, non-private types, return the type itself
7403 -- Also for entities that are not types at all return the entity
7409 end Underlying_Type;
7411 ------------------------
7412 -- Write_Entity_Flags --
7413 ------------------------
7415 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7417 procedure W (Flag_Name : String; Flag : Boolean);
7418 -- Write out given flag if it is set
7424 procedure W (Flag_Name : String; Flag : Boolean) is
7428 Write_Str (Flag_Name);
7429 Write_Str (" = True");
7434 -- Start of processing for Write_Entity_Flags
7437 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7438 and then Id = Base_Type (Id)
7441 Write_Str ("Component_Alignment = ");
7443 case Component_Alignment (Id) is
7444 when Calign_Default =>
7445 Write_Str ("Calign_Default");
7447 when Calign_Component_Size =>
7448 Write_Str ("Calign_Component_Size");
7450 when Calign_Component_Size_4 =>
7451 Write_Str ("Calign_Component_Size_4");
7453 when Calign_Storage_Unit =>
7454 Write_Str ("Calign_Storage_Unit");
7460 W ("Address_Taken", Flag104 (Id));
7461 W ("Body_Needed_For_SAL", Flag40 (Id));
7462 W ("C_Pass_By_Copy", Flag125 (Id));
7463 W ("Can_Never_Be_Null", Flag38 (Id));
7464 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7465 W ("Debug_Info_Off", Flag166 (Id));
7466 W ("Default_Expressions_Processed", Flag108 (Id));
7467 W ("Delay_Cleanups", Flag114 (Id));
7468 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7469 W ("Depends_On_Private", Flag14 (Id));
7470 W ("Discard_Names", Flag88 (Id));
7471 W ("Elaboration_Entity_Required", Flag174 (Id));
7472 W ("Elaborate_Body_Desirable", Flag210 (Id));
7473 W ("Entry_Accepted", Flag152 (Id));
7474 W ("Can_Use_Internal_Rep", Flag229 (Id));
7475 W ("Finalize_Storage_Only", Flag158 (Id));
7476 W ("From_With_Type", Flag159 (Id));
7477 W ("Function_Returns_With_DSP", Flag169 (Id));
7478 W ("Has_Aliased_Components", Flag135 (Id));
7479 W ("Has_Alignment_Clause", Flag46 (Id));
7480 W ("Has_All_Calls_Remote", Flag79 (Id));
7481 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7482 W ("Has_Atomic_Components", Flag86 (Id));
7483 W ("Has_Biased_Representation", Flag139 (Id));
7484 W ("Has_Completion", Flag26 (Id));
7485 W ("Has_Completion_In_Body", Flag71 (Id));
7486 W ("Has_Complex_Representation", Flag140 (Id));
7487 W ("Has_Component_Size_Clause", Flag68 (Id));
7488 W ("Has_Contiguous_Rep", Flag181 (Id));
7489 W ("Has_Controlled_Component", Flag43 (Id));
7490 W ("Has_Controlling_Result", Flag98 (Id));
7491 W ("Has_Convention_Pragma", Flag119 (Id));
7492 W ("Has_Delayed_Freeze", Flag18 (Id));
7493 W ("Has_Discriminants", Flag5 (Id));
7494 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7495 W ("Has_Exit", Flag47 (Id));
7496 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7497 W ("Has_Forward_Instantiation", Flag175 (Id));
7498 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7499 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7500 W ("Has_Homonym", Flag56 (Id));
7501 W ("Has_Initial_Value", Flag219 (Id));
7502 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7503 W ("Has_Master_Entity", Flag21 (Id));
7504 W ("Has_Missing_Return", Flag142 (Id));
7505 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7506 W ("Has_Non_Standard_Rep", Flag75 (Id));
7507 W ("Has_Object_Size_Clause", Flag172 (Id));
7508 W ("Has_Per_Object_Constraint", Flag154 (Id));
7509 W ("Has_Persistent_BSS", Flag188 (Id));
7510 W ("Has_Postconditions", Flag240 (Id));
7511 W ("Has_Pragma_Controlled", Flag27 (Id));
7512 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7513 W ("Has_Pragma_Inline", Flag157 (Id));
7514 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7515 W ("Has_Pragma_Pack", Flag121 (Id));
7516 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7517 W ("Has_Pragma_Pure", Flag203 (Id));
7518 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7519 W ("Has_Pragma_Unmodified", Flag233 (Id));
7520 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7521 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7522 W ("Has_Primitive_Operations", Flag120 (Id));
7523 W ("Has_Private_Declaration", Flag155 (Id));
7524 W ("Has_Qualified_Name", Flag161 (Id));
7525 W ("Has_RACW", Flag214 (Id));
7526 W ("Has_Record_Rep_Clause", Flag65 (Id));
7527 W ("Has_Recursive_Call", Flag143 (Id));
7528 W ("Has_Size_Clause", Flag29 (Id));
7529 W ("Has_Small_Clause", Flag67 (Id));
7530 W ("Has_Specified_Layout", Flag100 (Id));
7531 W ("Has_Specified_Stream_Input", Flag190 (Id));
7532 W ("Has_Specified_Stream_Output", Flag191 (Id));
7533 W ("Has_Specified_Stream_Read", Flag192 (Id));
7534 W ("Has_Specified_Stream_Write", Flag193 (Id));
7535 W ("Has_Static_Discriminants", Flag211 (Id));
7536 W ("Has_Storage_Size_Clause", Flag23 (Id));
7537 W ("Has_Stream_Size_Clause", Flag184 (Id));
7538 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7539 W ("Has_Task", Flag30 (Id));
7540 W ("Has_Thunks", Flag228 (Id));
7541 W ("Has_Unchecked_Union", Flag123 (Id));
7542 W ("Has_Unknown_Discriminants", Flag72 (Id));
7543 W ("Has_Up_Level_Access", Flag215 (Id));
7544 W ("Has_Volatile_Components", Flag87 (Id));
7545 W ("Has_Xref_Entry", Flag182 (Id));
7546 W ("Implemented_By_Entry", Flag232 (Id));
7547 W ("In_Package_Body", Flag48 (Id));
7548 W ("In_Private_Part", Flag45 (Id));
7549 W ("In_Use", Flag8 (Id));
7550 W ("Is_AST_Entry", Flag132 (Id));
7551 W ("Is_Abstract_Subprogram", Flag19 (Id));
7552 W ("Is_Abstract_Type", Flag146 (Id));
7553 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7554 W ("Is_Access_Constant", Flag69 (Id));
7555 W ("Is_Ada_2005_Only", Flag185 (Id));
7556 W ("Is_Aliased", Flag15 (Id));
7557 W ("Is_Asynchronous", Flag81 (Id));
7558 W ("Is_Atomic", Flag85 (Id));
7559 W ("Is_Bit_Packed_Array", Flag122 (Id));
7560 W ("Is_CPP_Class", Flag74 (Id));
7561 W ("Is_Called", Flag102 (Id));
7562 W ("Is_Character_Type", Flag63 (Id));
7563 W ("Is_Child_Unit", Flag73 (Id));
7564 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7565 W ("Is_Compilation_Unit", Flag149 (Id));
7566 W ("Is_Completely_Hidden", Flag103 (Id));
7567 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7568 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7569 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7570 W ("Is_Constrained", Flag12 (Id));
7571 W ("Is_Constructor", Flag76 (Id));
7572 W ("Is_Controlled", Flag42 (Id));
7573 W ("Is_Controlling_Formal", Flag97 (Id));
7574 W ("Is_Descendent_Of_Address", Flag223 (Id));
7575 W ("Is_Discrim_SO_Function", Flag176 (Id));
7576 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7577 W ("Is_Dispatching_Operation", Flag6 (Id));
7578 W ("Is_Eliminated", Flag124 (Id));
7579 W ("Is_Entry_Formal", Flag52 (Id));
7580 W ("Is_Exported", Flag99 (Id));
7581 W ("Is_First_Subtype", Flag70 (Id));
7582 W ("Is_For_Access_Subtype", Flag118 (Id));
7583 W ("Is_Formal_Subprogram", Flag111 (Id));
7584 W ("Is_Frozen", Flag4 (Id));
7585 W ("Is_Generic_Actual_Type", Flag94 (Id));
7586 W ("Is_Generic_Instance", Flag130 (Id));
7587 W ("Is_Generic_Type", Flag13 (Id));
7588 W ("Is_Hidden", Flag57 (Id));
7589 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7590 W ("Is_Immediately_Visible", Flag7 (Id));
7591 W ("Is_Imported", Flag24 (Id));
7592 W ("Is_Inlined", Flag11 (Id));
7593 W ("Is_Instantiated", Flag126 (Id));
7594 W ("Is_Interface", Flag186 (Id));
7595 W ("Is_Internal", Flag17 (Id));
7596 W ("Is_Interrupt_Handler", Flag89 (Id));
7597 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7598 W ("Is_Itype", Flag91 (Id));
7599 W ("Is_Known_Non_Null", Flag37 (Id));
7600 W ("Is_Known_Null", Flag204 (Id));
7601 W ("Is_Known_Valid", Flag170 (Id));
7602 W ("Is_Limited_Composite", Flag106 (Id));
7603 W ("Is_Limited_Interface", Flag197 (Id));
7604 W ("Is_Limited_Record", Flag25 (Id));
7605 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7606 W ("Is_Non_Static_Subtype", Flag109 (Id));
7607 W ("Is_Null_Init_Proc", Flag178 (Id));
7608 W ("Is_Obsolescent", Flag153 (Id));
7609 W ("Is_Only_Out_Parameter", Flag226 (Id));
7610 W ("Is_Optional_Parameter", Flag134 (Id));
7611 W ("Is_Overriding_Operation", Flag39 (Id));
7612 W ("Is_Package_Body_Entity", Flag160 (Id));
7613 W ("Is_Packed", Flag51 (Id));
7614 W ("Is_Packed_Array_Type", Flag138 (Id));
7615 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7616 W ("Is_Preelaborated", Flag59 (Id));
7617 W ("Is_Primitive_Wrapper", Flag195 (Id));
7618 W ("Is_Private_Composite", Flag107 (Id));
7619 W ("Is_Private_Descendant", Flag53 (Id));
7620 W ("Is_Protected_Interface", Flag198 (Id));
7621 W ("Is_Public", Flag10 (Id));
7622 W ("Is_Pure", Flag44 (Id));
7623 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7624 W ("Is_Raised", Flag224 (Id));
7625 W ("Is_Remote_Call_Interface", Flag62 (Id));
7626 W ("Is_Remote_Types", Flag61 (Id));
7627 W ("Is_Renaming_Of_Object", Flag112 (Id));
7628 W ("Is_Return_Object", Flag209 (Id));
7629 W ("Is_Shared_Passive", Flag60 (Id));
7630 W ("Is_Synchronized_Interface", Flag199 (Id));
7631 W ("Is_Statically_Allocated", Flag28 (Id));
7632 W ("Is_Tag", Flag78 (Id));
7633 W ("Is_Tagged_Type", Flag55 (Id));
7634 W ("Is_Task_Interface", Flag200 (Id));
7635 W ("Is_Thunk", Flag225 (Id));
7636 W ("Is_Trivial_Subprogram", Flag235 (Id));
7637 W ("Is_True_Constant", Flag163 (Id));
7638 W ("Is_Unchecked_Union", Flag117 (Id));
7639 W ("Is_Unsigned_Type", Flag144 (Id));
7640 W ("Is_VMS_Exception", Flag133 (Id));
7641 W ("Is_Valued_Procedure", Flag127 (Id));
7642 W ("Is_Visible_Child_Unit", Flag116 (Id));
7643 W ("Is_Visible_Formal", Flag206 (Id));
7644 W ("Is_Volatile", Flag16 (Id));
7645 W ("Itype_Printed", Flag202 (Id));
7646 W ("Kill_Elaboration_Checks", Flag32 (Id));
7647 W ("Kill_Range_Checks", Flag33 (Id));
7648 W ("Kill_Tag_Checks", Flag34 (Id));
7649 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7650 W ("Low_Bound_Known", Flag205 (Id));
7651 W ("Machine_Radix_10", Flag84 (Id));
7652 W ("Materialize_Entity", Flag168 (Id));
7653 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7654 W ("Must_Have_Preelab_Init", Flag208 (Id));
7655 W ("Needs_Debug_Info", Flag147 (Id));
7656 W ("Needs_No_Actuals", Flag22 (Id));
7657 W ("Never_Set_In_Source", Flag115 (Id));
7658 W ("No_Pool_Assigned", Flag131 (Id));
7659 W ("No_Return", Flag113 (Id));
7660 W ("No_Strict_Aliasing", Flag136 (Id));
7661 W ("Non_Binary_Modulus", Flag58 (Id));
7662 W ("Nonzero_Is_True", Flag162 (Id));
7663 W ("OK_To_Reorder_Components", Flag239 (Id));
7664 W ("Optimize_Alignment_Space", Flag241 (Id));
7665 W ("Optimize_Alignment_Time", Flag242 (Id));
7666 W ("Overlays_Constant", Flag243 (Id));
7667 W ("Reachable", Flag49 (Id));
7668 W ("Referenced", Flag156 (Id));
7669 W ("Referenced_As_LHS", Flag36 (Id));
7670 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7671 W ("Renamed_In_Spec", Flag231 (Id));
7672 W ("Requires_Overriding", Flag213 (Id));
7673 W ("Return_Present", Flag54 (Id));
7674 W ("Returns_By_Ref", Flag90 (Id));
7675 W ("Reverse_Bit_Order", Flag164 (Id));
7676 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7677 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7678 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7679 W ("Static_Elaboration_Desired", Flag77 (Id));
7680 W ("Strict_Alignment", Flag145 (Id));
7681 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7682 W ("Suppress_Init_Proc", Flag105 (Id));
7683 W ("Suppress_Style_Checks", Flag165 (Id));
7684 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7685 W ("Is_Primitive", Flag218 (Id));
7686 W ("Treat_As_Volatile", Flag41 (Id));
7687 W ("Universal_Aliasing", Flag216 (Id));
7688 W ("Used_As_Generic_Actual", Flag222 (Id));
7689 W ("Uses_Sec_Stack", Flag95 (Id));
7690 W ("Vax_Float", Flag151 (Id));
7691 W ("Warnings_Off", Flag96 (Id));
7692 W ("Warnings_Off_Used", Flag236 (Id));
7693 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7694 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7695 W ("Was_Hidden", Flag196 (Id));
7696 end Write_Entity_Flags;
7698 -----------------------
7699 -- Write_Entity_Info --
7700 -----------------------
7702 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7704 procedure Write_Attribute (Which : String; Nam : E);
7705 -- Write attribute value with given string name
7707 procedure Write_Kind (Id : Entity_Id);
7708 -- Write Ekind field of entity
7710 ---------------------
7711 -- Write_Attribute --
7712 ---------------------
7714 procedure Write_Attribute (Which : String; Nam : E) is
7718 Write_Int (Int (Nam));
7720 Write_Name (Chars (Nam));
7722 end Write_Attribute;
7728 procedure Write_Kind (Id : Entity_Id) is
7729 K : constant String := Entity_Kind'Image (Ekind (Id));
7733 Write_Str (" Kind ");
7735 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7736 Write_Str ("TAGGED ");
7739 Write_Str (K (3 .. K'Length));
7742 if Is_Type (Id) and then Depends_On_Private (Id) then
7743 Write_Str ("Depends_On_Private ");
7747 -- Start of processing for Write_Entity_Info
7751 Write_Attribute ("Name ", Id);
7752 Write_Int (Int (Id));
7756 Write_Attribute (" Type ", Etype (Id));
7758 Write_Attribute (" Scope ", Scope (Id));
7763 when Discrete_Kind =>
7764 Write_Str ("Bounds: Id = ");
7766 if Present (Scalar_Range (Id)) then
7767 Write_Int (Int (Type_Low_Bound (Id)));
7768 Write_Str (" .. Id = ");
7769 Write_Int (Int (Type_High_Bound (Id)));
7771 Write_Str ("Empty");
7782 (" Component Type ", Component_Type (Id));
7785 Write_Str (" Indices ");
7787 Index := First_Index (Id);
7788 while Present (Index) loop
7789 Write_Attribute (" ", Etype (Index));
7790 Index := Next_Index (Index);
7798 (" Directly Designated Type ",
7799 Directly_Designated_Type (Id));
7802 when Overloadable_Kind =>
7803 if Present (Homonym (Id)) then
7804 Write_Str (" Homonym ");
7805 Write_Name (Chars (Homonym (Id)));
7807 Write_Int (Int (Homonym (Id)));
7814 if Ekind (Scope (Id)) in Record_Kind then
7816 " Original_Record_Component ",
7817 Original_Record_Component (Id));
7818 Write_Int (Int (Original_Record_Component (Id)));
7822 when others => null;
7824 end Write_Entity_Info;
7826 -----------------------
7827 -- Write_Field6_Name --
7828 -----------------------
7830 procedure Write_Field6_Name (Id : Entity_Id) is
7831 pragma Warnings (Off, Id);
7833 Write_Str ("First_Rep_Item");
7834 end Write_Field6_Name;
7836 -----------------------
7837 -- Write_Field7_Name --
7838 -----------------------
7840 procedure Write_Field7_Name (Id : Entity_Id) is
7841 pragma Warnings (Off, Id);
7843 Write_Str ("Freeze_Node");
7844 end Write_Field7_Name;
7846 -----------------------
7847 -- Write_Field8_Name --
7848 -----------------------
7850 procedure Write_Field8_Name (Id : Entity_Id) is
7855 Write_Str ("Normalized_First_Bit");
7859 E_Subprogram_Body =>
7860 Write_Str ("Mechanism");
7863 Write_Str ("Associated_Node_For_Itype");
7866 Write_Str ("Dependent_Instances");
7868 when E_Return_Statement =>
7869 Write_Str ("Return_Applies_To");
7872 Write_Str ("Hiding_Loop_Variable");
7875 Write_Str ("Field8??");
7877 end Write_Field8_Name;
7879 -----------------------
7880 -- Write_Field9_Name --
7881 -----------------------
7883 procedure Write_Field9_Name (Id : Entity_Id) is
7887 Write_Str ("Class_Wide_Type");
7890 E_Generic_Function |
7892 E_Generic_Procedure |
7895 Write_Str ("Renaming_Map");
7898 Write_Str ("Current_Value");
7901 Write_Str ("Field9??");
7903 end Write_Field9_Name;
7905 ------------------------
7906 -- Write_Field10_Name --
7907 ------------------------
7909 procedure Write_Field10_Name (Id : Entity_Id) is
7913 Write_Str ("Referenced_Object");
7915 when E_In_Parameter |
7917 Write_Str ("Discriminal_Link");
7923 Write_Str ("Handler_Records");
7927 Write_Str ("Normalized_Position_Max");
7930 Write_Str ("Field10??");
7932 end Write_Field10_Name;
7934 ------------------------
7935 -- Write_Field11_Name --
7936 ------------------------
7938 procedure Write_Field11_Name (Id : Entity_Id) is
7942 Write_Str ("Entry_Component");
7946 Write_Str ("Component_Bit_Offset");
7949 Write_Str ("Full_View");
7951 when E_Enumeration_Literal =>
7952 Write_Str ("Enumeration_Pos");
7955 Write_Str ("Block_Node");
7961 Write_Str ("Protected_Body_Subprogram");
7963 when E_Generic_Package =>
7964 Write_Str ("Generic_Homonym");
7967 Write_Str ("Full_View");
7970 Write_Str ("Field11??");
7972 end Write_Field11_Name;
7974 ------------------------
7975 -- Write_Field12_Name --
7976 ------------------------
7978 procedure Write_Field12_Name (Id : Entity_Id) is
7982 Write_Str ("Barrier_Function");
7984 when E_Enumeration_Literal =>
7985 Write_Str ("Enumeration_Rep");
7993 E_In_Out_Parameter |
7997 Write_Str ("Esize");
8001 Write_Str ("Next_Inlined_Subprogram");
8004 Write_Str ("Associated_Formal_Package");
8007 Write_Str ("Field12??");
8009 end Write_Field12_Name;
8011 ------------------------
8012 -- Write_Field13_Name --
8013 ------------------------
8015 procedure Write_Field13_Name (Id : Entity_Id) is
8019 Write_Str ("RM_Size");
8023 Write_Str ("Component_Clause");
8026 if not Comes_From_Source (Id)
8028 Chars (Id) = Name_Op_Ne
8030 Write_Str ("Corresponding_Equality");
8032 elsif Comes_From_Source (Id) then
8033 Write_Str ("Elaboration_Entity");
8036 Write_Str ("Field13??");
8041 Write_Str ("Extra_Accessibility");
8045 Generic_Unit_Kind =>
8046 Write_Str ("Elaboration_Entity");
8049 Write_Str ("Field13??");
8051 end Write_Field13_Name;
8053 -----------------------
8054 -- Write_Field14_Name --
8055 -----------------------
8057 procedure Write_Field14_Name (Id : Entity_Id) is
8066 Write_Str ("Alignment");
8070 Write_Str ("Normalized_Position");
8074 Write_Str ("First_Optional_Parameter");
8077 E_Generic_Package =>
8078 Write_Str ("Shadow_Entities");
8081 Write_Str ("Field14??");
8083 end Write_Field14_Name;
8085 ------------------------
8086 -- Write_Field15_Name --
8087 ------------------------
8089 procedure Write_Field15_Name (Id : Entity_Id) is
8094 Write_Str ("Storage_Size_Variable");
8096 when Class_Wide_Kind |
8100 Write_Str ("Primitive_Operations");
8103 Write_Str ("DT_Entry_Count");
8105 when Decimal_Fixed_Point_Kind =>
8106 Write_Str ("Scale_Value");
8108 when E_Discriminant =>
8109 Write_Str ("Discriminant_Number");
8112 Write_Str ("Extra_Formal");
8116 Write_Str ("DT_Position");
8119 Write_Str ("Entry_Parameters_Type");
8121 when Enumeration_Kind =>
8122 Write_Str ("Lit_Indexes");
8126 Write_Str ("Related_Instance");
8128 when E_Protected_Type =>
8129 Write_Str ("Entry_Bodies_Array");
8131 when E_String_Literal_Subtype =>
8132 Write_Str ("String_Literal_Low_Bound");
8135 Write_Str ("Shared_Var_Read_Proc");
8138 Write_Str ("Field15??");
8140 end Write_Field15_Name;
8142 ------------------------
8143 -- Write_Field16_Name --
8144 ------------------------
8146 procedure Write_Field16_Name (Id : Entity_Id) is
8150 Write_Str ("Entry_Formal");
8154 Write_Str ("DTC_Entity");
8159 Write_Str ("First_Private_Entity");
8161 when E_Record_Type |
8162 E_Record_Type_With_Private =>
8163 Write_Str ("Access_Disp_Table");
8165 when E_String_Literal_Subtype =>
8166 Write_Str ("String_Literal_Length");
8168 when Enumeration_Kind =>
8169 Write_Str ("Lit_Strings");
8173 Write_Str ("Unset_Reference");
8175 when E_Record_Subtype |
8176 E_Class_Wide_Subtype =>
8177 Write_Str ("Cloned_Subtype");
8180 Write_Str ("Field16??");
8182 end Write_Field16_Name;
8184 ------------------------
8185 -- Write_Field17_Name --
8186 ------------------------
8188 procedure Write_Field17_Name (Id : Entity_Id) is
8192 Write_Str ("Digits_Value");
8195 Write_Str ("Prival");
8197 when E_Discriminant =>
8198 Write_Str ("Discriminal");
8207 E_Generic_Function |
8209 E_Generic_Procedure |
8217 E_Return_Statement |
8219 E_Subprogram_Type =>
8220 Write_Str ("First_Entity");
8223 Write_Str ("First_Index");
8225 when Enumeration_Kind =>
8226 Write_Str ("First_Literal");
8229 Write_Str ("Master_Id");
8231 when Modular_Integer_Kind =>
8232 Write_Str ("Modulus");
8236 E_Generic_In_Out_Parameter |
8238 Write_Str ("Actual_Subtype");
8240 when E_Incomplete_Type =>
8241 Write_Str ("Non_Limited_View");
8243 when E_Incomplete_Subtype =>
8244 if From_With_Type (Id) then
8245 Write_Str ("Non_Limited_View");
8249 Write_Str ("Field17??");
8251 end Write_Field17_Name;
8253 ------------------------
8254 -- Write_Field18_Name --
8255 ------------------------
8257 procedure Write_Field18_Name (Id : Entity_Id) is
8260 when E_Enumeration_Literal |
8264 Write_Str ("Alias");
8266 when E_Record_Type =>
8267 Write_Str ("Corresponding_Concurrent_Type");
8269 when E_Entry_Index_Parameter =>
8270 Write_Str ("Entry_Index_Constant");
8272 when E_Class_Wide_Subtype |
8273 E_Access_Protected_Subprogram_Type |
8274 E_Anonymous_Access_Protected_Subprogram_Type |
8275 E_Access_Subprogram_Type |
8277 Write_Str ("Equivalent_Type");
8279 when Fixed_Point_Kind =>
8280 Write_Str ("Delta_Value");
8283 Write_Str ("Renamed_Object");
8287 E_Generic_Function |
8288 E_Generic_Procedure |
8289 E_Generic_Package =>
8290 Write_Str ("Renamed_Entity");
8292 when Incomplete_Or_Private_Kind =>
8293 Write_Str ("Private_Dependents");
8295 when Concurrent_Kind =>
8296 Write_Str ("Corresponding_Record_Type");
8301 Write_Str ("Enclosing_Scope");
8304 Write_Str ("Field18??");
8306 end Write_Field18_Name;
8308 -----------------------
8309 -- Write_Field19_Name --
8310 -----------------------
8312 procedure Write_Field19_Name (Id : Entity_Id) is
8317 Write_Str ("Related_Array_Object");
8323 E_Return_Statement |
8325 Write_Str ("Finalization_Chain_Entity");
8327 when E_Constant | E_Variable =>
8328 Write_Str ("Size_Check_Code");
8330 when E_Discriminant =>
8331 Write_Str ("Corresponding_Discriminant");
8334 E_Generic_Package =>
8335 Write_Str ("Body_Entity");
8337 when E_Package_Body |
8339 Write_Str ("Spec_Entity");
8341 when Private_Kind =>
8342 Write_Str ("Underlying_Full_View");
8344 when E_Record_Type =>
8345 Write_Str ("Parent_Subtype");
8348 Write_Str ("Field19??");
8350 end Write_Field19_Name;
8352 -----------------------
8353 -- Write_Field20_Name --
8354 -----------------------
8356 procedure Write_Field20_Name (Id : Entity_Id) is
8360 Write_Str ("Component_Type");
8362 when E_In_Parameter |
8363 E_Generic_In_Parameter =>
8364 Write_Str ("Default_Value");
8367 Write_Str ("Directly_Designated_Type");
8370 Write_Str ("Discriminant_Checking_Func");
8374 Write_Str ("Prival_Link");
8376 when E_Discriminant =>
8377 Write_Str ("Discriminant_Default_Value");
8386 E_Generic_Function |
8388 E_Generic_Procedure |
8396 E_Return_Statement |
8398 E_Subprogram_Type =>
8400 Write_Str ("Last_Entity");
8403 Write_Str ("Scalar_Range");
8406 Write_Str ("Register_Exception_Call");
8409 Write_Str ("Field20??");
8411 end Write_Field20_Name;
8413 -----------------------
8414 -- Write_Field21_Name --
8415 -----------------------
8417 procedure Write_Field21_Name (Id : Entity_Id) is
8423 E_Generic_Function |
8425 E_Generic_Procedure |
8427 Write_Str ("Interface_Name");
8429 when Concurrent_Kind |
8430 Incomplete_Or_Private_Kind |
8434 Write_Str ("Discriminant_Constraint");
8437 Write_Str ("Accept_Address");
8439 when Fixed_Point_Kind =>
8440 Write_Str ("Small_Value");
8442 when E_In_Parameter =>
8443 Write_Str ("Default_Expr_Function");
8446 Modular_Integer_Kind =>
8447 Write_Str ("Original_Array_Type");
8450 Write_Str ("Field21??");
8452 end Write_Field21_Name;
8454 -----------------------
8455 -- Write_Field22_Name --
8456 -----------------------
8458 procedure Write_Field22_Name (Id : Entity_Id) is
8462 Write_Str ("Associated_Storage_Pool");
8465 Write_Str ("Component_Size");
8469 Write_Str ("Original_Record_Component");
8471 when E_Enumeration_Literal =>
8472 Write_Str ("Enumeration_Rep_Expr");
8475 Write_Str ("Exception_Code");
8478 Write_Str ("Protected_Formal");
8480 when E_Record_Type =>
8481 Write_Str ("Corresponding_Remote_Type");
8491 E_Generic_Function |
8492 E_Generic_Procedure |
8495 E_Return_Statement |
8498 Write_Str ("Scope_Depth_Value");
8500 when E_Record_Type_With_Private |
8501 E_Record_Subtype_With_Private |
8504 E_Limited_Private_Type |
8505 E_Limited_Private_Subtype =>
8506 Write_Str ("Private_View");
8509 Write_Str ("Shared_Var_Assign_Proc");
8512 Write_Str ("Field22??");
8514 end Write_Field22_Name;
8516 ------------------------
8517 -- Write_Field23_Name --
8518 ------------------------
8520 procedure Write_Field23_Name (Id : Entity_Id) is
8524 Write_Str ("Associated_Final_Chain");
8527 Write_Str ("Packed_Array_Type");
8530 Write_Str ("Entry_Cancel_Parameter");
8532 when E_Discriminant =>
8533 Write_Str ("CR_Discriminant");
8535 when E_Enumeration_Type =>
8536 Write_Str ("Enum_Pos_To_Rep");
8540 Write_Str ("Extra_Constrained");
8542 when E_Generic_Function |
8544 E_Generic_Procedure =>
8545 Write_Str ("Inner_Instances");
8547 when Concurrent_Kind |
8548 Incomplete_Or_Private_Kind |
8552 Write_Str ("Stored_Constraint");
8556 if Present (Scope (Id))
8557 and then Is_Protected_Type (Scope (Id))
8559 Write_Str ("Protection_Object");
8561 Write_Str ("Generic_Renamings");
8565 if Is_Generic_Instance (Id) then
8566 Write_Str ("Generic_Renamings");
8568 Write_Str ("Limited_View");
8572 Write_Str ("Protection_Object");
8575 Write_Str ("Field23??");
8577 end Write_Field23_Name;
8579 ------------------------
8580 -- Write_Field24_Name --
8581 ------------------------
8583 procedure Write_Field24_Name (Id : Entity_Id) is
8586 when Subprogram_Kind =>
8587 Write_Str ("Spec_PPC_List");
8592 end Write_Field24_Name;
8594 ------------------------
8595 -- Write_Field25_Name --
8596 ------------------------
8598 procedure Write_Field25_Name (Id : Entity_Id) is
8602 Write_Str ("DT_Offset_To_Top_Func");
8606 Write_Str ("Abstract_Interface_Alias");
8608 when E_Record_Type |
8610 E_Record_Type_With_Private |
8611 E_Record_Subtype_With_Private =>
8612 Write_Str ("Abstract_Interfaces");
8615 Write_Str ("Task_Body_Procedure");
8618 Write_Str ("Debug_Renaming_Link");
8621 Write_Str ("Field25??");
8623 end Write_Field25_Name;
8625 ------------------------
8626 -- Write_Field26_Name --
8627 ------------------------
8629 procedure Write_Field26_Name (Id : Entity_Id) is
8634 Write_Str ("Related_Type");
8636 when E_Generic_Package |
8638 Write_Str ("Package_Instantiation");
8643 if Is_Dispatching_Operation (Id) then
8644 Write_Str ("Overridden_Operation");
8646 Write_Str ("Static_Initialization");
8649 when E_Record_Type |
8650 E_Record_Type_With_Private =>
8651 Write_Str ("Dispatch_Table_Wrapper");
8653 when E_In_Out_Parameter |
8656 Write_Str ("Last_Assignment");
8659 Write_Str ("Relative_Deadline_Variable");
8662 Write_Str ("Field26??");
8664 end Write_Field26_Name;
8666 ------------------------
8667 -- Write_Field27_Name --
8668 ------------------------
8670 procedure Write_Field27_Name (Id : Entity_Id) is
8674 Write_Str ("Wrapped_Entity");
8676 when E_Package | Type_Kind =>
8677 Write_Str ("Current_Use_Clause");
8680 Write_Str ("Field27??");
8682 end Write_Field27_Name;
8684 ------------------------
8685 -- Write_Field28_Name --
8686 ------------------------
8688 procedure Write_Field28_Name (Id : Entity_Id) is
8691 when E_Procedure | E_Function | E_Entry =>
8692 Write_Str ("Extra_Formals");
8695 Write_Str ("Field28??");
8697 end Write_Field28_Name;
8699 -------------------------
8700 -- Iterator Procedures --
8701 -------------------------
8703 procedure Proc_Next_Component (N : in out Node_Id) is
8705 N := Next_Component (N);
8706 end Proc_Next_Component;
8708 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8710 N := Next_Entity (N);
8711 while Present (N) loop
8712 exit when Ekind (N) = E_Component
8714 Ekind (N) = E_Discriminant;
8715 N := Next_Entity (N);
8717 end Proc_Next_Component_Or_Discriminant;
8719 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8721 N := Next_Discriminant (N);
8722 end Proc_Next_Discriminant;
8724 procedure Proc_Next_Formal (N : in out Node_Id) is
8726 N := Next_Formal (N);
8727 end Proc_Next_Formal;
8729 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8731 N := Next_Formal_With_Extras (N);
8732 end Proc_Next_Formal_With_Extras;
8734 procedure Proc_Next_Index (N : in out Node_Id) is
8736 N := Next_Index (N);
8737 end Proc_Next_Index;
8739 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8741 N := Next_Inlined_Subprogram (N);
8742 end Proc_Next_Inlined_Subprogram;
8744 procedure Proc_Next_Literal (N : in out Node_Id) is
8746 N := Next_Literal (N);
8747 end Proc_Next_Literal;
8749 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8751 N := Next_Stored_Discriminant (N);
8752 end Proc_Next_Stored_Discriminant;