1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2010, 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 3, 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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
130 -- Access_Disp_Table Elist16
131 -- Cloned_Subtype Node16
133 -- Entry_Formal Node16
134 -- First_Private_Entity Node16
135 -- Lit_Strings Node16
136 -- String_Literal_Length Uint16
137 -- Unset_Reference Node16
139 -- Actual_Subtype Node17
140 -- Digits_Value Uint17
141 -- Discriminal Node17
142 -- First_Entity Node17
143 -- First_Index Node17
144 -- First_Literal Node17
147 -- Non_Limited_View Node17
151 -- Corresponding_Concurrent_Type Node18
152 -- Corresponding_Protected_Entry 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_Procs_Instance 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 -- Related_Expression Node24
211 -- Spec_PPC_List Node24
213 -- Interface_Alias Node25
214 -- Interfaces Elist25
215 -- Debug_Renaming_Link Node25
216 -- DT_Offset_To_Top_Func Node25
217 -- PPC_Wrapper Node25
218 -- Static_Predicate List25
219 -- Task_Body_Procedure Node25
221 -- Dispatch_Table_Wrappers Elist26
222 -- Last_Assignment Node26
223 -- Original_Access_Type Node26
224 -- Overridden_Operation Node26
225 -- Package_Instantiation Node26
226 -- Relative_Deadline_Variable Node26
227 -- Static_Initialization Node26
229 -- Current_Use_Clause Node27
230 -- Related_Type Node27
231 -- Wrapped_Entity Node27
233 -- Extra_Formals Node28
234 -- Underlying_Record_View Node28
236 -- Subprograms_For_Type Node29
238 ---------------------------------------------
239 -- Usage of Flags in Defining Entity Nodes --
240 ---------------------------------------------
242 -- All flags are unique, there is no overlaying, so each flag is physically
243 -- present in every entity. However, for many of the flags, it only makes
244 -- sense for them to be set true for certain subsets of entity kinds. See
245 -- the spec of Einfo for further details.
247 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
250 -- Has_Discriminants Flag5
251 -- Is_Dispatching_Operation Flag6
252 -- Is_Immediately_Visible Flag7
254 -- Is_Potentially_Use_Visible Flag9
258 -- Is_Constrained Flag12
259 -- Is_Generic_Type Flag13
260 -- Depends_On_Private Flag14
262 -- Is_Volatile Flag16
263 -- Is_Internal Flag17
264 -- Has_Delayed_Freeze Flag18
265 -- Is_Abstract_Subprogram Flag19
266 -- Is_Concurrent_Record_Type Flag20
268 -- Has_Master_Entity Flag21
269 -- Needs_No_Actuals Flag22
270 -- Has_Storage_Size_Clause Flag23
271 -- Is_Imported Flag24
272 -- Is_Limited_Record Flag25
273 -- Has_Completion Flag26
274 -- Has_Pragma_Controlled Flag27
275 -- Is_Statically_Allocated Flag28
276 -- Has_Size_Clause Flag29
279 -- Checks_May_Be_Suppressed Flag31
280 -- Kill_Elaboration_Checks Flag32
281 -- Kill_Range_Checks Flag33
282 -- Kill_Tag_Checks Flag34
283 -- Is_Class_Wide_Equivalent_Type Flag35
284 -- Referenced_As_LHS Flag36
285 -- Is_Known_Non_Null Flag37
286 -- Can_Never_Be_Null Flag38
287 -- Has_Default_Aspect Flag39
288 -- Body_Needed_For_SAL Flag40
290 -- Treat_As_Volatile Flag41
291 -- Is_Controlled Flag42
292 -- Has_Controlled_Component Flag43
294 -- In_Private_Part Flag45
295 -- Has_Alignment_Clause Flag46
297 -- In_Package_Body Flag48
299 -- Delay_Subprogram_Descriptors Flag50
302 -- Is_Entry_Formal Flag52
303 -- Is_Private_Descendant Flag53
304 -- Return_Present Flag54
305 -- Is_Tagged_Type Flag55
306 -- Has_Homonym Flag56
308 -- Non_Binary_Modulus Flag58
309 -- Is_Preelaborated Flag59
310 -- Is_Shared_Passive Flag60
312 -- Is_Remote_Types Flag61
313 -- Is_Remote_Call_Interface Flag62
314 -- Is_Character_Type Flag63
315 -- Is_Intrinsic_Subprogram Flag64
316 -- Has_Record_Rep_Clause Flag65
317 -- Has_Enumeration_Rep_Clause Flag66
318 -- Has_Small_Clause Flag67
319 -- Has_Component_Size_Clause Flag68
320 -- Is_Access_Constant Flag69
321 -- Is_First_Subtype Flag70
323 -- Has_Completion_In_Body Flag71
324 -- Has_Unknown_Discriminants Flag72
325 -- Is_Child_Unit Flag73
326 -- Is_CPP_Class Flag74
327 -- Has_Non_Standard_Rep Flag75
328 -- Is_Constructor Flag76
329 -- Static_Elaboration_Desired Flag77
331 -- Has_All_Calls_Remote Flag79
332 -- Is_Constr_Subt_For_U_Nominal Flag80
334 -- Is_Asynchronous Flag81
335 -- Has_Gigi_Rep_Item Flag82
336 -- Has_Machine_Radix_Clause Flag83
337 -- Machine_Radix_10 Flag84
339 -- Has_Atomic_Components Flag86
340 -- Has_Volatile_Components Flag87
341 -- Discard_Names Flag88
342 -- Is_Interrupt_Handler Flag89
343 -- Returns_By_Ref Flag90
346 -- Size_Known_At_Compile_Time Flag92
347 -- Has_Subprogram_Descriptor Flag93
348 -- Is_Generic_Actual_Type Flag94
349 -- Uses_Sec_Stack Flag95
350 -- Warnings_Off Flag96
351 -- Is_Controlling_Formal Flag97
352 -- Has_Controlling_Result Flag98
353 -- Is_Exported Flag99
354 -- Has_Specified_Layout Flag100
356 -- Has_Nested_Block_With_Handler Flag101
358 -- Is_Completely_Hidden Flag103
359 -- Address_Taken Flag104
360 -- Suppress_Initialization Flag105
361 -- Is_Limited_Composite Flag106
362 -- Is_Private_Composite Flag107
363 -- Default_Expressions_Processed Flag108
364 -- Is_Non_Static_Subtype Flag109
365 -- Has_External_Tag_Rep_Clause Flag110
367 -- Is_Formal_Subprogram Flag111
368 -- Is_Renaming_Of_Object Flag112
370 -- Delay_Cleanups Flag114
371 -- Never_Set_In_Source Flag115
372 -- Is_Visible_Child_Unit Flag116
373 -- Is_Unchecked_Union Flag117
374 -- Is_For_Access_Subtype Flag118
375 -- Has_Convention_Pragma Flag119
376 -- Has_Primitive_Operations Flag120
378 -- Has_Pragma_Pack Flag121
379 -- Is_Bit_Packed_Array Flag122
380 -- Has_Unchecked_Union Flag123
381 -- Is_Eliminated Flag124
382 -- C_Pass_By_Copy Flag125
383 -- Is_Instantiated Flag126
384 -- Is_Valued_Procedure Flag127
385 -- (used for Component_Alignment) Flag128
386 -- (used for Component_Alignment) Flag129
387 -- Is_Generic_Instance Flag130
389 -- No_Pool_Assigned Flag131
390 -- Is_AST_Entry Flag132
391 -- Is_VMS_Exception Flag133
392 -- Is_Optional_Parameter Flag134
393 -- Has_Aliased_Components Flag135
394 -- No_Strict_Aliasing Flag136
395 -- Is_Machine_Code_Subprogram Flag137
396 -- Is_Packed_Array_Type Flag138
397 -- Has_Biased_Representation Flag139
398 -- Has_Complex_Representation Flag140
400 -- Is_Constr_Subt_For_UN_Aliased Flag141
401 -- Has_Missing_Return Flag142
402 -- Has_Recursive_Call Flag143
403 -- Is_Unsigned_Type Flag144
404 -- Strict_Alignment Flag145
405 -- Is_Abstract_Type Flag146
406 -- Needs_Debug_Info Flag147
407 -- Suppress_Elaboration_Warnings Flag148
408 -- Is_Compilation_Unit Flag149
409 -- Has_Pragma_Elaborate_Body Flag150
411 -- Entry_Accepted Flag152
412 -- Is_Obsolescent Flag153
413 -- Has_Per_Object_Constraint Flag154
414 -- Has_Private_Declaration Flag155
415 -- Referenced Flag156
416 -- Has_Pragma_Inline Flag157
417 -- Finalize_Storage_Only Flag158
418 -- From_With_Type Flag159
419 -- Is_Package_Body_Entity Flag160
421 -- Has_Qualified_Name Flag161
422 -- Nonzero_Is_True Flag162
423 -- Is_True_Constant Flag163
424 -- Reverse_Bit_Order Flag164
425 -- Suppress_Style_Checks Flag165
426 -- Debug_Info_Off Flag166
427 -- Sec_Stack_Needed_For_Return Flag167
428 -- Materialize_Entity Flag168
429 -- Has_Pragma_Thread_Local_Storage Flag169
430 -- Is_Known_Valid Flag170
432 -- Is_Hidden_Open_Scope Flag171
433 -- Has_Object_Size_Clause Flag172
434 -- Has_Fully_Qualified_Name Flag173
435 -- Elaboration_Entity_Required Flag174
436 -- Has_Forward_Instantiation Flag175
437 -- Is_Discrim_SO_Function Flag176
438 -- Size_Depends_On_Discriminant Flag177
439 -- Is_Null_Init_Proc Flag178
440 -- Has_Pragma_Pure_Function Flag179
441 -- Has_Pragma_Unreferenced Flag180
443 -- Has_Contiguous_Rep Flag181
444 -- Has_Xref_Entry Flag182
445 -- Must_Be_On_Byte_Boundary Flag183
446 -- Has_Stream_Size_Clause Flag184
447 -- Is_Ada_2005_Only Flag185
448 -- Is_Interface Flag186
449 -- Has_Constrained_Partial_View Flag187
450 -- Has_Persistent_BSS Flag188
451 -- Is_Pure_Unit_Access_Type Flag189
452 -- Has_Specified_Stream_Input Flag190
454 -- Has_Specified_Stream_Output Flag191
455 -- Has_Specified_Stream_Read Flag192
456 -- Has_Specified_Stream_Write Flag193
457 -- Is_Local_Anonymous_Access Flag194
458 -- Is_Primitive_Wrapper Flag195
459 -- Was_Hidden Flag196
460 -- Is_Limited_Interface Flag197
461 -- Has_Pragma_Ordered Flag198
462 -- Is_Ada_2012_Only Flag199
464 -- Has_Delayed_Aspects Flag200
465 -- Has_Anon_Block_Suffix Flag201
466 -- Itype_Printed Flag202
467 -- Has_Pragma_Pure Flag203
468 -- Is_Known_Null Flag204
469 -- Low_Bound_Tested Flag205
470 -- Is_Visible_Formal Flag206
471 -- Known_To_Have_Preelab_Init Flag207
472 -- Must_Have_Preelab_Init Flag208
473 -- Is_Return_Object Flag209
474 -- Elaborate_Body_Desirable Flag210
476 -- Has_Static_Discriminants Flag211
477 -- Has_Pragma_Unreferenced_Objects Flag212
478 -- Requires_Overriding Flag213
480 -- Has_Up_Level_Access Flag215
481 -- Universal_Aliasing Flag216
482 -- Suppress_Value_Tracking_On_Call Flag217
483 -- Is_Primitive Flag218
484 -- Has_Initial_Value Flag219
485 -- Has_Dispatch_Table Flag220
487 -- Has_Pragma_Preelab_Init Flag221
488 -- Used_As_Generic_Actual Flag222
489 -- Is_Descendent_Of_Address Flag223
492 -- Is_Only_Out_Parameter Flag226
493 -- Referenced_As_Out_Parameter Flag227
494 -- Has_Thunks Flag228
495 -- Can_Use_Internal_Rep Flag229
496 -- Has_Pragma_Inline_Always Flag230
498 -- Renamed_In_Spec Flag231
499 -- Has_Invariants Flag232
500 -- Has_Pragma_Unmodified Flag233
501 -- Is_Dispatch_Table_Entity Flag234
502 -- Is_Trivial_Subprogram Flag235
503 -- Warnings_Off_Used Flag236
504 -- Warnings_Off_Used_Unmodified Flag237
505 -- Warnings_Off_Used_Unreferenced Flag238
506 -- OK_To_Reorder_Components Flag239
507 -- Has_Postconditions Flag240
509 -- Optimize_Alignment_Space Flag241
510 -- Optimize_Alignment_Time Flag242
511 -- Overlays_Constant Flag243
512 -- Is_RACW_Stub_Type Flag244
513 -- Is_Private_Primitive Flag245
514 -- Is_Underlying_Record_View Flag246
515 -- OK_To_Rename Flag247
516 -- Has_Inheritable_Invariants Flag248
517 -- Is_Safe_To_Reevaluate Flag249
518 -- Has_Predicates Flag250
526 -----------------------
527 -- Local subprograms --
528 -----------------------
530 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
531 -- Returns the attribute definition clause for Id whose name is Rep_Name.
532 -- Returns Empty if no matching attribute definition clause found for Id.
538 function Float_Rep (Id : E) return F is
539 pragma Assert (Is_Floating_Point_Type (Id));
541 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
548 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
552 Ritem := First_Rep_Item (Id);
553 while Present (Ritem) loop
554 if Nkind (Ritem) = N_Attribute_Definition_Clause
555 and then Chars (Ritem) = Rep_Name
559 Next_Rep_Item (Ritem);
566 --------------------------------
567 -- Attribute Access Functions --
568 --------------------------------
570 function Accept_Address (Id : E) return L is
575 function Access_Disp_Table (Id : E) return L is
577 pragma Assert (Ekind_In (Id, E_Record_Type,
579 return Elist16 (Implementation_Base_Type (Id));
580 end Access_Disp_Table;
582 function Actual_Subtype (Id : E) return E is
585 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
586 or else Is_Formal (Id));
590 function Address_Taken (Id : E) return B is
595 function Alias (Id : E) return E is
598 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
602 function Alignment (Id : E) return U is
604 pragma Assert (Is_Type (Id)
605 or else Is_Formal (Id)
606 or else Ekind_In (Id, E_Loop_Parameter,
613 function Associated_Final_Chain (Id : E) return E is
615 pragma Assert (Is_Access_Type (Id));
617 end Associated_Final_Chain;
619 function Associated_Formal_Package (Id : E) return E is
621 pragma Assert (Ekind (Id) = E_Package);
623 end Associated_Formal_Package;
625 function Associated_Node_For_Itype (Id : E) return N is
628 end Associated_Node_For_Itype;
630 function Associated_Storage_Pool (Id : E) return E is
632 pragma Assert (Is_Access_Type (Id));
633 return Node22 (Root_Type (Id));
634 end Associated_Storage_Pool;
636 function Barrier_Function (Id : E) return N is
638 pragma Assert (Is_Entry (Id));
640 end Barrier_Function;
642 function Block_Node (Id : E) return N is
644 pragma Assert (Ekind (Id) = E_Block);
648 function Body_Entity (Id : E) return E is
650 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
654 function Body_Needed_For_SAL (Id : E) return B is
657 (Ekind (Id) = E_Package
658 or else Is_Subprogram (Id)
659 or else Is_Generic_Unit (Id));
661 end Body_Needed_For_SAL;
663 function C_Pass_By_Copy (Id : E) return B is
665 pragma Assert (Is_Record_Type (Id));
666 return Flag125 (Implementation_Base_Type (Id));
669 function Can_Never_Be_Null (Id : E) return B is
672 end Can_Never_Be_Null;
674 function Checks_May_Be_Suppressed (Id : E) return B is
677 end Checks_May_Be_Suppressed;
679 function Class_Wide_Type (Id : E) return E is
681 pragma Assert (Is_Type (Id));
685 function Cloned_Subtype (Id : E) return E is
687 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
691 function Component_Bit_Offset (Id : E) return U is
693 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
695 end Component_Bit_Offset;
697 function Component_Clause (Id : E) return N is
699 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
701 end Component_Clause;
703 function Component_Size (Id : E) return U is
705 pragma Assert (Is_Array_Type (Id));
706 return Uint22 (Implementation_Base_Type (Id));
709 function Component_Type (Id : E) return E is
711 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
712 return Node20 (Implementation_Base_Type (Id));
715 function Corresponding_Concurrent_Type (Id : E) return E is
717 pragma Assert (Ekind (Id) = E_Record_Type);
719 end Corresponding_Concurrent_Type;
721 function Corresponding_Discriminant (Id : E) return E is
723 pragma Assert (Ekind (Id) = E_Discriminant);
725 end Corresponding_Discriminant;
727 function Corresponding_Equality (Id : E) return E is
730 (Ekind (Id) = E_Function
731 and then not Comes_From_Source (Id)
732 and then Chars (Id) = Name_Op_Ne);
734 end Corresponding_Equality;
736 function Corresponding_Protected_Entry (Id : E) return E is
738 pragma Assert (Ekind (Id) = E_Subprogram_Body);
740 end Corresponding_Protected_Entry;
742 function Corresponding_Record_Type (Id : E) return E is
744 pragma Assert (Is_Concurrent_Type (Id));
746 end Corresponding_Record_Type;
748 function Corresponding_Remote_Type (Id : E) return E is
751 end Corresponding_Remote_Type;
753 function Current_Use_Clause (Id : E) return E is
755 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
757 end Current_Use_Clause;
759 function Current_Value (Id : E) return N is
761 pragma Assert (Ekind (Id) in Object_Kind);
765 function CR_Discriminant (Id : E) return E is
770 function Debug_Info_Off (Id : E) return B is
775 function Debug_Renaming_Link (Id : E) return E is
778 end Debug_Renaming_Link;
780 function Default_Expr_Function (Id : E) return E is
782 pragma Assert (Is_Formal (Id));
784 end Default_Expr_Function;
786 function Default_Expressions_Processed (Id : E) return B is
789 end Default_Expressions_Processed;
791 function Default_Value (Id : E) return N is
793 pragma Assert (Is_Formal (Id));
797 function Delay_Cleanups (Id : E) return B is
802 function Delay_Subprogram_Descriptors (Id : E) return B is
805 end Delay_Subprogram_Descriptors;
807 function Delta_Value (Id : E) return R is
809 pragma Assert (Is_Fixed_Point_Type (Id));
813 function Dependent_Instances (Id : E) return L is
815 pragma Assert (Is_Generic_Instance (Id));
817 end Dependent_Instances;
819 function Depends_On_Private (Id : E) return B is
821 pragma Assert (Nkind (Id) in N_Entity);
823 end Depends_On_Private;
825 function Digits_Value (Id : E) return U is
828 (Is_Floating_Point_Type (Id)
829 or else Is_Decimal_Fixed_Point_Type (Id));
833 function Direct_Primitive_Operations (Id : E) return L is
835 pragma Assert (Is_Tagged_Type (Id));
837 end Direct_Primitive_Operations;
839 function Directly_Designated_Type (Id : E) return E is
841 pragma Assert (Is_Access_Type (Id));
843 end Directly_Designated_Type;
845 function Discard_Names (Id : E) return B is
850 function Discriminal (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Discriminant);
856 function Discriminal_Link (Id : E) return N is
859 end Discriminal_Link;
861 function Discriminant_Checking_Func (Id : E) return E is
863 pragma Assert (Ekind (Id) = E_Component);
865 end Discriminant_Checking_Func;
867 function Discriminant_Constraint (Id : E) return L is
869 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
871 end Discriminant_Constraint;
873 function Discriminant_Default_Value (Id : E) return N is
875 pragma Assert (Ekind (Id) = E_Discriminant);
877 end Discriminant_Default_Value;
879 function Discriminant_Number (Id : E) return U is
881 pragma Assert (Ekind (Id) = E_Discriminant);
883 end Discriminant_Number;
885 function Dispatch_Table_Wrappers (Id : E) return L is
887 pragma Assert (Ekind_In (Id, E_Record_Type,
889 return Elist26 (Implementation_Base_Type (Id));
890 end Dispatch_Table_Wrappers;
892 function DT_Entry_Count (Id : E) return U is
894 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
898 function DT_Offset_To_Top_Func (Id : E) return E is
900 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
902 end DT_Offset_To_Top_Func;
904 function DT_Position (Id : E) return U is
906 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
907 and then Present (DTC_Entity (Id)));
911 function DTC_Entity (Id : E) return E is
913 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
917 function Elaborate_Body_Desirable (Id : E) return B is
919 pragma Assert (Ekind (Id) = E_Package);
921 end Elaborate_Body_Desirable;
923 function Elaboration_Entity (Id : E) return E is
928 Ekind (Id) = E_Package
930 Is_Generic_Unit (Id));
932 end Elaboration_Entity;
934 function Elaboration_Entity_Required (Id : E) return B is
939 Ekind (Id) = E_Package
941 Is_Generic_Unit (Id));
943 end Elaboration_Entity_Required;
945 function Enclosing_Scope (Id : E) return E is
950 function Entry_Accepted (Id : E) return B is
952 pragma Assert (Is_Entry (Id));
956 function Entry_Bodies_Array (Id : E) return E is
959 end Entry_Bodies_Array;
961 function Entry_Cancel_Parameter (Id : E) return E is
964 end Entry_Cancel_Parameter;
966 function Entry_Component (Id : E) return E is
971 function Entry_Formal (Id : E) return E is
976 function Entry_Index_Constant (Id : E) return N is
978 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
980 end Entry_Index_Constant;
982 function Entry_Parameters_Type (Id : E) return E is
985 end Entry_Parameters_Type;
987 function Enum_Pos_To_Rep (Id : E) return E is
989 pragma Assert (Ekind (Id) = E_Enumeration_Type);
993 function Enumeration_Pos (Id : E) return Uint is
995 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
999 function Enumeration_Rep (Id : E) return U is
1001 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1003 end Enumeration_Rep;
1005 function Enumeration_Rep_Expr (Id : E) return N is
1007 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1009 end Enumeration_Rep_Expr;
1011 function Equivalent_Type (Id : E) return E is
1014 (Ekind_In (Id, E_Class_Wide_Type,
1015 E_Class_Wide_Subtype,
1016 E_Access_Protected_Subprogram_Type,
1017 E_Anonymous_Access_Protected_Subprogram_Type,
1018 E_Access_Subprogram_Type,
1021 end Equivalent_Type;
1023 function Esize (Id : E) return Uint is
1028 function Exception_Code (Id : E) return Uint is
1030 pragma Assert (Ekind (Id) = E_Exception);
1034 function Extra_Accessibility (Id : E) return E is
1036 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1038 end Extra_Accessibility;
1040 function Extra_Constrained (Id : E) return E is
1042 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1044 end Extra_Constrained;
1046 function Extra_Formal (Id : E) return E is
1051 function Extra_Formals (Id : E) return E is
1054 (Is_Overloadable (Id)
1055 or else Ekind_In (Id, E_Entry_Family,
1057 E_Subprogram_Type));
1061 function Can_Use_Internal_Rep (Id : E) return B is
1063 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1064 return Flag229 (Base_Type (Id));
1065 end Can_Use_Internal_Rep;
1067 function Finalization_Chain_Entity (Id : E) return E is
1070 end Finalization_Chain_Entity;
1072 function Finalize_Storage_Only (Id : E) return B is
1074 pragma Assert (Is_Type (Id));
1075 return Flag158 (Base_Type (Id));
1076 end Finalize_Storage_Only;
1078 function First_Entity (Id : E) return E is
1083 function First_Exit_Statement (Id : E) return N is
1085 pragma Assert (Ekind (Id) = E_Loop);
1087 end First_Exit_Statement;
1089 function First_Index (Id : E) return N is
1091 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1095 function First_Literal (Id : E) return E is
1097 pragma Assert (Is_Enumeration_Type (Id));
1101 function First_Optional_Parameter (Id : E) return E is
1103 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1105 end First_Optional_Parameter;
1107 function First_Private_Entity (Id : E) return E is
1109 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1110 or else Ekind (Id) in Concurrent_Kind);
1112 end First_Private_Entity;
1114 function First_Rep_Item (Id : E) return E is
1119 function Freeze_Node (Id : E) return N is
1124 function From_With_Type (Id : E) return B is
1126 return Flag159 (Id);
1129 function Full_View (Id : E) return E is
1131 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1135 function Generic_Homonym (Id : E) return E is
1137 pragma Assert (Ekind (Id) = E_Generic_Package);
1139 end Generic_Homonym;
1141 function Generic_Renamings (Id : E) return L is
1143 return Elist23 (Id);
1144 end Generic_Renamings;
1146 function Handler_Records (Id : E) return S is
1149 end Handler_Records;
1151 function Has_Aliased_Components (Id : E) return B is
1153 return Flag135 (Implementation_Base_Type (Id));
1154 end Has_Aliased_Components;
1156 function Has_Alignment_Clause (Id : E) return B is
1159 end Has_Alignment_Clause;
1161 function Has_All_Calls_Remote (Id : E) return B is
1164 end Has_All_Calls_Remote;
1166 function Has_Anon_Block_Suffix (Id : E) return B is
1168 return Flag201 (Id);
1169 end Has_Anon_Block_Suffix;
1171 function Has_Atomic_Components (Id : E) return B is
1173 return Flag86 (Implementation_Base_Type (Id));
1174 end Has_Atomic_Components;
1176 function Has_Biased_Representation (Id : E) return B is
1178 return Flag139 (Id);
1179 end Has_Biased_Representation;
1181 function Has_Completion (Id : E) return B is
1186 function Has_Completion_In_Body (Id : E) return B is
1188 pragma Assert (Is_Type (Id));
1190 end Has_Completion_In_Body;
1192 function Has_Complex_Representation (Id : E) return B is
1194 pragma Assert (Is_Type (Id));
1195 return Flag140 (Implementation_Base_Type (Id));
1196 end Has_Complex_Representation;
1198 function Has_Component_Size_Clause (Id : E) return B is
1200 pragma Assert (Is_Array_Type (Id));
1201 return Flag68 (Implementation_Base_Type (Id));
1202 end Has_Component_Size_Clause;
1204 function Has_Constrained_Partial_View (Id : E) return B is
1206 pragma Assert (Is_Type (Id));
1207 return Flag187 (Id);
1208 end Has_Constrained_Partial_View;
1210 function Has_Controlled_Component (Id : E) return B is
1212 return Flag43 (Base_Type (Id));
1213 end Has_Controlled_Component;
1215 function Has_Contiguous_Rep (Id : E) return B is
1217 return Flag181 (Id);
1218 end Has_Contiguous_Rep;
1220 function Has_Controlling_Result (Id : E) return B is
1223 end Has_Controlling_Result;
1225 function Has_Convention_Pragma (Id : E) return B is
1227 return Flag119 (Id);
1228 end Has_Convention_Pragma;
1230 function Has_Default_Aspect (Id : E) return B is
1232 return Flag39 (Base_Type (Id));
1233 end Has_Default_Aspect;
1235 function Has_Delayed_Aspects (Id : E) return B is
1237 pragma Assert (Nkind (Id) in N_Entity);
1238 return Flag200 (Id);
1239 end Has_Delayed_Aspects;
1241 function Has_Delayed_Freeze (Id : E) return B is
1243 pragma Assert (Nkind (Id) in N_Entity);
1245 end Has_Delayed_Freeze;
1247 function Has_Discriminants (Id : E) return B is
1249 pragma Assert (Nkind (Id) in N_Entity);
1251 end Has_Discriminants;
1253 function Has_Dispatch_Table (Id : E) return B is
1255 pragma Assert (Is_Tagged_Type (Id));
1256 return Flag220 (Id);
1257 end Has_Dispatch_Table;
1259 function Has_Enumeration_Rep_Clause (Id : E) return B is
1261 pragma Assert (Is_Enumeration_Type (Id));
1263 end Has_Enumeration_Rep_Clause;
1265 function Has_Exit (Id : E) return B is
1270 function Has_External_Tag_Rep_Clause (Id : E) return B is
1272 pragma Assert (Is_Tagged_Type (Id));
1273 return Flag110 (Id);
1274 end Has_External_Tag_Rep_Clause;
1276 function Has_Forward_Instantiation (Id : E) return B is
1278 return Flag175 (Id);
1279 end Has_Forward_Instantiation;
1281 function Has_Fully_Qualified_Name (Id : E) return B is
1283 return Flag173 (Id);
1284 end Has_Fully_Qualified_Name;
1286 function Has_Gigi_Rep_Item (Id : E) return B is
1289 end Has_Gigi_Rep_Item;
1291 function Has_Homonym (Id : E) return B is
1296 function Has_Inheritable_Invariants (Id : E) return B is
1298 pragma Assert (Is_Type (Id));
1299 return Flag248 (Id);
1300 end Has_Inheritable_Invariants;
1302 function Has_Initial_Value (Id : E) return B is
1304 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1305 return Flag219 (Id);
1306 end Has_Initial_Value;
1308 function Has_Invariants (Id : E) return B is
1310 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Procedure);
1311 return Flag232 (Id);
1314 function Has_Machine_Radix_Clause (Id : E) return B is
1316 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1318 end Has_Machine_Radix_Clause;
1320 function Has_Master_Entity (Id : E) return B is
1323 end Has_Master_Entity;
1325 function Has_Missing_Return (Id : E) return B is
1327 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1328 return Flag142 (Id);
1329 end Has_Missing_Return;
1331 function Has_Nested_Block_With_Handler (Id : E) return B is
1333 return Flag101 (Id);
1334 end Has_Nested_Block_With_Handler;
1336 function Has_Non_Standard_Rep (Id : E) return B is
1338 return Flag75 (Implementation_Base_Type (Id));
1339 end Has_Non_Standard_Rep;
1341 function Has_Object_Size_Clause (Id : E) return B is
1343 pragma Assert (Is_Type (Id));
1344 return Flag172 (Id);
1345 end Has_Object_Size_Clause;
1347 function Has_Per_Object_Constraint (Id : E) return B is
1349 return Flag154 (Id);
1350 end Has_Per_Object_Constraint;
1352 function Has_Persistent_BSS (Id : E) return B is
1354 return Flag188 (Id);
1355 end Has_Persistent_BSS;
1357 function Has_Postconditions (Id : E) return B is
1359 pragma Assert (Is_Subprogram (Id));
1360 return Flag240 (Id);
1361 end Has_Postconditions;
1363 function Has_Pragma_Controlled (Id : E) return B is
1365 pragma Assert (Is_Access_Type (Id));
1366 return Flag27 (Implementation_Base_Type (Id));
1367 end Has_Pragma_Controlled;
1369 function Has_Pragma_Elaborate_Body (Id : E) return B is
1371 return Flag150 (Id);
1372 end Has_Pragma_Elaborate_Body;
1374 function Has_Pragma_Inline (Id : E) return B is
1376 return Flag157 (Id);
1377 end Has_Pragma_Inline;
1379 function Has_Pragma_Inline_Always (Id : E) return B is
1381 return Flag230 (Id);
1382 end Has_Pragma_Inline_Always;
1384 function Has_Pragma_Ordered (Id : E) return B is
1386 pragma Assert (Is_Enumeration_Type (Id));
1387 return Flag198 (Implementation_Base_Type (Id));
1388 end Has_Pragma_Ordered;
1390 function Has_Pragma_Pack (Id : E) return B is
1392 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1393 return Flag121 (Implementation_Base_Type (Id));
1394 end Has_Pragma_Pack;
1396 function Has_Pragma_Preelab_Init (Id : E) return B is
1398 return Flag221 (Id);
1399 end Has_Pragma_Preelab_Init;
1401 function Has_Pragma_Pure (Id : E) return B is
1403 return Flag203 (Id);
1404 end Has_Pragma_Pure;
1406 function Has_Pragma_Pure_Function (Id : E) return B is
1408 return Flag179 (Id);
1409 end Has_Pragma_Pure_Function;
1411 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1413 return Flag169 (Id);
1414 end Has_Pragma_Thread_Local_Storage;
1416 function Has_Pragma_Unmodified (Id : E) return B is
1418 return Flag233 (Id);
1419 end Has_Pragma_Unmodified;
1421 function Has_Pragma_Unreferenced (Id : E) return B is
1423 return Flag180 (Id);
1424 end Has_Pragma_Unreferenced;
1426 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1428 pragma Assert (Is_Type (Id));
1429 return Flag212 (Id);
1430 end Has_Pragma_Unreferenced_Objects;
1432 function Has_Predicates (Id : E) return B is
1434 return Flag250 (Id);
1437 function Has_Primitive_Operations (Id : E) return B is
1439 pragma Assert (Is_Type (Id));
1440 return Flag120 (Base_Type (Id));
1441 end Has_Primitive_Operations;
1443 function Has_Private_Declaration (Id : E) return B is
1445 return Flag155 (Id);
1446 end Has_Private_Declaration;
1448 function Has_Qualified_Name (Id : E) return B is
1450 return Flag161 (Id);
1451 end Has_Qualified_Name;
1453 function Has_RACW (Id : E) return B is
1455 pragma Assert (Ekind (Id) = E_Package);
1456 return Flag214 (Id);
1459 function Has_Record_Rep_Clause (Id : E) return B is
1461 pragma Assert (Is_Record_Type (Id));
1462 return Flag65 (Implementation_Base_Type (Id));
1463 end Has_Record_Rep_Clause;
1465 function Has_Recursive_Call (Id : E) return B is
1467 pragma Assert (Is_Subprogram (Id));
1468 return Flag143 (Id);
1469 end Has_Recursive_Call;
1471 function Has_Size_Clause (Id : E) return B is
1474 end Has_Size_Clause;
1476 function Has_Small_Clause (Id : E) return B is
1479 end Has_Small_Clause;
1481 function Has_Specified_Layout (Id : E) return B is
1483 pragma Assert (Is_Type (Id));
1484 return Flag100 (Implementation_Base_Type (Id));
1485 end Has_Specified_Layout;
1487 function Has_Specified_Stream_Input (Id : E) return B is
1489 pragma Assert (Is_Type (Id));
1490 return Flag190 (Id);
1491 end Has_Specified_Stream_Input;
1493 function Has_Specified_Stream_Output (Id : E) return B is
1495 pragma Assert (Is_Type (Id));
1496 return Flag191 (Id);
1497 end Has_Specified_Stream_Output;
1499 function Has_Specified_Stream_Read (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1502 return Flag192 (Id);
1503 end Has_Specified_Stream_Read;
1505 function Has_Specified_Stream_Write (Id : E) return B is
1507 pragma Assert (Is_Type (Id));
1508 return Flag193 (Id);
1509 end Has_Specified_Stream_Write;
1511 function Has_Static_Discriminants (Id : E) return B is
1513 pragma Assert (Is_Type (Id));
1514 return Flag211 (Id);
1515 end Has_Static_Discriminants;
1517 function Has_Storage_Size_Clause (Id : E) return B is
1519 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1520 return Flag23 (Implementation_Base_Type (Id));
1521 end Has_Storage_Size_Clause;
1523 function Has_Stream_Size_Clause (Id : E) return B is
1525 return Flag184 (Id);
1526 end Has_Stream_Size_Clause;
1528 function Has_Subprogram_Descriptor (Id : E) return B is
1531 end Has_Subprogram_Descriptor;
1533 function Has_Task (Id : E) return B is
1535 return Flag30 (Base_Type (Id));
1538 function Has_Thunks (Id : E) return B is
1540 return Flag228 (Id);
1543 function Has_Unchecked_Union (Id : E) return B is
1545 return Flag123 (Base_Type (Id));
1546 end Has_Unchecked_Union;
1548 function Has_Unknown_Discriminants (Id : E) return B is
1550 pragma Assert (Is_Type (Id));
1552 end Has_Unknown_Discriminants;
1554 function Has_Up_Level_Access (Id : E) return B is
1557 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1558 return Flag215 (Id);
1559 end Has_Up_Level_Access;
1561 function Has_Volatile_Components (Id : E) return B is
1563 return Flag87 (Implementation_Base_Type (Id));
1564 end Has_Volatile_Components;
1566 function Has_Xref_Entry (Id : E) return B is
1568 return Flag182 (Implementation_Base_Type (Id));
1571 function Hiding_Loop_Variable (Id : E) return E is
1573 pragma Assert (Ekind (Id) = E_Variable);
1575 end Hiding_Loop_Variable;
1577 function Homonym (Id : E) return E is
1582 function Interface_Alias (Id : E) return E is
1584 pragma Assert (Is_Subprogram (Id));
1586 end Interface_Alias;
1588 function Interfaces (Id : E) return L is
1590 pragma Assert (Is_Record_Type (Id));
1591 return Elist25 (Id);
1594 function In_Package_Body (Id : E) return B is
1597 end In_Package_Body;
1599 function In_Private_Part (Id : E) return B is
1602 end In_Private_Part;
1604 function In_Use (Id : E) return B is
1606 pragma Assert (Nkind (Id) in N_Entity);
1610 function Inner_Instances (Id : E) return L is
1612 return Elist23 (Id);
1613 end Inner_Instances;
1615 function Interface_Name (Id : E) return N is
1620 function Is_Abstract_Subprogram (Id : E) return B is
1622 pragma Assert (Is_Overloadable (Id));
1624 end Is_Abstract_Subprogram;
1626 function Is_Abstract_Type (Id : E) return B is
1628 pragma Assert (Is_Type (Id));
1629 return Flag146 (Id);
1630 end Is_Abstract_Type;
1632 function Is_Local_Anonymous_Access (Id : E) return B is
1634 pragma Assert (Is_Access_Type (Id));
1635 return Flag194 (Id);
1636 end Is_Local_Anonymous_Access;
1638 function Is_Access_Constant (Id : E) return B is
1640 pragma Assert (Is_Access_Type (Id));
1642 end Is_Access_Constant;
1644 function Is_Ada_2005_Only (Id : E) return B is
1646 return Flag185 (Id);
1647 end Is_Ada_2005_Only;
1649 function Is_Ada_2012_Only (Id : E) return B is
1651 return Flag199 (Id);
1652 end Is_Ada_2012_Only;
1654 function Is_Aliased (Id : E) return B is
1656 pragma Assert (Nkind (Id) in N_Entity);
1660 function Is_AST_Entry (Id : E) return B is
1662 pragma Assert (Is_Entry (Id));
1663 return Flag132 (Id);
1666 function Is_Asynchronous (Id : E) return B is
1668 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1670 end Is_Asynchronous;
1672 function Is_Atomic (Id : E) return B is
1677 function Is_Bit_Packed_Array (Id : E) return B is
1679 return Flag122 (Implementation_Base_Type (Id));
1680 end Is_Bit_Packed_Array;
1682 function Is_Called (Id : E) return B is
1684 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1685 return Flag102 (Id);
1688 function Is_Character_Type (Id : E) return B is
1691 end Is_Character_Type;
1693 function Is_Child_Unit (Id : E) return B is
1698 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1701 end Is_Class_Wide_Equivalent_Type;
1703 function Is_Compilation_Unit (Id : E) return B is
1705 return Flag149 (Id);
1706 end Is_Compilation_Unit;
1708 function Is_Completely_Hidden (Id : E) return B is
1710 pragma Assert (Ekind (Id) = E_Discriminant);
1711 return Flag103 (Id);
1712 end Is_Completely_Hidden;
1714 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1717 end Is_Constr_Subt_For_U_Nominal;
1719 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1721 return Flag141 (Id);
1722 end Is_Constr_Subt_For_UN_Aliased;
1724 function Is_Constrained (Id : E) return B is
1726 pragma Assert (Nkind (Id) in N_Entity);
1730 function Is_Constructor (Id : E) return B is
1735 function Is_Controlled (Id : E) return B is
1737 return Flag42 (Base_Type (Id));
1740 function Is_Controlling_Formal (Id : E) return B is
1742 pragma Assert (Is_Formal (Id));
1744 end Is_Controlling_Formal;
1746 function Is_CPP_Class (Id : E) return B is
1751 function Is_Descendent_Of_Address (Id : E) return B is
1753 pragma Assert (Is_Type (Id));
1754 return Flag223 (Id);
1755 end Is_Descendent_Of_Address;
1757 function Is_Discrim_SO_Function (Id : E) return B is
1759 return Flag176 (Id);
1760 end Is_Discrim_SO_Function;
1762 function Is_Dispatch_Table_Entity (Id : E) return B is
1764 return Flag234 (Id);
1765 end Is_Dispatch_Table_Entity;
1767 function Is_Dispatching_Operation (Id : E) return B is
1769 pragma Assert (Nkind (Id) in N_Entity);
1771 end Is_Dispatching_Operation;
1773 function Is_Eliminated (Id : E) return B is
1775 return Flag124 (Id);
1778 function Is_Entry_Formal (Id : E) return B is
1781 end Is_Entry_Formal;
1783 function Is_Exported (Id : E) return B is
1788 function Is_First_Subtype (Id : E) return B is
1791 end Is_First_Subtype;
1793 function Is_For_Access_Subtype (Id : E) return B is
1795 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1796 return Flag118 (Id);
1797 end Is_For_Access_Subtype;
1799 function Is_Formal_Subprogram (Id : E) return B is
1801 return Flag111 (Id);
1802 end Is_Formal_Subprogram;
1804 function Is_Frozen (Id : E) return B is
1809 function Is_Generic_Actual_Type (Id : E) return B is
1811 pragma Assert (Is_Type (Id));
1813 end Is_Generic_Actual_Type;
1815 function Is_Generic_Instance (Id : E) return B is
1817 return Flag130 (Id);
1818 end Is_Generic_Instance;
1820 function Is_Generic_Type (Id : E) return B is
1822 pragma Assert (Nkind (Id) in N_Entity);
1824 end Is_Generic_Type;
1826 function Is_Hidden (Id : E) return B is
1831 function Is_Hidden_Open_Scope (Id : E) return B is
1833 return Flag171 (Id);
1834 end Is_Hidden_Open_Scope;
1836 function Is_Immediately_Visible (Id : E) return B is
1838 pragma Assert (Nkind (Id) in N_Entity);
1840 end Is_Immediately_Visible;
1842 function Is_Imported (Id : E) return B is
1847 function Is_Inlined (Id : E) return B is
1852 function Is_Interface (Id : E) return B is
1854 return Flag186 (Id);
1857 function Is_Instantiated (Id : E) return B is
1859 return Flag126 (Id);
1860 end Is_Instantiated;
1862 function Is_Internal (Id : E) return B is
1864 pragma Assert (Nkind (Id) in N_Entity);
1868 function Is_Interrupt_Handler (Id : E) return B is
1870 pragma Assert (Nkind (Id) in N_Entity);
1872 end Is_Interrupt_Handler;
1874 function Is_Intrinsic_Subprogram (Id : E) return B is
1877 end Is_Intrinsic_Subprogram;
1879 function Is_Itype (Id : E) return B is
1884 function Is_Known_Non_Null (Id : E) return B is
1887 end Is_Known_Non_Null;
1889 function Is_Known_Null (Id : E) return B is
1891 return Flag204 (Id);
1894 function Is_Known_Valid (Id : E) return B is
1896 return Flag170 (Id);
1899 function Is_Limited_Composite (Id : E) return B is
1901 return Flag106 (Id);
1902 end Is_Limited_Composite;
1904 function Is_Limited_Interface (Id : E) return B is
1906 return Flag197 (Id);
1907 end Is_Limited_Interface;
1909 function Is_Limited_Record (Id : E) return B is
1912 end Is_Limited_Record;
1914 function Is_Machine_Code_Subprogram (Id : E) return B is
1916 pragma Assert (Is_Subprogram (Id));
1917 return Flag137 (Id);
1918 end Is_Machine_Code_Subprogram;
1920 function Is_Non_Static_Subtype (Id : E) return B is
1922 pragma Assert (Is_Type (Id));
1923 return Flag109 (Id);
1924 end Is_Non_Static_Subtype;
1926 function Is_Null_Init_Proc (Id : E) return B is
1928 pragma Assert (Ekind (Id) = E_Procedure);
1929 return Flag178 (Id);
1930 end Is_Null_Init_Proc;
1932 function Is_Obsolescent (Id : E) return B is
1934 return Flag153 (Id);
1937 function Is_Only_Out_Parameter (Id : E) return B is
1939 pragma Assert (Is_Formal (Id));
1940 return Flag226 (Id);
1941 end Is_Only_Out_Parameter;
1943 function Is_Optional_Parameter (Id : E) return B is
1945 pragma Assert (Is_Formal (Id));
1946 return Flag134 (Id);
1947 end Is_Optional_Parameter;
1949 function Is_Package_Body_Entity (Id : E) return B is
1951 return Flag160 (Id);
1952 end Is_Package_Body_Entity;
1954 function Is_Packed (Id : E) return B is
1956 return Flag51 (Implementation_Base_Type (Id));
1959 function Is_Packed_Array_Type (Id : E) return B is
1961 return Flag138 (Id);
1962 end Is_Packed_Array_Type;
1964 function Is_Potentially_Use_Visible (Id : E) return B is
1966 pragma Assert (Nkind (Id) in N_Entity);
1968 end Is_Potentially_Use_Visible;
1970 function Is_Preelaborated (Id : E) return B is
1973 end Is_Preelaborated;
1975 function Is_Primitive (Id : E) return B is
1978 (Is_Overloadable (Id)
1979 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1980 return Flag218 (Id);
1983 function Is_Primitive_Wrapper (Id : E) return B is
1985 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1986 return Flag195 (Id);
1987 end Is_Primitive_Wrapper;
1989 function Is_Private_Composite (Id : E) return B is
1991 pragma Assert (Is_Type (Id));
1992 return Flag107 (Id);
1993 end Is_Private_Composite;
1995 function Is_Private_Descendant (Id : E) return B is
1998 end Is_Private_Descendant;
2000 function Is_Private_Primitive (Id : E) return B is
2002 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2003 return Flag245 (Id);
2004 end Is_Private_Primitive;
2006 function Is_Public (Id : E) return B is
2008 pragma Assert (Nkind (Id) in N_Entity);
2012 function Is_Pure (Id : E) return B is
2017 function Is_Pure_Unit_Access_Type (Id : E) return B is
2019 pragma Assert (Is_Access_Type (Id));
2020 return Flag189 (Id);
2021 end Is_Pure_Unit_Access_Type;
2023 function Is_RACW_Stub_Type (Id : E) return B is
2025 pragma Assert (Is_Type (Id));
2026 return Flag244 (Id);
2027 end Is_RACW_Stub_Type;
2029 function Is_Raised (Id : E) return B is
2031 pragma Assert (Ekind (Id) = E_Exception);
2032 return Flag224 (Id);
2035 function Is_Remote_Call_Interface (Id : E) return B is
2038 end Is_Remote_Call_Interface;
2040 function Is_Remote_Types (Id : E) return B is
2043 end Is_Remote_Types;
2045 function Is_Renaming_Of_Object (Id : E) return B is
2047 return Flag112 (Id);
2048 end Is_Renaming_Of_Object;
2050 function Is_Return_Object (Id : E) return B is
2052 return Flag209 (Id);
2053 end Is_Return_Object;
2055 function Is_Safe_To_Reevaluate (Id : E) return B is
2057 return Flag249 (Id);
2058 end Is_Safe_To_Reevaluate;
2060 function Is_Shared_Passive (Id : E) return B is
2063 end Is_Shared_Passive;
2065 function Is_Statically_Allocated (Id : E) return B is
2068 end Is_Statically_Allocated;
2070 function Is_Tag (Id : E) return B is
2072 pragma Assert (Nkind (Id) in N_Entity);
2076 function Is_Tagged_Type (Id : E) return B is
2081 function Is_Thunk (Id : E) return B is
2083 pragma Assert (Is_Subprogram (Id));
2084 return Flag225 (Id);
2087 function Is_Trivial_Subprogram (Id : E) return B is
2089 return Flag235 (Id);
2090 end Is_Trivial_Subprogram;
2092 function Is_True_Constant (Id : E) return B is
2094 return Flag163 (Id);
2095 end Is_True_Constant;
2097 function Is_Unchecked_Union (Id : E) return B is
2099 return Flag117 (Implementation_Base_Type (Id));
2100 end Is_Unchecked_Union;
2102 function Is_Underlying_Record_View (Id : E) return B is
2104 return Flag246 (Id);
2105 end Is_Underlying_Record_View;
2107 function Is_Unsigned_Type (Id : E) return B is
2109 pragma Assert (Is_Type (Id));
2110 return Flag144 (Id);
2111 end Is_Unsigned_Type;
2113 function Is_Valued_Procedure (Id : E) return B is
2115 pragma Assert (Ekind (Id) = E_Procedure);
2116 return Flag127 (Id);
2117 end Is_Valued_Procedure;
2119 function Is_Visible_Child_Unit (Id : E) return B is
2121 pragma Assert (Is_Child_Unit (Id));
2122 return Flag116 (Id);
2123 end Is_Visible_Child_Unit;
2125 function Is_Visible_Formal (Id : E) return B is
2127 return Flag206 (Id);
2128 end Is_Visible_Formal;
2130 function Is_VMS_Exception (Id : E) return B is
2132 return Flag133 (Id);
2133 end Is_VMS_Exception;
2135 function Is_Volatile (Id : E) return B is
2137 pragma Assert (Nkind (Id) in N_Entity);
2139 if Is_Type (Id) then
2140 return Flag16 (Base_Type (Id));
2146 function Itype_Printed (Id : E) return B is
2148 pragma Assert (Is_Itype (Id));
2149 return Flag202 (Id);
2152 function Kill_Elaboration_Checks (Id : E) return B is
2155 end Kill_Elaboration_Checks;
2157 function Kill_Range_Checks (Id : E) return B is
2160 end Kill_Range_Checks;
2162 function Kill_Tag_Checks (Id : E) return B is
2165 end Kill_Tag_Checks;
2167 function Known_To_Have_Preelab_Init (Id : E) return B is
2169 pragma Assert (Is_Type (Id));
2170 return Flag207 (Id);
2171 end Known_To_Have_Preelab_Init;
2173 function Last_Assignment (Id : E) return N is
2175 pragma Assert (Is_Assignable (Id));
2177 end Last_Assignment;
2179 function Last_Entity (Id : E) return E is
2184 function Limited_View (Id : E) return E is
2186 pragma Assert (Ekind (Id) = E_Package);
2190 function Lit_Indexes (Id : E) return E is
2192 pragma Assert (Is_Enumeration_Type (Id));
2196 function Lit_Strings (Id : E) return E is
2198 pragma Assert (Is_Enumeration_Type (Id));
2202 function Low_Bound_Tested (Id : E) return B is
2204 return Flag205 (Id);
2205 end Low_Bound_Tested;
2207 function Machine_Radix_10 (Id : E) return B is
2209 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2211 end Machine_Radix_10;
2213 function Master_Id (Id : E) return E is
2215 pragma Assert (Is_Access_Type (Id));
2219 function Materialize_Entity (Id : E) return B is
2221 return Flag168 (Id);
2222 end Materialize_Entity;
2224 function Mechanism (Id : E) return M is
2226 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2227 return UI_To_Int (Uint8 (Id));
2230 function Modulus (Id : E) return Uint is
2232 pragma Assert (Is_Modular_Integer_Type (Id));
2233 return Uint17 (Base_Type (Id));
2236 function Must_Be_On_Byte_Boundary (Id : E) return B is
2238 pragma Assert (Is_Type (Id));
2239 return Flag183 (Id);
2240 end Must_Be_On_Byte_Boundary;
2242 function Must_Have_Preelab_Init (Id : E) return B is
2244 pragma Assert (Is_Type (Id));
2245 return Flag208 (Id);
2246 end Must_Have_Preelab_Init;
2248 function Needs_Debug_Info (Id : E) return B is
2250 return Flag147 (Id);
2251 end Needs_Debug_Info;
2253 function Needs_No_Actuals (Id : E) return B is
2256 (Is_Overloadable (Id)
2257 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2259 end Needs_No_Actuals;
2261 function Never_Set_In_Source (Id : E) return B is
2263 return Flag115 (Id);
2264 end Never_Set_In_Source;
2266 function Next_Inlined_Subprogram (Id : E) return E is
2269 end Next_Inlined_Subprogram;
2271 function No_Pool_Assigned (Id : E) return B is
2273 pragma Assert (Is_Access_Type (Id));
2274 return Flag131 (Root_Type (Id));
2275 end No_Pool_Assigned;
2277 function No_Return (Id : E) return B is
2279 return Flag113 (Id);
2282 function No_Strict_Aliasing (Id : E) return B is
2284 pragma Assert (Is_Access_Type (Id));
2285 return Flag136 (Base_Type (Id));
2286 end No_Strict_Aliasing;
2288 function Non_Binary_Modulus (Id : E) return B is
2290 pragma Assert (Is_Type (Id));
2291 return Flag58 (Base_Type (Id));
2292 end Non_Binary_Modulus;
2294 function Non_Limited_View (Id : E) return E is
2296 pragma Assert (Ekind (Id) in Incomplete_Kind);
2298 end Non_Limited_View;
2300 function Nonzero_Is_True (Id : E) return B is
2302 pragma Assert (Root_Type (Id) = Standard_Boolean);
2303 return Flag162 (Base_Type (Id));
2304 end Nonzero_Is_True;
2306 function Normalized_First_Bit (Id : E) return U is
2308 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2310 end Normalized_First_Bit;
2312 function Normalized_Position (Id : E) return U is
2314 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2316 end Normalized_Position;
2318 function Normalized_Position_Max (Id : E) return U is
2320 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2322 end Normalized_Position_Max;
2324 function OK_To_Rename (Id : E) return B is
2326 pragma Assert (Ekind (Id) = E_Variable);
2327 return Flag247 (Id);
2330 function OK_To_Reorder_Components (Id : E) return B is
2332 pragma Assert (Is_Record_Type (Id));
2333 return Flag239 (Base_Type (Id));
2334 end OK_To_Reorder_Components;
2336 function Optimize_Alignment_Space (Id : E) return B is
2339 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2340 return Flag241 (Id);
2341 end Optimize_Alignment_Space;
2343 function Optimize_Alignment_Time (Id : E) return B is
2346 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2347 return Flag242 (Id);
2348 end Optimize_Alignment_Time;
2350 function Original_Access_Type (Id : E) return E is
2352 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2354 end Original_Access_Type;
2356 function Original_Array_Type (Id : E) return E is
2358 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2360 end Original_Array_Type;
2362 function Original_Record_Component (Id : E) return E is
2364 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2366 end Original_Record_Component;
2368 function Overlays_Constant (Id : E) return B is
2370 return Flag243 (Id);
2371 end Overlays_Constant;
2373 function Overridden_Operation (Id : E) return E is
2376 end Overridden_Operation;
2378 function Package_Instantiation (Id : E) return N is
2380 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2382 end Package_Instantiation;
2384 function Packed_Array_Type (Id : E) return E is
2386 pragma Assert (Is_Array_Type (Id));
2388 end Packed_Array_Type;
2390 function Parent_Subtype (Id : E) return E is
2392 pragma Assert (Is_Record_Type (Id));
2393 return Node19 (Base_Type (Id));
2396 function Postcondition_Proc (Id : E) return E is
2398 pragma Assert (Ekind (Id) = E_Procedure);
2400 end Postcondition_Proc;
2402 function PPC_Wrapper (Id : E) return E is
2404 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2408 function Prival (Id : E) return E is
2410 pragma Assert (Is_Protected_Component (Id));
2414 function Prival_Link (Id : E) return E is
2416 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2420 function Private_Dependents (Id : E) return L is
2422 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2423 return Elist18 (Id);
2424 end Private_Dependents;
2426 function Private_View (Id : E) return N is
2428 pragma Assert (Is_Private_Type (Id));
2432 function Protected_Body_Subprogram (Id : E) return E is
2434 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2436 end Protected_Body_Subprogram;
2438 function Protected_Formal (Id : E) return E is
2440 pragma Assert (Is_Formal (Id));
2442 end Protected_Formal;
2444 function Protection_Object (Id : E) return E is
2447 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2449 end Protection_Object;
2451 function Reachable (Id : E) return B is
2456 function Referenced (Id : E) return B is
2458 return Flag156 (Id);
2461 function Referenced_As_LHS (Id : E) return B is
2464 end Referenced_As_LHS;
2466 function Referenced_As_Out_Parameter (Id : E) return B is
2468 return Flag227 (Id);
2469 end Referenced_As_Out_Parameter;
2471 function Register_Exception_Call (Id : E) return N is
2473 pragma Assert (Ekind (Id) = E_Exception);
2475 end Register_Exception_Call;
2477 function Related_Array_Object (Id : E) return E is
2479 pragma Assert (Is_Array_Type (Id));
2481 end Related_Array_Object;
2483 function Related_Expression (Id : E) return N is
2485 pragma Assert (Ekind (Id) in Type_Kind
2486 or else Ekind_In (Id, E_Constant, E_Variable));
2488 end Related_Expression;
2490 function Related_Instance (Id : E) return E is
2492 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2494 end Related_Instance;
2496 function Related_Type (Id : E) return E is
2498 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2502 function Relative_Deadline_Variable (Id : E) return E is
2504 pragma Assert (Is_Task_Type (Id));
2505 return Node26 (Implementation_Base_Type (Id));
2506 end Relative_Deadline_Variable;
2508 function Renamed_Entity (Id : E) return N is
2513 function Renamed_In_Spec (Id : E) return B is
2515 pragma Assert (Ekind (Id) = E_Package);
2516 return Flag231 (Id);
2517 end Renamed_In_Spec;
2519 function Renamed_Object (Id : E) return N is
2524 function Renaming_Map (Id : E) return U is
2529 function Requires_Overriding (Id : E) return B is
2531 pragma Assert (Is_Overloadable (Id));
2532 return Flag213 (Id);
2533 end Requires_Overriding;
2535 function Return_Present (Id : E) return B is
2540 function Return_Applies_To (Id : E) return N is
2543 end Return_Applies_To;
2545 function Returns_By_Ref (Id : E) return B is
2550 function Reverse_Bit_Order (Id : E) return B is
2552 pragma Assert (Is_Record_Type (Id));
2553 return Flag164 (Base_Type (Id));
2554 end Reverse_Bit_Order;
2556 function RM_Size (Id : E) return U is
2558 pragma Assert (Is_Type (Id));
2562 function Scalar_Range (Id : E) return N is
2567 function Scale_Value (Id : E) return U is
2572 function Scope_Depth_Value (Id : E) return U is
2575 end Scope_Depth_Value;
2577 function Sec_Stack_Needed_For_Return (Id : E) return B is
2579 return Flag167 (Id);
2580 end Sec_Stack_Needed_For_Return;
2582 function Shadow_Entities (Id : E) return S is
2584 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2586 end Shadow_Entities;
2588 function Shared_Var_Procs_Instance (Id : E) return E is
2590 pragma Assert (Ekind (Id) = E_Variable);
2592 end Shared_Var_Procs_Instance;
2594 function Size_Check_Code (Id : E) return N is
2596 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2598 end Size_Check_Code;
2600 function Size_Depends_On_Discriminant (Id : E) return B is
2602 return Flag177 (Id);
2603 end Size_Depends_On_Discriminant;
2605 function Size_Known_At_Compile_Time (Id : E) return B is
2608 end Size_Known_At_Compile_Time;
2610 function Small_Value (Id : E) return R is
2612 pragma Assert (Is_Fixed_Point_Type (Id));
2613 return Ureal21 (Id);
2616 function Spec_Entity (Id : E) return E is
2618 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2622 function Spec_PPC_List (Id : E) return N is
2625 (Ekind_In (Id, E_Entry, E_Entry_Family)
2626 or else Is_Subprogram (Id)
2627 or else Is_Generic_Subprogram (Id));
2631 function Static_Predicate (Id : E) return S is
2633 pragma Assert (Is_Discrete_Type (Id));
2635 end Static_Predicate;
2637 function Storage_Size_Variable (Id : E) return E is
2639 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2640 return Node15 (Implementation_Base_Type (Id));
2641 end Storage_Size_Variable;
2643 function Static_Elaboration_Desired (Id : E) return B is
2645 pragma Assert (Ekind (Id) = E_Package);
2647 end Static_Elaboration_Desired;
2649 function Static_Initialization (Id : E) return N is
2652 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2654 end Static_Initialization;
2656 function Stored_Constraint (Id : E) return L is
2659 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2660 return Elist23 (Id);
2661 end Stored_Constraint;
2663 function Strict_Alignment (Id : E) return B is
2665 return Flag145 (Implementation_Base_Type (Id));
2666 end Strict_Alignment;
2668 function String_Literal_Length (Id : E) return U is
2671 end String_Literal_Length;
2673 function String_Literal_Low_Bound (Id : E) return N is
2676 end String_Literal_Low_Bound;
2678 function Subprograms_For_Type (Id : E) return E is
2680 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2682 end Subprograms_For_Type;
2684 function Suppress_Elaboration_Warnings (Id : E) return B is
2686 return Flag148 (Id);
2687 end Suppress_Elaboration_Warnings;
2689 function Suppress_Initialization (Id : E) return B is
2691 pragma Assert (Is_Type (Id));
2692 return Flag105 (Id);
2693 end Suppress_Initialization;
2695 function Suppress_Style_Checks (Id : E) return B is
2697 return Flag165 (Id);
2698 end Suppress_Style_Checks;
2700 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2702 return Flag217 (Id);
2703 end Suppress_Value_Tracking_On_Call;
2705 function Task_Body_Procedure (Id : E) return N is
2707 pragma Assert (Ekind (Id) in Task_Kind);
2709 end Task_Body_Procedure;
2711 function Treat_As_Volatile (Id : E) return B is
2714 end Treat_As_Volatile;
2716 function Underlying_Full_View (Id : E) return E is
2718 pragma Assert (Ekind (Id) in Private_Kind);
2720 end Underlying_Full_View;
2722 function Underlying_Record_View (Id : E) return E is
2725 end Underlying_Record_View;
2727 function Universal_Aliasing (Id : E) return B is
2729 pragma Assert (Is_Type (Id));
2730 return Flag216 (Base_Type (Id));
2731 end Universal_Aliasing;
2733 function Unset_Reference (Id : E) return N is
2736 end Unset_Reference;
2738 function Used_As_Generic_Actual (Id : E) return B is
2740 return Flag222 (Id);
2741 end Used_As_Generic_Actual;
2743 function Uses_Sec_Stack (Id : E) return B is
2748 function Warnings_Off (Id : E) return B is
2753 function Warnings_Off_Used (Id : E) return B is
2755 return Flag236 (Id);
2756 end Warnings_Off_Used;
2758 function Warnings_Off_Used_Unmodified (Id : E) return B is
2760 return Flag237 (Id);
2761 end Warnings_Off_Used_Unmodified;
2763 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2765 return Flag238 (Id);
2766 end Warnings_Off_Used_Unreferenced;
2768 function Wrapped_Entity (Id : E) return E is
2770 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2771 and then Is_Primitive_Wrapper (Id));
2775 function Was_Hidden (Id : E) return B is
2777 return Flag196 (Id);
2780 ------------------------------
2781 -- Classification Functions --
2782 ------------------------------
2784 function Is_Access_Type (Id : E) return B is
2786 return Ekind (Id) in Access_Kind;
2789 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2791 return Ekind (Id) in Access_Protected_Kind;
2792 end Is_Access_Protected_Subprogram_Type;
2794 function Is_Access_Subprogram_Type (Id : E) return B is
2796 return Ekind (Id) in Access_Subprogram_Kind;
2797 end Is_Access_Subprogram_Type;
2799 function Is_Aggregate_Type (Id : E) return B is
2801 return Ekind (Id) in Aggregate_Kind;
2802 end Is_Aggregate_Type;
2804 function Is_Array_Type (Id : E) return B is
2806 return Ekind (Id) in Array_Kind;
2809 function Is_Assignable (Id : E) return B is
2811 return Ekind (Id) in Assignable_Kind;
2814 function Is_Class_Wide_Type (Id : E) return B is
2816 return Ekind (Id) in Class_Wide_Kind;
2817 end Is_Class_Wide_Type;
2819 function Is_Composite_Type (Id : E) return B is
2821 return Ekind (Id) in Composite_Kind;
2822 end Is_Composite_Type;
2824 function Is_Concurrent_Body (Id : E) return B is
2826 return Ekind (Id) in
2827 Concurrent_Body_Kind;
2828 end Is_Concurrent_Body;
2830 function Is_Concurrent_Record_Type (Id : E) return B is
2833 end Is_Concurrent_Record_Type;
2835 function Is_Concurrent_Type (Id : E) return B is
2837 return Ekind (Id) in Concurrent_Kind;
2838 end Is_Concurrent_Type;
2840 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2842 return Ekind (Id) in
2843 Decimal_Fixed_Point_Kind;
2844 end Is_Decimal_Fixed_Point_Type;
2846 function Is_Digits_Type (Id : E) return B is
2848 return Ekind (Id) in Digits_Kind;
2851 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2853 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2854 end Is_Discrete_Or_Fixed_Point_Type;
2856 function Is_Discrete_Type (Id : E) return B is
2858 return Ekind (Id) in Discrete_Kind;
2859 end Is_Discrete_Type;
2861 function Is_Elementary_Type (Id : E) return B is
2863 return Ekind (Id) in Elementary_Kind;
2864 end Is_Elementary_Type;
2866 function Is_Entry (Id : E) return B is
2868 return Ekind (Id) in Entry_Kind;
2871 function Is_Enumeration_Type (Id : E) return B is
2873 return Ekind (Id) in
2875 end Is_Enumeration_Type;
2877 function Is_Fixed_Point_Type (Id : E) return B is
2879 return Ekind (Id) in
2881 end Is_Fixed_Point_Type;
2883 function Is_Floating_Point_Type (Id : E) return B is
2885 return Ekind (Id) in Float_Kind;
2886 end Is_Floating_Point_Type;
2888 function Is_Formal (Id : E) return B is
2890 return Ekind (Id) in Formal_Kind;
2893 function Is_Formal_Object (Id : E) return B is
2895 return Ekind (Id) in Formal_Object_Kind;
2896 end Is_Formal_Object;
2898 function Is_Generic_Subprogram (Id : E) return B is
2900 return Ekind (Id) in Generic_Subprogram_Kind;
2901 end Is_Generic_Subprogram;
2903 function Is_Generic_Unit (Id : E) return B is
2905 return Ekind (Id) in Generic_Unit_Kind;
2906 end Is_Generic_Unit;
2908 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2910 return Ekind (Id) in
2911 Incomplete_Or_Private_Kind;
2912 end Is_Incomplete_Or_Private_Type;
2914 function Is_Incomplete_Type (Id : E) return B is
2916 return Ekind (Id) in
2918 end Is_Incomplete_Type;
2920 function Is_Integer_Type (Id : E) return B is
2922 return Ekind (Id) in Integer_Kind;
2923 end Is_Integer_Type;
2925 function Is_Modular_Integer_Type (Id : E) return B is
2927 return Ekind (Id) in
2928 Modular_Integer_Kind;
2929 end Is_Modular_Integer_Type;
2931 function Is_Named_Number (Id : E) return B is
2933 return Ekind (Id) in Named_Kind;
2934 end Is_Named_Number;
2936 function Is_Numeric_Type (Id : E) return B is
2938 return Ekind (Id) in Numeric_Kind;
2939 end Is_Numeric_Type;
2941 function Is_Object (Id : E) return B is
2943 return Ekind (Id) in Object_Kind;
2946 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2948 return Ekind (Id) in
2949 Ordinary_Fixed_Point_Kind;
2950 end Is_Ordinary_Fixed_Point_Type;
2952 function Is_Overloadable (Id : E) return B is
2954 return Ekind (Id) in Overloadable_Kind;
2955 end Is_Overloadable;
2957 function Is_Private_Type (Id : E) return B is
2959 return Ekind (Id) in Private_Kind;
2960 end Is_Private_Type;
2962 function Is_Protected_Type (Id : E) return B is
2964 return Ekind (Id) in Protected_Kind;
2965 end Is_Protected_Type;
2967 function Is_Real_Type (Id : E) return B is
2969 return Ekind (Id) in Real_Kind;
2972 function Is_Record_Type (Id : E) return B is
2974 return Ekind (Id) in Record_Kind;
2977 function Is_Scalar_Type (Id : E) return B is
2979 return Ekind (Id) in Scalar_Kind;
2982 function Is_Signed_Integer_Type (Id : E) return B is
2984 return Ekind (Id) in Signed_Integer_Kind;
2985 end Is_Signed_Integer_Type;
2987 function Is_Subprogram (Id : E) return B is
2989 return Ekind (Id) in Subprogram_Kind;
2992 function Is_Task_Type (Id : E) return B is
2994 return Ekind (Id) in Task_Kind;
2997 function Is_Type (Id : E) return B is
2999 return Ekind (Id) in Type_Kind;
3002 ------------------------------
3003 -- Attribute Set Procedures --
3004 ------------------------------
3006 -- Note: in many of these set procedures an "obvious" assertion is missing.
3007 -- The reason for this is that in many cases, a field is set before the
3008 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3009 -- it is possible to add assertions that specifically include the E_Void
3010 -- possibility, but in some cases, we just omit the assertions.
3012 procedure Set_Accept_Address (Id : E; V : L) is
3014 Set_Elist21 (Id, V);
3015 end Set_Accept_Address;
3017 procedure Set_Access_Disp_Table (Id : E; V : L) is
3019 pragma Assert (Ekind (Id) = E_Record_Type
3020 and then Id = Implementation_Base_Type (Id));
3021 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3022 Set_Elist16 (Id, V);
3023 end Set_Access_Disp_Table;
3025 procedure Set_Associated_Final_Chain (Id : E; V : E) is
3027 pragma Assert (Is_Access_Type (Id));
3029 end Set_Associated_Final_Chain;
3031 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3034 end Set_Associated_Formal_Package;
3036 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3039 end Set_Associated_Node_For_Itype;
3041 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3043 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3045 end Set_Associated_Storage_Pool;
3047 procedure Set_Actual_Subtype (Id : E; V : E) is
3050 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3051 or else Is_Formal (Id));
3053 end Set_Actual_Subtype;
3055 procedure Set_Address_Taken (Id : E; V : B := True) is
3057 Set_Flag104 (Id, V);
3058 end Set_Address_Taken;
3060 procedure Set_Alias (Id : E; V : E) is
3063 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3067 procedure Set_Alignment (Id : E; V : U) is
3069 pragma Assert (Is_Type (Id)
3070 or else Is_Formal (Id)
3071 or else Ekind_In (Id, E_Loop_Parameter,
3078 procedure Set_Barrier_Function (Id : E; V : N) is
3080 pragma Assert (Is_Entry (Id));
3082 end Set_Barrier_Function;
3084 procedure Set_Block_Node (Id : E; V : N) is
3086 pragma Assert (Ekind (Id) = E_Block);
3090 procedure Set_Body_Entity (Id : E; V : E) is
3092 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3094 end Set_Body_Entity;
3096 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3099 (Ekind (Id) = E_Package
3100 or else Is_Subprogram (Id)
3101 or else Is_Generic_Unit (Id));
3103 end Set_Body_Needed_For_SAL;
3105 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3107 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3108 Set_Flag125 (Id, V);
3109 end Set_C_Pass_By_Copy;
3111 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3114 end Set_Can_Never_Be_Null;
3116 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3119 end Set_Checks_May_Be_Suppressed;
3121 procedure Set_Class_Wide_Type (Id : E; V : E) is
3123 pragma Assert (Is_Type (Id));
3125 end Set_Class_Wide_Type;
3127 procedure Set_Cloned_Subtype (Id : E; V : E) is
3129 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3131 end Set_Cloned_Subtype;
3133 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3135 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3137 end Set_Component_Bit_Offset;
3139 procedure Set_Component_Clause (Id : E; V : N) is
3141 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3143 end Set_Component_Clause;
3145 procedure Set_Component_Size (Id : E; V : U) is
3147 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3149 end Set_Component_Size;
3151 procedure Set_Component_Type (Id : E; V : E) is
3153 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3155 end Set_Component_Type;
3157 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3160 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3162 end Set_Corresponding_Concurrent_Type;
3164 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3166 pragma Assert (Ekind (Id) = E_Discriminant);
3168 end Set_Corresponding_Discriminant;
3170 procedure Set_Corresponding_Equality (Id : E; V : E) is
3173 (Ekind (Id) = E_Function
3174 and then not Comes_From_Source (Id)
3175 and then Chars (Id) = Name_Op_Ne);
3177 end Set_Corresponding_Equality;
3179 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3181 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3183 end Set_Corresponding_Protected_Entry;
3185 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3187 pragma Assert (Is_Concurrent_Type (Id));
3189 end Set_Corresponding_Record_Type;
3191 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3194 end Set_Corresponding_Remote_Type;
3196 procedure Set_Current_Use_Clause (Id : E; V : E) is
3198 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3200 end Set_Current_Use_Clause;
3202 procedure Set_Current_Value (Id : E; V : N) is
3204 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3206 end Set_Current_Value;
3208 procedure Set_CR_Discriminant (Id : E; V : E) is
3211 end Set_CR_Discriminant;
3213 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3215 Set_Flag166 (Id, V);
3216 end Set_Debug_Info_Off;
3218 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3221 end Set_Debug_Renaming_Link;
3223 procedure Set_Default_Expr_Function (Id : E; V : E) is
3225 pragma Assert (Is_Formal (Id));
3227 end Set_Default_Expr_Function;
3229 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3231 Set_Flag108 (Id, V);
3232 end Set_Default_Expressions_Processed;
3234 procedure Set_Default_Value (Id : E; V : N) is
3236 pragma Assert (Is_Formal (Id));
3238 end Set_Default_Value;
3240 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3244 or else Is_Task_Type (Id)
3245 or else Ekind (Id) = E_Block);
3246 Set_Flag114 (Id, V);
3247 end Set_Delay_Cleanups;
3249 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3252 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3254 end Set_Delay_Subprogram_Descriptors;
3256 procedure Set_Delta_Value (Id : E; V : R) is
3258 pragma Assert (Is_Fixed_Point_Type (Id));
3259 Set_Ureal18 (Id, V);
3260 end Set_Delta_Value;
3262 procedure Set_Dependent_Instances (Id : E; V : L) is
3264 pragma Assert (Is_Generic_Instance (Id));
3266 end Set_Dependent_Instances;
3268 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3270 pragma Assert (Nkind (Id) in N_Entity);
3272 end Set_Depends_On_Private;
3274 procedure Set_Digits_Value (Id : E; V : U) is
3277 (Is_Floating_Point_Type (Id)
3278 or else Is_Decimal_Fixed_Point_Type (Id));
3280 end Set_Digits_Value;
3282 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3285 end Set_Directly_Designated_Type;
3287 procedure Set_Discard_Names (Id : E; V : B := True) is
3290 end Set_Discard_Names;
3292 procedure Set_Discriminal (Id : E; V : E) is
3294 pragma Assert (Ekind (Id) = E_Discriminant);
3296 end Set_Discriminal;
3298 procedure Set_Discriminal_Link (Id : E; V : E) is
3301 end Set_Discriminal_Link;
3303 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3305 pragma Assert (Ekind (Id) = E_Component);
3307 end Set_Discriminant_Checking_Func;
3309 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3311 pragma Assert (Nkind (Id) in N_Entity);
3312 Set_Elist21 (Id, V);
3313 end Set_Discriminant_Constraint;
3315 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3318 end Set_Discriminant_Default_Value;
3320 procedure Set_Discriminant_Number (Id : E; V : U) is
3323 end Set_Discriminant_Number;
3325 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3327 pragma Assert (Ekind (Id) = E_Record_Type
3328 and then Id = Implementation_Base_Type (Id));
3329 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3330 Set_Elist26 (Id, V);
3331 end Set_Dispatch_Table_Wrappers;
3333 procedure Set_DT_Entry_Count (Id : E; V : U) is
3335 pragma Assert (Ekind (Id) = E_Component);
3337 end Set_DT_Entry_Count;
3339 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3341 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3343 end Set_DT_Offset_To_Top_Func;
3345 procedure Set_DT_Position (Id : E; V : U) is
3347 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3349 end Set_DT_Position;
3351 procedure Set_DTC_Entity (Id : E; V : E) is
3353 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3357 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3359 pragma Assert (Ekind (Id) = E_Package);
3360 Set_Flag210 (Id, V);
3361 end Set_Elaborate_Body_Desirable;
3363 procedure Set_Elaboration_Entity (Id : E; V : E) is
3368 Ekind (Id) = E_Package
3370 Is_Generic_Unit (Id));
3372 end Set_Elaboration_Entity;
3374 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3379 Ekind (Id) = E_Package
3381 Is_Generic_Unit (Id));
3382 Set_Flag174 (Id, V);
3383 end Set_Elaboration_Entity_Required;
3385 procedure Set_Enclosing_Scope (Id : E; V : E) is
3388 end Set_Enclosing_Scope;
3390 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3392 pragma Assert (Is_Entry (Id));
3393 Set_Flag152 (Id, V);
3394 end Set_Entry_Accepted;
3396 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3399 end Set_Entry_Bodies_Array;
3401 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3404 end Set_Entry_Cancel_Parameter;
3406 procedure Set_Entry_Component (Id : E; V : E) is
3409 end Set_Entry_Component;
3411 procedure Set_Entry_Formal (Id : E; V : E) is
3414 end Set_Entry_Formal;
3416 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3418 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3420 end Set_Entry_Index_Constant;
3422 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3425 end Set_Entry_Parameters_Type;
3427 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3429 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3431 end Set_Enum_Pos_To_Rep;
3433 procedure Set_Enumeration_Pos (Id : E; V : U) is
3435 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3437 end Set_Enumeration_Pos;
3439 procedure Set_Enumeration_Rep (Id : E; V : U) is
3441 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3443 end Set_Enumeration_Rep;
3445 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3447 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3449 end Set_Enumeration_Rep_Expr;
3451 procedure Set_Equivalent_Type (Id : E; V : E) is
3454 (Ekind_In (Id, E_Class_Wide_Type,
3455 E_Class_Wide_Subtype,
3456 E_Access_Protected_Subprogram_Type,
3457 E_Anonymous_Access_Protected_Subprogram_Type,
3458 E_Access_Subprogram_Type,
3461 end Set_Equivalent_Type;
3463 procedure Set_Esize (Id : E; V : U) is
3468 procedure Set_Exception_Code (Id : E; V : U) is
3470 pragma Assert (Ekind (Id) = E_Exception);
3472 end Set_Exception_Code;
3474 procedure Set_Extra_Accessibility (Id : E; V : E) is
3476 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3478 end Set_Extra_Accessibility;
3480 procedure Set_Extra_Constrained (Id : E; V : E) is
3482 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3484 end Set_Extra_Constrained;
3486 procedure Set_Extra_Formal (Id : E; V : E) is
3489 end Set_Extra_Formal;
3491 procedure Set_Extra_Formals (Id : E; V : E) is
3494 (Is_Overloadable (Id)
3495 or else Ekind_In (Id, E_Entry_Family,
3497 E_Subprogram_Type));
3499 end Set_Extra_Formals;
3501 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3504 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3505 Set_Flag229 (Id, V);
3506 end Set_Can_Use_Internal_Rep;
3508 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3511 end Set_Finalization_Chain_Entity;
3513 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3515 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3516 Set_Flag158 (Id, V);
3517 end Set_Finalize_Storage_Only;
3519 procedure Set_First_Entity (Id : E; V : E) is
3522 end Set_First_Entity;
3524 procedure Set_First_Exit_Statement (Id : E; V : N) is
3526 pragma Assert (Ekind (Id) = E_Loop);
3528 end Set_First_Exit_Statement;
3530 procedure Set_First_Index (Id : E; V : N) is
3532 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3534 end Set_First_Index;
3536 procedure Set_First_Literal (Id : E; V : E) is
3538 pragma Assert (Is_Enumeration_Type (Id));
3540 end Set_First_Literal;
3542 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3544 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3546 end Set_First_Optional_Parameter;
3548 procedure Set_First_Private_Entity (Id : E; V : E) is
3550 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3551 or else Ekind (Id) in Concurrent_Kind);
3553 end Set_First_Private_Entity;
3555 procedure Set_First_Rep_Item (Id : E; V : N) is
3558 end Set_First_Rep_Item;
3560 procedure Set_Float_Rep (Id : E; V : F) is
3561 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3563 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3566 procedure Set_Freeze_Node (Id : E; V : N) is
3569 end Set_Freeze_Node;
3571 procedure Set_From_With_Type (Id : E; V : B := True) is
3575 or else Ekind (Id) = E_Package);
3576 Set_Flag159 (Id, V);
3577 end Set_From_With_Type;
3579 procedure Set_Full_View (Id : E; V : E) is
3581 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3585 procedure Set_Generic_Homonym (Id : E; V : E) is
3588 end Set_Generic_Homonym;
3590 procedure Set_Generic_Renamings (Id : E; V : L) is
3592 Set_Elist23 (Id, V);
3593 end Set_Generic_Renamings;
3595 procedure Set_Handler_Records (Id : E; V : S) is
3598 end Set_Handler_Records;
3600 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3602 pragma Assert (Id = Base_Type (Id));
3603 Set_Flag135 (Id, V);
3604 end Set_Has_Aliased_Components;
3606 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3609 end Set_Has_Alignment_Clause;
3611 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3614 end Set_Has_All_Calls_Remote;
3616 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3618 Set_Flag201 (Id, V);
3619 end Set_Has_Anon_Block_Suffix;
3621 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3623 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3625 end Set_Has_Atomic_Components;
3627 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3630 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3631 Set_Flag139 (Id, V);
3632 end Set_Has_Biased_Representation;
3634 procedure Set_Has_Completion (Id : E; V : B := True) is
3637 end Set_Has_Completion;
3639 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3641 pragma Assert (Is_Type (Id));
3643 end Set_Has_Completion_In_Body;
3645 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3647 pragma Assert (Ekind (Id) = E_Record_Type);
3648 Set_Flag140 (Id, V);
3649 end Set_Has_Complex_Representation;
3651 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3653 pragma Assert (Ekind (Id) = E_Array_Type);
3655 end Set_Has_Component_Size_Clause;
3657 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3659 pragma Assert (Is_Type (Id));
3660 Set_Flag187 (Id, V);
3661 end Set_Has_Constrained_Partial_View;
3663 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3665 Set_Flag181 (Id, V);
3666 end Set_Has_Contiguous_Rep;
3668 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3670 pragma Assert (Id = Base_Type (Id));
3672 end Set_Has_Controlled_Component;
3674 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3677 end Set_Has_Controlling_Result;
3679 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3681 Set_Flag119 (Id, V);
3682 end Set_Has_Convention_Pragma;
3684 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3687 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3688 and then Is_Base_Type (Id));
3690 end Set_Has_Default_Aspect;
3692 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3694 pragma Assert (Nkind (Id) in N_Entity);
3695 Set_Flag200 (Id, V);
3696 end Set_Has_Delayed_Aspects;
3698 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3700 pragma Assert (Nkind (Id) in N_Entity);
3702 end Set_Has_Delayed_Freeze;
3704 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3706 pragma Assert (Nkind (Id) in N_Entity);
3708 end Set_Has_Discriminants;
3710 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3712 pragma Assert (Ekind (Id) = E_Record_Type
3713 and then Is_Tagged_Type (Id));
3714 Set_Flag220 (Id, V);
3715 end Set_Has_Dispatch_Table;
3717 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3719 pragma Assert (Is_Enumeration_Type (Id));
3721 end Set_Has_Enumeration_Rep_Clause;
3723 procedure Set_Has_Exit (Id : E; V : B := True) is
3728 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3730 pragma Assert (Is_Tagged_Type (Id));
3731 Set_Flag110 (Id, V);
3732 end Set_Has_External_Tag_Rep_Clause;
3734 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3736 Set_Flag175 (Id, V);
3737 end Set_Has_Forward_Instantiation;
3739 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3741 Set_Flag173 (Id, V);
3742 end Set_Has_Fully_Qualified_Name;
3744 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3747 end Set_Has_Gigi_Rep_Item;
3749 procedure Set_Has_Homonym (Id : E; V : B := True) is
3752 end Set_Has_Homonym;
3754 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3756 pragma Assert (Is_Type (Id));
3757 Set_Flag248 (Id, V);
3758 end Set_Has_Inheritable_Invariants;
3760 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3762 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3763 Set_Flag219 (Id, V);
3764 end Set_Has_Initial_Value;
3766 procedure Set_Has_Invariants (Id : E; V : B := True) is
3768 pragma Assert (Is_Type (Id)
3769 or else Ekind (Id) = E_Procedure
3770 or else Ekind (Id) = E_Void);
3771 Set_Flag232 (Id, V);
3772 end Set_Has_Invariants;
3774 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3776 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3778 end Set_Has_Machine_Radix_Clause;
3780 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3783 end Set_Has_Master_Entity;
3785 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3787 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3788 Set_Flag142 (Id, V);
3789 end Set_Has_Missing_Return;
3791 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3793 Set_Flag101 (Id, V);
3794 end Set_Has_Nested_Block_With_Handler;
3796 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3798 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3799 Set_Flag215 (Id, V);
3800 end Set_Has_Up_Level_Access;
3802 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3804 pragma Assert (Id = Base_Type (Id));
3806 end Set_Has_Non_Standard_Rep;
3808 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3810 pragma Assert (Is_Type (Id));
3811 Set_Flag172 (Id, V);
3812 end Set_Has_Object_Size_Clause;
3814 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3816 Set_Flag154 (Id, V);
3817 end Set_Has_Per_Object_Constraint;
3819 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3821 Set_Flag188 (Id, V);
3822 end Set_Has_Persistent_BSS;
3824 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3826 pragma Assert (Is_Subprogram (Id));
3827 Set_Flag240 (Id, V);
3828 end Set_Has_Postconditions;
3830 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3832 pragma Assert (Is_Access_Type (Id));
3833 Set_Flag27 (Base_Type (Id), V);
3834 end Set_Has_Pragma_Controlled;
3836 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3838 Set_Flag150 (Id, V);
3839 end Set_Has_Pragma_Elaborate_Body;
3841 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3843 Set_Flag157 (Id, V);
3844 end Set_Has_Pragma_Inline;
3846 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3848 Set_Flag230 (Id, V);
3849 end Set_Has_Pragma_Inline_Always;
3851 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3853 pragma Assert (Is_Enumeration_Type (Id));
3854 pragma Assert (Id = Base_Type (Id));
3855 Set_Flag198 (Id, V);
3856 end Set_Has_Pragma_Ordered;
3858 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3860 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3861 pragma Assert (Id = Base_Type (Id));
3862 Set_Flag121 (Id, V);
3863 end Set_Has_Pragma_Pack;
3865 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3867 Set_Flag221 (Id, V);
3868 end Set_Has_Pragma_Preelab_Init;
3870 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3872 Set_Flag203 (Id, V);
3873 end Set_Has_Pragma_Pure;
3875 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3877 Set_Flag179 (Id, V);
3878 end Set_Has_Pragma_Pure_Function;
3880 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3882 Set_Flag169 (Id, V);
3883 end Set_Has_Pragma_Thread_Local_Storage;
3885 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3887 Set_Flag233 (Id, V);
3888 end Set_Has_Pragma_Unmodified;
3890 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3892 Set_Flag180 (Id, V);
3893 end Set_Has_Pragma_Unreferenced;
3895 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3897 pragma Assert (Is_Type (Id));
3898 Set_Flag212 (Id, V);
3899 end Set_Has_Pragma_Unreferenced_Objects;
3901 procedure Set_Has_Predicates (Id : E; V : B := True) is
3903 Set_Flag250 (Id, V);
3904 end Set_Has_Predicates;
3906 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3908 pragma Assert (Id = Base_Type (Id));
3909 Set_Flag120 (Id, V);
3910 end Set_Has_Primitive_Operations;
3912 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3914 Set_Flag155 (Id, V);
3915 end Set_Has_Private_Declaration;
3917 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3919 Set_Flag161 (Id, V);
3920 end Set_Has_Qualified_Name;
3922 procedure Set_Has_RACW (Id : E; V : B := True) is
3924 pragma Assert (Ekind (Id) = E_Package);
3925 Set_Flag214 (Id, V);
3928 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3930 pragma Assert (Id = Base_Type (Id));
3932 end Set_Has_Record_Rep_Clause;
3934 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3936 pragma Assert (Is_Subprogram (Id));
3937 Set_Flag143 (Id, V);
3938 end Set_Has_Recursive_Call;
3940 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3943 end Set_Has_Size_Clause;
3945 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3948 end Set_Has_Small_Clause;
3950 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3952 pragma Assert (Id = Base_Type (Id));
3953 Set_Flag100 (Id, V);
3954 end Set_Has_Specified_Layout;
3956 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3958 pragma Assert (Is_Type (Id));
3959 Set_Flag190 (Id, V);
3960 end Set_Has_Specified_Stream_Input;
3962 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3964 pragma Assert (Is_Type (Id));
3965 Set_Flag191 (Id, V);
3966 end Set_Has_Specified_Stream_Output;
3968 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3970 pragma Assert (Is_Type (Id));
3971 Set_Flag192 (Id, V);
3972 end Set_Has_Specified_Stream_Read;
3974 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3976 pragma Assert (Is_Type (Id));
3977 Set_Flag193 (Id, V);
3978 end Set_Has_Specified_Stream_Write;
3980 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3982 Set_Flag211 (Id, V);
3983 end Set_Has_Static_Discriminants;
3985 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3987 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3988 pragma Assert (Id = Base_Type (Id));
3990 end Set_Has_Storage_Size_Clause;
3992 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3994 pragma Assert (Is_Elementary_Type (Id));
3995 Set_Flag184 (Id, V);
3996 end Set_Has_Stream_Size_Clause;
3998 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4001 end Set_Has_Subprogram_Descriptor;
4003 procedure Set_Has_Task (Id : E; V : B := True) is
4005 pragma Assert (Id = Base_Type (Id));
4009 procedure Set_Has_Thunks (Id : E; V : B := True) is
4011 pragma Assert (Is_Tag (Id));
4012 Set_Flag228 (Id, V);
4015 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4017 pragma Assert (Id = Base_Type (Id));
4018 Set_Flag123 (Id, V);
4019 end Set_Has_Unchecked_Union;
4021 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4023 pragma Assert (Is_Type (Id));
4025 end Set_Has_Unknown_Discriminants;
4027 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4029 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4031 end Set_Has_Volatile_Components;
4033 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4035 Set_Flag182 (Id, V);
4036 end Set_Has_Xref_Entry;
4038 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4040 pragma Assert (Ekind (Id) = E_Variable);
4042 end Set_Hiding_Loop_Variable;
4044 procedure Set_Homonym (Id : E; V : E) is
4046 pragma Assert (Id /= V);
4050 procedure Set_Interface_Alias (Id : E; V : E) is
4054 and then Is_Hidden (Id)
4055 and then (Ekind_In (Id, E_Procedure, E_Function)));
4057 end Set_Interface_Alias;
4059 procedure Set_Interfaces (Id : E; V : L) is
4061 pragma Assert (Is_Record_Type (Id));
4062 Set_Elist25 (Id, V);
4065 procedure Set_In_Package_Body (Id : E; V : B := True) is
4068 end Set_In_Package_Body;
4070 procedure Set_In_Private_Part (Id : E; V : B := True) is
4073 end Set_In_Private_Part;
4075 procedure Set_In_Use (Id : E; V : B := True) is
4077 pragma Assert (Nkind (Id) in N_Entity);
4081 procedure Set_Inner_Instances (Id : E; V : L) is
4083 Set_Elist23 (Id, V);
4084 end Set_Inner_Instances;
4086 procedure Set_Interface_Name (Id : E; V : N) is
4089 end Set_Interface_Name;
4091 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4093 pragma Assert (Is_Overloadable (Id));
4095 end Set_Is_Abstract_Subprogram;
4097 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4099 pragma Assert (Is_Type (Id));
4100 Set_Flag146 (Id, V);
4101 end Set_Is_Abstract_Type;
4103 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4105 pragma Assert (Is_Access_Type (Id));
4106 Set_Flag194 (Id, V);
4107 end Set_Is_Local_Anonymous_Access;
4109 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4111 pragma Assert (Is_Access_Type (Id));
4113 end Set_Is_Access_Constant;
4115 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4117 Set_Flag185 (Id, V);
4118 end Set_Is_Ada_2005_Only;
4120 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4122 Set_Flag199 (Id, V);
4123 end Set_Is_Ada_2012_Only;
4125 procedure Set_Is_Aliased (Id : E; V : B := True) is
4127 pragma Assert (Nkind (Id) in N_Entity);
4131 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4133 pragma Assert (Is_Entry (Id));
4134 Set_Flag132 (Id, V);
4135 end Set_Is_AST_Entry;
4137 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4140 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4142 end Set_Is_Asynchronous;
4144 procedure Set_Is_Atomic (Id : E; V : B := True) is
4149 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4151 pragma Assert ((not V)
4152 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4154 Set_Flag122 (Id, V);
4155 end Set_Is_Bit_Packed_Array;
4157 procedure Set_Is_Called (Id : E; V : B := True) is
4159 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4160 Set_Flag102 (Id, V);
4163 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4166 end Set_Is_Character_Type;
4168 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4171 end Set_Is_Child_Unit;
4173 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4176 end Set_Is_Class_Wide_Equivalent_Type;
4178 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4180 Set_Flag149 (Id, V);
4181 end Set_Is_Compilation_Unit;
4183 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4185 pragma Assert (Ekind (Id) = E_Discriminant);
4186 Set_Flag103 (Id, V);
4187 end Set_Is_Completely_Hidden;
4189 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4192 end Set_Is_Concurrent_Record_Type;
4194 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4197 end Set_Is_Constr_Subt_For_U_Nominal;
4199 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4201 Set_Flag141 (Id, V);
4202 end Set_Is_Constr_Subt_For_UN_Aliased;
4204 procedure Set_Is_Constrained (Id : E; V : B := True) is
4206 pragma Assert (Nkind (Id) in N_Entity);
4208 end Set_Is_Constrained;
4210 procedure Set_Is_Constructor (Id : E; V : B := True) is
4213 end Set_Is_Constructor;
4215 procedure Set_Is_Controlled (Id : E; V : B := True) is
4217 pragma Assert (Id = Base_Type (Id));
4219 end Set_Is_Controlled;
4221 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4223 pragma Assert (Is_Formal (Id));
4225 end Set_Is_Controlling_Formal;
4227 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4230 end Set_Is_CPP_Class;
4232 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4234 pragma Assert (Is_Type (Id));
4235 Set_Flag223 (Id, V);
4236 end Set_Is_Descendent_Of_Address;
4238 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4240 Set_Flag176 (Id, V);
4241 end Set_Is_Discrim_SO_Function;
4243 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4245 Set_Flag234 (Id, V);
4246 end Set_Is_Dispatch_Table_Entity;
4248 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4253 Is_Overloadable (Id)
4255 Ekind (Id) = E_Subprogram_Type);
4258 end Set_Is_Dispatching_Operation;
4260 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4262 Set_Flag124 (Id, V);
4263 end Set_Is_Eliminated;
4265 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4268 end Set_Is_Entry_Formal;
4270 procedure Set_Is_Exported (Id : E; V : B := True) is
4273 end Set_Is_Exported;
4275 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4278 end Set_Is_First_Subtype;
4280 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4282 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4283 Set_Flag118 (Id, V);
4284 end Set_Is_For_Access_Subtype;
4286 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4288 Set_Flag111 (Id, V);
4289 end Set_Is_Formal_Subprogram;
4291 procedure Set_Is_Frozen (Id : E; V : B := True) is
4293 pragma Assert (Nkind (Id) in N_Entity);
4297 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4299 pragma Assert (Is_Type (Id));
4301 end Set_Is_Generic_Actual_Type;
4303 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4305 Set_Flag130 (Id, V);
4306 end Set_Is_Generic_Instance;
4308 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4310 pragma Assert (Nkind (Id) in N_Entity);
4312 end Set_Is_Generic_Type;
4314 procedure Set_Is_Hidden (Id : E; V : B := True) is
4319 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4321 Set_Flag171 (Id, V);
4322 end Set_Is_Hidden_Open_Scope;
4324 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4326 pragma Assert (Nkind (Id) in N_Entity);
4328 end Set_Is_Immediately_Visible;
4330 procedure Set_Is_Imported (Id : E; V : B := True) is
4333 end Set_Is_Imported;
4335 procedure Set_Is_Inlined (Id : E; V : B := True) is
4340 procedure Set_Is_Interface (Id : E; V : B := True) is
4342 pragma Assert (Is_Record_Type (Id));
4343 Set_Flag186 (Id, V);
4344 end Set_Is_Interface;
4346 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4348 Set_Flag126 (Id, V);
4349 end Set_Is_Instantiated;
4351 procedure Set_Is_Internal (Id : E; V : B := True) is
4353 pragma Assert (Nkind (Id) in N_Entity);
4355 end Set_Is_Internal;
4357 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4359 pragma Assert (Nkind (Id) in N_Entity);
4361 end Set_Is_Interrupt_Handler;
4363 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4366 end Set_Is_Intrinsic_Subprogram;
4368 procedure Set_Is_Itype (Id : E; V : B := True) is
4373 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4376 end Set_Is_Known_Non_Null;
4378 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4380 Set_Flag204 (Id, V);
4381 end Set_Is_Known_Null;
4383 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4385 Set_Flag170 (Id, V);
4386 end Set_Is_Known_Valid;
4388 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4390 pragma Assert (Is_Type (Id));
4391 Set_Flag106 (Id, V);
4392 end Set_Is_Limited_Composite;
4394 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4396 pragma Assert (Is_Interface (Id));
4397 Set_Flag197 (Id, V);
4398 end Set_Is_Limited_Interface;
4400 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4403 end Set_Is_Limited_Record;
4405 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4407 pragma Assert (Is_Subprogram (Id));
4408 Set_Flag137 (Id, V);
4409 end Set_Is_Machine_Code_Subprogram;
4411 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4413 pragma Assert (Is_Type (Id));
4414 Set_Flag109 (Id, V);
4415 end Set_Is_Non_Static_Subtype;
4417 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4419 pragma Assert (Ekind (Id) = E_Procedure);
4420 Set_Flag178 (Id, V);
4421 end Set_Is_Null_Init_Proc;
4423 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4425 Set_Flag153 (Id, V);
4426 end Set_Is_Obsolescent;
4428 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4430 pragma Assert (Ekind (Id) = E_Out_Parameter);
4431 Set_Flag226 (Id, V);
4432 end Set_Is_Only_Out_Parameter;
4434 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4436 pragma Assert (Is_Formal (Id));
4437 Set_Flag134 (Id, V);
4438 end Set_Is_Optional_Parameter;
4440 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4442 Set_Flag160 (Id, V);
4443 end Set_Is_Package_Body_Entity;
4445 procedure Set_Is_Packed (Id : E; V : B := True) is
4447 pragma Assert (Id = Base_Type (Id));
4451 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4453 Set_Flag138 (Id, V);
4454 end Set_Is_Packed_Array_Type;
4456 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4458 pragma Assert (Nkind (Id) in N_Entity);
4460 end Set_Is_Potentially_Use_Visible;
4462 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4465 end Set_Is_Preelaborated;
4467 procedure Set_Is_Primitive (Id : E; V : B := True) is
4470 (Is_Overloadable (Id)
4471 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4472 Set_Flag218 (Id, V);
4473 end Set_Is_Primitive;
4475 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4477 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4478 Set_Flag195 (Id, V);
4479 end Set_Is_Primitive_Wrapper;
4481 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4483 pragma Assert (Is_Type (Id));
4484 Set_Flag107 (Id, V);
4485 end Set_Is_Private_Composite;
4487 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4490 end Set_Is_Private_Descendant;
4492 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4494 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4495 Set_Flag245 (Id, V);
4496 end Set_Is_Private_Primitive;
4498 procedure Set_Is_Public (Id : E; V : B := True) is
4500 pragma Assert (Nkind (Id) in N_Entity);
4504 procedure Set_Is_Pure (Id : E; V : B := True) is
4509 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4511 pragma Assert (Is_Access_Type (Id));
4512 Set_Flag189 (Id, V);
4513 end Set_Is_Pure_Unit_Access_Type;
4515 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4517 pragma Assert (Is_Type (Id));
4518 Set_Flag244 (Id, V);
4519 end Set_Is_RACW_Stub_Type;
4521 procedure Set_Is_Raised (Id : E; V : B := True) is
4523 pragma Assert (Ekind (Id) = E_Exception);
4524 Set_Flag224 (Id, V);
4527 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4530 end Set_Is_Remote_Call_Interface;
4532 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4535 end Set_Is_Remote_Types;
4537 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4539 Set_Flag112 (Id, V);
4540 end Set_Is_Renaming_Of_Object;
4542 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4544 Set_Flag209 (Id, V);
4545 end Set_Is_Return_Object;
4547 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4549 pragma Assert (Ekind (Id) = E_Variable);
4550 Set_Flag249 (Id, V);
4551 end Set_Is_Safe_To_Reevaluate;
4553 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4556 end Set_Is_Shared_Passive;
4558 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4562 or else Ekind_In (Id, E_Exception,
4567 end Set_Is_Statically_Allocated;
4569 procedure Set_Is_Tag (Id : E; V : B := True) is
4571 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4575 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4578 end Set_Is_Tagged_Type;
4580 procedure Set_Is_Thunk (Id : E; V : B := True) is
4582 Set_Flag225 (Id, V);
4585 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4587 Set_Flag235 (Id, V);
4588 end Set_Is_Trivial_Subprogram;
4590 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4592 Set_Flag163 (Id, V);
4593 end Set_Is_True_Constant;
4595 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4597 pragma Assert (Id = Base_Type (Id));
4598 Set_Flag117 (Id, V);
4599 end Set_Is_Unchecked_Union;
4601 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4603 pragma Assert (Ekind (Id) = E_Record_Type);
4604 Set_Flag246 (Id, V);
4605 end Set_Is_Underlying_Record_View;
4607 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4609 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4610 Set_Flag144 (Id, V);
4611 end Set_Is_Unsigned_Type;
4613 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4615 pragma Assert (Ekind (Id) = E_Procedure);
4616 Set_Flag127 (Id, V);
4617 end Set_Is_Valued_Procedure;
4619 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4621 pragma Assert (Is_Child_Unit (Id));
4622 Set_Flag116 (Id, V);
4623 end Set_Is_Visible_Child_Unit;
4625 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4627 Set_Flag206 (Id, V);
4628 end Set_Is_Visible_Formal;
4630 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4632 pragma Assert (Ekind (Id) = E_Exception);
4633 Set_Flag133 (Id, V);
4634 end Set_Is_VMS_Exception;
4636 procedure Set_Is_Volatile (Id : E; V : B := True) is
4638 pragma Assert (Nkind (Id) in N_Entity);
4640 end Set_Is_Volatile;
4642 procedure Set_Itype_Printed (Id : E; V : B := True) is
4644 pragma Assert (Is_Itype (Id));
4645 Set_Flag202 (Id, V);
4646 end Set_Itype_Printed;
4648 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4651 end Set_Kill_Elaboration_Checks;
4653 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4656 end Set_Kill_Range_Checks;
4658 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4661 end Set_Kill_Tag_Checks;
4663 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4665 pragma Assert (Is_Type (Id));
4666 Set_Flag207 (Id, V);
4667 end Set_Known_To_Have_Preelab_Init;
4669 procedure Set_Last_Assignment (Id : E; V : N) is
4671 pragma Assert (Is_Assignable (Id));
4673 end Set_Last_Assignment;
4675 procedure Set_Last_Entity (Id : E; V : E) is
4678 end Set_Last_Entity;
4680 procedure Set_Limited_View (Id : E; V : E) is
4682 pragma Assert (Ekind (Id) = E_Package);
4684 end Set_Limited_View;
4686 procedure Set_Lit_Indexes (Id : E; V : E) is
4688 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4690 end Set_Lit_Indexes;
4692 procedure Set_Lit_Strings (Id : E; V : E) is
4694 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4696 end Set_Lit_Strings;
4698 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4700 pragma Assert (Is_Formal (Id));
4701 Set_Flag205 (Id, V);
4702 end Set_Low_Bound_Tested;
4704 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4706 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4708 end Set_Machine_Radix_10;
4710 procedure Set_Master_Id (Id : E; V : E) is
4712 pragma Assert (Is_Access_Type (Id));
4716 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4718 Set_Flag168 (Id, V);
4719 end Set_Materialize_Entity;
4721 procedure Set_Mechanism (Id : E; V : M) is
4723 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4724 Set_Uint8 (Id, UI_From_Int (V));
4727 procedure Set_Modulus (Id : E; V : U) is
4729 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4733 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4735 pragma Assert (Is_Type (Id));
4736 Set_Flag183 (Id, V);
4737 end Set_Must_Be_On_Byte_Boundary;
4739 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4741 pragma Assert (Is_Type (Id));
4742 Set_Flag208 (Id, V);
4743 end Set_Must_Have_Preelab_Init;
4745 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4747 Set_Flag147 (Id, V);
4748 end Set_Needs_Debug_Info;
4750 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4753 (Is_Overloadable (Id)
4754 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4756 end Set_Needs_No_Actuals;
4758 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4760 Set_Flag115 (Id, V);
4761 end Set_Never_Set_In_Source;
4763 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4766 end Set_Next_Inlined_Subprogram;
4768 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4770 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4771 Set_Flag131 (Id, V);
4772 end Set_No_Pool_Assigned;
4774 procedure Set_No_Return (Id : E; V : B := True) is
4777 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4778 Set_Flag113 (Id, V);
4781 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4783 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4784 Set_Flag136 (Id, V);
4785 end Set_No_Strict_Aliasing;
4787 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4789 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4791 end Set_Non_Binary_Modulus;
4793 procedure Set_Non_Limited_View (Id : E; V : E) is
4795 pragma Assert (Ekind (Id) in Incomplete_Kind);
4797 end Set_Non_Limited_View;
4799 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4802 (Root_Type (Id) = Standard_Boolean
4803 and then Ekind (Id) = E_Enumeration_Type);
4804 Set_Flag162 (Id, V);
4805 end Set_Nonzero_Is_True;
4807 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4809 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4811 end Set_Normalized_First_Bit;
4813 procedure Set_Normalized_Position (Id : E; V : U) is
4815 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4817 end Set_Normalized_Position;
4819 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4821 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4823 end Set_Normalized_Position_Max;
4825 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4827 pragma Assert (Ekind (Id) = E_Variable);
4828 Set_Flag247 (Id, V);
4829 end Set_OK_To_Rename;
4831 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4834 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4835 Set_Flag239 (Id, V);
4836 end Set_OK_To_Reorder_Components;
4838 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4841 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4842 Set_Flag241 (Id, V);
4843 end Set_Optimize_Alignment_Space;
4845 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4848 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4849 Set_Flag242 (Id, V);
4850 end Set_Optimize_Alignment_Time;
4852 procedure Set_Original_Access_Type (Id : E; V : E) is
4854 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4856 end Set_Original_Access_Type;
4858 procedure Set_Original_Array_Type (Id : E; V : E) is
4860 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4862 end Set_Original_Array_Type;
4864 procedure Set_Original_Record_Component (Id : E; V : E) is
4866 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4868 end Set_Original_Record_Component;
4870 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4872 Set_Flag243 (Id, V);
4873 end Set_Overlays_Constant;
4875 procedure Set_Overridden_Operation (Id : E; V : E) is
4878 end Set_Overridden_Operation;
4880 procedure Set_Package_Instantiation (Id : E; V : N) is
4882 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4884 end Set_Package_Instantiation;
4886 procedure Set_Packed_Array_Type (Id : E; V : E) is
4888 pragma Assert (Is_Array_Type (Id));
4890 end Set_Packed_Array_Type;
4892 procedure Set_Parent_Subtype (Id : E; V : E) is
4894 pragma Assert (Ekind (Id) = E_Record_Type);
4896 end Set_Parent_Subtype;
4898 procedure Set_Postcondition_Proc (Id : E; V : E) is
4900 pragma Assert (Ekind (Id) = E_Procedure);
4902 end Set_Postcondition_Proc;
4904 procedure Set_PPC_Wrapper (Id : E; V : E) is
4906 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4908 end Set_PPC_Wrapper;
4910 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4912 pragma Assert (Is_Tagged_Type (Id));
4913 Set_Elist10 (Id, V);
4914 end Set_Direct_Primitive_Operations;
4916 procedure Set_Prival (Id : E; V : E) is
4918 pragma Assert (Is_Protected_Component (Id));
4922 procedure Set_Prival_Link (Id : E; V : E) is
4924 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4926 end Set_Prival_Link;
4928 procedure Set_Private_Dependents (Id : E; V : L) is
4930 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4931 Set_Elist18 (Id, V);
4932 end Set_Private_Dependents;
4934 procedure Set_Private_View (Id : E; V : N) is
4936 pragma Assert (Is_Private_Type (Id));
4938 end Set_Private_View;
4940 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4942 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4944 end Set_Protected_Body_Subprogram;
4946 procedure Set_Protected_Formal (Id : E; V : E) is
4948 pragma Assert (Is_Formal (Id));
4950 end Set_Protected_Formal;
4952 procedure Set_Protection_Object (Id : E; V : E) is
4954 pragma Assert (Ekind_In (Id, E_Entry,
4959 end Set_Protection_Object;
4961 procedure Set_Reachable (Id : E; V : B := True) is
4966 procedure Set_Referenced (Id : E; V : B := True) is
4968 Set_Flag156 (Id, V);
4971 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4974 end Set_Referenced_As_LHS;
4976 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4978 Set_Flag227 (Id, V);
4979 end Set_Referenced_As_Out_Parameter;
4981 procedure Set_Register_Exception_Call (Id : E; V : N) is
4983 pragma Assert (Ekind (Id) = E_Exception);
4985 end Set_Register_Exception_Call;
4987 procedure Set_Related_Array_Object (Id : E; V : E) is
4989 pragma Assert (Is_Array_Type (Id));
4991 end Set_Related_Array_Object;
4993 procedure Set_Related_Expression (Id : E; V : N) is
4995 pragma Assert (Ekind (Id) in Type_Kind
4996 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4998 end Set_Related_Expression;
5000 procedure Set_Related_Instance (Id : E; V : E) is
5002 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5004 end Set_Related_Instance;
5006 procedure Set_Related_Type (Id : E; V : E) is
5008 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5010 end Set_Related_Type;
5012 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5014 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5016 end Set_Relative_Deadline_Variable;
5018 procedure Set_Renamed_Entity (Id : E; V : N) is
5021 end Set_Renamed_Entity;
5023 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5025 pragma Assert (Ekind (Id) = E_Package);
5026 Set_Flag231 (Id, V);
5027 end Set_Renamed_In_Spec;
5029 procedure Set_Renamed_Object (Id : E; V : N) is
5032 end Set_Renamed_Object;
5034 procedure Set_Renaming_Map (Id : E; V : U) is
5037 end Set_Renaming_Map;
5039 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5041 pragma Assert (Is_Overloadable (Id));
5042 Set_Flag213 (Id, V);
5043 end Set_Requires_Overriding;
5045 procedure Set_Return_Present (Id : E; V : B := True) is
5048 end Set_Return_Present;
5050 procedure Set_Return_Applies_To (Id : E; V : N) is
5053 end Set_Return_Applies_To;
5055 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5058 end Set_Returns_By_Ref;
5060 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5063 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5064 Set_Flag164 (Id, V);
5065 end Set_Reverse_Bit_Order;
5067 procedure Set_RM_Size (Id : E; V : U) is
5069 pragma Assert (Is_Type (Id));
5073 procedure Set_Scalar_Range (Id : E; V : N) is
5076 end Set_Scalar_Range;
5078 procedure Set_Scale_Value (Id : E; V : U) is
5081 end Set_Scale_Value;
5083 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5085 pragma Assert (not Is_Record_Type (Id));
5087 end Set_Scope_Depth_Value;
5089 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5091 Set_Flag167 (Id, V);
5092 end Set_Sec_Stack_Needed_For_Return;
5094 procedure Set_Shadow_Entities (Id : E; V : S) is
5096 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5098 end Set_Shadow_Entities;
5100 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5102 pragma Assert (Ekind (Id) = E_Variable);
5104 end Set_Shared_Var_Procs_Instance;
5106 procedure Set_Size_Check_Code (Id : E; V : N) is
5108 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5110 end Set_Size_Check_Code;
5112 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5114 Set_Flag177 (Id, V);
5115 end Set_Size_Depends_On_Discriminant;
5117 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5120 end Set_Size_Known_At_Compile_Time;
5122 procedure Set_Small_Value (Id : E; V : R) is
5124 pragma Assert (Is_Fixed_Point_Type (Id));
5125 Set_Ureal21 (Id, V);
5126 end Set_Small_Value;
5128 procedure Set_Spec_Entity (Id : E; V : E) is
5130 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5132 end Set_Spec_Entity;
5134 procedure Set_Spec_PPC_List (Id : E; V : N) is
5137 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5138 or else Is_Subprogram (Id)
5139 or else Is_Generic_Subprogram (Id));
5141 end Set_Spec_PPC_List;
5143 procedure Set_Static_Predicate (Id : E; V : S) is
5146 (Ekind_In (Id, E_Enumeration_Subtype,
5147 E_Modular_Integer_Subtype,
5148 E_Signed_Integer_Subtype)
5149 and then Has_Predicates (Id));
5151 end Set_Static_Predicate;
5153 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5155 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5156 pragma Assert (Id = Base_Type (Id));
5158 end Set_Storage_Size_Variable;
5160 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5162 pragma Assert (Ekind (Id) = E_Package);
5164 end Set_Static_Elaboration_Desired;
5166 procedure Set_Static_Initialization (Id : E; V : N) is
5169 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5171 end Set_Static_Initialization;
5173 procedure Set_Stored_Constraint (Id : E; V : L) is
5175 pragma Assert (Nkind (Id) in N_Entity);
5176 Set_Elist23 (Id, V);
5177 end Set_Stored_Constraint;
5179 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5181 pragma Assert (Id = Base_Type (Id));
5182 Set_Flag145 (Id, V);
5183 end Set_Strict_Alignment;
5185 procedure Set_String_Literal_Length (Id : E; V : U) is
5187 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5189 end Set_String_Literal_Length;
5191 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5193 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5195 end Set_String_Literal_Low_Bound;
5197 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5199 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5201 end Set_Subprograms_For_Type;
5203 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5205 Set_Flag148 (Id, V);
5206 end Set_Suppress_Elaboration_Warnings;
5208 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5210 pragma Assert (Is_Type (Id));
5211 Set_Flag105 (Id, V);
5212 end Set_Suppress_Initialization;
5214 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5216 Set_Flag165 (Id, V);
5217 end Set_Suppress_Style_Checks;
5219 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5221 Set_Flag217 (Id, V);
5222 end Set_Suppress_Value_Tracking_On_Call;
5224 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5226 pragma Assert (Ekind (Id) in Task_Kind);
5228 end Set_Task_Body_Procedure;
5230 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5233 end Set_Treat_As_Volatile;
5235 procedure Set_Underlying_Full_View (Id : E; V : E) is
5237 pragma Assert (Ekind (Id) in Private_Kind);
5239 end Set_Underlying_Full_View;
5241 procedure Set_Underlying_Record_View (Id : E; V : E) is
5243 pragma Assert (Ekind (Id) = E_Record_Type);
5245 end Set_Underlying_Record_View;
5247 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5249 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5250 Set_Flag216 (Id, V);
5251 end Set_Universal_Aliasing;
5253 procedure Set_Unset_Reference (Id : E; V : N) is
5256 end Set_Unset_Reference;
5258 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5261 end Set_Uses_Sec_Stack;
5263 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5265 Set_Flag222 (Id, V);
5266 end Set_Used_As_Generic_Actual;
5268 procedure Set_Warnings_Off (Id : E; V : B := True) is
5271 end Set_Warnings_Off;
5273 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5275 Set_Flag236 (Id, V);
5276 end Set_Warnings_Off_Used;
5278 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5280 Set_Flag237 (Id, V);
5281 end Set_Warnings_Off_Used_Unmodified;
5283 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5285 Set_Flag238 (Id, V);
5286 end Set_Warnings_Off_Used_Unreferenced;
5288 procedure Set_Was_Hidden (Id : E; V : B := True) is
5290 Set_Flag196 (Id, V);
5293 procedure Set_Wrapped_Entity (Id : E; V : E) is
5295 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5296 and then Is_Primitive_Wrapper (Id));
5298 end Set_Wrapped_Entity;
5300 -----------------------------------
5301 -- Field Initialization Routines --
5302 -----------------------------------
5304 procedure Init_Alignment (Id : E) is
5306 Set_Uint14 (Id, Uint_0);
5309 procedure Init_Alignment (Id : E; V : Int) is
5311 Set_Uint14 (Id, UI_From_Int (V));
5314 procedure Init_Component_Bit_Offset (Id : E) is
5316 Set_Uint11 (Id, No_Uint);
5317 end Init_Component_Bit_Offset;
5319 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5321 Set_Uint11 (Id, UI_From_Int (V));
5322 end Init_Component_Bit_Offset;
5324 procedure Init_Component_Size (Id : E) is
5326 Set_Uint22 (Id, Uint_0);
5327 end Init_Component_Size;
5329 procedure Init_Component_Size (Id : E; V : Int) is
5331 Set_Uint22 (Id, UI_From_Int (V));
5332 end Init_Component_Size;
5334 procedure Init_Digits_Value (Id : E) is
5336 Set_Uint17 (Id, Uint_0);
5337 end Init_Digits_Value;
5339 procedure Init_Digits_Value (Id : E; V : Int) is
5341 Set_Uint17 (Id, UI_From_Int (V));
5342 end Init_Digits_Value;
5344 procedure Init_Esize (Id : E) is
5346 Set_Uint12 (Id, Uint_0);
5349 procedure Init_Esize (Id : E; V : Int) is
5351 Set_Uint12 (Id, UI_From_Int (V));
5354 procedure Init_Normalized_First_Bit (Id : E) is
5356 Set_Uint8 (Id, No_Uint);
5357 end Init_Normalized_First_Bit;
5359 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5361 Set_Uint8 (Id, UI_From_Int (V));
5362 end Init_Normalized_First_Bit;
5364 procedure Init_Normalized_Position (Id : E) is
5366 Set_Uint14 (Id, No_Uint);
5367 end Init_Normalized_Position;
5369 procedure Init_Normalized_Position (Id : E; V : Int) is
5371 Set_Uint14 (Id, UI_From_Int (V));
5372 end Init_Normalized_Position;
5374 procedure Init_Normalized_Position_Max (Id : E) is
5376 Set_Uint10 (Id, No_Uint);
5377 end Init_Normalized_Position_Max;
5379 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5381 Set_Uint10 (Id, UI_From_Int (V));
5382 end Init_Normalized_Position_Max;
5384 procedure Init_RM_Size (Id : E) is
5386 Set_Uint13 (Id, Uint_0);
5389 procedure Init_RM_Size (Id : E; V : Int) is
5391 Set_Uint13 (Id, UI_From_Int (V));
5394 -----------------------------
5395 -- Init_Component_Location --
5396 -----------------------------
5398 procedure Init_Component_Location (Id : E) is
5400 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5401 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5402 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5403 Set_Uint12 (Id, Uint_0); -- Esize
5404 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5405 end Init_Component_Location;
5411 procedure Init_Size (Id : E; V : Int) is
5413 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5414 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5417 ---------------------
5418 -- Init_Size_Align --
5419 ---------------------
5421 procedure Init_Size_Align (Id : E) is
5423 Set_Uint12 (Id, Uint_0); -- Esize
5424 Set_Uint13 (Id, Uint_0); -- RM_Size
5425 Set_Uint14 (Id, Uint_0); -- Alignment
5426 end Init_Size_Align;
5428 ----------------------------------------------
5429 -- Type Representation Attribute Predicates --
5430 ----------------------------------------------
5432 function Known_Alignment (E : Entity_Id) return B is
5434 return Uint14 (E) /= Uint_0
5435 and then Uint14 (E) /= No_Uint;
5436 end Known_Alignment;
5438 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5440 return Uint11 (E) /= No_Uint;
5441 end Known_Component_Bit_Offset;
5443 function Known_Component_Size (E : Entity_Id) return B is
5445 return Uint22 (Base_Type (E)) /= Uint_0
5446 and then Uint22 (Base_Type (E)) /= No_Uint;
5447 end Known_Component_Size;
5449 function Known_Esize (E : Entity_Id) return B is
5451 return Uint12 (E) /= Uint_0
5452 and then Uint12 (E) /= No_Uint;
5455 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5457 return Uint8 (E) /= No_Uint;
5458 end Known_Normalized_First_Bit;
5460 function Known_Normalized_Position (E : Entity_Id) return B is
5462 return Uint14 (E) /= No_Uint;
5463 end Known_Normalized_Position;
5465 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5467 return Uint10 (E) /= No_Uint;
5468 end Known_Normalized_Position_Max;
5470 function Known_RM_Size (E : Entity_Id) return B is
5472 return Uint13 (E) /= No_Uint
5473 and then (Uint13 (E) /= Uint_0
5474 or else Is_Discrete_Type (E)
5475 or else Is_Fixed_Point_Type (E));
5478 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5480 return Uint11 (E) /= No_Uint
5481 and then Uint11 (E) >= Uint_0;
5482 end Known_Static_Component_Bit_Offset;
5484 function Known_Static_Component_Size (E : Entity_Id) return B is
5486 return Uint22 (Base_Type (E)) > Uint_0;
5487 end Known_Static_Component_Size;
5489 function Known_Static_Esize (E : Entity_Id) return B is
5491 return Uint12 (E) > Uint_0
5492 and then not Is_Generic_Type (E);
5493 end Known_Static_Esize;
5495 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5497 return Uint8 (E) /= No_Uint
5498 and then Uint8 (E) >= Uint_0;
5499 end Known_Static_Normalized_First_Bit;
5501 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5503 return Uint14 (E) /= No_Uint
5504 and then Uint14 (E) >= Uint_0;
5505 end Known_Static_Normalized_Position;
5507 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5509 return Uint10 (E) /= No_Uint
5510 and then Uint10 (E) >= Uint_0;
5511 end Known_Static_Normalized_Position_Max;
5513 function Known_Static_RM_Size (E : Entity_Id) return B is
5515 return (Uint13 (E) > Uint_0
5516 or else Is_Discrete_Type (E)
5517 or else Is_Fixed_Point_Type (E))
5518 and then not Is_Generic_Type (E);
5519 end Known_Static_RM_Size;
5521 function Unknown_Alignment (E : Entity_Id) return B is
5523 return Uint14 (E) = Uint_0
5524 or else Uint14 (E) = No_Uint;
5525 end Unknown_Alignment;
5527 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5529 return Uint11 (E) = No_Uint;
5530 end Unknown_Component_Bit_Offset;
5532 function Unknown_Component_Size (E : Entity_Id) return B is
5534 return Uint22 (Base_Type (E)) = Uint_0
5536 Uint22 (Base_Type (E)) = No_Uint;
5537 end Unknown_Component_Size;
5539 function Unknown_Esize (E : Entity_Id) return B is
5541 return Uint12 (E) = No_Uint
5543 Uint12 (E) = Uint_0;
5546 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5548 return Uint8 (E) = No_Uint;
5549 end Unknown_Normalized_First_Bit;
5551 function Unknown_Normalized_Position (E : Entity_Id) return B is
5553 return Uint14 (E) = No_Uint;
5554 end Unknown_Normalized_Position;
5556 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5558 return Uint10 (E) = No_Uint;
5559 end Unknown_Normalized_Position_Max;
5561 function Unknown_RM_Size (E : Entity_Id) return B is
5563 return (Uint13 (E) = Uint_0
5564 and then not Is_Discrete_Type (E)
5565 and then not Is_Fixed_Point_Type (E))
5566 or else Uint13 (E) = No_Uint;
5567 end Unknown_RM_Size;
5569 --------------------
5570 -- Address_Clause --
5571 --------------------
5573 function Address_Clause (Id : E) return N is
5575 return Rep_Clause (Id, Name_Address);
5582 function Aft_Value (Id : E) return U is
5584 Delta_Val : Ureal := Delta_Value (Id);
5586 while Delta_Val < Ureal_Tenth loop
5587 Delta_Val := Delta_Val * Ureal_10;
5588 Result := Result + 1;
5591 return UI_From_Int (Result);
5594 ----------------------
5595 -- Alignment_Clause --
5596 ----------------------
5598 function Alignment_Clause (Id : E) return N is
5600 return Rep_Clause (Id, Name_Alignment);
5601 end Alignment_Clause;
5607 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5609 if Last_Entity (V) = Empty then
5610 Set_First_Entity (Id => V, V => Id);
5612 Set_Next_Entity (Last_Entity (V), Id);
5615 Set_Next_Entity (Id, Empty);
5617 Set_Last_Entity (Id => V, V => Id);
5624 function Base_Type (Id : E) return E is
5626 if Is_Base_Type (Id) then
5629 pragma Assert (Is_Type (Id));
5634 -------------------------
5635 -- Component_Alignment --
5636 -------------------------
5638 -- Component Alignment is encoded using two flags, Flag128/129 as
5639 -- follows. Note that both flags False = Align_Default, so that the
5640 -- default initialization of flags to False initializes component
5641 -- alignment to the default value as required.
5643 -- Flag128 Flag129 Value
5644 -- ------- ------- -----
5645 -- False False Calign_Default
5646 -- False True Calign_Component_Size
5647 -- True False Calign_Component_Size_4
5648 -- True True Calign_Storage_Unit
5650 function Component_Alignment (Id : E) return C is
5651 BT : constant Node_Id := Base_Type (Id);
5654 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5656 if Flag128 (BT) then
5657 if Flag129 (BT) then
5658 return Calign_Storage_Unit;
5660 return Calign_Component_Size_4;
5664 if Flag129 (BT) then
5665 return Calign_Component_Size;
5667 return Calign_Default;
5670 end Component_Alignment;
5672 ----------------------
5673 -- Declaration_Node --
5674 ----------------------
5676 function Declaration_Node (Id : E) return N is
5680 if Ekind (Id) = E_Incomplete_Type
5681 and then Present (Full_View (Id))
5683 P := Parent (Full_View (Id));
5689 if Nkind (P) /= N_Selected_Component
5690 and then Nkind (P) /= N_Expanded_Name
5692 not (Nkind (P) = N_Defining_Program_Unit_Name
5693 and then Is_Child_Unit (Id))
5700 end Declaration_Node;
5702 ---------------------
5703 -- Designated_Type --
5704 ---------------------
5706 function Designated_Type (Id : E) return E is
5710 Desig_Type := Directly_Designated_Type (Id);
5712 if Ekind (Desig_Type) = E_Incomplete_Type
5713 and then Present (Full_View (Desig_Type))
5715 return Full_View (Desig_Type);
5717 elsif Is_Class_Wide_Type (Desig_Type)
5718 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5719 and then Present (Full_View (Etype (Desig_Type)))
5720 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5722 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5727 end Designated_Type;
5729 ----------------------
5730 -- Entry_Index_Type --
5731 ----------------------
5733 function Entry_Index_Type (Id : E) return N is
5735 pragma Assert (Ekind (Id) = E_Entry_Family);
5736 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5737 end Entry_Index_Type;
5739 ---------------------
5740 -- First_Component --
5741 ---------------------
5743 function First_Component (Id : E) return E is
5748 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5750 Comp_Id := First_Entity (Id);
5751 while Present (Comp_Id) loop
5752 exit when Ekind (Comp_Id) = E_Component;
5753 Comp_Id := Next_Entity (Comp_Id);
5757 end First_Component;
5759 -------------------------------------
5760 -- First_Component_Or_Discriminant --
5761 -------------------------------------
5763 function First_Component_Or_Discriminant (Id : E) return E is
5768 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5770 Comp_Id := First_Entity (Id);
5771 while Present (Comp_Id) loop
5772 exit when Ekind (Comp_Id) = E_Component
5774 Ekind (Comp_Id) = E_Discriminant;
5775 Comp_Id := Next_Entity (Comp_Id);
5779 end First_Component_Or_Discriminant;
5785 function First_Formal (Id : E) return E is
5790 (Is_Overloadable (Id)
5791 or else Ekind_In (Id, E_Entry_Family,
5793 E_Subprogram_Type));
5795 if Ekind (Id) = E_Enumeration_Literal then
5799 Formal := First_Entity (Id);
5801 if Present (Formal) and then Is_Formal (Formal) then
5809 ------------------------------
5810 -- First_Formal_With_Extras --
5811 ------------------------------
5813 function First_Formal_With_Extras (Id : E) return E is
5818 (Is_Overloadable (Id)
5819 or else Ekind_In (Id, E_Entry_Family,
5821 E_Subprogram_Type));
5823 if Ekind (Id) = E_Enumeration_Literal then
5827 Formal := First_Entity (Id);
5829 if Present (Formal) and then Is_Formal (Formal) then
5832 return Extra_Formals (Id); -- Empty if no extra formals
5835 end First_Formal_With_Extras;
5837 -------------------------------------
5838 -- Get_Attribute_Definition_Clause --
5839 -------------------------------------
5841 function Get_Attribute_Definition_Clause
5843 Id : Attribute_Id) return Node_Id
5848 N := First_Rep_Item (E);
5849 while Present (N) loop
5850 if Nkind (N) = N_Attribute_Definition_Clause
5851 and then Get_Attribute_Id (Chars (N)) = Id
5860 end Get_Attribute_Definition_Clause;
5866 function Get_Full_View (T : Entity_Id) return Entity_Id is
5868 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5869 return Full_View (T);
5871 elsif Is_Class_Wide_Type (T)
5872 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5873 and then Present (Full_View (Root_Type (T)))
5875 return Class_Wide_Type (Full_View (Root_Type (T)));
5882 --------------------------------------
5883 -- Get_Record_Representation_Clause --
5884 --------------------------------------
5886 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5890 N := First_Rep_Item (E);
5891 while Present (N) loop
5892 if Nkind (N) = N_Record_Representation_Clause then
5900 end Get_Record_Representation_Clause;
5902 -----------------------------
5903 -- Get_Rep_Item_For_Entity --
5904 -----------------------------
5906 function Get_Rep_Item_For_Entity
5908 Nam : Name_Id) return Node_Id
5914 N := First_Rep_Item (E);
5915 while Present (N) loop
5916 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5917 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5919 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5923 elsif Nkind (N) = N_Attribute_Definition_Clause
5924 and then Chars (N) = Nam
5925 and then Entity (N) = E
5929 elsif Nkind (N) = N_Aspect_Specification
5930 and then Chars (Identifier (N)) = Nam
5931 and then Entity (N) = E
5940 end Get_Rep_Item_For_Entity;
5942 --------------------
5943 -- Get_Rep_Pragma --
5944 --------------------
5946 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5950 N := First_Rep_Item (E);
5951 while Present (N) loop
5952 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5962 ------------------------
5963 -- Has_Attach_Handler --
5964 ------------------------
5966 function Has_Attach_Handler (Id : E) return B is
5970 pragma Assert (Is_Protected_Type (Id));
5972 Ritem := First_Rep_Item (Id);
5973 while Present (Ritem) loop
5974 if Nkind (Ritem) = N_Pragma
5975 and then Pragma_Name (Ritem) = Name_Attach_Handler
5979 Next_Rep_Item (Ritem);
5984 end Has_Attach_Handler;
5986 -------------------------------------
5987 -- Has_Attribute_Definition_Clause --
5988 -------------------------------------
5990 function Has_Attribute_Definition_Clause
5992 Id : Attribute_Id) return Boolean
5995 return Present (Get_Attribute_Definition_Clause (E, Id));
5996 end Has_Attribute_Definition_Clause;
6002 function Has_Entries (Id : E) return B is
6006 pragma Assert (Is_Concurrent_Type (Id));
6008 Ent := First_Entity (Id);
6009 while Present (Ent) loop
6010 if Is_Entry (Ent) then
6014 Ent := Next_Entity (Ent);
6020 ----------------------------
6021 -- Has_Foreign_Convention --
6022 ----------------------------
6024 function Has_Foreign_Convention (Id : E) return B is
6026 -- While regular Intrinsics such as the Standard operators fit in the
6027 -- "Ada" convention, those with an Interface_Name materialize GCC
6028 -- builtin imports for which Ada special treatments shouldn't apply.
6030 return Convention (Id) in Foreign_Convention
6031 or else (Convention (Id) = Convention_Intrinsic
6032 and then Present (Interface_Name (Id)));
6033 end Has_Foreign_Convention;
6035 ---------------------------
6036 -- Has_Interrupt_Handler --
6037 ---------------------------
6039 function Has_Interrupt_Handler (Id : E) return B is
6043 pragma Assert (Is_Protected_Type (Id));
6045 Ritem := First_Rep_Item (Id);
6046 while Present (Ritem) loop
6047 if Nkind (Ritem) = N_Pragma
6048 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6052 Next_Rep_Item (Ritem);
6057 end Has_Interrupt_Handler;
6059 --------------------------
6060 -- Has_Private_Ancestor --
6061 --------------------------
6063 function Has_Private_Ancestor (Id : E) return B is
6064 R : constant Entity_Id := Root_Type (Id);
6065 T1 : Entity_Id := Id;
6068 if Is_Private_Type (T1) then
6076 end Has_Private_Ancestor;
6078 --------------------
6079 -- Has_Rep_Pragma --
6080 --------------------
6082 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6084 return Present (Get_Rep_Pragma (E, Nam));
6087 --------------------
6088 -- Has_Unmodified --
6089 --------------------
6091 function Has_Unmodified (E : Entity_Id) return Boolean is
6093 if Has_Pragma_Unmodified (E) then
6095 elsif Warnings_Off (E) then
6096 Set_Warnings_Off_Used_Unmodified (E);
6103 ---------------------
6104 -- Has_Unreferenced --
6105 ---------------------
6107 function Has_Unreferenced (E : Entity_Id) return Boolean is
6109 if Has_Pragma_Unreferenced (E) then
6111 elsif Warnings_Off (E) then
6112 Set_Warnings_Off_Used_Unreferenced (E);
6117 end Has_Unreferenced;
6119 ----------------------
6120 -- Has_Warnings_Off --
6121 ----------------------
6123 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6125 if Warnings_Off (E) then
6126 Set_Warnings_Off_Used (E);
6131 end Has_Warnings_Off;
6133 ------------------------------
6134 -- Implementation_Base_Type --
6135 ------------------------------
6137 function Implementation_Base_Type (Id : E) return E is
6142 Bastyp := Base_Type (Id);
6144 if Is_Incomplete_Or_Private_Type (Bastyp) then
6145 Imptyp := Underlying_Type (Bastyp);
6147 -- If we have an implementation type, then just return it,
6148 -- otherwise we return the Base_Type anyway. This can only
6149 -- happen in error situations and should avoid some error bombs.
6151 if Present (Imptyp) then
6152 return Base_Type (Imptyp);
6160 end Implementation_Base_Type;
6162 -------------------------
6163 -- Invariant_Procedure --
6164 -------------------------
6166 function Invariant_Procedure (Id : E) return E is
6170 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6172 if No (Subprograms_For_Type (Id)) then
6176 S := Subprograms_For_Type (Id);
6177 while Present (S) loop
6178 if Has_Invariants (S) then
6181 S := Subprograms_For_Type (S);
6187 end Invariant_Procedure;
6193 -- Global flag table allowing rapid computation of this function
6195 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6196 (E_Enumeration_Subtype |
6198 E_Signed_Integer_Subtype |
6199 E_Modular_Integer_Subtype |
6200 E_Floating_Point_Subtype |
6201 E_Ordinary_Fixed_Point_Subtype |
6202 E_Decimal_Fixed_Point_Subtype |
6207 E_Record_Subtype_With_Private |
6208 E_Limited_Private_Subtype |
6210 E_Protected_Subtype |
6212 E_String_Literal_Subtype |
6213 E_Class_Wide_Subtype => False,
6216 function Is_Base_Type (Id : E) return Boolean is
6218 return Entity_Is_Base_Type (Ekind (Id));
6221 ---------------------
6222 -- Is_Boolean_Type --
6223 ---------------------
6225 function Is_Boolean_Type (Id : E) return B is
6227 return Root_Type (Id) = Standard_Boolean;
6228 end Is_Boolean_Type;
6230 ------------------------
6231 -- Is_Constant_Object --
6232 ------------------------
6234 function Is_Constant_Object (Id : E) return B is
6235 K : constant Entity_Kind := Ekind (Id);
6238 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6239 end Is_Constant_Object;
6241 --------------------
6242 -- Is_Discriminal --
6243 --------------------
6245 function Is_Discriminal (Id : E) return B is
6247 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6248 and then Present (Discriminal_Link (Id)));
6251 ----------------------
6252 -- Is_Dynamic_Scope --
6253 ----------------------
6255 function Is_Dynamic_Scope (Id : E) return B is
6258 Ekind (Id) = E_Block
6260 Ekind (Id) = E_Function
6262 Ekind (Id) = E_Procedure
6264 Ekind (Id) = E_Subprogram_Body
6266 Ekind (Id) = E_Task_Type
6268 (Ekind (Id) = E_Limited_Private_Type
6269 and then Present (Full_View (Id))
6270 and then Ekind (Full_View (Id)) = E_Task_Type)
6272 Ekind (Id) = E_Entry
6274 Ekind (Id) = E_Entry_Family
6276 Ekind (Id) = E_Return_Statement;
6277 end Is_Dynamic_Scope;
6279 --------------------
6280 -- Is_Entity_Name --
6281 --------------------
6283 function Is_Entity_Name (N : Node_Id) return Boolean is
6284 Kind : constant Node_Kind := Nkind (N);
6287 -- Identifiers, operator symbols, expanded names are entity names
6289 return Kind = N_Identifier
6290 or else Kind = N_Operator_Symbol
6291 or else Kind = N_Expanded_Name
6293 -- Attribute references are entity names if they refer to an entity.
6294 -- Note that we don't do this by testing for the presence of the
6295 -- Entity field in the N_Attribute_Reference node, since it may not
6296 -- have been set yet.
6298 or else (Kind = N_Attribute_Reference
6299 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6302 -----------------------------------
6303 -- Is_Package_Or_Generic_Package --
6304 -----------------------------------
6306 function Is_Package_Or_Generic_Package (Id : E) return B is
6309 Ekind (Id) = E_Package
6311 Ekind (Id) = E_Generic_Package;
6312 end Is_Package_Or_Generic_Package;
6314 ------------------------
6315 -- Predicate_Function --
6316 ------------------------
6318 function Predicate_Function (Id : E) return E is
6322 pragma Assert (Is_Type (Id));
6324 if No (Subprograms_For_Type (Id)) then
6328 S := Subprograms_For_Type (Id);
6329 while Present (S) loop
6330 if Has_Predicates (S) then
6333 S := Subprograms_For_Type (S);
6339 end Predicate_Function;
6345 function Is_Prival (Id : E) return B is
6347 return (Ekind_In (Id, E_Constant, E_Variable)
6348 and then Present (Prival_Link (Id)));
6351 ----------------------------
6352 -- Is_Protected_Component --
6353 ----------------------------
6355 function Is_Protected_Component (Id : E) return B is
6357 return Ekind (Id) = E_Component
6358 and then Is_Protected_Type (Scope (Id));
6359 end Is_Protected_Component;
6361 ----------------------------
6362 -- Is_Protected_Interface --
6363 ----------------------------
6365 function Is_Protected_Interface (Id : E) return B is
6366 Typ : constant Entity_Id := Base_Type (Id);
6368 if not Is_Interface (Typ) then
6370 elsif Is_Class_Wide_Type (Typ) then
6371 return Is_Protected_Interface (Etype (Typ));
6373 return Protected_Present (Type_Definition (Parent (Typ)));
6375 end Is_Protected_Interface;
6377 ------------------------------
6378 -- Is_Protected_Record_Type --
6379 ------------------------------
6381 function Is_Protected_Record_Type (Id : E) return B is
6384 Is_Concurrent_Record_Type (Id)
6385 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6386 end Is_Protected_Record_Type;
6388 --------------------------------
6389 -- Is_Standard_Character_Type --
6390 --------------------------------
6392 function Is_Standard_Character_Type (Id : E) return B is
6394 if Is_Type (Id) then
6396 R : constant Entity_Id := Root_Type (Id);
6399 R = Standard_Character
6401 R = Standard_Wide_Character
6403 R = Standard_Wide_Wide_Character;
6409 end Is_Standard_Character_Type;
6411 --------------------
6412 -- Is_String_Type --
6413 --------------------
6415 function Is_String_Type (Id : E) return B is
6417 return Ekind (Id) in String_Kind
6418 or else (Is_Array_Type (Id)
6419 and then Id /= Any_Composite
6420 and then Number_Dimensions (Id) = 1
6421 and then Is_Character_Type (Component_Type (Id)));
6424 -------------------------------
6425 -- Is_Synchronized_Interface --
6426 -------------------------------
6428 function Is_Synchronized_Interface (Id : E) return B is
6429 Typ : constant Entity_Id := Base_Type (Id);
6432 if not Is_Interface (Typ) then
6435 elsif Is_Class_Wide_Type (Typ) then
6436 return Is_Synchronized_Interface (Etype (Typ));
6439 return Protected_Present (Type_Definition (Parent (Typ)))
6440 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6441 or else Task_Present (Type_Definition (Parent (Typ)));
6443 end Is_Synchronized_Interface;
6445 -----------------------
6446 -- Is_Task_Interface --
6447 -----------------------
6449 function Is_Task_Interface (Id : E) return B is
6450 Typ : constant Entity_Id := Base_Type (Id);
6452 if not Is_Interface (Typ) then
6454 elsif Is_Class_Wide_Type (Typ) then
6455 return Is_Task_Interface (Etype (Typ));
6457 return Task_Present (Type_Definition (Parent (Typ)));
6459 end Is_Task_Interface;
6461 -------------------------
6462 -- Is_Task_Record_Type --
6463 -------------------------
6465 function Is_Task_Record_Type (Id : E) return B is
6468 Is_Concurrent_Record_Type (Id)
6469 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6470 end Is_Task_Record_Type;
6472 ------------------------
6473 -- Is_Wrapper_Package --
6474 ------------------------
6476 function Is_Wrapper_Package (Id : E) return B is
6478 return (Ekind (Id) = E_Package
6479 and then Present (Related_Instance (Id)));
6480 end Is_Wrapper_Package;
6486 function Last_Formal (Id : E) return E is
6491 (Is_Overloadable (Id)
6492 or else Ekind_In (Id, E_Entry_Family,
6494 E_Subprogram_Type));
6496 if Ekind (Id) = E_Enumeration_Literal then
6500 Formal := First_Formal (Id);
6502 if Present (Formal) then
6503 while Present (Next_Formal (Formal)) loop
6504 Formal := Next_Formal (Formal);
6512 function Model_Emin_Value (Id : E) return Uint is
6514 return Machine_Emin_Value (Id);
6515 end Model_Emin_Value;
6517 -------------------------
6518 -- Model_Epsilon_Value --
6519 -------------------------
6521 function Model_Epsilon_Value (Id : E) return Ureal is
6522 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6524 return Radix ** (1 - Model_Mantissa_Value (Id));
6525 end Model_Epsilon_Value;
6527 --------------------------
6528 -- Model_Mantissa_Value --
6529 --------------------------
6531 function Model_Mantissa_Value (Id : E) return Uint is
6533 return Machine_Mantissa_Value (Id);
6534 end Model_Mantissa_Value;
6536 -----------------------
6537 -- Model_Small_Value --
6538 -----------------------
6540 function Model_Small_Value (Id : E) return Ureal is
6541 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6543 return Radix ** (Model_Emin_Value (Id) - 1);
6544 end Model_Small_Value;
6546 ------------------------
6547 -- Machine_Emax_Value --
6548 ------------------------
6550 function Machine_Emax_Value (Id : E) return Uint is
6551 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6554 case Float_Rep (Id) is
6557 when 1 .. 6 => return Uint_128;
6558 when 7 .. 15 => return 2**10;
6559 when 16 .. 33 => return 2**14;
6560 when others => return No_Uint;
6565 when 1 .. 9 => return 2**7 - 1;
6566 when 10 .. 15 => return 2**10 - 1;
6567 when others => return No_Uint;
6571 return Uint_2 ** Uint_7 - Uint_1;
6573 end Machine_Emax_Value;
6575 ------------------------
6576 -- Machine_Emin_Value --
6577 ------------------------
6579 function Machine_Emin_Value (Id : E) return Uint is
6581 case Float_Rep (Id) is
6582 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6583 when VAX_Native => return -Machine_Emax_Value (Id);
6584 when AAMP => return -Machine_Emax_Value (Id);
6586 end Machine_Emin_Value;
6588 ----------------------------
6589 -- Machine_Mantissa_Value --
6590 ----------------------------
6592 function Machine_Mantissa_Value (Id : E) return Uint is
6593 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6596 case Float_Rep (Id) is
6599 when 1 .. 6 => return Uint_24;
6600 when 7 .. 15 => return UI_From_Int (53);
6601 when 16 .. 18 => return Uint_64;
6602 when 19 .. 33 => return UI_From_Int (113);
6603 when others => return No_Uint;
6608 when 1 .. 6 => return Uint_24;
6609 when 7 .. 9 => return UI_From_Int (56);
6610 when 10 .. 15 => return UI_From_Int (53);
6611 when others => return No_Uint;
6616 when 1 .. 6 => return Uint_24;
6617 when 7 .. 9 => return UI_From_Int (40);
6618 when others => return No_Uint;
6621 end Machine_Mantissa_Value;
6623 -------------------------
6624 -- Machine_Radix_Value --
6625 -------------------------
6627 function Machine_Radix_Value (Id : E) return U is
6629 case Float_Rep (Id) is
6630 when IEEE_Binary | VAX_Native | AAMP =>
6633 end Machine_Radix_Value;
6635 --------------------
6636 -- Next_Component --
6637 --------------------
6639 function Next_Component (Id : E) return E is
6643 Comp_Id := Next_Entity (Id);
6644 while Present (Comp_Id) loop
6645 exit when Ekind (Comp_Id) = E_Component;
6646 Comp_Id := Next_Entity (Comp_Id);
6652 ------------------------------------
6653 -- Next_Component_Or_Discriminant --
6654 ------------------------------------
6656 function Next_Component_Or_Discriminant (Id : E) return E is
6660 Comp_Id := Next_Entity (Id);
6661 while Present (Comp_Id) loop
6662 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6663 Comp_Id := Next_Entity (Comp_Id);
6667 end Next_Component_Or_Discriminant;
6669 -----------------------
6670 -- Next_Discriminant --
6671 -----------------------
6673 -- This function actually implements both Next_Discriminant and
6674 -- Next_Stored_Discriminant by making sure that the Discriminant
6675 -- returned is of the same variety as Id.
6677 function Next_Discriminant (Id : E) return E is
6679 -- Derived Tagged types with private extensions look like this...
6681 -- E_Discriminant d1
6682 -- E_Discriminant d2
6684 -- E_Discriminant d1
6685 -- E_Discriminant d2
6688 -- so it is critical not to go past the leading discriminants
6693 pragma Assert (Ekind (Id) = E_Discriminant);
6696 D := Next_Entity (D);
6698 or else (Ekind (D) /= E_Discriminant
6699 and then not Is_Itype (D))
6704 exit when Ekind (D) = E_Discriminant
6705 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6709 end Next_Discriminant;
6715 function Next_Formal (Id : E) return E is
6719 -- Follow the chain of declared entities as long as the kind of the
6720 -- entity corresponds to a formal parameter. Skip internal entities
6721 -- that may have been created for implicit subtypes, in the process
6722 -- of analyzing default expressions.
6726 P := Next_Entity (P);
6728 if No (P) or else Is_Formal (P) then
6730 elsif not Is_Internal (P) then
6736 -----------------------------
6737 -- Next_Formal_With_Extras --
6738 -----------------------------
6740 function Next_Formal_With_Extras (Id : E) return E is
6742 if Present (Extra_Formal (Id)) then
6743 return Extra_Formal (Id);
6745 return Next_Formal (Id);
6747 end Next_Formal_With_Extras;
6753 function Next_Index (Id : Node_Id) return Node_Id is
6762 function Next_Literal (Id : E) return E is
6764 pragma Assert (Nkind (Id) in N_Entity);
6768 ------------------------------
6769 -- Next_Stored_Discriminant --
6770 ------------------------------
6772 function Next_Stored_Discriminant (Id : E) return E is
6774 -- See comment in Next_Discriminant
6776 return Next_Discriminant (Id);
6777 end Next_Stored_Discriminant;
6779 -----------------------
6780 -- Number_Dimensions --
6781 -----------------------
6783 function Number_Dimensions (Id : E) return Pos is
6788 if Ekind (Id) in String_Kind then
6793 T := First_Index (Id);
6794 while Present (T) loop
6801 end Number_Dimensions;
6803 --------------------
6804 -- Number_Entries --
6805 --------------------
6807 function Number_Entries (Id : E) return Nat is
6812 pragma Assert (Is_Concurrent_Type (Id));
6815 Ent := First_Entity (Id);
6816 while Present (Ent) loop
6817 if Is_Entry (Ent) then
6821 Ent := Next_Entity (Ent);
6827 --------------------
6828 -- Number_Formals --
6829 --------------------
6831 function Number_Formals (Id : E) return Pos is
6837 Formal := First_Formal (Id);
6838 while Present (Formal) loop
6840 Formal := Next_Formal (Formal);
6846 --------------------
6847 -- Parameter_Mode --
6848 --------------------
6850 function Parameter_Mode (Id : E) return Formal_Kind is
6855 --------------------------
6856 -- Primitive_Operations --
6857 --------------------------
6859 function Primitive_Operations (Id : E) return L is
6861 if Is_Concurrent_Type (Id) then
6862 if Present (Corresponding_Record_Type (Id)) then
6863 return Direct_Primitive_Operations
6864 (Corresponding_Record_Type (Id));
6869 return Direct_Primitive_Operations (Id);
6871 end Primitive_Operations;
6873 ---------------------
6874 -- Record_Rep_Item --
6875 ---------------------
6877 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6879 Set_Next_Rep_Item (N, First_Rep_Item (E));
6880 Set_First_Rep_Item (E, N);
6881 end Record_Rep_Item;
6887 function Root_Type (Id : E) return E is
6891 pragma Assert (Nkind (Id) in N_Entity);
6893 T := Base_Type (Id);
6895 if Ekind (T) = E_Class_Wide_Type then
6898 elsif Ekind (T) = E_Class_Wide_Subtype then
6899 return Etype (Base_Type (T));
6901 -- ??? T comes from Base_Type, how can it be a subtype?
6902 -- Also Base_Type is supposed to be idempotent, so either way
6903 -- this is equivalent to "return Etype (T)" and should be merged
6904 -- with the E_Class_Wide_Type case.
6915 -- Following test catches some error cases resulting from
6918 elsif No (Etyp) then
6921 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6924 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6930 -- Return if there is a circularity in the inheritance chain. This
6931 -- happens in some error situations and we do not want to get
6932 -- stuck in this loop.
6934 if T = Base_Type (Id) then
6941 ---------------------
6942 -- Safe_Emax_Value --
6943 ---------------------
6945 function Safe_Emax_Value (Id : E) return Uint is
6947 return Machine_Emax_Value (Id);
6948 end Safe_Emax_Value;
6950 ----------------------
6951 -- Safe_First_Value --
6952 ----------------------
6954 function Safe_First_Value (Id : E) return Ureal is
6956 return -Safe_Last_Value (Id);
6957 end Safe_First_Value;
6959 ---------------------
6960 -- Safe_Last_Value --
6961 ---------------------
6963 function Safe_Last_Value (Id : E) return Ureal is
6964 Radix : constant Uint := Machine_Radix_Value (Id);
6965 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
6966 Emax : constant Uint := Safe_Emax_Value (Id);
6967 Significand : constant Uint := Radix ** Mantissa - 1;
6968 Exponent : constant Uint := Emax - Mantissa;
6974 (Num => Significand * 2 ** (Exponent mod 4),
6975 Den => -Exponent / 4,
6981 (Num => Significand,
6985 end Safe_Last_Value;
6991 function Scope_Depth (Id : E) return Uint is
6996 while Is_Record_Type (Scop) loop
6997 Scop := Scope (Scop);
7000 return Scope_Depth_Value (Scop);
7003 ---------------------
7004 -- Scope_Depth_Set --
7005 ---------------------
7007 function Scope_Depth_Set (Id : E) return B is
7009 return not Is_Record_Type (Id)
7010 and then Field22 (Id) /= Union_Id (Empty);
7011 end Scope_Depth_Set;
7013 -----------------------------
7014 -- Set_Component_Alignment --
7015 -----------------------------
7017 -- Component Alignment is encoded using two flags, Flag128/129 as
7018 -- follows. Note that both flags False = Align_Default, so that the
7019 -- default initialization of flags to False initializes component
7020 -- alignment to the default value as required.
7022 -- Flag128 Flag129 Value
7023 -- ------- ------- -----
7024 -- False False Calign_Default
7025 -- False True Calign_Component_Size
7026 -- True False Calign_Component_Size_4
7027 -- True True Calign_Storage_Unit
7029 procedure Set_Component_Alignment (Id : E; V : C) is
7031 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7032 and then Is_Base_Type (Id));
7035 when Calign_Default =>
7036 Set_Flag128 (Id, False);
7037 Set_Flag129 (Id, False);
7039 when Calign_Component_Size =>
7040 Set_Flag128 (Id, False);
7041 Set_Flag129 (Id, True);
7043 when Calign_Component_Size_4 =>
7044 Set_Flag128 (Id, True);
7045 Set_Flag129 (Id, False);
7047 when Calign_Storage_Unit =>
7048 Set_Flag128 (Id, True);
7049 Set_Flag129 (Id, True);
7051 end Set_Component_Alignment;
7053 -----------------------------
7054 -- Set_Invariant_Procedure --
7055 -----------------------------
7057 procedure Set_Invariant_Procedure (Id : E; V : E) is
7061 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7063 S := Subprograms_For_Type (Id);
7064 Set_Subprograms_For_Type (Id, V);
7066 while Present (S) loop
7067 if Has_Invariants (S) then
7068 raise Program_Error;
7070 S := Subprograms_For_Type (S);
7074 Set_Subprograms_For_Type (Id, V);
7075 end Set_Invariant_Procedure;
7077 ----------------------------
7078 -- Set_Predicate_Function --
7079 ----------------------------
7081 procedure Set_Predicate_Function (Id : E; V : E) is
7085 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7087 S := Subprograms_For_Type (Id);
7088 Set_Subprograms_For_Type (Id, V);
7090 while Present (S) loop
7091 if Has_Predicates (S) then
7092 raise Program_Error;
7094 S := Subprograms_For_Type (S);
7098 Set_Subprograms_For_Type (Id, V);
7099 end Set_Predicate_Function;
7105 function Size_Clause (Id : E) return N is
7107 return Rep_Clause (Id, Name_Size);
7110 ------------------------
7111 -- Stream_Size_Clause --
7112 ------------------------
7114 function Stream_Size_Clause (Id : E) return N is
7116 return Rep_Clause (Id, Name_Stream_Size);
7117 end Stream_Size_Clause;
7123 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7129 Kind := E_Access_Subtype;
7133 Kind := E_Array_Subtype;
7135 when E_Class_Wide_Type |
7136 E_Class_Wide_Subtype =>
7137 Kind := E_Class_Wide_Subtype;
7139 when E_Decimal_Fixed_Point_Type |
7140 E_Decimal_Fixed_Point_Subtype =>
7141 Kind := E_Decimal_Fixed_Point_Subtype;
7143 when E_Ordinary_Fixed_Point_Type |
7144 E_Ordinary_Fixed_Point_Subtype =>
7145 Kind := E_Ordinary_Fixed_Point_Subtype;
7147 when E_Private_Type |
7148 E_Private_Subtype =>
7149 Kind := E_Private_Subtype;
7151 when E_Limited_Private_Type |
7152 E_Limited_Private_Subtype =>
7153 Kind := E_Limited_Private_Subtype;
7155 when E_Record_Type_With_Private |
7156 E_Record_Subtype_With_Private =>
7157 Kind := E_Record_Subtype_With_Private;
7159 when E_Record_Type |
7161 Kind := E_Record_Subtype;
7163 when E_String_Type |
7165 Kind := E_String_Subtype;
7167 when Enumeration_Kind =>
7168 Kind := E_Enumeration_Subtype;
7171 Kind := E_Floating_Point_Subtype;
7173 when Signed_Integer_Kind =>
7174 Kind := E_Signed_Integer_Subtype;
7176 when Modular_Integer_Kind =>
7177 Kind := E_Modular_Integer_Subtype;
7179 when Protected_Kind =>
7180 Kind := E_Protected_Subtype;
7183 Kind := E_Task_Subtype;
7187 raise Program_Error;
7193 ---------------------
7194 -- Type_High_Bound --
7195 ---------------------
7197 function Type_High_Bound (Id : E) return Node_Id is
7198 Rng : constant Node_Id := Scalar_Range (Id);
7200 if Nkind (Rng) = N_Subtype_Indication then
7201 return High_Bound (Range_Expression (Constraint (Rng)));
7203 return High_Bound (Rng);
7205 end Type_High_Bound;
7207 --------------------
7208 -- Type_Low_Bound --
7209 --------------------
7211 function Type_Low_Bound (Id : E) return Node_Id is
7212 Rng : constant Node_Id := Scalar_Range (Id);
7214 if Nkind (Rng) = N_Subtype_Indication then
7215 return Low_Bound (Range_Expression (Constraint (Rng)));
7217 return Low_Bound (Rng);
7221 ---------------------
7222 -- Underlying_Type --
7223 ---------------------
7225 function Underlying_Type (Id : E) return E is
7227 -- For record_with_private the underlying type is always the direct
7228 -- full view. Never try to take the full view of the parent it
7229 -- doesn't make sense.
7231 if Ekind (Id) = E_Record_Type_With_Private then
7232 return Full_View (Id);
7234 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7236 -- If we have an incomplete or private type with a full view,
7237 -- then we return the Underlying_Type of this full view
7239 if Present (Full_View (Id)) then
7240 if Id = Full_View (Id) then
7242 -- Previous error in declaration
7247 return Underlying_Type (Full_View (Id));
7250 -- If we have an incomplete entity that comes from the limited
7251 -- view then we return the Underlying_Type of its non-limited
7254 elsif From_With_Type (Id)
7255 and then Present (Non_Limited_View (Id))
7257 return Underlying_Type (Non_Limited_View (Id));
7259 -- Otherwise check for the case where we have a derived type or
7260 -- subtype, and if so get the Underlying_Type of the parent type.
7262 elsif Etype (Id) /= Id then
7263 return Underlying_Type (Etype (Id));
7265 -- Otherwise we have an incomplete or private type that has
7266 -- no full view, which means that we have not encountered the
7267 -- completion, so return Empty to indicate the underlying type
7268 -- is not yet known.
7274 -- For non-incomplete, non-private types, return the type itself
7275 -- Also for entities that are not types at all return the entity
7281 end Underlying_Type;
7287 function Vax_Float (Id : E) return B is
7289 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7292 ------------------------
7293 -- Write_Entity_Flags --
7294 ------------------------
7296 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7298 procedure W (Flag_Name : String; Flag : Boolean);
7299 -- Write out given flag if it is set
7305 procedure W (Flag_Name : String; Flag : Boolean) is
7309 Write_Str (Flag_Name);
7310 Write_Str (" = True");
7315 -- Start of processing for Write_Entity_Flags
7318 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7319 and then Is_Base_Type (Id)
7322 Write_Str ("Component_Alignment = ");
7324 case Component_Alignment (Id) is
7325 when Calign_Default =>
7326 Write_Str ("Calign_Default");
7328 when Calign_Component_Size =>
7329 Write_Str ("Calign_Component_Size");
7331 when Calign_Component_Size_4 =>
7332 Write_Str ("Calign_Component_Size_4");
7334 when Calign_Storage_Unit =>
7335 Write_Str ("Calign_Storage_Unit");
7341 W ("Address_Taken", Flag104 (Id));
7342 W ("Body_Needed_For_SAL", Flag40 (Id));
7343 W ("C_Pass_By_Copy", Flag125 (Id));
7344 W ("Can_Never_Be_Null", Flag38 (Id));
7345 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7346 W ("Debug_Info_Off", Flag166 (Id));
7347 W ("Default_Expressions_Processed", Flag108 (Id));
7348 W ("Delay_Cleanups", Flag114 (Id));
7349 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7350 W ("Depends_On_Private", Flag14 (Id));
7351 W ("Discard_Names", Flag88 (Id));
7352 W ("Elaboration_Entity_Required", Flag174 (Id));
7353 W ("Elaborate_Body_Desirable", Flag210 (Id));
7354 W ("Entry_Accepted", Flag152 (Id));
7355 W ("Can_Use_Internal_Rep", Flag229 (Id));
7356 W ("Finalize_Storage_Only", Flag158 (Id));
7357 W ("From_With_Type", Flag159 (Id));
7358 W ("Has_Aliased_Components", Flag135 (Id));
7359 W ("Has_Alignment_Clause", Flag46 (Id));
7360 W ("Has_All_Calls_Remote", Flag79 (Id));
7361 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7362 W ("Has_Atomic_Components", Flag86 (Id));
7363 W ("Has_Biased_Representation", Flag139 (Id));
7364 W ("Has_Completion", Flag26 (Id));
7365 W ("Has_Completion_In_Body", Flag71 (Id));
7366 W ("Has_Complex_Representation", Flag140 (Id));
7367 W ("Has_Component_Size_Clause", Flag68 (Id));
7368 W ("Has_Contiguous_Rep", Flag181 (Id));
7369 W ("Has_Controlled_Component", Flag43 (Id));
7370 W ("Has_Controlling_Result", Flag98 (Id));
7371 W ("Has_Convention_Pragma", Flag119 (Id));
7372 W ("Has_Default_Aspect", Flag39 (Id));
7373 W ("Has_Delayed_Aspects", Flag200 (Id));
7374 W ("Has_Delayed_Freeze", Flag18 (Id));
7375 W ("Has_Discriminants", Flag5 (Id));
7376 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7377 W ("Has_Exit", Flag47 (Id));
7378 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7379 W ("Has_Forward_Instantiation", Flag175 (Id));
7380 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7381 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7382 W ("Has_Homonym", Flag56 (Id));
7383 W ("Has_Inheritable_Invariants", Flag248 (Id));
7384 W ("Has_Initial_Value", Flag219 (Id));
7385 W ("Has_Invariants", Flag232 (Id));
7386 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7387 W ("Has_Master_Entity", Flag21 (Id));
7388 W ("Has_Missing_Return", Flag142 (Id));
7389 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7390 W ("Has_Non_Standard_Rep", Flag75 (Id));
7391 W ("Has_Object_Size_Clause", Flag172 (Id));
7392 W ("Has_Per_Object_Constraint", Flag154 (Id));
7393 W ("Has_Persistent_BSS", Flag188 (Id));
7394 W ("Has_Postconditions", Flag240 (Id));
7395 W ("Has_Pragma_Controlled", Flag27 (Id));
7396 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7397 W ("Has_Pragma_Inline", Flag157 (Id));
7398 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7399 W ("Has_Pragma_Ordered", Flag198 (Id));
7400 W ("Has_Pragma_Pack", Flag121 (Id));
7401 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7402 W ("Has_Pragma_Pure", Flag203 (Id));
7403 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7404 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7405 W ("Has_Pragma_Unmodified", Flag233 (Id));
7406 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7407 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7408 W ("Has_Predicates", Flag250 (Id));
7409 W ("Has_Primitive_Operations", Flag120 (Id));
7410 W ("Has_Private_Declaration", Flag155 (Id));
7411 W ("Has_Qualified_Name", Flag161 (Id));
7412 W ("Has_RACW", Flag214 (Id));
7413 W ("Has_Record_Rep_Clause", Flag65 (Id));
7414 W ("Has_Recursive_Call", Flag143 (Id));
7415 W ("Has_Size_Clause", Flag29 (Id));
7416 W ("Has_Small_Clause", Flag67 (Id));
7417 W ("Has_Specified_Layout", Flag100 (Id));
7418 W ("Has_Specified_Stream_Input", Flag190 (Id));
7419 W ("Has_Specified_Stream_Output", Flag191 (Id));
7420 W ("Has_Specified_Stream_Read", Flag192 (Id));
7421 W ("Has_Specified_Stream_Write", Flag193 (Id));
7422 W ("Has_Static_Discriminants", Flag211 (Id));
7423 W ("Has_Storage_Size_Clause", Flag23 (Id));
7424 W ("Has_Stream_Size_Clause", Flag184 (Id));
7425 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7426 W ("Has_Task", Flag30 (Id));
7427 W ("Has_Thunks", Flag228 (Id));
7428 W ("Has_Unchecked_Union", Flag123 (Id));
7429 W ("Has_Unknown_Discriminants", Flag72 (Id));
7430 W ("Has_Up_Level_Access", Flag215 (Id));
7431 W ("Has_Volatile_Components", Flag87 (Id));
7432 W ("Has_Xref_Entry", Flag182 (Id));
7433 W ("In_Package_Body", Flag48 (Id));
7434 W ("In_Private_Part", Flag45 (Id));
7435 W ("In_Use", Flag8 (Id));
7436 W ("Is_AST_Entry", Flag132 (Id));
7437 W ("Is_Abstract_Subprogram", Flag19 (Id));
7438 W ("Is_Abstract_Type", Flag146 (Id));
7439 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7440 W ("Is_Access_Constant", Flag69 (Id));
7441 W ("Is_Ada_2005_Only", Flag185 (Id));
7442 W ("Is_Ada_2012_Only", Flag199 (Id));
7443 W ("Is_Aliased", Flag15 (Id));
7444 W ("Is_Asynchronous", Flag81 (Id));
7445 W ("Is_Atomic", Flag85 (Id));
7446 W ("Is_Bit_Packed_Array", Flag122 (Id));
7447 W ("Is_CPP_Class", Flag74 (Id));
7448 W ("Is_Called", Flag102 (Id));
7449 W ("Is_Character_Type", Flag63 (Id));
7450 W ("Is_Child_Unit", Flag73 (Id));
7451 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7452 W ("Is_Compilation_Unit", Flag149 (Id));
7453 W ("Is_Completely_Hidden", Flag103 (Id));
7454 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7455 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7456 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7457 W ("Is_Constrained", Flag12 (Id));
7458 W ("Is_Constructor", Flag76 (Id));
7459 W ("Is_Controlled", Flag42 (Id));
7460 W ("Is_Controlling_Formal", Flag97 (Id));
7461 W ("Is_Descendent_Of_Address", Flag223 (Id));
7462 W ("Is_Discrim_SO_Function", Flag176 (Id));
7463 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7464 W ("Is_Dispatching_Operation", Flag6 (Id));
7465 W ("Is_Eliminated", Flag124 (Id));
7466 W ("Is_Entry_Formal", Flag52 (Id));
7467 W ("Is_Exported", Flag99 (Id));
7468 W ("Is_First_Subtype", Flag70 (Id));
7469 W ("Is_For_Access_Subtype", Flag118 (Id));
7470 W ("Is_Formal_Subprogram", Flag111 (Id));
7471 W ("Is_Frozen", Flag4 (Id));
7472 W ("Is_Generic_Actual_Type", Flag94 (Id));
7473 W ("Is_Generic_Instance", Flag130 (Id));
7474 W ("Is_Generic_Type", Flag13 (Id));
7475 W ("Is_Hidden", Flag57 (Id));
7476 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7477 W ("Is_Immediately_Visible", Flag7 (Id));
7478 W ("Is_Imported", Flag24 (Id));
7479 W ("Is_Inlined", Flag11 (Id));
7480 W ("Is_Instantiated", Flag126 (Id));
7481 W ("Is_Interface", Flag186 (Id));
7482 W ("Is_Internal", Flag17 (Id));
7483 W ("Is_Interrupt_Handler", Flag89 (Id));
7484 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7485 W ("Is_Itype", Flag91 (Id));
7486 W ("Is_Known_Non_Null", Flag37 (Id));
7487 W ("Is_Known_Null", Flag204 (Id));
7488 W ("Is_Known_Valid", Flag170 (Id));
7489 W ("Is_Limited_Composite", Flag106 (Id));
7490 W ("Is_Limited_Interface", Flag197 (Id));
7491 W ("Is_Limited_Record", Flag25 (Id));
7492 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7493 W ("Is_Non_Static_Subtype", Flag109 (Id));
7494 W ("Is_Null_Init_Proc", Flag178 (Id));
7495 W ("Is_Obsolescent", Flag153 (Id));
7496 W ("Is_Only_Out_Parameter", Flag226 (Id));
7497 W ("Is_Optional_Parameter", Flag134 (Id));
7498 W ("Is_Package_Body_Entity", Flag160 (Id));
7499 W ("Is_Packed", Flag51 (Id));
7500 W ("Is_Packed_Array_Type", Flag138 (Id));
7501 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7502 W ("Is_Preelaborated", Flag59 (Id));
7503 W ("Is_Primitive", Flag218 (Id));
7504 W ("Is_Primitive_Wrapper", Flag195 (Id));
7505 W ("Is_Private_Composite", Flag107 (Id));
7506 W ("Is_Private_Descendant", Flag53 (Id));
7507 W ("Is_Private_Primitive", Flag245 (Id));
7508 W ("Is_Public", Flag10 (Id));
7509 W ("Is_Pure", Flag44 (Id));
7510 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7511 W ("Is_RACW_Stub_Type", Flag244 (Id));
7512 W ("Is_Raised", Flag224 (Id));
7513 W ("Is_Remote_Call_Interface", Flag62 (Id));
7514 W ("Is_Remote_Types", Flag61 (Id));
7515 W ("Is_Renaming_Of_Object", Flag112 (Id));
7516 W ("Is_Return_Object", Flag209 (Id));
7517 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7518 W ("Is_Shared_Passive", Flag60 (Id));
7519 W ("Is_Statically_Allocated", Flag28 (Id));
7520 W ("Is_Tag", Flag78 (Id));
7521 W ("Is_Tagged_Type", Flag55 (Id));
7522 W ("Is_Thunk", Flag225 (Id));
7523 W ("Is_Trivial_Subprogram", Flag235 (Id));
7524 W ("Is_True_Constant", Flag163 (Id));
7525 W ("Is_Unchecked_Union", Flag117 (Id));
7526 W ("Is_Underlying_Record_View", Flag246 (Id));
7527 W ("Is_Unsigned_Type", Flag144 (Id));
7528 W ("Is_VMS_Exception", Flag133 (Id));
7529 W ("Is_Valued_Procedure", Flag127 (Id));
7530 W ("Is_Visible_Child_Unit", Flag116 (Id));
7531 W ("Is_Visible_Formal", Flag206 (Id));
7532 W ("Is_Volatile", Flag16 (Id));
7533 W ("Itype_Printed", Flag202 (Id));
7534 W ("Kill_Elaboration_Checks", Flag32 (Id));
7535 W ("Kill_Range_Checks", Flag33 (Id));
7536 W ("Kill_Tag_Checks", Flag34 (Id));
7537 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7538 W ("Low_Bound_Tested", Flag205 (Id));
7539 W ("Machine_Radix_10", Flag84 (Id));
7540 W ("Materialize_Entity", Flag168 (Id));
7541 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7542 W ("Must_Have_Preelab_Init", Flag208 (Id));
7543 W ("Needs_Debug_Info", Flag147 (Id));
7544 W ("Needs_No_Actuals", Flag22 (Id));
7545 W ("Never_Set_In_Source", Flag115 (Id));
7546 W ("No_Pool_Assigned", Flag131 (Id));
7547 W ("No_Return", Flag113 (Id));
7548 W ("No_Strict_Aliasing", Flag136 (Id));
7549 W ("Non_Binary_Modulus", Flag58 (Id));
7550 W ("Nonzero_Is_True", Flag162 (Id));
7551 W ("OK_To_Rename", Flag247 (Id));
7552 W ("OK_To_Reorder_Components", Flag239 (Id));
7553 W ("Optimize_Alignment_Space", Flag241 (Id));
7554 W ("Optimize_Alignment_Time", Flag242 (Id));
7555 W ("Overlays_Constant", Flag243 (Id));
7556 W ("Reachable", Flag49 (Id));
7557 W ("Referenced", Flag156 (Id));
7558 W ("Referenced_As_LHS", Flag36 (Id));
7559 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7560 W ("Renamed_In_Spec", Flag231 (Id));
7561 W ("Requires_Overriding", Flag213 (Id));
7562 W ("Return_Present", Flag54 (Id));
7563 W ("Returns_By_Ref", Flag90 (Id));
7564 W ("Reverse_Bit_Order", Flag164 (Id));
7565 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7566 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7567 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7568 W ("Static_Elaboration_Desired", Flag77 (Id));
7569 W ("Strict_Alignment", Flag145 (Id));
7570 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7571 W ("Suppress_Initialization", Flag105 (Id));
7572 W ("Suppress_Style_Checks", Flag165 (Id));
7573 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7574 W ("Treat_As_Volatile", Flag41 (Id));
7575 W ("Universal_Aliasing", Flag216 (Id));
7576 W ("Used_As_Generic_Actual", Flag222 (Id));
7577 W ("Uses_Sec_Stack", Flag95 (Id));
7578 W ("Warnings_Off", Flag96 (Id));
7579 W ("Warnings_Off_Used", Flag236 (Id));
7580 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7581 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7582 W ("Was_Hidden", Flag196 (Id));
7583 end Write_Entity_Flags;
7585 -----------------------
7586 -- Write_Entity_Info --
7587 -----------------------
7589 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7591 procedure Write_Attribute (Which : String; Nam : E);
7592 -- Write attribute value with given string name
7594 procedure Write_Kind (Id : Entity_Id);
7595 -- Write Ekind field of entity
7597 ---------------------
7598 -- Write_Attribute --
7599 ---------------------
7601 procedure Write_Attribute (Which : String; Nam : E) is
7605 Write_Int (Int (Nam));
7607 Write_Name (Chars (Nam));
7609 end Write_Attribute;
7615 procedure Write_Kind (Id : Entity_Id) is
7616 K : constant String := Entity_Kind'Image (Ekind (Id));
7620 Write_Str (" Kind ");
7622 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7623 Write_Str ("TAGGED ");
7626 Write_Str (K (3 .. K'Length));
7629 if Is_Type (Id) and then Depends_On_Private (Id) then
7630 Write_Str ("Depends_On_Private ");
7634 -- Start of processing for Write_Entity_Info
7638 Write_Attribute ("Name ", Id);
7639 Write_Int (Int (Id));
7643 Write_Attribute (" Type ", Etype (Id));
7645 Write_Attribute (" Scope ", Scope (Id));
7650 when Discrete_Kind =>
7651 Write_Str ("Bounds: Id = ");
7653 if Present (Scalar_Range (Id)) then
7654 Write_Int (Int (Type_Low_Bound (Id)));
7655 Write_Str (" .. Id = ");
7656 Write_Int (Int (Type_High_Bound (Id)));
7658 Write_Str ("Empty");
7669 (" Component Type ", Component_Type (Id));
7672 Write_Str (" Indexes ");
7674 Index := First_Index (Id);
7675 while Present (Index) loop
7676 Write_Attribute (" ", Etype (Index));
7677 Index := Next_Index (Index);
7685 (" Directly Designated Type ",
7686 Directly_Designated_Type (Id));
7689 when Overloadable_Kind =>
7690 if Present (Homonym (Id)) then
7691 Write_Str (" Homonym ");
7692 Write_Name (Chars (Homonym (Id)));
7694 Write_Int (Int (Homonym (Id)));
7701 if Ekind (Scope (Id)) in Record_Kind then
7703 " Original_Record_Component ",
7704 Original_Record_Component (Id));
7705 Write_Int (Int (Original_Record_Component (Id)));
7709 when others => null;
7711 end Write_Entity_Info;
7713 -----------------------
7714 -- Write_Field6_Name --
7715 -----------------------
7717 procedure Write_Field6_Name (Id : Entity_Id) is
7718 pragma Warnings (Off, Id);
7720 Write_Str ("First_Rep_Item");
7721 end Write_Field6_Name;
7723 -----------------------
7724 -- Write_Field7_Name --
7725 -----------------------
7727 procedure Write_Field7_Name (Id : Entity_Id) is
7728 pragma Warnings (Off, Id);
7730 Write_Str ("Freeze_Node");
7731 end Write_Field7_Name;
7733 -----------------------
7734 -- Write_Field8_Name --
7735 -----------------------
7737 procedure Write_Field8_Name (Id : Entity_Id) is
7742 Write_Str ("Normalized_First_Bit");
7746 E_Subprogram_Body =>
7747 Write_Str ("Mechanism");
7750 Write_Str ("Associated_Node_For_Itype");
7753 Write_Str ("First_Exit_Statement");
7756 Write_Str ("Dependent_Instances");
7759 Write_Str ("Postcondition_Proc");
7761 when E_Return_Statement =>
7762 Write_Str ("Return_Applies_To");
7765 Write_Str ("Hiding_Loop_Variable");
7768 Write_Str ("Field8??");
7770 end Write_Field8_Name;
7772 -----------------------
7773 -- Write_Field9_Name --
7774 -----------------------
7776 procedure Write_Field9_Name (Id : Entity_Id) is
7780 Write_Str ("Class_Wide_Type");
7783 E_Generic_Function |
7785 E_Generic_Procedure |
7788 Write_Str ("Renaming_Map");
7791 Write_Str ("Current_Value");
7794 Write_Str ("Field9??");
7796 end Write_Field9_Name;
7798 ------------------------
7799 -- Write_Field10_Name --
7800 ------------------------
7802 procedure Write_Field10_Name (Id : Entity_Id) is
7805 when Class_Wide_Kind |
7811 Write_Str ("Direct_Primitive_Operations");
7814 Write_Str ("Float_Rep");
7816 when E_In_Parameter |
7818 Write_Str ("Discriminal_Link");
7824 Write_Str ("Handler_Records");
7828 Write_Str ("Normalized_Position_Max");
7831 Write_Str ("Field10??");
7833 end Write_Field10_Name;
7835 ------------------------
7836 -- Write_Field11_Name --
7837 ------------------------
7839 procedure Write_Field11_Name (Id : Entity_Id) is
7843 Write_Str ("Entry_Component");
7847 Write_Str ("Component_Bit_Offset");
7850 Write_Str ("Full_View");
7852 when E_Enumeration_Literal =>
7853 Write_Str ("Enumeration_Pos");
7856 Write_Str ("Block_Node");
7862 Write_Str ("Protected_Body_Subprogram");
7864 when E_Generic_Package =>
7865 Write_Str ("Generic_Homonym");
7868 Write_Str ("Full_View");
7871 Write_Str ("Field11??");
7873 end Write_Field11_Name;
7875 ------------------------
7876 -- Write_Field12_Name --
7877 ------------------------
7879 procedure Write_Field12_Name (Id : Entity_Id) is
7883 Write_Str ("Barrier_Function");
7885 when E_Enumeration_Literal =>
7886 Write_Str ("Enumeration_Rep");
7894 E_In_Out_Parameter |
7898 Write_Str ("Esize");
7902 Write_Str ("Next_Inlined_Subprogram");
7905 Write_Str ("Associated_Formal_Package");
7908 Write_Str ("Field12??");
7910 end Write_Field12_Name;
7912 ------------------------
7913 -- Write_Field13_Name --
7914 ------------------------
7916 procedure Write_Field13_Name (Id : Entity_Id) is
7920 Write_Str ("RM_Size");
7924 Write_Str ("Component_Clause");
7927 if not Comes_From_Source (Id)
7929 Chars (Id) = Name_Op_Ne
7931 Write_Str ("Corresponding_Equality");
7933 elsif Comes_From_Source (Id) then
7934 Write_Str ("Elaboration_Entity");
7937 Write_Str ("Field13??");
7942 Write_Str ("Extra_Accessibility");
7946 Generic_Unit_Kind =>
7947 Write_Str ("Elaboration_Entity");
7950 Write_Str ("Field13??");
7952 end Write_Field13_Name;
7954 -----------------------
7955 -- Write_Field14_Name --
7956 -----------------------
7958 procedure Write_Field14_Name (Id : Entity_Id) is
7967 Write_Str ("Alignment");
7971 Write_Str ("Normalized_Position");
7975 Write_Str ("First_Optional_Parameter");
7978 E_Generic_Package =>
7979 Write_Str ("Shadow_Entities");
7982 Write_Str ("Field14??");
7984 end Write_Field14_Name;
7986 ------------------------
7987 -- Write_Field15_Name --
7988 ------------------------
7990 procedure Write_Field15_Name (Id : Entity_Id) is
7995 Write_Str ("Storage_Size_Variable");
7998 Write_Str ("DT_Entry_Count");
8000 when Decimal_Fixed_Point_Kind =>
8001 Write_Str ("Scale_Value");
8003 when E_Discriminant =>
8004 Write_Str ("Discriminant_Number");
8007 Write_Str ("Extra_Formal");
8011 Write_Str ("DT_Position");
8014 Write_Str ("Entry_Parameters_Type");
8016 when Enumeration_Kind =>
8017 Write_Str ("Lit_Indexes");
8021 Write_Str ("Related_Instance");
8023 when E_Protected_Type =>
8024 Write_Str ("Entry_Bodies_Array");
8026 when E_String_Literal_Subtype =>
8027 Write_Str ("String_Literal_Low_Bound");
8030 Write_Str ("Field15??");
8032 end Write_Field15_Name;
8034 ------------------------
8035 -- Write_Field16_Name --
8036 ------------------------
8038 procedure Write_Field16_Name (Id : Entity_Id) is
8042 Write_Str ("Entry_Formal");
8046 Write_Str ("DTC_Entity");
8051 Write_Str ("First_Private_Entity");
8053 when E_Record_Type |
8054 E_Record_Type_With_Private =>
8055 Write_Str ("Access_Disp_Table");
8057 when E_String_Literal_Subtype =>
8058 Write_Str ("String_Literal_Length");
8060 when Enumeration_Kind =>
8061 Write_Str ("Lit_Strings");
8065 Write_Str ("Unset_Reference");
8067 when E_Record_Subtype |
8068 E_Class_Wide_Subtype =>
8069 Write_Str ("Cloned_Subtype");
8072 Write_Str ("Field16??");
8074 end Write_Field16_Name;
8076 ------------------------
8077 -- Write_Field17_Name --
8078 ------------------------
8080 procedure Write_Field17_Name (Id : Entity_Id) is
8084 Write_Str ("Digits_Value");
8087 Write_Str ("Prival");
8089 when E_Discriminant =>
8090 Write_Str ("Discriminal");
8099 E_Generic_Function |
8101 E_Generic_Procedure |
8109 E_Return_Statement |
8111 E_Subprogram_Type =>
8112 Write_Str ("First_Entity");
8115 Write_Str ("First_Index");
8117 when Enumeration_Kind =>
8118 Write_Str ("First_Literal");
8121 Write_Str ("Master_Id");
8123 when Modular_Integer_Kind =>
8124 Write_Str ("Modulus");
8128 E_Generic_In_Out_Parameter |
8130 Write_Str ("Actual_Subtype");
8132 when E_Incomplete_Type =>
8133 Write_Str ("Non_Limited_View");
8135 when E_Incomplete_Subtype =>
8136 if From_With_Type (Id) then
8137 Write_Str ("Non_Limited_View");
8141 Write_Str ("Field17??");
8143 end Write_Field17_Name;
8145 ------------------------
8146 -- Write_Field18_Name --
8147 ------------------------
8149 procedure Write_Field18_Name (Id : Entity_Id) is
8152 when E_Enumeration_Literal |
8156 Write_Str ("Alias");
8158 when E_Record_Type =>
8159 Write_Str ("Corresponding_Concurrent_Type");
8161 when E_Subprogram_Body =>
8162 Write_Str ("Corresponding_Protected_Entry");
8164 when E_Entry_Index_Parameter =>
8165 Write_Str ("Entry_Index_Constant");
8167 when E_Class_Wide_Subtype |
8168 E_Access_Protected_Subprogram_Type |
8169 E_Anonymous_Access_Protected_Subprogram_Type |
8170 E_Access_Subprogram_Type |
8172 Write_Str ("Equivalent_Type");
8174 when Fixed_Point_Kind =>
8175 Write_Str ("Delta_Value");
8178 Write_Str ("Renamed_Object");
8182 E_Generic_Function |
8183 E_Generic_Procedure |
8184 E_Generic_Package =>
8185 Write_Str ("Renamed_Entity");
8187 when Incomplete_Or_Private_Kind |
8189 Write_Str ("Private_Dependents");
8191 when Concurrent_Kind =>
8192 Write_Str ("Corresponding_Record_Type");
8197 Write_Str ("Enclosing_Scope");
8200 Write_Str ("Field18??");
8202 end Write_Field18_Name;
8204 -----------------------
8205 -- Write_Field19_Name --
8206 -----------------------
8208 procedure Write_Field19_Name (Id : Entity_Id) is
8213 Write_Str ("Related_Array_Object");
8219 E_Return_Statement |
8221 Write_Str ("Finalization_Chain_Entity");
8223 when E_Constant | E_Variable =>
8224 Write_Str ("Size_Check_Code");
8226 when E_Discriminant =>
8227 Write_Str ("Corresponding_Discriminant");
8230 E_Generic_Package =>
8231 Write_Str ("Body_Entity");
8233 when E_Package_Body |
8235 Write_Str ("Spec_Entity");
8237 when Private_Kind =>
8238 Write_Str ("Underlying_Full_View");
8240 when E_Record_Type =>
8241 Write_Str ("Parent_Subtype");
8244 Write_Str ("Field19??");
8246 end Write_Field19_Name;
8248 -----------------------
8249 -- Write_Field20_Name --
8250 -----------------------
8252 procedure Write_Field20_Name (Id : Entity_Id) is
8256 Write_Str ("Component_Type");
8258 when E_In_Parameter |
8259 E_Generic_In_Parameter =>
8260 Write_Str ("Default_Value");
8263 Write_Str ("Directly_Designated_Type");
8266 Write_Str ("Discriminant_Checking_Func");
8270 Write_Str ("Prival_Link");
8272 when E_Discriminant =>
8273 Write_Str ("Discriminant_Default_Value");
8282 E_Generic_Function |
8284 E_Generic_Procedure |
8292 E_Return_Statement |
8294 E_Subprogram_Type =>
8295 Write_Str ("Last_Entity");
8298 Write_Str ("Scalar_Range");
8301 Write_Str ("Register_Exception_Call");
8304 Write_Str ("Field20??");
8306 end Write_Field20_Name;
8308 -----------------------
8309 -- Write_Field21_Name --
8310 -----------------------
8312 procedure Write_Field21_Name (Id : Entity_Id) is
8318 E_Generic_Function |
8320 E_Generic_Procedure |
8322 Write_Str ("Interface_Name");
8324 when Concurrent_Kind |
8325 Incomplete_Or_Private_Kind |
8329 Write_Str ("Discriminant_Constraint");
8332 Write_Str ("Accept_Address");
8334 when Fixed_Point_Kind =>
8335 Write_Str ("Small_Value");
8337 when E_In_Parameter =>
8338 Write_Str ("Default_Expr_Function");
8341 Modular_Integer_Kind =>
8342 Write_Str ("Original_Array_Type");
8345 Write_Str ("Field21??");
8347 end Write_Field21_Name;
8349 -----------------------
8350 -- Write_Field22_Name --
8351 -----------------------
8353 procedure Write_Field22_Name (Id : Entity_Id) is
8357 Write_Str ("Associated_Storage_Pool");
8360 Write_Str ("Component_Size");
8364 Write_Str ("Original_Record_Component");
8366 when E_Enumeration_Literal =>
8367 Write_Str ("Enumeration_Rep_Expr");
8370 Write_Str ("Exception_Code");
8373 Write_Str ("Protected_Formal");
8375 when E_Record_Type =>
8376 Write_Str ("Corresponding_Remote_Type");
8386 E_Generic_Function |
8387 E_Generic_Procedure |
8390 E_Return_Statement |
8393 Write_Str ("Scope_Depth_Value");
8395 when E_Record_Type_With_Private |
8396 E_Record_Subtype_With_Private |
8399 E_Limited_Private_Type |
8400 E_Limited_Private_Subtype =>
8401 Write_Str ("Private_View");
8404 Write_Str ("Shared_Var_Procs_Instance");
8407 Write_Str ("Field22??");
8409 end Write_Field22_Name;
8411 ------------------------
8412 -- Write_Field23_Name --
8413 ------------------------
8415 procedure Write_Field23_Name (Id : Entity_Id) is
8419 Write_Str ("Associated_Final_Chain");
8422 Write_Str ("Packed_Array_Type");
8425 Write_Str ("Entry_Cancel_Parameter");
8427 when E_Discriminant =>
8428 Write_Str ("CR_Discriminant");
8430 when E_Enumeration_Type =>
8431 Write_Str ("Enum_Pos_To_Rep");
8435 Write_Str ("Extra_Constrained");
8437 when E_Generic_Function |
8439 E_Generic_Procedure =>
8440 Write_Str ("Inner_Instances");
8442 when Concurrent_Kind |
8443 Incomplete_Or_Private_Kind |
8447 Write_Str ("Stored_Constraint");
8451 if Present (Scope (Id))
8452 and then Is_Protected_Type (Scope (Id))
8454 Write_Str ("Protection_Object");
8456 Write_Str ("Generic_Renamings");
8460 if Is_Generic_Instance (Id) then
8461 Write_Str ("Generic_Renamings");
8463 Write_Str ("Limited_View");
8467 Write_Str ("Protection_Object");
8470 Write_Str ("Field23??");
8472 end Write_Field23_Name;
8474 ------------------------
8475 -- Write_Field24_Name --
8476 ------------------------
8478 procedure Write_Field24_Name (Id : Entity_Id) is
8481 when Subprogram_Kind =>
8482 Write_Str ("Spec_PPC_List");
8484 when E_Variable | E_Constant | Type_Kind =>
8485 Write_Str ("Related_Expression");
8488 Write_Str ("Field24???");
8490 end Write_Field24_Name;
8492 ------------------------
8493 -- Write_Field25_Name --
8494 ------------------------
8496 procedure Write_Field25_Name (Id : Entity_Id) is
8500 Write_Str ("DT_Offset_To_Top_Func");
8504 Write_Str ("Interface_Alias");
8506 when E_Record_Type |
8508 E_Record_Type_With_Private |
8509 E_Record_Subtype_With_Private =>
8510 Write_Str ("Interfaces");
8513 Write_Str ("Task_Body_Procedure");
8516 Write_Str ("Debug_Renaming_Link");
8520 Write_Str ("PPC_Wrapper");
8522 when E_Enumeration_Subtype |
8523 E_Modular_Integer_Subtype |
8524 E_Signed_Integer_Subtype =>
8525 Write_Str ("Static_Predicate");
8528 Write_Str ("Field25??");
8530 end Write_Field25_Name;
8532 ------------------------
8533 -- Write_Field26_Name --
8534 ------------------------
8536 procedure Write_Field26_Name (Id : Entity_Id) is
8539 when E_Access_Subprogram_Type =>
8540 Write_Str ("Original_Access_Type");
8542 when E_Generic_Package |
8544 Write_Str ("Package_Instantiation");
8548 if Ekind (Id) = E_Procedure
8549 and then not Is_Dispatching_Operation (Id)
8551 Write_Str ("Static_Initialization");
8553 Write_Str ("Overridden_Operation");
8556 when E_Record_Type |
8557 E_Record_Type_With_Private =>
8558 Write_Str ("Dispatch_Table_Wrappers");
8560 when E_In_Out_Parameter |
8563 Write_Str ("Last_Assignment");
8566 Write_Str ("Relative_Deadline_Variable");
8569 Write_Str ("Field26??");
8571 end Write_Field26_Name;
8573 ------------------------
8574 -- Write_Field27_Name --
8575 ------------------------
8577 procedure Write_Field27_Name (Id : Entity_Id) is
8583 Write_Str ("Related_Type");
8586 Write_Str ("Wrapped_Entity");
8588 when E_Package | Type_Kind =>
8589 Write_Str ("Current_Use_Clause");
8592 Write_Str ("Field27??");
8594 end Write_Field27_Name;
8596 ------------------------
8597 -- Write_Field28_Name --
8598 ------------------------
8600 procedure Write_Field28_Name (Id : Entity_Id) is
8603 when E_Procedure | E_Function | E_Entry =>
8604 Write_Str ("Extra_Formals");
8606 when E_Record_Type =>
8607 Write_Str ("Underlying_Record_View");
8610 Write_Str ("Field28??");
8612 end Write_Field28_Name;
8614 procedure Write_Field29_Name (Id : Entity_Id) is
8618 Write_Str ("Subprograms_For_Type");
8621 Write_Str ("Field29??");
8623 end Write_Field29_Name;
8625 -------------------------
8626 -- Iterator Procedures --
8627 -------------------------
8629 procedure Proc_Next_Component (N : in out Node_Id) is
8631 N := Next_Component (N);
8632 end Proc_Next_Component;
8634 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8636 N := Next_Entity (N);
8637 while Present (N) loop
8638 exit when Ekind_In (N, E_Component, E_Discriminant);
8639 N := Next_Entity (N);
8641 end Proc_Next_Component_Or_Discriminant;
8643 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8645 N := Next_Discriminant (N);
8646 end Proc_Next_Discriminant;
8648 procedure Proc_Next_Formal (N : in out Node_Id) is
8650 N := Next_Formal (N);
8651 end Proc_Next_Formal;
8653 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8655 N := Next_Formal_With_Extras (N);
8656 end Proc_Next_Formal_With_Extras;
8658 procedure Proc_Next_Index (N : in out Node_Id) is
8660 N := Next_Index (N);
8661 end Proc_Next_Index;
8663 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8665 N := Next_Inlined_Subprogram (N);
8666 end Proc_Next_Inlined_Subprogram;
8668 procedure Proc_Next_Literal (N : in out Node_Id) is
8670 N := Next_Literal (N);
8671 end Proc_Next_Literal;
8673 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8675 N := Next_Stored_Discriminant (N);
8676 end Proc_Next_Stored_Discriminant;