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 Is_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 Is_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 Is_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 Is_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 Is_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 Is_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) and then Is_Base_Type (Id));
3481 Set_Flag229 (Id, V);
3482 end Set_Can_Use_Internal_Rep;
3484 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3487 end Set_Finalization_Chain_Entity;
3489 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3491 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3492 Set_Flag158 (Id, V);
3493 end Set_Finalize_Storage_Only;
3495 procedure Set_First_Entity (Id : E; V : E) is
3498 end Set_First_Entity;
3500 procedure Set_First_Exit_Statement (Id : E; V : N) is
3502 pragma Assert (Ekind (Id) = E_Loop);
3504 end Set_First_Exit_Statement;
3506 procedure Set_First_Index (Id : E; V : N) is
3508 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3510 end Set_First_Index;
3512 procedure Set_First_Literal (Id : E; V : E) is
3514 pragma Assert (Is_Enumeration_Type (Id));
3516 end Set_First_Literal;
3518 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3520 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3522 end Set_First_Optional_Parameter;
3524 procedure Set_First_Private_Entity (Id : E; V : E) is
3526 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3527 or else Ekind (Id) in Concurrent_Kind);
3529 end Set_First_Private_Entity;
3531 procedure Set_First_Rep_Item (Id : E; V : N) is
3534 end Set_First_Rep_Item;
3536 procedure Set_Float_Rep (Id : E; V : F) is
3537 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3539 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3542 procedure Set_Freeze_Node (Id : E; V : N) is
3545 end Set_Freeze_Node;
3547 procedure Set_From_With_Type (Id : E; V : B := True) is
3551 or else Ekind (Id) = E_Package);
3552 Set_Flag159 (Id, V);
3553 end Set_From_With_Type;
3555 procedure Set_Full_View (Id : E; V : E) is
3557 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3561 procedure Set_Generic_Homonym (Id : E; V : E) is
3564 end Set_Generic_Homonym;
3566 procedure Set_Generic_Renamings (Id : E; V : L) is
3568 Set_Elist23 (Id, V);
3569 end Set_Generic_Renamings;
3571 procedure Set_Handler_Records (Id : E; V : S) is
3574 end Set_Handler_Records;
3576 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3578 pragma Assert (Id = Base_Type (Id));
3579 Set_Flag135 (Id, V);
3580 end Set_Has_Aliased_Components;
3582 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3585 end Set_Has_Alignment_Clause;
3587 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3590 end Set_Has_All_Calls_Remote;
3592 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3594 Set_Flag201 (Id, V);
3595 end Set_Has_Anon_Block_Suffix;
3597 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3599 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3601 end Set_Has_Atomic_Components;
3603 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3606 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3607 Set_Flag139 (Id, V);
3608 end Set_Has_Biased_Representation;
3610 procedure Set_Has_Completion (Id : E; V : B := True) is
3613 end Set_Has_Completion;
3615 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3617 pragma Assert (Is_Type (Id));
3619 end Set_Has_Completion_In_Body;
3621 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3623 pragma Assert (Ekind (Id) = E_Record_Type);
3624 Set_Flag140 (Id, V);
3625 end Set_Has_Complex_Representation;
3627 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3629 pragma Assert (Ekind (Id) = E_Array_Type);
3631 end Set_Has_Component_Size_Clause;
3633 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3635 pragma Assert (Is_Type (Id));
3636 Set_Flag187 (Id, V);
3637 end Set_Has_Constrained_Partial_View;
3639 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3641 Set_Flag181 (Id, V);
3642 end Set_Has_Contiguous_Rep;
3644 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3646 pragma Assert (Id = Base_Type (Id));
3648 end Set_Has_Controlled_Component;
3650 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3653 end Set_Has_Controlling_Result;
3655 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3657 Set_Flag119 (Id, V);
3658 end Set_Has_Convention_Pragma;
3660 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3662 pragma Assert (Nkind (Id) in N_Entity);
3663 Set_Flag200 (Id, V);
3664 end Set_Has_Delayed_Aspects;
3666 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3668 pragma Assert (Nkind (Id) in N_Entity);
3670 end Set_Has_Delayed_Freeze;
3672 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3674 pragma Assert (Nkind (Id) in N_Entity);
3676 end Set_Has_Discriminants;
3678 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3680 pragma Assert (Ekind (Id) = E_Record_Type
3681 and then Is_Tagged_Type (Id));
3682 Set_Flag220 (Id, V);
3683 end Set_Has_Dispatch_Table;
3685 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3687 pragma Assert (Is_Enumeration_Type (Id));
3689 end Set_Has_Enumeration_Rep_Clause;
3691 procedure Set_Has_Exit (Id : E; V : B := True) is
3696 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3698 pragma Assert (Is_Tagged_Type (Id));
3699 Set_Flag110 (Id, V);
3700 end Set_Has_External_Tag_Rep_Clause;
3702 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3704 Set_Flag175 (Id, V);
3705 end Set_Has_Forward_Instantiation;
3707 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3709 Set_Flag173 (Id, V);
3710 end Set_Has_Fully_Qualified_Name;
3712 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3715 end Set_Has_Gigi_Rep_Item;
3717 procedure Set_Has_Homonym (Id : E; V : B := True) is
3720 end Set_Has_Homonym;
3722 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3724 pragma Assert (Is_Type (Id));
3725 Set_Flag248 (Id, V);
3726 end Set_Has_Inheritable_Invariants;
3728 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3730 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3731 Set_Flag219 (Id, V);
3732 end Set_Has_Initial_Value;
3734 procedure Set_Has_Invariants (Id : E; V : B := True) is
3736 pragma Assert (Is_Type (Id)
3737 or else Ekind (Id) = E_Procedure
3738 or else Ekind (Id) = E_Void);
3739 Set_Flag232 (Id, V);
3740 end Set_Has_Invariants;
3742 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3744 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3746 end Set_Has_Machine_Radix_Clause;
3748 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3751 end Set_Has_Master_Entity;
3753 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3755 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3756 Set_Flag142 (Id, V);
3757 end Set_Has_Missing_Return;
3759 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3761 Set_Flag101 (Id, V);
3762 end Set_Has_Nested_Block_With_Handler;
3764 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3766 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3767 Set_Flag215 (Id, V);
3768 end Set_Has_Up_Level_Access;
3770 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3772 pragma Assert (Id = Base_Type (Id));
3774 end Set_Has_Non_Standard_Rep;
3776 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3778 pragma Assert (Is_Type (Id));
3779 Set_Flag172 (Id, V);
3780 end Set_Has_Object_Size_Clause;
3782 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3784 Set_Flag154 (Id, V);
3785 end Set_Has_Per_Object_Constraint;
3787 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3789 Set_Flag188 (Id, V);
3790 end Set_Has_Persistent_BSS;
3792 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3794 pragma Assert (Is_Subprogram (Id));
3795 Set_Flag240 (Id, V);
3796 end Set_Has_Postconditions;
3798 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3800 pragma Assert (Is_Access_Type (Id));
3801 Set_Flag27 (Base_Type (Id), V);
3802 end Set_Has_Pragma_Controlled;
3804 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3806 Set_Flag150 (Id, V);
3807 end Set_Has_Pragma_Elaborate_Body;
3809 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3811 Set_Flag157 (Id, V);
3812 end Set_Has_Pragma_Inline;
3814 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3816 Set_Flag230 (Id, V);
3817 end Set_Has_Pragma_Inline_Always;
3819 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3821 pragma Assert (Is_Enumeration_Type (Id));
3822 pragma Assert (Id = Base_Type (Id));
3823 Set_Flag198 (Id, V);
3824 end Set_Has_Pragma_Ordered;
3826 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3828 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3829 pragma Assert (Id = Base_Type (Id));
3830 Set_Flag121 (Id, V);
3831 end Set_Has_Pragma_Pack;
3833 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3835 Set_Flag221 (Id, V);
3836 end Set_Has_Pragma_Preelab_Init;
3838 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3840 Set_Flag203 (Id, V);
3841 end Set_Has_Pragma_Pure;
3843 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3845 Set_Flag179 (Id, V);
3846 end Set_Has_Pragma_Pure_Function;
3848 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3850 Set_Flag169 (Id, V);
3851 end Set_Has_Pragma_Thread_Local_Storage;
3853 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3855 Set_Flag233 (Id, V);
3856 end Set_Has_Pragma_Unmodified;
3858 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3860 Set_Flag180 (Id, V);
3861 end Set_Has_Pragma_Unreferenced;
3863 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3865 pragma Assert (Is_Type (Id));
3866 Set_Flag212 (Id, V);
3867 end Set_Has_Pragma_Unreferenced_Objects;
3869 procedure Set_Has_Predicates (Id : E; V : B := True) is
3871 Set_Flag250 (Id, V);
3872 end Set_Has_Predicates;
3874 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3876 pragma Assert (Id = Base_Type (Id));
3877 Set_Flag120 (Id, V);
3878 end Set_Has_Primitive_Operations;
3880 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3882 Set_Flag155 (Id, V);
3883 end Set_Has_Private_Declaration;
3885 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3887 Set_Flag161 (Id, V);
3888 end Set_Has_Qualified_Name;
3890 procedure Set_Has_RACW (Id : E; V : B := True) is
3892 pragma Assert (Ekind (Id) = E_Package);
3893 Set_Flag214 (Id, V);
3896 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3898 pragma Assert (Id = Base_Type (Id));
3900 end Set_Has_Record_Rep_Clause;
3902 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3904 pragma Assert (Is_Subprogram (Id));
3905 Set_Flag143 (Id, V);
3906 end Set_Has_Recursive_Call;
3908 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3911 end Set_Has_Size_Clause;
3913 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3916 end Set_Has_Small_Clause;
3918 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3920 pragma Assert (Id = Base_Type (Id));
3921 Set_Flag100 (Id, V);
3922 end Set_Has_Specified_Layout;
3924 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3926 pragma Assert (Is_Type (Id));
3927 Set_Flag190 (Id, V);
3928 end Set_Has_Specified_Stream_Input;
3930 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3932 pragma Assert (Is_Type (Id));
3933 Set_Flag191 (Id, V);
3934 end Set_Has_Specified_Stream_Output;
3936 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3938 pragma Assert (Is_Type (Id));
3939 Set_Flag192 (Id, V);
3940 end Set_Has_Specified_Stream_Read;
3942 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3944 pragma Assert (Is_Type (Id));
3945 Set_Flag193 (Id, V);
3946 end Set_Has_Specified_Stream_Write;
3948 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3950 Set_Flag211 (Id, V);
3951 end Set_Has_Static_Discriminants;
3953 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3955 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3956 pragma Assert (Id = Base_Type (Id));
3958 end Set_Has_Storage_Size_Clause;
3960 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3962 pragma Assert (Is_Elementary_Type (Id));
3963 Set_Flag184 (Id, V);
3964 end Set_Has_Stream_Size_Clause;
3966 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3969 end Set_Has_Subprogram_Descriptor;
3971 procedure Set_Has_Task (Id : E; V : B := True) is
3973 pragma Assert (Id = Base_Type (Id));
3977 procedure Set_Has_Thunks (Id : E; V : B := True) is
3979 pragma Assert (Is_Tag (Id));
3980 Set_Flag228 (Id, V);
3983 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3985 pragma Assert (Id = Base_Type (Id));
3986 Set_Flag123 (Id, V);
3987 end Set_Has_Unchecked_Union;
3989 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3991 pragma Assert (Is_Type (Id));
3993 end Set_Has_Unknown_Discriminants;
3995 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3997 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3999 end Set_Has_Volatile_Components;
4001 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4003 Set_Flag182 (Id, V);
4004 end Set_Has_Xref_Entry;
4006 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4008 pragma Assert (Ekind (Id) = E_Variable);
4010 end Set_Hiding_Loop_Variable;
4012 procedure Set_Homonym (Id : E; V : E) is
4014 pragma Assert (Id /= V);
4018 procedure Set_Interface_Alias (Id : E; V : E) is
4022 and then Is_Hidden (Id)
4023 and then (Ekind_In (Id, E_Procedure, E_Function)));
4025 end Set_Interface_Alias;
4027 procedure Set_Interfaces (Id : E; V : L) is
4029 pragma Assert (Is_Record_Type (Id));
4030 Set_Elist25 (Id, V);
4033 procedure Set_In_Package_Body (Id : E; V : B := True) is
4036 end Set_In_Package_Body;
4038 procedure Set_In_Private_Part (Id : E; V : B := True) is
4041 end Set_In_Private_Part;
4043 procedure Set_In_Use (Id : E; V : B := True) is
4045 pragma Assert (Nkind (Id) in N_Entity);
4049 procedure Set_Inner_Instances (Id : E; V : L) is
4051 Set_Elist23 (Id, V);
4052 end Set_Inner_Instances;
4054 procedure Set_Interface_Name (Id : E; V : N) is
4057 end Set_Interface_Name;
4059 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4061 pragma Assert (Is_Overloadable (Id));
4063 end Set_Is_Abstract_Subprogram;
4065 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4067 pragma Assert (Is_Type (Id));
4068 Set_Flag146 (Id, V);
4069 end Set_Is_Abstract_Type;
4071 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4073 pragma Assert (Is_Access_Type (Id));
4074 Set_Flag194 (Id, V);
4075 end Set_Is_Local_Anonymous_Access;
4077 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4079 pragma Assert (Is_Access_Type (Id));
4081 end Set_Is_Access_Constant;
4083 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4085 Set_Flag185 (Id, V);
4086 end Set_Is_Ada_2005_Only;
4088 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4090 Set_Flag199 (Id, V);
4091 end Set_Is_Ada_2012_Only;
4093 procedure Set_Is_Aliased (Id : E; V : B := True) is
4095 pragma Assert (Nkind (Id) in N_Entity);
4099 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4101 pragma Assert (Is_Entry (Id));
4102 Set_Flag132 (Id, V);
4103 end Set_Is_AST_Entry;
4105 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4108 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4110 end Set_Is_Asynchronous;
4112 procedure Set_Is_Atomic (Id : E; V : B := True) is
4117 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4119 pragma Assert ((not V)
4120 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4122 Set_Flag122 (Id, V);
4123 end Set_Is_Bit_Packed_Array;
4125 procedure Set_Is_Called (Id : E; V : B := True) is
4127 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4128 Set_Flag102 (Id, V);
4131 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4134 end Set_Is_Character_Type;
4136 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4139 end Set_Is_Child_Unit;
4141 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4144 end Set_Is_Class_Wide_Equivalent_Type;
4146 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4148 Set_Flag149 (Id, V);
4149 end Set_Is_Compilation_Unit;
4151 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4153 pragma Assert (Ekind (Id) = E_Discriminant);
4154 Set_Flag103 (Id, V);
4155 end Set_Is_Completely_Hidden;
4157 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4160 end Set_Is_Concurrent_Record_Type;
4162 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4165 end Set_Is_Constr_Subt_For_U_Nominal;
4167 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4169 Set_Flag141 (Id, V);
4170 end Set_Is_Constr_Subt_For_UN_Aliased;
4172 procedure Set_Is_Constrained (Id : E; V : B := True) is
4174 pragma Assert (Nkind (Id) in N_Entity);
4176 end Set_Is_Constrained;
4178 procedure Set_Is_Constructor (Id : E; V : B := True) is
4181 end Set_Is_Constructor;
4183 procedure Set_Is_Controlled (Id : E; V : B := True) is
4185 pragma Assert (Id = Base_Type (Id));
4187 end Set_Is_Controlled;
4189 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4191 pragma Assert (Is_Formal (Id));
4193 end Set_Is_Controlling_Formal;
4195 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4198 end Set_Is_CPP_Class;
4200 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4202 pragma Assert (Is_Type (Id));
4203 Set_Flag223 (Id, V);
4204 end Set_Is_Descendent_Of_Address;
4206 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4208 Set_Flag176 (Id, V);
4209 end Set_Is_Discrim_SO_Function;
4211 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4213 Set_Flag234 (Id, V);
4214 end Set_Is_Dispatch_Table_Entity;
4216 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4221 Is_Overloadable (Id)
4223 Ekind (Id) = E_Subprogram_Type);
4226 end Set_Is_Dispatching_Operation;
4228 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4230 Set_Flag124 (Id, V);
4231 end Set_Is_Eliminated;
4233 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4236 end Set_Is_Entry_Formal;
4238 procedure Set_Is_Exported (Id : E; V : B := True) is
4241 end Set_Is_Exported;
4243 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4246 end Set_Is_First_Subtype;
4248 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4250 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4251 Set_Flag118 (Id, V);
4252 end Set_Is_For_Access_Subtype;
4254 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4256 Set_Flag111 (Id, V);
4257 end Set_Is_Formal_Subprogram;
4259 procedure Set_Is_Frozen (Id : E; V : B := True) is
4261 pragma Assert (Nkind (Id) in N_Entity);
4265 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4267 pragma Assert (Is_Type (Id));
4269 end Set_Is_Generic_Actual_Type;
4271 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4273 Set_Flag130 (Id, V);
4274 end Set_Is_Generic_Instance;
4276 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4278 pragma Assert (Nkind (Id) in N_Entity);
4280 end Set_Is_Generic_Type;
4282 procedure Set_Is_Hidden (Id : E; V : B := True) is
4287 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4289 Set_Flag171 (Id, V);
4290 end Set_Is_Hidden_Open_Scope;
4292 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4294 pragma Assert (Nkind (Id) in N_Entity);
4296 end Set_Is_Immediately_Visible;
4298 procedure Set_Is_Imported (Id : E; V : B := True) is
4301 end Set_Is_Imported;
4303 procedure Set_Is_Inlined (Id : E; V : B := True) is
4308 procedure Set_Is_Interface (Id : E; V : B := True) is
4311 (Ekind_In (Id, E_Record_Type,
4313 E_Record_Type_With_Private,
4314 E_Record_Subtype_With_Private,
4316 E_Class_Wide_Subtype));
4317 Set_Flag186 (Id, V);
4318 end Set_Is_Interface;
4320 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4322 Set_Flag126 (Id, V);
4323 end Set_Is_Instantiated;
4325 procedure Set_Is_Internal (Id : E; V : B := True) is
4327 pragma Assert (Nkind (Id) in N_Entity);
4329 end Set_Is_Internal;
4331 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4333 pragma Assert (Nkind (Id) in N_Entity);
4335 end Set_Is_Interrupt_Handler;
4337 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4340 end Set_Is_Intrinsic_Subprogram;
4342 procedure Set_Is_Itype (Id : E; V : B := True) is
4347 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4350 end Set_Is_Known_Non_Null;
4352 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4354 Set_Flag204 (Id, V);
4355 end Set_Is_Known_Null;
4357 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4359 Set_Flag170 (Id, V);
4360 end Set_Is_Known_Valid;
4362 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4364 pragma Assert (Is_Type (Id));
4365 Set_Flag106 (Id, V);
4366 end Set_Is_Limited_Composite;
4368 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4370 pragma Assert (Is_Interface (Id));
4371 Set_Flag197 (Id, V);
4372 end Set_Is_Limited_Interface;
4374 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4377 end Set_Is_Limited_Record;
4379 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4381 pragma Assert (Is_Subprogram (Id));
4382 Set_Flag137 (Id, V);
4383 end Set_Is_Machine_Code_Subprogram;
4385 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4387 pragma Assert (Is_Type (Id));
4388 Set_Flag109 (Id, V);
4389 end Set_Is_Non_Static_Subtype;
4391 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4393 pragma Assert (Ekind (Id) = E_Procedure);
4394 Set_Flag178 (Id, V);
4395 end Set_Is_Null_Init_Proc;
4397 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4399 Set_Flag153 (Id, V);
4400 end Set_Is_Obsolescent;
4402 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4404 pragma Assert (Ekind (Id) = E_Out_Parameter);
4405 Set_Flag226 (Id, V);
4406 end Set_Is_Only_Out_Parameter;
4408 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4410 pragma Assert (Is_Formal (Id));
4411 Set_Flag134 (Id, V);
4412 end Set_Is_Optional_Parameter;
4414 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4416 Set_Flag160 (Id, V);
4417 end Set_Is_Package_Body_Entity;
4419 procedure Set_Is_Packed (Id : E; V : B := True) is
4421 pragma Assert (Id = Base_Type (Id));
4425 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4427 Set_Flag138 (Id, V);
4428 end Set_Is_Packed_Array_Type;
4430 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4432 pragma Assert (Nkind (Id) in N_Entity);
4434 end Set_Is_Potentially_Use_Visible;
4436 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4439 end Set_Is_Preelaborated;
4441 procedure Set_Is_Primitive (Id : E; V : B := True) is
4444 (Is_Overloadable (Id)
4445 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4446 Set_Flag218 (Id, V);
4447 end Set_Is_Primitive;
4449 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4451 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4452 Set_Flag195 (Id, V);
4453 end Set_Is_Primitive_Wrapper;
4455 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4457 pragma Assert (Is_Type (Id));
4458 Set_Flag107 (Id, V);
4459 end Set_Is_Private_Composite;
4461 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4464 end Set_Is_Private_Descendant;
4466 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4468 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4469 Set_Flag245 (Id, V);
4470 end Set_Is_Private_Primitive;
4472 procedure Set_Is_Public (Id : E; V : B := True) is
4474 pragma Assert (Nkind (Id) in N_Entity);
4478 procedure Set_Is_Pure (Id : E; V : B := True) is
4483 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4485 pragma Assert (Is_Access_Type (Id));
4486 Set_Flag189 (Id, V);
4487 end Set_Is_Pure_Unit_Access_Type;
4489 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4491 pragma Assert (Is_Type (Id));
4492 Set_Flag244 (Id, V);
4493 end Set_Is_RACW_Stub_Type;
4495 procedure Set_Is_Raised (Id : E; V : B := True) is
4497 pragma Assert (Ekind (Id) = E_Exception);
4498 Set_Flag224 (Id, V);
4501 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4504 end Set_Is_Remote_Call_Interface;
4506 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4509 end Set_Is_Remote_Types;
4511 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4513 Set_Flag112 (Id, V);
4514 end Set_Is_Renaming_Of_Object;
4516 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4518 Set_Flag209 (Id, V);
4519 end Set_Is_Return_Object;
4521 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4524 end Set_Is_Shared_Passive;
4526 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4530 or else Ekind_In (Id, E_Exception,
4535 end Set_Is_Statically_Allocated;
4537 procedure Set_Is_Tag (Id : E; V : B := True) is
4539 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4543 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4546 end Set_Is_Tagged_Type;
4548 procedure Set_Is_Thunk (Id : E; V : B := True) is
4550 Set_Flag225 (Id, V);
4553 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4555 Set_Flag235 (Id, V);
4556 end Set_Is_Trivial_Subprogram;
4558 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4560 Set_Flag163 (Id, V);
4561 end Set_Is_True_Constant;
4563 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4565 pragma Assert (Id = Base_Type (Id));
4566 Set_Flag117 (Id, V);
4567 end Set_Is_Unchecked_Union;
4569 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4571 pragma Assert (Ekind (Id) = E_Record_Type);
4572 Set_Flag246 (Id, V);
4573 end Set_Is_Underlying_Record_View;
4575 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4577 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4578 Set_Flag144 (Id, V);
4579 end Set_Is_Unsigned_Type;
4581 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4583 pragma Assert (Ekind (Id) = E_Procedure);
4584 Set_Flag127 (Id, V);
4585 end Set_Is_Valued_Procedure;
4587 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4589 pragma Assert (Is_Child_Unit (Id));
4590 Set_Flag116 (Id, V);
4591 end Set_Is_Visible_Child_Unit;
4593 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4595 Set_Flag206 (Id, V);
4596 end Set_Is_Visible_Formal;
4598 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4600 pragma Assert (Ekind (Id) = E_Exception);
4601 Set_Flag133 (Id, V);
4602 end Set_Is_VMS_Exception;
4604 procedure Set_Is_Volatile (Id : E; V : B := True) is
4606 pragma Assert (Nkind (Id) in N_Entity);
4608 end Set_Is_Volatile;
4610 procedure Set_Itype_Printed (Id : E; V : B := True) is
4612 pragma Assert (Is_Itype (Id));
4613 Set_Flag202 (Id, V);
4614 end Set_Itype_Printed;
4616 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4619 end Set_Kill_Elaboration_Checks;
4621 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4624 end Set_Kill_Range_Checks;
4626 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4629 end Set_Kill_Tag_Checks;
4631 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4633 pragma Assert (Is_Type (Id));
4634 Set_Flag207 (Id, V);
4635 end Set_Known_To_Have_Preelab_Init;
4637 procedure Set_Last_Assignment (Id : E; V : N) is
4639 pragma Assert (Is_Assignable (Id));
4641 end Set_Last_Assignment;
4643 procedure Set_Last_Entity (Id : E; V : E) is
4646 end Set_Last_Entity;
4648 procedure Set_Limited_View (Id : E; V : E) is
4650 pragma Assert (Ekind (Id) = E_Package);
4652 end Set_Limited_View;
4654 procedure Set_Lit_Indexes (Id : E; V : E) is
4656 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4658 end Set_Lit_Indexes;
4660 procedure Set_Lit_Strings (Id : E; V : E) is
4662 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4664 end Set_Lit_Strings;
4666 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4668 pragma Assert (Is_Formal (Id));
4669 Set_Flag205 (Id, V);
4670 end Set_Low_Bound_Tested;
4672 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4674 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4676 end Set_Machine_Radix_10;
4678 procedure Set_Master_Id (Id : E; V : E) is
4680 pragma Assert (Is_Access_Type (Id));
4684 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4686 Set_Flag168 (Id, V);
4687 end Set_Materialize_Entity;
4689 procedure Set_Mechanism (Id : E; V : M) is
4691 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4692 Set_Uint8 (Id, UI_From_Int (V));
4695 procedure Set_Modulus (Id : E; V : U) is
4697 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4701 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4703 pragma Assert (Is_Type (Id));
4704 Set_Flag183 (Id, V);
4705 end Set_Must_Be_On_Byte_Boundary;
4707 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4709 pragma Assert (Is_Type (Id));
4710 Set_Flag208 (Id, V);
4711 end Set_Must_Have_Preelab_Init;
4713 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4715 Set_Flag147 (Id, V);
4716 end Set_Needs_Debug_Info;
4718 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4721 (Is_Overloadable (Id)
4722 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4724 end Set_Needs_No_Actuals;
4726 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4728 Set_Flag115 (Id, V);
4729 end Set_Never_Set_In_Source;
4731 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4734 end Set_Next_Inlined_Subprogram;
4736 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4738 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4739 Set_Flag131 (Id, V);
4740 end Set_No_Pool_Assigned;
4742 procedure Set_No_Return (Id : E; V : B := True) is
4745 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4746 Set_Flag113 (Id, V);
4749 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4751 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4752 Set_Flag136 (Id, V);
4753 end Set_No_Strict_Aliasing;
4755 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4757 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4759 end Set_Non_Binary_Modulus;
4761 procedure Set_Non_Limited_View (Id : E; V : E) is
4763 pragma Assert (Ekind (Id) in Incomplete_Kind);
4765 end Set_Non_Limited_View;
4767 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4770 (Root_Type (Id) = Standard_Boolean
4771 and then Ekind (Id) = E_Enumeration_Type);
4772 Set_Flag162 (Id, V);
4773 end Set_Nonzero_Is_True;
4775 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4777 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4779 end Set_Normalized_First_Bit;
4781 procedure Set_Normalized_Position (Id : E; V : U) is
4783 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4785 end Set_Normalized_Position;
4787 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4789 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4791 end Set_Normalized_Position_Max;
4793 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4795 pragma Assert (Ekind (Id) = E_Variable);
4796 Set_Flag247 (Id, V);
4797 end Set_OK_To_Rename;
4799 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4802 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4803 Set_Flag239 (Id, V);
4804 end Set_OK_To_Reorder_Components;
4806 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4809 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4810 Set_Flag241 (Id, V);
4811 end Set_Optimize_Alignment_Space;
4813 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4816 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4817 Set_Flag242 (Id, V);
4818 end Set_Optimize_Alignment_Time;
4820 procedure Set_Original_Array_Type (Id : E; V : E) is
4822 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4824 end Set_Original_Array_Type;
4826 procedure Set_Original_Record_Component (Id : E; V : E) is
4828 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4830 end Set_Original_Record_Component;
4832 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4834 Set_Flag243 (Id, V);
4835 end Set_Overlays_Constant;
4837 procedure Set_Overridden_Operation (Id : E; V : E) is
4840 end Set_Overridden_Operation;
4842 procedure Set_Package_Instantiation (Id : E; V : N) is
4844 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4846 end Set_Package_Instantiation;
4848 procedure Set_Packed_Array_Type (Id : E; V : E) is
4850 pragma Assert (Is_Array_Type (Id));
4852 end Set_Packed_Array_Type;
4854 procedure Set_Parent_Subtype (Id : E; V : E) is
4856 pragma Assert (Ekind (Id) = E_Record_Type);
4858 end Set_Parent_Subtype;
4860 procedure Set_Postcondition_Proc (Id : E; V : E) is
4862 pragma Assert (Ekind (Id) = E_Procedure);
4864 end Set_Postcondition_Proc;
4866 procedure Set_PPC_Wrapper (Id : E; V : E) is
4868 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4870 end Set_PPC_Wrapper;
4872 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4874 pragma Assert (Is_Tagged_Type (Id));
4875 Set_Elist10 (Id, V);
4876 end Set_Direct_Primitive_Operations;
4878 procedure Set_Prival (Id : E; V : E) is
4880 pragma Assert (Is_Protected_Component (Id));
4884 procedure Set_Prival_Link (Id : E; V : E) is
4886 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4888 end Set_Prival_Link;
4890 procedure Set_Private_Dependents (Id : E; V : L) is
4892 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4893 Set_Elist18 (Id, V);
4894 end Set_Private_Dependents;
4896 procedure Set_Private_View (Id : E; V : N) is
4898 pragma Assert (Is_Private_Type (Id));
4900 end Set_Private_View;
4902 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4904 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4906 end Set_Protected_Body_Subprogram;
4908 procedure Set_Protected_Formal (Id : E; V : E) is
4910 pragma Assert (Is_Formal (Id));
4912 end Set_Protected_Formal;
4914 procedure Set_Protection_Object (Id : E; V : E) is
4916 pragma Assert (Ekind_In (Id, E_Entry,
4921 end Set_Protection_Object;
4923 procedure Set_Reachable (Id : E; V : B := True) is
4928 procedure Set_Referenced (Id : E; V : B := True) is
4930 Set_Flag156 (Id, V);
4933 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4936 end Set_Referenced_As_LHS;
4938 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4940 Set_Flag227 (Id, V);
4941 end Set_Referenced_As_Out_Parameter;
4943 procedure Set_Register_Exception_Call (Id : E; V : N) is
4945 pragma Assert (Ekind (Id) = E_Exception);
4947 end Set_Register_Exception_Call;
4949 procedure Set_Related_Array_Object (Id : E; V : E) is
4951 pragma Assert (Is_Array_Type (Id));
4953 end Set_Related_Array_Object;
4955 procedure Set_Related_Expression (Id : E; V : N) is
4957 pragma Assert (Ekind (Id) in Type_Kind
4958 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4960 end Set_Related_Expression;
4962 procedure Set_Related_Instance (Id : E; V : E) is
4964 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4966 end Set_Related_Instance;
4968 procedure Set_Related_Type (Id : E; V : E) is
4970 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4972 end Set_Related_Type;
4974 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4976 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
4978 end Set_Relative_Deadline_Variable;
4980 procedure Set_Renamed_Entity (Id : E; V : N) is
4983 end Set_Renamed_Entity;
4985 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4987 pragma Assert (Ekind (Id) = E_Package);
4988 Set_Flag231 (Id, V);
4989 end Set_Renamed_In_Spec;
4991 procedure Set_Renamed_Object (Id : E; V : N) is
4994 end Set_Renamed_Object;
4996 procedure Set_Renaming_Map (Id : E; V : U) is
4999 end Set_Renaming_Map;
5001 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5003 pragma Assert (Is_Overloadable (Id));
5004 Set_Flag213 (Id, V);
5005 end Set_Requires_Overriding;
5007 procedure Set_Return_Present (Id : E; V : B := True) is
5010 end Set_Return_Present;
5012 procedure Set_Return_Applies_To (Id : E; V : N) is
5015 end Set_Return_Applies_To;
5017 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5020 end Set_Returns_By_Ref;
5022 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5025 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5026 Set_Flag164 (Id, V);
5027 end Set_Reverse_Bit_Order;
5029 procedure Set_RM_Size (Id : E; V : U) is
5031 pragma Assert (Is_Type (Id));
5035 procedure Set_Scalar_Range (Id : E; V : N) is
5038 end Set_Scalar_Range;
5040 procedure Set_Scale_Value (Id : E; V : U) is
5043 end Set_Scale_Value;
5045 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5047 pragma Assert (not Is_Record_Type (Id));
5049 end Set_Scope_Depth_Value;
5051 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5053 Set_Flag167 (Id, V);
5054 end Set_Sec_Stack_Needed_For_Return;
5056 procedure Set_Shadow_Entities (Id : E; V : S) is
5058 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5060 end Set_Shadow_Entities;
5062 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5064 pragma Assert (Ekind (Id) = E_Variable);
5066 end Set_Shared_Var_Procs_Instance;
5068 procedure Set_Size_Check_Code (Id : E; V : N) is
5070 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5072 end Set_Size_Check_Code;
5074 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5076 Set_Flag177 (Id, V);
5077 end Set_Size_Depends_On_Discriminant;
5079 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5082 end Set_Size_Known_At_Compile_Time;
5084 procedure Set_Small_Value (Id : E; V : R) is
5086 pragma Assert (Is_Fixed_Point_Type (Id));
5087 Set_Ureal21 (Id, V);
5088 end Set_Small_Value;
5090 procedure Set_Spec_Entity (Id : E; V : E) is
5092 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5094 end Set_Spec_Entity;
5096 procedure Set_Spec_PPC_List (Id : E; V : N) is
5099 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5100 or else Is_Subprogram (Id)
5101 or else Is_Generic_Subprogram (Id));
5103 end Set_Spec_PPC_List;
5105 procedure Set_Static_Predicate (Id : E; V : S) is
5108 (Ekind_In (Id, E_Enumeration_Subtype,
5109 E_Modular_Integer_Subtype,
5110 E_Signed_Integer_Subtype)
5111 and then Has_Predicates (Id));
5113 end Set_Static_Predicate;
5115 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5117 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5118 pragma Assert (Id = Base_Type (Id));
5120 end Set_Storage_Size_Variable;
5122 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5124 pragma Assert (Ekind (Id) = E_Package);
5126 end Set_Static_Elaboration_Desired;
5128 procedure Set_Static_Initialization (Id : E; V : N) is
5131 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5133 end Set_Static_Initialization;
5135 procedure Set_Stored_Constraint (Id : E; V : L) is
5137 pragma Assert (Nkind (Id) in N_Entity);
5138 Set_Elist23 (Id, V);
5139 end Set_Stored_Constraint;
5141 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5143 pragma Assert (Id = Base_Type (Id));
5144 Set_Flag145 (Id, V);
5145 end Set_Strict_Alignment;
5147 procedure Set_String_Literal_Length (Id : E; V : U) is
5149 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5151 end Set_String_Literal_Length;
5153 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5155 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5157 end Set_String_Literal_Low_Bound;
5159 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5161 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5163 end Set_Subprograms_For_Type;
5165 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5167 Set_Flag148 (Id, V);
5168 end Set_Suppress_Elaboration_Warnings;
5170 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5172 pragma Assert (Id = Base_Type (Id));
5173 Set_Flag105 (Id, V);
5174 end Set_Suppress_Init_Proc;
5176 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5178 Set_Flag165 (Id, V);
5179 end Set_Suppress_Style_Checks;
5181 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5183 Set_Flag217 (Id, V);
5184 end Set_Suppress_Value_Tracking_On_Call;
5186 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5188 pragma Assert (Ekind (Id) in Task_Kind);
5190 end Set_Task_Body_Procedure;
5192 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5195 end Set_Treat_As_Volatile;
5197 procedure Set_Underlying_Full_View (Id : E; V : E) is
5199 pragma Assert (Ekind (Id) in Private_Kind);
5201 end Set_Underlying_Full_View;
5203 procedure Set_Underlying_Record_View (Id : E; V : E) is
5205 pragma Assert (Ekind (Id) = E_Record_Type);
5207 end Set_Underlying_Record_View;
5209 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5211 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5212 Set_Flag216 (Id, V);
5213 end Set_Universal_Aliasing;
5215 procedure Set_Unset_Reference (Id : E; V : N) is
5218 end Set_Unset_Reference;
5220 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5223 end Set_Uses_Sec_Stack;
5225 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5227 Set_Flag222 (Id, V);
5228 end Set_Used_As_Generic_Actual;
5230 procedure Set_Warnings_Off (Id : E; V : B := True) is
5233 end Set_Warnings_Off;
5235 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5237 Set_Flag236 (Id, V);
5238 end Set_Warnings_Off_Used;
5240 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5242 Set_Flag237 (Id, V);
5243 end Set_Warnings_Off_Used_Unmodified;
5245 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5247 Set_Flag238 (Id, V);
5248 end Set_Warnings_Off_Used_Unreferenced;
5250 procedure Set_Was_Hidden (Id : E; V : B := True) is
5252 Set_Flag196 (Id, V);
5255 procedure Set_Wrapped_Entity (Id : E; V : E) is
5257 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5258 and then Is_Primitive_Wrapper (Id));
5260 end Set_Wrapped_Entity;
5262 -----------------------------------
5263 -- Field Initialization Routines --
5264 -----------------------------------
5266 procedure Init_Alignment (Id : E) is
5268 Set_Uint14 (Id, Uint_0);
5271 procedure Init_Alignment (Id : E; V : Int) is
5273 Set_Uint14 (Id, UI_From_Int (V));
5276 procedure Init_Component_Bit_Offset (Id : E) is
5278 Set_Uint11 (Id, No_Uint);
5279 end Init_Component_Bit_Offset;
5281 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5283 Set_Uint11 (Id, UI_From_Int (V));
5284 end Init_Component_Bit_Offset;
5286 procedure Init_Component_Size (Id : E) is
5288 Set_Uint22 (Id, Uint_0);
5289 end Init_Component_Size;
5291 procedure Init_Component_Size (Id : E; V : Int) is
5293 Set_Uint22 (Id, UI_From_Int (V));
5294 end Init_Component_Size;
5296 procedure Init_Digits_Value (Id : E) is
5298 Set_Uint17 (Id, Uint_0);
5299 end Init_Digits_Value;
5301 procedure Init_Digits_Value (Id : E; V : Int) is
5303 Set_Uint17 (Id, UI_From_Int (V));
5304 end Init_Digits_Value;
5306 procedure Init_Esize (Id : E) is
5308 Set_Uint12 (Id, Uint_0);
5311 procedure Init_Esize (Id : E; V : Int) is
5313 Set_Uint12 (Id, UI_From_Int (V));
5316 procedure Init_Normalized_First_Bit (Id : E) is
5318 Set_Uint8 (Id, No_Uint);
5319 end Init_Normalized_First_Bit;
5321 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5323 Set_Uint8 (Id, UI_From_Int (V));
5324 end Init_Normalized_First_Bit;
5326 procedure Init_Normalized_Position (Id : E) is
5328 Set_Uint14 (Id, No_Uint);
5329 end Init_Normalized_Position;
5331 procedure Init_Normalized_Position (Id : E; V : Int) is
5333 Set_Uint14 (Id, UI_From_Int (V));
5334 end Init_Normalized_Position;
5336 procedure Init_Normalized_Position_Max (Id : E) is
5338 Set_Uint10 (Id, No_Uint);
5339 end Init_Normalized_Position_Max;
5341 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5343 Set_Uint10 (Id, UI_From_Int (V));
5344 end Init_Normalized_Position_Max;
5346 procedure Init_RM_Size (Id : E) is
5348 Set_Uint13 (Id, Uint_0);
5351 procedure Init_RM_Size (Id : E; V : Int) is
5353 Set_Uint13 (Id, UI_From_Int (V));
5356 -----------------------------
5357 -- Init_Component_Location --
5358 -----------------------------
5360 procedure Init_Component_Location (Id : E) is
5362 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5363 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5364 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5365 Set_Uint12 (Id, Uint_0); -- Esize
5366 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5367 end Init_Component_Location;
5373 procedure Init_Size (Id : E; V : Int) is
5375 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5376 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5379 ---------------------
5380 -- Init_Size_Align --
5381 ---------------------
5383 procedure Init_Size_Align (Id : E) is
5385 Set_Uint12 (Id, Uint_0); -- Esize
5386 Set_Uint13 (Id, Uint_0); -- RM_Size
5387 Set_Uint14 (Id, Uint_0); -- Alignment
5388 end Init_Size_Align;
5390 ----------------------------------------------
5391 -- Type Representation Attribute Predicates --
5392 ----------------------------------------------
5394 function Known_Alignment (E : Entity_Id) return B is
5396 return Uint14 (E) /= Uint_0
5397 and then Uint14 (E) /= No_Uint;
5398 end Known_Alignment;
5400 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5402 return Uint11 (E) /= No_Uint;
5403 end Known_Component_Bit_Offset;
5405 function Known_Component_Size (E : Entity_Id) return B is
5407 return Uint22 (Base_Type (E)) /= Uint_0
5408 and then Uint22 (Base_Type (E)) /= No_Uint;
5409 end Known_Component_Size;
5411 function Known_Esize (E : Entity_Id) return B is
5413 return Uint12 (E) /= Uint_0
5414 and then Uint12 (E) /= No_Uint;
5417 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5419 return Uint8 (E) /= No_Uint;
5420 end Known_Normalized_First_Bit;
5422 function Known_Normalized_Position (E : Entity_Id) return B is
5424 return Uint14 (E) /= No_Uint;
5425 end Known_Normalized_Position;
5427 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5429 return Uint10 (E) /= No_Uint;
5430 end Known_Normalized_Position_Max;
5432 function Known_RM_Size (E : Entity_Id) return B is
5434 return Uint13 (E) /= No_Uint
5435 and then (Uint13 (E) /= Uint_0
5436 or else Is_Discrete_Type (E)
5437 or else Is_Fixed_Point_Type (E));
5440 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5442 return Uint11 (E) /= No_Uint
5443 and then Uint11 (E) >= Uint_0;
5444 end Known_Static_Component_Bit_Offset;
5446 function Known_Static_Component_Size (E : Entity_Id) return B is
5448 return Uint22 (Base_Type (E)) > Uint_0;
5449 end Known_Static_Component_Size;
5451 function Known_Static_Esize (E : Entity_Id) return B is
5453 return Uint12 (E) > Uint_0
5454 and then not Is_Generic_Type (E);
5455 end Known_Static_Esize;
5457 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5459 return Uint8 (E) /= No_Uint
5460 and then Uint8 (E) >= Uint_0;
5461 end Known_Static_Normalized_First_Bit;
5463 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5465 return Uint14 (E) /= No_Uint
5466 and then Uint14 (E) >= Uint_0;
5467 end Known_Static_Normalized_Position;
5469 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5471 return Uint10 (E) /= No_Uint
5472 and then Uint10 (E) >= Uint_0;
5473 end Known_Static_Normalized_Position_Max;
5475 function Known_Static_RM_Size (E : Entity_Id) return B is
5477 return (Uint13 (E) > Uint_0
5478 or else Is_Discrete_Type (E)
5479 or else Is_Fixed_Point_Type (E))
5480 and then not Is_Generic_Type (E);
5481 end Known_Static_RM_Size;
5483 function Unknown_Alignment (E : Entity_Id) return B is
5485 return Uint14 (E) = Uint_0
5486 or else Uint14 (E) = No_Uint;
5487 end Unknown_Alignment;
5489 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5491 return Uint11 (E) = No_Uint;
5492 end Unknown_Component_Bit_Offset;
5494 function Unknown_Component_Size (E : Entity_Id) return B is
5496 return Uint22 (Base_Type (E)) = Uint_0
5498 Uint22 (Base_Type (E)) = No_Uint;
5499 end Unknown_Component_Size;
5501 function Unknown_Esize (E : Entity_Id) return B is
5503 return Uint12 (E) = No_Uint
5505 Uint12 (E) = Uint_0;
5508 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5510 return Uint8 (E) = No_Uint;
5511 end Unknown_Normalized_First_Bit;
5513 function Unknown_Normalized_Position (E : Entity_Id) return B is
5515 return Uint14 (E) = No_Uint;
5516 end Unknown_Normalized_Position;
5518 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5520 return Uint10 (E) = No_Uint;
5521 end Unknown_Normalized_Position_Max;
5523 function Unknown_RM_Size (E : Entity_Id) return B is
5525 return (Uint13 (E) = Uint_0
5526 and then not Is_Discrete_Type (E)
5527 and then not Is_Fixed_Point_Type (E))
5528 or else Uint13 (E) = No_Uint;
5529 end Unknown_RM_Size;
5531 --------------------
5532 -- Address_Clause --
5533 --------------------
5535 function Address_Clause (Id : E) return N is
5537 return Rep_Clause (Id, Name_Address);
5544 function Aft_Value (Id : E) return U is
5546 Delta_Val : Ureal := Delta_Value (Id);
5548 while Delta_Val < Ureal_Tenth loop
5549 Delta_Val := Delta_Val * Ureal_10;
5550 Result := Result + 1;
5553 return UI_From_Int (Result);
5556 ----------------------
5557 -- Alignment_Clause --
5558 ----------------------
5560 function Alignment_Clause (Id : E) return N is
5562 return Rep_Clause (Id, Name_Alignment);
5563 end Alignment_Clause;
5569 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5571 if Last_Entity (V) = Empty then
5572 Set_First_Entity (Id => V, V => Id);
5574 Set_Next_Entity (Last_Entity (V), Id);
5577 Set_Next_Entity (Id, Empty);
5579 Set_Last_Entity (Id => V, V => Id);
5586 function Base_Type (Id : E) return E is
5589 when E_Enumeration_Subtype |
5591 E_Signed_Integer_Subtype |
5592 E_Modular_Integer_Subtype |
5593 E_Floating_Point_Subtype |
5594 E_Ordinary_Fixed_Point_Subtype |
5595 E_Decimal_Fixed_Point_Subtype |
5600 E_Record_Subtype_With_Private |
5601 E_Limited_Private_Subtype |
5603 E_Protected_Subtype |
5605 E_String_Literal_Subtype |
5606 E_Class_Wide_Subtype =>
5614 -------------------------
5615 -- Component_Alignment --
5616 -------------------------
5618 -- Component Alignment is encoded using two flags, Flag128/129 as
5619 -- follows. Note that both flags False = Align_Default, so that the
5620 -- default initialization of flags to False initializes component
5621 -- alignment to the default value as required.
5623 -- Flag128 Flag129 Value
5624 -- ------- ------- -----
5625 -- False False Calign_Default
5626 -- False True Calign_Component_Size
5627 -- True False Calign_Component_Size_4
5628 -- True True Calign_Storage_Unit
5630 function Component_Alignment (Id : E) return C is
5631 BT : constant Node_Id := Base_Type (Id);
5634 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5636 if Flag128 (BT) then
5637 if Flag129 (BT) then
5638 return Calign_Storage_Unit;
5640 return Calign_Component_Size_4;
5644 if Flag129 (BT) then
5645 return Calign_Component_Size;
5647 return Calign_Default;
5650 end Component_Alignment;
5652 ----------------------
5653 -- Declaration_Node --
5654 ----------------------
5656 function Declaration_Node (Id : E) return N is
5660 if Ekind (Id) = E_Incomplete_Type
5661 and then Present (Full_View (Id))
5663 P := Parent (Full_View (Id));
5669 if Nkind (P) /= N_Selected_Component
5670 and then Nkind (P) /= N_Expanded_Name
5672 not (Nkind (P) = N_Defining_Program_Unit_Name
5673 and then Is_Child_Unit (Id))
5680 end Declaration_Node;
5682 ---------------------
5683 -- Designated_Type --
5684 ---------------------
5686 function Designated_Type (Id : E) return E is
5690 Desig_Type := Directly_Designated_Type (Id);
5692 if Ekind (Desig_Type) = E_Incomplete_Type
5693 and then Present (Full_View (Desig_Type))
5695 return Full_View (Desig_Type);
5697 elsif Is_Class_Wide_Type (Desig_Type)
5698 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5699 and then Present (Full_View (Etype (Desig_Type)))
5700 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5702 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5707 end Designated_Type;
5709 ----------------------
5710 -- Entry_Index_Type --
5711 ----------------------
5713 function Entry_Index_Type (Id : E) return N is
5715 pragma Assert (Ekind (Id) = E_Entry_Family);
5716 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5717 end Entry_Index_Type;
5719 ---------------------
5720 -- First_Component --
5721 ---------------------
5723 function First_Component (Id : E) return E is
5728 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5730 Comp_Id := First_Entity (Id);
5731 while Present (Comp_Id) loop
5732 exit when Ekind (Comp_Id) = E_Component;
5733 Comp_Id := Next_Entity (Comp_Id);
5737 end First_Component;
5739 -------------------------------------
5740 -- First_Component_Or_Discriminant --
5741 -------------------------------------
5743 function First_Component_Or_Discriminant (Id : E) return E is
5748 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5750 Comp_Id := First_Entity (Id);
5751 while Present (Comp_Id) loop
5752 exit when Ekind (Comp_Id) = E_Component
5754 Ekind (Comp_Id) = E_Discriminant;
5755 Comp_Id := Next_Entity (Comp_Id);
5759 end First_Component_Or_Discriminant;
5765 function First_Formal (Id : E) return E is
5770 (Is_Overloadable (Id)
5771 or else Ekind_In (Id, E_Entry_Family,
5773 E_Subprogram_Type));
5775 if Ekind (Id) = E_Enumeration_Literal then
5779 Formal := First_Entity (Id);
5781 if Present (Formal) and then Is_Formal (Formal) then
5789 ------------------------------
5790 -- First_Formal_With_Extras --
5791 ------------------------------
5793 function First_Formal_With_Extras (Id : E) return E is
5798 (Is_Overloadable (Id)
5799 or else Ekind_In (Id, E_Entry_Family,
5801 E_Subprogram_Type));
5803 if Ekind (Id) = E_Enumeration_Literal then
5807 Formal := First_Entity (Id);
5809 if Present (Formal) and then Is_Formal (Formal) then
5812 return Extra_Formals (Id); -- Empty if no extra formals
5815 end First_Formal_With_Extras;
5817 -------------------------------------
5818 -- Get_Attribute_Definition_Clause --
5819 -------------------------------------
5821 function Get_Attribute_Definition_Clause
5823 Id : Attribute_Id) return Node_Id
5828 N := First_Rep_Item (E);
5829 while Present (N) loop
5830 if Nkind (N) = N_Attribute_Definition_Clause
5831 and then Get_Attribute_Id (Chars (N)) = Id
5840 end Get_Attribute_Definition_Clause;
5846 function Get_Full_View (T : Entity_Id) return Entity_Id is
5848 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5849 return Full_View (T);
5851 elsif Is_Class_Wide_Type (T)
5852 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5853 and then Present (Full_View (Root_Type (T)))
5855 return Class_Wide_Type (Full_View (Root_Type (T)));
5862 --------------------------------------
5863 -- Get_Record_Representation_Clause --
5864 --------------------------------------
5866 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5870 N := First_Rep_Item (E);
5871 while Present (N) loop
5872 if Nkind (N) = N_Record_Representation_Clause then
5880 end Get_Record_Representation_Clause;
5882 -----------------------------
5883 -- Get_Rep_Item_For_Entity --
5884 -----------------------------
5886 function Get_Rep_Item_For_Entity
5888 Nam : Name_Id) return Node_Id
5894 N := First_Rep_Item (E);
5895 while Present (N) loop
5896 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5897 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5899 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5903 elsif Nkind (N) = N_Attribute_Definition_Clause
5904 and then Chars (N) = Nam
5905 and then Entity (N) = E
5909 elsif Nkind (N) = N_Aspect_Specification
5910 and then Chars (Identifier (N)) = Nam
5911 and then Entity (N) = E
5920 end Get_Rep_Item_For_Entity;
5922 --------------------
5923 -- Get_Rep_Pragma --
5924 --------------------
5926 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5930 N := First_Rep_Item (E);
5931 while Present (N) loop
5932 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5942 ------------------------
5943 -- Has_Attach_Handler --
5944 ------------------------
5946 function Has_Attach_Handler (Id : E) return B is
5950 pragma Assert (Is_Protected_Type (Id));
5952 Ritem := First_Rep_Item (Id);
5953 while Present (Ritem) loop
5954 if Nkind (Ritem) = N_Pragma
5955 and then Pragma_Name (Ritem) = Name_Attach_Handler
5959 Next_Rep_Item (Ritem);
5964 end Has_Attach_Handler;
5966 -------------------------------------
5967 -- Has_Attribute_Definition_Clause --
5968 -------------------------------------
5970 function Has_Attribute_Definition_Clause
5972 Id : Attribute_Id) return Boolean
5975 return Present (Get_Attribute_Definition_Clause (E, Id));
5976 end Has_Attribute_Definition_Clause;
5982 function Has_Entries (Id : E) return B is
5986 pragma Assert (Is_Concurrent_Type (Id));
5988 Ent := First_Entity (Id);
5989 while Present (Ent) loop
5990 if Is_Entry (Ent) then
5994 Ent := Next_Entity (Ent);
6000 ----------------------------
6001 -- Has_Foreign_Convention --
6002 ----------------------------
6004 function Has_Foreign_Convention (Id : E) return B is
6006 -- While regular Intrinsics such as the Standard operators fit in the
6007 -- "Ada" convention, those with an Interface_Name materialize GCC
6008 -- builtin imports for which Ada special treatments shouldn't apply.
6010 return Convention (Id) in Foreign_Convention
6011 or else (Convention (Id) = Convention_Intrinsic
6012 and then Present (Interface_Name (Id)));
6013 end Has_Foreign_Convention;
6015 ---------------------------
6016 -- Has_Interrupt_Handler --
6017 ---------------------------
6019 function Has_Interrupt_Handler (Id : E) return B is
6023 pragma Assert (Is_Protected_Type (Id));
6025 Ritem := First_Rep_Item (Id);
6026 while Present (Ritem) loop
6027 if Nkind (Ritem) = N_Pragma
6028 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6032 Next_Rep_Item (Ritem);
6037 end Has_Interrupt_Handler;
6039 --------------------------
6040 -- Has_Private_Ancestor --
6041 --------------------------
6043 function Has_Private_Ancestor (Id : E) return B is
6044 R : constant Entity_Id := Root_Type (Id);
6045 T1 : Entity_Id := Id;
6048 if Is_Private_Type (T1) then
6056 end Has_Private_Ancestor;
6058 --------------------
6059 -- Has_Rep_Pragma --
6060 --------------------
6062 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6064 return Present (Get_Rep_Pragma (E, Nam));
6067 --------------------
6068 -- Has_Unmodified --
6069 --------------------
6071 function Has_Unmodified (E : Entity_Id) return Boolean is
6073 if Has_Pragma_Unmodified (E) then
6075 elsif Warnings_Off (E) then
6076 Set_Warnings_Off_Used_Unmodified (E);
6083 ---------------------
6084 -- Has_Unreferenced --
6085 ---------------------
6087 function Has_Unreferenced (E : Entity_Id) return Boolean is
6089 if Has_Pragma_Unreferenced (E) then
6091 elsif Warnings_Off (E) then
6092 Set_Warnings_Off_Used_Unreferenced (E);
6097 end Has_Unreferenced;
6099 ----------------------
6100 -- Has_Warnings_Off --
6101 ----------------------
6103 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6105 if Warnings_Off (E) then
6106 Set_Warnings_Off_Used (E);
6111 end Has_Warnings_Off;
6113 ------------------------------
6114 -- Implementation_Base_Type --
6115 ------------------------------
6117 function Implementation_Base_Type (Id : E) return E is
6122 Bastyp := Base_Type (Id);
6124 if Is_Incomplete_Or_Private_Type (Bastyp) then
6125 Imptyp := Underlying_Type (Bastyp);
6127 -- If we have an implementation type, then just return it,
6128 -- otherwise we return the Base_Type anyway. This can only
6129 -- happen in error situations and should avoid some error bombs.
6131 if Present (Imptyp) then
6132 return Base_Type (Imptyp);
6140 end Implementation_Base_Type;
6142 -------------------------
6143 -- Invariant_Procedure --
6144 -------------------------
6146 function Invariant_Procedure (Id : E) return E is
6150 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6152 if No (Subprograms_For_Type (Id)) then
6156 S := Subprograms_For_Type (Id);
6157 while Present (S) loop
6158 if Has_Invariants (S) then
6161 S := Subprograms_For_Type (S);
6167 end Invariant_Procedure;
6173 function Is_Base_Type (Id : E) return Boolean is
6175 return Id = Base_Type (Id);
6178 ---------------------
6179 -- Is_Boolean_Type --
6180 ---------------------
6182 function Is_Boolean_Type (Id : E) return B is
6184 return Root_Type (Id) = Standard_Boolean;
6185 end Is_Boolean_Type;
6187 ------------------------
6188 -- Is_Constant_Object --
6189 ------------------------
6191 function Is_Constant_Object (Id : E) return B is
6192 K : constant Entity_Kind := Ekind (Id);
6195 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6196 end Is_Constant_Object;
6198 --------------------
6199 -- Is_Discriminal --
6200 --------------------
6202 function Is_Discriminal (Id : E) return B is
6204 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6205 and then Present (Discriminal_Link (Id)));
6208 ----------------------
6209 -- Is_Dynamic_Scope --
6210 ----------------------
6212 function Is_Dynamic_Scope (Id : E) return B is
6215 Ekind (Id) = E_Block
6217 Ekind (Id) = E_Function
6219 Ekind (Id) = E_Procedure
6221 Ekind (Id) = E_Subprogram_Body
6223 Ekind (Id) = E_Task_Type
6225 (Ekind (Id) = E_Limited_Private_Type
6226 and then Present (Full_View (Id))
6227 and then Ekind (Full_View (Id)) = E_Task_Type)
6229 Ekind (Id) = E_Entry
6231 Ekind (Id) = E_Entry_Family
6233 Ekind (Id) = E_Return_Statement;
6234 end Is_Dynamic_Scope;
6236 --------------------
6237 -- Is_Entity_Name --
6238 --------------------
6240 function Is_Entity_Name (N : Node_Id) return Boolean is
6241 Kind : constant Node_Kind := Nkind (N);
6244 -- Identifiers, operator symbols, expanded names are entity names
6246 return Kind = N_Identifier
6247 or else Kind = N_Operator_Symbol
6248 or else Kind = N_Expanded_Name
6250 -- Attribute references are entity names if they refer to an entity.
6251 -- Note that we don't do this by testing for the presence of the
6252 -- Entity field in the N_Attribute_Reference node, since it may not
6253 -- have been set yet.
6255 or else (Kind = N_Attribute_Reference
6256 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6259 -----------------------------------
6260 -- Is_Package_Or_Generic_Package --
6261 -----------------------------------
6263 function Is_Package_Or_Generic_Package (Id : E) return B is
6266 Ekind (Id) = E_Package
6268 Ekind (Id) = E_Generic_Package;
6269 end Is_Package_Or_Generic_Package;
6271 ------------------------
6272 -- Predicate_Function --
6273 ------------------------
6275 function Predicate_Function (Id : E) return E is
6279 pragma Assert (Is_Type (Id));
6281 if No (Subprograms_For_Type (Id)) then
6285 S := Subprograms_For_Type (Id);
6286 while Present (S) loop
6287 if Has_Predicates (S) then
6290 S := Subprograms_For_Type (S);
6296 end Predicate_Function;
6302 function Is_Prival (Id : E) return B is
6304 return (Ekind_In (Id, E_Constant, E_Variable)
6305 and then Present (Prival_Link (Id)));
6308 ----------------------------
6309 -- Is_Protected_Component --
6310 ----------------------------
6312 function Is_Protected_Component (Id : E) return B is
6314 return Ekind (Id) = E_Component
6315 and then Is_Protected_Type (Scope (Id));
6316 end Is_Protected_Component;
6318 ----------------------------
6319 -- Is_Protected_Interface --
6320 ----------------------------
6322 function Is_Protected_Interface (Id : E) return B is
6323 Typ : constant Entity_Id := Base_Type (Id);
6325 if not Is_Interface (Typ) then
6327 elsif Is_Class_Wide_Type (Typ) then
6328 return Is_Protected_Interface (Etype (Typ));
6330 return Protected_Present (Type_Definition (Parent (Typ)));
6332 end Is_Protected_Interface;
6334 ------------------------------
6335 -- Is_Protected_Record_Type --
6336 ------------------------------
6338 function Is_Protected_Record_Type (Id : E) return B is
6341 Is_Concurrent_Record_Type (Id)
6342 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6343 end Is_Protected_Record_Type;
6345 --------------------------------
6346 -- Is_Standard_Character_Type --
6347 --------------------------------
6349 function Is_Standard_Character_Type (Id : E) return B is
6351 if Is_Type (Id) then
6353 R : constant Entity_Id := Root_Type (Id);
6356 R = Standard_Character
6358 R = Standard_Wide_Character
6360 R = Standard_Wide_Wide_Character;
6366 end Is_Standard_Character_Type;
6368 --------------------
6369 -- Is_String_Type --
6370 --------------------
6372 function Is_String_Type (Id : E) return B is
6374 return Ekind (Id) in String_Kind
6375 or else (Is_Array_Type (Id)
6376 and then Id /= Any_Composite
6377 and then Number_Dimensions (Id) = 1
6378 and then Is_Character_Type (Component_Type (Id)));
6381 -------------------------------
6382 -- Is_Synchronized_Interface --
6383 -------------------------------
6385 function Is_Synchronized_Interface (Id : E) return B is
6386 Typ : constant Entity_Id := Base_Type (Id);
6389 if not Is_Interface (Typ) then
6392 elsif Is_Class_Wide_Type (Typ) then
6393 return Is_Synchronized_Interface (Etype (Typ));
6396 return Protected_Present (Type_Definition (Parent (Typ)))
6397 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6398 or else Task_Present (Type_Definition (Parent (Typ)));
6400 end Is_Synchronized_Interface;
6402 -----------------------
6403 -- Is_Task_Interface --
6404 -----------------------
6406 function Is_Task_Interface (Id : E) return B is
6407 Typ : constant Entity_Id := Base_Type (Id);
6409 if not Is_Interface (Typ) then
6411 elsif Is_Class_Wide_Type (Typ) then
6412 return Is_Task_Interface (Etype (Typ));
6414 return Task_Present (Type_Definition (Parent (Typ)));
6416 end Is_Task_Interface;
6418 -------------------------
6419 -- Is_Task_Record_Type --
6420 -------------------------
6422 function Is_Task_Record_Type (Id : E) return B is
6425 Is_Concurrent_Record_Type (Id)
6426 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6427 end Is_Task_Record_Type;
6429 ------------------------
6430 -- Is_Wrapper_Package --
6431 ------------------------
6433 function Is_Wrapper_Package (Id : E) return B is
6435 return (Ekind (Id) = E_Package
6436 and then Present (Related_Instance (Id)));
6437 end Is_Wrapper_Package;
6443 function Last_Formal (Id : E) return E is
6448 (Is_Overloadable (Id)
6449 or else Ekind_In (Id, E_Entry_Family,
6451 E_Subprogram_Type));
6453 if Ekind (Id) = E_Enumeration_Literal then
6457 Formal := First_Formal (Id);
6459 if Present (Formal) then
6460 while Present (Next_Formal (Formal)) loop
6461 Formal := Next_Formal (Formal);
6469 function Model_Emin_Value (Id : E) return Uint is
6471 return Machine_Emin_Value (Id);
6472 end Model_Emin_Value;
6474 -------------------------
6475 -- Model_Epsilon_Value --
6476 -------------------------
6478 function Model_Epsilon_Value (Id : E) return Ureal is
6479 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6481 return Radix ** (1 - Model_Mantissa_Value (Id));
6482 end Model_Epsilon_Value;
6484 --------------------------
6485 -- Model_Mantissa_Value --
6486 --------------------------
6488 function Model_Mantissa_Value (Id : E) return Uint is
6490 return Machine_Mantissa_Value (Id);
6491 end Model_Mantissa_Value;
6493 -----------------------
6494 -- Model_Small_Value --
6495 -----------------------
6497 function Model_Small_Value (Id : E) return Ureal is
6498 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6500 return Radix ** (Model_Emin_Value (Id) - 1);
6501 end Model_Small_Value;
6503 ------------------------
6504 -- Machine_Emax_Value --
6505 ------------------------
6507 function Machine_Emax_Value (Id : E) return Uint is
6508 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6511 case Float_Rep (Id) is
6514 when 1 .. 6 => return Uint_128;
6515 when 7 .. 15 => return 2**10;
6516 when 16 .. 18 => return 2**14;
6517 when others => return No_Uint;
6522 when 1 .. 9 => return 2**7 - 1;
6523 when 10 .. 15 => return 2**10 - 1;
6524 when others => return No_Uint;
6528 return Uint_2 ** Uint_7 - Uint_1;
6530 end Machine_Emax_Value;
6532 ------------------------
6533 -- Machine_Emin_Value --
6534 ------------------------
6536 function Machine_Emin_Value (Id : E) return Uint is
6538 case Float_Rep (Id) is
6539 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6540 when VAX_Native => return -Machine_Emax_Value (Id);
6541 when AAMP => return -Machine_Emax_Value (Id);
6543 end Machine_Emin_Value;
6545 ----------------------------
6546 -- Machine_Mantissa_Value --
6547 ----------------------------
6549 function Machine_Mantissa_Value (Id : E) return Uint is
6550 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6553 case Float_Rep (Id) is
6556 when 1 .. 6 => return Uint_24;
6557 when 7 .. 15 => return UI_From_Int (53);
6558 when 16 .. 18 => return Uint_64;
6559 when others => return No_Uint;
6564 when 1 .. 6 => return Uint_24;
6565 when 7 .. 9 => return UI_From_Int (56);
6566 when 10 .. 15 => return UI_From_Int (53);
6567 when others => return No_Uint;
6572 when 1 .. 6 => return Uint_24;
6573 when 7 .. 9 => return UI_From_Int (40);
6574 when others => return No_Uint;
6577 end Machine_Mantissa_Value;
6579 -------------------------
6580 -- Machine_Radix_Value --
6581 -------------------------
6583 function Machine_Radix_Value (Id : E) return U is
6585 case Float_Rep (Id) is
6586 when IEEE_Binary | VAX_Native | AAMP =>
6589 end Machine_Radix_Value;
6591 --------------------
6592 -- Next_Component --
6593 --------------------
6595 function Next_Component (Id : E) return E is
6599 Comp_Id := Next_Entity (Id);
6600 while Present (Comp_Id) loop
6601 exit when Ekind (Comp_Id) = E_Component;
6602 Comp_Id := Next_Entity (Comp_Id);
6608 ------------------------------------
6609 -- Next_Component_Or_Discriminant --
6610 ------------------------------------
6612 function Next_Component_Or_Discriminant (Id : E) return E is
6616 Comp_Id := Next_Entity (Id);
6617 while Present (Comp_Id) loop
6618 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6619 Comp_Id := Next_Entity (Comp_Id);
6623 end Next_Component_Or_Discriminant;
6625 -----------------------
6626 -- Next_Discriminant --
6627 -----------------------
6629 -- This function actually implements both Next_Discriminant and
6630 -- Next_Stored_Discriminant by making sure that the Discriminant
6631 -- returned is of the same variety as Id.
6633 function Next_Discriminant (Id : E) return E is
6635 -- Derived Tagged types with private extensions look like this...
6637 -- E_Discriminant d1
6638 -- E_Discriminant d2
6640 -- E_Discriminant d1
6641 -- E_Discriminant d2
6644 -- so it is critical not to go past the leading discriminants
6649 pragma Assert (Ekind (Id) = E_Discriminant);
6652 D := Next_Entity (D);
6654 or else (Ekind (D) /= E_Discriminant
6655 and then not Is_Itype (D))
6660 exit when Ekind (D) = E_Discriminant
6661 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6665 end Next_Discriminant;
6671 function Next_Formal (Id : E) return E is
6675 -- Follow the chain of declared entities as long as the kind of the
6676 -- entity corresponds to a formal parameter. Skip internal entities
6677 -- that may have been created for implicit subtypes, in the process
6678 -- of analyzing default expressions.
6682 P := Next_Entity (P);
6684 if No (P) or else Is_Formal (P) then
6686 elsif not Is_Internal (P) then
6692 -----------------------------
6693 -- Next_Formal_With_Extras --
6694 -----------------------------
6696 function Next_Formal_With_Extras (Id : E) return E is
6698 if Present (Extra_Formal (Id)) then
6699 return Extra_Formal (Id);
6701 return Next_Formal (Id);
6703 end Next_Formal_With_Extras;
6709 function Next_Index (Id : Node_Id) return Node_Id is
6718 function Next_Literal (Id : E) return E is
6720 pragma Assert (Nkind (Id) in N_Entity);
6724 ------------------------------
6725 -- Next_Stored_Discriminant --
6726 ------------------------------
6728 function Next_Stored_Discriminant (Id : E) return E is
6730 -- See comment in Next_Discriminant
6732 return Next_Discriminant (Id);
6733 end Next_Stored_Discriminant;
6735 -----------------------
6736 -- Number_Dimensions --
6737 -----------------------
6739 function Number_Dimensions (Id : E) return Pos is
6744 if Ekind (Id) in String_Kind then
6749 T := First_Index (Id);
6750 while Present (T) loop
6757 end Number_Dimensions;
6759 --------------------
6760 -- Number_Entries --
6761 --------------------
6763 function Number_Entries (Id : E) return Nat is
6768 pragma Assert (Is_Concurrent_Type (Id));
6771 Ent := First_Entity (Id);
6772 while Present (Ent) loop
6773 if Is_Entry (Ent) then
6777 Ent := Next_Entity (Ent);
6783 --------------------
6784 -- Number_Formals --
6785 --------------------
6787 function Number_Formals (Id : E) return Pos is
6793 Formal := First_Formal (Id);
6794 while Present (Formal) loop
6796 Formal := Next_Formal (Formal);
6802 --------------------
6803 -- Parameter_Mode --
6804 --------------------
6806 function Parameter_Mode (Id : E) return Formal_Kind is
6811 --------------------------
6812 -- Primitive_Operations --
6813 --------------------------
6815 function Primitive_Operations (Id : E) return L is
6817 if Is_Concurrent_Type (Id) then
6818 if Present (Corresponding_Record_Type (Id)) then
6819 return Direct_Primitive_Operations
6820 (Corresponding_Record_Type (Id));
6825 return Direct_Primitive_Operations (Id);
6827 end Primitive_Operations;
6829 ---------------------
6830 -- Record_Rep_Item --
6831 ---------------------
6833 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6835 Set_Next_Rep_Item (N, First_Rep_Item (E));
6836 Set_First_Rep_Item (E, N);
6837 end Record_Rep_Item;
6843 function Root_Type (Id : E) return E is
6847 pragma Assert (Nkind (Id) in N_Entity);
6849 T := Base_Type (Id);
6851 if Ekind (T) = E_Class_Wide_Type then
6854 elsif Ekind (T) = E_Class_Wide_Subtype then
6855 return Etype (Base_Type (T));
6857 -- ??? T comes from Base_Type, how can it be a subtype?
6858 -- Also Base_Type is supposed to be idempotent, so either way
6859 -- this is equivalent to "return Etype (T)" and should be merged
6860 -- with the E_Class_Wide_Type case.
6871 -- Following test catches some error cases resulting from
6874 elsif No (Etyp) then
6877 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6880 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6886 -- Return if there is a circularity in the inheritance chain. This
6887 -- happens in some error situations and we do not want to get
6888 -- stuck in this loop.
6890 if T = Base_Type (Id) then
6897 ---------------------
6898 -- Safe_Emax_Value --
6899 ---------------------
6901 function Safe_Emax_Value (Id : E) return Uint is
6903 return Machine_Emax_Value (Id);
6904 end Safe_Emax_Value;
6906 ----------------------
6907 -- Safe_First_Value --
6908 ----------------------
6910 function Safe_First_Value (Id : E) return Ureal is
6912 return -Safe_Last_Value (Id);
6913 end Safe_First_Value;
6915 ---------------------
6916 -- Safe_Last_Value --
6917 ---------------------
6919 function Safe_Last_Value (Id : E) return Ureal is
6920 Radix : constant Uint := Machine_Radix_Value (Id);
6921 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
6922 Emax : constant Uint := Safe_Emax_Value (Id);
6923 Significand : constant Uint := Radix ** Mantissa - 1;
6924 Exponent : constant Uint := Emax - Mantissa;
6930 (Num => Significand * 2 ** (Exponent mod 4),
6931 Den => -Exponent / 4,
6937 (Num => Significand,
6941 end Safe_Last_Value;
6947 function Scope_Depth (Id : E) return Uint is
6952 while Is_Record_Type (Scop) loop
6953 Scop := Scope (Scop);
6956 return Scope_Depth_Value (Scop);
6959 ---------------------
6960 -- Scope_Depth_Set --
6961 ---------------------
6963 function Scope_Depth_Set (Id : E) return B is
6965 return not Is_Record_Type (Id)
6966 and then Field22 (Id) /= Union_Id (Empty);
6967 end Scope_Depth_Set;
6969 -----------------------------
6970 -- Set_Component_Alignment --
6971 -----------------------------
6973 -- Component Alignment is encoded using two flags, Flag128/129 as
6974 -- follows. Note that both flags False = Align_Default, so that the
6975 -- default initialization of flags to False initializes component
6976 -- alignment to the default value as required.
6978 -- Flag128 Flag129 Value
6979 -- ------- ------- -----
6980 -- False False Calign_Default
6981 -- False True Calign_Component_Size
6982 -- True False Calign_Component_Size_4
6983 -- True True Calign_Storage_Unit
6985 procedure Set_Component_Alignment (Id : E; V : C) is
6987 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6988 and then Is_Base_Type (Id));
6991 when Calign_Default =>
6992 Set_Flag128 (Id, False);
6993 Set_Flag129 (Id, False);
6995 when Calign_Component_Size =>
6996 Set_Flag128 (Id, False);
6997 Set_Flag129 (Id, True);
6999 when Calign_Component_Size_4 =>
7000 Set_Flag128 (Id, True);
7001 Set_Flag129 (Id, False);
7003 when Calign_Storage_Unit =>
7004 Set_Flag128 (Id, True);
7005 Set_Flag129 (Id, True);
7007 end Set_Component_Alignment;
7009 -----------------------------
7010 -- Set_Invariant_Procedure --
7011 -----------------------------
7013 procedure Set_Invariant_Procedure (Id : E; V : E) is
7017 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7019 S := Subprograms_For_Type (Id);
7020 Set_Subprograms_For_Type (Id, V);
7022 while Present (S) loop
7023 if Has_Invariants (S) then
7024 raise Program_Error;
7026 S := Subprograms_For_Type (S);
7030 Set_Subprograms_For_Type (Id, V);
7031 end Set_Invariant_Procedure;
7033 ----------------------------
7034 -- Set_Predicate_Function --
7035 ----------------------------
7037 procedure Set_Predicate_Function (Id : E; V : E) is
7041 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7043 S := Subprograms_For_Type (Id);
7044 Set_Subprograms_For_Type (Id, V);
7046 while Present (S) loop
7047 if Has_Predicates (S) then
7048 raise Program_Error;
7050 S := Subprograms_For_Type (S);
7054 Set_Subprograms_For_Type (Id, V);
7055 end Set_Predicate_Function;
7061 function Size_Clause (Id : E) return N is
7063 return Rep_Clause (Id, Name_Size);
7066 ------------------------
7067 -- Stream_Size_Clause --
7068 ------------------------
7070 function Stream_Size_Clause (Id : E) return N is
7072 return Rep_Clause (Id, Name_Stream_Size);
7073 end Stream_Size_Clause;
7079 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7085 Kind := E_Access_Subtype;
7089 Kind := E_Array_Subtype;
7091 when E_Class_Wide_Type |
7092 E_Class_Wide_Subtype =>
7093 Kind := E_Class_Wide_Subtype;
7095 when E_Decimal_Fixed_Point_Type |
7096 E_Decimal_Fixed_Point_Subtype =>
7097 Kind := E_Decimal_Fixed_Point_Subtype;
7099 when E_Ordinary_Fixed_Point_Type |
7100 E_Ordinary_Fixed_Point_Subtype =>
7101 Kind := E_Ordinary_Fixed_Point_Subtype;
7103 when E_Private_Type |
7104 E_Private_Subtype =>
7105 Kind := E_Private_Subtype;
7107 when E_Limited_Private_Type |
7108 E_Limited_Private_Subtype =>
7109 Kind := E_Limited_Private_Subtype;
7111 when E_Record_Type_With_Private |
7112 E_Record_Subtype_With_Private =>
7113 Kind := E_Record_Subtype_With_Private;
7115 when E_Record_Type |
7117 Kind := E_Record_Subtype;
7119 when E_String_Type |
7121 Kind := E_String_Subtype;
7123 when Enumeration_Kind =>
7124 Kind := E_Enumeration_Subtype;
7127 Kind := E_Floating_Point_Subtype;
7129 when Signed_Integer_Kind =>
7130 Kind := E_Signed_Integer_Subtype;
7132 when Modular_Integer_Kind =>
7133 Kind := E_Modular_Integer_Subtype;
7135 when Protected_Kind =>
7136 Kind := E_Protected_Subtype;
7139 Kind := E_Task_Subtype;
7143 raise Program_Error;
7149 ---------------------
7150 -- Type_High_Bound --
7151 ---------------------
7153 function Type_High_Bound (Id : E) return Node_Id is
7154 Rng : constant Node_Id := Scalar_Range (Id);
7156 if Nkind (Rng) = N_Subtype_Indication then
7157 return High_Bound (Range_Expression (Constraint (Rng)));
7159 return High_Bound (Rng);
7161 end Type_High_Bound;
7163 --------------------
7164 -- Type_Low_Bound --
7165 --------------------
7167 function Type_Low_Bound (Id : E) return Node_Id is
7168 Rng : constant Node_Id := Scalar_Range (Id);
7170 if Nkind (Rng) = N_Subtype_Indication then
7171 return Low_Bound (Range_Expression (Constraint (Rng)));
7173 return Low_Bound (Rng);
7177 ---------------------
7178 -- Underlying_Type --
7179 ---------------------
7181 function Underlying_Type (Id : E) return E is
7183 -- For record_with_private the underlying type is always the direct
7184 -- full view. Never try to take the full view of the parent it
7185 -- doesn't make sense.
7187 if Ekind (Id) = E_Record_Type_With_Private then
7188 return Full_View (Id);
7190 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7192 -- If we have an incomplete or private type with a full view,
7193 -- then we return the Underlying_Type of this full view
7195 if Present (Full_View (Id)) then
7196 if Id = Full_View (Id) then
7198 -- Previous error in declaration
7203 return Underlying_Type (Full_View (Id));
7206 -- If we have an incomplete entity that comes from the limited
7207 -- view then we return the Underlying_Type of its non-limited
7210 elsif From_With_Type (Id)
7211 and then Present (Non_Limited_View (Id))
7213 return Underlying_Type (Non_Limited_View (Id));
7215 -- Otherwise check for the case where we have a derived type or
7216 -- subtype, and if so get the Underlying_Type of the parent type.
7218 elsif Etype (Id) /= Id then
7219 return Underlying_Type (Etype (Id));
7221 -- Otherwise we have an incomplete or private type that has
7222 -- no full view, which means that we have not encountered the
7223 -- completion, so return Empty to indicate the underlying type
7224 -- is not yet known.
7230 -- For non-incomplete, non-private types, return the type itself
7231 -- Also for entities that are not types at all return the entity
7237 end Underlying_Type;
7243 function Vax_Float (Id : E) return B is
7245 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7248 ------------------------
7249 -- Write_Entity_Flags --
7250 ------------------------
7252 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7254 procedure W (Flag_Name : String; Flag : Boolean);
7255 -- Write out given flag if it is set
7261 procedure W (Flag_Name : String; Flag : Boolean) is
7265 Write_Str (Flag_Name);
7266 Write_Str (" = True");
7271 -- Start of processing for Write_Entity_Flags
7274 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7275 and then Is_Base_Type (Id)
7278 Write_Str ("Component_Alignment = ");
7280 case Component_Alignment (Id) is
7281 when Calign_Default =>
7282 Write_Str ("Calign_Default");
7284 when Calign_Component_Size =>
7285 Write_Str ("Calign_Component_Size");
7287 when Calign_Component_Size_4 =>
7288 Write_Str ("Calign_Component_Size_4");
7290 when Calign_Storage_Unit =>
7291 Write_Str ("Calign_Storage_Unit");
7297 W ("Address_Taken", Flag104 (Id));
7298 W ("Body_Needed_For_SAL", Flag40 (Id));
7299 W ("C_Pass_By_Copy", Flag125 (Id));
7300 W ("Can_Never_Be_Null", Flag38 (Id));
7301 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7302 W ("Debug_Info_Off", Flag166 (Id));
7303 W ("Default_Expressions_Processed", Flag108 (Id));
7304 W ("Delay_Cleanups", Flag114 (Id));
7305 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7306 W ("Depends_On_Private", Flag14 (Id));
7307 W ("Discard_Names", Flag88 (Id));
7308 W ("Elaboration_Entity_Required", Flag174 (Id));
7309 W ("Elaborate_Body_Desirable", Flag210 (Id));
7310 W ("Entry_Accepted", Flag152 (Id));
7311 W ("Can_Use_Internal_Rep", Flag229 (Id));
7312 W ("Finalize_Storage_Only", Flag158 (Id));
7313 W ("From_With_Type", Flag159 (Id));
7314 W ("Has_Aliased_Components", Flag135 (Id));
7315 W ("Has_Alignment_Clause", Flag46 (Id));
7316 W ("Has_All_Calls_Remote", Flag79 (Id));
7317 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7318 W ("Has_Atomic_Components", Flag86 (Id));
7319 W ("Has_Biased_Representation", Flag139 (Id));
7320 W ("Has_Completion", Flag26 (Id));
7321 W ("Has_Completion_In_Body", Flag71 (Id));
7322 W ("Has_Complex_Representation", Flag140 (Id));
7323 W ("Has_Component_Size_Clause", Flag68 (Id));
7324 W ("Has_Contiguous_Rep", Flag181 (Id));
7325 W ("Has_Controlled_Component", Flag43 (Id));
7326 W ("Has_Controlling_Result", Flag98 (Id));
7327 W ("Has_Convention_Pragma", Flag119 (Id));
7328 W ("Has_Delayed_Aspects", Flag200 (Id));
7329 W ("Has_Delayed_Freeze", Flag18 (Id));
7330 W ("Has_Discriminants", Flag5 (Id));
7331 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7332 W ("Has_Exit", Flag47 (Id));
7333 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7334 W ("Has_Forward_Instantiation", Flag175 (Id));
7335 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7336 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7337 W ("Has_Homonym", Flag56 (Id));
7338 W ("Has_Inheritable_Invariants", Flag248 (Id));
7339 W ("Has_Initial_Value", Flag219 (Id));
7340 W ("Has_Invariants", Flag232 (Id));
7341 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7342 W ("Has_Master_Entity", Flag21 (Id));
7343 W ("Has_Missing_Return", Flag142 (Id));
7344 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7345 W ("Has_Non_Standard_Rep", Flag75 (Id));
7346 W ("Has_Object_Size_Clause", Flag172 (Id));
7347 W ("Has_Per_Object_Constraint", Flag154 (Id));
7348 W ("Has_Persistent_BSS", Flag188 (Id));
7349 W ("Has_Postconditions", Flag240 (Id));
7350 W ("Has_Pragma_Controlled", Flag27 (Id));
7351 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7352 W ("Has_Pragma_Inline", Flag157 (Id));
7353 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7354 W ("Has_Pragma_Ordered", Flag198 (Id));
7355 W ("Has_Pragma_Pack", Flag121 (Id));
7356 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7357 W ("Has_Pragma_Pure", Flag203 (Id));
7358 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7359 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7360 W ("Has_Pragma_Unmodified", Flag233 (Id));
7361 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7362 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7363 W ("Has_Predicates", Flag250 (Id));
7364 W ("Has_Primitive_Operations", Flag120 (Id));
7365 W ("Has_Private_Declaration", Flag155 (Id));
7366 W ("Has_Qualified_Name", Flag161 (Id));
7367 W ("Has_RACW", Flag214 (Id));
7368 W ("Has_Record_Rep_Clause", Flag65 (Id));
7369 W ("Has_Recursive_Call", Flag143 (Id));
7370 W ("Has_Size_Clause", Flag29 (Id));
7371 W ("Has_Small_Clause", Flag67 (Id));
7372 W ("Has_Specified_Layout", Flag100 (Id));
7373 W ("Has_Specified_Stream_Input", Flag190 (Id));
7374 W ("Has_Specified_Stream_Output", Flag191 (Id));
7375 W ("Has_Specified_Stream_Read", Flag192 (Id));
7376 W ("Has_Specified_Stream_Write", Flag193 (Id));
7377 W ("Has_Static_Discriminants", Flag211 (Id));
7378 W ("Has_Storage_Size_Clause", Flag23 (Id));
7379 W ("Has_Stream_Size_Clause", Flag184 (Id));
7380 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7381 W ("Has_Task", Flag30 (Id));
7382 W ("Has_Thunks", Flag228 (Id));
7383 W ("Has_Unchecked_Union", Flag123 (Id));
7384 W ("Has_Unknown_Discriminants", Flag72 (Id));
7385 W ("Has_Up_Level_Access", Flag215 (Id));
7386 W ("Has_Volatile_Components", Flag87 (Id));
7387 W ("Has_Xref_Entry", Flag182 (Id));
7388 W ("In_Package_Body", Flag48 (Id));
7389 W ("In_Private_Part", Flag45 (Id));
7390 W ("In_Use", Flag8 (Id));
7391 W ("Is_AST_Entry", Flag132 (Id));
7392 W ("Is_Abstract_Subprogram", Flag19 (Id));
7393 W ("Is_Abstract_Type", Flag146 (Id));
7394 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7395 W ("Is_Access_Constant", Flag69 (Id));
7396 W ("Is_Ada_2005_Only", Flag185 (Id));
7397 W ("Is_Ada_2012_Only", Flag199 (Id));
7398 W ("Is_Aliased", Flag15 (Id));
7399 W ("Is_Asynchronous", Flag81 (Id));
7400 W ("Is_Atomic", Flag85 (Id));
7401 W ("Is_Bit_Packed_Array", Flag122 (Id));
7402 W ("Is_CPP_Class", Flag74 (Id));
7403 W ("Is_Called", Flag102 (Id));
7404 W ("Is_Character_Type", Flag63 (Id));
7405 W ("Is_Child_Unit", Flag73 (Id));
7406 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7407 W ("Is_Compilation_Unit", Flag149 (Id));
7408 W ("Is_Completely_Hidden", Flag103 (Id));
7409 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7410 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7411 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7412 W ("Is_Constrained", Flag12 (Id));
7413 W ("Is_Constructor", Flag76 (Id));
7414 W ("Is_Controlled", Flag42 (Id));
7415 W ("Is_Controlling_Formal", Flag97 (Id));
7416 W ("Is_Descendent_Of_Address", Flag223 (Id));
7417 W ("Is_Discrim_SO_Function", Flag176 (Id));
7418 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7419 W ("Is_Dispatching_Operation", Flag6 (Id));
7420 W ("Is_Eliminated", Flag124 (Id));
7421 W ("Is_Entry_Formal", Flag52 (Id));
7422 W ("Is_Exported", Flag99 (Id));
7423 W ("Is_First_Subtype", Flag70 (Id));
7424 W ("Is_For_Access_Subtype", Flag118 (Id));
7425 W ("Is_Formal_Subprogram", Flag111 (Id));
7426 W ("Is_Frozen", Flag4 (Id));
7427 W ("Is_Generic_Actual_Type", Flag94 (Id));
7428 W ("Is_Generic_Instance", Flag130 (Id));
7429 W ("Is_Generic_Type", Flag13 (Id));
7430 W ("Is_Hidden", Flag57 (Id));
7431 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7432 W ("Is_Immediately_Visible", Flag7 (Id));
7433 W ("Is_Imported", Flag24 (Id));
7434 W ("Is_Inlined", Flag11 (Id));
7435 W ("Is_Instantiated", Flag126 (Id));
7436 W ("Is_Interface", Flag186 (Id));
7437 W ("Is_Internal", Flag17 (Id));
7438 W ("Is_Interrupt_Handler", Flag89 (Id));
7439 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7440 W ("Is_Itype", Flag91 (Id));
7441 W ("Is_Known_Non_Null", Flag37 (Id));
7442 W ("Is_Known_Null", Flag204 (Id));
7443 W ("Is_Known_Valid", Flag170 (Id));
7444 W ("Is_Limited_Composite", Flag106 (Id));
7445 W ("Is_Limited_Interface", Flag197 (Id));
7446 W ("Is_Limited_Record", Flag25 (Id));
7447 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7448 W ("Is_Non_Static_Subtype", Flag109 (Id));
7449 W ("Is_Null_Init_Proc", Flag178 (Id));
7450 W ("Is_Obsolescent", Flag153 (Id));
7451 W ("Is_Only_Out_Parameter", Flag226 (Id));
7452 W ("Is_Optional_Parameter", Flag134 (Id));
7453 W ("Is_Package_Body_Entity", Flag160 (Id));
7454 W ("Is_Packed", Flag51 (Id));
7455 W ("Is_Packed_Array_Type", Flag138 (Id));
7456 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7457 W ("Is_Preelaborated", Flag59 (Id));
7458 W ("Is_Primitive", Flag218 (Id));
7459 W ("Is_Primitive_Wrapper", Flag195 (Id));
7460 W ("Is_Private_Composite", Flag107 (Id));
7461 W ("Is_Private_Descendant", Flag53 (Id));
7462 W ("Is_Private_Primitive", Flag245 (Id));
7463 W ("Is_Public", Flag10 (Id));
7464 W ("Is_Pure", Flag44 (Id));
7465 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7466 W ("Is_RACW_Stub_Type", Flag244 (Id));
7467 W ("Is_Raised", Flag224 (Id));
7468 W ("Is_Remote_Call_Interface", Flag62 (Id));
7469 W ("Is_Remote_Types", Flag61 (Id));
7470 W ("Is_Renaming_Of_Object", Flag112 (Id));
7471 W ("Is_Return_Object", Flag209 (Id));
7472 W ("Is_Shared_Passive", Flag60 (Id));
7473 W ("Is_Statically_Allocated", Flag28 (Id));
7474 W ("Is_Tag", Flag78 (Id));
7475 W ("Is_Tagged_Type", Flag55 (Id));
7476 W ("Is_Thunk", Flag225 (Id));
7477 W ("Is_Trivial_Subprogram", Flag235 (Id));
7478 W ("Is_True_Constant", Flag163 (Id));
7479 W ("Is_Unchecked_Union", Flag117 (Id));
7480 W ("Is_Underlying_Record_View", Flag246 (Id));
7481 W ("Is_Unsigned_Type", Flag144 (Id));
7482 W ("Is_VMS_Exception", Flag133 (Id));
7483 W ("Is_Valued_Procedure", Flag127 (Id));
7484 W ("Is_Visible_Child_Unit", Flag116 (Id));
7485 W ("Is_Visible_Formal", Flag206 (Id));
7486 W ("Is_Volatile", Flag16 (Id));
7487 W ("Itype_Printed", Flag202 (Id));
7488 W ("Kill_Elaboration_Checks", Flag32 (Id));
7489 W ("Kill_Range_Checks", Flag33 (Id));
7490 W ("Kill_Tag_Checks", Flag34 (Id));
7491 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7492 W ("Low_Bound_Tested", Flag205 (Id));
7493 W ("Machine_Radix_10", Flag84 (Id));
7494 W ("Materialize_Entity", Flag168 (Id));
7495 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7496 W ("Must_Have_Preelab_Init", Flag208 (Id));
7497 W ("Needs_Debug_Info", Flag147 (Id));
7498 W ("Needs_No_Actuals", Flag22 (Id));
7499 W ("Never_Set_In_Source", Flag115 (Id));
7500 W ("No_Pool_Assigned", Flag131 (Id));
7501 W ("No_Return", Flag113 (Id));
7502 W ("No_Strict_Aliasing", Flag136 (Id));
7503 W ("Non_Binary_Modulus", Flag58 (Id));
7504 W ("Nonzero_Is_True", Flag162 (Id));
7505 W ("OK_To_Rename", Flag247 (Id));
7506 W ("OK_To_Reorder_Components", Flag239 (Id));
7507 W ("Optimize_Alignment_Space", Flag241 (Id));
7508 W ("Optimize_Alignment_Time", Flag242 (Id));
7509 W ("Overlays_Constant", Flag243 (Id));
7510 W ("Reachable", Flag49 (Id));
7511 W ("Referenced", Flag156 (Id));
7512 W ("Referenced_As_LHS", Flag36 (Id));
7513 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7514 W ("Renamed_In_Spec", Flag231 (Id));
7515 W ("Requires_Overriding", Flag213 (Id));
7516 W ("Return_Present", Flag54 (Id));
7517 W ("Returns_By_Ref", Flag90 (Id));
7518 W ("Reverse_Bit_Order", Flag164 (Id));
7519 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7520 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7521 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7522 W ("Static_Elaboration_Desired", Flag77 (Id));
7523 W ("Strict_Alignment", Flag145 (Id));
7524 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7525 W ("Suppress_Init_Proc", Flag105 (Id));
7526 W ("Suppress_Style_Checks", Flag165 (Id));
7527 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7528 W ("Treat_As_Volatile", Flag41 (Id));
7529 W ("Universal_Aliasing", Flag216 (Id));
7530 W ("Used_As_Generic_Actual", Flag222 (Id));
7531 W ("Uses_Sec_Stack", Flag95 (Id));
7532 W ("Warnings_Off", Flag96 (Id));
7533 W ("Warnings_Off_Used", Flag236 (Id));
7534 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7535 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7536 W ("Was_Hidden", Flag196 (Id));
7537 end Write_Entity_Flags;
7539 -----------------------
7540 -- Write_Entity_Info --
7541 -----------------------
7543 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7545 procedure Write_Attribute (Which : String; Nam : E);
7546 -- Write attribute value with given string name
7548 procedure Write_Kind (Id : Entity_Id);
7549 -- Write Ekind field of entity
7551 ---------------------
7552 -- Write_Attribute --
7553 ---------------------
7555 procedure Write_Attribute (Which : String; Nam : E) is
7559 Write_Int (Int (Nam));
7561 Write_Name (Chars (Nam));
7563 end Write_Attribute;
7569 procedure Write_Kind (Id : Entity_Id) is
7570 K : constant String := Entity_Kind'Image (Ekind (Id));
7574 Write_Str (" Kind ");
7576 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7577 Write_Str ("TAGGED ");
7580 Write_Str (K (3 .. K'Length));
7583 if Is_Type (Id) and then Depends_On_Private (Id) then
7584 Write_Str ("Depends_On_Private ");
7588 -- Start of processing for Write_Entity_Info
7592 Write_Attribute ("Name ", Id);
7593 Write_Int (Int (Id));
7597 Write_Attribute (" Type ", Etype (Id));
7599 Write_Attribute (" Scope ", Scope (Id));
7604 when Discrete_Kind =>
7605 Write_Str ("Bounds: Id = ");
7607 if Present (Scalar_Range (Id)) then
7608 Write_Int (Int (Type_Low_Bound (Id)));
7609 Write_Str (" .. Id = ");
7610 Write_Int (Int (Type_High_Bound (Id)));
7612 Write_Str ("Empty");
7623 (" Component Type ", Component_Type (Id));
7626 Write_Str (" Indexes ");
7628 Index := First_Index (Id);
7629 while Present (Index) loop
7630 Write_Attribute (" ", Etype (Index));
7631 Index := Next_Index (Index);
7639 (" Directly Designated Type ",
7640 Directly_Designated_Type (Id));
7643 when Overloadable_Kind =>
7644 if Present (Homonym (Id)) then
7645 Write_Str (" Homonym ");
7646 Write_Name (Chars (Homonym (Id)));
7648 Write_Int (Int (Homonym (Id)));
7655 if Ekind (Scope (Id)) in Record_Kind then
7657 " Original_Record_Component ",
7658 Original_Record_Component (Id));
7659 Write_Int (Int (Original_Record_Component (Id)));
7663 when others => null;
7665 end Write_Entity_Info;
7667 -----------------------
7668 -- Write_Field6_Name --
7669 -----------------------
7671 procedure Write_Field6_Name (Id : Entity_Id) is
7672 pragma Warnings (Off, Id);
7674 Write_Str ("First_Rep_Item");
7675 end Write_Field6_Name;
7677 -----------------------
7678 -- Write_Field7_Name --
7679 -----------------------
7681 procedure Write_Field7_Name (Id : Entity_Id) is
7682 pragma Warnings (Off, Id);
7684 Write_Str ("Freeze_Node");
7685 end Write_Field7_Name;
7687 -----------------------
7688 -- Write_Field8_Name --
7689 -----------------------
7691 procedure Write_Field8_Name (Id : Entity_Id) is
7696 Write_Str ("Normalized_First_Bit");
7700 E_Subprogram_Body =>
7701 Write_Str ("Mechanism");
7704 Write_Str ("Associated_Node_For_Itype");
7707 Write_Str ("First_Exit_Statement");
7710 Write_Str ("Dependent_Instances");
7713 Write_Str ("Postcondition_Proc");
7715 when E_Return_Statement =>
7716 Write_Str ("Return_Applies_To");
7719 Write_Str ("Hiding_Loop_Variable");
7722 Write_Str ("Field8??");
7724 end Write_Field8_Name;
7726 -----------------------
7727 -- Write_Field9_Name --
7728 -----------------------
7730 procedure Write_Field9_Name (Id : Entity_Id) is
7734 Write_Str ("Class_Wide_Type");
7737 E_Generic_Function |
7739 E_Generic_Procedure |
7742 Write_Str ("Renaming_Map");
7745 Write_Str ("Current_Value");
7748 Write_Str ("Field9??");
7750 end Write_Field9_Name;
7752 ------------------------
7753 -- Write_Field10_Name --
7754 ------------------------
7756 procedure Write_Field10_Name (Id : Entity_Id) is
7759 when Class_Wide_Kind |
7765 Write_Str ("Direct_Primitive_Operations");
7768 Write_Str ("Float_Rep");
7770 when E_In_Parameter |
7772 Write_Str ("Discriminal_Link");
7778 Write_Str ("Handler_Records");
7782 Write_Str ("Normalized_Position_Max");
7785 Write_Str ("Field10??");
7787 end Write_Field10_Name;
7789 ------------------------
7790 -- Write_Field11_Name --
7791 ------------------------
7793 procedure Write_Field11_Name (Id : Entity_Id) is
7797 Write_Str ("Entry_Component");
7801 Write_Str ("Component_Bit_Offset");
7804 Write_Str ("Full_View");
7806 when E_Enumeration_Literal =>
7807 Write_Str ("Enumeration_Pos");
7810 Write_Str ("Block_Node");
7816 Write_Str ("Protected_Body_Subprogram");
7818 when E_Generic_Package =>
7819 Write_Str ("Generic_Homonym");
7822 Write_Str ("Full_View");
7825 Write_Str ("Field11??");
7827 end Write_Field11_Name;
7829 ------------------------
7830 -- Write_Field12_Name --
7831 ------------------------
7833 procedure Write_Field12_Name (Id : Entity_Id) is
7837 Write_Str ("Barrier_Function");
7839 when E_Enumeration_Literal =>
7840 Write_Str ("Enumeration_Rep");
7848 E_In_Out_Parameter |
7852 Write_Str ("Esize");
7856 Write_Str ("Next_Inlined_Subprogram");
7859 Write_Str ("Associated_Formal_Package");
7862 Write_Str ("Field12??");
7864 end Write_Field12_Name;
7866 ------------------------
7867 -- Write_Field13_Name --
7868 ------------------------
7870 procedure Write_Field13_Name (Id : Entity_Id) is
7874 Write_Str ("RM_Size");
7878 Write_Str ("Component_Clause");
7881 if not Comes_From_Source (Id)
7883 Chars (Id) = Name_Op_Ne
7885 Write_Str ("Corresponding_Equality");
7887 elsif Comes_From_Source (Id) then
7888 Write_Str ("Elaboration_Entity");
7891 Write_Str ("Field13??");
7896 Write_Str ("Extra_Accessibility");
7900 Generic_Unit_Kind =>
7901 Write_Str ("Elaboration_Entity");
7904 Write_Str ("Field13??");
7906 end Write_Field13_Name;
7908 -----------------------
7909 -- Write_Field14_Name --
7910 -----------------------
7912 procedure Write_Field14_Name (Id : Entity_Id) is
7921 Write_Str ("Alignment");
7925 Write_Str ("Normalized_Position");
7929 Write_Str ("First_Optional_Parameter");
7932 E_Generic_Package =>
7933 Write_Str ("Shadow_Entities");
7936 Write_Str ("Field14??");
7938 end Write_Field14_Name;
7940 ------------------------
7941 -- Write_Field15_Name --
7942 ------------------------
7944 procedure Write_Field15_Name (Id : Entity_Id) is
7949 Write_Str ("Storage_Size_Variable");
7952 Write_Str ("DT_Entry_Count");
7954 when Decimal_Fixed_Point_Kind =>
7955 Write_Str ("Scale_Value");
7957 when E_Discriminant =>
7958 Write_Str ("Discriminant_Number");
7961 Write_Str ("Extra_Formal");
7965 Write_Str ("DT_Position");
7968 Write_Str ("Entry_Parameters_Type");
7970 when Enumeration_Kind =>
7971 Write_Str ("Lit_Indexes");
7975 Write_Str ("Related_Instance");
7977 when E_Protected_Type =>
7978 Write_Str ("Entry_Bodies_Array");
7980 when E_String_Literal_Subtype =>
7981 Write_Str ("String_Literal_Low_Bound");
7984 Write_Str ("Field15??");
7986 end Write_Field15_Name;
7988 ------------------------
7989 -- Write_Field16_Name --
7990 ------------------------
7992 procedure Write_Field16_Name (Id : Entity_Id) is
7996 Write_Str ("Entry_Formal");
8000 Write_Str ("DTC_Entity");
8005 Write_Str ("First_Private_Entity");
8007 when E_Record_Type |
8008 E_Record_Type_With_Private =>
8009 Write_Str ("Access_Disp_Table");
8011 when E_String_Literal_Subtype =>
8012 Write_Str ("String_Literal_Length");
8014 when Enumeration_Kind =>
8015 Write_Str ("Lit_Strings");
8019 Write_Str ("Unset_Reference");
8021 when E_Record_Subtype |
8022 E_Class_Wide_Subtype =>
8023 Write_Str ("Cloned_Subtype");
8026 Write_Str ("Field16??");
8028 end Write_Field16_Name;
8030 ------------------------
8031 -- Write_Field17_Name --
8032 ------------------------
8034 procedure Write_Field17_Name (Id : Entity_Id) is
8038 Write_Str ("Digits_Value");
8041 Write_Str ("Prival");
8043 when E_Discriminant =>
8044 Write_Str ("Discriminal");
8053 E_Generic_Function |
8055 E_Generic_Procedure |
8063 E_Return_Statement |
8065 E_Subprogram_Type =>
8066 Write_Str ("First_Entity");
8069 Write_Str ("First_Index");
8071 when Enumeration_Kind =>
8072 Write_Str ("First_Literal");
8075 Write_Str ("Master_Id");
8077 when Modular_Integer_Kind =>
8078 Write_Str ("Modulus");
8082 E_Generic_In_Out_Parameter |
8084 Write_Str ("Actual_Subtype");
8086 when E_Incomplete_Type =>
8087 Write_Str ("Non_Limited_View");
8089 when E_Incomplete_Subtype =>
8090 if From_With_Type (Id) then
8091 Write_Str ("Non_Limited_View");
8095 Write_Str ("Field17??");
8097 end Write_Field17_Name;
8099 ------------------------
8100 -- Write_Field18_Name --
8101 ------------------------
8103 procedure Write_Field18_Name (Id : Entity_Id) is
8106 when E_Enumeration_Literal |
8110 Write_Str ("Alias");
8112 when E_Record_Type =>
8113 Write_Str ("Corresponding_Concurrent_Type");
8115 when E_Subprogram_Body =>
8116 Write_Str ("Corresponding_Protected_Entry");
8118 when E_Entry_Index_Parameter =>
8119 Write_Str ("Entry_Index_Constant");
8121 when E_Class_Wide_Subtype |
8122 E_Access_Protected_Subprogram_Type |
8123 E_Anonymous_Access_Protected_Subprogram_Type |
8124 E_Access_Subprogram_Type |
8126 Write_Str ("Equivalent_Type");
8128 when Fixed_Point_Kind =>
8129 Write_Str ("Delta_Value");
8132 Write_Str ("Renamed_Object");
8136 E_Generic_Function |
8137 E_Generic_Procedure |
8138 E_Generic_Package =>
8139 Write_Str ("Renamed_Entity");
8141 when Incomplete_Or_Private_Kind |
8143 Write_Str ("Private_Dependents");
8145 when Concurrent_Kind =>
8146 Write_Str ("Corresponding_Record_Type");
8151 Write_Str ("Enclosing_Scope");
8154 Write_Str ("Field18??");
8156 end Write_Field18_Name;
8158 -----------------------
8159 -- Write_Field19_Name --
8160 -----------------------
8162 procedure Write_Field19_Name (Id : Entity_Id) is
8167 Write_Str ("Related_Array_Object");
8173 E_Return_Statement |
8175 Write_Str ("Finalization_Chain_Entity");
8177 when E_Constant | E_Variable =>
8178 Write_Str ("Size_Check_Code");
8180 when E_Discriminant =>
8181 Write_Str ("Corresponding_Discriminant");
8184 E_Generic_Package =>
8185 Write_Str ("Body_Entity");
8187 when E_Package_Body |
8189 Write_Str ("Spec_Entity");
8191 when Private_Kind =>
8192 Write_Str ("Underlying_Full_View");
8194 when E_Record_Type =>
8195 Write_Str ("Parent_Subtype");
8198 Write_Str ("Field19??");
8200 end Write_Field19_Name;
8202 -----------------------
8203 -- Write_Field20_Name --
8204 -----------------------
8206 procedure Write_Field20_Name (Id : Entity_Id) is
8210 Write_Str ("Component_Type");
8212 when E_In_Parameter |
8213 E_Generic_In_Parameter =>
8214 Write_Str ("Default_Value");
8217 Write_Str ("Directly_Designated_Type");
8220 Write_Str ("Discriminant_Checking_Func");
8224 Write_Str ("Prival_Link");
8226 when E_Discriminant =>
8227 Write_Str ("Discriminant_Default_Value");
8236 E_Generic_Function |
8238 E_Generic_Procedure |
8246 E_Return_Statement |
8248 E_Subprogram_Type =>
8249 Write_Str ("Last_Entity");
8252 Write_Str ("Scalar_Range");
8255 Write_Str ("Register_Exception_Call");
8258 Write_Str ("Field20??");
8260 end Write_Field20_Name;
8262 -----------------------
8263 -- Write_Field21_Name --
8264 -----------------------
8266 procedure Write_Field21_Name (Id : Entity_Id) is
8272 E_Generic_Function |
8274 E_Generic_Procedure |
8276 Write_Str ("Interface_Name");
8278 when Concurrent_Kind |
8279 Incomplete_Or_Private_Kind |
8283 Write_Str ("Discriminant_Constraint");
8286 Write_Str ("Accept_Address");
8288 when Fixed_Point_Kind =>
8289 Write_Str ("Small_Value");
8291 when E_In_Parameter =>
8292 Write_Str ("Default_Expr_Function");
8295 Modular_Integer_Kind =>
8296 Write_Str ("Original_Array_Type");
8299 Write_Str ("Field21??");
8301 end Write_Field21_Name;
8303 -----------------------
8304 -- Write_Field22_Name --
8305 -----------------------
8307 procedure Write_Field22_Name (Id : Entity_Id) is
8311 Write_Str ("Associated_Storage_Pool");
8314 Write_Str ("Component_Size");
8318 Write_Str ("Original_Record_Component");
8320 when E_Enumeration_Literal =>
8321 Write_Str ("Enumeration_Rep_Expr");
8324 Write_Str ("Exception_Code");
8327 Write_Str ("Protected_Formal");
8329 when E_Record_Type =>
8330 Write_Str ("Corresponding_Remote_Type");
8340 E_Generic_Function |
8341 E_Generic_Procedure |
8344 E_Return_Statement |
8347 Write_Str ("Scope_Depth_Value");
8349 when E_Record_Type_With_Private |
8350 E_Record_Subtype_With_Private |
8353 E_Limited_Private_Type |
8354 E_Limited_Private_Subtype =>
8355 Write_Str ("Private_View");
8358 Write_Str ("Shared_Var_Procs_Instance");
8361 Write_Str ("Field22??");
8363 end Write_Field22_Name;
8365 ------------------------
8366 -- Write_Field23_Name --
8367 ------------------------
8369 procedure Write_Field23_Name (Id : Entity_Id) is
8373 Write_Str ("Associated_Final_Chain");
8376 Write_Str ("Packed_Array_Type");
8379 Write_Str ("Entry_Cancel_Parameter");
8381 when E_Discriminant =>
8382 Write_Str ("CR_Discriminant");
8384 when E_Enumeration_Type =>
8385 Write_Str ("Enum_Pos_To_Rep");
8389 Write_Str ("Extra_Constrained");
8391 when E_Generic_Function |
8393 E_Generic_Procedure =>
8394 Write_Str ("Inner_Instances");
8396 when Concurrent_Kind |
8397 Incomplete_Or_Private_Kind |
8401 Write_Str ("Stored_Constraint");
8405 if Present (Scope (Id))
8406 and then Is_Protected_Type (Scope (Id))
8408 Write_Str ("Protection_Object");
8410 Write_Str ("Generic_Renamings");
8414 if Is_Generic_Instance (Id) then
8415 Write_Str ("Generic_Renamings");
8417 Write_Str ("Limited_View");
8421 Write_Str ("Protection_Object");
8424 Write_Str ("Field23??");
8426 end Write_Field23_Name;
8428 ------------------------
8429 -- Write_Field24_Name --
8430 ------------------------
8432 procedure Write_Field24_Name (Id : Entity_Id) is
8435 when Subprogram_Kind =>
8436 Write_Str ("Spec_PPC_List");
8438 when E_Variable | E_Constant | Type_Kind =>
8439 Write_Str ("Related_Expression");
8442 Write_Str ("Field24???");
8444 end Write_Field24_Name;
8446 ------------------------
8447 -- Write_Field25_Name --
8448 ------------------------
8450 procedure Write_Field25_Name (Id : Entity_Id) is
8454 Write_Str ("DT_Offset_To_Top_Func");
8458 Write_Str ("Interface_Alias");
8460 when E_Record_Type |
8462 E_Record_Type_With_Private |
8463 E_Record_Subtype_With_Private =>
8464 Write_Str ("Interfaces");
8467 Write_Str ("Task_Body_Procedure");
8470 Write_Str ("Debug_Renaming_Link");
8474 Write_Str ("PPC_Wrapper");
8476 when E_Enumeration_Subtype |
8477 E_Modular_Integer_Subtype |
8478 E_Signed_Integer_Subtype =>
8479 Write_Str ("Static_Predicate");
8482 Write_Str ("Field25??");
8484 end Write_Field25_Name;
8486 ------------------------
8487 -- Write_Field26_Name --
8488 ------------------------
8490 procedure Write_Field26_Name (Id : Entity_Id) is
8493 when E_Generic_Package |
8495 Write_Str ("Package_Instantiation");
8499 if Is_Dispatching_Operation (Id) then
8500 Write_Str ("Overridden_Operation");
8502 Write_Str ("Static_Initialization");
8505 when E_Record_Type |
8506 E_Record_Type_With_Private =>
8507 Write_Str ("Dispatch_Table_Wrappers");
8509 when E_In_Out_Parameter |
8512 Write_Str ("Last_Assignment");
8515 Write_Str ("Relative_Deadline_Variable");
8518 Write_Str ("Field26??");
8520 end Write_Field26_Name;
8522 ------------------------
8523 -- Write_Field27_Name --
8524 ------------------------
8526 procedure Write_Field27_Name (Id : Entity_Id) is
8532 Write_Str ("Related_Type");
8535 Write_Str ("Wrapped_Entity");
8537 when E_Package | Type_Kind =>
8538 Write_Str ("Current_Use_Clause");
8541 Write_Str ("Field27??");
8543 end Write_Field27_Name;
8545 ------------------------
8546 -- Write_Field28_Name --
8547 ------------------------
8549 procedure Write_Field28_Name (Id : Entity_Id) is
8552 when E_Procedure | E_Function | E_Entry =>
8553 Write_Str ("Extra_Formals");
8555 when E_Record_Type =>
8556 Write_Str ("Underlying_Record_View");
8559 Write_Str ("Field28??");
8561 end Write_Field28_Name;
8563 procedure Write_Field29_Name (Id : Entity_Id) is
8567 Write_Str ("Subprograms_For_Type");
8570 Write_Str ("Field29??");
8572 end Write_Field29_Name;
8574 -------------------------
8575 -- Iterator Procedures --
8576 -------------------------
8578 procedure Proc_Next_Component (N : in out Node_Id) is
8580 N := Next_Component (N);
8581 end Proc_Next_Component;
8583 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8585 N := Next_Entity (N);
8586 while Present (N) loop
8587 exit when Ekind_In (N, E_Component, E_Discriminant);
8588 N := Next_Entity (N);
8590 end Proc_Next_Component_Or_Discriminant;
8592 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8594 N := Next_Discriminant (N);
8595 end Proc_Next_Discriminant;
8597 procedure Proc_Next_Formal (N : in out Node_Id) is
8599 N := Next_Formal (N);
8600 end Proc_Next_Formal;
8602 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8604 N := Next_Formal_With_Extras (N);
8605 end Proc_Next_Formal_With_Extras;
8607 procedure Proc_Next_Index (N : in out Node_Id) is
8609 N := Next_Index (N);
8610 end Proc_Next_Index;
8612 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8614 N := Next_Inlined_Subprogram (N);
8615 end Proc_Next_Inlined_Subprogram;
8617 procedure Proc_Next_Literal (N : in out Node_Id) is
8619 N := Next_Literal (N);
8620 end Proc_Next_Literal;
8622 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8624 N := Next_Stored_Discriminant (N);
8625 end Proc_Next_Stored_Discriminant;