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 -- Is_Overriding_Operation Flag39
287 -- Body_Needed_For_SAL Flag40
289 -- Treat_As_Volatile Flag41
290 -- Is_Controlled Flag42
291 -- Has_Controlled_Component Flag43
293 -- In_Private_Part Flag45
294 -- Has_Alignment_Clause Flag46
296 -- In_Package_Body Flag48
298 -- Delay_Subprogram_Descriptors Flag50
301 -- Is_Entry_Formal Flag52
302 -- Is_Private_Descendant Flag53
303 -- Return_Present Flag54
304 -- Is_Tagged_Type Flag55
305 -- Has_Homonym Flag56
307 -- Non_Binary_Modulus Flag58
308 -- Is_Preelaborated Flag59
309 -- Is_Shared_Passive Flag60
311 -- Is_Remote_Types Flag61
312 -- Is_Remote_Call_Interface Flag62
313 -- Is_Character_Type Flag63
314 -- Is_Intrinsic_Subprogram Flag64
315 -- Has_Record_Rep_Clause Flag65
316 -- Has_Enumeration_Rep_Clause Flag66
317 -- Has_Small_Clause Flag67
318 -- Has_Component_Size_Clause Flag68
319 -- Is_Access_Constant Flag69
320 -- Is_First_Subtype Flag70
322 -- Has_Completion_In_Body Flag71
323 -- Has_Unknown_Discriminants Flag72
324 -- Is_Child_Unit Flag73
325 -- Is_CPP_Class Flag74
326 -- Has_Non_Standard_Rep Flag75
327 -- Is_Constructor Flag76
328 -- Static_Elaboration_Desired Flag77
330 -- Has_All_Calls_Remote Flag79
331 -- Is_Constr_Subt_For_U_Nominal Flag80
333 -- Is_Asynchronous Flag81
334 -- Has_Gigi_Rep_Item Flag82
335 -- Has_Machine_Radix_Clause Flag83
336 -- Machine_Radix_10 Flag84
338 -- Has_Atomic_Components Flag86
339 -- Has_Volatile_Components Flag87
340 -- Discard_Names Flag88
341 -- Is_Interrupt_Handler Flag89
342 -- Returns_By_Ref Flag90
345 -- Size_Known_At_Compile_Time Flag92
346 -- Has_Subprogram_Descriptor Flag93
347 -- Is_Generic_Actual_Type Flag94
348 -- Uses_Sec_Stack Flag95
349 -- Warnings_Off Flag96
350 -- Is_Controlling_Formal Flag97
351 -- Has_Controlling_Result Flag98
352 -- Is_Exported Flag99
353 -- Has_Specified_Layout Flag100
355 -- Has_Nested_Block_With_Handler Flag101
357 -- Is_Completely_Hidden Flag103
358 -- Address_Taken Flag104
359 -- Suppress_Init_Proc Flag105
360 -- Is_Limited_Composite Flag106
361 -- Is_Private_Composite Flag107
362 -- Default_Expressions_Processed Flag108
363 -- Is_Non_Static_Subtype Flag109
364 -- Has_External_Tag_Rep_Clause Flag110
366 -- Is_Formal_Subprogram Flag111
367 -- Is_Renaming_Of_Object Flag112
369 -- Delay_Cleanups Flag114
370 -- Never_Set_In_Source Flag115
371 -- Is_Visible_Child_Unit Flag116
372 -- Is_Unchecked_Union Flag117
373 -- Is_For_Access_Subtype Flag118
374 -- Has_Convention_Pragma Flag119
375 -- Has_Primitive_Operations Flag120
377 -- Has_Pragma_Pack Flag121
378 -- Is_Bit_Packed_Array Flag122
379 -- Has_Unchecked_Union Flag123
380 -- Is_Eliminated Flag124
381 -- C_Pass_By_Copy Flag125
382 -- Is_Instantiated Flag126
383 -- Is_Valued_Procedure Flag127
384 -- (used for Component_Alignment) Flag128
385 -- (used for Component_Alignment) Flag129
386 -- Is_Generic_Instance Flag130
388 -- No_Pool_Assigned Flag131
389 -- Is_AST_Entry Flag132
390 -- Is_VMS_Exception Flag133
391 -- Is_Optional_Parameter Flag134
392 -- Has_Aliased_Components Flag135
393 -- No_Strict_Aliasing Flag136
394 -- Is_Machine_Code_Subprogram Flag137
395 -- Is_Packed_Array_Type Flag138
396 -- Has_Biased_Representation Flag139
397 -- Has_Complex_Representation Flag140
399 -- Is_Constr_Subt_For_UN_Aliased Flag141
400 -- Has_Missing_Return Flag142
401 -- Has_Recursive_Call Flag143
402 -- Is_Unsigned_Type Flag144
403 -- Strict_Alignment Flag145
404 -- Is_Abstract_Type Flag146
405 -- Needs_Debug_Info Flag147
406 -- Suppress_Elaboration_Warnings Flag148
407 -- Is_Compilation_Unit Flag149
408 -- Has_Pragma_Elaborate_Body Flag150
410 -- Entry_Accepted Flag152
411 -- Is_Obsolescent Flag153
412 -- Has_Per_Object_Constraint Flag154
413 -- Has_Private_Declaration Flag155
414 -- Referenced Flag156
415 -- Has_Pragma_Inline Flag157
416 -- Finalize_Storage_Only Flag158
417 -- From_With_Type Flag159
418 -- Is_Package_Body_Entity Flag160
420 -- Has_Qualified_Name Flag161
421 -- Nonzero_Is_True Flag162
422 -- Is_True_Constant Flag163
423 -- Reverse_Bit_Order Flag164
424 -- Suppress_Style_Checks Flag165
425 -- Debug_Info_Off Flag166
426 -- Sec_Stack_Needed_For_Return Flag167
427 -- Materialize_Entity Flag168
428 -- Has_Pragma_Thread_Local_Storage Flag169
429 -- Is_Known_Valid Flag170
431 -- Is_Hidden_Open_Scope Flag171
432 -- Has_Object_Size_Clause Flag172
433 -- Has_Fully_Qualified_Name Flag173
434 -- Elaboration_Entity_Required Flag174
435 -- Has_Forward_Instantiation Flag175
436 -- Is_Discrim_SO_Function Flag176
437 -- Size_Depends_On_Discriminant Flag177
438 -- Is_Null_Init_Proc Flag178
439 -- Has_Pragma_Pure_Function Flag179
440 -- Has_Pragma_Unreferenced Flag180
442 -- Has_Contiguous_Rep Flag181
443 -- Has_Xref_Entry Flag182
444 -- Must_Be_On_Byte_Boundary Flag183
445 -- Has_Stream_Size_Clause Flag184
446 -- Is_Ada_2005_Only Flag185
447 -- Is_Interface Flag186
448 -- Has_Constrained_Partial_View Flag187
449 -- Has_Persistent_BSS Flag188
450 -- Is_Pure_Unit_Access_Type Flag189
451 -- Has_Specified_Stream_Input Flag190
453 -- Has_Specified_Stream_Output Flag191
454 -- Has_Specified_Stream_Read Flag192
455 -- Has_Specified_Stream_Write Flag193
456 -- Is_Local_Anonymous_Access Flag194
457 -- Is_Primitive_Wrapper Flag195
458 -- Was_Hidden Flag196
459 -- Is_Limited_Interface Flag197
460 -- Has_Pragma_Ordered Flag198
461 -- Is_Ada_2012_Only Flag199
463 -- Has_Delayed_Aspects Flag200
464 -- Has_Anon_Block_Suffix Flag201
465 -- Itype_Printed Flag202
466 -- Has_Pragma_Pure Flag203
467 -- Is_Known_Null Flag204
468 -- Low_Bound_Tested Flag205
469 -- Is_Visible_Formal Flag206
470 -- Known_To_Have_Preelab_Init Flag207
471 -- Must_Have_Preelab_Init Flag208
472 -- Is_Return_Object Flag209
473 -- Elaborate_Body_Desirable Flag210
475 -- Has_Static_Discriminants Flag211
476 -- Has_Pragma_Unreferenced_Objects Flag212
477 -- Requires_Overriding Flag213
479 -- Has_Up_Level_Access Flag215
480 -- Universal_Aliasing Flag216
481 -- Suppress_Value_Tracking_On_Call Flag217
482 -- Is_Primitive Flag218
483 -- Has_Initial_Value Flag219
484 -- Has_Dispatch_Table Flag220
486 -- Has_Pragma_Preelab_Init Flag221
487 -- Used_As_Generic_Actual Flag222
488 -- Is_Descendent_Of_Address Flag223
491 -- Is_Only_Out_Parameter Flag226
492 -- Referenced_As_Out_Parameter Flag227
493 -- Has_Thunks Flag228
494 -- Can_Use_Internal_Rep Flag229
495 -- Has_Pragma_Inline_Always Flag230
497 -- Renamed_In_Spec Flag231
498 -- Has_Invariants Flag232
499 -- Has_Pragma_Unmodified Flag233
500 -- Is_Dispatch_Table_Entity Flag234
501 -- Is_Trivial_Subprogram Flag235
502 -- Warnings_Off_Used Flag236
503 -- Warnings_Off_Used_Unmodified Flag237
504 -- Warnings_Off_Used_Unreferenced Flag238
505 -- OK_To_Reorder_Components Flag239
506 -- Has_Postconditions Flag240
508 -- Optimize_Alignment_Space Flag241
509 -- Optimize_Alignment_Time Flag242
510 -- Overlays_Constant Flag243
511 -- Is_RACW_Stub_Type Flag244
512 -- Is_Private_Primitive Flag245
513 -- Is_Underlying_Record_View Flag246
514 -- OK_To_Rename Flag247
515 -- Has_Inheritable_Invariants Flag248
516 -- 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_Overriding_Operation (Id : E) return B is
1943 pragma Assert (Is_Subprogram (Id));
1945 end Is_Overriding_Operation;
1947 function Is_Package_Body_Entity (Id : E) return B is
1949 return Flag160 (Id);
1950 end Is_Package_Body_Entity;
1952 function Is_Packed (Id : E) return B is
1954 return Flag51 (Implementation_Base_Type (Id));
1957 function Is_Packed_Array_Type (Id : E) return B is
1959 return Flag138 (Id);
1960 end Is_Packed_Array_Type;
1962 function Is_Potentially_Use_Visible (Id : E) return B is
1964 pragma Assert (Nkind (Id) in N_Entity);
1966 end Is_Potentially_Use_Visible;
1968 function Is_Preelaborated (Id : E) return B is
1971 end Is_Preelaborated;
1973 function Is_Primitive (Id : E) return B is
1976 (Is_Overloadable (Id)
1977 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1978 return Flag218 (Id);
1981 function Is_Primitive_Wrapper (Id : E) return B is
1983 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1984 return Flag195 (Id);
1985 end Is_Primitive_Wrapper;
1987 function Is_Private_Composite (Id : E) return B is
1989 pragma Assert (Is_Type (Id));
1990 return Flag107 (Id);
1991 end Is_Private_Composite;
1993 function Is_Private_Descendant (Id : E) return B is
1996 end Is_Private_Descendant;
1998 function Is_Private_Primitive (Id : E) return B is
2000 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2001 return Flag245 (Id);
2002 end Is_Private_Primitive;
2004 function Is_Public (Id : E) return B is
2006 pragma Assert (Nkind (Id) in N_Entity);
2010 function Is_Pure (Id : E) return B is
2015 function Is_Pure_Unit_Access_Type (Id : E) return B is
2017 pragma Assert (Is_Access_Type (Id));
2018 return Flag189 (Id);
2019 end Is_Pure_Unit_Access_Type;
2021 function Is_RACW_Stub_Type (Id : E) return B is
2023 pragma Assert (Is_Type (Id));
2024 return Flag244 (Id);
2025 end Is_RACW_Stub_Type;
2027 function Is_Raised (Id : E) return B is
2029 pragma Assert (Ekind (Id) = E_Exception);
2030 return Flag224 (Id);
2033 function Is_Remote_Call_Interface (Id : E) return B is
2036 end Is_Remote_Call_Interface;
2038 function Is_Remote_Types (Id : E) return B is
2041 end Is_Remote_Types;
2043 function Is_Renaming_Of_Object (Id : E) return B is
2045 return Flag112 (Id);
2046 end Is_Renaming_Of_Object;
2048 function Is_Return_Object (Id : E) return B is
2050 return Flag209 (Id);
2051 end Is_Return_Object;
2053 function Is_Shared_Passive (Id : E) return B is
2056 end Is_Shared_Passive;
2058 function Is_Statically_Allocated (Id : E) return B is
2061 end Is_Statically_Allocated;
2063 function Is_Tag (Id : E) return B is
2065 pragma Assert (Nkind (Id) in N_Entity);
2069 function Is_Tagged_Type (Id : E) return B is
2074 function Is_Thunk (Id : E) return B is
2076 pragma Assert (Is_Subprogram (Id));
2077 return Flag225 (Id);
2080 function Is_Trivial_Subprogram (Id : E) return B is
2082 return Flag235 (Id);
2083 end Is_Trivial_Subprogram;
2085 function Is_True_Constant (Id : E) return B is
2087 return Flag163 (Id);
2088 end Is_True_Constant;
2090 function Is_Unchecked_Union (Id : E) return B is
2092 return Flag117 (Implementation_Base_Type (Id));
2093 end Is_Unchecked_Union;
2095 function Is_Underlying_Record_View (Id : E) return B is
2097 return Flag246 (Id);
2098 end Is_Underlying_Record_View;
2100 function Is_Unsigned_Type (Id : E) return B is
2102 pragma Assert (Is_Type (Id));
2103 return Flag144 (Id);
2104 end Is_Unsigned_Type;
2106 function Is_Valued_Procedure (Id : E) return B is
2108 pragma Assert (Ekind (Id) = E_Procedure);
2109 return Flag127 (Id);
2110 end Is_Valued_Procedure;
2112 function Is_Visible_Child_Unit (Id : E) return B is
2114 pragma Assert (Is_Child_Unit (Id));
2115 return Flag116 (Id);
2116 end Is_Visible_Child_Unit;
2118 function Is_Visible_Formal (Id : E) return B is
2120 return Flag206 (Id);
2121 end Is_Visible_Formal;
2123 function Is_VMS_Exception (Id : E) return B is
2125 return Flag133 (Id);
2126 end Is_VMS_Exception;
2128 function Is_Volatile (Id : E) return B is
2130 pragma Assert (Nkind (Id) in N_Entity);
2132 if Is_Type (Id) then
2133 return Flag16 (Base_Type (Id));
2139 function Itype_Printed (Id : E) return B is
2141 pragma Assert (Is_Itype (Id));
2142 return Flag202 (Id);
2145 function Kill_Elaboration_Checks (Id : E) return B is
2148 end Kill_Elaboration_Checks;
2150 function Kill_Range_Checks (Id : E) return B is
2153 end Kill_Range_Checks;
2155 function Kill_Tag_Checks (Id : E) return B is
2158 end Kill_Tag_Checks;
2160 function Known_To_Have_Preelab_Init (Id : E) return B is
2162 pragma Assert (Is_Type (Id));
2163 return Flag207 (Id);
2164 end Known_To_Have_Preelab_Init;
2166 function Last_Assignment (Id : E) return N is
2168 pragma Assert (Is_Assignable (Id));
2170 end Last_Assignment;
2172 function Last_Entity (Id : E) return E is
2177 function Limited_View (Id : E) return E is
2179 pragma Assert (Ekind (Id) = E_Package);
2183 function Lit_Indexes (Id : E) return E is
2185 pragma Assert (Is_Enumeration_Type (Id));
2189 function Lit_Strings (Id : E) return E is
2191 pragma Assert (Is_Enumeration_Type (Id));
2195 function Low_Bound_Tested (Id : E) return B is
2197 return Flag205 (Id);
2198 end Low_Bound_Tested;
2200 function Machine_Radix_10 (Id : E) return B is
2202 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2204 end Machine_Radix_10;
2206 function Master_Id (Id : E) return E is
2208 pragma Assert (Is_Access_Type (Id));
2212 function Materialize_Entity (Id : E) return B is
2214 return Flag168 (Id);
2215 end Materialize_Entity;
2217 function Mechanism (Id : E) return M is
2219 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2220 return UI_To_Int (Uint8 (Id));
2223 function Modulus (Id : E) return Uint is
2225 pragma Assert (Is_Modular_Integer_Type (Id));
2226 return Uint17 (Base_Type (Id));
2229 function Must_Be_On_Byte_Boundary (Id : E) return B is
2231 pragma Assert (Is_Type (Id));
2232 return Flag183 (Id);
2233 end Must_Be_On_Byte_Boundary;
2235 function Must_Have_Preelab_Init (Id : E) return B is
2237 pragma Assert (Is_Type (Id));
2238 return Flag208 (Id);
2239 end Must_Have_Preelab_Init;
2241 function Needs_Debug_Info (Id : E) return B is
2243 return Flag147 (Id);
2244 end Needs_Debug_Info;
2246 function Needs_No_Actuals (Id : E) return B is
2249 (Is_Overloadable (Id)
2250 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2252 end Needs_No_Actuals;
2254 function Never_Set_In_Source (Id : E) return B is
2256 return Flag115 (Id);
2257 end Never_Set_In_Source;
2259 function Next_Inlined_Subprogram (Id : E) return E is
2262 end Next_Inlined_Subprogram;
2264 function No_Pool_Assigned (Id : E) return B is
2266 pragma Assert (Is_Access_Type (Id));
2267 return Flag131 (Root_Type (Id));
2268 end No_Pool_Assigned;
2270 function No_Return (Id : E) return B is
2272 return Flag113 (Id);
2275 function No_Strict_Aliasing (Id : E) return B is
2277 pragma Assert (Is_Access_Type (Id));
2278 return Flag136 (Base_Type (Id));
2279 end No_Strict_Aliasing;
2281 function Non_Binary_Modulus (Id : E) return B is
2283 pragma Assert (Is_Type (Id));
2284 return Flag58 (Base_Type (Id));
2285 end Non_Binary_Modulus;
2287 function Non_Limited_View (Id : E) return E is
2289 pragma Assert (Ekind (Id) in Incomplete_Kind);
2291 end Non_Limited_View;
2293 function Nonzero_Is_True (Id : E) return B is
2295 pragma Assert (Root_Type (Id) = Standard_Boolean);
2296 return Flag162 (Base_Type (Id));
2297 end Nonzero_Is_True;
2299 function Normalized_First_Bit (Id : E) return U is
2301 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2303 end Normalized_First_Bit;
2305 function Normalized_Position (Id : E) return U is
2307 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2309 end Normalized_Position;
2311 function Normalized_Position_Max (Id : E) return U is
2313 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2315 end Normalized_Position_Max;
2317 function OK_To_Rename (Id : E) return B is
2319 pragma Assert (Ekind (Id) = E_Variable);
2320 return Flag247 (Id);
2323 function OK_To_Reorder_Components (Id : E) return B is
2325 pragma Assert (Is_Record_Type (Id));
2326 return Flag239 (Base_Type (Id));
2327 end OK_To_Reorder_Components;
2329 function Optimize_Alignment_Space (Id : E) return B is
2332 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2333 return Flag241 (Id);
2334 end Optimize_Alignment_Space;
2336 function Optimize_Alignment_Time (Id : E) return B is
2339 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2340 return Flag242 (Id);
2341 end Optimize_Alignment_Time;
2343 function Original_Array_Type (Id : E) return E is
2345 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2347 end Original_Array_Type;
2349 function Original_Record_Component (Id : E) return E is
2351 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2353 end Original_Record_Component;
2355 function Overlays_Constant (Id : E) return B is
2357 return Flag243 (Id);
2358 end Overlays_Constant;
2360 function Overridden_Operation (Id : E) return E is
2363 end Overridden_Operation;
2365 function Package_Instantiation (Id : E) return N is
2367 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2369 end Package_Instantiation;
2371 function Packed_Array_Type (Id : E) return E is
2373 pragma Assert (Is_Array_Type (Id));
2375 end Packed_Array_Type;
2377 function Parent_Subtype (Id : E) return E is
2379 pragma Assert (Is_Record_Type (Id));
2380 return Node19 (Base_Type (Id));
2383 function Postcondition_Proc (Id : E) return E is
2385 pragma Assert (Ekind (Id) = E_Procedure);
2387 end Postcondition_Proc;
2389 function PPC_Wrapper (Id : E) return E is
2391 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2395 function Prival (Id : E) return E is
2397 pragma Assert (Is_Protected_Component (Id));
2401 function Prival_Link (Id : E) return E is
2403 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2407 function Private_Dependents (Id : E) return L is
2409 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2410 return Elist18 (Id);
2411 end Private_Dependents;
2413 function Private_View (Id : E) return N is
2415 pragma Assert (Is_Private_Type (Id));
2419 function Protected_Body_Subprogram (Id : E) return E is
2421 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2423 end Protected_Body_Subprogram;
2425 function Protected_Formal (Id : E) return E is
2427 pragma Assert (Is_Formal (Id));
2429 end Protected_Formal;
2431 function Protection_Object (Id : E) return E is
2434 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2436 end Protection_Object;
2438 function Reachable (Id : E) return B is
2443 function Referenced (Id : E) return B is
2445 return Flag156 (Id);
2448 function Referenced_As_LHS (Id : E) return B is
2451 end Referenced_As_LHS;
2453 function Referenced_As_Out_Parameter (Id : E) return B is
2455 return Flag227 (Id);
2456 end Referenced_As_Out_Parameter;
2458 function Register_Exception_Call (Id : E) return N is
2460 pragma Assert (Ekind (Id) = E_Exception);
2462 end Register_Exception_Call;
2464 function Related_Array_Object (Id : E) return E is
2466 pragma Assert (Is_Array_Type (Id));
2468 end Related_Array_Object;
2470 function Related_Expression (Id : E) return N is
2472 pragma Assert (Ekind (Id) in Type_Kind
2473 or else Ekind_In (Id, E_Constant, E_Variable));
2475 end Related_Expression;
2477 function Related_Instance (Id : E) return E is
2479 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2481 end Related_Instance;
2483 function Related_Type (Id : E) return E is
2485 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2489 function Relative_Deadline_Variable (Id : E) return E is
2491 pragma Assert (Is_Task_Type (Id));
2492 return Node26 (Implementation_Base_Type (Id));
2493 end Relative_Deadline_Variable;
2495 function Renamed_Entity (Id : E) return N is
2500 function Renamed_In_Spec (Id : E) return B is
2502 pragma Assert (Ekind (Id) = E_Package);
2503 return Flag231 (Id);
2504 end Renamed_In_Spec;
2506 function Renamed_Object (Id : E) return N is
2511 function Renaming_Map (Id : E) return U is
2516 function Requires_Overriding (Id : E) return B is
2518 pragma Assert (Is_Overloadable (Id));
2519 return Flag213 (Id);
2520 end Requires_Overriding;
2522 function Return_Present (Id : E) return B is
2527 function Return_Applies_To (Id : E) return N is
2530 end Return_Applies_To;
2532 function Returns_By_Ref (Id : E) return B is
2537 function Reverse_Bit_Order (Id : E) return B is
2539 pragma Assert (Is_Record_Type (Id));
2540 return Flag164 (Base_Type (Id));
2541 end Reverse_Bit_Order;
2543 function RM_Size (Id : E) return U is
2545 pragma Assert (Is_Type (Id));
2549 function Scalar_Range (Id : E) return N is
2554 function Scale_Value (Id : E) return U is
2559 function Scope_Depth_Value (Id : E) return U is
2562 end Scope_Depth_Value;
2564 function Sec_Stack_Needed_For_Return (Id : E) return B is
2566 return Flag167 (Id);
2567 end Sec_Stack_Needed_For_Return;
2569 function Shadow_Entities (Id : E) return S is
2571 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2573 end Shadow_Entities;
2575 function Shared_Var_Procs_Instance (Id : E) return E is
2577 pragma Assert (Ekind (Id) = E_Variable);
2579 end Shared_Var_Procs_Instance;
2581 function Size_Check_Code (Id : E) return N is
2583 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2585 end Size_Check_Code;
2587 function Size_Depends_On_Discriminant (Id : E) return B is
2589 return Flag177 (Id);
2590 end Size_Depends_On_Discriminant;
2592 function Size_Known_At_Compile_Time (Id : E) return B is
2595 end Size_Known_At_Compile_Time;
2597 function Small_Value (Id : E) return R is
2599 pragma Assert (Is_Fixed_Point_Type (Id));
2600 return Ureal21 (Id);
2603 function Spec_Entity (Id : E) return E is
2605 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2609 function Spec_PPC_List (Id : E) return N is
2612 (Ekind_In (Id, E_Entry, E_Entry_Family)
2613 or else Is_Subprogram (Id)
2614 or else Is_Generic_Subprogram (Id));
2618 function Static_Predicate (Id : E) return S is
2620 pragma Assert (Is_Discrete_Type (Id));
2622 end Static_Predicate;
2624 function Storage_Size_Variable (Id : E) return E is
2626 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2627 return Node15 (Implementation_Base_Type (Id));
2628 end Storage_Size_Variable;
2630 function Static_Elaboration_Desired (Id : E) return B is
2632 pragma Assert (Ekind (Id) = E_Package);
2634 end Static_Elaboration_Desired;
2636 function Static_Initialization (Id : E) return N is
2639 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2641 end Static_Initialization;
2643 function Stored_Constraint (Id : E) return L is
2646 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2647 return Elist23 (Id);
2648 end Stored_Constraint;
2650 function Strict_Alignment (Id : E) return B is
2652 return Flag145 (Implementation_Base_Type (Id));
2653 end Strict_Alignment;
2655 function String_Literal_Length (Id : E) return U is
2658 end String_Literal_Length;
2660 function String_Literal_Low_Bound (Id : E) return N is
2663 end String_Literal_Low_Bound;
2665 function Subprograms_For_Type (Id : E) return E is
2667 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2669 end Subprograms_For_Type;
2671 function Suppress_Elaboration_Warnings (Id : E) return B is
2673 return Flag148 (Id);
2674 end Suppress_Elaboration_Warnings;
2676 function Suppress_Init_Proc (Id : E) return B is
2678 return Flag105 (Base_Type (Id));
2679 end Suppress_Init_Proc;
2681 function Suppress_Style_Checks (Id : E) return B is
2683 return Flag165 (Id);
2684 end Suppress_Style_Checks;
2686 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2688 return Flag217 (Id);
2689 end Suppress_Value_Tracking_On_Call;
2691 function Task_Body_Procedure (Id : E) return N is
2693 pragma Assert (Ekind (Id) in Task_Kind);
2695 end Task_Body_Procedure;
2697 function Treat_As_Volatile (Id : E) return B is
2700 end Treat_As_Volatile;
2702 function Underlying_Full_View (Id : E) return E is
2704 pragma Assert (Ekind (Id) in Private_Kind);
2706 end Underlying_Full_View;
2708 function Underlying_Record_View (Id : E) return E is
2711 end Underlying_Record_View;
2713 function Universal_Aliasing (Id : E) return B is
2715 pragma Assert (Is_Type (Id));
2716 return Flag216 (Base_Type (Id));
2717 end Universal_Aliasing;
2719 function Unset_Reference (Id : E) return N is
2722 end Unset_Reference;
2724 function Used_As_Generic_Actual (Id : E) return B is
2726 return Flag222 (Id);
2727 end Used_As_Generic_Actual;
2729 function Uses_Sec_Stack (Id : E) return B is
2734 function Warnings_Off (Id : E) return B is
2739 function Warnings_Off_Used (Id : E) return B is
2741 return Flag236 (Id);
2742 end Warnings_Off_Used;
2744 function Warnings_Off_Used_Unmodified (Id : E) return B is
2746 return Flag237 (Id);
2747 end Warnings_Off_Used_Unmodified;
2749 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2751 return Flag238 (Id);
2752 end Warnings_Off_Used_Unreferenced;
2754 function Wrapped_Entity (Id : E) return E is
2756 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2757 and then Is_Primitive_Wrapper (Id));
2761 function Was_Hidden (Id : E) return B is
2763 return Flag196 (Id);
2766 ------------------------------
2767 -- Classification Functions --
2768 ------------------------------
2770 function Is_Access_Type (Id : E) return B is
2772 return Ekind (Id) in Access_Kind;
2775 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2777 return Ekind (Id) in Access_Protected_Kind;
2778 end Is_Access_Protected_Subprogram_Type;
2780 function Is_Access_Subprogram_Type (Id : E) return B is
2782 return Ekind (Id) in Access_Subprogram_Kind;
2783 end Is_Access_Subprogram_Type;
2785 function Is_Aggregate_Type (Id : E) return B is
2787 return Ekind (Id) in Aggregate_Kind;
2788 end Is_Aggregate_Type;
2790 function Is_Array_Type (Id : E) return B is
2792 return Ekind (Id) in Array_Kind;
2795 function Is_Assignable (Id : E) return B is
2797 return Ekind (Id) in Assignable_Kind;
2800 function Is_Class_Wide_Type (Id : E) return B is
2802 return Ekind (Id) in Class_Wide_Kind;
2803 end Is_Class_Wide_Type;
2805 function Is_Composite_Type (Id : E) return B is
2807 return Ekind (Id) in Composite_Kind;
2808 end Is_Composite_Type;
2810 function Is_Concurrent_Body (Id : E) return B is
2812 return Ekind (Id) in
2813 Concurrent_Body_Kind;
2814 end Is_Concurrent_Body;
2816 function Is_Concurrent_Record_Type (Id : E) return B is
2819 end Is_Concurrent_Record_Type;
2821 function Is_Concurrent_Type (Id : E) return B is
2823 return Ekind (Id) in Concurrent_Kind;
2824 end Is_Concurrent_Type;
2826 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2828 return Ekind (Id) in
2829 Decimal_Fixed_Point_Kind;
2830 end Is_Decimal_Fixed_Point_Type;
2832 function Is_Digits_Type (Id : E) return B is
2834 return Ekind (Id) in Digits_Kind;
2837 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2839 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2840 end Is_Discrete_Or_Fixed_Point_Type;
2842 function Is_Discrete_Type (Id : E) return B is
2844 return Ekind (Id) in Discrete_Kind;
2845 end Is_Discrete_Type;
2847 function Is_Elementary_Type (Id : E) return B is
2849 return Ekind (Id) in Elementary_Kind;
2850 end Is_Elementary_Type;
2852 function Is_Entry (Id : E) return B is
2854 return Ekind (Id) in Entry_Kind;
2857 function Is_Enumeration_Type (Id : E) return B is
2859 return Ekind (Id) in
2861 end Is_Enumeration_Type;
2863 function Is_Fixed_Point_Type (Id : E) return B is
2865 return Ekind (Id) in
2867 end Is_Fixed_Point_Type;
2869 function Is_Floating_Point_Type (Id : E) return B is
2871 return Ekind (Id) in Float_Kind;
2872 end Is_Floating_Point_Type;
2874 function Is_Formal (Id : E) return B is
2876 return Ekind (Id) in Formal_Kind;
2879 function Is_Formal_Object (Id : E) return B is
2881 return Ekind (Id) in Formal_Object_Kind;
2882 end Is_Formal_Object;
2884 function Is_Generic_Subprogram (Id : E) return B is
2886 return Ekind (Id) in Generic_Subprogram_Kind;
2887 end Is_Generic_Subprogram;
2889 function Is_Generic_Unit (Id : E) return B is
2891 return Ekind (Id) in Generic_Unit_Kind;
2892 end Is_Generic_Unit;
2894 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2896 return Ekind (Id) in
2897 Incomplete_Or_Private_Kind;
2898 end Is_Incomplete_Or_Private_Type;
2900 function Is_Incomplete_Type (Id : E) return B is
2902 return Ekind (Id) in
2904 end Is_Incomplete_Type;
2906 function Is_Integer_Type (Id : E) return B is
2908 return Ekind (Id) in Integer_Kind;
2909 end Is_Integer_Type;
2911 function Is_Modular_Integer_Type (Id : E) return B is
2913 return Ekind (Id) in
2914 Modular_Integer_Kind;
2915 end Is_Modular_Integer_Type;
2917 function Is_Named_Number (Id : E) return B is
2919 return Ekind (Id) in Named_Kind;
2920 end Is_Named_Number;
2922 function Is_Numeric_Type (Id : E) return B is
2924 return Ekind (Id) in Numeric_Kind;
2925 end Is_Numeric_Type;
2927 function Is_Object (Id : E) return B is
2929 return Ekind (Id) in Object_Kind;
2932 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2934 return Ekind (Id) in
2935 Ordinary_Fixed_Point_Kind;
2936 end Is_Ordinary_Fixed_Point_Type;
2938 function Is_Overloadable (Id : E) return B is
2940 return Ekind (Id) in Overloadable_Kind;
2941 end Is_Overloadable;
2943 function Is_Private_Type (Id : E) return B is
2945 return Ekind (Id) in Private_Kind;
2946 end Is_Private_Type;
2948 function Is_Protected_Type (Id : E) return B is
2950 return Ekind (Id) in Protected_Kind;
2951 end Is_Protected_Type;
2953 function Is_Real_Type (Id : E) return B is
2955 return Ekind (Id) in Real_Kind;
2958 function Is_Record_Type (Id : E) return B is
2960 return Ekind (Id) in Record_Kind;
2963 function Is_Scalar_Type (Id : E) return B is
2965 return Ekind (Id) in Scalar_Kind;
2968 function Is_Signed_Integer_Type (Id : E) return B is
2970 return Ekind (Id) in Signed_Integer_Kind;
2971 end Is_Signed_Integer_Type;
2973 function Is_Subprogram (Id : E) return B is
2975 return Ekind (Id) in Subprogram_Kind;
2978 function Is_Task_Type (Id : E) return B is
2980 return Ekind (Id) in Task_Kind;
2983 function Is_Type (Id : E) return B is
2985 return Ekind (Id) in Type_Kind;
2988 ------------------------------
2989 -- Attribute Set Procedures --
2990 ------------------------------
2992 -- Note: in many of these set procedures an "obvious" assertion is missing.
2993 -- The reason for this is that in many cases, a field is set before the
2994 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
2995 -- it is possible to add assertions that specifically include the E_Void
2996 -- possibility, but in some cases, we just omit the assertions.
2998 procedure Set_Accept_Address (Id : E; V : L) is
3000 Set_Elist21 (Id, V);
3001 end Set_Accept_Address;
3003 procedure Set_Access_Disp_Table (Id : E; V : L) is
3005 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3006 Set_Elist16 (Id, V);
3007 end Set_Access_Disp_Table;
3009 procedure Set_Associated_Final_Chain (Id : E; V : E) is
3011 pragma Assert (Is_Access_Type (Id));
3013 end Set_Associated_Final_Chain;
3015 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3018 end Set_Associated_Formal_Package;
3020 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3023 end Set_Associated_Node_For_Itype;
3025 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3027 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
3029 end Set_Associated_Storage_Pool;
3031 procedure Set_Actual_Subtype (Id : E; V : E) is
3034 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3035 or else Is_Formal (Id));
3037 end Set_Actual_Subtype;
3039 procedure Set_Address_Taken (Id : E; V : B := True) is
3041 Set_Flag104 (Id, V);
3042 end Set_Address_Taken;
3044 procedure Set_Alias (Id : E; V : E) is
3047 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3051 procedure Set_Alignment (Id : E; V : U) is
3053 pragma Assert (Is_Type (Id)
3054 or else Is_Formal (Id)
3055 or else Ekind_In (Id, E_Loop_Parameter,
3062 procedure Set_Barrier_Function (Id : E; V : N) is
3064 pragma Assert (Is_Entry (Id));
3066 end Set_Barrier_Function;
3068 procedure Set_Block_Node (Id : E; V : N) is
3070 pragma Assert (Ekind (Id) = E_Block);
3074 procedure Set_Body_Entity (Id : E; V : E) is
3076 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3078 end Set_Body_Entity;
3080 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3083 (Ekind (Id) = E_Package
3084 or else Is_Subprogram (Id)
3085 or else Is_Generic_Unit (Id));
3087 end Set_Body_Needed_For_SAL;
3089 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3091 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3092 Set_Flag125 (Id, V);
3093 end Set_C_Pass_By_Copy;
3095 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3098 end Set_Can_Never_Be_Null;
3100 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3103 end Set_Checks_May_Be_Suppressed;
3105 procedure Set_Class_Wide_Type (Id : E; V : E) is
3107 pragma Assert (Is_Type (Id));
3109 end Set_Class_Wide_Type;
3111 procedure Set_Cloned_Subtype (Id : E; V : E) is
3113 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3115 end Set_Cloned_Subtype;
3117 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3119 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3121 end Set_Component_Bit_Offset;
3123 procedure Set_Component_Clause (Id : E; V : N) is
3125 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3127 end Set_Component_Clause;
3129 procedure Set_Component_Size (Id : E; V : U) is
3131 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3133 end Set_Component_Size;
3135 procedure Set_Component_Type (Id : E; V : E) is
3137 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3139 end Set_Component_Type;
3141 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3144 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3146 end Set_Corresponding_Concurrent_Type;
3148 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3150 pragma Assert (Ekind (Id) = E_Discriminant);
3152 end Set_Corresponding_Discriminant;
3154 procedure Set_Corresponding_Equality (Id : E; V : E) is
3157 (Ekind (Id) = E_Function
3158 and then not Comes_From_Source (Id)
3159 and then Chars (Id) = Name_Op_Ne);
3161 end Set_Corresponding_Equality;
3163 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3165 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3167 end Set_Corresponding_Protected_Entry;
3169 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3171 pragma Assert (Is_Concurrent_Type (Id));
3173 end Set_Corresponding_Record_Type;
3175 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3178 end Set_Corresponding_Remote_Type;
3180 procedure Set_Current_Use_Clause (Id : E; V : E) is
3182 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3184 end Set_Current_Use_Clause;
3186 procedure Set_Current_Value (Id : E; V : N) is
3188 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3190 end Set_Current_Value;
3192 procedure Set_CR_Discriminant (Id : E; V : E) is
3195 end Set_CR_Discriminant;
3197 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3199 Set_Flag166 (Id, V);
3200 end Set_Debug_Info_Off;
3202 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3205 end Set_Debug_Renaming_Link;
3207 procedure Set_Default_Expr_Function (Id : E; V : E) is
3209 pragma Assert (Is_Formal (Id));
3211 end Set_Default_Expr_Function;
3213 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3215 Set_Flag108 (Id, V);
3216 end Set_Default_Expressions_Processed;
3218 procedure Set_Default_Value (Id : E; V : N) is
3220 pragma Assert (Is_Formal (Id));
3222 end Set_Default_Value;
3224 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3228 or else Is_Task_Type (Id)
3229 or else Ekind (Id) = E_Block);
3230 Set_Flag114 (Id, V);
3231 end Set_Delay_Cleanups;
3233 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3236 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3238 end Set_Delay_Subprogram_Descriptors;
3240 procedure Set_Delta_Value (Id : E; V : R) is
3242 pragma Assert (Is_Fixed_Point_Type (Id));
3243 Set_Ureal18 (Id, V);
3244 end Set_Delta_Value;
3246 procedure Set_Dependent_Instances (Id : E; V : L) is
3248 pragma Assert (Is_Generic_Instance (Id));
3250 end Set_Dependent_Instances;
3252 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3254 pragma Assert (Nkind (Id) in N_Entity);
3256 end Set_Depends_On_Private;
3258 procedure Set_Digits_Value (Id : E; V : U) is
3261 (Is_Floating_Point_Type (Id)
3262 or else Is_Decimal_Fixed_Point_Type (Id));
3264 end Set_Digits_Value;
3266 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3269 end Set_Directly_Designated_Type;
3271 procedure Set_Discard_Names (Id : E; V : B := True) is
3274 end Set_Discard_Names;
3276 procedure Set_Discriminal (Id : E; V : E) is
3278 pragma Assert (Ekind (Id) = E_Discriminant);
3280 end Set_Discriminal;
3282 procedure Set_Discriminal_Link (Id : E; V : E) is
3285 end Set_Discriminal_Link;
3287 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3289 pragma Assert (Ekind (Id) = E_Component);
3291 end Set_Discriminant_Checking_Func;
3293 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3295 pragma Assert (Nkind (Id) in N_Entity);
3296 Set_Elist21 (Id, V);
3297 end Set_Discriminant_Constraint;
3299 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3302 end Set_Discriminant_Default_Value;
3304 procedure Set_Discriminant_Number (Id : E; V : U) is
3307 end Set_Discriminant_Number;
3309 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3311 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3312 Set_Elist26 (Id, V);
3313 end Set_Dispatch_Table_Wrappers;
3315 procedure Set_DT_Entry_Count (Id : E; V : U) is
3317 pragma Assert (Ekind (Id) = E_Component);
3319 end Set_DT_Entry_Count;
3321 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3323 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3325 end Set_DT_Offset_To_Top_Func;
3327 procedure Set_DT_Position (Id : E; V : U) is
3329 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3331 end Set_DT_Position;
3333 procedure Set_DTC_Entity (Id : E; V : E) is
3335 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3339 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3341 pragma Assert (Ekind (Id) = E_Package);
3342 Set_Flag210 (Id, V);
3343 end Set_Elaborate_Body_Desirable;
3345 procedure Set_Elaboration_Entity (Id : E; V : E) is
3350 Ekind (Id) = E_Package
3352 Is_Generic_Unit (Id));
3354 end Set_Elaboration_Entity;
3356 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3361 Ekind (Id) = E_Package
3363 Is_Generic_Unit (Id));
3364 Set_Flag174 (Id, V);
3365 end Set_Elaboration_Entity_Required;
3367 procedure Set_Enclosing_Scope (Id : E; V : E) is
3370 end Set_Enclosing_Scope;
3372 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3374 pragma Assert (Is_Entry (Id));
3375 Set_Flag152 (Id, V);
3376 end Set_Entry_Accepted;
3378 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3381 end Set_Entry_Bodies_Array;
3383 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3386 end Set_Entry_Cancel_Parameter;
3388 procedure Set_Entry_Component (Id : E; V : E) is
3391 end Set_Entry_Component;
3393 procedure Set_Entry_Formal (Id : E; V : E) is
3396 end Set_Entry_Formal;
3398 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3400 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3402 end Set_Entry_Index_Constant;
3404 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3407 end Set_Entry_Parameters_Type;
3409 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3411 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3413 end Set_Enum_Pos_To_Rep;
3415 procedure Set_Enumeration_Pos (Id : E; V : U) is
3417 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3419 end Set_Enumeration_Pos;
3421 procedure Set_Enumeration_Rep (Id : E; V : U) is
3423 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3425 end Set_Enumeration_Rep;
3427 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3429 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3431 end Set_Enumeration_Rep_Expr;
3433 procedure Set_Equivalent_Type (Id : E; V : E) is
3436 (Ekind_In (Id, E_Class_Wide_Type,
3437 E_Class_Wide_Subtype,
3438 E_Access_Protected_Subprogram_Type,
3439 E_Anonymous_Access_Protected_Subprogram_Type,
3440 E_Access_Subprogram_Type,
3443 end Set_Equivalent_Type;
3445 procedure Set_Esize (Id : E; V : U) is
3450 procedure Set_Exception_Code (Id : E; V : U) is
3452 pragma Assert (Ekind (Id) = E_Exception);
3454 end Set_Exception_Code;
3456 procedure Set_Extra_Accessibility (Id : E; V : E) is
3458 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3460 end Set_Extra_Accessibility;
3462 procedure Set_Extra_Constrained (Id : E; V : E) is
3464 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3466 end Set_Extra_Constrained;
3468 procedure Set_Extra_Formal (Id : E; V : E) is
3471 end Set_Extra_Formal;
3473 procedure Set_Extra_Formals (Id : E; V : E) is
3476 (Is_Overloadable (Id)
3477 or else Ekind_In (Id, E_Entry_Family,
3479 E_Subprogram_Type));
3481 end Set_Extra_Formals;
3483 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3486 (Is_Access_Subprogram_Type (Id)
3487 and then Id = Base_Type (Id));
3488 Set_Flag229 (Id, V);
3489 end Set_Can_Use_Internal_Rep;
3491 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3494 end Set_Finalization_Chain_Entity;
3496 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3498 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3499 Set_Flag158 (Id, V);
3500 end Set_Finalize_Storage_Only;
3502 procedure Set_First_Entity (Id : E; V : E) is
3505 end Set_First_Entity;
3507 procedure Set_First_Exit_Statement (Id : E; V : N) is
3509 pragma Assert (Ekind (Id) = E_Loop);
3511 end Set_First_Exit_Statement;
3513 procedure Set_First_Index (Id : E; V : N) is
3515 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3517 end Set_First_Index;
3519 procedure Set_First_Literal (Id : E; V : E) is
3521 pragma Assert (Is_Enumeration_Type (Id));
3523 end Set_First_Literal;
3525 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3527 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3529 end Set_First_Optional_Parameter;
3531 procedure Set_First_Private_Entity (Id : E; V : E) is
3533 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3534 or else Ekind (Id) in Concurrent_Kind);
3536 end Set_First_Private_Entity;
3538 procedure Set_First_Rep_Item (Id : E; V : N) is
3541 end Set_First_Rep_Item;
3543 procedure Set_Float_Rep (Id : E; V : F) is
3544 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3546 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3549 procedure Set_Freeze_Node (Id : E; V : N) is
3552 end Set_Freeze_Node;
3554 procedure Set_From_With_Type (Id : E; V : B := True) is
3558 or else Ekind (Id) = E_Package);
3559 Set_Flag159 (Id, V);
3560 end Set_From_With_Type;
3562 procedure Set_Full_View (Id : E; V : E) is
3564 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3568 procedure Set_Generic_Homonym (Id : E; V : E) is
3571 end Set_Generic_Homonym;
3573 procedure Set_Generic_Renamings (Id : E; V : L) is
3575 Set_Elist23 (Id, V);
3576 end Set_Generic_Renamings;
3578 procedure Set_Handler_Records (Id : E; V : S) is
3581 end Set_Handler_Records;
3583 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3585 pragma Assert (Id = Base_Type (Id));
3586 Set_Flag135 (Id, V);
3587 end Set_Has_Aliased_Components;
3589 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3592 end Set_Has_Alignment_Clause;
3594 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3597 end Set_Has_All_Calls_Remote;
3599 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3601 Set_Flag201 (Id, V);
3602 end Set_Has_Anon_Block_Suffix;
3604 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3606 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3608 end Set_Has_Atomic_Components;
3610 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3613 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3614 Set_Flag139 (Id, V);
3615 end Set_Has_Biased_Representation;
3617 procedure Set_Has_Completion (Id : E; V : B := True) is
3620 end Set_Has_Completion;
3622 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3624 pragma Assert (Is_Type (Id));
3626 end Set_Has_Completion_In_Body;
3628 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3630 pragma Assert (Ekind (Id) = E_Record_Type);
3631 Set_Flag140 (Id, V);
3632 end Set_Has_Complex_Representation;
3634 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3636 pragma Assert (Ekind (Id) = E_Array_Type);
3638 end Set_Has_Component_Size_Clause;
3640 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3642 pragma Assert (Is_Type (Id));
3643 Set_Flag187 (Id, V);
3644 end Set_Has_Constrained_Partial_View;
3646 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3648 Set_Flag181 (Id, V);
3649 end Set_Has_Contiguous_Rep;
3651 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3653 pragma Assert (Id = Base_Type (Id));
3655 end Set_Has_Controlled_Component;
3657 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3660 end Set_Has_Controlling_Result;
3662 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3664 Set_Flag119 (Id, V);
3665 end Set_Has_Convention_Pragma;
3667 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3669 pragma Assert (Nkind (Id) in N_Entity);
3670 Set_Flag200 (Id, V);
3671 end Set_Has_Delayed_Aspects;
3673 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3675 pragma Assert (Nkind (Id) in N_Entity);
3677 end Set_Has_Delayed_Freeze;
3679 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3681 pragma Assert (Nkind (Id) in N_Entity);
3683 end Set_Has_Discriminants;
3685 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3687 pragma Assert (Ekind (Id) = E_Record_Type
3688 and then Is_Tagged_Type (Id));
3689 Set_Flag220 (Id, V);
3690 end Set_Has_Dispatch_Table;
3692 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3694 pragma Assert (Is_Enumeration_Type (Id));
3696 end Set_Has_Enumeration_Rep_Clause;
3698 procedure Set_Has_Exit (Id : E; V : B := True) is
3703 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3705 pragma Assert (Is_Tagged_Type (Id));
3706 Set_Flag110 (Id, V);
3707 end Set_Has_External_Tag_Rep_Clause;
3709 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3711 Set_Flag175 (Id, V);
3712 end Set_Has_Forward_Instantiation;
3714 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3716 Set_Flag173 (Id, V);
3717 end Set_Has_Fully_Qualified_Name;
3719 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3722 end Set_Has_Gigi_Rep_Item;
3724 procedure Set_Has_Homonym (Id : E; V : B := True) is
3727 end Set_Has_Homonym;
3729 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3731 pragma Assert (Is_Type (Id));
3732 Set_Flag248 (Id, V);
3733 end Set_Has_Inheritable_Invariants;
3735 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3737 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3738 Set_Flag219 (Id, V);
3739 end Set_Has_Initial_Value;
3741 procedure Set_Has_Invariants (Id : E; V : B := True) is
3743 pragma Assert (Is_Type (Id)
3744 or else Ekind (Id) = E_Procedure
3745 or else Ekind (Id) = E_Void);
3746 Set_Flag232 (Id, V);
3747 end Set_Has_Invariants;
3749 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3751 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3753 end Set_Has_Machine_Radix_Clause;
3755 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3758 end Set_Has_Master_Entity;
3760 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3762 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3763 Set_Flag142 (Id, V);
3764 end Set_Has_Missing_Return;
3766 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3768 Set_Flag101 (Id, V);
3769 end Set_Has_Nested_Block_With_Handler;
3771 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3773 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3774 Set_Flag215 (Id, V);
3775 end Set_Has_Up_Level_Access;
3777 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3779 pragma Assert (Id = Base_Type (Id));
3781 end Set_Has_Non_Standard_Rep;
3783 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3785 pragma Assert (Is_Type (Id));
3786 Set_Flag172 (Id, V);
3787 end Set_Has_Object_Size_Clause;
3789 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3791 Set_Flag154 (Id, V);
3792 end Set_Has_Per_Object_Constraint;
3794 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3796 Set_Flag188 (Id, V);
3797 end Set_Has_Persistent_BSS;
3799 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3801 pragma Assert (Is_Subprogram (Id));
3802 Set_Flag240 (Id, V);
3803 end Set_Has_Postconditions;
3805 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3807 pragma Assert (Is_Access_Type (Id));
3808 Set_Flag27 (Base_Type (Id), V);
3809 end Set_Has_Pragma_Controlled;
3811 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3813 Set_Flag150 (Id, V);
3814 end Set_Has_Pragma_Elaborate_Body;
3816 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3818 Set_Flag157 (Id, V);
3819 end Set_Has_Pragma_Inline;
3821 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3823 Set_Flag230 (Id, V);
3824 end Set_Has_Pragma_Inline_Always;
3826 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3828 pragma Assert (Is_Enumeration_Type (Id));
3829 pragma Assert (Id = Base_Type (Id));
3830 Set_Flag198 (Id, V);
3831 end Set_Has_Pragma_Ordered;
3833 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3835 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3836 pragma Assert (Id = Base_Type (Id));
3837 Set_Flag121 (Id, V);
3838 end Set_Has_Pragma_Pack;
3840 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3842 Set_Flag221 (Id, V);
3843 end Set_Has_Pragma_Preelab_Init;
3845 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3847 Set_Flag203 (Id, V);
3848 end Set_Has_Pragma_Pure;
3850 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3852 Set_Flag179 (Id, V);
3853 end Set_Has_Pragma_Pure_Function;
3855 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3857 Set_Flag169 (Id, V);
3858 end Set_Has_Pragma_Thread_Local_Storage;
3860 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3862 Set_Flag233 (Id, V);
3863 end Set_Has_Pragma_Unmodified;
3865 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3867 Set_Flag180 (Id, V);
3868 end Set_Has_Pragma_Unreferenced;
3870 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3872 pragma Assert (Is_Type (Id));
3873 Set_Flag212 (Id, V);
3874 end Set_Has_Pragma_Unreferenced_Objects;
3876 procedure Set_Has_Predicates (Id : E; V : B := True) is
3878 Set_Flag250 (Id, V);
3879 end Set_Has_Predicates;
3881 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3883 pragma Assert (Id = Base_Type (Id));
3884 Set_Flag120 (Id, V);
3885 end Set_Has_Primitive_Operations;
3887 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3889 Set_Flag155 (Id, V);
3890 end Set_Has_Private_Declaration;
3892 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3894 Set_Flag161 (Id, V);
3895 end Set_Has_Qualified_Name;
3897 procedure Set_Has_RACW (Id : E; V : B := True) is
3899 pragma Assert (Ekind (Id) = E_Package);
3900 Set_Flag214 (Id, V);
3903 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3905 pragma Assert (Id = Base_Type (Id));
3907 end Set_Has_Record_Rep_Clause;
3909 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3911 pragma Assert (Is_Subprogram (Id));
3912 Set_Flag143 (Id, V);
3913 end Set_Has_Recursive_Call;
3915 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3918 end Set_Has_Size_Clause;
3920 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3923 end Set_Has_Small_Clause;
3925 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3927 pragma Assert (Id = Base_Type (Id));
3928 Set_Flag100 (Id, V);
3929 end Set_Has_Specified_Layout;
3931 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3933 pragma Assert (Is_Type (Id));
3934 Set_Flag190 (Id, V);
3935 end Set_Has_Specified_Stream_Input;
3937 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3939 pragma Assert (Is_Type (Id));
3940 Set_Flag191 (Id, V);
3941 end Set_Has_Specified_Stream_Output;
3943 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3945 pragma Assert (Is_Type (Id));
3946 Set_Flag192 (Id, V);
3947 end Set_Has_Specified_Stream_Read;
3949 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3951 pragma Assert (Is_Type (Id));
3952 Set_Flag193 (Id, V);
3953 end Set_Has_Specified_Stream_Write;
3955 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3957 Set_Flag211 (Id, V);
3958 end Set_Has_Static_Discriminants;
3960 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3962 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3963 pragma Assert (Id = Base_Type (Id));
3965 end Set_Has_Storage_Size_Clause;
3967 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3969 pragma Assert (Is_Elementary_Type (Id));
3970 Set_Flag184 (Id, V);
3971 end Set_Has_Stream_Size_Clause;
3973 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3976 end Set_Has_Subprogram_Descriptor;
3978 procedure Set_Has_Task (Id : E; V : B := True) is
3980 pragma Assert (Id = Base_Type (Id));
3984 procedure Set_Has_Thunks (Id : E; V : B := True) is
3986 pragma Assert (Is_Tag (Id));
3987 Set_Flag228 (Id, V);
3990 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3992 pragma Assert (Id = Base_Type (Id));
3993 Set_Flag123 (Id, V);
3994 end Set_Has_Unchecked_Union;
3996 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3998 pragma Assert (Is_Type (Id));
4000 end Set_Has_Unknown_Discriminants;
4002 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4004 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
4006 end Set_Has_Volatile_Components;
4008 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4010 Set_Flag182 (Id, V);
4011 end Set_Has_Xref_Entry;
4013 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4015 pragma Assert (Ekind (Id) = E_Variable);
4017 end Set_Hiding_Loop_Variable;
4019 procedure Set_Homonym (Id : E; V : E) is
4021 pragma Assert (Id /= V);
4025 procedure Set_Interface_Alias (Id : E; V : E) is
4029 and then Is_Hidden (Id)
4030 and then (Ekind_In (Id, E_Procedure, E_Function)));
4032 end Set_Interface_Alias;
4034 procedure Set_Interfaces (Id : E; V : L) is
4036 pragma Assert (Is_Record_Type (Id));
4037 Set_Elist25 (Id, V);
4040 procedure Set_In_Package_Body (Id : E; V : B := True) is
4043 end Set_In_Package_Body;
4045 procedure Set_In_Private_Part (Id : E; V : B := True) is
4048 end Set_In_Private_Part;
4050 procedure Set_In_Use (Id : E; V : B := True) is
4052 pragma Assert (Nkind (Id) in N_Entity);
4056 procedure Set_Inner_Instances (Id : E; V : L) is
4058 Set_Elist23 (Id, V);
4059 end Set_Inner_Instances;
4061 procedure Set_Interface_Name (Id : E; V : N) is
4064 end Set_Interface_Name;
4066 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4068 pragma Assert (Is_Overloadable (Id));
4070 end Set_Is_Abstract_Subprogram;
4072 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4074 pragma Assert (Is_Type (Id));
4075 Set_Flag146 (Id, V);
4076 end Set_Is_Abstract_Type;
4078 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4080 pragma Assert (Is_Access_Type (Id));
4081 Set_Flag194 (Id, V);
4082 end Set_Is_Local_Anonymous_Access;
4084 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4086 pragma Assert (Is_Access_Type (Id));
4088 end Set_Is_Access_Constant;
4090 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4092 Set_Flag185 (Id, V);
4093 end Set_Is_Ada_2005_Only;
4095 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4097 Set_Flag199 (Id, V);
4098 end Set_Is_Ada_2012_Only;
4100 procedure Set_Is_Aliased (Id : E; V : B := True) is
4102 pragma Assert (Nkind (Id) in N_Entity);
4106 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4108 pragma Assert (Is_Entry (Id));
4109 Set_Flag132 (Id, V);
4110 end Set_Is_AST_Entry;
4112 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4115 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4117 end Set_Is_Asynchronous;
4119 procedure Set_Is_Atomic (Id : E; V : B := True) is
4124 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4126 pragma Assert ((not V)
4127 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4129 Set_Flag122 (Id, V);
4130 end Set_Is_Bit_Packed_Array;
4132 procedure Set_Is_Called (Id : E; V : B := True) is
4134 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4135 Set_Flag102 (Id, V);
4138 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4141 end Set_Is_Character_Type;
4143 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4146 end Set_Is_Child_Unit;
4148 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4151 end Set_Is_Class_Wide_Equivalent_Type;
4153 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4155 Set_Flag149 (Id, V);
4156 end Set_Is_Compilation_Unit;
4158 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4160 pragma Assert (Ekind (Id) = E_Discriminant);
4161 Set_Flag103 (Id, V);
4162 end Set_Is_Completely_Hidden;
4164 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4167 end Set_Is_Concurrent_Record_Type;
4169 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4172 end Set_Is_Constr_Subt_For_U_Nominal;
4174 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4176 Set_Flag141 (Id, V);
4177 end Set_Is_Constr_Subt_For_UN_Aliased;
4179 procedure Set_Is_Constrained (Id : E; V : B := True) is
4181 pragma Assert (Nkind (Id) in N_Entity);
4183 end Set_Is_Constrained;
4185 procedure Set_Is_Constructor (Id : E; V : B := True) is
4188 end Set_Is_Constructor;
4190 procedure Set_Is_Controlled (Id : E; V : B := True) is
4192 pragma Assert (Id = Base_Type (Id));
4194 end Set_Is_Controlled;
4196 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4198 pragma Assert (Is_Formal (Id));
4200 end Set_Is_Controlling_Formal;
4202 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4205 end Set_Is_CPP_Class;
4207 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4209 pragma Assert (Is_Type (Id));
4210 Set_Flag223 (Id, V);
4211 end Set_Is_Descendent_Of_Address;
4213 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4215 Set_Flag176 (Id, V);
4216 end Set_Is_Discrim_SO_Function;
4218 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4220 Set_Flag234 (Id, V);
4221 end Set_Is_Dispatch_Table_Entity;
4223 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4228 Is_Overloadable (Id)
4230 Ekind (Id) = E_Subprogram_Type);
4233 end Set_Is_Dispatching_Operation;
4235 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4237 Set_Flag124 (Id, V);
4238 end Set_Is_Eliminated;
4240 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4243 end Set_Is_Entry_Formal;
4245 procedure Set_Is_Exported (Id : E; V : B := True) is
4248 end Set_Is_Exported;
4250 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4253 end Set_Is_First_Subtype;
4255 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4257 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4258 Set_Flag118 (Id, V);
4259 end Set_Is_For_Access_Subtype;
4261 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4263 Set_Flag111 (Id, V);
4264 end Set_Is_Formal_Subprogram;
4266 procedure Set_Is_Frozen (Id : E; V : B := True) is
4268 pragma Assert (Nkind (Id) in N_Entity);
4272 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4274 pragma Assert (Is_Type (Id));
4276 end Set_Is_Generic_Actual_Type;
4278 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4280 Set_Flag130 (Id, V);
4281 end Set_Is_Generic_Instance;
4283 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4285 pragma Assert (Nkind (Id) in N_Entity);
4287 end Set_Is_Generic_Type;
4289 procedure Set_Is_Hidden (Id : E; V : B := True) is
4294 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4296 Set_Flag171 (Id, V);
4297 end Set_Is_Hidden_Open_Scope;
4299 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4301 pragma Assert (Nkind (Id) in N_Entity);
4303 end Set_Is_Immediately_Visible;
4305 procedure Set_Is_Imported (Id : E; V : B := True) is
4308 end Set_Is_Imported;
4310 procedure Set_Is_Inlined (Id : E; V : B := True) is
4315 procedure Set_Is_Interface (Id : E; V : B := True) is
4318 (Ekind_In (Id, E_Record_Type,
4320 E_Record_Type_With_Private,
4321 E_Record_Subtype_With_Private,
4323 E_Class_Wide_Subtype));
4324 Set_Flag186 (Id, V);
4325 end Set_Is_Interface;
4327 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4329 Set_Flag126 (Id, V);
4330 end Set_Is_Instantiated;
4332 procedure Set_Is_Internal (Id : E; V : B := True) is
4334 pragma Assert (Nkind (Id) in N_Entity);
4336 end Set_Is_Internal;
4338 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4340 pragma Assert (Nkind (Id) in N_Entity);
4342 end Set_Is_Interrupt_Handler;
4344 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4347 end Set_Is_Intrinsic_Subprogram;
4349 procedure Set_Is_Itype (Id : E; V : B := True) is
4354 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4357 end Set_Is_Known_Non_Null;
4359 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4361 Set_Flag204 (Id, V);
4362 end Set_Is_Known_Null;
4364 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4366 Set_Flag170 (Id, V);
4367 end Set_Is_Known_Valid;
4369 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4371 pragma Assert (Is_Type (Id));
4372 Set_Flag106 (Id, V);
4373 end Set_Is_Limited_Composite;
4375 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4377 pragma Assert (Is_Interface (Id));
4378 Set_Flag197 (Id, V);
4379 end Set_Is_Limited_Interface;
4381 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4384 end Set_Is_Limited_Record;
4386 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4388 pragma Assert (Is_Subprogram (Id));
4389 Set_Flag137 (Id, V);
4390 end Set_Is_Machine_Code_Subprogram;
4392 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4394 pragma Assert (Is_Type (Id));
4395 Set_Flag109 (Id, V);
4396 end Set_Is_Non_Static_Subtype;
4398 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4400 pragma Assert (Ekind (Id) = E_Procedure);
4401 Set_Flag178 (Id, V);
4402 end Set_Is_Null_Init_Proc;
4404 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4406 Set_Flag153 (Id, V);
4407 end Set_Is_Obsolescent;
4409 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4411 pragma Assert (Ekind (Id) = E_Out_Parameter);
4412 Set_Flag226 (Id, V);
4413 end Set_Is_Only_Out_Parameter;
4415 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4417 pragma Assert (Is_Formal (Id));
4418 Set_Flag134 (Id, V);
4419 end Set_Is_Optional_Parameter;
4421 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4423 pragma Assert (Is_Subprogram (Id));
4425 end Set_Is_Overriding_Operation;
4427 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4429 Set_Flag160 (Id, V);
4430 end Set_Is_Package_Body_Entity;
4432 procedure Set_Is_Packed (Id : E; V : B := True) is
4434 pragma Assert (Id = Base_Type (Id));
4438 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4440 Set_Flag138 (Id, V);
4441 end Set_Is_Packed_Array_Type;
4443 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4445 pragma Assert (Nkind (Id) in N_Entity);
4447 end Set_Is_Potentially_Use_Visible;
4449 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4452 end Set_Is_Preelaborated;
4454 procedure Set_Is_Primitive (Id : E; V : B := True) is
4457 (Is_Overloadable (Id)
4458 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4459 Set_Flag218 (Id, V);
4460 end Set_Is_Primitive;
4462 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4464 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4465 Set_Flag195 (Id, V);
4466 end Set_Is_Primitive_Wrapper;
4468 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4470 pragma Assert (Is_Type (Id));
4471 Set_Flag107 (Id, V);
4472 end Set_Is_Private_Composite;
4474 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4477 end Set_Is_Private_Descendant;
4479 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4481 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4482 Set_Flag245 (Id, V);
4483 end Set_Is_Private_Primitive;
4485 procedure Set_Is_Public (Id : E; V : B := True) is
4487 pragma Assert (Nkind (Id) in N_Entity);
4491 procedure Set_Is_Pure (Id : E; V : B := True) is
4496 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4498 pragma Assert (Is_Access_Type (Id));
4499 Set_Flag189 (Id, V);
4500 end Set_Is_Pure_Unit_Access_Type;
4502 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4504 pragma Assert (Is_Type (Id));
4505 Set_Flag244 (Id, V);
4506 end Set_Is_RACW_Stub_Type;
4508 procedure Set_Is_Raised (Id : E; V : B := True) is
4510 pragma Assert (Ekind (Id) = E_Exception);
4511 Set_Flag224 (Id, V);
4514 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4517 end Set_Is_Remote_Call_Interface;
4519 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4522 end Set_Is_Remote_Types;
4524 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4526 Set_Flag112 (Id, V);
4527 end Set_Is_Renaming_Of_Object;
4529 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4531 Set_Flag209 (Id, V);
4532 end Set_Is_Return_Object;
4534 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4537 end Set_Is_Shared_Passive;
4539 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4543 or else Ekind_In (Id, E_Exception,
4548 end Set_Is_Statically_Allocated;
4550 procedure Set_Is_Tag (Id : E; V : B := True) is
4552 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4556 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4559 end Set_Is_Tagged_Type;
4561 procedure Set_Is_Thunk (Id : E; V : B := True) is
4563 Set_Flag225 (Id, V);
4566 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4568 Set_Flag235 (Id, V);
4569 end Set_Is_Trivial_Subprogram;
4571 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4573 Set_Flag163 (Id, V);
4574 end Set_Is_True_Constant;
4576 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4578 pragma Assert (Id = Base_Type (Id));
4579 Set_Flag117 (Id, V);
4580 end Set_Is_Unchecked_Union;
4582 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4584 pragma Assert (Ekind (Id) = E_Record_Type);
4585 Set_Flag246 (Id, V);
4586 end Set_Is_Underlying_Record_View;
4588 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4590 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4591 Set_Flag144 (Id, V);
4592 end Set_Is_Unsigned_Type;
4594 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4596 pragma Assert (Ekind (Id) = E_Procedure);
4597 Set_Flag127 (Id, V);
4598 end Set_Is_Valued_Procedure;
4600 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4602 pragma Assert (Is_Child_Unit (Id));
4603 Set_Flag116 (Id, V);
4604 end Set_Is_Visible_Child_Unit;
4606 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4608 Set_Flag206 (Id, V);
4609 end Set_Is_Visible_Formal;
4611 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4613 pragma Assert (Ekind (Id) = E_Exception);
4614 Set_Flag133 (Id, V);
4615 end Set_Is_VMS_Exception;
4617 procedure Set_Is_Volatile (Id : E; V : B := True) is
4619 pragma Assert (Nkind (Id) in N_Entity);
4621 end Set_Is_Volatile;
4623 procedure Set_Itype_Printed (Id : E; V : B := True) is
4625 pragma Assert (Is_Itype (Id));
4626 Set_Flag202 (Id, V);
4627 end Set_Itype_Printed;
4629 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4632 end Set_Kill_Elaboration_Checks;
4634 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4637 end Set_Kill_Range_Checks;
4639 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4642 end Set_Kill_Tag_Checks;
4644 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4646 pragma Assert (Is_Type (Id));
4647 Set_Flag207 (Id, V);
4648 end Set_Known_To_Have_Preelab_Init;
4650 procedure Set_Last_Assignment (Id : E; V : N) is
4652 pragma Assert (Is_Assignable (Id));
4654 end Set_Last_Assignment;
4656 procedure Set_Last_Entity (Id : E; V : E) is
4659 end Set_Last_Entity;
4661 procedure Set_Limited_View (Id : E; V : E) is
4663 pragma Assert (Ekind (Id) = E_Package);
4665 end Set_Limited_View;
4667 procedure Set_Lit_Indexes (Id : E; V : E) is
4669 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4671 end Set_Lit_Indexes;
4673 procedure Set_Lit_Strings (Id : E; V : E) is
4675 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4677 end Set_Lit_Strings;
4679 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4681 pragma Assert (Is_Formal (Id));
4682 Set_Flag205 (Id, V);
4683 end Set_Low_Bound_Tested;
4685 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4687 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4689 end Set_Machine_Radix_10;
4691 procedure Set_Master_Id (Id : E; V : E) is
4693 pragma Assert (Is_Access_Type (Id));
4697 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4699 Set_Flag168 (Id, V);
4700 end Set_Materialize_Entity;
4702 procedure Set_Mechanism (Id : E; V : M) is
4704 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4705 Set_Uint8 (Id, UI_From_Int (V));
4708 procedure Set_Modulus (Id : E; V : U) is
4710 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4714 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4716 pragma Assert (Is_Type (Id));
4717 Set_Flag183 (Id, V);
4718 end Set_Must_Be_On_Byte_Boundary;
4720 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4722 pragma Assert (Is_Type (Id));
4723 Set_Flag208 (Id, V);
4724 end Set_Must_Have_Preelab_Init;
4726 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4728 Set_Flag147 (Id, V);
4729 end Set_Needs_Debug_Info;
4731 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4734 (Is_Overloadable (Id)
4735 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4737 end Set_Needs_No_Actuals;
4739 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4741 Set_Flag115 (Id, V);
4742 end Set_Never_Set_In_Source;
4744 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4747 end Set_Next_Inlined_Subprogram;
4749 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4751 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4752 Set_Flag131 (Id, V);
4753 end Set_No_Pool_Assigned;
4755 procedure Set_No_Return (Id : E; V : B := True) is
4758 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4759 Set_Flag113 (Id, V);
4762 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4764 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4765 Set_Flag136 (Id, V);
4766 end Set_No_Strict_Aliasing;
4768 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4770 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4772 end Set_Non_Binary_Modulus;
4774 procedure Set_Non_Limited_View (Id : E; V : E) is
4776 pragma Assert (Ekind (Id) in Incomplete_Kind);
4778 end Set_Non_Limited_View;
4780 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4783 (Root_Type (Id) = Standard_Boolean
4784 and then Ekind (Id) = E_Enumeration_Type);
4785 Set_Flag162 (Id, V);
4786 end Set_Nonzero_Is_True;
4788 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4790 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4792 end Set_Normalized_First_Bit;
4794 procedure Set_Normalized_Position (Id : E; V : U) is
4796 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4798 end Set_Normalized_Position;
4800 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4802 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4804 end Set_Normalized_Position_Max;
4806 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4808 pragma Assert (Ekind (Id) = E_Variable);
4809 Set_Flag247 (Id, V);
4810 end Set_OK_To_Rename;
4812 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4815 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4816 Set_Flag239 (Id, V);
4817 end Set_OK_To_Reorder_Components;
4819 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4822 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4823 Set_Flag241 (Id, V);
4824 end Set_Optimize_Alignment_Space;
4826 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4829 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4830 Set_Flag242 (Id, V);
4831 end Set_Optimize_Alignment_Time;
4833 procedure Set_Original_Array_Type (Id : E; V : E) is
4835 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4837 end Set_Original_Array_Type;
4839 procedure Set_Original_Record_Component (Id : E; V : E) is
4841 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4843 end Set_Original_Record_Component;
4845 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4847 Set_Flag243 (Id, V);
4848 end Set_Overlays_Constant;
4850 procedure Set_Overridden_Operation (Id : E; V : E) is
4853 end Set_Overridden_Operation;
4855 procedure Set_Package_Instantiation (Id : E; V : N) is
4857 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4859 end Set_Package_Instantiation;
4861 procedure Set_Packed_Array_Type (Id : E; V : E) is
4863 pragma Assert (Is_Array_Type (Id));
4865 end Set_Packed_Array_Type;
4867 procedure Set_Parent_Subtype (Id : E; V : E) is
4869 pragma Assert (Ekind (Id) = E_Record_Type);
4871 end Set_Parent_Subtype;
4873 procedure Set_Postcondition_Proc (Id : E; V : E) is
4875 pragma Assert (Ekind (Id) = E_Procedure);
4877 end Set_Postcondition_Proc;
4879 procedure Set_PPC_Wrapper (Id : E; V : E) is
4881 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4883 end Set_PPC_Wrapper;
4885 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4887 pragma Assert (Is_Tagged_Type (Id));
4888 Set_Elist10 (Id, V);
4889 end Set_Direct_Primitive_Operations;
4891 procedure Set_Prival (Id : E; V : E) is
4893 pragma Assert (Is_Protected_Component (Id));
4897 procedure Set_Prival_Link (Id : E; V : E) is
4899 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4901 end Set_Prival_Link;
4903 procedure Set_Private_Dependents (Id : E; V : L) is
4905 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4906 Set_Elist18 (Id, V);
4907 end Set_Private_Dependents;
4909 procedure Set_Private_View (Id : E; V : N) is
4911 pragma Assert (Is_Private_Type (Id));
4913 end Set_Private_View;
4915 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4917 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4919 end Set_Protected_Body_Subprogram;
4921 procedure Set_Protected_Formal (Id : E; V : E) is
4923 pragma Assert (Is_Formal (Id));
4925 end Set_Protected_Formal;
4927 procedure Set_Protection_Object (Id : E; V : E) is
4929 pragma Assert (Ekind_In (Id, E_Entry,
4934 end Set_Protection_Object;
4936 procedure Set_Reachable (Id : E; V : B := True) is
4941 procedure Set_Referenced (Id : E; V : B := True) is
4943 Set_Flag156 (Id, V);
4946 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4949 end Set_Referenced_As_LHS;
4951 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4953 Set_Flag227 (Id, V);
4954 end Set_Referenced_As_Out_Parameter;
4956 procedure Set_Register_Exception_Call (Id : E; V : N) is
4958 pragma Assert (Ekind (Id) = E_Exception);
4960 end Set_Register_Exception_Call;
4962 procedure Set_Related_Array_Object (Id : E; V : E) is
4964 pragma Assert (Is_Array_Type (Id));
4966 end Set_Related_Array_Object;
4968 procedure Set_Related_Expression (Id : E; V : N) is
4970 pragma Assert (Ekind (Id) in Type_Kind
4971 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4973 end Set_Related_Expression;
4975 procedure Set_Related_Instance (Id : E; V : E) is
4977 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4979 end Set_Related_Instance;
4981 procedure Set_Related_Type (Id : E; V : E) is
4983 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4985 end Set_Related_Type;
4987 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4989 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4991 end Set_Relative_Deadline_Variable;
4993 procedure Set_Renamed_Entity (Id : E; V : N) is
4996 end Set_Renamed_Entity;
4998 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5000 pragma Assert (Ekind (Id) = E_Package);
5001 Set_Flag231 (Id, V);
5002 end Set_Renamed_In_Spec;
5004 procedure Set_Renamed_Object (Id : E; V : N) is
5007 end Set_Renamed_Object;
5009 procedure Set_Renaming_Map (Id : E; V : U) is
5012 end Set_Renaming_Map;
5014 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5016 pragma Assert (Is_Overloadable (Id));
5017 Set_Flag213 (Id, V);
5018 end Set_Requires_Overriding;
5020 procedure Set_Return_Present (Id : E; V : B := True) is
5023 end Set_Return_Present;
5025 procedure Set_Return_Applies_To (Id : E; V : N) is
5028 end Set_Return_Applies_To;
5030 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5033 end Set_Returns_By_Ref;
5035 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5038 (Is_Record_Type (Id) and then Id = Base_Type (Id));
5039 Set_Flag164 (Id, V);
5040 end Set_Reverse_Bit_Order;
5042 procedure Set_RM_Size (Id : E; V : U) is
5044 pragma Assert (Is_Type (Id));
5048 procedure Set_Scalar_Range (Id : E; V : N) is
5051 end Set_Scalar_Range;
5053 procedure Set_Scale_Value (Id : E; V : U) is
5056 end Set_Scale_Value;
5058 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5060 pragma Assert (not Is_Record_Type (Id));
5062 end Set_Scope_Depth_Value;
5064 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5066 Set_Flag167 (Id, V);
5067 end Set_Sec_Stack_Needed_For_Return;
5069 procedure Set_Shadow_Entities (Id : E; V : S) is
5071 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5073 end Set_Shadow_Entities;
5075 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5077 pragma Assert (Ekind (Id) = E_Variable);
5079 end Set_Shared_Var_Procs_Instance;
5081 procedure Set_Size_Check_Code (Id : E; V : N) is
5083 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5085 end Set_Size_Check_Code;
5087 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5089 Set_Flag177 (Id, V);
5090 end Set_Size_Depends_On_Discriminant;
5092 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5095 end Set_Size_Known_At_Compile_Time;
5097 procedure Set_Small_Value (Id : E; V : R) is
5099 pragma Assert (Is_Fixed_Point_Type (Id));
5100 Set_Ureal21 (Id, V);
5101 end Set_Small_Value;
5103 procedure Set_Spec_Entity (Id : E; V : E) is
5105 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5107 end Set_Spec_Entity;
5109 procedure Set_Spec_PPC_List (Id : E; V : N) is
5112 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5113 or else Is_Subprogram (Id)
5114 or else Is_Generic_Subprogram (Id));
5116 end Set_Spec_PPC_List;
5118 procedure Set_Static_Predicate (Id : E; V : S) is
5121 (Ekind_In (Id, E_Enumeration_Subtype,
5122 E_Modular_Integer_Subtype,
5123 E_Signed_Integer_Subtype)
5124 and then Has_Predicates (Id));
5126 end Set_Static_Predicate;
5128 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5130 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5131 pragma Assert (Id = Base_Type (Id));
5133 end Set_Storage_Size_Variable;
5135 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5137 pragma Assert (Ekind (Id) = E_Package);
5139 end Set_Static_Elaboration_Desired;
5141 procedure Set_Static_Initialization (Id : E; V : N) is
5144 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5146 end Set_Static_Initialization;
5148 procedure Set_Stored_Constraint (Id : E; V : L) is
5150 pragma Assert (Nkind (Id) in N_Entity);
5151 Set_Elist23 (Id, V);
5152 end Set_Stored_Constraint;
5154 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5156 pragma Assert (Id = Base_Type (Id));
5157 Set_Flag145 (Id, V);
5158 end Set_Strict_Alignment;
5160 procedure Set_String_Literal_Length (Id : E; V : U) is
5162 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5164 end Set_String_Literal_Length;
5166 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5168 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5170 end Set_String_Literal_Low_Bound;
5172 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5174 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5176 end Set_Subprograms_For_Type;
5178 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5180 Set_Flag148 (Id, V);
5181 end Set_Suppress_Elaboration_Warnings;
5183 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5185 pragma Assert (Id = Base_Type (Id));
5186 Set_Flag105 (Id, V);
5187 end Set_Suppress_Init_Proc;
5189 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5191 Set_Flag165 (Id, V);
5192 end Set_Suppress_Style_Checks;
5194 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5196 Set_Flag217 (Id, V);
5197 end Set_Suppress_Value_Tracking_On_Call;
5199 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5201 pragma Assert (Ekind (Id) in Task_Kind);
5203 end Set_Task_Body_Procedure;
5205 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5208 end Set_Treat_As_Volatile;
5210 procedure Set_Underlying_Full_View (Id : E; V : E) is
5212 pragma Assert (Ekind (Id) in Private_Kind);
5214 end Set_Underlying_Full_View;
5216 procedure Set_Underlying_Record_View (Id : E; V : E) is
5218 pragma Assert (Ekind (Id) = E_Record_Type);
5220 end Set_Underlying_Record_View;
5222 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5224 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5225 Set_Flag216 (Id, V);
5226 end Set_Universal_Aliasing;
5228 procedure Set_Unset_Reference (Id : E; V : N) is
5231 end Set_Unset_Reference;
5233 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5236 end Set_Uses_Sec_Stack;
5238 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5240 Set_Flag222 (Id, V);
5241 end Set_Used_As_Generic_Actual;
5243 procedure Set_Warnings_Off (Id : E; V : B := True) is
5246 end Set_Warnings_Off;
5248 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5250 Set_Flag236 (Id, V);
5251 end Set_Warnings_Off_Used;
5253 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5255 Set_Flag237 (Id, V);
5256 end Set_Warnings_Off_Used_Unmodified;
5258 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5260 Set_Flag238 (Id, V);
5261 end Set_Warnings_Off_Used_Unreferenced;
5263 procedure Set_Was_Hidden (Id : E; V : B := True) is
5265 Set_Flag196 (Id, V);
5268 procedure Set_Wrapped_Entity (Id : E; V : E) is
5270 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5271 and then Is_Primitive_Wrapper (Id));
5273 end Set_Wrapped_Entity;
5275 -----------------------------------
5276 -- Field Initialization Routines --
5277 -----------------------------------
5279 procedure Init_Alignment (Id : E) is
5281 Set_Uint14 (Id, Uint_0);
5284 procedure Init_Alignment (Id : E; V : Int) is
5286 Set_Uint14 (Id, UI_From_Int (V));
5289 procedure Init_Component_Bit_Offset (Id : E) is
5291 Set_Uint11 (Id, No_Uint);
5292 end Init_Component_Bit_Offset;
5294 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5296 Set_Uint11 (Id, UI_From_Int (V));
5297 end Init_Component_Bit_Offset;
5299 procedure Init_Component_Size (Id : E) is
5301 Set_Uint22 (Id, Uint_0);
5302 end Init_Component_Size;
5304 procedure Init_Component_Size (Id : E; V : Int) is
5306 Set_Uint22 (Id, UI_From_Int (V));
5307 end Init_Component_Size;
5309 procedure Init_Digits_Value (Id : E) is
5311 Set_Uint17 (Id, Uint_0);
5312 end Init_Digits_Value;
5314 procedure Init_Digits_Value (Id : E; V : Int) is
5316 Set_Uint17 (Id, UI_From_Int (V));
5317 end Init_Digits_Value;
5319 procedure Init_Esize (Id : E) is
5321 Set_Uint12 (Id, Uint_0);
5324 procedure Init_Esize (Id : E; V : Int) is
5326 Set_Uint12 (Id, UI_From_Int (V));
5329 procedure Init_Normalized_First_Bit (Id : E) is
5331 Set_Uint8 (Id, No_Uint);
5332 end Init_Normalized_First_Bit;
5334 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5336 Set_Uint8 (Id, UI_From_Int (V));
5337 end Init_Normalized_First_Bit;
5339 procedure Init_Normalized_Position (Id : E) is
5341 Set_Uint14 (Id, No_Uint);
5342 end Init_Normalized_Position;
5344 procedure Init_Normalized_Position (Id : E; V : Int) is
5346 Set_Uint14 (Id, UI_From_Int (V));
5347 end Init_Normalized_Position;
5349 procedure Init_Normalized_Position_Max (Id : E) is
5351 Set_Uint10 (Id, No_Uint);
5352 end Init_Normalized_Position_Max;
5354 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5356 Set_Uint10 (Id, UI_From_Int (V));
5357 end Init_Normalized_Position_Max;
5359 procedure Init_RM_Size (Id : E) is
5361 Set_Uint13 (Id, Uint_0);
5364 procedure Init_RM_Size (Id : E; V : Int) is
5366 Set_Uint13 (Id, UI_From_Int (V));
5369 -----------------------------
5370 -- Init_Component_Location --
5371 -----------------------------
5373 procedure Init_Component_Location (Id : E) is
5375 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5376 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5377 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5378 Set_Uint12 (Id, Uint_0); -- Esize
5379 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5380 end Init_Component_Location;
5386 procedure Init_Size (Id : E; V : Int) is
5388 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5389 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5392 ---------------------
5393 -- Init_Size_Align --
5394 ---------------------
5396 procedure Init_Size_Align (Id : E) is
5398 Set_Uint12 (Id, Uint_0); -- Esize
5399 Set_Uint13 (Id, Uint_0); -- RM_Size
5400 Set_Uint14 (Id, Uint_0); -- Alignment
5401 end Init_Size_Align;
5403 ----------------------------------------------
5404 -- Type Representation Attribute Predicates --
5405 ----------------------------------------------
5407 function Known_Alignment (E : Entity_Id) return B is
5409 return Uint14 (E) /= Uint_0
5410 and then Uint14 (E) /= No_Uint;
5411 end Known_Alignment;
5413 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5415 return Uint11 (E) /= No_Uint;
5416 end Known_Component_Bit_Offset;
5418 function Known_Component_Size (E : Entity_Id) return B is
5420 return Uint22 (Base_Type (E)) /= Uint_0
5421 and then Uint22 (Base_Type (E)) /= No_Uint;
5422 end Known_Component_Size;
5424 function Known_Esize (E : Entity_Id) return B is
5426 return Uint12 (E) /= Uint_0
5427 and then Uint12 (E) /= No_Uint;
5430 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5432 return Uint8 (E) /= No_Uint;
5433 end Known_Normalized_First_Bit;
5435 function Known_Normalized_Position (E : Entity_Id) return B is
5437 return Uint14 (E) /= No_Uint;
5438 end Known_Normalized_Position;
5440 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5442 return Uint10 (E) /= No_Uint;
5443 end Known_Normalized_Position_Max;
5445 function Known_RM_Size (E : Entity_Id) return B is
5447 return Uint13 (E) /= No_Uint
5448 and then (Uint13 (E) /= Uint_0
5449 or else Is_Discrete_Type (E)
5450 or else Is_Fixed_Point_Type (E));
5453 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5455 return Uint11 (E) /= No_Uint
5456 and then Uint11 (E) >= Uint_0;
5457 end Known_Static_Component_Bit_Offset;
5459 function Known_Static_Component_Size (E : Entity_Id) return B is
5461 return Uint22 (Base_Type (E)) > Uint_0;
5462 end Known_Static_Component_Size;
5464 function Known_Static_Esize (E : Entity_Id) return B is
5466 return Uint12 (E) > Uint_0
5467 and then not Is_Generic_Type (E);
5468 end Known_Static_Esize;
5470 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5472 return Uint8 (E) /= No_Uint
5473 and then Uint8 (E) >= Uint_0;
5474 end Known_Static_Normalized_First_Bit;
5476 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5478 return Uint14 (E) /= No_Uint
5479 and then Uint14 (E) >= Uint_0;
5480 end Known_Static_Normalized_Position;
5482 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5484 return Uint10 (E) /= No_Uint
5485 and then Uint10 (E) >= Uint_0;
5486 end Known_Static_Normalized_Position_Max;
5488 function Known_Static_RM_Size (E : Entity_Id) return B is
5490 return (Uint13 (E) > Uint_0
5491 or else Is_Discrete_Type (E)
5492 or else Is_Fixed_Point_Type (E))
5493 and then not Is_Generic_Type (E);
5494 end Known_Static_RM_Size;
5496 function Unknown_Alignment (E : Entity_Id) return B is
5498 return Uint14 (E) = Uint_0
5499 or else Uint14 (E) = No_Uint;
5500 end Unknown_Alignment;
5502 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5504 return Uint11 (E) = No_Uint;
5505 end Unknown_Component_Bit_Offset;
5507 function Unknown_Component_Size (E : Entity_Id) return B is
5509 return Uint22 (Base_Type (E)) = Uint_0
5511 Uint22 (Base_Type (E)) = No_Uint;
5512 end Unknown_Component_Size;
5514 function Unknown_Esize (E : Entity_Id) return B is
5516 return Uint12 (E) = No_Uint
5518 Uint12 (E) = Uint_0;
5521 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5523 return Uint8 (E) = No_Uint;
5524 end Unknown_Normalized_First_Bit;
5526 function Unknown_Normalized_Position (E : Entity_Id) return B is
5528 return Uint14 (E) = No_Uint;
5529 end Unknown_Normalized_Position;
5531 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5533 return Uint10 (E) = No_Uint;
5534 end Unknown_Normalized_Position_Max;
5536 function Unknown_RM_Size (E : Entity_Id) return B is
5538 return (Uint13 (E) = Uint_0
5539 and then not Is_Discrete_Type (E)
5540 and then not Is_Fixed_Point_Type (E))
5541 or else Uint13 (E) = No_Uint;
5542 end Unknown_RM_Size;
5544 --------------------
5545 -- Address_Clause --
5546 --------------------
5548 function Address_Clause (Id : E) return N is
5550 return Rep_Clause (Id, Name_Address);
5557 function Aft_Value (Id : E) return U is
5559 Delta_Val : Ureal := Delta_Value (Id);
5561 while Delta_Val < Ureal_Tenth loop
5562 Delta_Val := Delta_Val * Ureal_10;
5563 Result := Result + 1;
5566 return UI_From_Int (Result);
5569 ----------------------
5570 -- Alignment_Clause --
5571 ----------------------
5573 function Alignment_Clause (Id : E) return N is
5575 return Rep_Clause (Id, Name_Alignment);
5576 end Alignment_Clause;
5582 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5584 if Last_Entity (V) = Empty then
5585 Set_First_Entity (Id => V, V => Id);
5587 Set_Next_Entity (Last_Entity (V), Id);
5590 Set_Next_Entity (Id, Empty);
5592 Set_Last_Entity (Id => V, V => Id);
5599 function Base_Type (Id : E) return E is
5602 when E_Enumeration_Subtype |
5604 E_Signed_Integer_Subtype |
5605 E_Modular_Integer_Subtype |
5606 E_Floating_Point_Subtype |
5607 E_Ordinary_Fixed_Point_Subtype |
5608 E_Decimal_Fixed_Point_Subtype |
5613 E_Record_Subtype_With_Private |
5614 E_Limited_Private_Subtype |
5616 E_Protected_Subtype |
5618 E_String_Literal_Subtype |
5619 E_Class_Wide_Subtype =>
5627 -------------------------
5628 -- Component_Alignment --
5629 -------------------------
5631 -- Component Alignment is encoded using two flags, Flag128/129 as
5632 -- follows. Note that both flags False = Align_Default, so that the
5633 -- default initialization of flags to False initializes component
5634 -- alignment to the default value as required.
5636 -- Flag128 Flag129 Value
5637 -- ------- ------- -----
5638 -- False False Calign_Default
5639 -- False True Calign_Component_Size
5640 -- True False Calign_Component_Size_4
5641 -- True True Calign_Storage_Unit
5643 function Component_Alignment (Id : E) return C is
5644 BT : constant Node_Id := Base_Type (Id);
5647 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5649 if Flag128 (BT) then
5650 if Flag129 (BT) then
5651 return Calign_Storage_Unit;
5653 return Calign_Component_Size_4;
5657 if Flag129 (BT) then
5658 return Calign_Component_Size;
5660 return Calign_Default;
5663 end Component_Alignment;
5665 ----------------------
5666 -- Declaration_Node --
5667 ----------------------
5669 function Declaration_Node (Id : E) return N is
5673 if Ekind (Id) = E_Incomplete_Type
5674 and then Present (Full_View (Id))
5676 P := Parent (Full_View (Id));
5682 if Nkind (P) /= N_Selected_Component
5683 and then Nkind (P) /= N_Expanded_Name
5685 not (Nkind (P) = N_Defining_Program_Unit_Name
5686 and then Is_Child_Unit (Id))
5693 end Declaration_Node;
5695 ---------------------
5696 -- Designated_Type --
5697 ---------------------
5699 function Designated_Type (Id : E) return E is
5703 Desig_Type := Directly_Designated_Type (Id);
5705 if Ekind (Desig_Type) = E_Incomplete_Type
5706 and then Present (Full_View (Desig_Type))
5708 return Full_View (Desig_Type);
5710 elsif Is_Class_Wide_Type (Desig_Type)
5711 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5712 and then Present (Full_View (Etype (Desig_Type)))
5713 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5715 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5720 end Designated_Type;
5722 ----------------------
5723 -- Entry_Index_Type --
5724 ----------------------
5726 function Entry_Index_Type (Id : E) return N is
5728 pragma Assert (Ekind (Id) = E_Entry_Family);
5729 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5730 end Entry_Index_Type;
5732 ---------------------
5733 -- First_Component --
5734 ---------------------
5736 function First_Component (Id : E) return E is
5741 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5743 Comp_Id := First_Entity (Id);
5744 while Present (Comp_Id) loop
5745 exit when Ekind (Comp_Id) = E_Component;
5746 Comp_Id := Next_Entity (Comp_Id);
5750 end First_Component;
5752 -------------------------------------
5753 -- First_Component_Or_Discriminant --
5754 -------------------------------------
5756 function First_Component_Or_Discriminant (Id : E) return E is
5761 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5763 Comp_Id := First_Entity (Id);
5764 while Present (Comp_Id) loop
5765 exit when Ekind (Comp_Id) = E_Component
5767 Ekind (Comp_Id) = E_Discriminant;
5768 Comp_Id := Next_Entity (Comp_Id);
5772 end First_Component_Or_Discriminant;
5778 function First_Formal (Id : E) return E is
5783 (Is_Overloadable (Id)
5784 or else Ekind_In (Id, E_Entry_Family,
5786 E_Subprogram_Type));
5788 if Ekind (Id) = E_Enumeration_Literal then
5792 Formal := First_Entity (Id);
5794 if Present (Formal) and then Is_Formal (Formal) then
5802 ------------------------------
5803 -- First_Formal_With_Extras --
5804 ------------------------------
5806 function First_Formal_With_Extras (Id : E) return E is
5811 (Is_Overloadable (Id)
5812 or else Ekind_In (Id, E_Entry_Family,
5814 E_Subprogram_Type));
5816 if Ekind (Id) = E_Enumeration_Literal then
5820 Formal := First_Entity (Id);
5822 if Present (Formal) and then Is_Formal (Formal) then
5825 return Extra_Formals (Id); -- Empty if no extra formals
5828 end First_Formal_With_Extras;
5830 -------------------------------------
5831 -- Get_Attribute_Definition_Clause --
5832 -------------------------------------
5834 function Get_Attribute_Definition_Clause
5836 Id : Attribute_Id) return Node_Id
5841 N := First_Rep_Item (E);
5842 while Present (N) loop
5843 if Nkind (N) = N_Attribute_Definition_Clause
5844 and then Get_Attribute_Id (Chars (N)) = Id
5853 end Get_Attribute_Definition_Clause;
5859 function Get_Full_View (T : Entity_Id) return Entity_Id is
5861 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5862 return Full_View (T);
5864 elsif Is_Class_Wide_Type (T)
5865 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5866 and then Present (Full_View (Root_Type (T)))
5868 return Class_Wide_Type (Full_View (Root_Type (T)));
5875 --------------------------------------
5876 -- Get_Record_Representation_Clause --
5877 --------------------------------------
5879 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5883 N := First_Rep_Item (E);
5884 while Present (N) loop
5885 if Nkind (N) = N_Record_Representation_Clause then
5893 end Get_Record_Representation_Clause;
5895 -----------------------------
5896 -- Get_Rep_Item_For_Entity --
5897 -----------------------------
5899 function Get_Rep_Item_For_Entity
5901 Nam : Name_Id) return Node_Id
5907 N := First_Rep_Item (E);
5908 while Present (N) loop
5909 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5910 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5912 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5916 elsif Nkind (N) = N_Attribute_Definition_Clause
5917 and then Chars (N) = Nam
5918 and then Entity (N) = E
5922 elsif Nkind (N) = N_Aspect_Specification
5923 and then Chars (Identifier (N)) = Nam
5924 and then Entity (N) = E
5933 end Get_Rep_Item_For_Entity;
5935 --------------------
5936 -- Get_Rep_Pragma --
5937 --------------------
5939 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5943 N := First_Rep_Item (E);
5944 while Present (N) loop
5945 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5955 ------------------------
5956 -- Has_Attach_Handler --
5957 ------------------------
5959 function Has_Attach_Handler (Id : E) return B is
5963 pragma Assert (Is_Protected_Type (Id));
5965 Ritem := First_Rep_Item (Id);
5966 while Present (Ritem) loop
5967 if Nkind (Ritem) = N_Pragma
5968 and then Pragma_Name (Ritem) = Name_Attach_Handler
5972 Next_Rep_Item (Ritem);
5977 end Has_Attach_Handler;
5979 -------------------------------------
5980 -- Has_Attribute_Definition_Clause --
5981 -------------------------------------
5983 function Has_Attribute_Definition_Clause
5985 Id : Attribute_Id) return Boolean
5988 return Present (Get_Attribute_Definition_Clause (E, Id));
5989 end Has_Attribute_Definition_Clause;
5995 function Has_Entries (Id : E) return B is
5999 pragma Assert (Is_Concurrent_Type (Id));
6001 Ent := First_Entity (Id);
6002 while Present (Ent) loop
6003 if Is_Entry (Ent) then
6007 Ent := Next_Entity (Ent);
6013 ----------------------------
6014 -- Has_Foreign_Convention --
6015 ----------------------------
6017 function Has_Foreign_Convention (Id : E) return B is
6019 -- While regular Intrinsics such as the Standard operators fit in the
6020 -- "Ada" convention, those with an Interface_Name materialize GCC
6021 -- builtin imports for which Ada special treatments shouldn't apply.
6023 return Convention (Id) in Foreign_Convention
6024 or else (Convention (Id) = Convention_Intrinsic
6025 and then Present (Interface_Name (Id)));
6026 end Has_Foreign_Convention;
6028 ---------------------------
6029 -- Has_Interrupt_Handler --
6030 ---------------------------
6032 function Has_Interrupt_Handler (Id : E) return B is
6036 pragma Assert (Is_Protected_Type (Id));
6038 Ritem := First_Rep_Item (Id);
6039 while Present (Ritem) loop
6040 if Nkind (Ritem) = N_Pragma
6041 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6045 Next_Rep_Item (Ritem);
6050 end Has_Interrupt_Handler;
6052 --------------------------
6053 -- Has_Private_Ancestor --
6054 --------------------------
6056 function Has_Private_Ancestor (Id : E) return B is
6057 R : constant Entity_Id := Root_Type (Id);
6058 T1 : Entity_Id := Id;
6061 if Is_Private_Type (T1) then
6069 end Has_Private_Ancestor;
6071 --------------------
6072 -- Has_Rep_Pragma --
6073 --------------------
6075 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6077 return Present (Get_Rep_Pragma (E, Nam));
6080 --------------------
6081 -- Has_Unmodified --
6082 --------------------
6084 function Has_Unmodified (E : Entity_Id) return Boolean is
6086 if Has_Pragma_Unmodified (E) then
6088 elsif Warnings_Off (E) then
6089 Set_Warnings_Off_Used_Unmodified (E);
6096 ---------------------
6097 -- Has_Unreferenced --
6098 ---------------------
6100 function Has_Unreferenced (E : Entity_Id) return Boolean is
6102 if Has_Pragma_Unreferenced (E) then
6104 elsif Warnings_Off (E) then
6105 Set_Warnings_Off_Used_Unreferenced (E);
6110 end Has_Unreferenced;
6112 ----------------------
6113 -- Has_Warnings_Off --
6114 ----------------------
6116 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6118 if Warnings_Off (E) then
6119 Set_Warnings_Off_Used (E);
6124 end Has_Warnings_Off;
6126 ------------------------------
6127 -- Implementation_Base_Type --
6128 ------------------------------
6130 function Implementation_Base_Type (Id : E) return E is
6135 Bastyp := Base_Type (Id);
6137 if Is_Incomplete_Or_Private_Type (Bastyp) then
6138 Imptyp := Underlying_Type (Bastyp);
6140 -- If we have an implementation type, then just return it,
6141 -- otherwise we return the Base_Type anyway. This can only
6142 -- happen in error situations and should avoid some error bombs.
6144 if Present (Imptyp) then
6145 return Base_Type (Imptyp);
6153 end Implementation_Base_Type;
6155 -------------------------
6156 -- Invariant_Procedure --
6157 -------------------------
6159 function Invariant_Procedure (Id : E) return E is
6163 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6165 if No (Subprograms_For_Type (Id)) then
6169 S := Subprograms_For_Type (Id);
6170 while Present (S) loop
6171 if Has_Invariants (S) then
6174 S := Subprograms_For_Type (S);
6180 end Invariant_Procedure;
6182 ---------------------
6183 -- Is_Boolean_Type --
6184 ---------------------
6186 function Is_Boolean_Type (Id : E) return B is
6188 return Root_Type (Id) = Standard_Boolean;
6189 end Is_Boolean_Type;
6191 ------------------------
6192 -- Is_Constant_Object --
6193 ------------------------
6195 function Is_Constant_Object (Id : E) return B is
6196 K : constant Entity_Kind := Ekind (Id);
6199 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6200 end Is_Constant_Object;
6202 --------------------
6203 -- Is_Discriminal --
6204 --------------------
6206 function Is_Discriminal (Id : E) return B is
6208 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6209 and then Present (Discriminal_Link (Id)));
6212 ----------------------
6213 -- Is_Dynamic_Scope --
6214 ----------------------
6216 function Is_Dynamic_Scope (Id : E) return B is
6219 Ekind (Id) = E_Block
6221 Ekind (Id) = E_Function
6223 Ekind (Id) = E_Procedure
6225 Ekind (Id) = E_Subprogram_Body
6227 Ekind (Id) = E_Task_Type
6229 (Ekind (Id) = E_Limited_Private_Type
6230 and then Present (Full_View (Id))
6231 and then Ekind (Full_View (Id)) = E_Task_Type)
6233 Ekind (Id) = E_Entry
6235 Ekind (Id) = E_Entry_Family
6237 Ekind (Id) = E_Return_Statement;
6238 end Is_Dynamic_Scope;
6240 --------------------
6241 -- Is_Entity_Name --
6242 --------------------
6244 function Is_Entity_Name (N : Node_Id) return Boolean is
6245 Kind : constant Node_Kind := Nkind (N);
6248 -- Identifiers, operator symbols, expanded names are entity names
6250 return Kind = N_Identifier
6251 or else Kind = N_Operator_Symbol
6252 or else Kind = N_Expanded_Name
6254 -- Attribute references are entity names if they refer to an entity.
6255 -- Note that we don't do this by testing for the presence of the
6256 -- Entity field in the N_Attribute_Reference node, since it may not
6257 -- have been set yet.
6259 or else (Kind = N_Attribute_Reference
6260 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6263 -----------------------------------
6264 -- Is_Package_Or_Generic_Package --
6265 -----------------------------------
6267 function Is_Package_Or_Generic_Package (Id : E) return B is
6270 Ekind (Id) = E_Package
6272 Ekind (Id) = E_Generic_Package;
6273 end Is_Package_Or_Generic_Package;
6275 ------------------------
6276 -- Predicate_Function --
6277 ------------------------
6279 function Predicate_Function (Id : E) return E is
6283 pragma Assert (Is_Type (Id));
6285 if No (Subprograms_For_Type (Id)) then
6289 S := Subprograms_For_Type (Id);
6290 while Present (S) loop
6291 if Has_Predicates (S) then
6294 S := Subprograms_For_Type (S);
6300 end Predicate_Function;
6306 function Is_Prival (Id : E) return B is
6308 return (Ekind_In (Id, E_Constant, E_Variable)
6309 and then Present (Prival_Link (Id)));
6312 ----------------------------
6313 -- Is_Protected_Component --
6314 ----------------------------
6316 function Is_Protected_Component (Id : E) return B is
6318 return Ekind (Id) = E_Component
6319 and then Is_Protected_Type (Scope (Id));
6320 end Is_Protected_Component;
6322 ----------------------------
6323 -- Is_Protected_Interface --
6324 ----------------------------
6326 function Is_Protected_Interface (Id : E) return B is
6327 Typ : constant Entity_Id := Base_Type (Id);
6329 if not Is_Interface (Typ) then
6331 elsif Is_Class_Wide_Type (Typ) then
6332 return Is_Protected_Interface (Etype (Typ));
6334 return Protected_Present (Type_Definition (Parent (Typ)));
6336 end Is_Protected_Interface;
6338 ------------------------------
6339 -- Is_Protected_Record_Type --
6340 ------------------------------
6342 function Is_Protected_Record_Type (Id : E) return B is
6345 Is_Concurrent_Record_Type (Id)
6346 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6347 end Is_Protected_Record_Type;
6349 --------------------------------
6350 -- Is_Standard_Character_Type --
6351 --------------------------------
6353 function Is_Standard_Character_Type (Id : E) return B is
6355 if Is_Type (Id) then
6357 R : constant Entity_Id := Root_Type (Id);
6360 R = Standard_Character
6362 R = Standard_Wide_Character
6364 R = Standard_Wide_Wide_Character;
6370 end Is_Standard_Character_Type;
6372 --------------------
6373 -- Is_String_Type --
6374 --------------------
6376 function Is_String_Type (Id : E) return B is
6378 return Ekind (Id) in String_Kind
6379 or else (Is_Array_Type (Id)
6380 and then Id /= Any_Composite
6381 and then Number_Dimensions (Id) = 1
6382 and then Is_Character_Type (Component_Type (Id)));
6385 -------------------------------
6386 -- Is_Synchronized_Interface --
6387 -------------------------------
6389 function Is_Synchronized_Interface (Id : E) return B is
6390 Typ : constant Entity_Id := Base_Type (Id);
6393 if not Is_Interface (Typ) then
6396 elsif Is_Class_Wide_Type (Typ) then
6397 return Is_Synchronized_Interface (Etype (Typ));
6400 return Protected_Present (Type_Definition (Parent (Typ)))
6401 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6402 or else Task_Present (Type_Definition (Parent (Typ)));
6404 end Is_Synchronized_Interface;
6406 -----------------------
6407 -- Is_Task_Interface --
6408 -----------------------
6410 function Is_Task_Interface (Id : E) return B is
6411 Typ : constant Entity_Id := Base_Type (Id);
6413 if not Is_Interface (Typ) then
6415 elsif Is_Class_Wide_Type (Typ) then
6416 return Is_Task_Interface (Etype (Typ));
6418 return Task_Present (Type_Definition (Parent (Typ)));
6420 end Is_Task_Interface;
6422 -------------------------
6423 -- Is_Task_Record_Type --
6424 -------------------------
6426 function Is_Task_Record_Type (Id : E) return B is
6429 Is_Concurrent_Record_Type (Id)
6430 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6431 end Is_Task_Record_Type;
6433 ------------------------
6434 -- Is_Wrapper_Package --
6435 ------------------------
6437 function Is_Wrapper_Package (Id : E) return B is
6439 return (Ekind (Id) = E_Package
6440 and then Present (Related_Instance (Id)));
6441 end Is_Wrapper_Package;
6447 function Last_Formal (Id : E) return E is
6452 (Is_Overloadable (Id)
6453 or else Ekind_In (Id, E_Entry_Family,
6455 E_Subprogram_Type));
6457 if Ekind (Id) = E_Enumeration_Literal then
6461 Formal := First_Formal (Id);
6463 if Present (Formal) then
6464 while Present (Next_Formal (Formal)) loop
6465 Formal := Next_Formal (Formal);
6473 function Model_Emin_Value (Id : E) return Uint is
6475 return Machine_Emin_Value (Id);
6476 end Model_Emin_Value;
6478 -------------------------
6479 -- Model_Epsilon_Value --
6480 -------------------------
6482 function Model_Epsilon_Value (Id : E) return Ureal is
6483 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6485 return Radix ** (1 - Model_Mantissa_Value (Id));
6486 end Model_Epsilon_Value;
6488 --------------------------
6489 -- Model_Mantissa_Value --
6490 --------------------------
6492 function Model_Mantissa_Value (Id : E) return Uint is
6494 return Machine_Mantissa_Value (Id);
6495 end Model_Mantissa_Value;
6497 -----------------------
6498 -- Model_Small_Value --
6499 -----------------------
6501 function Model_Small_Value (Id : E) return Ureal is
6502 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6504 return Radix ** (Model_Emin_Value (Id) - 1);
6505 end Model_Small_Value;
6507 ------------------------
6508 -- Machine_Emax_Value --
6509 ------------------------
6511 function Machine_Emax_Value (Id : E) return Uint is
6512 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6515 case Float_Rep (Id) is
6518 when 1 .. 6 => return Uint_128;
6519 when 7 .. 15 => return 2**10;
6520 when 16 .. 18 => return 2**14;
6521 when others => return No_Uint;
6526 when 1 .. 9 => return 2**7 - 1;
6527 when 10 .. 15 => return 2**10 - 1;
6528 when others => return No_Uint;
6532 return Uint_2 ** Uint_7 - Uint_1;
6534 end Machine_Emax_Value;
6536 ------------------------
6537 -- Machine_Emin_Value --
6538 ------------------------
6540 function Machine_Emin_Value (Id : E) return Uint is
6542 case Float_Rep (Id) is
6543 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6544 when VAX_Native => return -Machine_Emax_Value (Id);
6545 when AAMP => return -Machine_Emax_Value (Id);
6547 end Machine_Emin_Value;
6549 ----------------------------
6550 -- Machine_Mantissa_Value --
6551 ----------------------------
6553 function Machine_Mantissa_Value (Id : E) return Uint is
6554 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6557 case Float_Rep (Id) is
6560 when 1 .. 6 => return Uint_24;
6561 when 7 .. 15 => return UI_From_Int (53);
6562 when 16 .. 18 => return Uint_64;
6563 when others => return No_Uint;
6568 when 1 .. 6 => return Uint_24;
6569 when 7 .. 9 => return UI_From_Int (56);
6570 when 10 .. 15 => return UI_From_Int (53);
6571 when others => return No_Uint;
6576 when 1 .. 6 => return Uint_24;
6577 when 7 .. 9 => return UI_From_Int (40);
6578 when others => return No_Uint;
6581 end Machine_Mantissa_Value;
6583 -------------------------
6584 -- Machine_Radix_Value --
6585 -------------------------
6587 function Machine_Radix_Value (Id : E) return U is
6589 case Float_Rep (Id) is
6590 when IEEE_Binary | VAX_Native | AAMP =>
6593 end Machine_Radix_Value;
6595 --------------------
6596 -- Next_Component --
6597 --------------------
6599 function Next_Component (Id : E) return E is
6603 Comp_Id := Next_Entity (Id);
6604 while Present (Comp_Id) loop
6605 exit when Ekind (Comp_Id) = E_Component;
6606 Comp_Id := Next_Entity (Comp_Id);
6612 ------------------------------------
6613 -- Next_Component_Or_Discriminant --
6614 ------------------------------------
6616 function Next_Component_Or_Discriminant (Id : E) return E is
6620 Comp_Id := Next_Entity (Id);
6621 while Present (Comp_Id) loop
6622 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6623 Comp_Id := Next_Entity (Comp_Id);
6627 end Next_Component_Or_Discriminant;
6629 -----------------------
6630 -- Next_Discriminant --
6631 -----------------------
6633 -- This function actually implements both Next_Discriminant and
6634 -- Next_Stored_Discriminant by making sure that the Discriminant
6635 -- returned is of the same variety as Id.
6637 function Next_Discriminant (Id : E) return E is
6639 -- Derived Tagged types with private extensions look like this...
6641 -- E_Discriminant d1
6642 -- E_Discriminant d2
6644 -- E_Discriminant d1
6645 -- E_Discriminant d2
6648 -- so it is critical not to go past the leading discriminants
6653 pragma Assert (Ekind (Id) = E_Discriminant);
6656 D := Next_Entity (D);
6658 or else (Ekind (D) /= E_Discriminant
6659 and then not Is_Itype (D))
6664 exit when Ekind (D) = E_Discriminant
6665 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6669 end Next_Discriminant;
6675 function Next_Formal (Id : E) return E is
6679 -- Follow the chain of declared entities as long as the kind of the
6680 -- entity corresponds to a formal parameter. Skip internal entities
6681 -- that may have been created for implicit subtypes, in the process
6682 -- of analyzing default expressions.
6686 P := Next_Entity (P);
6688 if No (P) or else Is_Formal (P) then
6690 elsif not Is_Internal (P) then
6696 -----------------------------
6697 -- Next_Formal_With_Extras --
6698 -----------------------------
6700 function Next_Formal_With_Extras (Id : E) return E is
6702 if Present (Extra_Formal (Id)) then
6703 return Extra_Formal (Id);
6705 return Next_Formal (Id);
6707 end Next_Formal_With_Extras;
6713 function Next_Index (Id : Node_Id) return Node_Id is
6722 function Next_Literal (Id : E) return E is
6724 pragma Assert (Nkind (Id) in N_Entity);
6728 ------------------------------
6729 -- Next_Stored_Discriminant --
6730 ------------------------------
6732 function Next_Stored_Discriminant (Id : E) return E is
6734 -- See comment in Next_Discriminant
6736 return Next_Discriminant (Id);
6737 end Next_Stored_Discriminant;
6739 -----------------------
6740 -- Number_Dimensions --
6741 -----------------------
6743 function Number_Dimensions (Id : E) return Pos is
6748 if Ekind (Id) in String_Kind then
6753 T := First_Index (Id);
6754 while Present (T) loop
6761 end Number_Dimensions;
6763 --------------------
6764 -- Number_Entries --
6765 --------------------
6767 function Number_Entries (Id : E) return Nat is
6772 pragma Assert (Is_Concurrent_Type (Id));
6775 Ent := First_Entity (Id);
6776 while Present (Ent) loop
6777 if Is_Entry (Ent) then
6781 Ent := Next_Entity (Ent);
6787 --------------------
6788 -- Number_Formals --
6789 --------------------
6791 function Number_Formals (Id : E) return Pos is
6797 Formal := First_Formal (Id);
6798 while Present (Formal) loop
6800 Formal := Next_Formal (Formal);
6806 --------------------
6807 -- Parameter_Mode --
6808 --------------------
6810 function Parameter_Mode (Id : E) return Formal_Kind is
6815 --------------------------
6816 -- Primitive_Operations --
6817 --------------------------
6819 function Primitive_Operations (Id : E) return L is
6821 if Is_Concurrent_Type (Id) then
6822 if Present (Corresponding_Record_Type (Id)) then
6823 return Direct_Primitive_Operations
6824 (Corresponding_Record_Type (Id));
6829 return Direct_Primitive_Operations (Id);
6831 end Primitive_Operations;
6833 ---------------------
6834 -- Record_Rep_Item --
6835 ---------------------
6837 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6839 Set_Next_Rep_Item (N, First_Rep_Item (E));
6840 Set_First_Rep_Item (E, N);
6841 end Record_Rep_Item;
6847 function Root_Type (Id : E) return E is
6851 pragma Assert (Nkind (Id) in N_Entity);
6853 T := Base_Type (Id);
6855 if Ekind (T) = E_Class_Wide_Type then
6858 elsif Ekind (T) = E_Class_Wide_Subtype then
6859 return Etype (Base_Type (T));
6861 -- ??? T comes from Base_Type, how can it be a subtype?
6862 -- Also Base_Type is supposed to be idempotent, so either way
6863 -- this is equivalent to "return Etype (T)" and should be merged
6864 -- with the E_Class_Wide_Type case.
6875 -- Following test catches some error cases resulting from
6878 elsif No (Etyp) then
6881 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6884 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6890 -- Return if there is a circularity in the inheritance chain. This
6891 -- happens in some error situations and we do not want to get
6892 -- stuck in this loop.
6894 if T = Base_Type (Id) then
6901 ---------------------
6902 -- Safe_Emax_Value --
6903 ---------------------
6905 function Safe_Emax_Value (Id : E) return Uint is
6907 return Machine_Emax_Value (Id);
6908 end Safe_Emax_Value;
6910 ----------------------
6911 -- Safe_First_Value --
6912 ----------------------
6914 function Safe_First_Value (Id : E) return Ureal is
6916 return -Safe_Last_Value (Id);
6917 end Safe_First_Value;
6919 ---------------------
6920 -- Safe_Last_Value --
6921 ---------------------
6923 function Safe_Last_Value (Id : E) return Ureal is
6924 Radix : constant Uint := Machine_Radix_Value (Id);
6925 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
6926 Emax : constant Uint := Safe_Emax_Value (Id);
6927 Significand : constant Uint := Radix ** Mantissa - 1;
6928 Exponent : constant Uint := Emax - Mantissa;
6934 (Num => Significand * 2 ** (Exponent mod 4),
6935 Den => -Exponent / 4,
6941 (Num => Significand,
6945 end Safe_Last_Value;
6951 function Scope_Depth (Id : E) return Uint is
6956 while Is_Record_Type (Scop) loop
6957 Scop := Scope (Scop);
6960 return Scope_Depth_Value (Scop);
6963 ---------------------
6964 -- Scope_Depth_Set --
6965 ---------------------
6967 function Scope_Depth_Set (Id : E) return B is
6969 return not Is_Record_Type (Id)
6970 and then Field22 (Id) /= Union_Id (Empty);
6971 end Scope_Depth_Set;
6973 -----------------------------
6974 -- Set_Component_Alignment --
6975 -----------------------------
6977 -- Component Alignment is encoded using two flags, Flag128/129 as
6978 -- follows. Note that both flags False = Align_Default, so that the
6979 -- default initialization of flags to False initializes component
6980 -- alignment to the default value as required.
6982 -- Flag128 Flag129 Value
6983 -- ------- ------- -----
6984 -- False False Calign_Default
6985 -- False True Calign_Component_Size
6986 -- True False Calign_Component_Size_4
6987 -- True True Calign_Storage_Unit
6989 procedure Set_Component_Alignment (Id : E; V : C) is
6991 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6992 and then Id = Base_Type (Id));
6995 when Calign_Default =>
6996 Set_Flag128 (Id, False);
6997 Set_Flag129 (Id, False);
6999 when Calign_Component_Size =>
7000 Set_Flag128 (Id, False);
7001 Set_Flag129 (Id, True);
7003 when Calign_Component_Size_4 =>
7004 Set_Flag128 (Id, True);
7005 Set_Flag129 (Id, False);
7007 when Calign_Storage_Unit =>
7008 Set_Flag128 (Id, True);
7009 Set_Flag129 (Id, True);
7011 end Set_Component_Alignment;
7013 -----------------------------
7014 -- Set_Invariant_Procedure --
7015 -----------------------------
7017 procedure Set_Invariant_Procedure (Id : E; V : E) is
7021 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7023 S := Subprograms_For_Type (Id);
7024 Set_Subprograms_For_Type (Id, V);
7026 while Present (S) loop
7027 if Has_Invariants (S) then
7028 raise Program_Error;
7030 S := Subprograms_For_Type (S);
7034 Set_Subprograms_For_Type (Id, V);
7035 end Set_Invariant_Procedure;
7037 ----------------------------
7038 -- Set_Predicate_Function --
7039 ----------------------------
7041 procedure Set_Predicate_Function (Id : E; V : E) is
7045 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7047 S := Subprograms_For_Type (Id);
7048 Set_Subprograms_For_Type (Id, V);
7050 while Present (S) loop
7051 if Has_Predicates (S) then
7052 raise Program_Error;
7054 S := Subprograms_For_Type (S);
7058 Set_Subprograms_For_Type (Id, V);
7059 end Set_Predicate_Function;
7065 function Size_Clause (Id : E) return N is
7067 return Rep_Clause (Id, Name_Size);
7070 ------------------------
7071 -- Stream_Size_Clause --
7072 ------------------------
7074 function Stream_Size_Clause (Id : E) return N is
7076 return Rep_Clause (Id, Name_Stream_Size);
7077 end Stream_Size_Clause;
7083 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7089 Kind := E_Access_Subtype;
7093 Kind := E_Array_Subtype;
7095 when E_Class_Wide_Type |
7096 E_Class_Wide_Subtype =>
7097 Kind := E_Class_Wide_Subtype;
7099 when E_Decimal_Fixed_Point_Type |
7100 E_Decimal_Fixed_Point_Subtype =>
7101 Kind := E_Decimal_Fixed_Point_Subtype;
7103 when E_Ordinary_Fixed_Point_Type |
7104 E_Ordinary_Fixed_Point_Subtype =>
7105 Kind := E_Ordinary_Fixed_Point_Subtype;
7107 when E_Private_Type |
7108 E_Private_Subtype =>
7109 Kind := E_Private_Subtype;
7111 when E_Limited_Private_Type |
7112 E_Limited_Private_Subtype =>
7113 Kind := E_Limited_Private_Subtype;
7115 when E_Record_Type_With_Private |
7116 E_Record_Subtype_With_Private =>
7117 Kind := E_Record_Subtype_With_Private;
7119 when E_Record_Type |
7121 Kind := E_Record_Subtype;
7123 when E_String_Type |
7125 Kind := E_String_Subtype;
7127 when Enumeration_Kind =>
7128 Kind := E_Enumeration_Subtype;
7131 Kind := E_Floating_Point_Subtype;
7133 when Signed_Integer_Kind =>
7134 Kind := E_Signed_Integer_Subtype;
7136 when Modular_Integer_Kind =>
7137 Kind := E_Modular_Integer_Subtype;
7139 when Protected_Kind =>
7140 Kind := E_Protected_Subtype;
7143 Kind := E_Task_Subtype;
7147 raise Program_Error;
7153 ---------------------
7154 -- Type_High_Bound --
7155 ---------------------
7157 function Type_High_Bound (Id : E) return Node_Id is
7158 Rng : constant Node_Id := Scalar_Range (Id);
7160 if Nkind (Rng) = N_Subtype_Indication then
7161 return High_Bound (Range_Expression (Constraint (Rng)));
7163 return High_Bound (Rng);
7165 end Type_High_Bound;
7167 --------------------
7168 -- Type_Low_Bound --
7169 --------------------
7171 function Type_Low_Bound (Id : E) return Node_Id is
7172 Rng : constant Node_Id := Scalar_Range (Id);
7174 if Nkind (Rng) = N_Subtype_Indication then
7175 return Low_Bound (Range_Expression (Constraint (Rng)));
7177 return Low_Bound (Rng);
7181 ---------------------
7182 -- Underlying_Type --
7183 ---------------------
7185 function Underlying_Type (Id : E) return E is
7187 -- For record_with_private the underlying type is always the direct
7188 -- full view. Never try to take the full view of the parent it
7189 -- doesn't make sense.
7191 if Ekind (Id) = E_Record_Type_With_Private then
7192 return Full_View (Id);
7194 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7196 -- If we have an incomplete or private type with a full view,
7197 -- then we return the Underlying_Type of this full view
7199 if Present (Full_View (Id)) then
7200 if Id = Full_View (Id) then
7202 -- Previous error in declaration
7207 return Underlying_Type (Full_View (Id));
7210 -- If we have an incomplete entity that comes from the limited
7211 -- view then we return the Underlying_Type of its non-limited
7214 elsif From_With_Type (Id)
7215 and then Present (Non_Limited_View (Id))
7217 return Underlying_Type (Non_Limited_View (Id));
7219 -- Otherwise check for the case where we have a derived type or
7220 -- subtype, and if so get the Underlying_Type of the parent type.
7222 elsif Etype (Id) /= Id then
7223 return Underlying_Type (Etype (Id));
7225 -- Otherwise we have an incomplete or private type that has
7226 -- no full view, which means that we have not encountered the
7227 -- completion, so return Empty to indicate the underlying type
7228 -- is not yet known.
7234 -- For non-incomplete, non-private types, return the type itself
7235 -- Also for entities that are not types at all return the entity
7241 end Underlying_Type;
7247 function Vax_Float (Id : E) return B is
7249 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7252 ------------------------
7253 -- Write_Entity_Flags --
7254 ------------------------
7256 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7258 procedure W (Flag_Name : String; Flag : Boolean);
7259 -- Write out given flag if it is set
7265 procedure W (Flag_Name : String; Flag : Boolean) is
7269 Write_Str (Flag_Name);
7270 Write_Str (" = True");
7275 -- Start of processing for Write_Entity_Flags
7278 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7279 and then Id = Base_Type (Id)
7282 Write_Str ("Component_Alignment = ");
7284 case Component_Alignment (Id) is
7285 when Calign_Default =>
7286 Write_Str ("Calign_Default");
7288 when Calign_Component_Size =>
7289 Write_Str ("Calign_Component_Size");
7291 when Calign_Component_Size_4 =>
7292 Write_Str ("Calign_Component_Size_4");
7294 when Calign_Storage_Unit =>
7295 Write_Str ("Calign_Storage_Unit");
7301 W ("Address_Taken", Flag104 (Id));
7302 W ("Body_Needed_For_SAL", Flag40 (Id));
7303 W ("C_Pass_By_Copy", Flag125 (Id));
7304 W ("Can_Never_Be_Null", Flag38 (Id));
7305 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7306 W ("Debug_Info_Off", Flag166 (Id));
7307 W ("Default_Expressions_Processed", Flag108 (Id));
7308 W ("Delay_Cleanups", Flag114 (Id));
7309 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7310 W ("Depends_On_Private", Flag14 (Id));
7311 W ("Discard_Names", Flag88 (Id));
7312 W ("Elaboration_Entity_Required", Flag174 (Id));
7313 W ("Elaborate_Body_Desirable", Flag210 (Id));
7314 W ("Entry_Accepted", Flag152 (Id));
7315 W ("Can_Use_Internal_Rep", Flag229 (Id));
7316 W ("Finalize_Storage_Only", Flag158 (Id));
7317 W ("From_With_Type", Flag159 (Id));
7318 W ("Has_Aliased_Components", Flag135 (Id));
7319 W ("Has_Alignment_Clause", Flag46 (Id));
7320 W ("Has_All_Calls_Remote", Flag79 (Id));
7321 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7322 W ("Has_Atomic_Components", Flag86 (Id));
7323 W ("Has_Biased_Representation", Flag139 (Id));
7324 W ("Has_Completion", Flag26 (Id));
7325 W ("Has_Completion_In_Body", Flag71 (Id));
7326 W ("Has_Complex_Representation", Flag140 (Id));
7327 W ("Has_Component_Size_Clause", Flag68 (Id));
7328 W ("Has_Contiguous_Rep", Flag181 (Id));
7329 W ("Has_Controlled_Component", Flag43 (Id));
7330 W ("Has_Controlling_Result", Flag98 (Id));
7331 W ("Has_Convention_Pragma", Flag119 (Id));
7332 W ("Has_Delayed_Aspects", Flag200 (Id));
7333 W ("Has_Delayed_Freeze", Flag18 (Id));
7334 W ("Has_Discriminants", Flag5 (Id));
7335 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7336 W ("Has_Exit", Flag47 (Id));
7337 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7338 W ("Has_Forward_Instantiation", Flag175 (Id));
7339 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7340 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7341 W ("Has_Homonym", Flag56 (Id));
7342 W ("Has_Inheritable_Invariants", Flag248 (Id));
7343 W ("Has_Initial_Value", Flag219 (Id));
7344 W ("Has_Invariants", Flag232 (Id));
7345 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7346 W ("Has_Master_Entity", Flag21 (Id));
7347 W ("Has_Missing_Return", Flag142 (Id));
7348 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7349 W ("Has_Non_Standard_Rep", Flag75 (Id));
7350 W ("Has_Object_Size_Clause", Flag172 (Id));
7351 W ("Has_Per_Object_Constraint", Flag154 (Id));
7352 W ("Has_Persistent_BSS", Flag188 (Id));
7353 W ("Has_Postconditions", Flag240 (Id));
7354 W ("Has_Pragma_Controlled", Flag27 (Id));
7355 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7356 W ("Has_Pragma_Inline", Flag157 (Id));
7357 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7358 W ("Has_Pragma_Ordered", Flag198 (Id));
7359 W ("Has_Pragma_Pack", Flag121 (Id));
7360 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7361 W ("Has_Pragma_Pure", Flag203 (Id));
7362 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7363 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7364 W ("Has_Pragma_Unmodified", Flag233 (Id));
7365 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7366 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7367 W ("Has_Predicates", Flag250 (Id));
7368 W ("Has_Primitive_Operations", Flag120 (Id));
7369 W ("Has_Private_Declaration", Flag155 (Id));
7370 W ("Has_Qualified_Name", Flag161 (Id));
7371 W ("Has_RACW", Flag214 (Id));
7372 W ("Has_Record_Rep_Clause", Flag65 (Id));
7373 W ("Has_Recursive_Call", Flag143 (Id));
7374 W ("Has_Size_Clause", Flag29 (Id));
7375 W ("Has_Small_Clause", Flag67 (Id));
7376 W ("Has_Specified_Layout", Flag100 (Id));
7377 W ("Has_Specified_Stream_Input", Flag190 (Id));
7378 W ("Has_Specified_Stream_Output", Flag191 (Id));
7379 W ("Has_Specified_Stream_Read", Flag192 (Id));
7380 W ("Has_Specified_Stream_Write", Flag193 (Id));
7381 W ("Has_Static_Discriminants", Flag211 (Id));
7382 W ("Has_Storage_Size_Clause", Flag23 (Id));
7383 W ("Has_Stream_Size_Clause", Flag184 (Id));
7384 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7385 W ("Has_Task", Flag30 (Id));
7386 W ("Has_Thunks", Flag228 (Id));
7387 W ("Has_Unchecked_Union", Flag123 (Id));
7388 W ("Has_Unknown_Discriminants", Flag72 (Id));
7389 W ("Has_Up_Level_Access", Flag215 (Id));
7390 W ("Has_Volatile_Components", Flag87 (Id));
7391 W ("Has_Xref_Entry", Flag182 (Id));
7392 W ("In_Package_Body", Flag48 (Id));
7393 W ("In_Private_Part", Flag45 (Id));
7394 W ("In_Use", Flag8 (Id));
7395 W ("Is_AST_Entry", Flag132 (Id));
7396 W ("Is_Abstract_Subprogram", Flag19 (Id));
7397 W ("Is_Abstract_Type", Flag146 (Id));
7398 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7399 W ("Is_Access_Constant", Flag69 (Id));
7400 W ("Is_Ada_2005_Only", Flag185 (Id));
7401 W ("Is_Ada_2012_Only", Flag199 (Id));
7402 W ("Is_Aliased", Flag15 (Id));
7403 W ("Is_Asynchronous", Flag81 (Id));
7404 W ("Is_Atomic", Flag85 (Id));
7405 W ("Is_Bit_Packed_Array", Flag122 (Id));
7406 W ("Is_CPP_Class", Flag74 (Id));
7407 W ("Is_Called", Flag102 (Id));
7408 W ("Is_Character_Type", Flag63 (Id));
7409 W ("Is_Child_Unit", Flag73 (Id));
7410 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7411 W ("Is_Compilation_Unit", Flag149 (Id));
7412 W ("Is_Completely_Hidden", Flag103 (Id));
7413 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7414 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7415 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7416 W ("Is_Constrained", Flag12 (Id));
7417 W ("Is_Constructor", Flag76 (Id));
7418 W ("Is_Controlled", Flag42 (Id));
7419 W ("Is_Controlling_Formal", Flag97 (Id));
7420 W ("Is_Descendent_Of_Address", Flag223 (Id));
7421 W ("Is_Discrim_SO_Function", Flag176 (Id));
7422 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7423 W ("Is_Dispatching_Operation", Flag6 (Id));
7424 W ("Is_Eliminated", Flag124 (Id));
7425 W ("Is_Entry_Formal", Flag52 (Id));
7426 W ("Is_Exported", Flag99 (Id));
7427 W ("Is_First_Subtype", Flag70 (Id));
7428 W ("Is_For_Access_Subtype", Flag118 (Id));
7429 W ("Is_Formal_Subprogram", Flag111 (Id));
7430 W ("Is_Frozen", Flag4 (Id));
7431 W ("Is_Generic_Actual_Type", Flag94 (Id));
7432 W ("Is_Generic_Instance", Flag130 (Id));
7433 W ("Is_Generic_Type", Flag13 (Id));
7434 W ("Is_Hidden", Flag57 (Id));
7435 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7436 W ("Is_Immediately_Visible", Flag7 (Id));
7437 W ("Is_Imported", Flag24 (Id));
7438 W ("Is_Inlined", Flag11 (Id));
7439 W ("Is_Instantiated", Flag126 (Id));
7440 W ("Is_Interface", Flag186 (Id));
7441 W ("Is_Internal", Flag17 (Id));
7442 W ("Is_Interrupt_Handler", Flag89 (Id));
7443 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7444 W ("Is_Itype", Flag91 (Id));
7445 W ("Is_Known_Non_Null", Flag37 (Id));
7446 W ("Is_Known_Null", Flag204 (Id));
7447 W ("Is_Known_Valid", Flag170 (Id));
7448 W ("Is_Limited_Composite", Flag106 (Id));
7449 W ("Is_Limited_Interface", Flag197 (Id));
7450 W ("Is_Limited_Record", Flag25 (Id));
7451 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7452 W ("Is_Non_Static_Subtype", Flag109 (Id));
7453 W ("Is_Null_Init_Proc", Flag178 (Id));
7454 W ("Is_Obsolescent", Flag153 (Id));
7455 W ("Is_Only_Out_Parameter", Flag226 (Id));
7456 W ("Is_Optional_Parameter", Flag134 (Id));
7457 W ("Is_Overriding_Operation", Flag39 (Id));
7458 W ("Is_Package_Body_Entity", Flag160 (Id));
7459 W ("Is_Packed", Flag51 (Id));
7460 W ("Is_Packed_Array_Type", Flag138 (Id));
7461 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7462 W ("Is_Preelaborated", Flag59 (Id));
7463 W ("Is_Primitive", Flag218 (Id));
7464 W ("Is_Primitive_Wrapper", Flag195 (Id));
7465 W ("Is_Private_Composite", Flag107 (Id));
7466 W ("Is_Private_Descendant", Flag53 (Id));
7467 W ("Is_Private_Primitive", Flag245 (Id));
7468 W ("Is_Public", Flag10 (Id));
7469 W ("Is_Pure", Flag44 (Id));
7470 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7471 W ("Is_RACW_Stub_Type", Flag244 (Id));
7472 W ("Is_Raised", Flag224 (Id));
7473 W ("Is_Remote_Call_Interface", Flag62 (Id));
7474 W ("Is_Remote_Types", Flag61 (Id));
7475 W ("Is_Renaming_Of_Object", Flag112 (Id));
7476 W ("Is_Return_Object", Flag209 (Id));
7477 W ("Is_Shared_Passive", Flag60 (Id));
7478 W ("Is_Statically_Allocated", Flag28 (Id));
7479 W ("Is_Tag", Flag78 (Id));
7480 W ("Is_Tagged_Type", Flag55 (Id));
7481 W ("Is_Thunk", Flag225 (Id));
7482 W ("Is_Trivial_Subprogram", Flag235 (Id));
7483 W ("Is_True_Constant", Flag163 (Id));
7484 W ("Is_Unchecked_Union", Flag117 (Id));
7485 W ("Is_Underlying_Record_View", Flag246 (Id));
7486 W ("Is_Unsigned_Type", Flag144 (Id));
7487 W ("Is_VMS_Exception", Flag133 (Id));
7488 W ("Is_Valued_Procedure", Flag127 (Id));
7489 W ("Is_Visible_Child_Unit", Flag116 (Id));
7490 W ("Is_Visible_Formal", Flag206 (Id));
7491 W ("Is_Volatile", Flag16 (Id));
7492 W ("Itype_Printed", Flag202 (Id));
7493 W ("Kill_Elaboration_Checks", Flag32 (Id));
7494 W ("Kill_Range_Checks", Flag33 (Id));
7495 W ("Kill_Tag_Checks", Flag34 (Id));
7496 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7497 W ("Low_Bound_Tested", Flag205 (Id));
7498 W ("Machine_Radix_10", Flag84 (Id));
7499 W ("Materialize_Entity", Flag168 (Id));
7500 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7501 W ("Must_Have_Preelab_Init", Flag208 (Id));
7502 W ("Needs_Debug_Info", Flag147 (Id));
7503 W ("Needs_No_Actuals", Flag22 (Id));
7504 W ("Never_Set_In_Source", Flag115 (Id));
7505 W ("No_Pool_Assigned", Flag131 (Id));
7506 W ("No_Return", Flag113 (Id));
7507 W ("No_Strict_Aliasing", Flag136 (Id));
7508 W ("Non_Binary_Modulus", Flag58 (Id));
7509 W ("Nonzero_Is_True", Flag162 (Id));
7510 W ("OK_To_Rename", Flag247 (Id));
7511 W ("OK_To_Reorder_Components", Flag239 (Id));
7512 W ("Optimize_Alignment_Space", Flag241 (Id));
7513 W ("Optimize_Alignment_Time", Flag242 (Id));
7514 W ("Overlays_Constant", Flag243 (Id));
7515 W ("Reachable", Flag49 (Id));
7516 W ("Referenced", Flag156 (Id));
7517 W ("Referenced_As_LHS", Flag36 (Id));
7518 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7519 W ("Renamed_In_Spec", Flag231 (Id));
7520 W ("Requires_Overriding", Flag213 (Id));
7521 W ("Return_Present", Flag54 (Id));
7522 W ("Returns_By_Ref", Flag90 (Id));
7523 W ("Reverse_Bit_Order", Flag164 (Id));
7524 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7525 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7526 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7527 W ("Static_Elaboration_Desired", Flag77 (Id));
7528 W ("Strict_Alignment", Flag145 (Id));
7529 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7530 W ("Suppress_Init_Proc", Flag105 (Id));
7531 W ("Suppress_Style_Checks", Flag165 (Id));
7532 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7533 W ("Treat_As_Volatile", Flag41 (Id));
7534 W ("Universal_Aliasing", Flag216 (Id));
7535 W ("Used_As_Generic_Actual", Flag222 (Id));
7536 W ("Uses_Sec_Stack", Flag95 (Id));
7537 W ("Warnings_Off", Flag96 (Id));
7538 W ("Warnings_Off_Used", Flag236 (Id));
7539 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7540 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7541 W ("Was_Hidden", Flag196 (Id));
7542 end Write_Entity_Flags;
7544 -----------------------
7545 -- Write_Entity_Info --
7546 -----------------------
7548 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7550 procedure Write_Attribute (Which : String; Nam : E);
7551 -- Write attribute value with given string name
7553 procedure Write_Kind (Id : Entity_Id);
7554 -- Write Ekind field of entity
7556 ---------------------
7557 -- Write_Attribute --
7558 ---------------------
7560 procedure Write_Attribute (Which : String; Nam : E) is
7564 Write_Int (Int (Nam));
7566 Write_Name (Chars (Nam));
7568 end Write_Attribute;
7574 procedure Write_Kind (Id : Entity_Id) is
7575 K : constant String := Entity_Kind'Image (Ekind (Id));
7579 Write_Str (" Kind ");
7581 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7582 Write_Str ("TAGGED ");
7585 Write_Str (K (3 .. K'Length));
7588 if Is_Type (Id) and then Depends_On_Private (Id) then
7589 Write_Str ("Depends_On_Private ");
7593 -- Start of processing for Write_Entity_Info
7597 Write_Attribute ("Name ", Id);
7598 Write_Int (Int (Id));
7602 Write_Attribute (" Type ", Etype (Id));
7604 Write_Attribute (" Scope ", Scope (Id));
7609 when Discrete_Kind =>
7610 Write_Str ("Bounds: Id = ");
7612 if Present (Scalar_Range (Id)) then
7613 Write_Int (Int (Type_Low_Bound (Id)));
7614 Write_Str (" .. Id = ");
7615 Write_Int (Int (Type_High_Bound (Id)));
7617 Write_Str ("Empty");
7628 (" Component Type ", Component_Type (Id));
7631 Write_Str (" Indexes ");
7633 Index := First_Index (Id);
7634 while Present (Index) loop
7635 Write_Attribute (" ", Etype (Index));
7636 Index := Next_Index (Index);
7644 (" Directly Designated Type ",
7645 Directly_Designated_Type (Id));
7648 when Overloadable_Kind =>
7649 if Present (Homonym (Id)) then
7650 Write_Str (" Homonym ");
7651 Write_Name (Chars (Homonym (Id)));
7653 Write_Int (Int (Homonym (Id)));
7660 if Ekind (Scope (Id)) in Record_Kind then
7662 " Original_Record_Component ",
7663 Original_Record_Component (Id));
7664 Write_Int (Int (Original_Record_Component (Id)));
7668 when others => null;
7670 end Write_Entity_Info;
7672 -----------------------
7673 -- Write_Field6_Name --
7674 -----------------------
7676 procedure Write_Field6_Name (Id : Entity_Id) is
7677 pragma Warnings (Off, Id);
7679 Write_Str ("First_Rep_Item");
7680 end Write_Field6_Name;
7682 -----------------------
7683 -- Write_Field7_Name --
7684 -----------------------
7686 procedure Write_Field7_Name (Id : Entity_Id) is
7687 pragma Warnings (Off, Id);
7689 Write_Str ("Freeze_Node");
7690 end Write_Field7_Name;
7692 -----------------------
7693 -- Write_Field8_Name --
7694 -----------------------
7696 procedure Write_Field8_Name (Id : Entity_Id) is
7701 Write_Str ("Normalized_First_Bit");
7705 E_Subprogram_Body =>
7706 Write_Str ("Mechanism");
7709 Write_Str ("Associated_Node_For_Itype");
7712 Write_Str ("First_Exit_Statement");
7715 Write_Str ("Dependent_Instances");
7718 Write_Str ("Postcondition_Proc");
7720 when E_Return_Statement =>
7721 Write_Str ("Return_Applies_To");
7724 Write_Str ("Hiding_Loop_Variable");
7727 Write_Str ("Field8??");
7729 end Write_Field8_Name;
7731 -----------------------
7732 -- Write_Field9_Name --
7733 -----------------------
7735 procedure Write_Field9_Name (Id : Entity_Id) is
7739 Write_Str ("Class_Wide_Type");
7742 E_Generic_Function |
7744 E_Generic_Procedure |
7747 Write_Str ("Renaming_Map");
7750 Write_Str ("Current_Value");
7753 Write_Str ("Field9??");
7755 end Write_Field9_Name;
7757 ------------------------
7758 -- Write_Field10_Name --
7759 ------------------------
7761 procedure Write_Field10_Name (Id : Entity_Id) is
7764 when Class_Wide_Kind |
7770 Write_Str ("Direct_Primitive_Operations");
7773 Write_Str ("Float_Rep");
7775 when E_In_Parameter |
7777 Write_Str ("Discriminal_Link");
7783 Write_Str ("Handler_Records");
7787 Write_Str ("Normalized_Position_Max");
7790 Write_Str ("Field10??");
7792 end Write_Field10_Name;
7794 ------------------------
7795 -- Write_Field11_Name --
7796 ------------------------
7798 procedure Write_Field11_Name (Id : Entity_Id) is
7802 Write_Str ("Entry_Component");
7806 Write_Str ("Component_Bit_Offset");
7809 Write_Str ("Full_View");
7811 when E_Enumeration_Literal =>
7812 Write_Str ("Enumeration_Pos");
7815 Write_Str ("Block_Node");
7821 Write_Str ("Protected_Body_Subprogram");
7823 when E_Generic_Package =>
7824 Write_Str ("Generic_Homonym");
7827 Write_Str ("Full_View");
7830 Write_Str ("Field11??");
7832 end Write_Field11_Name;
7834 ------------------------
7835 -- Write_Field12_Name --
7836 ------------------------
7838 procedure Write_Field12_Name (Id : Entity_Id) is
7842 Write_Str ("Barrier_Function");
7844 when E_Enumeration_Literal =>
7845 Write_Str ("Enumeration_Rep");
7853 E_In_Out_Parameter |
7857 Write_Str ("Esize");
7861 Write_Str ("Next_Inlined_Subprogram");
7864 Write_Str ("Associated_Formal_Package");
7867 Write_Str ("Field12??");
7869 end Write_Field12_Name;
7871 ------------------------
7872 -- Write_Field13_Name --
7873 ------------------------
7875 procedure Write_Field13_Name (Id : Entity_Id) is
7879 Write_Str ("RM_Size");
7883 Write_Str ("Component_Clause");
7886 if not Comes_From_Source (Id)
7888 Chars (Id) = Name_Op_Ne
7890 Write_Str ("Corresponding_Equality");
7892 elsif Comes_From_Source (Id) then
7893 Write_Str ("Elaboration_Entity");
7896 Write_Str ("Field13??");
7901 Write_Str ("Extra_Accessibility");
7905 Generic_Unit_Kind =>
7906 Write_Str ("Elaboration_Entity");
7909 Write_Str ("Field13??");
7911 end Write_Field13_Name;
7913 -----------------------
7914 -- Write_Field14_Name --
7915 -----------------------
7917 procedure Write_Field14_Name (Id : Entity_Id) is
7926 Write_Str ("Alignment");
7930 Write_Str ("Normalized_Position");
7934 Write_Str ("First_Optional_Parameter");
7937 E_Generic_Package =>
7938 Write_Str ("Shadow_Entities");
7941 Write_Str ("Field14??");
7943 end Write_Field14_Name;
7945 ------------------------
7946 -- Write_Field15_Name --
7947 ------------------------
7949 procedure Write_Field15_Name (Id : Entity_Id) is
7954 Write_Str ("Storage_Size_Variable");
7957 Write_Str ("DT_Entry_Count");
7959 when Decimal_Fixed_Point_Kind =>
7960 Write_Str ("Scale_Value");
7962 when E_Discriminant =>
7963 Write_Str ("Discriminant_Number");
7966 Write_Str ("Extra_Formal");
7970 Write_Str ("DT_Position");
7973 Write_Str ("Entry_Parameters_Type");
7975 when Enumeration_Kind =>
7976 Write_Str ("Lit_Indexes");
7980 Write_Str ("Related_Instance");
7982 when E_Protected_Type =>
7983 Write_Str ("Entry_Bodies_Array");
7985 when E_String_Literal_Subtype =>
7986 Write_Str ("String_Literal_Low_Bound");
7989 Write_Str ("Field15??");
7991 end Write_Field15_Name;
7993 ------------------------
7994 -- Write_Field16_Name --
7995 ------------------------
7997 procedure Write_Field16_Name (Id : Entity_Id) is
8001 Write_Str ("Entry_Formal");
8005 Write_Str ("DTC_Entity");
8010 Write_Str ("First_Private_Entity");
8012 when E_Record_Type |
8013 E_Record_Type_With_Private =>
8014 Write_Str ("Access_Disp_Table");
8016 when E_String_Literal_Subtype =>
8017 Write_Str ("String_Literal_Length");
8019 when Enumeration_Kind =>
8020 Write_Str ("Lit_Strings");
8024 Write_Str ("Unset_Reference");
8026 when E_Record_Subtype |
8027 E_Class_Wide_Subtype =>
8028 Write_Str ("Cloned_Subtype");
8031 Write_Str ("Field16??");
8033 end Write_Field16_Name;
8035 ------------------------
8036 -- Write_Field17_Name --
8037 ------------------------
8039 procedure Write_Field17_Name (Id : Entity_Id) is
8043 Write_Str ("Digits_Value");
8046 Write_Str ("Prival");
8048 when E_Discriminant =>
8049 Write_Str ("Discriminal");
8058 E_Generic_Function |
8060 E_Generic_Procedure |
8068 E_Return_Statement |
8070 E_Subprogram_Type =>
8071 Write_Str ("First_Entity");
8074 Write_Str ("First_Index");
8076 when Enumeration_Kind =>
8077 Write_Str ("First_Literal");
8080 Write_Str ("Master_Id");
8082 when Modular_Integer_Kind =>
8083 Write_Str ("Modulus");
8087 E_Generic_In_Out_Parameter |
8089 Write_Str ("Actual_Subtype");
8091 when E_Incomplete_Type =>
8092 Write_Str ("Non_Limited_View");
8094 when E_Incomplete_Subtype =>
8095 if From_With_Type (Id) then
8096 Write_Str ("Non_Limited_View");
8100 Write_Str ("Field17??");
8102 end Write_Field17_Name;
8104 ------------------------
8105 -- Write_Field18_Name --
8106 ------------------------
8108 procedure Write_Field18_Name (Id : Entity_Id) is
8111 when E_Enumeration_Literal |
8115 Write_Str ("Alias");
8117 when E_Record_Type =>
8118 Write_Str ("Corresponding_Concurrent_Type");
8120 when E_Subprogram_Body =>
8121 Write_Str ("Corresponding_Protected_Entry");
8123 when E_Entry_Index_Parameter =>
8124 Write_Str ("Entry_Index_Constant");
8126 when E_Class_Wide_Subtype |
8127 E_Access_Protected_Subprogram_Type |
8128 E_Anonymous_Access_Protected_Subprogram_Type |
8129 E_Access_Subprogram_Type |
8131 Write_Str ("Equivalent_Type");
8133 when Fixed_Point_Kind =>
8134 Write_Str ("Delta_Value");
8137 Write_Str ("Renamed_Object");
8141 E_Generic_Function |
8142 E_Generic_Procedure |
8143 E_Generic_Package =>
8144 Write_Str ("Renamed_Entity");
8146 when Incomplete_Or_Private_Kind |
8148 Write_Str ("Private_Dependents");
8150 when Concurrent_Kind =>
8151 Write_Str ("Corresponding_Record_Type");
8156 Write_Str ("Enclosing_Scope");
8159 Write_Str ("Field18??");
8161 end Write_Field18_Name;
8163 -----------------------
8164 -- Write_Field19_Name --
8165 -----------------------
8167 procedure Write_Field19_Name (Id : Entity_Id) is
8172 Write_Str ("Related_Array_Object");
8178 E_Return_Statement |
8180 Write_Str ("Finalization_Chain_Entity");
8182 when E_Constant | E_Variable =>
8183 Write_Str ("Size_Check_Code");
8185 when E_Discriminant =>
8186 Write_Str ("Corresponding_Discriminant");
8189 E_Generic_Package =>
8190 Write_Str ("Body_Entity");
8192 when E_Package_Body |
8194 Write_Str ("Spec_Entity");
8196 when Private_Kind =>
8197 Write_Str ("Underlying_Full_View");
8199 when E_Record_Type =>
8200 Write_Str ("Parent_Subtype");
8203 Write_Str ("Field19??");
8205 end Write_Field19_Name;
8207 -----------------------
8208 -- Write_Field20_Name --
8209 -----------------------
8211 procedure Write_Field20_Name (Id : Entity_Id) is
8215 Write_Str ("Component_Type");
8217 when E_In_Parameter |
8218 E_Generic_In_Parameter =>
8219 Write_Str ("Default_Value");
8222 Write_Str ("Directly_Designated_Type");
8225 Write_Str ("Discriminant_Checking_Func");
8229 Write_Str ("Prival_Link");
8231 when E_Discriminant =>
8232 Write_Str ("Discriminant_Default_Value");
8241 E_Generic_Function |
8243 E_Generic_Procedure |
8251 E_Return_Statement |
8253 E_Subprogram_Type =>
8254 Write_Str ("Last_Entity");
8257 Write_Str ("Scalar_Range");
8260 Write_Str ("Register_Exception_Call");
8263 Write_Str ("Field20??");
8265 end Write_Field20_Name;
8267 -----------------------
8268 -- Write_Field21_Name --
8269 -----------------------
8271 procedure Write_Field21_Name (Id : Entity_Id) is
8277 E_Generic_Function |
8279 E_Generic_Procedure |
8281 Write_Str ("Interface_Name");
8283 when Concurrent_Kind |
8284 Incomplete_Or_Private_Kind |
8288 Write_Str ("Discriminant_Constraint");
8291 Write_Str ("Accept_Address");
8293 when Fixed_Point_Kind =>
8294 Write_Str ("Small_Value");
8296 when E_In_Parameter =>
8297 Write_Str ("Default_Expr_Function");
8300 Modular_Integer_Kind =>
8301 Write_Str ("Original_Array_Type");
8304 Write_Str ("Field21??");
8306 end Write_Field21_Name;
8308 -----------------------
8309 -- Write_Field22_Name --
8310 -----------------------
8312 procedure Write_Field22_Name (Id : Entity_Id) is
8316 Write_Str ("Associated_Storage_Pool");
8319 Write_Str ("Component_Size");
8323 Write_Str ("Original_Record_Component");
8325 when E_Enumeration_Literal =>
8326 Write_Str ("Enumeration_Rep_Expr");
8329 Write_Str ("Exception_Code");
8332 Write_Str ("Protected_Formal");
8334 when E_Record_Type =>
8335 Write_Str ("Corresponding_Remote_Type");
8345 E_Generic_Function |
8346 E_Generic_Procedure |
8349 E_Return_Statement |
8352 Write_Str ("Scope_Depth_Value");
8354 when E_Record_Type_With_Private |
8355 E_Record_Subtype_With_Private |
8358 E_Limited_Private_Type |
8359 E_Limited_Private_Subtype =>
8360 Write_Str ("Private_View");
8363 Write_Str ("Shared_Var_Procs_Instance");
8366 Write_Str ("Field22??");
8368 end Write_Field22_Name;
8370 ------------------------
8371 -- Write_Field23_Name --
8372 ------------------------
8374 procedure Write_Field23_Name (Id : Entity_Id) is
8378 Write_Str ("Associated_Final_Chain");
8381 Write_Str ("Packed_Array_Type");
8384 Write_Str ("Entry_Cancel_Parameter");
8386 when E_Discriminant =>
8387 Write_Str ("CR_Discriminant");
8389 when E_Enumeration_Type =>
8390 Write_Str ("Enum_Pos_To_Rep");
8394 Write_Str ("Extra_Constrained");
8396 when E_Generic_Function |
8398 E_Generic_Procedure =>
8399 Write_Str ("Inner_Instances");
8401 when Concurrent_Kind |
8402 Incomplete_Or_Private_Kind |
8406 Write_Str ("Stored_Constraint");
8410 if Present (Scope (Id))
8411 and then Is_Protected_Type (Scope (Id))
8413 Write_Str ("Protection_Object");
8415 Write_Str ("Generic_Renamings");
8419 if Is_Generic_Instance (Id) then
8420 Write_Str ("Generic_Renamings");
8422 Write_Str ("Limited_View");
8426 Write_Str ("Protection_Object");
8429 Write_Str ("Field23??");
8431 end Write_Field23_Name;
8433 ------------------------
8434 -- Write_Field24_Name --
8435 ------------------------
8437 procedure Write_Field24_Name (Id : Entity_Id) is
8440 when Subprogram_Kind =>
8441 Write_Str ("Spec_PPC_List");
8443 when E_Variable | E_Constant | Type_Kind =>
8444 Write_Str ("Related_Expression");
8447 Write_Str ("Field24???");
8449 end Write_Field24_Name;
8451 ------------------------
8452 -- Write_Field25_Name --
8453 ------------------------
8455 procedure Write_Field25_Name (Id : Entity_Id) is
8459 Write_Str ("DT_Offset_To_Top_Func");
8463 Write_Str ("Interface_Alias");
8465 when E_Record_Type |
8467 E_Record_Type_With_Private |
8468 E_Record_Subtype_With_Private =>
8469 Write_Str ("Interfaces");
8472 Write_Str ("Task_Body_Procedure");
8475 Write_Str ("Debug_Renaming_Link");
8479 Write_Str ("PPC_Wrapper");
8481 when E_Enumeration_Subtype |
8482 E_Modular_Integer_Subtype |
8483 E_Signed_Integer_Subtype =>
8484 Write_Str ("Static_Predicate");
8487 Write_Str ("Field25??");
8489 end Write_Field25_Name;
8491 ------------------------
8492 -- Write_Field26_Name --
8493 ------------------------
8495 procedure Write_Field26_Name (Id : Entity_Id) is
8498 when E_Generic_Package |
8500 Write_Str ("Package_Instantiation");
8504 if Is_Dispatching_Operation (Id) then
8505 Write_Str ("Overridden_Operation");
8507 Write_Str ("Static_Initialization");
8510 when E_Record_Type |
8511 E_Record_Type_With_Private =>
8512 Write_Str ("Dispatch_Table_Wrappers");
8514 when E_In_Out_Parameter |
8517 Write_Str ("Last_Assignment");
8520 Write_Str ("Relative_Deadline_Variable");
8523 Write_Str ("Field26??");
8525 end Write_Field26_Name;
8527 ------------------------
8528 -- Write_Field27_Name --
8529 ------------------------
8531 procedure Write_Field27_Name (Id : Entity_Id) is
8537 Write_Str ("Related_Type");
8540 Write_Str ("Wrapped_Entity");
8542 when E_Package | Type_Kind =>
8543 Write_Str ("Current_Use_Clause");
8546 Write_Str ("Field27??");
8548 end Write_Field27_Name;
8550 ------------------------
8551 -- Write_Field28_Name --
8552 ------------------------
8554 procedure Write_Field28_Name (Id : Entity_Id) is
8557 when E_Procedure | E_Function | E_Entry =>
8558 Write_Str ("Extra_Formals");
8560 when E_Record_Type =>
8561 Write_Str ("Underlying_Record_View");
8564 Write_Str ("Field28??");
8566 end Write_Field28_Name;
8568 procedure Write_Field29_Name (Id : Entity_Id) is
8572 Write_Str ("Subprograms_For_Type");
8575 Write_Str ("Field29??");
8577 end Write_Field29_Name;
8579 -------------------------
8580 -- Iterator Procedures --
8581 -------------------------
8583 procedure Proc_Next_Component (N : in out Node_Id) is
8585 N := Next_Component (N);
8586 end Proc_Next_Component;
8588 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8590 N := Next_Entity (N);
8591 while Present (N) loop
8592 exit when Ekind_In (N, E_Component, E_Discriminant);
8593 N := Next_Entity (N);
8595 end Proc_Next_Component_Or_Discriminant;
8597 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8599 N := Next_Discriminant (N);
8600 end Proc_Next_Discriminant;
8602 procedure Proc_Next_Formal (N : in out Node_Id) is
8604 N := Next_Formal (N);
8605 end Proc_Next_Formal;
8607 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8609 N := Next_Formal_With_Extras (N);
8610 end Proc_Next_Formal_With_Extras;
8612 procedure Proc_Next_Index (N : in out Node_Id) is
8614 N := Next_Index (N);
8615 end Proc_Next_Index;
8617 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8619 N := Next_Inlined_Subprogram (N);
8620 end Proc_Next_Inlined_Subprogram;
8622 procedure Proc_Next_Literal (N : in out Node_Id) is
8624 N := Next_Literal (N);
8625 end Proc_Next_Literal;
8627 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8629 N := Next_Stored_Discriminant (N);
8630 end Proc_Next_Stored_Discriminant;