1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2014, 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 Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Part_Of_Constituents Elist9
92 -- Encapsulating_State Node10
93 -- Direct_Primitive_Operations Elist10
94 -- Discriminal_Link Node10
95 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
96 -- Handler_Records List10
97 -- Normalized_Position_Max Uint10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- First_Optional_Parameter Node14
119 -- Normalized_Position Uint14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Bodies_Array Node15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Lit_Indexes Node15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
131 -- Scale_Value Uint15
132 -- Storage_Size_Variable Node15
133 -- String_Literal_Low_Bound Node15
135 -- Access_Disp_Table Elist16
136 -- Body_References Elist16
137 -- Cloned_Subtype Node16
139 -- Entry_Formal Node16
140 -- First_Private_Entity Node16
141 -- Lit_Strings Node16
142 -- String_Literal_Length Uint16
143 -- Unset_Reference Node16
145 -- Actual_Subtype Node17
146 -- Digits_Value Uint17
147 -- Discriminal Node17
148 -- First_Entity Node17
149 -- First_Index Node17
150 -- First_Literal Node17
153 -- Non_Limited_View Node17
157 -- Corresponding_Concurrent_Type Node18
158 -- Corresponding_Protected_Entry Node18
159 -- Corresponding_Record_Type Node18
160 -- Delta_Value Ureal18
161 -- Enclosing_Scope Node18
162 -- Equivalent_Type Node18
163 -- Private_Dependents Elist18
164 -- Renamed_Entity Node18
165 -- Renamed_Object Node18
167 -- Body_Entity Node19
168 -- Corresponding_Discriminant Node19
169 -- Default_Aspect_Component_Value Node19
170 -- Default_Aspect_Value Node19
171 -- Extra_Accessibility_Of_Result Node19
172 -- Parent_Subtype Node19
173 -- Size_Check_Code Node19
174 -- Spec_Entity Node19
175 -- Underlying_Full_View Node19
177 -- Component_Type Node20
178 -- Default_Value Node20
179 -- Directly_Designated_Type Node20
180 -- Discriminant_Checking_Func Node20
181 -- Discriminant_Default_Value Node20
182 -- Last_Entity Node20
183 -- Prival_Link Node20
184 -- Register_Exception_Call Node20
185 -- Scalar_Range Node20
187 -- Accept_Address Elist21
188 -- Default_Expr_Function Node21
189 -- Discriminant_Constraint Elist21
190 -- Interface_Name Node21
191 -- Original_Array_Type Node21
192 -- Small_Value Ureal21
194 -- Associated_Storage_Pool Node22
195 -- Component_Size Uint22
196 -- Corresponding_Remote_Type Node22
197 -- Enumeration_Rep_Expr Node22
198 -- Exception_Code Uint22
199 -- Original_Record_Component Node22
200 -- Private_View Node22
201 -- Protected_Formal Node22
202 -- Scope_Depth_Value Uint22
203 -- Shared_Var_Procs_Instance Node22
205 -- CR_Discriminant Node23
206 -- Entry_Cancel_Parameter Node23
207 -- Enum_Pos_To_Rep Node23
208 -- Extra_Constrained Node23
209 -- Finalization_Master Node23
210 -- Generic_Renamings Elist23
211 -- Inner_Instances Elist23
212 -- Limited_View Node23
213 -- Packed_Array_Impl_Type Node23
214 -- Protection_Object Node23
215 -- Stored_Constraint Elist23
217 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Underlying_Record_View Node28
244 -- BIP_Initialization_Call Node29
245 -- Subprograms_For_Type Node29
247 -- Corresponding_Equality Node30
248 -- Last_Aggregate_Assignment Node30
249 -- Static_Initialization Node30
251 -- Thunk_Entity Node31
253 -- SPARK_Pragma Node32
255 -- Linker_Section_Pragma Node33
256 -- SPARK_Aux_Pragma Node33
260 -- Import_Pragma Node35
262 ---------------------------------------------
263 -- Usage of Flags in Defining Entity Nodes --
264 ---------------------------------------------
266 -- All flags are unique, there is no overlaying, so each flag is physically
267 -- present in every entity. However, for many of the flags, it only makes
268 -- sense for them to be set true for certain subsets of entity kinds. See
269 -- the spec of Einfo for further details.
272 -- Has_Discriminants Flag5
273 -- Is_Dispatching_Operation Flag6
274 -- Is_Immediately_Visible Flag7
276 -- Is_Potentially_Use_Visible Flag9
280 -- Is_Constrained Flag12
281 -- Is_Generic_Type Flag13
282 -- Depends_On_Private Flag14
284 -- Is_Volatile Flag16
285 -- Is_Internal Flag17
286 -- Has_Delayed_Freeze Flag18
287 -- Is_Abstract_Subprogram Flag19
288 -- Is_Concurrent_Record_Type Flag20
290 -- Has_Master_Entity Flag21
291 -- Needs_No_Actuals Flag22
292 -- Has_Storage_Size_Clause Flag23
293 -- Is_Imported Flag24
294 -- Is_Limited_Record Flag25
295 -- Has_Completion Flag26
296 -- Has_Pragma_Controlled Flag27
297 -- Is_Statically_Allocated Flag28
298 -- Has_Size_Clause Flag29
301 -- Checks_May_Be_Suppressed Flag31
302 -- Kill_Elaboration_Checks Flag32
303 -- Kill_Range_Checks Flag33
304 -- Has_Independent_Components Flag34
305 -- Is_Class_Wide_Equivalent_Type Flag35
306 -- Referenced_As_LHS Flag36
307 -- Is_Known_Non_Null Flag37
308 -- Can_Never_Be_Null Flag38
309 -- Has_Default_Aspect Flag39
310 -- Body_Needed_For_SAL Flag40
312 -- Treat_As_Volatile Flag41
313 -- Is_Controlled Flag42
314 -- Has_Controlled_Component Flag43
316 -- In_Private_Part Flag45
317 -- Has_Alignment_Clause Flag46
319 -- In_Package_Body Flag48
321 -- Delay_Subprogram_Descriptors Flag50
324 -- Is_Entry_Formal Flag52
325 -- Is_Private_Descendant Flag53
326 -- Return_Present Flag54
327 -- Is_Tagged_Type Flag55
328 -- Has_Homonym Flag56
330 -- Non_Binary_Modulus Flag58
331 -- Is_Preelaborated Flag59
332 -- Is_Shared_Passive Flag60
334 -- Is_Remote_Types Flag61
335 -- Is_Remote_Call_Interface Flag62
336 -- Is_Character_Type Flag63
337 -- Is_Intrinsic_Subprogram Flag64
338 -- Has_Record_Rep_Clause Flag65
339 -- Has_Enumeration_Rep_Clause Flag66
340 -- Has_Small_Clause Flag67
341 -- Has_Component_Size_Clause Flag68
342 -- Is_Access_Constant Flag69
343 -- Is_First_Subtype Flag70
345 -- Has_Completion_In_Body Flag71
346 -- Has_Unknown_Discriminants Flag72
347 -- Is_Child_Unit Flag73
348 -- Is_CPP_Class Flag74
349 -- Has_Non_Standard_Rep Flag75
350 -- Is_Constructor Flag76
351 -- Static_Elaboration_Desired Flag77
353 -- Has_All_Calls_Remote Flag79
354 -- Is_Constr_Subt_For_U_Nominal Flag80
356 -- Is_Asynchronous Flag81
357 -- Has_Gigi_Rep_Item Flag82
358 -- Has_Machine_Radix_Clause Flag83
359 -- Machine_Radix_10 Flag84
361 -- Has_Atomic_Components Flag86
362 -- Has_Volatile_Components Flag87
363 -- Discard_Names Flag88
364 -- Is_Interrupt_Handler Flag89
365 -- Returns_By_Ref Flag90
368 -- Size_Known_At_Compile_Time Flag92
369 -- Reverse_Storage_Order Flag93
370 -- Is_Generic_Actual_Type Flag94
371 -- Uses_Sec_Stack Flag95
372 -- Warnings_Off Flag96
373 -- Is_Controlling_Formal Flag97
374 -- Has_Controlling_Result Flag98
375 -- Is_Exported Flag99
376 -- Has_Specified_Layout Flag100
378 -- Has_Nested_Block_With_Handler Flag101
380 -- Is_Completely_Hidden Flag103
381 -- Address_Taken Flag104
382 -- Suppress_Initialization Flag105
383 -- Is_Limited_Composite Flag106
384 -- Is_Private_Composite Flag107
385 -- Default_Expressions_Processed Flag108
386 -- Is_Non_Static_Subtype Flag109
387 -- Has_Out_Or_In_Out_Parameter Flag110
389 -- Is_Formal_Subprogram Flag111
390 -- Is_Renaming_Of_Object Flag112
392 -- Delay_Cleanups Flag114
393 -- Never_Set_In_Source Flag115
394 -- Is_Visible_Lib_Unit Flag116
395 -- Is_Unchecked_Union Flag117
396 -- Is_For_Access_Subtype Flag118
397 -- Has_Convention_Pragma Flag119
398 -- Has_Primitive_Operations Flag120
400 -- Has_Pragma_Pack Flag121
401 -- Is_Bit_Packed_Array Flag122
402 -- Has_Unchecked_Union Flag123
403 -- Is_Eliminated Flag124
404 -- C_Pass_By_Copy Flag125
405 -- Is_Instantiated Flag126
406 -- Is_Valued_Procedure Flag127
407 -- (used for Component_Alignment) Flag128
408 -- (used for Component_Alignment) Flag129
409 -- Is_Generic_Instance Flag130
411 -- No_Pool_Assigned Flag131
412 -- Is_AST_Entry Flag132
413 -- Is_VMS_Exception Flag133
414 -- Is_Optional_Parameter Flag134
415 -- Has_Aliased_Components Flag135
416 -- No_Strict_Aliasing Flag136
417 -- Is_Machine_Code_Subprogram Flag137
418 -- Is_Packed_Array_Impl_Type Flag138
419 -- Has_Biased_Representation Flag139
420 -- Has_Complex_Representation Flag140
422 -- Is_Constr_Subt_For_UN_Aliased Flag141
423 -- Has_Missing_Return Flag142
424 -- Has_Recursive_Call Flag143
425 -- Is_Unsigned_Type Flag144
426 -- Strict_Alignment Flag145
427 -- Is_Abstract_Type Flag146
428 -- Needs_Debug_Info Flag147
429 -- Suppress_Elaboration_Warnings Flag148
430 -- Is_Compilation_Unit Flag149
431 -- Has_Pragma_Elaborate_Body Flag150
433 -- Has_Private_Ancestor Flag151
434 -- Entry_Accepted Flag152
435 -- Is_Obsolescent Flag153
436 -- Has_Per_Object_Constraint Flag154
437 -- Has_Private_Declaration Flag155
438 -- Referenced Flag156
439 -- Has_Pragma_Inline Flag157
440 -- Finalize_Storage_Only Flag158
441 -- From_Limited_With Flag159
442 -- Is_Package_Body_Entity Flag160
444 -- Has_Qualified_Name Flag161
445 -- Nonzero_Is_True Flag162
446 -- Is_True_Constant Flag163
447 -- Reverse_Bit_Order Flag164
448 -- Suppress_Style_Checks Flag165
449 -- Debug_Info_Off Flag166
450 -- Sec_Stack_Needed_For_Return Flag167
451 -- Materialize_Entity Flag168
452 -- Has_Pragma_Thread_Local_Storage Flag169
453 -- Is_Known_Valid Flag170
455 -- Is_Hidden_Open_Scope Flag171
456 -- Has_Object_Size_Clause Flag172
457 -- Has_Fully_Qualified_Name Flag173
458 -- Elaboration_Entity_Required Flag174
459 -- Has_Forward_Instantiation Flag175
460 -- Is_Discrim_SO_Function Flag176
461 -- Size_Depends_On_Discriminant Flag177
462 -- Is_Null_Init_Proc Flag178
463 -- Has_Pragma_Pure_Function Flag179
464 -- Has_Pragma_Unreferenced Flag180
466 -- Has_Contiguous_Rep Flag181
467 -- Has_Xref_Entry Flag182
468 -- Must_Be_On_Byte_Boundary Flag183
469 -- Has_Stream_Size_Clause Flag184
470 -- Is_Ada_2005_Only Flag185
471 -- Is_Interface Flag186
472 -- Has_Constrained_Partial_View Flag187
473 -- Uses_Lock_Free Flag188
474 -- Is_Pure_Unit_Access_Type Flag189
475 -- Has_Specified_Stream_Input Flag190
477 -- Has_Specified_Stream_Output Flag191
478 -- Has_Specified_Stream_Read Flag192
479 -- Has_Specified_Stream_Write Flag193
480 -- Is_Local_Anonymous_Access Flag194
481 -- Is_Primitive_Wrapper Flag195
482 -- Was_Hidden Flag196
483 -- Is_Limited_Interface Flag197
484 -- Has_Pragma_Ordered Flag198
485 -- Is_Ada_2012_Only Flag199
487 -- Has_Delayed_Aspects Flag200
488 -- Has_Pragma_No_Inline Flag201
489 -- Itype_Printed Flag202
490 -- Has_Pragma_Pure Flag203
491 -- Is_Known_Null Flag204
492 -- Low_Bound_Tested Flag205
493 -- Is_Visible_Formal Flag206
494 -- Known_To_Have_Preelab_Init Flag207
495 -- Must_Have_Preelab_Init Flag208
496 -- Is_Return_Object Flag209
497 -- Elaborate_Body_Desirable Flag210
499 -- Has_Static_Discriminants Flag211
500 -- Has_Pragma_Unreferenced_Objects Flag212
501 -- Requires_Overriding Flag213
503 -- Has_Up_Level_Access Flag215
504 -- Universal_Aliasing Flag216
505 -- Suppress_Value_Tracking_On_Call Flag217
506 -- Is_Primitive Flag218
507 -- Has_Initial_Value Flag219
508 -- Has_Dispatch_Table Flag220
510 -- Has_Pragma_Preelab_Init Flag221
511 -- Used_As_Generic_Actual Flag222
512 -- Is_Descendent_Of_Address Flag223
515 -- Is_Only_Out_Parameter Flag226
516 -- Referenced_As_Out_Parameter Flag227
517 -- Has_Thunks Flag228
518 -- Can_Use_Internal_Rep Flag229
519 -- Has_Pragma_Inline_Always Flag230
521 -- Renamed_In_Spec Flag231
522 -- Has_Invariants Flag232
523 -- Has_Pragma_Unmodified Flag233
524 -- Is_Dispatch_Table_Entity Flag234
525 -- Is_Trivial_Subprogram Flag235
526 -- Warnings_Off_Used Flag236
527 -- Warnings_Off_Used_Unmodified Flag237
528 -- Warnings_Off_Used_Unreferenced Flag238
529 -- OK_To_Reorder_Components Flag239
530 -- Has_Postconditions Flag240
532 -- Optimize_Alignment_Space Flag241
533 -- Optimize_Alignment_Time Flag242
534 -- Overlays_Constant Flag243
535 -- Is_RACW_Stub_Type Flag244
536 -- Is_Private_Primitive Flag245
537 -- Is_Underlying_Record_View Flag246
538 -- OK_To_Rename Flag247
539 -- Has_Inheritable_Invariants Flag248
540 -- Is_Safe_To_Reevaluate Flag249
541 -- Has_Predicates Flag250
543 -- Has_Implicit_Dereference Flag251
544 -- Is_Processed_Transient Flag252
545 -- Has_Anonymous_Master Flag253
546 -- Is_Implementation_Defined Flag254
547 -- Is_Predicate_Function Flag255
548 -- Is_Predicate_Function_M Flag256
549 -- Is_Invariant_Procedure Flag257
550 -- Has_Dynamic_Predicate_Aspect Flag258
551 -- Has_Static_Predicate_Aspect Flag259
552 -- Has_Loop_Entry_Attributes Flag260
554 -- Has_Delayed_Rep_Aspects Flag261
555 -- May_Inherit_Delayed_Rep_Aspects Flag262
556 -- Has_Visible_Refinement Flag263
557 -- Is_Discriminant_Check_Function Flag264
558 -- SPARK_Pragma_Inherited Flag265
559 -- SPARK_Aux_Pragma_Inherited Flag266
560 -- Has_Shift_Operator Flag267
561 -- Is_Independent Flag268
562 -- Has_Static_Predicate Flag269
563 -- Stores_Attribute_Old_Prefix Flag270
565 -- (Has_Protected) Flag271
588 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
590 -----------------------
591 -- Local subprograms --
592 -----------------------
595 (State_Id : Entity_Id;
596 Option_Nam : Name_Id) return Boolean;
597 -- Determine whether abstract state State_Id has particular option denoted
598 -- by the name Option_Nam.
604 function Float_Rep (Id : E) return F is
605 pragma Assert (Is_Floating_Point_Type (Id));
607 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
615 (State_Id : Entity_Id;
616 Option_Nam : Name_Id) return Boolean
618 Decl : constant Node_Id := Parent (State_Id);
623 pragma Assert (Ekind (State_Id) = E_Abstract_State);
625 -- The declaration of abstract states with options appear as an
626 -- extension aggregate. If this is not the case, the option is not
629 if Nkind (Decl) /= N_Extension_Aggregate then
635 Opt := First (Expressions (Decl));
636 while Present (Opt) loop
638 -- Currently the only simple option allowed is External
640 if Nkind (Opt) = N_Identifier
641 and then Chars (Opt) = Name_External
642 and then Chars (Opt) = Option_Nam
650 -- Complex options with various specifiers
652 Opt := First (Component_Associations (Decl));
653 while Present (Opt) loop
654 Opt_Nam := First (Choices (Opt));
656 if Nkind (Opt_Nam) = N_Identifier
657 and then Chars (Opt_Nam) = Option_Nam
668 --------------------------------
669 -- Attribute Access Functions --
670 --------------------------------
672 function Abstract_States (Id : E) return L is
674 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
678 function Accept_Address (Id : E) return L is
683 function Access_Disp_Table (Id : E) return L is
685 pragma Assert (Ekind_In (Id, E_Record_Type,
687 return Elist16 (Implementation_Base_Type (Id));
688 end Access_Disp_Table;
690 function Actual_Subtype (Id : E) return E is
693 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
694 or else Is_Formal (Id));
698 function Address_Taken (Id : E) return B is
703 function Alias (Id : E) return E is
706 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
710 function Alignment (Id : E) return U is
712 pragma Assert (Is_Type (Id)
713 or else Is_Formal (Id)
714 or else Ekind_In (Id, E_Loop_Parameter,
721 function Associated_Formal_Package (Id : E) return E is
723 pragma Assert (Ekind (Id) = E_Package);
725 end Associated_Formal_Package;
727 function Associated_Node_For_Itype (Id : E) return N is
730 end Associated_Node_For_Itype;
732 function Associated_Storage_Pool (Id : E) return E is
734 pragma Assert (Is_Access_Type (Id));
735 return Node22 (Root_Type (Id));
736 end Associated_Storage_Pool;
738 function Barrier_Function (Id : E) return N is
740 pragma Assert (Is_Entry (Id));
742 end Barrier_Function;
744 function Block_Node (Id : E) return N is
746 pragma Assert (Ekind (Id) = E_Block);
750 function Body_Entity (Id : E) return E is
752 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
756 function Body_Needed_For_SAL (Id : E) return B is
759 (Ekind (Id) = E_Package
760 or else Is_Subprogram (Id)
761 or else Is_Generic_Unit (Id));
763 end Body_Needed_For_SAL;
765 function Body_References (Id : E) return L is
767 pragma Assert (Ekind (Id) = E_Abstract_State);
771 function BIP_Initialization_Call (Id : E) return N is
773 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
775 end BIP_Initialization_Call;
777 function C_Pass_By_Copy (Id : E) return B is
779 pragma Assert (Is_Record_Type (Id));
780 return Flag125 (Implementation_Base_Type (Id));
783 function Can_Never_Be_Null (Id : E) return B is
786 end Can_Never_Be_Null;
788 function Checks_May_Be_Suppressed (Id : E) return B is
791 end Checks_May_Be_Suppressed;
793 function Class_Wide_Type (Id : E) return E is
795 pragma Assert (Is_Type (Id));
799 function Cloned_Subtype (Id : E) return E is
801 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
805 function Component_Bit_Offset (Id : E) return U is
807 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
809 end Component_Bit_Offset;
811 function Component_Clause (Id : E) return N is
813 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
815 end Component_Clause;
817 function Component_Size (Id : E) return U is
819 pragma Assert (Is_Array_Type (Id));
820 return Uint22 (Implementation_Base_Type (Id));
823 function Component_Type (Id : E) return E is
825 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
826 return Node20 (Implementation_Base_Type (Id));
829 function Corresponding_Concurrent_Type (Id : E) return E is
831 pragma Assert (Ekind (Id) = E_Record_Type);
833 end Corresponding_Concurrent_Type;
835 function Corresponding_Discriminant (Id : E) return E is
837 pragma Assert (Ekind (Id) = E_Discriminant);
839 end Corresponding_Discriminant;
841 function Corresponding_Equality (Id : E) return E is
844 (Ekind (Id) = E_Function
845 and then not Comes_From_Source (Id)
846 and then Chars (Id) = Name_Op_Ne);
848 end Corresponding_Equality;
850 function Corresponding_Protected_Entry (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Subprogram_Body);
854 end Corresponding_Protected_Entry;
856 function Corresponding_Record_Type (Id : E) return E is
858 pragma Assert (Is_Concurrent_Type (Id));
860 end Corresponding_Record_Type;
862 function Corresponding_Remote_Type (Id : E) return E is
865 end Corresponding_Remote_Type;
867 function Current_Use_Clause (Id : E) return E is
869 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
871 end Current_Use_Clause;
873 function Current_Value (Id : E) return N is
875 pragma Assert (Ekind (Id) in Object_Kind);
879 function CR_Discriminant (Id : E) return E is
884 function Debug_Info_Off (Id : E) return B is
889 function Debug_Renaming_Link (Id : E) return E is
892 end Debug_Renaming_Link;
894 function Default_Aspect_Component_Value (Id : E) return N is
896 pragma Assert (Is_Array_Type (Id));
897 return Node19 (Base_Type (Id));
898 end Default_Aspect_Component_Value;
900 function Default_Aspect_Value (Id : E) return N is
902 pragma Assert (Is_Scalar_Type (Id));
903 return Node19 (Base_Type (Id));
904 end Default_Aspect_Value;
906 function Default_Expr_Function (Id : E) return E is
908 pragma Assert (Is_Formal (Id));
910 end Default_Expr_Function;
912 function Default_Expressions_Processed (Id : E) return B is
915 end Default_Expressions_Processed;
917 function Default_Value (Id : E) return N is
919 pragma Assert (Is_Formal (Id));
923 function Delay_Cleanups (Id : E) return B is
928 function Delay_Subprogram_Descriptors (Id : E) return B is
931 end Delay_Subprogram_Descriptors;
933 function Delta_Value (Id : E) return R is
935 pragma Assert (Is_Fixed_Point_Type (Id));
939 function Dependent_Instances (Id : E) return L is
941 pragma Assert (Is_Generic_Instance (Id));
943 end Dependent_Instances;
945 function Depends_On_Private (Id : E) return B is
947 pragma Assert (Nkind (Id) in N_Entity);
949 end Depends_On_Private;
951 function Digits_Value (Id : E) return U is
954 (Is_Floating_Point_Type (Id)
955 or else Is_Decimal_Fixed_Point_Type (Id));
959 function Direct_Primitive_Operations (Id : E) return L is
961 pragma Assert (Is_Tagged_Type (Id));
963 end Direct_Primitive_Operations;
965 function Directly_Designated_Type (Id : E) return E is
967 pragma Assert (Is_Access_Type (Id));
969 end Directly_Designated_Type;
971 function Discard_Names (Id : E) return B is
976 function Discriminal (Id : E) return E is
978 pragma Assert (Ekind (Id) = E_Discriminant);
982 function Discriminal_Link (Id : E) return N is
985 end Discriminal_Link;
987 function Discriminant_Checking_Func (Id : E) return E is
989 pragma Assert (Ekind (Id) = E_Component);
991 end Discriminant_Checking_Func;
993 function Discriminant_Constraint (Id : E) return L is
995 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
997 end Discriminant_Constraint;
999 function Discriminant_Default_Value (Id : E) return N is
1001 pragma Assert (Ekind (Id) = E_Discriminant);
1003 end Discriminant_Default_Value;
1005 function Discriminant_Number (Id : E) return U is
1007 pragma Assert (Ekind (Id) = E_Discriminant);
1009 end Discriminant_Number;
1011 function Dispatch_Table_Wrappers (Id : E) return L is
1013 pragma Assert (Ekind_In (Id, E_Record_Type,
1015 return Elist26 (Implementation_Base_Type (Id));
1016 end Dispatch_Table_Wrappers;
1018 function DT_Entry_Count (Id : E) return U is
1020 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1024 function DT_Offset_To_Top_Func (Id : E) return E is
1026 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1028 end DT_Offset_To_Top_Func;
1030 function DT_Position (Id : E) return U is
1032 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1033 and then Present (DTC_Entity (Id)));
1037 function DTC_Entity (Id : E) return E is
1039 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1043 function Elaborate_Body_Desirable (Id : E) return B is
1045 pragma Assert (Ekind (Id) = E_Package);
1046 return Flag210 (Id);
1047 end Elaborate_Body_Desirable;
1049 function Elaboration_Entity (Id : E) return E is
1054 Ekind (Id) = E_Package
1056 Is_Generic_Unit (Id));
1058 end Elaboration_Entity;
1060 function Elaboration_Entity_Required (Id : E) return B is
1065 Ekind (Id) = E_Package
1067 Is_Generic_Unit (Id));
1068 return Flag174 (Id);
1069 end Elaboration_Entity_Required;
1071 function Encapsulating_State (Id : E) return N is
1073 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1075 end Encapsulating_State;
1077 function Enclosing_Scope (Id : E) return E is
1080 end Enclosing_Scope;
1082 function Entry_Accepted (Id : E) return B is
1084 pragma Assert (Is_Entry (Id));
1085 return Flag152 (Id);
1088 function Entry_Bodies_Array (Id : E) return E is
1091 end Entry_Bodies_Array;
1093 function Entry_Cancel_Parameter (Id : E) return E is
1096 end Entry_Cancel_Parameter;
1098 function Entry_Component (Id : E) return E is
1101 end Entry_Component;
1103 function Entry_Formal (Id : E) return E is
1108 function Entry_Index_Constant (Id : E) return N is
1110 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1112 end Entry_Index_Constant;
1114 function Contract (Id : E) return N is
1117 (Ekind_In (Id, E_Entry,
1124 or else Is_Generic_Subprogram (Id)
1125 or else Is_Subprogram (Id));
1129 function Entry_Parameters_Type (Id : E) return E is
1132 end Entry_Parameters_Type;
1134 function Enum_Pos_To_Rep (Id : E) return E is
1136 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1138 end Enum_Pos_To_Rep;
1140 function Enumeration_Pos (Id : E) return Uint is
1142 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1144 end Enumeration_Pos;
1146 function Enumeration_Rep (Id : E) return U is
1148 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1150 end Enumeration_Rep;
1152 function Enumeration_Rep_Expr (Id : E) return N is
1154 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1156 end Enumeration_Rep_Expr;
1158 function Equivalent_Type (Id : E) return E is
1161 (Ekind_In (Id, E_Class_Wide_Type,
1162 E_Class_Wide_Subtype,
1163 E_Access_Subprogram_Type,
1164 E_Access_Protected_Subprogram_Type,
1165 E_Anonymous_Access_Protected_Subprogram_Type,
1166 E_Access_Subprogram_Type,
1169 end Equivalent_Type;
1171 function Esize (Id : E) return Uint is
1176 function Exception_Code (Id : E) return Uint is
1178 pragma Assert (Ekind (Id) = E_Exception);
1182 function Extra_Accessibility (Id : E) return E is
1185 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1187 end Extra_Accessibility;
1189 function Extra_Accessibility_Of_Result (Id : E) return E is
1191 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1193 end Extra_Accessibility_Of_Result;
1195 function Extra_Constrained (Id : E) return E is
1197 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1199 end Extra_Constrained;
1201 function Extra_Formal (Id : E) return E is
1206 function Extra_Formals (Id : E) return E is
1209 (Is_Overloadable (Id)
1210 or else Ekind_In (Id, E_Entry_Family,
1212 E_Subprogram_Type));
1216 function Can_Use_Internal_Rep (Id : E) return B is
1218 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1219 return Flag229 (Base_Type (Id));
1220 end Can_Use_Internal_Rep;
1222 function Finalization_Master (Id : E) return E is
1224 pragma Assert (Is_Access_Type (Id));
1225 return Node23 (Root_Type (Id));
1226 end Finalization_Master;
1228 function Finalize_Storage_Only (Id : E) return B is
1230 pragma Assert (Is_Type (Id));
1231 return Flag158 (Base_Type (Id));
1232 end Finalize_Storage_Only;
1234 function Finalizer (Id : E) return E is
1236 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1240 function First_Entity (Id : E) return E is
1245 function First_Exit_Statement (Id : E) return N is
1247 pragma Assert (Ekind (Id) = E_Loop);
1249 end First_Exit_Statement;
1251 function First_Index (Id : E) return N is
1253 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1257 function First_Literal (Id : E) return E is
1259 pragma Assert (Is_Enumeration_Type (Id));
1263 function First_Optional_Parameter (Id : E) return E is
1265 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1267 end First_Optional_Parameter;
1269 function First_Private_Entity (Id : E) return E is
1271 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1272 or else Ekind (Id) in Concurrent_Kind);
1274 end First_Private_Entity;
1276 function First_Rep_Item (Id : E) return E is
1281 function Freeze_Node (Id : E) return N is
1286 function From_Limited_With (Id : E) return B is
1288 return Flag159 (Id);
1289 end From_Limited_With;
1291 function Full_View (Id : E) return E is
1293 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1297 function Generic_Homonym (Id : E) return E is
1299 pragma Assert (Ekind (Id) = E_Generic_Package);
1301 end Generic_Homonym;
1303 function Generic_Renamings (Id : E) return L is
1305 return Elist23 (Id);
1306 end Generic_Renamings;
1308 function Handler_Records (Id : E) return S is
1311 end Handler_Records;
1313 function Has_Aliased_Components (Id : E) return B is
1315 return Flag135 (Implementation_Base_Type (Id));
1316 end Has_Aliased_Components;
1318 function Has_Alignment_Clause (Id : E) return B is
1321 end Has_Alignment_Clause;
1323 function Has_All_Calls_Remote (Id : E) return B is
1326 end Has_All_Calls_Remote;
1328 function Has_Anonymous_Master (Id : E) return B is
1331 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1332 return Flag253 (Id);
1333 end Has_Anonymous_Master;
1335 function Has_Atomic_Components (Id : E) return B is
1337 return Flag86 (Implementation_Base_Type (Id));
1338 end Has_Atomic_Components;
1340 function Has_Biased_Representation (Id : E) return B is
1342 return Flag139 (Id);
1343 end Has_Biased_Representation;
1345 function Has_Completion (Id : E) return B is
1350 function Has_Completion_In_Body (Id : E) return B is
1352 pragma Assert (Is_Type (Id));
1354 end Has_Completion_In_Body;
1356 function Has_Complex_Representation (Id : E) return B is
1358 pragma Assert (Is_Type (Id));
1359 return Flag140 (Implementation_Base_Type (Id));
1360 end Has_Complex_Representation;
1362 function Has_Component_Size_Clause (Id : E) return B is
1364 pragma Assert (Is_Array_Type (Id));
1365 return Flag68 (Implementation_Base_Type (Id));
1366 end Has_Component_Size_Clause;
1368 function Has_Constrained_Partial_View (Id : E) return B is
1370 pragma Assert (Is_Type (Id));
1371 return Flag187 (Id);
1372 end Has_Constrained_Partial_View;
1374 function Has_Controlled_Component (Id : E) return B is
1376 return Flag43 (Base_Type (Id));
1377 end Has_Controlled_Component;
1379 function Has_Contiguous_Rep (Id : E) return B is
1381 return Flag181 (Id);
1382 end Has_Contiguous_Rep;
1384 function Has_Controlling_Result (Id : E) return B is
1387 end Has_Controlling_Result;
1389 function Has_Convention_Pragma (Id : E) return B is
1391 return Flag119 (Id);
1392 end Has_Convention_Pragma;
1394 function Has_Default_Aspect (Id : E) return B is
1396 return Flag39 (Base_Type (Id));
1397 end Has_Default_Aspect;
1399 function Has_Delayed_Aspects (Id : E) return B is
1401 pragma Assert (Nkind (Id) in N_Entity);
1402 return Flag200 (Id);
1403 end Has_Delayed_Aspects;
1405 function Has_Delayed_Freeze (Id : E) return B is
1407 pragma Assert (Nkind (Id) in N_Entity);
1409 end Has_Delayed_Freeze;
1411 function Has_Delayed_Rep_Aspects (Id : E) return B is
1413 pragma Assert (Nkind (Id) in N_Entity);
1414 return Flag261 (Id);
1415 end Has_Delayed_Rep_Aspects;
1417 function Has_Discriminants (Id : E) return B is
1419 pragma Assert (Nkind (Id) in N_Entity);
1421 end Has_Discriminants;
1423 function Has_Dispatch_Table (Id : E) return B is
1425 pragma Assert (Is_Tagged_Type (Id));
1426 return Flag220 (Id);
1427 end Has_Dispatch_Table;
1429 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1431 pragma Assert (Is_Type (Id));
1432 return Flag258 (Id);
1433 end Has_Dynamic_Predicate_Aspect;
1435 function Has_Enumeration_Rep_Clause (Id : E) return B is
1437 pragma Assert (Is_Enumeration_Type (Id));
1439 end Has_Enumeration_Rep_Clause;
1441 function Has_Exit (Id : E) return B is
1446 function Has_Forward_Instantiation (Id : E) return B is
1448 return Flag175 (Id);
1449 end Has_Forward_Instantiation;
1451 function Has_Fully_Qualified_Name (Id : E) return B is
1453 return Flag173 (Id);
1454 end Has_Fully_Qualified_Name;
1456 function Has_Gigi_Rep_Item (Id : E) return B is
1459 end Has_Gigi_Rep_Item;
1461 function Has_Homonym (Id : E) return B is
1466 function Has_Implicit_Dereference (Id : E) return B is
1468 return Flag251 (Id);
1469 end Has_Implicit_Dereference;
1471 function Has_Independent_Components (Id : E) return B is
1473 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1474 return Flag34 (Base_Type (Id));
1475 end Has_Independent_Components;
1477 function Has_Inheritable_Invariants (Id : E) return B is
1479 pragma Assert (Is_Type (Id));
1480 return Flag248 (Id);
1481 end Has_Inheritable_Invariants;
1483 function Has_Initial_Value (Id : E) return B is
1485 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1486 return Flag219 (Id);
1487 end Has_Initial_Value;
1489 function Has_Invariants (Id : E) return B is
1491 pragma Assert (Is_Type (Id));
1492 return Flag232 (Id);
1495 function Has_Loop_Entry_Attributes (Id : E) return B is
1497 pragma Assert (Ekind (Id) = E_Loop);
1498 return Flag260 (Id);
1499 end Has_Loop_Entry_Attributes;
1501 function Has_Machine_Radix_Clause (Id : E) return B is
1503 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1505 end Has_Machine_Radix_Clause;
1507 function Has_Master_Entity (Id : E) return B is
1510 end Has_Master_Entity;
1512 function Has_Missing_Return (Id : E) return B is
1514 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1515 return Flag142 (Id);
1516 end Has_Missing_Return;
1518 function Has_Nested_Block_With_Handler (Id : E) return B is
1520 return Flag101 (Id);
1521 end Has_Nested_Block_With_Handler;
1523 function Has_Non_Standard_Rep (Id : E) return B is
1525 return Flag75 (Implementation_Base_Type (Id));
1526 end Has_Non_Standard_Rep;
1528 function Has_Object_Size_Clause (Id : E) return B is
1530 pragma Assert (Is_Type (Id));
1531 return Flag172 (Id);
1532 end Has_Object_Size_Clause;
1534 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1536 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1537 return Flag110 (Id);
1538 end Has_Out_Or_In_Out_Parameter;
1540 function Has_Per_Object_Constraint (Id : E) return B is
1542 return Flag154 (Id);
1543 end Has_Per_Object_Constraint;
1545 function Has_Postconditions (Id : E) return B is
1547 pragma Assert (Is_Subprogram (Id));
1548 return Flag240 (Id);
1549 end Has_Postconditions;
1551 function Has_Pragma_Controlled (Id : E) return B is
1553 pragma Assert (Is_Access_Type (Id));
1554 return Flag27 (Implementation_Base_Type (Id));
1555 end Has_Pragma_Controlled;
1557 function Has_Pragma_Elaborate_Body (Id : E) return B is
1559 return Flag150 (Id);
1560 end Has_Pragma_Elaborate_Body;
1562 function Has_Pragma_Inline (Id : E) return B is
1564 return Flag157 (Id);
1565 end Has_Pragma_Inline;
1567 function Has_Pragma_Inline_Always (Id : E) return B is
1569 return Flag230 (Id);
1570 end Has_Pragma_Inline_Always;
1572 function Has_Pragma_No_Inline (Id : E) return B is
1574 return Flag201 (Id);
1575 end Has_Pragma_No_Inline;
1577 function Has_Pragma_Ordered (Id : E) return B is
1579 pragma Assert (Is_Enumeration_Type (Id));
1580 return Flag198 (Implementation_Base_Type (Id));
1581 end Has_Pragma_Ordered;
1583 function Has_Pragma_Pack (Id : E) return B is
1585 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1586 return Flag121 (Implementation_Base_Type (Id));
1587 end Has_Pragma_Pack;
1589 function Has_Pragma_Preelab_Init (Id : E) return B is
1591 return Flag221 (Id);
1592 end Has_Pragma_Preelab_Init;
1594 function Has_Pragma_Pure (Id : E) return B is
1596 return Flag203 (Id);
1597 end Has_Pragma_Pure;
1599 function Has_Pragma_Pure_Function (Id : E) return B is
1601 return Flag179 (Id);
1602 end Has_Pragma_Pure_Function;
1604 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1606 return Flag169 (Id);
1607 end Has_Pragma_Thread_Local_Storage;
1609 function Has_Pragma_Unmodified (Id : E) return B is
1611 return Flag233 (Id);
1612 end Has_Pragma_Unmodified;
1614 function Has_Pragma_Unreferenced (Id : E) return B is
1616 return Flag180 (Id);
1617 end Has_Pragma_Unreferenced;
1619 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1621 pragma Assert (Is_Type (Id));
1622 return Flag212 (Id);
1623 end Has_Pragma_Unreferenced_Objects;
1625 function Has_Predicates (Id : E) return B is
1627 pragma Assert (Is_Type (Id));
1628 return Flag250 (Id);
1631 function Has_Primitive_Operations (Id : E) return B is
1633 pragma Assert (Is_Type (Id));
1634 return Flag120 (Base_Type (Id));
1635 end Has_Primitive_Operations;
1637 function Has_Private_Ancestor (Id : E) return B is
1639 return Flag151 (Id);
1640 end Has_Private_Ancestor;
1642 function Has_Private_Declaration (Id : E) return B is
1644 return Flag155 (Id);
1645 end Has_Private_Declaration;
1647 function Has_Protected (Id : E) return B is
1649 return Flag271 (Id);
1652 function Has_Qualified_Name (Id : E) return B is
1654 return Flag161 (Id);
1655 end Has_Qualified_Name;
1657 function Has_RACW (Id : E) return B is
1659 pragma Assert (Ekind (Id) = E_Package);
1660 return Flag214 (Id);
1663 function Has_Record_Rep_Clause (Id : E) return B is
1665 pragma Assert (Is_Record_Type (Id));
1666 return Flag65 (Implementation_Base_Type (Id));
1667 end Has_Record_Rep_Clause;
1669 function Has_Recursive_Call (Id : E) return B is
1671 pragma Assert (Is_Subprogram (Id));
1672 return Flag143 (Id);
1673 end Has_Recursive_Call;
1675 function Has_Shift_Operator (Id : E) return B is
1677 pragma Assert (Is_Integer_Type (Id));
1678 return Flag267 (Base_Type (Id));
1679 end Has_Shift_Operator;
1681 function Has_Size_Clause (Id : E) return B is
1684 end Has_Size_Clause;
1686 function Has_Small_Clause (Id : E) return B is
1689 end Has_Small_Clause;
1691 function Has_Specified_Layout (Id : E) return B is
1693 pragma Assert (Is_Type (Id));
1694 return Flag100 (Implementation_Base_Type (Id));
1695 end Has_Specified_Layout;
1697 function Has_Specified_Stream_Input (Id : E) return B is
1699 pragma Assert (Is_Type (Id));
1700 return Flag190 (Id);
1701 end Has_Specified_Stream_Input;
1703 function Has_Specified_Stream_Output (Id : E) return B is
1705 pragma Assert (Is_Type (Id));
1706 return Flag191 (Id);
1707 end Has_Specified_Stream_Output;
1709 function Has_Specified_Stream_Read (Id : E) return B is
1711 pragma Assert (Is_Type (Id));
1712 return Flag192 (Id);
1713 end Has_Specified_Stream_Read;
1715 function Has_Specified_Stream_Write (Id : E) return B is
1717 pragma Assert (Is_Type (Id));
1718 return Flag193 (Id);
1719 end Has_Specified_Stream_Write;
1721 function Has_Static_Discriminants (Id : E) return B is
1723 pragma Assert (Is_Type (Id));
1724 return Flag211 (Id);
1725 end Has_Static_Discriminants;
1727 function Has_Static_Predicate (Id : E) return B is
1729 pragma Assert (Is_Type (Id));
1730 return Flag269 (Id);
1731 end Has_Static_Predicate;
1733 function Has_Static_Predicate_Aspect (Id : E) return B is
1735 pragma Assert (Is_Type (Id));
1736 return Flag259 (Id);
1737 end Has_Static_Predicate_Aspect;
1739 function Has_Storage_Size_Clause (Id : E) return B is
1741 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1742 return Flag23 (Implementation_Base_Type (Id));
1743 end Has_Storage_Size_Clause;
1745 function Has_Stream_Size_Clause (Id : E) return B is
1747 return Flag184 (Id);
1748 end Has_Stream_Size_Clause;
1750 function Has_Task (Id : E) return B is
1752 return Flag30 (Base_Type (Id));
1755 function Has_Thunks (Id : E) return B is
1757 return Flag228 (Id);
1760 function Has_Unchecked_Union (Id : E) return B is
1762 return Flag123 (Base_Type (Id));
1763 end Has_Unchecked_Union;
1765 function Has_Unknown_Discriminants (Id : E) return B is
1767 pragma Assert (Is_Type (Id));
1769 end Has_Unknown_Discriminants;
1771 function Has_Up_Level_Access (Id : E) return B is
1774 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1775 return Flag215 (Id);
1776 end Has_Up_Level_Access;
1778 function Has_Visible_Refinement (Id : E) return B is
1780 pragma Assert (Ekind (Id) = E_Abstract_State);
1781 return Flag263 (Id);
1782 end Has_Visible_Refinement;
1784 function Has_Volatile_Components (Id : E) return B is
1786 return Flag87 (Implementation_Base_Type (Id));
1787 end Has_Volatile_Components;
1789 function Has_Xref_Entry (Id : E) return B is
1791 return Flag182 (Id);
1794 function Hiding_Loop_Variable (Id : E) return E is
1796 pragma Assert (Ekind (Id) = E_Variable);
1798 end Hiding_Loop_Variable;
1800 function Homonym (Id : E) return E is
1805 function Import_Pragma (Id : E) return E is
1807 pragma Assert (Is_Subprogram (Id));
1811 function Interface_Alias (Id : E) return E is
1813 pragma Assert (Is_Subprogram (Id));
1815 end Interface_Alias;
1817 function Interfaces (Id : E) return L is
1819 pragma Assert (Is_Record_Type (Id));
1820 return Elist25 (Id);
1823 function In_Package_Body (Id : E) return B is
1826 end In_Package_Body;
1828 function In_Private_Part (Id : E) return B is
1831 end In_Private_Part;
1833 function In_Use (Id : E) return B is
1835 pragma Assert (Nkind (Id) in N_Entity);
1839 function Initialization_Statements (Id : E) return N is
1841 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1843 end Initialization_Statements;
1845 function Inner_Instances (Id : E) return L is
1847 return Elist23 (Id);
1848 end Inner_Instances;
1850 function Interface_Name (Id : E) return N is
1855 function Is_Abstract_Subprogram (Id : E) return B is
1857 pragma Assert (Is_Overloadable (Id));
1859 end Is_Abstract_Subprogram;
1861 function Is_Abstract_Type (Id : E) return B is
1863 pragma Assert (Is_Type (Id));
1864 return Flag146 (Id);
1865 end Is_Abstract_Type;
1867 function Is_Local_Anonymous_Access (Id : E) return B is
1869 pragma Assert (Is_Access_Type (Id));
1870 return Flag194 (Id);
1871 end Is_Local_Anonymous_Access;
1873 function Is_Access_Constant (Id : E) return B is
1875 pragma Assert (Is_Access_Type (Id));
1877 end Is_Access_Constant;
1879 function Is_Ada_2005_Only (Id : E) return B is
1881 return Flag185 (Id);
1882 end Is_Ada_2005_Only;
1884 function Is_Ada_2012_Only (Id : E) return B is
1886 return Flag199 (Id);
1887 end Is_Ada_2012_Only;
1889 function Is_Aliased (Id : E) return B is
1891 pragma Assert (Nkind (Id) in N_Entity);
1895 function Is_AST_Entry (Id : E) return B is
1897 pragma Assert (Is_Entry (Id));
1898 return Flag132 (Id);
1901 function Is_Asynchronous (Id : E) return B is
1903 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1905 end Is_Asynchronous;
1907 function Is_Atomic (Id : E) return B is
1912 function Is_Bit_Packed_Array (Id : E) return B is
1914 return Flag122 (Implementation_Base_Type (Id));
1915 end Is_Bit_Packed_Array;
1917 function Is_Called (Id : E) return B is
1919 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1920 return Flag102 (Id);
1923 function Is_Character_Type (Id : E) return B is
1926 end Is_Character_Type;
1928 function Is_Child_Unit (Id : E) return B is
1933 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1936 end Is_Class_Wide_Equivalent_Type;
1938 function Is_Compilation_Unit (Id : E) return B is
1940 return Flag149 (Id);
1941 end Is_Compilation_Unit;
1943 function Is_Completely_Hidden (Id : E) return B is
1945 pragma Assert (Ekind (Id) = E_Discriminant);
1946 return Flag103 (Id);
1947 end Is_Completely_Hidden;
1949 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1952 end Is_Constr_Subt_For_U_Nominal;
1954 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1956 return Flag141 (Id);
1957 end Is_Constr_Subt_For_UN_Aliased;
1959 function Is_Constrained (Id : E) return B is
1961 pragma Assert (Nkind (Id) in N_Entity);
1965 function Is_Constructor (Id : E) return B is
1970 function Is_Controlled (Id : E) return B is
1972 return Flag42 (Base_Type (Id));
1975 function Is_Controlling_Formal (Id : E) return B is
1977 pragma Assert (Is_Formal (Id));
1979 end Is_Controlling_Formal;
1981 function Is_CPP_Class (Id : E) return B is
1986 function Is_Descendent_Of_Address (Id : E) return B is
1988 return Flag223 (Id);
1989 end Is_Descendent_Of_Address;
1991 function Is_Discrim_SO_Function (Id : E) return B is
1993 return Flag176 (Id);
1994 end Is_Discrim_SO_Function;
1996 function Is_Discriminant_Check_Function (Id : E) return B is
1998 return Flag264 (Id);
1999 end Is_Discriminant_Check_Function;
2001 function Is_Dispatch_Table_Entity (Id : E) return B is
2003 return Flag234 (Id);
2004 end Is_Dispatch_Table_Entity;
2006 function Is_Dispatching_Operation (Id : E) return B is
2008 pragma Assert (Nkind (Id) in N_Entity);
2010 end Is_Dispatching_Operation;
2012 function Is_Eliminated (Id : E) return B is
2014 return Flag124 (Id);
2017 function Is_Entry_Formal (Id : E) return B is
2020 end Is_Entry_Formal;
2022 function Is_Exported (Id : E) return B is
2027 function Is_First_Subtype (Id : E) return B is
2030 end Is_First_Subtype;
2032 function Is_For_Access_Subtype (Id : E) return B is
2034 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2035 return Flag118 (Id);
2036 end Is_For_Access_Subtype;
2038 function Is_Formal_Subprogram (Id : E) return B is
2040 return Flag111 (Id);
2041 end Is_Formal_Subprogram;
2043 function Is_Frozen (Id : E) return B is
2048 function Is_Generic_Actual_Type (Id : E) return B is
2050 pragma Assert (Is_Type (Id));
2052 end Is_Generic_Actual_Type;
2054 function Is_Generic_Instance (Id : E) return B is
2056 return Flag130 (Id);
2057 end Is_Generic_Instance;
2059 function Is_Generic_Type (Id : E) return B is
2061 pragma Assert (Nkind (Id) in N_Entity);
2063 end Is_Generic_Type;
2065 function Is_Hidden (Id : E) return B is
2070 function Is_Hidden_Open_Scope (Id : E) return B is
2072 return Flag171 (Id);
2073 end Is_Hidden_Open_Scope;
2075 function Is_Immediately_Visible (Id : E) return B is
2077 pragma Assert (Nkind (Id) in N_Entity);
2079 end Is_Immediately_Visible;
2081 function Is_Implementation_Defined (Id : E) return B is
2083 return Flag254 (Id);
2084 end Is_Implementation_Defined;
2086 function Is_Imported (Id : E) return B is
2091 function Is_Independent (Id : E) return B is
2093 pragma Assert (Ekind (Id) = E_Component);
2094 return Flag268 (Id);
2097 function Is_Inlined (Id : E) return B is
2102 function Is_Interface (Id : E) return B is
2104 return Flag186 (Id);
2107 function Is_Instantiated (Id : E) return B is
2109 return Flag126 (Id);
2110 end Is_Instantiated;
2112 function Is_Internal (Id : E) return B is
2114 pragma Assert (Nkind (Id) in N_Entity);
2118 function Is_Interrupt_Handler (Id : E) return B is
2120 pragma Assert (Nkind (Id) in N_Entity);
2122 end Is_Interrupt_Handler;
2124 function Is_Intrinsic_Subprogram (Id : E) return B is
2127 end Is_Intrinsic_Subprogram;
2129 function Is_Invariant_Procedure (Id : E) return B is
2131 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2132 return Flag257 (Id);
2133 end Is_Invariant_Procedure;
2135 function Is_Itype (Id : E) return B is
2140 function Is_Known_Non_Null (Id : E) return B is
2143 end Is_Known_Non_Null;
2145 function Is_Known_Null (Id : E) return B is
2147 return Flag204 (Id);
2150 function Is_Known_Valid (Id : E) return B is
2152 return Flag170 (Id);
2155 function Is_Limited_Composite (Id : E) return B is
2157 return Flag106 (Id);
2158 end Is_Limited_Composite;
2160 function Is_Limited_Interface (Id : E) return B is
2162 return Flag197 (Id);
2163 end Is_Limited_Interface;
2165 function Is_Limited_Record (Id : E) return B is
2168 end Is_Limited_Record;
2170 function Is_Machine_Code_Subprogram (Id : E) return B is
2172 pragma Assert (Is_Subprogram (Id));
2173 return Flag137 (Id);
2174 end Is_Machine_Code_Subprogram;
2176 function Is_Non_Static_Subtype (Id : E) return B is
2178 pragma Assert (Is_Type (Id));
2179 return Flag109 (Id);
2180 end Is_Non_Static_Subtype;
2182 function Is_Null_Init_Proc (Id : E) return B is
2184 pragma Assert (Ekind (Id) = E_Procedure);
2185 return Flag178 (Id);
2186 end Is_Null_Init_Proc;
2188 function Is_Obsolescent (Id : E) return B is
2190 return Flag153 (Id);
2193 function Is_Only_Out_Parameter (Id : E) return B is
2195 pragma Assert (Is_Formal (Id));
2196 return Flag226 (Id);
2197 end Is_Only_Out_Parameter;
2199 function Is_Optional_Parameter (Id : E) return B is
2201 pragma Assert (Is_Formal (Id));
2202 return Flag134 (Id);
2203 end Is_Optional_Parameter;
2205 function Is_Package_Body_Entity (Id : E) return B is
2207 return Flag160 (Id);
2208 end Is_Package_Body_Entity;
2210 function Is_Packed (Id : E) return B is
2212 return Flag51 (Implementation_Base_Type (Id));
2215 function Is_Packed_Array_Impl_Type (Id : E) return B is
2217 return Flag138 (Id);
2218 end Is_Packed_Array_Impl_Type;
2220 function Is_Potentially_Use_Visible (Id : E) return B is
2222 pragma Assert (Nkind (Id) in N_Entity);
2224 end Is_Potentially_Use_Visible;
2226 function Is_Predicate_Function (Id : E) return B is
2228 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2229 return Flag255 (Id);
2230 end Is_Predicate_Function;
2232 function Is_Predicate_Function_M (Id : E) return B is
2234 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2235 return Flag256 (Id);
2236 end Is_Predicate_Function_M;
2238 function Is_Preelaborated (Id : E) return B is
2241 end Is_Preelaborated;
2243 function Is_Primitive (Id : E) return B is
2246 (Is_Overloadable (Id)
2247 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2248 return Flag218 (Id);
2251 function Is_Primitive_Wrapper (Id : E) return B is
2253 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2254 return Flag195 (Id);
2255 end Is_Primitive_Wrapper;
2257 function Is_Private_Composite (Id : E) return B is
2259 pragma Assert (Is_Type (Id));
2260 return Flag107 (Id);
2261 end Is_Private_Composite;
2263 function Is_Private_Descendant (Id : E) return B is
2266 end Is_Private_Descendant;
2268 function Is_Private_Primitive (Id : E) return B is
2270 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2271 return Flag245 (Id);
2272 end Is_Private_Primitive;
2274 function Is_Processed_Transient (Id : E) return B is
2276 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2277 return Flag252 (Id);
2278 end Is_Processed_Transient;
2280 function Is_Public (Id : E) return B is
2282 pragma Assert (Nkind (Id) in N_Entity);
2286 function Is_Pure (Id : E) return B is
2291 function Is_Pure_Unit_Access_Type (Id : E) return B is
2293 pragma Assert (Is_Access_Type (Id));
2294 return Flag189 (Id);
2295 end Is_Pure_Unit_Access_Type;
2297 function Is_RACW_Stub_Type (Id : E) return B is
2299 pragma Assert (Is_Type (Id));
2300 return Flag244 (Id);
2301 end Is_RACW_Stub_Type;
2303 function Is_Raised (Id : E) return B is
2305 pragma Assert (Ekind (Id) = E_Exception);
2306 return Flag224 (Id);
2309 function Is_Remote_Call_Interface (Id : E) return B is
2312 end Is_Remote_Call_Interface;
2314 function Is_Remote_Types (Id : E) return B is
2317 end Is_Remote_Types;
2319 function Is_Renaming_Of_Object (Id : E) return B is
2321 return Flag112 (Id);
2322 end Is_Renaming_Of_Object;
2324 function Is_Return_Object (Id : E) return B is
2326 return Flag209 (Id);
2327 end Is_Return_Object;
2329 function Is_Safe_To_Reevaluate (Id : E) return B is
2331 return Flag249 (Id);
2332 end Is_Safe_To_Reevaluate;
2334 function Is_Shared_Passive (Id : E) return B is
2337 end Is_Shared_Passive;
2339 function Is_Statically_Allocated (Id : E) return B is
2342 end Is_Statically_Allocated;
2344 function Is_Tag (Id : E) return B is
2346 pragma Assert (Nkind (Id) in N_Entity);
2350 function Is_Tagged_Type (Id : E) return B is
2355 function Is_Thunk (Id : E) return B is
2357 return Flag225 (Id);
2360 function Is_Trivial_Subprogram (Id : E) return B is
2362 return Flag235 (Id);
2363 end Is_Trivial_Subprogram;
2365 function Is_True_Constant (Id : E) return B is
2367 return Flag163 (Id);
2368 end Is_True_Constant;
2370 function Is_Unchecked_Union (Id : E) return B is
2372 return Flag117 (Implementation_Base_Type (Id));
2373 end Is_Unchecked_Union;
2375 function Is_Underlying_Record_View (Id : E) return B is
2377 return Flag246 (Id);
2378 end Is_Underlying_Record_View;
2380 function Is_Unsigned_Type (Id : E) return B is
2382 pragma Assert (Is_Type (Id));
2383 return Flag144 (Id);
2384 end Is_Unsigned_Type;
2386 function Is_Valued_Procedure (Id : E) return B is
2388 pragma Assert (Ekind (Id) = E_Procedure);
2389 return Flag127 (Id);
2390 end Is_Valued_Procedure;
2392 function Is_Visible_Formal (Id : E) return B is
2394 return Flag206 (Id);
2395 end Is_Visible_Formal;
2397 function Is_Visible_Lib_Unit (Id : E) return B is
2399 return Flag116 (Id);
2400 end Is_Visible_Lib_Unit;
2402 function Is_VMS_Exception (Id : E) return B is
2404 return Flag133 (Id);
2405 end Is_VMS_Exception;
2407 function Is_Volatile (Id : E) return B is
2409 pragma Assert (Nkind (Id) in N_Entity);
2411 if Is_Type (Id) then
2412 return Flag16 (Base_Type (Id));
2418 function Itype_Printed (Id : E) return B is
2420 pragma Assert (Is_Itype (Id));
2421 return Flag202 (Id);
2424 function Kill_Elaboration_Checks (Id : E) return B is
2427 end Kill_Elaboration_Checks;
2429 function Kill_Range_Checks (Id : E) return B is
2432 end Kill_Range_Checks;
2434 function Known_To_Have_Preelab_Init (Id : E) return B is
2436 pragma Assert (Is_Type (Id));
2437 return Flag207 (Id);
2438 end Known_To_Have_Preelab_Init;
2440 function Last_Aggregate_Assignment (Id : E) return N is
2442 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2444 end Last_Aggregate_Assignment;
2446 function Last_Assignment (Id : E) return N is
2448 pragma Assert (Is_Assignable (Id));
2450 end Last_Assignment;
2452 function Last_Entity (Id : E) return E is
2457 function Limited_View (Id : E) return E is
2459 pragma Assert (Ekind (Id) = E_Package);
2463 function Linker_Section_Pragma (Id : E) return N is
2466 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2468 end Linker_Section_Pragma;
2470 function Lit_Indexes (Id : E) return E is
2472 pragma Assert (Is_Enumeration_Type (Id));
2476 function Lit_Strings (Id : E) return E is
2478 pragma Assert (Is_Enumeration_Type (Id));
2482 function Low_Bound_Tested (Id : E) return B is
2484 return Flag205 (Id);
2485 end Low_Bound_Tested;
2487 function Machine_Radix_10 (Id : E) return B is
2489 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2491 end Machine_Radix_10;
2493 function Master_Id (Id : E) return E is
2495 pragma Assert (Is_Access_Type (Id));
2499 function Materialize_Entity (Id : E) return B is
2501 return Flag168 (Id);
2502 end Materialize_Entity;
2504 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2506 return Flag262 (Id);
2507 end May_Inherit_Delayed_Rep_Aspects;
2509 function Mechanism (Id : E) return M is
2511 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2512 return UI_To_Int (Uint8 (Id));
2515 function Modulus (Id : E) return Uint is
2517 pragma Assert (Is_Modular_Integer_Type (Id));
2518 return Uint17 (Base_Type (Id));
2521 function Must_Be_On_Byte_Boundary (Id : E) return B is
2523 pragma Assert (Is_Type (Id));
2524 return Flag183 (Id);
2525 end Must_Be_On_Byte_Boundary;
2527 function Must_Have_Preelab_Init (Id : E) return B is
2529 pragma Assert (Is_Type (Id));
2530 return Flag208 (Id);
2531 end Must_Have_Preelab_Init;
2533 function Needs_Debug_Info (Id : E) return B is
2535 return Flag147 (Id);
2536 end Needs_Debug_Info;
2538 function Needs_No_Actuals (Id : E) return B is
2541 (Is_Overloadable (Id)
2542 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2544 end Needs_No_Actuals;
2546 function Never_Set_In_Source (Id : E) return B is
2548 return Flag115 (Id);
2549 end Never_Set_In_Source;
2551 function Next_Inlined_Subprogram (Id : E) return E is
2554 end Next_Inlined_Subprogram;
2556 function No_Pool_Assigned (Id : E) return B is
2558 pragma Assert (Is_Access_Type (Id));
2559 return Flag131 (Root_Type (Id));
2560 end No_Pool_Assigned;
2562 function No_Return (Id : E) return B is
2564 return Flag113 (Id);
2567 function No_Strict_Aliasing (Id : E) return B is
2569 pragma Assert (Is_Access_Type (Id));
2570 return Flag136 (Base_Type (Id));
2571 end No_Strict_Aliasing;
2573 function Non_Binary_Modulus (Id : E) return B is
2575 pragma Assert (Is_Type (Id));
2576 return Flag58 (Base_Type (Id));
2577 end Non_Binary_Modulus;
2579 function Non_Limited_View (Id : E) return E is
2582 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2584 end Non_Limited_View;
2586 function Nonzero_Is_True (Id : E) return B is
2588 pragma Assert (Root_Type (Id) = Standard_Boolean);
2589 return Flag162 (Base_Type (Id));
2590 end Nonzero_Is_True;
2592 function Normalized_First_Bit (Id : E) return U is
2594 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2596 end Normalized_First_Bit;
2598 function Normalized_Position (Id : E) return U is
2600 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2602 end Normalized_Position;
2604 function Normalized_Position_Max (Id : E) return U is
2606 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2608 end Normalized_Position_Max;
2610 function OK_To_Rename (Id : E) return B is
2612 pragma Assert (Ekind (Id) = E_Variable);
2613 return Flag247 (Id);
2616 function OK_To_Reorder_Components (Id : E) return B is
2618 pragma Assert (Is_Record_Type (Id));
2619 return Flag239 (Base_Type (Id));
2620 end OK_To_Reorder_Components;
2622 function Optimize_Alignment_Space (Id : E) return B is
2625 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2626 return Flag241 (Id);
2627 end Optimize_Alignment_Space;
2629 function Optimize_Alignment_Time (Id : E) return B is
2632 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2633 return Flag242 (Id);
2634 end Optimize_Alignment_Time;
2636 function Original_Access_Type (Id : E) return E is
2638 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2640 end Original_Access_Type;
2642 function Original_Array_Type (Id : E) return E is
2644 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2646 end Original_Array_Type;
2648 function Original_Record_Component (Id : E) return E is
2650 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2652 end Original_Record_Component;
2654 function Overlays_Constant (Id : E) return B is
2656 return Flag243 (Id);
2657 end Overlays_Constant;
2659 function Overridden_Operation (Id : E) return E is
2662 end Overridden_Operation;
2664 function Package_Instantiation (Id : E) return N is
2666 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2668 end Package_Instantiation;
2670 function Packed_Array_Impl_Type (Id : E) return E is
2672 pragma Assert (Is_Array_Type (Id));
2674 end Packed_Array_Impl_Type;
2676 function Parent_Subtype (Id : E) return E is
2678 pragma Assert (Is_Record_Type (Id));
2679 return Node19 (Base_Type (Id));
2682 function Part_Of_Constituents (Id : E) return L is
2684 pragma Assert (Ekind (Id) = E_Abstract_State);
2686 end Part_Of_Constituents;
2688 function Postcondition_Proc (Id : E) return E is
2690 pragma Assert (Ekind (Id) = E_Procedure);
2692 end Postcondition_Proc;
2694 function PPC_Wrapper (Id : E) return E is
2696 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2700 function Prival (Id : E) return E is
2702 pragma Assert (Is_Protected_Component (Id));
2706 function Prival_Link (Id : E) return E is
2708 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2712 function Private_Dependents (Id : E) return L is
2714 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2715 return Elist18 (Id);
2716 end Private_Dependents;
2718 function Private_View (Id : E) return N is
2720 pragma Assert (Is_Private_Type (Id));
2724 function Protected_Body_Subprogram (Id : E) return E is
2726 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2728 end Protected_Body_Subprogram;
2730 function Protected_Formal (Id : E) return E is
2732 pragma Assert (Is_Formal (Id));
2734 end Protected_Formal;
2736 function Protection_Object (Id : E) return E is
2739 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2741 end Protection_Object;
2743 function Reachable (Id : E) return B is
2748 function Referenced (Id : E) return B is
2750 return Flag156 (Id);
2753 function Referenced_As_LHS (Id : E) return B is
2756 end Referenced_As_LHS;
2758 function Referenced_As_Out_Parameter (Id : E) return B is
2760 return Flag227 (Id);
2761 end Referenced_As_Out_Parameter;
2763 function Refinement_Constituents (Id : E) return L is
2765 pragma Assert (Ekind (Id) = E_Abstract_State);
2767 end Refinement_Constituents;
2769 function Register_Exception_Call (Id : E) return N is
2771 pragma Assert (Ekind (Id) = E_Exception);
2773 end Register_Exception_Call;
2775 function Related_Array_Object (Id : E) return E is
2777 pragma Assert (Is_Array_Type (Id));
2779 end Related_Array_Object;
2781 function Related_Expression (Id : E) return N is
2783 pragma Assert (Ekind (Id) in Type_Kind
2784 or else Ekind_In (Id, E_Constant, E_Variable));
2786 end Related_Expression;
2788 function Related_Instance (Id : E) return E is
2790 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2792 end Related_Instance;
2794 function Related_Type (Id : E) return E is
2796 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2800 function Relative_Deadline_Variable (Id : E) return E is
2802 pragma Assert (Is_Task_Type (Id));
2803 return Node26 (Implementation_Base_Type (Id));
2804 end Relative_Deadline_Variable;
2806 function Renamed_Entity (Id : E) return N is
2811 function Renamed_In_Spec (Id : E) return B is
2813 pragma Assert (Ekind (Id) = E_Package);
2814 return Flag231 (Id);
2815 end Renamed_In_Spec;
2817 function Renamed_Object (Id : E) return N is
2822 function Renaming_Map (Id : E) return U is
2827 function Requires_Overriding (Id : E) return B is
2829 pragma Assert (Is_Overloadable (Id));
2830 return Flag213 (Id);
2831 end Requires_Overriding;
2833 function Return_Present (Id : E) return B is
2838 function Return_Applies_To (Id : E) return N is
2841 end Return_Applies_To;
2843 function Returns_By_Ref (Id : E) return B is
2848 function Reverse_Bit_Order (Id : E) return B is
2850 pragma Assert (Is_Record_Type (Id));
2851 return Flag164 (Base_Type (Id));
2852 end Reverse_Bit_Order;
2854 function Reverse_Storage_Order (Id : E) return B is
2856 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2857 return Flag93 (Base_Type (Id));
2858 end Reverse_Storage_Order;
2860 function RM_Size (Id : E) return U is
2862 pragma Assert (Is_Type (Id));
2866 function Scalar_Range (Id : E) return N is
2871 function Scale_Value (Id : E) return U is
2876 function Scope_Depth_Value (Id : E) return U is
2879 end Scope_Depth_Value;
2881 function Sec_Stack_Needed_For_Return (Id : E) return B is
2883 return Flag167 (Id);
2884 end Sec_Stack_Needed_For_Return;
2886 function Shadow_Entities (Id : E) return S is
2888 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2890 end Shadow_Entities;
2892 function Shared_Var_Procs_Instance (Id : E) return E is
2894 pragma Assert (Ekind (Id) = E_Variable);
2896 end Shared_Var_Procs_Instance;
2898 function Size_Check_Code (Id : E) return N is
2900 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2902 end Size_Check_Code;
2904 function Size_Depends_On_Discriminant (Id : E) return B is
2906 return Flag177 (Id);
2907 end Size_Depends_On_Discriminant;
2909 function Size_Known_At_Compile_Time (Id : E) return B is
2912 end Size_Known_At_Compile_Time;
2914 function Small_Value (Id : E) return R is
2916 pragma Assert (Is_Fixed_Point_Type (Id));
2917 return Ureal21 (Id);
2920 function SPARK_Aux_Pragma (Id : E) return N is
2923 (Ekind_In (Id, E_Generic_Package, -- package variants
2927 end SPARK_Aux_Pragma;
2929 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2932 (Ekind_In (Id, E_Generic_Package, -- package variants
2935 return Flag266 (Id);
2936 end SPARK_Aux_Pragma_Inherited;
2938 function SPARK_Pragma (Id : E) return N is
2941 (Ekind_In (Id, E_Function, -- subprogram variants
2943 E_Generic_Procedure,
2947 Ekind_In (Id, E_Generic_Package, -- package variants
2953 function SPARK_Pragma_Inherited (Id : E) return B is
2956 (Ekind_In (Id, E_Function, -- subprogram variants
2958 E_Generic_Procedure,
2962 Ekind_In (Id, E_Generic_Package, -- package variants
2965 return Flag265 (Id);
2966 end SPARK_Pragma_Inherited;
2968 function Spec_Entity (Id : E) return E is
2970 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2974 function Static_Predicate (Id : E) return S is
2976 pragma Assert (Is_Discrete_Type (Id));
2978 end Static_Predicate;
2980 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2982 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2984 end Status_Flag_Or_Transient_Decl;
2986 function Storage_Size_Variable (Id : E) return E is
2988 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2989 return Node15 (Implementation_Base_Type (Id));
2990 end Storage_Size_Variable;
2992 function Static_Elaboration_Desired (Id : E) return B is
2994 pragma Assert (Ekind (Id) = E_Package);
2996 end Static_Elaboration_Desired;
2998 function Static_Initialization (Id : E) return N is
3001 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3003 end Static_Initialization;
3005 function Stored_Constraint (Id : E) return L is
3008 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3009 return Elist23 (Id);
3010 end Stored_Constraint;
3012 function Stores_Attribute_Old_Prefix (Id : E) return B is
3014 return Flag270 (Id);
3015 end Stores_Attribute_Old_Prefix;
3017 function Strict_Alignment (Id : E) return B is
3019 return Flag145 (Implementation_Base_Type (Id));
3020 end Strict_Alignment;
3022 function String_Literal_Length (Id : E) return U is
3025 end String_Literal_Length;
3027 function String_Literal_Low_Bound (Id : E) return N is
3030 end String_Literal_Low_Bound;
3032 function Subprograms_For_Type (Id : E) return E is
3034 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3036 end Subprograms_For_Type;
3038 function Suppress_Elaboration_Warnings (Id : E) return B is
3040 return Flag148 (Id);
3041 end Suppress_Elaboration_Warnings;
3043 function Suppress_Initialization (Id : E) return B is
3045 pragma Assert (Is_Type (Id));
3046 return Flag105 (Id);
3047 end Suppress_Initialization;
3049 function Suppress_Style_Checks (Id : E) return B is
3051 return Flag165 (Id);
3052 end Suppress_Style_Checks;
3054 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3056 return Flag217 (Id);
3057 end Suppress_Value_Tracking_On_Call;
3059 function Task_Body_Procedure (Id : E) return N is
3061 pragma Assert (Ekind (Id) in Task_Kind);
3063 end Task_Body_Procedure;
3065 function Thunk_Entity (Id : E) return E is
3067 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3068 and then Is_Thunk (Id));
3072 function Treat_As_Volatile (Id : E) return B is
3075 end Treat_As_Volatile;
3077 function Underlying_Full_View (Id : E) return E is
3079 pragma Assert (Ekind (Id) in Private_Kind);
3081 end Underlying_Full_View;
3083 function Underlying_Record_View (Id : E) return E is
3086 end Underlying_Record_View;
3088 function Universal_Aliasing (Id : E) return B is
3090 pragma Assert (Is_Type (Id));
3091 return Flag216 (Implementation_Base_Type (Id));
3092 end Universal_Aliasing;
3094 function Unset_Reference (Id : E) return N is
3097 end Unset_Reference;
3099 function Used_As_Generic_Actual (Id : E) return B is
3101 return Flag222 (Id);
3102 end Used_As_Generic_Actual;
3104 function Uses_Lock_Free (Id : E) return B is
3106 pragma Assert (Is_Protected_Type (Id));
3107 return Flag188 (Id);
3110 function Uses_Sec_Stack (Id : E) return B is
3115 function Warnings_Off (Id : E) return B is
3120 function Warnings_Off_Used (Id : E) return B is
3122 return Flag236 (Id);
3123 end Warnings_Off_Used;
3125 function Warnings_Off_Used_Unmodified (Id : E) return B is
3127 return Flag237 (Id);
3128 end Warnings_Off_Used_Unmodified;
3130 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3132 return Flag238 (Id);
3133 end Warnings_Off_Used_Unreferenced;
3135 function Wrapped_Entity (Id : E) return E is
3137 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3138 and then Is_Primitive_Wrapper (Id));
3142 function Was_Hidden (Id : E) return B is
3144 return Flag196 (Id);
3147 ------------------------------
3148 -- Classification Functions --
3149 ------------------------------
3151 function Is_Access_Type (Id : E) return B is
3153 return Ekind (Id) in Access_Kind;
3156 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3158 return Ekind (Id) in Access_Protected_Kind;
3159 end Is_Access_Protected_Subprogram_Type;
3161 function Is_Access_Subprogram_Type (Id : E) return B is
3163 return Ekind (Id) in Access_Subprogram_Kind;
3164 end Is_Access_Subprogram_Type;
3166 function Is_Aggregate_Type (Id : E) return B is
3168 return Ekind (Id) in Aggregate_Kind;
3169 end Is_Aggregate_Type;
3171 function Is_Array_Type (Id : E) return B is
3173 return Ekind (Id) in Array_Kind;
3176 function Is_Assignable (Id : E) return B is
3178 return Ekind (Id) in Assignable_Kind;
3181 function Is_Class_Wide_Type (Id : E) return B is
3183 return Ekind (Id) in Class_Wide_Kind;
3184 end Is_Class_Wide_Type;
3186 function Is_Composite_Type (Id : E) return B is
3188 return Ekind (Id) in Composite_Kind;
3189 end Is_Composite_Type;
3191 function Is_Concurrent_Body (Id : E) return B is
3193 return Ekind (Id) in
3194 Concurrent_Body_Kind;
3195 end Is_Concurrent_Body;
3197 function Is_Concurrent_Record_Type (Id : E) return B is
3200 end Is_Concurrent_Record_Type;
3202 function Is_Concurrent_Type (Id : E) return B is
3204 return Ekind (Id) in Concurrent_Kind;
3205 end Is_Concurrent_Type;
3207 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3209 return Ekind (Id) in
3210 Decimal_Fixed_Point_Kind;
3211 end Is_Decimal_Fixed_Point_Type;
3213 function Is_Digits_Type (Id : E) return B is
3215 return Ekind (Id) in Digits_Kind;
3218 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3220 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3221 end Is_Discrete_Or_Fixed_Point_Type;
3223 function Is_Discrete_Type (Id : E) return B is
3225 return Ekind (Id) in Discrete_Kind;
3226 end Is_Discrete_Type;
3228 function Is_Elementary_Type (Id : E) return B is
3230 return Ekind (Id) in Elementary_Kind;
3231 end Is_Elementary_Type;
3233 function Is_Entry (Id : E) return B is
3235 return Ekind (Id) in Entry_Kind;
3238 function Is_Enumeration_Type (Id : E) return B is
3240 return Ekind (Id) in
3242 end Is_Enumeration_Type;
3244 function Is_Fixed_Point_Type (Id : E) return B is
3246 return Ekind (Id) in
3248 end Is_Fixed_Point_Type;
3250 function Is_Floating_Point_Type (Id : E) return B is
3252 return Ekind (Id) in Float_Kind;
3253 end Is_Floating_Point_Type;
3255 function Is_Formal (Id : E) return B is
3257 return Ekind (Id) in Formal_Kind;
3260 function Is_Formal_Object (Id : E) return B is
3262 return Ekind (Id) in Formal_Object_Kind;
3263 end Is_Formal_Object;
3265 function Is_Generic_Subprogram (Id : E) return B is
3267 return Ekind (Id) in Generic_Subprogram_Kind;
3268 end Is_Generic_Subprogram;
3270 function Is_Generic_Unit (Id : E) return B is
3272 return Ekind (Id) in Generic_Unit_Kind;
3273 end Is_Generic_Unit;
3275 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3277 return Ekind (Id) in
3278 Incomplete_Or_Private_Kind;
3279 end Is_Incomplete_Or_Private_Type;
3281 function Is_Incomplete_Type (Id : E) return B is
3283 return Ekind (Id) in
3285 end Is_Incomplete_Type;
3287 function Is_Integer_Type (Id : E) return B is
3289 return Ekind (Id) in Integer_Kind;
3290 end Is_Integer_Type;
3292 function Is_Modular_Integer_Type (Id : E) return B is
3294 return Ekind (Id) in
3295 Modular_Integer_Kind;
3296 end Is_Modular_Integer_Type;
3298 function Is_Named_Number (Id : E) return B is
3300 return Ekind (Id) in Named_Kind;
3301 end Is_Named_Number;
3303 function Is_Numeric_Type (Id : E) return B is
3305 return Ekind (Id) in Numeric_Kind;
3306 end Is_Numeric_Type;
3308 function Is_Object (Id : E) return B is
3310 return Ekind (Id) in Object_Kind;
3313 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3315 return Ekind (Id) in
3316 Ordinary_Fixed_Point_Kind;
3317 end Is_Ordinary_Fixed_Point_Type;
3319 function Is_Overloadable (Id : E) return B is
3321 return Ekind (Id) in Overloadable_Kind;
3322 end Is_Overloadable;
3324 function Is_Private_Type (Id : E) return B is
3326 return Ekind (Id) in Private_Kind;
3327 end Is_Private_Type;
3329 function Is_Protected_Type (Id : E) return B is
3331 return Ekind (Id) in Protected_Kind;
3332 end Is_Protected_Type;
3334 function Is_Real_Type (Id : E) return B is
3336 return Ekind (Id) in Real_Kind;
3339 function Is_Record_Type (Id : E) return B is
3341 return Ekind (Id) in Record_Kind;
3344 function Is_Scalar_Type (Id : E) return B is
3346 return Ekind (Id) in Scalar_Kind;
3349 function Is_Signed_Integer_Type (Id : E) return B is
3351 return Ekind (Id) in Signed_Integer_Kind;
3352 end Is_Signed_Integer_Type;
3354 function Is_Subprogram (Id : E) return B is
3356 return Ekind (Id) in Subprogram_Kind;
3359 function Is_Task_Type (Id : E) return B is
3361 return Ekind (Id) in Task_Kind;
3364 function Is_Type (Id : E) return B is
3366 return Ekind (Id) in Type_Kind;
3369 ------------------------------
3370 -- Attribute Set Procedures --
3371 ------------------------------
3373 -- Note: in many of these set procedures an "obvious" assertion is missing.
3374 -- The reason for this is that in many cases, a field is set before the
3375 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3376 -- it is possible to add assertions that specifically include the E_Void
3377 -- possibility, but in some cases, we just omit the assertions.
3379 procedure Set_Abstract_States (Id : E; V : L) is
3381 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3382 Set_Elist25 (Id, V);
3383 end Set_Abstract_States;
3385 procedure Set_Accept_Address (Id : E; V : L) is
3387 Set_Elist21 (Id, V);
3388 end Set_Accept_Address;
3390 procedure Set_Access_Disp_Table (Id : E; V : L) is
3392 pragma Assert (Ekind (Id) = E_Record_Type
3393 and then Id = Implementation_Base_Type (Id));
3394 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3395 Set_Elist16 (Id, V);
3396 end Set_Access_Disp_Table;
3398 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3401 end Set_Associated_Formal_Package;
3403 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3406 end Set_Associated_Node_For_Itype;
3408 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3410 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3412 end Set_Associated_Storage_Pool;
3414 procedure Set_Actual_Subtype (Id : E; V : E) is
3417 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3418 or else Is_Formal (Id));
3420 end Set_Actual_Subtype;
3422 procedure Set_Address_Taken (Id : E; V : B := True) is
3424 Set_Flag104 (Id, V);
3425 end Set_Address_Taken;
3427 procedure Set_Alias (Id : E; V : E) is
3430 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3434 procedure Set_Alignment (Id : E; V : U) is
3436 pragma Assert (Is_Type (Id)
3437 or else Is_Formal (Id)
3438 or else Ekind_In (Id, E_Loop_Parameter,
3445 procedure Set_Barrier_Function (Id : E; V : N) is
3447 pragma Assert (Is_Entry (Id));
3449 end Set_Barrier_Function;
3451 procedure Set_Block_Node (Id : E; V : N) is
3453 pragma Assert (Ekind (Id) = E_Block);
3457 procedure Set_Body_Entity (Id : E; V : E) is
3459 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3461 end Set_Body_Entity;
3463 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3466 (Ekind (Id) = E_Package
3467 or else Is_Subprogram (Id)
3468 or else Is_Generic_Unit (Id));
3470 end Set_Body_Needed_For_SAL;
3472 procedure Set_Body_References (Id : E; V : L) is
3474 pragma Assert (Ekind (Id) = E_Abstract_State);
3475 Set_Elist16 (Id, V);
3476 end Set_Body_References;
3478 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3480 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3482 end Set_BIP_Initialization_Call;
3484 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3486 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3487 Set_Flag125 (Id, V);
3488 end Set_C_Pass_By_Copy;
3490 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3493 end Set_Can_Never_Be_Null;
3495 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3498 end Set_Checks_May_Be_Suppressed;
3500 procedure Set_Class_Wide_Type (Id : E; V : E) is
3502 pragma Assert (Is_Type (Id));
3504 end Set_Class_Wide_Type;
3506 procedure Set_Cloned_Subtype (Id : E; V : E) is
3508 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3510 end Set_Cloned_Subtype;
3512 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3514 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3516 end Set_Component_Bit_Offset;
3518 procedure Set_Component_Clause (Id : E; V : N) is
3520 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3522 end Set_Component_Clause;
3524 procedure Set_Component_Size (Id : E; V : U) is
3526 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3528 end Set_Component_Size;
3530 procedure Set_Component_Type (Id : E; V : E) is
3532 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3534 end Set_Component_Type;
3536 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3539 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3541 end Set_Corresponding_Concurrent_Type;
3543 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3545 pragma Assert (Ekind (Id) = E_Discriminant);
3547 end Set_Corresponding_Discriminant;
3549 procedure Set_Corresponding_Equality (Id : E; V : E) is
3552 (Ekind (Id) = E_Function
3553 and then not Comes_From_Source (Id)
3554 and then Chars (Id) = Name_Op_Ne);
3556 end Set_Corresponding_Equality;
3558 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3560 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3562 end Set_Corresponding_Protected_Entry;
3564 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3566 pragma Assert (Is_Concurrent_Type (Id));
3568 end Set_Corresponding_Record_Type;
3570 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3573 end Set_Corresponding_Remote_Type;
3575 procedure Set_Current_Use_Clause (Id : E; V : E) is
3577 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3579 end Set_Current_Use_Clause;
3581 procedure Set_Current_Value (Id : E; V : N) is
3583 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3585 end Set_Current_Value;
3587 procedure Set_CR_Discriminant (Id : E; V : E) is
3590 end Set_CR_Discriminant;
3592 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3594 Set_Flag166 (Id, V);
3595 end Set_Debug_Info_Off;
3597 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3600 end Set_Debug_Renaming_Link;
3602 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3604 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3606 end Set_Default_Aspect_Component_Value;
3608 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3610 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3612 end Set_Default_Aspect_Value;
3614 procedure Set_Default_Expr_Function (Id : E; V : E) is
3616 pragma Assert (Is_Formal (Id));
3618 end Set_Default_Expr_Function;
3620 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3622 Set_Flag108 (Id, V);
3623 end Set_Default_Expressions_Processed;
3625 procedure Set_Default_Value (Id : E; V : N) is
3627 pragma Assert (Is_Formal (Id));
3629 end Set_Default_Value;
3631 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3635 or else Is_Task_Type (Id)
3636 or else Ekind (Id) = E_Block);
3637 Set_Flag114 (Id, V);
3638 end Set_Delay_Cleanups;
3640 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3643 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3646 end Set_Delay_Subprogram_Descriptors;
3648 procedure Set_Delta_Value (Id : E; V : R) is
3650 pragma Assert (Is_Fixed_Point_Type (Id));
3651 Set_Ureal18 (Id, V);
3652 end Set_Delta_Value;
3654 procedure Set_Dependent_Instances (Id : E; V : L) is
3656 pragma Assert (Is_Generic_Instance (Id));
3658 end Set_Dependent_Instances;
3660 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3662 pragma Assert (Nkind (Id) in N_Entity);
3664 end Set_Depends_On_Private;
3666 procedure Set_Digits_Value (Id : E; V : U) is
3669 (Is_Floating_Point_Type (Id)
3670 or else Is_Decimal_Fixed_Point_Type (Id));
3672 end Set_Digits_Value;
3674 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3677 end Set_Directly_Designated_Type;
3679 procedure Set_Discard_Names (Id : E; V : B := True) is
3682 end Set_Discard_Names;
3684 procedure Set_Discriminal (Id : E; V : E) is
3686 pragma Assert (Ekind (Id) = E_Discriminant);
3688 end Set_Discriminal;
3690 procedure Set_Discriminal_Link (Id : E; V : E) is
3693 end Set_Discriminal_Link;
3695 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3697 pragma Assert (Ekind (Id) = E_Component);
3699 end Set_Discriminant_Checking_Func;
3701 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3703 pragma Assert (Nkind (Id) in N_Entity);
3704 Set_Elist21 (Id, V);
3705 end Set_Discriminant_Constraint;
3707 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3710 end Set_Discriminant_Default_Value;
3712 procedure Set_Discriminant_Number (Id : E; V : U) is
3715 end Set_Discriminant_Number;
3717 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3719 pragma Assert (Ekind (Id) = E_Record_Type
3720 and then Id = Implementation_Base_Type (Id));
3721 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3722 Set_Elist26 (Id, V);
3723 end Set_Dispatch_Table_Wrappers;
3725 procedure Set_DT_Entry_Count (Id : E; V : U) is
3727 pragma Assert (Ekind (Id) = E_Component);
3729 end Set_DT_Entry_Count;
3731 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3733 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3735 end Set_DT_Offset_To_Top_Func;
3737 procedure Set_DT_Position (Id : E; V : U) is
3739 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3741 end Set_DT_Position;
3743 procedure Set_DTC_Entity (Id : E; V : E) is
3745 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3749 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3751 pragma Assert (Ekind (Id) = E_Package);
3752 Set_Flag210 (Id, V);
3753 end Set_Elaborate_Body_Desirable;
3755 procedure Set_Elaboration_Entity (Id : E; V : E) is
3760 Ekind (Id) = E_Package
3762 Is_Generic_Unit (Id));
3764 end Set_Elaboration_Entity;
3766 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3771 Ekind (Id) = E_Package
3773 Is_Generic_Unit (Id));
3774 Set_Flag174 (Id, V);
3775 end Set_Elaboration_Entity_Required;
3777 procedure Set_Encapsulating_State (Id : E; V : E) is
3779 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3781 end Set_Encapsulating_State;
3783 procedure Set_Enclosing_Scope (Id : E; V : E) is
3786 end Set_Enclosing_Scope;
3788 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3790 pragma Assert (Is_Entry (Id));
3791 Set_Flag152 (Id, V);
3792 end Set_Entry_Accepted;
3794 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3797 end Set_Entry_Bodies_Array;
3799 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3802 end Set_Entry_Cancel_Parameter;
3804 procedure Set_Entry_Component (Id : E; V : E) is
3807 end Set_Entry_Component;
3809 procedure Set_Entry_Formal (Id : E; V : E) is
3812 end Set_Entry_Formal;
3814 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3816 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3818 end Set_Entry_Index_Constant;
3820 procedure Set_Contract (Id : E; V : N) is
3823 (Ekind_In (Id, E_Entry,
3831 or else Is_Generic_Subprogram (Id)
3832 or else Is_Subprogram (Id));
3836 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3839 end Set_Entry_Parameters_Type;
3841 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3843 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3845 end Set_Enum_Pos_To_Rep;
3847 procedure Set_Enumeration_Pos (Id : E; V : U) is
3849 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3851 end Set_Enumeration_Pos;
3853 procedure Set_Enumeration_Rep (Id : E; V : U) is
3855 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3857 end Set_Enumeration_Rep;
3859 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3861 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3863 end Set_Enumeration_Rep_Expr;
3865 procedure Set_Equivalent_Type (Id : E; V : E) is
3868 (Ekind_In (Id, E_Class_Wide_Type,
3869 E_Class_Wide_Subtype,
3870 E_Access_Protected_Subprogram_Type,
3871 E_Anonymous_Access_Protected_Subprogram_Type,
3872 E_Access_Subprogram_Type,
3875 end Set_Equivalent_Type;
3877 procedure Set_Esize (Id : E; V : U) is
3882 procedure Set_Exception_Code (Id : E; V : U) is
3884 pragma Assert (Ekind (Id) = E_Exception);
3886 end Set_Exception_Code;
3888 procedure Set_Extra_Accessibility (Id : E; V : E) is
3891 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3893 end Set_Extra_Accessibility;
3895 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3897 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3899 end Set_Extra_Accessibility_Of_Result;
3901 procedure Set_Extra_Constrained (Id : E; V : E) is
3903 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3905 end Set_Extra_Constrained;
3907 procedure Set_Extra_Formal (Id : E; V : E) is
3910 end Set_Extra_Formal;
3912 procedure Set_Extra_Formals (Id : E; V : E) is
3915 (Is_Overloadable (Id)
3916 or else Ekind_In (Id, E_Entry_Family,
3918 E_Subprogram_Type));
3920 end Set_Extra_Formals;
3922 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3925 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3926 Set_Flag229 (Id, V);
3927 end Set_Can_Use_Internal_Rep;
3929 procedure Set_Finalization_Master (Id : E; V : E) is
3931 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3933 end Set_Finalization_Master;
3935 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3937 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3938 Set_Flag158 (Id, V);
3939 end Set_Finalize_Storage_Only;
3941 procedure Set_Finalizer (Id : E; V : E) is
3943 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3947 procedure Set_First_Entity (Id : E; V : E) is
3950 end Set_First_Entity;
3952 procedure Set_First_Exit_Statement (Id : E; V : N) is
3954 pragma Assert (Ekind (Id) = E_Loop);
3956 end Set_First_Exit_Statement;
3958 procedure Set_First_Index (Id : E; V : N) is
3960 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3962 end Set_First_Index;
3964 procedure Set_First_Literal (Id : E; V : E) is
3966 pragma Assert (Is_Enumeration_Type (Id));
3968 end Set_First_Literal;
3970 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3972 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3974 end Set_First_Optional_Parameter;
3976 procedure Set_First_Private_Entity (Id : E; V : E) is
3978 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3979 or else Ekind (Id) in Concurrent_Kind);
3981 end Set_First_Private_Entity;
3983 procedure Set_First_Rep_Item (Id : E; V : N) is
3986 end Set_First_Rep_Item;
3988 procedure Set_Float_Rep (Id : E; V : F) is
3989 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3991 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3994 procedure Set_Freeze_Node (Id : E; V : N) is
3997 end Set_Freeze_Node;
3999 procedure Set_From_Limited_With (Id : E; V : B := True) is
4002 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4003 Set_Flag159 (Id, V);
4004 end Set_From_Limited_With;
4006 procedure Set_Full_View (Id : E; V : E) is
4008 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4012 procedure Set_Generic_Homonym (Id : E; V : E) is
4015 end Set_Generic_Homonym;
4017 procedure Set_Generic_Renamings (Id : E; V : L) is
4019 Set_Elist23 (Id, V);
4020 end Set_Generic_Renamings;
4022 procedure Set_Handler_Records (Id : E; V : S) is
4025 end Set_Handler_Records;
4027 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4029 pragma Assert (Id = Base_Type (Id));
4030 Set_Flag135 (Id, V);
4031 end Set_Has_Aliased_Components;
4033 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4036 end Set_Has_Alignment_Clause;
4038 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4041 end Set_Has_All_Calls_Remote;
4043 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4046 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4047 Set_Flag253 (Id, V);
4048 end Set_Has_Anonymous_Master;
4050 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4052 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4054 end Set_Has_Atomic_Components;
4056 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4059 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4060 Set_Flag139 (Id, V);
4061 end Set_Has_Biased_Representation;
4063 procedure Set_Has_Completion (Id : E; V : B := True) is
4066 end Set_Has_Completion;
4068 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4070 pragma Assert (Is_Type (Id));
4072 end Set_Has_Completion_In_Body;
4074 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4076 pragma Assert (Ekind (Id) = E_Record_Type);
4077 Set_Flag140 (Id, V);
4078 end Set_Has_Complex_Representation;
4080 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4082 pragma Assert (Ekind (Id) = E_Array_Type);
4084 end Set_Has_Component_Size_Clause;
4086 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4088 pragma Assert (Is_Type (Id));
4089 Set_Flag187 (Id, V);
4090 end Set_Has_Constrained_Partial_View;
4092 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4094 Set_Flag181 (Id, V);
4095 end Set_Has_Contiguous_Rep;
4097 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4099 pragma Assert (Id = Base_Type (Id));
4101 end Set_Has_Controlled_Component;
4103 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4106 end Set_Has_Controlling_Result;
4108 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4110 Set_Flag119 (Id, V);
4111 end Set_Has_Convention_Pragma;
4113 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4116 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4117 and then Is_Base_Type (Id));
4119 end Set_Has_Default_Aspect;
4121 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4123 pragma Assert (Nkind (Id) in N_Entity);
4124 Set_Flag200 (Id, V);
4125 end Set_Has_Delayed_Aspects;
4127 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4129 pragma Assert (Nkind (Id) in N_Entity);
4131 end Set_Has_Delayed_Freeze;
4133 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4135 pragma Assert (Nkind (Id) in N_Entity);
4136 Set_Flag261 (Id, V);
4137 end Set_Has_Delayed_Rep_Aspects;
4139 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4141 pragma Assert (Nkind (Id) in N_Entity);
4143 end Set_Has_Discriminants;
4145 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4147 pragma Assert (Ekind (Id) = E_Record_Type
4148 and then Is_Tagged_Type (Id));
4149 Set_Flag220 (Id, V);
4150 end Set_Has_Dispatch_Table;
4152 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4154 pragma Assert (Is_Type (Id));
4155 Set_Flag258 (Id, V);
4156 end Set_Has_Dynamic_Predicate_Aspect;
4158 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4160 pragma Assert (Is_Enumeration_Type (Id));
4162 end Set_Has_Enumeration_Rep_Clause;
4164 procedure Set_Has_Exit (Id : E; V : B := True) is
4169 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4171 Set_Flag175 (Id, V);
4172 end Set_Has_Forward_Instantiation;
4174 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4176 Set_Flag173 (Id, V);
4177 end Set_Has_Fully_Qualified_Name;
4179 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4182 end Set_Has_Gigi_Rep_Item;
4184 procedure Set_Has_Homonym (Id : E; V : B := True) is
4187 end Set_Has_Homonym;
4189 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4191 Set_Flag251 (Id, V);
4192 end Set_Has_Implicit_Dereference;
4194 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4196 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4197 and then Is_Base_Type (Id));
4199 end Set_Has_Independent_Components;
4201 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4203 pragma Assert (Is_Type (Id));
4204 Set_Flag248 (Id, V);
4205 end Set_Has_Inheritable_Invariants;
4207 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4209 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4210 Set_Flag219 (Id, V);
4211 end Set_Has_Initial_Value;
4213 procedure Set_Has_Invariants (Id : E; V : B := True) is
4215 pragma Assert (Is_Type (Id));
4216 Set_Flag232 (Id, V);
4217 end Set_Has_Invariants;
4219 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4221 pragma Assert (Ekind (Id) = E_Loop);
4222 Set_Flag260 (Id, V);
4223 end Set_Has_Loop_Entry_Attributes;
4225 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4227 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4229 end Set_Has_Machine_Radix_Clause;
4231 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4234 end Set_Has_Master_Entity;
4236 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4238 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4239 Set_Flag142 (Id, V);
4240 end Set_Has_Missing_Return;
4242 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4244 Set_Flag101 (Id, V);
4245 end Set_Has_Nested_Block_With_Handler;
4247 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4249 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4250 Set_Flag215 (Id, V);
4251 end Set_Has_Up_Level_Access;
4253 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4255 pragma Assert (Id = Base_Type (Id));
4257 end Set_Has_Non_Standard_Rep;
4259 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4261 pragma Assert (Is_Type (Id));
4262 Set_Flag172 (Id, V);
4263 end Set_Has_Object_Size_Clause;
4265 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4267 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4268 Set_Flag110 (Id, V);
4269 end Set_Has_Out_Or_In_Out_Parameter;
4271 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4273 Set_Flag154 (Id, V);
4274 end Set_Has_Per_Object_Constraint;
4276 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4278 pragma Assert (Is_Subprogram (Id));
4279 Set_Flag240 (Id, V);
4280 end Set_Has_Postconditions;
4282 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4284 pragma Assert (Is_Access_Type (Id));
4285 Set_Flag27 (Base_Type (Id), V);
4286 end Set_Has_Pragma_Controlled;
4288 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4290 Set_Flag150 (Id, V);
4291 end Set_Has_Pragma_Elaborate_Body;
4293 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4295 Set_Flag157 (Id, V);
4296 end Set_Has_Pragma_Inline;
4298 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4300 Set_Flag230 (Id, V);
4301 end Set_Has_Pragma_Inline_Always;
4303 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4305 Set_Flag201 (Id, V);
4306 end Set_Has_Pragma_No_Inline;
4308 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4310 pragma Assert (Is_Enumeration_Type (Id));
4311 pragma Assert (Id = Base_Type (Id));
4312 Set_Flag198 (Id, V);
4313 end Set_Has_Pragma_Ordered;
4315 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4317 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4318 pragma Assert (Id = Base_Type (Id));
4319 Set_Flag121 (Id, V);
4320 end Set_Has_Pragma_Pack;
4322 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4324 Set_Flag221 (Id, V);
4325 end Set_Has_Pragma_Preelab_Init;
4327 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4329 Set_Flag203 (Id, V);
4330 end Set_Has_Pragma_Pure;
4332 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4334 Set_Flag179 (Id, V);
4335 end Set_Has_Pragma_Pure_Function;
4337 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4339 Set_Flag169 (Id, V);
4340 end Set_Has_Pragma_Thread_Local_Storage;
4342 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4344 Set_Flag233 (Id, V);
4345 end Set_Has_Pragma_Unmodified;
4347 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4349 Set_Flag180 (Id, V);
4350 end Set_Has_Pragma_Unreferenced;
4352 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4354 pragma Assert (Is_Type (Id));
4355 Set_Flag212 (Id, V);
4356 end Set_Has_Pragma_Unreferenced_Objects;
4358 procedure Set_Has_Predicates (Id : E; V : B := True) is
4360 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4361 Set_Flag250 (Id, V);
4362 end Set_Has_Predicates;
4364 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4366 pragma Assert (Id = Base_Type (Id));
4367 Set_Flag120 (Id, V);
4368 end Set_Has_Primitive_Operations;
4370 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4372 pragma Assert (Is_Type (Id));
4373 Set_Flag151 (Id, V);
4374 end Set_Has_Private_Ancestor;
4376 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4378 Set_Flag155 (Id, V);
4379 end Set_Has_Private_Declaration;
4381 procedure Set_Has_Protected (Id : E; V : B := True) is
4383 Set_Flag271 (Id, V);
4384 end Set_Has_Protected;
4386 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4388 Set_Flag161 (Id, V);
4389 end Set_Has_Qualified_Name;
4391 procedure Set_Has_RACW (Id : E; V : B := True) is
4393 pragma Assert (Ekind (Id) = E_Package);
4394 Set_Flag214 (Id, V);
4397 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4399 pragma Assert (Id = Base_Type (Id));
4401 end Set_Has_Record_Rep_Clause;
4403 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4405 pragma Assert (Is_Subprogram (Id));
4406 Set_Flag143 (Id, V);
4407 end Set_Has_Recursive_Call;
4409 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4411 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4412 Set_Flag267 (Id, V);
4413 end Set_Has_Shift_Operator;
4415 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4418 end Set_Has_Size_Clause;
4420 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4423 end Set_Has_Small_Clause;
4425 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4427 pragma Assert (Id = Base_Type (Id));
4428 Set_Flag100 (Id, V);
4429 end Set_Has_Specified_Layout;
4431 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4433 pragma Assert (Is_Type (Id));
4434 Set_Flag190 (Id, V);
4435 end Set_Has_Specified_Stream_Input;
4437 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4439 pragma Assert (Is_Type (Id));
4440 Set_Flag191 (Id, V);
4441 end Set_Has_Specified_Stream_Output;
4443 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4445 pragma Assert (Is_Type (Id));
4446 Set_Flag192 (Id, V);
4447 end Set_Has_Specified_Stream_Read;
4449 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4451 pragma Assert (Is_Type (Id));
4452 Set_Flag193 (Id, V);
4453 end Set_Has_Specified_Stream_Write;
4455 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4457 Set_Flag211 (Id, V);
4458 end Set_Has_Static_Discriminants;
4460 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4462 pragma Assert (Is_Type (Id));
4463 Set_Flag269 (Id, V);
4464 end Set_Has_Static_Predicate;
4466 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4468 pragma Assert (Is_Type (Id));
4469 Set_Flag259 (Id, V);
4470 end Set_Has_Static_Predicate_Aspect;
4472 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4474 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4475 pragma Assert (Id = Base_Type (Id));
4477 end Set_Has_Storage_Size_Clause;
4479 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4481 pragma Assert (Is_Elementary_Type (Id));
4482 Set_Flag184 (Id, V);
4483 end Set_Has_Stream_Size_Clause;
4485 procedure Set_Has_Task (Id : E; V : B := True) is
4487 pragma Assert (Id = Base_Type (Id));
4491 procedure Set_Has_Thunks (Id : E; V : B := True) is
4493 pragma Assert (Is_Tag (Id));
4494 Set_Flag228 (Id, V);
4497 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4499 pragma Assert (Id = Base_Type (Id));
4500 Set_Flag123 (Id, V);
4501 end Set_Has_Unchecked_Union;
4503 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4505 pragma Assert (Is_Type (Id));
4507 end Set_Has_Unknown_Discriminants;
4509 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4511 pragma Assert (Ekind (Id) = E_Abstract_State);
4512 Set_Flag263 (Id, V);
4513 end Set_Has_Visible_Refinement;
4515 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4517 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4519 end Set_Has_Volatile_Components;
4521 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4523 Set_Flag182 (Id, V);
4524 end Set_Has_Xref_Entry;
4526 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4528 pragma Assert (Ekind (Id) = E_Variable);
4530 end Set_Hiding_Loop_Variable;
4532 procedure Set_Homonym (Id : E; V : E) is
4534 pragma Assert (Id /= V);
4538 procedure Set_Import_Pragma (Id : E; V : E) is
4540 pragma Assert (Is_Subprogram (Id));
4542 end Set_Import_Pragma;
4544 procedure Set_Interface_Alias (Id : E; V : E) is
4548 and then Is_Hidden (Id)
4549 and then (Ekind_In (Id, E_Procedure, E_Function)));
4551 end Set_Interface_Alias;
4553 procedure Set_Interfaces (Id : E; V : L) is
4555 pragma Assert (Is_Record_Type (Id));
4556 Set_Elist25 (Id, V);
4559 procedure Set_In_Package_Body (Id : E; V : B := True) is
4562 end Set_In_Package_Body;
4564 procedure Set_In_Private_Part (Id : E; V : B := True) is
4567 end Set_In_Private_Part;
4569 procedure Set_In_Use (Id : E; V : B := True) is
4571 pragma Assert (Nkind (Id) in N_Entity);
4575 procedure Set_Initialization_Statements (Id : E; V : N) is
4577 -- Tolerate an E_Void entity since this can be called while resolving
4578 -- an aggregate used as the initialization expression for an object
4579 -- declaration, and this occurs before the Ekind for the object is set.
4581 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4583 end Set_Initialization_Statements;
4585 procedure Set_Inner_Instances (Id : E; V : L) is
4587 Set_Elist23 (Id, V);
4588 end Set_Inner_Instances;
4590 procedure Set_Interface_Name (Id : E; V : N) is
4593 end Set_Interface_Name;
4595 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4597 pragma Assert (Is_Overloadable (Id));
4599 end Set_Is_Abstract_Subprogram;
4601 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4603 pragma Assert (Is_Type (Id));
4604 Set_Flag146 (Id, V);
4605 end Set_Is_Abstract_Type;
4607 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4609 pragma Assert (Is_Access_Type (Id));
4610 Set_Flag194 (Id, V);
4611 end Set_Is_Local_Anonymous_Access;
4613 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4615 pragma Assert (Is_Access_Type (Id));
4617 end Set_Is_Access_Constant;
4619 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4621 Set_Flag185 (Id, V);
4622 end Set_Is_Ada_2005_Only;
4624 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4626 Set_Flag199 (Id, V);
4627 end Set_Is_Ada_2012_Only;
4629 procedure Set_Is_Aliased (Id : E; V : B := True) is
4631 pragma Assert (Nkind (Id) in N_Entity);
4635 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4637 pragma Assert (Is_Entry (Id));
4638 Set_Flag132 (Id, V);
4639 end Set_Is_AST_Entry;
4641 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4644 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4646 end Set_Is_Asynchronous;
4648 procedure Set_Is_Atomic (Id : E; V : B := True) is
4653 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4655 pragma Assert ((not V)
4656 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4657 Set_Flag122 (Id, V);
4658 end Set_Is_Bit_Packed_Array;
4660 procedure Set_Is_Called (Id : E; V : B := True) is
4662 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4663 Set_Flag102 (Id, V);
4666 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4669 end Set_Is_Character_Type;
4671 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4674 end Set_Is_Child_Unit;
4676 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4679 end Set_Is_Class_Wide_Equivalent_Type;
4681 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4683 Set_Flag149 (Id, V);
4684 end Set_Is_Compilation_Unit;
4686 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4688 pragma Assert (Ekind (Id) = E_Discriminant);
4689 Set_Flag103 (Id, V);
4690 end Set_Is_Completely_Hidden;
4692 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4695 end Set_Is_Concurrent_Record_Type;
4697 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4700 end Set_Is_Constr_Subt_For_U_Nominal;
4702 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4704 Set_Flag141 (Id, V);
4705 end Set_Is_Constr_Subt_For_UN_Aliased;
4707 procedure Set_Is_Constrained (Id : E; V : B := True) is
4709 pragma Assert (Nkind (Id) in N_Entity);
4711 end Set_Is_Constrained;
4713 procedure Set_Is_Constructor (Id : E; V : B := True) is
4716 end Set_Is_Constructor;
4718 procedure Set_Is_Controlled (Id : E; V : B := True) is
4720 pragma Assert (Id = Base_Type (Id));
4722 end Set_Is_Controlled;
4724 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4726 pragma Assert (Is_Formal (Id));
4728 end Set_Is_Controlling_Formal;
4730 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4733 end Set_Is_CPP_Class;
4735 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4737 pragma Assert (Is_Type (Id));
4738 Set_Flag223 (Id, V);
4739 end Set_Is_Descendent_Of_Address;
4741 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4743 Set_Flag176 (Id, V);
4744 end Set_Is_Discrim_SO_Function;
4746 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4748 Set_Flag264 (Id, V);
4749 end Set_Is_Discriminant_Check_Function;
4751 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4753 Set_Flag234 (Id, V);
4754 end Set_Is_Dispatch_Table_Entity;
4756 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4761 Is_Overloadable (Id)
4763 Ekind (Id) = E_Subprogram_Type);
4766 end Set_Is_Dispatching_Operation;
4768 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4770 Set_Flag124 (Id, V);
4771 end Set_Is_Eliminated;
4773 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4776 end Set_Is_Entry_Formal;
4778 procedure Set_Is_Exported (Id : E; V : B := True) is
4781 end Set_Is_Exported;
4783 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4786 end Set_Is_First_Subtype;
4788 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4790 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4791 Set_Flag118 (Id, V);
4792 end Set_Is_For_Access_Subtype;
4794 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4796 Set_Flag111 (Id, V);
4797 end Set_Is_Formal_Subprogram;
4799 procedure Set_Is_Frozen (Id : E; V : B := True) is
4801 pragma Assert (Nkind (Id) in N_Entity);
4805 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4807 pragma Assert (Is_Type (Id));
4809 end Set_Is_Generic_Actual_Type;
4811 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4813 Set_Flag130 (Id, V);
4814 end Set_Is_Generic_Instance;
4816 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4818 pragma Assert (Nkind (Id) in N_Entity);
4820 end Set_Is_Generic_Type;
4822 procedure Set_Is_Hidden (Id : E; V : B := True) is
4827 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4829 Set_Flag171 (Id, V);
4830 end Set_Is_Hidden_Open_Scope;
4832 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4834 pragma Assert (Nkind (Id) in N_Entity);
4836 end Set_Is_Immediately_Visible;
4838 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4840 Set_Flag254 (Id, V);
4841 end Set_Is_Implementation_Defined;
4843 procedure Set_Is_Imported (Id : E; V : B := True) is
4846 end Set_Is_Imported;
4848 procedure Set_Is_Independent (Id : E; V : B := True) is
4850 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4851 Set_Flag268 (Id, V);
4852 end Set_Is_Independent;
4854 procedure Set_Is_Inlined (Id : E; V : B := True) is
4859 procedure Set_Is_Interface (Id : E; V : B := True) is
4861 pragma Assert (Is_Record_Type (Id));
4862 Set_Flag186 (Id, V);
4863 end Set_Is_Interface;
4865 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4867 Set_Flag126 (Id, V);
4868 end Set_Is_Instantiated;
4870 procedure Set_Is_Internal (Id : E; V : B := True) is
4872 pragma Assert (Nkind (Id) in N_Entity);
4874 end Set_Is_Internal;
4876 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4878 pragma Assert (Nkind (Id) in N_Entity);
4880 end Set_Is_Interrupt_Handler;
4882 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4885 end Set_Is_Intrinsic_Subprogram;
4887 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4889 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4890 Set_Flag257 (Id, V);
4891 end Set_Is_Invariant_Procedure;
4893 procedure Set_Is_Itype (Id : E; V : B := True) is
4898 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4901 end Set_Is_Known_Non_Null;
4903 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4905 Set_Flag204 (Id, V);
4906 end Set_Is_Known_Null;
4908 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4910 Set_Flag170 (Id, V);
4911 end Set_Is_Known_Valid;
4913 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4915 pragma Assert (Is_Type (Id));
4916 Set_Flag106 (Id, V);
4917 end Set_Is_Limited_Composite;
4919 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4921 pragma Assert (Is_Interface (Id));
4922 Set_Flag197 (Id, V);
4923 end Set_Is_Limited_Interface;
4925 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4928 end Set_Is_Limited_Record;
4930 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4932 pragma Assert (Is_Subprogram (Id));
4933 Set_Flag137 (Id, V);
4934 end Set_Is_Machine_Code_Subprogram;
4936 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4938 pragma Assert (Is_Type (Id));
4939 Set_Flag109 (Id, V);
4940 end Set_Is_Non_Static_Subtype;
4942 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4944 pragma Assert (Ekind (Id) = E_Procedure);
4945 Set_Flag178 (Id, V);
4946 end Set_Is_Null_Init_Proc;
4948 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4950 Set_Flag153 (Id, V);
4951 end Set_Is_Obsolescent;
4953 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4955 pragma Assert (Ekind (Id) = E_Out_Parameter);
4956 Set_Flag226 (Id, V);
4957 end Set_Is_Only_Out_Parameter;
4959 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4961 pragma Assert (Is_Formal (Id));
4962 Set_Flag134 (Id, V);
4963 end Set_Is_Optional_Parameter;
4965 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4967 Set_Flag160 (Id, V);
4968 end Set_Is_Package_Body_Entity;
4970 procedure Set_Is_Packed (Id : E; V : B := True) is
4972 pragma Assert (Id = Base_Type (Id));
4976 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
4978 Set_Flag138 (Id, V);
4979 end Set_Is_Packed_Array_Impl_Type;
4981 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4983 pragma Assert (Nkind (Id) in N_Entity);
4985 end Set_Is_Potentially_Use_Visible;
4987 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4989 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4990 Set_Flag255 (Id, V);
4991 end Set_Is_Predicate_Function;
4993 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4995 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4996 Set_Flag256 (Id, V);
4997 end Set_Is_Predicate_Function_M;
4999 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5002 end Set_Is_Preelaborated;
5004 procedure Set_Is_Primitive (Id : E; V : B := True) is
5007 (Is_Overloadable (Id)
5008 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5009 Set_Flag218 (Id, V);
5010 end Set_Is_Primitive;
5012 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5014 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5015 Set_Flag195 (Id, V);
5016 end Set_Is_Primitive_Wrapper;
5018 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5020 pragma Assert (Is_Type (Id));
5021 Set_Flag107 (Id, V);
5022 end Set_Is_Private_Composite;
5024 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5027 end Set_Is_Private_Descendant;
5029 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5031 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5032 Set_Flag245 (Id, V);
5033 end Set_Is_Private_Primitive;
5035 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5037 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5038 Set_Flag252 (Id, V);
5039 end Set_Is_Processed_Transient;
5041 procedure Set_Is_Public (Id : E; V : B := True) is
5043 pragma Assert (Nkind (Id) in N_Entity);
5047 procedure Set_Is_Pure (Id : E; V : B := True) is
5052 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5054 pragma Assert (Is_Access_Type (Id));
5055 Set_Flag189 (Id, V);
5056 end Set_Is_Pure_Unit_Access_Type;
5058 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5060 pragma Assert (Is_Type (Id));
5061 Set_Flag244 (Id, V);
5062 end Set_Is_RACW_Stub_Type;
5064 procedure Set_Is_Raised (Id : E; V : B := True) is
5066 pragma Assert (Ekind (Id) = E_Exception);
5067 Set_Flag224 (Id, V);
5070 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5073 end Set_Is_Remote_Call_Interface;
5075 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5078 end Set_Is_Remote_Types;
5080 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5082 Set_Flag112 (Id, V);
5083 end Set_Is_Renaming_Of_Object;
5085 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5087 Set_Flag209 (Id, V);
5088 end Set_Is_Return_Object;
5090 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5092 pragma Assert (Ekind (Id) = E_Variable);
5093 Set_Flag249 (Id, V);
5094 end Set_Is_Safe_To_Reevaluate;
5096 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5099 end Set_Is_Shared_Passive;
5101 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5105 or else Ekind_In (Id, E_Exception,
5110 end Set_Is_Statically_Allocated;
5112 procedure Set_Is_Tag (Id : E; V : B := True) is
5114 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5118 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5121 end Set_Is_Tagged_Type;
5123 procedure Set_Is_Thunk (Id : E; V : B := True) is
5125 pragma Assert (Is_Subprogram (Id));
5126 Set_Flag225 (Id, V);
5129 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5131 Set_Flag235 (Id, V);
5132 end Set_Is_Trivial_Subprogram;
5134 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5136 Set_Flag163 (Id, V);
5137 end Set_Is_True_Constant;
5139 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5141 pragma Assert (Id = Base_Type (Id));
5142 Set_Flag117 (Id, V);
5143 end Set_Is_Unchecked_Union;
5145 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5147 pragma Assert (Ekind (Id) = E_Record_Type);
5148 Set_Flag246 (Id, V);
5149 end Set_Is_Underlying_Record_View;
5151 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5153 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5154 Set_Flag144 (Id, V);
5155 end Set_Is_Unsigned_Type;
5157 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5159 pragma Assert (Ekind (Id) = E_Procedure);
5160 Set_Flag127 (Id, V);
5161 end Set_Is_Valued_Procedure;
5163 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5165 Set_Flag206 (Id, V);
5166 end Set_Is_Visible_Formal;
5168 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5170 Set_Flag116 (Id, V);
5171 end Set_Is_Visible_Lib_Unit;
5173 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5175 pragma Assert (Ekind (Id) = E_Exception);
5176 Set_Flag133 (Id, V);
5177 end Set_Is_VMS_Exception;
5179 procedure Set_Is_Volatile (Id : E; V : B := True) is
5181 pragma Assert (Nkind (Id) in N_Entity);
5183 end Set_Is_Volatile;
5185 procedure Set_Itype_Printed (Id : E; V : B := True) is
5187 pragma Assert (Is_Itype (Id));
5188 Set_Flag202 (Id, V);
5189 end Set_Itype_Printed;
5191 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5194 end Set_Kill_Elaboration_Checks;
5196 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5199 end Set_Kill_Range_Checks;
5201 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5203 pragma Assert (Is_Type (Id));
5204 Set_Flag207 (Id, V);
5205 end Set_Known_To_Have_Preelab_Init;
5207 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5209 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5211 end Set_Last_Aggregate_Assignment;
5213 procedure Set_Last_Assignment (Id : E; V : N) is
5215 pragma Assert (Is_Assignable (Id));
5217 end Set_Last_Assignment;
5219 procedure Set_Last_Entity (Id : E; V : E) is
5222 end Set_Last_Entity;
5224 procedure Set_Limited_View (Id : E; V : E) is
5226 pragma Assert (Ekind (Id) = E_Package);
5228 end Set_Limited_View;
5230 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5232 pragma Assert (Is_Type (Id)
5233 or else Ekind_In (Id, E_Constant, E_Variable)
5234 or else Is_Subprogram (Id));
5236 end Set_Linker_Section_Pragma;
5238 procedure Set_Lit_Indexes (Id : E; V : E) is
5240 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5242 end Set_Lit_Indexes;
5244 procedure Set_Lit_Strings (Id : E; V : E) is
5246 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5248 end Set_Lit_Strings;
5250 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5252 pragma Assert (Is_Formal (Id));
5253 Set_Flag205 (Id, V);
5254 end Set_Low_Bound_Tested;
5256 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5258 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5260 end Set_Machine_Radix_10;
5262 procedure Set_Master_Id (Id : E; V : E) is
5264 pragma Assert (Is_Access_Type (Id));
5268 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5270 Set_Flag168 (Id, V);
5271 end Set_Materialize_Entity;
5273 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5275 Set_Flag262 (Id, V);
5276 end Set_May_Inherit_Delayed_Rep_Aspects;
5278 procedure Set_Mechanism (Id : E; V : M) is
5280 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5281 Set_Uint8 (Id, UI_From_Int (V));
5284 procedure Set_Modulus (Id : E; V : U) is
5286 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5290 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5292 pragma Assert (Is_Type (Id));
5293 Set_Flag183 (Id, V);
5294 end Set_Must_Be_On_Byte_Boundary;
5296 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5298 pragma Assert (Is_Type (Id));
5299 Set_Flag208 (Id, V);
5300 end Set_Must_Have_Preelab_Init;
5302 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5304 Set_Flag147 (Id, V);
5305 end Set_Needs_Debug_Info;
5307 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5310 (Is_Overloadable (Id)
5311 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5313 end Set_Needs_No_Actuals;
5315 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5317 Set_Flag115 (Id, V);
5318 end Set_Never_Set_In_Source;
5320 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5323 end Set_Next_Inlined_Subprogram;
5325 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5327 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5328 Set_Flag131 (Id, V);
5329 end Set_No_Pool_Assigned;
5331 procedure Set_No_Return (Id : E; V : B := True) is
5334 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5335 Set_Flag113 (Id, V);
5338 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5340 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5341 Set_Flag136 (Id, V);
5342 end Set_No_Strict_Aliasing;
5344 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5346 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5348 end Set_Non_Binary_Modulus;
5350 procedure Set_Non_Limited_View (Id : E; V : E) is
5353 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5355 end Set_Non_Limited_View;
5357 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5360 (Root_Type (Id) = Standard_Boolean
5361 and then Ekind (Id) = E_Enumeration_Type);
5362 Set_Flag162 (Id, V);
5363 end Set_Nonzero_Is_True;
5365 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5367 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5369 end Set_Normalized_First_Bit;
5371 procedure Set_Normalized_Position (Id : E; V : U) is
5373 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5375 end Set_Normalized_Position;
5377 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5379 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5381 end Set_Normalized_Position_Max;
5383 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5385 pragma Assert (Ekind (Id) = E_Variable);
5386 Set_Flag247 (Id, V);
5387 end Set_OK_To_Rename;
5389 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5392 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5393 Set_Flag239 (Id, V);
5394 end Set_OK_To_Reorder_Components;
5396 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5399 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5400 Set_Flag241 (Id, V);
5401 end Set_Optimize_Alignment_Space;
5403 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5406 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5407 Set_Flag242 (Id, V);
5408 end Set_Optimize_Alignment_Time;
5410 procedure Set_Original_Access_Type (Id : E; V : E) is
5412 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5414 end Set_Original_Access_Type;
5416 procedure Set_Original_Array_Type (Id : E; V : E) is
5418 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5420 end Set_Original_Array_Type;
5422 procedure Set_Original_Record_Component (Id : E; V : E) is
5424 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5426 end Set_Original_Record_Component;
5428 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5430 Set_Flag243 (Id, V);
5431 end Set_Overlays_Constant;
5433 procedure Set_Overridden_Operation (Id : E; V : E) is
5436 end Set_Overridden_Operation;
5438 procedure Set_Package_Instantiation (Id : E; V : N) is
5440 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5442 end Set_Package_Instantiation;
5444 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5446 pragma Assert (Is_Array_Type (Id));
5448 end Set_Packed_Array_Impl_Type;
5450 procedure Set_Parent_Subtype (Id : E; V : E) is
5452 pragma Assert (Ekind (Id) = E_Record_Type);
5454 end Set_Parent_Subtype;
5456 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5458 pragma Assert (Ekind (Id) = E_Abstract_State);
5460 end Set_Part_Of_Constituents;
5462 procedure Set_Postcondition_Proc (Id : E; V : E) is
5464 pragma Assert (Ekind (Id) = E_Procedure);
5466 end Set_Postcondition_Proc;
5468 procedure Set_PPC_Wrapper (Id : E; V : E) is
5470 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5472 end Set_PPC_Wrapper;
5474 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5476 pragma Assert (Is_Tagged_Type (Id));
5477 Set_Elist10 (Id, V);
5478 end Set_Direct_Primitive_Operations;
5480 procedure Set_Prival (Id : E; V : E) is
5482 pragma Assert (Is_Protected_Component (Id));
5486 procedure Set_Prival_Link (Id : E; V : E) is
5488 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5490 end Set_Prival_Link;
5492 procedure Set_Private_Dependents (Id : E; V : L) is
5494 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5495 Set_Elist18 (Id, V);
5496 end Set_Private_Dependents;
5498 procedure Set_Private_View (Id : E; V : N) is
5500 pragma Assert (Is_Private_Type (Id));
5502 end Set_Private_View;
5504 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5506 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5508 end Set_Protected_Body_Subprogram;
5510 procedure Set_Protected_Formal (Id : E; V : E) is
5512 pragma Assert (Is_Formal (Id));
5514 end Set_Protected_Formal;
5516 procedure Set_Protection_Object (Id : E; V : E) is
5518 pragma Assert (Ekind_In (Id, E_Entry,
5523 end Set_Protection_Object;
5525 procedure Set_Reachable (Id : E; V : B := True) is
5530 procedure Set_Referenced (Id : E; V : B := True) is
5532 Set_Flag156 (Id, V);
5535 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5538 end Set_Referenced_As_LHS;
5540 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5542 Set_Flag227 (Id, V);
5543 end Set_Referenced_As_Out_Parameter;
5545 procedure Set_Refinement_Constituents (Id : E; V : L) is
5547 pragma Assert (Ekind (Id) = E_Abstract_State);
5549 end Set_Refinement_Constituents;
5551 procedure Set_Register_Exception_Call (Id : E; V : N) is
5553 pragma Assert (Ekind (Id) = E_Exception);
5555 end Set_Register_Exception_Call;
5557 procedure Set_Related_Array_Object (Id : E; V : E) is
5559 pragma Assert (Is_Array_Type (Id));
5561 end Set_Related_Array_Object;
5563 procedure Set_Related_Expression (Id : E; V : N) is
5565 pragma Assert (Ekind (Id) in Type_Kind
5566 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5568 end Set_Related_Expression;
5570 procedure Set_Related_Instance (Id : E; V : E) is
5572 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5574 end Set_Related_Instance;
5576 procedure Set_Related_Type (Id : E; V : E) is
5578 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5580 end Set_Related_Type;
5582 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5584 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5586 end Set_Relative_Deadline_Variable;
5588 procedure Set_Renamed_Entity (Id : E; V : N) is
5591 end Set_Renamed_Entity;
5593 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5595 pragma Assert (Ekind (Id) = E_Package);
5596 Set_Flag231 (Id, V);
5597 end Set_Renamed_In_Spec;
5599 procedure Set_Renamed_Object (Id : E; V : N) is
5602 end Set_Renamed_Object;
5604 procedure Set_Renaming_Map (Id : E; V : U) is
5607 end Set_Renaming_Map;
5609 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5611 pragma Assert (Is_Overloadable (Id));
5612 Set_Flag213 (Id, V);
5613 end Set_Requires_Overriding;
5615 procedure Set_Return_Present (Id : E; V : B := True) is
5618 end Set_Return_Present;
5620 procedure Set_Return_Applies_To (Id : E; V : N) is
5623 end Set_Return_Applies_To;
5625 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5628 end Set_Returns_By_Ref;
5630 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5633 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5634 Set_Flag164 (Id, V);
5635 end Set_Reverse_Bit_Order;
5637 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5641 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5643 end Set_Reverse_Storage_Order;
5645 procedure Set_RM_Size (Id : E; V : U) is
5647 pragma Assert (Is_Type (Id));
5651 procedure Set_Scalar_Range (Id : E; V : N) is
5654 end Set_Scalar_Range;
5656 procedure Set_Scale_Value (Id : E; V : U) is
5659 end Set_Scale_Value;
5661 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5663 pragma Assert (not Is_Record_Type (Id));
5665 end Set_Scope_Depth_Value;
5667 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5669 Set_Flag167 (Id, V);
5670 end Set_Sec_Stack_Needed_For_Return;
5672 procedure Set_Shadow_Entities (Id : E; V : S) is
5674 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5676 end Set_Shadow_Entities;
5678 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5680 pragma Assert (Ekind (Id) = E_Variable);
5682 end Set_Shared_Var_Procs_Instance;
5684 procedure Set_Size_Check_Code (Id : E; V : N) is
5686 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5688 end Set_Size_Check_Code;
5690 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5692 Set_Flag177 (Id, V);
5693 end Set_Size_Depends_On_Discriminant;
5695 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5698 end Set_Size_Known_At_Compile_Time;
5700 procedure Set_Small_Value (Id : E; V : R) is
5702 pragma Assert (Is_Fixed_Point_Type (Id));
5703 Set_Ureal21 (Id, V);
5704 end Set_Small_Value;
5706 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5709 (Ekind_In (Id, E_Generic_Package, -- package variants
5714 end Set_SPARK_Aux_Pragma;
5716 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5719 (Ekind_In (Id, E_Generic_Package, -- package variants
5723 Set_Flag266 (Id, V);
5724 end Set_SPARK_Aux_Pragma_Inherited;
5726 procedure Set_SPARK_Pragma (Id : E; V : N) is
5729 (Ekind_In (Id, E_Function, -- subprogram variants
5731 E_Generic_Procedure,
5735 Ekind_In (Id, E_Generic_Package, -- package variants
5740 end Set_SPARK_Pragma;
5742 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5745 (Ekind_In (Id, E_Function, -- subprogram variants
5747 E_Generic_Procedure,
5751 Ekind_In (Id, E_Generic_Package, -- package variants
5755 Set_Flag265 (Id, V);
5756 end Set_SPARK_Pragma_Inherited;
5758 procedure Set_Spec_Entity (Id : E; V : E) is
5760 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5762 end Set_Spec_Entity;
5764 procedure Set_Static_Predicate (Id : E; V : S) is
5766 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5768 end Set_Static_Predicate;
5770 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5772 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5774 end Set_Status_Flag_Or_Transient_Decl;
5776 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5778 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5779 pragma Assert (Id = Base_Type (Id));
5781 end Set_Storage_Size_Variable;
5783 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5785 pragma Assert (Ekind (Id) = E_Package);
5787 end Set_Static_Elaboration_Desired;
5789 procedure Set_Static_Initialization (Id : E; V : N) is
5792 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5794 end Set_Static_Initialization;
5796 procedure Set_Stored_Constraint (Id : E; V : L) is
5798 pragma Assert (Nkind (Id) in N_Entity);
5799 Set_Elist23 (Id, V);
5800 end Set_Stored_Constraint;
5802 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5804 pragma Assert (Ekind (Id) = E_Constant);
5805 Set_Flag270 (Id, V);
5806 end Set_Stores_Attribute_Old_Prefix;
5808 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5810 pragma Assert (Id = Base_Type (Id));
5811 Set_Flag145 (Id, V);
5812 end Set_Strict_Alignment;
5814 procedure Set_String_Literal_Length (Id : E; V : U) is
5816 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5818 end Set_String_Literal_Length;
5820 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5822 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5824 end Set_String_Literal_Low_Bound;
5826 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5828 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5830 end Set_Subprograms_For_Type;
5832 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5834 Set_Flag148 (Id, V);
5835 end Set_Suppress_Elaboration_Warnings;
5837 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5839 pragma Assert (Is_Type (Id));
5840 Set_Flag105 (Id, V);
5841 end Set_Suppress_Initialization;
5843 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5845 Set_Flag165 (Id, V);
5846 end Set_Suppress_Style_Checks;
5848 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5850 Set_Flag217 (Id, V);
5851 end Set_Suppress_Value_Tracking_On_Call;
5853 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5855 pragma Assert (Ekind (Id) in Task_Kind);
5857 end Set_Task_Body_Procedure;
5859 procedure Set_Thunk_Entity (Id : E; V : E) is
5861 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5862 and then Is_Thunk (Id));
5864 end Set_Thunk_Entity;
5866 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5869 end Set_Treat_As_Volatile;
5871 procedure Set_Underlying_Full_View (Id : E; V : E) is
5873 pragma Assert (Ekind (Id) in Private_Kind);
5875 end Set_Underlying_Full_View;
5877 procedure Set_Underlying_Record_View (Id : E; V : E) is
5879 pragma Assert (Ekind (Id) = E_Record_Type);
5881 end Set_Underlying_Record_View;
5883 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5885 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5886 Set_Flag216 (Id, V);
5887 end Set_Universal_Aliasing;
5889 procedure Set_Unset_Reference (Id : E; V : N) is
5892 end Set_Unset_Reference;
5894 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5896 Set_Flag222 (Id, V);
5897 end Set_Used_As_Generic_Actual;
5899 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5901 pragma Assert (Ekind (Id) = E_Protected_Type);
5902 Set_Flag188 (Id, V);
5903 end Set_Uses_Lock_Free;
5905 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5908 end Set_Uses_Sec_Stack;
5910 procedure Set_Warnings_Off (Id : E; V : B := True) is
5913 end Set_Warnings_Off;
5915 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5917 Set_Flag236 (Id, V);
5918 end Set_Warnings_Off_Used;
5920 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5922 Set_Flag237 (Id, V);
5923 end Set_Warnings_Off_Used_Unmodified;
5925 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5927 Set_Flag238 (Id, V);
5928 end Set_Warnings_Off_Used_Unreferenced;
5930 procedure Set_Was_Hidden (Id : E; V : B := True) is
5932 Set_Flag196 (Id, V);
5935 procedure Set_Wrapped_Entity (Id : E; V : E) is
5937 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5938 and then Is_Primitive_Wrapper (Id));
5940 end Set_Wrapped_Entity;
5942 -----------------------------------
5943 -- Field Initialization Routines --
5944 -----------------------------------
5946 procedure Init_Alignment (Id : E) is
5948 Set_Uint14 (Id, Uint_0);
5951 procedure Init_Alignment (Id : E; V : Int) is
5953 Set_Uint14 (Id, UI_From_Int (V));
5956 procedure Init_Component_Bit_Offset (Id : E) is
5958 Set_Uint11 (Id, No_Uint);
5959 end Init_Component_Bit_Offset;
5961 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5963 Set_Uint11 (Id, UI_From_Int (V));
5964 end Init_Component_Bit_Offset;
5966 procedure Init_Component_Size (Id : E) is
5968 Set_Uint22 (Id, Uint_0);
5969 end Init_Component_Size;
5971 procedure Init_Component_Size (Id : E; V : Int) is
5973 Set_Uint22 (Id, UI_From_Int (V));
5974 end Init_Component_Size;
5976 procedure Init_Digits_Value (Id : E) is
5978 Set_Uint17 (Id, Uint_0);
5979 end Init_Digits_Value;
5981 procedure Init_Digits_Value (Id : E; V : Int) is
5983 Set_Uint17 (Id, UI_From_Int (V));
5984 end Init_Digits_Value;
5986 procedure Init_Esize (Id : E) is
5988 Set_Uint12 (Id, Uint_0);
5991 procedure Init_Esize (Id : E; V : Int) is
5993 Set_Uint12 (Id, UI_From_Int (V));
5996 procedure Init_Normalized_First_Bit (Id : E) is
5998 Set_Uint8 (Id, No_Uint);
5999 end Init_Normalized_First_Bit;
6001 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6003 Set_Uint8 (Id, UI_From_Int (V));
6004 end Init_Normalized_First_Bit;
6006 procedure Init_Normalized_Position (Id : E) is
6008 Set_Uint14 (Id, No_Uint);
6009 end Init_Normalized_Position;
6011 procedure Init_Normalized_Position (Id : E; V : Int) is
6013 Set_Uint14 (Id, UI_From_Int (V));
6014 end Init_Normalized_Position;
6016 procedure Init_Normalized_Position_Max (Id : E) is
6018 Set_Uint10 (Id, No_Uint);
6019 end Init_Normalized_Position_Max;
6021 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6023 Set_Uint10 (Id, UI_From_Int (V));
6024 end Init_Normalized_Position_Max;
6026 procedure Init_RM_Size (Id : E) is
6028 Set_Uint13 (Id, Uint_0);
6031 procedure Init_RM_Size (Id : E; V : Int) is
6033 Set_Uint13 (Id, UI_From_Int (V));
6036 -----------------------------
6037 -- Init_Component_Location --
6038 -----------------------------
6040 procedure Init_Component_Location (Id : E) is
6042 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6043 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6044 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6045 Set_Uint12 (Id, Uint_0); -- Esize
6046 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6047 end Init_Component_Location;
6049 ----------------------------
6050 -- Init_Object_Size_Align --
6051 ----------------------------
6053 procedure Init_Object_Size_Align (Id : E) is
6055 Set_Uint12 (Id, Uint_0); -- Esize
6056 Set_Uint14 (Id, Uint_0); -- Alignment
6057 end Init_Object_Size_Align;
6063 procedure Init_Size (Id : E; V : Int) is
6065 pragma Assert (not Is_Object (Id));
6066 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6067 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6070 ---------------------
6071 -- Init_Size_Align --
6072 ---------------------
6074 procedure Init_Size_Align (Id : E) is
6076 pragma Assert (not Is_Object (Id));
6077 Set_Uint12 (Id, Uint_0); -- Esize
6078 Set_Uint13 (Id, Uint_0); -- RM_Size
6079 Set_Uint14 (Id, Uint_0); -- Alignment
6080 end Init_Size_Align;
6082 ----------------------------------------------
6083 -- Type Representation Attribute Predicates --
6084 ----------------------------------------------
6086 function Known_Alignment (E : Entity_Id) return B is
6088 return Uint14 (E) /= Uint_0
6089 and then Uint14 (E) /= No_Uint;
6090 end Known_Alignment;
6092 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6094 return Uint11 (E) /= No_Uint;
6095 end Known_Component_Bit_Offset;
6097 function Known_Component_Size (E : Entity_Id) return B is
6099 return Uint22 (Base_Type (E)) /= Uint_0
6100 and then Uint22 (Base_Type (E)) /= No_Uint;
6101 end Known_Component_Size;
6103 function Known_Esize (E : Entity_Id) return B is
6105 return Uint12 (E) /= Uint_0
6106 and then Uint12 (E) /= No_Uint;
6109 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6111 return Uint8 (E) /= No_Uint;
6112 end Known_Normalized_First_Bit;
6114 function Known_Normalized_Position (E : Entity_Id) return B is
6116 return Uint14 (E) /= No_Uint;
6117 end Known_Normalized_Position;
6119 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6121 return Uint10 (E) /= No_Uint;
6122 end Known_Normalized_Position_Max;
6124 function Known_RM_Size (E : Entity_Id) return B is
6126 return Uint13 (E) /= No_Uint
6127 and then (Uint13 (E) /= Uint_0
6128 or else Is_Discrete_Type (E)
6129 or else Is_Fixed_Point_Type (E));
6132 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6134 return Uint11 (E) /= No_Uint
6135 and then Uint11 (E) >= Uint_0;
6136 end Known_Static_Component_Bit_Offset;
6138 function Known_Static_Component_Size (E : Entity_Id) return B is
6140 return Uint22 (Base_Type (E)) > Uint_0;
6141 end Known_Static_Component_Size;
6143 function Known_Static_Esize (E : Entity_Id) return B is
6145 return Uint12 (E) > Uint_0
6146 and then not Is_Generic_Type (E);
6147 end Known_Static_Esize;
6149 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6151 return Uint8 (E) /= No_Uint
6152 and then Uint8 (E) >= Uint_0;
6153 end Known_Static_Normalized_First_Bit;
6155 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6157 return Uint14 (E) /= No_Uint
6158 and then Uint14 (E) >= Uint_0;
6159 end Known_Static_Normalized_Position;
6161 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6163 return Uint10 (E) /= No_Uint
6164 and then Uint10 (E) >= Uint_0;
6165 end Known_Static_Normalized_Position_Max;
6167 function Known_Static_RM_Size (E : Entity_Id) return B is
6169 return (Uint13 (E) > Uint_0
6170 or else Is_Discrete_Type (E)
6171 or else Is_Fixed_Point_Type (E))
6172 and then not Is_Generic_Type (E);
6173 end Known_Static_RM_Size;
6175 function Unknown_Alignment (E : Entity_Id) return B is
6177 return Uint14 (E) = Uint_0
6178 or else Uint14 (E) = No_Uint;
6179 end Unknown_Alignment;
6181 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6183 return Uint11 (E) = No_Uint;
6184 end Unknown_Component_Bit_Offset;
6186 function Unknown_Component_Size (E : Entity_Id) return B is
6188 return Uint22 (Base_Type (E)) = Uint_0
6190 Uint22 (Base_Type (E)) = No_Uint;
6191 end Unknown_Component_Size;
6193 function Unknown_Esize (E : Entity_Id) return B is
6195 return Uint12 (E) = No_Uint
6197 Uint12 (E) = Uint_0;
6200 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6202 return Uint8 (E) = No_Uint;
6203 end Unknown_Normalized_First_Bit;
6205 function Unknown_Normalized_Position (E : Entity_Id) return B is
6207 return Uint14 (E) = No_Uint;
6208 end Unknown_Normalized_Position;
6210 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6212 return Uint10 (E) = No_Uint;
6213 end Unknown_Normalized_Position_Max;
6215 function Unknown_RM_Size (E : Entity_Id) return B is
6217 return (Uint13 (E) = Uint_0
6218 and then not Is_Discrete_Type (E)
6219 and then not Is_Fixed_Point_Type (E))
6220 or else Uint13 (E) = No_Uint;
6221 end Unknown_RM_Size;
6223 --------------------
6224 -- Address_Clause --
6225 --------------------
6227 function Address_Clause (Id : E) return N is
6229 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6236 function Aft_Value (Id : E) return U is
6238 Delta_Val : Ureal := Delta_Value (Id);
6240 while Delta_Val < Ureal_Tenth loop
6241 Delta_Val := Delta_Val * Ureal_10;
6242 Result := Result + 1;
6245 return UI_From_Int (Result);
6248 ----------------------
6249 -- Alignment_Clause --
6250 ----------------------
6252 function Alignment_Clause (Id : E) return N is
6254 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6255 end Alignment_Clause;
6261 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6263 if Last_Entity (V) = Empty then
6264 Set_First_Entity (Id => V, V => Id);
6266 Set_Next_Entity (Last_Entity (V), Id);
6269 Set_Next_Entity (Id, Empty);
6271 Set_Last_Entity (Id => V, V => Id);
6278 function Base_Type (Id : E) return E is
6280 if Is_Base_Type (Id) then
6283 pragma Assert (Is_Type (Id));
6288 -------------------------
6289 -- Component_Alignment --
6290 -------------------------
6292 -- Component Alignment is encoded using two flags, Flag128/129 as
6293 -- follows. Note that both flags False = Align_Default, so that the
6294 -- default initialization of flags to False initializes component
6295 -- alignment to the default value as required.
6297 -- Flag128 Flag129 Value
6298 -- ------- ------- -----
6299 -- False False Calign_Default
6300 -- False True Calign_Component_Size
6301 -- True False Calign_Component_Size_4
6302 -- True True Calign_Storage_Unit
6304 function Component_Alignment (Id : E) return C is
6305 BT : constant Node_Id := Base_Type (Id);
6308 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6310 if Flag128 (BT) then
6311 if Flag129 (BT) then
6312 return Calign_Storage_Unit;
6314 return Calign_Component_Size_4;
6318 if Flag129 (BT) then
6319 return Calign_Component_Size;
6321 return Calign_Default;
6324 end Component_Alignment;
6326 ----------------------
6327 -- Declaration_Node --
6328 ----------------------
6330 function Declaration_Node (Id : E) return N is
6334 if Ekind (Id) = E_Incomplete_Type
6335 and then Present (Full_View (Id))
6337 P := Parent (Full_View (Id));
6343 if Nkind (P) /= N_Selected_Component
6344 and then Nkind (P) /= N_Expanded_Name
6346 not (Nkind (P) = N_Defining_Program_Unit_Name
6347 and then Is_Child_Unit (Id))
6354 end Declaration_Node;
6356 ---------------------
6357 -- Designated_Type --
6358 ---------------------
6360 function Designated_Type (Id : E) return E is
6364 Desig_Type := Directly_Designated_Type (Id);
6366 if Ekind (Desig_Type) = E_Incomplete_Type
6367 and then Present (Full_View (Desig_Type))
6369 return Full_View (Desig_Type);
6371 elsif Is_Class_Wide_Type (Desig_Type)
6372 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6373 and then Present (Full_View (Etype (Desig_Type)))
6374 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6376 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6381 end Designated_Type;
6383 ----------------------
6384 -- Entry_Index_Type --
6385 ----------------------
6387 function Entry_Index_Type (Id : E) return N is
6389 pragma Assert (Ekind (Id) = E_Entry_Family);
6390 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6391 end Entry_Index_Type;
6393 ---------------------
6394 -- First_Component --
6395 ---------------------
6397 function First_Component (Id : E) return E is
6402 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6404 Comp_Id := First_Entity (Id);
6405 while Present (Comp_Id) loop
6406 exit when Ekind (Comp_Id) = E_Component;
6407 Comp_Id := Next_Entity (Comp_Id);
6411 end First_Component;
6413 -------------------------------------
6414 -- First_Component_Or_Discriminant --
6415 -------------------------------------
6417 function First_Component_Or_Discriminant (Id : E) return E is
6422 (Is_Record_Type (Id)
6423 or else Is_Incomplete_Or_Private_Type (Id)
6424 or else Has_Discriminants (Id));
6426 Comp_Id := First_Entity (Id);
6427 while Present (Comp_Id) loop
6428 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6429 Comp_Id := Next_Entity (Comp_Id);
6433 end First_Component_Or_Discriminant;
6439 function First_Formal (Id : E) return E is
6444 (Is_Overloadable (Id)
6445 or else Ekind_In (Id, E_Entry_Family,
6447 E_Subprogram_Type));
6449 if Ekind (Id) = E_Enumeration_Literal then
6453 Formal := First_Entity (Id);
6455 if Present (Formal) and then Is_Formal (Formal) then
6463 ------------------------------
6464 -- First_Formal_With_Extras --
6465 ------------------------------
6467 function First_Formal_With_Extras (Id : E) return E is
6472 (Is_Overloadable (Id)
6473 or else Ekind_In (Id, E_Entry_Family,
6475 E_Subprogram_Type));
6477 if Ekind (Id) = E_Enumeration_Literal then
6481 Formal := First_Entity (Id);
6483 if Present (Formal) and then Is_Formal (Formal) then
6486 return Extra_Formals (Id); -- Empty if no extra formals
6489 end First_Formal_With_Extras;
6491 -------------------------------------
6492 -- Get_Attribute_Definition_Clause --
6493 -------------------------------------
6495 function Get_Attribute_Definition_Clause
6497 Id : Attribute_Id) return Node_Id
6502 N := First_Rep_Item (E);
6503 while Present (N) loop
6504 if Nkind (N) = N_Attribute_Definition_Clause
6505 and then Get_Attribute_Id (Chars (N)) = Id
6514 end Get_Attribute_Definition_Clause;
6520 function Get_Full_View (T : Entity_Id) return Entity_Id is
6522 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6523 return Full_View (T);
6525 elsif Is_Class_Wide_Type (T)
6526 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6527 and then Present (Full_View (Root_Type (T)))
6529 return Class_Wide_Type (Full_View (Root_Type (T)));
6540 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6541 Is_CDG : constant Boolean :=
6542 Id = Pragma_Abstract_State or else
6543 Id = Pragma_Async_Readers or else
6544 Id = Pragma_Async_Writers or else
6545 Id = Pragma_Depends or else
6546 Id = Pragma_Effective_Reads or else
6547 Id = Pragma_Effective_Writes or else
6548 Id = Pragma_Global or else
6549 Id = Pragma_Initial_Condition or else
6550 Id = Pragma_Initializes or else
6551 Id = Pragma_Part_Of or else
6552 Id = Pragma_Refined_Depends or else
6553 Id = Pragma_Refined_Global or else
6554 Id = Pragma_Refined_State;
6555 Is_CTC : constant Boolean :=
6556 Id = Pragma_Contract_Cases or else
6557 Id = Pragma_Test_Case;
6558 Is_PPC : constant Boolean :=
6559 Id = Pragma_Precondition or else
6560 Id = Pragma_Postcondition or else
6561 Id = Pragma_Refined_Post;
6563 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6569 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6570 -- extracted from their specialized list.
6573 Items := Contract (E);
6579 Item := Classifications (Items);
6582 Item := Contract_Test_Cases (Items);
6585 Item := Pre_Post_Conditions (Items);
6591 Item := First_Rep_Item (E);
6594 while Present (Item) loop
6595 if Nkind (Item) = N_Pragma
6596 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6600 -- All nodes in N_Contract are chained using Next_Pragma
6602 elsif In_Contract then
6603 Item := Next_Pragma (Item);
6608 Next_Rep_Item (Item);
6615 --------------------------------------
6616 -- Get_Record_Representation_Clause --
6617 --------------------------------------
6619 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6623 N := First_Rep_Item (E);
6624 while Present (N) loop
6625 if Nkind (N) = N_Record_Representation_Clause then
6633 end Get_Record_Representation_Clause;
6635 ------------------------
6636 -- Has_Attach_Handler --
6637 ------------------------
6639 function Has_Attach_Handler (Id : E) return B is
6643 pragma Assert (Is_Protected_Type (Id));
6645 Ritem := First_Rep_Item (Id);
6646 while Present (Ritem) loop
6647 if Nkind (Ritem) = N_Pragma
6648 and then Pragma_Name (Ritem) = Name_Attach_Handler
6652 Next_Rep_Item (Ritem);
6657 end Has_Attach_Handler;
6663 function Has_Entries (Id : E) return B is
6667 pragma Assert (Is_Concurrent_Type (Id));
6669 Ent := First_Entity (Id);
6670 while Present (Ent) loop
6671 if Is_Entry (Ent) then
6675 Ent := Next_Entity (Ent);
6681 ----------------------------
6682 -- Has_Foreign_Convention --
6683 ----------------------------
6685 function Has_Foreign_Convention (Id : E) return B is
6687 -- While regular Intrinsics such as the Standard operators fit in the
6688 -- "Ada" convention, those with an Interface_Name materialize GCC
6689 -- builtin imports for which Ada special treatments shouldn't apply.
6691 return Convention (Id) in Foreign_Convention
6692 or else (Convention (Id) = Convention_Intrinsic
6693 and then Present (Interface_Name (Id)));
6694 end Has_Foreign_Convention;
6696 ---------------------------
6697 -- Has_Interrupt_Handler --
6698 ---------------------------
6700 function Has_Interrupt_Handler (Id : E) return B is
6704 pragma Assert (Is_Protected_Type (Id));
6706 Ritem := First_Rep_Item (Id);
6707 while Present (Ritem) loop
6708 if Nkind (Ritem) = N_Pragma
6709 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6713 Next_Rep_Item (Ritem);
6718 end Has_Interrupt_Handler;
6720 -----------------------------
6721 -- Has_Non_Null_Refinement --
6722 -----------------------------
6724 function Has_Non_Null_Refinement (Id : E) return B is
6726 -- "Refinement" is a concept applicable only to abstract states
6728 pragma Assert (Ekind (Id) = E_Abstract_State);
6730 if Has_Visible_Refinement (Id) then
6731 pragma Assert (Present (Refinement_Constituents (Id)));
6733 -- For a refinement to be non-null, the first constituent must be
6734 -- anything other than null.
6737 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6741 end Has_Non_Null_Refinement;
6743 -----------------------------
6744 -- Has_Null_Abstract_State --
6745 -----------------------------
6747 function Has_Null_Abstract_State (Id : E) return B is
6749 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6752 Present (Abstract_States (Id))
6753 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6754 end Has_Null_Abstract_State;
6756 -------------------------
6757 -- Has_Null_Refinement --
6758 -------------------------
6760 function Has_Null_Refinement (Id : E) return B is
6762 -- "Refinement" is a concept applicable only to abstract states
6764 pragma Assert (Ekind (Id) = E_Abstract_State);
6766 if Has_Visible_Refinement (Id) then
6767 pragma Assert (Present (Refinement_Constituents (Id)));
6769 -- For a refinement to be null, the state's sole constituent must be
6773 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6777 end Has_Null_Refinement;
6779 --------------------
6780 -- Has_Unmodified --
6781 --------------------
6783 function Has_Unmodified (E : Entity_Id) return Boolean is
6785 if Has_Pragma_Unmodified (E) then
6787 elsif Warnings_Off (E) then
6788 Set_Warnings_Off_Used_Unmodified (E);
6795 ---------------------
6796 -- Has_Unreferenced --
6797 ---------------------
6799 function Has_Unreferenced (E : Entity_Id) return Boolean is
6801 if Has_Pragma_Unreferenced (E) then
6803 elsif Warnings_Off (E) then
6804 Set_Warnings_Off_Used_Unreferenced (E);
6809 end Has_Unreferenced;
6811 ----------------------
6812 -- Has_Warnings_Off --
6813 ----------------------
6815 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6817 if Warnings_Off (E) then
6818 Set_Warnings_Off_Used (E);
6823 end Has_Warnings_Off;
6825 ------------------------------
6826 -- Implementation_Base_Type --
6827 ------------------------------
6829 function Implementation_Base_Type (Id : E) return E is
6834 Bastyp := Base_Type (Id);
6836 if Is_Incomplete_Or_Private_Type (Bastyp) then
6837 Imptyp := Underlying_Type (Bastyp);
6839 -- If we have an implementation type, then just return it,
6840 -- otherwise we return the Base_Type anyway. This can only
6841 -- happen in error situations and should avoid some error bombs.
6843 if Present (Imptyp) then
6844 return Base_Type (Imptyp);
6852 end Implementation_Base_Type;
6854 -------------------------
6855 -- Invariant_Procedure --
6856 -------------------------
6858 function Invariant_Procedure (Id : E) return E is
6862 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6864 if No (Subprograms_For_Type (Id)) then
6868 S := Subprograms_For_Type (Id);
6869 while Present (S) loop
6870 if Is_Invariant_Procedure (S) then
6873 S := Subprograms_For_Type (S);
6879 end Invariant_Procedure;
6885 -- Global flag table allowing rapid computation of this function
6887 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6888 (E_Enumeration_Subtype |
6890 E_Signed_Integer_Subtype |
6891 E_Modular_Integer_Subtype |
6892 E_Floating_Point_Subtype |
6893 E_Ordinary_Fixed_Point_Subtype |
6894 E_Decimal_Fixed_Point_Subtype |
6899 E_Record_Subtype_With_Private |
6900 E_Limited_Private_Subtype |
6902 E_Protected_Subtype |
6904 E_String_Literal_Subtype |
6905 E_Class_Wide_Subtype => False,
6908 function Is_Base_Type (Id : E) return Boolean is
6910 return Entity_Is_Base_Type (Ekind (Id));
6913 ---------------------
6914 -- Is_Boolean_Type --
6915 ---------------------
6917 function Is_Boolean_Type (Id : E) return B is
6919 return Root_Type (Id) = Standard_Boolean;
6920 end Is_Boolean_Type;
6922 ------------------------
6923 -- Is_Constant_Object --
6924 ------------------------
6926 function Is_Constant_Object (Id : E) return B is
6927 K : constant Entity_Kind := Ekind (Id);
6930 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6931 end Is_Constant_Object;
6933 --------------------
6934 -- Is_Discriminal --
6935 --------------------
6937 function Is_Discriminal (Id : E) return B is
6939 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6940 and then Present (Discriminal_Link (Id)));
6943 ----------------------
6944 -- Is_Dynamic_Scope --
6945 ----------------------
6947 function Is_Dynamic_Scope (Id : E) return B is
6950 Ekind (Id) = E_Block
6952 Ekind (Id) = E_Function
6954 Ekind (Id) = E_Procedure
6956 Ekind (Id) = E_Subprogram_Body
6958 Ekind (Id) = E_Task_Type
6960 (Ekind (Id) = E_Limited_Private_Type
6961 and then Present (Full_View (Id))
6962 and then Ekind (Full_View (Id)) = E_Task_Type)
6964 Ekind (Id) = E_Entry
6966 Ekind (Id) = E_Entry_Family
6968 Ekind (Id) = E_Return_Statement;
6969 end Is_Dynamic_Scope;
6971 --------------------
6972 -- Is_Entity_Name --
6973 --------------------
6975 function Is_Entity_Name (N : Node_Id) return Boolean is
6976 Kind : constant Node_Kind := Nkind (N);
6979 -- Identifiers, operator symbols, expanded names are entity names
6981 return Kind = N_Identifier
6982 or else Kind = N_Operator_Symbol
6983 or else Kind = N_Expanded_Name
6985 -- Attribute references are entity names if they refer to an entity.
6986 -- Note that we don't do this by testing for the presence of the
6987 -- Entity field in the N_Attribute_Reference node, since it may not
6988 -- have been set yet.
6990 or else (Kind = N_Attribute_Reference
6991 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6994 -----------------------
6995 -- Is_External_State --
6996 -----------------------
6998 function Is_External_State (Id : E) return B is
7001 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7002 end Is_External_State;
7008 function Is_Finalizer (Id : E) return B is
7010 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7013 ---------------------
7014 -- Is_Ghost_Entity --
7015 ---------------------
7017 -- Note: coding below allows for ghost variables. They are not currently
7018 -- implemented, so we will always get False for variables, but that is
7019 -- expected to change in the future.
7021 function Is_Ghost_Entity (Id : E) return B is
7023 if Present (Id) and then Ekind (Id) = E_Variable then
7024 return Convention (Id) = Convention_Ghost;
7026 return Is_Ghost_Subprogram (Id);
7028 end Is_Ghost_Entity;
7030 -------------------------
7031 -- Is_Ghost_Subprogram --
7032 -------------------------
7034 function Is_Ghost_Subprogram (Id : E) return B is
7036 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7037 return Convention (Id) = Convention_Ghost;
7041 end Is_Ghost_Subprogram;
7047 function Is_Null_State (Id : E) return B is
7050 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7053 ---------------------
7054 -- Is_Packed_Array --
7055 ---------------------
7057 function Is_Packed_Array (Id : E) return B is
7059 return Is_Array_Type (Id) and then Is_Packed (Id);
7060 end Is_Packed_Array;
7062 -----------------------------------
7063 -- Is_Package_Or_Generic_Package --
7064 -----------------------------------
7066 function Is_Package_Or_Generic_Package (Id : E) return B is
7068 return Ekind_In (Id, E_Generic_Package, E_Package);
7069 end Is_Package_Or_Generic_Package;
7075 function Is_Prival (Id : E) return B is
7077 return (Ekind_In (Id, E_Constant, E_Variable)
7078 and then Present (Prival_Link (Id)));
7081 ----------------------------
7082 -- Is_Protected_Component --
7083 ----------------------------
7085 function Is_Protected_Component (Id : E) return B is
7087 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7088 end Is_Protected_Component;
7090 ----------------------------
7091 -- Is_Protected_Interface --
7092 ----------------------------
7094 function Is_Protected_Interface (Id : E) return B is
7095 Typ : constant Entity_Id := Base_Type (Id);
7097 if not Is_Interface (Typ) then
7099 elsif Is_Class_Wide_Type (Typ) then
7100 return Is_Protected_Interface (Etype (Typ));
7102 return Protected_Present (Type_Definition (Parent (Typ)));
7104 end Is_Protected_Interface;
7106 ------------------------------
7107 -- Is_Protected_Record_Type --
7108 ------------------------------
7110 function Is_Protected_Record_Type (Id : E) return B is
7113 Is_Concurrent_Record_Type (Id)
7114 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7115 end Is_Protected_Record_Type;
7117 --------------------------------
7118 -- Is_Standard_Character_Type --
7119 --------------------------------
7121 function Is_Standard_Character_Type (Id : E) return B is
7123 if Is_Type (Id) then
7125 R : constant Entity_Id := Root_Type (Id);
7128 R = Standard_Character
7130 R = Standard_Wide_Character
7132 R = Standard_Wide_Wide_Character;
7138 end Is_Standard_Character_Type;
7140 --------------------
7141 -- Is_String_Type --
7142 --------------------
7144 function Is_String_Type (Id : E) return B is
7146 return Ekind (Id) in String_Kind
7147 or else (Is_Array_Type (Id)
7148 and then Id /= Any_Composite
7149 and then Number_Dimensions (Id) = 1
7150 and then Is_Character_Type (Component_Type (Id)));
7153 -------------------------------
7154 -- Is_Synchronized_Interface --
7155 -------------------------------
7157 function Is_Synchronized_Interface (Id : E) return B is
7158 Typ : constant Entity_Id := Base_Type (Id);
7161 if not Is_Interface (Typ) then
7164 elsif Is_Class_Wide_Type (Typ) then
7165 return Is_Synchronized_Interface (Etype (Typ));
7168 return Protected_Present (Type_Definition (Parent (Typ)))
7169 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7170 or else Task_Present (Type_Definition (Parent (Typ)));
7172 end Is_Synchronized_Interface;
7174 -----------------------
7175 -- Is_Task_Interface --
7176 -----------------------
7178 function Is_Task_Interface (Id : E) return B is
7179 Typ : constant Entity_Id := Base_Type (Id);
7181 if not Is_Interface (Typ) then
7183 elsif Is_Class_Wide_Type (Typ) then
7184 return Is_Task_Interface (Etype (Typ));
7186 return Task_Present (Type_Definition (Parent (Typ)));
7188 end Is_Task_Interface;
7190 -------------------------
7191 -- Is_Task_Record_Type --
7192 -------------------------
7194 function Is_Task_Record_Type (Id : E) return B is
7197 Is_Concurrent_Record_Type (Id)
7198 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7199 end Is_Task_Record_Type;
7201 ------------------------
7202 -- Is_Wrapper_Package --
7203 ------------------------
7205 function Is_Wrapper_Package (Id : E) return B is
7207 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7208 end Is_Wrapper_Package;
7214 function Last_Formal (Id : E) return E is
7219 (Is_Overloadable (Id)
7220 or else Ekind_In (Id, E_Entry_Family,
7222 E_Subprogram_Type));
7224 if Ekind (Id) = E_Enumeration_Literal then
7228 Formal := First_Formal (Id);
7230 if Present (Formal) then
7231 while Present (Next_Formal (Formal)) loop
7232 Formal := Next_Formal (Formal);
7240 function Model_Emin_Value (Id : E) return Uint is
7242 return Machine_Emin_Value (Id);
7243 end Model_Emin_Value;
7245 -------------------------
7246 -- Model_Epsilon_Value --
7247 -------------------------
7249 function Model_Epsilon_Value (Id : E) return Ureal is
7250 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7252 return Radix ** (1 - Model_Mantissa_Value (Id));
7253 end Model_Epsilon_Value;
7255 --------------------------
7256 -- Model_Mantissa_Value --
7257 --------------------------
7259 function Model_Mantissa_Value (Id : E) return Uint is
7261 return Machine_Mantissa_Value (Id);
7262 end Model_Mantissa_Value;
7264 -----------------------
7265 -- Model_Small_Value --
7266 -----------------------
7268 function Model_Small_Value (Id : E) return Ureal is
7269 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7271 return Radix ** (Model_Emin_Value (Id) - 1);
7272 end Model_Small_Value;
7274 ------------------------
7275 -- Machine_Emax_Value --
7276 ------------------------
7278 function Machine_Emax_Value (Id : E) return Uint is
7279 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7282 case Float_Rep (Id) is
7285 when 1 .. 6 => return Uint_128;
7286 when 7 .. 15 => return 2**10;
7287 when 16 .. 33 => return 2**14;
7288 when others => return No_Uint;
7293 when 1 .. 9 => return 2**7 - 1;
7294 when 10 .. 15 => return 2**10 - 1;
7295 when others => return No_Uint;
7299 return Uint_2 ** Uint_7 - Uint_1;
7301 end Machine_Emax_Value;
7303 ------------------------
7304 -- Machine_Emin_Value --
7305 ------------------------
7307 function Machine_Emin_Value (Id : E) return Uint is
7309 case Float_Rep (Id) is
7310 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7311 when VAX_Native => return -Machine_Emax_Value (Id);
7312 when AAMP => return -Machine_Emax_Value (Id);
7314 end Machine_Emin_Value;
7316 ----------------------------
7317 -- Machine_Mantissa_Value --
7318 ----------------------------
7320 function Machine_Mantissa_Value (Id : E) return Uint is
7321 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7324 case Float_Rep (Id) is
7327 when 1 .. 6 => return Uint_24;
7328 when 7 .. 15 => return UI_From_Int (53);
7329 when 16 .. 18 => return Uint_64;
7330 when 19 .. 33 => return UI_From_Int (113);
7331 when others => return No_Uint;
7336 when 1 .. 6 => return Uint_24;
7337 when 7 .. 9 => return UI_From_Int (56);
7338 when 10 .. 15 => return UI_From_Int (53);
7339 when others => return No_Uint;
7344 when 1 .. 6 => return Uint_24;
7345 when 7 .. 9 => return UI_From_Int (40);
7346 when others => return No_Uint;
7349 end Machine_Mantissa_Value;
7351 -------------------------
7352 -- Machine_Radix_Value --
7353 -------------------------
7355 function Machine_Radix_Value (Id : E) return U is
7357 case Float_Rep (Id) is
7358 when IEEE_Binary | VAX_Native | AAMP =>
7361 end Machine_Radix_Value;
7363 --------------------
7364 -- Next_Component --
7365 --------------------
7367 function Next_Component (Id : E) return E is
7371 Comp_Id := Next_Entity (Id);
7372 while Present (Comp_Id) loop
7373 exit when Ekind (Comp_Id) = E_Component;
7374 Comp_Id := Next_Entity (Comp_Id);
7380 ------------------------------------
7381 -- Next_Component_Or_Discriminant --
7382 ------------------------------------
7384 function Next_Component_Or_Discriminant (Id : E) return E is
7388 Comp_Id := Next_Entity (Id);
7389 while Present (Comp_Id) loop
7390 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7391 Comp_Id := Next_Entity (Comp_Id);
7395 end Next_Component_Or_Discriminant;
7397 -----------------------
7398 -- Next_Discriminant --
7399 -----------------------
7401 -- This function actually implements both Next_Discriminant and
7402 -- Next_Stored_Discriminant by making sure that the Discriminant
7403 -- returned is of the same variety as Id.
7405 function Next_Discriminant (Id : E) return E is
7407 -- Derived Tagged types with private extensions look like this...
7409 -- E_Discriminant d1
7410 -- E_Discriminant d2
7412 -- E_Discriminant d1
7413 -- E_Discriminant d2
7416 -- so it is critical not to go past the leading discriminants
7421 pragma Assert (Ekind (Id) = E_Discriminant);
7424 D := Next_Entity (D);
7426 or else (Ekind (D) /= E_Discriminant
7427 and then not Is_Itype (D))
7432 exit when Ekind (D) = E_Discriminant
7433 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7437 end Next_Discriminant;
7443 function Next_Formal (Id : E) return E is
7447 -- Follow the chain of declared entities as long as the kind of the
7448 -- entity corresponds to a formal parameter. Skip internal entities
7449 -- that may have been created for implicit subtypes, in the process
7450 -- of analyzing default expressions.
7454 P := Next_Entity (P);
7456 if No (P) or else Is_Formal (P) then
7458 elsif not Is_Internal (P) then
7464 -----------------------------
7465 -- Next_Formal_With_Extras --
7466 -----------------------------
7468 function Next_Formal_With_Extras (Id : E) return E is
7470 if Present (Extra_Formal (Id)) then
7471 return Extra_Formal (Id);
7473 return Next_Formal (Id);
7475 end Next_Formal_With_Extras;
7481 function Next_Index (Id : Node_Id) return Node_Id is
7490 function Next_Literal (Id : E) return E is
7492 pragma Assert (Nkind (Id) in N_Entity);
7496 ------------------------------
7497 -- Next_Stored_Discriminant --
7498 ------------------------------
7500 function Next_Stored_Discriminant (Id : E) return E is
7502 -- See comment in Next_Discriminant
7504 return Next_Discriminant (Id);
7505 end Next_Stored_Discriminant;
7507 -----------------------
7508 -- Number_Dimensions --
7509 -----------------------
7511 function Number_Dimensions (Id : E) return Pos is
7516 if Ekind (Id) in String_Kind then
7521 T := First_Index (Id);
7522 while Present (T) loop
7529 end Number_Dimensions;
7531 --------------------
7532 -- Number_Entries --
7533 --------------------
7535 function Number_Entries (Id : E) return Nat is
7540 pragma Assert (Is_Concurrent_Type (Id));
7543 Ent := First_Entity (Id);
7544 while Present (Ent) loop
7545 if Is_Entry (Ent) then
7549 Ent := Next_Entity (Ent);
7555 --------------------
7556 -- Number_Formals --
7557 --------------------
7559 function Number_Formals (Id : E) return Pos is
7565 Formal := First_Formal (Id);
7566 while Present (Formal) loop
7568 Formal := Next_Formal (Formal);
7574 --------------------
7575 -- Parameter_Mode --
7576 --------------------
7578 function Parameter_Mode (Id : E) return Formal_Kind is
7583 ------------------------
7584 -- Predicate_Function --
7585 ------------------------
7587 function Predicate_Function (Id : E) return E is
7592 pragma Assert (Is_Type (Id));
7594 -- If type is private and has a completion, predicate may be defined
7595 -- on the full view.
7597 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7598 T := Full_View (Id);
7603 if No (Subprograms_For_Type (T)) then
7607 S := Subprograms_For_Type (T);
7608 while Present (S) loop
7609 if Is_Predicate_Function (S) then
7612 S := Subprograms_For_Type (S);
7618 end Predicate_Function;
7620 --------------------------
7621 -- Predicate_Function_M --
7622 --------------------------
7624 function Predicate_Function_M (Id : E) return E is
7629 pragma Assert (Is_Type (Id));
7631 -- If type is private and has a completion, predicate may be defined
7632 -- on the full view.
7634 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7635 T := Full_View (Id);
7640 if No (Subprograms_For_Type (T)) then
7644 S := Subprograms_For_Type (T);
7645 while Present (S) loop
7646 if Is_Predicate_Function_M (S) then
7649 S := Subprograms_For_Type (S);
7655 end Predicate_Function_M;
7657 -------------------------
7658 -- Present_In_Rep_Item --
7659 -------------------------
7661 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7665 Ritem := First_Rep_Item (E);
7667 while Present (Ritem) loop
7672 Next_Rep_Item (Ritem);
7676 end Present_In_Rep_Item;
7678 --------------------------
7679 -- Primitive_Operations --
7680 --------------------------
7682 function Primitive_Operations (Id : E) return L is
7684 if Is_Concurrent_Type (Id) then
7685 if Present (Corresponding_Record_Type (Id)) then
7686 return Direct_Primitive_Operations
7687 (Corresponding_Record_Type (Id));
7689 -- If expansion is disabled the corresponding record type is absent,
7690 -- but if the type has ancestors it may have primitive operations.
7692 elsif Is_Tagged_Type (Id) then
7693 return Direct_Primitive_Operations (Id);
7699 return Direct_Primitive_Operations (Id);
7701 end Primitive_Operations;
7703 ---------------------
7704 -- Record_Rep_Item --
7705 ---------------------
7707 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7709 Set_Next_Rep_Item (N, First_Rep_Item (E));
7710 Set_First_Rep_Item (E, N);
7711 end Record_Rep_Item;
7717 function Root_Type (Id : E) return E is
7721 pragma Assert (Nkind (Id) in N_Entity);
7723 T := Base_Type (Id);
7725 if Ekind (T) = E_Class_Wide_Type then
7737 -- Following test catches some error cases resulting from
7740 elsif No (Etyp) then
7741 Check_Error_Detected;
7744 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7747 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7753 -- Return if there is a circularity in the inheritance chain. This
7754 -- happens in some error situations and we do not want to get
7755 -- stuck in this loop.
7757 if T = Base_Type (Id) then
7764 ---------------------
7765 -- Safe_Emax_Value --
7766 ---------------------
7768 function Safe_Emax_Value (Id : E) return Uint is
7770 return Machine_Emax_Value (Id);
7771 end Safe_Emax_Value;
7773 ----------------------
7774 -- Safe_First_Value --
7775 ----------------------
7777 function Safe_First_Value (Id : E) return Ureal is
7779 return -Safe_Last_Value (Id);
7780 end Safe_First_Value;
7782 ---------------------
7783 -- Safe_Last_Value --
7784 ---------------------
7786 function Safe_Last_Value (Id : E) return Ureal is
7787 Radix : constant Uint := Machine_Radix_Value (Id);
7788 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7789 Emax : constant Uint := Safe_Emax_Value (Id);
7790 Significand : constant Uint := Radix ** Mantissa - 1;
7791 Exponent : constant Uint := Emax - Mantissa;
7797 (Num => Significand * 2 ** (Exponent mod 4),
7798 Den => -Exponent / 4,
7804 (Num => Significand,
7808 end Safe_Last_Value;
7814 function Scope_Depth (Id : E) return Uint is
7819 while Is_Record_Type (Scop) loop
7820 Scop := Scope (Scop);
7823 return Scope_Depth_Value (Scop);
7826 ---------------------
7827 -- Scope_Depth_Set --
7828 ---------------------
7830 function Scope_Depth_Set (Id : E) return B is
7832 return not Is_Record_Type (Id)
7833 and then Field22 (Id) /= Union_Id (Empty);
7834 end Scope_Depth_Set;
7836 -----------------------------
7837 -- Set_Component_Alignment --
7838 -----------------------------
7840 -- Component Alignment is encoded using two flags, Flag128/129 as
7841 -- follows. Note that both flags False = Align_Default, so that the
7842 -- default initialization of flags to False initializes component
7843 -- alignment to the default value as required.
7845 -- Flag128 Flag129 Value
7846 -- ------- ------- -----
7847 -- False False Calign_Default
7848 -- False True Calign_Component_Size
7849 -- True False Calign_Component_Size_4
7850 -- True True Calign_Storage_Unit
7852 procedure Set_Component_Alignment (Id : E; V : C) is
7854 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7855 and then Is_Base_Type (Id));
7858 when Calign_Default =>
7859 Set_Flag128 (Id, False);
7860 Set_Flag129 (Id, False);
7862 when Calign_Component_Size =>
7863 Set_Flag128 (Id, False);
7864 Set_Flag129 (Id, True);
7866 when Calign_Component_Size_4 =>
7867 Set_Flag128 (Id, True);
7868 Set_Flag129 (Id, False);
7870 when Calign_Storage_Unit =>
7871 Set_Flag128 (Id, True);
7872 Set_Flag129 (Id, True);
7874 end Set_Component_Alignment;
7876 -----------------------------
7877 -- Set_Invariant_Procedure --
7878 -----------------------------
7880 procedure Set_Invariant_Procedure (Id : E; V : E) is
7884 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7886 S := Subprograms_For_Type (Id);
7887 Set_Subprograms_For_Type (Id, V);
7888 Set_Subprograms_For_Type (V, S);
7890 -- Check for duplicate entry
7892 while Present (S) loop
7893 if Is_Invariant_Procedure (S) then
7894 raise Program_Error;
7896 S := Subprograms_For_Type (S);
7899 end Set_Invariant_Procedure;
7901 ----------------------------
7902 -- Set_Predicate_Function --
7903 ----------------------------
7905 procedure Set_Predicate_Function (Id : E; V : E) is
7909 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7911 S := Subprograms_For_Type (Id);
7912 Set_Subprograms_For_Type (Id, V);
7913 Set_Subprograms_For_Type (V, S);
7915 while Present (S) loop
7916 if Is_Predicate_Function (S) then
7917 raise Program_Error;
7919 S := Subprograms_For_Type (S);
7922 end Set_Predicate_Function;
7924 ------------------------------
7925 -- Set_Predicate_Function_M --
7926 ------------------------------
7928 procedure Set_Predicate_Function_M (Id : E; V : E) is
7932 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7934 S := Subprograms_For_Type (Id);
7935 Set_Subprograms_For_Type (Id, V);
7936 Set_Subprograms_For_Type (V, S);
7938 -- Check for duplicates
7940 while Present (S) loop
7941 if Is_Predicate_Function_M (S) then
7942 raise Program_Error;
7944 S := Subprograms_For_Type (S);
7947 end Set_Predicate_Function_M;
7953 function Size_Clause (Id : E) return N is
7955 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7958 ------------------------
7959 -- Stream_Size_Clause --
7960 ------------------------
7962 function Stream_Size_Clause (Id : E) return N is
7964 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7965 end Stream_Size_Clause;
7971 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7977 Kind := E_Access_Subtype;
7981 Kind := E_Array_Subtype;
7983 when E_Class_Wide_Type |
7984 E_Class_Wide_Subtype =>
7985 Kind := E_Class_Wide_Subtype;
7987 when E_Decimal_Fixed_Point_Type |
7988 E_Decimal_Fixed_Point_Subtype =>
7989 Kind := E_Decimal_Fixed_Point_Subtype;
7991 when E_Ordinary_Fixed_Point_Type |
7992 E_Ordinary_Fixed_Point_Subtype =>
7993 Kind := E_Ordinary_Fixed_Point_Subtype;
7995 when E_Private_Type |
7996 E_Private_Subtype =>
7997 Kind := E_Private_Subtype;
7999 when E_Limited_Private_Type |
8000 E_Limited_Private_Subtype =>
8001 Kind := E_Limited_Private_Subtype;
8003 when E_Record_Type_With_Private |
8004 E_Record_Subtype_With_Private =>
8005 Kind := E_Record_Subtype_With_Private;
8007 when E_Record_Type |
8009 Kind := E_Record_Subtype;
8011 when E_String_Type |
8013 Kind := E_String_Subtype;
8015 when Enumeration_Kind =>
8016 Kind := E_Enumeration_Subtype;
8019 Kind := E_Floating_Point_Subtype;
8021 when Signed_Integer_Kind =>
8022 Kind := E_Signed_Integer_Subtype;
8024 when Modular_Integer_Kind =>
8025 Kind := E_Modular_Integer_Subtype;
8027 when Protected_Kind =>
8028 Kind := E_Protected_Subtype;
8031 Kind := E_Task_Subtype;
8035 raise Program_Error;
8041 ---------------------
8042 -- Type_High_Bound --
8043 ---------------------
8045 function Type_High_Bound (Id : E) return Node_Id is
8046 Rng : constant Node_Id := Scalar_Range (Id);
8048 if Nkind (Rng) = N_Subtype_Indication then
8049 return High_Bound (Range_Expression (Constraint (Rng)));
8051 return High_Bound (Rng);
8053 end Type_High_Bound;
8055 --------------------
8056 -- Type_Low_Bound --
8057 --------------------
8059 function Type_Low_Bound (Id : E) return Node_Id is
8060 Rng : constant Node_Id := Scalar_Range (Id);
8062 if Nkind (Rng) = N_Subtype_Indication then
8063 return Low_Bound (Range_Expression (Constraint (Rng)));
8065 return Low_Bound (Rng);
8069 ---------------------
8070 -- Underlying_Type --
8071 ---------------------
8073 function Underlying_Type (Id : E) return E is
8075 -- For record_with_private the underlying type is always the direct
8076 -- full view. Never try to take the full view of the parent it
8077 -- doesn't make sense.
8079 if Ekind (Id) = E_Record_Type_With_Private then
8080 return Full_View (Id);
8082 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8084 -- If we have an incomplete or private type with a full view,
8085 -- then we return the Underlying_Type of this full view
8087 if Present (Full_View (Id)) then
8088 if Id = Full_View (Id) then
8090 -- Previous error in declaration
8095 return Underlying_Type (Full_View (Id));
8098 -- If we have an incomplete entity that comes from the limited
8099 -- view then we return the Underlying_Type of its non-limited
8102 elsif From_Limited_With (Id)
8103 and then Present (Non_Limited_View (Id))
8105 return Underlying_Type (Non_Limited_View (Id));
8107 -- Otherwise check for the case where we have a derived type or
8108 -- subtype, and if so get the Underlying_Type of the parent type.
8110 elsif Etype (Id) /= Id then
8111 return Underlying_Type (Etype (Id));
8113 -- Otherwise we have an incomplete or private type that has
8114 -- no full view, which means that we have not encountered the
8115 -- completion, so return Empty to indicate the underlying type
8116 -- is not yet known.
8122 -- For non-incomplete, non-private types, return the type itself
8123 -- Also for entities that are not types at all return the entity
8129 end Underlying_Type;
8135 function Vax_Float (Id : E) return B is
8137 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8140 ------------------------
8141 -- Write_Entity_Flags --
8142 ------------------------
8144 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8146 procedure W (Flag_Name : String; Flag : Boolean);
8147 -- Write out given flag if it is set
8153 procedure W (Flag_Name : String; Flag : Boolean) is
8157 Write_Str (Flag_Name);
8158 Write_Str (" = True");
8163 -- Start of processing for Write_Entity_Flags
8166 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8167 and then Is_Base_Type (Id)
8170 Write_Str ("Component_Alignment = ");
8172 case Component_Alignment (Id) is
8173 when Calign_Default =>
8174 Write_Str ("Calign_Default");
8176 when Calign_Component_Size =>
8177 Write_Str ("Calign_Component_Size");
8179 when Calign_Component_Size_4 =>
8180 Write_Str ("Calign_Component_Size_4");
8182 when Calign_Storage_Unit =>
8183 Write_Str ("Calign_Storage_Unit");
8189 W ("Address_Taken", Flag104 (Id));
8190 W ("Body_Needed_For_SAL", Flag40 (Id));
8191 W ("C_Pass_By_Copy", Flag125 (Id));
8192 W ("Can_Never_Be_Null", Flag38 (Id));
8193 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8194 W ("Debug_Info_Off", Flag166 (Id));
8195 W ("Default_Expressions_Processed", Flag108 (Id));
8196 W ("Delay_Cleanups", Flag114 (Id));
8197 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8198 W ("Depends_On_Private", Flag14 (Id));
8199 W ("Discard_Names", Flag88 (Id));
8200 W ("Elaboration_Entity_Required", Flag174 (Id));
8201 W ("Elaborate_Body_Desirable", Flag210 (Id));
8202 W ("Entry_Accepted", Flag152 (Id));
8203 W ("Can_Use_Internal_Rep", Flag229 (Id));
8204 W ("Finalize_Storage_Only", Flag158 (Id));
8205 W ("From_Limited_With", Flag159 (Id));
8206 W ("Has_Aliased_Components", Flag135 (Id));
8207 W ("Has_Alignment_Clause", Flag46 (Id));
8208 W ("Has_All_Calls_Remote", Flag79 (Id));
8209 W ("Has_Anonymous_Master", Flag253 (Id));
8210 W ("Has_Atomic_Components", Flag86 (Id));
8211 W ("Has_Biased_Representation", Flag139 (Id));
8212 W ("Has_Completion", Flag26 (Id));
8213 W ("Has_Completion_In_Body", Flag71 (Id));
8214 W ("Has_Complex_Representation", Flag140 (Id));
8215 W ("Has_Component_Size_Clause", Flag68 (Id));
8216 W ("Has_Contiguous_Rep", Flag181 (Id));
8217 W ("Has_Controlled_Component", Flag43 (Id));
8218 W ("Has_Controlling_Result", Flag98 (Id));
8219 W ("Has_Convention_Pragma", Flag119 (Id));
8220 W ("Has_Default_Aspect", Flag39 (Id));
8221 W ("Has_Delayed_Aspects", Flag200 (Id));
8222 W ("Has_Delayed_Freeze", Flag18 (Id));
8223 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8224 W ("Has_Discriminants", Flag5 (Id));
8225 W ("Has_Dispatch_Table", Flag220 (Id));
8226 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8227 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8228 W ("Has_Exit", Flag47 (Id));
8229 W ("Has_Forward_Instantiation", Flag175 (Id));
8230 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8231 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8232 W ("Has_Homonym", Flag56 (Id));
8233 W ("Has_Implicit_Dereference", Flag251 (Id));
8234 W ("Has_Independent_Components", Flag34 (Id));
8235 W ("Has_Inheritable_Invariants", Flag248 (Id));
8236 W ("Has_Initial_Value", Flag219 (Id));
8237 W ("Has_Invariants", Flag232 (Id));
8238 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8239 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8240 W ("Has_Master_Entity", Flag21 (Id));
8241 W ("Has_Missing_Return", Flag142 (Id));
8242 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8243 W ("Has_Non_Standard_Rep", Flag75 (Id));
8244 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8245 W ("Has_Object_Size_Clause", Flag172 (Id));
8246 W ("Has_Per_Object_Constraint", Flag154 (Id));
8247 W ("Has_Postconditions", Flag240 (Id));
8248 W ("Has_Pragma_Controlled", Flag27 (Id));
8249 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8250 W ("Has_Pragma_Inline", Flag157 (Id));
8251 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8252 W ("Has_Pragma_No_Inline", Flag201 (Id));
8253 W ("Has_Pragma_Ordered", Flag198 (Id));
8254 W ("Has_Pragma_Pack", Flag121 (Id));
8255 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8256 W ("Has_Pragma_Pure", Flag203 (Id));
8257 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8258 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8259 W ("Has_Pragma_Unmodified", Flag233 (Id));
8260 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8261 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8262 W ("Has_Predicates", Flag250 (Id));
8263 W ("Has_Primitive_Operations", Flag120 (Id));
8264 W ("Has_Private_Ancestor", Flag151 (Id));
8265 W ("Has_Private_Declaration", Flag155 (Id));
8266 W ("Has_Protected", Flag271 (Id));
8267 W ("Has_Qualified_Name", Flag161 (Id));
8268 W ("Has_RACW", Flag214 (Id));
8269 W ("Has_Record_Rep_Clause", Flag65 (Id));
8270 W ("Has_Recursive_Call", Flag143 (Id));
8271 W ("Has_Shift_Operator", Flag267 (Id));
8272 W ("Has_Size_Clause", Flag29 (Id));
8273 W ("Has_Small_Clause", Flag67 (Id));
8274 W ("Has_Specified_Layout", Flag100 (Id));
8275 W ("Has_Specified_Stream_Input", Flag190 (Id));
8276 W ("Has_Specified_Stream_Output", Flag191 (Id));
8277 W ("Has_Specified_Stream_Read", Flag192 (Id));
8278 W ("Has_Specified_Stream_Write", Flag193 (Id));
8279 W ("Has_Static_Discriminants", Flag211 (Id));
8280 W ("Has_Static_Predicate", Flag269 (Id));
8281 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8282 W ("Has_Storage_Size_Clause", Flag23 (Id));
8283 W ("Has_Stream_Size_Clause", Flag184 (Id));
8284 W ("Has_Task", Flag30 (Id));
8285 W ("Has_Thunks", Flag228 (Id));
8286 W ("Has_Unchecked_Union", Flag123 (Id));
8287 W ("Has_Unknown_Discriminants", Flag72 (Id));
8288 W ("Has_Up_Level_Access", Flag215 (Id));
8289 W ("Has_Visible_Refinement", Flag263 (Id));
8290 W ("Has_Volatile_Components", Flag87 (Id));
8291 W ("Has_Xref_Entry", Flag182 (Id));
8292 W ("In_Package_Body", Flag48 (Id));
8293 W ("In_Private_Part", Flag45 (Id));
8294 W ("In_Use", Flag8 (Id));
8295 W ("Is_AST_Entry", Flag132 (Id));
8296 W ("Is_Abstract_Subprogram", Flag19 (Id));
8297 W ("Is_Abstract_Type", Flag146 (Id));
8298 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8299 W ("Is_Access_Constant", Flag69 (Id));
8300 W ("Is_Ada_2005_Only", Flag185 (Id));
8301 W ("Is_Ada_2012_Only", Flag199 (Id));
8302 W ("Is_Aliased", Flag15 (Id));
8303 W ("Is_Asynchronous", Flag81 (Id));
8304 W ("Is_Atomic", Flag85 (Id));
8305 W ("Is_Bit_Packed_Array", Flag122 (Id));
8306 W ("Is_CPP_Class", Flag74 (Id));
8307 W ("Is_Called", Flag102 (Id));
8308 W ("Is_Character_Type", Flag63 (Id));
8309 W ("Is_Child_Unit", Flag73 (Id));
8310 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8311 W ("Is_Compilation_Unit", Flag149 (Id));
8312 W ("Is_Completely_Hidden", Flag103 (Id));
8313 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8314 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8315 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8316 W ("Is_Constrained", Flag12 (Id));
8317 W ("Is_Constructor", Flag76 (Id));
8318 W ("Is_Controlled", Flag42 (Id));
8319 W ("Is_Controlling_Formal", Flag97 (Id));
8320 W ("Is_Descendent_Of_Address", Flag223 (Id));
8321 W ("Is_Discrim_SO_Function", Flag176 (Id));
8322 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8323 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8324 W ("Is_Dispatching_Operation", Flag6 (Id));
8325 W ("Is_Eliminated", Flag124 (Id));
8326 W ("Is_Entry_Formal", Flag52 (Id));
8327 W ("Is_Exported", Flag99 (Id));
8328 W ("Is_First_Subtype", Flag70 (Id));
8329 W ("Is_For_Access_Subtype", Flag118 (Id));
8330 W ("Is_Formal_Subprogram", Flag111 (Id));
8331 W ("Is_Frozen", Flag4 (Id));
8332 W ("Is_Generic_Actual_Type", Flag94 (Id));
8333 W ("Is_Generic_Instance", Flag130 (Id));
8334 W ("Is_Generic_Type", Flag13 (Id));
8335 W ("Is_Hidden", Flag57 (Id));
8336 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8337 W ("Is_Immediately_Visible", Flag7 (Id));
8338 W ("Is_Implementation_Defined", Flag254 (Id));
8339 W ("Is_Imported", Flag24 (Id));
8340 W ("Is_Independent", Flag268 (Id));
8341 W ("Is_Inlined", Flag11 (Id));
8342 W ("Is_Instantiated", Flag126 (Id));
8343 W ("Is_Interface", Flag186 (Id));
8344 W ("Is_Internal", Flag17 (Id));
8345 W ("Is_Interrupt_Handler", Flag89 (Id));
8346 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8347 W ("Is_Invariant_Procedure", Flag257 (Id));
8348 W ("Is_Itype", Flag91 (Id));
8349 W ("Is_Known_Non_Null", Flag37 (Id));
8350 W ("Is_Known_Null", Flag204 (Id));
8351 W ("Is_Known_Valid", Flag170 (Id));
8352 W ("Is_Limited_Composite", Flag106 (Id));
8353 W ("Is_Limited_Interface", Flag197 (Id));
8354 W ("Is_Limited_Record", Flag25 (Id));
8355 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8356 W ("Is_Non_Static_Subtype", Flag109 (Id));
8357 W ("Is_Null_Init_Proc", Flag178 (Id));
8358 W ("Is_Obsolescent", Flag153 (Id));
8359 W ("Is_Only_Out_Parameter", Flag226 (Id));
8360 W ("Is_Optional_Parameter", Flag134 (Id));
8361 W ("Is_Package_Body_Entity", Flag160 (Id));
8362 W ("Is_Packed", Flag51 (Id));
8363 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8364 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8365 W ("Is_Predicate_Function", Flag255 (Id));
8366 W ("Is_Predicate_Function_M", Flag256 (Id));
8367 W ("Is_Preelaborated", Flag59 (Id));
8368 W ("Is_Primitive", Flag218 (Id));
8369 W ("Is_Primitive_Wrapper", Flag195 (Id));
8370 W ("Is_Private_Composite", Flag107 (Id));
8371 W ("Is_Private_Descendant", Flag53 (Id));
8372 W ("Is_Private_Primitive", Flag245 (Id));
8373 W ("Is_Processed_Transient", Flag252 (Id));
8374 W ("Is_Public", Flag10 (Id));
8375 W ("Is_Pure", Flag44 (Id));
8376 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8377 W ("Is_RACW_Stub_Type", Flag244 (Id));
8378 W ("Is_Raised", Flag224 (Id));
8379 W ("Is_Remote_Call_Interface", Flag62 (Id));
8380 W ("Is_Remote_Types", Flag61 (Id));
8381 W ("Is_Renaming_Of_Object", Flag112 (Id));
8382 W ("Is_Return_Object", Flag209 (Id));
8383 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8384 W ("Is_Shared_Passive", Flag60 (Id));
8385 W ("Is_Statically_Allocated", Flag28 (Id));
8386 W ("Is_Tag", Flag78 (Id));
8387 W ("Is_Tagged_Type", Flag55 (Id));
8388 W ("Is_Thunk", Flag225 (Id));
8389 W ("Is_Trivial_Subprogram", Flag235 (Id));
8390 W ("Is_True_Constant", Flag163 (Id));
8391 W ("Is_Unchecked_Union", Flag117 (Id));
8392 W ("Is_Underlying_Record_View", Flag246 (Id));
8393 W ("Is_Unsigned_Type", Flag144 (Id));
8394 W ("Is_VMS_Exception", Flag133 (Id));
8395 W ("Is_Valued_Procedure", Flag127 (Id));
8396 W ("Is_Visible_Formal", Flag206 (Id));
8397 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8398 W ("Is_Volatile", Flag16 (Id));
8399 W ("Itype_Printed", Flag202 (Id));
8400 W ("Kill_Elaboration_Checks", Flag32 (Id));
8401 W ("Kill_Range_Checks", Flag33 (Id));
8402 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8403 W ("Low_Bound_Tested", Flag205 (Id));
8404 W ("Machine_Radix_10", Flag84 (Id));
8405 W ("Materialize_Entity", Flag168 (Id));
8406 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8407 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8408 W ("Must_Have_Preelab_Init", Flag208 (Id));
8409 W ("Needs_Debug_Info", Flag147 (Id));
8410 W ("Needs_No_Actuals", Flag22 (Id));
8411 W ("Never_Set_In_Source", Flag115 (Id));
8412 W ("No_Pool_Assigned", Flag131 (Id));
8413 W ("No_Return", Flag113 (Id));
8414 W ("No_Strict_Aliasing", Flag136 (Id));
8415 W ("Non_Binary_Modulus", Flag58 (Id));
8416 W ("Nonzero_Is_True", Flag162 (Id));
8417 W ("OK_To_Rename", Flag247 (Id));
8418 W ("OK_To_Reorder_Components", Flag239 (Id));
8419 W ("Optimize_Alignment_Space", Flag241 (Id));
8420 W ("Optimize_Alignment_Time", Flag242 (Id));
8421 W ("Overlays_Constant", Flag243 (Id));
8422 W ("Reachable", Flag49 (Id));
8423 W ("Referenced", Flag156 (Id));
8424 W ("Referenced_As_LHS", Flag36 (Id));
8425 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8426 W ("Renamed_In_Spec", Flag231 (Id));
8427 W ("Requires_Overriding", Flag213 (Id));
8428 W ("Return_Present", Flag54 (Id));
8429 W ("Returns_By_Ref", Flag90 (Id));
8430 W ("Reverse_Bit_Order", Flag164 (Id));
8431 W ("Reverse_Storage_Order", Flag93 (Id));
8432 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8433 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8434 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8435 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8436 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8437 W ("Static_Elaboration_Desired", Flag77 (Id));
8438 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8439 W ("Strict_Alignment", Flag145 (Id));
8440 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8441 W ("Suppress_Initialization", Flag105 (Id));
8442 W ("Suppress_Style_Checks", Flag165 (Id));
8443 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8444 W ("Treat_As_Volatile", Flag41 (Id));
8445 W ("Universal_Aliasing", Flag216 (Id));
8446 W ("Used_As_Generic_Actual", Flag222 (Id));
8447 W ("Uses_Sec_Stack", Flag95 (Id));
8448 W ("Warnings_Off", Flag96 (Id));
8449 W ("Warnings_Off_Used", Flag236 (Id));
8450 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8451 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8452 W ("Was_Hidden", Flag196 (Id));
8453 end Write_Entity_Flags;
8455 -----------------------
8456 -- Write_Entity_Info --
8457 -----------------------
8459 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8461 procedure Write_Attribute (Which : String; Nam : E);
8462 -- Write attribute value with given string name
8464 procedure Write_Kind (Id : Entity_Id);
8465 -- Write Ekind field of entity
8467 ---------------------
8468 -- Write_Attribute --
8469 ---------------------
8471 procedure Write_Attribute (Which : String; Nam : E) is
8475 Write_Int (Int (Nam));
8477 Write_Name (Chars (Nam));
8479 end Write_Attribute;
8485 procedure Write_Kind (Id : Entity_Id) is
8486 K : constant String := Entity_Kind'Image (Ekind (Id));
8490 Write_Str (" Kind ");
8492 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8493 Write_Str ("TAGGED ");
8496 Write_Str (K (3 .. K'Length));
8499 if Is_Type (Id) and then Depends_On_Private (Id) then
8500 Write_Str ("Depends_On_Private ");
8504 -- Start of processing for Write_Entity_Info
8508 Write_Attribute ("Name ", Id);
8509 Write_Int (Int (Id));
8513 Write_Attribute (" Type ", Etype (Id));
8515 Write_Attribute (" Scope ", Scope (Id));
8520 when Discrete_Kind =>
8521 Write_Str ("Bounds: Id = ");
8523 if Present (Scalar_Range (Id)) then
8524 Write_Int (Int (Type_Low_Bound (Id)));
8525 Write_Str (" .. Id = ");
8526 Write_Int (Int (Type_High_Bound (Id)));
8528 Write_Str ("Empty");
8539 (" Component Type ", Component_Type (Id));
8542 Write_Str (" Indexes ");
8544 Index := First_Index (Id);
8545 while Present (Index) loop
8546 Write_Attribute (" ", Etype (Index));
8547 Index := Next_Index (Index);
8555 (" Directly Designated Type ",
8556 Directly_Designated_Type (Id));
8559 when Overloadable_Kind =>
8560 if Present (Homonym (Id)) then
8561 Write_Str (" Homonym ");
8562 Write_Name (Chars (Homonym (Id)));
8564 Write_Int (Int (Homonym (Id)));
8571 if Ekind (Scope (Id)) in Record_Kind then
8573 " Original_Record_Component ",
8574 Original_Record_Component (Id));
8575 Write_Int (Int (Original_Record_Component (Id)));
8579 when others => null;
8581 end Write_Entity_Info;
8583 -----------------------
8584 -- Write_Field6_Name --
8585 -----------------------
8587 procedure Write_Field6_Name (Id : Entity_Id) is
8588 pragma Warnings (Off, Id);
8590 Write_Str ("First_Rep_Item");
8591 end Write_Field6_Name;
8593 -----------------------
8594 -- Write_Field7_Name --
8595 -----------------------
8597 procedure Write_Field7_Name (Id : Entity_Id) is
8598 pragma Warnings (Off, Id);
8600 Write_Str ("Freeze_Node");
8601 end Write_Field7_Name;
8603 -----------------------
8604 -- Write_Field8_Name --
8605 -----------------------
8607 procedure Write_Field8_Name (Id : Entity_Id) is
8611 Write_Str ("Associated_Node_For_Itype");
8614 Write_Str ("Dependent_Instances");
8617 Write_Str ("First_Exit_Statement");
8620 Write_Str ("Hiding_Loop_Variable");
8624 E_Subprogram_Body =>
8625 Write_Str ("Mechanism");
8629 Write_Str ("Normalized_First_Bit");
8632 Write_Str ("Postcondition_Proc");
8634 when E_Abstract_State =>
8635 Write_Str ("Refinement_Constituents");
8637 when E_Return_Statement =>
8638 Write_Str ("Return_Applies_To");
8641 Write_Str ("Field8??");
8643 end Write_Field8_Name;
8645 -----------------------
8646 -- Write_Field9_Name --
8647 -----------------------
8649 procedure Write_Field9_Name (Id : Entity_Id) is
8653 Write_Str ("Class_Wide_Type");
8656 Write_Str ("Current_Value");
8658 when E_Abstract_State =>
8659 Write_Str ("Part_Of_Constituents");
8662 E_Generic_Function |
8664 E_Generic_Procedure |
8667 Write_Str ("Renaming_Map");
8670 Write_Str ("Field9??");
8672 end Write_Field9_Name;
8674 ------------------------
8675 -- Write_Field10_Name --
8676 ------------------------
8678 procedure Write_Field10_Name (Id : Entity_Id) is
8681 when E_Abstract_State |
8683 Write_Str ("Encapsulating_State");
8685 when Class_Wide_Kind |
8691 Write_Str ("Direct_Primitive_Operations");
8694 Write_Str ("Float_Rep");
8696 when E_In_Parameter |
8698 Write_Str ("Discriminal_Link");
8704 Write_Str ("Handler_Records");
8708 Write_Str ("Normalized_Position_Max");
8711 Write_Str ("Field10??");
8713 end Write_Field10_Name;
8715 ------------------------
8716 -- Write_Field11_Name --
8717 ------------------------
8719 procedure Write_Field11_Name (Id : Entity_Id) is
8723 Write_Str ("Block_Node");
8727 Write_Str ("Component_Bit_Offset");
8730 Write_Str ("Entry_Component");
8732 when E_Enumeration_Literal =>
8733 Write_Str ("Enumeration_Pos");
8737 Write_Str ("Full_View");
8739 when E_Generic_Package =>
8740 Write_Str ("Generic_Homonym");
8746 Write_Str ("Protected_Body_Subprogram");
8749 Write_Str ("Field11??");
8751 end Write_Field11_Name;
8753 ------------------------
8754 -- Write_Field12_Name --
8755 ------------------------
8757 procedure Write_Field12_Name (Id : Entity_Id) is
8761 Write_Str ("Associated_Formal_Package");
8764 Write_Str ("Barrier_Function");
8766 when E_Enumeration_Literal =>
8767 Write_Str ("Enumeration_Rep");
8775 E_In_Out_Parameter |
8779 Write_Str ("Esize");
8783 Write_Str ("Next_Inlined_Subprogram");
8786 Write_Str ("Field12??");
8788 end Write_Field12_Name;
8790 ------------------------
8791 -- Write_Field13_Name --
8792 ------------------------
8794 procedure Write_Field13_Name (Id : Entity_Id) is
8799 Write_Str ("Component_Clause");
8802 Write_Str ("Elaboration_Entity");
8806 Generic_Unit_Kind =>
8807 Write_Str ("Elaboration_Entity");
8811 Write_Str ("Extra_Accessibility");
8814 Write_Str ("RM_Size");
8817 Write_Str ("Field13??");
8819 end Write_Field13_Name;
8821 -----------------------
8822 -- Write_Field14_Name --
8823 -----------------------
8825 procedure Write_Field14_Name (Id : Entity_Id) is
8834 Write_Str ("Alignment");
8838 Write_Str ("First_Optional_Parameter");
8842 Write_Str ("Normalized_Position");
8845 E_Generic_Package =>
8846 Write_Str ("Shadow_Entities");
8849 Write_Str ("Field14??");
8851 end Write_Field14_Name;
8853 ------------------------
8854 -- Write_Field15_Name --
8855 ------------------------
8857 procedure Write_Field15_Name (Id : Entity_Id) is
8860 when E_Discriminant =>
8861 Write_Str ("Discriminant_Number");
8864 Write_Str ("DT_Entry_Count");
8868 Write_Str ("DT_Position");
8870 when E_Protected_Type =>
8871 Write_Str ("Entry_Bodies_Array");
8874 Write_Str ("Entry_Parameters_Type");
8877 Write_Str ("Extra_Formal");
8879 when Enumeration_Kind =>
8880 Write_Str ("Lit_Indexes");
8884 Write_Str ("Related_Instance");
8886 when Decimal_Fixed_Point_Kind =>
8887 Write_Str ("Scale_Value");
8891 Write_Str ("Status_Flag_Or_Transient_Decl");
8895 Write_Str ("Storage_Size_Variable");
8897 when E_String_Literal_Subtype =>
8898 Write_Str ("String_Literal_Low_Bound");
8901 Write_Str ("Field15??");
8903 end Write_Field15_Name;
8905 ------------------------
8906 -- Write_Field16_Name --
8907 ------------------------
8909 procedure Write_Field16_Name (Id : Entity_Id) is
8912 when E_Record_Type |
8913 E_Record_Type_With_Private =>
8914 Write_Str ("Access_Disp_Table");
8916 when E_Abstract_State =>
8917 Write_Str ("Body_References");
8919 when E_Record_Subtype |
8920 E_Class_Wide_Subtype =>
8921 Write_Str ("Cloned_Subtype");
8925 Write_Str ("DTC_Entity");
8928 Write_Str ("Entry_Formal");
8933 Write_Str ("First_Private_Entity");
8935 when Enumeration_Kind =>
8936 Write_Str ("Lit_Strings");
8938 when E_String_Literal_Subtype =>
8939 Write_Str ("String_Literal_Length");
8943 Write_Str ("Unset_Reference");
8946 Write_Str ("Field16??");
8948 end Write_Field16_Name;
8950 ------------------------
8951 -- Write_Field17_Name --
8952 ------------------------
8954 procedure Write_Field17_Name (Id : Entity_Id) is
8959 E_Generic_In_Out_Parameter |
8961 Write_Str ("Actual_Subtype");
8964 Write_Str ("Digits_Value");
8966 when E_Discriminant =>
8967 Write_Str ("Discriminal");
8976 E_Generic_Function |
8978 E_Generic_Procedure |
8986 E_Return_Statement |
8988 E_Subprogram_Type =>
8989 Write_Str ("First_Entity");
8992 Write_Str ("First_Index");
8994 when Enumeration_Kind =>
8995 Write_Str ("First_Literal");
8998 Write_Str ("Master_Id");
9000 when Modular_Integer_Kind =>
9001 Write_Str ("Modulus");
9003 when E_Abstract_State |
9004 E_Incomplete_Type =>
9005 Write_Str ("Non_Limited_View");
9007 when E_Incomplete_Subtype =>
9008 if From_Limited_With (Id) then
9009 Write_Str ("Non_Limited_View");
9013 Write_Str ("Prival");
9016 Write_Str ("Field17??");
9018 end Write_Field17_Name;
9020 ------------------------
9021 -- Write_Field18_Name --
9022 ------------------------
9024 procedure Write_Field18_Name (Id : Entity_Id) is
9027 when E_Enumeration_Literal |
9031 Write_Str ("Alias");
9033 when E_Record_Type =>
9034 Write_Str ("Corresponding_Concurrent_Type");
9036 when E_Subprogram_Body =>
9037 Write_Str ("Corresponding_Protected_Entry");
9039 when Concurrent_Kind =>
9040 Write_Str ("Corresponding_Record_Type");
9045 Write_Str ("Enclosing_Scope");
9047 when E_Entry_Index_Parameter =>
9048 Write_Str ("Entry_Index_Constant");
9050 when E_Class_Wide_Subtype |
9051 E_Access_Protected_Subprogram_Type |
9052 E_Anonymous_Access_Protected_Subprogram_Type |
9053 E_Access_Subprogram_Type |
9055 Write_Str ("Equivalent_Type");
9057 when Fixed_Point_Kind =>
9058 Write_Str ("Delta_Value");
9060 when Incomplete_Or_Private_Kind |
9062 Write_Str ("Private_Dependents");
9065 Write_Str ("Renamed_Object");
9069 E_Generic_Function |
9070 E_Generic_Procedure |
9071 E_Generic_Package =>
9072 Write_Str ("Renamed_Entity");
9075 Write_Str ("Field18??");
9077 end Write_Field18_Name;
9079 -----------------------
9080 -- Write_Field19_Name --
9081 -----------------------
9083 procedure Write_Field19_Name (Id : Entity_Id) is
9087 E_Generic_Package =>
9088 Write_Str ("Body_Entity");
9090 when E_Discriminant =>
9091 Write_Str ("Corresponding_Discriminant");
9094 Write_Str ("Default_Aspect_Value");
9096 when E_Array_Type =>
9097 Write_Str ("Default_Component_Value");
9099 when E_Record_Type =>
9100 Write_Str ("Parent_Subtype");
9104 Write_Str ("Size_Check_Code");
9106 when E_Package_Body |
9108 Write_Str ("Spec_Entity");
9110 when Private_Kind =>
9111 Write_Str ("Underlying_Full_View");
9113 when E_Function | E_Operator | E_Subprogram_Type =>
9114 Write_Str ("Extra_Accessibility_Of_Result");
9117 Write_Str ("Field19??");
9119 end Write_Field19_Name;
9121 -----------------------
9122 -- Write_Field20_Name --
9123 -----------------------
9125 procedure Write_Field20_Name (Id : Entity_Id) is
9129 Write_Str ("Component_Type");
9131 when E_In_Parameter |
9132 E_Generic_In_Parameter =>
9133 Write_Str ("Default_Value");
9136 Write_Str ("Directly_Designated_Type");
9139 Write_Str ("Discriminant_Checking_Func");
9141 when E_Discriminant =>
9142 Write_Str ("Discriminant_Default_Value");
9151 E_Generic_Function |
9153 E_Generic_Procedure |
9161 E_Return_Statement |
9163 E_Subprogram_Type =>
9164 Write_Str ("Last_Entity");
9168 Write_Str ("Prival_Link");
9171 Write_Str ("Scalar_Range");
9174 Write_Str ("Register_Exception_Call");
9177 Write_Str ("Field20??");
9179 end Write_Field20_Name;
9181 -----------------------
9182 -- Write_Field21_Name --
9183 -----------------------
9185 procedure Write_Field21_Name (Id : Entity_Id) is
9189 Write_Str ("Accept_Address");
9191 when E_In_Parameter =>
9192 Write_Str ("Default_Expr_Function");
9194 when Concurrent_Kind |
9195 Incomplete_Or_Private_Kind |
9199 Write_Str ("Discriminant_Constraint");
9204 E_Generic_Function |
9206 E_Generic_Procedure |
9208 Write_Str ("Interface_Name");
9211 Modular_Integer_Kind =>
9212 Write_Str ("Original_Array_Type");
9214 when Fixed_Point_Kind =>
9215 Write_Str ("Small_Value");
9218 Write_Str ("Field21??");
9220 end Write_Field21_Name;
9222 -----------------------
9223 -- Write_Field22_Name --
9224 -----------------------
9226 procedure Write_Field22_Name (Id : Entity_Id) is
9230 Write_Str ("Associated_Storage_Pool");
9233 Write_Str ("Component_Size");
9235 when E_Record_Type =>
9236 Write_Str ("Corresponding_Remote_Type");
9240 Write_Str ("Original_Record_Component");
9242 when E_Enumeration_Literal =>
9243 Write_Str ("Enumeration_Rep_Expr");
9246 Write_Str ("Exception_Code");
9248 when E_Record_Type_With_Private |
9249 E_Record_Subtype_With_Private |
9252 E_Limited_Private_Type |
9253 E_Limited_Private_Subtype =>
9254 Write_Str ("Private_View");
9257 Write_Str ("Protected_Formal");
9267 E_Generic_Function |
9268 E_Generic_Procedure |
9271 E_Return_Statement |
9274 Write_Str ("Scope_Depth_Value");
9277 Write_Str ("Shared_Var_Procs_Instance");
9280 Write_Str ("Field22??");
9282 end Write_Field22_Name;
9284 ------------------------
9285 -- Write_Field23_Name --
9286 ------------------------
9288 procedure Write_Field23_Name (Id : Entity_Id) is
9291 when E_Discriminant =>
9292 Write_Str ("CR_Discriminant");
9295 Write_Str ("Entry_Cancel_Parameter");
9297 when E_Enumeration_Type =>
9298 Write_Str ("Enum_Pos_To_Rep");
9302 Write_Str ("Extra_Constrained");
9305 Write_Str ("Finalization_Master");
9307 when E_Generic_Function |
9309 E_Generic_Procedure =>
9310 Write_Str ("Inner_Instances");
9313 Write_Str ("Packed_Array_Impl_Type");
9316 Write_Str ("Protection_Object");
9318 when Concurrent_Kind |
9319 Incomplete_Or_Private_Kind |
9323 Write_Str ("Stored_Constraint");
9327 if Present (Scope (Id))
9328 and then Is_Protected_Type (Scope (Id))
9330 Write_Str ("Protection_Object");
9332 Write_Str ("Generic_Renamings");
9336 if Is_Generic_Instance (Id) then
9337 Write_Str ("Generic_Renamings");
9339 Write_Str ("Limited_View");
9343 Write_Str ("Field23??");
9345 end Write_Field23_Name;
9347 ------------------------
9348 -- Write_Field24_Name --
9349 ------------------------
9351 procedure Write_Field24_Name (Id : Entity_Id) is
9357 Write_Str ("Related_Expression");
9360 Write_Str ("Field24???");
9362 end Write_Field24_Name;
9364 ------------------------
9365 -- Write_Field25_Name --
9366 ------------------------
9368 procedure Write_Field25_Name (Id : Entity_Id) is
9371 when E_Generic_Package |
9373 Write_Str ("Abstract_States");
9376 Write_Str ("Debug_Renaming_Link");
9379 Write_Str ("DT_Offset_To_Top_Func");
9383 Write_Str ("Interface_Alias");
9385 when E_Record_Type |
9387 E_Record_Type_With_Private |
9388 E_Record_Subtype_With_Private =>
9389 Write_Str ("Interfaces");
9393 Write_Str ("Related_Array_Object");
9396 Write_Str ("Task_Body_Procedure");
9400 Write_Str ("PPC_Wrapper");
9402 when E_Enumeration_Type |
9403 E_Enumeration_Subtype |
9404 E_Modular_Integer_Type |
9405 E_Modular_Integer_Subtype |
9406 E_Signed_Integer_Subtype =>
9407 Write_Str ("Static_Predicate");
9410 Write_Str ("Field25??");
9412 end Write_Field25_Name;
9414 ------------------------
9415 -- Write_Field26_Name --
9416 ------------------------
9418 procedure Write_Field26_Name (Id : Entity_Id) is
9421 when E_Record_Type |
9422 E_Record_Type_With_Private =>
9423 Write_Str ("Dispatch_Table_Wrappers");
9425 when E_In_Out_Parameter |
9428 Write_Str ("Last_Assignment");
9430 when E_Access_Subprogram_Type =>
9431 Write_Str ("Original_Access_Type");
9433 when E_Generic_Package |
9435 Write_Str ("Package_Instantiation");
9439 Write_Str ("Related_Type");
9442 Write_Str ("Relative_Deadline_Variable");
9446 Write_Str ("Overridden_Operation");
9449 Write_Str ("Field26??");
9451 end Write_Field26_Name;
9453 ------------------------
9454 -- Write_Field27_Name --
9455 ------------------------
9457 procedure Write_Field27_Name (Id : Entity_Id) is
9462 Write_Str ("Current_Use_Clause");
9467 Write_Str ("Related_Type");
9471 Write_Str ("Wrapped_Entity");
9474 Write_Str ("Field27??");
9476 end Write_Field27_Name;
9478 ------------------------
9479 -- Write_Field28_Name --
9480 ------------------------
9482 procedure Write_Field28_Name (Id : Entity_Id) is
9490 E_Subprogram_Type =>
9491 Write_Str ("Extra_Formals");
9495 Write_Str ("Finalizer");
9499 Write_Str ("Initialization_Statements");
9501 when E_Record_Type =>
9502 Write_Str ("Underlying_Record_View");
9505 Write_Str ("Field28??");
9507 end Write_Field28_Name;
9509 ------------------------
9510 -- Write_Field29_Name --
9511 ------------------------
9513 procedure Write_Field29_Name (Id : Entity_Id) is
9518 Write_Str ("BIP_Initialization_Call");
9521 Write_Str ("Subprograms_For_Type");
9524 Write_Str ("Field29??");
9526 end Write_Field29_Name;
9528 ------------------------
9529 -- Write_Field30_Name --
9530 ------------------------
9532 procedure Write_Field30_Name (Id : Entity_Id) is
9536 Write_Str ("Corresponding_Equality");
9540 Write_Str ("Last_Aggregate_Assignment");
9543 Write_Str ("Static_Initialization");
9546 Write_Str ("Field30??");
9548 end Write_Field30_Name;
9550 ------------------------
9551 -- Write_Field31_Name --
9552 ------------------------
9554 procedure Write_Field31_Name (Id : Entity_Id) is
9559 Write_Str ("Thunk_Entity");
9562 Write_Str ("Field31??");
9564 end Write_Field31_Name;
9566 ------------------------
9567 -- Write_Field32_Name --
9568 ------------------------
9570 procedure Write_Field32_Name (Id : Entity_Id) is
9574 E_Generic_Function |
9576 E_Generic_Procedure |
9580 E_Subprogram_Body =>
9581 Write_Str ("SPARK_Pragma");
9584 Write_Str ("Field32??");
9586 end Write_Field32_Name;
9588 ------------------------
9589 -- Write_Field33_Name --
9590 ------------------------
9592 procedure Write_Field33_Name (Id : Entity_Id) is
9595 when E_Generic_Package |
9598 Write_Str ("SPARK_Aux_Pragma");
9604 Write_Str ("Linker_Section_Pragma");
9607 Write_Str ("Field33??");
9609 end Write_Field33_Name;
9611 ------------------------
9612 -- Write_Field34_Name --
9613 ------------------------
9615 procedure Write_Field34_Name (Id : Entity_Id) is
9625 Generic_Subprogram_Kind |
9627 Write_Str ("Contract");
9630 Write_Str ("Field34??");
9632 end Write_Field34_Name;
9634 ------------------------
9635 -- Write_Field35_Name --
9636 ------------------------
9638 procedure Write_Field35_Name (Id : Entity_Id) is
9641 when Subprogram_Kind =>
9642 Write_Str ("Import_Pragma");
9644 Write_Str ("Field35??");
9646 end Write_Field35_Name;
9648 -------------------------
9649 -- Iterator Procedures --
9650 -------------------------
9652 procedure Proc_Next_Component (N : in out Node_Id) is
9654 N := Next_Component (N);
9655 end Proc_Next_Component;
9657 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9659 N := Next_Entity (N);
9660 while Present (N) loop
9661 exit when Ekind_In (N, E_Component, E_Discriminant);
9662 N := Next_Entity (N);
9664 end Proc_Next_Component_Or_Discriminant;
9666 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9668 N := Next_Discriminant (N);
9669 end Proc_Next_Discriminant;
9671 procedure Proc_Next_Formal (N : in out Node_Id) is
9673 N := Next_Formal (N);
9674 end Proc_Next_Formal;
9676 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9678 N := Next_Formal_With_Extras (N);
9679 end Proc_Next_Formal_With_Extras;
9681 procedure Proc_Next_Index (N : in out Node_Id) is
9683 N := Next_Index (N);
9684 end Proc_Next_Index;
9686 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9688 N := Next_Inlined_Subprogram (N);
9689 end Proc_Next_Inlined_Subprogram;
9691 procedure Proc_Next_Literal (N : in out Node_Id) is
9693 N := Next_Literal (N);
9694 end Proc_Next_Literal;
9696 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9698 N := Next_Stored_Discriminant (N);
9699 end Proc_Next_Stored_Discriminant;