1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2009, 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 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Elaboration_Entity Node13
109 -- Extra_Accessibility Node13
113 -- First_Optional_Parameter Node14
114 -- Normalized_Position Uint14
115 -- Shadow_Entities List14
117 -- Discriminant_Number Uint15
118 -- DT_Position Uint15
119 -- DT_Entry_Count Uint15
120 -- Entry_Bodies_Array Node15
121 -- Entry_Parameters_Type Node15
122 -- Extra_Formal Node15
123 -- Lit_Indexes Node15
124 -- Primitive_Operations Elist15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
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_Record_Type Node18
153 -- Delta_Value Ureal18
154 -- Enclosing_Scope Node18
155 -- Equivalent_Type Node18
156 -- Private_Dependents Elist18
157 -- Renamed_Entity Node18
158 -- Renamed_Object Node18
160 -- Body_Entity Node19
161 -- Corresponding_Discriminant Node19
162 -- Finalization_Chain_Entity Node19
163 -- Parent_Subtype Node19
164 -- Related_Array_Object Node19
165 -- Size_Check_Code Node19
166 -- Spec_Entity Node19
167 -- Underlying_Full_View Node19
169 -- Component_Type Node20
170 -- Default_Value Node20
171 -- Directly_Designated_Type Node20
172 -- Discriminant_Checking_Func Node20
173 -- Discriminant_Default_Value Node20
174 -- Last_Entity Node20
175 -- Prival_Link Node20
176 -- Register_Exception_Call Node20
177 -- Scalar_Range Node20
179 -- Accept_Address Elist21
180 -- Default_Expr_Function Node21
181 -- Discriminant_Constraint Elist21
182 -- Interface_Name Node21
183 -- Original_Array_Type Node21
184 -- Small_Value Ureal21
186 -- Associated_Storage_Pool Node22
187 -- Component_Size Uint22
188 -- Corresponding_Remote_Type Node22
189 -- Enumeration_Rep_Expr Node22
190 -- Exception_Code Uint22
191 -- Original_Record_Component Node22
192 -- Private_View Node22
193 -- Protected_Formal Node22
194 -- Scope_Depth_Value Uint22
195 -- Shared_Var_Procs_Instance Node22
197 -- Associated_Final_Chain Node23
198 -- CR_Discriminant Node23
199 -- Entry_Cancel_Parameter Node23
200 -- Enum_Pos_To_Rep Node23
201 -- Extra_Constrained Node23
202 -- Generic_Renamings Elist23
203 -- Inner_Instances Elist23
204 -- Limited_View Node23
205 -- Packed_Array_Type Node23
206 -- Protection_Object Node23
207 -- Stored_Constraint Elist23
209 -- Related_Expression Node24
210 -- Spec_PPC_List Node24
211 -- Underlying_Record_View Node24
213 -- Interface_Alias Node25
214 -- Interfaces Elist25
215 -- Debug_Renaming_Link Node25
216 -- DT_Offset_To_Top_Func Node25
217 -- Task_Body_Procedure Node25
219 -- Dispatch_Table_Wrappers Elist26
220 -- Last_Assignment Node26
221 -- Overridden_Operation Node26
222 -- Package_Instantiation Node26
223 -- Related_Type Node26
224 -- Relative_Deadline_Variable Node26
225 -- Static_Initialization Node26
227 -- Current_Use_Clause Node27
228 -- Wrapped_Entity Node27
230 -- Extra_Formals Node28
232 ---------------------------------------------
233 -- Usage of Flags in Defining Entity Nodes --
234 ---------------------------------------------
236 -- All flags are unique, there is no overlaying, so each flag is physically
237 -- present in every entity. However, for many of the flags, it only makes
238 -- sense for them to be set true for certain subsets of entity kinds. See
239 -- the spec of Einfo for further details.
241 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
242 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
243 -- which are common to all nodes, including entity nodes.
246 -- Has_Discriminants Flag5
247 -- Is_Dispatching_Operation Flag6
248 -- Is_Immediately_Visible Flag7
250 -- Is_Potentially_Use_Visible Flag9
254 -- Is_Constrained Flag12
255 -- Is_Generic_Type Flag13
256 -- Depends_On_Private Flag14
258 -- Is_Volatile Flag16
259 -- Is_Internal Flag17
260 -- Has_Delayed_Freeze Flag18
261 -- Is_Abstract_Subprogram Flag19
262 -- Is_Concurrent_Record_Type Flag20
264 -- Has_Master_Entity Flag21
265 -- Needs_No_Actuals Flag22
266 -- Has_Storage_Size_Clause Flag23
267 -- Is_Imported Flag24
268 -- Is_Limited_Record Flag25
269 -- Has_Completion Flag26
270 -- Has_Pragma_Controlled Flag27
271 -- Is_Statically_Allocated Flag28
272 -- Has_Size_Clause Flag29
275 -- Checks_May_Be_Suppressed Flag31
276 -- Kill_Elaboration_Checks Flag32
277 -- Kill_Range_Checks Flag33
278 -- Kill_Tag_Checks Flag34
279 -- Is_Class_Wide_Equivalent_Type Flag35
280 -- Referenced_As_LHS Flag36
281 -- Is_Known_Non_Null Flag37
282 -- Can_Never_Be_Null Flag38
283 -- Is_Overriding_Operation Flag39
284 -- Body_Needed_For_SAL Flag40
286 -- Treat_As_Volatile Flag41
287 -- Is_Controlled Flag42
288 -- Has_Controlled_Component Flag43
290 -- In_Private_Part Flag45
291 -- Has_Alignment_Clause Flag46
293 -- In_Package_Body Flag48
295 -- Delay_Subprogram_Descriptors Flag50
298 -- Is_Entry_Formal Flag52
299 -- Is_Private_Descendant Flag53
300 -- Return_Present Flag54
301 -- Is_Tagged_Type Flag55
302 -- Has_Homonym Flag56
304 -- Non_Binary_Modulus Flag58
305 -- Is_Preelaborated Flag59
306 -- Is_Shared_Passive Flag60
308 -- Is_Remote_Types Flag61
309 -- Is_Remote_Call_Interface Flag62
310 -- Is_Character_Type Flag63
311 -- Is_Intrinsic_Subprogram Flag64
312 -- Has_Record_Rep_Clause Flag65
313 -- Has_Enumeration_Rep_Clause Flag66
314 -- Has_Small_Clause Flag67
315 -- Has_Component_Size_Clause Flag68
316 -- Is_Access_Constant Flag69
317 -- Is_First_Subtype Flag70
319 -- Has_Completion_In_Body Flag71
320 -- Has_Unknown_Discriminants Flag72
321 -- Is_Child_Unit Flag73
322 -- Is_CPP_Class Flag74
323 -- Has_Non_Standard_Rep Flag75
324 -- Is_Constructor Flag76
325 -- Static_Elaboration_Desired Flag77
327 -- Has_All_Calls_Remote Flag79
328 -- Is_Constr_Subt_For_U_Nominal Flag80
330 -- Is_Asynchronous Flag81
331 -- Has_Gigi_Rep_Item Flag82
332 -- Has_Machine_Radix_Clause Flag83
333 -- Machine_Radix_10 Flag84
335 -- Has_Atomic_Components Flag86
336 -- Has_Volatile_Components Flag87
337 -- Discard_Names Flag88
338 -- Is_Interrupt_Handler Flag89
339 -- Returns_By_Ref Flag90
342 -- Size_Known_At_Compile_Time Flag92
343 -- Has_Subprogram_Descriptor Flag93
344 -- Is_Generic_Actual_Type Flag94
345 -- Uses_Sec_Stack Flag95
346 -- Warnings_Off Flag96
347 -- Is_Controlling_Formal Flag97
348 -- Has_Controlling_Result Flag98
349 -- Is_Exported Flag99
350 -- Has_Specified_Layout Flag100
352 -- Has_Nested_Block_With_Handler Flag101
354 -- Is_Completely_Hidden Flag103
355 -- Address_Taken Flag104
356 -- Suppress_Init_Proc Flag105
357 -- Is_Limited_Composite Flag106
358 -- Is_Private_Composite Flag107
359 -- Default_Expressions_Processed Flag108
360 -- Is_Non_Static_Subtype Flag109
361 -- Has_External_Tag_Rep_Clause Flag110
363 -- Is_Formal_Subprogram Flag111
364 -- Is_Renaming_Of_Object Flag112
366 -- Delay_Cleanups Flag114
367 -- Never_Set_In_Source Flag115
368 -- Is_Visible_Child_Unit Flag116
369 -- Is_Unchecked_Union Flag117
370 -- Is_For_Access_Subtype Flag118
371 -- Has_Convention_Pragma Flag119
372 -- Has_Primitive_Operations Flag120
374 -- Has_Pragma_Pack Flag121
375 -- Is_Bit_Packed_Array Flag122
376 -- Has_Unchecked_Union Flag123
377 -- Is_Eliminated Flag124
378 -- C_Pass_By_Copy Flag125
379 -- Is_Instantiated Flag126
380 -- Is_Valued_Procedure Flag127
381 -- (used for Component_Alignment) Flag128
382 -- (used for Component_Alignment) Flag129
383 -- Is_Generic_Instance Flag130
385 -- No_Pool_Assigned Flag131
386 -- Is_AST_Entry Flag132
387 -- Is_VMS_Exception Flag133
388 -- Is_Optional_Parameter Flag134
389 -- Has_Aliased_Components Flag135
390 -- No_Strict_Aliasing Flag136
391 -- Is_Machine_Code_Subprogram Flag137
392 -- Is_Packed_Array_Type Flag138
393 -- Has_Biased_Representation Flag139
394 -- Has_Complex_Representation Flag140
396 -- Is_Constr_Subt_For_UN_Aliased Flag141
397 -- Has_Missing_Return Flag142
398 -- Has_Recursive_Call Flag143
399 -- Is_Unsigned_Type Flag144
400 -- Strict_Alignment Flag145
401 -- Is_Abstract_Type Flag146
402 -- Needs_Debug_Info Flag147
403 -- Suppress_Elaboration_Warnings Flag148
404 -- Is_Compilation_Unit Flag149
405 -- Has_Pragma_Elaborate_Body Flag150
408 -- Entry_Accepted Flag152
409 -- Is_Obsolescent Flag153
410 -- Has_Per_Object_Constraint Flag154
411 -- Has_Private_Declaration Flag155
412 -- Referenced Flag156
413 -- Has_Pragma_Inline Flag157
414 -- Finalize_Storage_Only Flag158
415 -- From_With_Type Flag159
416 -- Is_Package_Body_Entity Flag160
418 -- Has_Qualified_Name Flag161
419 -- Nonzero_Is_True Flag162
420 -- Is_True_Constant Flag163
421 -- Reverse_Bit_Order Flag164
422 -- Suppress_Style_Checks Flag165
423 -- Debug_Info_Off Flag166
424 -- Sec_Stack_Needed_For_Return Flag167
425 -- Materialize_Entity Flag168
426 -- Has_Pragma_Thread_Local_Storage Flag169
427 -- Is_Known_Valid Flag170
429 -- Is_Hidden_Open_Scope Flag171
430 -- Has_Object_Size_Clause Flag172
431 -- Has_Fully_Qualified_Name Flag173
432 -- Elaboration_Entity_Required Flag174
433 -- Has_Forward_Instantiation Flag175
434 -- Is_Discrim_SO_Function Flag176
435 -- Size_Depends_On_Discriminant Flag177
436 -- Is_Null_Init_Proc Flag178
437 -- Has_Pragma_Pure_Function Flag179
438 -- Has_Pragma_Unreferenced Flag180
440 -- Has_Contiguous_Rep Flag181
441 -- Has_Xref_Entry Flag182
442 -- Must_Be_On_Byte_Boundary Flag183
443 -- Has_Stream_Size_Clause Flag184
444 -- Is_Ada_2005_Only Flag185
445 -- Is_Interface Flag186
446 -- Has_Constrained_Partial_View Flag187
447 -- Has_Persistent_BSS Flag188
448 -- Is_Pure_Unit_Access_Type Flag189
449 -- Has_Specified_Stream_Input Flag190
451 -- Has_Specified_Stream_Output Flag191
452 -- Has_Specified_Stream_Read Flag192
453 -- Has_Specified_Stream_Write Flag193
454 -- Is_Local_Anonymous_Access Flag194
455 -- Is_Primitive_Wrapper Flag195
456 -- Was_Hidden Flag196
457 -- Is_Limited_Interface Flag197
458 -- Is_Protected_Interface Flag198
459 -- Is_Synchronized_Interface Flag199
460 -- Is_Task_Interface Flag200
462 -- Has_Anon_Block_Suffix Flag201
463 -- Itype_Printed Flag202
464 -- Has_Pragma_Pure Flag203
465 -- Is_Known_Null Flag204
466 -- Low_Bound_Tested Flag205
467 -- Is_Visible_Formal Flag206
468 -- Known_To_Have_Preelab_Init Flag207
469 -- Must_Have_Preelab_Init Flag208
470 -- Is_Return_Object Flag209
471 -- Elaborate_Body_Desirable Flag210
473 -- Has_Static_Discriminants Flag211
474 -- Has_Pragma_Unreferenced_Objects Flag212
475 -- Requires_Overriding Flag213
477 -- Has_Up_Level_Access Flag215
478 -- Universal_Aliasing Flag216
479 -- Suppress_Value_Tracking_On_Call Flag217
480 -- Is_Primitive Flag218
481 -- Has_Initial_Value Flag219
482 -- Has_Dispatch_Table Flag220
484 -- Has_Pragma_Preelab_Init Flag221
485 -- Used_As_Generic_Actual Flag222
486 -- Is_Descendent_Of_Address Flag223
489 -- Is_Only_Out_Parameter Flag226
490 -- Referenced_As_Out_Parameter Flag227
491 -- Has_Thunks Flag228
492 -- Can_Use_Internal_Rep Flag229
493 -- Has_Pragma_Inline_Always Flag230
495 -- Renamed_In_Spec Flag231
496 -- Implemented_By_Entry Flag232
497 -- Has_Pragma_Unmodified Flag233
498 -- Is_Dispatch_Table_Entity Flag234
499 -- Is_Trivial_Subprogram Flag235
500 -- Warnings_Off_Used Flag236
501 -- Warnings_Off_Used_Unmodified Flag237
502 -- Warnings_Off_Used_Unreferenced Flag238
503 -- OK_To_Reorder_Components Flag239
504 -- Has_Postconditions Flag240
506 -- Optimize_Alignment_Space Flag241
507 -- Optimize_Alignment_Time Flag242
508 -- Overlays_Constant Flag243
509 -- Is_RACW_Stub_Type Flag244
510 -- Is_Private_Primitive Flag245
511 -- Is_Underlying_Record_View Flag246
512 -- OK_To_Rename Flag247
514 -----------------------
515 -- Local subprograms --
516 -----------------------
518 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
519 -- Returns the attribute definition clause for Id whose name is Rep_Name.
520 -- Returns Empty if no matching attribute definition clause found for Id.
526 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
530 Ritem := First_Rep_Item (Id);
531 while Present (Ritem) loop
532 if Nkind (Ritem) = N_Attribute_Definition_Clause
533 and then Chars (Ritem) = Rep_Name
537 Ritem := Next_Rep_Item (Ritem);
544 --------------------------------
545 -- Attribute Access Functions --
546 --------------------------------
548 function Accept_Address (Id : E) return L is
553 function Access_Disp_Table (Id : E) return L is
555 pragma Assert (Is_Tagged_Type (Id));
556 return Elist16 (Implementation_Base_Type (Id));
557 end Access_Disp_Table;
559 function Actual_Subtype (Id : E) return E is
562 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
563 or else Is_Formal (Id));
567 function Address_Taken (Id : E) return B is
572 function Alias (Id : E) return E is
575 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
579 function Alignment (Id : E) return U is
581 pragma Assert (Is_Type (Id)
582 or else Is_Formal (Id)
583 or else Ekind_In (Id, E_Loop_Parameter,
590 function Associated_Final_Chain (Id : E) return E is
592 pragma Assert (Is_Access_Type (Id));
594 end Associated_Final_Chain;
596 function Associated_Formal_Package (Id : E) return E is
598 pragma Assert (Ekind (Id) = E_Package);
600 end Associated_Formal_Package;
602 function Associated_Node_For_Itype (Id : E) return N is
605 end Associated_Node_For_Itype;
607 function Associated_Storage_Pool (Id : E) return E is
609 pragma Assert (Is_Access_Type (Id));
610 return Node22 (Root_Type (Id));
611 end Associated_Storage_Pool;
613 function Barrier_Function (Id : E) return N is
615 pragma Assert (Is_Entry (Id));
617 end Barrier_Function;
619 function Block_Node (Id : E) return N is
621 pragma Assert (Ekind (Id) = E_Block);
625 function Body_Entity (Id : E) return E is
627 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
631 function Body_Needed_For_SAL (Id : E) return B is
634 (Ekind (Id) = E_Package
635 or else Is_Subprogram (Id)
636 or else Is_Generic_Unit (Id));
638 end Body_Needed_For_SAL;
640 function C_Pass_By_Copy (Id : E) return B is
642 pragma Assert (Is_Record_Type (Id));
643 return Flag125 (Implementation_Base_Type (Id));
646 function Can_Never_Be_Null (Id : E) return B is
649 end Can_Never_Be_Null;
651 function Checks_May_Be_Suppressed (Id : E) return B is
654 end Checks_May_Be_Suppressed;
656 function Class_Wide_Type (Id : E) return E is
658 pragma Assert (Is_Type (Id));
662 function Cloned_Subtype (Id : E) return E is
664 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
668 function Component_Bit_Offset (Id : E) return U is
670 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
672 end Component_Bit_Offset;
674 function Component_Clause (Id : E) return N is
676 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
678 end Component_Clause;
680 function Component_Size (Id : E) return U is
682 pragma Assert (Is_Array_Type (Id));
683 return Uint22 (Implementation_Base_Type (Id));
686 function Component_Type (Id : E) return E is
688 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
689 return Node20 (Implementation_Base_Type (Id));
692 function Corresponding_Concurrent_Type (Id : E) return E is
694 pragma Assert (Ekind (Id) = E_Record_Type);
696 end Corresponding_Concurrent_Type;
698 function Corresponding_Discriminant (Id : E) return E is
700 pragma Assert (Ekind (Id) = E_Discriminant);
702 end Corresponding_Discriminant;
704 function Corresponding_Equality (Id : E) return E is
707 (Ekind (Id) = E_Function
708 and then not Comes_From_Source (Id)
709 and then Chars (Id) = Name_Op_Ne);
711 end Corresponding_Equality;
713 function Corresponding_Record_Type (Id : E) return E is
715 pragma Assert (Is_Concurrent_Type (Id));
717 end Corresponding_Record_Type;
719 function Corresponding_Remote_Type (Id : E) return E is
722 end Corresponding_Remote_Type;
724 function Current_Use_Clause (Id : E) return E is
726 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
728 end Current_Use_Clause;
730 function Current_Value (Id : E) return N is
732 pragma Assert (Ekind (Id) in Object_Kind);
736 function CR_Discriminant (Id : E) return E is
741 function Debug_Info_Off (Id : E) return B is
746 function Debug_Renaming_Link (Id : E) return E is
749 end Debug_Renaming_Link;
751 function Default_Expr_Function (Id : E) return E is
753 pragma Assert (Is_Formal (Id));
755 end Default_Expr_Function;
757 function Default_Expressions_Processed (Id : E) return B is
760 end Default_Expressions_Processed;
762 function Default_Value (Id : E) return N is
764 pragma Assert (Is_Formal (Id));
768 function Delay_Cleanups (Id : E) return B is
773 function Delay_Subprogram_Descriptors (Id : E) return B is
776 end Delay_Subprogram_Descriptors;
778 function Delta_Value (Id : E) return R is
780 pragma Assert (Is_Fixed_Point_Type (Id));
784 function Dependent_Instances (Id : E) return L is
786 pragma Assert (Is_Generic_Instance (Id));
788 end Dependent_Instances;
790 function Depends_On_Private (Id : E) return B is
792 pragma Assert (Nkind (Id) in N_Entity);
794 end Depends_On_Private;
796 function Digits_Value (Id : E) return U is
799 (Is_Floating_Point_Type (Id)
800 or else Is_Decimal_Fixed_Point_Type (Id));
804 function Directly_Designated_Type (Id : E) return E is
806 pragma Assert (Is_Access_Type (Id));
808 end Directly_Designated_Type;
810 function Discard_Names (Id : E) return B is
815 function Discriminal (Id : E) return E is
817 pragma Assert (Ekind (Id) = E_Discriminant);
821 function Discriminal_Link (Id : E) return N is
824 end Discriminal_Link;
826 function Discriminant_Checking_Func (Id : E) return E is
828 pragma Assert (Ekind (Id) = E_Component);
830 end Discriminant_Checking_Func;
832 function Discriminant_Constraint (Id : E) return L is
834 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
836 end Discriminant_Constraint;
838 function Discriminant_Default_Value (Id : E) return N is
840 pragma Assert (Ekind (Id) = E_Discriminant);
842 end Discriminant_Default_Value;
844 function Discriminant_Number (Id : E) return U is
846 pragma Assert (Ekind (Id) = E_Discriminant);
848 end Discriminant_Number;
850 function Dispatch_Table_Wrappers (Id : E) return L is
852 pragma Assert (Is_Tagged_Type (Id));
853 return Elist26 (Implementation_Base_Type (Id));
854 end Dispatch_Table_Wrappers;
856 function DT_Entry_Count (Id : E) return U is
858 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
862 function DT_Offset_To_Top_Func (Id : E) return E is
864 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
866 end DT_Offset_To_Top_Func;
868 function DT_Position (Id : E) return U is
870 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
871 and then Present (DTC_Entity (Id)));
875 function DTC_Entity (Id : E) return E is
877 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
881 function Elaborate_Body_Desirable (Id : E) return B is
883 pragma Assert (Ekind (Id) = E_Package);
885 end Elaborate_Body_Desirable;
887 function Elaboration_Entity (Id : E) return E is
892 Ekind (Id) = E_Package
894 Is_Generic_Unit (Id));
896 end Elaboration_Entity;
898 function Elaboration_Entity_Required (Id : E) return B is
903 Ekind (Id) = E_Package
905 Is_Generic_Unit (Id));
907 end Elaboration_Entity_Required;
909 function Enclosing_Scope (Id : E) return E is
914 function Entry_Accepted (Id : E) return B is
916 pragma Assert (Is_Entry (Id));
920 function Entry_Bodies_Array (Id : E) return E is
923 end Entry_Bodies_Array;
925 function Entry_Cancel_Parameter (Id : E) return E is
928 end Entry_Cancel_Parameter;
930 function Entry_Component (Id : E) return E is
935 function Entry_Formal (Id : E) return E is
940 function Entry_Index_Constant (Id : E) return N is
942 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
944 end Entry_Index_Constant;
946 function Entry_Parameters_Type (Id : E) return E is
949 end Entry_Parameters_Type;
951 function Enum_Pos_To_Rep (Id : E) return E is
953 pragma Assert (Ekind (Id) = E_Enumeration_Type);
957 function Enumeration_Pos (Id : E) return Uint is
959 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
963 function Enumeration_Rep (Id : E) return U is
965 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
969 function Enumeration_Rep_Expr (Id : E) return N is
971 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
973 end Enumeration_Rep_Expr;
975 function Equivalent_Type (Id : E) return E is
978 (Ekind_In (Id, E_Class_Wide_Subtype,
979 E_Access_Protected_Subprogram_Type,
980 E_Anonymous_Access_Protected_Subprogram_Type,
981 E_Access_Subprogram_Type,
986 function Esize (Id : E) return Uint is
991 function Exception_Code (Id : E) return Uint is
993 pragma Assert (Ekind (Id) = E_Exception);
997 function Extra_Accessibility (Id : E) return E is
999 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1001 end Extra_Accessibility;
1003 function Extra_Constrained (Id : E) return E is
1005 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1007 end Extra_Constrained;
1009 function Extra_Formal (Id : E) return E is
1014 function Extra_Formals (Id : E) return E is
1017 (Is_Overloadable (Id)
1018 or else Ekind_In (Id, E_Entry_Family,
1020 E_Subprogram_Type));
1024 function Can_Use_Internal_Rep (Id : E) return B is
1026 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1027 return Flag229 (Base_Type (Id));
1028 end Can_Use_Internal_Rep;
1030 function Finalization_Chain_Entity (Id : E) return E is
1033 end Finalization_Chain_Entity;
1035 function Finalize_Storage_Only (Id : E) return B is
1037 pragma Assert (Is_Type (Id));
1038 return Flag158 (Base_Type (Id));
1039 end Finalize_Storage_Only;
1041 function First_Entity (Id : E) return E is
1046 function First_Exit_Statement (Id : E) return N is
1048 pragma Assert (Ekind (Id) = E_Loop);
1050 end First_Exit_Statement;
1052 function First_Index (Id : E) return N is
1054 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1058 function First_Literal (Id : E) return E is
1060 pragma Assert (Is_Enumeration_Type (Id));
1064 function First_Optional_Parameter (Id : E) return E is
1066 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1068 end First_Optional_Parameter;
1070 function First_Private_Entity (Id : E) return E is
1072 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1073 or else Ekind (Id) in Concurrent_Kind);
1075 end First_Private_Entity;
1077 function First_Rep_Item (Id : E) return E is
1082 function Freeze_Node (Id : E) return N is
1087 function From_With_Type (Id : E) return B is
1089 return Flag159 (Id);
1092 function Full_View (Id : E) return E is
1094 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1098 function Generic_Homonym (Id : E) return E is
1100 pragma Assert (Ekind (Id) = E_Generic_Package);
1102 end Generic_Homonym;
1104 function Generic_Renamings (Id : E) return L is
1106 return Elist23 (Id);
1107 end Generic_Renamings;
1109 function Handler_Records (Id : E) return S is
1112 end Handler_Records;
1114 function Has_Aliased_Components (Id : E) return B is
1116 return Flag135 (Implementation_Base_Type (Id));
1117 end Has_Aliased_Components;
1119 function Has_Alignment_Clause (Id : E) return B is
1122 end Has_Alignment_Clause;
1124 function Has_All_Calls_Remote (Id : E) return B is
1127 end Has_All_Calls_Remote;
1129 function Has_Anon_Block_Suffix (Id : E) return B is
1131 return Flag201 (Id);
1132 end Has_Anon_Block_Suffix;
1134 function Has_Atomic_Components (Id : E) return B is
1136 return Flag86 (Implementation_Base_Type (Id));
1137 end Has_Atomic_Components;
1139 function Has_Biased_Representation (Id : E) return B is
1141 return Flag139 (Id);
1142 end Has_Biased_Representation;
1144 function Has_Completion (Id : E) return B is
1149 function Has_Completion_In_Body (Id : E) return B is
1151 pragma Assert (Is_Type (Id));
1153 end Has_Completion_In_Body;
1155 function Has_Complex_Representation (Id : E) return B is
1157 pragma Assert (Is_Type (Id));
1158 return Flag140 (Implementation_Base_Type (Id));
1159 end Has_Complex_Representation;
1161 function Has_Component_Size_Clause (Id : E) return B is
1163 pragma Assert (Is_Array_Type (Id));
1164 return Flag68 (Implementation_Base_Type (Id));
1165 end Has_Component_Size_Clause;
1167 function Has_Constrained_Partial_View (Id : E) return B is
1169 pragma Assert (Is_Type (Id));
1170 return Flag187 (Id);
1171 end Has_Constrained_Partial_View;
1173 function Has_Controlled_Component (Id : E) return B is
1175 return Flag43 (Base_Type (Id));
1176 end Has_Controlled_Component;
1178 function Has_Contiguous_Rep (Id : E) return B is
1180 return Flag181 (Id);
1181 end Has_Contiguous_Rep;
1183 function Has_Controlling_Result (Id : E) return B is
1186 end Has_Controlling_Result;
1188 function Has_Convention_Pragma (Id : E) return B is
1190 return Flag119 (Id);
1191 end Has_Convention_Pragma;
1193 function Has_Delayed_Freeze (Id : E) return B is
1195 pragma Assert (Nkind (Id) in N_Entity);
1197 end Has_Delayed_Freeze;
1199 function Has_Discriminants (Id : E) return B is
1201 pragma Assert (Nkind (Id) in N_Entity);
1203 end Has_Discriminants;
1205 function Has_Dispatch_Table (Id : E) return B is
1207 pragma Assert (Is_Tagged_Type (Id));
1208 return Flag220 (Id);
1209 end Has_Dispatch_Table;
1211 function Has_Enumeration_Rep_Clause (Id : E) return B is
1213 pragma Assert (Is_Enumeration_Type (Id));
1215 end Has_Enumeration_Rep_Clause;
1217 function Has_Exit (Id : E) return B is
1222 function Has_External_Tag_Rep_Clause (Id : E) return B is
1224 pragma Assert (Is_Tagged_Type (Id));
1225 return Flag110 (Id);
1226 end Has_External_Tag_Rep_Clause;
1228 function Has_Forward_Instantiation (Id : E) return B is
1230 return Flag175 (Id);
1231 end Has_Forward_Instantiation;
1233 function Has_Fully_Qualified_Name (Id : E) return B is
1235 return Flag173 (Id);
1236 end Has_Fully_Qualified_Name;
1238 function Has_Gigi_Rep_Item (Id : E) return B is
1241 end Has_Gigi_Rep_Item;
1243 function Has_Homonym (Id : E) return B is
1248 function Has_Initial_Value (Id : E) return B is
1251 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1252 return Flag219 (Id);
1253 end Has_Initial_Value;
1255 function Has_Machine_Radix_Clause (Id : E) return B is
1257 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1259 end Has_Machine_Radix_Clause;
1261 function Has_Master_Entity (Id : E) return B is
1264 end Has_Master_Entity;
1266 function Has_Missing_Return (Id : E) return B is
1268 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1269 return Flag142 (Id);
1270 end Has_Missing_Return;
1272 function Has_Nested_Block_With_Handler (Id : E) return B is
1274 return Flag101 (Id);
1275 end Has_Nested_Block_With_Handler;
1277 function Has_Non_Standard_Rep (Id : E) return B is
1279 return Flag75 (Implementation_Base_Type (Id));
1280 end Has_Non_Standard_Rep;
1282 function Has_Object_Size_Clause (Id : E) return B is
1284 pragma Assert (Is_Type (Id));
1285 return Flag172 (Id);
1286 end Has_Object_Size_Clause;
1288 function Has_Per_Object_Constraint (Id : E) return B is
1290 return Flag154 (Id);
1291 end Has_Per_Object_Constraint;
1293 function Has_Persistent_BSS (Id : E) return B is
1295 return Flag188 (Id);
1296 end Has_Persistent_BSS;
1298 function Has_Postconditions (Id : E) return B is
1300 pragma Assert (Is_Subprogram (Id));
1301 return Flag240 (Id);
1302 end Has_Postconditions;
1304 function Has_Pragma_Controlled (Id : E) return B is
1306 pragma Assert (Is_Access_Type (Id));
1307 return Flag27 (Implementation_Base_Type (Id));
1308 end Has_Pragma_Controlled;
1310 function Has_Pragma_Elaborate_Body (Id : E) return B is
1312 return Flag150 (Id);
1313 end Has_Pragma_Elaborate_Body;
1315 function Has_Pragma_Inline (Id : E) return B is
1317 return Flag157 (Id);
1318 end Has_Pragma_Inline;
1320 function Has_Pragma_Inline_Always (Id : E) return B is
1322 return Flag230 (Id);
1323 end Has_Pragma_Inline_Always;
1325 function Has_Pragma_Pack (Id : E) return B is
1327 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1328 return Flag121 (Implementation_Base_Type (Id));
1329 end Has_Pragma_Pack;
1331 function Has_Pragma_Preelab_Init (Id : E) return B is
1333 return Flag221 (Id);
1334 end Has_Pragma_Preelab_Init;
1336 function Has_Pragma_Pure (Id : E) return B is
1338 return Flag203 (Id);
1339 end Has_Pragma_Pure;
1341 function Has_Pragma_Pure_Function (Id : E) return B is
1343 return Flag179 (Id);
1344 end Has_Pragma_Pure_Function;
1346 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1348 return Flag169 (Id);
1349 end Has_Pragma_Thread_Local_Storage;
1351 function Has_Pragma_Unmodified (Id : E) return B is
1353 return Flag233 (Id);
1354 end Has_Pragma_Unmodified;
1356 function Has_Pragma_Unreferenced (Id : E) return B is
1358 return Flag180 (Id);
1359 end Has_Pragma_Unreferenced;
1361 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1363 pragma Assert (Is_Type (Id));
1364 return Flag212 (Id);
1365 end Has_Pragma_Unreferenced_Objects;
1367 function Has_Primitive_Operations (Id : E) return B is
1369 pragma Assert (Is_Type (Id));
1370 return Flag120 (Base_Type (Id));
1371 end Has_Primitive_Operations;
1373 function Has_Private_Declaration (Id : E) return B is
1375 return Flag155 (Id);
1376 end Has_Private_Declaration;
1378 function Has_Qualified_Name (Id : E) return B is
1380 return Flag161 (Id);
1381 end Has_Qualified_Name;
1383 function Has_RACW (Id : E) return B is
1385 pragma Assert (Ekind (Id) = E_Package);
1386 return Flag214 (Id);
1389 function Has_Record_Rep_Clause (Id : E) return B is
1391 pragma Assert (Is_Record_Type (Id));
1392 return Flag65 (Implementation_Base_Type (Id));
1393 end Has_Record_Rep_Clause;
1395 function Has_Recursive_Call (Id : E) return B is
1397 pragma Assert (Is_Subprogram (Id));
1398 return Flag143 (Id);
1399 end Has_Recursive_Call;
1401 function Has_Size_Clause (Id : E) return B is
1404 end Has_Size_Clause;
1406 function Has_Small_Clause (Id : E) return B is
1409 end Has_Small_Clause;
1411 function Has_Specified_Layout (Id : E) return B is
1413 pragma Assert (Is_Type (Id));
1414 return Flag100 (Implementation_Base_Type (Id));
1415 end Has_Specified_Layout;
1417 function Has_Specified_Stream_Input (Id : E) return B is
1419 pragma Assert (Is_Type (Id));
1420 return Flag190 (Id);
1421 end Has_Specified_Stream_Input;
1423 function Has_Specified_Stream_Output (Id : E) return B is
1425 pragma Assert (Is_Type (Id));
1426 return Flag191 (Id);
1427 end Has_Specified_Stream_Output;
1429 function Has_Specified_Stream_Read (Id : E) return B is
1431 pragma Assert (Is_Type (Id));
1432 return Flag192 (Id);
1433 end Has_Specified_Stream_Read;
1435 function Has_Specified_Stream_Write (Id : E) return B is
1437 pragma Assert (Is_Type (Id));
1438 return Flag193 (Id);
1439 end Has_Specified_Stream_Write;
1441 function Has_Static_Discriminants (Id : E) return B is
1443 pragma Assert (Is_Type (Id));
1444 return Flag211 (Id);
1445 end Has_Static_Discriminants;
1447 function Has_Storage_Size_Clause (Id : E) return B is
1449 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1450 return Flag23 (Implementation_Base_Type (Id));
1451 end Has_Storage_Size_Clause;
1453 function Has_Stream_Size_Clause (Id : E) return B is
1455 return Flag184 (Id);
1456 end Has_Stream_Size_Clause;
1458 function Has_Subprogram_Descriptor (Id : E) return B is
1461 end Has_Subprogram_Descriptor;
1463 function Has_Task (Id : E) return B is
1465 return Flag30 (Base_Type (Id));
1468 function Has_Thunks (Id : E) return B is
1470 pragma Assert (Ekind (Id) = E_Constant);
1471 return Flag228 (Id);
1474 function Has_Unchecked_Union (Id : E) return B is
1476 return Flag123 (Base_Type (Id));
1477 end Has_Unchecked_Union;
1479 function Has_Unknown_Discriminants (Id : E) return B is
1481 pragma Assert (Is_Type (Id));
1483 end Has_Unknown_Discriminants;
1485 function Has_Up_Level_Access (Id : E) return B is
1488 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1489 return Flag215 (Id);
1490 end Has_Up_Level_Access;
1492 function Has_Volatile_Components (Id : E) return B is
1494 return Flag87 (Implementation_Base_Type (Id));
1495 end Has_Volatile_Components;
1497 function Has_Xref_Entry (Id : E) return B is
1499 return Flag182 (Implementation_Base_Type (Id));
1502 function Hiding_Loop_Variable (Id : E) return E is
1504 pragma Assert (Ekind (Id) = E_Variable);
1506 end Hiding_Loop_Variable;
1508 function Homonym (Id : E) return E is
1513 function Implemented_By_Entry (Id : E) return B is
1515 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1516 return Flag232 (Id);
1517 end Implemented_By_Entry;
1519 function Interfaces (Id : E) return L is
1521 pragma Assert (Is_Record_Type (Id));
1522 return Elist25 (Id);
1525 function Interface_Alias (Id : E) return E is
1527 pragma Assert (Is_Subprogram (Id));
1529 end Interface_Alias;
1531 function In_Package_Body (Id : E) return B is
1534 end In_Package_Body;
1536 function In_Private_Part (Id : E) return B is
1539 end In_Private_Part;
1541 function In_Use (Id : E) return B is
1543 pragma Assert (Nkind (Id) in N_Entity);
1547 function Inner_Instances (Id : E) return L is
1549 return Elist23 (Id);
1550 end Inner_Instances;
1552 function Interface_Name (Id : E) return N is
1557 function Is_Abstract_Subprogram (Id : E) return B is
1559 pragma Assert (Is_Overloadable (Id));
1561 end Is_Abstract_Subprogram;
1563 function Is_Abstract_Type (Id : E) return B is
1565 pragma Assert (Is_Type (Id));
1566 return Flag146 (Id);
1567 end Is_Abstract_Type;
1569 function Is_Local_Anonymous_Access (Id : E) return B is
1571 pragma Assert (Is_Access_Type (Id));
1572 return Flag194 (Id);
1573 end Is_Local_Anonymous_Access;
1575 function Is_Access_Constant (Id : E) return B is
1577 pragma Assert (Is_Access_Type (Id));
1579 end Is_Access_Constant;
1581 function Is_Ada_2005_Only (Id : E) return B is
1583 return Flag185 (Id);
1584 end Is_Ada_2005_Only;
1586 function Is_Aliased (Id : E) return B is
1588 pragma Assert (Nkind (Id) in N_Entity);
1592 function Is_AST_Entry (Id : E) return B is
1594 pragma Assert (Is_Entry (Id));
1595 return Flag132 (Id);
1598 function Is_Asynchronous (Id : E) return B is
1600 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1602 end Is_Asynchronous;
1604 function Is_Atomic (Id : E) return B is
1609 function Is_Bit_Packed_Array (Id : E) return B is
1611 return Flag122 (Implementation_Base_Type (Id));
1612 end Is_Bit_Packed_Array;
1614 function Is_Called (Id : E) return B is
1616 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1617 return Flag102 (Id);
1620 function Is_Character_Type (Id : E) return B is
1623 end Is_Character_Type;
1625 function Is_Child_Unit (Id : E) return B is
1630 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1633 end Is_Class_Wide_Equivalent_Type;
1635 function Is_Compilation_Unit (Id : E) return B is
1637 return Flag149 (Id);
1638 end Is_Compilation_Unit;
1640 function Is_Completely_Hidden (Id : E) return B is
1642 pragma Assert (Ekind (Id) = E_Discriminant);
1643 return Flag103 (Id);
1644 end Is_Completely_Hidden;
1646 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1649 end Is_Constr_Subt_For_U_Nominal;
1651 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1653 return Flag141 (Id);
1654 end Is_Constr_Subt_For_UN_Aliased;
1656 function Is_Constrained (Id : E) return B is
1658 pragma Assert (Nkind (Id) in N_Entity);
1662 function Is_Constructor (Id : E) return B is
1667 function Is_Controlled (Id : E) return B is
1669 return Flag42 (Base_Type (Id));
1672 function Is_Controlling_Formal (Id : E) return B is
1674 pragma Assert (Is_Formal (Id));
1676 end Is_Controlling_Formal;
1678 function Is_CPP_Class (Id : E) return B is
1683 function Is_Descendent_Of_Address (Id : E) return B is
1685 pragma Assert (Is_Type (Id));
1686 return Flag223 (Id);
1687 end Is_Descendent_Of_Address;
1689 function Is_Discrim_SO_Function (Id : E) return B is
1691 return Flag176 (Id);
1692 end Is_Discrim_SO_Function;
1694 function Is_Dispatch_Table_Entity (Id : E) return B is
1696 return Flag234 (Id);
1697 end Is_Dispatch_Table_Entity;
1699 function Is_Dispatching_Operation (Id : E) return B is
1701 pragma Assert (Nkind (Id) in N_Entity);
1703 end Is_Dispatching_Operation;
1705 function Is_Eliminated (Id : E) return B is
1707 return Flag124 (Id);
1710 function Is_Entry_Formal (Id : E) return B is
1713 end Is_Entry_Formal;
1715 function Is_Exported (Id : E) return B is
1720 function Is_First_Subtype (Id : E) return B is
1723 end Is_First_Subtype;
1725 function Is_For_Access_Subtype (Id : E) return B is
1727 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1728 return Flag118 (Id);
1729 end Is_For_Access_Subtype;
1731 function Is_Formal_Subprogram (Id : E) return B is
1733 return Flag111 (Id);
1734 end Is_Formal_Subprogram;
1736 function Is_Frozen (Id : E) return B is
1741 function Is_Generic_Actual_Type (Id : E) return B is
1743 pragma Assert (Is_Type (Id));
1745 end Is_Generic_Actual_Type;
1747 function Is_Generic_Instance (Id : E) return B is
1749 return Flag130 (Id);
1750 end Is_Generic_Instance;
1752 function Is_Generic_Type (Id : E) return B is
1754 pragma Assert (Nkind (Id) in N_Entity);
1756 end Is_Generic_Type;
1758 function Is_Hidden (Id : E) return B is
1763 function Is_Hidden_Open_Scope (Id : E) return B is
1765 return Flag171 (Id);
1766 end Is_Hidden_Open_Scope;
1768 function Is_Immediately_Visible (Id : E) return B is
1770 pragma Assert (Nkind (Id) in N_Entity);
1772 end Is_Immediately_Visible;
1774 function Is_Imported (Id : E) return B is
1779 function Is_Inlined (Id : E) return B is
1784 function Is_Interface (Id : E) return B is
1786 return Flag186 (Id);
1789 function Is_Instantiated (Id : E) return B is
1791 return Flag126 (Id);
1792 end Is_Instantiated;
1794 function Is_Internal (Id : E) return B is
1796 pragma Assert (Nkind (Id) in N_Entity);
1800 function Is_Interrupt_Handler (Id : E) return B is
1802 pragma Assert (Nkind (Id) in N_Entity);
1804 end Is_Interrupt_Handler;
1806 function Is_Intrinsic_Subprogram (Id : E) return B is
1809 end Is_Intrinsic_Subprogram;
1811 function Is_Itype (Id : E) return B is
1816 function Is_Known_Non_Null (Id : E) return B is
1819 end Is_Known_Non_Null;
1821 function Is_Known_Null (Id : E) return B is
1823 return Flag204 (Id);
1826 function Is_Known_Valid (Id : E) return B is
1828 return Flag170 (Id);
1831 function Is_Limited_Composite (Id : E) return B is
1833 return Flag106 (Id);
1834 end Is_Limited_Composite;
1836 function Is_Limited_Interface (Id : E) return B is
1838 return Flag197 (Id);
1839 end Is_Limited_Interface;
1841 function Is_Limited_Record (Id : E) return B is
1844 end Is_Limited_Record;
1846 function Is_Machine_Code_Subprogram (Id : E) return B is
1848 pragma Assert (Is_Subprogram (Id));
1849 return Flag137 (Id);
1850 end Is_Machine_Code_Subprogram;
1852 function Is_Non_Static_Subtype (Id : E) return B is
1854 pragma Assert (Is_Type (Id));
1855 return Flag109 (Id);
1856 end Is_Non_Static_Subtype;
1858 function Is_Null_Init_Proc (Id : E) return B is
1860 pragma Assert (Ekind (Id) = E_Procedure);
1861 return Flag178 (Id);
1862 end Is_Null_Init_Proc;
1864 function Is_Obsolescent (Id : E) return B is
1866 return Flag153 (Id);
1869 function Is_Only_Out_Parameter (Id : E) return B is
1871 pragma Assert (Is_Formal (Id));
1872 return Flag226 (Id);
1873 end Is_Only_Out_Parameter;
1875 function Is_Optional_Parameter (Id : E) return B is
1877 pragma Assert (Is_Formal (Id));
1878 return Flag134 (Id);
1879 end Is_Optional_Parameter;
1881 function Is_Overriding_Operation (Id : E) return B is
1883 pragma Assert (Is_Subprogram (Id));
1885 end Is_Overriding_Operation;
1887 function Is_Package_Body_Entity (Id : E) return B is
1889 return Flag160 (Id);
1890 end Is_Package_Body_Entity;
1892 function Is_Packed (Id : E) return B is
1894 return Flag51 (Implementation_Base_Type (Id));
1897 function Is_Packed_Array_Type (Id : E) return B is
1899 return Flag138 (Id);
1900 end Is_Packed_Array_Type;
1902 function Is_Potentially_Use_Visible (Id : E) return B is
1904 pragma Assert (Nkind (Id) in N_Entity);
1906 end Is_Potentially_Use_Visible;
1908 function Is_Preelaborated (Id : E) return B is
1911 end Is_Preelaborated;
1913 function Is_Primitive (Id : E) return B is
1916 (Is_Overloadable (Id)
1917 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1918 return Flag218 (Id);
1921 function Is_Primitive_Wrapper (Id : E) return B is
1923 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1924 return Flag195 (Id);
1925 end Is_Primitive_Wrapper;
1927 function Is_Private_Composite (Id : E) return B is
1929 pragma Assert (Is_Type (Id));
1930 return Flag107 (Id);
1931 end Is_Private_Composite;
1933 function Is_Private_Descendant (Id : E) return B is
1936 end Is_Private_Descendant;
1938 function Is_Private_Primitive (Id : E) return B is
1940 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1941 return Flag245 (Id);
1942 end Is_Private_Primitive;
1944 function Is_Protected_Interface (Id : E) return B is
1946 pragma Assert (Is_Interface (Id));
1947 return Flag198 (Id);
1948 end Is_Protected_Interface;
1950 function Is_Public (Id : E) return B is
1952 pragma Assert (Nkind (Id) in N_Entity);
1956 function Is_Pure (Id : E) return B is
1961 function Is_Pure_Unit_Access_Type (Id : E) return B is
1963 pragma Assert (Is_Access_Type (Id));
1964 return Flag189 (Id);
1965 end Is_Pure_Unit_Access_Type;
1967 function Is_RACW_Stub_Type (Id : E) return B is
1969 pragma Assert (Is_Type (Id));
1970 return Flag244 (Id);
1971 end Is_RACW_Stub_Type;
1973 function Is_Raised (Id : E) return B is
1975 pragma Assert (Ekind (Id) = E_Exception);
1976 return Flag224 (Id);
1979 function Is_Remote_Call_Interface (Id : E) return B is
1982 end Is_Remote_Call_Interface;
1984 function Is_Remote_Types (Id : E) return B is
1987 end Is_Remote_Types;
1989 function Is_Renaming_Of_Object (Id : E) return B is
1991 return Flag112 (Id);
1992 end Is_Renaming_Of_Object;
1994 function Is_Return_Object (Id : E) return B is
1996 return Flag209 (Id);
1997 end Is_Return_Object;
1999 function Is_Shared_Passive (Id : E) return B is
2002 end Is_Shared_Passive;
2004 function Is_Statically_Allocated (Id : E) return B is
2007 end Is_Statically_Allocated;
2009 function Is_Synchronized_Interface (Id : E) return B is
2011 pragma Assert (Is_Interface (Id));
2012 return Flag199 (Id);
2013 end Is_Synchronized_Interface;
2015 function Is_Tag (Id : E) return B is
2017 pragma Assert (Nkind (Id) in N_Entity);
2021 function Is_Tagged_Type (Id : E) return B is
2026 function Is_Task_Interface (Id : E) return B is
2028 pragma Assert (Is_Interface (Id));
2029 return Flag200 (Id);
2030 end Is_Task_Interface;
2032 function Is_Thunk (Id : E) return B is
2034 pragma Assert (Is_Subprogram (Id));
2035 return Flag225 (Id);
2038 function Is_Trivial_Subprogram (Id : E) return B is
2040 return Flag235 (Id);
2041 end Is_Trivial_Subprogram;
2043 function Is_True_Constant (Id : E) return B is
2045 return Flag163 (Id);
2046 end Is_True_Constant;
2048 function Is_Unchecked_Union (Id : E) return B is
2050 return Flag117 (Implementation_Base_Type (Id));
2051 end Is_Unchecked_Union;
2053 function Is_Underlying_Record_View (Id : E) return B is
2055 return Flag246 (Id);
2056 end Is_Underlying_Record_View;
2058 function Is_Unsigned_Type (Id : E) return B is
2060 pragma Assert (Is_Type (Id));
2061 return Flag144 (Id);
2062 end Is_Unsigned_Type;
2064 function Is_Valued_Procedure (Id : E) return B is
2066 pragma Assert (Ekind (Id) = E_Procedure);
2067 return Flag127 (Id);
2068 end Is_Valued_Procedure;
2070 function Is_Visible_Child_Unit (Id : E) return B is
2072 pragma Assert (Is_Child_Unit (Id));
2073 return Flag116 (Id);
2074 end Is_Visible_Child_Unit;
2076 function Is_Visible_Formal (Id : E) return B is
2078 return Flag206 (Id);
2079 end Is_Visible_Formal;
2081 function Is_VMS_Exception (Id : E) return B is
2083 return Flag133 (Id);
2084 end Is_VMS_Exception;
2086 function Is_Volatile (Id : E) return B is
2088 pragma Assert (Nkind (Id) in N_Entity);
2090 if Is_Type (Id) then
2091 return Flag16 (Base_Type (Id));
2097 function Itype_Printed (Id : E) return B is
2099 pragma Assert (Is_Itype (Id));
2100 return Flag202 (Id);
2103 function Kill_Elaboration_Checks (Id : E) return B is
2106 end Kill_Elaboration_Checks;
2108 function Kill_Range_Checks (Id : E) return B is
2111 end Kill_Range_Checks;
2113 function Kill_Tag_Checks (Id : E) return B is
2116 end Kill_Tag_Checks;
2118 function Known_To_Have_Preelab_Init (Id : E) return B is
2120 pragma Assert (Is_Type (Id));
2121 return Flag207 (Id);
2122 end Known_To_Have_Preelab_Init;
2124 function Last_Assignment (Id : E) return N is
2126 pragma Assert (Is_Assignable (Id));
2128 end Last_Assignment;
2130 function Last_Entity (Id : E) return E is
2135 function Limited_View (Id : E) return E is
2137 pragma Assert (Ekind (Id) = E_Package);
2141 function Lit_Indexes (Id : E) return E is
2143 pragma Assert (Is_Enumeration_Type (Id));
2147 function Lit_Strings (Id : E) return E is
2149 pragma Assert (Is_Enumeration_Type (Id));
2153 function Low_Bound_Tested (Id : E) return B is
2155 return Flag205 (Id);
2156 end Low_Bound_Tested;
2158 function Machine_Radix_10 (Id : E) return B is
2160 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2162 end Machine_Radix_10;
2164 function Master_Id (Id : E) return E is
2166 pragma Assert (Is_Access_Type (Id));
2170 function Materialize_Entity (Id : E) return B is
2172 return Flag168 (Id);
2173 end Materialize_Entity;
2175 function Mechanism (Id : E) return M is
2177 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2178 return UI_To_Int (Uint8 (Id));
2181 function Modulus (Id : E) return Uint is
2183 pragma Assert (Is_Modular_Integer_Type (Id));
2184 return Uint17 (Base_Type (Id));
2187 function Must_Be_On_Byte_Boundary (Id : E) return B is
2189 pragma Assert (Is_Type (Id));
2190 return Flag183 (Id);
2191 end Must_Be_On_Byte_Boundary;
2193 function Must_Have_Preelab_Init (Id : E) return B is
2195 pragma Assert (Is_Type (Id));
2196 return Flag208 (Id);
2197 end Must_Have_Preelab_Init;
2199 function Needs_Debug_Info (Id : E) return B is
2201 return Flag147 (Id);
2202 end Needs_Debug_Info;
2204 function Needs_No_Actuals (Id : E) return B is
2207 (Is_Overloadable (Id)
2208 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2210 end Needs_No_Actuals;
2212 function Never_Set_In_Source (Id : E) return B is
2214 return Flag115 (Id);
2215 end Never_Set_In_Source;
2217 function Next_Inlined_Subprogram (Id : E) return E is
2220 end Next_Inlined_Subprogram;
2222 function No_Pool_Assigned (Id : E) return B is
2224 pragma Assert (Is_Access_Type (Id));
2225 return Flag131 (Root_Type (Id));
2226 end No_Pool_Assigned;
2228 function No_Return (Id : E) return B is
2230 return Flag113 (Id);
2233 function No_Strict_Aliasing (Id : E) return B is
2235 pragma Assert (Is_Access_Type (Id));
2236 return Flag136 (Base_Type (Id));
2237 end No_Strict_Aliasing;
2239 function Non_Binary_Modulus (Id : E) return B is
2241 pragma Assert (Is_Type (Id));
2242 return Flag58 (Base_Type (Id));
2243 end Non_Binary_Modulus;
2245 function Non_Limited_View (Id : E) return E is
2247 pragma Assert (Ekind (Id) in Incomplete_Kind);
2249 end Non_Limited_View;
2251 function Nonzero_Is_True (Id : E) return B is
2253 pragma Assert (Root_Type (Id) = Standard_Boolean);
2254 return Flag162 (Base_Type (Id));
2255 end Nonzero_Is_True;
2257 function Normalized_First_Bit (Id : E) return U is
2259 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2261 end Normalized_First_Bit;
2263 function Normalized_Position (Id : E) return U is
2265 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2267 end Normalized_Position;
2269 function Normalized_Position_Max (Id : E) return U is
2271 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2273 end Normalized_Position_Max;
2275 function OK_To_Rename (Id : E) return B is
2277 pragma Assert (Ekind (Id) = E_Variable);
2278 return Flag247 (Id);
2281 function OK_To_Reorder_Components (Id : E) return B is
2283 pragma Assert (Is_Record_Type (Id));
2284 return Flag239 (Base_Type (Id));
2285 end OK_To_Reorder_Components;
2287 function Optimize_Alignment_Space (Id : E) return B is
2290 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2291 return Flag241 (Id);
2292 end Optimize_Alignment_Space;
2294 function Optimize_Alignment_Time (Id : E) return B is
2297 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2298 return Flag242 (Id);
2299 end Optimize_Alignment_Time;
2301 function Original_Array_Type (Id : E) return E is
2303 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2305 end Original_Array_Type;
2307 function Original_Record_Component (Id : E) return E is
2309 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2311 end Original_Record_Component;
2313 function Overlays_Constant (Id : E) return B is
2315 return Flag243 (Id);
2316 end Overlays_Constant;
2318 function Overridden_Operation (Id : E) return E is
2321 end Overridden_Operation;
2323 function Package_Instantiation (Id : E) return N is
2325 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2327 end Package_Instantiation;
2329 function Packed_Array_Type (Id : E) return E is
2331 pragma Assert (Is_Array_Type (Id));
2333 end Packed_Array_Type;
2335 function Parent_Subtype (Id : E) return E is
2337 pragma Assert (Is_Record_Type (Id));
2338 return Node19 (Base_Type (Id));
2341 function Postcondition_Proc (Id : E) return E is
2343 pragma Assert (Ekind (Id) = E_Procedure);
2345 end Postcondition_Proc;
2347 function Primitive_Operations (Id : E) return L is
2349 pragma Assert (Is_Tagged_Type (Id));
2350 return Elist15 (Id);
2351 end Primitive_Operations;
2353 function Prival (Id : E) return E is
2355 pragma Assert (Is_Protected_Component (Id));
2359 function Prival_Link (Id : E) return E is
2361 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2365 function Private_Dependents (Id : E) return L is
2367 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2368 return Elist18 (Id);
2369 end Private_Dependents;
2371 function Private_View (Id : E) return N is
2373 pragma Assert (Is_Private_Type (Id));
2377 function Protected_Body_Subprogram (Id : E) return E is
2379 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2381 end Protected_Body_Subprogram;
2383 function Protected_Formal (Id : E) return E is
2385 pragma Assert (Is_Formal (Id));
2387 end Protected_Formal;
2389 function Protection_Object (Id : E) return E is
2392 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2394 end Protection_Object;
2396 function Reachable (Id : E) return B is
2401 function Referenced (Id : E) return B is
2403 return Flag156 (Id);
2406 function Referenced_As_LHS (Id : E) return B is
2409 end Referenced_As_LHS;
2411 function Referenced_As_Out_Parameter (Id : E) return B is
2413 return Flag227 (Id);
2414 end Referenced_As_Out_Parameter;
2416 function Referenced_Object (Id : E) return N is
2418 pragma Assert (Is_Type (Id));
2420 end Referenced_Object;
2422 function Register_Exception_Call (Id : E) return N is
2424 pragma Assert (Ekind (Id) = E_Exception);
2426 end Register_Exception_Call;
2428 function Related_Array_Object (Id : E) return E is
2430 pragma Assert (Is_Array_Type (Id));
2432 end Related_Array_Object;
2434 function Related_Expression (Id : E) return N is
2436 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2438 end Related_Expression;
2440 function Related_Instance (Id : E) return E is
2442 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2444 end Related_Instance;
2446 function Related_Type (Id : E) return E is
2448 pragma Assert (Ekind_In (Id, E_Component, E_Constant));
2452 function Relative_Deadline_Variable (Id : E) return E is
2454 pragma Assert (Is_Task_Type (Id));
2455 return Node26 (Implementation_Base_Type (Id));
2456 end Relative_Deadline_Variable;
2458 function Renamed_Entity (Id : E) return N is
2463 function Renamed_In_Spec (Id : E) return B is
2465 pragma Assert (Ekind (Id) = E_Package);
2466 return Flag231 (Id);
2467 end Renamed_In_Spec;
2469 function Renamed_Object (Id : E) return N is
2474 function Renaming_Map (Id : E) return U is
2479 function Requires_Overriding (Id : E) return B is
2481 pragma Assert (Is_Overloadable (Id));
2482 return Flag213 (Id);
2483 end Requires_Overriding;
2485 function Return_Present (Id : E) return B is
2490 function Return_Applies_To (Id : E) return N is
2493 end Return_Applies_To;
2495 function Returns_By_Ref (Id : E) return B is
2500 function Reverse_Bit_Order (Id : E) return B is
2502 pragma Assert (Is_Record_Type (Id));
2503 return Flag164 (Base_Type (Id));
2504 end Reverse_Bit_Order;
2506 function RM_Size (Id : E) return U is
2508 pragma Assert (Is_Type (Id));
2512 function Scalar_Range (Id : E) return N is
2517 function Scale_Value (Id : E) return U is
2522 function Scope_Depth_Value (Id : E) return U is
2525 end Scope_Depth_Value;
2527 function Sec_Stack_Needed_For_Return (Id : E) return B is
2529 return Flag167 (Id);
2530 end Sec_Stack_Needed_For_Return;
2532 function Shadow_Entities (Id : E) return S is
2534 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2536 end Shadow_Entities;
2538 function Shared_Var_Procs_Instance (Id : E) return E is
2540 pragma Assert (Ekind (Id) = E_Variable);
2542 end Shared_Var_Procs_Instance;
2544 function Size_Check_Code (Id : E) return N is
2546 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2548 end Size_Check_Code;
2550 function Size_Depends_On_Discriminant (Id : E) return B is
2552 return Flag177 (Id);
2553 end Size_Depends_On_Discriminant;
2555 function Size_Known_At_Compile_Time (Id : E) return B is
2558 end Size_Known_At_Compile_Time;
2560 function Small_Value (Id : E) return R is
2562 pragma Assert (Is_Fixed_Point_Type (Id));
2563 return Ureal21 (Id);
2566 function Spec_Entity (Id : E) return E is
2568 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2572 function Spec_PPC_List (Id : E) return N is
2574 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
2578 function Storage_Size_Variable (Id : E) return E is
2580 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2581 return Node15 (Implementation_Base_Type (Id));
2582 end Storage_Size_Variable;
2584 function Static_Elaboration_Desired (Id : E) return B is
2586 pragma Assert (Ekind (Id) = E_Package);
2588 end Static_Elaboration_Desired;
2590 function Static_Initialization (Id : E) return N is
2593 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2595 end Static_Initialization;
2597 function Stored_Constraint (Id : E) return L is
2600 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2601 return Elist23 (Id);
2602 end Stored_Constraint;
2604 function Strict_Alignment (Id : E) return B is
2606 return Flag145 (Implementation_Base_Type (Id));
2607 end Strict_Alignment;
2609 function String_Literal_Length (Id : E) return U is
2612 end String_Literal_Length;
2614 function String_Literal_Low_Bound (Id : E) return N is
2617 end String_Literal_Low_Bound;
2619 function Suppress_Elaboration_Warnings (Id : E) return B is
2621 return Flag148 (Id);
2622 end Suppress_Elaboration_Warnings;
2624 function Suppress_Init_Proc (Id : E) return B is
2626 return Flag105 (Base_Type (Id));
2627 end Suppress_Init_Proc;
2629 function Suppress_Style_Checks (Id : E) return B is
2631 return Flag165 (Id);
2632 end Suppress_Style_Checks;
2634 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2636 return Flag217 (Id);
2637 end Suppress_Value_Tracking_On_Call;
2639 function Task_Body_Procedure (Id : E) return N is
2641 pragma Assert (Ekind (Id) in Task_Kind);
2643 end Task_Body_Procedure;
2645 function Treat_As_Volatile (Id : E) return B is
2648 end Treat_As_Volatile;
2650 function Underlying_Full_View (Id : E) return E is
2652 pragma Assert (Ekind (Id) in Private_Kind);
2654 end Underlying_Full_View;
2656 function Underlying_Record_View (Id : E) return E is
2659 end Underlying_Record_View;
2661 function Universal_Aliasing (Id : E) return B is
2663 pragma Assert (Is_Type (Id));
2664 return Flag216 (Base_Type (Id));
2665 end Universal_Aliasing;
2667 function Unset_Reference (Id : E) return N is
2670 end Unset_Reference;
2672 function Used_As_Generic_Actual (Id : E) return B is
2674 return Flag222 (Id);
2675 end Used_As_Generic_Actual;
2677 function Uses_Sec_Stack (Id : E) return B is
2682 function Vax_Float (Id : E) return B is
2684 return Flag151 (Base_Type (Id));
2687 function Warnings_Off (Id : E) return B is
2692 function Warnings_Off_Used (Id : E) return B is
2694 return Flag236 (Id);
2695 end Warnings_Off_Used;
2697 function Warnings_Off_Used_Unmodified (Id : E) return B is
2699 return Flag237 (Id);
2700 end Warnings_Off_Used_Unmodified;
2702 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2704 return Flag238 (Id);
2705 end Warnings_Off_Used_Unreferenced;
2707 function Wrapped_Entity (Id : E) return E is
2709 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2710 and then Is_Primitive_Wrapper (Id));
2714 function Was_Hidden (Id : E) return B is
2716 return Flag196 (Id);
2719 ------------------------------
2720 -- Classification Functions --
2721 ------------------------------
2723 function Is_Access_Type (Id : E) return B is
2725 return Ekind (Id) in Access_Kind;
2728 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2730 return Ekind (Id) in Access_Protected_Kind;
2731 end Is_Access_Protected_Subprogram_Type;
2733 function Is_Access_Subprogram_Type (Id : E) return B is
2735 return Ekind (Id) in Access_Subprogram_Kind;
2736 end Is_Access_Subprogram_Type;
2738 function Is_Array_Type (Id : E) return B is
2740 return Ekind (Id) in Array_Kind;
2743 function Is_Assignable (Id : E) return B is
2745 return Ekind (Id) in Assignable_Kind;
2748 function Is_Class_Wide_Type (Id : E) return B is
2750 return Ekind (Id) in Class_Wide_Kind;
2751 end Is_Class_Wide_Type;
2753 function Is_Composite_Type (Id : E) return B is
2755 return Ekind (Id) in Composite_Kind;
2756 end Is_Composite_Type;
2758 function Is_Concurrent_Body (Id : E) return B is
2760 return Ekind (Id) in
2761 Concurrent_Body_Kind;
2762 end Is_Concurrent_Body;
2764 function Is_Concurrent_Record_Type (Id : E) return B is
2767 end Is_Concurrent_Record_Type;
2769 function Is_Concurrent_Type (Id : E) return B is
2771 return Ekind (Id) in Concurrent_Kind;
2772 end Is_Concurrent_Type;
2774 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2776 return Ekind (Id) in
2777 Decimal_Fixed_Point_Kind;
2778 end Is_Decimal_Fixed_Point_Type;
2780 function Is_Digits_Type (Id : E) return B is
2782 return Ekind (Id) in Digits_Kind;
2785 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2787 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2788 end Is_Discrete_Or_Fixed_Point_Type;
2790 function Is_Discrete_Type (Id : E) return B is
2792 return Ekind (Id) in Discrete_Kind;
2793 end Is_Discrete_Type;
2795 function Is_Elementary_Type (Id : E) return B is
2797 return Ekind (Id) in Elementary_Kind;
2798 end Is_Elementary_Type;
2800 function Is_Entry (Id : E) return B is
2802 return Ekind (Id) in Entry_Kind;
2805 function Is_Enumeration_Type (Id : E) return B is
2807 return Ekind (Id) in
2809 end Is_Enumeration_Type;
2811 function Is_Fixed_Point_Type (Id : E) return B is
2813 return Ekind (Id) in
2815 end Is_Fixed_Point_Type;
2817 function Is_Floating_Point_Type (Id : E) return B is
2819 return Ekind (Id) in Float_Kind;
2820 end Is_Floating_Point_Type;
2822 function Is_Formal (Id : E) return B is
2824 return Ekind (Id) in Formal_Kind;
2827 function Is_Formal_Object (Id : E) return B is
2829 return Ekind (Id) in Formal_Object_Kind;
2830 end Is_Formal_Object;
2832 function Is_Generic_Subprogram (Id : E) return B is
2834 return Ekind (Id) in Generic_Subprogram_Kind;
2835 end Is_Generic_Subprogram;
2837 function Is_Generic_Unit (Id : E) return B is
2839 return Ekind (Id) in Generic_Unit_Kind;
2840 end Is_Generic_Unit;
2842 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2844 return Ekind (Id) in
2845 Incomplete_Or_Private_Kind;
2846 end Is_Incomplete_Or_Private_Type;
2848 function Is_Incomplete_Type (Id : E) return B is
2850 return Ekind (Id) in
2852 end Is_Incomplete_Type;
2854 function Is_Integer_Type (Id : E) return B is
2856 return Ekind (Id) in Integer_Kind;
2857 end Is_Integer_Type;
2859 function Is_Modular_Integer_Type (Id : E) return B is
2861 return Ekind (Id) in
2862 Modular_Integer_Kind;
2863 end Is_Modular_Integer_Type;
2865 function Is_Named_Number (Id : E) return B is
2867 return Ekind (Id) in Named_Kind;
2868 end Is_Named_Number;
2870 function Is_Numeric_Type (Id : E) return B is
2872 return Ekind (Id) in Numeric_Kind;
2873 end Is_Numeric_Type;
2875 function Is_Object (Id : E) return B is
2877 return Ekind (Id) in Object_Kind;
2880 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2882 return Ekind (Id) in
2883 Ordinary_Fixed_Point_Kind;
2884 end Is_Ordinary_Fixed_Point_Type;
2886 function Is_Overloadable (Id : E) return B is
2888 return Ekind (Id) in Overloadable_Kind;
2889 end Is_Overloadable;
2891 function Is_Private_Type (Id : E) return B is
2893 return Ekind (Id) in Private_Kind;
2894 end Is_Private_Type;
2896 function Is_Protected_Type (Id : E) return B is
2898 return Ekind (Id) in Protected_Kind;
2899 end Is_Protected_Type;
2901 function Is_Real_Type (Id : E) return B is
2903 return Ekind (Id) in Real_Kind;
2906 function Is_Record_Type (Id : E) return B is
2908 return Ekind (Id) in Record_Kind;
2911 function Is_Scalar_Type (Id : E) return B is
2913 return Ekind (Id) in Scalar_Kind;
2916 function Is_Signed_Integer_Type (Id : E) return B is
2918 return Ekind (Id) in Signed_Integer_Kind;
2919 end Is_Signed_Integer_Type;
2921 function Is_Subprogram (Id : E) return B is
2923 return Ekind (Id) in Subprogram_Kind;
2926 function Is_Task_Type (Id : E) return B is
2928 return Ekind (Id) in Task_Kind;
2931 function Is_Type (Id : E) return B is
2933 return Ekind (Id) in Type_Kind;
2936 ------------------------------
2937 -- Attribute Set Procedures --
2938 ------------------------------
2940 procedure Set_Accept_Address (Id : E; V : L) is
2942 Set_Elist21 (Id, V);
2943 end Set_Accept_Address;
2945 procedure Set_Access_Disp_Table (Id : E; V : L) is
2947 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2948 Set_Elist16 (Id, V);
2949 end Set_Access_Disp_Table;
2951 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2953 pragma Assert (Is_Access_Type (Id));
2955 end Set_Associated_Final_Chain;
2957 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2960 end Set_Associated_Formal_Package;
2962 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2965 end Set_Associated_Node_For_Itype;
2967 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2969 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2971 end Set_Associated_Storage_Pool;
2973 procedure Set_Actual_Subtype (Id : E; V : E) is
2976 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
2977 or else Is_Formal (Id));
2979 end Set_Actual_Subtype;
2981 procedure Set_Address_Taken (Id : E; V : B := True) is
2983 Set_Flag104 (Id, V);
2984 end Set_Address_Taken;
2986 procedure Set_Alias (Id : E; V : E) is
2989 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2993 procedure Set_Alignment (Id : E; V : U) is
2995 pragma Assert (Is_Type (Id)
2996 or else Is_Formal (Id)
2997 or else Ekind_In (Id, E_Loop_Parameter,
3004 procedure Set_Barrier_Function (Id : E; V : N) is
3006 pragma Assert (Is_Entry (Id));
3008 end Set_Barrier_Function;
3010 procedure Set_Block_Node (Id : E; V : N) is
3012 pragma Assert (Ekind (Id) = E_Block);
3016 procedure Set_Body_Entity (Id : E; V : E) is
3018 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3020 end Set_Body_Entity;
3022 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3025 (Ekind (Id) = E_Package
3026 or else Is_Subprogram (Id)
3027 or else Is_Generic_Unit (Id));
3029 end Set_Body_Needed_For_SAL;
3031 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3033 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3034 Set_Flag125 (Id, V);
3035 end Set_C_Pass_By_Copy;
3037 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3040 end Set_Can_Never_Be_Null;
3042 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3045 end Set_Checks_May_Be_Suppressed;
3047 procedure Set_Class_Wide_Type (Id : E; V : E) is
3049 pragma Assert (Is_Type (Id));
3051 end Set_Class_Wide_Type;
3053 procedure Set_Cloned_Subtype (Id : E; V : E) is
3055 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3057 end Set_Cloned_Subtype;
3059 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3061 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3063 end Set_Component_Bit_Offset;
3065 procedure Set_Component_Clause (Id : E; V : N) is
3067 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3069 end Set_Component_Clause;
3071 procedure Set_Component_Size (Id : E; V : U) is
3073 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3075 end Set_Component_Size;
3077 procedure Set_Component_Type (Id : E; V : E) is
3079 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3081 end Set_Component_Type;
3083 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3086 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3088 end Set_Corresponding_Concurrent_Type;
3090 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3092 pragma Assert (Ekind (Id) = E_Discriminant);
3094 end Set_Corresponding_Discriminant;
3096 procedure Set_Corresponding_Equality (Id : E; V : E) is
3099 (Ekind (Id) = E_Function
3100 and then not Comes_From_Source (Id)
3101 and then Chars (Id) = Name_Op_Ne);
3103 end Set_Corresponding_Equality;
3105 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3107 pragma Assert (Is_Concurrent_Type (Id));
3109 end Set_Corresponding_Record_Type;
3111 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3114 end Set_Corresponding_Remote_Type;
3116 procedure Set_Current_Use_Clause (Id : E; V : E) is
3118 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3120 end Set_Current_Use_Clause;
3122 procedure Set_Current_Value (Id : E; V : N) is
3124 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3126 end Set_Current_Value;
3128 procedure Set_CR_Discriminant (Id : E; V : E) is
3131 end Set_CR_Discriminant;
3133 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3135 Set_Flag166 (Id, V);
3136 end Set_Debug_Info_Off;
3138 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3141 end Set_Debug_Renaming_Link;
3143 procedure Set_Default_Expr_Function (Id : E; V : E) is
3145 pragma Assert (Is_Formal (Id));
3147 end Set_Default_Expr_Function;
3149 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3151 Set_Flag108 (Id, V);
3152 end Set_Default_Expressions_Processed;
3154 procedure Set_Default_Value (Id : E; V : N) is
3156 pragma Assert (Is_Formal (Id));
3158 end Set_Default_Value;
3160 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3164 or else Is_Task_Type (Id)
3165 or else Ekind (Id) = E_Block);
3166 Set_Flag114 (Id, V);
3167 end Set_Delay_Cleanups;
3169 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3172 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3174 end Set_Delay_Subprogram_Descriptors;
3176 procedure Set_Delta_Value (Id : E; V : R) is
3178 pragma Assert (Is_Fixed_Point_Type (Id));
3179 Set_Ureal18 (Id, V);
3180 end Set_Delta_Value;
3182 procedure Set_Dependent_Instances (Id : E; V : L) is
3184 pragma Assert (Is_Generic_Instance (Id));
3186 end Set_Dependent_Instances;
3188 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3190 pragma Assert (Nkind (Id) in N_Entity);
3192 end Set_Depends_On_Private;
3194 procedure Set_Digits_Value (Id : E; V : U) is
3197 (Is_Floating_Point_Type (Id)
3198 or else Is_Decimal_Fixed_Point_Type (Id));
3200 end Set_Digits_Value;
3202 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3205 end Set_Directly_Designated_Type;
3207 procedure Set_Discard_Names (Id : E; V : B := True) is
3210 end Set_Discard_Names;
3212 procedure Set_Discriminal (Id : E; V : E) is
3214 pragma Assert (Ekind (Id) = E_Discriminant);
3216 end Set_Discriminal;
3218 procedure Set_Discriminal_Link (Id : E; V : E) is
3221 end Set_Discriminal_Link;
3223 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3225 pragma Assert (Ekind (Id) = E_Component);
3227 end Set_Discriminant_Checking_Func;
3229 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3231 pragma Assert (Nkind (Id) in N_Entity);
3232 Set_Elist21 (Id, V);
3233 end Set_Discriminant_Constraint;
3235 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3238 end Set_Discriminant_Default_Value;
3240 procedure Set_Discriminant_Number (Id : E; V : U) is
3243 end Set_Discriminant_Number;
3245 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3247 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3248 Set_Elist26 (Id, V);
3249 end Set_Dispatch_Table_Wrappers;
3251 procedure Set_DT_Entry_Count (Id : E; V : U) is
3253 pragma Assert (Ekind (Id) = E_Component);
3255 end Set_DT_Entry_Count;
3257 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3259 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3261 end Set_DT_Offset_To_Top_Func;
3263 procedure Set_DT_Position (Id : E; V : U) is
3265 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3267 end Set_DT_Position;
3269 procedure Set_DTC_Entity (Id : E; V : E) is
3271 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3275 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3277 pragma Assert (Ekind (Id) = E_Package);
3278 Set_Flag210 (Id, V);
3279 end Set_Elaborate_Body_Desirable;
3281 procedure Set_Elaboration_Entity (Id : E; V : E) is
3286 Ekind (Id) = E_Package
3288 Is_Generic_Unit (Id));
3290 end Set_Elaboration_Entity;
3292 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3297 Ekind (Id) = E_Package
3299 Is_Generic_Unit (Id));
3300 Set_Flag174 (Id, V);
3301 end Set_Elaboration_Entity_Required;
3303 procedure Set_Enclosing_Scope (Id : E; V : E) is
3306 end Set_Enclosing_Scope;
3308 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3310 pragma Assert (Is_Entry (Id));
3311 Set_Flag152 (Id, V);
3312 end Set_Entry_Accepted;
3314 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3317 end Set_Entry_Bodies_Array;
3319 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3322 end Set_Entry_Cancel_Parameter;
3324 procedure Set_Entry_Component (Id : E; V : E) is
3327 end Set_Entry_Component;
3329 procedure Set_Entry_Formal (Id : E; V : E) is
3332 end Set_Entry_Formal;
3334 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3336 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3338 end Set_Entry_Index_Constant;
3340 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3343 end Set_Entry_Parameters_Type;
3345 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3347 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3349 end Set_Enum_Pos_To_Rep;
3351 procedure Set_Enumeration_Pos (Id : E; V : U) is
3353 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3355 end Set_Enumeration_Pos;
3357 procedure Set_Enumeration_Rep (Id : E; V : U) is
3359 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3361 end Set_Enumeration_Rep;
3363 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3365 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3367 end Set_Enumeration_Rep_Expr;
3369 procedure Set_Equivalent_Type (Id : E; V : E) is
3372 (Ekind_In (Id, E_Class_Wide_Type,
3373 E_Class_Wide_Subtype,
3374 E_Access_Protected_Subprogram_Type,
3375 E_Anonymous_Access_Protected_Subprogram_Type,
3376 E_Access_Subprogram_Type,
3379 end Set_Equivalent_Type;
3381 procedure Set_Esize (Id : E; V : U) is
3386 procedure Set_Exception_Code (Id : E; V : U) is
3388 pragma Assert (Ekind (Id) = E_Exception);
3390 end Set_Exception_Code;
3392 procedure Set_Extra_Accessibility (Id : E; V : E) is
3394 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3396 end Set_Extra_Accessibility;
3398 procedure Set_Extra_Constrained (Id : E; V : E) is
3400 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3402 end Set_Extra_Constrained;
3404 procedure Set_Extra_Formal (Id : E; V : E) is
3407 end Set_Extra_Formal;
3409 procedure Set_Extra_Formals (Id : E; V : E) is
3412 (Is_Overloadable (Id)
3413 or else Ekind_In (Id, E_Entry_Family,
3415 E_Subprogram_Type));
3417 end Set_Extra_Formals;
3419 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3422 (Is_Access_Subprogram_Type (Id)
3423 and then Id = Base_Type (Id));
3424 Set_Flag229 (Id, V);
3425 end Set_Can_Use_Internal_Rep;
3427 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3430 end Set_Finalization_Chain_Entity;
3432 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3434 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3435 Set_Flag158 (Id, V);
3436 end Set_Finalize_Storage_Only;
3438 procedure Set_First_Entity (Id : E; V : E) is
3441 end Set_First_Entity;
3443 procedure Set_First_Exit_Statement (Id : E; V : N) is
3445 pragma Assert (Ekind (Id) = E_Loop);
3447 end Set_First_Exit_Statement;
3449 procedure Set_First_Index (Id : E; V : N) is
3451 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3453 end Set_First_Index;
3455 procedure Set_First_Literal (Id : E; V : E) is
3457 pragma Assert (Is_Enumeration_Type (Id));
3459 end Set_First_Literal;
3461 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3463 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3465 end Set_First_Optional_Parameter;
3467 procedure Set_First_Private_Entity (Id : E; V : E) is
3469 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3470 or else Ekind (Id) in Concurrent_Kind);
3472 end Set_First_Private_Entity;
3474 procedure Set_First_Rep_Item (Id : E; V : N) is
3477 end Set_First_Rep_Item;
3479 procedure Set_Freeze_Node (Id : E; V : N) is
3482 end Set_Freeze_Node;
3484 procedure Set_From_With_Type (Id : E; V : B := True) is
3488 or else Ekind (Id) = E_Package);
3489 Set_Flag159 (Id, V);
3490 end Set_From_With_Type;
3492 procedure Set_Full_View (Id : E; V : E) is
3494 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3498 procedure Set_Generic_Homonym (Id : E; V : E) is
3501 end Set_Generic_Homonym;
3503 procedure Set_Generic_Renamings (Id : E; V : L) is
3505 Set_Elist23 (Id, V);
3506 end Set_Generic_Renamings;
3508 procedure Set_Handler_Records (Id : E; V : S) is
3511 end Set_Handler_Records;
3513 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3515 pragma Assert (Id = Base_Type (Id));
3516 Set_Flag135 (Id, V);
3517 end Set_Has_Aliased_Components;
3519 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3522 end Set_Has_Alignment_Clause;
3524 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3527 end Set_Has_All_Calls_Remote;
3529 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3531 Set_Flag201 (Id, V);
3532 end Set_Has_Anon_Block_Suffix;
3534 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3536 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3538 end Set_Has_Atomic_Components;
3540 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3543 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3544 Set_Flag139 (Id, V);
3545 end Set_Has_Biased_Representation;
3547 procedure Set_Has_Completion (Id : E; V : B := True) is
3550 end Set_Has_Completion;
3552 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3554 pragma Assert (Is_Type (Id));
3556 end Set_Has_Completion_In_Body;
3558 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3560 pragma Assert (Ekind (Id) = E_Record_Type);
3561 Set_Flag140 (Id, V);
3562 end Set_Has_Complex_Representation;
3564 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3566 pragma Assert (Ekind (Id) = E_Array_Type);
3568 end Set_Has_Component_Size_Clause;
3570 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3572 pragma Assert (Is_Type (Id));
3573 Set_Flag187 (Id, V);
3574 end Set_Has_Constrained_Partial_View;
3576 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3578 Set_Flag181 (Id, V);
3579 end Set_Has_Contiguous_Rep;
3581 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3583 pragma Assert (Id = Base_Type (Id));
3585 end Set_Has_Controlled_Component;
3587 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3590 end Set_Has_Controlling_Result;
3592 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3594 Set_Flag119 (Id, V);
3595 end Set_Has_Convention_Pragma;
3597 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3599 pragma Assert (Nkind (Id) in N_Entity);
3601 end Set_Has_Delayed_Freeze;
3603 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3605 pragma Assert (Nkind (Id) in N_Entity);
3607 end Set_Has_Discriminants;
3609 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3611 pragma Assert (Ekind (Id) = E_Record_Type
3612 and then Is_Tagged_Type (Id));
3613 Set_Flag220 (Id, V);
3614 end Set_Has_Dispatch_Table;
3616 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3618 pragma Assert (Is_Enumeration_Type (Id));
3620 end Set_Has_Enumeration_Rep_Clause;
3622 procedure Set_Has_Exit (Id : E; V : B := True) is
3627 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3629 pragma Assert (Is_Tagged_Type (Id));
3630 Set_Flag110 (Id, V);
3631 end Set_Has_External_Tag_Rep_Clause;
3633 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3635 Set_Flag175 (Id, V);
3636 end Set_Has_Forward_Instantiation;
3638 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3640 Set_Flag173 (Id, V);
3641 end Set_Has_Fully_Qualified_Name;
3643 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3646 end Set_Has_Gigi_Rep_Item;
3648 procedure Set_Has_Homonym (Id : E; V : B := True) is
3651 end Set_Has_Homonym;
3653 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3655 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3656 Set_Flag219 (Id, V);
3657 end Set_Has_Initial_Value;
3659 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3661 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3663 end Set_Has_Machine_Radix_Clause;
3665 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3668 end Set_Has_Master_Entity;
3670 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3672 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3673 Set_Flag142 (Id, V);
3674 end Set_Has_Missing_Return;
3676 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3678 Set_Flag101 (Id, V);
3679 end Set_Has_Nested_Block_With_Handler;
3681 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3683 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3684 Set_Flag215 (Id, V);
3685 end Set_Has_Up_Level_Access;
3687 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3689 pragma Assert (Id = Base_Type (Id));
3691 end Set_Has_Non_Standard_Rep;
3693 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3695 pragma Assert (Is_Type (Id));
3696 Set_Flag172 (Id, V);
3697 end Set_Has_Object_Size_Clause;
3699 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3701 Set_Flag154 (Id, V);
3702 end Set_Has_Per_Object_Constraint;
3704 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3706 Set_Flag188 (Id, V);
3707 end Set_Has_Persistent_BSS;
3709 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3711 pragma Assert (Is_Subprogram (Id));
3712 Set_Flag240 (Id, V);
3713 end Set_Has_Postconditions;
3715 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3717 pragma Assert (Is_Access_Type (Id));
3718 Set_Flag27 (Base_Type (Id), V);
3719 end Set_Has_Pragma_Controlled;
3721 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3723 Set_Flag150 (Id, V);
3724 end Set_Has_Pragma_Elaborate_Body;
3726 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3728 Set_Flag157 (Id, V);
3729 end Set_Has_Pragma_Inline;
3731 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3733 Set_Flag230 (Id, V);
3734 end Set_Has_Pragma_Inline_Always;
3736 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3738 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3739 pragma Assert (Id = Base_Type (Id));
3740 Set_Flag121 (Id, V);
3741 end Set_Has_Pragma_Pack;
3743 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3745 Set_Flag221 (Id, V);
3746 end Set_Has_Pragma_Preelab_Init;
3748 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3750 Set_Flag203 (Id, V);
3751 end Set_Has_Pragma_Pure;
3753 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3755 Set_Flag179 (Id, V);
3756 end Set_Has_Pragma_Pure_Function;
3758 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3760 Set_Flag169 (Id, V);
3761 end Set_Has_Pragma_Thread_Local_Storage;
3763 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3765 Set_Flag233 (Id, V);
3766 end Set_Has_Pragma_Unmodified;
3768 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3770 Set_Flag180 (Id, V);
3771 end Set_Has_Pragma_Unreferenced;
3773 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3775 pragma Assert (Is_Type (Id));
3776 Set_Flag212 (Id, V);
3777 end Set_Has_Pragma_Unreferenced_Objects;
3779 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3781 pragma Assert (Id = Base_Type (Id));
3782 Set_Flag120 (Id, V);
3783 end Set_Has_Primitive_Operations;
3785 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3787 Set_Flag155 (Id, V);
3788 end Set_Has_Private_Declaration;
3790 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3792 Set_Flag161 (Id, V);
3793 end Set_Has_Qualified_Name;
3795 procedure Set_Has_RACW (Id : E; V : B := True) is
3797 pragma Assert (Ekind (Id) = E_Package);
3798 Set_Flag214 (Id, V);
3801 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3803 pragma Assert (Id = Base_Type (Id));
3805 end Set_Has_Record_Rep_Clause;
3807 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3809 pragma Assert (Is_Subprogram (Id));
3810 Set_Flag143 (Id, V);
3811 end Set_Has_Recursive_Call;
3813 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3816 end Set_Has_Size_Clause;
3818 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3821 end Set_Has_Small_Clause;
3823 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3825 pragma Assert (Id = Base_Type (Id));
3826 Set_Flag100 (Id, V);
3827 end Set_Has_Specified_Layout;
3829 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3831 pragma Assert (Is_Type (Id));
3832 Set_Flag190 (Id, V);
3833 end Set_Has_Specified_Stream_Input;
3835 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3837 pragma Assert (Is_Type (Id));
3838 Set_Flag191 (Id, V);
3839 end Set_Has_Specified_Stream_Output;
3841 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3843 pragma Assert (Is_Type (Id));
3844 Set_Flag192 (Id, V);
3845 end Set_Has_Specified_Stream_Read;
3847 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3849 pragma Assert (Is_Type (Id));
3850 Set_Flag193 (Id, V);
3851 end Set_Has_Specified_Stream_Write;
3853 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3855 Set_Flag211 (Id, V);
3856 end Set_Has_Static_Discriminants;
3858 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3860 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3861 pragma Assert (Id = Base_Type (Id));
3863 end Set_Has_Storage_Size_Clause;
3865 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3867 pragma Assert (Is_Elementary_Type (Id));
3868 Set_Flag184 (Id, V);
3869 end Set_Has_Stream_Size_Clause;
3871 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3874 end Set_Has_Subprogram_Descriptor;
3876 procedure Set_Has_Task (Id : E; V : B := True) is
3878 pragma Assert (Id = Base_Type (Id));
3882 procedure Set_Has_Thunks (Id : E; V : B := True) is
3884 pragma Assert (Is_Tag (Id)
3885 and then Ekind (Id) = E_Constant);
3886 Set_Flag228 (Id, V);
3889 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3891 pragma Assert (Id = Base_Type (Id));
3892 Set_Flag123 (Id, V);
3893 end Set_Has_Unchecked_Union;
3895 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3897 pragma Assert (Is_Type (Id));
3899 end Set_Has_Unknown_Discriminants;
3901 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3903 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3905 end Set_Has_Volatile_Components;
3907 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3909 Set_Flag182 (Id, V);
3910 end Set_Has_Xref_Entry;
3912 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3914 pragma Assert (Ekind (Id) = E_Variable);
3916 end Set_Hiding_Loop_Variable;
3918 procedure Set_Homonym (Id : E; V : E) is
3920 pragma Assert (Id /= V);
3924 procedure Set_Implemented_By_Entry (Id : E; V : B := True) is
3926 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3927 Set_Flag232 (Id, V);
3928 end Set_Implemented_By_Entry;
3930 procedure Set_Interfaces (Id : E; V : L) is
3932 pragma Assert (Is_Record_Type (Id));
3933 Set_Elist25 (Id, V);
3936 procedure Set_Interface_Alias (Id : E; V : E) is
3940 and then Is_Hidden (Id)
3941 and then (Ekind_In (Id, E_Procedure, E_Function)));
3943 end Set_Interface_Alias;
3945 procedure Set_In_Package_Body (Id : E; V : B := True) is
3948 end Set_In_Package_Body;
3950 procedure Set_In_Private_Part (Id : E; V : B := True) is
3953 end Set_In_Private_Part;
3955 procedure Set_In_Use (Id : E; V : B := True) is
3957 pragma Assert (Nkind (Id) in N_Entity);
3961 procedure Set_Inner_Instances (Id : E; V : L) is
3963 Set_Elist23 (Id, V);
3964 end Set_Inner_Instances;
3966 procedure Set_Interface_Name (Id : E; V : N) is
3969 end Set_Interface_Name;
3971 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3973 pragma Assert (Is_Overloadable (Id));
3975 end Set_Is_Abstract_Subprogram;
3977 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3979 pragma Assert (Is_Type (Id));
3980 Set_Flag146 (Id, V);
3981 end Set_Is_Abstract_Type;
3983 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3985 pragma Assert (Is_Access_Type (Id));
3986 Set_Flag194 (Id, V);
3987 end Set_Is_Local_Anonymous_Access;
3989 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3991 pragma Assert (Is_Access_Type (Id));
3993 end Set_Is_Access_Constant;
3995 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3997 Set_Flag185 (Id, V);
3998 end Set_Is_Ada_2005_Only;
4000 procedure Set_Is_Aliased (Id : E; V : B := True) is
4002 pragma Assert (Nkind (Id) in N_Entity);
4006 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4008 pragma Assert (Is_Entry (Id));
4009 Set_Flag132 (Id, V);
4010 end Set_Is_AST_Entry;
4012 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4015 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4017 end Set_Is_Asynchronous;
4019 procedure Set_Is_Atomic (Id : E; V : B := True) is
4024 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4026 pragma Assert ((not V)
4027 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4029 Set_Flag122 (Id, V);
4030 end Set_Is_Bit_Packed_Array;
4032 procedure Set_Is_Called (Id : E; V : B := True) is
4034 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4035 Set_Flag102 (Id, V);
4038 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4041 end Set_Is_Character_Type;
4043 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4046 end Set_Is_Child_Unit;
4048 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4051 end Set_Is_Class_Wide_Equivalent_Type;
4053 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4055 Set_Flag149 (Id, V);
4056 end Set_Is_Compilation_Unit;
4058 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4060 pragma Assert (Ekind (Id) = E_Discriminant);
4061 Set_Flag103 (Id, V);
4062 end Set_Is_Completely_Hidden;
4064 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4067 end Set_Is_Concurrent_Record_Type;
4069 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4072 end Set_Is_Constr_Subt_For_U_Nominal;
4074 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4076 Set_Flag141 (Id, V);
4077 end Set_Is_Constr_Subt_For_UN_Aliased;
4079 procedure Set_Is_Constrained (Id : E; V : B := True) is
4081 pragma Assert (Nkind (Id) in N_Entity);
4083 end Set_Is_Constrained;
4085 procedure Set_Is_Constructor (Id : E; V : B := True) is
4088 end Set_Is_Constructor;
4090 procedure Set_Is_Controlled (Id : E; V : B := True) is
4092 pragma Assert (Id = Base_Type (Id));
4094 end Set_Is_Controlled;
4096 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4098 pragma Assert (Is_Formal (Id));
4100 end Set_Is_Controlling_Formal;
4102 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4105 end Set_Is_CPP_Class;
4107 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4109 pragma Assert (Is_Type (Id));
4110 Set_Flag223 (Id, V);
4111 end Set_Is_Descendent_Of_Address;
4113 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4115 Set_Flag176 (Id, V);
4116 end Set_Is_Discrim_SO_Function;
4118 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4120 Set_Flag234 (Id, V);
4121 end Set_Is_Dispatch_Table_Entity;
4123 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4128 Is_Overloadable (Id)
4130 Ekind (Id) = E_Subprogram_Type);
4133 end Set_Is_Dispatching_Operation;
4135 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4137 Set_Flag124 (Id, V);
4138 end Set_Is_Eliminated;
4140 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4143 end Set_Is_Entry_Formal;
4145 procedure Set_Is_Exported (Id : E; V : B := True) is
4148 end Set_Is_Exported;
4150 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4153 end Set_Is_First_Subtype;
4155 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4157 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4158 Set_Flag118 (Id, V);
4159 end Set_Is_For_Access_Subtype;
4161 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4163 Set_Flag111 (Id, V);
4164 end Set_Is_Formal_Subprogram;
4166 procedure Set_Is_Frozen (Id : E; V : B := True) is
4168 pragma Assert (Nkind (Id) in N_Entity);
4172 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4174 pragma Assert (Is_Type (Id));
4176 end Set_Is_Generic_Actual_Type;
4178 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4180 Set_Flag130 (Id, V);
4181 end Set_Is_Generic_Instance;
4183 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4185 pragma Assert (Nkind (Id) in N_Entity);
4187 end Set_Is_Generic_Type;
4189 procedure Set_Is_Hidden (Id : E; V : B := True) is
4194 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4196 Set_Flag171 (Id, V);
4197 end Set_Is_Hidden_Open_Scope;
4199 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4201 pragma Assert (Nkind (Id) in N_Entity);
4203 end Set_Is_Immediately_Visible;
4205 procedure Set_Is_Imported (Id : E; V : B := True) is
4208 end Set_Is_Imported;
4210 procedure Set_Is_Inlined (Id : E; V : B := True) is
4215 procedure Set_Is_Interface (Id : E; V : B := True) is
4218 (Ekind_In (Id, E_Record_Type,
4220 E_Record_Type_With_Private,
4221 E_Record_Subtype_With_Private,
4223 E_Class_Wide_Subtype));
4224 Set_Flag186 (Id, V);
4225 end Set_Is_Interface;
4227 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4229 Set_Flag126 (Id, V);
4230 end Set_Is_Instantiated;
4232 procedure Set_Is_Internal (Id : E; V : B := True) is
4234 pragma Assert (Nkind (Id) in N_Entity);
4236 end Set_Is_Internal;
4238 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4240 pragma Assert (Nkind (Id) in N_Entity);
4242 end Set_Is_Interrupt_Handler;
4244 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4247 end Set_Is_Intrinsic_Subprogram;
4249 procedure Set_Is_Itype (Id : E; V : B := True) is
4254 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4257 end Set_Is_Known_Non_Null;
4259 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4261 Set_Flag204 (Id, V);
4262 end Set_Is_Known_Null;
4264 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4266 Set_Flag170 (Id, V);
4267 end Set_Is_Known_Valid;
4269 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4271 pragma Assert (Is_Type (Id));
4272 Set_Flag106 (Id, V);
4273 end Set_Is_Limited_Composite;
4275 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4277 pragma Assert (Is_Interface (Id));
4278 Set_Flag197 (Id, V);
4279 end Set_Is_Limited_Interface;
4281 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4284 end Set_Is_Limited_Record;
4286 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4288 pragma Assert (Is_Subprogram (Id));
4289 Set_Flag137 (Id, V);
4290 end Set_Is_Machine_Code_Subprogram;
4292 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4294 pragma Assert (Is_Type (Id));
4295 Set_Flag109 (Id, V);
4296 end Set_Is_Non_Static_Subtype;
4298 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4300 pragma Assert (Ekind (Id) = E_Procedure);
4301 Set_Flag178 (Id, V);
4302 end Set_Is_Null_Init_Proc;
4304 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4306 Set_Flag153 (Id, V);
4307 end Set_Is_Obsolescent;
4309 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4311 pragma Assert (Ekind (Id) = E_Out_Parameter);
4312 Set_Flag226 (Id, V);
4313 end Set_Is_Only_Out_Parameter;
4315 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4317 pragma Assert (Is_Formal (Id));
4318 Set_Flag134 (Id, V);
4319 end Set_Is_Optional_Parameter;
4321 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4323 pragma Assert (Is_Subprogram (Id));
4325 end Set_Is_Overriding_Operation;
4327 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4329 Set_Flag160 (Id, V);
4330 end Set_Is_Package_Body_Entity;
4332 procedure Set_Is_Packed (Id : E; V : B := True) is
4334 pragma Assert (Id = Base_Type (Id));
4338 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4340 Set_Flag138 (Id, V);
4341 end Set_Is_Packed_Array_Type;
4343 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4345 pragma Assert (Nkind (Id) in N_Entity);
4347 end Set_Is_Potentially_Use_Visible;
4349 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4352 end Set_Is_Preelaborated;
4354 procedure Set_Is_Primitive (Id : E; V : B := True) is
4357 (Is_Overloadable (Id)
4358 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4359 Set_Flag218 (Id, V);
4360 end Set_Is_Primitive;
4362 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4364 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4365 Set_Flag195 (Id, V);
4366 end Set_Is_Primitive_Wrapper;
4368 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4370 pragma Assert (Is_Type (Id));
4371 Set_Flag107 (Id, V);
4372 end Set_Is_Private_Composite;
4374 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4377 end Set_Is_Private_Descendant;
4379 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4381 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4382 Set_Flag245 (Id, V);
4383 end Set_Is_Private_Primitive;
4385 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4387 pragma Assert (Is_Interface (Id));
4388 Set_Flag198 (Id, V);
4389 end Set_Is_Protected_Interface;
4391 procedure Set_Is_Public (Id : E; V : B := True) is
4393 pragma Assert (Nkind (Id) in N_Entity);
4397 procedure Set_Is_Pure (Id : E; V : B := True) is
4402 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4404 pragma Assert (Is_Access_Type (Id));
4405 Set_Flag189 (Id, V);
4406 end Set_Is_Pure_Unit_Access_Type;
4408 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4410 pragma Assert (Is_Type (Id));
4411 Set_Flag244 (Id, V);
4412 end Set_Is_RACW_Stub_Type;
4414 procedure Set_Is_Raised (Id : E; V : B := True) is
4416 pragma Assert (Ekind (Id) = E_Exception);
4417 Set_Flag224 (Id, V);
4420 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4423 end Set_Is_Remote_Call_Interface;
4425 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4428 end Set_Is_Remote_Types;
4430 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4432 Set_Flag112 (Id, V);
4433 end Set_Is_Renaming_Of_Object;
4435 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4437 Set_Flag209 (Id, V);
4438 end Set_Is_Return_Object;
4440 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4443 end Set_Is_Shared_Passive;
4445 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4449 or else Ekind_In (Id, E_Exception,
4454 end Set_Is_Statically_Allocated;
4456 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4458 pragma Assert (Is_Interface (Id));
4459 Set_Flag199 (Id, V);
4460 end Set_Is_Synchronized_Interface;
4462 procedure Set_Is_Tag (Id : E; V : B := True) is
4464 pragma Assert (Ekind_In (Id, E_Component, E_Constant));
4468 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4471 end Set_Is_Tagged_Type;
4473 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4475 pragma Assert (Is_Interface (Id));
4476 Set_Flag200 (Id, V);
4477 end Set_Is_Task_Interface;
4479 procedure Set_Is_Thunk (Id : E; V : B := True) is
4481 Set_Flag225 (Id, V);
4484 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4486 Set_Flag235 (Id, V);
4487 end Set_Is_Trivial_Subprogram;
4489 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4491 Set_Flag163 (Id, V);
4492 end Set_Is_True_Constant;
4494 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4496 pragma Assert (Id = Base_Type (Id));
4497 Set_Flag117 (Id, V);
4498 end Set_Is_Unchecked_Union;
4500 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4502 pragma Assert (Ekind (Id) = E_Record_Type);
4503 Set_Flag246 (Id, V);
4504 end Set_Is_Underlying_Record_View;
4506 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4508 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4509 Set_Flag144 (Id, V);
4510 end Set_Is_Unsigned_Type;
4512 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4514 pragma Assert (Ekind (Id) = E_Procedure);
4515 Set_Flag127 (Id, V);
4516 end Set_Is_Valued_Procedure;
4518 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4520 pragma Assert (Is_Child_Unit (Id));
4521 Set_Flag116 (Id, V);
4522 end Set_Is_Visible_Child_Unit;
4524 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4526 Set_Flag206 (Id, V);
4527 end Set_Is_Visible_Formal;
4529 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4531 pragma Assert (Ekind (Id) = E_Exception);
4532 Set_Flag133 (Id, V);
4533 end Set_Is_VMS_Exception;
4535 procedure Set_Is_Volatile (Id : E; V : B := True) is
4537 pragma Assert (Nkind (Id) in N_Entity);
4539 end Set_Is_Volatile;
4541 procedure Set_Itype_Printed (Id : E; V : B := True) is
4543 pragma Assert (Is_Itype (Id));
4544 Set_Flag202 (Id, V);
4545 end Set_Itype_Printed;
4547 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4550 end Set_Kill_Elaboration_Checks;
4552 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4555 end Set_Kill_Range_Checks;
4557 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4560 end Set_Kill_Tag_Checks;
4562 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4564 pragma Assert (Is_Type (Id));
4565 Set_Flag207 (Id, V);
4566 end Set_Known_To_Have_Preelab_Init;
4568 procedure Set_Last_Assignment (Id : E; V : N) is
4570 pragma Assert (Is_Assignable (Id));
4572 end Set_Last_Assignment;
4574 procedure Set_Last_Entity (Id : E; V : E) is
4577 end Set_Last_Entity;
4579 procedure Set_Limited_View (Id : E; V : E) is
4581 pragma Assert (Ekind (Id) = E_Package);
4583 end Set_Limited_View;
4585 procedure Set_Lit_Indexes (Id : E; V : E) is
4587 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4589 end Set_Lit_Indexes;
4591 procedure Set_Lit_Strings (Id : E; V : E) is
4593 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4595 end Set_Lit_Strings;
4597 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4599 pragma Assert (Is_Formal (Id));
4600 Set_Flag205 (Id, V);
4601 end Set_Low_Bound_Tested;
4603 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4605 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4607 end Set_Machine_Radix_10;
4609 procedure Set_Master_Id (Id : E; V : E) is
4611 pragma Assert (Is_Access_Type (Id));
4615 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4617 Set_Flag168 (Id, V);
4618 end Set_Materialize_Entity;
4620 procedure Set_Mechanism (Id : E; V : M) is
4622 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4623 Set_Uint8 (Id, UI_From_Int (V));
4626 procedure Set_Modulus (Id : E; V : U) is
4628 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4632 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4634 pragma Assert (Is_Type (Id));
4635 Set_Flag183 (Id, V);
4636 end Set_Must_Be_On_Byte_Boundary;
4638 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4640 pragma Assert (Is_Type (Id));
4641 Set_Flag208 (Id, V);
4642 end Set_Must_Have_Preelab_Init;
4644 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4646 Set_Flag147 (Id, V);
4647 end Set_Needs_Debug_Info;
4649 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4652 (Is_Overloadable (Id)
4653 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4655 end Set_Needs_No_Actuals;
4657 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4659 Set_Flag115 (Id, V);
4660 end Set_Never_Set_In_Source;
4662 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4665 end Set_Next_Inlined_Subprogram;
4667 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4669 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4670 Set_Flag131 (Id, V);
4671 end Set_No_Pool_Assigned;
4673 procedure Set_No_Return (Id : E; V : B := True) is
4676 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4677 Set_Flag113 (Id, V);
4680 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4682 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4683 Set_Flag136 (Id, V);
4684 end Set_No_Strict_Aliasing;
4686 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4688 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4690 end Set_Non_Binary_Modulus;
4692 procedure Set_Non_Limited_View (Id : E; V : E) is
4694 pragma Assert (Ekind (Id) in Incomplete_Kind);
4696 end Set_Non_Limited_View;
4698 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4701 (Root_Type (Id) = Standard_Boolean
4702 and then Ekind (Id) = E_Enumeration_Type);
4703 Set_Flag162 (Id, V);
4704 end Set_Nonzero_Is_True;
4706 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4708 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4710 end Set_Normalized_First_Bit;
4712 procedure Set_Normalized_Position (Id : E; V : U) is
4714 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4716 end Set_Normalized_Position;
4718 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4720 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4722 end Set_Normalized_Position_Max;
4724 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4726 pragma Assert (Ekind (Id) = E_Variable);
4727 Set_Flag247 (Id, V);
4728 end Set_OK_To_Rename;
4730 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4733 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4734 Set_Flag239 (Id, V);
4735 end Set_OK_To_Reorder_Components;
4737 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4740 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4741 Set_Flag241 (Id, V);
4742 end Set_Optimize_Alignment_Space;
4744 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4747 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4748 Set_Flag242 (Id, V);
4749 end Set_Optimize_Alignment_Time;
4751 procedure Set_Original_Array_Type (Id : E; V : E) is
4753 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4755 end Set_Original_Array_Type;
4757 procedure Set_Original_Record_Component (Id : E; V : E) is
4759 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4761 end Set_Original_Record_Component;
4763 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4765 Set_Flag243 (Id, V);
4766 end Set_Overlays_Constant;
4768 procedure Set_Overridden_Operation (Id : E; V : E) is
4771 end Set_Overridden_Operation;
4773 procedure Set_Package_Instantiation (Id : E; V : N) is
4775 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4777 end Set_Package_Instantiation;
4779 procedure Set_Packed_Array_Type (Id : E; V : E) is
4781 pragma Assert (Is_Array_Type (Id));
4783 end Set_Packed_Array_Type;
4785 procedure Set_Parent_Subtype (Id : E; V : E) is
4787 pragma Assert (Ekind (Id) = E_Record_Type);
4789 end Set_Parent_Subtype;
4791 procedure Set_Postcondition_Proc (Id : E; V : E) is
4793 pragma Assert (Ekind (Id) = E_Procedure);
4795 end Set_Postcondition_Proc;
4797 procedure Set_Primitive_Operations (Id : E; V : L) is
4799 pragma Assert (Is_Tagged_Type (Id));
4800 Set_Elist15 (Id, V);
4801 end Set_Primitive_Operations;
4803 procedure Set_Prival (Id : E; V : E) is
4805 pragma Assert (Is_Protected_Component (Id));
4809 procedure Set_Prival_Link (Id : E; V : E) is
4811 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4813 end Set_Prival_Link;
4815 procedure Set_Private_Dependents (Id : E; V : L) is
4817 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4818 Set_Elist18 (Id, V);
4819 end Set_Private_Dependents;
4821 procedure Set_Private_View (Id : E; V : N) is
4823 pragma Assert (Is_Private_Type (Id));
4825 end Set_Private_View;
4827 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4829 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4831 end Set_Protected_Body_Subprogram;
4833 procedure Set_Protected_Formal (Id : E; V : E) is
4835 pragma Assert (Is_Formal (Id));
4837 end Set_Protected_Formal;
4839 procedure Set_Protection_Object (Id : E; V : E) is
4841 pragma Assert (Ekind_In (Id, E_Entry,
4846 end Set_Protection_Object;
4848 procedure Set_Reachable (Id : E; V : B := True) is
4853 procedure Set_Referenced (Id : E; V : B := True) is
4855 Set_Flag156 (Id, V);
4858 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4861 end Set_Referenced_As_LHS;
4863 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4865 Set_Flag227 (Id, V);
4866 end Set_Referenced_As_Out_Parameter;
4868 procedure Set_Referenced_Object (Id : E; V : N) is
4870 pragma Assert (Is_Type (Id));
4872 end Set_Referenced_Object;
4874 procedure Set_Register_Exception_Call (Id : E; V : N) is
4876 pragma Assert (Ekind (Id) = E_Exception);
4878 end Set_Register_Exception_Call;
4880 procedure Set_Related_Array_Object (Id : E; V : E) is
4882 pragma Assert (Is_Array_Type (Id));
4884 end Set_Related_Array_Object;
4886 procedure Set_Related_Expression (Id : E; V : N) is
4889 end Set_Related_Expression;
4891 procedure Set_Related_Instance (Id : E; V : E) is
4893 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4895 end Set_Related_Instance;
4897 procedure Set_Related_Type (Id : E; V : E) is
4899 pragma Assert (Ekind_In (Id, E_Component, E_Constant));
4901 end Set_Related_Type;
4903 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4905 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4907 end Set_Relative_Deadline_Variable;
4909 procedure Set_Renamed_Entity (Id : E; V : N) is
4912 end Set_Renamed_Entity;
4914 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4916 pragma Assert (Ekind (Id) = E_Package);
4917 Set_Flag231 (Id, V);
4918 end Set_Renamed_In_Spec;
4920 procedure Set_Renamed_Object (Id : E; V : N) is
4923 end Set_Renamed_Object;
4925 procedure Set_Renaming_Map (Id : E; V : U) is
4928 end Set_Renaming_Map;
4930 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4932 pragma Assert (Is_Overloadable (Id));
4933 Set_Flag213 (Id, V);
4934 end Set_Requires_Overriding;
4936 procedure Set_Return_Present (Id : E; V : B := True) is
4939 end Set_Return_Present;
4941 procedure Set_Return_Applies_To (Id : E; V : N) is
4944 end Set_Return_Applies_To;
4946 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4949 end Set_Returns_By_Ref;
4951 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4954 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4955 Set_Flag164 (Id, V);
4956 end Set_Reverse_Bit_Order;
4958 procedure Set_RM_Size (Id : E; V : U) is
4960 pragma Assert (Is_Type (Id));
4964 procedure Set_Scalar_Range (Id : E; V : N) is
4967 end Set_Scalar_Range;
4969 procedure Set_Scale_Value (Id : E; V : U) is
4972 end Set_Scale_Value;
4974 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4976 pragma Assert (not Is_Record_Type (Id));
4978 end Set_Scope_Depth_Value;
4980 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4982 Set_Flag167 (Id, V);
4983 end Set_Sec_Stack_Needed_For_Return;
4985 procedure Set_Shadow_Entities (Id : E; V : S) is
4987 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
4989 end Set_Shadow_Entities;
4991 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
4993 pragma Assert (Ekind (Id) = E_Variable);
4995 end Set_Shared_Var_Procs_Instance;
4997 procedure Set_Size_Check_Code (Id : E; V : N) is
4999 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5001 end Set_Size_Check_Code;
5003 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5005 Set_Flag177 (Id, V);
5006 end Set_Size_Depends_On_Discriminant;
5008 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5011 end Set_Size_Known_At_Compile_Time;
5013 procedure Set_Small_Value (Id : E; V : R) is
5015 pragma Assert (Is_Fixed_Point_Type (Id));
5016 Set_Ureal21 (Id, V);
5017 end Set_Small_Value;
5019 procedure Set_Spec_Entity (Id : E; V : E) is
5021 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5023 end Set_Spec_Entity;
5025 procedure Set_Spec_PPC_List (Id : E; V : N) is
5027 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
5029 end Set_Spec_PPC_List;
5031 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5033 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5034 pragma Assert (Id = Base_Type (Id));
5036 end Set_Storage_Size_Variable;
5038 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5040 pragma Assert (Ekind (Id) = E_Package);
5042 end Set_Static_Elaboration_Desired;
5044 procedure Set_Static_Initialization (Id : E; V : N) is
5047 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5049 end Set_Static_Initialization;
5051 procedure Set_Stored_Constraint (Id : E; V : L) is
5053 pragma Assert (Nkind (Id) in N_Entity);
5054 Set_Elist23 (Id, V);
5055 end Set_Stored_Constraint;
5057 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5059 pragma Assert (Id = Base_Type (Id));
5060 Set_Flag145 (Id, V);
5061 end Set_Strict_Alignment;
5063 procedure Set_String_Literal_Length (Id : E; V : U) is
5065 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5067 end Set_String_Literal_Length;
5069 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5071 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5073 end Set_String_Literal_Low_Bound;
5075 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5077 Set_Flag148 (Id, V);
5078 end Set_Suppress_Elaboration_Warnings;
5080 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5082 pragma Assert (Id = Base_Type (Id));
5083 Set_Flag105 (Id, V);
5084 end Set_Suppress_Init_Proc;
5086 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5088 Set_Flag165 (Id, V);
5089 end Set_Suppress_Style_Checks;
5091 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5093 Set_Flag217 (Id, V);
5094 end Set_Suppress_Value_Tracking_On_Call;
5096 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5098 pragma Assert (Ekind (Id) in Task_Kind);
5100 end Set_Task_Body_Procedure;
5102 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5105 end Set_Treat_As_Volatile;
5107 procedure Set_Underlying_Full_View (Id : E; V : E) is
5109 pragma Assert (Ekind (Id) in Private_Kind);
5111 end Set_Underlying_Full_View;
5113 procedure Set_Underlying_Record_View (Id : E; V : E) is
5115 pragma Assert (Ekind (Id) = E_Record_Type);
5117 end Set_Underlying_Record_View;
5119 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5121 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5122 Set_Flag216 (Id, V);
5123 end Set_Universal_Aliasing;
5125 procedure Set_Unset_Reference (Id : E; V : N) is
5128 end Set_Unset_Reference;
5130 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5133 end Set_Uses_Sec_Stack;
5135 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5137 Set_Flag222 (Id, V);
5138 end Set_Used_As_Generic_Actual;
5140 procedure Set_Vax_Float (Id : E; V : B := True) is
5142 pragma Assert (Id = Base_Type (Id));
5143 Set_Flag151 (Id, V);
5146 procedure Set_Warnings_Off (Id : E; V : B := True) is
5149 end Set_Warnings_Off;
5151 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5153 Set_Flag236 (Id, V);
5154 end Set_Warnings_Off_Used;
5156 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5158 Set_Flag237 (Id, V);
5159 end Set_Warnings_Off_Used_Unmodified;
5161 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5163 Set_Flag238 (Id, V);
5164 end Set_Warnings_Off_Used_Unreferenced;
5166 procedure Set_Was_Hidden (Id : E; V : B := True) is
5168 Set_Flag196 (Id, V);
5171 procedure Set_Wrapped_Entity (Id : E; V : E) is
5173 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5174 and then Is_Primitive_Wrapper (Id));
5176 end Set_Wrapped_Entity;
5178 -----------------------------------
5179 -- Field Initialization Routines --
5180 -----------------------------------
5182 procedure Init_Alignment (Id : E) is
5184 Set_Uint14 (Id, Uint_0);
5187 procedure Init_Alignment (Id : E; V : Int) is
5189 Set_Uint14 (Id, UI_From_Int (V));
5192 procedure Init_Component_Bit_Offset (Id : E) is
5194 Set_Uint11 (Id, No_Uint);
5195 end Init_Component_Bit_Offset;
5197 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5199 Set_Uint11 (Id, UI_From_Int (V));
5200 end Init_Component_Bit_Offset;
5202 procedure Init_Component_Size (Id : E) is
5204 Set_Uint22 (Id, Uint_0);
5205 end Init_Component_Size;
5207 procedure Init_Component_Size (Id : E; V : Int) is
5209 Set_Uint22 (Id, UI_From_Int (V));
5210 end Init_Component_Size;
5212 procedure Init_Digits_Value (Id : E) is
5214 Set_Uint17 (Id, Uint_0);
5215 end Init_Digits_Value;
5217 procedure Init_Digits_Value (Id : E; V : Int) is
5219 Set_Uint17 (Id, UI_From_Int (V));
5220 end Init_Digits_Value;
5222 procedure Init_Esize (Id : E) is
5224 Set_Uint12 (Id, Uint_0);
5227 procedure Init_Esize (Id : E; V : Int) is
5229 Set_Uint12 (Id, UI_From_Int (V));
5232 procedure Init_Normalized_First_Bit (Id : E) is
5234 Set_Uint8 (Id, No_Uint);
5235 end Init_Normalized_First_Bit;
5237 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5239 Set_Uint8 (Id, UI_From_Int (V));
5240 end Init_Normalized_First_Bit;
5242 procedure Init_Normalized_Position (Id : E) is
5244 Set_Uint14 (Id, No_Uint);
5245 end Init_Normalized_Position;
5247 procedure Init_Normalized_Position (Id : E; V : Int) is
5249 Set_Uint14 (Id, UI_From_Int (V));
5250 end Init_Normalized_Position;
5252 procedure Init_Normalized_Position_Max (Id : E) is
5254 Set_Uint10 (Id, No_Uint);
5255 end Init_Normalized_Position_Max;
5257 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5259 Set_Uint10 (Id, UI_From_Int (V));
5260 end Init_Normalized_Position_Max;
5262 procedure Init_RM_Size (Id : E) is
5264 Set_Uint13 (Id, Uint_0);
5267 procedure Init_RM_Size (Id : E; V : Int) is
5269 Set_Uint13 (Id, UI_From_Int (V));
5272 -----------------------------
5273 -- Init_Component_Location --
5274 -----------------------------
5276 procedure Init_Component_Location (Id : E) is
5278 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5279 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5280 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5281 Set_Uint12 (Id, Uint_0); -- Esize
5282 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5283 end Init_Component_Location;
5289 procedure Init_Size (Id : E; V : Int) is
5291 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5292 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5295 ---------------------
5296 -- Init_Size_Align --
5297 ---------------------
5299 procedure Init_Size_Align (Id : E) is
5301 Set_Uint12 (Id, Uint_0); -- Esize
5302 Set_Uint13 (Id, Uint_0); -- RM_Size
5303 Set_Uint14 (Id, Uint_0); -- Alignment
5304 end Init_Size_Align;
5306 ----------------------------------------------
5307 -- Type Representation Attribute Predicates --
5308 ----------------------------------------------
5310 function Known_Alignment (E : Entity_Id) return B is
5312 return Uint14 (E) /= Uint_0
5313 and then Uint14 (E) /= No_Uint;
5314 end Known_Alignment;
5316 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5318 return Uint11 (E) /= No_Uint;
5319 end Known_Component_Bit_Offset;
5321 function Known_Component_Size (E : Entity_Id) return B is
5323 return Uint22 (Base_Type (E)) /= Uint_0
5324 and then Uint22 (Base_Type (E)) /= No_Uint;
5325 end Known_Component_Size;
5327 function Known_Esize (E : Entity_Id) return B is
5329 return Uint12 (E) /= Uint_0
5330 and then Uint12 (E) /= No_Uint;
5333 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5335 return Uint8 (E) /= No_Uint;
5336 end Known_Normalized_First_Bit;
5338 function Known_Normalized_Position (E : Entity_Id) return B is
5340 return Uint14 (E) /= No_Uint;
5341 end Known_Normalized_Position;
5343 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5345 return Uint10 (E) /= No_Uint;
5346 end Known_Normalized_Position_Max;
5348 function Known_RM_Size (E : Entity_Id) return B is
5350 return Uint13 (E) /= No_Uint
5351 and then (Uint13 (E) /= Uint_0
5352 or else Is_Discrete_Type (E)
5353 or else Is_Fixed_Point_Type (E));
5356 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5358 return Uint11 (E) /= No_Uint
5359 and then Uint11 (E) >= Uint_0;
5360 end Known_Static_Component_Bit_Offset;
5362 function Known_Static_Component_Size (E : Entity_Id) return B is
5364 return Uint22 (Base_Type (E)) > Uint_0;
5365 end Known_Static_Component_Size;
5367 function Known_Static_Esize (E : Entity_Id) return B is
5369 return Uint12 (E) > Uint_0;
5370 end Known_Static_Esize;
5372 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5374 return Uint8 (E) /= No_Uint
5375 and then Uint8 (E) >= Uint_0;
5376 end Known_Static_Normalized_First_Bit;
5378 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5380 return Uint14 (E) /= No_Uint
5381 and then Uint14 (E) >= Uint_0;
5382 end Known_Static_Normalized_Position;
5384 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5386 return Uint10 (E) /= No_Uint
5387 and then Uint10 (E) >= Uint_0;
5388 end Known_Static_Normalized_Position_Max;
5390 function Known_Static_RM_Size (E : Entity_Id) return B is
5392 return Uint13 (E) > Uint_0
5393 or else Is_Discrete_Type (E)
5394 or else Is_Fixed_Point_Type (E);
5395 end Known_Static_RM_Size;
5397 function Unknown_Alignment (E : Entity_Id) return B is
5399 return Uint14 (E) = Uint_0
5400 or else Uint14 (E) = No_Uint;
5401 end Unknown_Alignment;
5403 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5405 return Uint11 (E) = No_Uint;
5406 end Unknown_Component_Bit_Offset;
5408 function Unknown_Component_Size (E : Entity_Id) return B is
5410 return Uint22 (Base_Type (E)) = Uint_0
5412 Uint22 (Base_Type (E)) = No_Uint;
5413 end Unknown_Component_Size;
5415 function Unknown_Esize (E : Entity_Id) return B is
5417 return Uint12 (E) = No_Uint
5419 Uint12 (E) = Uint_0;
5422 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5424 return Uint8 (E) = No_Uint;
5425 end Unknown_Normalized_First_Bit;
5427 function Unknown_Normalized_Position (E : Entity_Id) return B is
5429 return Uint14 (E) = No_Uint;
5430 end Unknown_Normalized_Position;
5432 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5434 return Uint10 (E) = No_Uint;
5435 end Unknown_Normalized_Position_Max;
5437 function Unknown_RM_Size (E : Entity_Id) return B is
5439 return (Uint13 (E) = Uint_0
5440 and then not Is_Discrete_Type (E)
5441 and then not Is_Fixed_Point_Type (E))
5442 or else Uint13 (E) = No_Uint;
5443 end Unknown_RM_Size;
5445 --------------------
5446 -- Address_Clause --
5447 --------------------
5449 function Address_Clause (Id : E) return N is
5451 return Rep_Clause (Id, Name_Address);
5454 ----------------------
5455 -- Alignment_Clause --
5456 ----------------------
5458 function Alignment_Clause (Id : E) return N is
5460 return Rep_Clause (Id, Name_Alignment);
5461 end Alignment_Clause;
5467 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5469 if Last_Entity (V) = Empty then
5470 Set_First_Entity (Id => V, V => Id);
5472 Set_Next_Entity (Last_Entity (V), Id);
5475 Set_Next_Entity (Id, Empty);
5477 Set_Last_Entity (Id => V, V => Id);
5484 function Base_Type (Id : E) return E is
5487 when E_Enumeration_Subtype |
5489 E_Signed_Integer_Subtype |
5490 E_Modular_Integer_Subtype |
5491 E_Floating_Point_Subtype |
5492 E_Ordinary_Fixed_Point_Subtype |
5493 E_Decimal_Fixed_Point_Subtype |
5498 E_Record_Subtype_With_Private |
5499 E_Limited_Private_Subtype |
5501 E_Protected_Subtype |
5503 E_String_Literal_Subtype |
5504 E_Class_Wide_Subtype =>
5512 -------------------------
5513 -- Component_Alignment --
5514 -------------------------
5516 -- Component Alignment is encoded using two flags, Flag128/129 as
5517 -- follows. Note that both flags False = Align_Default, so that the
5518 -- default initialization of flags to False initializes component
5519 -- alignment to the default value as required.
5521 -- Flag128 Flag129 Value
5522 -- ------- ------- -----
5523 -- False False Calign_Default
5524 -- False True Calign_Component_Size
5525 -- True False Calign_Component_Size_4
5526 -- True True Calign_Storage_Unit
5528 function Component_Alignment (Id : E) return C is
5529 BT : constant Node_Id := Base_Type (Id);
5532 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5534 if Flag128 (BT) then
5535 if Flag129 (BT) then
5536 return Calign_Storage_Unit;
5538 return Calign_Component_Size_4;
5542 if Flag129 (BT) then
5543 return Calign_Component_Size;
5545 return Calign_Default;
5548 end Component_Alignment;
5550 ----------------------
5551 -- Declaration_Node --
5552 ----------------------
5554 function Declaration_Node (Id : E) return N is
5558 if Ekind (Id) = E_Incomplete_Type
5559 and then Present (Full_View (Id))
5561 P := Parent (Full_View (Id));
5567 if Nkind (P) /= N_Selected_Component
5568 and then Nkind (P) /= N_Expanded_Name
5570 not (Nkind (P) = N_Defining_Program_Unit_Name
5571 and then Is_Child_Unit (Id))
5578 end Declaration_Node;
5580 ---------------------
5581 -- Designated_Type --
5582 ---------------------
5584 function Designated_Type (Id : E) return E is
5588 Desig_Type := Directly_Designated_Type (Id);
5590 if Ekind (Desig_Type) = E_Incomplete_Type
5591 and then Present (Full_View (Desig_Type))
5593 return Full_View (Desig_Type);
5595 elsif Is_Class_Wide_Type (Desig_Type)
5596 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5597 and then Present (Full_View (Etype (Desig_Type)))
5598 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5600 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5605 end Designated_Type;
5607 ----------------------
5608 -- Entry_Index_Type --
5609 ----------------------
5611 function Entry_Index_Type (Id : E) return N is
5613 pragma Assert (Ekind (Id) = E_Entry_Family);
5614 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5615 end Entry_Index_Type;
5617 ---------------------
5618 -- First_Component --
5619 ---------------------
5621 function First_Component (Id : E) return E is
5626 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5628 Comp_Id := First_Entity (Id);
5629 while Present (Comp_Id) loop
5630 exit when Ekind (Comp_Id) = E_Component;
5631 Comp_Id := Next_Entity (Comp_Id);
5635 end First_Component;
5637 -------------------------------------
5638 -- First_Component_Or_Discriminant --
5639 -------------------------------------
5641 function First_Component_Or_Discriminant (Id : E) return E is
5646 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5648 Comp_Id := First_Entity (Id);
5649 while Present (Comp_Id) loop
5650 exit when Ekind (Comp_Id) = E_Component
5652 Ekind (Comp_Id) = E_Discriminant;
5653 Comp_Id := Next_Entity (Comp_Id);
5657 end First_Component_Or_Discriminant;
5663 function First_Formal (Id : E) return E is
5668 (Is_Overloadable (Id)
5669 or else Ekind_In (Id, E_Entry_Family,
5671 E_Subprogram_Type));
5673 if Ekind (Id) = E_Enumeration_Literal then
5677 Formal := First_Entity (Id);
5679 if Present (Formal) and then Is_Formal (Formal) then
5687 ------------------------------
5688 -- First_Formal_With_Extras --
5689 ------------------------------
5691 function First_Formal_With_Extras (Id : E) return E is
5696 (Is_Overloadable (Id)
5697 or else Ekind_In (Id, E_Entry_Family,
5699 E_Subprogram_Type));
5701 if Ekind (Id) = E_Enumeration_Literal then
5705 Formal := First_Entity (Id);
5707 if Present (Formal) and then Is_Formal (Formal) then
5710 return Extra_Formals (Id); -- Empty if no extra formals
5713 end First_Formal_With_Extras;
5715 -------------------------------------
5716 -- Get_Attribute_Definition_Clause --
5717 -------------------------------------
5719 function Get_Attribute_Definition_Clause
5721 Id : Attribute_Id) return Node_Id
5726 N := First_Rep_Item (E);
5727 while Present (N) loop
5728 if Nkind (N) = N_Attribute_Definition_Clause
5729 and then Get_Attribute_Id (Chars (N)) = Id
5738 end Get_Attribute_Definition_Clause;
5744 function Get_Full_View (T : Entity_Id) return Entity_Id is
5746 if Ekind (T) = E_Incomplete_Type
5747 and then Present (Full_View (T))
5749 return Full_View (T);
5751 elsif Is_Class_Wide_Type (T)
5752 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5753 and then Present (Full_View (Root_Type (T)))
5755 return Class_Wide_Type (Full_View (Root_Type (T)));
5762 --------------------
5763 -- Get_Rep_Pragma --
5764 --------------------
5766 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5770 N := First_Rep_Item (E);
5771 while Present (N) loop
5772 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5782 ------------------------
5783 -- Has_Attach_Handler --
5784 ------------------------
5786 function Has_Attach_Handler (Id : E) return B is
5790 pragma Assert (Is_Protected_Type (Id));
5792 Ritem := First_Rep_Item (Id);
5793 while Present (Ritem) loop
5794 if Nkind (Ritem) = N_Pragma
5795 and then Pragma_Name (Ritem) = Name_Attach_Handler
5799 Ritem := Next_Rep_Item (Ritem);
5804 end Has_Attach_Handler;
5806 -------------------------------------
5807 -- Has_Attribute_Definition_Clause --
5808 -------------------------------------
5810 function Has_Attribute_Definition_Clause
5812 Id : Attribute_Id) return Boolean
5815 return Present (Get_Attribute_Definition_Clause (E, Id));
5816 end Has_Attribute_Definition_Clause;
5822 function Has_Entries (Id : E) return B is
5826 pragma Assert (Is_Concurrent_Type (Id));
5828 Ent := First_Entity (Id);
5829 while Present (Ent) loop
5830 if Is_Entry (Ent) then
5834 Ent := Next_Entity (Ent);
5840 ----------------------------
5841 -- Has_Foreign_Convention --
5842 ----------------------------
5844 function Has_Foreign_Convention (Id : E) return B is
5846 return Convention (Id) in Foreign_Convention;
5847 end Has_Foreign_Convention;
5849 ---------------------------
5850 -- Has_Interrupt_Handler --
5851 ---------------------------
5853 function Has_Interrupt_Handler (Id : E) return B is
5857 pragma Assert (Is_Protected_Type (Id));
5859 Ritem := First_Rep_Item (Id);
5860 while Present (Ritem) loop
5861 if Nkind (Ritem) = N_Pragma
5862 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
5866 Ritem := Next_Rep_Item (Ritem);
5871 end Has_Interrupt_Handler;
5873 --------------------------
5874 -- Has_Private_Ancestor --
5875 --------------------------
5877 function Has_Private_Ancestor (Id : E) return B is
5878 R : constant Entity_Id := Root_Type (Id);
5879 T1 : Entity_Id := Id;
5882 if Is_Private_Type (T1) then
5890 end Has_Private_Ancestor;
5892 --------------------
5893 -- Has_Rep_Pragma --
5894 --------------------
5896 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5898 return Present (Get_Rep_Pragma (E, Nam));
5901 --------------------
5902 -- Has_Unmodified --
5903 --------------------
5905 function Has_Unmodified (E : Entity_Id) return Boolean is
5907 if Has_Pragma_Unmodified (E) then
5909 elsif Warnings_Off (E) then
5910 Set_Warnings_Off_Used_Unmodified (E);
5917 ---------------------
5918 -- Has_Unreferenced --
5919 ---------------------
5921 function Has_Unreferenced (E : Entity_Id) return Boolean is
5923 if Has_Pragma_Unreferenced (E) then
5925 elsif Warnings_Off (E) then
5926 Set_Warnings_Off_Used_Unreferenced (E);
5931 end Has_Unreferenced;
5933 ----------------------
5934 -- Has_Warnings_Off --
5935 ----------------------
5937 function Has_Warnings_Off (E : Entity_Id) return Boolean is
5939 if Warnings_Off (E) then
5940 Set_Warnings_Off_Used (E);
5945 end Has_Warnings_Off;
5947 ------------------------------
5948 -- Implementation_Base_Type --
5949 ------------------------------
5951 function Implementation_Base_Type (Id : E) return E is
5956 Bastyp := Base_Type (Id);
5958 if Is_Incomplete_Or_Private_Type (Bastyp) then
5959 Imptyp := Underlying_Type (Bastyp);
5961 -- If we have an implementation type, then just return it,
5962 -- otherwise we return the Base_Type anyway. This can only
5963 -- happen in error situations and should avoid some error bombs.
5965 if Present (Imptyp) then
5966 return Base_Type (Imptyp);
5974 end Implementation_Base_Type;
5976 ---------------------
5977 -- Is_Boolean_Type --
5978 ---------------------
5980 function Is_Boolean_Type (Id : E) return B is
5982 return Root_Type (Id) = Standard_Boolean;
5983 end Is_Boolean_Type;
5985 ------------------------
5986 -- Is_Constant_Object --
5987 ------------------------
5989 function Is_Constant_Object (Id : E) return B is
5990 K : constant Entity_Kind := Ekind (Id);
5993 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
5994 end Is_Constant_Object;
5996 --------------------
5997 -- Is_Discriminal --
5998 --------------------
6000 function Is_Discriminal (Id : E) return B is
6002 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6003 and then Present (Discriminal_Link (Id)));
6006 ----------------------
6007 -- Is_Dynamic_Scope --
6008 ----------------------
6010 function Is_Dynamic_Scope (Id : E) return B is
6013 Ekind (Id) = E_Block
6015 Ekind (Id) = E_Function
6017 Ekind (Id) = E_Procedure
6019 Ekind (Id) = E_Subprogram_Body
6021 Ekind (Id) = E_Task_Type
6023 Ekind (Id) = E_Entry
6025 Ekind (Id) = E_Entry_Family
6027 Ekind (Id) = E_Return_Statement;
6028 end Is_Dynamic_Scope;
6030 --------------------
6031 -- Is_Entity_Name --
6032 --------------------
6034 function Is_Entity_Name (N : Node_Id) return Boolean is
6035 Kind : constant Node_Kind := Nkind (N);
6038 -- Identifiers, operator symbols, expanded names are entity names
6040 return Kind = N_Identifier
6041 or else Kind = N_Operator_Symbol
6042 or else Kind = N_Expanded_Name
6044 -- Attribute references are entity names if they refer to an entity.
6045 -- Note that we don't do this by testing for the presence of the
6046 -- Entity field in the N_Attribute_Reference node, since it may not
6047 -- have been set yet.
6049 or else (Kind = N_Attribute_Reference
6050 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6053 -----------------------------------
6054 -- Is_Package_Or_Generic_Package --
6055 -----------------------------------
6057 function Is_Package_Or_Generic_Package (Id : E) return B is
6060 Ekind (Id) = E_Package
6062 Ekind (Id) = E_Generic_Package;
6063 end Is_Package_Or_Generic_Package;
6069 function Is_Prival (Id : E) return B is
6071 return (Ekind_In (Id, E_Constant, E_Variable)
6072 and then Present (Prival_Link (Id)));
6075 ----------------------------
6076 -- Is_Protected_Component --
6077 ----------------------------
6079 function Is_Protected_Component (Id : E) return B is
6081 return Ekind (Id) = E_Component
6082 and then Is_Protected_Type (Scope (Id));
6083 end Is_Protected_Component;
6085 ------------------------------
6086 -- Is_Protected_Record_Type --
6087 ------------------------------
6089 function Is_Protected_Record_Type (Id : E) return B is
6092 Is_Concurrent_Record_Type (Id)
6093 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6094 end Is_Protected_Record_Type;
6096 --------------------------------
6097 -- Is_Standard_Character_Type --
6098 --------------------------------
6100 function Is_Standard_Character_Type (Id : E) return B is
6102 if Is_Type (Id) then
6104 R : constant Entity_Id := Root_Type (Id);
6107 R = Standard_Character
6109 R = Standard_Wide_Character
6111 R = Standard_Wide_Wide_Character;
6117 end Is_Standard_Character_Type;
6119 --------------------
6120 -- Is_String_Type --
6121 --------------------
6123 function Is_String_Type (Id : E) return B is
6125 return Ekind (Id) in String_Kind
6126 or else (Is_Array_Type (Id)
6127 and then Number_Dimensions (Id) = 1
6128 and then Is_Character_Type (Component_Type (Id)));
6131 -------------------------
6132 -- Is_Task_Record_Type --
6133 -------------------------
6135 function Is_Task_Record_Type (Id : E) return B is
6138 Is_Concurrent_Record_Type (Id)
6139 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6140 end Is_Task_Record_Type;
6142 ------------------------
6143 -- Is_Wrapper_Package --
6144 ------------------------
6146 function Is_Wrapper_Package (Id : E) return B is
6148 return (Ekind (Id) = E_Package
6149 and then Present (Related_Instance (Id)));
6150 end Is_Wrapper_Package;
6152 --------------------
6153 -- Next_Component --
6154 --------------------
6156 function Next_Component (Id : E) return E is
6160 Comp_Id := Next_Entity (Id);
6161 while Present (Comp_Id) loop
6162 exit when Ekind (Comp_Id) = E_Component;
6163 Comp_Id := Next_Entity (Comp_Id);
6169 ------------------------------------
6170 -- Next_Component_Or_Discriminant --
6171 ------------------------------------
6173 function Next_Component_Or_Discriminant (Id : E) return E is
6177 Comp_Id := Next_Entity (Id);
6178 while Present (Comp_Id) loop
6179 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6180 Comp_Id := Next_Entity (Comp_Id);
6184 end Next_Component_Or_Discriminant;
6186 -----------------------
6187 -- Next_Discriminant --
6188 -----------------------
6190 -- This function actually implements both Next_Discriminant and
6191 -- Next_Stored_Discriminant by making sure that the Discriminant
6192 -- returned is of the same variety as Id.
6194 function Next_Discriminant (Id : E) return E is
6196 -- Derived Tagged types with private extensions look like this...
6198 -- E_Discriminant d1
6199 -- E_Discriminant d2
6201 -- E_Discriminant d1
6202 -- E_Discriminant d2
6205 -- so it is critical not to go past the leading discriminants
6210 pragma Assert (Ekind (Id) = E_Discriminant);
6213 D := Next_Entity (D);
6215 or else (Ekind (D) /= E_Discriminant
6216 and then not Is_Itype (D))
6221 exit when Ekind (D) = E_Discriminant
6222 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6226 end Next_Discriminant;
6232 function Next_Formal (Id : E) return E is
6236 -- Follow the chain of declared entities as long as the kind of the
6237 -- entity corresponds to a formal parameter. Skip internal entities
6238 -- that may have been created for implicit subtypes, in the process
6239 -- of analyzing default expressions.
6244 P := Next_Entity (P);
6246 if No (P) or else Is_Formal (P) then
6248 elsif not Is_Internal (P) then
6254 -----------------------------
6255 -- Next_Formal_With_Extras --
6256 -----------------------------
6258 function Next_Formal_With_Extras (Id : E) return E is
6260 if Present (Extra_Formal (Id)) then
6261 return Extra_Formal (Id);
6263 return Next_Formal (Id);
6265 end Next_Formal_With_Extras;
6271 function Next_Index (Id : Node_Id) return Node_Id is
6280 function Next_Literal (Id : E) return E is
6282 pragma Assert (Nkind (Id) in N_Entity);
6286 ------------------------------
6287 -- Next_Stored_Discriminant --
6288 ------------------------------
6290 function Next_Stored_Discriminant (Id : E) return E is
6292 -- See comment in Next_Discriminant
6294 return Next_Discriminant (Id);
6295 end Next_Stored_Discriminant;
6297 -----------------------
6298 -- Number_Dimensions --
6299 -----------------------
6301 function Number_Dimensions (Id : E) return Pos is
6306 if Ekind (Id) in String_Kind then
6311 T := First_Index (Id);
6312 while Present (T) loop
6319 end Number_Dimensions;
6321 --------------------
6322 -- Number_Entries --
6323 --------------------
6325 function Number_Entries (Id : E) return Nat is
6330 pragma Assert (Is_Concurrent_Type (Id));
6333 Ent := First_Entity (Id);
6334 while Present (Ent) loop
6335 if Is_Entry (Ent) then
6339 Ent := Next_Entity (Ent);
6345 --------------------
6346 -- Number_Formals --
6347 --------------------
6349 function Number_Formals (Id : E) return Pos is
6355 Formal := First_Formal (Id);
6356 while Present (Formal) loop
6358 Formal := Next_Formal (Formal);
6364 --------------------
6365 -- Parameter_Mode --
6366 --------------------
6368 function Parameter_Mode (Id : E) return Formal_Kind is
6373 ---------------------
6374 -- Record_Rep_Item --
6375 ---------------------
6377 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6379 Set_Next_Rep_Item (N, First_Rep_Item (E));
6380 Set_First_Rep_Item (E, N);
6381 end Record_Rep_Item;
6387 function Root_Type (Id : E) return E is
6391 pragma Assert (Nkind (Id) in N_Entity);
6393 T := Base_Type (Id);
6395 if Ekind (T) = E_Class_Wide_Type then
6398 elsif Ekind (T) = E_Class_Wide_Subtype then
6399 return Etype (Base_Type (T));
6401 -- ??? T comes from Base_Type, how can it be a subtype?
6402 -- Also Base_Type is supposed to be idempotent, so either way
6403 -- this is equivalent to "return Etype (T)" and should be merged
6404 -- with the E_Class_Wide_Type case.
6415 -- Following test catches some error cases resulting from
6418 elsif No (Etyp) then
6421 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6424 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6430 -- Return if there is a circularity in the inheritance chain. This
6431 -- happens in some error situations and we do not want to get
6432 -- stuck in this loop.
6434 if T = Base_Type (Id) then
6445 function Scope_Depth (Id : E) return Uint is
6450 while Is_Record_Type (Scop) loop
6451 Scop := Scope (Scop);
6454 return Scope_Depth_Value (Scop);
6457 ---------------------
6458 -- Scope_Depth_Set --
6459 ---------------------
6461 function Scope_Depth_Set (Id : E) return B is
6463 return not Is_Record_Type (Id)
6464 and then Field22 (Id) /= Union_Id (Empty);
6465 end Scope_Depth_Set;
6467 -----------------------------
6468 -- Set_Component_Alignment --
6469 -----------------------------
6471 -- Component Alignment is encoded using two flags, Flag128/129 as
6472 -- follows. Note that both flags False = Align_Default, so that the
6473 -- default initialization of flags to False initializes component
6474 -- alignment to the default value as required.
6476 -- Flag128 Flag129 Value
6477 -- ------- ------- -----
6478 -- False False Calign_Default
6479 -- False True Calign_Component_Size
6480 -- True False Calign_Component_Size_4
6481 -- True True Calign_Storage_Unit
6483 procedure Set_Component_Alignment (Id : E; V : C) is
6485 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6486 and then Id = Base_Type (Id));
6489 when Calign_Default =>
6490 Set_Flag128 (Id, False);
6491 Set_Flag129 (Id, False);
6493 when Calign_Component_Size =>
6494 Set_Flag128 (Id, False);
6495 Set_Flag129 (Id, True);
6497 when Calign_Component_Size_4 =>
6498 Set_Flag128 (Id, True);
6499 Set_Flag129 (Id, False);
6501 when Calign_Storage_Unit =>
6502 Set_Flag128 (Id, True);
6503 Set_Flag129 (Id, True);
6505 end Set_Component_Alignment;
6511 function Size_Clause (Id : E) return N is
6513 return Rep_Clause (Id, Name_Size);
6516 ------------------------
6517 -- Stream_Size_Clause --
6518 ------------------------
6520 function Stream_Size_Clause (Id : E) return N is
6522 return Rep_Clause (Id, Name_Stream_Size);
6523 end Stream_Size_Clause;
6529 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6535 Kind := E_Access_Subtype;
6539 Kind := E_Array_Subtype;
6541 when E_Class_Wide_Type |
6542 E_Class_Wide_Subtype =>
6543 Kind := E_Class_Wide_Subtype;
6545 when E_Decimal_Fixed_Point_Type |
6546 E_Decimal_Fixed_Point_Subtype =>
6547 Kind := E_Decimal_Fixed_Point_Subtype;
6549 when E_Ordinary_Fixed_Point_Type |
6550 E_Ordinary_Fixed_Point_Subtype =>
6551 Kind := E_Ordinary_Fixed_Point_Subtype;
6553 when E_Private_Type |
6554 E_Private_Subtype =>
6555 Kind := E_Private_Subtype;
6557 when E_Limited_Private_Type |
6558 E_Limited_Private_Subtype =>
6559 Kind := E_Limited_Private_Subtype;
6561 when E_Record_Type_With_Private |
6562 E_Record_Subtype_With_Private =>
6563 Kind := E_Record_Subtype_With_Private;
6565 when E_Record_Type |
6567 Kind := E_Record_Subtype;
6569 when E_String_Type |
6571 Kind := E_String_Subtype;
6573 when Enumeration_Kind =>
6574 Kind := E_Enumeration_Subtype;
6577 Kind := E_Floating_Point_Subtype;
6579 when Signed_Integer_Kind =>
6580 Kind := E_Signed_Integer_Subtype;
6582 when Modular_Integer_Kind =>
6583 Kind := E_Modular_Integer_Subtype;
6585 when Protected_Kind =>
6586 Kind := E_Protected_Subtype;
6589 Kind := E_Task_Subtype;
6593 raise Program_Error;
6599 ---------------------
6600 -- Type_High_Bound --
6601 ---------------------
6603 function Type_High_Bound (Id : E) return Node_Id is
6604 Rng : constant Node_Id := Scalar_Range (Id);
6606 if Nkind (Rng) = N_Subtype_Indication then
6607 return High_Bound (Range_Expression (Constraint (Rng)));
6609 return High_Bound (Rng);
6611 end Type_High_Bound;
6613 --------------------
6614 -- Type_Low_Bound --
6615 --------------------
6617 function Type_Low_Bound (Id : E) return Node_Id is
6618 Rng : constant Node_Id := Scalar_Range (Id);
6620 if Nkind (Rng) = N_Subtype_Indication then
6621 return Low_Bound (Range_Expression (Constraint (Rng)));
6623 return Low_Bound (Rng);
6627 ---------------------
6628 -- Underlying_Type --
6629 ---------------------
6631 function Underlying_Type (Id : E) return E is
6633 -- For record_with_private the underlying type is always the direct
6634 -- full view. Never try to take the full view of the parent it
6635 -- doesn't make sense.
6637 if Ekind (Id) = E_Record_Type_With_Private then
6638 return Full_View (Id);
6640 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6642 -- If we have an incomplete or private type with a full view,
6643 -- then we return the Underlying_Type of this full view
6645 if Present (Full_View (Id)) then
6646 if Id = Full_View (Id) then
6648 -- Previous error in declaration
6653 return Underlying_Type (Full_View (Id));
6656 -- If we have an incomplete entity that comes from the limited
6657 -- view then we return the Underlying_Type of its non-limited
6660 elsif From_With_Type (Id)
6661 and then Present (Non_Limited_View (Id))
6663 return Underlying_Type (Non_Limited_View (Id));
6665 -- Otherwise check for the case where we have a derived type or
6666 -- subtype, and if so get the Underlying_Type of the parent type.
6668 elsif Etype (Id) /= Id then
6669 return Underlying_Type (Etype (Id));
6671 -- Otherwise we have an incomplete or private type that has
6672 -- no full view, which means that we have not encountered the
6673 -- completion, so return Empty to indicate the underlying type
6674 -- is not yet known.
6680 -- For non-incomplete, non-private types, return the type itself
6681 -- Also for entities that are not types at all return the entity
6687 end Underlying_Type;
6689 ------------------------
6690 -- Write_Entity_Flags --
6691 ------------------------
6693 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
6695 procedure W (Flag_Name : String; Flag : Boolean);
6696 -- Write out given flag if it is set
6702 procedure W (Flag_Name : String; Flag : Boolean) is
6706 Write_Str (Flag_Name);
6707 Write_Str (" = True");
6712 -- Start of processing for Write_Entity_Flags
6715 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
6716 and then Id = Base_Type (Id)
6719 Write_Str ("Component_Alignment = ");
6721 case Component_Alignment (Id) is
6722 when Calign_Default =>
6723 Write_Str ("Calign_Default");
6725 when Calign_Component_Size =>
6726 Write_Str ("Calign_Component_Size");
6728 when Calign_Component_Size_4 =>
6729 Write_Str ("Calign_Component_Size_4");
6731 when Calign_Storage_Unit =>
6732 Write_Str ("Calign_Storage_Unit");
6738 W ("Address_Taken", Flag104 (Id));
6739 W ("Body_Needed_For_SAL", Flag40 (Id));
6740 W ("C_Pass_By_Copy", Flag125 (Id));
6741 W ("Can_Never_Be_Null", Flag38 (Id));
6742 W ("Checks_May_Be_Suppressed", Flag31 (Id));
6743 W ("Debug_Info_Off", Flag166 (Id));
6744 W ("Default_Expressions_Processed", Flag108 (Id));
6745 W ("Delay_Cleanups", Flag114 (Id));
6746 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
6747 W ("Depends_On_Private", Flag14 (Id));
6748 W ("Discard_Names", Flag88 (Id));
6749 W ("Elaboration_Entity_Required", Flag174 (Id));
6750 W ("Elaborate_Body_Desirable", Flag210 (Id));
6751 W ("Entry_Accepted", Flag152 (Id));
6752 W ("Can_Use_Internal_Rep", Flag229 (Id));
6753 W ("Finalize_Storage_Only", Flag158 (Id));
6754 W ("From_With_Type", Flag159 (Id));
6755 W ("Has_Aliased_Components", Flag135 (Id));
6756 W ("Has_Alignment_Clause", Flag46 (Id));
6757 W ("Has_All_Calls_Remote", Flag79 (Id));
6758 W ("Has_Anon_Block_Suffix", Flag201 (Id));
6759 W ("Has_Atomic_Components", Flag86 (Id));
6760 W ("Has_Biased_Representation", Flag139 (Id));
6761 W ("Has_Completion", Flag26 (Id));
6762 W ("Has_Completion_In_Body", Flag71 (Id));
6763 W ("Has_Complex_Representation", Flag140 (Id));
6764 W ("Has_Component_Size_Clause", Flag68 (Id));
6765 W ("Has_Contiguous_Rep", Flag181 (Id));
6766 W ("Has_Controlled_Component", Flag43 (Id));
6767 W ("Has_Controlling_Result", Flag98 (Id));
6768 W ("Has_Convention_Pragma", Flag119 (Id));
6769 W ("Has_Delayed_Freeze", Flag18 (Id));
6770 W ("Has_Discriminants", Flag5 (Id));
6771 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
6772 W ("Has_Exit", Flag47 (Id));
6773 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
6774 W ("Has_Forward_Instantiation", Flag175 (Id));
6775 W ("Has_Fully_Qualified_Name", Flag173 (Id));
6776 W ("Has_Gigi_Rep_Item", Flag82 (Id));
6777 W ("Has_Homonym", Flag56 (Id));
6778 W ("Has_Initial_Value", Flag219 (Id));
6779 W ("Has_Machine_Radix_Clause", Flag83 (Id));
6780 W ("Has_Master_Entity", Flag21 (Id));
6781 W ("Has_Missing_Return", Flag142 (Id));
6782 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
6783 W ("Has_Non_Standard_Rep", Flag75 (Id));
6784 W ("Has_Object_Size_Clause", Flag172 (Id));
6785 W ("Has_Per_Object_Constraint", Flag154 (Id));
6786 W ("Has_Persistent_BSS", Flag188 (Id));
6787 W ("Has_Postconditions", Flag240 (Id));
6788 W ("Has_Pragma_Controlled", Flag27 (Id));
6789 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
6790 W ("Has_Pragma_Inline", Flag157 (Id));
6791 W ("Has_Pragma_Inline_Always", Flag230 (Id));
6792 W ("Has_Pragma_Pack", Flag121 (Id));
6793 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
6794 W ("Has_Pragma_Pure", Flag203 (Id));
6795 W ("Has_Pragma_Pure_Function", Flag179 (Id));
6796 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
6797 W ("Has_Pragma_Unmodified", Flag233 (Id));
6798 W ("Has_Pragma_Unreferenced", Flag180 (Id));
6799 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
6800 W ("Has_Primitive_Operations", Flag120 (Id));
6801 W ("Has_Private_Declaration", Flag155 (Id));
6802 W ("Has_Qualified_Name", Flag161 (Id));
6803 W ("Has_RACW", Flag214 (Id));
6804 W ("Has_Record_Rep_Clause", Flag65 (Id));
6805 W ("Has_Recursive_Call", Flag143 (Id));
6806 W ("Has_Size_Clause", Flag29 (Id));
6807 W ("Has_Small_Clause", Flag67 (Id));
6808 W ("Has_Specified_Layout", Flag100 (Id));
6809 W ("Has_Specified_Stream_Input", Flag190 (Id));
6810 W ("Has_Specified_Stream_Output", Flag191 (Id));
6811 W ("Has_Specified_Stream_Read", Flag192 (Id));
6812 W ("Has_Specified_Stream_Write", Flag193 (Id));
6813 W ("Has_Static_Discriminants", Flag211 (Id));
6814 W ("Has_Storage_Size_Clause", Flag23 (Id));
6815 W ("Has_Stream_Size_Clause", Flag184 (Id));
6816 W ("Has_Subprogram_Descriptor", Flag93 (Id));
6817 W ("Has_Task", Flag30 (Id));
6818 W ("Has_Thunks", Flag228 (Id));
6819 W ("Has_Unchecked_Union", Flag123 (Id));
6820 W ("Has_Unknown_Discriminants", Flag72 (Id));
6821 W ("Has_Up_Level_Access", Flag215 (Id));
6822 W ("Has_Volatile_Components", Flag87 (Id));
6823 W ("Has_Xref_Entry", Flag182 (Id));
6824 W ("Implemented_By_Entry", Flag232 (Id));
6825 W ("In_Package_Body", Flag48 (Id));
6826 W ("In_Private_Part", Flag45 (Id));
6827 W ("In_Use", Flag8 (Id));
6828 W ("Is_AST_Entry", Flag132 (Id));
6829 W ("Is_Abstract_Subprogram", Flag19 (Id));
6830 W ("Is_Abstract_Type", Flag146 (Id));
6831 W ("Is_Local_Anonymous_Access", Flag194 (Id));
6832 W ("Is_Access_Constant", Flag69 (Id));
6833 W ("Is_Ada_2005_Only", Flag185 (Id));
6834 W ("Is_Aliased", Flag15 (Id));
6835 W ("Is_Asynchronous", Flag81 (Id));
6836 W ("Is_Atomic", Flag85 (Id));
6837 W ("Is_Bit_Packed_Array", Flag122 (Id));
6838 W ("Is_CPP_Class", Flag74 (Id));
6839 W ("Is_Called", Flag102 (Id));
6840 W ("Is_Character_Type", Flag63 (Id));
6841 W ("Is_Child_Unit", Flag73 (Id));
6842 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
6843 W ("Is_Compilation_Unit", Flag149 (Id));
6844 W ("Is_Completely_Hidden", Flag103 (Id));
6845 W ("Is_Concurrent_Record_Type", Flag20 (Id));
6846 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
6847 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
6848 W ("Is_Constrained", Flag12 (Id));
6849 W ("Is_Constructor", Flag76 (Id));
6850 W ("Is_Controlled", Flag42 (Id));
6851 W ("Is_Controlling_Formal", Flag97 (Id));
6852 W ("Is_Descendent_Of_Address", Flag223 (Id));
6853 W ("Is_Discrim_SO_Function", Flag176 (Id));
6854 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
6855 W ("Is_Dispatching_Operation", Flag6 (Id));
6856 W ("Is_Eliminated", Flag124 (Id));
6857 W ("Is_Entry_Formal", Flag52 (Id));
6858 W ("Is_Exported", Flag99 (Id));
6859 W ("Is_First_Subtype", Flag70 (Id));
6860 W ("Is_For_Access_Subtype", Flag118 (Id));
6861 W ("Is_Formal_Subprogram", Flag111 (Id));
6862 W ("Is_Frozen", Flag4 (Id));
6863 W ("Is_Generic_Actual_Type", Flag94 (Id));
6864 W ("Is_Generic_Instance", Flag130 (Id));
6865 W ("Is_Generic_Type", Flag13 (Id));
6866 W ("Is_Hidden", Flag57 (Id));
6867 W ("Is_Hidden_Open_Scope", Flag171 (Id));
6868 W ("Is_Immediately_Visible", Flag7 (Id));
6869 W ("Is_Imported", Flag24 (Id));
6870 W ("Is_Inlined", Flag11 (Id));
6871 W ("Is_Instantiated", Flag126 (Id));
6872 W ("Is_Interface", Flag186 (Id));
6873 W ("Is_Internal", Flag17 (Id));
6874 W ("Is_Interrupt_Handler", Flag89 (Id));
6875 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
6876 W ("Is_Itype", Flag91 (Id));
6877 W ("Is_Known_Non_Null", Flag37 (Id));
6878 W ("Is_Known_Null", Flag204 (Id));
6879 W ("Is_Known_Valid", Flag170 (Id));
6880 W ("Is_Limited_Composite", Flag106 (Id));
6881 W ("Is_Limited_Interface", Flag197 (Id));
6882 W ("Is_Limited_Record", Flag25 (Id));
6883 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
6884 W ("Is_Non_Static_Subtype", Flag109 (Id));
6885 W ("Is_Null_Init_Proc", Flag178 (Id));
6886 W ("Is_Obsolescent", Flag153 (Id));
6887 W ("Is_Only_Out_Parameter", Flag226 (Id));
6888 W ("Is_Optional_Parameter", Flag134 (Id));
6889 W ("Is_Overriding_Operation", Flag39 (Id));
6890 W ("Is_Package_Body_Entity", Flag160 (Id));
6891 W ("Is_Packed", Flag51 (Id));
6892 W ("Is_Packed_Array_Type", Flag138 (Id));
6893 W ("Is_Potentially_Use_Visible", Flag9 (Id));
6894 W ("Is_Preelaborated", Flag59 (Id));
6895 W ("Is_Primitive", Flag218 (Id));
6896 W ("Is_Primitive_Wrapper", Flag195 (Id));
6897 W ("Is_Private_Composite", Flag107 (Id));
6898 W ("Is_Private_Descendant", Flag53 (Id));
6899 W ("Is_Private_Primitive", Flag245 (Id));
6900 W ("Is_Protected_Interface", Flag198 (Id));
6901 W ("Is_Public", Flag10 (Id));
6902 W ("Is_Pure", Flag44 (Id));
6903 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
6904 W ("Is_RACW_Stub_Type", Flag244 (Id));
6905 W ("Is_Raised", Flag224 (Id));
6906 W ("Is_Remote_Call_Interface", Flag62 (Id));
6907 W ("Is_Remote_Types", Flag61 (Id));
6908 W ("Is_Renaming_Of_Object", Flag112 (Id));
6909 W ("Is_Return_Object", Flag209 (Id));
6910 W ("Is_Shared_Passive", Flag60 (Id));
6911 W ("Is_Synchronized_Interface", Flag199 (Id));
6912 W ("Is_Statically_Allocated", Flag28 (Id));
6913 W ("Is_Tag", Flag78 (Id));
6914 W ("Is_Tagged_Type", Flag55 (Id));
6915 W ("Is_Task_Interface", Flag200 (Id));
6916 W ("Is_Thunk", Flag225 (Id));
6917 W ("Is_Trivial_Subprogram", Flag235 (Id));
6918 W ("Is_True_Constant", Flag163 (Id));
6919 W ("Is_Unchecked_Union", Flag117 (Id));
6920 W ("Is_Underlying_Record_View", Flag246 (Id));
6921 W ("Is_Unsigned_Type", Flag144 (Id));
6922 W ("Is_VMS_Exception", Flag133 (Id));
6923 W ("Is_Valued_Procedure", Flag127 (Id));
6924 W ("Is_Visible_Child_Unit", Flag116 (Id));
6925 W ("Is_Visible_Formal", Flag206 (Id));
6926 W ("Is_Volatile", Flag16 (Id));
6927 W ("Itype_Printed", Flag202 (Id));
6928 W ("Kill_Elaboration_Checks", Flag32 (Id));
6929 W ("Kill_Range_Checks", Flag33 (Id));
6930 W ("Kill_Tag_Checks", Flag34 (Id));
6931 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
6932 W ("Low_Bound_Tested", Flag205 (Id));
6933 W ("Machine_Radix_10", Flag84 (Id));
6934 W ("Materialize_Entity", Flag168 (Id));
6935 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
6936 W ("Must_Have_Preelab_Init", Flag208 (Id));
6937 W ("Needs_Debug_Info", Flag147 (Id));
6938 W ("Needs_No_Actuals", Flag22 (Id));
6939 W ("Never_Set_In_Source", Flag115 (Id));
6940 W ("No_Pool_Assigned", Flag131 (Id));
6941 W ("No_Return", Flag113 (Id));
6942 W ("No_Strict_Aliasing", Flag136 (Id));
6943 W ("Non_Binary_Modulus", Flag58 (Id));
6944 W ("Nonzero_Is_True", Flag162 (Id));
6945 W ("OK_To_Rename", Flag247 (Id));
6946 W ("OK_To_Reorder_Components", Flag239 (Id));
6947 W ("Optimize_Alignment_Space", Flag241 (Id));
6948 W ("Optimize_Alignment_Time", Flag242 (Id));
6949 W ("Overlays_Constant", Flag243 (Id));
6950 W ("Reachable", Flag49 (Id));
6951 W ("Referenced", Flag156 (Id));
6952 W ("Referenced_As_LHS", Flag36 (Id));
6953 W ("Referenced_As_Out_Parameter", Flag227 (Id));
6954 W ("Renamed_In_Spec", Flag231 (Id));
6955 W ("Requires_Overriding", Flag213 (Id));
6956 W ("Return_Present", Flag54 (Id));
6957 W ("Returns_By_Ref", Flag90 (Id));
6958 W ("Reverse_Bit_Order", Flag164 (Id));
6959 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
6960 W ("Size_Depends_On_Discriminant", Flag177 (Id));
6961 W ("Size_Known_At_Compile_Time", Flag92 (Id));
6962 W ("Static_Elaboration_Desired", Flag77 (Id));
6963 W ("Strict_Alignment", Flag145 (Id));
6964 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
6965 W ("Suppress_Init_Proc", Flag105 (Id));
6966 W ("Suppress_Style_Checks", Flag165 (Id));
6967 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
6968 W ("Treat_As_Volatile", Flag41 (Id));
6969 W ("Universal_Aliasing", Flag216 (Id));
6970 W ("Used_As_Generic_Actual", Flag222 (Id));
6971 W ("Uses_Sec_Stack", Flag95 (Id));
6972 W ("Vax_Float", Flag151 (Id));
6973 W ("Warnings_Off", Flag96 (Id));
6974 W ("Warnings_Off_Used", Flag236 (Id));
6975 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
6976 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
6977 W ("Was_Hidden", Flag196 (Id));
6978 end Write_Entity_Flags;
6980 -----------------------
6981 -- Write_Entity_Info --
6982 -----------------------
6984 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
6986 procedure Write_Attribute (Which : String; Nam : E);
6987 -- Write attribute value with given string name
6989 procedure Write_Kind (Id : Entity_Id);
6990 -- Write Ekind field of entity
6992 ---------------------
6993 -- Write_Attribute --
6994 ---------------------
6996 procedure Write_Attribute (Which : String; Nam : E) is
7000 Write_Int (Int (Nam));
7002 Write_Name (Chars (Nam));
7004 end Write_Attribute;
7010 procedure Write_Kind (Id : Entity_Id) is
7011 K : constant String := Entity_Kind'Image (Ekind (Id));
7015 Write_Str (" Kind ");
7017 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7018 Write_Str ("TAGGED ");
7021 Write_Str (K (3 .. K'Length));
7024 if Is_Type (Id) and then Depends_On_Private (Id) then
7025 Write_Str ("Depends_On_Private ");
7029 -- Start of processing for Write_Entity_Info
7033 Write_Attribute ("Name ", Id);
7034 Write_Int (Int (Id));
7038 Write_Attribute (" Type ", Etype (Id));
7040 Write_Attribute (" Scope ", Scope (Id));
7045 when Discrete_Kind =>
7046 Write_Str ("Bounds: Id = ");
7048 if Present (Scalar_Range (Id)) then
7049 Write_Int (Int (Type_Low_Bound (Id)));
7050 Write_Str (" .. Id = ");
7051 Write_Int (Int (Type_High_Bound (Id)));
7053 Write_Str ("Empty");
7064 (" Component Type ", Component_Type (Id));
7067 Write_Str (" Indices ");
7069 Index := First_Index (Id);
7070 while Present (Index) loop
7071 Write_Attribute (" ", Etype (Index));
7072 Index := Next_Index (Index);
7080 (" Directly Designated Type ",
7081 Directly_Designated_Type (Id));
7084 when Overloadable_Kind =>
7085 if Present (Homonym (Id)) then
7086 Write_Str (" Homonym ");
7087 Write_Name (Chars (Homonym (Id)));
7089 Write_Int (Int (Homonym (Id)));
7096 if Ekind (Scope (Id)) in Record_Kind then
7098 " Original_Record_Component ",
7099 Original_Record_Component (Id));
7100 Write_Int (Int (Original_Record_Component (Id)));
7104 when others => null;
7106 end Write_Entity_Info;
7108 -----------------------
7109 -- Write_Field6_Name --
7110 -----------------------
7112 procedure Write_Field6_Name (Id : Entity_Id) is
7113 pragma Warnings (Off, Id);
7115 Write_Str ("First_Rep_Item");
7116 end Write_Field6_Name;
7118 -----------------------
7119 -- Write_Field7_Name --
7120 -----------------------
7122 procedure Write_Field7_Name (Id : Entity_Id) is
7123 pragma Warnings (Off, Id);
7125 Write_Str ("Freeze_Node");
7126 end Write_Field7_Name;
7128 -----------------------
7129 -- Write_Field8_Name --
7130 -----------------------
7132 procedure Write_Field8_Name (Id : Entity_Id) is
7137 Write_Str ("Normalized_First_Bit");
7141 E_Subprogram_Body =>
7142 Write_Str ("Mechanism");
7145 Write_Str ("Associated_Node_For_Itype");
7148 Write_Str ("First_Exit_Statement");
7151 Write_Str ("Dependent_Instances");
7154 Write_Str ("Postcondition_Proc");
7156 when E_Return_Statement =>
7157 Write_Str ("Return_Applies_To");
7160 Write_Str ("Hiding_Loop_Variable");
7163 Write_Str ("Field8??");
7165 end Write_Field8_Name;
7167 -----------------------
7168 -- Write_Field9_Name --
7169 -----------------------
7171 procedure Write_Field9_Name (Id : Entity_Id) is
7175 Write_Str ("Class_Wide_Type");
7178 E_Generic_Function |
7180 E_Generic_Procedure |
7183 Write_Str ("Renaming_Map");
7186 Write_Str ("Current_Value");
7189 Write_Str ("Field9??");
7191 end Write_Field9_Name;
7193 ------------------------
7194 -- Write_Field10_Name --
7195 ------------------------
7197 procedure Write_Field10_Name (Id : Entity_Id) is
7201 Write_Str ("Referenced_Object");
7203 when E_In_Parameter |
7205 Write_Str ("Discriminal_Link");
7211 Write_Str ("Handler_Records");
7215 Write_Str ("Normalized_Position_Max");
7218 Write_Str ("Field10??");
7220 end Write_Field10_Name;
7222 ------------------------
7223 -- Write_Field11_Name --
7224 ------------------------
7226 procedure Write_Field11_Name (Id : Entity_Id) is
7230 Write_Str ("Entry_Component");
7234 Write_Str ("Component_Bit_Offset");
7237 Write_Str ("Full_View");
7239 when E_Enumeration_Literal =>
7240 Write_Str ("Enumeration_Pos");
7243 Write_Str ("Block_Node");
7249 Write_Str ("Protected_Body_Subprogram");
7251 when E_Generic_Package =>
7252 Write_Str ("Generic_Homonym");
7255 Write_Str ("Full_View");
7258 Write_Str ("Field11??");
7260 end Write_Field11_Name;
7262 ------------------------
7263 -- Write_Field12_Name --
7264 ------------------------
7266 procedure Write_Field12_Name (Id : Entity_Id) is
7270 Write_Str ("Barrier_Function");
7272 when E_Enumeration_Literal =>
7273 Write_Str ("Enumeration_Rep");
7281 E_In_Out_Parameter |
7285 Write_Str ("Esize");
7289 Write_Str ("Next_Inlined_Subprogram");
7292 Write_Str ("Associated_Formal_Package");
7295 Write_Str ("Field12??");
7297 end Write_Field12_Name;
7299 ------------------------
7300 -- Write_Field13_Name --
7301 ------------------------
7303 procedure Write_Field13_Name (Id : Entity_Id) is
7307 Write_Str ("RM_Size");
7311 Write_Str ("Component_Clause");
7314 if not Comes_From_Source (Id)
7316 Chars (Id) = Name_Op_Ne
7318 Write_Str ("Corresponding_Equality");
7320 elsif Comes_From_Source (Id) then
7321 Write_Str ("Elaboration_Entity");
7324 Write_Str ("Field13??");
7329 Write_Str ("Extra_Accessibility");
7333 Generic_Unit_Kind =>
7334 Write_Str ("Elaboration_Entity");
7337 Write_Str ("Field13??");
7339 end Write_Field13_Name;
7341 -----------------------
7342 -- Write_Field14_Name --
7343 -----------------------
7345 procedure Write_Field14_Name (Id : Entity_Id) is
7354 Write_Str ("Alignment");
7358 Write_Str ("Normalized_Position");
7362 Write_Str ("First_Optional_Parameter");
7365 E_Generic_Package =>
7366 Write_Str ("Shadow_Entities");
7369 Write_Str ("Field14??");
7371 end Write_Field14_Name;
7373 ------------------------
7374 -- Write_Field15_Name --
7375 ------------------------
7377 procedure Write_Field15_Name (Id : Entity_Id) is
7382 Write_Str ("Storage_Size_Variable");
7384 when Class_Wide_Kind |
7388 Write_Str ("Primitive_Operations");
7391 Write_Str ("DT_Entry_Count");
7393 when Decimal_Fixed_Point_Kind =>
7394 Write_Str ("Scale_Value");
7396 when E_Discriminant =>
7397 Write_Str ("Discriminant_Number");
7400 Write_Str ("Extra_Formal");
7404 Write_Str ("DT_Position");
7407 Write_Str ("Entry_Parameters_Type");
7409 when Enumeration_Kind =>
7410 Write_Str ("Lit_Indexes");
7414 Write_Str ("Related_Instance");
7416 when E_Protected_Type =>
7417 Write_Str ("Entry_Bodies_Array");
7419 when E_String_Literal_Subtype =>
7420 Write_Str ("String_Literal_Low_Bound");
7423 Write_Str ("Field15??");
7425 end Write_Field15_Name;
7427 ------------------------
7428 -- Write_Field16_Name --
7429 ------------------------
7431 procedure Write_Field16_Name (Id : Entity_Id) is
7435 Write_Str ("Entry_Formal");
7439 Write_Str ("DTC_Entity");
7444 Write_Str ("First_Private_Entity");
7446 when E_Record_Type |
7447 E_Record_Type_With_Private =>
7448 Write_Str ("Access_Disp_Table");
7450 when E_String_Literal_Subtype =>
7451 Write_Str ("String_Literal_Length");
7453 when Enumeration_Kind =>
7454 Write_Str ("Lit_Strings");
7458 Write_Str ("Unset_Reference");
7460 when E_Record_Subtype |
7461 E_Class_Wide_Subtype =>
7462 Write_Str ("Cloned_Subtype");
7465 Write_Str ("Field16??");
7467 end Write_Field16_Name;
7469 ------------------------
7470 -- Write_Field17_Name --
7471 ------------------------
7473 procedure Write_Field17_Name (Id : Entity_Id) is
7477 Write_Str ("Digits_Value");
7480 Write_Str ("Prival");
7482 when E_Discriminant =>
7483 Write_Str ("Discriminal");
7492 E_Generic_Function |
7494 E_Generic_Procedure |
7502 E_Return_Statement |
7504 E_Subprogram_Type =>
7505 Write_Str ("First_Entity");
7508 Write_Str ("First_Index");
7510 when Enumeration_Kind =>
7511 Write_Str ("First_Literal");
7514 Write_Str ("Master_Id");
7516 when Modular_Integer_Kind =>
7517 Write_Str ("Modulus");
7521 E_Generic_In_Out_Parameter |
7523 Write_Str ("Actual_Subtype");
7525 when E_Incomplete_Type =>
7526 Write_Str ("Non_Limited_View");
7528 when E_Incomplete_Subtype =>
7529 if From_With_Type (Id) then
7530 Write_Str ("Non_Limited_View");
7534 Write_Str ("Field17??");
7536 end Write_Field17_Name;
7538 ------------------------
7539 -- Write_Field18_Name --
7540 ------------------------
7542 procedure Write_Field18_Name (Id : Entity_Id) is
7545 when E_Enumeration_Literal |
7549 Write_Str ("Alias");
7551 when E_Record_Type =>
7552 Write_Str ("Corresponding_Concurrent_Type");
7554 when E_Entry_Index_Parameter =>
7555 Write_Str ("Entry_Index_Constant");
7557 when E_Class_Wide_Subtype |
7558 E_Access_Protected_Subprogram_Type |
7559 E_Anonymous_Access_Protected_Subprogram_Type |
7560 E_Access_Subprogram_Type |
7562 Write_Str ("Equivalent_Type");
7564 when Fixed_Point_Kind =>
7565 Write_Str ("Delta_Value");
7568 Write_Str ("Renamed_Object");
7572 E_Generic_Function |
7573 E_Generic_Procedure |
7574 E_Generic_Package =>
7575 Write_Str ("Renamed_Entity");
7577 when Incomplete_Or_Private_Kind =>
7578 Write_Str ("Private_Dependents");
7580 when Concurrent_Kind =>
7581 Write_Str ("Corresponding_Record_Type");
7586 Write_Str ("Enclosing_Scope");
7589 Write_Str ("Field18??");
7591 end Write_Field18_Name;
7593 -----------------------
7594 -- Write_Field19_Name --
7595 -----------------------
7597 procedure Write_Field19_Name (Id : Entity_Id) is
7602 Write_Str ("Related_Array_Object");
7608 E_Return_Statement |
7610 Write_Str ("Finalization_Chain_Entity");
7612 when E_Constant | E_Variable =>
7613 Write_Str ("Size_Check_Code");
7615 when E_Discriminant =>
7616 Write_Str ("Corresponding_Discriminant");
7619 E_Generic_Package =>
7620 Write_Str ("Body_Entity");
7622 when E_Package_Body |
7624 Write_Str ("Spec_Entity");
7626 when Private_Kind =>
7627 Write_Str ("Underlying_Full_View");
7629 when E_Record_Type =>
7630 Write_Str ("Parent_Subtype");
7633 Write_Str ("Field19??");
7635 end Write_Field19_Name;
7637 -----------------------
7638 -- Write_Field20_Name --
7639 -----------------------
7641 procedure Write_Field20_Name (Id : Entity_Id) is
7645 Write_Str ("Component_Type");
7647 when E_In_Parameter |
7648 E_Generic_In_Parameter =>
7649 Write_Str ("Default_Value");
7652 Write_Str ("Directly_Designated_Type");
7655 Write_Str ("Discriminant_Checking_Func");
7659 Write_Str ("Prival_Link");
7661 when E_Discriminant =>
7662 Write_Str ("Discriminant_Default_Value");
7671 E_Generic_Function |
7673 E_Generic_Procedure |
7681 E_Return_Statement |
7683 E_Subprogram_Type =>
7685 Write_Str ("Last_Entity");
7688 Write_Str ("Scalar_Range");
7691 Write_Str ("Register_Exception_Call");
7694 Write_Str ("Field20??");
7696 end Write_Field20_Name;
7698 -----------------------
7699 -- Write_Field21_Name --
7700 -----------------------
7702 procedure Write_Field21_Name (Id : Entity_Id) is
7708 E_Generic_Function |
7710 E_Generic_Procedure |
7712 Write_Str ("Interface_Name");
7714 when Concurrent_Kind |
7715 Incomplete_Or_Private_Kind |
7719 Write_Str ("Discriminant_Constraint");
7722 Write_Str ("Accept_Address");
7724 when Fixed_Point_Kind =>
7725 Write_Str ("Small_Value");
7727 when E_In_Parameter =>
7728 Write_Str ("Default_Expr_Function");
7731 Modular_Integer_Kind =>
7732 Write_Str ("Original_Array_Type");
7735 Write_Str ("Field21??");
7737 end Write_Field21_Name;
7739 -----------------------
7740 -- Write_Field22_Name --
7741 -----------------------
7743 procedure Write_Field22_Name (Id : Entity_Id) is
7747 Write_Str ("Associated_Storage_Pool");
7750 Write_Str ("Component_Size");
7754 Write_Str ("Original_Record_Component");
7756 when E_Enumeration_Literal =>
7757 Write_Str ("Enumeration_Rep_Expr");
7760 Write_Str ("Exception_Code");
7763 Write_Str ("Protected_Formal");
7765 when E_Record_Type =>
7766 Write_Str ("Corresponding_Remote_Type");
7776 E_Generic_Function |
7777 E_Generic_Procedure |
7780 E_Return_Statement |
7783 Write_Str ("Scope_Depth_Value");
7785 when E_Record_Type_With_Private |
7786 E_Record_Subtype_With_Private |
7789 E_Limited_Private_Type |
7790 E_Limited_Private_Subtype =>
7791 Write_Str ("Private_View");
7794 Write_Str ("Shared_Var_Procs_Instance");
7797 Write_Str ("Field22??");
7799 end Write_Field22_Name;
7801 ------------------------
7802 -- Write_Field23_Name --
7803 ------------------------
7805 procedure Write_Field23_Name (Id : Entity_Id) is
7809 Write_Str ("Associated_Final_Chain");
7812 Write_Str ("Packed_Array_Type");
7815 Write_Str ("Entry_Cancel_Parameter");
7817 when E_Discriminant =>
7818 Write_Str ("CR_Discriminant");
7820 when E_Enumeration_Type =>
7821 Write_Str ("Enum_Pos_To_Rep");
7825 Write_Str ("Extra_Constrained");
7827 when E_Generic_Function |
7829 E_Generic_Procedure =>
7830 Write_Str ("Inner_Instances");
7832 when Concurrent_Kind |
7833 Incomplete_Or_Private_Kind |
7837 Write_Str ("Stored_Constraint");
7841 if Present (Scope (Id))
7842 and then Is_Protected_Type (Scope (Id))
7844 Write_Str ("Protection_Object");
7846 Write_Str ("Generic_Renamings");
7850 if Is_Generic_Instance (Id) then
7851 Write_Str ("Generic_Renamings");
7853 Write_Str ("Limited_View");
7857 Write_Str ("Protection_Object");
7860 Write_Str ("Field23??");
7862 end Write_Field23_Name;
7864 ------------------------
7865 -- Write_Field24_Name --
7866 ------------------------
7868 procedure Write_Field24_Name (Id : Entity_Id) is
7871 when Subprogram_Kind =>
7872 Write_Str ("Spec_PPC_List");
7874 when E_Record_Type =>
7875 Write_Str ("Underlying record view");
7877 when E_Variable | E_Constant =>
7878 Write_Str ("Related expression");
7883 end Write_Field24_Name;
7885 ------------------------
7886 -- Write_Field25_Name --
7887 ------------------------
7889 procedure Write_Field25_Name (Id : Entity_Id) is
7893 Write_Str ("DT_Offset_To_Top_Func");
7897 Write_Str ("Interface_Alias");
7899 when E_Record_Type |
7901 E_Record_Type_With_Private |
7902 E_Record_Subtype_With_Private =>
7903 Write_Str ("Interfaces");
7906 Write_Str ("Task_Body_Procedure");
7909 Write_Str ("Debug_Renaming_Link");
7912 Write_Str ("Field25??");
7914 end Write_Field25_Name;
7916 ------------------------
7917 -- Write_Field26_Name --
7918 ------------------------
7920 procedure Write_Field26_Name (Id : Entity_Id) is
7925 Write_Str ("Related_Type");
7927 when E_Generic_Package |
7929 Write_Str ("Package_Instantiation");
7934 if Is_Dispatching_Operation (Id) then
7935 Write_Str ("Overridden_Operation");
7937 Write_Str ("Static_Initialization");
7940 when E_Record_Type |
7941 E_Record_Type_With_Private =>
7942 Write_Str ("Dispatch_Table_Wrappers");
7944 when E_In_Out_Parameter |
7947 Write_Str ("Last_Assignment");
7950 Write_Str ("Relative_Deadline_Variable");
7953 Write_Str ("Field26??");
7955 end Write_Field26_Name;
7957 ------------------------
7958 -- Write_Field27_Name --
7959 ------------------------
7961 procedure Write_Field27_Name (Id : Entity_Id) is
7965 Write_Str ("Wrapped_Entity");
7967 when E_Package | Type_Kind =>
7968 Write_Str ("Current_Use_Clause");
7971 Write_Str ("Field27??");
7973 end Write_Field27_Name;
7975 ------------------------
7976 -- Write_Field28_Name --
7977 ------------------------
7979 procedure Write_Field28_Name (Id : Entity_Id) is
7982 when E_Procedure | E_Function | E_Entry =>
7983 Write_Str ("Extra_Formals");
7986 Write_Str ("Field28??");
7988 end Write_Field28_Name;
7990 -------------------------
7991 -- Iterator Procedures --
7992 -------------------------
7994 procedure Proc_Next_Component (N : in out Node_Id) is
7996 N := Next_Component (N);
7997 end Proc_Next_Component;
7999 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8001 N := Next_Entity (N);
8002 while Present (N) loop
8003 exit when Ekind_In (N, E_Component, E_Discriminant);
8004 N := Next_Entity (N);
8006 end Proc_Next_Component_Or_Discriminant;
8008 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8010 N := Next_Discriminant (N);
8011 end Proc_Next_Discriminant;
8013 procedure Proc_Next_Formal (N : in out Node_Id) is
8015 N := Next_Formal (N);
8016 end Proc_Next_Formal;
8018 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8020 N := Next_Formal_With_Extras (N);
8021 end Proc_Next_Formal_With_Extras;
8023 procedure Proc_Next_Index (N : in out Node_Id) is
8025 N := Next_Index (N);
8026 end Proc_Next_Index;
8028 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8030 N := Next_Inlined_Subprogram (N);
8031 end Proc_Next_Inlined_Subprogram;
8033 procedure Proc_Next_Literal (N : in out Node_Id) is
8035 N := Next_Literal (N);
8036 end Proc_Next_Literal;
8038 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8040 N := Next_Stored_Discriminant (N);
8041 end Proc_Next_Stored_Discriminant;