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_Discrete_Predicate List25
226 -- Static_Real_Or_String_Predicate Node25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Original_Access_Type Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Relative_Deadline_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
242 -- Initialization_Statements Node28
243 -- Underlying_Record_View Node28
245 -- BIP_Initialization_Call Node29
246 -- Subprograms_For_Type Node29
248 -- Corresponding_Equality Node30
249 -- Last_Aggregate_Assignment Node30
250 -- Static_Initialization Node30
252 -- Derived_Type_Link Node31
253 -- Thunk_Entity Node31
255 -- SPARK_Pragma Node32
257 -- Linker_Section_Pragma Node33
258 -- SPARK_Aux_Pragma Node33
262 -- Import_Pragma Node35
264 ---------------------------------------------
265 -- Usage of Flags in Defining Entity Nodes --
266 ---------------------------------------------
268 -- All flags are unique, there is no overlaying, so each flag is physically
269 -- present in every entity. However, for many of the flags, it only makes
270 -- sense for them to be set true for certain subsets of entity kinds. See
271 -- the spec of Einfo for further details.
273 -- Is_Inlined_Always Flag1
275 -- Has_Discriminants Flag5
276 -- Is_Dispatching_Operation Flag6
277 -- Is_Immediately_Visible Flag7
279 -- Is_Potentially_Use_Visible Flag9
283 -- Is_Constrained Flag12
284 -- Is_Generic_Type Flag13
285 -- Depends_On_Private Flag14
287 -- Is_Volatile Flag16
288 -- Is_Internal Flag17
289 -- Has_Delayed_Freeze Flag18
290 -- Is_Abstract_Subprogram Flag19
291 -- Is_Concurrent_Record_Type Flag20
293 -- Has_Master_Entity Flag21
294 -- Needs_No_Actuals Flag22
295 -- Has_Storage_Size_Clause Flag23
296 -- Is_Imported Flag24
297 -- Is_Limited_Record Flag25
298 -- Has_Completion Flag26
299 -- Has_Pragma_Controlled Flag27
300 -- Is_Statically_Allocated Flag28
301 -- Has_Size_Clause Flag29
304 -- Checks_May_Be_Suppressed Flag31
305 -- Kill_Elaboration_Checks Flag32
306 -- Kill_Range_Checks Flag33
307 -- Has_Independent_Components Flag34
308 -- Is_Class_Wide_Equivalent_Type Flag35
309 -- Referenced_As_LHS Flag36
310 -- Is_Known_Non_Null Flag37
311 -- Can_Never_Be_Null Flag38
312 -- Has_Default_Aspect Flag39
313 -- Body_Needed_For_SAL Flag40
315 -- Treat_As_Volatile Flag41
316 -- Is_Controlled Flag42
317 -- Has_Controlled_Component Flag43
319 -- In_Private_Part Flag45
320 -- Has_Alignment_Clause Flag46
322 -- In_Package_Body Flag48
324 -- Delay_Subprogram_Descriptors Flag50
327 -- Is_Entry_Formal Flag52
328 -- Is_Private_Descendant Flag53
329 -- Return_Present Flag54
330 -- Is_Tagged_Type Flag55
331 -- Has_Homonym Flag56
333 -- Non_Binary_Modulus Flag58
334 -- Is_Preelaborated Flag59
335 -- Is_Shared_Passive Flag60
337 -- Is_Remote_Types Flag61
338 -- Is_Remote_Call_Interface Flag62
339 -- Is_Character_Type Flag63
340 -- Is_Intrinsic_Subprogram Flag64
341 -- Has_Record_Rep_Clause Flag65
342 -- Has_Enumeration_Rep_Clause Flag66
343 -- Has_Small_Clause Flag67
344 -- Has_Component_Size_Clause Flag68
345 -- Is_Access_Constant Flag69
346 -- Is_First_Subtype Flag70
348 -- Has_Completion_In_Body Flag71
349 -- Has_Unknown_Discriminants Flag72
350 -- Is_Child_Unit Flag73
351 -- Is_CPP_Class Flag74
352 -- Has_Non_Standard_Rep Flag75
353 -- Is_Constructor Flag76
354 -- Static_Elaboration_Desired Flag77
356 -- Has_All_Calls_Remote Flag79
357 -- Is_Constr_Subt_For_U_Nominal Flag80
359 -- Is_Asynchronous Flag81
360 -- Has_Gigi_Rep_Item Flag82
361 -- Has_Machine_Radix_Clause Flag83
362 -- Machine_Radix_10 Flag84
364 -- Has_Atomic_Components Flag86
365 -- Has_Volatile_Components Flag87
366 -- Discard_Names Flag88
367 -- Is_Interrupt_Handler Flag89
368 -- Returns_By_Ref Flag90
371 -- Size_Known_At_Compile_Time Flag92
372 -- Reverse_Storage_Order Flag93
373 -- Is_Generic_Actual_Type Flag94
374 -- Uses_Sec_Stack Flag95
375 -- Warnings_Off Flag96
376 -- Is_Controlling_Formal Flag97
377 -- Has_Controlling_Result Flag98
378 -- Is_Exported Flag99
379 -- Has_Specified_Layout Flag100
381 -- Has_Nested_Block_With_Handler Flag101
383 -- Is_Completely_Hidden Flag103
384 -- Address_Taken Flag104
385 -- Suppress_Initialization Flag105
386 -- Is_Limited_Composite Flag106
387 -- Is_Private_Composite Flag107
388 -- Default_Expressions_Processed Flag108
389 -- Is_Non_Static_Subtype Flag109
390 -- Has_Out_Or_In_Out_Parameter Flag110
392 -- Is_Formal_Subprogram Flag111
393 -- Is_Renaming_Of_Object Flag112
395 -- Delay_Cleanups Flag114
396 -- Never_Set_In_Source Flag115
397 -- Is_Visible_Lib_Unit Flag116
398 -- Is_Unchecked_Union Flag117
399 -- Is_For_Access_Subtype Flag118
400 -- Has_Convention_Pragma Flag119
401 -- Has_Primitive_Operations Flag120
403 -- Has_Pragma_Pack Flag121
404 -- Is_Bit_Packed_Array Flag122
405 -- Has_Unchecked_Union Flag123
406 -- Is_Eliminated Flag124
407 -- C_Pass_By_Copy Flag125
408 -- Is_Instantiated Flag126
409 -- Is_Valued_Procedure Flag127
410 -- (used for Component_Alignment) Flag128
411 -- (used for Component_Alignment) Flag129
412 -- Is_Generic_Instance Flag130
414 -- No_Pool_Assigned Flag131
415 -- Is_AST_Entry Flag132
416 -- Is_VMS_Exception Flag133
417 -- Is_Optional_Parameter Flag134
418 -- Has_Aliased_Components Flag135
419 -- No_Strict_Aliasing Flag136
420 -- Is_Machine_Code_Subprogram Flag137
421 -- Is_Packed_Array_Impl_Type Flag138
422 -- Has_Biased_Representation Flag139
423 -- Has_Complex_Representation Flag140
425 -- Is_Constr_Subt_For_UN_Aliased Flag141
426 -- Has_Missing_Return Flag142
427 -- Has_Recursive_Call Flag143
428 -- Is_Unsigned_Type Flag144
429 -- Strict_Alignment Flag145
430 -- Is_Abstract_Type Flag146
431 -- Needs_Debug_Info Flag147
432 -- Suppress_Elaboration_Warnings Flag148
433 -- Is_Compilation_Unit Flag149
434 -- Has_Pragma_Elaborate_Body Flag150
436 -- Has_Private_Ancestor Flag151
437 -- Entry_Accepted Flag152
438 -- Is_Obsolescent Flag153
439 -- Has_Per_Object_Constraint Flag154
440 -- Has_Private_Declaration Flag155
441 -- Referenced Flag156
442 -- Has_Pragma_Inline Flag157
443 -- Finalize_Storage_Only Flag158
444 -- From_Limited_With Flag159
445 -- Is_Package_Body_Entity Flag160
447 -- Has_Qualified_Name Flag161
448 -- Nonzero_Is_True Flag162
449 -- Is_True_Constant Flag163
450 -- Reverse_Bit_Order Flag164
451 -- Suppress_Style_Checks Flag165
452 -- Debug_Info_Off Flag166
453 -- Sec_Stack_Needed_For_Return Flag167
454 -- Materialize_Entity Flag168
455 -- Has_Pragma_Thread_Local_Storage Flag169
456 -- Is_Known_Valid Flag170
458 -- Is_Hidden_Open_Scope Flag171
459 -- Has_Object_Size_Clause Flag172
460 -- Has_Fully_Qualified_Name Flag173
461 -- Elaboration_Entity_Required Flag174
462 -- Has_Forward_Instantiation Flag175
463 -- Is_Discrim_SO_Function Flag176
464 -- Size_Depends_On_Discriminant Flag177
465 -- Is_Null_Init_Proc Flag178
466 -- Has_Pragma_Pure_Function Flag179
467 -- Has_Pragma_Unreferenced Flag180
469 -- Has_Contiguous_Rep Flag181
470 -- Has_Xref_Entry Flag182
471 -- Must_Be_On_Byte_Boundary Flag183
472 -- Has_Stream_Size_Clause Flag184
473 -- Is_Ada_2005_Only Flag185
474 -- Is_Interface Flag186
475 -- Has_Constrained_Partial_View Flag187
476 -- Uses_Lock_Free Flag188
477 -- Is_Pure_Unit_Access_Type Flag189
478 -- Has_Specified_Stream_Input Flag190
480 -- Has_Specified_Stream_Output Flag191
481 -- Has_Specified_Stream_Read Flag192
482 -- Has_Specified_Stream_Write Flag193
483 -- Is_Local_Anonymous_Access Flag194
484 -- Is_Primitive_Wrapper Flag195
485 -- Was_Hidden Flag196
486 -- Is_Limited_Interface Flag197
487 -- Has_Pragma_Ordered Flag198
488 -- Is_Ada_2012_Only Flag199
490 -- Has_Delayed_Aspects Flag200
491 -- Has_Pragma_No_Inline Flag201
492 -- Itype_Printed Flag202
493 -- Has_Pragma_Pure Flag203
494 -- Is_Known_Null Flag204
495 -- Low_Bound_Tested Flag205
496 -- Is_Visible_Formal Flag206
497 -- Known_To_Have_Preelab_Init Flag207
498 -- Must_Have_Preelab_Init Flag208
499 -- Is_Return_Object Flag209
500 -- Elaborate_Body_Desirable Flag210
502 -- Has_Static_Discriminants Flag211
503 -- Has_Pragma_Unreferenced_Objects Flag212
504 -- Requires_Overriding Flag213
506 -- Has_Up_Level_Access Flag215
507 -- Universal_Aliasing Flag216
508 -- Suppress_Value_Tracking_On_Call Flag217
509 -- Is_Primitive Flag218
510 -- Has_Initial_Value Flag219
511 -- Has_Dispatch_Table Flag220
513 -- Has_Pragma_Preelab_Init Flag221
514 -- Used_As_Generic_Actual Flag222
515 -- Is_Descendent_Of_Address Flag223
518 -- Is_Only_Out_Parameter Flag226
519 -- Referenced_As_Out_Parameter Flag227
520 -- Has_Thunks Flag228
521 -- Can_Use_Internal_Rep Flag229
522 -- Has_Pragma_Inline_Always Flag230
524 -- Renamed_In_Spec Flag231
525 -- Has_Invariants Flag232
526 -- Has_Pragma_Unmodified Flag233
527 -- Is_Dispatch_Table_Entity Flag234
528 -- Is_Trivial_Subprogram Flag235
529 -- Warnings_Off_Used Flag236
530 -- Warnings_Off_Used_Unmodified Flag237
531 -- Warnings_Off_Used_Unreferenced Flag238
532 -- OK_To_Reorder_Components Flag239
533 -- Has_Postconditions Flag240
535 -- Optimize_Alignment_Space Flag241
536 -- Optimize_Alignment_Time Flag242
537 -- Overlays_Constant Flag243
538 -- Is_RACW_Stub_Type Flag244
539 -- Is_Private_Primitive Flag245
540 -- Is_Underlying_Record_View Flag246
541 -- OK_To_Rename Flag247
542 -- Has_Inheritable_Invariants Flag248
543 -- Is_Safe_To_Reevaluate Flag249
544 -- Has_Predicates Flag250
546 -- Has_Implicit_Dereference Flag251
547 -- Is_Processed_Transient Flag252
548 -- Has_Anonymous_Master Flag253
549 -- Is_Implementation_Defined Flag254
550 -- Is_Predicate_Function Flag255
551 -- Is_Predicate_Function_M Flag256
552 -- Is_Invariant_Procedure Flag257
553 -- Has_Dynamic_Predicate_Aspect Flag258
554 -- Has_Static_Predicate_Aspect Flag259
555 -- Has_Loop_Entry_Attributes Flag260
557 -- Has_Delayed_Rep_Aspects Flag261
558 -- May_Inherit_Delayed_Rep_Aspects Flag262
559 -- Has_Visible_Refinement Flag263
560 -- Is_Discriminant_Check_Function Flag264
561 -- SPARK_Pragma_Inherited Flag265
562 -- SPARK_Aux_Pragma_Inherited Flag266
563 -- Has_Shift_Operator Flag267
564 -- Is_Independent Flag268
565 -- Has_Static_Predicate Flag269
566 -- Stores_Attribute_Old_Prefix Flag270
568 -- (Has_Protected) Flag271
569 -- (SSO_Set_Low_By_Default) Flag272
570 -- (SSO_Set_Low_By_Default) Flag273
590 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
592 -----------------------
593 -- Local subprograms --
594 -----------------------
597 (State_Id : Entity_Id;
598 Option_Nam : Name_Id) return Boolean;
599 -- Determine whether abstract state State_Id has particular option denoted
600 -- by the name Option_Nam.
606 function Float_Rep (Id : E) return F is
607 pragma Assert (Is_Floating_Point_Type (Id));
609 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
617 (State_Id : Entity_Id;
618 Option_Nam : Name_Id) return Boolean
620 Decl : constant Node_Id := Parent (State_Id);
625 pragma Assert (Ekind (State_Id) = E_Abstract_State);
627 -- The declaration of abstract states with options appear as an
628 -- extension aggregate. If this is not the case, the option is not
631 if Nkind (Decl) /= N_Extension_Aggregate then
637 Opt := First (Expressions (Decl));
638 while Present (Opt) loop
640 -- Currently the only simple option allowed is External
642 if Nkind (Opt) = N_Identifier
643 and then Chars (Opt) = Name_External
644 and then Chars (Opt) = Option_Nam
652 -- Complex options with various specifiers
654 Opt := First (Component_Associations (Decl));
655 while Present (Opt) loop
656 Opt_Nam := First (Choices (Opt));
658 if Nkind (Opt_Nam) = N_Identifier
659 and then Chars (Opt_Nam) = Option_Nam
670 --------------------------------
671 -- Attribute Access Functions --
672 --------------------------------
674 function Abstract_States (Id : E) return L is
676 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
680 function Accept_Address (Id : E) return L is
685 function Access_Disp_Table (Id : E) return L is
687 pragma Assert (Ekind_In (Id, E_Record_Type,
689 return Elist16 (Implementation_Base_Type (Id));
690 end Access_Disp_Table;
692 function Actual_Subtype (Id : E) return E is
695 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
696 or else Is_Formal (Id));
700 function Address_Taken (Id : E) return B is
705 function Alias (Id : E) return E is
708 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
712 function Alignment (Id : E) return U is
714 pragma Assert (Is_Type (Id)
715 or else Is_Formal (Id)
716 or else Ekind_In (Id, E_Loop_Parameter,
723 function Associated_Formal_Package (Id : E) return E is
725 pragma Assert (Ekind (Id) = E_Package);
727 end Associated_Formal_Package;
729 function Associated_Node_For_Itype (Id : E) return N is
732 end Associated_Node_For_Itype;
734 function Associated_Storage_Pool (Id : E) return E is
736 pragma Assert (Is_Access_Type (Id));
737 return Node22 (Root_Type (Id));
738 end Associated_Storage_Pool;
740 function Barrier_Function (Id : E) return N is
742 pragma Assert (Is_Entry (Id));
744 end Barrier_Function;
746 function Block_Node (Id : E) return N is
748 pragma Assert (Ekind (Id) = E_Block);
752 function Body_Entity (Id : E) return E is
754 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
758 function Body_Needed_For_SAL (Id : E) return B is
761 (Ekind (Id) = E_Package
762 or else Is_Subprogram (Id)
763 or else Is_Generic_Unit (Id));
765 end Body_Needed_For_SAL;
767 function Body_References (Id : E) return L is
769 pragma Assert (Ekind (Id) = E_Abstract_State);
773 function BIP_Initialization_Call (Id : E) return N is
775 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
777 end BIP_Initialization_Call;
779 function C_Pass_By_Copy (Id : E) return B is
781 pragma Assert (Is_Record_Type (Id));
782 return Flag125 (Implementation_Base_Type (Id));
785 function Can_Never_Be_Null (Id : E) return B is
788 end Can_Never_Be_Null;
790 function Checks_May_Be_Suppressed (Id : E) return B is
793 end Checks_May_Be_Suppressed;
795 function Class_Wide_Type (Id : E) return E is
797 pragma Assert (Is_Type (Id));
801 function Cloned_Subtype (Id : E) return E is
803 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
807 function Component_Bit_Offset (Id : E) return U is
809 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
811 end Component_Bit_Offset;
813 function Component_Clause (Id : E) return N is
815 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
817 end Component_Clause;
819 function Component_Size (Id : E) return U is
821 pragma Assert (Is_Array_Type (Id));
822 return Uint22 (Implementation_Base_Type (Id));
825 function Component_Type (Id : E) return E is
827 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
828 return Node20 (Implementation_Base_Type (Id));
831 function Corresponding_Concurrent_Type (Id : E) return E is
833 pragma Assert (Ekind (Id) = E_Record_Type);
835 end Corresponding_Concurrent_Type;
837 function Corresponding_Discriminant (Id : E) return E is
839 pragma Assert (Ekind (Id) = E_Discriminant);
841 end Corresponding_Discriminant;
843 function Corresponding_Equality (Id : E) return E is
846 (Ekind (Id) = E_Function
847 and then not Comes_From_Source (Id)
848 and then Chars (Id) = Name_Op_Ne);
850 end Corresponding_Equality;
852 function Corresponding_Protected_Entry (Id : E) return E is
854 pragma Assert (Ekind (Id) = E_Subprogram_Body);
856 end Corresponding_Protected_Entry;
858 function Corresponding_Record_Type (Id : E) return E is
860 pragma Assert (Is_Concurrent_Type (Id));
862 end Corresponding_Record_Type;
864 function Corresponding_Remote_Type (Id : E) return E is
867 end Corresponding_Remote_Type;
869 function Current_Use_Clause (Id : E) return E is
871 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
873 end Current_Use_Clause;
875 function Current_Value (Id : E) return N is
877 pragma Assert (Ekind (Id) in Object_Kind);
881 function CR_Discriminant (Id : E) return E is
886 function Debug_Info_Off (Id : E) return B is
891 function Debug_Renaming_Link (Id : E) return E is
894 end Debug_Renaming_Link;
896 function Default_Aspect_Component_Value (Id : E) return N is
898 pragma Assert (Is_Array_Type (Id));
899 return Node19 (Base_Type (Id));
900 end Default_Aspect_Component_Value;
902 function Default_Aspect_Value (Id : E) return N is
904 pragma Assert (Is_Scalar_Type (Id));
905 return Node19 (Base_Type (Id));
906 end Default_Aspect_Value;
908 function Default_Expr_Function (Id : E) return E is
910 pragma Assert (Is_Formal (Id));
912 end Default_Expr_Function;
914 function Default_Expressions_Processed (Id : E) return B is
917 end Default_Expressions_Processed;
919 function Default_Value (Id : E) return N is
921 pragma Assert (Is_Formal (Id));
925 function Delay_Cleanups (Id : E) return B is
930 function Delay_Subprogram_Descriptors (Id : E) return B is
933 end Delay_Subprogram_Descriptors;
935 function Delta_Value (Id : E) return R is
937 pragma Assert (Is_Fixed_Point_Type (Id));
941 function Dependent_Instances (Id : E) return L is
943 pragma Assert (Is_Generic_Instance (Id));
945 end Dependent_Instances;
947 function Depends_On_Private (Id : E) return B is
949 pragma Assert (Nkind (Id) in N_Entity);
951 end Depends_On_Private;
953 function Derived_Type_Link (Id : E) return E is
955 pragma Assert (Is_Type (Id));
956 return Node31 (Base_Type (Id));
957 end Derived_Type_Link;
959 function Digits_Value (Id : E) return U is
962 (Is_Floating_Point_Type (Id)
963 or else Is_Decimal_Fixed_Point_Type (Id));
967 function Direct_Primitive_Operations (Id : E) return L is
969 pragma Assert (Is_Tagged_Type (Id));
971 end Direct_Primitive_Operations;
973 function Directly_Designated_Type (Id : E) return E is
975 pragma Assert (Is_Access_Type (Id));
977 end Directly_Designated_Type;
979 function Discard_Names (Id : E) return B is
984 function Discriminal (Id : E) return E is
986 pragma Assert (Ekind (Id) = E_Discriminant);
990 function Discriminal_Link (Id : E) return N is
993 end Discriminal_Link;
995 function Discriminant_Checking_Func (Id : E) return E is
997 pragma Assert (Ekind (Id) = E_Component);
999 end Discriminant_Checking_Func;
1001 function Discriminant_Constraint (Id : E) return L is
1003 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1004 return Elist21 (Id);
1005 end Discriminant_Constraint;
1007 function Discriminant_Default_Value (Id : E) return N is
1009 pragma Assert (Ekind (Id) = E_Discriminant);
1011 end Discriminant_Default_Value;
1013 function Discriminant_Number (Id : E) return U is
1015 pragma Assert (Ekind (Id) = E_Discriminant);
1017 end Discriminant_Number;
1019 function Dispatch_Table_Wrappers (Id : E) return L is
1021 pragma Assert (Ekind_In (Id, E_Record_Type,
1023 return Elist26 (Implementation_Base_Type (Id));
1024 end Dispatch_Table_Wrappers;
1026 function DT_Entry_Count (Id : E) return U is
1028 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1032 function DT_Offset_To_Top_Func (Id : E) return E is
1034 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1036 end DT_Offset_To_Top_Func;
1038 function DT_Position (Id : E) return U is
1040 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1041 and then Present (DTC_Entity (Id)));
1045 function DTC_Entity (Id : E) return E is
1047 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1051 function Elaborate_Body_Desirable (Id : E) return B is
1053 pragma Assert (Ekind (Id) = E_Package);
1054 return Flag210 (Id);
1055 end Elaborate_Body_Desirable;
1057 function Elaboration_Entity (Id : E) return E is
1062 Ekind (Id) = E_Package
1064 Is_Generic_Unit (Id));
1066 end Elaboration_Entity;
1068 function Elaboration_Entity_Required (Id : E) return B is
1073 Ekind (Id) = E_Package
1075 Is_Generic_Unit (Id));
1076 return Flag174 (Id);
1077 end Elaboration_Entity_Required;
1079 function Encapsulating_State (Id : E) return N is
1081 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1083 end Encapsulating_State;
1085 function Enclosing_Scope (Id : E) return E is
1088 end Enclosing_Scope;
1090 function Entry_Accepted (Id : E) return B is
1092 pragma Assert (Is_Entry (Id));
1093 return Flag152 (Id);
1096 function Entry_Bodies_Array (Id : E) return E is
1099 end Entry_Bodies_Array;
1101 function Entry_Cancel_Parameter (Id : E) return E is
1104 end Entry_Cancel_Parameter;
1106 function Entry_Component (Id : E) return E is
1109 end Entry_Component;
1111 function Entry_Formal (Id : E) return E is
1116 function Entry_Index_Constant (Id : E) return N is
1118 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1120 end Entry_Index_Constant;
1122 function Contract (Id : E) return N is
1125 (Ekind_In (Id, E_Entry,
1132 or else Is_Generic_Subprogram (Id)
1133 or else Is_Subprogram (Id));
1137 function Entry_Parameters_Type (Id : E) return E is
1140 end Entry_Parameters_Type;
1142 function Enum_Pos_To_Rep (Id : E) return E is
1144 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1146 end Enum_Pos_To_Rep;
1148 function Enumeration_Pos (Id : E) return Uint is
1150 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1152 end Enumeration_Pos;
1154 function Enumeration_Rep (Id : E) return U is
1156 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1158 end Enumeration_Rep;
1160 function Enumeration_Rep_Expr (Id : E) return N is
1162 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1164 end Enumeration_Rep_Expr;
1166 function Equivalent_Type (Id : E) return E is
1169 (Ekind_In (Id, E_Class_Wide_Type,
1170 E_Class_Wide_Subtype,
1171 E_Access_Subprogram_Type,
1172 E_Access_Protected_Subprogram_Type,
1173 E_Anonymous_Access_Protected_Subprogram_Type,
1174 E_Access_Subprogram_Type,
1177 end Equivalent_Type;
1179 function Esize (Id : E) return Uint is
1184 function Exception_Code (Id : E) return Uint is
1186 pragma Assert (Ekind (Id) = E_Exception);
1190 function Extra_Accessibility (Id : E) return E is
1193 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1195 end Extra_Accessibility;
1197 function Extra_Accessibility_Of_Result (Id : E) return E is
1199 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1201 end Extra_Accessibility_Of_Result;
1203 function Extra_Constrained (Id : E) return E is
1205 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1207 end Extra_Constrained;
1209 function Extra_Formal (Id : E) return E is
1214 function Extra_Formals (Id : E) return E is
1217 (Is_Overloadable (Id)
1218 or else Ekind_In (Id, E_Entry_Family,
1220 E_Subprogram_Type));
1224 function Can_Use_Internal_Rep (Id : E) return B is
1226 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1227 return Flag229 (Base_Type (Id));
1228 end Can_Use_Internal_Rep;
1230 function Finalization_Master (Id : E) return E is
1232 pragma Assert (Is_Access_Type (Id));
1233 return Node23 (Root_Type (Id));
1234 end Finalization_Master;
1236 function Finalize_Storage_Only (Id : E) return B is
1238 pragma Assert (Is_Type (Id));
1239 return Flag158 (Base_Type (Id));
1240 end Finalize_Storage_Only;
1242 function Finalizer (Id : E) return E is
1244 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1248 function First_Entity (Id : E) return E is
1253 function First_Exit_Statement (Id : E) return N is
1255 pragma Assert (Ekind (Id) = E_Loop);
1257 end First_Exit_Statement;
1259 function First_Index (Id : E) return N is
1261 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1265 function First_Literal (Id : E) return E is
1267 pragma Assert (Is_Enumeration_Type (Id));
1271 function First_Optional_Parameter (Id : E) return E is
1273 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1275 end First_Optional_Parameter;
1277 function First_Private_Entity (Id : E) return E is
1279 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1280 or else Ekind (Id) in Concurrent_Kind);
1282 end First_Private_Entity;
1284 function First_Rep_Item (Id : E) return E is
1289 function Freeze_Node (Id : E) return N is
1294 function From_Limited_With (Id : E) return B is
1296 return Flag159 (Id);
1297 end From_Limited_With;
1299 function Full_View (Id : E) return E is
1301 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1305 function Generic_Homonym (Id : E) return E is
1307 pragma Assert (Ekind (Id) = E_Generic_Package);
1309 end Generic_Homonym;
1311 function Generic_Renamings (Id : E) return L is
1313 return Elist23 (Id);
1314 end Generic_Renamings;
1316 function Handler_Records (Id : E) return S is
1319 end Handler_Records;
1321 function Has_Aliased_Components (Id : E) return B is
1323 return Flag135 (Implementation_Base_Type (Id));
1324 end Has_Aliased_Components;
1326 function Has_Alignment_Clause (Id : E) return B is
1329 end Has_Alignment_Clause;
1331 function Has_All_Calls_Remote (Id : E) return B is
1334 end Has_All_Calls_Remote;
1336 function Has_Anonymous_Master (Id : E) return B is
1339 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1340 return Flag253 (Id);
1341 end Has_Anonymous_Master;
1343 function Has_Atomic_Components (Id : E) return B is
1345 return Flag86 (Implementation_Base_Type (Id));
1346 end Has_Atomic_Components;
1348 function Has_Biased_Representation (Id : E) return B is
1350 return Flag139 (Id);
1351 end Has_Biased_Representation;
1353 function Has_Completion (Id : E) return B is
1358 function Has_Completion_In_Body (Id : E) return B is
1360 pragma Assert (Is_Type (Id));
1362 end Has_Completion_In_Body;
1364 function Has_Complex_Representation (Id : E) return B is
1366 pragma Assert (Is_Type (Id));
1367 return Flag140 (Implementation_Base_Type (Id));
1368 end Has_Complex_Representation;
1370 function Has_Component_Size_Clause (Id : E) return B is
1372 pragma Assert (Is_Array_Type (Id));
1373 return Flag68 (Implementation_Base_Type (Id));
1374 end Has_Component_Size_Clause;
1376 function Has_Constrained_Partial_View (Id : E) return B is
1378 pragma Assert (Is_Type (Id));
1379 return Flag187 (Id);
1380 end Has_Constrained_Partial_View;
1382 function Has_Controlled_Component (Id : E) return B is
1384 return Flag43 (Base_Type (Id));
1385 end Has_Controlled_Component;
1387 function Has_Contiguous_Rep (Id : E) return B is
1389 return Flag181 (Id);
1390 end Has_Contiguous_Rep;
1392 function Has_Controlling_Result (Id : E) return B is
1395 end Has_Controlling_Result;
1397 function Has_Convention_Pragma (Id : E) return B is
1399 return Flag119 (Id);
1400 end Has_Convention_Pragma;
1402 function Has_Default_Aspect (Id : E) return B is
1404 return Flag39 (Base_Type (Id));
1405 end Has_Default_Aspect;
1407 function Has_Delayed_Aspects (Id : E) return B is
1409 pragma Assert (Nkind (Id) in N_Entity);
1410 return Flag200 (Id);
1411 end Has_Delayed_Aspects;
1413 function Has_Delayed_Freeze (Id : E) return B is
1415 pragma Assert (Nkind (Id) in N_Entity);
1417 end Has_Delayed_Freeze;
1419 function Has_Delayed_Rep_Aspects (Id : E) return B is
1421 pragma Assert (Nkind (Id) in N_Entity);
1422 return Flag261 (Id);
1423 end Has_Delayed_Rep_Aspects;
1425 function Has_Discriminants (Id : E) return B is
1427 pragma Assert (Nkind (Id) in N_Entity);
1429 end Has_Discriminants;
1431 function Has_Dispatch_Table (Id : E) return B is
1433 pragma Assert (Is_Tagged_Type (Id));
1434 return Flag220 (Id);
1435 end Has_Dispatch_Table;
1437 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1439 pragma Assert (Is_Type (Id));
1440 return Flag258 (Id);
1441 end Has_Dynamic_Predicate_Aspect;
1443 function Has_Enumeration_Rep_Clause (Id : E) return B is
1445 pragma Assert (Is_Enumeration_Type (Id));
1447 end Has_Enumeration_Rep_Clause;
1449 function Has_Exit (Id : E) return B is
1454 function Has_Forward_Instantiation (Id : E) return B is
1456 return Flag175 (Id);
1457 end Has_Forward_Instantiation;
1459 function Has_Fully_Qualified_Name (Id : E) return B is
1461 return Flag173 (Id);
1462 end Has_Fully_Qualified_Name;
1464 function Has_Gigi_Rep_Item (Id : E) return B is
1467 end Has_Gigi_Rep_Item;
1469 function Has_Homonym (Id : E) return B is
1474 function Has_Implicit_Dereference (Id : E) return B is
1476 return Flag251 (Id);
1477 end Has_Implicit_Dereference;
1479 function Has_Independent_Components (Id : E) return B is
1481 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1482 return Flag34 (Base_Type (Id));
1483 end Has_Independent_Components;
1485 function Has_Inheritable_Invariants (Id : E) return B is
1487 pragma Assert (Is_Type (Id));
1488 return Flag248 (Id);
1489 end Has_Inheritable_Invariants;
1491 function Has_Initial_Value (Id : E) return B is
1493 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1494 return Flag219 (Id);
1495 end Has_Initial_Value;
1497 function Has_Invariants (Id : E) return B is
1499 pragma Assert (Is_Type (Id));
1500 return Flag232 (Id);
1503 function Has_Loop_Entry_Attributes (Id : E) return B is
1505 pragma Assert (Ekind (Id) = E_Loop);
1506 return Flag260 (Id);
1507 end Has_Loop_Entry_Attributes;
1509 function Has_Machine_Radix_Clause (Id : E) return B is
1511 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1513 end Has_Machine_Radix_Clause;
1515 function Has_Master_Entity (Id : E) return B is
1518 end Has_Master_Entity;
1520 function Has_Missing_Return (Id : E) return B is
1522 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1523 return Flag142 (Id);
1524 end Has_Missing_Return;
1526 function Has_Nested_Block_With_Handler (Id : E) return B is
1528 return Flag101 (Id);
1529 end Has_Nested_Block_With_Handler;
1531 function Has_Non_Standard_Rep (Id : E) return B is
1533 return Flag75 (Implementation_Base_Type (Id));
1534 end Has_Non_Standard_Rep;
1536 function Has_Object_Size_Clause (Id : E) return B is
1538 pragma Assert (Is_Type (Id));
1539 return Flag172 (Id);
1540 end Has_Object_Size_Clause;
1542 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1544 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1545 return Flag110 (Id);
1546 end Has_Out_Or_In_Out_Parameter;
1548 function Has_Per_Object_Constraint (Id : E) return B is
1550 return Flag154 (Id);
1551 end Has_Per_Object_Constraint;
1553 function Has_Postconditions (Id : E) return B is
1555 pragma Assert (Is_Subprogram (Id));
1556 return Flag240 (Id);
1557 end Has_Postconditions;
1559 function Has_Pragma_Controlled (Id : E) return B is
1561 pragma Assert (Is_Access_Type (Id));
1562 return Flag27 (Implementation_Base_Type (Id));
1563 end Has_Pragma_Controlled;
1565 function Has_Pragma_Elaborate_Body (Id : E) return B is
1567 return Flag150 (Id);
1568 end Has_Pragma_Elaborate_Body;
1570 function Has_Pragma_Inline (Id : E) return B is
1572 return Flag157 (Id);
1573 end Has_Pragma_Inline;
1575 function Has_Pragma_Inline_Always (Id : E) return B is
1577 return Flag230 (Id);
1578 end Has_Pragma_Inline_Always;
1580 function Has_Pragma_No_Inline (Id : E) return B is
1582 return Flag201 (Id);
1583 end Has_Pragma_No_Inline;
1585 function Has_Pragma_Ordered (Id : E) return B is
1587 pragma Assert (Is_Enumeration_Type (Id));
1588 return Flag198 (Implementation_Base_Type (Id));
1589 end Has_Pragma_Ordered;
1591 function Has_Pragma_Pack (Id : E) return B is
1593 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1594 return Flag121 (Implementation_Base_Type (Id));
1595 end Has_Pragma_Pack;
1597 function Has_Pragma_Preelab_Init (Id : E) return B is
1599 return Flag221 (Id);
1600 end Has_Pragma_Preelab_Init;
1602 function Has_Pragma_Pure (Id : E) return B is
1604 return Flag203 (Id);
1605 end Has_Pragma_Pure;
1607 function Has_Pragma_Pure_Function (Id : E) return B is
1609 return Flag179 (Id);
1610 end Has_Pragma_Pure_Function;
1612 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1614 return Flag169 (Id);
1615 end Has_Pragma_Thread_Local_Storage;
1617 function Has_Pragma_Unmodified (Id : E) return B is
1619 return Flag233 (Id);
1620 end Has_Pragma_Unmodified;
1622 function Has_Pragma_Unreferenced (Id : E) return B is
1624 return Flag180 (Id);
1625 end Has_Pragma_Unreferenced;
1627 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1629 pragma Assert (Is_Type (Id));
1630 return Flag212 (Id);
1631 end Has_Pragma_Unreferenced_Objects;
1633 function Has_Predicates (Id : E) return B is
1635 pragma Assert (Is_Type (Id));
1636 return Flag250 (Id);
1639 function Has_Primitive_Operations (Id : E) return B is
1641 pragma Assert (Is_Type (Id));
1642 return Flag120 (Base_Type (Id));
1643 end Has_Primitive_Operations;
1645 function Has_Private_Ancestor (Id : E) return B is
1647 return Flag151 (Id);
1648 end Has_Private_Ancestor;
1650 function Has_Private_Declaration (Id : E) return B is
1652 return Flag155 (Id);
1653 end Has_Private_Declaration;
1655 function Has_Protected (Id : E) return B is
1657 return Flag271 (Base_Type (Id));
1660 function Has_Qualified_Name (Id : E) return B is
1662 return Flag161 (Id);
1663 end Has_Qualified_Name;
1665 function Has_RACW (Id : E) return B is
1667 pragma Assert (Ekind (Id) = E_Package);
1668 return Flag214 (Id);
1671 function Has_Record_Rep_Clause (Id : E) return B is
1673 pragma Assert (Is_Record_Type (Id));
1674 return Flag65 (Implementation_Base_Type (Id));
1675 end Has_Record_Rep_Clause;
1677 function Has_Recursive_Call (Id : E) return B is
1679 pragma Assert (Is_Subprogram (Id));
1680 return Flag143 (Id);
1681 end Has_Recursive_Call;
1683 function Has_Shift_Operator (Id : E) return B is
1685 pragma Assert (Is_Integer_Type (Id));
1686 return Flag267 (Base_Type (Id));
1687 end Has_Shift_Operator;
1689 function Has_Size_Clause (Id : E) return B is
1692 end Has_Size_Clause;
1694 function Has_Small_Clause (Id : E) return B is
1697 end Has_Small_Clause;
1699 function Has_Specified_Layout (Id : E) return B is
1701 pragma Assert (Is_Type (Id));
1702 return Flag100 (Implementation_Base_Type (Id));
1703 end Has_Specified_Layout;
1705 function Has_Specified_Stream_Input (Id : E) return B is
1707 pragma Assert (Is_Type (Id));
1708 return Flag190 (Id);
1709 end Has_Specified_Stream_Input;
1711 function Has_Specified_Stream_Output (Id : E) return B is
1713 pragma Assert (Is_Type (Id));
1714 return Flag191 (Id);
1715 end Has_Specified_Stream_Output;
1717 function Has_Specified_Stream_Read (Id : E) return B is
1719 pragma Assert (Is_Type (Id));
1720 return Flag192 (Id);
1721 end Has_Specified_Stream_Read;
1723 function Has_Specified_Stream_Write (Id : E) return B is
1725 pragma Assert (Is_Type (Id));
1726 return Flag193 (Id);
1727 end Has_Specified_Stream_Write;
1729 function Has_Static_Discriminants (Id : E) return B is
1731 pragma Assert (Is_Type (Id));
1732 return Flag211 (Id);
1733 end Has_Static_Discriminants;
1735 function Has_Static_Predicate (Id : E) return B is
1737 pragma Assert (Is_Type (Id));
1738 return Flag269 (Id);
1739 end Has_Static_Predicate;
1741 function Has_Static_Predicate_Aspect (Id : E) return B is
1743 pragma Assert (Is_Type (Id));
1744 return Flag259 (Id);
1745 end Has_Static_Predicate_Aspect;
1747 function Has_Storage_Size_Clause (Id : E) return B is
1749 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1750 return Flag23 (Implementation_Base_Type (Id));
1751 end Has_Storage_Size_Clause;
1753 function Has_Stream_Size_Clause (Id : E) return B is
1755 return Flag184 (Id);
1756 end Has_Stream_Size_Clause;
1758 function Has_Task (Id : E) return B is
1760 return Flag30 (Base_Type (Id));
1763 function Has_Thunks (Id : E) return B is
1765 return Flag228 (Id);
1768 function Has_Unchecked_Union (Id : E) return B is
1770 return Flag123 (Base_Type (Id));
1771 end Has_Unchecked_Union;
1773 function Has_Unknown_Discriminants (Id : E) return B is
1775 pragma Assert (Is_Type (Id));
1777 end Has_Unknown_Discriminants;
1779 function Has_Up_Level_Access (Id : E) return B is
1782 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1783 return Flag215 (Id);
1784 end Has_Up_Level_Access;
1786 function Has_Visible_Refinement (Id : E) return B is
1788 pragma Assert (Ekind (Id) = E_Abstract_State);
1789 return Flag263 (Id);
1790 end Has_Visible_Refinement;
1792 function Has_Volatile_Components (Id : E) return B is
1794 return Flag87 (Implementation_Base_Type (Id));
1795 end Has_Volatile_Components;
1797 function Has_Xref_Entry (Id : E) return B is
1799 return Flag182 (Id);
1802 function Hiding_Loop_Variable (Id : E) return E is
1804 pragma Assert (Ekind (Id) = E_Variable);
1806 end Hiding_Loop_Variable;
1808 function Homonym (Id : E) return E is
1813 function Import_Pragma (Id : E) return E is
1815 pragma Assert (Is_Subprogram (Id));
1819 function Interface_Alias (Id : E) return E is
1821 pragma Assert (Is_Subprogram (Id));
1823 end Interface_Alias;
1825 function Interfaces (Id : E) return L is
1827 pragma Assert (Is_Record_Type (Id));
1828 return Elist25 (Id);
1831 function In_Package_Body (Id : E) return B is
1834 end In_Package_Body;
1836 function In_Private_Part (Id : E) return B is
1839 end In_Private_Part;
1841 function In_Use (Id : E) return B is
1843 pragma Assert (Nkind (Id) in N_Entity);
1847 function Initialization_Statements (Id : E) return N is
1849 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1851 end Initialization_Statements;
1853 function Inner_Instances (Id : E) return L is
1855 return Elist23 (Id);
1856 end Inner_Instances;
1858 function Interface_Name (Id : E) return N is
1863 function Is_Abstract_Subprogram (Id : E) return B is
1865 pragma Assert (Is_Overloadable (Id));
1867 end Is_Abstract_Subprogram;
1869 function Is_Abstract_Type (Id : E) return B is
1871 pragma Assert (Is_Type (Id));
1872 return Flag146 (Id);
1873 end Is_Abstract_Type;
1875 function Is_Local_Anonymous_Access (Id : E) return B is
1877 pragma Assert (Is_Access_Type (Id));
1878 return Flag194 (Id);
1879 end Is_Local_Anonymous_Access;
1881 function Is_Access_Constant (Id : E) return B is
1883 pragma Assert (Is_Access_Type (Id));
1885 end Is_Access_Constant;
1887 function Is_Ada_2005_Only (Id : E) return B is
1889 return Flag185 (Id);
1890 end Is_Ada_2005_Only;
1892 function Is_Ada_2012_Only (Id : E) return B is
1894 return Flag199 (Id);
1895 end Is_Ada_2012_Only;
1897 function Is_Aliased (Id : E) return B is
1899 pragma Assert (Nkind (Id) in N_Entity);
1903 function Is_AST_Entry (Id : E) return B is
1905 pragma Assert (Is_Entry (Id));
1906 return Flag132 (Id);
1909 function Is_Asynchronous (Id : E) return B is
1911 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1913 end Is_Asynchronous;
1915 function Is_Atomic (Id : E) return B is
1920 function Is_Bit_Packed_Array (Id : E) return B is
1922 return Flag122 (Implementation_Base_Type (Id));
1923 end Is_Bit_Packed_Array;
1925 function Is_Called (Id : E) return B is
1927 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1928 return Flag102 (Id);
1931 function Is_Character_Type (Id : E) return B is
1934 end Is_Character_Type;
1936 function Is_Child_Unit (Id : E) return B is
1941 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1944 end Is_Class_Wide_Equivalent_Type;
1946 function Is_Compilation_Unit (Id : E) return B is
1948 return Flag149 (Id);
1949 end Is_Compilation_Unit;
1951 function Is_Completely_Hidden (Id : E) return B is
1953 pragma Assert (Ekind (Id) = E_Discriminant);
1954 return Flag103 (Id);
1955 end Is_Completely_Hidden;
1957 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1960 end Is_Constr_Subt_For_U_Nominal;
1962 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1964 return Flag141 (Id);
1965 end Is_Constr_Subt_For_UN_Aliased;
1967 function Is_Constrained (Id : E) return B is
1969 pragma Assert (Nkind (Id) in N_Entity);
1973 function Is_Constructor (Id : E) return B is
1978 function Is_Controlled (Id : E) return B is
1980 return Flag42 (Base_Type (Id));
1983 function Is_Controlling_Formal (Id : E) return B is
1985 pragma Assert (Is_Formal (Id));
1987 end Is_Controlling_Formal;
1989 function Is_CPP_Class (Id : E) return B is
1994 function Is_Descendent_Of_Address (Id : E) return B is
1996 return Flag223 (Id);
1997 end Is_Descendent_Of_Address;
1999 function Is_Discrim_SO_Function (Id : E) return B is
2001 return Flag176 (Id);
2002 end Is_Discrim_SO_Function;
2004 function Is_Discriminant_Check_Function (Id : E) return B is
2006 return Flag264 (Id);
2007 end Is_Discriminant_Check_Function;
2009 function Is_Dispatch_Table_Entity (Id : E) return B is
2011 return Flag234 (Id);
2012 end Is_Dispatch_Table_Entity;
2014 function Is_Dispatching_Operation (Id : E) return B is
2016 pragma Assert (Nkind (Id) in N_Entity);
2018 end Is_Dispatching_Operation;
2020 function Is_Eliminated (Id : E) return B is
2022 return Flag124 (Id);
2025 function Is_Entry_Formal (Id : E) return B is
2028 end Is_Entry_Formal;
2030 function Is_Exported (Id : E) return B is
2035 function Is_First_Subtype (Id : E) return B is
2038 end Is_First_Subtype;
2040 function Is_For_Access_Subtype (Id : E) return B is
2042 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2043 return Flag118 (Id);
2044 end Is_For_Access_Subtype;
2046 function Is_Formal_Subprogram (Id : E) return B is
2048 return Flag111 (Id);
2049 end Is_Formal_Subprogram;
2051 function Is_Frozen (Id : E) return B is
2056 function Is_Generic_Actual_Type (Id : E) return B is
2058 pragma Assert (Is_Type (Id));
2060 end Is_Generic_Actual_Type;
2062 function Is_Generic_Instance (Id : E) return B is
2064 return Flag130 (Id);
2065 end Is_Generic_Instance;
2067 function Is_Generic_Type (Id : E) return B is
2069 pragma Assert (Nkind (Id) in N_Entity);
2071 end Is_Generic_Type;
2073 function Is_Hidden (Id : E) return B is
2078 function Is_Hidden_Open_Scope (Id : E) return B is
2080 return Flag171 (Id);
2081 end Is_Hidden_Open_Scope;
2083 function Is_Immediately_Visible (Id : E) return B is
2085 pragma Assert (Nkind (Id) in N_Entity);
2087 end Is_Immediately_Visible;
2089 function Is_Implementation_Defined (Id : E) return B is
2091 return Flag254 (Id);
2092 end Is_Implementation_Defined;
2094 function Is_Imported (Id : E) return B is
2099 function Is_Independent (Id : E) return B is
2101 pragma Assert (Ekind (Id) = E_Component);
2102 return Flag268 (Id);
2105 function Is_Inlined (Id : E) return B is
2110 function Is_Inlined_Always (Id : E) return B is
2112 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2114 end Is_Inlined_Always;
2116 function Is_Interface (Id : E) return B is
2118 return Flag186 (Id);
2121 function Is_Instantiated (Id : E) return B is
2123 return Flag126 (Id);
2124 end Is_Instantiated;
2126 function Is_Internal (Id : E) return B is
2128 pragma Assert (Nkind (Id) in N_Entity);
2132 function Is_Interrupt_Handler (Id : E) return B is
2134 pragma Assert (Nkind (Id) in N_Entity);
2136 end Is_Interrupt_Handler;
2138 function Is_Intrinsic_Subprogram (Id : E) return B is
2141 end Is_Intrinsic_Subprogram;
2143 function Is_Invariant_Procedure (Id : E) return B is
2145 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2146 return Flag257 (Id);
2147 end Is_Invariant_Procedure;
2149 function Is_Itype (Id : E) return B is
2154 function Is_Known_Non_Null (Id : E) return B is
2157 end Is_Known_Non_Null;
2159 function Is_Known_Null (Id : E) return B is
2161 return Flag204 (Id);
2164 function Is_Known_Valid (Id : E) return B is
2166 return Flag170 (Id);
2169 function Is_Limited_Composite (Id : E) return B is
2171 return Flag106 (Id);
2172 end Is_Limited_Composite;
2174 function Is_Limited_Interface (Id : E) return B is
2176 return Flag197 (Id);
2177 end Is_Limited_Interface;
2179 function Is_Limited_Record (Id : E) return B is
2182 end Is_Limited_Record;
2184 function Is_Machine_Code_Subprogram (Id : E) return B is
2186 pragma Assert (Is_Subprogram (Id));
2187 return Flag137 (Id);
2188 end Is_Machine_Code_Subprogram;
2190 function Is_Non_Static_Subtype (Id : E) return B is
2192 pragma Assert (Is_Type (Id));
2193 return Flag109 (Id);
2194 end Is_Non_Static_Subtype;
2196 function Is_Null_Init_Proc (Id : E) return B is
2198 pragma Assert (Ekind (Id) = E_Procedure);
2199 return Flag178 (Id);
2200 end Is_Null_Init_Proc;
2202 function Is_Obsolescent (Id : E) return B is
2204 return Flag153 (Id);
2207 function Is_Only_Out_Parameter (Id : E) return B is
2209 pragma Assert (Is_Formal (Id));
2210 return Flag226 (Id);
2211 end Is_Only_Out_Parameter;
2213 function Is_Optional_Parameter (Id : E) return B is
2215 pragma Assert (Is_Formal (Id));
2216 return Flag134 (Id);
2217 end Is_Optional_Parameter;
2219 function Is_Package_Body_Entity (Id : E) return B is
2221 return Flag160 (Id);
2222 end Is_Package_Body_Entity;
2224 function Is_Packed (Id : E) return B is
2226 return Flag51 (Implementation_Base_Type (Id));
2229 function Is_Packed_Array_Impl_Type (Id : E) return B is
2231 return Flag138 (Id);
2232 end Is_Packed_Array_Impl_Type;
2234 function Is_Potentially_Use_Visible (Id : E) return B is
2236 pragma Assert (Nkind (Id) in N_Entity);
2238 end Is_Potentially_Use_Visible;
2240 function Is_Predicate_Function (Id : E) return B is
2242 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2243 return Flag255 (Id);
2244 end Is_Predicate_Function;
2246 function Is_Predicate_Function_M (Id : E) return B is
2248 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2249 return Flag256 (Id);
2250 end Is_Predicate_Function_M;
2252 function Is_Preelaborated (Id : E) return B is
2255 end Is_Preelaborated;
2257 function Is_Primitive (Id : E) return B is
2260 (Is_Overloadable (Id)
2261 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2262 return Flag218 (Id);
2265 function Is_Primitive_Wrapper (Id : E) return B is
2267 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2268 return Flag195 (Id);
2269 end Is_Primitive_Wrapper;
2271 function Is_Private_Composite (Id : E) return B is
2273 pragma Assert (Is_Type (Id));
2274 return Flag107 (Id);
2275 end Is_Private_Composite;
2277 function Is_Private_Descendant (Id : E) return B is
2280 end Is_Private_Descendant;
2282 function Is_Private_Primitive (Id : E) return B is
2284 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2285 return Flag245 (Id);
2286 end Is_Private_Primitive;
2288 function Is_Processed_Transient (Id : E) return B is
2290 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2291 return Flag252 (Id);
2292 end Is_Processed_Transient;
2294 function Is_Public (Id : E) return B is
2296 pragma Assert (Nkind (Id) in N_Entity);
2300 function Is_Pure (Id : E) return B is
2305 function Is_Pure_Unit_Access_Type (Id : E) return B is
2307 pragma Assert (Is_Access_Type (Id));
2308 return Flag189 (Id);
2309 end Is_Pure_Unit_Access_Type;
2311 function Is_RACW_Stub_Type (Id : E) return B is
2313 pragma Assert (Is_Type (Id));
2314 return Flag244 (Id);
2315 end Is_RACW_Stub_Type;
2317 function Is_Raised (Id : E) return B is
2319 pragma Assert (Ekind (Id) = E_Exception);
2320 return Flag224 (Id);
2323 function Is_Remote_Call_Interface (Id : E) return B is
2326 end Is_Remote_Call_Interface;
2328 function Is_Remote_Types (Id : E) return B is
2331 end Is_Remote_Types;
2333 function Is_Renaming_Of_Object (Id : E) return B is
2335 return Flag112 (Id);
2336 end Is_Renaming_Of_Object;
2338 function Is_Return_Object (Id : E) return B is
2340 return Flag209 (Id);
2341 end Is_Return_Object;
2343 function Is_Safe_To_Reevaluate (Id : E) return B is
2345 return Flag249 (Id);
2346 end Is_Safe_To_Reevaluate;
2348 function Is_Shared_Passive (Id : E) return B is
2351 end Is_Shared_Passive;
2353 function Is_Statically_Allocated (Id : E) return B is
2356 end Is_Statically_Allocated;
2358 function Is_Tag (Id : E) return B is
2360 pragma Assert (Nkind (Id) in N_Entity);
2364 function Is_Tagged_Type (Id : E) return B is
2369 function Is_Thunk (Id : E) return B is
2371 return Flag225 (Id);
2374 function Is_Trivial_Subprogram (Id : E) return B is
2376 return Flag235 (Id);
2377 end Is_Trivial_Subprogram;
2379 function Is_True_Constant (Id : E) return B is
2381 return Flag163 (Id);
2382 end Is_True_Constant;
2384 function Is_Unchecked_Union (Id : E) return B is
2386 return Flag117 (Implementation_Base_Type (Id));
2387 end Is_Unchecked_Union;
2389 function Is_Underlying_Record_View (Id : E) return B is
2391 return Flag246 (Id);
2392 end Is_Underlying_Record_View;
2394 function Is_Unsigned_Type (Id : E) return B is
2396 pragma Assert (Is_Type (Id));
2397 return Flag144 (Id);
2398 end Is_Unsigned_Type;
2400 function Is_Valued_Procedure (Id : E) return B is
2402 pragma Assert (Ekind (Id) = E_Procedure);
2403 return Flag127 (Id);
2404 end Is_Valued_Procedure;
2406 function Is_Visible_Formal (Id : E) return B is
2408 return Flag206 (Id);
2409 end Is_Visible_Formal;
2411 function Is_Visible_Lib_Unit (Id : E) return B is
2413 return Flag116 (Id);
2414 end Is_Visible_Lib_Unit;
2416 function Is_VMS_Exception (Id : E) return B is
2418 return Flag133 (Id);
2419 end Is_VMS_Exception;
2421 function Is_Volatile (Id : E) return B is
2423 pragma Assert (Nkind (Id) in N_Entity);
2425 if Is_Type (Id) then
2426 return Flag16 (Base_Type (Id));
2432 function Itype_Printed (Id : E) return B is
2434 pragma Assert (Is_Itype (Id));
2435 return Flag202 (Id);
2438 function Kill_Elaboration_Checks (Id : E) return B is
2441 end Kill_Elaboration_Checks;
2443 function Kill_Range_Checks (Id : E) return B is
2446 end Kill_Range_Checks;
2448 function Known_To_Have_Preelab_Init (Id : E) return B is
2450 pragma Assert (Is_Type (Id));
2451 return Flag207 (Id);
2452 end Known_To_Have_Preelab_Init;
2454 function Last_Aggregate_Assignment (Id : E) return N is
2456 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2458 end Last_Aggregate_Assignment;
2460 function Last_Assignment (Id : E) return N is
2462 pragma Assert (Is_Assignable (Id));
2464 end Last_Assignment;
2466 function Last_Entity (Id : E) return E is
2471 function Limited_View (Id : E) return E is
2473 pragma Assert (Ekind (Id) = E_Package);
2477 function Linker_Section_Pragma (Id : E) return N is
2480 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2482 end Linker_Section_Pragma;
2484 function Lit_Indexes (Id : E) return E is
2486 pragma Assert (Is_Enumeration_Type (Id));
2490 function Lit_Strings (Id : E) return E is
2492 pragma Assert (Is_Enumeration_Type (Id));
2496 function Low_Bound_Tested (Id : E) return B is
2498 return Flag205 (Id);
2499 end Low_Bound_Tested;
2501 function Machine_Radix_10 (Id : E) return B is
2503 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2505 end Machine_Radix_10;
2507 function Master_Id (Id : E) return E is
2509 pragma Assert (Is_Access_Type (Id));
2513 function Materialize_Entity (Id : E) return B is
2515 return Flag168 (Id);
2516 end Materialize_Entity;
2518 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2520 return Flag262 (Id);
2521 end May_Inherit_Delayed_Rep_Aspects;
2523 function Mechanism (Id : E) return M is
2525 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2526 return UI_To_Int (Uint8 (Id));
2529 function Modulus (Id : E) return Uint is
2531 pragma Assert (Is_Modular_Integer_Type (Id));
2532 return Uint17 (Base_Type (Id));
2535 function Must_Be_On_Byte_Boundary (Id : E) return B is
2537 pragma Assert (Is_Type (Id));
2538 return Flag183 (Id);
2539 end Must_Be_On_Byte_Boundary;
2541 function Must_Have_Preelab_Init (Id : E) return B is
2543 pragma Assert (Is_Type (Id));
2544 return Flag208 (Id);
2545 end Must_Have_Preelab_Init;
2547 function Needs_Debug_Info (Id : E) return B is
2549 return Flag147 (Id);
2550 end Needs_Debug_Info;
2552 function Needs_No_Actuals (Id : E) return B is
2555 (Is_Overloadable (Id)
2556 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2558 end Needs_No_Actuals;
2560 function Never_Set_In_Source (Id : E) return B is
2562 return Flag115 (Id);
2563 end Never_Set_In_Source;
2565 function Next_Inlined_Subprogram (Id : E) return E is
2568 end Next_Inlined_Subprogram;
2570 function No_Pool_Assigned (Id : E) return B is
2572 pragma Assert (Is_Access_Type (Id));
2573 return Flag131 (Root_Type (Id));
2574 end No_Pool_Assigned;
2576 function No_Return (Id : E) return B is
2578 return Flag113 (Id);
2581 function No_Strict_Aliasing (Id : E) return B is
2583 pragma Assert (Is_Access_Type (Id));
2584 return Flag136 (Base_Type (Id));
2585 end No_Strict_Aliasing;
2587 function Non_Binary_Modulus (Id : E) return B is
2589 pragma Assert (Is_Type (Id));
2590 return Flag58 (Base_Type (Id));
2591 end Non_Binary_Modulus;
2593 function Non_Limited_View (Id : E) return E is
2596 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2598 end Non_Limited_View;
2600 function Nonzero_Is_True (Id : E) return B is
2602 pragma Assert (Root_Type (Id) = Standard_Boolean);
2603 return Flag162 (Base_Type (Id));
2604 end Nonzero_Is_True;
2606 function Normalized_First_Bit (Id : E) return U is
2608 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2610 end Normalized_First_Bit;
2612 function Normalized_Position (Id : E) return U is
2614 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2616 end Normalized_Position;
2618 function Normalized_Position_Max (Id : E) return U is
2620 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2622 end Normalized_Position_Max;
2624 function OK_To_Rename (Id : E) return B is
2626 pragma Assert (Ekind (Id) = E_Variable);
2627 return Flag247 (Id);
2630 function OK_To_Reorder_Components (Id : E) return B is
2632 pragma Assert (Is_Record_Type (Id));
2633 return Flag239 (Base_Type (Id));
2634 end OK_To_Reorder_Components;
2636 function Optimize_Alignment_Space (Id : E) return B is
2639 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2640 return Flag241 (Id);
2641 end Optimize_Alignment_Space;
2643 function Optimize_Alignment_Time (Id : E) return B is
2646 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2647 return Flag242 (Id);
2648 end Optimize_Alignment_Time;
2650 function Original_Access_Type (Id : E) return E is
2652 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2654 end Original_Access_Type;
2656 function Original_Array_Type (Id : E) return E is
2658 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2660 end Original_Array_Type;
2662 function Original_Record_Component (Id : E) return E is
2664 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2666 end Original_Record_Component;
2668 function Overlays_Constant (Id : E) return B is
2670 return Flag243 (Id);
2671 end Overlays_Constant;
2673 function Overridden_Operation (Id : E) return E is
2676 end Overridden_Operation;
2678 function Package_Instantiation (Id : E) return N is
2680 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2682 end Package_Instantiation;
2684 function Packed_Array_Impl_Type (Id : E) return E is
2686 pragma Assert (Is_Array_Type (Id));
2688 end Packed_Array_Impl_Type;
2690 function Parent_Subtype (Id : E) return E is
2692 pragma Assert (Is_Record_Type (Id));
2693 return Node19 (Base_Type (Id));
2696 function Part_Of_Constituents (Id : E) return L is
2698 pragma Assert (Ekind (Id) = E_Abstract_State);
2700 end Part_Of_Constituents;
2702 function Postcondition_Proc (Id : E) return E is
2704 pragma Assert (Ekind (Id) = E_Procedure);
2706 end Postcondition_Proc;
2708 function PPC_Wrapper (Id : E) return E is
2710 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2714 function Prival (Id : E) return E is
2716 pragma Assert (Is_Protected_Component (Id));
2720 function Prival_Link (Id : E) return E is
2722 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2726 function Private_Dependents (Id : E) return L is
2728 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2729 return Elist18 (Id);
2730 end Private_Dependents;
2732 function Private_View (Id : E) return N is
2734 pragma Assert (Is_Private_Type (Id));
2738 function Protected_Body_Subprogram (Id : E) return E is
2740 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2742 end Protected_Body_Subprogram;
2744 function Protected_Formal (Id : E) return E is
2746 pragma Assert (Is_Formal (Id));
2748 end Protected_Formal;
2750 function Protection_Object (Id : E) return E is
2753 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2755 end Protection_Object;
2757 function Reachable (Id : E) return B is
2762 function Referenced (Id : E) return B is
2764 return Flag156 (Id);
2767 function Referenced_As_LHS (Id : E) return B is
2770 end Referenced_As_LHS;
2772 function Referenced_As_Out_Parameter (Id : E) return B is
2774 return Flag227 (Id);
2775 end Referenced_As_Out_Parameter;
2777 function Refinement_Constituents (Id : E) return L is
2779 pragma Assert (Ekind (Id) = E_Abstract_State);
2781 end Refinement_Constituents;
2783 function Register_Exception_Call (Id : E) return N is
2785 pragma Assert (Ekind (Id) = E_Exception);
2787 end Register_Exception_Call;
2789 function Related_Array_Object (Id : E) return E is
2791 pragma Assert (Is_Array_Type (Id));
2793 end Related_Array_Object;
2795 function Related_Expression (Id : E) return N is
2797 pragma Assert (Ekind (Id) in Type_Kind
2798 or else Ekind_In (Id, E_Constant, E_Variable));
2800 end Related_Expression;
2802 function Related_Instance (Id : E) return E is
2804 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2806 end Related_Instance;
2808 function Related_Type (Id : E) return E is
2810 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2814 function Relative_Deadline_Variable (Id : E) return E is
2816 pragma Assert (Is_Task_Type (Id));
2817 return Node26 (Implementation_Base_Type (Id));
2818 end Relative_Deadline_Variable;
2820 function Renamed_Entity (Id : E) return N is
2825 function Renamed_In_Spec (Id : E) return B is
2827 pragma Assert (Ekind (Id) = E_Package);
2828 return Flag231 (Id);
2829 end Renamed_In_Spec;
2831 function Renamed_Object (Id : E) return N is
2836 function Renaming_Map (Id : E) return U is
2841 function Requires_Overriding (Id : E) return B is
2843 pragma Assert (Is_Overloadable (Id));
2844 return Flag213 (Id);
2845 end Requires_Overriding;
2847 function Return_Present (Id : E) return B is
2852 function Return_Applies_To (Id : E) return N is
2855 end Return_Applies_To;
2857 function Returns_By_Ref (Id : E) return B is
2862 function Reverse_Bit_Order (Id : E) return B is
2864 pragma Assert (Is_Record_Type (Id));
2865 return Flag164 (Base_Type (Id));
2866 end Reverse_Bit_Order;
2868 function Reverse_Storage_Order (Id : E) return B is
2870 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2871 return Flag93 (Base_Type (Id));
2872 end Reverse_Storage_Order;
2874 function RM_Size (Id : E) return U is
2876 pragma Assert (Is_Type (Id));
2880 function Scalar_Range (Id : E) return N is
2885 function Scale_Value (Id : E) return U is
2890 function Scope_Depth_Value (Id : E) return U is
2893 end Scope_Depth_Value;
2895 function Sec_Stack_Needed_For_Return (Id : E) return B is
2897 return Flag167 (Id);
2898 end Sec_Stack_Needed_For_Return;
2900 function Shadow_Entities (Id : E) return S is
2902 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2904 end Shadow_Entities;
2906 function Shared_Var_Procs_Instance (Id : E) return E is
2908 pragma Assert (Ekind (Id) = E_Variable);
2910 end Shared_Var_Procs_Instance;
2912 function Size_Check_Code (Id : E) return N is
2914 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2916 end Size_Check_Code;
2918 function Size_Depends_On_Discriminant (Id : E) return B is
2920 return Flag177 (Id);
2921 end Size_Depends_On_Discriminant;
2923 function Size_Known_At_Compile_Time (Id : E) return B is
2926 end Size_Known_At_Compile_Time;
2928 function Small_Value (Id : E) return R is
2930 pragma Assert (Is_Fixed_Point_Type (Id));
2931 return Ureal21 (Id);
2934 function SPARK_Aux_Pragma (Id : E) return N is
2937 (Ekind_In (Id, E_Generic_Package, -- package variants
2941 end SPARK_Aux_Pragma;
2943 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2946 (Ekind_In (Id, E_Generic_Package, -- package variants
2949 return Flag266 (Id);
2950 end SPARK_Aux_Pragma_Inherited;
2952 function SPARK_Pragma (Id : E) return N is
2955 (Ekind_In (Id, E_Function, -- subprogram variants
2957 E_Generic_Procedure,
2961 Ekind_In (Id, E_Generic_Package, -- package variants
2967 function SPARK_Pragma_Inherited (Id : E) return B is
2970 (Ekind_In (Id, E_Function, -- subprogram variants
2972 E_Generic_Procedure,
2976 Ekind_In (Id, E_Generic_Package, -- package variants
2979 return Flag265 (Id);
2980 end SPARK_Pragma_Inherited;
2982 function Spec_Entity (Id : E) return E is
2984 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2988 function SSO_Set_High_By_Default (Id : E) return B is
2990 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2991 return Flag273 (Base_Type (Id));
2992 end SSO_Set_High_By_Default;
2994 function SSO_Set_Low_By_Default (Id : E) return B is
2996 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2997 return Flag272 (Base_Type (Id));
2998 end SSO_Set_Low_By_Default;
3000 function Static_Discrete_Predicate (Id : E) return S is
3002 pragma Assert (Is_Discrete_Type (Id));
3004 end Static_Discrete_Predicate;
3006 function Static_Real_Or_String_Predicate (Id : E) return N is
3008 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3010 end Static_Real_Or_String_Predicate;
3012 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3014 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3016 end Status_Flag_Or_Transient_Decl;
3018 function Storage_Size_Variable (Id : E) return E is
3020 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3021 return Node15 (Implementation_Base_Type (Id));
3022 end Storage_Size_Variable;
3024 function Static_Elaboration_Desired (Id : E) return B is
3026 pragma Assert (Ekind (Id) = E_Package);
3028 end Static_Elaboration_Desired;
3030 function Static_Initialization (Id : E) return N is
3033 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3035 end Static_Initialization;
3037 function Stored_Constraint (Id : E) return L is
3040 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3041 return Elist23 (Id);
3042 end Stored_Constraint;
3044 function Stores_Attribute_Old_Prefix (Id : E) return B is
3046 return Flag270 (Id);
3047 end Stores_Attribute_Old_Prefix;
3049 function Strict_Alignment (Id : E) return B is
3051 return Flag145 (Implementation_Base_Type (Id));
3052 end Strict_Alignment;
3054 function String_Literal_Length (Id : E) return U is
3057 end String_Literal_Length;
3059 function String_Literal_Low_Bound (Id : E) return N is
3062 end String_Literal_Low_Bound;
3064 function Subprograms_For_Type (Id : E) return E is
3066 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3068 end Subprograms_For_Type;
3070 function Suppress_Elaboration_Warnings (Id : E) return B is
3072 return Flag148 (Id);
3073 end Suppress_Elaboration_Warnings;
3075 function Suppress_Initialization (Id : E) return B is
3077 pragma Assert (Is_Type (Id));
3078 return Flag105 (Id);
3079 end Suppress_Initialization;
3081 function Suppress_Style_Checks (Id : E) return B is
3083 return Flag165 (Id);
3084 end Suppress_Style_Checks;
3086 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3088 return Flag217 (Id);
3089 end Suppress_Value_Tracking_On_Call;
3091 function Task_Body_Procedure (Id : E) return N is
3093 pragma Assert (Ekind (Id) in Task_Kind);
3095 end Task_Body_Procedure;
3097 function Thunk_Entity (Id : E) return E is
3099 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3100 and then Is_Thunk (Id));
3104 function Treat_As_Volatile (Id : E) return B is
3107 end Treat_As_Volatile;
3109 function Underlying_Full_View (Id : E) return E is
3111 pragma Assert (Ekind (Id) in Private_Kind);
3113 end Underlying_Full_View;
3115 function Underlying_Record_View (Id : E) return E is
3118 end Underlying_Record_View;
3120 function Universal_Aliasing (Id : E) return B is
3122 pragma Assert (Is_Type (Id));
3123 return Flag216 (Implementation_Base_Type (Id));
3124 end Universal_Aliasing;
3126 function Unset_Reference (Id : E) return N is
3129 end Unset_Reference;
3131 function Used_As_Generic_Actual (Id : E) return B is
3133 return Flag222 (Id);
3134 end Used_As_Generic_Actual;
3136 function Uses_Lock_Free (Id : E) return B is
3138 pragma Assert (Is_Protected_Type (Id));
3139 return Flag188 (Id);
3142 function Uses_Sec_Stack (Id : E) return B is
3147 function Warnings_Off (Id : E) return B is
3152 function Warnings_Off_Used (Id : E) return B is
3154 return Flag236 (Id);
3155 end Warnings_Off_Used;
3157 function Warnings_Off_Used_Unmodified (Id : E) return B is
3159 return Flag237 (Id);
3160 end Warnings_Off_Used_Unmodified;
3162 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3164 return Flag238 (Id);
3165 end Warnings_Off_Used_Unreferenced;
3167 function Wrapped_Entity (Id : E) return E is
3169 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3170 and then Is_Primitive_Wrapper (Id));
3174 function Was_Hidden (Id : E) return B is
3176 return Flag196 (Id);
3179 ------------------------------
3180 -- Classification Functions --
3181 ------------------------------
3183 function Is_Access_Type (Id : E) return B is
3185 return Ekind (Id) in Access_Kind;
3188 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3190 return Ekind (Id) in Access_Protected_Kind;
3191 end Is_Access_Protected_Subprogram_Type;
3193 function Is_Access_Subprogram_Type (Id : E) return B is
3195 return Ekind (Id) in Access_Subprogram_Kind;
3196 end Is_Access_Subprogram_Type;
3198 function Is_Aggregate_Type (Id : E) return B is
3200 return Ekind (Id) in Aggregate_Kind;
3201 end Is_Aggregate_Type;
3203 function Is_Array_Type (Id : E) return B is
3205 return Ekind (Id) in Array_Kind;
3208 function Is_Assignable (Id : E) return B is
3210 return Ekind (Id) in Assignable_Kind;
3213 function Is_Class_Wide_Type (Id : E) return B is
3215 return Ekind (Id) in Class_Wide_Kind;
3216 end Is_Class_Wide_Type;
3218 function Is_Composite_Type (Id : E) return B is
3220 return Ekind (Id) in Composite_Kind;
3221 end Is_Composite_Type;
3223 function Is_Concurrent_Body (Id : E) return B is
3225 return Ekind (Id) in
3226 Concurrent_Body_Kind;
3227 end Is_Concurrent_Body;
3229 function Is_Concurrent_Record_Type (Id : E) return B is
3232 end Is_Concurrent_Record_Type;
3234 function Is_Concurrent_Type (Id : E) return B is
3236 return Ekind (Id) in Concurrent_Kind;
3237 end Is_Concurrent_Type;
3239 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3241 return Ekind (Id) in
3242 Decimal_Fixed_Point_Kind;
3243 end Is_Decimal_Fixed_Point_Type;
3245 function Is_Digits_Type (Id : E) return B is
3247 return Ekind (Id) in Digits_Kind;
3250 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3252 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3253 end Is_Discrete_Or_Fixed_Point_Type;
3255 function Is_Discrete_Type (Id : E) return B is
3257 return Ekind (Id) in Discrete_Kind;
3258 end Is_Discrete_Type;
3260 function Is_Elementary_Type (Id : E) return B is
3262 return Ekind (Id) in Elementary_Kind;
3263 end Is_Elementary_Type;
3265 function Is_Entry (Id : E) return B is
3267 return Ekind (Id) in Entry_Kind;
3270 function Is_Enumeration_Type (Id : E) return B is
3272 return Ekind (Id) in
3274 end Is_Enumeration_Type;
3276 function Is_Fixed_Point_Type (Id : E) return B is
3278 return Ekind (Id) in
3280 end Is_Fixed_Point_Type;
3282 function Is_Floating_Point_Type (Id : E) return B is
3284 return Ekind (Id) in Float_Kind;
3285 end Is_Floating_Point_Type;
3287 function Is_Formal (Id : E) return B is
3289 return Ekind (Id) in Formal_Kind;
3292 function Is_Formal_Object (Id : E) return B is
3294 return Ekind (Id) in Formal_Object_Kind;
3295 end Is_Formal_Object;
3297 function Is_Generic_Subprogram (Id : E) return B is
3299 return Ekind (Id) in Generic_Subprogram_Kind;
3300 end Is_Generic_Subprogram;
3302 function Is_Generic_Unit (Id : E) return B is
3304 return Ekind (Id) in Generic_Unit_Kind;
3305 end Is_Generic_Unit;
3307 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3309 return Ekind (Id) in
3310 Incomplete_Or_Private_Kind;
3311 end Is_Incomplete_Or_Private_Type;
3313 function Is_Incomplete_Type (Id : E) return B is
3315 return Ekind (Id) in
3317 end Is_Incomplete_Type;
3319 function Is_Integer_Type (Id : E) return B is
3321 return Ekind (Id) in Integer_Kind;
3322 end Is_Integer_Type;
3324 function Is_Modular_Integer_Type (Id : E) return B is
3326 return Ekind (Id) in
3327 Modular_Integer_Kind;
3328 end Is_Modular_Integer_Type;
3330 function Is_Named_Number (Id : E) return B is
3332 return Ekind (Id) in Named_Kind;
3333 end Is_Named_Number;
3335 function Is_Numeric_Type (Id : E) return B is
3337 return Ekind (Id) in Numeric_Kind;
3338 end Is_Numeric_Type;
3340 function Is_Object (Id : E) return B is
3342 return Ekind (Id) in Object_Kind;
3345 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3347 return Ekind (Id) in
3348 Ordinary_Fixed_Point_Kind;
3349 end Is_Ordinary_Fixed_Point_Type;
3351 function Is_Overloadable (Id : E) return B is
3353 return Ekind (Id) in Overloadable_Kind;
3354 end Is_Overloadable;
3356 function Is_Private_Type (Id : E) return B is
3358 return Ekind (Id) in Private_Kind;
3359 end Is_Private_Type;
3361 function Is_Protected_Type (Id : E) return B is
3363 return Ekind (Id) in Protected_Kind;
3364 end Is_Protected_Type;
3366 function Is_Real_Type (Id : E) return B is
3368 return Ekind (Id) in Real_Kind;
3371 function Is_Record_Type (Id : E) return B is
3373 return Ekind (Id) in Record_Kind;
3376 function Is_Scalar_Type (Id : E) return B is
3378 return Ekind (Id) in Scalar_Kind;
3381 function Is_Signed_Integer_Type (Id : E) return B is
3383 return Ekind (Id) in Signed_Integer_Kind;
3384 end Is_Signed_Integer_Type;
3386 function Is_Subprogram (Id : E) return B is
3388 return Ekind (Id) in Subprogram_Kind;
3391 function Is_Task_Type (Id : E) return B is
3393 return Ekind (Id) in Task_Kind;
3396 function Is_Type (Id : E) return B is
3398 return Ekind (Id) in Type_Kind;
3401 ------------------------------
3402 -- Attribute Set Procedures --
3403 ------------------------------
3405 -- Note: in many of these set procedures an "obvious" assertion is missing.
3406 -- The reason for this is that in many cases, a field is set before the
3407 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3408 -- it is possible to add assertions that specifically include the E_Void
3409 -- possibility, but in some cases, we just omit the assertions.
3411 procedure Set_Abstract_States (Id : E; V : L) is
3413 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3414 Set_Elist25 (Id, V);
3415 end Set_Abstract_States;
3417 procedure Set_Accept_Address (Id : E; V : L) is
3419 Set_Elist21 (Id, V);
3420 end Set_Accept_Address;
3422 procedure Set_Access_Disp_Table (Id : E; V : L) is
3424 pragma Assert (Ekind (Id) = E_Record_Type
3425 and then Id = Implementation_Base_Type (Id));
3426 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3427 Set_Elist16 (Id, V);
3428 end Set_Access_Disp_Table;
3430 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3433 end Set_Associated_Formal_Package;
3435 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3438 end Set_Associated_Node_For_Itype;
3440 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3442 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3444 end Set_Associated_Storage_Pool;
3446 procedure Set_Actual_Subtype (Id : E; V : E) is
3449 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3450 or else Is_Formal (Id));
3452 end Set_Actual_Subtype;
3454 procedure Set_Address_Taken (Id : E; V : B := True) is
3456 Set_Flag104 (Id, V);
3457 end Set_Address_Taken;
3459 procedure Set_Alias (Id : E; V : E) is
3462 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3466 procedure Set_Alignment (Id : E; V : U) is
3468 pragma Assert (Is_Type (Id)
3469 or else Is_Formal (Id)
3470 or else Ekind_In (Id, E_Loop_Parameter,
3477 procedure Set_Barrier_Function (Id : E; V : N) is
3479 pragma Assert (Is_Entry (Id));
3481 end Set_Barrier_Function;
3483 procedure Set_Block_Node (Id : E; V : N) is
3485 pragma Assert (Ekind (Id) = E_Block);
3489 procedure Set_Body_Entity (Id : E; V : E) is
3491 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3493 end Set_Body_Entity;
3495 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3498 (Ekind (Id) = E_Package
3499 or else Is_Subprogram (Id)
3500 or else Is_Generic_Unit (Id));
3502 end Set_Body_Needed_For_SAL;
3504 procedure Set_Body_References (Id : E; V : L) is
3506 pragma Assert (Ekind (Id) = E_Abstract_State);
3507 Set_Elist16 (Id, V);
3508 end Set_Body_References;
3510 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3512 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3514 end Set_BIP_Initialization_Call;
3516 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3518 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3519 Set_Flag125 (Id, V);
3520 end Set_C_Pass_By_Copy;
3522 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3525 end Set_Can_Never_Be_Null;
3527 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3530 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3531 Set_Flag229 (Id, V);
3532 end Set_Can_Use_Internal_Rep;
3534 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3537 end Set_Checks_May_Be_Suppressed;
3539 procedure Set_Class_Wide_Type (Id : E; V : E) is
3541 pragma Assert (Is_Type (Id));
3543 end Set_Class_Wide_Type;
3545 procedure Set_Cloned_Subtype (Id : E; V : E) is
3547 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3549 end Set_Cloned_Subtype;
3551 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3553 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3555 end Set_Component_Bit_Offset;
3557 procedure Set_Component_Clause (Id : E; V : N) is
3559 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3561 end Set_Component_Clause;
3563 procedure Set_Component_Size (Id : E; V : U) is
3565 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3567 end Set_Component_Size;
3569 procedure Set_Component_Type (Id : E; V : E) is
3571 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3573 end Set_Component_Type;
3575 procedure Set_Contract (Id : E; V : N) is
3578 (Ekind_In (Id, E_Entry,
3586 or else Is_Generic_Subprogram (Id)
3587 or else Is_Subprogram (Id));
3591 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3594 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3596 end Set_Corresponding_Concurrent_Type;
3598 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3600 pragma Assert (Ekind (Id) = E_Discriminant);
3602 end Set_Corresponding_Discriminant;
3604 procedure Set_Corresponding_Equality (Id : E; V : E) is
3607 (Ekind (Id) = E_Function
3608 and then not Comes_From_Source (Id)
3609 and then Chars (Id) = Name_Op_Ne);
3611 end Set_Corresponding_Equality;
3613 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3615 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3617 end Set_Corresponding_Protected_Entry;
3619 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3621 pragma Assert (Is_Concurrent_Type (Id));
3623 end Set_Corresponding_Record_Type;
3625 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3628 end Set_Corresponding_Remote_Type;
3630 procedure Set_Current_Use_Clause (Id : E; V : E) is
3632 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3634 end Set_Current_Use_Clause;
3636 procedure Set_Current_Value (Id : E; V : N) is
3638 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3640 end Set_Current_Value;
3642 procedure Set_CR_Discriminant (Id : E; V : E) is
3645 end Set_CR_Discriminant;
3647 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3649 Set_Flag166 (Id, V);
3650 end Set_Debug_Info_Off;
3652 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3655 end Set_Debug_Renaming_Link;
3657 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3659 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3661 end Set_Default_Aspect_Component_Value;
3663 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3665 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3667 end Set_Default_Aspect_Value;
3669 procedure Set_Default_Expr_Function (Id : E; V : E) is
3671 pragma Assert (Is_Formal (Id));
3673 end Set_Default_Expr_Function;
3675 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3677 Set_Flag108 (Id, V);
3678 end Set_Default_Expressions_Processed;
3680 procedure Set_Default_Value (Id : E; V : N) is
3682 pragma Assert (Is_Formal (Id));
3684 end Set_Default_Value;
3686 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3690 or else Is_Task_Type (Id)
3691 or else Ekind (Id) = E_Block);
3692 Set_Flag114 (Id, V);
3693 end Set_Delay_Cleanups;
3695 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3698 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3701 end Set_Delay_Subprogram_Descriptors;
3703 procedure Set_Delta_Value (Id : E; V : R) is
3705 pragma Assert (Is_Fixed_Point_Type (Id));
3706 Set_Ureal18 (Id, V);
3707 end Set_Delta_Value;
3709 procedure Set_Dependent_Instances (Id : E; V : L) is
3711 pragma Assert (Is_Generic_Instance (Id));
3713 end Set_Dependent_Instances;
3715 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3717 pragma Assert (Nkind (Id) in N_Entity);
3719 end Set_Depends_On_Private;
3721 procedure Set_Derived_Type_Link (Id : E; V : E) is
3723 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3725 end Set_Derived_Type_Link;
3727 procedure Set_Digits_Value (Id : E; V : U) is
3730 (Is_Floating_Point_Type (Id)
3731 or else Is_Decimal_Fixed_Point_Type (Id));
3733 end Set_Digits_Value;
3735 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3738 end Set_Directly_Designated_Type;
3740 procedure Set_Discard_Names (Id : E; V : B := True) is
3743 end Set_Discard_Names;
3745 procedure Set_Discriminal (Id : E; V : E) is
3747 pragma Assert (Ekind (Id) = E_Discriminant);
3749 end Set_Discriminal;
3751 procedure Set_Discriminal_Link (Id : E; V : E) is
3754 end Set_Discriminal_Link;
3756 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3758 pragma Assert (Ekind (Id) = E_Component);
3760 end Set_Discriminant_Checking_Func;
3762 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3764 pragma Assert (Nkind (Id) in N_Entity);
3765 Set_Elist21 (Id, V);
3766 end Set_Discriminant_Constraint;
3768 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3771 end Set_Discriminant_Default_Value;
3773 procedure Set_Discriminant_Number (Id : E; V : U) is
3776 end Set_Discriminant_Number;
3778 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3780 pragma Assert (Ekind (Id) = E_Record_Type
3781 and then Id = Implementation_Base_Type (Id));
3782 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3783 Set_Elist26 (Id, V);
3784 end Set_Dispatch_Table_Wrappers;
3786 procedure Set_DT_Entry_Count (Id : E; V : U) is
3788 pragma Assert (Ekind (Id) = E_Component);
3790 end Set_DT_Entry_Count;
3792 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3794 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3796 end Set_DT_Offset_To_Top_Func;
3798 procedure Set_DT_Position (Id : E; V : U) is
3800 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3802 end Set_DT_Position;
3804 procedure Set_DTC_Entity (Id : E; V : E) is
3806 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3810 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3812 pragma Assert (Ekind (Id) = E_Package);
3813 Set_Flag210 (Id, V);
3814 end Set_Elaborate_Body_Desirable;
3816 procedure Set_Elaboration_Entity (Id : E; V : E) is
3821 Ekind (Id) = E_Package
3823 Is_Generic_Unit (Id));
3825 end Set_Elaboration_Entity;
3827 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3832 Ekind (Id) = E_Package
3834 Is_Generic_Unit (Id));
3835 Set_Flag174 (Id, V);
3836 end Set_Elaboration_Entity_Required;
3838 procedure Set_Encapsulating_State (Id : E; V : E) is
3840 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3842 end Set_Encapsulating_State;
3844 procedure Set_Enclosing_Scope (Id : E; V : E) is
3847 end Set_Enclosing_Scope;
3849 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3851 pragma Assert (Is_Entry (Id));
3852 Set_Flag152 (Id, V);
3853 end Set_Entry_Accepted;
3855 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3858 end Set_Entry_Bodies_Array;
3860 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3863 end Set_Entry_Cancel_Parameter;
3865 procedure Set_Entry_Component (Id : E; V : E) is
3868 end Set_Entry_Component;
3870 procedure Set_Entry_Formal (Id : E; V : E) is
3873 end Set_Entry_Formal;
3875 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3877 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3879 end Set_Entry_Index_Constant;
3881 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3884 end Set_Entry_Parameters_Type;
3886 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3888 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3890 end Set_Enum_Pos_To_Rep;
3892 procedure Set_Enumeration_Pos (Id : E; V : U) is
3894 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3896 end Set_Enumeration_Pos;
3898 procedure Set_Enumeration_Rep (Id : E; V : U) is
3900 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3902 end Set_Enumeration_Rep;
3904 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3906 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3908 end Set_Enumeration_Rep_Expr;
3910 procedure Set_Equivalent_Type (Id : E; V : E) is
3913 (Ekind_In (Id, E_Class_Wide_Type,
3914 E_Class_Wide_Subtype,
3915 E_Access_Protected_Subprogram_Type,
3916 E_Anonymous_Access_Protected_Subprogram_Type,
3917 E_Access_Subprogram_Type,
3920 end Set_Equivalent_Type;
3922 procedure Set_Esize (Id : E; V : U) is
3927 procedure Set_Exception_Code (Id : E; V : U) is
3929 pragma Assert (Ekind (Id) = E_Exception);
3931 end Set_Exception_Code;
3933 procedure Set_Extra_Accessibility (Id : E; V : E) is
3936 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3938 end Set_Extra_Accessibility;
3940 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3942 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3944 end Set_Extra_Accessibility_Of_Result;
3946 procedure Set_Extra_Constrained (Id : E; V : E) is
3948 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3950 end Set_Extra_Constrained;
3952 procedure Set_Extra_Formal (Id : E; V : E) is
3955 end Set_Extra_Formal;
3957 procedure Set_Extra_Formals (Id : E; V : E) is
3960 (Is_Overloadable (Id)
3961 or else Ekind_In (Id, E_Entry_Family,
3963 E_Subprogram_Type));
3965 end Set_Extra_Formals;
3967 procedure Set_Finalization_Master (Id : E; V : E) is
3969 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3971 end Set_Finalization_Master;
3973 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3975 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3976 Set_Flag158 (Id, V);
3977 end Set_Finalize_Storage_Only;
3979 procedure Set_Finalizer (Id : E; V : E) is
3981 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3985 procedure Set_First_Entity (Id : E; V : E) is
3988 end Set_First_Entity;
3990 procedure Set_First_Exit_Statement (Id : E; V : N) is
3992 pragma Assert (Ekind (Id) = E_Loop);
3994 end Set_First_Exit_Statement;
3996 procedure Set_First_Index (Id : E; V : N) is
3998 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4000 end Set_First_Index;
4002 procedure Set_First_Literal (Id : E; V : E) is
4004 pragma Assert (Is_Enumeration_Type (Id));
4006 end Set_First_Literal;
4008 procedure Set_First_Optional_Parameter (Id : E; V : E) is
4010 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4012 end Set_First_Optional_Parameter;
4014 procedure Set_First_Private_Entity (Id : E; V : E) is
4016 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4017 or else Ekind (Id) in Concurrent_Kind);
4019 end Set_First_Private_Entity;
4021 procedure Set_First_Rep_Item (Id : E; V : N) is
4024 end Set_First_Rep_Item;
4026 procedure Set_Float_Rep (Id : E; V : F) is
4027 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4029 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4032 procedure Set_Freeze_Node (Id : E; V : N) is
4035 end Set_Freeze_Node;
4037 procedure Set_From_Limited_With (Id : E; V : B := True) is
4040 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4041 Set_Flag159 (Id, V);
4042 end Set_From_Limited_With;
4044 procedure Set_Full_View (Id : E; V : E) is
4046 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4050 procedure Set_Generic_Homonym (Id : E; V : E) is
4053 end Set_Generic_Homonym;
4055 procedure Set_Generic_Renamings (Id : E; V : L) is
4057 Set_Elist23 (Id, V);
4058 end Set_Generic_Renamings;
4060 procedure Set_Handler_Records (Id : E; V : S) is
4063 end Set_Handler_Records;
4065 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4067 pragma Assert (Id = Base_Type (Id));
4068 Set_Flag135 (Id, V);
4069 end Set_Has_Aliased_Components;
4071 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4074 end Set_Has_Alignment_Clause;
4076 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4079 end Set_Has_All_Calls_Remote;
4081 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4084 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4085 Set_Flag253 (Id, V);
4086 end Set_Has_Anonymous_Master;
4088 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4090 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4092 end Set_Has_Atomic_Components;
4094 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4097 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4098 Set_Flag139 (Id, V);
4099 end Set_Has_Biased_Representation;
4101 procedure Set_Has_Completion (Id : E; V : B := True) is
4104 end Set_Has_Completion;
4106 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4108 pragma Assert (Is_Type (Id));
4110 end Set_Has_Completion_In_Body;
4112 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4114 pragma Assert (Ekind (Id) = E_Record_Type);
4115 Set_Flag140 (Id, V);
4116 end Set_Has_Complex_Representation;
4118 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4120 pragma Assert (Ekind (Id) = E_Array_Type);
4122 end Set_Has_Component_Size_Clause;
4124 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4126 pragma Assert (Is_Type (Id));
4127 Set_Flag187 (Id, V);
4128 end Set_Has_Constrained_Partial_View;
4130 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4132 Set_Flag181 (Id, V);
4133 end Set_Has_Contiguous_Rep;
4135 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4137 pragma Assert (Id = Base_Type (Id));
4139 end Set_Has_Controlled_Component;
4141 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4144 end Set_Has_Controlling_Result;
4146 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4148 Set_Flag119 (Id, V);
4149 end Set_Has_Convention_Pragma;
4151 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4154 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4155 and then Is_Base_Type (Id));
4157 end Set_Has_Default_Aspect;
4159 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4161 pragma Assert (Nkind (Id) in N_Entity);
4162 Set_Flag200 (Id, V);
4163 end Set_Has_Delayed_Aspects;
4165 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4167 pragma Assert (Nkind (Id) in N_Entity);
4169 end Set_Has_Delayed_Freeze;
4171 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4173 pragma Assert (Nkind (Id) in N_Entity);
4174 Set_Flag261 (Id, V);
4175 end Set_Has_Delayed_Rep_Aspects;
4177 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4179 pragma Assert (Nkind (Id) in N_Entity);
4181 end Set_Has_Discriminants;
4183 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4185 pragma Assert (Ekind (Id) = E_Record_Type
4186 and then Is_Tagged_Type (Id));
4187 Set_Flag220 (Id, V);
4188 end Set_Has_Dispatch_Table;
4190 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4192 pragma Assert (Is_Type (Id));
4193 Set_Flag258 (Id, V);
4194 end Set_Has_Dynamic_Predicate_Aspect;
4196 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4198 pragma Assert (Is_Enumeration_Type (Id));
4200 end Set_Has_Enumeration_Rep_Clause;
4202 procedure Set_Has_Exit (Id : E; V : B := True) is
4207 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4209 Set_Flag175 (Id, V);
4210 end Set_Has_Forward_Instantiation;
4212 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4214 Set_Flag173 (Id, V);
4215 end Set_Has_Fully_Qualified_Name;
4217 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4220 end Set_Has_Gigi_Rep_Item;
4222 procedure Set_Has_Homonym (Id : E; V : B := True) is
4225 end Set_Has_Homonym;
4227 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4229 Set_Flag251 (Id, V);
4230 end Set_Has_Implicit_Dereference;
4232 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4234 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4235 and then Is_Base_Type (Id));
4237 end Set_Has_Independent_Components;
4239 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4241 pragma Assert (Is_Type (Id));
4242 Set_Flag248 (Id, V);
4243 end Set_Has_Inheritable_Invariants;
4245 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4247 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4248 Set_Flag219 (Id, V);
4249 end Set_Has_Initial_Value;
4251 procedure Set_Has_Invariants (Id : E; V : B := True) is
4253 pragma Assert (Is_Type (Id));
4254 Set_Flag232 (Id, V);
4255 end Set_Has_Invariants;
4257 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4259 pragma Assert (Ekind (Id) = E_Loop);
4260 Set_Flag260 (Id, V);
4261 end Set_Has_Loop_Entry_Attributes;
4263 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4265 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4267 end Set_Has_Machine_Radix_Clause;
4269 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4272 end Set_Has_Master_Entity;
4274 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4276 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4277 Set_Flag142 (Id, V);
4278 end Set_Has_Missing_Return;
4280 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4282 Set_Flag101 (Id, V);
4283 end Set_Has_Nested_Block_With_Handler;
4285 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4287 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4288 Set_Flag215 (Id, V);
4289 end Set_Has_Up_Level_Access;
4291 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4293 pragma Assert (Id = Base_Type (Id));
4295 end Set_Has_Non_Standard_Rep;
4297 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4299 pragma Assert (Is_Type (Id));
4300 Set_Flag172 (Id, V);
4301 end Set_Has_Object_Size_Clause;
4303 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4305 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4306 Set_Flag110 (Id, V);
4307 end Set_Has_Out_Or_In_Out_Parameter;
4309 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4311 Set_Flag154 (Id, V);
4312 end Set_Has_Per_Object_Constraint;
4314 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4316 pragma Assert (Is_Subprogram (Id));
4317 Set_Flag240 (Id, V);
4318 end Set_Has_Postconditions;
4320 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4322 pragma Assert (Is_Access_Type (Id));
4323 Set_Flag27 (Base_Type (Id), V);
4324 end Set_Has_Pragma_Controlled;
4326 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4328 Set_Flag150 (Id, V);
4329 end Set_Has_Pragma_Elaborate_Body;
4331 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4333 Set_Flag157 (Id, V);
4334 end Set_Has_Pragma_Inline;
4336 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4338 Set_Flag230 (Id, V);
4339 end Set_Has_Pragma_Inline_Always;
4341 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4343 Set_Flag201 (Id, V);
4344 end Set_Has_Pragma_No_Inline;
4346 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4348 pragma Assert (Is_Enumeration_Type (Id));
4349 pragma Assert (Id = Base_Type (Id));
4350 Set_Flag198 (Id, V);
4351 end Set_Has_Pragma_Ordered;
4353 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4355 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4356 pragma Assert (Id = Base_Type (Id));
4357 Set_Flag121 (Id, V);
4358 end Set_Has_Pragma_Pack;
4360 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4362 Set_Flag221 (Id, V);
4363 end Set_Has_Pragma_Preelab_Init;
4365 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4367 Set_Flag203 (Id, V);
4368 end Set_Has_Pragma_Pure;
4370 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4372 Set_Flag179 (Id, V);
4373 end Set_Has_Pragma_Pure_Function;
4375 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4377 Set_Flag169 (Id, V);
4378 end Set_Has_Pragma_Thread_Local_Storage;
4380 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4382 Set_Flag233 (Id, V);
4383 end Set_Has_Pragma_Unmodified;
4385 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4387 Set_Flag180 (Id, V);
4388 end Set_Has_Pragma_Unreferenced;
4390 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4392 pragma Assert (Is_Type (Id));
4393 Set_Flag212 (Id, V);
4394 end Set_Has_Pragma_Unreferenced_Objects;
4396 procedure Set_Has_Predicates (Id : E; V : B := True) is
4398 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4399 Set_Flag250 (Id, V);
4400 end Set_Has_Predicates;
4402 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4404 pragma Assert (Id = Base_Type (Id));
4405 Set_Flag120 (Id, V);
4406 end Set_Has_Primitive_Operations;
4408 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4410 pragma Assert (Is_Type (Id));
4411 Set_Flag151 (Id, V);
4412 end Set_Has_Private_Ancestor;
4414 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4416 Set_Flag155 (Id, V);
4417 end Set_Has_Private_Declaration;
4419 procedure Set_Has_Protected (Id : E; V : B := True) is
4421 Set_Flag271 (Id, V);
4422 end Set_Has_Protected;
4424 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4426 Set_Flag161 (Id, V);
4427 end Set_Has_Qualified_Name;
4429 procedure Set_Has_RACW (Id : E; V : B := True) is
4431 pragma Assert (Ekind (Id) = E_Package);
4432 Set_Flag214 (Id, V);
4435 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4437 pragma Assert (Id = Base_Type (Id));
4439 end Set_Has_Record_Rep_Clause;
4441 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4443 pragma Assert (Is_Subprogram (Id));
4444 Set_Flag143 (Id, V);
4445 end Set_Has_Recursive_Call;
4447 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4449 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4450 Set_Flag267 (Id, V);
4451 end Set_Has_Shift_Operator;
4453 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4456 end Set_Has_Size_Clause;
4458 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4461 end Set_Has_Small_Clause;
4463 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4465 pragma Assert (Id = Base_Type (Id));
4466 Set_Flag100 (Id, V);
4467 end Set_Has_Specified_Layout;
4469 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4471 pragma Assert (Is_Type (Id));
4472 Set_Flag190 (Id, V);
4473 end Set_Has_Specified_Stream_Input;
4475 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4477 pragma Assert (Is_Type (Id));
4478 Set_Flag191 (Id, V);
4479 end Set_Has_Specified_Stream_Output;
4481 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4483 pragma Assert (Is_Type (Id));
4484 Set_Flag192 (Id, V);
4485 end Set_Has_Specified_Stream_Read;
4487 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4489 pragma Assert (Is_Type (Id));
4490 Set_Flag193 (Id, V);
4491 end Set_Has_Specified_Stream_Write;
4493 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4495 Set_Flag211 (Id, V);
4496 end Set_Has_Static_Discriminants;
4498 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4500 pragma Assert (Is_Type (Id));
4501 Set_Flag269 (Id, V);
4502 end Set_Has_Static_Predicate;
4504 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4506 pragma Assert (Is_Type (Id));
4507 Set_Flag259 (Id, V);
4508 end Set_Has_Static_Predicate_Aspect;
4510 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4512 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4513 pragma Assert (Id = Base_Type (Id));
4515 end Set_Has_Storage_Size_Clause;
4517 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4519 pragma Assert (Is_Elementary_Type (Id));
4520 Set_Flag184 (Id, V);
4521 end Set_Has_Stream_Size_Clause;
4523 procedure Set_Has_Task (Id : E; V : B := True) is
4525 pragma Assert (Id = Base_Type (Id));
4529 procedure Set_Has_Thunks (Id : E; V : B := True) is
4531 pragma Assert (Is_Tag (Id));
4532 Set_Flag228 (Id, V);
4535 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4537 pragma Assert (Id = Base_Type (Id));
4538 Set_Flag123 (Id, V);
4539 end Set_Has_Unchecked_Union;
4541 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4543 pragma Assert (Is_Type (Id));
4545 end Set_Has_Unknown_Discriminants;
4547 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4549 pragma Assert (Ekind (Id) = E_Abstract_State);
4550 Set_Flag263 (Id, V);
4551 end Set_Has_Visible_Refinement;
4553 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4555 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4557 end Set_Has_Volatile_Components;
4559 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4561 Set_Flag182 (Id, V);
4562 end Set_Has_Xref_Entry;
4564 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4566 pragma Assert (Ekind (Id) = E_Variable);
4568 end Set_Hiding_Loop_Variable;
4570 procedure Set_Homonym (Id : E; V : E) is
4572 pragma Assert (Id /= V);
4576 procedure Set_Import_Pragma (Id : E; V : E) is
4578 pragma Assert (Is_Subprogram (Id));
4580 end Set_Import_Pragma;
4582 procedure Set_Interface_Alias (Id : E; V : E) is
4586 and then Is_Hidden (Id)
4587 and then (Ekind_In (Id, E_Procedure, E_Function)));
4589 end Set_Interface_Alias;
4591 procedure Set_Interfaces (Id : E; V : L) is
4593 pragma Assert (Is_Record_Type (Id));
4594 Set_Elist25 (Id, V);
4597 procedure Set_In_Package_Body (Id : E; V : B := True) is
4600 end Set_In_Package_Body;
4602 procedure Set_In_Private_Part (Id : E; V : B := True) is
4605 end Set_In_Private_Part;
4607 procedure Set_In_Use (Id : E; V : B := True) is
4609 pragma Assert (Nkind (Id) in N_Entity);
4613 procedure Set_Initialization_Statements (Id : E; V : N) is
4615 -- Tolerate an E_Void entity since this can be called while resolving
4616 -- an aggregate used as the initialization expression for an object
4617 -- declaration, and this occurs before the Ekind for the object is set.
4619 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4621 end Set_Initialization_Statements;
4623 procedure Set_Inner_Instances (Id : E; V : L) is
4625 Set_Elist23 (Id, V);
4626 end Set_Inner_Instances;
4628 procedure Set_Interface_Name (Id : E; V : N) is
4631 end Set_Interface_Name;
4633 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4635 pragma Assert (Is_Overloadable (Id));
4637 end Set_Is_Abstract_Subprogram;
4639 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4641 pragma Assert (Is_Type (Id));
4642 Set_Flag146 (Id, V);
4643 end Set_Is_Abstract_Type;
4645 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4647 pragma Assert (Is_Access_Type (Id));
4648 Set_Flag194 (Id, V);
4649 end Set_Is_Local_Anonymous_Access;
4651 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4653 pragma Assert (Is_Access_Type (Id));
4655 end Set_Is_Access_Constant;
4657 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4659 Set_Flag185 (Id, V);
4660 end Set_Is_Ada_2005_Only;
4662 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4664 Set_Flag199 (Id, V);
4665 end Set_Is_Ada_2012_Only;
4667 procedure Set_Is_Aliased (Id : E; V : B := True) is
4669 pragma Assert (Nkind (Id) in N_Entity);
4673 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4675 pragma Assert (Is_Entry (Id));
4676 Set_Flag132 (Id, V);
4677 end Set_Is_AST_Entry;
4679 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4682 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4684 end Set_Is_Asynchronous;
4686 procedure Set_Is_Atomic (Id : E; V : B := True) is
4691 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4693 pragma Assert ((not V)
4694 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4695 Set_Flag122 (Id, V);
4696 end Set_Is_Bit_Packed_Array;
4698 procedure Set_Is_Called (Id : E; V : B := True) is
4700 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4701 Set_Flag102 (Id, V);
4704 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4707 end Set_Is_Character_Type;
4709 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4712 end Set_Is_Child_Unit;
4714 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4717 end Set_Is_Class_Wide_Equivalent_Type;
4719 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4721 Set_Flag149 (Id, V);
4722 end Set_Is_Compilation_Unit;
4724 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4726 pragma Assert (Ekind (Id) = E_Discriminant);
4727 Set_Flag103 (Id, V);
4728 end Set_Is_Completely_Hidden;
4730 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4733 end Set_Is_Concurrent_Record_Type;
4735 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4738 end Set_Is_Constr_Subt_For_U_Nominal;
4740 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4742 Set_Flag141 (Id, V);
4743 end Set_Is_Constr_Subt_For_UN_Aliased;
4745 procedure Set_Is_Constrained (Id : E; V : B := True) is
4747 pragma Assert (Nkind (Id) in N_Entity);
4749 end Set_Is_Constrained;
4751 procedure Set_Is_Constructor (Id : E; V : B := True) is
4754 end Set_Is_Constructor;
4756 procedure Set_Is_Controlled (Id : E; V : B := True) is
4758 pragma Assert (Id = Base_Type (Id));
4760 end Set_Is_Controlled;
4762 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4764 pragma Assert (Is_Formal (Id));
4766 end Set_Is_Controlling_Formal;
4768 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4771 end Set_Is_CPP_Class;
4773 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4775 pragma Assert (Is_Type (Id));
4776 Set_Flag223 (Id, V);
4777 end Set_Is_Descendent_Of_Address;
4779 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4781 Set_Flag176 (Id, V);
4782 end Set_Is_Discrim_SO_Function;
4784 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4786 Set_Flag264 (Id, V);
4787 end Set_Is_Discriminant_Check_Function;
4789 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4791 Set_Flag234 (Id, V);
4792 end Set_Is_Dispatch_Table_Entity;
4794 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4799 Is_Overloadable (Id)
4801 Ekind (Id) = E_Subprogram_Type);
4804 end Set_Is_Dispatching_Operation;
4806 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4808 Set_Flag124 (Id, V);
4809 end Set_Is_Eliminated;
4811 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4814 end Set_Is_Entry_Formal;
4816 procedure Set_Is_Exported (Id : E; V : B := True) is
4819 end Set_Is_Exported;
4821 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4824 end Set_Is_First_Subtype;
4826 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4828 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4829 Set_Flag118 (Id, V);
4830 end Set_Is_For_Access_Subtype;
4832 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4834 Set_Flag111 (Id, V);
4835 end Set_Is_Formal_Subprogram;
4837 procedure Set_Is_Frozen (Id : E; V : B := True) is
4839 pragma Assert (Nkind (Id) in N_Entity);
4843 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4845 pragma Assert (Is_Type (Id));
4847 end Set_Is_Generic_Actual_Type;
4849 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4851 Set_Flag130 (Id, V);
4852 end Set_Is_Generic_Instance;
4854 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4856 pragma Assert (Nkind (Id) in N_Entity);
4858 end Set_Is_Generic_Type;
4860 procedure Set_Is_Hidden (Id : E; V : B := True) is
4865 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4867 Set_Flag171 (Id, V);
4868 end Set_Is_Hidden_Open_Scope;
4870 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4872 pragma Assert (Nkind (Id) in N_Entity);
4874 end Set_Is_Immediately_Visible;
4876 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4878 Set_Flag254 (Id, V);
4879 end Set_Is_Implementation_Defined;
4881 procedure Set_Is_Imported (Id : E; V : B := True) is
4884 end Set_Is_Imported;
4886 procedure Set_Is_Independent (Id : E; V : B := True) is
4888 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4889 Set_Flag268 (Id, V);
4890 end Set_Is_Independent;
4892 procedure Set_Is_Inlined (Id : E; V : B := True) is
4897 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4899 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4901 end Set_Is_Inlined_Always;
4903 procedure Set_Is_Interface (Id : E; V : B := True) is
4905 pragma Assert (Is_Record_Type (Id));
4906 Set_Flag186 (Id, V);
4907 end Set_Is_Interface;
4909 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4911 Set_Flag126 (Id, V);
4912 end Set_Is_Instantiated;
4914 procedure Set_Is_Internal (Id : E; V : B := True) is
4916 pragma Assert (Nkind (Id) in N_Entity);
4918 end Set_Is_Internal;
4920 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4922 pragma Assert (Nkind (Id) in N_Entity);
4924 end Set_Is_Interrupt_Handler;
4926 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4929 end Set_Is_Intrinsic_Subprogram;
4931 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4933 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4934 Set_Flag257 (Id, V);
4935 end Set_Is_Invariant_Procedure;
4937 procedure Set_Is_Itype (Id : E; V : B := True) is
4942 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4945 end Set_Is_Known_Non_Null;
4947 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4949 Set_Flag204 (Id, V);
4950 end Set_Is_Known_Null;
4952 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4954 Set_Flag170 (Id, V);
4955 end Set_Is_Known_Valid;
4957 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4959 pragma Assert (Is_Type (Id));
4960 Set_Flag106 (Id, V);
4961 end Set_Is_Limited_Composite;
4963 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4965 pragma Assert (Is_Interface (Id));
4966 Set_Flag197 (Id, V);
4967 end Set_Is_Limited_Interface;
4969 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4972 end Set_Is_Limited_Record;
4974 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4976 pragma Assert (Is_Subprogram (Id));
4977 Set_Flag137 (Id, V);
4978 end Set_Is_Machine_Code_Subprogram;
4980 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4982 pragma Assert (Is_Type (Id));
4983 Set_Flag109 (Id, V);
4984 end Set_Is_Non_Static_Subtype;
4986 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4988 pragma Assert (Ekind (Id) = E_Procedure);
4989 Set_Flag178 (Id, V);
4990 end Set_Is_Null_Init_Proc;
4992 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4994 Set_Flag153 (Id, V);
4995 end Set_Is_Obsolescent;
4997 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4999 pragma Assert (Ekind (Id) = E_Out_Parameter);
5000 Set_Flag226 (Id, V);
5001 end Set_Is_Only_Out_Parameter;
5003 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
5005 pragma Assert (Is_Formal (Id));
5006 Set_Flag134 (Id, V);
5007 end Set_Is_Optional_Parameter;
5009 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5011 Set_Flag160 (Id, V);
5012 end Set_Is_Package_Body_Entity;
5014 procedure Set_Is_Packed (Id : E; V : B := True) is
5016 pragma Assert (Id = Base_Type (Id));
5020 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5022 Set_Flag138 (Id, V);
5023 end Set_Is_Packed_Array_Impl_Type;
5025 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5027 pragma Assert (Nkind (Id) in N_Entity);
5029 end Set_Is_Potentially_Use_Visible;
5031 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5033 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5034 Set_Flag255 (Id, V);
5035 end Set_Is_Predicate_Function;
5037 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5039 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5040 Set_Flag256 (Id, V);
5041 end Set_Is_Predicate_Function_M;
5043 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5046 end Set_Is_Preelaborated;
5048 procedure Set_Is_Primitive (Id : E; V : B := True) is
5051 (Is_Overloadable (Id)
5052 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5053 Set_Flag218 (Id, V);
5054 end Set_Is_Primitive;
5056 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5058 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5059 Set_Flag195 (Id, V);
5060 end Set_Is_Primitive_Wrapper;
5062 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5064 pragma Assert (Is_Type (Id));
5065 Set_Flag107 (Id, V);
5066 end Set_Is_Private_Composite;
5068 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5071 end Set_Is_Private_Descendant;
5073 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5075 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5076 Set_Flag245 (Id, V);
5077 end Set_Is_Private_Primitive;
5079 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5081 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5082 Set_Flag252 (Id, V);
5083 end Set_Is_Processed_Transient;
5085 procedure Set_Is_Public (Id : E; V : B := True) is
5087 pragma Assert (Nkind (Id) in N_Entity);
5091 procedure Set_Is_Pure (Id : E; V : B := True) is
5096 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5098 pragma Assert (Is_Access_Type (Id));
5099 Set_Flag189 (Id, V);
5100 end Set_Is_Pure_Unit_Access_Type;
5102 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5104 pragma Assert (Is_Type (Id));
5105 Set_Flag244 (Id, V);
5106 end Set_Is_RACW_Stub_Type;
5108 procedure Set_Is_Raised (Id : E; V : B := True) is
5110 pragma Assert (Ekind (Id) = E_Exception);
5111 Set_Flag224 (Id, V);
5114 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5117 end Set_Is_Remote_Call_Interface;
5119 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5122 end Set_Is_Remote_Types;
5124 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5126 Set_Flag112 (Id, V);
5127 end Set_Is_Renaming_Of_Object;
5129 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5131 Set_Flag209 (Id, V);
5132 end Set_Is_Return_Object;
5134 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5136 pragma Assert (Ekind (Id) = E_Variable);
5137 Set_Flag249 (Id, V);
5138 end Set_Is_Safe_To_Reevaluate;
5140 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5143 end Set_Is_Shared_Passive;
5145 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5149 or else Ekind_In (Id, E_Exception,
5154 end Set_Is_Statically_Allocated;
5156 procedure Set_Is_Tag (Id : E; V : B := True) is
5158 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5162 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5165 end Set_Is_Tagged_Type;
5167 procedure Set_Is_Thunk (Id : E; V : B := True) is
5169 pragma Assert (Is_Subprogram (Id));
5170 Set_Flag225 (Id, V);
5173 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5175 Set_Flag235 (Id, V);
5176 end Set_Is_Trivial_Subprogram;
5178 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5180 Set_Flag163 (Id, V);
5181 end Set_Is_True_Constant;
5183 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5185 pragma Assert (Id = Base_Type (Id));
5186 Set_Flag117 (Id, V);
5187 end Set_Is_Unchecked_Union;
5189 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5191 pragma Assert (Ekind (Id) = E_Record_Type);
5192 Set_Flag246 (Id, V);
5193 end Set_Is_Underlying_Record_View;
5195 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5197 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5198 Set_Flag144 (Id, V);
5199 end Set_Is_Unsigned_Type;
5201 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5203 pragma Assert (Ekind (Id) = E_Procedure);
5204 Set_Flag127 (Id, V);
5205 end Set_Is_Valued_Procedure;
5207 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5209 Set_Flag206 (Id, V);
5210 end Set_Is_Visible_Formal;
5212 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5214 Set_Flag116 (Id, V);
5215 end Set_Is_Visible_Lib_Unit;
5217 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5219 pragma Assert (Ekind (Id) = E_Exception);
5220 Set_Flag133 (Id, V);
5221 end Set_Is_VMS_Exception;
5223 procedure Set_Is_Volatile (Id : E; V : B := True) is
5225 pragma Assert (Nkind (Id) in N_Entity);
5227 end Set_Is_Volatile;
5229 procedure Set_Itype_Printed (Id : E; V : B := True) is
5231 pragma Assert (Is_Itype (Id));
5232 Set_Flag202 (Id, V);
5233 end Set_Itype_Printed;
5235 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5238 end Set_Kill_Elaboration_Checks;
5240 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5243 end Set_Kill_Range_Checks;
5245 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5247 pragma Assert (Is_Type (Id));
5248 Set_Flag207 (Id, V);
5249 end Set_Known_To_Have_Preelab_Init;
5251 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5253 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5255 end Set_Last_Aggregate_Assignment;
5257 procedure Set_Last_Assignment (Id : E; V : N) is
5259 pragma Assert (Is_Assignable (Id));
5261 end Set_Last_Assignment;
5263 procedure Set_Last_Entity (Id : E; V : E) is
5266 end Set_Last_Entity;
5268 procedure Set_Limited_View (Id : E; V : E) is
5270 pragma Assert (Ekind (Id) = E_Package);
5272 end Set_Limited_View;
5274 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5276 pragma Assert (Is_Type (Id)
5277 or else Ekind_In (Id, E_Constant, E_Variable)
5278 or else Is_Subprogram (Id));
5280 end Set_Linker_Section_Pragma;
5282 procedure Set_Lit_Indexes (Id : E; V : E) is
5284 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5286 end Set_Lit_Indexes;
5288 procedure Set_Lit_Strings (Id : E; V : E) is
5290 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5292 end Set_Lit_Strings;
5294 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5296 pragma Assert (Is_Formal (Id));
5297 Set_Flag205 (Id, V);
5298 end Set_Low_Bound_Tested;
5300 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5302 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5304 end Set_Machine_Radix_10;
5306 procedure Set_Master_Id (Id : E; V : E) is
5308 pragma Assert (Is_Access_Type (Id));
5312 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5314 Set_Flag168 (Id, V);
5315 end Set_Materialize_Entity;
5317 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5319 Set_Flag262 (Id, V);
5320 end Set_May_Inherit_Delayed_Rep_Aspects;
5322 procedure Set_Mechanism (Id : E; V : M) is
5324 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5325 Set_Uint8 (Id, UI_From_Int (V));
5328 procedure Set_Modulus (Id : E; V : U) is
5330 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5334 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5336 pragma Assert (Is_Type (Id));
5337 Set_Flag183 (Id, V);
5338 end Set_Must_Be_On_Byte_Boundary;
5340 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5342 pragma Assert (Is_Type (Id));
5343 Set_Flag208 (Id, V);
5344 end Set_Must_Have_Preelab_Init;
5346 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5348 Set_Flag147 (Id, V);
5349 end Set_Needs_Debug_Info;
5351 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5354 (Is_Overloadable (Id)
5355 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5357 end Set_Needs_No_Actuals;
5359 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5361 Set_Flag115 (Id, V);
5362 end Set_Never_Set_In_Source;
5364 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5367 end Set_Next_Inlined_Subprogram;
5369 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5371 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5372 Set_Flag131 (Id, V);
5373 end Set_No_Pool_Assigned;
5375 procedure Set_No_Return (Id : E; V : B := True) is
5378 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5379 Set_Flag113 (Id, V);
5382 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5384 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5385 Set_Flag136 (Id, V);
5386 end Set_No_Strict_Aliasing;
5388 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5390 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5392 end Set_Non_Binary_Modulus;
5394 procedure Set_Non_Limited_View (Id : E; V : E) is
5397 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5399 end Set_Non_Limited_View;
5401 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5404 (Root_Type (Id) = Standard_Boolean
5405 and then Ekind (Id) = E_Enumeration_Type);
5406 Set_Flag162 (Id, V);
5407 end Set_Nonzero_Is_True;
5409 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5411 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5413 end Set_Normalized_First_Bit;
5415 procedure Set_Normalized_Position (Id : E; V : U) is
5417 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5419 end Set_Normalized_Position;
5421 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5423 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5425 end Set_Normalized_Position_Max;
5427 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5429 pragma Assert (Ekind (Id) = E_Variable);
5430 Set_Flag247 (Id, V);
5431 end Set_OK_To_Rename;
5433 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5436 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5437 Set_Flag239 (Id, V);
5438 end Set_OK_To_Reorder_Components;
5440 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5443 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5444 Set_Flag241 (Id, V);
5445 end Set_Optimize_Alignment_Space;
5447 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5450 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5451 Set_Flag242 (Id, V);
5452 end Set_Optimize_Alignment_Time;
5454 procedure Set_Original_Access_Type (Id : E; V : E) is
5456 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5458 end Set_Original_Access_Type;
5460 procedure Set_Original_Array_Type (Id : E; V : E) is
5462 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5464 end Set_Original_Array_Type;
5466 procedure Set_Original_Record_Component (Id : E; V : E) is
5468 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5470 end Set_Original_Record_Component;
5472 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5474 Set_Flag243 (Id, V);
5475 end Set_Overlays_Constant;
5477 procedure Set_Overridden_Operation (Id : E; V : E) is
5480 end Set_Overridden_Operation;
5482 procedure Set_Package_Instantiation (Id : E; V : N) is
5484 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5486 end Set_Package_Instantiation;
5488 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5490 pragma Assert (Is_Array_Type (Id));
5492 end Set_Packed_Array_Impl_Type;
5494 procedure Set_Parent_Subtype (Id : E; V : E) is
5496 pragma Assert (Ekind (Id) = E_Record_Type);
5498 end Set_Parent_Subtype;
5500 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5502 pragma Assert (Ekind (Id) = E_Abstract_State);
5504 end Set_Part_Of_Constituents;
5506 procedure Set_Postcondition_Proc (Id : E; V : E) is
5508 pragma Assert (Ekind (Id) = E_Procedure);
5510 end Set_Postcondition_Proc;
5512 procedure Set_PPC_Wrapper (Id : E; V : E) is
5514 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5516 end Set_PPC_Wrapper;
5518 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5520 pragma Assert (Is_Tagged_Type (Id));
5521 Set_Elist10 (Id, V);
5522 end Set_Direct_Primitive_Operations;
5524 procedure Set_Prival (Id : E; V : E) is
5526 pragma Assert (Is_Protected_Component (Id));
5530 procedure Set_Prival_Link (Id : E; V : E) is
5532 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5534 end Set_Prival_Link;
5536 procedure Set_Private_Dependents (Id : E; V : L) is
5538 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5539 Set_Elist18 (Id, V);
5540 end Set_Private_Dependents;
5542 procedure Set_Private_View (Id : E; V : N) is
5544 pragma Assert (Is_Private_Type (Id));
5546 end Set_Private_View;
5548 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5550 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5552 end Set_Protected_Body_Subprogram;
5554 procedure Set_Protected_Formal (Id : E; V : E) is
5556 pragma Assert (Is_Formal (Id));
5558 end Set_Protected_Formal;
5560 procedure Set_Protection_Object (Id : E; V : E) is
5562 pragma Assert (Ekind_In (Id, E_Entry,
5567 end Set_Protection_Object;
5569 procedure Set_Reachable (Id : E; V : B := True) is
5574 procedure Set_Referenced (Id : E; V : B := True) is
5576 Set_Flag156 (Id, V);
5579 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5582 end Set_Referenced_As_LHS;
5584 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5586 Set_Flag227 (Id, V);
5587 end Set_Referenced_As_Out_Parameter;
5589 procedure Set_Refinement_Constituents (Id : E; V : L) is
5591 pragma Assert (Ekind (Id) = E_Abstract_State);
5593 end Set_Refinement_Constituents;
5595 procedure Set_Register_Exception_Call (Id : E; V : N) is
5597 pragma Assert (Ekind (Id) = E_Exception);
5599 end Set_Register_Exception_Call;
5601 procedure Set_Related_Array_Object (Id : E; V : E) is
5603 pragma Assert (Is_Array_Type (Id));
5605 end Set_Related_Array_Object;
5607 procedure Set_Related_Expression (Id : E; V : N) is
5609 pragma Assert (Ekind (Id) in Type_Kind
5610 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5612 end Set_Related_Expression;
5614 procedure Set_Related_Instance (Id : E; V : E) is
5616 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5618 end Set_Related_Instance;
5620 procedure Set_Related_Type (Id : E; V : E) is
5622 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5624 end Set_Related_Type;
5626 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5628 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5630 end Set_Relative_Deadline_Variable;
5632 procedure Set_Renamed_Entity (Id : E; V : N) is
5635 end Set_Renamed_Entity;
5637 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5639 pragma Assert (Ekind (Id) = E_Package);
5640 Set_Flag231 (Id, V);
5641 end Set_Renamed_In_Spec;
5643 procedure Set_Renamed_Object (Id : E; V : N) is
5646 end Set_Renamed_Object;
5648 procedure Set_Renaming_Map (Id : E; V : U) is
5651 end Set_Renaming_Map;
5653 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5655 pragma Assert (Is_Overloadable (Id));
5656 Set_Flag213 (Id, V);
5657 end Set_Requires_Overriding;
5659 procedure Set_Return_Present (Id : E; V : B := True) is
5662 end Set_Return_Present;
5664 procedure Set_Return_Applies_To (Id : E; V : N) is
5667 end Set_Return_Applies_To;
5669 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5672 end Set_Returns_By_Ref;
5674 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5677 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5678 Set_Flag164 (Id, V);
5679 end Set_Reverse_Bit_Order;
5681 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5685 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5687 end Set_Reverse_Storage_Order;
5689 procedure Set_RM_Size (Id : E; V : U) is
5691 pragma Assert (Is_Type (Id));
5695 procedure Set_Scalar_Range (Id : E; V : N) is
5698 end Set_Scalar_Range;
5700 procedure Set_Scale_Value (Id : E; V : U) is
5703 end Set_Scale_Value;
5705 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5707 pragma Assert (not Is_Record_Type (Id));
5709 end Set_Scope_Depth_Value;
5711 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5713 Set_Flag167 (Id, V);
5714 end Set_Sec_Stack_Needed_For_Return;
5716 procedure Set_Shadow_Entities (Id : E; V : S) is
5718 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5720 end Set_Shadow_Entities;
5722 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5724 pragma Assert (Ekind (Id) = E_Variable);
5726 end Set_Shared_Var_Procs_Instance;
5728 procedure Set_Size_Check_Code (Id : E; V : N) is
5730 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5732 end Set_Size_Check_Code;
5734 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5736 Set_Flag177 (Id, V);
5737 end Set_Size_Depends_On_Discriminant;
5739 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5742 end Set_Size_Known_At_Compile_Time;
5744 procedure Set_Small_Value (Id : E; V : R) is
5746 pragma Assert (Is_Fixed_Point_Type (Id));
5747 Set_Ureal21 (Id, V);
5748 end Set_Small_Value;
5750 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5753 (Ekind_In (Id, E_Generic_Package, -- package variants
5758 end Set_SPARK_Aux_Pragma;
5760 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5763 (Ekind_In (Id, E_Generic_Package, -- package variants
5767 Set_Flag266 (Id, V);
5768 end Set_SPARK_Aux_Pragma_Inherited;
5770 procedure Set_SPARK_Pragma (Id : E; V : N) is
5773 (Ekind_In (Id, E_Function, -- subprogram variants
5775 E_Generic_Procedure,
5779 Ekind_In (Id, E_Generic_Package, -- package variants
5784 end Set_SPARK_Pragma;
5786 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5789 (Ekind_In (Id, E_Function, -- subprogram variants
5791 E_Generic_Procedure,
5795 Ekind_In (Id, E_Generic_Package, -- package variants
5799 Set_Flag265 (Id, V);
5800 end Set_SPARK_Pragma_Inherited;
5802 procedure Set_Spec_Entity (Id : E; V : E) is
5804 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5806 end Set_Spec_Entity;
5808 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5812 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5813 Set_Flag273 (Id, V);
5814 end Set_SSO_Set_High_By_Default;
5816 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5820 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5821 Set_Flag272 (Id, V);
5822 end Set_SSO_Set_Low_By_Default;
5824 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5826 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5828 end Set_Static_Discrete_Predicate;
5830 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5832 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5833 and then Has_Predicates (Id));
5835 end Set_Static_Real_Or_String_Predicate;
5837 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5839 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5841 end Set_Status_Flag_Or_Transient_Decl;
5843 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5845 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5846 pragma Assert (Id = Base_Type (Id));
5848 end Set_Storage_Size_Variable;
5850 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5852 pragma Assert (Ekind (Id) = E_Package);
5854 end Set_Static_Elaboration_Desired;
5856 procedure Set_Static_Initialization (Id : E; V : N) is
5859 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5861 end Set_Static_Initialization;
5863 procedure Set_Stored_Constraint (Id : E; V : L) is
5865 pragma Assert (Nkind (Id) in N_Entity);
5866 Set_Elist23 (Id, V);
5867 end Set_Stored_Constraint;
5869 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5871 pragma Assert (Ekind (Id) = E_Constant);
5872 Set_Flag270 (Id, V);
5873 end Set_Stores_Attribute_Old_Prefix;
5875 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5877 pragma Assert (Id = Base_Type (Id));
5878 Set_Flag145 (Id, V);
5879 end Set_Strict_Alignment;
5881 procedure Set_String_Literal_Length (Id : E; V : U) is
5883 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5885 end Set_String_Literal_Length;
5887 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5889 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5891 end Set_String_Literal_Low_Bound;
5893 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5895 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5897 end Set_Subprograms_For_Type;
5899 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5901 Set_Flag148 (Id, V);
5902 end Set_Suppress_Elaboration_Warnings;
5904 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5906 pragma Assert (Is_Type (Id));
5907 Set_Flag105 (Id, V);
5908 end Set_Suppress_Initialization;
5910 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5912 Set_Flag165 (Id, V);
5913 end Set_Suppress_Style_Checks;
5915 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5917 Set_Flag217 (Id, V);
5918 end Set_Suppress_Value_Tracking_On_Call;
5920 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5922 pragma Assert (Ekind (Id) in Task_Kind);
5924 end Set_Task_Body_Procedure;
5926 procedure Set_Thunk_Entity (Id : E; V : E) is
5928 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5929 and then Is_Thunk (Id));
5931 end Set_Thunk_Entity;
5933 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5936 end Set_Treat_As_Volatile;
5938 procedure Set_Underlying_Full_View (Id : E; V : E) is
5940 pragma Assert (Ekind (Id) in Private_Kind);
5942 end Set_Underlying_Full_View;
5944 procedure Set_Underlying_Record_View (Id : E; V : E) is
5946 pragma Assert (Ekind (Id) = E_Record_Type);
5948 end Set_Underlying_Record_View;
5950 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5952 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5953 Set_Flag216 (Id, V);
5954 end Set_Universal_Aliasing;
5956 procedure Set_Unset_Reference (Id : E; V : N) is
5959 end Set_Unset_Reference;
5961 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5963 Set_Flag222 (Id, V);
5964 end Set_Used_As_Generic_Actual;
5966 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5968 pragma Assert (Ekind (Id) = E_Protected_Type);
5969 Set_Flag188 (Id, V);
5970 end Set_Uses_Lock_Free;
5972 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5975 end Set_Uses_Sec_Stack;
5977 procedure Set_Warnings_Off (Id : E; V : B := True) is
5980 end Set_Warnings_Off;
5982 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5984 Set_Flag236 (Id, V);
5985 end Set_Warnings_Off_Used;
5987 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5989 Set_Flag237 (Id, V);
5990 end Set_Warnings_Off_Used_Unmodified;
5992 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5994 Set_Flag238 (Id, V);
5995 end Set_Warnings_Off_Used_Unreferenced;
5997 procedure Set_Was_Hidden (Id : E; V : B := True) is
5999 Set_Flag196 (Id, V);
6002 procedure Set_Wrapped_Entity (Id : E; V : E) is
6004 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6005 and then Is_Primitive_Wrapper (Id));
6007 end Set_Wrapped_Entity;
6009 -----------------------------------
6010 -- Field Initialization Routines --
6011 -----------------------------------
6013 procedure Init_Alignment (Id : E) is
6015 Set_Uint14 (Id, Uint_0);
6018 procedure Init_Alignment (Id : E; V : Int) is
6020 Set_Uint14 (Id, UI_From_Int (V));
6023 procedure Init_Component_Bit_Offset (Id : E) is
6025 Set_Uint11 (Id, No_Uint);
6026 end Init_Component_Bit_Offset;
6028 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6030 Set_Uint11 (Id, UI_From_Int (V));
6031 end Init_Component_Bit_Offset;
6033 procedure Init_Component_Size (Id : E) is
6035 Set_Uint22 (Id, Uint_0);
6036 end Init_Component_Size;
6038 procedure Init_Component_Size (Id : E; V : Int) is
6040 Set_Uint22 (Id, UI_From_Int (V));
6041 end Init_Component_Size;
6043 procedure Init_Digits_Value (Id : E) is
6045 Set_Uint17 (Id, Uint_0);
6046 end Init_Digits_Value;
6048 procedure Init_Digits_Value (Id : E; V : Int) is
6050 Set_Uint17 (Id, UI_From_Int (V));
6051 end Init_Digits_Value;
6053 procedure Init_Esize (Id : E) is
6055 Set_Uint12 (Id, Uint_0);
6058 procedure Init_Esize (Id : E; V : Int) is
6060 Set_Uint12 (Id, UI_From_Int (V));
6063 procedure Init_Normalized_First_Bit (Id : E) is
6065 Set_Uint8 (Id, No_Uint);
6066 end Init_Normalized_First_Bit;
6068 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6070 Set_Uint8 (Id, UI_From_Int (V));
6071 end Init_Normalized_First_Bit;
6073 procedure Init_Normalized_Position (Id : E) is
6075 Set_Uint14 (Id, No_Uint);
6076 end Init_Normalized_Position;
6078 procedure Init_Normalized_Position (Id : E; V : Int) is
6080 Set_Uint14 (Id, UI_From_Int (V));
6081 end Init_Normalized_Position;
6083 procedure Init_Normalized_Position_Max (Id : E) is
6085 Set_Uint10 (Id, No_Uint);
6086 end Init_Normalized_Position_Max;
6088 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6090 Set_Uint10 (Id, UI_From_Int (V));
6091 end Init_Normalized_Position_Max;
6093 procedure Init_RM_Size (Id : E) is
6095 Set_Uint13 (Id, Uint_0);
6098 procedure Init_RM_Size (Id : E; V : Int) is
6100 Set_Uint13 (Id, UI_From_Int (V));
6103 -----------------------------
6104 -- Init_Component_Location --
6105 -----------------------------
6107 procedure Init_Component_Location (Id : E) is
6109 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6110 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6111 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6112 Set_Uint12 (Id, Uint_0); -- Esize
6113 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6114 end Init_Component_Location;
6116 ----------------------------
6117 -- Init_Object_Size_Align --
6118 ----------------------------
6120 procedure Init_Object_Size_Align (Id : E) is
6122 Set_Uint12 (Id, Uint_0); -- Esize
6123 Set_Uint14 (Id, Uint_0); -- Alignment
6124 end Init_Object_Size_Align;
6130 procedure Init_Size (Id : E; V : Int) is
6132 pragma Assert (not Is_Object (Id));
6133 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6134 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6137 ---------------------
6138 -- Init_Size_Align --
6139 ---------------------
6141 procedure Init_Size_Align (Id : E) is
6143 pragma Assert (not Is_Object (Id));
6144 Set_Uint12 (Id, Uint_0); -- Esize
6145 Set_Uint13 (Id, Uint_0); -- RM_Size
6146 Set_Uint14 (Id, Uint_0); -- Alignment
6147 end Init_Size_Align;
6149 ----------------------------------------------
6150 -- Type Representation Attribute Predicates --
6151 ----------------------------------------------
6153 function Known_Alignment (E : Entity_Id) return B is
6155 return Uint14 (E) /= Uint_0
6156 and then Uint14 (E) /= No_Uint;
6157 end Known_Alignment;
6159 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6161 return Uint11 (E) /= No_Uint;
6162 end Known_Component_Bit_Offset;
6164 function Known_Component_Size (E : Entity_Id) return B is
6166 return Uint22 (Base_Type (E)) /= Uint_0
6167 and then Uint22 (Base_Type (E)) /= No_Uint;
6168 end Known_Component_Size;
6170 function Known_Esize (E : Entity_Id) return B is
6172 return Uint12 (E) /= Uint_0
6173 and then Uint12 (E) /= No_Uint;
6176 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6178 return Uint8 (E) /= No_Uint;
6179 end Known_Normalized_First_Bit;
6181 function Known_Normalized_Position (E : Entity_Id) return B is
6183 return Uint14 (E) /= No_Uint;
6184 end Known_Normalized_Position;
6186 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6188 return Uint10 (E) /= No_Uint;
6189 end Known_Normalized_Position_Max;
6191 function Known_RM_Size (E : Entity_Id) return B is
6193 return Uint13 (E) /= No_Uint
6194 and then (Uint13 (E) /= Uint_0
6195 or else Is_Discrete_Type (E)
6196 or else Is_Fixed_Point_Type (E));
6199 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6201 return Uint11 (E) /= No_Uint
6202 and then Uint11 (E) >= Uint_0;
6203 end Known_Static_Component_Bit_Offset;
6205 function Known_Static_Component_Size (E : Entity_Id) return B is
6207 return Uint22 (Base_Type (E)) > Uint_0;
6208 end Known_Static_Component_Size;
6210 function Known_Static_Esize (E : Entity_Id) return B is
6212 return Uint12 (E) > Uint_0
6213 and then not Is_Generic_Type (E);
6214 end Known_Static_Esize;
6216 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6218 return Uint8 (E) /= No_Uint
6219 and then Uint8 (E) >= Uint_0;
6220 end Known_Static_Normalized_First_Bit;
6222 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6224 return Uint14 (E) /= No_Uint
6225 and then Uint14 (E) >= Uint_0;
6226 end Known_Static_Normalized_Position;
6228 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6230 return Uint10 (E) /= No_Uint
6231 and then Uint10 (E) >= Uint_0;
6232 end Known_Static_Normalized_Position_Max;
6234 function Known_Static_RM_Size (E : Entity_Id) return B is
6236 return (Uint13 (E) > Uint_0
6237 or else Is_Discrete_Type (E)
6238 or else Is_Fixed_Point_Type (E))
6239 and then not Is_Generic_Type (E);
6240 end Known_Static_RM_Size;
6242 function Unknown_Alignment (E : Entity_Id) return B is
6244 return Uint14 (E) = Uint_0
6245 or else Uint14 (E) = No_Uint;
6246 end Unknown_Alignment;
6248 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6250 return Uint11 (E) = No_Uint;
6251 end Unknown_Component_Bit_Offset;
6253 function Unknown_Component_Size (E : Entity_Id) return B is
6255 return Uint22 (Base_Type (E)) = Uint_0
6257 Uint22 (Base_Type (E)) = No_Uint;
6258 end Unknown_Component_Size;
6260 function Unknown_Esize (E : Entity_Id) return B is
6262 return Uint12 (E) = No_Uint
6264 Uint12 (E) = Uint_0;
6267 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6269 return Uint8 (E) = No_Uint;
6270 end Unknown_Normalized_First_Bit;
6272 function Unknown_Normalized_Position (E : Entity_Id) return B is
6274 return Uint14 (E) = No_Uint;
6275 end Unknown_Normalized_Position;
6277 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6279 return Uint10 (E) = No_Uint;
6280 end Unknown_Normalized_Position_Max;
6282 function Unknown_RM_Size (E : Entity_Id) return B is
6284 return (Uint13 (E) = Uint_0
6285 and then not Is_Discrete_Type (E)
6286 and then not Is_Fixed_Point_Type (E))
6287 or else Uint13 (E) = No_Uint;
6288 end Unknown_RM_Size;
6290 --------------------
6291 -- Address_Clause --
6292 --------------------
6294 function Address_Clause (Id : E) return N is
6296 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6303 function Aft_Value (Id : E) return U is
6305 Delta_Val : Ureal := Delta_Value (Id);
6307 while Delta_Val < Ureal_Tenth loop
6308 Delta_Val := Delta_Val * Ureal_10;
6309 Result := Result + 1;
6312 return UI_From_Int (Result);
6315 ----------------------
6316 -- Alignment_Clause --
6317 ----------------------
6319 function Alignment_Clause (Id : E) return N is
6321 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6322 end Alignment_Clause;
6328 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6330 if Last_Entity (V) = Empty then
6331 Set_First_Entity (Id => V, V => Id);
6333 Set_Next_Entity (Last_Entity (V), Id);
6336 Set_Next_Entity (Id, Empty);
6338 Set_Last_Entity (Id => V, V => Id);
6345 function Base_Type (Id : E) return E is
6347 if Is_Base_Type (Id) then
6350 pragma Assert (Is_Type (Id));
6355 -------------------------
6356 -- Component_Alignment --
6357 -------------------------
6359 -- Component Alignment is encoded using two flags, Flag128/129 as
6360 -- follows. Note that both flags False = Align_Default, so that the
6361 -- default initialization of flags to False initializes component
6362 -- alignment to the default value as required.
6364 -- Flag128 Flag129 Value
6365 -- ------- ------- -----
6366 -- False False Calign_Default
6367 -- False True Calign_Component_Size
6368 -- True False Calign_Component_Size_4
6369 -- True True Calign_Storage_Unit
6371 function Component_Alignment (Id : E) return C is
6372 BT : constant Node_Id := Base_Type (Id);
6375 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6377 if Flag128 (BT) then
6378 if Flag129 (BT) then
6379 return Calign_Storage_Unit;
6381 return Calign_Component_Size_4;
6385 if Flag129 (BT) then
6386 return Calign_Component_Size;
6388 return Calign_Default;
6391 end Component_Alignment;
6393 ----------------------
6394 -- Declaration_Node --
6395 ----------------------
6397 function Declaration_Node (Id : E) return N is
6401 if Ekind (Id) = E_Incomplete_Type
6402 and then Present (Full_View (Id))
6404 P := Parent (Full_View (Id));
6410 if Nkind (P) /= N_Selected_Component
6411 and then Nkind (P) /= N_Expanded_Name
6413 not (Nkind (P) = N_Defining_Program_Unit_Name
6414 and then Is_Child_Unit (Id))
6421 end Declaration_Node;
6423 ---------------------
6424 -- Designated_Type --
6425 ---------------------
6427 function Designated_Type (Id : E) return E is
6431 Desig_Type := Directly_Designated_Type (Id);
6433 if Ekind (Desig_Type) = E_Incomplete_Type
6434 and then Present (Full_View (Desig_Type))
6436 return Full_View (Desig_Type);
6438 elsif Is_Class_Wide_Type (Desig_Type)
6439 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6440 and then Present (Full_View (Etype (Desig_Type)))
6441 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6443 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6448 end Designated_Type;
6450 ----------------------
6451 -- Entry_Index_Type --
6452 ----------------------
6454 function Entry_Index_Type (Id : E) return N is
6456 pragma Assert (Ekind (Id) = E_Entry_Family);
6457 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6458 end Entry_Index_Type;
6460 ---------------------
6461 -- First_Component --
6462 ---------------------
6464 function First_Component (Id : E) return E is
6469 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6471 Comp_Id := First_Entity (Id);
6472 while Present (Comp_Id) loop
6473 exit when Ekind (Comp_Id) = E_Component;
6474 Comp_Id := Next_Entity (Comp_Id);
6478 end First_Component;
6480 -------------------------------------
6481 -- First_Component_Or_Discriminant --
6482 -------------------------------------
6484 function First_Component_Or_Discriminant (Id : E) return E is
6489 (Is_Record_Type (Id)
6490 or else Is_Incomplete_Or_Private_Type (Id)
6491 or else Has_Discriminants (Id));
6493 Comp_Id := First_Entity (Id);
6494 while Present (Comp_Id) loop
6495 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6496 Comp_Id := Next_Entity (Comp_Id);
6500 end First_Component_Or_Discriminant;
6506 function First_Formal (Id : E) return E is
6511 (Is_Overloadable (Id)
6512 or else Ekind_In (Id, E_Entry_Family,
6514 E_Subprogram_Type));
6516 if Ekind (Id) = E_Enumeration_Literal then
6520 Formal := First_Entity (Id);
6522 if Present (Formal) and then Is_Formal (Formal) then
6530 ------------------------------
6531 -- First_Formal_With_Extras --
6532 ------------------------------
6534 function First_Formal_With_Extras (Id : E) return E is
6539 (Is_Overloadable (Id)
6540 or else Ekind_In (Id, E_Entry_Family,
6542 E_Subprogram_Type));
6544 if Ekind (Id) = E_Enumeration_Literal then
6548 Formal := First_Entity (Id);
6550 if Present (Formal) and then Is_Formal (Formal) then
6553 return Extra_Formals (Id); -- Empty if no extra formals
6556 end First_Formal_With_Extras;
6558 -------------------------------------
6559 -- Get_Attribute_Definition_Clause --
6560 -------------------------------------
6562 function Get_Attribute_Definition_Clause
6564 Id : Attribute_Id) return Node_Id
6569 N := First_Rep_Item (E);
6570 while Present (N) loop
6571 if Nkind (N) = N_Attribute_Definition_Clause
6572 and then Get_Attribute_Id (Chars (N)) = Id
6581 end Get_Attribute_Definition_Clause;
6587 function Get_Full_View (T : Entity_Id) return Entity_Id is
6589 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6590 return Full_View (T);
6592 elsif Is_Class_Wide_Type (T)
6593 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6594 and then Present (Full_View (Root_Type (T)))
6596 return Class_Wide_Type (Full_View (Root_Type (T)));
6607 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6608 Is_CDG : constant Boolean :=
6609 Id = Pragma_Abstract_State or else
6610 Id = Pragma_Async_Readers or else
6611 Id = Pragma_Async_Writers or else
6612 Id = Pragma_Depends or else
6613 Id = Pragma_Effective_Reads or else
6614 Id = Pragma_Effective_Writes or else
6615 Id = Pragma_Global or else
6616 Id = Pragma_Initial_Condition or else
6617 Id = Pragma_Initializes or else
6618 Id = Pragma_Part_Of or else
6619 Id = Pragma_Refined_Depends or else
6620 Id = Pragma_Refined_Global or else
6621 Id = Pragma_Refined_State;
6622 Is_CTC : constant Boolean :=
6623 Id = Pragma_Contract_Cases or else
6624 Id = Pragma_Test_Case;
6625 Is_PPC : constant Boolean :=
6626 Id = Pragma_Precondition or else
6627 Id = Pragma_Postcondition or else
6628 Id = Pragma_Refined_Post;
6630 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6636 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6637 -- extracted from their specialized list.
6640 Items := Contract (E);
6646 Item := Classifications (Items);
6649 Item := Contract_Test_Cases (Items);
6652 Item := Pre_Post_Conditions (Items);
6658 Item := First_Rep_Item (E);
6661 while Present (Item) loop
6662 if Nkind (Item) = N_Pragma
6663 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6667 -- All nodes in N_Contract are chained using Next_Pragma
6669 elsif In_Contract then
6670 Item := Next_Pragma (Item);
6675 Next_Rep_Item (Item);
6682 --------------------------------------
6683 -- Get_Record_Representation_Clause --
6684 --------------------------------------
6686 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6690 N := First_Rep_Item (E);
6691 while Present (N) loop
6692 if Nkind (N) = N_Record_Representation_Clause then
6700 end Get_Record_Representation_Clause;
6702 ------------------------
6703 -- Has_Attach_Handler --
6704 ------------------------
6706 function Has_Attach_Handler (Id : E) return B is
6710 pragma Assert (Is_Protected_Type (Id));
6712 Ritem := First_Rep_Item (Id);
6713 while Present (Ritem) loop
6714 if Nkind (Ritem) = N_Pragma
6715 and then Pragma_Name (Ritem) = Name_Attach_Handler
6719 Next_Rep_Item (Ritem);
6724 end Has_Attach_Handler;
6730 function Has_Entries (Id : E) return B is
6734 pragma Assert (Is_Concurrent_Type (Id));
6736 Ent := First_Entity (Id);
6737 while Present (Ent) loop
6738 if Is_Entry (Ent) then
6742 Ent := Next_Entity (Ent);
6748 ----------------------------
6749 -- Has_Foreign_Convention --
6750 ----------------------------
6752 function Has_Foreign_Convention (Id : E) return B is
6754 -- While regular Intrinsics such as the Standard operators fit in the
6755 -- "Ada" convention, those with an Interface_Name materialize GCC
6756 -- builtin imports for which Ada special treatments shouldn't apply.
6758 return Convention (Id) in Foreign_Convention
6759 or else (Convention (Id) = Convention_Intrinsic
6760 and then Present (Interface_Name (Id)));
6761 end Has_Foreign_Convention;
6763 ---------------------------
6764 -- Has_Interrupt_Handler --
6765 ---------------------------
6767 function Has_Interrupt_Handler (Id : E) return B is
6771 pragma Assert (Is_Protected_Type (Id));
6773 Ritem := First_Rep_Item (Id);
6774 while Present (Ritem) loop
6775 if Nkind (Ritem) = N_Pragma
6776 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6780 Next_Rep_Item (Ritem);
6785 end Has_Interrupt_Handler;
6787 -----------------------------
6788 -- Has_Non_Null_Refinement --
6789 -----------------------------
6791 function Has_Non_Null_Refinement (Id : E) return B is
6793 -- "Refinement" is a concept applicable only to abstract states
6795 pragma Assert (Ekind (Id) = E_Abstract_State);
6797 if Has_Visible_Refinement (Id) then
6798 pragma Assert (Present (Refinement_Constituents (Id)));
6800 -- For a refinement to be non-null, the first constituent must be
6801 -- anything other than null.
6804 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6808 end Has_Non_Null_Refinement;
6810 -----------------------------
6811 -- Has_Null_Abstract_State --
6812 -----------------------------
6814 function Has_Null_Abstract_State (Id : E) return B is
6816 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6819 Present (Abstract_States (Id))
6820 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6821 end Has_Null_Abstract_State;
6823 -------------------------
6824 -- Has_Null_Refinement --
6825 -------------------------
6827 function Has_Null_Refinement (Id : E) return B is
6829 -- "Refinement" is a concept applicable only to abstract states
6831 pragma Assert (Ekind (Id) = E_Abstract_State);
6833 if Has_Visible_Refinement (Id) then
6834 pragma Assert (Present (Refinement_Constituents (Id)));
6836 -- For a refinement to be null, the state's sole constituent must be
6840 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6844 end Has_Null_Refinement;
6846 --------------------
6847 -- Has_Unmodified --
6848 --------------------
6850 function Has_Unmodified (E : Entity_Id) return Boolean is
6852 if Has_Pragma_Unmodified (E) then
6854 elsif Warnings_Off (E) then
6855 Set_Warnings_Off_Used_Unmodified (E);
6862 ---------------------
6863 -- Has_Unreferenced --
6864 ---------------------
6866 function Has_Unreferenced (E : Entity_Id) return Boolean is
6868 if Has_Pragma_Unreferenced (E) then
6870 elsif Warnings_Off (E) then
6871 Set_Warnings_Off_Used_Unreferenced (E);
6876 end Has_Unreferenced;
6878 ----------------------
6879 -- Has_Warnings_Off --
6880 ----------------------
6882 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6884 if Warnings_Off (E) then
6885 Set_Warnings_Off_Used (E);
6890 end Has_Warnings_Off;
6892 ------------------------------
6893 -- Implementation_Base_Type --
6894 ------------------------------
6896 function Implementation_Base_Type (Id : E) return E is
6901 Bastyp := Base_Type (Id);
6903 if Is_Incomplete_Or_Private_Type (Bastyp) then
6904 Imptyp := Underlying_Type (Bastyp);
6906 -- If we have an implementation type, then just return it,
6907 -- otherwise we return the Base_Type anyway. This can only
6908 -- happen in error situations and should avoid some error bombs.
6910 if Present (Imptyp) then
6911 return Base_Type (Imptyp);
6919 end Implementation_Base_Type;
6921 -------------------------
6922 -- Invariant_Procedure --
6923 -------------------------
6925 function Invariant_Procedure (Id : E) return E is
6929 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6931 if No (Subprograms_For_Type (Id)) then
6935 S := Subprograms_For_Type (Id);
6936 while Present (S) loop
6937 if Is_Invariant_Procedure (S) then
6940 S := Subprograms_For_Type (S);
6946 end Invariant_Procedure;
6952 -- Global flag table allowing rapid computation of this function
6954 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6955 (E_Enumeration_Subtype |
6957 E_Signed_Integer_Subtype |
6958 E_Modular_Integer_Subtype |
6959 E_Floating_Point_Subtype |
6960 E_Ordinary_Fixed_Point_Subtype |
6961 E_Decimal_Fixed_Point_Subtype |
6966 E_Record_Subtype_With_Private |
6967 E_Limited_Private_Subtype |
6969 E_Protected_Subtype |
6971 E_String_Literal_Subtype |
6972 E_Class_Wide_Subtype => False,
6975 function Is_Base_Type (Id : E) return Boolean is
6977 return Entity_Is_Base_Type (Ekind (Id));
6980 ---------------------
6981 -- Is_Boolean_Type --
6982 ---------------------
6984 function Is_Boolean_Type (Id : E) return B is
6986 return Root_Type (Id) = Standard_Boolean;
6987 end Is_Boolean_Type;
6989 ------------------------
6990 -- Is_Constant_Object --
6991 ------------------------
6993 function Is_Constant_Object (Id : E) return B is
6994 K : constant Entity_Kind := Ekind (Id);
6997 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6998 end Is_Constant_Object;
7000 --------------------
7001 -- Is_Discriminal --
7002 --------------------
7004 function Is_Discriminal (Id : E) return B is
7006 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7007 and then Present (Discriminal_Link (Id)));
7010 ----------------------
7011 -- Is_Dynamic_Scope --
7012 ----------------------
7014 function Is_Dynamic_Scope (Id : E) return B is
7017 Ekind (Id) = E_Block
7019 Ekind (Id) = E_Function
7021 Ekind (Id) = E_Procedure
7023 Ekind (Id) = E_Subprogram_Body
7025 Ekind (Id) = E_Task_Type
7027 (Ekind (Id) = E_Limited_Private_Type
7028 and then Present (Full_View (Id))
7029 and then Ekind (Full_View (Id)) = E_Task_Type)
7031 Ekind (Id) = E_Entry
7033 Ekind (Id) = E_Entry_Family
7035 Ekind (Id) = E_Return_Statement;
7036 end Is_Dynamic_Scope;
7038 --------------------
7039 -- Is_Entity_Name --
7040 --------------------
7042 function Is_Entity_Name (N : Node_Id) return Boolean is
7043 Kind : constant Node_Kind := Nkind (N);
7046 -- Identifiers, operator symbols, expanded names are entity names
7048 return Kind = N_Identifier
7049 or else Kind = N_Operator_Symbol
7050 or else Kind = N_Expanded_Name
7052 -- Attribute references are entity names if they refer to an entity.
7053 -- Note that we don't do this by testing for the presence of the
7054 -- Entity field in the N_Attribute_Reference node, since it may not
7055 -- have been set yet.
7057 or else (Kind = N_Attribute_Reference
7058 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7061 -----------------------
7062 -- Is_External_State --
7063 -----------------------
7065 function Is_External_State (Id : E) return B is
7068 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7069 end Is_External_State;
7075 function Is_Finalizer (Id : E) return B is
7077 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7080 ---------------------
7081 -- Is_Ghost_Entity --
7082 ---------------------
7084 -- Note: coding below allows for ghost variables. They are not currently
7085 -- implemented, so we will always get False for variables, but that is
7086 -- expected to change in the future.
7088 function Is_Ghost_Entity (Id : E) return B is
7090 if Present (Id) and then Ekind (Id) = E_Variable then
7091 return Convention (Id) = Convention_Ghost;
7093 return Is_Ghost_Subprogram (Id);
7095 end Is_Ghost_Entity;
7097 -------------------------
7098 -- Is_Ghost_Subprogram --
7099 -------------------------
7101 function Is_Ghost_Subprogram (Id : E) return B is
7103 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7104 return Convention (Id) = Convention_Ghost;
7108 end Is_Ghost_Subprogram;
7114 function Is_Null_State (Id : E) return B is
7117 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7120 ---------------------
7121 -- Is_Packed_Array --
7122 ---------------------
7124 function Is_Packed_Array (Id : E) return B is
7126 return Is_Array_Type (Id) and then Is_Packed (Id);
7127 end Is_Packed_Array;
7129 -----------------------------------
7130 -- Is_Package_Or_Generic_Package --
7131 -----------------------------------
7133 function Is_Package_Or_Generic_Package (Id : E) return B is
7135 return Ekind_In (Id, E_Generic_Package, E_Package);
7136 end Is_Package_Or_Generic_Package;
7142 function Is_Prival (Id : E) return B is
7144 return (Ekind_In (Id, E_Constant, E_Variable)
7145 and then Present (Prival_Link (Id)));
7148 ----------------------------
7149 -- Is_Protected_Component --
7150 ----------------------------
7152 function Is_Protected_Component (Id : E) return B is
7154 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7155 end Is_Protected_Component;
7157 ----------------------------
7158 -- Is_Protected_Interface --
7159 ----------------------------
7161 function Is_Protected_Interface (Id : E) return B is
7162 Typ : constant Entity_Id := Base_Type (Id);
7164 if not Is_Interface (Typ) then
7166 elsif Is_Class_Wide_Type (Typ) then
7167 return Is_Protected_Interface (Etype (Typ));
7169 return Protected_Present (Type_Definition (Parent (Typ)));
7171 end Is_Protected_Interface;
7173 ------------------------------
7174 -- Is_Protected_Record_Type --
7175 ------------------------------
7177 function Is_Protected_Record_Type (Id : E) return B is
7180 Is_Concurrent_Record_Type (Id)
7181 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7182 end Is_Protected_Record_Type;
7184 --------------------------------
7185 -- Is_Standard_Character_Type --
7186 --------------------------------
7188 function Is_Standard_Character_Type (Id : E) return B is
7190 if Is_Type (Id) then
7192 R : constant Entity_Id := Root_Type (Id);
7195 R = Standard_Character
7197 R = Standard_Wide_Character
7199 R = Standard_Wide_Wide_Character;
7205 end Is_Standard_Character_Type;
7207 --------------------
7208 -- Is_String_Type --
7209 --------------------
7211 function Is_String_Type (Id : E) return B is
7213 return Is_Array_Type (Id)
7214 and then Id /= Any_Composite
7215 and then Number_Dimensions (Id) = 1
7216 and then Is_Character_Type (Component_Type (Id));
7219 -------------------------------
7220 -- Is_Synchronized_Interface --
7221 -------------------------------
7223 function Is_Synchronized_Interface (Id : E) return B is
7224 Typ : constant Entity_Id := Base_Type (Id);
7227 if not Is_Interface (Typ) then
7230 elsif Is_Class_Wide_Type (Typ) then
7231 return Is_Synchronized_Interface (Etype (Typ));
7234 return Protected_Present (Type_Definition (Parent (Typ)))
7235 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7236 or else Task_Present (Type_Definition (Parent (Typ)));
7238 end Is_Synchronized_Interface;
7240 -----------------------
7241 -- Is_Task_Interface --
7242 -----------------------
7244 function Is_Task_Interface (Id : E) return B is
7245 Typ : constant Entity_Id := Base_Type (Id);
7247 if not Is_Interface (Typ) then
7249 elsif Is_Class_Wide_Type (Typ) then
7250 return Is_Task_Interface (Etype (Typ));
7252 return Task_Present (Type_Definition (Parent (Typ)));
7254 end Is_Task_Interface;
7256 -------------------------
7257 -- Is_Task_Record_Type --
7258 -------------------------
7260 function Is_Task_Record_Type (Id : E) return B is
7263 Is_Concurrent_Record_Type (Id)
7264 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7265 end Is_Task_Record_Type;
7267 ------------------------
7268 -- Is_Wrapper_Package --
7269 ------------------------
7271 function Is_Wrapper_Package (Id : E) return B is
7273 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7274 end Is_Wrapper_Package;
7280 function Last_Formal (Id : E) return E is
7285 (Is_Overloadable (Id)
7286 or else Ekind_In (Id, E_Entry_Family,
7288 E_Subprogram_Type));
7290 if Ekind (Id) = E_Enumeration_Literal then
7294 Formal := First_Formal (Id);
7296 if Present (Formal) then
7297 while Present (Next_Formal (Formal)) loop
7298 Formal := Next_Formal (Formal);
7306 function Model_Emin_Value (Id : E) return Uint is
7308 return Machine_Emin_Value (Id);
7309 end Model_Emin_Value;
7311 -------------------------
7312 -- Model_Epsilon_Value --
7313 -------------------------
7315 function Model_Epsilon_Value (Id : E) return Ureal is
7316 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7318 return Radix ** (1 - Model_Mantissa_Value (Id));
7319 end Model_Epsilon_Value;
7321 --------------------------
7322 -- Model_Mantissa_Value --
7323 --------------------------
7325 function Model_Mantissa_Value (Id : E) return Uint is
7327 return Machine_Mantissa_Value (Id);
7328 end Model_Mantissa_Value;
7330 -----------------------
7331 -- Model_Small_Value --
7332 -----------------------
7334 function Model_Small_Value (Id : E) return Ureal is
7335 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7337 return Radix ** (Model_Emin_Value (Id) - 1);
7338 end Model_Small_Value;
7340 ------------------------
7341 -- Machine_Emax_Value --
7342 ------------------------
7344 function Machine_Emax_Value (Id : E) return Uint is
7345 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7348 case Float_Rep (Id) is
7351 when 1 .. 6 => return Uint_128;
7352 when 7 .. 15 => return 2**10;
7353 when 16 .. 33 => return 2**14;
7354 when others => return No_Uint;
7359 when 1 .. 9 => return 2**7 - 1;
7360 when 10 .. 15 => return 2**10 - 1;
7361 when others => return No_Uint;
7365 return Uint_2 ** Uint_7 - Uint_1;
7367 end Machine_Emax_Value;
7369 ------------------------
7370 -- Machine_Emin_Value --
7371 ------------------------
7373 function Machine_Emin_Value (Id : E) return Uint is
7375 case Float_Rep (Id) is
7376 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7377 when VAX_Native => return -Machine_Emax_Value (Id);
7378 when AAMP => return -Machine_Emax_Value (Id);
7380 end Machine_Emin_Value;
7382 ----------------------------
7383 -- Machine_Mantissa_Value --
7384 ----------------------------
7386 function Machine_Mantissa_Value (Id : E) return Uint is
7387 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7390 case Float_Rep (Id) is
7393 when 1 .. 6 => return Uint_24;
7394 when 7 .. 15 => return UI_From_Int (53);
7395 when 16 .. 18 => return Uint_64;
7396 when 19 .. 33 => return UI_From_Int (113);
7397 when others => return No_Uint;
7402 when 1 .. 6 => return Uint_24;
7403 when 7 .. 9 => return UI_From_Int (56);
7404 when 10 .. 15 => return UI_From_Int (53);
7405 when others => return No_Uint;
7410 when 1 .. 6 => return Uint_24;
7411 when 7 .. 9 => return UI_From_Int (40);
7412 when others => return No_Uint;
7415 end Machine_Mantissa_Value;
7417 -------------------------
7418 -- Machine_Radix_Value --
7419 -------------------------
7421 function Machine_Radix_Value (Id : E) return U is
7423 case Float_Rep (Id) is
7424 when IEEE_Binary | VAX_Native | AAMP =>
7427 end Machine_Radix_Value;
7429 --------------------
7430 -- Next_Component --
7431 --------------------
7433 function Next_Component (Id : E) return E is
7437 Comp_Id := Next_Entity (Id);
7438 while Present (Comp_Id) loop
7439 exit when Ekind (Comp_Id) = E_Component;
7440 Comp_Id := Next_Entity (Comp_Id);
7446 ------------------------------------
7447 -- Next_Component_Or_Discriminant --
7448 ------------------------------------
7450 function Next_Component_Or_Discriminant (Id : E) return E is
7454 Comp_Id := Next_Entity (Id);
7455 while Present (Comp_Id) loop
7456 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7457 Comp_Id := Next_Entity (Comp_Id);
7461 end Next_Component_Or_Discriminant;
7463 -----------------------
7464 -- Next_Discriminant --
7465 -----------------------
7467 -- This function actually implements both Next_Discriminant and
7468 -- Next_Stored_Discriminant by making sure that the Discriminant
7469 -- returned is of the same variety as Id.
7471 function Next_Discriminant (Id : E) return E is
7473 -- Derived Tagged types with private extensions look like this...
7475 -- E_Discriminant d1
7476 -- E_Discriminant d2
7478 -- E_Discriminant d1
7479 -- E_Discriminant d2
7482 -- so it is critical not to go past the leading discriminants
7487 pragma Assert (Ekind (Id) = E_Discriminant);
7490 D := Next_Entity (D);
7492 or else (Ekind (D) /= E_Discriminant
7493 and then not Is_Itype (D))
7498 exit when Ekind (D) = E_Discriminant
7499 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7503 end Next_Discriminant;
7509 function Next_Formal (Id : E) return E is
7513 -- Follow the chain of declared entities as long as the kind of the
7514 -- entity corresponds to a formal parameter. Skip internal entities
7515 -- that may have been created for implicit subtypes, in the process
7516 -- of analyzing default expressions.
7520 P := Next_Entity (P);
7522 if No (P) or else Is_Formal (P) then
7524 elsif not Is_Internal (P) then
7530 -----------------------------
7531 -- Next_Formal_With_Extras --
7532 -----------------------------
7534 function Next_Formal_With_Extras (Id : E) return E is
7536 if Present (Extra_Formal (Id)) then
7537 return Extra_Formal (Id);
7539 return Next_Formal (Id);
7541 end Next_Formal_With_Extras;
7547 function Next_Index (Id : Node_Id) return Node_Id is
7556 function Next_Literal (Id : E) return E is
7558 pragma Assert (Nkind (Id) in N_Entity);
7562 ------------------------------
7563 -- Next_Stored_Discriminant --
7564 ------------------------------
7566 function Next_Stored_Discriminant (Id : E) return E is
7568 -- See comment in Next_Discriminant
7570 return Next_Discriminant (Id);
7571 end Next_Stored_Discriminant;
7573 -----------------------
7574 -- Number_Dimensions --
7575 -----------------------
7577 function Number_Dimensions (Id : E) return Pos is
7582 if Ekind (Id) = E_String_Literal_Subtype then
7587 T := First_Index (Id);
7588 while Present (T) loop
7595 end Number_Dimensions;
7597 --------------------
7598 -- Number_Entries --
7599 --------------------
7601 function Number_Entries (Id : E) return Nat is
7606 pragma Assert (Is_Concurrent_Type (Id));
7609 Ent := First_Entity (Id);
7610 while Present (Ent) loop
7611 if Is_Entry (Ent) then
7615 Ent := Next_Entity (Ent);
7621 --------------------
7622 -- Number_Formals --
7623 --------------------
7625 function Number_Formals (Id : E) return Pos is
7631 Formal := First_Formal (Id);
7632 while Present (Formal) loop
7634 Formal := Next_Formal (Formal);
7640 --------------------
7641 -- Parameter_Mode --
7642 --------------------
7644 function Parameter_Mode (Id : E) return Formal_Kind is
7649 ------------------------
7650 -- Predicate_Function --
7651 ------------------------
7653 function Predicate_Function (Id : E) return E is
7658 pragma Assert (Is_Type (Id));
7660 -- If type is private and has a completion, predicate may be defined
7661 -- on the full view.
7663 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7664 T := Full_View (Id);
7669 if No (Subprograms_For_Type (T)) then
7673 S := Subprograms_For_Type (T);
7674 while Present (S) loop
7675 if Is_Predicate_Function (S) then
7678 S := Subprograms_For_Type (S);
7684 end Predicate_Function;
7686 --------------------------
7687 -- Predicate_Function_M --
7688 --------------------------
7690 function Predicate_Function_M (Id : E) return E is
7695 pragma Assert (Is_Type (Id));
7697 -- If type is private and has a completion, predicate may be defined
7698 -- on the full view.
7700 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7701 T := Full_View (Id);
7706 if No (Subprograms_For_Type (T)) then
7710 S := Subprograms_For_Type (T);
7711 while Present (S) loop
7712 if Is_Predicate_Function_M (S) then
7715 S := Subprograms_For_Type (S);
7721 end Predicate_Function_M;
7723 -------------------------
7724 -- Present_In_Rep_Item --
7725 -------------------------
7727 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7731 Ritem := First_Rep_Item (E);
7733 while Present (Ritem) loop
7738 Next_Rep_Item (Ritem);
7742 end Present_In_Rep_Item;
7744 --------------------------
7745 -- Primitive_Operations --
7746 --------------------------
7748 function Primitive_Operations (Id : E) return L is
7750 if Is_Concurrent_Type (Id) then
7751 if Present (Corresponding_Record_Type (Id)) then
7752 return Direct_Primitive_Operations
7753 (Corresponding_Record_Type (Id));
7755 -- If expansion is disabled the corresponding record type is absent,
7756 -- but if the type has ancestors it may have primitive operations.
7758 elsif Is_Tagged_Type (Id) then
7759 return Direct_Primitive_Operations (Id);
7765 return Direct_Primitive_Operations (Id);
7767 end Primitive_Operations;
7769 ---------------------
7770 -- Record_Rep_Item --
7771 ---------------------
7773 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7775 Set_Next_Rep_Item (N, First_Rep_Item (E));
7776 Set_First_Rep_Item (E, N);
7777 end Record_Rep_Item;
7783 function Root_Type (Id : E) return E is
7787 pragma Assert (Nkind (Id) in N_Entity);
7789 T := Base_Type (Id);
7791 if Ekind (T) = E_Class_Wide_Type then
7803 -- Following test catches some error cases resulting from
7806 elsif No (Etyp) then
7807 Check_Error_Detected;
7810 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7813 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7819 -- Return if there is a circularity in the inheritance chain. This
7820 -- happens in some error situations and we do not want to get
7821 -- stuck in this loop.
7823 if T = Base_Type (Id) then
7830 ---------------------
7831 -- Safe_Emax_Value --
7832 ---------------------
7834 function Safe_Emax_Value (Id : E) return Uint is
7836 return Machine_Emax_Value (Id);
7837 end Safe_Emax_Value;
7839 ----------------------
7840 -- Safe_First_Value --
7841 ----------------------
7843 function Safe_First_Value (Id : E) return Ureal is
7845 return -Safe_Last_Value (Id);
7846 end Safe_First_Value;
7848 ---------------------
7849 -- Safe_Last_Value --
7850 ---------------------
7852 function Safe_Last_Value (Id : E) return Ureal is
7853 Radix : constant Uint := Machine_Radix_Value (Id);
7854 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7855 Emax : constant Uint := Safe_Emax_Value (Id);
7856 Significand : constant Uint := Radix ** Mantissa - 1;
7857 Exponent : constant Uint := Emax - Mantissa;
7863 (Num => Significand * 2 ** (Exponent mod 4),
7864 Den => -Exponent / 4,
7870 (Num => Significand,
7874 end Safe_Last_Value;
7880 function Scope_Depth (Id : E) return Uint is
7885 while Is_Record_Type (Scop) loop
7886 Scop := Scope (Scop);
7889 return Scope_Depth_Value (Scop);
7892 ---------------------
7893 -- Scope_Depth_Set --
7894 ---------------------
7896 function Scope_Depth_Set (Id : E) return B is
7898 return not Is_Record_Type (Id)
7899 and then Field22 (Id) /= Union_Id (Empty);
7900 end Scope_Depth_Set;
7902 -----------------------------
7903 -- Set_Component_Alignment --
7904 -----------------------------
7906 -- Component Alignment is encoded using two flags, Flag128/129 as
7907 -- follows. Note that both flags False = Align_Default, so that the
7908 -- default initialization of flags to False initializes component
7909 -- alignment to the default value as required.
7911 -- Flag128 Flag129 Value
7912 -- ------- ------- -----
7913 -- False False Calign_Default
7914 -- False True Calign_Component_Size
7915 -- True False Calign_Component_Size_4
7916 -- True True Calign_Storage_Unit
7918 procedure Set_Component_Alignment (Id : E; V : C) is
7920 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7921 and then Is_Base_Type (Id));
7924 when Calign_Default =>
7925 Set_Flag128 (Id, False);
7926 Set_Flag129 (Id, False);
7928 when Calign_Component_Size =>
7929 Set_Flag128 (Id, False);
7930 Set_Flag129 (Id, True);
7932 when Calign_Component_Size_4 =>
7933 Set_Flag128 (Id, True);
7934 Set_Flag129 (Id, False);
7936 when Calign_Storage_Unit =>
7937 Set_Flag128 (Id, True);
7938 Set_Flag129 (Id, True);
7940 end Set_Component_Alignment;
7942 -----------------------------
7943 -- Set_Invariant_Procedure --
7944 -----------------------------
7946 procedure Set_Invariant_Procedure (Id : E; V : E) is
7950 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7952 S := Subprograms_For_Type (Id);
7953 Set_Subprograms_For_Type (Id, V);
7954 Set_Subprograms_For_Type (V, S);
7956 -- Check for duplicate entry
7958 while Present (S) loop
7959 if Is_Invariant_Procedure (S) then
7960 raise Program_Error;
7962 S := Subprograms_For_Type (S);
7965 end Set_Invariant_Procedure;
7967 ----------------------------
7968 -- Set_Predicate_Function --
7969 ----------------------------
7971 procedure Set_Predicate_Function (Id : E; V : E) is
7975 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7977 S := Subprograms_For_Type (Id);
7978 Set_Subprograms_For_Type (Id, V);
7979 Set_Subprograms_For_Type (V, S);
7981 while Present (S) loop
7982 if Is_Predicate_Function (S) then
7983 raise Program_Error;
7985 S := Subprograms_For_Type (S);
7988 end Set_Predicate_Function;
7990 ------------------------------
7991 -- Set_Predicate_Function_M --
7992 ------------------------------
7994 procedure Set_Predicate_Function_M (Id : E; V : E) is
7998 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8000 S := Subprograms_For_Type (Id);
8001 Set_Subprograms_For_Type (Id, V);
8002 Set_Subprograms_For_Type (V, S);
8004 -- Check for duplicates
8006 while Present (S) loop
8007 if Is_Predicate_Function_M (S) then
8008 raise Program_Error;
8010 S := Subprograms_For_Type (S);
8013 end Set_Predicate_Function_M;
8019 function Size_Clause (Id : E) return N is
8021 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8024 ------------------------
8025 -- Stream_Size_Clause --
8026 ------------------------
8028 function Stream_Size_Clause (Id : E) return N is
8030 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8031 end Stream_Size_Clause;
8037 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8043 Kind := E_Access_Subtype;
8047 Kind := E_Array_Subtype;
8049 when E_Class_Wide_Type |
8050 E_Class_Wide_Subtype =>
8051 Kind := E_Class_Wide_Subtype;
8053 when E_Decimal_Fixed_Point_Type |
8054 E_Decimal_Fixed_Point_Subtype =>
8055 Kind := E_Decimal_Fixed_Point_Subtype;
8057 when E_Ordinary_Fixed_Point_Type |
8058 E_Ordinary_Fixed_Point_Subtype =>
8059 Kind := E_Ordinary_Fixed_Point_Subtype;
8061 when E_Private_Type |
8062 E_Private_Subtype =>
8063 Kind := E_Private_Subtype;
8065 when E_Limited_Private_Type |
8066 E_Limited_Private_Subtype =>
8067 Kind := E_Limited_Private_Subtype;
8069 when E_Record_Type_With_Private |
8070 E_Record_Subtype_With_Private =>
8071 Kind := E_Record_Subtype_With_Private;
8073 when E_Record_Type |
8075 Kind := E_Record_Subtype;
8077 when Enumeration_Kind =>
8078 Kind := E_Enumeration_Subtype;
8081 Kind := E_Floating_Point_Subtype;
8083 when Signed_Integer_Kind =>
8084 Kind := E_Signed_Integer_Subtype;
8086 when Modular_Integer_Kind =>
8087 Kind := E_Modular_Integer_Subtype;
8089 when Protected_Kind =>
8090 Kind := E_Protected_Subtype;
8093 Kind := E_Task_Subtype;
8097 raise Program_Error;
8103 ---------------------
8104 -- Type_High_Bound --
8105 ---------------------
8107 function Type_High_Bound (Id : E) return Node_Id is
8108 Rng : constant Node_Id := Scalar_Range (Id);
8110 if Nkind (Rng) = N_Subtype_Indication then
8111 return High_Bound (Range_Expression (Constraint (Rng)));
8113 return High_Bound (Rng);
8115 end Type_High_Bound;
8117 --------------------
8118 -- Type_Low_Bound --
8119 --------------------
8121 function Type_Low_Bound (Id : E) return Node_Id is
8122 Rng : constant Node_Id := Scalar_Range (Id);
8124 if Nkind (Rng) = N_Subtype_Indication then
8125 return Low_Bound (Range_Expression (Constraint (Rng)));
8127 return Low_Bound (Rng);
8131 ---------------------
8132 -- Underlying_Type --
8133 ---------------------
8135 function Underlying_Type (Id : E) return E is
8137 -- For record_with_private the underlying type is always the direct
8138 -- full view. Never try to take the full view of the parent it
8139 -- doesn't make sense.
8141 if Ekind (Id) = E_Record_Type_With_Private then
8142 return Full_View (Id);
8144 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8146 -- If we have an incomplete or private type with a full view,
8147 -- then we return the Underlying_Type of this full view
8149 if Present (Full_View (Id)) then
8150 if Id = Full_View (Id) then
8152 -- Previous error in declaration
8157 return Underlying_Type (Full_View (Id));
8160 -- If we have an incomplete entity that comes from the limited
8161 -- view then we return the Underlying_Type of its non-limited
8164 elsif From_Limited_With (Id)
8165 and then Present (Non_Limited_View (Id))
8167 return Underlying_Type (Non_Limited_View (Id));
8169 -- Otherwise check for the case where we have a derived type or
8170 -- subtype, and if so get the Underlying_Type of the parent type.
8172 elsif Etype (Id) /= Id then
8173 return Underlying_Type (Etype (Id));
8175 -- Otherwise we have an incomplete or private type that has
8176 -- no full view, which means that we have not encountered the
8177 -- completion, so return Empty to indicate the underlying type
8178 -- is not yet known.
8184 -- For non-incomplete, non-private types, return the type itself
8185 -- Also for entities that are not types at all return the entity
8191 end Underlying_Type;
8197 function Vax_Float (Id : E) return B is
8199 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8202 ------------------------
8203 -- Write_Entity_Flags --
8204 ------------------------
8206 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8208 procedure W (Flag_Name : String; Flag : Boolean);
8209 -- Write out given flag if it is set
8215 procedure W (Flag_Name : String; Flag : Boolean) is
8219 Write_Str (Flag_Name);
8220 Write_Str (" = True");
8225 -- Start of processing for Write_Entity_Flags
8228 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8229 and then Is_Base_Type (Id)
8232 Write_Str ("Component_Alignment = ");
8234 case Component_Alignment (Id) is
8235 when Calign_Default =>
8236 Write_Str ("Calign_Default");
8238 when Calign_Component_Size =>
8239 Write_Str ("Calign_Component_Size");
8241 when Calign_Component_Size_4 =>
8242 Write_Str ("Calign_Component_Size_4");
8244 when Calign_Storage_Unit =>
8245 Write_Str ("Calign_Storage_Unit");
8251 W ("Address_Taken", Flag104 (Id));
8252 W ("Body_Needed_For_SAL", Flag40 (Id));
8253 W ("C_Pass_By_Copy", Flag125 (Id));
8254 W ("Can_Never_Be_Null", Flag38 (Id));
8255 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8256 W ("Debug_Info_Off", Flag166 (Id));
8257 W ("Default_Expressions_Processed", Flag108 (Id));
8258 W ("Delay_Cleanups", Flag114 (Id));
8259 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8260 W ("Depends_On_Private", Flag14 (Id));
8261 W ("Discard_Names", Flag88 (Id));
8262 W ("Elaboration_Entity_Required", Flag174 (Id));
8263 W ("Elaborate_Body_Desirable", Flag210 (Id));
8264 W ("Entry_Accepted", Flag152 (Id));
8265 W ("Can_Use_Internal_Rep", Flag229 (Id));
8266 W ("Finalize_Storage_Only", Flag158 (Id));
8267 W ("From_Limited_With", Flag159 (Id));
8268 W ("Has_Aliased_Components", Flag135 (Id));
8269 W ("Has_Alignment_Clause", Flag46 (Id));
8270 W ("Has_All_Calls_Remote", Flag79 (Id));
8271 W ("Has_Anonymous_Master", Flag253 (Id));
8272 W ("Has_Atomic_Components", Flag86 (Id));
8273 W ("Has_Biased_Representation", Flag139 (Id));
8274 W ("Has_Completion", Flag26 (Id));
8275 W ("Has_Completion_In_Body", Flag71 (Id));
8276 W ("Has_Complex_Representation", Flag140 (Id));
8277 W ("Has_Component_Size_Clause", Flag68 (Id));
8278 W ("Has_Contiguous_Rep", Flag181 (Id));
8279 W ("Has_Controlled_Component", Flag43 (Id));
8280 W ("Has_Controlling_Result", Flag98 (Id));
8281 W ("Has_Convention_Pragma", Flag119 (Id));
8282 W ("Has_Default_Aspect", Flag39 (Id));
8283 W ("Has_Delayed_Aspects", Flag200 (Id));
8284 W ("Has_Delayed_Freeze", Flag18 (Id));
8285 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8286 W ("Has_Discriminants", Flag5 (Id));
8287 W ("Has_Dispatch_Table", Flag220 (Id));
8288 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8289 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8290 W ("Has_Exit", Flag47 (Id));
8291 W ("Has_Forward_Instantiation", Flag175 (Id));
8292 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8293 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8294 W ("Has_Homonym", Flag56 (Id));
8295 W ("Has_Implicit_Dereference", Flag251 (Id));
8296 W ("Has_Independent_Components", Flag34 (Id));
8297 W ("Has_Inheritable_Invariants", Flag248 (Id));
8298 W ("Has_Initial_Value", Flag219 (Id));
8299 W ("Has_Invariants", Flag232 (Id));
8300 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8301 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8302 W ("Has_Master_Entity", Flag21 (Id));
8303 W ("Has_Missing_Return", Flag142 (Id));
8304 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8305 W ("Has_Non_Standard_Rep", Flag75 (Id));
8306 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8307 W ("Has_Object_Size_Clause", Flag172 (Id));
8308 W ("Has_Per_Object_Constraint", Flag154 (Id));
8309 W ("Has_Postconditions", Flag240 (Id));
8310 W ("Has_Pragma_Controlled", Flag27 (Id));
8311 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8312 W ("Has_Pragma_Inline", Flag157 (Id));
8313 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8314 W ("Has_Pragma_No_Inline", Flag201 (Id));
8315 W ("Has_Pragma_Ordered", Flag198 (Id));
8316 W ("Has_Pragma_Pack", Flag121 (Id));
8317 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8318 W ("Has_Pragma_Pure", Flag203 (Id));
8319 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8320 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8321 W ("Has_Pragma_Unmodified", Flag233 (Id));
8322 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8323 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8324 W ("Has_Predicates", Flag250 (Id));
8325 W ("Has_Primitive_Operations", Flag120 (Id));
8326 W ("Has_Private_Ancestor", Flag151 (Id));
8327 W ("Has_Private_Declaration", Flag155 (Id));
8328 W ("Has_Protected", Flag271 (Id));
8329 W ("Has_Qualified_Name", Flag161 (Id));
8330 W ("Has_RACW", Flag214 (Id));
8331 W ("Has_Record_Rep_Clause", Flag65 (Id));
8332 W ("Has_Recursive_Call", Flag143 (Id));
8333 W ("Has_Shift_Operator", Flag267 (Id));
8334 W ("Has_Size_Clause", Flag29 (Id));
8335 W ("Has_Small_Clause", Flag67 (Id));
8336 W ("Has_Specified_Layout", Flag100 (Id));
8337 W ("Has_Specified_Stream_Input", Flag190 (Id));
8338 W ("Has_Specified_Stream_Output", Flag191 (Id));
8339 W ("Has_Specified_Stream_Read", Flag192 (Id));
8340 W ("Has_Specified_Stream_Write", Flag193 (Id));
8341 W ("Has_Static_Discriminants", Flag211 (Id));
8342 W ("Has_Static_Predicate", Flag269 (Id));
8343 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8344 W ("Has_Storage_Size_Clause", Flag23 (Id));
8345 W ("Has_Stream_Size_Clause", Flag184 (Id));
8346 W ("Has_Task", Flag30 (Id));
8347 W ("Has_Thunks", Flag228 (Id));
8348 W ("Has_Unchecked_Union", Flag123 (Id));
8349 W ("Has_Unknown_Discriminants", Flag72 (Id));
8350 W ("Has_Up_Level_Access", Flag215 (Id));
8351 W ("Has_Visible_Refinement", Flag263 (Id));
8352 W ("Has_Volatile_Components", Flag87 (Id));
8353 W ("Has_Xref_Entry", Flag182 (Id));
8354 W ("In_Package_Body", Flag48 (Id));
8355 W ("In_Private_Part", Flag45 (Id));
8356 W ("In_Use", Flag8 (Id));
8357 W ("Is_AST_Entry", Flag132 (Id));
8358 W ("Is_Abstract_Subprogram", Flag19 (Id));
8359 W ("Is_Abstract_Type", Flag146 (Id));
8360 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8361 W ("Is_Access_Constant", Flag69 (Id));
8362 W ("Is_Ada_2005_Only", Flag185 (Id));
8363 W ("Is_Ada_2012_Only", Flag199 (Id));
8364 W ("Is_Aliased", Flag15 (Id));
8365 W ("Is_Asynchronous", Flag81 (Id));
8366 W ("Is_Atomic", Flag85 (Id));
8367 W ("Is_Bit_Packed_Array", Flag122 (Id));
8368 W ("Is_CPP_Class", Flag74 (Id));
8369 W ("Is_Called", Flag102 (Id));
8370 W ("Is_Character_Type", Flag63 (Id));
8371 W ("Is_Child_Unit", Flag73 (Id));
8372 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8373 W ("Is_Compilation_Unit", Flag149 (Id));
8374 W ("Is_Completely_Hidden", Flag103 (Id));
8375 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8376 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8377 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8378 W ("Is_Constrained", Flag12 (Id));
8379 W ("Is_Constructor", Flag76 (Id));
8380 W ("Is_Controlled", Flag42 (Id));
8381 W ("Is_Controlling_Formal", Flag97 (Id));
8382 W ("Is_Descendent_Of_Address", Flag223 (Id));
8383 W ("Is_Discrim_SO_Function", Flag176 (Id));
8384 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8385 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8386 W ("Is_Dispatching_Operation", Flag6 (Id));
8387 W ("Is_Eliminated", Flag124 (Id));
8388 W ("Is_Entry_Formal", Flag52 (Id));
8389 W ("Is_Exported", Flag99 (Id));
8390 W ("Is_First_Subtype", Flag70 (Id));
8391 W ("Is_For_Access_Subtype", Flag118 (Id));
8392 W ("Is_Formal_Subprogram", Flag111 (Id));
8393 W ("Is_Frozen", Flag4 (Id));
8394 W ("Is_Generic_Actual_Type", Flag94 (Id));
8395 W ("Is_Generic_Instance", Flag130 (Id));
8396 W ("Is_Generic_Type", Flag13 (Id));
8397 W ("Is_Hidden", Flag57 (Id));
8398 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8399 W ("Is_Immediately_Visible", Flag7 (Id));
8400 W ("Is_Implementation_Defined", Flag254 (Id));
8401 W ("Is_Imported", Flag24 (Id));
8402 W ("Is_Independent", Flag268 (Id));
8403 W ("Is_Inlined", Flag11 (Id));
8404 W ("Is_Inlined_Always", Flag1 (Id));
8405 W ("Is_Instantiated", Flag126 (Id));
8406 W ("Is_Interface", Flag186 (Id));
8407 W ("Is_Internal", Flag17 (Id));
8408 W ("Is_Interrupt_Handler", Flag89 (Id));
8409 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8410 W ("Is_Invariant_Procedure", Flag257 (Id));
8411 W ("Is_Itype", Flag91 (Id));
8412 W ("Is_Known_Non_Null", Flag37 (Id));
8413 W ("Is_Known_Null", Flag204 (Id));
8414 W ("Is_Known_Valid", Flag170 (Id));
8415 W ("Is_Limited_Composite", Flag106 (Id));
8416 W ("Is_Limited_Interface", Flag197 (Id));
8417 W ("Is_Limited_Record", Flag25 (Id));
8418 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8419 W ("Is_Non_Static_Subtype", Flag109 (Id));
8420 W ("Is_Null_Init_Proc", Flag178 (Id));
8421 W ("Is_Obsolescent", Flag153 (Id));
8422 W ("Is_Only_Out_Parameter", Flag226 (Id));
8423 W ("Is_Optional_Parameter", Flag134 (Id));
8424 W ("Is_Package_Body_Entity", Flag160 (Id));
8425 W ("Is_Packed", Flag51 (Id));
8426 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8427 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8428 W ("Is_Predicate_Function", Flag255 (Id));
8429 W ("Is_Predicate_Function_M", Flag256 (Id));
8430 W ("Is_Preelaborated", Flag59 (Id));
8431 W ("Is_Primitive", Flag218 (Id));
8432 W ("Is_Primitive_Wrapper", Flag195 (Id));
8433 W ("Is_Private_Composite", Flag107 (Id));
8434 W ("Is_Private_Descendant", Flag53 (Id));
8435 W ("Is_Private_Primitive", Flag245 (Id));
8436 W ("Is_Processed_Transient", Flag252 (Id));
8437 W ("Is_Public", Flag10 (Id));
8438 W ("Is_Pure", Flag44 (Id));
8439 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8440 W ("Is_RACW_Stub_Type", Flag244 (Id));
8441 W ("Is_Raised", Flag224 (Id));
8442 W ("Is_Remote_Call_Interface", Flag62 (Id));
8443 W ("Is_Remote_Types", Flag61 (Id));
8444 W ("Is_Renaming_Of_Object", Flag112 (Id));
8445 W ("Is_Return_Object", Flag209 (Id));
8446 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8447 W ("Is_Shared_Passive", Flag60 (Id));
8448 W ("Is_Statically_Allocated", Flag28 (Id));
8449 W ("Is_Tag", Flag78 (Id));
8450 W ("Is_Tagged_Type", Flag55 (Id));
8451 W ("Is_Thunk", Flag225 (Id));
8452 W ("Is_Trivial_Subprogram", Flag235 (Id));
8453 W ("Is_True_Constant", Flag163 (Id));
8454 W ("Is_Unchecked_Union", Flag117 (Id));
8455 W ("Is_Underlying_Record_View", Flag246 (Id));
8456 W ("Is_Unsigned_Type", Flag144 (Id));
8457 W ("Is_VMS_Exception", Flag133 (Id));
8458 W ("Is_Valued_Procedure", Flag127 (Id));
8459 W ("Is_Visible_Formal", Flag206 (Id));
8460 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8461 W ("Is_Volatile", Flag16 (Id));
8462 W ("Itype_Printed", Flag202 (Id));
8463 W ("Kill_Elaboration_Checks", Flag32 (Id));
8464 W ("Kill_Range_Checks", Flag33 (Id));
8465 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8466 W ("Low_Bound_Tested", Flag205 (Id));
8467 W ("Machine_Radix_10", Flag84 (Id));
8468 W ("Materialize_Entity", Flag168 (Id));
8469 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8470 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8471 W ("Must_Have_Preelab_Init", Flag208 (Id));
8472 W ("Needs_Debug_Info", Flag147 (Id));
8473 W ("Needs_No_Actuals", Flag22 (Id));
8474 W ("Never_Set_In_Source", Flag115 (Id));
8475 W ("No_Pool_Assigned", Flag131 (Id));
8476 W ("No_Return", Flag113 (Id));
8477 W ("No_Strict_Aliasing", Flag136 (Id));
8478 W ("Non_Binary_Modulus", Flag58 (Id));
8479 W ("Nonzero_Is_True", Flag162 (Id));
8480 W ("OK_To_Rename", Flag247 (Id));
8481 W ("OK_To_Reorder_Components", Flag239 (Id));
8482 W ("Optimize_Alignment_Space", Flag241 (Id));
8483 W ("Optimize_Alignment_Time", Flag242 (Id));
8484 W ("Overlays_Constant", Flag243 (Id));
8485 W ("Reachable", Flag49 (Id));
8486 W ("Referenced", Flag156 (Id));
8487 W ("Referenced_As_LHS", Flag36 (Id));
8488 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8489 W ("Renamed_In_Spec", Flag231 (Id));
8490 W ("Requires_Overriding", Flag213 (Id));
8491 W ("Return_Present", Flag54 (Id));
8492 W ("Returns_By_Ref", Flag90 (Id));
8493 W ("Reverse_Bit_Order", Flag164 (Id));
8494 W ("Reverse_Storage_Order", Flag93 (Id));
8495 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8496 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8497 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8498 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8499 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8500 W ("SSO_Set_High_By_Default", Flag273 (Id));
8501 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8502 W ("Static_Elaboration_Desired", Flag77 (Id));
8503 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8504 W ("Strict_Alignment", Flag145 (Id));
8505 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8506 W ("Suppress_Initialization", Flag105 (Id));
8507 W ("Suppress_Style_Checks", Flag165 (Id));
8508 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8509 W ("Treat_As_Volatile", Flag41 (Id));
8510 W ("Universal_Aliasing", Flag216 (Id));
8511 W ("Used_As_Generic_Actual", Flag222 (Id));
8512 W ("Uses_Sec_Stack", Flag95 (Id));
8513 W ("Warnings_Off", Flag96 (Id));
8514 W ("Warnings_Off_Used", Flag236 (Id));
8515 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8516 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8517 W ("Was_Hidden", Flag196 (Id));
8518 end Write_Entity_Flags;
8520 -----------------------
8521 -- Write_Entity_Info --
8522 -----------------------
8524 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8526 procedure Write_Attribute (Which : String; Nam : E);
8527 -- Write attribute value with given string name
8529 procedure Write_Kind (Id : Entity_Id);
8530 -- Write Ekind field of entity
8532 ---------------------
8533 -- Write_Attribute --
8534 ---------------------
8536 procedure Write_Attribute (Which : String; Nam : E) is
8540 Write_Int (Int (Nam));
8542 Write_Name (Chars (Nam));
8544 end Write_Attribute;
8550 procedure Write_Kind (Id : Entity_Id) is
8551 K : constant String := Entity_Kind'Image (Ekind (Id));
8555 Write_Str (" Kind ");
8557 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8558 Write_Str ("TAGGED ");
8561 Write_Str (K (3 .. K'Length));
8564 if Is_Type (Id) and then Depends_On_Private (Id) then
8565 Write_Str ("Depends_On_Private ");
8569 -- Start of processing for Write_Entity_Info
8573 Write_Attribute ("Name ", Id);
8574 Write_Int (Int (Id));
8578 Write_Attribute (" Type ", Etype (Id));
8580 Write_Attribute (" Scope ", Scope (Id));
8585 when Discrete_Kind =>
8586 Write_Str ("Bounds: Id = ");
8588 if Present (Scalar_Range (Id)) then
8589 Write_Int (Int (Type_Low_Bound (Id)));
8590 Write_Str (" .. Id = ");
8591 Write_Int (Int (Type_High_Bound (Id)));
8593 Write_Str ("Empty");
8604 (" Component Type ", Component_Type (Id));
8607 Write_Str (" Indexes ");
8609 Index := First_Index (Id);
8610 while Present (Index) loop
8611 Write_Attribute (" ", Etype (Index));
8612 Index := Next_Index (Index);
8620 (" Directly Designated Type ",
8621 Directly_Designated_Type (Id));
8624 when Overloadable_Kind =>
8625 if Present (Homonym (Id)) then
8626 Write_Str (" Homonym ");
8627 Write_Name (Chars (Homonym (Id)));
8629 Write_Int (Int (Homonym (Id)));
8636 if Ekind (Scope (Id)) in Record_Kind then
8638 " Original_Record_Component ",
8639 Original_Record_Component (Id));
8640 Write_Int (Int (Original_Record_Component (Id)));
8644 when others => null;
8646 end Write_Entity_Info;
8648 -----------------------
8649 -- Write_Field6_Name --
8650 -----------------------
8652 procedure Write_Field6_Name (Id : Entity_Id) is
8653 pragma Warnings (Off, Id);
8655 Write_Str ("First_Rep_Item");
8656 end Write_Field6_Name;
8658 -----------------------
8659 -- Write_Field7_Name --
8660 -----------------------
8662 procedure Write_Field7_Name (Id : Entity_Id) is
8663 pragma Warnings (Off, Id);
8665 Write_Str ("Freeze_Node");
8666 end Write_Field7_Name;
8668 -----------------------
8669 -- Write_Field8_Name --
8670 -----------------------
8672 procedure Write_Field8_Name (Id : Entity_Id) is
8676 Write_Str ("Associated_Node_For_Itype");
8679 Write_Str ("Dependent_Instances");
8682 Write_Str ("First_Exit_Statement");
8685 Write_Str ("Hiding_Loop_Variable");
8689 E_Subprogram_Body =>
8690 Write_Str ("Mechanism");
8694 Write_Str ("Normalized_First_Bit");
8697 Write_Str ("Postcondition_Proc");
8699 when E_Abstract_State =>
8700 Write_Str ("Refinement_Constituents");
8702 when E_Return_Statement =>
8703 Write_Str ("Return_Applies_To");
8706 Write_Str ("Field8??");
8708 end Write_Field8_Name;
8710 -----------------------
8711 -- Write_Field9_Name --
8712 -----------------------
8714 procedure Write_Field9_Name (Id : Entity_Id) is
8718 Write_Str ("Class_Wide_Type");
8721 Write_Str ("Current_Value");
8723 when E_Abstract_State =>
8724 Write_Str ("Part_Of_Constituents");
8727 E_Generic_Function |
8729 E_Generic_Procedure |
8732 Write_Str ("Renaming_Map");
8735 Write_Str ("Field9??");
8737 end Write_Field9_Name;
8739 ------------------------
8740 -- Write_Field10_Name --
8741 ------------------------
8743 procedure Write_Field10_Name (Id : Entity_Id) is
8746 when E_Abstract_State |
8748 Write_Str ("Encapsulating_State");
8750 when Class_Wide_Kind |
8756 Write_Str ("Direct_Primitive_Operations");
8759 Write_Str ("Float_Rep");
8761 when E_In_Parameter |
8763 Write_Str ("Discriminal_Link");
8769 Write_Str ("Handler_Records");
8773 Write_Str ("Normalized_Position_Max");
8776 Write_Str ("Field10??");
8778 end Write_Field10_Name;
8780 ------------------------
8781 -- Write_Field11_Name --
8782 ------------------------
8784 procedure Write_Field11_Name (Id : Entity_Id) is
8788 Write_Str ("Block_Node");
8792 Write_Str ("Component_Bit_Offset");
8795 Write_Str ("Entry_Component");
8797 when E_Enumeration_Literal =>
8798 Write_Str ("Enumeration_Pos");
8802 Write_Str ("Full_View");
8804 when E_Generic_Package =>
8805 Write_Str ("Generic_Homonym");
8811 Write_Str ("Protected_Body_Subprogram");
8814 Write_Str ("Field11??");
8816 end Write_Field11_Name;
8818 ------------------------
8819 -- Write_Field12_Name --
8820 ------------------------
8822 procedure Write_Field12_Name (Id : Entity_Id) is
8826 Write_Str ("Associated_Formal_Package");
8829 Write_Str ("Barrier_Function");
8831 when E_Enumeration_Literal =>
8832 Write_Str ("Enumeration_Rep");
8840 E_In_Out_Parameter |
8844 Write_Str ("Esize");
8848 Write_Str ("Next_Inlined_Subprogram");
8851 Write_Str ("Field12??");
8853 end Write_Field12_Name;
8855 ------------------------
8856 -- Write_Field13_Name --
8857 ------------------------
8859 procedure Write_Field13_Name (Id : Entity_Id) is
8864 Write_Str ("Component_Clause");
8867 Write_Str ("Elaboration_Entity");
8871 Generic_Unit_Kind =>
8872 Write_Str ("Elaboration_Entity");
8876 Write_Str ("Extra_Accessibility");
8879 Write_Str ("RM_Size");
8882 Write_Str ("Field13??");
8884 end Write_Field13_Name;
8886 -----------------------
8887 -- Write_Field14_Name --
8888 -----------------------
8890 procedure Write_Field14_Name (Id : Entity_Id) is
8899 Write_Str ("Alignment");
8903 Write_Str ("First_Optional_Parameter");
8907 Write_Str ("Normalized_Position");
8910 E_Generic_Package =>
8911 Write_Str ("Shadow_Entities");
8914 Write_Str ("Field14??");
8916 end Write_Field14_Name;
8918 ------------------------
8919 -- Write_Field15_Name --
8920 ------------------------
8922 procedure Write_Field15_Name (Id : Entity_Id) is
8925 when E_Discriminant =>
8926 Write_Str ("Discriminant_Number");
8929 Write_Str ("DT_Entry_Count");
8933 Write_Str ("DT_Position");
8935 when E_Protected_Type =>
8936 Write_Str ("Entry_Bodies_Array");
8939 Write_Str ("Entry_Parameters_Type");
8942 Write_Str ("Extra_Formal");
8944 when Enumeration_Kind =>
8945 Write_Str ("Lit_Indexes");
8949 Write_Str ("Related_Instance");
8951 when Decimal_Fixed_Point_Kind =>
8952 Write_Str ("Scale_Value");
8956 Write_Str ("Status_Flag_Or_Transient_Decl");
8960 Write_Str ("Storage_Size_Variable");
8962 when E_String_Literal_Subtype =>
8963 Write_Str ("String_Literal_Low_Bound");
8966 Write_Str ("Field15??");
8968 end Write_Field15_Name;
8970 ------------------------
8971 -- Write_Field16_Name --
8972 ------------------------
8974 procedure Write_Field16_Name (Id : Entity_Id) is
8977 when E_Record_Type |
8978 E_Record_Type_With_Private =>
8979 Write_Str ("Access_Disp_Table");
8981 when E_Abstract_State =>
8982 Write_Str ("Body_References");
8984 when E_Record_Subtype |
8985 E_Class_Wide_Subtype =>
8986 Write_Str ("Cloned_Subtype");
8990 Write_Str ("DTC_Entity");
8993 Write_Str ("Entry_Formal");
8998 Write_Str ("First_Private_Entity");
9000 when Enumeration_Kind =>
9001 Write_Str ("Lit_Strings");
9003 when E_String_Literal_Subtype =>
9004 Write_Str ("String_Literal_Length");
9008 Write_Str ("Unset_Reference");
9011 Write_Str ("Field16??");
9013 end Write_Field16_Name;
9015 ------------------------
9016 -- Write_Field17_Name --
9017 ------------------------
9019 procedure Write_Field17_Name (Id : Entity_Id) is
9024 E_Generic_In_Out_Parameter |
9026 Write_Str ("Actual_Subtype");
9029 Write_Str ("Digits_Value");
9031 when E_Discriminant =>
9032 Write_Str ("Discriminal");
9041 E_Generic_Function |
9043 E_Generic_Procedure |
9051 E_Return_Statement |
9053 E_Subprogram_Type =>
9054 Write_Str ("First_Entity");
9057 Write_Str ("First_Index");
9059 when Enumeration_Kind =>
9060 Write_Str ("First_Literal");
9063 Write_Str ("Master_Id");
9065 when Modular_Integer_Kind =>
9066 Write_Str ("Modulus");
9068 when E_Abstract_State |
9069 E_Incomplete_Type =>
9070 Write_Str ("Non_Limited_View");
9072 when E_Incomplete_Subtype =>
9073 if From_Limited_With (Id) then
9074 Write_Str ("Non_Limited_View");
9078 Write_Str ("Prival");
9081 Write_Str ("Field17??");
9083 end Write_Field17_Name;
9085 ------------------------
9086 -- Write_Field18_Name --
9087 ------------------------
9089 procedure Write_Field18_Name (Id : Entity_Id) is
9092 when E_Enumeration_Literal |
9096 Write_Str ("Alias");
9098 when E_Record_Type =>
9099 Write_Str ("Corresponding_Concurrent_Type");
9101 when E_Subprogram_Body =>
9102 Write_Str ("Corresponding_Protected_Entry");
9104 when Concurrent_Kind =>
9105 Write_Str ("Corresponding_Record_Type");
9110 Write_Str ("Enclosing_Scope");
9112 when E_Entry_Index_Parameter =>
9113 Write_Str ("Entry_Index_Constant");
9115 when E_Class_Wide_Subtype |
9116 E_Access_Protected_Subprogram_Type |
9117 E_Anonymous_Access_Protected_Subprogram_Type |
9118 E_Access_Subprogram_Type |
9120 Write_Str ("Equivalent_Type");
9122 when Fixed_Point_Kind =>
9123 Write_Str ("Delta_Value");
9125 when Incomplete_Or_Private_Kind |
9127 Write_Str ("Private_Dependents");
9130 Write_Str ("Renamed_Object");
9134 E_Generic_Function |
9135 E_Generic_Procedure |
9136 E_Generic_Package =>
9137 Write_Str ("Renamed_Entity");
9140 Write_Str ("Field18??");
9142 end Write_Field18_Name;
9144 -----------------------
9145 -- Write_Field19_Name --
9146 -----------------------
9148 procedure Write_Field19_Name (Id : Entity_Id) is
9152 E_Generic_Package =>
9153 Write_Str ("Body_Entity");
9155 when E_Discriminant =>
9156 Write_Str ("Corresponding_Discriminant");
9159 Write_Str ("Default_Aspect_Value");
9161 when E_Array_Type =>
9162 Write_Str ("Default_Component_Value");
9164 when E_Record_Type =>
9165 Write_Str ("Parent_Subtype");
9169 Write_Str ("Size_Check_Code");
9171 when E_Package_Body |
9173 Write_Str ("Spec_Entity");
9175 when Private_Kind =>
9176 Write_Str ("Underlying_Full_View");
9178 when E_Function | E_Operator | E_Subprogram_Type =>
9179 Write_Str ("Extra_Accessibility_Of_Result");
9182 Write_Str ("Field19??");
9184 end Write_Field19_Name;
9186 -----------------------
9187 -- Write_Field20_Name --
9188 -----------------------
9190 procedure Write_Field20_Name (Id : Entity_Id) is
9194 Write_Str ("Component_Type");
9196 when E_In_Parameter |
9197 E_Generic_In_Parameter =>
9198 Write_Str ("Default_Value");
9201 Write_Str ("Directly_Designated_Type");
9204 Write_Str ("Discriminant_Checking_Func");
9206 when E_Discriminant =>
9207 Write_Str ("Discriminant_Default_Value");
9216 E_Generic_Function |
9218 E_Generic_Procedure |
9226 E_Return_Statement |
9228 E_Subprogram_Type =>
9229 Write_Str ("Last_Entity");
9233 Write_Str ("Prival_Link");
9236 Write_Str ("Scalar_Range");
9239 Write_Str ("Register_Exception_Call");
9242 Write_Str ("Field20??");
9244 end Write_Field20_Name;
9246 -----------------------
9247 -- Write_Field21_Name --
9248 -----------------------
9250 procedure Write_Field21_Name (Id : Entity_Id) is
9254 Write_Str ("Accept_Address");
9256 when E_In_Parameter =>
9257 Write_Str ("Default_Expr_Function");
9259 when Concurrent_Kind |
9260 Incomplete_Or_Private_Kind |
9264 Write_Str ("Discriminant_Constraint");
9269 E_Generic_Function |
9271 E_Generic_Procedure |
9273 Write_Str ("Interface_Name");
9276 Modular_Integer_Kind =>
9277 Write_Str ("Original_Array_Type");
9279 when Fixed_Point_Kind =>
9280 Write_Str ("Small_Value");
9283 Write_Str ("Field21??");
9285 end Write_Field21_Name;
9287 -----------------------
9288 -- Write_Field22_Name --
9289 -----------------------
9291 procedure Write_Field22_Name (Id : Entity_Id) is
9295 Write_Str ("Associated_Storage_Pool");
9298 Write_Str ("Component_Size");
9300 when E_Record_Type =>
9301 Write_Str ("Corresponding_Remote_Type");
9305 Write_Str ("Original_Record_Component");
9307 when E_Enumeration_Literal =>
9308 Write_Str ("Enumeration_Rep_Expr");
9311 Write_Str ("Exception_Code");
9313 when E_Record_Type_With_Private |
9314 E_Record_Subtype_With_Private |
9317 E_Limited_Private_Type |
9318 E_Limited_Private_Subtype =>
9319 Write_Str ("Private_View");
9322 Write_Str ("Protected_Formal");
9332 E_Generic_Function |
9333 E_Generic_Procedure |
9336 E_Return_Statement |
9339 Write_Str ("Scope_Depth_Value");
9342 Write_Str ("Shared_Var_Procs_Instance");
9345 Write_Str ("Field22??");
9347 end Write_Field22_Name;
9349 ------------------------
9350 -- Write_Field23_Name --
9351 ------------------------
9353 procedure Write_Field23_Name (Id : Entity_Id) is
9356 when E_Discriminant =>
9357 Write_Str ("CR_Discriminant");
9360 Write_Str ("Entry_Cancel_Parameter");
9362 when E_Enumeration_Type =>
9363 Write_Str ("Enum_Pos_To_Rep");
9367 Write_Str ("Extra_Constrained");
9370 Write_Str ("Finalization_Master");
9372 when E_Generic_Function |
9374 E_Generic_Procedure =>
9375 Write_Str ("Inner_Instances");
9378 Write_Str ("Packed_Array_Impl_Type");
9381 Write_Str ("Protection_Object");
9383 when Concurrent_Kind |
9384 Incomplete_Or_Private_Kind |
9388 Write_Str ("Stored_Constraint");
9392 if Present (Scope (Id))
9393 and then Is_Protected_Type (Scope (Id))
9395 Write_Str ("Protection_Object");
9397 Write_Str ("Generic_Renamings");
9401 if Is_Generic_Instance (Id) then
9402 Write_Str ("Generic_Renamings");
9404 Write_Str ("Limited_View");
9408 Write_Str ("Field23??");
9410 end Write_Field23_Name;
9412 ------------------------
9413 -- Write_Field24_Name --
9414 ------------------------
9416 procedure Write_Field24_Name (Id : Entity_Id) is
9422 Write_Str ("Related_Expression");
9425 Write_Str ("Field24???");
9427 end Write_Field24_Name;
9429 ------------------------
9430 -- Write_Field25_Name --
9431 ------------------------
9433 procedure Write_Field25_Name (Id : Entity_Id) is
9436 when E_Generic_Package |
9438 Write_Str ("Abstract_States");
9441 Write_Str ("Debug_Renaming_Link");
9444 Write_Str ("DT_Offset_To_Top_Func");
9448 Write_Str ("Interface_Alias");
9450 when E_Record_Type |
9452 E_Record_Type_With_Private |
9453 E_Record_Subtype_With_Private =>
9454 Write_Str ("Interfaces");
9458 Write_Str ("Related_Array_Object");
9461 Write_Str ("Task_Body_Procedure");
9465 Write_Str ("PPC_Wrapper");
9467 when Discrete_Kind =>
9468 Write_Str ("Static_Discrete_Predicate");
9471 Write_Str ("Static_Real_Or_String_Predicate");
9474 Write_Str ("Field25??");
9476 end Write_Field25_Name;
9478 ------------------------
9479 -- Write_Field26_Name --
9480 ------------------------
9482 procedure Write_Field26_Name (Id : Entity_Id) is
9485 when E_Record_Type |
9486 E_Record_Type_With_Private =>
9487 Write_Str ("Dispatch_Table_Wrappers");
9489 when E_In_Out_Parameter |
9492 Write_Str ("Last_Assignment");
9494 when E_Access_Subprogram_Type =>
9495 Write_Str ("Original_Access_Type");
9497 when E_Generic_Package |
9499 Write_Str ("Package_Instantiation");
9503 Write_Str ("Related_Type");
9506 Write_Str ("Relative_Deadline_Variable");
9510 Write_Str ("Overridden_Operation");
9513 Write_Str ("Field26??");
9515 end Write_Field26_Name;
9517 ------------------------
9518 -- Write_Field27_Name --
9519 ------------------------
9521 procedure Write_Field27_Name (Id : Entity_Id) is
9526 Write_Str ("Current_Use_Clause");
9531 Write_Str ("Related_Type");
9535 Write_Str ("Wrapped_Entity");
9538 Write_Str ("Field27??");
9540 end Write_Field27_Name;
9542 ------------------------
9543 -- Write_Field28_Name --
9544 ------------------------
9546 procedure Write_Field28_Name (Id : Entity_Id) is
9554 E_Subprogram_Type =>
9555 Write_Str ("Extra_Formals");
9559 Write_Str ("Finalizer");
9563 Write_Str ("Initialization_Statements");
9565 when E_Record_Type =>
9566 Write_Str ("Underlying_Record_View");
9569 Write_Str ("Field28??");
9571 end Write_Field28_Name;
9573 ------------------------
9574 -- Write_Field29_Name --
9575 ------------------------
9577 procedure Write_Field29_Name (Id : Entity_Id) is
9582 Write_Str ("BIP_Initialization_Call");
9585 Write_Str ("Subprograms_For_Type");
9588 Write_Str ("Field29??");
9590 end Write_Field29_Name;
9592 ------------------------
9593 -- Write_Field30_Name --
9594 ------------------------
9596 procedure Write_Field30_Name (Id : Entity_Id) is
9600 Write_Str ("Corresponding_Equality");
9604 Write_Str ("Last_Aggregate_Assignment");
9607 Write_Str ("Static_Initialization");
9610 Write_Str ("Field30??");
9612 end Write_Field30_Name;
9614 ------------------------
9615 -- Write_Field31_Name --
9616 ------------------------
9618 procedure Write_Field31_Name (Id : Entity_Id) is
9623 Write_Str ("Thunk_Entity");
9626 Write_Str ("Derived_Type_Link");
9629 Write_Str ("Field31??");
9631 end Write_Field31_Name;
9633 ------------------------
9634 -- Write_Field32_Name --
9635 ------------------------
9637 procedure Write_Field32_Name (Id : Entity_Id) is
9641 E_Generic_Function |
9643 E_Generic_Procedure |
9647 E_Subprogram_Body =>
9648 Write_Str ("SPARK_Pragma");
9651 Write_Str ("Field32??");
9653 end Write_Field32_Name;
9655 ------------------------
9656 -- Write_Field33_Name --
9657 ------------------------
9659 procedure Write_Field33_Name (Id : Entity_Id) is
9662 when E_Generic_Package |
9665 Write_Str ("SPARK_Aux_Pragma");
9671 Write_Str ("Linker_Section_Pragma");
9674 Write_Str ("Field33??");
9676 end Write_Field33_Name;
9678 ------------------------
9679 -- Write_Field34_Name --
9680 ------------------------
9682 procedure Write_Field34_Name (Id : Entity_Id) is
9692 Generic_Subprogram_Kind |
9694 Write_Str ("Contract");
9697 Write_Str ("Field34??");
9699 end Write_Field34_Name;
9701 ------------------------
9702 -- Write_Field35_Name --
9703 ------------------------
9705 procedure Write_Field35_Name (Id : Entity_Id) is
9708 when Subprogram_Kind =>
9709 Write_Str ("Import_Pragma");
9711 Write_Str ("Field35??");
9713 end Write_Field35_Name;
9715 -------------------------
9716 -- Iterator Procedures --
9717 -------------------------
9719 procedure Proc_Next_Component (N : in out Node_Id) is
9721 N := Next_Component (N);
9722 end Proc_Next_Component;
9724 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9726 N := Next_Entity (N);
9727 while Present (N) loop
9728 exit when Ekind_In (N, E_Component, E_Discriminant);
9729 N := Next_Entity (N);
9731 end Proc_Next_Component_Or_Discriminant;
9733 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9735 N := Next_Discriminant (N);
9736 end Proc_Next_Discriminant;
9738 procedure Proc_Next_Formal (N : in out Node_Id) is
9740 N := Next_Formal (N);
9741 end Proc_Next_Formal;
9743 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9745 N := Next_Formal_With_Extras (N);
9746 end Proc_Next_Formal_With_Extras;
9748 procedure Proc_Next_Index (N : in out Node_Id) is
9750 N := Next_Index (N);
9751 end Proc_Next_Index;
9753 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9755 N := Next_Inlined_Subprogram (N);
9756 end Proc_Next_Inlined_Subprogram;
9758 procedure Proc_Next_Literal (N : in out Node_Id) is
9760 N := Next_Literal (N);
9761 end Proc_Next_Literal;
9763 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9765 N := Next_Stored_Discriminant (N);
9766 end Proc_Next_Stored_Discriminant;