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 -- Overridden_Operation Node26
224 -- Package_Instantiation Node26
225 -- Relative_Deadline_Variable Node26
226 -- Static_Initialization Node26
228 -- Current_Use_Clause Node27
229 -- Related_Type Node27
230 -- Wrapped_Entity Node27
232 -- Extra_Formals Node28
233 -- Underlying_Record_View Node28
235 -- Subprograms_For_Type Node29
237 ---------------------------------------------
238 -- Usage of Flags in Defining Entity Nodes --
239 ---------------------------------------------
241 -- All flags are unique, there is no overlaying, so each flag is physically
242 -- present in every entity. However, for many of the flags, it only makes
243 -- sense for them to be set true for certain subsets of entity kinds. See
244 -- the spec of Einfo for further details.
246 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
249 -- Has_Discriminants Flag5
250 -- Is_Dispatching_Operation Flag6
251 -- Is_Immediately_Visible Flag7
253 -- Is_Potentially_Use_Visible Flag9
257 -- Is_Constrained Flag12
258 -- Is_Generic_Type Flag13
259 -- Depends_On_Private Flag14
261 -- Is_Volatile Flag16
262 -- Is_Internal Flag17
263 -- Has_Delayed_Freeze Flag18
264 -- Is_Abstract_Subprogram Flag19
265 -- Is_Concurrent_Record_Type Flag20
267 -- Has_Master_Entity Flag21
268 -- Needs_No_Actuals Flag22
269 -- Has_Storage_Size_Clause Flag23
270 -- Is_Imported Flag24
271 -- Is_Limited_Record Flag25
272 -- Has_Completion Flag26
273 -- Has_Pragma_Controlled Flag27
274 -- Is_Statically_Allocated Flag28
275 -- Has_Size_Clause Flag29
278 -- Checks_May_Be_Suppressed Flag31
279 -- Kill_Elaboration_Checks Flag32
280 -- Kill_Range_Checks Flag33
281 -- Kill_Tag_Checks Flag34
282 -- Is_Class_Wide_Equivalent_Type Flag35
283 -- Referenced_As_LHS Flag36
284 -- Is_Known_Non_Null Flag37
285 -- Can_Never_Be_Null Flag38
286 -- Body_Needed_For_SAL Flag40
288 -- Treat_As_Volatile Flag41
289 -- Is_Controlled Flag42
290 -- Has_Controlled_Component Flag43
292 -- In_Private_Part Flag45
293 -- Has_Alignment_Clause Flag46
295 -- In_Package_Body Flag48
297 -- Delay_Subprogram_Descriptors Flag50
300 -- Is_Entry_Formal Flag52
301 -- Is_Private_Descendant Flag53
302 -- Return_Present Flag54
303 -- Is_Tagged_Type Flag55
304 -- Has_Homonym Flag56
306 -- Non_Binary_Modulus Flag58
307 -- Is_Preelaborated Flag59
308 -- Is_Shared_Passive Flag60
310 -- Is_Remote_Types Flag61
311 -- Is_Remote_Call_Interface Flag62
312 -- Is_Character_Type Flag63
313 -- Is_Intrinsic_Subprogram Flag64
314 -- Has_Record_Rep_Clause Flag65
315 -- Has_Enumeration_Rep_Clause Flag66
316 -- Has_Small_Clause Flag67
317 -- Has_Component_Size_Clause Flag68
318 -- Is_Access_Constant Flag69
319 -- Is_First_Subtype Flag70
321 -- Has_Completion_In_Body Flag71
322 -- Has_Unknown_Discriminants Flag72
323 -- Is_Child_Unit Flag73
324 -- Is_CPP_Class Flag74
325 -- Has_Non_Standard_Rep Flag75
326 -- Is_Constructor Flag76
327 -- Static_Elaboration_Desired Flag77
329 -- Has_All_Calls_Remote Flag79
330 -- Is_Constr_Subt_For_U_Nominal Flag80
332 -- Is_Asynchronous Flag81
333 -- Has_Gigi_Rep_Item Flag82
334 -- Has_Machine_Radix_Clause Flag83
335 -- Machine_Radix_10 Flag84
337 -- Has_Atomic_Components Flag86
338 -- Has_Volatile_Components Flag87
339 -- Discard_Names Flag88
340 -- Is_Interrupt_Handler Flag89
341 -- Returns_By_Ref Flag90
344 -- Size_Known_At_Compile_Time Flag92
345 -- Has_Subprogram_Descriptor Flag93
346 -- Is_Generic_Actual_Type Flag94
347 -- Uses_Sec_Stack Flag95
348 -- Warnings_Off Flag96
349 -- Is_Controlling_Formal Flag97
350 -- Has_Controlling_Result Flag98
351 -- Is_Exported Flag99
352 -- Has_Specified_Layout Flag100
354 -- Has_Nested_Block_With_Handler Flag101
356 -- Is_Completely_Hidden Flag103
357 -- Address_Taken Flag104
358 -- Suppress_Init_Proc Flag105
359 -- Is_Limited_Composite Flag106
360 -- Is_Private_Composite Flag107
361 -- Default_Expressions_Processed Flag108
362 -- Is_Non_Static_Subtype Flag109
363 -- Has_External_Tag_Rep_Clause Flag110
365 -- Is_Formal_Subprogram Flag111
366 -- Is_Renaming_Of_Object Flag112
368 -- Delay_Cleanups Flag114
369 -- Never_Set_In_Source Flag115
370 -- Is_Visible_Child_Unit Flag116
371 -- Is_Unchecked_Union Flag117
372 -- Is_For_Access_Subtype Flag118
373 -- Has_Convention_Pragma Flag119
374 -- Has_Primitive_Operations Flag120
376 -- Has_Pragma_Pack Flag121
377 -- Is_Bit_Packed_Array Flag122
378 -- Has_Unchecked_Union Flag123
379 -- Is_Eliminated Flag124
380 -- C_Pass_By_Copy Flag125
381 -- Is_Instantiated Flag126
382 -- Is_Valued_Procedure Flag127
383 -- (used for Component_Alignment) Flag128
384 -- (used for Component_Alignment) Flag129
385 -- Is_Generic_Instance Flag130
387 -- No_Pool_Assigned Flag131
388 -- Is_AST_Entry Flag132
389 -- Is_VMS_Exception Flag133
390 -- Is_Optional_Parameter Flag134
391 -- Has_Aliased_Components Flag135
392 -- No_Strict_Aliasing Flag136
393 -- Is_Machine_Code_Subprogram Flag137
394 -- Is_Packed_Array_Type Flag138
395 -- Has_Biased_Representation Flag139
396 -- Has_Complex_Representation Flag140
398 -- Is_Constr_Subt_For_UN_Aliased Flag141
399 -- Has_Missing_Return Flag142
400 -- Has_Recursive_Call Flag143
401 -- Is_Unsigned_Type Flag144
402 -- Strict_Alignment Flag145
403 -- Is_Abstract_Type Flag146
404 -- Needs_Debug_Info Flag147
405 -- Suppress_Elaboration_Warnings Flag148
406 -- Is_Compilation_Unit Flag149
407 -- Has_Pragma_Elaborate_Body Flag150
409 -- Entry_Accepted Flag152
410 -- Is_Obsolescent Flag153
411 -- Has_Per_Object_Constraint Flag154
412 -- Has_Private_Declaration Flag155
413 -- Referenced Flag156
414 -- Has_Pragma_Inline Flag157
415 -- Finalize_Storage_Only Flag158
416 -- From_With_Type Flag159
417 -- Is_Package_Body_Entity Flag160
419 -- Has_Qualified_Name Flag161
420 -- Nonzero_Is_True Flag162
421 -- Is_True_Constant Flag163
422 -- Reverse_Bit_Order Flag164
423 -- Suppress_Style_Checks Flag165
424 -- Debug_Info_Off Flag166
425 -- Sec_Stack_Needed_For_Return Flag167
426 -- Materialize_Entity Flag168
427 -- Has_Pragma_Thread_Local_Storage Flag169
428 -- Is_Known_Valid Flag170
430 -- Is_Hidden_Open_Scope Flag171
431 -- Has_Object_Size_Clause Flag172
432 -- Has_Fully_Qualified_Name Flag173
433 -- Elaboration_Entity_Required Flag174
434 -- Has_Forward_Instantiation Flag175
435 -- Is_Discrim_SO_Function Flag176
436 -- Size_Depends_On_Discriminant Flag177
437 -- Is_Null_Init_Proc Flag178
438 -- Has_Pragma_Pure_Function Flag179
439 -- Has_Pragma_Unreferenced Flag180
441 -- Has_Contiguous_Rep Flag181
442 -- Has_Xref_Entry Flag182
443 -- Must_Be_On_Byte_Boundary Flag183
444 -- Has_Stream_Size_Clause Flag184
445 -- Is_Ada_2005_Only Flag185
446 -- Is_Interface Flag186
447 -- Has_Constrained_Partial_View Flag187
448 -- Has_Persistent_BSS Flag188
449 -- Is_Pure_Unit_Access_Type Flag189
450 -- Has_Specified_Stream_Input Flag190
452 -- Has_Specified_Stream_Output Flag191
453 -- Has_Specified_Stream_Read Flag192
454 -- Has_Specified_Stream_Write Flag193
455 -- Is_Local_Anonymous_Access Flag194
456 -- Is_Primitive_Wrapper Flag195
457 -- Was_Hidden Flag196
458 -- Is_Limited_Interface Flag197
459 -- Has_Pragma_Ordered Flag198
460 -- Is_Ada_2012_Only Flag199
462 -- Has_Delayed_Aspects Flag200
463 -- Has_Anon_Block_Suffix Flag201
464 -- Itype_Printed Flag202
465 -- Has_Pragma_Pure Flag203
466 -- Is_Known_Null Flag204
467 -- Low_Bound_Tested Flag205
468 -- Is_Visible_Formal Flag206
469 -- Known_To_Have_Preelab_Init Flag207
470 -- Must_Have_Preelab_Init Flag208
471 -- Is_Return_Object Flag209
472 -- Elaborate_Body_Desirable Flag210
474 -- Has_Static_Discriminants Flag211
475 -- Has_Pragma_Unreferenced_Objects Flag212
476 -- Requires_Overriding Flag213
478 -- Has_Up_Level_Access Flag215
479 -- Universal_Aliasing Flag216
480 -- Suppress_Value_Tracking_On_Call Flag217
481 -- Is_Primitive Flag218
482 -- Has_Initial_Value Flag219
483 -- Has_Dispatch_Table Flag220
485 -- Has_Pragma_Preelab_Init Flag221
486 -- Used_As_Generic_Actual Flag222
487 -- Is_Descendent_Of_Address Flag223
490 -- Is_Only_Out_Parameter Flag226
491 -- Referenced_As_Out_Parameter Flag227
492 -- Has_Thunks Flag228
493 -- Can_Use_Internal_Rep Flag229
494 -- Has_Pragma_Inline_Always Flag230
496 -- Renamed_In_Spec Flag231
497 -- Has_Invariants Flag232
498 -- Has_Pragma_Unmodified Flag233
499 -- Is_Dispatch_Table_Entity Flag234
500 -- Is_Trivial_Subprogram Flag235
501 -- Warnings_Off_Used Flag236
502 -- Warnings_Off_Used_Unmodified Flag237
503 -- Warnings_Off_Used_Unreferenced Flag238
504 -- OK_To_Reorder_Components Flag239
505 -- Has_Postconditions Flag240
507 -- Optimize_Alignment_Space Flag241
508 -- Optimize_Alignment_Time Flag242
509 -- Overlays_Constant Flag243
510 -- Is_RACW_Stub_Type Flag244
511 -- Is_Private_Primitive Flag245
512 -- Is_Underlying_Record_View Flag246
513 -- OK_To_Rename Flag247
514 -- Has_Inheritable_Invariants Flag248
515 -- Has_Predicates Flag250
525 -----------------------
526 -- Local subprograms --
527 -----------------------
529 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
530 -- Returns the attribute definition clause for Id whose name is Rep_Name.
531 -- Returns Empty if no matching attribute definition clause found for Id.
537 function Float_Rep (Id : E) return F is
538 pragma Assert (Is_Floating_Point_Type (Id));
540 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
547 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
551 Ritem := First_Rep_Item (Id);
552 while Present (Ritem) loop
553 if Nkind (Ritem) = N_Attribute_Definition_Clause
554 and then Chars (Ritem) = Rep_Name
558 Next_Rep_Item (Ritem);
565 --------------------------------
566 -- Attribute Access Functions --
567 --------------------------------
569 function Accept_Address (Id : E) return L is
574 function Access_Disp_Table (Id : E) return L is
576 pragma Assert (Is_Tagged_Type (Id));
577 return Elist16 (Implementation_Base_Type (Id));
578 end Access_Disp_Table;
580 function Actual_Subtype (Id : E) return E is
583 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
584 or else Is_Formal (Id));
588 function Address_Taken (Id : E) return B is
593 function Alias (Id : E) return E is
596 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
600 function Alignment (Id : E) return U is
602 pragma Assert (Is_Type (Id)
603 or else Is_Formal (Id)
604 or else Ekind_In (Id, E_Loop_Parameter,
611 function Associated_Final_Chain (Id : E) return E is
613 pragma Assert (Is_Access_Type (Id));
615 end Associated_Final_Chain;
617 function Associated_Formal_Package (Id : E) return E is
619 pragma Assert (Ekind (Id) = E_Package);
621 end Associated_Formal_Package;
623 function Associated_Node_For_Itype (Id : E) return N is
626 end Associated_Node_For_Itype;
628 function Associated_Storage_Pool (Id : E) return E is
630 pragma Assert (Is_Access_Type (Id));
631 return Node22 (Root_Type (Id));
632 end Associated_Storage_Pool;
634 function Barrier_Function (Id : E) return N is
636 pragma Assert (Is_Entry (Id));
638 end Barrier_Function;
640 function Block_Node (Id : E) return N is
642 pragma Assert (Ekind (Id) = E_Block);
646 function Body_Entity (Id : E) return E is
648 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
652 function Body_Needed_For_SAL (Id : E) return B is
655 (Ekind (Id) = E_Package
656 or else Is_Subprogram (Id)
657 or else Is_Generic_Unit (Id));
659 end Body_Needed_For_SAL;
661 function C_Pass_By_Copy (Id : E) return B is
663 pragma Assert (Is_Record_Type (Id));
664 return Flag125 (Implementation_Base_Type (Id));
667 function Can_Never_Be_Null (Id : E) return B is
670 end Can_Never_Be_Null;
672 function Checks_May_Be_Suppressed (Id : E) return B is
675 end Checks_May_Be_Suppressed;
677 function Class_Wide_Type (Id : E) return E is
679 pragma Assert (Is_Type (Id));
683 function Cloned_Subtype (Id : E) return E is
685 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
689 function Component_Bit_Offset (Id : E) return U is
691 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
693 end Component_Bit_Offset;
695 function Component_Clause (Id : E) return N is
697 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
699 end Component_Clause;
701 function Component_Size (Id : E) return U is
703 pragma Assert (Is_Array_Type (Id));
704 return Uint22 (Implementation_Base_Type (Id));
707 function Component_Type (Id : E) return E is
709 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
710 return Node20 (Implementation_Base_Type (Id));
713 function Corresponding_Concurrent_Type (Id : E) return E is
715 pragma Assert (Ekind (Id) = E_Record_Type);
717 end Corresponding_Concurrent_Type;
719 function Corresponding_Discriminant (Id : E) return E is
721 pragma Assert (Ekind (Id) = E_Discriminant);
723 end Corresponding_Discriminant;
725 function Corresponding_Equality (Id : E) return E is
728 (Ekind (Id) = E_Function
729 and then not Comes_From_Source (Id)
730 and then Chars (Id) = Name_Op_Ne);
732 end Corresponding_Equality;
734 function Corresponding_Protected_Entry (Id : E) return E is
736 pragma Assert (Ekind (Id) = E_Subprogram_Body);
738 end Corresponding_Protected_Entry;
740 function Corresponding_Record_Type (Id : E) return E is
742 pragma Assert (Is_Concurrent_Type (Id));
744 end Corresponding_Record_Type;
746 function Corresponding_Remote_Type (Id : E) return E is
749 end Corresponding_Remote_Type;
751 function Current_Use_Clause (Id : E) return E is
753 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
755 end Current_Use_Clause;
757 function Current_Value (Id : E) return N is
759 pragma Assert (Ekind (Id) in Object_Kind);
763 function CR_Discriminant (Id : E) return E is
768 function Debug_Info_Off (Id : E) return B is
773 function Debug_Renaming_Link (Id : E) return E is
776 end Debug_Renaming_Link;
778 function Default_Expr_Function (Id : E) return E is
780 pragma Assert (Is_Formal (Id));
782 end Default_Expr_Function;
784 function Default_Expressions_Processed (Id : E) return B is
787 end Default_Expressions_Processed;
789 function Default_Value (Id : E) return N is
791 pragma Assert (Is_Formal (Id));
795 function Delay_Cleanups (Id : E) return B is
800 function Delay_Subprogram_Descriptors (Id : E) return B is
803 end Delay_Subprogram_Descriptors;
805 function Delta_Value (Id : E) return R is
807 pragma Assert (Is_Fixed_Point_Type (Id));
811 function Dependent_Instances (Id : E) return L is
813 pragma Assert (Is_Generic_Instance (Id));
815 end Dependent_Instances;
817 function Depends_On_Private (Id : E) return B is
819 pragma Assert (Nkind (Id) in N_Entity);
821 end Depends_On_Private;
823 function Digits_Value (Id : E) return U is
826 (Is_Floating_Point_Type (Id)
827 or else Is_Decimal_Fixed_Point_Type (Id));
831 function Direct_Primitive_Operations (Id : E) return L is
833 pragma Assert (Is_Tagged_Type (Id));
835 end Direct_Primitive_Operations;
837 function Directly_Designated_Type (Id : E) return E is
839 pragma Assert (Is_Access_Type (Id));
841 end Directly_Designated_Type;
843 function Discard_Names (Id : E) return B is
848 function Discriminal (Id : E) return E is
850 pragma Assert (Ekind (Id) = E_Discriminant);
854 function Discriminal_Link (Id : E) return N is
857 end Discriminal_Link;
859 function Discriminant_Checking_Func (Id : E) return E is
861 pragma Assert (Ekind (Id) = E_Component);
863 end Discriminant_Checking_Func;
865 function Discriminant_Constraint (Id : E) return L is
867 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
869 end Discriminant_Constraint;
871 function Discriminant_Default_Value (Id : E) return N is
873 pragma Assert (Ekind (Id) = E_Discriminant);
875 end Discriminant_Default_Value;
877 function Discriminant_Number (Id : E) return U is
879 pragma Assert (Ekind (Id) = E_Discriminant);
881 end Discriminant_Number;
883 function Dispatch_Table_Wrappers (Id : E) return L is
885 pragma Assert (Is_Tagged_Type (Id));
886 return Elist26 (Implementation_Base_Type (Id));
887 end Dispatch_Table_Wrappers;
889 function DT_Entry_Count (Id : E) return U is
891 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
895 function DT_Offset_To_Top_Func (Id : E) return E is
897 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
899 end DT_Offset_To_Top_Func;
901 function DT_Position (Id : E) return U is
903 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
904 and then Present (DTC_Entity (Id)));
908 function DTC_Entity (Id : E) return E is
910 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
914 function Elaborate_Body_Desirable (Id : E) return B is
916 pragma Assert (Ekind (Id) = E_Package);
918 end Elaborate_Body_Desirable;
920 function Elaboration_Entity (Id : E) return E is
925 Ekind (Id) = E_Package
927 Is_Generic_Unit (Id));
929 end Elaboration_Entity;
931 function Elaboration_Entity_Required (Id : E) return B is
936 Ekind (Id) = E_Package
938 Is_Generic_Unit (Id));
940 end Elaboration_Entity_Required;
942 function Enclosing_Scope (Id : E) return E is
947 function Entry_Accepted (Id : E) return B is
949 pragma Assert (Is_Entry (Id));
953 function Entry_Bodies_Array (Id : E) return E is
956 end Entry_Bodies_Array;
958 function Entry_Cancel_Parameter (Id : E) return E is
961 end Entry_Cancel_Parameter;
963 function Entry_Component (Id : E) return E is
968 function Entry_Formal (Id : E) return E is
973 function Entry_Index_Constant (Id : E) return N is
975 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
977 end Entry_Index_Constant;
979 function Entry_Parameters_Type (Id : E) return E is
982 end Entry_Parameters_Type;
984 function Enum_Pos_To_Rep (Id : E) return E is
986 pragma Assert (Ekind (Id) = E_Enumeration_Type);
990 function Enumeration_Pos (Id : E) return Uint is
992 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
996 function Enumeration_Rep (Id : E) return U is
998 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1000 end Enumeration_Rep;
1002 function Enumeration_Rep_Expr (Id : E) return N is
1004 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1006 end Enumeration_Rep_Expr;
1008 function Equivalent_Type (Id : E) return E is
1011 (Ekind_In (Id, E_Class_Wide_Type,
1012 E_Class_Wide_Subtype,
1013 E_Access_Protected_Subprogram_Type,
1014 E_Anonymous_Access_Protected_Subprogram_Type,
1015 E_Access_Subprogram_Type,
1018 end Equivalent_Type;
1020 function Esize (Id : E) return Uint is
1025 function Exception_Code (Id : E) return Uint is
1027 pragma Assert (Ekind (Id) = E_Exception);
1031 function Extra_Accessibility (Id : E) return E is
1033 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1035 end Extra_Accessibility;
1037 function Extra_Constrained (Id : E) return E is
1039 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1041 end Extra_Constrained;
1043 function Extra_Formal (Id : E) return E is
1048 function Extra_Formals (Id : E) return E is
1051 (Is_Overloadable (Id)
1052 or else Ekind_In (Id, E_Entry_Family,
1054 E_Subprogram_Type));
1058 function Can_Use_Internal_Rep (Id : E) return B is
1060 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1061 return Flag229 (Base_Type (Id));
1062 end Can_Use_Internal_Rep;
1064 function Finalization_Chain_Entity (Id : E) return E is
1067 end Finalization_Chain_Entity;
1069 function Finalize_Storage_Only (Id : E) return B is
1071 pragma Assert (Is_Type (Id));
1072 return Flag158 (Base_Type (Id));
1073 end Finalize_Storage_Only;
1075 function First_Entity (Id : E) return E is
1080 function First_Exit_Statement (Id : E) return N is
1082 pragma Assert (Ekind (Id) = E_Loop);
1084 end First_Exit_Statement;
1086 function First_Index (Id : E) return N is
1088 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1092 function First_Literal (Id : E) return E is
1094 pragma Assert (Is_Enumeration_Type (Id));
1098 function First_Optional_Parameter (Id : E) return E is
1100 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1102 end First_Optional_Parameter;
1104 function First_Private_Entity (Id : E) return E is
1106 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1107 or else Ekind (Id) in Concurrent_Kind);
1109 end First_Private_Entity;
1111 function First_Rep_Item (Id : E) return E is
1116 function Freeze_Node (Id : E) return N is
1121 function From_With_Type (Id : E) return B is
1123 return Flag159 (Id);
1126 function Full_View (Id : E) return E is
1128 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1132 function Generic_Homonym (Id : E) return E is
1134 pragma Assert (Ekind (Id) = E_Generic_Package);
1136 end Generic_Homonym;
1138 function Generic_Renamings (Id : E) return L is
1140 return Elist23 (Id);
1141 end Generic_Renamings;
1143 function Handler_Records (Id : E) return S is
1146 end Handler_Records;
1148 function Has_Aliased_Components (Id : E) return B is
1150 return Flag135 (Implementation_Base_Type (Id));
1151 end Has_Aliased_Components;
1153 function Has_Alignment_Clause (Id : E) return B is
1156 end Has_Alignment_Clause;
1158 function Has_All_Calls_Remote (Id : E) return B is
1161 end Has_All_Calls_Remote;
1163 function Has_Anon_Block_Suffix (Id : E) return B is
1165 return Flag201 (Id);
1166 end Has_Anon_Block_Suffix;
1168 function Has_Atomic_Components (Id : E) return B is
1170 return Flag86 (Implementation_Base_Type (Id));
1171 end Has_Atomic_Components;
1173 function Has_Biased_Representation (Id : E) return B is
1175 return Flag139 (Id);
1176 end Has_Biased_Representation;
1178 function Has_Completion (Id : E) return B is
1183 function Has_Completion_In_Body (Id : E) return B is
1185 pragma Assert (Is_Type (Id));
1187 end Has_Completion_In_Body;
1189 function Has_Complex_Representation (Id : E) return B is
1191 pragma Assert (Is_Type (Id));
1192 return Flag140 (Implementation_Base_Type (Id));
1193 end Has_Complex_Representation;
1195 function Has_Component_Size_Clause (Id : E) return B is
1197 pragma Assert (Is_Array_Type (Id));
1198 return Flag68 (Implementation_Base_Type (Id));
1199 end Has_Component_Size_Clause;
1201 function Has_Constrained_Partial_View (Id : E) return B is
1203 pragma Assert (Is_Type (Id));
1204 return Flag187 (Id);
1205 end Has_Constrained_Partial_View;
1207 function Has_Controlled_Component (Id : E) return B is
1209 return Flag43 (Base_Type (Id));
1210 end Has_Controlled_Component;
1212 function Has_Contiguous_Rep (Id : E) return B is
1214 return Flag181 (Id);
1215 end Has_Contiguous_Rep;
1217 function Has_Controlling_Result (Id : E) return B is
1220 end Has_Controlling_Result;
1222 function Has_Convention_Pragma (Id : E) return B is
1224 return Flag119 (Id);
1225 end Has_Convention_Pragma;
1227 function Has_Delayed_Aspects (Id : E) return B is
1229 pragma Assert (Nkind (Id) in N_Entity);
1230 return Flag200 (Id);
1231 end Has_Delayed_Aspects;
1233 function Has_Delayed_Freeze (Id : E) return B is
1235 pragma Assert (Nkind (Id) in N_Entity);
1237 end Has_Delayed_Freeze;
1239 function Has_Discriminants (Id : E) return B is
1241 pragma Assert (Nkind (Id) in N_Entity);
1243 end Has_Discriminants;
1245 function Has_Dispatch_Table (Id : E) return B is
1247 pragma Assert (Is_Tagged_Type (Id));
1248 return Flag220 (Id);
1249 end Has_Dispatch_Table;
1251 function Has_Enumeration_Rep_Clause (Id : E) return B is
1253 pragma Assert (Is_Enumeration_Type (Id));
1255 end Has_Enumeration_Rep_Clause;
1257 function Has_Exit (Id : E) return B is
1262 function Has_External_Tag_Rep_Clause (Id : E) return B is
1264 pragma Assert (Is_Tagged_Type (Id));
1265 return Flag110 (Id);
1266 end Has_External_Tag_Rep_Clause;
1268 function Has_Forward_Instantiation (Id : E) return B is
1270 return Flag175 (Id);
1271 end Has_Forward_Instantiation;
1273 function Has_Fully_Qualified_Name (Id : E) return B is
1275 return Flag173 (Id);
1276 end Has_Fully_Qualified_Name;
1278 function Has_Gigi_Rep_Item (Id : E) return B is
1281 end Has_Gigi_Rep_Item;
1283 function Has_Homonym (Id : E) return B is
1288 function Has_Inheritable_Invariants (Id : E) return B is
1290 pragma Assert (Is_Type (Id));
1291 return Flag248 (Id);
1292 end Has_Inheritable_Invariants;
1294 function Has_Initial_Value (Id : E) return B is
1296 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1297 return Flag219 (Id);
1298 end Has_Initial_Value;
1300 function Has_Invariants (Id : E) return B is
1302 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Procedure);
1303 return Flag232 (Id);
1306 function Has_Machine_Radix_Clause (Id : E) return B is
1308 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1310 end Has_Machine_Radix_Clause;
1312 function Has_Master_Entity (Id : E) return B is
1315 end Has_Master_Entity;
1317 function Has_Missing_Return (Id : E) return B is
1319 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1320 return Flag142 (Id);
1321 end Has_Missing_Return;
1323 function Has_Nested_Block_With_Handler (Id : E) return B is
1325 return Flag101 (Id);
1326 end Has_Nested_Block_With_Handler;
1328 function Has_Non_Standard_Rep (Id : E) return B is
1330 return Flag75 (Implementation_Base_Type (Id));
1331 end Has_Non_Standard_Rep;
1333 function Has_Object_Size_Clause (Id : E) return B is
1335 pragma Assert (Is_Type (Id));
1336 return Flag172 (Id);
1337 end Has_Object_Size_Clause;
1339 function Has_Per_Object_Constraint (Id : E) return B is
1341 return Flag154 (Id);
1342 end Has_Per_Object_Constraint;
1344 function Has_Persistent_BSS (Id : E) return B is
1346 return Flag188 (Id);
1347 end Has_Persistent_BSS;
1349 function Has_Postconditions (Id : E) return B is
1351 pragma Assert (Is_Subprogram (Id));
1352 return Flag240 (Id);
1353 end Has_Postconditions;
1355 function Has_Pragma_Controlled (Id : E) return B is
1357 pragma Assert (Is_Access_Type (Id));
1358 return Flag27 (Implementation_Base_Type (Id));
1359 end Has_Pragma_Controlled;
1361 function Has_Pragma_Elaborate_Body (Id : E) return B is
1363 return Flag150 (Id);
1364 end Has_Pragma_Elaborate_Body;
1366 function Has_Pragma_Inline (Id : E) return B is
1368 return Flag157 (Id);
1369 end Has_Pragma_Inline;
1371 function Has_Pragma_Inline_Always (Id : E) return B is
1373 return Flag230 (Id);
1374 end Has_Pragma_Inline_Always;
1376 function Has_Pragma_Ordered (Id : E) return B is
1378 pragma Assert (Is_Enumeration_Type (Id));
1379 return Flag198 (Implementation_Base_Type (Id));
1380 end Has_Pragma_Ordered;
1382 function Has_Pragma_Pack (Id : E) return B is
1384 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1385 return Flag121 (Implementation_Base_Type (Id));
1386 end Has_Pragma_Pack;
1388 function Has_Pragma_Preelab_Init (Id : E) return B is
1390 return Flag221 (Id);
1391 end Has_Pragma_Preelab_Init;
1393 function Has_Pragma_Pure (Id : E) return B is
1395 return Flag203 (Id);
1396 end Has_Pragma_Pure;
1398 function Has_Pragma_Pure_Function (Id : E) return B is
1400 return Flag179 (Id);
1401 end Has_Pragma_Pure_Function;
1403 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1405 return Flag169 (Id);
1406 end Has_Pragma_Thread_Local_Storage;
1408 function Has_Pragma_Unmodified (Id : E) return B is
1410 return Flag233 (Id);
1411 end Has_Pragma_Unmodified;
1413 function Has_Pragma_Unreferenced (Id : E) return B is
1415 return Flag180 (Id);
1416 end Has_Pragma_Unreferenced;
1418 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1420 pragma Assert (Is_Type (Id));
1421 return Flag212 (Id);
1422 end Has_Pragma_Unreferenced_Objects;
1424 function Has_Predicates (Id : E) return B is
1426 return Flag250 (Id);
1429 function Has_Primitive_Operations (Id : E) return B is
1431 pragma Assert (Is_Type (Id));
1432 return Flag120 (Base_Type (Id));
1433 end Has_Primitive_Operations;
1435 function Has_Private_Declaration (Id : E) return B is
1437 return Flag155 (Id);
1438 end Has_Private_Declaration;
1440 function Has_Qualified_Name (Id : E) return B is
1442 return Flag161 (Id);
1443 end Has_Qualified_Name;
1445 function Has_RACW (Id : E) return B is
1447 pragma Assert (Ekind (Id) = E_Package);
1448 return Flag214 (Id);
1451 function Has_Record_Rep_Clause (Id : E) return B is
1453 pragma Assert (Is_Record_Type (Id));
1454 return Flag65 (Implementation_Base_Type (Id));
1455 end Has_Record_Rep_Clause;
1457 function Has_Recursive_Call (Id : E) return B is
1459 pragma Assert (Is_Subprogram (Id));
1460 return Flag143 (Id);
1461 end Has_Recursive_Call;
1463 function Has_Size_Clause (Id : E) return B is
1466 end Has_Size_Clause;
1468 function Has_Small_Clause (Id : E) return B is
1471 end Has_Small_Clause;
1473 function Has_Specified_Layout (Id : E) return B is
1475 pragma Assert (Is_Type (Id));
1476 return Flag100 (Implementation_Base_Type (Id));
1477 end Has_Specified_Layout;
1479 function Has_Specified_Stream_Input (Id : E) return B is
1481 pragma Assert (Is_Type (Id));
1482 return Flag190 (Id);
1483 end Has_Specified_Stream_Input;
1485 function Has_Specified_Stream_Output (Id : E) return B is
1487 pragma Assert (Is_Type (Id));
1488 return Flag191 (Id);
1489 end Has_Specified_Stream_Output;
1491 function Has_Specified_Stream_Read (Id : E) return B is
1493 pragma Assert (Is_Type (Id));
1494 return Flag192 (Id);
1495 end Has_Specified_Stream_Read;
1497 function Has_Specified_Stream_Write (Id : E) return B is
1499 pragma Assert (Is_Type (Id));
1500 return Flag193 (Id);
1501 end Has_Specified_Stream_Write;
1503 function Has_Static_Discriminants (Id : E) return B is
1505 pragma Assert (Is_Type (Id));
1506 return Flag211 (Id);
1507 end Has_Static_Discriminants;
1509 function Has_Storage_Size_Clause (Id : E) return B is
1511 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1512 return Flag23 (Implementation_Base_Type (Id));
1513 end Has_Storage_Size_Clause;
1515 function Has_Stream_Size_Clause (Id : E) return B is
1517 return Flag184 (Id);
1518 end Has_Stream_Size_Clause;
1520 function Has_Subprogram_Descriptor (Id : E) return B is
1523 end Has_Subprogram_Descriptor;
1525 function Has_Task (Id : E) return B is
1527 return Flag30 (Base_Type (Id));
1530 function Has_Thunks (Id : E) return B is
1532 return Flag228 (Id);
1535 function Has_Unchecked_Union (Id : E) return B is
1537 return Flag123 (Base_Type (Id));
1538 end Has_Unchecked_Union;
1540 function Has_Unknown_Discriminants (Id : E) return B is
1542 pragma Assert (Is_Type (Id));
1544 end Has_Unknown_Discriminants;
1546 function Has_Up_Level_Access (Id : E) return B is
1549 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1550 return Flag215 (Id);
1551 end Has_Up_Level_Access;
1553 function Has_Volatile_Components (Id : E) return B is
1555 return Flag87 (Implementation_Base_Type (Id));
1556 end Has_Volatile_Components;
1558 function Has_Xref_Entry (Id : E) return B is
1560 return Flag182 (Implementation_Base_Type (Id));
1563 function Hiding_Loop_Variable (Id : E) return E is
1565 pragma Assert (Ekind (Id) = E_Variable);
1567 end Hiding_Loop_Variable;
1569 function Homonym (Id : E) return E is
1574 function Interface_Alias (Id : E) return E is
1576 pragma Assert (Is_Subprogram (Id));
1578 end Interface_Alias;
1580 function Interfaces (Id : E) return L is
1582 pragma Assert (Is_Record_Type (Id));
1583 return Elist25 (Id);
1586 function In_Package_Body (Id : E) return B is
1589 end In_Package_Body;
1591 function In_Private_Part (Id : E) return B is
1594 end In_Private_Part;
1596 function In_Use (Id : E) return B is
1598 pragma Assert (Nkind (Id) in N_Entity);
1602 function Inner_Instances (Id : E) return L is
1604 return Elist23 (Id);
1605 end Inner_Instances;
1607 function Interface_Name (Id : E) return N is
1612 function Is_Abstract_Subprogram (Id : E) return B is
1614 pragma Assert (Is_Overloadable (Id));
1616 end Is_Abstract_Subprogram;
1618 function Is_Abstract_Type (Id : E) return B is
1620 pragma Assert (Is_Type (Id));
1621 return Flag146 (Id);
1622 end Is_Abstract_Type;
1624 function Is_Local_Anonymous_Access (Id : E) return B is
1626 pragma Assert (Is_Access_Type (Id));
1627 return Flag194 (Id);
1628 end Is_Local_Anonymous_Access;
1630 function Is_Access_Constant (Id : E) return B is
1632 pragma Assert (Is_Access_Type (Id));
1634 end Is_Access_Constant;
1636 function Is_Ada_2005_Only (Id : E) return B is
1638 return Flag185 (Id);
1639 end Is_Ada_2005_Only;
1641 function Is_Ada_2012_Only (Id : E) return B is
1643 return Flag199 (Id);
1644 end Is_Ada_2012_Only;
1646 function Is_Aliased (Id : E) return B is
1648 pragma Assert (Nkind (Id) in N_Entity);
1652 function Is_AST_Entry (Id : E) return B is
1654 pragma Assert (Is_Entry (Id));
1655 return Flag132 (Id);
1658 function Is_Asynchronous (Id : E) return B is
1660 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1662 end Is_Asynchronous;
1664 function Is_Atomic (Id : E) return B is
1669 function Is_Bit_Packed_Array (Id : E) return B is
1671 return Flag122 (Implementation_Base_Type (Id));
1672 end Is_Bit_Packed_Array;
1674 function Is_Called (Id : E) return B is
1676 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1677 return Flag102 (Id);
1680 function Is_Character_Type (Id : E) return B is
1683 end Is_Character_Type;
1685 function Is_Child_Unit (Id : E) return B is
1690 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1693 end Is_Class_Wide_Equivalent_Type;
1695 function Is_Compilation_Unit (Id : E) return B is
1697 return Flag149 (Id);
1698 end Is_Compilation_Unit;
1700 function Is_Completely_Hidden (Id : E) return B is
1702 pragma Assert (Ekind (Id) = E_Discriminant);
1703 return Flag103 (Id);
1704 end Is_Completely_Hidden;
1706 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1709 end Is_Constr_Subt_For_U_Nominal;
1711 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1713 return Flag141 (Id);
1714 end Is_Constr_Subt_For_UN_Aliased;
1716 function Is_Constrained (Id : E) return B is
1718 pragma Assert (Nkind (Id) in N_Entity);
1722 function Is_Constructor (Id : E) return B is
1727 function Is_Controlled (Id : E) return B is
1729 return Flag42 (Base_Type (Id));
1732 function Is_Controlling_Formal (Id : E) return B is
1734 pragma Assert (Is_Formal (Id));
1736 end Is_Controlling_Formal;
1738 function Is_CPP_Class (Id : E) return B is
1743 function Is_Descendent_Of_Address (Id : E) return B is
1745 pragma Assert (Is_Type (Id));
1746 return Flag223 (Id);
1747 end Is_Descendent_Of_Address;
1749 function Is_Discrim_SO_Function (Id : E) return B is
1751 return Flag176 (Id);
1752 end Is_Discrim_SO_Function;
1754 function Is_Dispatch_Table_Entity (Id : E) return B is
1756 return Flag234 (Id);
1757 end Is_Dispatch_Table_Entity;
1759 function Is_Dispatching_Operation (Id : E) return B is
1761 pragma Assert (Nkind (Id) in N_Entity);
1763 end Is_Dispatching_Operation;
1765 function Is_Eliminated (Id : E) return B is
1767 return Flag124 (Id);
1770 function Is_Entry_Formal (Id : E) return B is
1773 end Is_Entry_Formal;
1775 function Is_Exported (Id : E) return B is
1780 function Is_First_Subtype (Id : E) return B is
1783 end Is_First_Subtype;
1785 function Is_For_Access_Subtype (Id : E) return B is
1787 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1788 return Flag118 (Id);
1789 end Is_For_Access_Subtype;
1791 function Is_Formal_Subprogram (Id : E) return B is
1793 return Flag111 (Id);
1794 end Is_Formal_Subprogram;
1796 function Is_Frozen (Id : E) return B is
1801 function Is_Generic_Actual_Type (Id : E) return B is
1803 pragma Assert (Is_Type (Id));
1805 end Is_Generic_Actual_Type;
1807 function Is_Generic_Instance (Id : E) return B is
1809 return Flag130 (Id);
1810 end Is_Generic_Instance;
1812 function Is_Generic_Type (Id : E) return B is
1814 pragma Assert (Nkind (Id) in N_Entity);
1816 end Is_Generic_Type;
1818 function Is_Hidden (Id : E) return B is
1823 function Is_Hidden_Open_Scope (Id : E) return B is
1825 return Flag171 (Id);
1826 end Is_Hidden_Open_Scope;
1828 function Is_Immediately_Visible (Id : E) return B is
1830 pragma Assert (Nkind (Id) in N_Entity);
1832 end Is_Immediately_Visible;
1834 function Is_Imported (Id : E) return B is
1839 function Is_Inlined (Id : E) return B is
1844 function Is_Interface (Id : E) return B is
1846 return Flag186 (Id);
1849 function Is_Instantiated (Id : E) return B is
1851 return Flag126 (Id);
1852 end Is_Instantiated;
1854 function Is_Internal (Id : E) return B is
1856 pragma Assert (Nkind (Id) in N_Entity);
1860 function Is_Interrupt_Handler (Id : E) return B is
1862 pragma Assert (Nkind (Id) in N_Entity);
1864 end Is_Interrupt_Handler;
1866 function Is_Intrinsic_Subprogram (Id : E) return B is
1869 end Is_Intrinsic_Subprogram;
1871 function Is_Itype (Id : E) return B is
1876 function Is_Known_Non_Null (Id : E) return B is
1879 end Is_Known_Non_Null;
1881 function Is_Known_Null (Id : E) return B is
1883 return Flag204 (Id);
1886 function Is_Known_Valid (Id : E) return B is
1888 return Flag170 (Id);
1891 function Is_Limited_Composite (Id : E) return B is
1893 return Flag106 (Id);
1894 end Is_Limited_Composite;
1896 function Is_Limited_Interface (Id : E) return B is
1898 return Flag197 (Id);
1899 end Is_Limited_Interface;
1901 function Is_Limited_Record (Id : E) return B is
1904 end Is_Limited_Record;
1906 function Is_Machine_Code_Subprogram (Id : E) return B is
1908 pragma Assert (Is_Subprogram (Id));
1909 return Flag137 (Id);
1910 end Is_Machine_Code_Subprogram;
1912 function Is_Non_Static_Subtype (Id : E) return B is
1914 pragma Assert (Is_Type (Id));
1915 return Flag109 (Id);
1916 end Is_Non_Static_Subtype;
1918 function Is_Null_Init_Proc (Id : E) return B is
1920 pragma Assert (Ekind (Id) = E_Procedure);
1921 return Flag178 (Id);
1922 end Is_Null_Init_Proc;
1924 function Is_Obsolescent (Id : E) return B is
1926 return Flag153 (Id);
1929 function Is_Only_Out_Parameter (Id : E) return B is
1931 pragma Assert (Is_Formal (Id));
1932 return Flag226 (Id);
1933 end Is_Only_Out_Parameter;
1935 function Is_Optional_Parameter (Id : E) return B is
1937 pragma Assert (Is_Formal (Id));
1938 return Flag134 (Id);
1939 end Is_Optional_Parameter;
1941 function Is_Package_Body_Entity (Id : E) return B is
1943 return Flag160 (Id);
1944 end Is_Package_Body_Entity;
1946 function Is_Packed (Id : E) return B is
1948 return Flag51 (Implementation_Base_Type (Id));
1951 function Is_Packed_Array_Type (Id : E) return B is
1953 return Flag138 (Id);
1954 end Is_Packed_Array_Type;
1956 function Is_Potentially_Use_Visible (Id : E) return B is
1958 pragma Assert (Nkind (Id) in N_Entity);
1960 end Is_Potentially_Use_Visible;
1962 function Is_Preelaborated (Id : E) return B is
1965 end Is_Preelaborated;
1967 function Is_Primitive (Id : E) return B is
1970 (Is_Overloadable (Id)
1971 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1972 return Flag218 (Id);
1975 function Is_Primitive_Wrapper (Id : E) return B is
1977 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1978 return Flag195 (Id);
1979 end Is_Primitive_Wrapper;
1981 function Is_Private_Composite (Id : E) return B is
1983 pragma Assert (Is_Type (Id));
1984 return Flag107 (Id);
1985 end Is_Private_Composite;
1987 function Is_Private_Descendant (Id : E) return B is
1990 end Is_Private_Descendant;
1992 function Is_Private_Primitive (Id : E) return B is
1994 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1995 return Flag245 (Id);
1996 end Is_Private_Primitive;
1998 function Is_Public (Id : E) return B is
2000 pragma Assert (Nkind (Id) in N_Entity);
2004 function Is_Pure (Id : E) return B is
2009 function Is_Pure_Unit_Access_Type (Id : E) return B is
2011 pragma Assert (Is_Access_Type (Id));
2012 return Flag189 (Id);
2013 end Is_Pure_Unit_Access_Type;
2015 function Is_RACW_Stub_Type (Id : E) return B is
2017 pragma Assert (Is_Type (Id));
2018 return Flag244 (Id);
2019 end Is_RACW_Stub_Type;
2021 function Is_Raised (Id : E) return B is
2023 pragma Assert (Ekind (Id) = E_Exception);
2024 return Flag224 (Id);
2027 function Is_Remote_Call_Interface (Id : E) return B is
2030 end Is_Remote_Call_Interface;
2032 function Is_Remote_Types (Id : E) return B is
2035 end Is_Remote_Types;
2037 function Is_Renaming_Of_Object (Id : E) return B is
2039 return Flag112 (Id);
2040 end Is_Renaming_Of_Object;
2042 function Is_Return_Object (Id : E) return B is
2044 return Flag209 (Id);
2045 end Is_Return_Object;
2047 function Is_Shared_Passive (Id : E) return B is
2050 end Is_Shared_Passive;
2052 function Is_Statically_Allocated (Id : E) return B is
2055 end Is_Statically_Allocated;
2057 function Is_Tag (Id : E) return B is
2059 pragma Assert (Nkind (Id) in N_Entity);
2063 function Is_Tagged_Type (Id : E) return B is
2068 function Is_Thunk (Id : E) return B is
2070 pragma Assert (Is_Subprogram (Id));
2071 return Flag225 (Id);
2074 function Is_Trivial_Subprogram (Id : E) return B is
2076 return Flag235 (Id);
2077 end Is_Trivial_Subprogram;
2079 function Is_True_Constant (Id : E) return B is
2081 return Flag163 (Id);
2082 end Is_True_Constant;
2084 function Is_Unchecked_Union (Id : E) return B is
2086 return Flag117 (Implementation_Base_Type (Id));
2087 end Is_Unchecked_Union;
2089 function Is_Underlying_Record_View (Id : E) return B is
2091 return Flag246 (Id);
2092 end Is_Underlying_Record_View;
2094 function Is_Unsigned_Type (Id : E) return B is
2096 pragma Assert (Is_Type (Id));
2097 return Flag144 (Id);
2098 end Is_Unsigned_Type;
2100 function Is_Valued_Procedure (Id : E) return B is
2102 pragma Assert (Ekind (Id) = E_Procedure);
2103 return Flag127 (Id);
2104 end Is_Valued_Procedure;
2106 function Is_Visible_Child_Unit (Id : E) return B is
2108 pragma Assert (Is_Child_Unit (Id));
2109 return Flag116 (Id);
2110 end Is_Visible_Child_Unit;
2112 function Is_Visible_Formal (Id : E) return B is
2114 return Flag206 (Id);
2115 end Is_Visible_Formal;
2117 function Is_VMS_Exception (Id : E) return B is
2119 return Flag133 (Id);
2120 end Is_VMS_Exception;
2122 function Is_Volatile (Id : E) return B is
2124 pragma Assert (Nkind (Id) in N_Entity);
2126 if Is_Type (Id) then
2127 return Flag16 (Base_Type (Id));
2133 function Itype_Printed (Id : E) return B is
2135 pragma Assert (Is_Itype (Id));
2136 return Flag202 (Id);
2139 function Kill_Elaboration_Checks (Id : E) return B is
2142 end Kill_Elaboration_Checks;
2144 function Kill_Range_Checks (Id : E) return B is
2147 end Kill_Range_Checks;
2149 function Kill_Tag_Checks (Id : E) return B is
2152 end Kill_Tag_Checks;
2154 function Known_To_Have_Preelab_Init (Id : E) return B is
2156 pragma Assert (Is_Type (Id));
2157 return Flag207 (Id);
2158 end Known_To_Have_Preelab_Init;
2160 function Last_Assignment (Id : E) return N is
2162 pragma Assert (Is_Assignable (Id));
2164 end Last_Assignment;
2166 function Last_Entity (Id : E) return E is
2171 function Limited_View (Id : E) return E is
2173 pragma Assert (Ekind (Id) = E_Package);
2177 function Lit_Indexes (Id : E) return E is
2179 pragma Assert (Is_Enumeration_Type (Id));
2183 function Lit_Strings (Id : E) return E is
2185 pragma Assert (Is_Enumeration_Type (Id));
2189 function Low_Bound_Tested (Id : E) return B is
2191 return Flag205 (Id);
2192 end Low_Bound_Tested;
2194 function Machine_Radix_10 (Id : E) return B is
2196 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2198 end Machine_Radix_10;
2200 function Master_Id (Id : E) return E is
2202 pragma Assert (Is_Access_Type (Id));
2206 function Materialize_Entity (Id : E) return B is
2208 return Flag168 (Id);
2209 end Materialize_Entity;
2211 function Mechanism (Id : E) return M is
2213 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2214 return UI_To_Int (Uint8 (Id));
2217 function Modulus (Id : E) return Uint is
2219 pragma Assert (Is_Modular_Integer_Type (Id));
2220 return Uint17 (Base_Type (Id));
2223 function Must_Be_On_Byte_Boundary (Id : E) return B is
2225 pragma Assert (Is_Type (Id));
2226 return Flag183 (Id);
2227 end Must_Be_On_Byte_Boundary;
2229 function Must_Have_Preelab_Init (Id : E) return B is
2231 pragma Assert (Is_Type (Id));
2232 return Flag208 (Id);
2233 end Must_Have_Preelab_Init;
2235 function Needs_Debug_Info (Id : E) return B is
2237 return Flag147 (Id);
2238 end Needs_Debug_Info;
2240 function Needs_No_Actuals (Id : E) return B is
2243 (Is_Overloadable (Id)
2244 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2246 end Needs_No_Actuals;
2248 function Never_Set_In_Source (Id : E) return B is
2250 return Flag115 (Id);
2251 end Never_Set_In_Source;
2253 function Next_Inlined_Subprogram (Id : E) return E is
2256 end Next_Inlined_Subprogram;
2258 function No_Pool_Assigned (Id : E) return B is
2260 pragma Assert (Is_Access_Type (Id));
2261 return Flag131 (Root_Type (Id));
2262 end No_Pool_Assigned;
2264 function No_Return (Id : E) return B is
2266 return Flag113 (Id);
2269 function No_Strict_Aliasing (Id : E) return B is
2271 pragma Assert (Is_Access_Type (Id));
2272 return Flag136 (Base_Type (Id));
2273 end No_Strict_Aliasing;
2275 function Non_Binary_Modulus (Id : E) return B is
2277 pragma Assert (Is_Type (Id));
2278 return Flag58 (Base_Type (Id));
2279 end Non_Binary_Modulus;
2281 function Non_Limited_View (Id : E) return E is
2283 pragma Assert (Ekind (Id) in Incomplete_Kind);
2285 end Non_Limited_View;
2287 function Nonzero_Is_True (Id : E) return B is
2289 pragma Assert (Root_Type (Id) = Standard_Boolean);
2290 return Flag162 (Base_Type (Id));
2291 end Nonzero_Is_True;
2293 function Normalized_First_Bit (Id : E) return U is
2295 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2297 end Normalized_First_Bit;
2299 function Normalized_Position (Id : E) return U is
2301 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2303 end Normalized_Position;
2305 function Normalized_Position_Max (Id : E) return U is
2307 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2309 end Normalized_Position_Max;
2311 function OK_To_Rename (Id : E) return B is
2313 pragma Assert (Ekind (Id) = E_Variable);
2314 return Flag247 (Id);
2317 function OK_To_Reorder_Components (Id : E) return B is
2319 pragma Assert (Is_Record_Type (Id));
2320 return Flag239 (Base_Type (Id));
2321 end OK_To_Reorder_Components;
2323 function Optimize_Alignment_Space (Id : E) return B is
2326 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2327 return Flag241 (Id);
2328 end Optimize_Alignment_Space;
2330 function Optimize_Alignment_Time (Id : E) return B is
2333 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2334 return Flag242 (Id);
2335 end Optimize_Alignment_Time;
2337 function Original_Array_Type (Id : E) return E is
2339 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2341 end Original_Array_Type;
2343 function Original_Record_Component (Id : E) return E is
2345 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2347 end Original_Record_Component;
2349 function Overlays_Constant (Id : E) return B is
2351 return Flag243 (Id);
2352 end Overlays_Constant;
2354 function Overridden_Operation (Id : E) return E is
2357 end Overridden_Operation;
2359 function Package_Instantiation (Id : E) return N is
2361 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2363 end Package_Instantiation;
2365 function Packed_Array_Type (Id : E) return E is
2367 pragma Assert (Is_Array_Type (Id));
2369 end Packed_Array_Type;
2371 function Parent_Subtype (Id : E) return E is
2373 pragma Assert (Is_Record_Type (Id));
2374 return Node19 (Base_Type (Id));
2377 function Postcondition_Proc (Id : E) return E is
2379 pragma Assert (Ekind (Id) = E_Procedure);
2381 end Postcondition_Proc;
2383 function PPC_Wrapper (Id : E) return E is
2385 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2389 function Prival (Id : E) return E is
2391 pragma Assert (Is_Protected_Component (Id));
2395 function Prival_Link (Id : E) return E is
2397 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2401 function Private_Dependents (Id : E) return L is
2403 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2404 return Elist18 (Id);
2405 end Private_Dependents;
2407 function Private_View (Id : E) return N is
2409 pragma Assert (Is_Private_Type (Id));
2413 function Protected_Body_Subprogram (Id : E) return E is
2415 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2417 end Protected_Body_Subprogram;
2419 function Protected_Formal (Id : E) return E is
2421 pragma Assert (Is_Formal (Id));
2423 end Protected_Formal;
2425 function Protection_Object (Id : E) return E is
2428 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2430 end Protection_Object;
2432 function Reachable (Id : E) return B is
2437 function Referenced (Id : E) return B is
2439 return Flag156 (Id);
2442 function Referenced_As_LHS (Id : E) return B is
2445 end Referenced_As_LHS;
2447 function Referenced_As_Out_Parameter (Id : E) return B is
2449 return Flag227 (Id);
2450 end Referenced_As_Out_Parameter;
2452 function Register_Exception_Call (Id : E) return N is
2454 pragma Assert (Ekind (Id) = E_Exception);
2456 end Register_Exception_Call;
2458 function Related_Array_Object (Id : E) return E is
2460 pragma Assert (Is_Array_Type (Id));
2462 end Related_Array_Object;
2464 function Related_Expression (Id : E) return N is
2466 pragma Assert (Ekind (Id) in Type_Kind
2467 or else Ekind_In (Id, E_Constant, E_Variable));
2469 end Related_Expression;
2471 function Related_Instance (Id : E) return E is
2473 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2475 end Related_Instance;
2477 function Related_Type (Id : E) return E is
2479 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2483 function Relative_Deadline_Variable (Id : E) return E is
2485 pragma Assert (Is_Task_Type (Id));
2486 return Node26 (Implementation_Base_Type (Id));
2487 end Relative_Deadline_Variable;
2489 function Renamed_Entity (Id : E) return N is
2494 function Renamed_In_Spec (Id : E) return B is
2496 pragma Assert (Ekind (Id) = E_Package);
2497 return Flag231 (Id);
2498 end Renamed_In_Spec;
2500 function Renamed_Object (Id : E) return N is
2505 function Renaming_Map (Id : E) return U is
2510 function Requires_Overriding (Id : E) return B is
2512 pragma Assert (Is_Overloadable (Id));
2513 return Flag213 (Id);
2514 end Requires_Overriding;
2516 function Return_Present (Id : E) return B is
2521 function Return_Applies_To (Id : E) return N is
2524 end Return_Applies_To;
2526 function Returns_By_Ref (Id : E) return B is
2531 function Reverse_Bit_Order (Id : E) return B is
2533 pragma Assert (Is_Record_Type (Id));
2534 return Flag164 (Base_Type (Id));
2535 end Reverse_Bit_Order;
2537 function RM_Size (Id : E) return U is
2539 pragma Assert (Is_Type (Id));
2543 function Scalar_Range (Id : E) return N is
2548 function Scale_Value (Id : E) return U is
2553 function Scope_Depth_Value (Id : E) return U is
2556 end Scope_Depth_Value;
2558 function Sec_Stack_Needed_For_Return (Id : E) return B is
2560 return Flag167 (Id);
2561 end Sec_Stack_Needed_For_Return;
2563 function Shadow_Entities (Id : E) return S is
2565 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2567 end Shadow_Entities;
2569 function Shared_Var_Procs_Instance (Id : E) return E is
2571 pragma Assert (Ekind (Id) = E_Variable);
2573 end Shared_Var_Procs_Instance;
2575 function Size_Check_Code (Id : E) return N is
2577 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2579 end Size_Check_Code;
2581 function Size_Depends_On_Discriminant (Id : E) return B is
2583 return Flag177 (Id);
2584 end Size_Depends_On_Discriminant;
2586 function Size_Known_At_Compile_Time (Id : E) return B is
2589 end Size_Known_At_Compile_Time;
2591 function Small_Value (Id : E) return R is
2593 pragma Assert (Is_Fixed_Point_Type (Id));
2594 return Ureal21 (Id);
2597 function Spec_Entity (Id : E) return E is
2599 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2603 function Spec_PPC_List (Id : E) return N is
2606 (Ekind_In (Id, E_Entry, E_Entry_Family)
2607 or else Is_Subprogram (Id)
2608 or else Is_Generic_Subprogram (Id));
2612 function Static_Predicate (Id : E) return S is
2614 pragma Assert (Is_Discrete_Type (Id));
2616 end Static_Predicate;
2618 function Storage_Size_Variable (Id : E) return E is
2620 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2621 return Node15 (Implementation_Base_Type (Id));
2622 end Storage_Size_Variable;
2624 function Static_Elaboration_Desired (Id : E) return B is
2626 pragma Assert (Ekind (Id) = E_Package);
2628 end Static_Elaboration_Desired;
2630 function Static_Initialization (Id : E) return N is
2633 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2635 end Static_Initialization;
2637 function Stored_Constraint (Id : E) return L is
2640 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2641 return Elist23 (Id);
2642 end Stored_Constraint;
2644 function Strict_Alignment (Id : E) return B is
2646 return Flag145 (Implementation_Base_Type (Id));
2647 end Strict_Alignment;
2649 function String_Literal_Length (Id : E) return U is
2652 end String_Literal_Length;
2654 function String_Literal_Low_Bound (Id : E) return N is
2657 end String_Literal_Low_Bound;
2659 function Subprograms_For_Type (Id : E) return E is
2661 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2663 end Subprograms_For_Type;
2665 function Suppress_Elaboration_Warnings (Id : E) return B is
2667 return Flag148 (Id);
2668 end Suppress_Elaboration_Warnings;
2670 function Suppress_Init_Proc (Id : E) return B is
2672 return Flag105 (Base_Type (Id));
2673 end Suppress_Init_Proc;
2675 function Suppress_Style_Checks (Id : E) return B is
2677 return Flag165 (Id);
2678 end Suppress_Style_Checks;
2680 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2682 return Flag217 (Id);
2683 end Suppress_Value_Tracking_On_Call;
2685 function Task_Body_Procedure (Id : E) return N is
2687 pragma Assert (Ekind (Id) in Task_Kind);
2689 end Task_Body_Procedure;
2691 function Treat_As_Volatile (Id : E) return B is
2694 end Treat_As_Volatile;
2696 function Underlying_Full_View (Id : E) return E is
2698 pragma Assert (Ekind (Id) in Private_Kind);
2700 end Underlying_Full_View;
2702 function Underlying_Record_View (Id : E) return E is
2705 end Underlying_Record_View;
2707 function Universal_Aliasing (Id : E) return B is
2709 pragma Assert (Is_Type (Id));
2710 return Flag216 (Base_Type (Id));
2711 end Universal_Aliasing;
2713 function Unset_Reference (Id : E) return N is
2716 end Unset_Reference;
2718 function Used_As_Generic_Actual (Id : E) return B is
2720 return Flag222 (Id);
2721 end Used_As_Generic_Actual;
2723 function Uses_Sec_Stack (Id : E) return B is
2728 function Warnings_Off (Id : E) return B is
2733 function Warnings_Off_Used (Id : E) return B is
2735 return Flag236 (Id);
2736 end Warnings_Off_Used;
2738 function Warnings_Off_Used_Unmodified (Id : E) return B is
2740 return Flag237 (Id);
2741 end Warnings_Off_Used_Unmodified;
2743 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2745 return Flag238 (Id);
2746 end Warnings_Off_Used_Unreferenced;
2748 function Wrapped_Entity (Id : E) return E is
2750 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2751 and then Is_Primitive_Wrapper (Id));
2755 function Was_Hidden (Id : E) return B is
2757 return Flag196 (Id);
2760 ------------------------------
2761 -- Classification Functions --
2762 ------------------------------
2764 function Is_Access_Type (Id : E) return B is
2766 return Ekind (Id) in Access_Kind;
2769 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2771 return Ekind (Id) in Access_Protected_Kind;
2772 end Is_Access_Protected_Subprogram_Type;
2774 function Is_Access_Subprogram_Type (Id : E) return B is
2776 return Ekind (Id) in Access_Subprogram_Kind;
2777 end Is_Access_Subprogram_Type;
2779 function Is_Aggregate_Type (Id : E) return B is
2781 return Ekind (Id) in Aggregate_Kind;
2782 end Is_Aggregate_Type;
2784 function Is_Array_Type (Id : E) return B is
2786 return Ekind (Id) in Array_Kind;
2789 function Is_Assignable (Id : E) return B is
2791 return Ekind (Id) in Assignable_Kind;
2794 function Is_Class_Wide_Type (Id : E) return B is
2796 return Ekind (Id) in Class_Wide_Kind;
2797 end Is_Class_Wide_Type;
2799 function Is_Composite_Type (Id : E) return B is
2801 return Ekind (Id) in Composite_Kind;
2802 end Is_Composite_Type;
2804 function Is_Concurrent_Body (Id : E) return B is
2806 return Ekind (Id) in
2807 Concurrent_Body_Kind;
2808 end Is_Concurrent_Body;
2810 function Is_Concurrent_Record_Type (Id : E) return B is
2813 end Is_Concurrent_Record_Type;
2815 function Is_Concurrent_Type (Id : E) return B is
2817 return Ekind (Id) in Concurrent_Kind;
2818 end Is_Concurrent_Type;
2820 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2822 return Ekind (Id) in
2823 Decimal_Fixed_Point_Kind;
2824 end Is_Decimal_Fixed_Point_Type;
2826 function Is_Digits_Type (Id : E) return B is
2828 return Ekind (Id) in Digits_Kind;
2831 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2833 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2834 end Is_Discrete_Or_Fixed_Point_Type;
2836 function Is_Discrete_Type (Id : E) return B is
2838 return Ekind (Id) in Discrete_Kind;
2839 end Is_Discrete_Type;
2841 function Is_Elementary_Type (Id : E) return B is
2843 return Ekind (Id) in Elementary_Kind;
2844 end Is_Elementary_Type;
2846 function Is_Entry (Id : E) return B is
2848 return Ekind (Id) in Entry_Kind;
2851 function Is_Enumeration_Type (Id : E) return B is
2853 return Ekind (Id) in
2855 end Is_Enumeration_Type;
2857 function Is_Fixed_Point_Type (Id : E) return B is
2859 return Ekind (Id) in
2861 end Is_Fixed_Point_Type;
2863 function Is_Floating_Point_Type (Id : E) return B is
2865 return Ekind (Id) in Float_Kind;
2866 end Is_Floating_Point_Type;
2868 function Is_Formal (Id : E) return B is
2870 return Ekind (Id) in Formal_Kind;
2873 function Is_Formal_Object (Id : E) return B is
2875 return Ekind (Id) in Formal_Object_Kind;
2876 end Is_Formal_Object;
2878 function Is_Generic_Subprogram (Id : E) return B is
2880 return Ekind (Id) in Generic_Subprogram_Kind;
2881 end Is_Generic_Subprogram;
2883 function Is_Generic_Unit (Id : E) return B is
2885 return Ekind (Id) in Generic_Unit_Kind;
2886 end Is_Generic_Unit;
2888 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2890 return Ekind (Id) in
2891 Incomplete_Or_Private_Kind;
2892 end Is_Incomplete_Or_Private_Type;
2894 function Is_Incomplete_Type (Id : E) return B is
2896 return Ekind (Id) in
2898 end Is_Incomplete_Type;
2900 function Is_Integer_Type (Id : E) return B is
2902 return Ekind (Id) in Integer_Kind;
2903 end Is_Integer_Type;
2905 function Is_Modular_Integer_Type (Id : E) return B is
2907 return Ekind (Id) in
2908 Modular_Integer_Kind;
2909 end Is_Modular_Integer_Type;
2911 function Is_Named_Number (Id : E) return B is
2913 return Ekind (Id) in Named_Kind;
2914 end Is_Named_Number;
2916 function Is_Numeric_Type (Id : E) return B is
2918 return Ekind (Id) in Numeric_Kind;
2919 end Is_Numeric_Type;
2921 function Is_Object (Id : E) return B is
2923 return Ekind (Id) in Object_Kind;
2926 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2928 return Ekind (Id) in
2929 Ordinary_Fixed_Point_Kind;
2930 end Is_Ordinary_Fixed_Point_Type;
2932 function Is_Overloadable (Id : E) return B is
2934 return Ekind (Id) in Overloadable_Kind;
2935 end Is_Overloadable;
2937 function Is_Private_Type (Id : E) return B is
2939 return Ekind (Id) in Private_Kind;
2940 end Is_Private_Type;
2942 function Is_Protected_Type (Id : E) return B is
2944 return Ekind (Id) in Protected_Kind;
2945 end Is_Protected_Type;
2947 function Is_Real_Type (Id : E) return B is
2949 return Ekind (Id) in Real_Kind;
2952 function Is_Record_Type (Id : E) return B is
2954 return Ekind (Id) in Record_Kind;
2957 function Is_Scalar_Type (Id : E) return B is
2959 return Ekind (Id) in Scalar_Kind;
2962 function Is_Signed_Integer_Type (Id : E) return B is
2964 return Ekind (Id) in Signed_Integer_Kind;
2965 end Is_Signed_Integer_Type;
2967 function Is_Subprogram (Id : E) return B is
2969 return Ekind (Id) in Subprogram_Kind;
2972 function Is_Task_Type (Id : E) return B is
2974 return Ekind (Id) in Task_Kind;
2977 function Is_Type (Id : E) return B is
2979 return Ekind (Id) in Type_Kind;
2982 ------------------------------
2983 -- Attribute Set Procedures --
2984 ------------------------------
2986 -- Note: in many of these set procedures an "obvious" assertion is missing.
2987 -- The reason for this is that in many cases, a field is set before the
2988 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
2989 -- it is possible to add assertions that specifically include the E_Void
2990 -- possibility, but in some cases, we just omit the assertions.
2992 procedure Set_Accept_Address (Id : E; V : L) is
2994 Set_Elist21 (Id, V);
2995 end Set_Accept_Address;
2997 procedure Set_Access_Disp_Table (Id : E; V : L) is
2999 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3000 Set_Elist16 (Id, V);
3001 end Set_Access_Disp_Table;
3003 procedure Set_Associated_Final_Chain (Id : E; V : E) is
3005 pragma Assert (Is_Access_Type (Id));
3007 end Set_Associated_Final_Chain;
3009 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3012 end Set_Associated_Formal_Package;
3014 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3017 end Set_Associated_Node_For_Itype;
3019 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3021 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
3023 end Set_Associated_Storage_Pool;
3025 procedure Set_Actual_Subtype (Id : E; V : E) is
3028 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3029 or else Is_Formal (Id));
3031 end Set_Actual_Subtype;
3033 procedure Set_Address_Taken (Id : E; V : B := True) is
3035 Set_Flag104 (Id, V);
3036 end Set_Address_Taken;
3038 procedure Set_Alias (Id : E; V : E) is
3041 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3045 procedure Set_Alignment (Id : E; V : U) is
3047 pragma Assert (Is_Type (Id)
3048 or else Is_Formal (Id)
3049 or else Ekind_In (Id, E_Loop_Parameter,
3056 procedure Set_Barrier_Function (Id : E; V : N) is
3058 pragma Assert (Is_Entry (Id));
3060 end Set_Barrier_Function;
3062 procedure Set_Block_Node (Id : E; V : N) is
3064 pragma Assert (Ekind (Id) = E_Block);
3068 procedure Set_Body_Entity (Id : E; V : E) is
3070 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3072 end Set_Body_Entity;
3074 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3077 (Ekind (Id) = E_Package
3078 or else Is_Subprogram (Id)
3079 or else Is_Generic_Unit (Id));
3081 end Set_Body_Needed_For_SAL;
3083 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3085 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3086 Set_Flag125 (Id, V);
3087 end Set_C_Pass_By_Copy;
3089 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3092 end Set_Can_Never_Be_Null;
3094 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3097 end Set_Checks_May_Be_Suppressed;
3099 procedure Set_Class_Wide_Type (Id : E; V : E) is
3101 pragma Assert (Is_Type (Id));
3103 end Set_Class_Wide_Type;
3105 procedure Set_Cloned_Subtype (Id : E; V : E) is
3107 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3109 end Set_Cloned_Subtype;
3111 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3113 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3115 end Set_Component_Bit_Offset;
3117 procedure Set_Component_Clause (Id : E; V : N) is
3119 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3121 end Set_Component_Clause;
3123 procedure Set_Component_Size (Id : E; V : U) is
3125 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3127 end Set_Component_Size;
3129 procedure Set_Component_Type (Id : E; V : E) is
3131 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3133 end Set_Component_Type;
3135 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3138 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3140 end Set_Corresponding_Concurrent_Type;
3142 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3144 pragma Assert (Ekind (Id) = E_Discriminant);
3146 end Set_Corresponding_Discriminant;
3148 procedure Set_Corresponding_Equality (Id : E; V : E) is
3151 (Ekind (Id) = E_Function
3152 and then not Comes_From_Source (Id)
3153 and then Chars (Id) = Name_Op_Ne);
3155 end Set_Corresponding_Equality;
3157 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3159 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3161 end Set_Corresponding_Protected_Entry;
3163 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3165 pragma Assert (Is_Concurrent_Type (Id));
3167 end Set_Corresponding_Record_Type;
3169 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3172 end Set_Corresponding_Remote_Type;
3174 procedure Set_Current_Use_Clause (Id : E; V : E) is
3176 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3178 end Set_Current_Use_Clause;
3180 procedure Set_Current_Value (Id : E; V : N) is
3182 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3184 end Set_Current_Value;
3186 procedure Set_CR_Discriminant (Id : E; V : E) is
3189 end Set_CR_Discriminant;
3191 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3193 Set_Flag166 (Id, V);
3194 end Set_Debug_Info_Off;
3196 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3199 end Set_Debug_Renaming_Link;
3201 procedure Set_Default_Expr_Function (Id : E; V : E) is
3203 pragma Assert (Is_Formal (Id));
3205 end Set_Default_Expr_Function;
3207 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3209 Set_Flag108 (Id, V);
3210 end Set_Default_Expressions_Processed;
3212 procedure Set_Default_Value (Id : E; V : N) is
3214 pragma Assert (Is_Formal (Id));
3216 end Set_Default_Value;
3218 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3222 or else Is_Task_Type (Id)
3223 or else Ekind (Id) = E_Block);
3224 Set_Flag114 (Id, V);
3225 end Set_Delay_Cleanups;
3227 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3230 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3232 end Set_Delay_Subprogram_Descriptors;
3234 procedure Set_Delta_Value (Id : E; V : R) is
3236 pragma Assert (Is_Fixed_Point_Type (Id));
3237 Set_Ureal18 (Id, V);
3238 end Set_Delta_Value;
3240 procedure Set_Dependent_Instances (Id : E; V : L) is
3242 pragma Assert (Is_Generic_Instance (Id));
3244 end Set_Dependent_Instances;
3246 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3248 pragma Assert (Nkind (Id) in N_Entity);
3250 end Set_Depends_On_Private;
3252 procedure Set_Digits_Value (Id : E; V : U) is
3255 (Is_Floating_Point_Type (Id)
3256 or else Is_Decimal_Fixed_Point_Type (Id));
3258 end Set_Digits_Value;
3260 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3263 end Set_Directly_Designated_Type;
3265 procedure Set_Discard_Names (Id : E; V : B := True) is
3268 end Set_Discard_Names;
3270 procedure Set_Discriminal (Id : E; V : E) is
3272 pragma Assert (Ekind (Id) = E_Discriminant);
3274 end Set_Discriminal;
3276 procedure Set_Discriminal_Link (Id : E; V : E) is
3279 end Set_Discriminal_Link;
3281 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3283 pragma Assert (Ekind (Id) = E_Component);
3285 end Set_Discriminant_Checking_Func;
3287 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3289 pragma Assert (Nkind (Id) in N_Entity);
3290 Set_Elist21 (Id, V);
3291 end Set_Discriminant_Constraint;
3293 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3296 end Set_Discriminant_Default_Value;
3298 procedure Set_Discriminant_Number (Id : E; V : U) is
3301 end Set_Discriminant_Number;
3303 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3305 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3306 Set_Elist26 (Id, V);
3307 end Set_Dispatch_Table_Wrappers;
3309 procedure Set_DT_Entry_Count (Id : E; V : U) is
3311 pragma Assert (Ekind (Id) = E_Component);
3313 end Set_DT_Entry_Count;
3315 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3317 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3319 end Set_DT_Offset_To_Top_Func;
3321 procedure Set_DT_Position (Id : E; V : U) is
3323 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3325 end Set_DT_Position;
3327 procedure Set_DTC_Entity (Id : E; V : E) is
3329 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3333 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3335 pragma Assert (Ekind (Id) = E_Package);
3336 Set_Flag210 (Id, V);
3337 end Set_Elaborate_Body_Desirable;
3339 procedure Set_Elaboration_Entity (Id : E; V : E) is
3344 Ekind (Id) = E_Package
3346 Is_Generic_Unit (Id));
3348 end Set_Elaboration_Entity;
3350 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3355 Ekind (Id) = E_Package
3357 Is_Generic_Unit (Id));
3358 Set_Flag174 (Id, V);
3359 end Set_Elaboration_Entity_Required;
3361 procedure Set_Enclosing_Scope (Id : E; V : E) is
3364 end Set_Enclosing_Scope;
3366 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3368 pragma Assert (Is_Entry (Id));
3369 Set_Flag152 (Id, V);
3370 end Set_Entry_Accepted;
3372 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3375 end Set_Entry_Bodies_Array;
3377 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3380 end Set_Entry_Cancel_Parameter;
3382 procedure Set_Entry_Component (Id : E; V : E) is
3385 end Set_Entry_Component;
3387 procedure Set_Entry_Formal (Id : E; V : E) is
3390 end Set_Entry_Formal;
3392 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3394 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3396 end Set_Entry_Index_Constant;
3398 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3401 end Set_Entry_Parameters_Type;
3403 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3405 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3407 end Set_Enum_Pos_To_Rep;
3409 procedure Set_Enumeration_Pos (Id : E; V : U) is
3411 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3413 end Set_Enumeration_Pos;
3415 procedure Set_Enumeration_Rep (Id : E; V : U) is
3417 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3419 end Set_Enumeration_Rep;
3421 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3423 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3425 end Set_Enumeration_Rep_Expr;
3427 procedure Set_Equivalent_Type (Id : E; V : E) is
3430 (Ekind_In (Id, E_Class_Wide_Type,
3431 E_Class_Wide_Subtype,
3432 E_Access_Protected_Subprogram_Type,
3433 E_Anonymous_Access_Protected_Subprogram_Type,
3434 E_Access_Subprogram_Type,
3437 end Set_Equivalent_Type;
3439 procedure Set_Esize (Id : E; V : U) is
3444 procedure Set_Exception_Code (Id : E; V : U) is
3446 pragma Assert (Ekind (Id) = E_Exception);
3448 end Set_Exception_Code;
3450 procedure Set_Extra_Accessibility (Id : E; V : E) is
3452 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3454 end Set_Extra_Accessibility;
3456 procedure Set_Extra_Constrained (Id : E; V : E) is
3458 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3460 end Set_Extra_Constrained;
3462 procedure Set_Extra_Formal (Id : E; V : E) is
3465 end Set_Extra_Formal;
3467 procedure Set_Extra_Formals (Id : E; V : E) is
3470 (Is_Overloadable (Id)
3471 or else Ekind_In (Id, E_Entry_Family,
3473 E_Subprogram_Type));
3475 end Set_Extra_Formals;
3477 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3480 (Is_Access_Subprogram_Type (Id)
3481 and then Id = Base_Type (Id));
3482 Set_Flag229 (Id, V);
3483 end Set_Can_Use_Internal_Rep;
3485 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3488 end Set_Finalization_Chain_Entity;
3490 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3492 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3493 Set_Flag158 (Id, V);
3494 end Set_Finalize_Storage_Only;
3496 procedure Set_First_Entity (Id : E; V : E) is
3499 end Set_First_Entity;
3501 procedure Set_First_Exit_Statement (Id : E; V : N) is
3503 pragma Assert (Ekind (Id) = E_Loop);
3505 end Set_First_Exit_Statement;
3507 procedure Set_First_Index (Id : E; V : N) is
3509 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3511 end Set_First_Index;
3513 procedure Set_First_Literal (Id : E; V : E) is
3515 pragma Assert (Is_Enumeration_Type (Id));
3517 end Set_First_Literal;
3519 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3521 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3523 end Set_First_Optional_Parameter;
3525 procedure Set_First_Private_Entity (Id : E; V : E) is
3527 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3528 or else Ekind (Id) in Concurrent_Kind);
3530 end Set_First_Private_Entity;
3532 procedure Set_First_Rep_Item (Id : E; V : N) is
3535 end Set_First_Rep_Item;
3537 procedure Set_Float_Rep (Id : E; V : F) is
3538 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3540 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3543 procedure Set_Freeze_Node (Id : E; V : N) is
3546 end Set_Freeze_Node;
3548 procedure Set_From_With_Type (Id : E; V : B := True) is
3552 or else Ekind (Id) = E_Package);
3553 Set_Flag159 (Id, V);
3554 end Set_From_With_Type;
3556 procedure Set_Full_View (Id : E; V : E) is
3558 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3562 procedure Set_Generic_Homonym (Id : E; V : E) is
3565 end Set_Generic_Homonym;
3567 procedure Set_Generic_Renamings (Id : E; V : L) is
3569 Set_Elist23 (Id, V);
3570 end Set_Generic_Renamings;
3572 procedure Set_Handler_Records (Id : E; V : S) is
3575 end Set_Handler_Records;
3577 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3579 pragma Assert (Id = Base_Type (Id));
3580 Set_Flag135 (Id, V);
3581 end Set_Has_Aliased_Components;
3583 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3586 end Set_Has_Alignment_Clause;
3588 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3591 end Set_Has_All_Calls_Remote;
3593 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3595 Set_Flag201 (Id, V);
3596 end Set_Has_Anon_Block_Suffix;
3598 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3600 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3602 end Set_Has_Atomic_Components;
3604 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3607 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3608 Set_Flag139 (Id, V);
3609 end Set_Has_Biased_Representation;
3611 procedure Set_Has_Completion (Id : E; V : B := True) is
3614 end Set_Has_Completion;
3616 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3618 pragma Assert (Is_Type (Id));
3620 end Set_Has_Completion_In_Body;
3622 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3624 pragma Assert (Ekind (Id) = E_Record_Type);
3625 Set_Flag140 (Id, V);
3626 end Set_Has_Complex_Representation;
3628 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3630 pragma Assert (Ekind (Id) = E_Array_Type);
3632 end Set_Has_Component_Size_Clause;
3634 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3636 pragma Assert (Is_Type (Id));
3637 Set_Flag187 (Id, V);
3638 end Set_Has_Constrained_Partial_View;
3640 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3642 Set_Flag181 (Id, V);
3643 end Set_Has_Contiguous_Rep;
3645 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3647 pragma Assert (Id = Base_Type (Id));
3649 end Set_Has_Controlled_Component;
3651 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3654 end Set_Has_Controlling_Result;
3656 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3658 Set_Flag119 (Id, V);
3659 end Set_Has_Convention_Pragma;
3661 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3663 pragma Assert (Nkind (Id) in N_Entity);
3664 Set_Flag200 (Id, V);
3665 end Set_Has_Delayed_Aspects;
3667 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3669 pragma Assert (Nkind (Id) in N_Entity);
3671 end Set_Has_Delayed_Freeze;
3673 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3675 pragma Assert (Nkind (Id) in N_Entity);
3677 end Set_Has_Discriminants;
3679 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3681 pragma Assert (Ekind (Id) = E_Record_Type
3682 and then Is_Tagged_Type (Id));
3683 Set_Flag220 (Id, V);
3684 end Set_Has_Dispatch_Table;
3686 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3688 pragma Assert (Is_Enumeration_Type (Id));
3690 end Set_Has_Enumeration_Rep_Clause;
3692 procedure Set_Has_Exit (Id : E; V : B := True) is
3697 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3699 pragma Assert (Is_Tagged_Type (Id));
3700 Set_Flag110 (Id, V);
3701 end Set_Has_External_Tag_Rep_Clause;
3703 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3705 Set_Flag175 (Id, V);
3706 end Set_Has_Forward_Instantiation;
3708 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3710 Set_Flag173 (Id, V);
3711 end Set_Has_Fully_Qualified_Name;
3713 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3716 end Set_Has_Gigi_Rep_Item;
3718 procedure Set_Has_Homonym (Id : E; V : B := True) is
3721 end Set_Has_Homonym;
3723 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3725 pragma Assert (Is_Type (Id));
3726 Set_Flag248 (Id, V);
3727 end Set_Has_Inheritable_Invariants;
3729 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3731 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3732 Set_Flag219 (Id, V);
3733 end Set_Has_Initial_Value;
3735 procedure Set_Has_Invariants (Id : E; V : B := True) is
3737 pragma Assert (Is_Type (Id)
3738 or else Ekind (Id) = E_Procedure
3739 or else Ekind (Id) = E_Void);
3740 Set_Flag232 (Id, V);
3741 end Set_Has_Invariants;
3743 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3745 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3747 end Set_Has_Machine_Radix_Clause;
3749 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3752 end Set_Has_Master_Entity;
3754 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3756 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3757 Set_Flag142 (Id, V);
3758 end Set_Has_Missing_Return;
3760 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3762 Set_Flag101 (Id, V);
3763 end Set_Has_Nested_Block_With_Handler;
3765 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3767 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3768 Set_Flag215 (Id, V);
3769 end Set_Has_Up_Level_Access;
3771 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3773 pragma Assert (Id = Base_Type (Id));
3775 end Set_Has_Non_Standard_Rep;
3777 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3779 pragma Assert (Is_Type (Id));
3780 Set_Flag172 (Id, V);
3781 end Set_Has_Object_Size_Clause;
3783 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3785 Set_Flag154 (Id, V);
3786 end Set_Has_Per_Object_Constraint;
3788 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3790 Set_Flag188 (Id, V);
3791 end Set_Has_Persistent_BSS;
3793 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3795 pragma Assert (Is_Subprogram (Id));
3796 Set_Flag240 (Id, V);
3797 end Set_Has_Postconditions;
3799 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3801 pragma Assert (Is_Access_Type (Id));
3802 Set_Flag27 (Base_Type (Id), V);
3803 end Set_Has_Pragma_Controlled;
3805 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3807 Set_Flag150 (Id, V);
3808 end Set_Has_Pragma_Elaborate_Body;
3810 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3812 Set_Flag157 (Id, V);
3813 end Set_Has_Pragma_Inline;
3815 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3817 Set_Flag230 (Id, V);
3818 end Set_Has_Pragma_Inline_Always;
3820 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3822 pragma Assert (Is_Enumeration_Type (Id));
3823 pragma Assert (Id = Base_Type (Id));
3824 Set_Flag198 (Id, V);
3825 end Set_Has_Pragma_Ordered;
3827 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3829 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3830 pragma Assert (Id = Base_Type (Id));
3831 Set_Flag121 (Id, V);
3832 end Set_Has_Pragma_Pack;
3834 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3836 Set_Flag221 (Id, V);
3837 end Set_Has_Pragma_Preelab_Init;
3839 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3841 Set_Flag203 (Id, V);
3842 end Set_Has_Pragma_Pure;
3844 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3846 Set_Flag179 (Id, V);
3847 end Set_Has_Pragma_Pure_Function;
3849 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3851 Set_Flag169 (Id, V);
3852 end Set_Has_Pragma_Thread_Local_Storage;
3854 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3856 Set_Flag233 (Id, V);
3857 end Set_Has_Pragma_Unmodified;
3859 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3861 Set_Flag180 (Id, V);
3862 end Set_Has_Pragma_Unreferenced;
3864 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3866 pragma Assert (Is_Type (Id));
3867 Set_Flag212 (Id, V);
3868 end Set_Has_Pragma_Unreferenced_Objects;
3870 procedure Set_Has_Predicates (Id : E; V : B := True) is
3872 Set_Flag250 (Id, V);
3873 end Set_Has_Predicates;
3875 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3877 pragma Assert (Id = Base_Type (Id));
3878 Set_Flag120 (Id, V);
3879 end Set_Has_Primitive_Operations;
3881 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3883 Set_Flag155 (Id, V);
3884 end Set_Has_Private_Declaration;
3886 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3888 Set_Flag161 (Id, V);
3889 end Set_Has_Qualified_Name;
3891 procedure Set_Has_RACW (Id : E; V : B := True) is
3893 pragma Assert (Ekind (Id) = E_Package);
3894 Set_Flag214 (Id, V);
3897 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3899 pragma Assert (Id = Base_Type (Id));
3901 end Set_Has_Record_Rep_Clause;
3903 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3905 pragma Assert (Is_Subprogram (Id));
3906 Set_Flag143 (Id, V);
3907 end Set_Has_Recursive_Call;
3909 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3912 end Set_Has_Size_Clause;
3914 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3917 end Set_Has_Small_Clause;
3919 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3921 pragma Assert (Id = Base_Type (Id));
3922 Set_Flag100 (Id, V);
3923 end Set_Has_Specified_Layout;
3925 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3927 pragma Assert (Is_Type (Id));
3928 Set_Flag190 (Id, V);
3929 end Set_Has_Specified_Stream_Input;
3931 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3933 pragma Assert (Is_Type (Id));
3934 Set_Flag191 (Id, V);
3935 end Set_Has_Specified_Stream_Output;
3937 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3939 pragma Assert (Is_Type (Id));
3940 Set_Flag192 (Id, V);
3941 end Set_Has_Specified_Stream_Read;
3943 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3945 pragma Assert (Is_Type (Id));
3946 Set_Flag193 (Id, V);
3947 end Set_Has_Specified_Stream_Write;
3949 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3951 Set_Flag211 (Id, V);
3952 end Set_Has_Static_Discriminants;
3954 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3956 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3957 pragma Assert (Id = Base_Type (Id));
3959 end Set_Has_Storage_Size_Clause;
3961 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3963 pragma Assert (Is_Elementary_Type (Id));
3964 Set_Flag184 (Id, V);
3965 end Set_Has_Stream_Size_Clause;
3967 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3970 end Set_Has_Subprogram_Descriptor;
3972 procedure Set_Has_Task (Id : E; V : B := True) is
3974 pragma Assert (Id = Base_Type (Id));
3978 procedure Set_Has_Thunks (Id : E; V : B := True) is
3980 pragma Assert (Is_Tag (Id));
3981 Set_Flag228 (Id, V);
3984 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3986 pragma Assert (Id = Base_Type (Id));
3987 Set_Flag123 (Id, V);
3988 end Set_Has_Unchecked_Union;
3990 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3992 pragma Assert (Is_Type (Id));
3994 end Set_Has_Unknown_Discriminants;
3996 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3998 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
4000 end Set_Has_Volatile_Components;
4002 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4004 Set_Flag182 (Id, V);
4005 end Set_Has_Xref_Entry;
4007 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4009 pragma Assert (Ekind (Id) = E_Variable);
4011 end Set_Hiding_Loop_Variable;
4013 procedure Set_Homonym (Id : E; V : E) is
4015 pragma Assert (Id /= V);
4019 procedure Set_Interface_Alias (Id : E; V : E) is
4023 and then Is_Hidden (Id)
4024 and then (Ekind_In (Id, E_Procedure, E_Function)));
4026 end Set_Interface_Alias;
4028 procedure Set_Interfaces (Id : E; V : L) is
4030 pragma Assert (Is_Record_Type (Id));
4031 Set_Elist25 (Id, V);
4034 procedure Set_In_Package_Body (Id : E; V : B := True) is
4037 end Set_In_Package_Body;
4039 procedure Set_In_Private_Part (Id : E; V : B := True) is
4042 end Set_In_Private_Part;
4044 procedure Set_In_Use (Id : E; V : B := True) is
4046 pragma Assert (Nkind (Id) in N_Entity);
4050 procedure Set_Inner_Instances (Id : E; V : L) is
4052 Set_Elist23 (Id, V);
4053 end Set_Inner_Instances;
4055 procedure Set_Interface_Name (Id : E; V : N) is
4058 end Set_Interface_Name;
4060 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4062 pragma Assert (Is_Overloadable (Id));
4064 end Set_Is_Abstract_Subprogram;
4066 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4068 pragma Assert (Is_Type (Id));
4069 Set_Flag146 (Id, V);
4070 end Set_Is_Abstract_Type;
4072 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4074 pragma Assert (Is_Access_Type (Id));
4075 Set_Flag194 (Id, V);
4076 end Set_Is_Local_Anonymous_Access;
4078 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4080 pragma Assert (Is_Access_Type (Id));
4082 end Set_Is_Access_Constant;
4084 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4086 Set_Flag185 (Id, V);
4087 end Set_Is_Ada_2005_Only;
4089 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4091 Set_Flag199 (Id, V);
4092 end Set_Is_Ada_2012_Only;
4094 procedure Set_Is_Aliased (Id : E; V : B := True) is
4096 pragma Assert (Nkind (Id) in N_Entity);
4100 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4102 pragma Assert (Is_Entry (Id));
4103 Set_Flag132 (Id, V);
4104 end Set_Is_AST_Entry;
4106 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4109 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4111 end Set_Is_Asynchronous;
4113 procedure Set_Is_Atomic (Id : E; V : B := True) is
4118 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4120 pragma Assert ((not V)
4121 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4123 Set_Flag122 (Id, V);
4124 end Set_Is_Bit_Packed_Array;
4126 procedure Set_Is_Called (Id : E; V : B := True) is
4128 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4129 Set_Flag102 (Id, V);
4132 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4135 end Set_Is_Character_Type;
4137 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4140 end Set_Is_Child_Unit;
4142 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4145 end Set_Is_Class_Wide_Equivalent_Type;
4147 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4149 Set_Flag149 (Id, V);
4150 end Set_Is_Compilation_Unit;
4152 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4154 pragma Assert (Ekind (Id) = E_Discriminant);
4155 Set_Flag103 (Id, V);
4156 end Set_Is_Completely_Hidden;
4158 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4161 end Set_Is_Concurrent_Record_Type;
4163 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4166 end Set_Is_Constr_Subt_For_U_Nominal;
4168 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4170 Set_Flag141 (Id, V);
4171 end Set_Is_Constr_Subt_For_UN_Aliased;
4173 procedure Set_Is_Constrained (Id : E; V : B := True) is
4175 pragma Assert (Nkind (Id) in N_Entity);
4177 end Set_Is_Constrained;
4179 procedure Set_Is_Constructor (Id : E; V : B := True) is
4182 end Set_Is_Constructor;
4184 procedure Set_Is_Controlled (Id : E; V : B := True) is
4186 pragma Assert (Id = Base_Type (Id));
4188 end Set_Is_Controlled;
4190 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4192 pragma Assert (Is_Formal (Id));
4194 end Set_Is_Controlling_Formal;
4196 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4199 end Set_Is_CPP_Class;
4201 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4203 pragma Assert (Is_Type (Id));
4204 Set_Flag223 (Id, V);
4205 end Set_Is_Descendent_Of_Address;
4207 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4209 Set_Flag176 (Id, V);
4210 end Set_Is_Discrim_SO_Function;
4212 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4214 Set_Flag234 (Id, V);
4215 end Set_Is_Dispatch_Table_Entity;
4217 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4222 Is_Overloadable (Id)
4224 Ekind (Id) = E_Subprogram_Type);
4227 end Set_Is_Dispatching_Operation;
4229 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4231 Set_Flag124 (Id, V);
4232 end Set_Is_Eliminated;
4234 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4237 end Set_Is_Entry_Formal;
4239 procedure Set_Is_Exported (Id : E; V : B := True) is
4242 end Set_Is_Exported;
4244 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4247 end Set_Is_First_Subtype;
4249 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4251 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4252 Set_Flag118 (Id, V);
4253 end Set_Is_For_Access_Subtype;
4255 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4257 Set_Flag111 (Id, V);
4258 end Set_Is_Formal_Subprogram;
4260 procedure Set_Is_Frozen (Id : E; V : B := True) is
4262 pragma Assert (Nkind (Id) in N_Entity);
4266 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4268 pragma Assert (Is_Type (Id));
4270 end Set_Is_Generic_Actual_Type;
4272 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4274 Set_Flag130 (Id, V);
4275 end Set_Is_Generic_Instance;
4277 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4279 pragma Assert (Nkind (Id) in N_Entity);
4281 end Set_Is_Generic_Type;
4283 procedure Set_Is_Hidden (Id : E; V : B := True) is
4288 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4290 Set_Flag171 (Id, V);
4291 end Set_Is_Hidden_Open_Scope;
4293 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4295 pragma Assert (Nkind (Id) in N_Entity);
4297 end Set_Is_Immediately_Visible;
4299 procedure Set_Is_Imported (Id : E; V : B := True) is
4302 end Set_Is_Imported;
4304 procedure Set_Is_Inlined (Id : E; V : B := True) is
4309 procedure Set_Is_Interface (Id : E; V : B := True) is
4312 (Ekind_In (Id, E_Record_Type,
4314 E_Record_Type_With_Private,
4315 E_Record_Subtype_With_Private,
4317 E_Class_Wide_Subtype));
4318 Set_Flag186 (Id, V);
4319 end Set_Is_Interface;
4321 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4323 Set_Flag126 (Id, V);
4324 end Set_Is_Instantiated;
4326 procedure Set_Is_Internal (Id : E; V : B := True) is
4328 pragma Assert (Nkind (Id) in N_Entity);
4330 end Set_Is_Internal;
4332 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4334 pragma Assert (Nkind (Id) in N_Entity);
4336 end Set_Is_Interrupt_Handler;
4338 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4341 end Set_Is_Intrinsic_Subprogram;
4343 procedure Set_Is_Itype (Id : E; V : B := True) is
4348 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4351 end Set_Is_Known_Non_Null;
4353 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4355 Set_Flag204 (Id, V);
4356 end Set_Is_Known_Null;
4358 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4360 Set_Flag170 (Id, V);
4361 end Set_Is_Known_Valid;
4363 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4365 pragma Assert (Is_Type (Id));
4366 Set_Flag106 (Id, V);
4367 end Set_Is_Limited_Composite;
4369 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4371 pragma Assert (Is_Interface (Id));
4372 Set_Flag197 (Id, V);
4373 end Set_Is_Limited_Interface;
4375 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4378 end Set_Is_Limited_Record;
4380 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4382 pragma Assert (Is_Subprogram (Id));
4383 Set_Flag137 (Id, V);
4384 end Set_Is_Machine_Code_Subprogram;
4386 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4388 pragma Assert (Is_Type (Id));
4389 Set_Flag109 (Id, V);
4390 end Set_Is_Non_Static_Subtype;
4392 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4394 pragma Assert (Ekind (Id) = E_Procedure);
4395 Set_Flag178 (Id, V);
4396 end Set_Is_Null_Init_Proc;
4398 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4400 Set_Flag153 (Id, V);
4401 end Set_Is_Obsolescent;
4403 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4405 pragma Assert (Ekind (Id) = E_Out_Parameter);
4406 Set_Flag226 (Id, V);
4407 end Set_Is_Only_Out_Parameter;
4409 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4411 pragma Assert (Is_Formal (Id));
4412 Set_Flag134 (Id, V);
4413 end Set_Is_Optional_Parameter;
4415 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4417 Set_Flag160 (Id, V);
4418 end Set_Is_Package_Body_Entity;
4420 procedure Set_Is_Packed (Id : E; V : B := True) is
4422 pragma Assert (Id = Base_Type (Id));
4426 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4428 Set_Flag138 (Id, V);
4429 end Set_Is_Packed_Array_Type;
4431 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4433 pragma Assert (Nkind (Id) in N_Entity);
4435 end Set_Is_Potentially_Use_Visible;
4437 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4440 end Set_Is_Preelaborated;
4442 procedure Set_Is_Primitive (Id : E; V : B := True) is
4445 (Is_Overloadable (Id)
4446 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4447 Set_Flag218 (Id, V);
4448 end Set_Is_Primitive;
4450 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4452 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4453 Set_Flag195 (Id, V);
4454 end Set_Is_Primitive_Wrapper;
4456 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4458 pragma Assert (Is_Type (Id));
4459 Set_Flag107 (Id, V);
4460 end Set_Is_Private_Composite;
4462 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4465 end Set_Is_Private_Descendant;
4467 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4469 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4470 Set_Flag245 (Id, V);
4471 end Set_Is_Private_Primitive;
4473 procedure Set_Is_Public (Id : E; V : B := True) is
4475 pragma Assert (Nkind (Id) in N_Entity);
4479 procedure Set_Is_Pure (Id : E; V : B := True) is
4484 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4486 pragma Assert (Is_Access_Type (Id));
4487 Set_Flag189 (Id, V);
4488 end Set_Is_Pure_Unit_Access_Type;
4490 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4492 pragma Assert (Is_Type (Id));
4493 Set_Flag244 (Id, V);
4494 end Set_Is_RACW_Stub_Type;
4496 procedure Set_Is_Raised (Id : E; V : B := True) is
4498 pragma Assert (Ekind (Id) = E_Exception);
4499 Set_Flag224 (Id, V);
4502 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4505 end Set_Is_Remote_Call_Interface;
4507 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4510 end Set_Is_Remote_Types;
4512 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4514 Set_Flag112 (Id, V);
4515 end Set_Is_Renaming_Of_Object;
4517 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4519 Set_Flag209 (Id, V);
4520 end Set_Is_Return_Object;
4522 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4525 end Set_Is_Shared_Passive;
4527 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4531 or else Ekind_In (Id, E_Exception,
4536 end Set_Is_Statically_Allocated;
4538 procedure Set_Is_Tag (Id : E; V : B := True) is
4540 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4544 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4547 end Set_Is_Tagged_Type;
4549 procedure Set_Is_Thunk (Id : E; V : B := True) is
4551 Set_Flag225 (Id, V);
4554 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4556 Set_Flag235 (Id, V);
4557 end Set_Is_Trivial_Subprogram;
4559 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4561 Set_Flag163 (Id, V);
4562 end Set_Is_True_Constant;
4564 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4566 pragma Assert (Id = Base_Type (Id));
4567 Set_Flag117 (Id, V);
4568 end Set_Is_Unchecked_Union;
4570 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4572 pragma Assert (Ekind (Id) = E_Record_Type);
4573 Set_Flag246 (Id, V);
4574 end Set_Is_Underlying_Record_View;
4576 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4578 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4579 Set_Flag144 (Id, V);
4580 end Set_Is_Unsigned_Type;
4582 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4584 pragma Assert (Ekind (Id) = E_Procedure);
4585 Set_Flag127 (Id, V);
4586 end Set_Is_Valued_Procedure;
4588 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4590 pragma Assert (Is_Child_Unit (Id));
4591 Set_Flag116 (Id, V);
4592 end Set_Is_Visible_Child_Unit;
4594 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4596 Set_Flag206 (Id, V);
4597 end Set_Is_Visible_Formal;
4599 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4601 pragma Assert (Ekind (Id) = E_Exception);
4602 Set_Flag133 (Id, V);
4603 end Set_Is_VMS_Exception;
4605 procedure Set_Is_Volatile (Id : E; V : B := True) is
4607 pragma Assert (Nkind (Id) in N_Entity);
4609 end Set_Is_Volatile;
4611 procedure Set_Itype_Printed (Id : E; V : B := True) is
4613 pragma Assert (Is_Itype (Id));
4614 Set_Flag202 (Id, V);
4615 end Set_Itype_Printed;
4617 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4620 end Set_Kill_Elaboration_Checks;
4622 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4625 end Set_Kill_Range_Checks;
4627 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4630 end Set_Kill_Tag_Checks;
4632 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4634 pragma Assert (Is_Type (Id));
4635 Set_Flag207 (Id, V);
4636 end Set_Known_To_Have_Preelab_Init;
4638 procedure Set_Last_Assignment (Id : E; V : N) is
4640 pragma Assert (Is_Assignable (Id));
4642 end Set_Last_Assignment;
4644 procedure Set_Last_Entity (Id : E; V : E) is
4647 end Set_Last_Entity;
4649 procedure Set_Limited_View (Id : E; V : E) is
4651 pragma Assert (Ekind (Id) = E_Package);
4653 end Set_Limited_View;
4655 procedure Set_Lit_Indexes (Id : E; V : E) is
4657 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4659 end Set_Lit_Indexes;
4661 procedure Set_Lit_Strings (Id : E; V : E) is
4663 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4665 end Set_Lit_Strings;
4667 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4669 pragma Assert (Is_Formal (Id));
4670 Set_Flag205 (Id, V);
4671 end Set_Low_Bound_Tested;
4673 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4675 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4677 end Set_Machine_Radix_10;
4679 procedure Set_Master_Id (Id : E; V : E) is
4681 pragma Assert (Is_Access_Type (Id));
4685 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4687 Set_Flag168 (Id, V);
4688 end Set_Materialize_Entity;
4690 procedure Set_Mechanism (Id : E; V : M) is
4692 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4693 Set_Uint8 (Id, UI_From_Int (V));
4696 procedure Set_Modulus (Id : E; V : U) is
4698 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4702 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4704 pragma Assert (Is_Type (Id));
4705 Set_Flag183 (Id, V);
4706 end Set_Must_Be_On_Byte_Boundary;
4708 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4710 pragma Assert (Is_Type (Id));
4711 Set_Flag208 (Id, V);
4712 end Set_Must_Have_Preelab_Init;
4714 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4716 Set_Flag147 (Id, V);
4717 end Set_Needs_Debug_Info;
4719 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4722 (Is_Overloadable (Id)
4723 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4725 end Set_Needs_No_Actuals;
4727 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4729 Set_Flag115 (Id, V);
4730 end Set_Never_Set_In_Source;
4732 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4735 end Set_Next_Inlined_Subprogram;
4737 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4739 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4740 Set_Flag131 (Id, V);
4741 end Set_No_Pool_Assigned;
4743 procedure Set_No_Return (Id : E; V : B := True) is
4746 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4747 Set_Flag113 (Id, V);
4750 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4752 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4753 Set_Flag136 (Id, V);
4754 end Set_No_Strict_Aliasing;
4756 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4758 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4760 end Set_Non_Binary_Modulus;
4762 procedure Set_Non_Limited_View (Id : E; V : E) is
4764 pragma Assert (Ekind (Id) in Incomplete_Kind);
4766 end Set_Non_Limited_View;
4768 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4771 (Root_Type (Id) = Standard_Boolean
4772 and then Ekind (Id) = E_Enumeration_Type);
4773 Set_Flag162 (Id, V);
4774 end Set_Nonzero_Is_True;
4776 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4778 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4780 end Set_Normalized_First_Bit;
4782 procedure Set_Normalized_Position (Id : E; V : U) is
4784 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4786 end Set_Normalized_Position;
4788 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4790 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4792 end Set_Normalized_Position_Max;
4794 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4796 pragma Assert (Ekind (Id) = E_Variable);
4797 Set_Flag247 (Id, V);
4798 end Set_OK_To_Rename;
4800 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4803 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4804 Set_Flag239 (Id, V);
4805 end Set_OK_To_Reorder_Components;
4807 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4810 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4811 Set_Flag241 (Id, V);
4812 end Set_Optimize_Alignment_Space;
4814 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4817 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4818 Set_Flag242 (Id, V);
4819 end Set_Optimize_Alignment_Time;
4821 procedure Set_Original_Array_Type (Id : E; V : E) is
4823 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4825 end Set_Original_Array_Type;
4827 procedure Set_Original_Record_Component (Id : E; V : E) is
4829 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4831 end Set_Original_Record_Component;
4833 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4835 Set_Flag243 (Id, V);
4836 end Set_Overlays_Constant;
4838 procedure Set_Overridden_Operation (Id : E; V : E) is
4841 end Set_Overridden_Operation;
4843 procedure Set_Package_Instantiation (Id : E; V : N) is
4845 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4847 end Set_Package_Instantiation;
4849 procedure Set_Packed_Array_Type (Id : E; V : E) is
4851 pragma Assert (Is_Array_Type (Id));
4853 end Set_Packed_Array_Type;
4855 procedure Set_Parent_Subtype (Id : E; V : E) is
4857 pragma Assert (Ekind (Id) = E_Record_Type);
4859 end Set_Parent_Subtype;
4861 procedure Set_Postcondition_Proc (Id : E; V : E) is
4863 pragma Assert (Ekind (Id) = E_Procedure);
4865 end Set_Postcondition_Proc;
4867 procedure Set_PPC_Wrapper (Id : E; V : E) is
4869 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4871 end Set_PPC_Wrapper;
4873 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4875 pragma Assert (Is_Tagged_Type (Id));
4876 Set_Elist10 (Id, V);
4877 end Set_Direct_Primitive_Operations;
4879 procedure Set_Prival (Id : E; V : E) is
4881 pragma Assert (Is_Protected_Component (Id));
4885 procedure Set_Prival_Link (Id : E; V : E) is
4887 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4889 end Set_Prival_Link;
4891 procedure Set_Private_Dependents (Id : E; V : L) is
4893 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4894 Set_Elist18 (Id, V);
4895 end Set_Private_Dependents;
4897 procedure Set_Private_View (Id : E; V : N) is
4899 pragma Assert (Is_Private_Type (Id));
4901 end Set_Private_View;
4903 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4905 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4907 end Set_Protected_Body_Subprogram;
4909 procedure Set_Protected_Formal (Id : E; V : E) is
4911 pragma Assert (Is_Formal (Id));
4913 end Set_Protected_Formal;
4915 procedure Set_Protection_Object (Id : E; V : E) is
4917 pragma Assert (Ekind_In (Id, E_Entry,
4922 end Set_Protection_Object;
4924 procedure Set_Reachable (Id : E; V : B := True) is
4929 procedure Set_Referenced (Id : E; V : B := True) is
4931 Set_Flag156 (Id, V);
4934 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4937 end Set_Referenced_As_LHS;
4939 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4941 Set_Flag227 (Id, V);
4942 end Set_Referenced_As_Out_Parameter;
4944 procedure Set_Register_Exception_Call (Id : E; V : N) is
4946 pragma Assert (Ekind (Id) = E_Exception);
4948 end Set_Register_Exception_Call;
4950 procedure Set_Related_Array_Object (Id : E; V : E) is
4952 pragma Assert (Is_Array_Type (Id));
4954 end Set_Related_Array_Object;
4956 procedure Set_Related_Expression (Id : E; V : N) is
4958 pragma Assert (Ekind (Id) in Type_Kind
4959 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4961 end Set_Related_Expression;
4963 procedure Set_Related_Instance (Id : E; V : E) is
4965 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4967 end Set_Related_Instance;
4969 procedure Set_Related_Type (Id : E; V : E) is
4971 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4973 end Set_Related_Type;
4975 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4977 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4979 end Set_Relative_Deadline_Variable;
4981 procedure Set_Renamed_Entity (Id : E; V : N) is
4984 end Set_Renamed_Entity;
4986 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4988 pragma Assert (Ekind (Id) = E_Package);
4989 Set_Flag231 (Id, V);
4990 end Set_Renamed_In_Spec;
4992 procedure Set_Renamed_Object (Id : E; V : N) is
4995 end Set_Renamed_Object;
4997 procedure Set_Renaming_Map (Id : E; V : U) is
5000 end Set_Renaming_Map;
5002 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5004 pragma Assert (Is_Overloadable (Id));
5005 Set_Flag213 (Id, V);
5006 end Set_Requires_Overriding;
5008 procedure Set_Return_Present (Id : E; V : B := True) is
5011 end Set_Return_Present;
5013 procedure Set_Return_Applies_To (Id : E; V : N) is
5016 end Set_Return_Applies_To;
5018 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5021 end Set_Returns_By_Ref;
5023 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5026 (Is_Record_Type (Id) and then Id = Base_Type (Id));
5027 Set_Flag164 (Id, V);
5028 end Set_Reverse_Bit_Order;
5030 procedure Set_RM_Size (Id : E; V : U) is
5032 pragma Assert (Is_Type (Id));
5036 procedure Set_Scalar_Range (Id : E; V : N) is
5039 end Set_Scalar_Range;
5041 procedure Set_Scale_Value (Id : E; V : U) is
5044 end Set_Scale_Value;
5046 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5048 pragma Assert (not Is_Record_Type (Id));
5050 end Set_Scope_Depth_Value;
5052 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5054 Set_Flag167 (Id, V);
5055 end Set_Sec_Stack_Needed_For_Return;
5057 procedure Set_Shadow_Entities (Id : E; V : S) is
5059 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5061 end Set_Shadow_Entities;
5063 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5065 pragma Assert (Ekind (Id) = E_Variable);
5067 end Set_Shared_Var_Procs_Instance;
5069 procedure Set_Size_Check_Code (Id : E; V : N) is
5071 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5073 end Set_Size_Check_Code;
5075 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5077 Set_Flag177 (Id, V);
5078 end Set_Size_Depends_On_Discriminant;
5080 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5083 end Set_Size_Known_At_Compile_Time;
5085 procedure Set_Small_Value (Id : E; V : R) is
5087 pragma Assert (Is_Fixed_Point_Type (Id));
5088 Set_Ureal21 (Id, V);
5089 end Set_Small_Value;
5091 procedure Set_Spec_Entity (Id : E; V : E) is
5093 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5095 end Set_Spec_Entity;
5097 procedure Set_Spec_PPC_List (Id : E; V : N) is
5100 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5101 or else Is_Subprogram (Id)
5102 or else Is_Generic_Subprogram (Id));
5104 end Set_Spec_PPC_List;
5106 procedure Set_Static_Predicate (Id : E; V : S) is
5109 (Ekind_In (Id, E_Enumeration_Subtype,
5110 E_Modular_Integer_Subtype,
5111 E_Signed_Integer_Subtype)
5112 and then Has_Predicates (Id));
5114 end Set_Static_Predicate;
5116 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5118 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5119 pragma Assert (Id = Base_Type (Id));
5121 end Set_Storage_Size_Variable;
5123 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5125 pragma Assert (Ekind (Id) = E_Package);
5127 end Set_Static_Elaboration_Desired;
5129 procedure Set_Static_Initialization (Id : E; V : N) is
5132 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5134 end Set_Static_Initialization;
5136 procedure Set_Stored_Constraint (Id : E; V : L) is
5138 pragma Assert (Nkind (Id) in N_Entity);
5139 Set_Elist23 (Id, V);
5140 end Set_Stored_Constraint;
5142 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5144 pragma Assert (Id = Base_Type (Id));
5145 Set_Flag145 (Id, V);
5146 end Set_Strict_Alignment;
5148 procedure Set_String_Literal_Length (Id : E; V : U) is
5150 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5152 end Set_String_Literal_Length;
5154 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5156 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5158 end Set_String_Literal_Low_Bound;
5160 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5162 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5164 end Set_Subprograms_For_Type;
5166 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5168 Set_Flag148 (Id, V);
5169 end Set_Suppress_Elaboration_Warnings;
5171 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5173 pragma Assert (Id = Base_Type (Id));
5174 Set_Flag105 (Id, V);
5175 end Set_Suppress_Init_Proc;
5177 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5179 Set_Flag165 (Id, V);
5180 end Set_Suppress_Style_Checks;
5182 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5184 Set_Flag217 (Id, V);
5185 end Set_Suppress_Value_Tracking_On_Call;
5187 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5189 pragma Assert (Ekind (Id) in Task_Kind);
5191 end Set_Task_Body_Procedure;
5193 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5196 end Set_Treat_As_Volatile;
5198 procedure Set_Underlying_Full_View (Id : E; V : E) is
5200 pragma Assert (Ekind (Id) in Private_Kind);
5202 end Set_Underlying_Full_View;
5204 procedure Set_Underlying_Record_View (Id : E; V : E) is
5206 pragma Assert (Ekind (Id) = E_Record_Type);
5208 end Set_Underlying_Record_View;
5210 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5212 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5213 Set_Flag216 (Id, V);
5214 end Set_Universal_Aliasing;
5216 procedure Set_Unset_Reference (Id : E; V : N) is
5219 end Set_Unset_Reference;
5221 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5224 end Set_Uses_Sec_Stack;
5226 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5228 Set_Flag222 (Id, V);
5229 end Set_Used_As_Generic_Actual;
5231 procedure Set_Warnings_Off (Id : E; V : B := True) is
5234 end Set_Warnings_Off;
5236 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5238 Set_Flag236 (Id, V);
5239 end Set_Warnings_Off_Used;
5241 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5243 Set_Flag237 (Id, V);
5244 end Set_Warnings_Off_Used_Unmodified;
5246 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5248 Set_Flag238 (Id, V);
5249 end Set_Warnings_Off_Used_Unreferenced;
5251 procedure Set_Was_Hidden (Id : E; V : B := True) is
5253 Set_Flag196 (Id, V);
5256 procedure Set_Wrapped_Entity (Id : E; V : E) is
5258 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5259 and then Is_Primitive_Wrapper (Id));
5261 end Set_Wrapped_Entity;
5263 -----------------------------------
5264 -- Field Initialization Routines --
5265 -----------------------------------
5267 procedure Init_Alignment (Id : E) is
5269 Set_Uint14 (Id, Uint_0);
5272 procedure Init_Alignment (Id : E; V : Int) is
5274 Set_Uint14 (Id, UI_From_Int (V));
5277 procedure Init_Component_Bit_Offset (Id : E) is
5279 Set_Uint11 (Id, No_Uint);
5280 end Init_Component_Bit_Offset;
5282 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5284 Set_Uint11 (Id, UI_From_Int (V));
5285 end Init_Component_Bit_Offset;
5287 procedure Init_Component_Size (Id : E) is
5289 Set_Uint22 (Id, Uint_0);
5290 end Init_Component_Size;
5292 procedure Init_Component_Size (Id : E; V : Int) is
5294 Set_Uint22 (Id, UI_From_Int (V));
5295 end Init_Component_Size;
5297 procedure Init_Digits_Value (Id : E) is
5299 Set_Uint17 (Id, Uint_0);
5300 end Init_Digits_Value;
5302 procedure Init_Digits_Value (Id : E; V : Int) is
5304 Set_Uint17 (Id, UI_From_Int (V));
5305 end Init_Digits_Value;
5307 procedure Init_Esize (Id : E) is
5309 Set_Uint12 (Id, Uint_0);
5312 procedure Init_Esize (Id : E; V : Int) is
5314 Set_Uint12 (Id, UI_From_Int (V));
5317 procedure Init_Normalized_First_Bit (Id : E) is
5319 Set_Uint8 (Id, No_Uint);
5320 end Init_Normalized_First_Bit;
5322 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5324 Set_Uint8 (Id, UI_From_Int (V));
5325 end Init_Normalized_First_Bit;
5327 procedure Init_Normalized_Position (Id : E) is
5329 Set_Uint14 (Id, No_Uint);
5330 end Init_Normalized_Position;
5332 procedure Init_Normalized_Position (Id : E; V : Int) is
5334 Set_Uint14 (Id, UI_From_Int (V));
5335 end Init_Normalized_Position;
5337 procedure Init_Normalized_Position_Max (Id : E) is
5339 Set_Uint10 (Id, No_Uint);
5340 end Init_Normalized_Position_Max;
5342 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5344 Set_Uint10 (Id, UI_From_Int (V));
5345 end Init_Normalized_Position_Max;
5347 procedure Init_RM_Size (Id : E) is
5349 Set_Uint13 (Id, Uint_0);
5352 procedure Init_RM_Size (Id : E; V : Int) is
5354 Set_Uint13 (Id, UI_From_Int (V));
5357 -----------------------------
5358 -- Init_Component_Location --
5359 -----------------------------
5361 procedure Init_Component_Location (Id : E) is
5363 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5364 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5365 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5366 Set_Uint12 (Id, Uint_0); -- Esize
5367 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5368 end Init_Component_Location;
5374 procedure Init_Size (Id : E; V : Int) is
5376 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5377 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5380 ---------------------
5381 -- Init_Size_Align --
5382 ---------------------
5384 procedure Init_Size_Align (Id : E) is
5386 Set_Uint12 (Id, Uint_0); -- Esize
5387 Set_Uint13 (Id, Uint_0); -- RM_Size
5388 Set_Uint14 (Id, Uint_0); -- Alignment
5389 end Init_Size_Align;
5391 ----------------------------------------------
5392 -- Type Representation Attribute Predicates --
5393 ----------------------------------------------
5395 function Known_Alignment (E : Entity_Id) return B is
5397 return Uint14 (E) /= Uint_0
5398 and then Uint14 (E) /= No_Uint;
5399 end Known_Alignment;
5401 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5403 return Uint11 (E) /= No_Uint;
5404 end Known_Component_Bit_Offset;
5406 function Known_Component_Size (E : Entity_Id) return B is
5408 return Uint22 (Base_Type (E)) /= Uint_0
5409 and then Uint22 (Base_Type (E)) /= No_Uint;
5410 end Known_Component_Size;
5412 function Known_Esize (E : Entity_Id) return B is
5414 return Uint12 (E) /= Uint_0
5415 and then Uint12 (E) /= No_Uint;
5418 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5420 return Uint8 (E) /= No_Uint;
5421 end Known_Normalized_First_Bit;
5423 function Known_Normalized_Position (E : Entity_Id) return B is
5425 return Uint14 (E) /= No_Uint;
5426 end Known_Normalized_Position;
5428 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5430 return Uint10 (E) /= No_Uint;
5431 end Known_Normalized_Position_Max;
5433 function Known_RM_Size (E : Entity_Id) return B is
5435 return Uint13 (E) /= No_Uint
5436 and then (Uint13 (E) /= Uint_0
5437 or else Is_Discrete_Type (E)
5438 or else Is_Fixed_Point_Type (E));
5441 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5443 return Uint11 (E) /= No_Uint
5444 and then Uint11 (E) >= Uint_0;
5445 end Known_Static_Component_Bit_Offset;
5447 function Known_Static_Component_Size (E : Entity_Id) return B is
5449 return Uint22 (Base_Type (E)) > Uint_0;
5450 end Known_Static_Component_Size;
5452 function Known_Static_Esize (E : Entity_Id) return B is
5454 return Uint12 (E) > Uint_0
5455 and then not Is_Generic_Type (E);
5456 end Known_Static_Esize;
5458 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5460 return Uint8 (E) /= No_Uint
5461 and then Uint8 (E) >= Uint_0;
5462 end Known_Static_Normalized_First_Bit;
5464 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5466 return Uint14 (E) /= No_Uint
5467 and then Uint14 (E) >= Uint_0;
5468 end Known_Static_Normalized_Position;
5470 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5472 return Uint10 (E) /= No_Uint
5473 and then Uint10 (E) >= Uint_0;
5474 end Known_Static_Normalized_Position_Max;
5476 function Known_Static_RM_Size (E : Entity_Id) return B is
5478 return (Uint13 (E) > Uint_0
5479 or else Is_Discrete_Type (E)
5480 or else Is_Fixed_Point_Type (E))
5481 and then not Is_Generic_Type (E);
5482 end Known_Static_RM_Size;
5484 function Unknown_Alignment (E : Entity_Id) return B is
5486 return Uint14 (E) = Uint_0
5487 or else Uint14 (E) = No_Uint;
5488 end Unknown_Alignment;
5490 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5492 return Uint11 (E) = No_Uint;
5493 end Unknown_Component_Bit_Offset;
5495 function Unknown_Component_Size (E : Entity_Id) return B is
5497 return Uint22 (Base_Type (E)) = Uint_0
5499 Uint22 (Base_Type (E)) = No_Uint;
5500 end Unknown_Component_Size;
5502 function Unknown_Esize (E : Entity_Id) return B is
5504 return Uint12 (E) = No_Uint
5506 Uint12 (E) = Uint_0;
5509 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5511 return Uint8 (E) = No_Uint;
5512 end Unknown_Normalized_First_Bit;
5514 function Unknown_Normalized_Position (E : Entity_Id) return B is
5516 return Uint14 (E) = No_Uint;
5517 end Unknown_Normalized_Position;
5519 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5521 return Uint10 (E) = No_Uint;
5522 end Unknown_Normalized_Position_Max;
5524 function Unknown_RM_Size (E : Entity_Id) return B is
5526 return (Uint13 (E) = Uint_0
5527 and then not Is_Discrete_Type (E)
5528 and then not Is_Fixed_Point_Type (E))
5529 or else Uint13 (E) = No_Uint;
5530 end Unknown_RM_Size;
5532 --------------------
5533 -- Address_Clause --
5534 --------------------
5536 function Address_Clause (Id : E) return N is
5538 return Rep_Clause (Id, Name_Address);
5545 function Aft_Value (Id : E) return U is
5547 Delta_Val : Ureal := Delta_Value (Id);
5549 while Delta_Val < Ureal_Tenth loop
5550 Delta_Val := Delta_Val * Ureal_10;
5551 Result := Result + 1;
5554 return UI_From_Int (Result);
5557 ----------------------
5558 -- Alignment_Clause --
5559 ----------------------
5561 function Alignment_Clause (Id : E) return N is
5563 return Rep_Clause (Id, Name_Alignment);
5564 end Alignment_Clause;
5570 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5572 if Last_Entity (V) = Empty then
5573 Set_First_Entity (Id => V, V => Id);
5575 Set_Next_Entity (Last_Entity (V), Id);
5578 Set_Next_Entity (Id, Empty);
5580 Set_Last_Entity (Id => V, V => Id);
5587 function Base_Type (Id : E) return E is
5590 when E_Enumeration_Subtype |
5592 E_Signed_Integer_Subtype |
5593 E_Modular_Integer_Subtype |
5594 E_Floating_Point_Subtype |
5595 E_Ordinary_Fixed_Point_Subtype |
5596 E_Decimal_Fixed_Point_Subtype |
5601 E_Record_Subtype_With_Private |
5602 E_Limited_Private_Subtype |
5604 E_Protected_Subtype |
5606 E_String_Literal_Subtype |
5607 E_Class_Wide_Subtype =>
5615 -------------------------
5616 -- Component_Alignment --
5617 -------------------------
5619 -- Component Alignment is encoded using two flags, Flag128/129 as
5620 -- follows. Note that both flags False = Align_Default, so that the
5621 -- default initialization of flags to False initializes component
5622 -- alignment to the default value as required.
5624 -- Flag128 Flag129 Value
5625 -- ------- ------- -----
5626 -- False False Calign_Default
5627 -- False True Calign_Component_Size
5628 -- True False Calign_Component_Size_4
5629 -- True True Calign_Storage_Unit
5631 function Component_Alignment (Id : E) return C is
5632 BT : constant Node_Id := Base_Type (Id);
5635 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5637 if Flag128 (BT) then
5638 if Flag129 (BT) then
5639 return Calign_Storage_Unit;
5641 return Calign_Component_Size_4;
5645 if Flag129 (BT) then
5646 return Calign_Component_Size;
5648 return Calign_Default;
5651 end Component_Alignment;
5653 ----------------------
5654 -- Declaration_Node --
5655 ----------------------
5657 function Declaration_Node (Id : E) return N is
5661 if Ekind (Id) = E_Incomplete_Type
5662 and then Present (Full_View (Id))
5664 P := Parent (Full_View (Id));
5670 if Nkind (P) /= N_Selected_Component
5671 and then Nkind (P) /= N_Expanded_Name
5673 not (Nkind (P) = N_Defining_Program_Unit_Name
5674 and then Is_Child_Unit (Id))
5681 end Declaration_Node;
5683 ---------------------
5684 -- Designated_Type --
5685 ---------------------
5687 function Designated_Type (Id : E) return E is
5691 Desig_Type := Directly_Designated_Type (Id);
5693 if Ekind (Desig_Type) = E_Incomplete_Type
5694 and then Present (Full_View (Desig_Type))
5696 return Full_View (Desig_Type);
5698 elsif Is_Class_Wide_Type (Desig_Type)
5699 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5700 and then Present (Full_View (Etype (Desig_Type)))
5701 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5703 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5708 end Designated_Type;
5710 ----------------------
5711 -- Entry_Index_Type --
5712 ----------------------
5714 function Entry_Index_Type (Id : E) return N is
5716 pragma Assert (Ekind (Id) = E_Entry_Family);
5717 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5718 end Entry_Index_Type;
5720 ---------------------
5721 -- First_Component --
5722 ---------------------
5724 function First_Component (Id : E) return E is
5729 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5731 Comp_Id := First_Entity (Id);
5732 while Present (Comp_Id) loop
5733 exit when Ekind (Comp_Id) = E_Component;
5734 Comp_Id := Next_Entity (Comp_Id);
5738 end First_Component;
5740 -------------------------------------
5741 -- First_Component_Or_Discriminant --
5742 -------------------------------------
5744 function First_Component_Or_Discriminant (Id : E) return E is
5749 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5751 Comp_Id := First_Entity (Id);
5752 while Present (Comp_Id) loop
5753 exit when Ekind (Comp_Id) = E_Component
5755 Ekind (Comp_Id) = E_Discriminant;
5756 Comp_Id := Next_Entity (Comp_Id);
5760 end First_Component_Or_Discriminant;
5766 function First_Formal (Id : E) return E is
5771 (Is_Overloadable (Id)
5772 or else Ekind_In (Id, E_Entry_Family,
5774 E_Subprogram_Type));
5776 if Ekind (Id) = E_Enumeration_Literal then
5780 Formal := First_Entity (Id);
5782 if Present (Formal) and then Is_Formal (Formal) then
5790 ------------------------------
5791 -- First_Formal_With_Extras --
5792 ------------------------------
5794 function First_Formal_With_Extras (Id : E) return E is
5799 (Is_Overloadable (Id)
5800 or else Ekind_In (Id, E_Entry_Family,
5802 E_Subprogram_Type));
5804 if Ekind (Id) = E_Enumeration_Literal then
5808 Formal := First_Entity (Id);
5810 if Present (Formal) and then Is_Formal (Formal) then
5813 return Extra_Formals (Id); -- Empty if no extra formals
5816 end First_Formal_With_Extras;
5818 -------------------------------------
5819 -- Get_Attribute_Definition_Clause --
5820 -------------------------------------
5822 function Get_Attribute_Definition_Clause
5824 Id : Attribute_Id) return Node_Id
5829 N := First_Rep_Item (E);
5830 while Present (N) loop
5831 if Nkind (N) = N_Attribute_Definition_Clause
5832 and then Get_Attribute_Id (Chars (N)) = Id
5841 end Get_Attribute_Definition_Clause;
5847 function Get_Full_View (T : Entity_Id) return Entity_Id is
5849 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5850 return Full_View (T);
5852 elsif Is_Class_Wide_Type (T)
5853 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5854 and then Present (Full_View (Root_Type (T)))
5856 return Class_Wide_Type (Full_View (Root_Type (T)));
5863 --------------------------------------
5864 -- Get_Record_Representation_Clause --
5865 --------------------------------------
5867 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5871 N := First_Rep_Item (E);
5872 while Present (N) loop
5873 if Nkind (N) = N_Record_Representation_Clause then
5881 end Get_Record_Representation_Clause;
5883 -----------------------------
5884 -- Get_Rep_Item_For_Entity --
5885 -----------------------------
5887 function Get_Rep_Item_For_Entity
5889 Nam : Name_Id) return Node_Id
5895 N := First_Rep_Item (E);
5896 while Present (N) loop
5897 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5898 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5900 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5904 elsif Nkind (N) = N_Attribute_Definition_Clause
5905 and then Chars (N) = Nam
5906 and then Entity (N) = E
5910 elsif Nkind (N) = N_Aspect_Specification
5911 and then Chars (Identifier (N)) = Nam
5912 and then Entity (N) = E
5921 end Get_Rep_Item_For_Entity;
5923 --------------------
5924 -- Get_Rep_Pragma --
5925 --------------------
5927 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5931 N := First_Rep_Item (E);
5932 while Present (N) loop
5933 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5943 ------------------------
5944 -- Has_Attach_Handler --
5945 ------------------------
5947 function Has_Attach_Handler (Id : E) return B is
5951 pragma Assert (Is_Protected_Type (Id));
5953 Ritem := First_Rep_Item (Id);
5954 while Present (Ritem) loop
5955 if Nkind (Ritem) = N_Pragma
5956 and then Pragma_Name (Ritem) = Name_Attach_Handler
5960 Next_Rep_Item (Ritem);
5965 end Has_Attach_Handler;
5967 -------------------------------------
5968 -- Has_Attribute_Definition_Clause --
5969 -------------------------------------
5971 function Has_Attribute_Definition_Clause
5973 Id : Attribute_Id) return Boolean
5976 return Present (Get_Attribute_Definition_Clause (E, Id));
5977 end Has_Attribute_Definition_Clause;
5983 function Has_Entries (Id : E) return B is
5987 pragma Assert (Is_Concurrent_Type (Id));
5989 Ent := First_Entity (Id);
5990 while Present (Ent) loop
5991 if Is_Entry (Ent) then
5995 Ent := Next_Entity (Ent);
6001 ----------------------------
6002 -- Has_Foreign_Convention --
6003 ----------------------------
6005 function Has_Foreign_Convention (Id : E) return B is
6007 -- While regular Intrinsics such as the Standard operators fit in the
6008 -- "Ada" convention, those with an Interface_Name materialize GCC
6009 -- builtin imports for which Ada special treatments shouldn't apply.
6011 return Convention (Id) in Foreign_Convention
6012 or else (Convention (Id) = Convention_Intrinsic
6013 and then Present (Interface_Name (Id)));
6014 end Has_Foreign_Convention;
6016 ---------------------------
6017 -- Has_Interrupt_Handler --
6018 ---------------------------
6020 function Has_Interrupt_Handler (Id : E) return B is
6024 pragma Assert (Is_Protected_Type (Id));
6026 Ritem := First_Rep_Item (Id);
6027 while Present (Ritem) loop
6028 if Nkind (Ritem) = N_Pragma
6029 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6033 Next_Rep_Item (Ritem);
6038 end Has_Interrupt_Handler;
6040 --------------------------
6041 -- Has_Private_Ancestor --
6042 --------------------------
6044 function Has_Private_Ancestor (Id : E) return B is
6045 R : constant Entity_Id := Root_Type (Id);
6046 T1 : Entity_Id := Id;
6049 if Is_Private_Type (T1) then
6057 end Has_Private_Ancestor;
6059 --------------------
6060 -- Has_Rep_Pragma --
6061 --------------------
6063 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6065 return Present (Get_Rep_Pragma (E, Nam));
6068 --------------------
6069 -- Has_Unmodified --
6070 --------------------
6072 function Has_Unmodified (E : Entity_Id) return Boolean is
6074 if Has_Pragma_Unmodified (E) then
6076 elsif Warnings_Off (E) then
6077 Set_Warnings_Off_Used_Unmodified (E);
6084 ---------------------
6085 -- Has_Unreferenced --
6086 ---------------------
6088 function Has_Unreferenced (E : Entity_Id) return Boolean is
6090 if Has_Pragma_Unreferenced (E) then
6092 elsif Warnings_Off (E) then
6093 Set_Warnings_Off_Used_Unreferenced (E);
6098 end Has_Unreferenced;
6100 ----------------------
6101 -- Has_Warnings_Off --
6102 ----------------------
6104 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6106 if Warnings_Off (E) then
6107 Set_Warnings_Off_Used (E);
6112 end Has_Warnings_Off;
6114 ------------------------------
6115 -- Implementation_Base_Type --
6116 ------------------------------
6118 function Implementation_Base_Type (Id : E) return E is
6123 Bastyp := Base_Type (Id);
6125 if Is_Incomplete_Or_Private_Type (Bastyp) then
6126 Imptyp := Underlying_Type (Bastyp);
6128 -- If we have an implementation type, then just return it,
6129 -- otherwise we return the Base_Type anyway. This can only
6130 -- happen in error situations and should avoid some error bombs.
6132 if Present (Imptyp) then
6133 return Base_Type (Imptyp);
6141 end Implementation_Base_Type;
6143 -------------------------
6144 -- Invariant_Procedure --
6145 -------------------------
6147 function Invariant_Procedure (Id : E) return E is
6151 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6153 if No (Subprograms_For_Type (Id)) then
6157 S := Subprograms_For_Type (Id);
6158 while Present (S) loop
6159 if Has_Invariants (S) then
6162 S := Subprograms_For_Type (S);
6168 end Invariant_Procedure;
6170 ---------------------
6171 -- Is_Boolean_Type --
6172 ---------------------
6174 function Is_Boolean_Type (Id : E) return B is
6176 return Root_Type (Id) = Standard_Boolean;
6177 end Is_Boolean_Type;
6179 ------------------------
6180 -- Is_Constant_Object --
6181 ------------------------
6183 function Is_Constant_Object (Id : E) return B is
6184 K : constant Entity_Kind := Ekind (Id);
6187 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6188 end Is_Constant_Object;
6190 --------------------
6191 -- Is_Discriminal --
6192 --------------------
6194 function Is_Discriminal (Id : E) return B is
6196 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6197 and then Present (Discriminal_Link (Id)));
6200 ----------------------
6201 -- Is_Dynamic_Scope --
6202 ----------------------
6204 function Is_Dynamic_Scope (Id : E) return B is
6207 Ekind (Id) = E_Block
6209 Ekind (Id) = E_Function
6211 Ekind (Id) = E_Procedure
6213 Ekind (Id) = E_Subprogram_Body
6215 Ekind (Id) = E_Task_Type
6217 (Ekind (Id) = E_Limited_Private_Type
6218 and then Present (Full_View (Id))
6219 and then Ekind (Full_View (Id)) = E_Task_Type)
6221 Ekind (Id) = E_Entry
6223 Ekind (Id) = E_Entry_Family
6225 Ekind (Id) = E_Return_Statement;
6226 end Is_Dynamic_Scope;
6228 --------------------
6229 -- Is_Entity_Name --
6230 --------------------
6232 function Is_Entity_Name (N : Node_Id) return Boolean is
6233 Kind : constant Node_Kind := Nkind (N);
6236 -- Identifiers, operator symbols, expanded names are entity names
6238 return Kind = N_Identifier
6239 or else Kind = N_Operator_Symbol
6240 or else Kind = N_Expanded_Name
6242 -- Attribute references are entity names if they refer to an entity.
6243 -- Note that we don't do this by testing for the presence of the
6244 -- Entity field in the N_Attribute_Reference node, since it may not
6245 -- have been set yet.
6247 or else (Kind = N_Attribute_Reference
6248 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6251 -----------------------------------
6252 -- Is_Package_Or_Generic_Package --
6253 -----------------------------------
6255 function Is_Package_Or_Generic_Package (Id : E) return B is
6258 Ekind (Id) = E_Package
6260 Ekind (Id) = E_Generic_Package;
6261 end Is_Package_Or_Generic_Package;
6263 ------------------------
6264 -- Predicate_Function --
6265 ------------------------
6267 function Predicate_Function (Id : E) return E is
6271 pragma Assert (Is_Type (Id));
6273 if No (Subprograms_For_Type (Id)) then
6277 S := Subprograms_For_Type (Id);
6278 while Present (S) loop
6279 if Has_Predicates (S) then
6282 S := Subprograms_For_Type (S);
6288 end Predicate_Function;
6294 function Is_Prival (Id : E) return B is
6296 return (Ekind_In (Id, E_Constant, E_Variable)
6297 and then Present (Prival_Link (Id)));
6300 ----------------------------
6301 -- Is_Protected_Component --
6302 ----------------------------
6304 function Is_Protected_Component (Id : E) return B is
6306 return Ekind (Id) = E_Component
6307 and then Is_Protected_Type (Scope (Id));
6308 end Is_Protected_Component;
6310 ----------------------------
6311 -- Is_Protected_Interface --
6312 ----------------------------
6314 function Is_Protected_Interface (Id : E) return B is
6315 Typ : constant Entity_Id := Base_Type (Id);
6317 if not Is_Interface (Typ) then
6319 elsif Is_Class_Wide_Type (Typ) then
6320 return Is_Protected_Interface (Etype (Typ));
6322 return Protected_Present (Type_Definition (Parent (Typ)));
6324 end Is_Protected_Interface;
6326 ------------------------------
6327 -- Is_Protected_Record_Type --
6328 ------------------------------
6330 function Is_Protected_Record_Type (Id : E) return B is
6333 Is_Concurrent_Record_Type (Id)
6334 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6335 end Is_Protected_Record_Type;
6337 --------------------------------
6338 -- Is_Standard_Character_Type --
6339 --------------------------------
6341 function Is_Standard_Character_Type (Id : E) return B is
6343 if Is_Type (Id) then
6345 R : constant Entity_Id := Root_Type (Id);
6348 R = Standard_Character
6350 R = Standard_Wide_Character
6352 R = Standard_Wide_Wide_Character;
6358 end Is_Standard_Character_Type;
6360 --------------------
6361 -- Is_String_Type --
6362 --------------------
6364 function Is_String_Type (Id : E) return B is
6366 return Ekind (Id) in String_Kind
6367 or else (Is_Array_Type (Id)
6368 and then Id /= Any_Composite
6369 and then Number_Dimensions (Id) = 1
6370 and then Is_Character_Type (Component_Type (Id)));
6373 -------------------------------
6374 -- Is_Synchronized_Interface --
6375 -------------------------------
6377 function Is_Synchronized_Interface (Id : E) return B is
6378 Typ : constant Entity_Id := Base_Type (Id);
6381 if not Is_Interface (Typ) then
6384 elsif Is_Class_Wide_Type (Typ) then
6385 return Is_Synchronized_Interface (Etype (Typ));
6388 return Protected_Present (Type_Definition (Parent (Typ)))
6389 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6390 or else Task_Present (Type_Definition (Parent (Typ)));
6392 end Is_Synchronized_Interface;
6394 -----------------------
6395 -- Is_Task_Interface --
6396 -----------------------
6398 function Is_Task_Interface (Id : E) return B is
6399 Typ : constant Entity_Id := Base_Type (Id);
6401 if not Is_Interface (Typ) then
6403 elsif Is_Class_Wide_Type (Typ) then
6404 return Is_Task_Interface (Etype (Typ));
6406 return Task_Present (Type_Definition (Parent (Typ)));
6408 end Is_Task_Interface;
6410 -------------------------
6411 -- Is_Task_Record_Type --
6412 -------------------------
6414 function Is_Task_Record_Type (Id : E) return B is
6417 Is_Concurrent_Record_Type (Id)
6418 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6419 end Is_Task_Record_Type;
6421 ------------------------
6422 -- Is_Wrapper_Package --
6423 ------------------------
6425 function Is_Wrapper_Package (Id : E) return B is
6427 return (Ekind (Id) = E_Package
6428 and then Present (Related_Instance (Id)));
6429 end Is_Wrapper_Package;
6435 function Last_Formal (Id : E) return E is
6440 (Is_Overloadable (Id)
6441 or else Ekind_In (Id, E_Entry_Family,
6443 E_Subprogram_Type));
6445 if Ekind (Id) = E_Enumeration_Literal then
6449 Formal := First_Formal (Id);
6451 if Present (Formal) then
6452 while Present (Next_Formal (Formal)) loop
6453 Formal := Next_Formal (Formal);
6461 function Model_Emin_Value (Id : E) return Uint is
6463 return Machine_Emin_Value (Id);
6464 end Model_Emin_Value;
6466 -------------------------
6467 -- Model_Epsilon_Value --
6468 -------------------------
6470 function Model_Epsilon_Value (Id : E) return Ureal is
6471 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6473 return Radix ** (1 - Model_Mantissa_Value (Id));
6474 end Model_Epsilon_Value;
6476 --------------------------
6477 -- Model_Mantissa_Value --
6478 --------------------------
6480 function Model_Mantissa_Value (Id : E) return Uint is
6482 return Machine_Mantissa_Value (Id);
6483 end Model_Mantissa_Value;
6485 -----------------------
6486 -- Model_Small_Value --
6487 -----------------------
6489 function Model_Small_Value (Id : E) return Ureal is
6490 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6492 return Radix ** (Model_Emin_Value (Id) - 1);
6493 end Model_Small_Value;
6495 ------------------------
6496 -- Machine_Emax_Value --
6497 ------------------------
6499 function Machine_Emax_Value (Id : E) return Uint is
6500 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6503 case Float_Rep (Id) is
6506 when 1 .. 6 => return Uint_128;
6507 when 7 .. 15 => return 2**10;
6508 when 16 .. 18 => return 2**14;
6509 when others => return No_Uint;
6514 when 1 .. 9 => return 2**7 - 1;
6515 when 10 .. 15 => return 2**10 - 1;
6516 when others => return No_Uint;
6520 return Uint_2 ** Uint_7 - Uint_1;
6522 end Machine_Emax_Value;
6524 ------------------------
6525 -- Machine_Emin_Value --
6526 ------------------------
6528 function Machine_Emin_Value (Id : E) return Uint is
6530 case Float_Rep (Id) is
6531 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6532 when VAX_Native => return -Machine_Emax_Value (Id);
6533 when AAMP => return -Machine_Emax_Value (Id);
6535 end Machine_Emin_Value;
6537 ----------------------------
6538 -- Machine_Mantissa_Value --
6539 ----------------------------
6541 function Machine_Mantissa_Value (Id : E) return Uint is
6542 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6545 case Float_Rep (Id) is
6548 when 1 .. 6 => return Uint_24;
6549 when 7 .. 15 => return UI_From_Int (53);
6550 when 16 .. 18 => return Uint_64;
6551 when others => return No_Uint;
6556 when 1 .. 6 => return Uint_24;
6557 when 7 .. 9 => return UI_From_Int (56);
6558 when 10 .. 15 => return UI_From_Int (53);
6559 when others => return No_Uint;
6564 when 1 .. 6 => return Uint_24;
6565 when 7 .. 9 => return UI_From_Int (40);
6566 when others => return No_Uint;
6569 end Machine_Mantissa_Value;
6571 -------------------------
6572 -- Machine_Radix_Value --
6573 -------------------------
6575 function Machine_Radix_Value (Id : E) return U is
6577 case Float_Rep (Id) is
6578 when IEEE_Binary | VAX_Native | AAMP =>
6581 end Machine_Radix_Value;
6583 --------------------
6584 -- Next_Component --
6585 --------------------
6587 function Next_Component (Id : E) return E is
6591 Comp_Id := Next_Entity (Id);
6592 while Present (Comp_Id) loop
6593 exit when Ekind (Comp_Id) = E_Component;
6594 Comp_Id := Next_Entity (Comp_Id);
6600 ------------------------------------
6601 -- Next_Component_Or_Discriminant --
6602 ------------------------------------
6604 function Next_Component_Or_Discriminant (Id : E) return E is
6608 Comp_Id := Next_Entity (Id);
6609 while Present (Comp_Id) loop
6610 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6611 Comp_Id := Next_Entity (Comp_Id);
6615 end Next_Component_Or_Discriminant;
6617 -----------------------
6618 -- Next_Discriminant --
6619 -----------------------
6621 -- This function actually implements both Next_Discriminant and
6622 -- Next_Stored_Discriminant by making sure that the Discriminant
6623 -- returned is of the same variety as Id.
6625 function Next_Discriminant (Id : E) return E is
6627 -- Derived Tagged types with private extensions look like this...
6629 -- E_Discriminant d1
6630 -- E_Discriminant d2
6632 -- E_Discriminant d1
6633 -- E_Discriminant d2
6636 -- so it is critical not to go past the leading discriminants
6641 pragma Assert (Ekind (Id) = E_Discriminant);
6644 D := Next_Entity (D);
6646 or else (Ekind (D) /= E_Discriminant
6647 and then not Is_Itype (D))
6652 exit when Ekind (D) = E_Discriminant
6653 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6657 end Next_Discriminant;
6663 function Next_Formal (Id : E) return E is
6667 -- Follow the chain of declared entities as long as the kind of the
6668 -- entity corresponds to a formal parameter. Skip internal entities
6669 -- that may have been created for implicit subtypes, in the process
6670 -- of analyzing default expressions.
6674 P := Next_Entity (P);
6676 if No (P) or else Is_Formal (P) then
6678 elsif not Is_Internal (P) then
6684 -----------------------------
6685 -- Next_Formal_With_Extras --
6686 -----------------------------
6688 function Next_Formal_With_Extras (Id : E) return E is
6690 if Present (Extra_Formal (Id)) then
6691 return Extra_Formal (Id);
6693 return Next_Formal (Id);
6695 end Next_Formal_With_Extras;
6701 function Next_Index (Id : Node_Id) return Node_Id is
6710 function Next_Literal (Id : E) return E is
6712 pragma Assert (Nkind (Id) in N_Entity);
6716 ------------------------------
6717 -- Next_Stored_Discriminant --
6718 ------------------------------
6720 function Next_Stored_Discriminant (Id : E) return E is
6722 -- See comment in Next_Discriminant
6724 return Next_Discriminant (Id);
6725 end Next_Stored_Discriminant;
6727 -----------------------
6728 -- Number_Dimensions --
6729 -----------------------
6731 function Number_Dimensions (Id : E) return Pos is
6736 if Ekind (Id) in String_Kind then
6741 T := First_Index (Id);
6742 while Present (T) loop
6749 end Number_Dimensions;
6751 --------------------
6752 -- Number_Entries --
6753 --------------------
6755 function Number_Entries (Id : E) return Nat is
6760 pragma Assert (Is_Concurrent_Type (Id));
6763 Ent := First_Entity (Id);
6764 while Present (Ent) loop
6765 if Is_Entry (Ent) then
6769 Ent := Next_Entity (Ent);
6775 --------------------
6776 -- Number_Formals --
6777 --------------------
6779 function Number_Formals (Id : E) return Pos is
6785 Formal := First_Formal (Id);
6786 while Present (Formal) loop
6788 Formal := Next_Formal (Formal);
6794 --------------------
6795 -- Parameter_Mode --
6796 --------------------
6798 function Parameter_Mode (Id : E) return Formal_Kind is
6803 --------------------------
6804 -- Primitive_Operations --
6805 --------------------------
6807 function Primitive_Operations (Id : E) return L is
6809 if Is_Concurrent_Type (Id) then
6810 if Present (Corresponding_Record_Type (Id)) then
6811 return Direct_Primitive_Operations
6812 (Corresponding_Record_Type (Id));
6817 return Direct_Primitive_Operations (Id);
6819 end Primitive_Operations;
6821 ---------------------
6822 -- Record_Rep_Item --
6823 ---------------------
6825 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6827 Set_Next_Rep_Item (N, First_Rep_Item (E));
6828 Set_First_Rep_Item (E, N);
6829 end Record_Rep_Item;
6835 function Root_Type (Id : E) return E is
6839 pragma Assert (Nkind (Id) in N_Entity);
6841 T := Base_Type (Id);
6843 if Ekind (T) = E_Class_Wide_Type then
6846 elsif Ekind (T) = E_Class_Wide_Subtype then
6847 return Etype (Base_Type (T));
6849 -- ??? T comes from Base_Type, how can it be a subtype?
6850 -- Also Base_Type is supposed to be idempotent, so either way
6851 -- this is equivalent to "return Etype (T)" and should be merged
6852 -- with the E_Class_Wide_Type case.
6863 -- Following test catches some error cases resulting from
6866 elsif No (Etyp) then
6869 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6872 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6878 -- Return if there is a circularity in the inheritance chain. This
6879 -- happens in some error situations and we do not want to get
6880 -- stuck in this loop.
6882 if T = Base_Type (Id) then
6889 ---------------------
6890 -- Safe_Emax_Value --
6891 ---------------------
6893 function Safe_Emax_Value (Id : E) return Uint is
6895 return Machine_Emax_Value (Id);
6896 end Safe_Emax_Value;
6898 ----------------------
6899 -- Safe_First_Value --
6900 ----------------------
6902 function Safe_First_Value (Id : E) return Ureal is
6904 return -Safe_Last_Value (Id);
6905 end Safe_First_Value;
6907 ---------------------
6908 -- Safe_Last_Value --
6909 ---------------------
6911 function Safe_Last_Value (Id : E) return Ureal is
6912 Radix : constant Uint := Machine_Radix_Value (Id);
6913 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
6914 Emax : constant Uint := Safe_Emax_Value (Id);
6915 Significand : constant Uint := Radix ** Mantissa - 1;
6916 Exponent : constant Uint := Emax - Mantissa;
6922 (Num => Significand * 2 ** (Exponent mod 4),
6923 Den => -Exponent / 4,
6929 (Num => Significand,
6933 end Safe_Last_Value;
6939 function Scope_Depth (Id : E) return Uint is
6944 while Is_Record_Type (Scop) loop
6945 Scop := Scope (Scop);
6948 return Scope_Depth_Value (Scop);
6951 ---------------------
6952 -- Scope_Depth_Set --
6953 ---------------------
6955 function Scope_Depth_Set (Id : E) return B is
6957 return not Is_Record_Type (Id)
6958 and then Field22 (Id) /= Union_Id (Empty);
6959 end Scope_Depth_Set;
6961 -----------------------------
6962 -- Set_Component_Alignment --
6963 -----------------------------
6965 -- Component Alignment is encoded using two flags, Flag128/129 as
6966 -- follows. Note that both flags False = Align_Default, so that the
6967 -- default initialization of flags to False initializes component
6968 -- alignment to the default value as required.
6970 -- Flag128 Flag129 Value
6971 -- ------- ------- -----
6972 -- False False Calign_Default
6973 -- False True Calign_Component_Size
6974 -- True False Calign_Component_Size_4
6975 -- True True Calign_Storage_Unit
6977 procedure Set_Component_Alignment (Id : E; V : C) is
6979 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6980 and then Id = Base_Type (Id));
6983 when Calign_Default =>
6984 Set_Flag128 (Id, False);
6985 Set_Flag129 (Id, False);
6987 when Calign_Component_Size =>
6988 Set_Flag128 (Id, False);
6989 Set_Flag129 (Id, True);
6991 when Calign_Component_Size_4 =>
6992 Set_Flag128 (Id, True);
6993 Set_Flag129 (Id, False);
6995 when Calign_Storage_Unit =>
6996 Set_Flag128 (Id, True);
6997 Set_Flag129 (Id, True);
6999 end Set_Component_Alignment;
7001 -----------------------------
7002 -- Set_Invariant_Procedure --
7003 -----------------------------
7005 procedure Set_Invariant_Procedure (Id : E; V : E) is
7009 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7011 S := Subprograms_For_Type (Id);
7012 Set_Subprograms_For_Type (Id, V);
7014 while Present (S) loop
7015 if Has_Invariants (S) then
7016 raise Program_Error;
7018 S := Subprograms_For_Type (S);
7022 Set_Subprograms_For_Type (Id, V);
7023 end Set_Invariant_Procedure;
7025 ----------------------------
7026 -- Set_Predicate_Function --
7027 ----------------------------
7029 procedure Set_Predicate_Function (Id : E; V : E) is
7033 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7035 S := Subprograms_For_Type (Id);
7036 Set_Subprograms_For_Type (Id, V);
7038 while Present (S) loop
7039 if Has_Predicates (S) then
7040 raise Program_Error;
7042 S := Subprograms_For_Type (S);
7046 Set_Subprograms_For_Type (Id, V);
7047 end Set_Predicate_Function;
7053 function Size_Clause (Id : E) return N is
7055 return Rep_Clause (Id, Name_Size);
7058 ------------------------
7059 -- Stream_Size_Clause --
7060 ------------------------
7062 function Stream_Size_Clause (Id : E) return N is
7064 return Rep_Clause (Id, Name_Stream_Size);
7065 end Stream_Size_Clause;
7071 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7077 Kind := E_Access_Subtype;
7081 Kind := E_Array_Subtype;
7083 when E_Class_Wide_Type |
7084 E_Class_Wide_Subtype =>
7085 Kind := E_Class_Wide_Subtype;
7087 when E_Decimal_Fixed_Point_Type |
7088 E_Decimal_Fixed_Point_Subtype =>
7089 Kind := E_Decimal_Fixed_Point_Subtype;
7091 when E_Ordinary_Fixed_Point_Type |
7092 E_Ordinary_Fixed_Point_Subtype =>
7093 Kind := E_Ordinary_Fixed_Point_Subtype;
7095 when E_Private_Type |
7096 E_Private_Subtype =>
7097 Kind := E_Private_Subtype;
7099 when E_Limited_Private_Type |
7100 E_Limited_Private_Subtype =>
7101 Kind := E_Limited_Private_Subtype;
7103 when E_Record_Type_With_Private |
7104 E_Record_Subtype_With_Private =>
7105 Kind := E_Record_Subtype_With_Private;
7107 when E_Record_Type |
7109 Kind := E_Record_Subtype;
7111 when E_String_Type |
7113 Kind := E_String_Subtype;
7115 when Enumeration_Kind =>
7116 Kind := E_Enumeration_Subtype;
7119 Kind := E_Floating_Point_Subtype;
7121 when Signed_Integer_Kind =>
7122 Kind := E_Signed_Integer_Subtype;
7124 when Modular_Integer_Kind =>
7125 Kind := E_Modular_Integer_Subtype;
7127 when Protected_Kind =>
7128 Kind := E_Protected_Subtype;
7131 Kind := E_Task_Subtype;
7135 raise Program_Error;
7141 ---------------------
7142 -- Type_High_Bound --
7143 ---------------------
7145 function Type_High_Bound (Id : E) return Node_Id is
7146 Rng : constant Node_Id := Scalar_Range (Id);
7148 if Nkind (Rng) = N_Subtype_Indication then
7149 return High_Bound (Range_Expression (Constraint (Rng)));
7151 return High_Bound (Rng);
7153 end Type_High_Bound;
7155 --------------------
7156 -- Type_Low_Bound --
7157 --------------------
7159 function Type_Low_Bound (Id : E) return Node_Id is
7160 Rng : constant Node_Id := Scalar_Range (Id);
7162 if Nkind (Rng) = N_Subtype_Indication then
7163 return Low_Bound (Range_Expression (Constraint (Rng)));
7165 return Low_Bound (Rng);
7169 ---------------------
7170 -- Underlying_Type --
7171 ---------------------
7173 function Underlying_Type (Id : E) return E is
7175 -- For record_with_private the underlying type is always the direct
7176 -- full view. Never try to take the full view of the parent it
7177 -- doesn't make sense.
7179 if Ekind (Id) = E_Record_Type_With_Private then
7180 return Full_View (Id);
7182 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7184 -- If we have an incomplete or private type with a full view,
7185 -- then we return the Underlying_Type of this full view
7187 if Present (Full_View (Id)) then
7188 if Id = Full_View (Id) then
7190 -- Previous error in declaration
7195 return Underlying_Type (Full_View (Id));
7198 -- If we have an incomplete entity that comes from the limited
7199 -- view then we return the Underlying_Type of its non-limited
7202 elsif From_With_Type (Id)
7203 and then Present (Non_Limited_View (Id))
7205 return Underlying_Type (Non_Limited_View (Id));
7207 -- Otherwise check for the case where we have a derived type or
7208 -- subtype, and if so get the Underlying_Type of the parent type.
7210 elsif Etype (Id) /= Id then
7211 return Underlying_Type (Etype (Id));
7213 -- Otherwise we have an incomplete or private type that has
7214 -- no full view, which means that we have not encountered the
7215 -- completion, so return Empty to indicate the underlying type
7216 -- is not yet known.
7222 -- For non-incomplete, non-private types, return the type itself
7223 -- Also for entities that are not types at all return the entity
7229 end Underlying_Type;
7235 function Vax_Float (Id : E) return B is
7237 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7240 ------------------------
7241 -- Write_Entity_Flags --
7242 ------------------------
7244 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7246 procedure W (Flag_Name : String; Flag : Boolean);
7247 -- Write out given flag if it is set
7253 procedure W (Flag_Name : String; Flag : Boolean) is
7257 Write_Str (Flag_Name);
7258 Write_Str (" = True");
7263 -- Start of processing for Write_Entity_Flags
7266 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7267 and then Id = Base_Type (Id)
7270 Write_Str ("Component_Alignment = ");
7272 case Component_Alignment (Id) is
7273 when Calign_Default =>
7274 Write_Str ("Calign_Default");
7276 when Calign_Component_Size =>
7277 Write_Str ("Calign_Component_Size");
7279 when Calign_Component_Size_4 =>
7280 Write_Str ("Calign_Component_Size_4");
7282 when Calign_Storage_Unit =>
7283 Write_Str ("Calign_Storage_Unit");
7289 W ("Address_Taken", Flag104 (Id));
7290 W ("Body_Needed_For_SAL", Flag40 (Id));
7291 W ("C_Pass_By_Copy", Flag125 (Id));
7292 W ("Can_Never_Be_Null", Flag38 (Id));
7293 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7294 W ("Debug_Info_Off", Flag166 (Id));
7295 W ("Default_Expressions_Processed", Flag108 (Id));
7296 W ("Delay_Cleanups", Flag114 (Id));
7297 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7298 W ("Depends_On_Private", Flag14 (Id));
7299 W ("Discard_Names", Flag88 (Id));
7300 W ("Elaboration_Entity_Required", Flag174 (Id));
7301 W ("Elaborate_Body_Desirable", Flag210 (Id));
7302 W ("Entry_Accepted", Flag152 (Id));
7303 W ("Can_Use_Internal_Rep", Flag229 (Id));
7304 W ("Finalize_Storage_Only", Flag158 (Id));
7305 W ("From_With_Type", Flag159 (Id));
7306 W ("Has_Aliased_Components", Flag135 (Id));
7307 W ("Has_Alignment_Clause", Flag46 (Id));
7308 W ("Has_All_Calls_Remote", Flag79 (Id));
7309 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7310 W ("Has_Atomic_Components", Flag86 (Id));
7311 W ("Has_Biased_Representation", Flag139 (Id));
7312 W ("Has_Completion", Flag26 (Id));
7313 W ("Has_Completion_In_Body", Flag71 (Id));
7314 W ("Has_Complex_Representation", Flag140 (Id));
7315 W ("Has_Component_Size_Clause", Flag68 (Id));
7316 W ("Has_Contiguous_Rep", Flag181 (Id));
7317 W ("Has_Controlled_Component", Flag43 (Id));
7318 W ("Has_Controlling_Result", Flag98 (Id));
7319 W ("Has_Convention_Pragma", Flag119 (Id));
7320 W ("Has_Delayed_Aspects", Flag200 (Id));
7321 W ("Has_Delayed_Freeze", Flag18 (Id));
7322 W ("Has_Discriminants", Flag5 (Id));
7323 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7324 W ("Has_Exit", Flag47 (Id));
7325 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7326 W ("Has_Forward_Instantiation", Flag175 (Id));
7327 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7328 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7329 W ("Has_Homonym", Flag56 (Id));
7330 W ("Has_Inheritable_Invariants", Flag248 (Id));
7331 W ("Has_Initial_Value", Flag219 (Id));
7332 W ("Has_Invariants", Flag232 (Id));
7333 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7334 W ("Has_Master_Entity", Flag21 (Id));
7335 W ("Has_Missing_Return", Flag142 (Id));
7336 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7337 W ("Has_Non_Standard_Rep", Flag75 (Id));
7338 W ("Has_Object_Size_Clause", Flag172 (Id));
7339 W ("Has_Per_Object_Constraint", Flag154 (Id));
7340 W ("Has_Persistent_BSS", Flag188 (Id));
7341 W ("Has_Postconditions", Flag240 (Id));
7342 W ("Has_Pragma_Controlled", Flag27 (Id));
7343 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7344 W ("Has_Pragma_Inline", Flag157 (Id));
7345 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7346 W ("Has_Pragma_Ordered", Flag198 (Id));
7347 W ("Has_Pragma_Pack", Flag121 (Id));
7348 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7349 W ("Has_Pragma_Pure", Flag203 (Id));
7350 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7351 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7352 W ("Has_Pragma_Unmodified", Flag233 (Id));
7353 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7354 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7355 W ("Has_Predicates", Flag250 (Id));
7356 W ("Has_Primitive_Operations", Flag120 (Id));
7357 W ("Has_Private_Declaration", Flag155 (Id));
7358 W ("Has_Qualified_Name", Flag161 (Id));
7359 W ("Has_RACW", Flag214 (Id));
7360 W ("Has_Record_Rep_Clause", Flag65 (Id));
7361 W ("Has_Recursive_Call", Flag143 (Id));
7362 W ("Has_Size_Clause", Flag29 (Id));
7363 W ("Has_Small_Clause", Flag67 (Id));
7364 W ("Has_Specified_Layout", Flag100 (Id));
7365 W ("Has_Specified_Stream_Input", Flag190 (Id));
7366 W ("Has_Specified_Stream_Output", Flag191 (Id));
7367 W ("Has_Specified_Stream_Read", Flag192 (Id));
7368 W ("Has_Specified_Stream_Write", Flag193 (Id));
7369 W ("Has_Static_Discriminants", Flag211 (Id));
7370 W ("Has_Storage_Size_Clause", Flag23 (Id));
7371 W ("Has_Stream_Size_Clause", Flag184 (Id));
7372 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7373 W ("Has_Task", Flag30 (Id));
7374 W ("Has_Thunks", Flag228 (Id));
7375 W ("Has_Unchecked_Union", Flag123 (Id));
7376 W ("Has_Unknown_Discriminants", Flag72 (Id));
7377 W ("Has_Up_Level_Access", Flag215 (Id));
7378 W ("Has_Volatile_Components", Flag87 (Id));
7379 W ("Has_Xref_Entry", Flag182 (Id));
7380 W ("In_Package_Body", Flag48 (Id));
7381 W ("In_Private_Part", Flag45 (Id));
7382 W ("In_Use", Flag8 (Id));
7383 W ("Is_AST_Entry", Flag132 (Id));
7384 W ("Is_Abstract_Subprogram", Flag19 (Id));
7385 W ("Is_Abstract_Type", Flag146 (Id));
7386 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7387 W ("Is_Access_Constant", Flag69 (Id));
7388 W ("Is_Ada_2005_Only", Flag185 (Id));
7389 W ("Is_Ada_2012_Only", Flag199 (Id));
7390 W ("Is_Aliased", Flag15 (Id));
7391 W ("Is_Asynchronous", Flag81 (Id));
7392 W ("Is_Atomic", Flag85 (Id));
7393 W ("Is_Bit_Packed_Array", Flag122 (Id));
7394 W ("Is_CPP_Class", Flag74 (Id));
7395 W ("Is_Called", Flag102 (Id));
7396 W ("Is_Character_Type", Flag63 (Id));
7397 W ("Is_Child_Unit", Flag73 (Id));
7398 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7399 W ("Is_Compilation_Unit", Flag149 (Id));
7400 W ("Is_Completely_Hidden", Flag103 (Id));
7401 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7402 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7403 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7404 W ("Is_Constrained", Flag12 (Id));
7405 W ("Is_Constructor", Flag76 (Id));
7406 W ("Is_Controlled", Flag42 (Id));
7407 W ("Is_Controlling_Formal", Flag97 (Id));
7408 W ("Is_Descendent_Of_Address", Flag223 (Id));
7409 W ("Is_Discrim_SO_Function", Flag176 (Id));
7410 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7411 W ("Is_Dispatching_Operation", Flag6 (Id));
7412 W ("Is_Eliminated", Flag124 (Id));
7413 W ("Is_Entry_Formal", Flag52 (Id));
7414 W ("Is_Exported", Flag99 (Id));
7415 W ("Is_First_Subtype", Flag70 (Id));
7416 W ("Is_For_Access_Subtype", Flag118 (Id));
7417 W ("Is_Formal_Subprogram", Flag111 (Id));
7418 W ("Is_Frozen", Flag4 (Id));
7419 W ("Is_Generic_Actual_Type", Flag94 (Id));
7420 W ("Is_Generic_Instance", Flag130 (Id));
7421 W ("Is_Generic_Type", Flag13 (Id));
7422 W ("Is_Hidden", Flag57 (Id));
7423 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7424 W ("Is_Immediately_Visible", Flag7 (Id));
7425 W ("Is_Imported", Flag24 (Id));
7426 W ("Is_Inlined", Flag11 (Id));
7427 W ("Is_Instantiated", Flag126 (Id));
7428 W ("Is_Interface", Flag186 (Id));
7429 W ("Is_Internal", Flag17 (Id));
7430 W ("Is_Interrupt_Handler", Flag89 (Id));
7431 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7432 W ("Is_Itype", Flag91 (Id));
7433 W ("Is_Known_Non_Null", Flag37 (Id));
7434 W ("Is_Known_Null", Flag204 (Id));
7435 W ("Is_Known_Valid", Flag170 (Id));
7436 W ("Is_Limited_Composite", Flag106 (Id));
7437 W ("Is_Limited_Interface", Flag197 (Id));
7438 W ("Is_Limited_Record", Flag25 (Id));
7439 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7440 W ("Is_Non_Static_Subtype", Flag109 (Id));
7441 W ("Is_Null_Init_Proc", Flag178 (Id));
7442 W ("Is_Obsolescent", Flag153 (Id));
7443 W ("Is_Only_Out_Parameter", Flag226 (Id));
7444 W ("Is_Optional_Parameter", Flag134 (Id));
7445 W ("Is_Package_Body_Entity", Flag160 (Id));
7446 W ("Is_Packed", Flag51 (Id));
7447 W ("Is_Packed_Array_Type", Flag138 (Id));
7448 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7449 W ("Is_Preelaborated", Flag59 (Id));
7450 W ("Is_Primitive", Flag218 (Id));
7451 W ("Is_Primitive_Wrapper", Flag195 (Id));
7452 W ("Is_Private_Composite", Flag107 (Id));
7453 W ("Is_Private_Descendant", Flag53 (Id));
7454 W ("Is_Private_Primitive", Flag245 (Id));
7455 W ("Is_Public", Flag10 (Id));
7456 W ("Is_Pure", Flag44 (Id));
7457 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7458 W ("Is_RACW_Stub_Type", Flag244 (Id));
7459 W ("Is_Raised", Flag224 (Id));
7460 W ("Is_Remote_Call_Interface", Flag62 (Id));
7461 W ("Is_Remote_Types", Flag61 (Id));
7462 W ("Is_Renaming_Of_Object", Flag112 (Id));
7463 W ("Is_Return_Object", Flag209 (Id));
7464 W ("Is_Shared_Passive", Flag60 (Id));
7465 W ("Is_Statically_Allocated", Flag28 (Id));
7466 W ("Is_Tag", Flag78 (Id));
7467 W ("Is_Tagged_Type", Flag55 (Id));
7468 W ("Is_Thunk", Flag225 (Id));
7469 W ("Is_Trivial_Subprogram", Flag235 (Id));
7470 W ("Is_True_Constant", Flag163 (Id));
7471 W ("Is_Unchecked_Union", Flag117 (Id));
7472 W ("Is_Underlying_Record_View", Flag246 (Id));
7473 W ("Is_Unsigned_Type", Flag144 (Id));
7474 W ("Is_VMS_Exception", Flag133 (Id));
7475 W ("Is_Valued_Procedure", Flag127 (Id));
7476 W ("Is_Visible_Child_Unit", Flag116 (Id));
7477 W ("Is_Visible_Formal", Flag206 (Id));
7478 W ("Is_Volatile", Flag16 (Id));
7479 W ("Itype_Printed", Flag202 (Id));
7480 W ("Kill_Elaboration_Checks", Flag32 (Id));
7481 W ("Kill_Range_Checks", Flag33 (Id));
7482 W ("Kill_Tag_Checks", Flag34 (Id));
7483 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7484 W ("Low_Bound_Tested", Flag205 (Id));
7485 W ("Machine_Radix_10", Flag84 (Id));
7486 W ("Materialize_Entity", Flag168 (Id));
7487 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7488 W ("Must_Have_Preelab_Init", Flag208 (Id));
7489 W ("Needs_Debug_Info", Flag147 (Id));
7490 W ("Needs_No_Actuals", Flag22 (Id));
7491 W ("Never_Set_In_Source", Flag115 (Id));
7492 W ("No_Pool_Assigned", Flag131 (Id));
7493 W ("No_Return", Flag113 (Id));
7494 W ("No_Strict_Aliasing", Flag136 (Id));
7495 W ("Non_Binary_Modulus", Flag58 (Id));
7496 W ("Nonzero_Is_True", Flag162 (Id));
7497 W ("OK_To_Rename", Flag247 (Id));
7498 W ("OK_To_Reorder_Components", Flag239 (Id));
7499 W ("Optimize_Alignment_Space", Flag241 (Id));
7500 W ("Optimize_Alignment_Time", Flag242 (Id));
7501 W ("Overlays_Constant", Flag243 (Id));
7502 W ("Reachable", Flag49 (Id));
7503 W ("Referenced", Flag156 (Id));
7504 W ("Referenced_As_LHS", Flag36 (Id));
7505 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7506 W ("Renamed_In_Spec", Flag231 (Id));
7507 W ("Requires_Overriding", Flag213 (Id));
7508 W ("Return_Present", Flag54 (Id));
7509 W ("Returns_By_Ref", Flag90 (Id));
7510 W ("Reverse_Bit_Order", Flag164 (Id));
7511 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7512 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7513 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7514 W ("Static_Elaboration_Desired", Flag77 (Id));
7515 W ("Strict_Alignment", Flag145 (Id));
7516 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7517 W ("Suppress_Init_Proc", Flag105 (Id));
7518 W ("Suppress_Style_Checks", Flag165 (Id));
7519 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7520 W ("Treat_As_Volatile", Flag41 (Id));
7521 W ("Universal_Aliasing", Flag216 (Id));
7522 W ("Used_As_Generic_Actual", Flag222 (Id));
7523 W ("Uses_Sec_Stack", Flag95 (Id));
7524 W ("Warnings_Off", Flag96 (Id));
7525 W ("Warnings_Off_Used", Flag236 (Id));
7526 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7527 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7528 W ("Was_Hidden", Flag196 (Id));
7529 end Write_Entity_Flags;
7531 -----------------------
7532 -- Write_Entity_Info --
7533 -----------------------
7535 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7537 procedure Write_Attribute (Which : String; Nam : E);
7538 -- Write attribute value with given string name
7540 procedure Write_Kind (Id : Entity_Id);
7541 -- Write Ekind field of entity
7543 ---------------------
7544 -- Write_Attribute --
7545 ---------------------
7547 procedure Write_Attribute (Which : String; Nam : E) is
7551 Write_Int (Int (Nam));
7553 Write_Name (Chars (Nam));
7555 end Write_Attribute;
7561 procedure Write_Kind (Id : Entity_Id) is
7562 K : constant String := Entity_Kind'Image (Ekind (Id));
7566 Write_Str (" Kind ");
7568 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7569 Write_Str ("TAGGED ");
7572 Write_Str (K (3 .. K'Length));
7575 if Is_Type (Id) and then Depends_On_Private (Id) then
7576 Write_Str ("Depends_On_Private ");
7580 -- Start of processing for Write_Entity_Info
7584 Write_Attribute ("Name ", Id);
7585 Write_Int (Int (Id));
7589 Write_Attribute (" Type ", Etype (Id));
7591 Write_Attribute (" Scope ", Scope (Id));
7596 when Discrete_Kind =>
7597 Write_Str ("Bounds: Id = ");
7599 if Present (Scalar_Range (Id)) then
7600 Write_Int (Int (Type_Low_Bound (Id)));
7601 Write_Str (" .. Id = ");
7602 Write_Int (Int (Type_High_Bound (Id)));
7604 Write_Str ("Empty");
7615 (" Component Type ", Component_Type (Id));
7618 Write_Str (" Indexes ");
7620 Index := First_Index (Id);
7621 while Present (Index) loop
7622 Write_Attribute (" ", Etype (Index));
7623 Index := Next_Index (Index);
7631 (" Directly Designated Type ",
7632 Directly_Designated_Type (Id));
7635 when Overloadable_Kind =>
7636 if Present (Homonym (Id)) then
7637 Write_Str (" Homonym ");
7638 Write_Name (Chars (Homonym (Id)));
7640 Write_Int (Int (Homonym (Id)));
7647 if Ekind (Scope (Id)) in Record_Kind then
7649 " Original_Record_Component ",
7650 Original_Record_Component (Id));
7651 Write_Int (Int (Original_Record_Component (Id)));
7655 when others => null;
7657 end Write_Entity_Info;
7659 -----------------------
7660 -- Write_Field6_Name --
7661 -----------------------
7663 procedure Write_Field6_Name (Id : Entity_Id) is
7664 pragma Warnings (Off, Id);
7666 Write_Str ("First_Rep_Item");
7667 end Write_Field6_Name;
7669 -----------------------
7670 -- Write_Field7_Name --
7671 -----------------------
7673 procedure Write_Field7_Name (Id : Entity_Id) is
7674 pragma Warnings (Off, Id);
7676 Write_Str ("Freeze_Node");
7677 end Write_Field7_Name;
7679 -----------------------
7680 -- Write_Field8_Name --
7681 -----------------------
7683 procedure Write_Field8_Name (Id : Entity_Id) is
7688 Write_Str ("Normalized_First_Bit");
7692 E_Subprogram_Body =>
7693 Write_Str ("Mechanism");
7696 Write_Str ("Associated_Node_For_Itype");
7699 Write_Str ("First_Exit_Statement");
7702 Write_Str ("Dependent_Instances");
7705 Write_Str ("Postcondition_Proc");
7707 when E_Return_Statement =>
7708 Write_Str ("Return_Applies_To");
7711 Write_Str ("Hiding_Loop_Variable");
7714 Write_Str ("Field8??");
7716 end Write_Field8_Name;
7718 -----------------------
7719 -- Write_Field9_Name --
7720 -----------------------
7722 procedure Write_Field9_Name (Id : Entity_Id) is
7726 Write_Str ("Class_Wide_Type");
7729 E_Generic_Function |
7731 E_Generic_Procedure |
7734 Write_Str ("Renaming_Map");
7737 Write_Str ("Current_Value");
7740 Write_Str ("Field9??");
7742 end Write_Field9_Name;
7744 ------------------------
7745 -- Write_Field10_Name --
7746 ------------------------
7748 procedure Write_Field10_Name (Id : Entity_Id) is
7751 when Class_Wide_Kind |
7757 Write_Str ("Direct_Primitive_Operations");
7760 Write_Str ("Float_Rep");
7762 when E_In_Parameter |
7764 Write_Str ("Discriminal_Link");
7770 Write_Str ("Handler_Records");
7774 Write_Str ("Normalized_Position_Max");
7777 Write_Str ("Field10??");
7779 end Write_Field10_Name;
7781 ------------------------
7782 -- Write_Field11_Name --
7783 ------------------------
7785 procedure Write_Field11_Name (Id : Entity_Id) is
7789 Write_Str ("Entry_Component");
7793 Write_Str ("Component_Bit_Offset");
7796 Write_Str ("Full_View");
7798 when E_Enumeration_Literal =>
7799 Write_Str ("Enumeration_Pos");
7802 Write_Str ("Block_Node");
7808 Write_Str ("Protected_Body_Subprogram");
7810 when E_Generic_Package =>
7811 Write_Str ("Generic_Homonym");
7814 Write_Str ("Full_View");
7817 Write_Str ("Field11??");
7819 end Write_Field11_Name;
7821 ------------------------
7822 -- Write_Field12_Name --
7823 ------------------------
7825 procedure Write_Field12_Name (Id : Entity_Id) is
7829 Write_Str ("Barrier_Function");
7831 when E_Enumeration_Literal =>
7832 Write_Str ("Enumeration_Rep");
7840 E_In_Out_Parameter |
7844 Write_Str ("Esize");
7848 Write_Str ("Next_Inlined_Subprogram");
7851 Write_Str ("Associated_Formal_Package");
7854 Write_Str ("Field12??");
7856 end Write_Field12_Name;
7858 ------------------------
7859 -- Write_Field13_Name --
7860 ------------------------
7862 procedure Write_Field13_Name (Id : Entity_Id) is
7866 Write_Str ("RM_Size");
7870 Write_Str ("Component_Clause");
7873 if not Comes_From_Source (Id)
7875 Chars (Id) = Name_Op_Ne
7877 Write_Str ("Corresponding_Equality");
7879 elsif Comes_From_Source (Id) then
7880 Write_Str ("Elaboration_Entity");
7883 Write_Str ("Field13??");
7888 Write_Str ("Extra_Accessibility");
7892 Generic_Unit_Kind =>
7893 Write_Str ("Elaboration_Entity");
7896 Write_Str ("Field13??");
7898 end Write_Field13_Name;
7900 -----------------------
7901 -- Write_Field14_Name --
7902 -----------------------
7904 procedure Write_Field14_Name (Id : Entity_Id) is
7913 Write_Str ("Alignment");
7917 Write_Str ("Normalized_Position");
7921 Write_Str ("First_Optional_Parameter");
7924 E_Generic_Package =>
7925 Write_Str ("Shadow_Entities");
7928 Write_Str ("Field14??");
7930 end Write_Field14_Name;
7932 ------------------------
7933 -- Write_Field15_Name --
7934 ------------------------
7936 procedure Write_Field15_Name (Id : Entity_Id) is
7941 Write_Str ("Storage_Size_Variable");
7944 Write_Str ("DT_Entry_Count");
7946 when Decimal_Fixed_Point_Kind =>
7947 Write_Str ("Scale_Value");
7949 when E_Discriminant =>
7950 Write_Str ("Discriminant_Number");
7953 Write_Str ("Extra_Formal");
7957 Write_Str ("DT_Position");
7960 Write_Str ("Entry_Parameters_Type");
7962 when Enumeration_Kind =>
7963 Write_Str ("Lit_Indexes");
7967 Write_Str ("Related_Instance");
7969 when E_Protected_Type =>
7970 Write_Str ("Entry_Bodies_Array");
7972 when E_String_Literal_Subtype =>
7973 Write_Str ("String_Literal_Low_Bound");
7976 Write_Str ("Field15??");
7978 end Write_Field15_Name;
7980 ------------------------
7981 -- Write_Field16_Name --
7982 ------------------------
7984 procedure Write_Field16_Name (Id : Entity_Id) is
7988 Write_Str ("Entry_Formal");
7992 Write_Str ("DTC_Entity");
7997 Write_Str ("First_Private_Entity");
7999 when E_Record_Type |
8000 E_Record_Type_With_Private =>
8001 Write_Str ("Access_Disp_Table");
8003 when E_String_Literal_Subtype =>
8004 Write_Str ("String_Literal_Length");
8006 when Enumeration_Kind =>
8007 Write_Str ("Lit_Strings");
8011 Write_Str ("Unset_Reference");
8013 when E_Record_Subtype |
8014 E_Class_Wide_Subtype =>
8015 Write_Str ("Cloned_Subtype");
8018 Write_Str ("Field16??");
8020 end Write_Field16_Name;
8022 ------------------------
8023 -- Write_Field17_Name --
8024 ------------------------
8026 procedure Write_Field17_Name (Id : Entity_Id) is
8030 Write_Str ("Digits_Value");
8033 Write_Str ("Prival");
8035 when E_Discriminant =>
8036 Write_Str ("Discriminal");
8045 E_Generic_Function |
8047 E_Generic_Procedure |
8055 E_Return_Statement |
8057 E_Subprogram_Type =>
8058 Write_Str ("First_Entity");
8061 Write_Str ("First_Index");
8063 when Enumeration_Kind =>
8064 Write_Str ("First_Literal");
8067 Write_Str ("Master_Id");
8069 when Modular_Integer_Kind =>
8070 Write_Str ("Modulus");
8074 E_Generic_In_Out_Parameter |
8076 Write_Str ("Actual_Subtype");
8078 when E_Incomplete_Type =>
8079 Write_Str ("Non_Limited_View");
8081 when E_Incomplete_Subtype =>
8082 if From_With_Type (Id) then
8083 Write_Str ("Non_Limited_View");
8087 Write_Str ("Field17??");
8089 end Write_Field17_Name;
8091 ------------------------
8092 -- Write_Field18_Name --
8093 ------------------------
8095 procedure Write_Field18_Name (Id : Entity_Id) is
8098 when E_Enumeration_Literal |
8102 Write_Str ("Alias");
8104 when E_Record_Type =>
8105 Write_Str ("Corresponding_Concurrent_Type");
8107 when E_Subprogram_Body =>
8108 Write_Str ("Corresponding_Protected_Entry");
8110 when E_Entry_Index_Parameter =>
8111 Write_Str ("Entry_Index_Constant");
8113 when E_Class_Wide_Subtype |
8114 E_Access_Protected_Subprogram_Type |
8115 E_Anonymous_Access_Protected_Subprogram_Type |
8116 E_Access_Subprogram_Type |
8118 Write_Str ("Equivalent_Type");
8120 when Fixed_Point_Kind =>
8121 Write_Str ("Delta_Value");
8124 Write_Str ("Renamed_Object");
8128 E_Generic_Function |
8129 E_Generic_Procedure |
8130 E_Generic_Package =>
8131 Write_Str ("Renamed_Entity");
8133 when Incomplete_Or_Private_Kind |
8135 Write_Str ("Private_Dependents");
8137 when Concurrent_Kind =>
8138 Write_Str ("Corresponding_Record_Type");
8143 Write_Str ("Enclosing_Scope");
8146 Write_Str ("Field18??");
8148 end Write_Field18_Name;
8150 -----------------------
8151 -- Write_Field19_Name --
8152 -----------------------
8154 procedure Write_Field19_Name (Id : Entity_Id) is
8159 Write_Str ("Related_Array_Object");
8165 E_Return_Statement |
8167 Write_Str ("Finalization_Chain_Entity");
8169 when E_Constant | E_Variable =>
8170 Write_Str ("Size_Check_Code");
8172 when E_Discriminant =>
8173 Write_Str ("Corresponding_Discriminant");
8176 E_Generic_Package =>
8177 Write_Str ("Body_Entity");
8179 when E_Package_Body |
8181 Write_Str ("Spec_Entity");
8183 when Private_Kind =>
8184 Write_Str ("Underlying_Full_View");
8186 when E_Record_Type =>
8187 Write_Str ("Parent_Subtype");
8190 Write_Str ("Field19??");
8192 end Write_Field19_Name;
8194 -----------------------
8195 -- Write_Field20_Name --
8196 -----------------------
8198 procedure Write_Field20_Name (Id : Entity_Id) is
8202 Write_Str ("Component_Type");
8204 when E_In_Parameter |
8205 E_Generic_In_Parameter =>
8206 Write_Str ("Default_Value");
8209 Write_Str ("Directly_Designated_Type");
8212 Write_Str ("Discriminant_Checking_Func");
8216 Write_Str ("Prival_Link");
8218 when E_Discriminant =>
8219 Write_Str ("Discriminant_Default_Value");
8228 E_Generic_Function |
8230 E_Generic_Procedure |
8238 E_Return_Statement |
8240 E_Subprogram_Type =>
8241 Write_Str ("Last_Entity");
8244 Write_Str ("Scalar_Range");
8247 Write_Str ("Register_Exception_Call");
8250 Write_Str ("Field20??");
8252 end Write_Field20_Name;
8254 -----------------------
8255 -- Write_Field21_Name --
8256 -----------------------
8258 procedure Write_Field21_Name (Id : Entity_Id) is
8264 E_Generic_Function |
8266 E_Generic_Procedure |
8268 Write_Str ("Interface_Name");
8270 when Concurrent_Kind |
8271 Incomplete_Or_Private_Kind |
8275 Write_Str ("Discriminant_Constraint");
8278 Write_Str ("Accept_Address");
8280 when Fixed_Point_Kind =>
8281 Write_Str ("Small_Value");
8283 when E_In_Parameter =>
8284 Write_Str ("Default_Expr_Function");
8287 Modular_Integer_Kind =>
8288 Write_Str ("Original_Array_Type");
8291 Write_Str ("Field21??");
8293 end Write_Field21_Name;
8295 -----------------------
8296 -- Write_Field22_Name --
8297 -----------------------
8299 procedure Write_Field22_Name (Id : Entity_Id) is
8303 Write_Str ("Associated_Storage_Pool");
8306 Write_Str ("Component_Size");
8310 Write_Str ("Original_Record_Component");
8312 when E_Enumeration_Literal =>
8313 Write_Str ("Enumeration_Rep_Expr");
8316 Write_Str ("Exception_Code");
8319 Write_Str ("Protected_Formal");
8321 when E_Record_Type =>
8322 Write_Str ("Corresponding_Remote_Type");
8332 E_Generic_Function |
8333 E_Generic_Procedure |
8336 E_Return_Statement |
8339 Write_Str ("Scope_Depth_Value");
8341 when E_Record_Type_With_Private |
8342 E_Record_Subtype_With_Private |
8345 E_Limited_Private_Type |
8346 E_Limited_Private_Subtype =>
8347 Write_Str ("Private_View");
8350 Write_Str ("Shared_Var_Procs_Instance");
8353 Write_Str ("Field22??");
8355 end Write_Field22_Name;
8357 ------------------------
8358 -- Write_Field23_Name --
8359 ------------------------
8361 procedure Write_Field23_Name (Id : Entity_Id) is
8365 Write_Str ("Associated_Final_Chain");
8368 Write_Str ("Packed_Array_Type");
8371 Write_Str ("Entry_Cancel_Parameter");
8373 when E_Discriminant =>
8374 Write_Str ("CR_Discriminant");
8376 when E_Enumeration_Type =>
8377 Write_Str ("Enum_Pos_To_Rep");
8381 Write_Str ("Extra_Constrained");
8383 when E_Generic_Function |
8385 E_Generic_Procedure =>
8386 Write_Str ("Inner_Instances");
8388 when Concurrent_Kind |
8389 Incomplete_Or_Private_Kind |
8393 Write_Str ("Stored_Constraint");
8397 if Present (Scope (Id))
8398 and then Is_Protected_Type (Scope (Id))
8400 Write_Str ("Protection_Object");
8402 Write_Str ("Generic_Renamings");
8406 if Is_Generic_Instance (Id) then
8407 Write_Str ("Generic_Renamings");
8409 Write_Str ("Limited_View");
8413 Write_Str ("Protection_Object");
8416 Write_Str ("Field23??");
8418 end Write_Field23_Name;
8420 ------------------------
8421 -- Write_Field24_Name --
8422 ------------------------
8424 procedure Write_Field24_Name (Id : Entity_Id) is
8427 when Subprogram_Kind =>
8428 Write_Str ("Spec_PPC_List");
8430 when E_Variable | E_Constant | Type_Kind =>
8431 Write_Str ("Related_Expression");
8434 Write_Str ("Field24???");
8436 end Write_Field24_Name;
8438 ------------------------
8439 -- Write_Field25_Name --
8440 ------------------------
8442 procedure Write_Field25_Name (Id : Entity_Id) is
8446 Write_Str ("DT_Offset_To_Top_Func");
8450 Write_Str ("Interface_Alias");
8452 when E_Record_Type |
8454 E_Record_Type_With_Private |
8455 E_Record_Subtype_With_Private =>
8456 Write_Str ("Interfaces");
8459 Write_Str ("Task_Body_Procedure");
8462 Write_Str ("Debug_Renaming_Link");
8466 Write_Str ("PPC_Wrapper");
8468 when E_Enumeration_Subtype |
8469 E_Modular_Integer_Subtype |
8470 E_Signed_Integer_Subtype =>
8471 Write_Str ("Static_Predicate");
8474 Write_Str ("Field25??");
8476 end Write_Field25_Name;
8478 ------------------------
8479 -- Write_Field26_Name --
8480 ------------------------
8482 procedure Write_Field26_Name (Id : Entity_Id) is
8485 when E_Generic_Package |
8487 Write_Str ("Package_Instantiation");
8491 if Is_Dispatching_Operation (Id) then
8492 Write_Str ("Overridden_Operation");
8494 Write_Str ("Static_Initialization");
8497 when E_Record_Type |
8498 E_Record_Type_With_Private =>
8499 Write_Str ("Dispatch_Table_Wrappers");
8501 when E_In_Out_Parameter |
8504 Write_Str ("Last_Assignment");
8507 Write_Str ("Relative_Deadline_Variable");
8510 Write_Str ("Field26??");
8512 end Write_Field26_Name;
8514 ------------------------
8515 -- Write_Field27_Name --
8516 ------------------------
8518 procedure Write_Field27_Name (Id : Entity_Id) is
8524 Write_Str ("Related_Type");
8527 Write_Str ("Wrapped_Entity");
8529 when E_Package | Type_Kind =>
8530 Write_Str ("Current_Use_Clause");
8533 Write_Str ("Field27??");
8535 end Write_Field27_Name;
8537 ------------------------
8538 -- Write_Field28_Name --
8539 ------------------------
8541 procedure Write_Field28_Name (Id : Entity_Id) is
8544 when E_Procedure | E_Function | E_Entry =>
8545 Write_Str ("Extra_Formals");
8547 when E_Record_Type =>
8548 Write_Str ("Underlying_Record_View");
8551 Write_Str ("Field28??");
8553 end Write_Field28_Name;
8555 procedure Write_Field29_Name (Id : Entity_Id) is
8559 Write_Str ("Subprograms_For_Type");
8562 Write_Str ("Field29??");
8564 end Write_Field29_Name;
8566 -------------------------
8567 -- Iterator Procedures --
8568 -------------------------
8570 procedure Proc_Next_Component (N : in out Node_Id) is
8572 N := Next_Component (N);
8573 end Proc_Next_Component;
8575 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8577 N := Next_Entity (N);
8578 while Present (N) loop
8579 exit when Ekind_In (N, E_Component, E_Discriminant);
8580 N := Next_Entity (N);
8582 end Proc_Next_Component_Or_Discriminant;
8584 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8586 N := Next_Discriminant (N);
8587 end Proc_Next_Discriminant;
8589 procedure Proc_Next_Formal (N : in out Node_Id) is
8591 N := Next_Formal (N);
8592 end Proc_Next_Formal;
8594 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8596 N := Next_Formal_With_Extras (N);
8597 end Proc_Next_Formal_With_Extras;
8599 procedure Proc_Next_Index (N : in out Node_Id) is
8601 N := Next_Index (N);
8602 end Proc_Next_Index;
8604 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8606 N := Next_Inlined_Subprogram (N);
8607 end Proc_Next_Inlined_Subprogram;
8609 procedure Proc_Next_Literal (N : in out Node_Id) is
8611 N := Next_Literal (N);
8612 end Proc_Next_Literal;
8614 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8616 N := Next_Stored_Discriminant (N);
8617 end Proc_Next_Stored_Discriminant;