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 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Impl_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Discrete_Predicate List25
225 -- Static_Real_Or_String_Predicate Node25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Underlying_Record_View Node28
244 -- BIP_Initialization_Call Node29
245 -- Subprograms_For_Type Node29
247 -- Corresponding_Equality Node30
248 -- Last_Aggregate_Assignment Node30
249 -- Static_Initialization Node30
251 -- Derived_Type_Link Node31
252 -- Thunk_Entity Node31
254 -- SPARK_Pragma Node32
256 -- Linker_Section_Pragma Node33
257 -- SPARK_Aux_Pragma Node33
261 -- Import_Pragma Node35
263 ---------------------------------------------
264 -- Usage of Flags in Defining Entity Nodes --
265 ---------------------------------------------
267 -- All flags are unique, there is no overlaying, so each flag is physically
268 -- present in every entity. However, for many of the flags, it only makes
269 -- sense for them to be set true for certain subsets of entity kinds. See
270 -- the spec of Einfo for further details.
272 -- Is_Inlined_Always Flag1
274 -- Has_Discriminants Flag5
275 -- Is_Dispatching_Operation Flag6
276 -- Is_Immediately_Visible Flag7
278 -- Is_Potentially_Use_Visible Flag9
282 -- Is_Constrained Flag12
283 -- Is_Generic_Type Flag13
284 -- Depends_On_Private Flag14
286 -- Is_Volatile Flag16
287 -- Is_Internal Flag17
288 -- Has_Delayed_Freeze Flag18
289 -- Is_Abstract_Subprogram Flag19
290 -- Is_Concurrent_Record_Type Flag20
292 -- Has_Master_Entity Flag21
293 -- Needs_No_Actuals Flag22
294 -- Has_Storage_Size_Clause Flag23
295 -- Is_Imported Flag24
296 -- Is_Limited_Record Flag25
297 -- Has_Completion Flag26
298 -- Has_Pragma_Controlled Flag27
299 -- Is_Statically_Allocated Flag28
300 -- Has_Size_Clause Flag29
303 -- Checks_May_Be_Suppressed Flag31
304 -- Kill_Elaboration_Checks Flag32
305 -- Kill_Range_Checks Flag33
306 -- Has_Independent_Components Flag34
307 -- Is_Class_Wide_Equivalent_Type Flag35
308 -- Referenced_As_LHS Flag36
309 -- Is_Known_Non_Null Flag37
310 -- Can_Never_Be_Null Flag38
311 -- Has_Default_Aspect Flag39
312 -- Body_Needed_For_SAL Flag40
314 -- Treat_As_Volatile Flag41
315 -- Is_Controlled Flag42
316 -- Has_Controlled_Component Flag43
318 -- In_Private_Part Flag45
319 -- Has_Alignment_Clause Flag46
321 -- In_Package_Body Flag48
323 -- Delay_Subprogram_Descriptors Flag50
326 -- Is_Entry_Formal Flag52
327 -- Is_Private_Descendant Flag53
328 -- Return_Present Flag54
329 -- Is_Tagged_Type Flag55
330 -- Has_Homonym Flag56
332 -- Non_Binary_Modulus Flag58
333 -- Is_Preelaborated Flag59
334 -- Is_Shared_Passive Flag60
336 -- Is_Remote_Types Flag61
337 -- Is_Remote_Call_Interface Flag62
338 -- Is_Character_Type Flag63
339 -- Is_Intrinsic_Subprogram Flag64
340 -- Has_Record_Rep_Clause Flag65
341 -- Has_Enumeration_Rep_Clause Flag66
342 -- Has_Small_Clause Flag67
343 -- Has_Component_Size_Clause Flag68
344 -- Is_Access_Constant Flag69
345 -- Is_First_Subtype Flag70
347 -- Has_Completion_In_Body Flag71
348 -- Has_Unknown_Discriminants Flag72
349 -- Is_Child_Unit Flag73
350 -- Is_CPP_Class Flag74
351 -- Has_Non_Standard_Rep Flag75
352 -- Is_Constructor Flag76
353 -- Static_Elaboration_Desired Flag77
355 -- Has_All_Calls_Remote Flag79
356 -- Is_Constr_Subt_For_U_Nominal Flag80
358 -- Is_Asynchronous Flag81
359 -- Has_Gigi_Rep_Item Flag82
360 -- Has_Machine_Radix_Clause Flag83
361 -- Machine_Radix_10 Flag84
363 -- Has_Atomic_Components Flag86
364 -- Has_Volatile_Components Flag87
365 -- Discard_Names Flag88
366 -- Is_Interrupt_Handler Flag89
367 -- Returns_By_Ref Flag90
370 -- Size_Known_At_Compile_Time Flag92
371 -- Reverse_Storage_Order Flag93
372 -- Is_Generic_Actual_Type Flag94
373 -- Uses_Sec_Stack Flag95
374 -- Warnings_Off Flag96
375 -- Is_Controlling_Formal Flag97
376 -- Has_Controlling_Result Flag98
377 -- Is_Exported Flag99
378 -- Has_Specified_Layout Flag100
380 -- Has_Nested_Block_With_Handler Flag101
382 -- Is_Completely_Hidden Flag103
383 -- Address_Taken Flag104
384 -- Suppress_Initialization Flag105
385 -- Is_Limited_Composite Flag106
386 -- Is_Private_Composite Flag107
387 -- Default_Expressions_Processed Flag108
388 -- Is_Non_Static_Subtype Flag109
389 -- Has_Out_Or_In_Out_Parameter Flag110
391 -- Is_Formal_Subprogram Flag111
392 -- Is_Renaming_Of_Object Flag112
394 -- Delay_Cleanups Flag114
395 -- Never_Set_In_Source Flag115
396 -- Is_Visible_Lib_Unit Flag116
397 -- Is_Unchecked_Union Flag117
398 -- Is_For_Access_Subtype Flag118
399 -- Has_Convention_Pragma Flag119
400 -- Has_Primitive_Operations Flag120
402 -- Has_Pragma_Pack Flag121
403 -- Is_Bit_Packed_Array Flag122
404 -- Has_Unchecked_Union Flag123
405 -- Is_Eliminated Flag124
406 -- C_Pass_By_Copy Flag125
407 -- Is_Instantiated Flag126
408 -- Is_Valued_Procedure Flag127
409 -- (used for Component_Alignment) Flag128
410 -- (used for Component_Alignment) Flag129
411 -- Is_Generic_Instance Flag130
413 -- No_Pool_Assigned Flag131
414 -- Has_Aliased_Components Flag135
415 -- No_Strict_Aliasing Flag136
416 -- Is_Machine_Code_Subprogram Flag137
417 -- Is_Packed_Array_Impl_Type Flag138
418 -- Has_Biased_Representation Flag139
419 -- Has_Complex_Representation Flag140
421 -- Is_Constr_Subt_For_UN_Aliased Flag141
422 -- Has_Missing_Return Flag142
423 -- Has_Recursive_Call Flag143
424 -- Is_Unsigned_Type Flag144
425 -- Strict_Alignment Flag145
426 -- Is_Abstract_Type Flag146
427 -- Needs_Debug_Info Flag147
428 -- Suppress_Elaboration_Warnings Flag148
429 -- Is_Compilation_Unit Flag149
430 -- Has_Pragma_Elaborate_Body Flag150
432 -- Has_Private_Ancestor Flag151
433 -- Entry_Accepted Flag152
434 -- Is_Obsolescent Flag153
435 -- Has_Per_Object_Constraint Flag154
436 -- Has_Private_Declaration Flag155
437 -- Referenced Flag156
438 -- Has_Pragma_Inline Flag157
439 -- Finalize_Storage_Only Flag158
440 -- From_Limited_With Flag159
441 -- Is_Package_Body_Entity Flag160
443 -- Has_Qualified_Name Flag161
444 -- Nonzero_Is_True Flag162
445 -- Is_True_Constant Flag163
446 -- Reverse_Bit_Order Flag164
447 -- Suppress_Style_Checks Flag165
448 -- Debug_Info_Off Flag166
449 -- Sec_Stack_Needed_For_Return Flag167
450 -- Materialize_Entity Flag168
451 -- Has_Pragma_Thread_Local_Storage Flag169
452 -- Is_Known_Valid Flag170
454 -- Is_Hidden_Open_Scope Flag171
455 -- Has_Object_Size_Clause Flag172
456 -- Has_Fully_Qualified_Name Flag173
457 -- Elaboration_Entity_Required Flag174
458 -- Has_Forward_Instantiation Flag175
459 -- Is_Discrim_SO_Function Flag176
460 -- Size_Depends_On_Discriminant Flag177
461 -- Is_Null_Init_Proc Flag178
462 -- Has_Pragma_Pure_Function Flag179
463 -- Has_Pragma_Unreferenced Flag180
465 -- Has_Contiguous_Rep Flag181
466 -- Has_Xref_Entry Flag182
467 -- Must_Be_On_Byte_Boundary Flag183
468 -- Has_Stream_Size_Clause Flag184
469 -- Is_Ada_2005_Only Flag185
470 -- Is_Interface Flag186
471 -- Has_Constrained_Partial_View Flag187
472 -- Uses_Lock_Free Flag188
473 -- Is_Pure_Unit_Access_Type Flag189
474 -- Has_Specified_Stream_Input Flag190
476 -- Has_Specified_Stream_Output Flag191
477 -- Has_Specified_Stream_Read Flag192
478 -- Has_Specified_Stream_Write Flag193
479 -- Is_Local_Anonymous_Access Flag194
480 -- Is_Primitive_Wrapper Flag195
481 -- Was_Hidden Flag196
482 -- Is_Limited_Interface Flag197
483 -- Has_Pragma_Ordered Flag198
484 -- Is_Ada_2012_Only Flag199
486 -- Has_Delayed_Aspects Flag200
487 -- Has_Pragma_No_Inline Flag201
488 -- Itype_Printed Flag202
489 -- Has_Pragma_Pure Flag203
490 -- Is_Known_Null Flag204
491 -- Low_Bound_Tested Flag205
492 -- Is_Visible_Formal Flag206
493 -- Known_To_Have_Preelab_Init Flag207
494 -- Must_Have_Preelab_Init Flag208
495 -- Is_Return_Object Flag209
496 -- Elaborate_Body_Desirable Flag210
498 -- Has_Static_Discriminants Flag211
499 -- Has_Pragma_Unreferenced_Objects Flag212
500 -- Requires_Overriding Flag213
502 -- Has_Up_Level_Access Flag215
503 -- Universal_Aliasing Flag216
504 -- Suppress_Value_Tracking_On_Call Flag217
505 -- Is_Primitive Flag218
506 -- Has_Initial_Value Flag219
507 -- Has_Dispatch_Table Flag220
509 -- Has_Pragma_Preelab_Init Flag221
510 -- Used_As_Generic_Actual Flag222
511 -- Is_Descendent_Of_Address Flag223
514 -- Is_Only_Out_Parameter Flag226
515 -- Referenced_As_Out_Parameter Flag227
516 -- Has_Thunks Flag228
517 -- Can_Use_Internal_Rep Flag229
518 -- Has_Pragma_Inline_Always Flag230
520 -- Renamed_In_Spec Flag231
521 -- Has_Invariants Flag232
522 -- Has_Pragma_Unmodified Flag233
523 -- Is_Dispatch_Table_Entity Flag234
524 -- Is_Trivial_Subprogram Flag235
525 -- Warnings_Off_Used Flag236
526 -- Warnings_Off_Used_Unmodified Flag237
527 -- Warnings_Off_Used_Unreferenced Flag238
528 -- OK_To_Reorder_Components Flag239
529 -- Has_Postconditions Flag240
531 -- Optimize_Alignment_Space Flag241
532 -- Optimize_Alignment_Time Flag242
533 -- Overlays_Constant Flag243
534 -- Is_RACW_Stub_Type Flag244
535 -- Is_Private_Primitive Flag245
536 -- Is_Underlying_Record_View Flag246
537 -- OK_To_Rename Flag247
538 -- Has_Inheritable_Invariants Flag248
539 -- Is_Safe_To_Reevaluate Flag249
540 -- Has_Predicates Flag250
542 -- Has_Implicit_Dereference Flag251
543 -- Is_Processed_Transient Flag252
544 -- Has_Anonymous_Master Flag253
545 -- Is_Implementation_Defined Flag254
546 -- Is_Predicate_Function Flag255
547 -- Is_Predicate_Function_M Flag256
548 -- Is_Invariant_Procedure Flag257
549 -- Has_Dynamic_Predicate_Aspect Flag258
550 -- Has_Static_Predicate_Aspect Flag259
551 -- Has_Loop_Entry_Attributes Flag260
553 -- Has_Delayed_Rep_Aspects Flag261
554 -- May_Inherit_Delayed_Rep_Aspects Flag262
555 -- Has_Visible_Refinement Flag263
556 -- Is_Discriminant_Check_Function Flag264
557 -- SPARK_Pragma_Inherited Flag265
558 -- SPARK_Aux_Pragma_Inherited Flag266
559 -- Has_Shift_Operator Flag267
560 -- Is_Independent Flag268
561 -- Has_Static_Predicate Flag269
562 -- Stores_Attribute_Old_Prefix Flag270
564 -- (Has_Protected) Flag271
565 -- (SSO_Set_Low_By_Default) Flag272
566 -- (SSO_Set_Low_By_Default) Flag273
568 -- Is_Generic_Actual_Subprogram Flag274
569 -- No_Predicate_On_Actual Flag275
570 -- No_Dynamic_Predicate_On_Actual Flag276
593 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
595 -----------------------
596 -- Local subprograms --
597 -----------------------
600 (State_Id : Entity_Id;
601 Option_Nam : Name_Id) return Boolean;
602 -- Determine whether abstract state State_Id has particular option denoted
603 -- by the name Option_Nam.
609 function Float_Rep (Id : E) return F is
610 pragma Assert (Is_Floating_Point_Type (Id));
612 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
620 (State_Id : Entity_Id;
621 Option_Nam : Name_Id) return Boolean
623 Decl : constant Node_Id := Parent (State_Id);
628 pragma Assert (Ekind (State_Id) = E_Abstract_State);
630 -- The declaration of abstract states with options appear as an
631 -- extension aggregate. If this is not the case, the option is not
634 if Nkind (Decl) /= N_Extension_Aggregate then
640 Opt := First (Expressions (Decl));
641 while Present (Opt) loop
643 -- Currently the only simple option allowed is External
645 if Nkind (Opt) = N_Identifier
646 and then Chars (Opt) = Name_External
647 and then Chars (Opt) = Option_Nam
655 -- Complex options with various specifiers
657 Opt := First (Component_Associations (Decl));
658 while Present (Opt) loop
659 Opt_Nam := First (Choices (Opt));
661 if Nkind (Opt_Nam) = N_Identifier
662 and then Chars (Opt_Nam) = Option_Nam
673 --------------------------------
674 -- Attribute Access Functions --
675 --------------------------------
677 function Abstract_States (Id : E) return L is
679 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
683 function Accept_Address (Id : E) return L is
688 function Access_Disp_Table (Id : E) return L is
690 pragma Assert (Ekind_In (Id, E_Record_Type,
692 return Elist16 (Implementation_Base_Type (Id));
693 end Access_Disp_Table;
695 function Actual_Subtype (Id : E) return E is
698 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
699 or else Is_Formal (Id));
703 function Address_Taken (Id : E) return B is
708 function Alias (Id : E) return E is
711 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
715 function Alignment (Id : E) return U is
717 pragma Assert (Is_Type (Id)
718 or else Is_Formal (Id)
719 or else Ekind_In (Id, E_Loop_Parameter,
726 function Associated_Formal_Package (Id : E) return E is
728 pragma Assert (Ekind (Id) = E_Package);
730 end Associated_Formal_Package;
732 function Associated_Node_For_Itype (Id : E) return N is
735 end Associated_Node_For_Itype;
737 function Associated_Storage_Pool (Id : E) return E is
739 pragma Assert (Is_Access_Type (Id));
740 return Node22 (Root_Type (Id));
741 end Associated_Storage_Pool;
743 function Barrier_Function (Id : E) return N is
745 pragma Assert (Is_Entry (Id));
747 end Barrier_Function;
749 function Block_Node (Id : E) return N is
751 pragma Assert (Ekind (Id) = E_Block);
755 function Body_Entity (Id : E) return E is
757 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
761 function Body_Needed_For_SAL (Id : E) return B is
764 (Ekind (Id) = E_Package
765 or else Is_Subprogram (Id)
766 or else Is_Generic_Unit (Id));
768 end Body_Needed_For_SAL;
770 function Body_References (Id : E) return L is
772 pragma Assert (Ekind (Id) = E_Abstract_State);
776 function BIP_Initialization_Call (Id : E) return N is
778 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
780 end BIP_Initialization_Call;
782 function C_Pass_By_Copy (Id : E) return B is
784 pragma Assert (Is_Record_Type (Id));
785 return Flag125 (Implementation_Base_Type (Id));
788 function Can_Never_Be_Null (Id : E) return B is
791 end Can_Never_Be_Null;
793 function Checks_May_Be_Suppressed (Id : E) return B is
796 end Checks_May_Be_Suppressed;
798 function Class_Wide_Type (Id : E) return E is
800 pragma Assert (Is_Type (Id));
804 function Cloned_Subtype (Id : E) return E is
806 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
810 function Component_Bit_Offset (Id : E) return U is
812 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
814 end Component_Bit_Offset;
816 function Component_Clause (Id : E) return N is
818 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
820 end Component_Clause;
822 function Component_Size (Id : E) return U is
824 pragma Assert (Is_Array_Type (Id));
825 return Uint22 (Implementation_Base_Type (Id));
828 function Component_Type (Id : E) return E is
830 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
831 return Node20 (Implementation_Base_Type (Id));
834 function Corresponding_Concurrent_Type (Id : E) return E is
836 pragma Assert (Ekind (Id) = E_Record_Type);
838 end Corresponding_Concurrent_Type;
840 function Corresponding_Discriminant (Id : E) return E is
842 pragma Assert (Ekind (Id) = E_Discriminant);
844 end Corresponding_Discriminant;
846 function Corresponding_Equality (Id : E) return E is
849 (Ekind (Id) = E_Function
850 and then not Comes_From_Source (Id)
851 and then Chars (Id) = Name_Op_Ne);
853 end Corresponding_Equality;
855 function Corresponding_Protected_Entry (Id : E) return E is
857 pragma Assert (Ekind (Id) = E_Subprogram_Body);
859 end Corresponding_Protected_Entry;
861 function Corresponding_Record_Type (Id : E) return E is
863 pragma Assert (Is_Concurrent_Type (Id));
865 end Corresponding_Record_Type;
867 function Corresponding_Remote_Type (Id : E) return E is
870 end Corresponding_Remote_Type;
872 function Current_Use_Clause (Id : E) return E is
874 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
876 end Current_Use_Clause;
878 function Current_Value (Id : E) return N is
880 pragma Assert (Ekind (Id) in Object_Kind);
884 function CR_Discriminant (Id : E) return E is
889 function Debug_Info_Off (Id : E) return B is
894 function Debug_Renaming_Link (Id : E) return E is
897 end Debug_Renaming_Link;
899 function Default_Aspect_Component_Value (Id : E) return N is
901 pragma Assert (Is_Array_Type (Id));
902 return Node19 (Base_Type (Id));
903 end Default_Aspect_Component_Value;
905 function Default_Aspect_Value (Id : E) return N is
907 pragma Assert (Is_Scalar_Type (Id));
908 return Node19 (Base_Type (Id));
909 end Default_Aspect_Value;
911 function Default_Expr_Function (Id : E) return E is
913 pragma Assert (Is_Formal (Id));
915 end Default_Expr_Function;
917 function Default_Expressions_Processed (Id : E) return B is
920 end Default_Expressions_Processed;
922 function Default_Value (Id : E) return N is
924 pragma Assert (Is_Formal (Id));
928 function Delay_Cleanups (Id : E) return B is
933 function Delay_Subprogram_Descriptors (Id : E) return B is
936 end Delay_Subprogram_Descriptors;
938 function Delta_Value (Id : E) return R is
940 pragma Assert (Is_Fixed_Point_Type (Id));
944 function Dependent_Instances (Id : E) return L is
946 pragma Assert (Is_Generic_Instance (Id));
948 end Dependent_Instances;
950 function Depends_On_Private (Id : E) return B is
952 pragma Assert (Nkind (Id) in N_Entity);
954 end Depends_On_Private;
956 function Derived_Type_Link (Id : E) return E is
958 pragma Assert (Is_Type (Id));
959 return Node31 (Base_Type (Id));
960 end Derived_Type_Link;
962 function Digits_Value (Id : E) return U is
965 (Is_Floating_Point_Type (Id)
966 or else Is_Decimal_Fixed_Point_Type (Id));
970 function Direct_Primitive_Operations (Id : E) return L is
972 pragma Assert (Is_Tagged_Type (Id));
974 end Direct_Primitive_Operations;
976 function Directly_Designated_Type (Id : E) return E is
978 pragma Assert (Is_Access_Type (Id));
980 end Directly_Designated_Type;
982 function Discard_Names (Id : E) return B is
987 function Discriminal (Id : E) return E is
989 pragma Assert (Ekind (Id) = E_Discriminant);
993 function Discriminal_Link (Id : E) return N is
996 end Discriminal_Link;
998 function Discriminant_Checking_Func (Id : E) return E is
1000 pragma Assert (Ekind (Id) = E_Component);
1002 end Discriminant_Checking_Func;
1004 function Discriminant_Constraint (Id : E) return L is
1006 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1007 return Elist21 (Id);
1008 end Discriminant_Constraint;
1010 function Discriminant_Default_Value (Id : E) return N is
1012 pragma Assert (Ekind (Id) = E_Discriminant);
1014 end Discriminant_Default_Value;
1016 function Discriminant_Number (Id : E) return U is
1018 pragma Assert (Ekind (Id) = E_Discriminant);
1020 end Discriminant_Number;
1022 function Dispatch_Table_Wrappers (Id : E) return L is
1024 pragma Assert (Ekind_In (Id, E_Record_Type,
1026 return Elist26 (Implementation_Base_Type (Id));
1027 end Dispatch_Table_Wrappers;
1029 function DT_Entry_Count (Id : E) return U is
1031 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1035 function DT_Offset_To_Top_Func (Id : E) return E is
1037 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1039 end DT_Offset_To_Top_Func;
1041 function DT_Position (Id : E) return U is
1043 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1044 and then Present (DTC_Entity (Id)));
1048 function DTC_Entity (Id : E) return E is
1050 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1054 function Elaborate_Body_Desirable (Id : E) return B is
1056 pragma Assert (Ekind (Id) = E_Package);
1057 return Flag210 (Id);
1058 end Elaborate_Body_Desirable;
1060 function Elaboration_Entity (Id : E) return E is
1065 Ekind (Id) = E_Package
1067 Is_Generic_Unit (Id));
1069 end Elaboration_Entity;
1071 function Elaboration_Entity_Required (Id : E) return B is
1076 Ekind (Id) = E_Package
1078 Is_Generic_Unit (Id));
1079 return Flag174 (Id);
1080 end Elaboration_Entity_Required;
1082 function Encapsulating_State (Id : E) return N is
1084 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1086 end Encapsulating_State;
1088 function Enclosing_Scope (Id : E) return E is
1091 end Enclosing_Scope;
1093 function Entry_Accepted (Id : E) return B is
1095 pragma Assert (Is_Entry (Id));
1096 return Flag152 (Id);
1099 function Entry_Bodies_Array (Id : E) return E is
1102 end Entry_Bodies_Array;
1104 function Entry_Cancel_Parameter (Id : E) return E is
1107 end Entry_Cancel_Parameter;
1109 function Entry_Component (Id : E) return E is
1112 end Entry_Component;
1114 function Entry_Formal (Id : E) return E is
1119 function Entry_Index_Constant (Id : E) return N is
1121 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1123 end Entry_Index_Constant;
1125 function Contract (Id : E) return N is
1128 (Ekind_In (Id, E_Entry,
1135 or else Is_Generic_Subprogram (Id)
1136 or else Is_Subprogram (Id));
1140 function Entry_Parameters_Type (Id : E) return E is
1143 end Entry_Parameters_Type;
1145 function Enum_Pos_To_Rep (Id : E) return E is
1147 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1149 end Enum_Pos_To_Rep;
1151 function Enumeration_Pos (Id : E) return Uint is
1153 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1155 end Enumeration_Pos;
1157 function Enumeration_Rep (Id : E) return U is
1159 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1161 end Enumeration_Rep;
1163 function Enumeration_Rep_Expr (Id : E) return N is
1165 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1167 end Enumeration_Rep_Expr;
1169 function Equivalent_Type (Id : E) return E is
1172 (Ekind_In (Id, E_Class_Wide_Type,
1173 E_Class_Wide_Subtype,
1174 E_Access_Subprogram_Type,
1175 E_Access_Protected_Subprogram_Type,
1176 E_Anonymous_Access_Protected_Subprogram_Type,
1177 E_Access_Subprogram_Type,
1180 end Equivalent_Type;
1182 function Esize (Id : E) return Uint is
1187 function Extra_Accessibility (Id : E) return E is
1190 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1192 end Extra_Accessibility;
1194 function Extra_Accessibility_Of_Result (Id : E) return E is
1196 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1198 end Extra_Accessibility_Of_Result;
1200 function Extra_Constrained (Id : E) return E is
1202 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1204 end Extra_Constrained;
1206 function Extra_Formal (Id : E) return E is
1211 function Extra_Formals (Id : E) return E is
1214 (Is_Overloadable (Id)
1215 or else Ekind_In (Id, E_Entry_Family,
1217 E_Subprogram_Type));
1221 function Can_Use_Internal_Rep (Id : E) return B is
1223 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1224 return Flag229 (Base_Type (Id));
1225 end Can_Use_Internal_Rep;
1227 function Finalization_Master (Id : E) return E is
1229 pragma Assert (Is_Access_Type (Id));
1230 return Node23 (Root_Type (Id));
1231 end Finalization_Master;
1233 function Finalize_Storage_Only (Id : E) return B is
1235 pragma Assert (Is_Type (Id));
1236 return Flag158 (Base_Type (Id));
1237 end Finalize_Storage_Only;
1239 function Finalizer (Id : E) return E is
1241 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1245 function First_Entity (Id : E) return E is
1250 function First_Exit_Statement (Id : E) return N is
1252 pragma Assert (Ekind (Id) = E_Loop);
1254 end First_Exit_Statement;
1256 function First_Index (Id : E) return N is
1258 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1262 function First_Literal (Id : E) return E is
1264 pragma Assert (Is_Enumeration_Type (Id));
1268 function First_Optional_Parameter (Id : E) return E is
1270 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1272 end First_Optional_Parameter;
1274 function First_Private_Entity (Id : E) return E is
1276 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1277 or else Ekind (Id) in Concurrent_Kind);
1279 end First_Private_Entity;
1281 function First_Rep_Item (Id : E) return E is
1286 function Freeze_Node (Id : E) return N is
1291 function From_Limited_With (Id : E) return B is
1293 return Flag159 (Id);
1294 end From_Limited_With;
1296 function Full_View (Id : E) return E is
1298 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1302 function Generic_Homonym (Id : E) return E is
1304 pragma Assert (Ekind (Id) = E_Generic_Package);
1306 end Generic_Homonym;
1308 function Generic_Renamings (Id : E) return L is
1310 return Elist23 (Id);
1311 end Generic_Renamings;
1313 function Handler_Records (Id : E) return S is
1316 end Handler_Records;
1318 function Has_Aliased_Components (Id : E) return B is
1320 return Flag135 (Implementation_Base_Type (Id));
1321 end Has_Aliased_Components;
1323 function Has_Alignment_Clause (Id : E) return B is
1326 end Has_Alignment_Clause;
1328 function Has_All_Calls_Remote (Id : E) return B is
1331 end Has_All_Calls_Remote;
1333 function Has_Anonymous_Master (Id : E) return B is
1336 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1337 return Flag253 (Id);
1338 end Has_Anonymous_Master;
1340 function Has_Atomic_Components (Id : E) return B is
1342 return Flag86 (Implementation_Base_Type (Id));
1343 end Has_Atomic_Components;
1345 function Has_Biased_Representation (Id : E) return B is
1347 return Flag139 (Id);
1348 end Has_Biased_Representation;
1350 function Has_Completion (Id : E) return B is
1355 function Has_Completion_In_Body (Id : E) return B is
1357 pragma Assert (Is_Type (Id));
1359 end Has_Completion_In_Body;
1361 function Has_Complex_Representation (Id : E) return B is
1363 pragma Assert (Is_Type (Id));
1364 return Flag140 (Implementation_Base_Type (Id));
1365 end Has_Complex_Representation;
1367 function Has_Component_Size_Clause (Id : E) return B is
1369 pragma Assert (Is_Array_Type (Id));
1370 return Flag68 (Implementation_Base_Type (Id));
1371 end Has_Component_Size_Clause;
1373 function Has_Constrained_Partial_View (Id : E) return B is
1375 pragma Assert (Is_Type (Id));
1376 return Flag187 (Id);
1377 end Has_Constrained_Partial_View;
1379 function Has_Controlled_Component (Id : E) return B is
1381 return Flag43 (Base_Type (Id));
1382 end Has_Controlled_Component;
1384 function Has_Contiguous_Rep (Id : E) return B is
1386 return Flag181 (Id);
1387 end Has_Contiguous_Rep;
1389 function Has_Controlling_Result (Id : E) return B is
1392 end Has_Controlling_Result;
1394 function Has_Convention_Pragma (Id : E) return B is
1396 return Flag119 (Id);
1397 end Has_Convention_Pragma;
1399 function Has_Default_Aspect (Id : E) return B is
1401 return Flag39 (Base_Type (Id));
1402 end Has_Default_Aspect;
1404 function Has_Delayed_Aspects (Id : E) return B is
1406 pragma Assert (Nkind (Id) in N_Entity);
1407 return Flag200 (Id);
1408 end Has_Delayed_Aspects;
1410 function Has_Delayed_Freeze (Id : E) return B is
1412 pragma Assert (Nkind (Id) in N_Entity);
1414 end Has_Delayed_Freeze;
1416 function Has_Delayed_Rep_Aspects (Id : E) return B is
1418 pragma Assert (Nkind (Id) in N_Entity);
1419 return Flag261 (Id);
1420 end Has_Delayed_Rep_Aspects;
1422 function Has_Discriminants (Id : E) return B is
1424 pragma Assert (Nkind (Id) in N_Entity);
1426 end Has_Discriminants;
1428 function Has_Dispatch_Table (Id : E) return B is
1430 pragma Assert (Is_Tagged_Type (Id));
1431 return Flag220 (Id);
1432 end Has_Dispatch_Table;
1434 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1436 pragma Assert (Is_Type (Id));
1437 return Flag258 (Id);
1438 end Has_Dynamic_Predicate_Aspect;
1440 function Has_Enumeration_Rep_Clause (Id : E) return B is
1442 pragma Assert (Is_Enumeration_Type (Id));
1444 end Has_Enumeration_Rep_Clause;
1446 function Has_Exit (Id : E) return B is
1451 function Has_Forward_Instantiation (Id : E) return B is
1453 return Flag175 (Id);
1454 end Has_Forward_Instantiation;
1456 function Has_Fully_Qualified_Name (Id : E) return B is
1458 return Flag173 (Id);
1459 end Has_Fully_Qualified_Name;
1461 function Has_Gigi_Rep_Item (Id : E) return B is
1464 end Has_Gigi_Rep_Item;
1466 function Has_Homonym (Id : E) return B is
1471 function Has_Implicit_Dereference (Id : E) return B is
1473 return Flag251 (Id);
1474 end Has_Implicit_Dereference;
1476 function Has_Independent_Components (Id : E) return B is
1478 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1479 return Flag34 (Base_Type (Id));
1480 end Has_Independent_Components;
1482 function Has_Inheritable_Invariants (Id : E) return B is
1484 pragma Assert (Is_Type (Id));
1485 return Flag248 (Id);
1486 end Has_Inheritable_Invariants;
1488 function Has_Initial_Value (Id : E) return B is
1490 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1491 return Flag219 (Id);
1492 end Has_Initial_Value;
1494 function Has_Invariants (Id : E) return B is
1496 pragma Assert (Is_Type (Id));
1497 return Flag232 (Id);
1500 function Has_Loop_Entry_Attributes (Id : E) return B is
1502 pragma Assert (Ekind (Id) = E_Loop);
1503 return Flag260 (Id);
1504 end Has_Loop_Entry_Attributes;
1506 function Has_Machine_Radix_Clause (Id : E) return B is
1508 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1510 end Has_Machine_Radix_Clause;
1512 function Has_Master_Entity (Id : E) return B is
1515 end Has_Master_Entity;
1517 function Has_Missing_Return (Id : E) return B is
1519 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1520 return Flag142 (Id);
1521 end Has_Missing_Return;
1523 function Has_Nested_Block_With_Handler (Id : E) return B is
1525 return Flag101 (Id);
1526 end Has_Nested_Block_With_Handler;
1528 function Has_Non_Standard_Rep (Id : E) return B is
1530 return Flag75 (Implementation_Base_Type (Id));
1531 end Has_Non_Standard_Rep;
1533 function Has_Object_Size_Clause (Id : E) return B is
1535 pragma Assert (Is_Type (Id));
1536 return Flag172 (Id);
1537 end Has_Object_Size_Clause;
1539 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1541 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1542 return Flag110 (Id);
1543 end Has_Out_Or_In_Out_Parameter;
1545 function Has_Per_Object_Constraint (Id : E) return B is
1547 return Flag154 (Id);
1548 end Has_Per_Object_Constraint;
1550 function Has_Postconditions (Id : E) return B is
1552 pragma Assert (Is_Subprogram (Id));
1553 return Flag240 (Id);
1554 end Has_Postconditions;
1556 function Has_Pragma_Controlled (Id : E) return B is
1558 pragma Assert (Is_Access_Type (Id));
1559 return Flag27 (Implementation_Base_Type (Id));
1560 end Has_Pragma_Controlled;
1562 function Has_Pragma_Elaborate_Body (Id : E) return B is
1564 return Flag150 (Id);
1565 end Has_Pragma_Elaborate_Body;
1567 function Has_Pragma_Inline (Id : E) return B is
1569 return Flag157 (Id);
1570 end Has_Pragma_Inline;
1572 function Has_Pragma_Inline_Always (Id : E) return B is
1574 return Flag230 (Id);
1575 end Has_Pragma_Inline_Always;
1577 function Has_Pragma_No_Inline (Id : E) return B is
1579 return Flag201 (Id);
1580 end Has_Pragma_No_Inline;
1582 function Has_Pragma_Ordered (Id : E) return B is
1584 pragma Assert (Is_Enumeration_Type (Id));
1585 return Flag198 (Implementation_Base_Type (Id));
1586 end Has_Pragma_Ordered;
1588 function Has_Pragma_Pack (Id : E) return B is
1590 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1591 return Flag121 (Implementation_Base_Type (Id));
1592 end Has_Pragma_Pack;
1594 function Has_Pragma_Preelab_Init (Id : E) return B is
1596 return Flag221 (Id);
1597 end Has_Pragma_Preelab_Init;
1599 function Has_Pragma_Pure (Id : E) return B is
1601 return Flag203 (Id);
1602 end Has_Pragma_Pure;
1604 function Has_Pragma_Pure_Function (Id : E) return B is
1606 return Flag179 (Id);
1607 end Has_Pragma_Pure_Function;
1609 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1611 return Flag169 (Id);
1612 end Has_Pragma_Thread_Local_Storage;
1614 function Has_Pragma_Unmodified (Id : E) return B is
1616 return Flag233 (Id);
1617 end Has_Pragma_Unmodified;
1619 function Has_Pragma_Unreferenced (Id : E) return B is
1621 return Flag180 (Id);
1622 end Has_Pragma_Unreferenced;
1624 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1626 pragma Assert (Is_Type (Id));
1627 return Flag212 (Id);
1628 end Has_Pragma_Unreferenced_Objects;
1630 function Has_Predicates (Id : E) return B is
1632 pragma Assert (Is_Type (Id));
1633 return Flag250 (Id);
1636 function Has_Primitive_Operations (Id : E) return B is
1638 pragma Assert (Is_Type (Id));
1639 return Flag120 (Base_Type (Id));
1640 end Has_Primitive_Operations;
1642 function Has_Private_Ancestor (Id : E) return B is
1644 return Flag151 (Id);
1645 end Has_Private_Ancestor;
1647 function Has_Private_Declaration (Id : E) return B is
1649 return Flag155 (Id);
1650 end Has_Private_Declaration;
1652 function Has_Protected (Id : E) return B is
1654 return Flag271 (Base_Type (Id));
1657 function Has_Qualified_Name (Id : E) return B is
1659 return Flag161 (Id);
1660 end Has_Qualified_Name;
1662 function Has_RACW (Id : E) return B is
1664 pragma Assert (Ekind (Id) = E_Package);
1665 return Flag214 (Id);
1668 function Has_Record_Rep_Clause (Id : E) return B is
1670 pragma Assert (Is_Record_Type (Id));
1671 return Flag65 (Implementation_Base_Type (Id));
1672 end Has_Record_Rep_Clause;
1674 function Has_Recursive_Call (Id : E) return B is
1676 pragma Assert (Is_Subprogram (Id));
1677 return Flag143 (Id);
1678 end Has_Recursive_Call;
1680 function Has_Shift_Operator (Id : E) return B is
1682 pragma Assert (Is_Integer_Type (Id));
1683 return Flag267 (Base_Type (Id));
1684 end Has_Shift_Operator;
1686 function Has_Size_Clause (Id : E) return B is
1689 end Has_Size_Clause;
1691 function Has_Small_Clause (Id : E) return B is
1694 end Has_Small_Clause;
1696 function Has_Specified_Layout (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1699 return Flag100 (Implementation_Base_Type (Id));
1700 end Has_Specified_Layout;
1702 function Has_Specified_Stream_Input (Id : E) return B is
1704 pragma Assert (Is_Type (Id));
1705 return Flag190 (Id);
1706 end Has_Specified_Stream_Input;
1708 function Has_Specified_Stream_Output (Id : E) return B is
1710 pragma Assert (Is_Type (Id));
1711 return Flag191 (Id);
1712 end Has_Specified_Stream_Output;
1714 function Has_Specified_Stream_Read (Id : E) return B is
1716 pragma Assert (Is_Type (Id));
1717 return Flag192 (Id);
1718 end Has_Specified_Stream_Read;
1720 function Has_Specified_Stream_Write (Id : E) return B is
1722 pragma Assert (Is_Type (Id));
1723 return Flag193 (Id);
1724 end Has_Specified_Stream_Write;
1726 function Has_Static_Discriminants (Id : E) return B is
1728 pragma Assert (Is_Type (Id));
1729 return Flag211 (Id);
1730 end Has_Static_Discriminants;
1732 function Has_Static_Predicate (Id : E) return B is
1734 pragma Assert (Is_Type (Id));
1735 return Flag269 (Id);
1736 end Has_Static_Predicate;
1738 function Has_Static_Predicate_Aspect (Id : E) return B is
1740 pragma Assert (Is_Type (Id));
1741 return Flag259 (Id);
1742 end Has_Static_Predicate_Aspect;
1744 function Has_Storage_Size_Clause (Id : E) return B is
1746 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1747 return Flag23 (Implementation_Base_Type (Id));
1748 end Has_Storage_Size_Clause;
1750 function Has_Stream_Size_Clause (Id : E) return B is
1752 return Flag184 (Id);
1753 end Has_Stream_Size_Clause;
1755 function Has_Task (Id : E) return B is
1757 return Flag30 (Base_Type (Id));
1760 function Has_Thunks (Id : E) return B is
1762 return Flag228 (Id);
1765 function Has_Unchecked_Union (Id : E) return B is
1767 return Flag123 (Base_Type (Id));
1768 end Has_Unchecked_Union;
1770 function Has_Unknown_Discriminants (Id : E) return B is
1772 pragma Assert (Is_Type (Id));
1774 end Has_Unknown_Discriminants;
1776 function Has_Up_Level_Access (Id : E) return B is
1779 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1780 return Flag215 (Id);
1781 end Has_Up_Level_Access;
1783 function Has_Visible_Refinement (Id : E) return B is
1785 pragma Assert (Ekind (Id) = E_Abstract_State);
1786 return Flag263 (Id);
1787 end Has_Visible_Refinement;
1789 function Has_Volatile_Components (Id : E) return B is
1791 return Flag87 (Implementation_Base_Type (Id));
1792 end Has_Volatile_Components;
1794 function Has_Xref_Entry (Id : E) return B is
1796 return Flag182 (Id);
1799 function Hiding_Loop_Variable (Id : E) return E is
1801 pragma Assert (Ekind (Id) = E_Variable);
1803 end Hiding_Loop_Variable;
1805 function Homonym (Id : E) return E is
1810 function Import_Pragma (Id : E) return E is
1812 pragma Assert (Is_Subprogram (Id));
1816 function Interface_Alias (Id : E) return E is
1818 pragma Assert (Is_Subprogram (Id));
1820 end Interface_Alias;
1822 function Interfaces (Id : E) return L is
1824 pragma Assert (Is_Record_Type (Id));
1825 return Elist25 (Id);
1828 function In_Package_Body (Id : E) return B is
1831 end In_Package_Body;
1833 function In_Private_Part (Id : E) return B is
1836 end In_Private_Part;
1838 function In_Use (Id : E) return B is
1840 pragma Assert (Nkind (Id) in N_Entity);
1844 function Initialization_Statements (Id : E) return N is
1846 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1848 end Initialization_Statements;
1850 function Inner_Instances (Id : E) return L is
1852 return Elist23 (Id);
1853 end Inner_Instances;
1855 function Interface_Name (Id : E) return N is
1860 function Is_Abstract_Subprogram (Id : E) return B is
1862 pragma Assert (Is_Overloadable (Id));
1864 end Is_Abstract_Subprogram;
1866 function Is_Abstract_Type (Id : E) return B is
1868 pragma Assert (Is_Type (Id));
1869 return Flag146 (Id);
1870 end Is_Abstract_Type;
1872 function Is_Local_Anonymous_Access (Id : E) return B is
1874 pragma Assert (Is_Access_Type (Id));
1875 return Flag194 (Id);
1876 end Is_Local_Anonymous_Access;
1878 function Is_Access_Constant (Id : E) return B is
1880 pragma Assert (Is_Access_Type (Id));
1882 end Is_Access_Constant;
1884 function Is_Ada_2005_Only (Id : E) return B is
1886 return Flag185 (Id);
1887 end Is_Ada_2005_Only;
1889 function Is_Ada_2012_Only (Id : E) return B is
1891 return Flag199 (Id);
1892 end Is_Ada_2012_Only;
1894 function Is_Aliased (Id : E) return B is
1896 pragma Assert (Nkind (Id) in N_Entity);
1900 function Is_Asynchronous (Id : E) return B is
1902 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1904 end Is_Asynchronous;
1906 function Is_Atomic (Id : E) return B is
1911 function Is_Bit_Packed_Array (Id : E) return B is
1913 return Flag122 (Implementation_Base_Type (Id));
1914 end Is_Bit_Packed_Array;
1916 function Is_Called (Id : E) return B is
1918 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1919 return Flag102 (Id);
1922 function Is_Character_Type (Id : E) return B is
1925 end Is_Character_Type;
1927 function Is_Child_Unit (Id : E) return B is
1932 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1935 end Is_Class_Wide_Equivalent_Type;
1937 function Is_Compilation_Unit (Id : E) return B is
1939 return Flag149 (Id);
1940 end Is_Compilation_Unit;
1942 function Is_Completely_Hidden (Id : E) return B is
1944 pragma Assert (Ekind (Id) = E_Discriminant);
1945 return Flag103 (Id);
1946 end Is_Completely_Hidden;
1948 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1951 end Is_Constr_Subt_For_U_Nominal;
1953 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1955 return Flag141 (Id);
1956 end Is_Constr_Subt_For_UN_Aliased;
1958 function Is_Constrained (Id : E) return B is
1960 pragma Assert (Nkind (Id) in N_Entity);
1964 function Is_Constructor (Id : E) return B is
1969 function Is_Controlled (Id : E) return B is
1971 return Flag42 (Base_Type (Id));
1974 function Is_Controlling_Formal (Id : E) return B is
1976 pragma Assert (Is_Formal (Id));
1978 end Is_Controlling_Formal;
1980 function Is_CPP_Class (Id : E) return B is
1985 function Is_Descendent_Of_Address (Id : E) return B is
1987 return Flag223 (Id);
1988 end Is_Descendent_Of_Address;
1990 function Is_Discrim_SO_Function (Id : E) return B is
1992 return Flag176 (Id);
1993 end Is_Discrim_SO_Function;
1995 function Is_Discriminant_Check_Function (Id : E) return B is
1997 return Flag264 (Id);
1998 end Is_Discriminant_Check_Function;
2000 function Is_Dispatch_Table_Entity (Id : E) return B is
2002 return Flag234 (Id);
2003 end Is_Dispatch_Table_Entity;
2005 function Is_Dispatching_Operation (Id : E) return B is
2007 pragma Assert (Nkind (Id) in N_Entity);
2009 end Is_Dispatching_Operation;
2011 function Is_Eliminated (Id : E) return B is
2013 return Flag124 (Id);
2016 function Is_Entry_Formal (Id : E) return B is
2019 end Is_Entry_Formal;
2021 function Is_Exported (Id : E) return B is
2026 function Is_First_Subtype (Id : E) return B is
2029 end Is_First_Subtype;
2031 function Is_For_Access_Subtype (Id : E) return B is
2033 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2034 return Flag118 (Id);
2035 end Is_For_Access_Subtype;
2037 function Is_Formal_Subprogram (Id : E) return B is
2039 return Flag111 (Id);
2040 end Is_Formal_Subprogram;
2042 function Is_Frozen (Id : E) return B is
2047 function Is_Generic_Actual_Subprogram (Id : E) return B is
2049 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2050 return Flag274 (Id);
2051 end Is_Generic_Actual_Subprogram;
2053 function Is_Generic_Actual_Type (Id : E) return B is
2055 pragma Assert (Is_Type (Id));
2057 end Is_Generic_Actual_Type;
2059 function Is_Generic_Instance (Id : E) return B is
2061 return Flag130 (Id);
2062 end Is_Generic_Instance;
2064 function Is_Generic_Type (Id : E) return B is
2066 pragma Assert (Nkind (Id) in N_Entity);
2068 end Is_Generic_Type;
2070 function Is_Hidden (Id : E) return B is
2075 function Is_Hidden_Open_Scope (Id : E) return B is
2077 return Flag171 (Id);
2078 end Is_Hidden_Open_Scope;
2080 function Is_Immediately_Visible (Id : E) return B is
2082 pragma Assert (Nkind (Id) in N_Entity);
2084 end Is_Immediately_Visible;
2086 function Is_Implementation_Defined (Id : E) return B is
2088 return Flag254 (Id);
2089 end Is_Implementation_Defined;
2091 function Is_Imported (Id : E) return B is
2096 function Is_Independent (Id : E) return B is
2098 pragma Assert (Ekind (Id) = E_Component);
2099 return Flag268 (Id);
2102 function Is_Inlined (Id : E) return B is
2107 function Is_Inlined_Always (Id : E) return B is
2109 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2111 end Is_Inlined_Always;
2113 function Is_Interface (Id : E) return B is
2115 return Flag186 (Id);
2118 function Is_Instantiated (Id : E) return B is
2120 return Flag126 (Id);
2121 end Is_Instantiated;
2123 function Is_Internal (Id : E) return B is
2125 pragma Assert (Nkind (Id) in N_Entity);
2129 function Is_Interrupt_Handler (Id : E) return B is
2131 pragma Assert (Nkind (Id) in N_Entity);
2133 end Is_Interrupt_Handler;
2135 function Is_Intrinsic_Subprogram (Id : E) return B is
2138 end Is_Intrinsic_Subprogram;
2140 function Is_Invariant_Procedure (Id : E) return B is
2142 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2143 return Flag257 (Id);
2144 end Is_Invariant_Procedure;
2146 function Is_Itype (Id : E) return B is
2151 function Is_Known_Non_Null (Id : E) return B is
2154 end Is_Known_Non_Null;
2156 function Is_Known_Null (Id : E) return B is
2158 return Flag204 (Id);
2161 function Is_Known_Valid (Id : E) return B is
2163 return Flag170 (Id);
2166 function Is_Limited_Composite (Id : E) return B is
2168 return Flag106 (Id);
2169 end Is_Limited_Composite;
2171 function Is_Limited_Interface (Id : E) return B is
2173 return Flag197 (Id);
2174 end Is_Limited_Interface;
2176 function Is_Limited_Record (Id : E) return B is
2179 end Is_Limited_Record;
2181 function Is_Machine_Code_Subprogram (Id : E) return B is
2183 pragma Assert (Is_Subprogram (Id));
2184 return Flag137 (Id);
2185 end Is_Machine_Code_Subprogram;
2187 function Is_Non_Static_Subtype (Id : E) return B is
2189 pragma Assert (Is_Type (Id));
2190 return Flag109 (Id);
2191 end Is_Non_Static_Subtype;
2193 function Is_Null_Init_Proc (Id : E) return B is
2195 pragma Assert (Ekind (Id) = E_Procedure);
2196 return Flag178 (Id);
2197 end Is_Null_Init_Proc;
2199 function Is_Obsolescent (Id : E) return B is
2201 return Flag153 (Id);
2204 function Is_Only_Out_Parameter (Id : E) return B is
2206 pragma Assert (Is_Formal (Id));
2207 return Flag226 (Id);
2208 end Is_Only_Out_Parameter;
2210 function Is_Package_Body_Entity (Id : E) return B is
2212 return Flag160 (Id);
2213 end Is_Package_Body_Entity;
2215 function Is_Packed (Id : E) return B is
2217 return Flag51 (Implementation_Base_Type (Id));
2220 function Is_Packed_Array_Impl_Type (Id : E) return B is
2222 return Flag138 (Id);
2223 end Is_Packed_Array_Impl_Type;
2225 function Is_Potentially_Use_Visible (Id : E) return B is
2227 pragma Assert (Nkind (Id) in N_Entity);
2229 end Is_Potentially_Use_Visible;
2231 function Is_Predicate_Function (Id : E) return B is
2233 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2234 return Flag255 (Id);
2235 end Is_Predicate_Function;
2237 function Is_Predicate_Function_M (Id : E) return B is
2239 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2240 return Flag256 (Id);
2241 end Is_Predicate_Function_M;
2243 function Is_Preelaborated (Id : E) return B is
2246 end Is_Preelaborated;
2248 function Is_Primitive (Id : E) return B is
2251 (Is_Overloadable (Id)
2252 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2253 return Flag218 (Id);
2256 function Is_Primitive_Wrapper (Id : E) return B is
2258 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2259 return Flag195 (Id);
2260 end Is_Primitive_Wrapper;
2262 function Is_Private_Composite (Id : E) return B is
2264 pragma Assert (Is_Type (Id));
2265 return Flag107 (Id);
2266 end Is_Private_Composite;
2268 function Is_Private_Descendant (Id : E) return B is
2271 end Is_Private_Descendant;
2273 function Is_Private_Primitive (Id : E) return B is
2275 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2276 return Flag245 (Id);
2277 end Is_Private_Primitive;
2279 function Is_Processed_Transient (Id : E) return B is
2281 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2282 return Flag252 (Id);
2283 end Is_Processed_Transient;
2285 function Is_Public (Id : E) return B is
2287 pragma Assert (Nkind (Id) in N_Entity);
2291 function Is_Pure (Id : E) return B is
2296 function Is_Pure_Unit_Access_Type (Id : E) return B is
2298 pragma Assert (Is_Access_Type (Id));
2299 return Flag189 (Id);
2300 end Is_Pure_Unit_Access_Type;
2302 function Is_RACW_Stub_Type (Id : E) return B is
2304 pragma Assert (Is_Type (Id));
2305 return Flag244 (Id);
2306 end Is_RACW_Stub_Type;
2308 function Is_Raised (Id : E) return B is
2310 pragma Assert (Ekind (Id) = E_Exception);
2311 return Flag224 (Id);
2314 function Is_Remote_Call_Interface (Id : E) return B is
2317 end Is_Remote_Call_Interface;
2319 function Is_Remote_Types (Id : E) return B is
2322 end Is_Remote_Types;
2324 function Is_Renaming_Of_Object (Id : E) return B is
2326 return Flag112 (Id);
2327 end Is_Renaming_Of_Object;
2329 function Is_Return_Object (Id : E) return B is
2331 return Flag209 (Id);
2332 end Is_Return_Object;
2334 function Is_Safe_To_Reevaluate (Id : E) return B is
2336 return Flag249 (Id);
2337 end Is_Safe_To_Reevaluate;
2339 function Is_Shared_Passive (Id : E) return B is
2342 end Is_Shared_Passive;
2344 function Is_Statically_Allocated (Id : E) return B is
2347 end Is_Statically_Allocated;
2349 function Is_Tag (Id : E) return B is
2351 pragma Assert (Nkind (Id) in N_Entity);
2355 function Is_Tagged_Type (Id : E) return B is
2360 function Is_Thunk (Id : E) return B is
2362 return Flag225 (Id);
2365 function Is_Trivial_Subprogram (Id : E) return B is
2367 return Flag235 (Id);
2368 end Is_Trivial_Subprogram;
2370 function Is_True_Constant (Id : E) return B is
2372 return Flag163 (Id);
2373 end Is_True_Constant;
2375 function Is_Unchecked_Union (Id : E) return B is
2377 return Flag117 (Implementation_Base_Type (Id));
2378 end Is_Unchecked_Union;
2380 function Is_Underlying_Record_View (Id : E) return B is
2382 return Flag246 (Id);
2383 end Is_Underlying_Record_View;
2385 function Is_Unsigned_Type (Id : E) return B is
2387 pragma Assert (Is_Type (Id));
2388 return Flag144 (Id);
2389 end Is_Unsigned_Type;
2391 function Is_Valued_Procedure (Id : E) return B is
2393 pragma Assert (Ekind (Id) = E_Procedure);
2394 return Flag127 (Id);
2395 end Is_Valued_Procedure;
2397 function Is_Visible_Formal (Id : E) return B is
2399 return Flag206 (Id);
2400 end Is_Visible_Formal;
2402 function Is_Visible_Lib_Unit (Id : E) return B is
2404 return Flag116 (Id);
2405 end Is_Visible_Lib_Unit;
2407 function Is_Volatile (Id : E) return B is
2409 pragma Assert (Nkind (Id) in N_Entity);
2411 if Is_Type (Id) then
2412 return Flag16 (Base_Type (Id));
2418 function Itype_Printed (Id : E) return B is
2420 pragma Assert (Is_Itype (Id));
2421 return Flag202 (Id);
2424 function Kill_Elaboration_Checks (Id : E) return B is
2427 end Kill_Elaboration_Checks;
2429 function Kill_Range_Checks (Id : E) return B is
2432 end Kill_Range_Checks;
2434 function Known_To_Have_Preelab_Init (Id : E) return B is
2436 pragma Assert (Is_Type (Id));
2437 return Flag207 (Id);
2438 end Known_To_Have_Preelab_Init;
2440 function Last_Aggregate_Assignment (Id : E) return N is
2442 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2444 end Last_Aggregate_Assignment;
2446 function Last_Assignment (Id : E) return N is
2448 pragma Assert (Is_Assignable (Id));
2450 end Last_Assignment;
2452 function Last_Entity (Id : E) return E is
2457 function Limited_View (Id : E) return E is
2459 pragma Assert (Ekind (Id) = E_Package);
2463 function Linker_Section_Pragma (Id : E) return N is
2466 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2468 end Linker_Section_Pragma;
2470 function Lit_Indexes (Id : E) return E is
2472 pragma Assert (Is_Enumeration_Type (Id));
2476 function Lit_Strings (Id : E) return E is
2478 pragma Assert (Is_Enumeration_Type (Id));
2482 function Low_Bound_Tested (Id : E) return B is
2484 return Flag205 (Id);
2485 end Low_Bound_Tested;
2487 function Machine_Radix_10 (Id : E) return B is
2489 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2491 end Machine_Radix_10;
2493 function Master_Id (Id : E) return E is
2495 pragma Assert (Is_Access_Type (Id));
2499 function Materialize_Entity (Id : E) return B is
2501 return Flag168 (Id);
2502 end Materialize_Entity;
2504 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2506 return Flag262 (Id);
2507 end May_Inherit_Delayed_Rep_Aspects;
2509 function Mechanism (Id : E) return M is
2511 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2512 return UI_To_Int (Uint8 (Id));
2515 function Modulus (Id : E) return Uint is
2517 pragma Assert (Is_Modular_Integer_Type (Id));
2518 return Uint17 (Base_Type (Id));
2521 function Must_Be_On_Byte_Boundary (Id : E) return B is
2523 pragma Assert (Is_Type (Id));
2524 return Flag183 (Id);
2525 end Must_Be_On_Byte_Boundary;
2527 function Must_Have_Preelab_Init (Id : E) return B is
2529 pragma Assert (Is_Type (Id));
2530 return Flag208 (Id);
2531 end Must_Have_Preelab_Init;
2533 function Needs_Debug_Info (Id : E) return B is
2535 return Flag147 (Id);
2536 end Needs_Debug_Info;
2538 function Needs_No_Actuals (Id : E) return B is
2541 (Is_Overloadable (Id)
2542 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2544 end Needs_No_Actuals;
2546 function Never_Set_In_Source (Id : E) return B is
2548 return Flag115 (Id);
2549 end Never_Set_In_Source;
2551 function Next_Inlined_Subprogram (Id : E) return E is
2554 end Next_Inlined_Subprogram;
2556 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2558 pragma Assert (Is_Discrete_Type (Id));
2559 return Flag276 (Id);
2560 end No_Dynamic_Predicate_On_Actual;
2562 function No_Pool_Assigned (Id : E) return B is
2564 pragma Assert (Is_Access_Type (Id));
2565 return Flag131 (Root_Type (Id));
2566 end No_Pool_Assigned;
2568 function No_Predicate_On_Actual (Id : E) return Boolean is
2570 pragma Assert (Is_Discrete_Type (Id));
2571 return Flag275 (Id);
2572 end No_Predicate_On_Actual;
2574 function No_Return (Id : E) return B is
2576 return Flag113 (Id);
2579 function No_Strict_Aliasing (Id : E) return B is
2581 pragma Assert (Is_Access_Type (Id));
2582 return Flag136 (Base_Type (Id));
2583 end No_Strict_Aliasing;
2585 function Non_Binary_Modulus (Id : E) return B is
2587 pragma Assert (Is_Type (Id));
2588 return Flag58 (Base_Type (Id));
2589 end Non_Binary_Modulus;
2591 function Non_Limited_View (Id : E) return E is
2594 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2596 end Non_Limited_View;
2598 function Nonzero_Is_True (Id : E) return B is
2600 pragma Assert (Root_Type (Id) = Standard_Boolean);
2601 return Flag162 (Base_Type (Id));
2602 end Nonzero_Is_True;
2604 function Normalized_First_Bit (Id : E) return U is
2606 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2608 end Normalized_First_Bit;
2610 function Normalized_Position (Id : E) return U is
2612 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2614 end Normalized_Position;
2616 function Normalized_Position_Max (Id : E) return U is
2618 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2620 end Normalized_Position_Max;
2622 function OK_To_Rename (Id : E) return B is
2624 pragma Assert (Ekind (Id) = E_Variable);
2625 return Flag247 (Id);
2628 function OK_To_Reorder_Components (Id : E) return B is
2630 pragma Assert (Is_Record_Type (Id));
2631 return Flag239 (Base_Type (Id));
2632 end OK_To_Reorder_Components;
2634 function Optimize_Alignment_Space (Id : E) return B is
2637 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2638 return Flag241 (Id);
2639 end Optimize_Alignment_Space;
2641 function Optimize_Alignment_Time (Id : E) return B is
2644 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2645 return Flag242 (Id);
2646 end Optimize_Alignment_Time;
2648 function Original_Access_Type (Id : E) return E is
2650 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2652 end Original_Access_Type;
2654 function Original_Array_Type (Id : E) return E is
2656 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2658 end Original_Array_Type;
2660 function Original_Record_Component (Id : E) return E is
2662 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2664 end Original_Record_Component;
2666 function Overlays_Constant (Id : E) return B is
2668 return Flag243 (Id);
2669 end Overlays_Constant;
2671 function Overridden_Operation (Id : E) return E is
2674 end Overridden_Operation;
2676 function Package_Instantiation (Id : E) return N is
2678 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2680 end Package_Instantiation;
2682 function Packed_Array_Impl_Type (Id : E) return E is
2684 pragma Assert (Is_Array_Type (Id));
2686 end Packed_Array_Impl_Type;
2688 function Parent_Subtype (Id : E) return E is
2690 pragma Assert (Is_Record_Type (Id));
2691 return Node19 (Base_Type (Id));
2694 function Part_Of_Constituents (Id : E) return L is
2696 pragma Assert (Ekind (Id) = E_Abstract_State);
2698 end Part_Of_Constituents;
2700 function Postcondition_Proc (Id : E) return E is
2702 pragma Assert (Ekind (Id) = E_Procedure);
2704 end Postcondition_Proc;
2706 function PPC_Wrapper (Id : E) return E is
2708 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2712 function Prival (Id : E) return E is
2714 pragma Assert (Is_Protected_Component (Id));
2718 function Prival_Link (Id : E) return E is
2720 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2724 function Private_Dependents (Id : E) return L is
2726 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2727 return Elist18 (Id);
2728 end Private_Dependents;
2730 function Private_View (Id : E) return N is
2732 pragma Assert (Is_Private_Type (Id));
2736 function Protected_Body_Subprogram (Id : E) return E is
2738 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2740 end Protected_Body_Subprogram;
2742 function Protected_Formal (Id : E) return E is
2744 pragma Assert (Is_Formal (Id));
2746 end Protected_Formal;
2748 function Protection_Object (Id : E) return E is
2751 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2753 end Protection_Object;
2755 function Reachable (Id : E) return B is
2760 function Referenced (Id : E) return B is
2762 return Flag156 (Id);
2765 function Referenced_As_LHS (Id : E) return B is
2768 end Referenced_As_LHS;
2770 function Referenced_As_Out_Parameter (Id : E) return B is
2772 return Flag227 (Id);
2773 end Referenced_As_Out_Parameter;
2775 function Refinement_Constituents (Id : E) return L is
2777 pragma Assert (Ekind (Id) = E_Abstract_State);
2779 end Refinement_Constituents;
2781 function Register_Exception_Call (Id : E) return N is
2783 pragma Assert (Ekind (Id) = E_Exception);
2785 end Register_Exception_Call;
2787 function Related_Array_Object (Id : E) return E is
2789 pragma Assert (Is_Array_Type (Id));
2791 end Related_Array_Object;
2793 function Related_Expression (Id : E) return N is
2795 pragma Assert (Ekind (Id) in Type_Kind
2796 or else Ekind_In (Id, E_Constant, E_Variable));
2798 end Related_Expression;
2800 function Related_Instance (Id : E) return E is
2802 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2804 end Related_Instance;
2806 function Related_Type (Id : E) return E is
2808 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2812 function Relative_Deadline_Variable (Id : E) return E is
2814 pragma Assert (Is_Task_Type (Id));
2815 return Node26 (Implementation_Base_Type (Id));
2816 end Relative_Deadline_Variable;
2818 function Renamed_Entity (Id : E) return N is
2823 function Renamed_In_Spec (Id : E) return B is
2825 pragma Assert (Ekind (Id) = E_Package);
2826 return Flag231 (Id);
2827 end Renamed_In_Spec;
2829 function Renamed_Object (Id : E) return N is
2834 function Renaming_Map (Id : E) return U is
2839 function Requires_Overriding (Id : E) return B is
2841 pragma Assert (Is_Overloadable (Id));
2842 return Flag213 (Id);
2843 end Requires_Overriding;
2845 function Return_Present (Id : E) return B is
2850 function Return_Applies_To (Id : E) return N is
2853 end Return_Applies_To;
2855 function Returns_By_Ref (Id : E) return B is
2860 function Reverse_Bit_Order (Id : E) return B is
2862 pragma Assert (Is_Record_Type (Id));
2863 return Flag164 (Base_Type (Id));
2864 end Reverse_Bit_Order;
2866 function Reverse_Storage_Order (Id : E) return B is
2868 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2869 return Flag93 (Base_Type (Id));
2870 end Reverse_Storage_Order;
2872 function RM_Size (Id : E) return U is
2874 pragma Assert (Is_Type (Id));
2878 function Scalar_Range (Id : E) return N is
2883 function Scale_Value (Id : E) return U is
2888 function Scope_Depth_Value (Id : E) return U is
2891 end Scope_Depth_Value;
2893 function Sec_Stack_Needed_For_Return (Id : E) return B is
2895 return Flag167 (Id);
2896 end Sec_Stack_Needed_For_Return;
2898 function Shadow_Entities (Id : E) return S is
2900 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2902 end Shadow_Entities;
2904 function Shared_Var_Procs_Instance (Id : E) return E is
2906 pragma Assert (Ekind (Id) = E_Variable);
2908 end Shared_Var_Procs_Instance;
2910 function Size_Check_Code (Id : E) return N is
2912 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2914 end Size_Check_Code;
2916 function Size_Depends_On_Discriminant (Id : E) return B is
2918 return Flag177 (Id);
2919 end Size_Depends_On_Discriminant;
2921 function Size_Known_At_Compile_Time (Id : E) return B is
2924 end Size_Known_At_Compile_Time;
2926 function Small_Value (Id : E) return R is
2928 pragma Assert (Is_Fixed_Point_Type (Id));
2929 return Ureal21 (Id);
2932 function SPARK_Aux_Pragma (Id : E) return N is
2935 (Ekind_In (Id, E_Generic_Package, -- package variants
2939 end SPARK_Aux_Pragma;
2941 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2944 (Ekind_In (Id, E_Generic_Package, -- package variants
2947 return Flag266 (Id);
2948 end SPARK_Aux_Pragma_Inherited;
2950 function SPARK_Pragma (Id : E) return N is
2953 (Ekind_In (Id, E_Function, -- subprogram variants
2955 E_Generic_Procedure,
2959 Ekind_In (Id, E_Generic_Package, -- package variants
2965 function SPARK_Pragma_Inherited (Id : E) return B is
2968 (Ekind_In (Id, E_Function, -- subprogram variants
2970 E_Generic_Procedure,
2974 Ekind_In (Id, E_Generic_Package, -- package variants
2977 return Flag265 (Id);
2978 end SPARK_Pragma_Inherited;
2980 function Spec_Entity (Id : E) return E is
2982 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2986 function SSO_Set_High_By_Default (Id : E) return B is
2988 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2989 return Flag273 (Base_Type (Id));
2990 end SSO_Set_High_By_Default;
2992 function SSO_Set_Low_By_Default (Id : E) return B is
2994 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2995 return Flag272 (Base_Type (Id));
2996 end SSO_Set_Low_By_Default;
2998 function Static_Discrete_Predicate (Id : E) return S is
3000 pragma Assert (Is_Discrete_Type (Id));
3002 end Static_Discrete_Predicate;
3004 function Static_Real_Or_String_Predicate (Id : E) return N is
3006 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3008 end Static_Real_Or_String_Predicate;
3010 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3012 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3014 end Status_Flag_Or_Transient_Decl;
3016 function Storage_Size_Variable (Id : E) return E is
3018 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3019 return Node15 (Implementation_Base_Type (Id));
3020 end Storage_Size_Variable;
3022 function Static_Elaboration_Desired (Id : E) return B is
3024 pragma Assert (Ekind (Id) = E_Package);
3026 end Static_Elaboration_Desired;
3028 function Static_Initialization (Id : E) return N is
3031 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3033 end Static_Initialization;
3035 function Stored_Constraint (Id : E) return L is
3038 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3039 return Elist23 (Id);
3040 end Stored_Constraint;
3042 function Stores_Attribute_Old_Prefix (Id : E) return B is
3044 return Flag270 (Id);
3045 end Stores_Attribute_Old_Prefix;
3047 function Strict_Alignment (Id : E) return B is
3049 return Flag145 (Implementation_Base_Type (Id));
3050 end Strict_Alignment;
3052 function String_Literal_Length (Id : E) return U is
3055 end String_Literal_Length;
3057 function String_Literal_Low_Bound (Id : E) return N is
3060 end String_Literal_Low_Bound;
3062 function Subprograms_For_Type (Id : E) return E is
3064 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3066 end Subprograms_For_Type;
3068 function Suppress_Elaboration_Warnings (Id : E) return B is
3070 return Flag148 (Id);
3071 end Suppress_Elaboration_Warnings;
3073 function Suppress_Initialization (Id : E) return B is
3075 pragma Assert (Is_Type (Id));
3076 return Flag105 (Id);
3077 end Suppress_Initialization;
3079 function Suppress_Style_Checks (Id : E) return B is
3081 return Flag165 (Id);
3082 end Suppress_Style_Checks;
3084 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3086 return Flag217 (Id);
3087 end Suppress_Value_Tracking_On_Call;
3089 function Task_Body_Procedure (Id : E) return N is
3091 pragma Assert (Ekind (Id) in Task_Kind);
3093 end Task_Body_Procedure;
3095 function Thunk_Entity (Id : E) return E is
3097 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3098 and then Is_Thunk (Id));
3102 function Treat_As_Volatile (Id : E) return B is
3105 end Treat_As_Volatile;
3107 function Underlying_Full_View (Id : E) return E is
3109 pragma Assert (Ekind (Id) in Private_Kind);
3111 end Underlying_Full_View;
3113 function Underlying_Record_View (Id : E) return E is
3116 end Underlying_Record_View;
3118 function Universal_Aliasing (Id : E) return B is
3120 pragma Assert (Is_Type (Id));
3121 return Flag216 (Implementation_Base_Type (Id));
3122 end Universal_Aliasing;
3124 function Unset_Reference (Id : E) return N is
3127 end Unset_Reference;
3129 function Used_As_Generic_Actual (Id : E) return B is
3131 return Flag222 (Id);
3132 end Used_As_Generic_Actual;
3134 function Uses_Lock_Free (Id : E) return B is
3136 pragma Assert (Is_Protected_Type (Id));
3137 return Flag188 (Id);
3140 function Uses_Sec_Stack (Id : E) return B is
3145 function Warnings_Off (Id : E) return B is
3150 function Warnings_Off_Used (Id : E) return B is
3152 return Flag236 (Id);
3153 end Warnings_Off_Used;
3155 function Warnings_Off_Used_Unmodified (Id : E) return B is
3157 return Flag237 (Id);
3158 end Warnings_Off_Used_Unmodified;
3160 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3162 return Flag238 (Id);
3163 end Warnings_Off_Used_Unreferenced;
3165 function Wrapped_Entity (Id : E) return E is
3167 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3168 and then Is_Primitive_Wrapper (Id));
3172 function Was_Hidden (Id : E) return B is
3174 return Flag196 (Id);
3177 ------------------------------
3178 -- Classification Functions --
3179 ------------------------------
3181 function Is_Access_Type (Id : E) return B is
3183 return Ekind (Id) in Access_Kind;
3186 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3188 return Ekind (Id) in Access_Protected_Kind;
3189 end Is_Access_Protected_Subprogram_Type;
3191 function Is_Access_Subprogram_Type (Id : E) return B is
3193 return Ekind (Id) in Access_Subprogram_Kind;
3194 end Is_Access_Subprogram_Type;
3196 function Is_Aggregate_Type (Id : E) return B is
3198 return Ekind (Id) in Aggregate_Kind;
3199 end Is_Aggregate_Type;
3201 function Is_Array_Type (Id : E) return B is
3203 return Ekind (Id) in Array_Kind;
3206 function Is_Assignable (Id : E) return B is
3208 return Ekind (Id) in Assignable_Kind;
3211 function Is_Class_Wide_Type (Id : E) return B is
3213 return Ekind (Id) in Class_Wide_Kind;
3214 end Is_Class_Wide_Type;
3216 function Is_Composite_Type (Id : E) return B is
3218 return Ekind (Id) in Composite_Kind;
3219 end Is_Composite_Type;
3221 function Is_Concurrent_Body (Id : E) return B is
3223 return Ekind (Id) in
3224 Concurrent_Body_Kind;
3225 end Is_Concurrent_Body;
3227 function Is_Concurrent_Record_Type (Id : E) return B is
3230 end Is_Concurrent_Record_Type;
3232 function Is_Concurrent_Type (Id : E) return B is
3234 return Ekind (Id) in Concurrent_Kind;
3235 end Is_Concurrent_Type;
3237 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3239 return Ekind (Id) in
3240 Decimal_Fixed_Point_Kind;
3241 end Is_Decimal_Fixed_Point_Type;
3243 function Is_Digits_Type (Id : E) return B is
3245 return Ekind (Id) in Digits_Kind;
3248 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3250 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3251 end Is_Discrete_Or_Fixed_Point_Type;
3253 function Is_Discrete_Type (Id : E) return B is
3255 return Ekind (Id) in Discrete_Kind;
3256 end Is_Discrete_Type;
3258 function Is_Elementary_Type (Id : E) return B is
3260 return Ekind (Id) in Elementary_Kind;
3261 end Is_Elementary_Type;
3263 function Is_Entry (Id : E) return B is
3265 return Ekind (Id) in Entry_Kind;
3268 function Is_Enumeration_Type (Id : E) return B is
3270 return Ekind (Id) in
3272 end Is_Enumeration_Type;
3274 function Is_Fixed_Point_Type (Id : E) return B is
3276 return Ekind (Id) in
3278 end Is_Fixed_Point_Type;
3280 function Is_Floating_Point_Type (Id : E) return B is
3282 return Ekind (Id) in Float_Kind;
3283 end Is_Floating_Point_Type;
3285 function Is_Formal (Id : E) return B is
3287 return Ekind (Id) in Formal_Kind;
3290 function Is_Formal_Object (Id : E) return B is
3292 return Ekind (Id) in Formal_Object_Kind;
3293 end Is_Formal_Object;
3295 function Is_Generic_Subprogram (Id : E) return B is
3297 return Ekind (Id) in Generic_Subprogram_Kind;
3298 end Is_Generic_Subprogram;
3300 function Is_Generic_Unit (Id : E) return B is
3302 return Ekind (Id) in Generic_Unit_Kind;
3303 end Is_Generic_Unit;
3305 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3307 return Ekind (Id) in
3308 Incomplete_Or_Private_Kind;
3309 end Is_Incomplete_Or_Private_Type;
3311 function Is_Incomplete_Type (Id : E) return B is
3313 return Ekind (Id) in
3315 end Is_Incomplete_Type;
3317 function Is_Integer_Type (Id : E) return B is
3319 return Ekind (Id) in Integer_Kind;
3320 end Is_Integer_Type;
3322 function Is_Modular_Integer_Type (Id : E) return B is
3324 return Ekind (Id) in
3325 Modular_Integer_Kind;
3326 end Is_Modular_Integer_Type;
3328 function Is_Named_Number (Id : E) return B is
3330 return Ekind (Id) in Named_Kind;
3331 end Is_Named_Number;
3333 function Is_Numeric_Type (Id : E) return B is
3335 return Ekind (Id) in Numeric_Kind;
3336 end Is_Numeric_Type;
3338 function Is_Object (Id : E) return B is
3340 return Ekind (Id) in Object_Kind;
3343 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3345 return Ekind (Id) in
3346 Ordinary_Fixed_Point_Kind;
3347 end Is_Ordinary_Fixed_Point_Type;
3349 function Is_Overloadable (Id : E) return B is
3351 return Ekind (Id) in Overloadable_Kind;
3352 end Is_Overloadable;
3354 function Is_Private_Type (Id : E) return B is
3356 return Ekind (Id) in Private_Kind;
3357 end Is_Private_Type;
3359 function Is_Protected_Type (Id : E) return B is
3361 return Ekind (Id) in Protected_Kind;
3362 end Is_Protected_Type;
3364 function Is_Real_Type (Id : E) return B is
3366 return Ekind (Id) in Real_Kind;
3369 function Is_Record_Type (Id : E) return B is
3371 return Ekind (Id) in Record_Kind;
3374 function Is_Scalar_Type (Id : E) return B is
3376 return Ekind (Id) in Scalar_Kind;
3379 function Is_Signed_Integer_Type (Id : E) return B is
3381 return Ekind (Id) in Signed_Integer_Kind;
3382 end Is_Signed_Integer_Type;
3384 function Is_Subprogram (Id : E) return B is
3386 return Ekind (Id) in Subprogram_Kind;
3389 function Is_Task_Type (Id : E) return B is
3391 return Ekind (Id) in Task_Kind;
3394 function Is_Type (Id : E) return B is
3396 return Ekind (Id) in Type_Kind;
3399 ------------------------------
3400 -- Attribute Set Procedures --
3401 ------------------------------
3403 -- Note: in many of these set procedures an "obvious" assertion is missing.
3404 -- The reason for this is that in many cases, a field is set before the
3405 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3406 -- it is possible to add assertions that specifically include the E_Void
3407 -- possibility, but in some cases, we just omit the assertions.
3409 procedure Set_Abstract_States (Id : E; V : L) is
3411 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3412 Set_Elist25 (Id, V);
3413 end Set_Abstract_States;
3415 procedure Set_Accept_Address (Id : E; V : L) is
3417 Set_Elist21 (Id, V);
3418 end Set_Accept_Address;
3420 procedure Set_Access_Disp_Table (Id : E; V : L) is
3422 pragma Assert (Ekind (Id) = E_Record_Type
3423 and then Id = Implementation_Base_Type (Id));
3424 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3425 Set_Elist16 (Id, V);
3426 end Set_Access_Disp_Table;
3428 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3431 end Set_Associated_Formal_Package;
3433 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3436 end Set_Associated_Node_For_Itype;
3438 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3440 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3442 end Set_Associated_Storage_Pool;
3444 procedure Set_Actual_Subtype (Id : E; V : E) is
3447 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3448 or else Is_Formal (Id));
3450 end Set_Actual_Subtype;
3452 procedure Set_Address_Taken (Id : E; V : B := True) is
3454 Set_Flag104 (Id, V);
3455 end Set_Address_Taken;
3457 procedure Set_Alias (Id : E; V : E) is
3460 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3464 procedure Set_Alignment (Id : E; V : U) is
3466 pragma Assert (Is_Type (Id)
3467 or else Is_Formal (Id)
3468 or else Ekind_In (Id, E_Loop_Parameter,
3475 procedure Set_Barrier_Function (Id : E; V : N) is
3477 pragma Assert (Is_Entry (Id));
3479 end Set_Barrier_Function;
3481 procedure Set_Block_Node (Id : E; V : N) is
3483 pragma Assert (Ekind (Id) = E_Block);
3487 procedure Set_Body_Entity (Id : E; V : E) is
3489 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3491 end Set_Body_Entity;
3493 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3496 (Ekind (Id) = E_Package
3497 or else Is_Subprogram (Id)
3498 or else Is_Generic_Unit (Id));
3500 end Set_Body_Needed_For_SAL;
3502 procedure Set_Body_References (Id : E; V : L) is
3504 pragma Assert (Ekind (Id) = E_Abstract_State);
3505 Set_Elist16 (Id, V);
3506 end Set_Body_References;
3508 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3510 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3512 end Set_BIP_Initialization_Call;
3514 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3516 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3517 Set_Flag125 (Id, V);
3518 end Set_C_Pass_By_Copy;
3520 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3523 end Set_Can_Never_Be_Null;
3525 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3528 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3529 Set_Flag229 (Id, V);
3530 end Set_Can_Use_Internal_Rep;
3532 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3535 end Set_Checks_May_Be_Suppressed;
3537 procedure Set_Class_Wide_Type (Id : E; V : E) is
3539 pragma Assert (Is_Type (Id));
3541 end Set_Class_Wide_Type;
3543 procedure Set_Cloned_Subtype (Id : E; V : E) is
3545 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3547 end Set_Cloned_Subtype;
3549 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3551 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3553 end Set_Component_Bit_Offset;
3555 procedure Set_Component_Clause (Id : E; V : N) is
3557 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3559 end Set_Component_Clause;
3561 procedure Set_Component_Size (Id : E; V : U) is
3563 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3565 end Set_Component_Size;
3567 procedure Set_Component_Type (Id : E; V : E) is
3569 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3571 end Set_Component_Type;
3573 procedure Set_Contract (Id : E; V : N) is
3576 (Ekind_In (Id, E_Entry,
3584 or else Is_Generic_Subprogram (Id)
3585 or else Is_Subprogram (Id));
3589 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3592 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3594 end Set_Corresponding_Concurrent_Type;
3596 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3598 pragma Assert (Ekind (Id) = E_Discriminant);
3600 end Set_Corresponding_Discriminant;
3602 procedure Set_Corresponding_Equality (Id : E; V : E) is
3605 (Ekind (Id) = E_Function
3606 and then not Comes_From_Source (Id)
3607 and then Chars (Id) = Name_Op_Ne);
3609 end Set_Corresponding_Equality;
3611 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3613 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3615 end Set_Corresponding_Protected_Entry;
3617 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3619 pragma Assert (Is_Concurrent_Type (Id));
3621 end Set_Corresponding_Record_Type;
3623 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3626 end Set_Corresponding_Remote_Type;
3628 procedure Set_Current_Use_Clause (Id : E; V : E) is
3630 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3632 end Set_Current_Use_Clause;
3634 procedure Set_Current_Value (Id : E; V : N) is
3636 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3638 end Set_Current_Value;
3640 procedure Set_CR_Discriminant (Id : E; V : E) is
3643 end Set_CR_Discriminant;
3645 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3647 Set_Flag166 (Id, V);
3648 end Set_Debug_Info_Off;
3650 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3653 end Set_Debug_Renaming_Link;
3655 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3657 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3659 end Set_Default_Aspect_Component_Value;
3661 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3663 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3665 end Set_Default_Aspect_Value;
3667 procedure Set_Default_Expr_Function (Id : E; V : E) is
3669 pragma Assert (Is_Formal (Id));
3671 end Set_Default_Expr_Function;
3673 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3675 Set_Flag108 (Id, V);
3676 end Set_Default_Expressions_Processed;
3678 procedure Set_Default_Value (Id : E; V : N) is
3680 pragma Assert (Is_Formal (Id));
3682 end Set_Default_Value;
3684 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3688 or else Is_Task_Type (Id)
3689 or else Ekind (Id) = E_Block);
3690 Set_Flag114 (Id, V);
3691 end Set_Delay_Cleanups;
3693 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3696 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3699 end Set_Delay_Subprogram_Descriptors;
3701 procedure Set_Delta_Value (Id : E; V : R) is
3703 pragma Assert (Is_Fixed_Point_Type (Id));
3704 Set_Ureal18 (Id, V);
3705 end Set_Delta_Value;
3707 procedure Set_Dependent_Instances (Id : E; V : L) is
3709 pragma Assert (Is_Generic_Instance (Id));
3711 end Set_Dependent_Instances;
3713 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3715 pragma Assert (Nkind (Id) in N_Entity);
3717 end Set_Depends_On_Private;
3719 procedure Set_Derived_Type_Link (Id : E; V : E) is
3721 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3723 end Set_Derived_Type_Link;
3725 procedure Set_Digits_Value (Id : E; V : U) is
3728 (Is_Floating_Point_Type (Id)
3729 or else Is_Decimal_Fixed_Point_Type (Id));
3731 end Set_Digits_Value;
3733 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3736 end Set_Directly_Designated_Type;
3738 procedure Set_Discard_Names (Id : E; V : B := True) is
3741 end Set_Discard_Names;
3743 procedure Set_Discriminal (Id : E; V : E) is
3745 pragma Assert (Ekind (Id) = E_Discriminant);
3747 end Set_Discriminal;
3749 procedure Set_Discriminal_Link (Id : E; V : E) is
3752 end Set_Discriminal_Link;
3754 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3756 pragma Assert (Ekind (Id) = E_Component);
3758 end Set_Discriminant_Checking_Func;
3760 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3762 pragma Assert (Nkind (Id) in N_Entity);
3763 Set_Elist21 (Id, V);
3764 end Set_Discriminant_Constraint;
3766 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3769 end Set_Discriminant_Default_Value;
3771 procedure Set_Discriminant_Number (Id : E; V : U) is
3774 end Set_Discriminant_Number;
3776 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3778 pragma Assert (Ekind (Id) = E_Record_Type
3779 and then Id = Implementation_Base_Type (Id));
3780 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3781 Set_Elist26 (Id, V);
3782 end Set_Dispatch_Table_Wrappers;
3784 procedure Set_DT_Entry_Count (Id : E; V : U) is
3786 pragma Assert (Ekind (Id) = E_Component);
3788 end Set_DT_Entry_Count;
3790 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3792 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3794 end Set_DT_Offset_To_Top_Func;
3796 procedure Set_DT_Position (Id : E; V : U) is
3798 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3800 end Set_DT_Position;
3802 procedure Set_DTC_Entity (Id : E; V : E) is
3804 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3808 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3810 pragma Assert (Ekind (Id) = E_Package);
3811 Set_Flag210 (Id, V);
3812 end Set_Elaborate_Body_Desirable;
3814 procedure Set_Elaboration_Entity (Id : E; V : E) is
3819 Ekind (Id) = E_Package
3821 Is_Generic_Unit (Id));
3823 end Set_Elaboration_Entity;
3825 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3830 Ekind (Id) = E_Package
3832 Is_Generic_Unit (Id));
3833 Set_Flag174 (Id, V);
3834 end Set_Elaboration_Entity_Required;
3836 procedure Set_Encapsulating_State (Id : E; V : E) is
3838 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3840 end Set_Encapsulating_State;
3842 procedure Set_Enclosing_Scope (Id : E; V : E) is
3845 end Set_Enclosing_Scope;
3847 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3849 pragma Assert (Is_Entry (Id));
3850 Set_Flag152 (Id, V);
3851 end Set_Entry_Accepted;
3853 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3856 end Set_Entry_Bodies_Array;
3858 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3861 end Set_Entry_Cancel_Parameter;
3863 procedure Set_Entry_Component (Id : E; V : E) is
3866 end Set_Entry_Component;
3868 procedure Set_Entry_Formal (Id : E; V : E) is
3871 end Set_Entry_Formal;
3873 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3875 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3877 end Set_Entry_Index_Constant;
3879 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3882 end Set_Entry_Parameters_Type;
3884 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3886 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3888 end Set_Enum_Pos_To_Rep;
3890 procedure Set_Enumeration_Pos (Id : E; V : U) is
3892 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3894 end Set_Enumeration_Pos;
3896 procedure Set_Enumeration_Rep (Id : E; V : U) is
3898 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3900 end Set_Enumeration_Rep;
3902 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3904 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3906 end Set_Enumeration_Rep_Expr;
3908 procedure Set_Equivalent_Type (Id : E; V : E) is
3911 (Ekind_In (Id, E_Class_Wide_Type,
3912 E_Class_Wide_Subtype,
3913 E_Access_Protected_Subprogram_Type,
3914 E_Anonymous_Access_Protected_Subprogram_Type,
3915 E_Access_Subprogram_Type,
3918 end Set_Equivalent_Type;
3920 procedure Set_Esize (Id : E; V : U) is
3925 procedure Set_Extra_Accessibility (Id : E; V : E) is
3928 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3930 end Set_Extra_Accessibility;
3932 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3934 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3936 end Set_Extra_Accessibility_Of_Result;
3938 procedure Set_Extra_Constrained (Id : E; V : E) is
3940 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3942 end Set_Extra_Constrained;
3944 procedure Set_Extra_Formal (Id : E; V : E) is
3947 end Set_Extra_Formal;
3949 procedure Set_Extra_Formals (Id : E; V : E) is
3952 (Is_Overloadable (Id)
3953 or else Ekind_In (Id, E_Entry_Family,
3955 E_Subprogram_Type));
3957 end Set_Extra_Formals;
3959 procedure Set_Finalization_Master (Id : E; V : E) is
3961 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3963 end Set_Finalization_Master;
3965 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3967 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3968 Set_Flag158 (Id, V);
3969 end Set_Finalize_Storage_Only;
3971 procedure Set_Finalizer (Id : E; V : E) is
3973 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3977 procedure Set_First_Entity (Id : E; V : E) is
3980 end Set_First_Entity;
3982 procedure Set_First_Exit_Statement (Id : E; V : N) is
3984 pragma Assert (Ekind (Id) = E_Loop);
3986 end Set_First_Exit_Statement;
3988 procedure Set_First_Index (Id : E; V : N) is
3990 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3992 end Set_First_Index;
3994 procedure Set_First_Literal (Id : E; V : E) is
3996 pragma Assert (Is_Enumeration_Type (Id));
3998 end Set_First_Literal;
4000 procedure Set_First_Optional_Parameter (Id : E; V : E) is
4002 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4004 end Set_First_Optional_Parameter;
4006 procedure Set_First_Private_Entity (Id : E; V : E) is
4008 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4009 or else Ekind (Id) in Concurrent_Kind);
4011 end Set_First_Private_Entity;
4013 procedure Set_First_Rep_Item (Id : E; V : N) is
4016 end Set_First_Rep_Item;
4018 procedure Set_Float_Rep (Id : E; V : F) is
4019 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4021 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4024 procedure Set_Freeze_Node (Id : E; V : N) is
4027 end Set_Freeze_Node;
4029 procedure Set_From_Limited_With (Id : E; V : B := True) is
4032 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4033 Set_Flag159 (Id, V);
4034 end Set_From_Limited_With;
4036 procedure Set_Full_View (Id : E; V : E) is
4038 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4042 procedure Set_Generic_Homonym (Id : E; V : E) is
4045 end Set_Generic_Homonym;
4047 procedure Set_Generic_Renamings (Id : E; V : L) is
4049 Set_Elist23 (Id, V);
4050 end Set_Generic_Renamings;
4052 procedure Set_Handler_Records (Id : E; V : S) is
4055 end Set_Handler_Records;
4057 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4059 pragma Assert (Id = Base_Type (Id));
4060 Set_Flag135 (Id, V);
4061 end Set_Has_Aliased_Components;
4063 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4066 end Set_Has_Alignment_Clause;
4068 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4071 end Set_Has_All_Calls_Remote;
4073 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4076 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4077 Set_Flag253 (Id, V);
4078 end Set_Has_Anonymous_Master;
4080 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4082 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4084 end Set_Has_Atomic_Components;
4086 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4089 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4090 Set_Flag139 (Id, V);
4091 end Set_Has_Biased_Representation;
4093 procedure Set_Has_Completion (Id : E; V : B := True) is
4096 end Set_Has_Completion;
4098 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4100 pragma Assert (Is_Type (Id));
4102 end Set_Has_Completion_In_Body;
4104 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4106 pragma Assert (Ekind (Id) = E_Record_Type);
4107 Set_Flag140 (Id, V);
4108 end Set_Has_Complex_Representation;
4110 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4112 pragma Assert (Ekind (Id) = E_Array_Type);
4114 end Set_Has_Component_Size_Clause;
4116 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4118 pragma Assert (Is_Type (Id));
4119 Set_Flag187 (Id, V);
4120 end Set_Has_Constrained_Partial_View;
4122 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4124 Set_Flag181 (Id, V);
4125 end Set_Has_Contiguous_Rep;
4127 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4129 pragma Assert (Id = Base_Type (Id));
4131 end Set_Has_Controlled_Component;
4133 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4136 end Set_Has_Controlling_Result;
4138 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4140 Set_Flag119 (Id, V);
4141 end Set_Has_Convention_Pragma;
4143 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4146 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4147 and then Is_Base_Type (Id));
4149 end Set_Has_Default_Aspect;
4151 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4153 pragma Assert (Nkind (Id) in N_Entity);
4154 Set_Flag200 (Id, V);
4155 end Set_Has_Delayed_Aspects;
4157 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4159 pragma Assert (Nkind (Id) in N_Entity);
4161 end Set_Has_Delayed_Freeze;
4163 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4165 pragma Assert (Nkind (Id) in N_Entity);
4166 Set_Flag261 (Id, V);
4167 end Set_Has_Delayed_Rep_Aspects;
4169 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4171 pragma Assert (Nkind (Id) in N_Entity);
4173 end Set_Has_Discriminants;
4175 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4177 pragma Assert (Ekind (Id) = E_Record_Type
4178 and then Is_Tagged_Type (Id));
4179 Set_Flag220 (Id, V);
4180 end Set_Has_Dispatch_Table;
4182 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4184 pragma Assert (Is_Type (Id));
4185 Set_Flag258 (Id, V);
4186 end Set_Has_Dynamic_Predicate_Aspect;
4188 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4190 pragma Assert (Is_Enumeration_Type (Id));
4192 end Set_Has_Enumeration_Rep_Clause;
4194 procedure Set_Has_Exit (Id : E; V : B := True) is
4199 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4201 Set_Flag175 (Id, V);
4202 end Set_Has_Forward_Instantiation;
4204 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4206 Set_Flag173 (Id, V);
4207 end Set_Has_Fully_Qualified_Name;
4209 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4212 end Set_Has_Gigi_Rep_Item;
4214 procedure Set_Has_Homonym (Id : E; V : B := True) is
4217 end Set_Has_Homonym;
4219 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4221 Set_Flag251 (Id, V);
4222 end Set_Has_Implicit_Dereference;
4224 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4226 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4227 and then Is_Base_Type (Id));
4229 end Set_Has_Independent_Components;
4231 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4233 pragma Assert (Is_Type (Id));
4234 Set_Flag248 (Id, V);
4235 end Set_Has_Inheritable_Invariants;
4237 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4239 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4240 Set_Flag219 (Id, V);
4241 end Set_Has_Initial_Value;
4243 procedure Set_Has_Invariants (Id : E; V : B := True) is
4245 pragma Assert (Is_Type (Id));
4246 Set_Flag232 (Id, V);
4247 end Set_Has_Invariants;
4249 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4251 pragma Assert (Ekind (Id) = E_Loop);
4252 Set_Flag260 (Id, V);
4253 end Set_Has_Loop_Entry_Attributes;
4255 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4257 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4259 end Set_Has_Machine_Radix_Clause;
4261 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4264 end Set_Has_Master_Entity;
4266 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4268 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4269 Set_Flag142 (Id, V);
4270 end Set_Has_Missing_Return;
4272 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4274 Set_Flag101 (Id, V);
4275 end Set_Has_Nested_Block_With_Handler;
4277 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4279 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4280 Set_Flag215 (Id, V);
4281 end Set_Has_Up_Level_Access;
4283 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4285 pragma Assert (Id = Base_Type (Id));
4287 end Set_Has_Non_Standard_Rep;
4289 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4291 pragma Assert (Is_Type (Id));
4292 Set_Flag172 (Id, V);
4293 end Set_Has_Object_Size_Clause;
4295 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4297 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4298 Set_Flag110 (Id, V);
4299 end Set_Has_Out_Or_In_Out_Parameter;
4301 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4303 Set_Flag154 (Id, V);
4304 end Set_Has_Per_Object_Constraint;
4306 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4308 pragma Assert (Is_Subprogram (Id));
4309 Set_Flag240 (Id, V);
4310 end Set_Has_Postconditions;
4312 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4314 pragma Assert (Is_Access_Type (Id));
4315 Set_Flag27 (Base_Type (Id), V);
4316 end Set_Has_Pragma_Controlled;
4318 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4320 Set_Flag150 (Id, V);
4321 end Set_Has_Pragma_Elaborate_Body;
4323 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4325 Set_Flag157 (Id, V);
4326 end Set_Has_Pragma_Inline;
4328 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4330 Set_Flag230 (Id, V);
4331 end Set_Has_Pragma_Inline_Always;
4333 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4335 Set_Flag201 (Id, V);
4336 end Set_Has_Pragma_No_Inline;
4338 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4340 pragma Assert (Is_Enumeration_Type (Id));
4341 pragma Assert (Id = Base_Type (Id));
4342 Set_Flag198 (Id, V);
4343 end Set_Has_Pragma_Ordered;
4345 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4347 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4348 pragma Assert (Id = Base_Type (Id));
4349 Set_Flag121 (Id, V);
4350 end Set_Has_Pragma_Pack;
4352 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4354 Set_Flag221 (Id, V);
4355 end Set_Has_Pragma_Preelab_Init;
4357 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4359 Set_Flag203 (Id, V);
4360 end Set_Has_Pragma_Pure;
4362 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4364 Set_Flag179 (Id, V);
4365 end Set_Has_Pragma_Pure_Function;
4367 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4369 Set_Flag169 (Id, V);
4370 end Set_Has_Pragma_Thread_Local_Storage;
4372 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4374 Set_Flag233 (Id, V);
4375 end Set_Has_Pragma_Unmodified;
4377 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4379 Set_Flag180 (Id, V);
4380 end Set_Has_Pragma_Unreferenced;
4382 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4384 pragma Assert (Is_Type (Id));
4385 Set_Flag212 (Id, V);
4386 end Set_Has_Pragma_Unreferenced_Objects;
4388 procedure Set_Has_Predicates (Id : E; V : B := True) is
4390 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4391 Set_Flag250 (Id, V);
4392 end Set_Has_Predicates;
4394 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4396 pragma Assert (Id = Base_Type (Id));
4397 Set_Flag120 (Id, V);
4398 end Set_Has_Primitive_Operations;
4400 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4402 pragma Assert (Is_Type (Id));
4403 Set_Flag151 (Id, V);
4404 end Set_Has_Private_Ancestor;
4406 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4408 Set_Flag155 (Id, V);
4409 end Set_Has_Private_Declaration;
4411 procedure Set_Has_Protected (Id : E; V : B := True) is
4413 Set_Flag271 (Id, V);
4414 end Set_Has_Protected;
4416 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4418 Set_Flag161 (Id, V);
4419 end Set_Has_Qualified_Name;
4421 procedure Set_Has_RACW (Id : E; V : B := True) is
4423 pragma Assert (Ekind (Id) = E_Package);
4424 Set_Flag214 (Id, V);
4427 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4429 pragma Assert (Id = Base_Type (Id));
4431 end Set_Has_Record_Rep_Clause;
4433 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4435 pragma Assert (Is_Subprogram (Id));
4436 Set_Flag143 (Id, V);
4437 end Set_Has_Recursive_Call;
4439 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4441 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4442 Set_Flag267 (Id, V);
4443 end Set_Has_Shift_Operator;
4445 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4448 end Set_Has_Size_Clause;
4450 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4453 end Set_Has_Small_Clause;
4455 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4457 pragma Assert (Id = Base_Type (Id));
4458 Set_Flag100 (Id, V);
4459 end Set_Has_Specified_Layout;
4461 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4463 pragma Assert (Is_Type (Id));
4464 Set_Flag190 (Id, V);
4465 end Set_Has_Specified_Stream_Input;
4467 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4469 pragma Assert (Is_Type (Id));
4470 Set_Flag191 (Id, V);
4471 end Set_Has_Specified_Stream_Output;
4473 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4475 pragma Assert (Is_Type (Id));
4476 Set_Flag192 (Id, V);
4477 end Set_Has_Specified_Stream_Read;
4479 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4481 pragma Assert (Is_Type (Id));
4482 Set_Flag193 (Id, V);
4483 end Set_Has_Specified_Stream_Write;
4485 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4487 Set_Flag211 (Id, V);
4488 end Set_Has_Static_Discriminants;
4490 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4492 pragma Assert (Is_Type (Id));
4493 Set_Flag269 (Id, V);
4494 end Set_Has_Static_Predicate;
4496 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4498 pragma Assert (Is_Type (Id));
4499 Set_Flag259 (Id, V);
4500 end Set_Has_Static_Predicate_Aspect;
4502 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4504 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4505 pragma Assert (Id = Base_Type (Id));
4507 end Set_Has_Storage_Size_Clause;
4509 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4511 pragma Assert (Is_Elementary_Type (Id));
4512 Set_Flag184 (Id, V);
4513 end Set_Has_Stream_Size_Clause;
4515 procedure Set_Has_Task (Id : E; V : B := True) is
4517 pragma Assert (Id = Base_Type (Id));
4521 procedure Set_Has_Thunks (Id : E; V : B := True) is
4523 pragma Assert (Is_Tag (Id));
4524 Set_Flag228 (Id, V);
4527 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4529 pragma Assert (Id = Base_Type (Id));
4530 Set_Flag123 (Id, V);
4531 end Set_Has_Unchecked_Union;
4533 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4535 pragma Assert (Is_Type (Id));
4537 end Set_Has_Unknown_Discriminants;
4539 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4541 pragma Assert (Ekind (Id) = E_Abstract_State);
4542 Set_Flag263 (Id, V);
4543 end Set_Has_Visible_Refinement;
4545 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4547 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4549 end Set_Has_Volatile_Components;
4551 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4553 Set_Flag182 (Id, V);
4554 end Set_Has_Xref_Entry;
4556 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4558 pragma Assert (Ekind (Id) = E_Variable);
4560 end Set_Hiding_Loop_Variable;
4562 procedure Set_Homonym (Id : E; V : E) is
4564 pragma Assert (Id /= V);
4568 procedure Set_Import_Pragma (Id : E; V : E) is
4570 pragma Assert (Is_Subprogram (Id));
4572 end Set_Import_Pragma;
4574 procedure Set_Interface_Alias (Id : E; V : E) is
4578 and then Is_Hidden (Id)
4579 and then (Ekind_In (Id, E_Procedure, E_Function)));
4581 end Set_Interface_Alias;
4583 procedure Set_Interfaces (Id : E; V : L) is
4585 pragma Assert (Is_Record_Type (Id));
4586 Set_Elist25 (Id, V);
4589 procedure Set_In_Package_Body (Id : E; V : B := True) is
4592 end Set_In_Package_Body;
4594 procedure Set_In_Private_Part (Id : E; V : B := True) is
4597 end Set_In_Private_Part;
4599 procedure Set_In_Use (Id : E; V : B := True) is
4601 pragma Assert (Nkind (Id) in N_Entity);
4605 procedure Set_Initialization_Statements (Id : E; V : N) is
4607 -- Tolerate an E_Void entity since this can be called while resolving
4608 -- an aggregate used as the initialization expression for an object
4609 -- declaration, and this occurs before the Ekind for the object is set.
4611 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4613 end Set_Initialization_Statements;
4615 procedure Set_Inner_Instances (Id : E; V : L) is
4617 Set_Elist23 (Id, V);
4618 end Set_Inner_Instances;
4620 procedure Set_Interface_Name (Id : E; V : N) is
4623 end Set_Interface_Name;
4625 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4627 pragma Assert (Is_Overloadable (Id));
4629 end Set_Is_Abstract_Subprogram;
4631 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4633 pragma Assert (Is_Type (Id));
4634 Set_Flag146 (Id, V);
4635 end Set_Is_Abstract_Type;
4637 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4639 pragma Assert (Is_Access_Type (Id));
4640 Set_Flag194 (Id, V);
4641 end Set_Is_Local_Anonymous_Access;
4643 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4645 pragma Assert (Is_Access_Type (Id));
4647 end Set_Is_Access_Constant;
4649 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4651 Set_Flag185 (Id, V);
4652 end Set_Is_Ada_2005_Only;
4654 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4656 Set_Flag199 (Id, V);
4657 end Set_Is_Ada_2012_Only;
4659 procedure Set_Is_Aliased (Id : E; V : B := True) is
4661 pragma Assert (Nkind (Id) in N_Entity);
4665 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4668 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4670 end Set_Is_Asynchronous;
4672 procedure Set_Is_Atomic (Id : E; V : B := True) is
4677 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4679 pragma Assert ((not V)
4680 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4681 Set_Flag122 (Id, V);
4682 end Set_Is_Bit_Packed_Array;
4684 procedure Set_Is_Called (Id : E; V : B := True) is
4686 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4687 Set_Flag102 (Id, V);
4690 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4693 end Set_Is_Character_Type;
4695 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4698 end Set_Is_Child_Unit;
4700 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4703 end Set_Is_Class_Wide_Equivalent_Type;
4705 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4707 Set_Flag149 (Id, V);
4708 end Set_Is_Compilation_Unit;
4710 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4712 pragma Assert (Ekind (Id) = E_Discriminant);
4713 Set_Flag103 (Id, V);
4714 end Set_Is_Completely_Hidden;
4716 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4719 end Set_Is_Concurrent_Record_Type;
4721 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4724 end Set_Is_Constr_Subt_For_U_Nominal;
4726 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4728 Set_Flag141 (Id, V);
4729 end Set_Is_Constr_Subt_For_UN_Aliased;
4731 procedure Set_Is_Constrained (Id : E; V : B := True) is
4733 pragma Assert (Nkind (Id) in N_Entity);
4735 end Set_Is_Constrained;
4737 procedure Set_Is_Constructor (Id : E; V : B := True) is
4740 end Set_Is_Constructor;
4742 procedure Set_Is_Controlled (Id : E; V : B := True) is
4744 pragma Assert (Id = Base_Type (Id));
4746 end Set_Is_Controlled;
4748 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4750 pragma Assert (Is_Formal (Id));
4752 end Set_Is_Controlling_Formal;
4754 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4757 end Set_Is_CPP_Class;
4759 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4761 pragma Assert (Is_Type (Id));
4762 Set_Flag223 (Id, V);
4763 end Set_Is_Descendent_Of_Address;
4765 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4767 Set_Flag176 (Id, V);
4768 end Set_Is_Discrim_SO_Function;
4770 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4772 Set_Flag264 (Id, V);
4773 end Set_Is_Discriminant_Check_Function;
4775 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4777 Set_Flag234 (Id, V);
4778 end Set_Is_Dispatch_Table_Entity;
4780 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4785 Is_Overloadable (Id)
4787 Ekind (Id) = E_Subprogram_Type);
4790 end Set_Is_Dispatching_Operation;
4792 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4794 Set_Flag124 (Id, V);
4795 end Set_Is_Eliminated;
4797 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4800 end Set_Is_Entry_Formal;
4802 procedure Set_Is_Exported (Id : E; V : B := True) is
4805 end Set_Is_Exported;
4807 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4810 end Set_Is_First_Subtype;
4812 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4814 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4815 Set_Flag118 (Id, V);
4816 end Set_Is_For_Access_Subtype;
4818 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4820 Set_Flag111 (Id, V);
4821 end Set_Is_Formal_Subprogram;
4823 procedure Set_Is_Frozen (Id : E; V : B := True) is
4825 pragma Assert (Nkind (Id) in N_Entity);
4829 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4831 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4832 Set_Flag274 (Id, V);
4833 end Set_Is_Generic_Actual_Subprogram;
4835 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4837 pragma Assert (Is_Type (Id));
4839 end Set_Is_Generic_Actual_Type;
4841 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4843 Set_Flag130 (Id, V);
4844 end Set_Is_Generic_Instance;
4846 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4848 pragma Assert (Nkind (Id) in N_Entity);
4850 end Set_Is_Generic_Type;
4852 procedure Set_Is_Hidden (Id : E; V : B := True) is
4857 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4859 Set_Flag171 (Id, V);
4860 end Set_Is_Hidden_Open_Scope;
4862 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4864 pragma Assert (Nkind (Id) in N_Entity);
4866 end Set_Is_Immediately_Visible;
4868 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4870 Set_Flag254 (Id, V);
4871 end Set_Is_Implementation_Defined;
4873 procedure Set_Is_Imported (Id : E; V : B := True) is
4876 end Set_Is_Imported;
4878 procedure Set_Is_Independent (Id : E; V : B := True) is
4880 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4881 Set_Flag268 (Id, V);
4882 end Set_Is_Independent;
4884 procedure Set_Is_Inlined (Id : E; V : B := True) is
4889 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4891 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4893 end Set_Is_Inlined_Always;
4895 procedure Set_Is_Interface (Id : E; V : B := True) is
4897 pragma Assert (Is_Record_Type (Id));
4898 Set_Flag186 (Id, V);
4899 end Set_Is_Interface;
4901 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4903 Set_Flag126 (Id, V);
4904 end Set_Is_Instantiated;
4906 procedure Set_Is_Internal (Id : E; V : B := True) is
4908 pragma Assert (Nkind (Id) in N_Entity);
4910 end Set_Is_Internal;
4912 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4914 pragma Assert (Nkind (Id) in N_Entity);
4916 end Set_Is_Interrupt_Handler;
4918 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4921 end Set_Is_Intrinsic_Subprogram;
4923 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4925 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4926 Set_Flag257 (Id, V);
4927 end Set_Is_Invariant_Procedure;
4929 procedure Set_Is_Itype (Id : E; V : B := True) is
4934 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4937 end Set_Is_Known_Non_Null;
4939 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4941 Set_Flag204 (Id, V);
4942 end Set_Is_Known_Null;
4944 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4946 Set_Flag170 (Id, V);
4947 end Set_Is_Known_Valid;
4949 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4951 pragma Assert (Is_Type (Id));
4952 Set_Flag106 (Id, V);
4953 end Set_Is_Limited_Composite;
4955 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4957 pragma Assert (Is_Interface (Id));
4958 Set_Flag197 (Id, V);
4959 end Set_Is_Limited_Interface;
4961 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4964 end Set_Is_Limited_Record;
4966 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4968 pragma Assert (Is_Subprogram (Id));
4969 Set_Flag137 (Id, V);
4970 end Set_Is_Machine_Code_Subprogram;
4972 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4974 pragma Assert (Is_Type (Id));
4975 Set_Flag109 (Id, V);
4976 end Set_Is_Non_Static_Subtype;
4978 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4980 pragma Assert (Ekind (Id) = E_Procedure);
4981 Set_Flag178 (Id, V);
4982 end Set_Is_Null_Init_Proc;
4984 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4986 Set_Flag153 (Id, V);
4987 end Set_Is_Obsolescent;
4989 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4991 pragma Assert (Ekind (Id) = E_Out_Parameter);
4992 Set_Flag226 (Id, V);
4993 end Set_Is_Only_Out_Parameter;
4995 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4997 Set_Flag160 (Id, V);
4998 end Set_Is_Package_Body_Entity;
5000 procedure Set_Is_Packed (Id : E; V : B := True) is
5002 pragma Assert (Id = Base_Type (Id));
5006 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5008 Set_Flag138 (Id, V);
5009 end Set_Is_Packed_Array_Impl_Type;
5011 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5013 pragma Assert (Nkind (Id) in N_Entity);
5015 end Set_Is_Potentially_Use_Visible;
5017 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5019 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5020 Set_Flag255 (Id, V);
5021 end Set_Is_Predicate_Function;
5023 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5025 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5026 Set_Flag256 (Id, V);
5027 end Set_Is_Predicate_Function_M;
5029 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5032 end Set_Is_Preelaborated;
5034 procedure Set_Is_Primitive (Id : E; V : B := True) is
5037 (Is_Overloadable (Id)
5038 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5039 Set_Flag218 (Id, V);
5040 end Set_Is_Primitive;
5042 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5044 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5045 Set_Flag195 (Id, V);
5046 end Set_Is_Primitive_Wrapper;
5048 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5050 pragma Assert (Is_Type (Id));
5051 Set_Flag107 (Id, V);
5052 end Set_Is_Private_Composite;
5054 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5057 end Set_Is_Private_Descendant;
5059 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5061 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5062 Set_Flag245 (Id, V);
5063 end Set_Is_Private_Primitive;
5065 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5067 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5068 Set_Flag252 (Id, V);
5069 end Set_Is_Processed_Transient;
5071 procedure Set_Is_Public (Id : E; V : B := True) is
5073 pragma Assert (Nkind (Id) in N_Entity);
5077 procedure Set_Is_Pure (Id : E; V : B := True) is
5082 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5084 pragma Assert (Is_Access_Type (Id));
5085 Set_Flag189 (Id, V);
5086 end Set_Is_Pure_Unit_Access_Type;
5088 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5090 pragma Assert (Is_Type (Id));
5091 Set_Flag244 (Id, V);
5092 end Set_Is_RACW_Stub_Type;
5094 procedure Set_Is_Raised (Id : E; V : B := True) is
5096 pragma Assert (Ekind (Id) = E_Exception);
5097 Set_Flag224 (Id, V);
5100 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5103 end Set_Is_Remote_Call_Interface;
5105 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5108 end Set_Is_Remote_Types;
5110 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5112 Set_Flag112 (Id, V);
5113 end Set_Is_Renaming_Of_Object;
5115 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5117 Set_Flag209 (Id, V);
5118 end Set_Is_Return_Object;
5120 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5122 pragma Assert (Ekind (Id) = E_Variable);
5123 Set_Flag249 (Id, V);
5124 end Set_Is_Safe_To_Reevaluate;
5126 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5129 end Set_Is_Shared_Passive;
5131 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5135 or else Ekind_In (Id, E_Exception,
5140 end Set_Is_Statically_Allocated;
5142 procedure Set_Is_Tag (Id : E; V : B := True) is
5144 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5148 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5151 end Set_Is_Tagged_Type;
5153 procedure Set_Is_Thunk (Id : E; V : B := True) is
5155 pragma Assert (Is_Subprogram (Id));
5156 Set_Flag225 (Id, V);
5159 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5161 Set_Flag235 (Id, V);
5162 end Set_Is_Trivial_Subprogram;
5164 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5166 Set_Flag163 (Id, V);
5167 end Set_Is_True_Constant;
5169 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5171 pragma Assert (Id = Base_Type (Id));
5172 Set_Flag117 (Id, V);
5173 end Set_Is_Unchecked_Union;
5175 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5177 pragma Assert (Ekind (Id) = E_Record_Type);
5178 Set_Flag246 (Id, V);
5179 end Set_Is_Underlying_Record_View;
5181 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5183 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5184 Set_Flag144 (Id, V);
5185 end Set_Is_Unsigned_Type;
5187 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5189 pragma Assert (Ekind (Id) = E_Procedure);
5190 Set_Flag127 (Id, V);
5191 end Set_Is_Valued_Procedure;
5193 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5195 Set_Flag206 (Id, V);
5196 end Set_Is_Visible_Formal;
5198 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5200 Set_Flag116 (Id, V);
5201 end Set_Is_Visible_Lib_Unit;
5203 procedure Set_Is_Volatile (Id : E; V : B := True) is
5205 pragma Assert (Nkind (Id) in N_Entity);
5207 end Set_Is_Volatile;
5209 procedure Set_Itype_Printed (Id : E; V : B := True) is
5211 pragma Assert (Is_Itype (Id));
5212 Set_Flag202 (Id, V);
5213 end Set_Itype_Printed;
5215 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5218 end Set_Kill_Elaboration_Checks;
5220 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5223 end Set_Kill_Range_Checks;
5225 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5227 pragma Assert (Is_Type (Id));
5228 Set_Flag207 (Id, V);
5229 end Set_Known_To_Have_Preelab_Init;
5231 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5233 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5235 end Set_Last_Aggregate_Assignment;
5237 procedure Set_Last_Assignment (Id : E; V : N) is
5239 pragma Assert (Is_Assignable (Id));
5241 end Set_Last_Assignment;
5243 procedure Set_Last_Entity (Id : E; V : E) is
5246 end Set_Last_Entity;
5248 procedure Set_Limited_View (Id : E; V : E) is
5250 pragma Assert (Ekind (Id) = E_Package);
5252 end Set_Limited_View;
5254 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5256 pragma Assert (Is_Type (Id)
5257 or else Ekind_In (Id, E_Constant, E_Variable)
5258 or else Is_Subprogram (Id));
5260 end Set_Linker_Section_Pragma;
5262 procedure Set_Lit_Indexes (Id : E; V : E) is
5264 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5266 end Set_Lit_Indexes;
5268 procedure Set_Lit_Strings (Id : E; V : E) is
5270 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5272 end Set_Lit_Strings;
5274 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5276 pragma Assert (Is_Formal (Id));
5277 Set_Flag205 (Id, V);
5278 end Set_Low_Bound_Tested;
5280 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5282 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5284 end Set_Machine_Radix_10;
5286 procedure Set_Master_Id (Id : E; V : E) is
5288 pragma Assert (Is_Access_Type (Id));
5292 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5294 Set_Flag168 (Id, V);
5295 end Set_Materialize_Entity;
5297 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5299 Set_Flag262 (Id, V);
5300 end Set_May_Inherit_Delayed_Rep_Aspects;
5302 procedure Set_Mechanism (Id : E; V : M) is
5304 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5305 Set_Uint8 (Id, UI_From_Int (V));
5308 procedure Set_Modulus (Id : E; V : U) is
5310 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5314 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5316 pragma Assert (Is_Type (Id));
5317 Set_Flag183 (Id, V);
5318 end Set_Must_Be_On_Byte_Boundary;
5320 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5322 pragma Assert (Is_Type (Id));
5323 Set_Flag208 (Id, V);
5324 end Set_Must_Have_Preelab_Init;
5326 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5328 Set_Flag147 (Id, V);
5329 end Set_Needs_Debug_Info;
5331 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5334 (Is_Overloadable (Id)
5335 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5337 end Set_Needs_No_Actuals;
5339 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5341 Set_Flag115 (Id, V);
5342 end Set_Never_Set_In_Source;
5344 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5347 end Set_Next_Inlined_Subprogram;
5349 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5351 pragma Assert (Is_Discrete_Type (Id));
5352 Set_Flag276 (Id, V);
5353 end Set_No_Dynamic_Predicate_On_Actual;
5355 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5357 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5358 Set_Flag131 (Id, V);
5359 end Set_No_Pool_Assigned;
5361 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5363 pragma Assert (Is_Discrete_Type (Id));
5364 Set_Flag275 (Id, V);
5365 end Set_No_Predicate_On_Actual;
5367 procedure Set_No_Return (Id : E; V : B := True) is
5370 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5371 Set_Flag113 (Id, V);
5374 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5376 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5377 Set_Flag136 (Id, V);
5378 end Set_No_Strict_Aliasing;
5380 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5382 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5384 end Set_Non_Binary_Modulus;
5386 procedure Set_Non_Limited_View (Id : E; V : E) is
5389 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5391 end Set_Non_Limited_View;
5393 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5396 (Root_Type (Id) = Standard_Boolean
5397 and then Ekind (Id) = E_Enumeration_Type);
5398 Set_Flag162 (Id, V);
5399 end Set_Nonzero_Is_True;
5401 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5403 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5405 end Set_Normalized_First_Bit;
5407 procedure Set_Normalized_Position (Id : E; V : U) is
5409 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5411 end Set_Normalized_Position;
5413 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5415 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5417 end Set_Normalized_Position_Max;
5419 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5421 pragma Assert (Ekind (Id) = E_Variable);
5422 Set_Flag247 (Id, V);
5423 end Set_OK_To_Rename;
5425 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5428 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5429 Set_Flag239 (Id, V);
5430 end Set_OK_To_Reorder_Components;
5432 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5435 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5436 Set_Flag241 (Id, V);
5437 end Set_Optimize_Alignment_Space;
5439 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5442 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5443 Set_Flag242 (Id, V);
5444 end Set_Optimize_Alignment_Time;
5446 procedure Set_Original_Access_Type (Id : E; V : E) is
5448 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5450 end Set_Original_Access_Type;
5452 procedure Set_Original_Array_Type (Id : E; V : E) is
5454 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5456 end Set_Original_Array_Type;
5458 procedure Set_Original_Record_Component (Id : E; V : E) is
5460 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5462 end Set_Original_Record_Component;
5464 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5466 Set_Flag243 (Id, V);
5467 end Set_Overlays_Constant;
5469 procedure Set_Overridden_Operation (Id : E; V : E) is
5472 end Set_Overridden_Operation;
5474 procedure Set_Package_Instantiation (Id : E; V : N) is
5476 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5478 end Set_Package_Instantiation;
5480 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5482 pragma Assert (Is_Array_Type (Id));
5484 end Set_Packed_Array_Impl_Type;
5486 procedure Set_Parent_Subtype (Id : E; V : E) is
5488 pragma Assert (Ekind (Id) = E_Record_Type);
5490 end Set_Parent_Subtype;
5492 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5494 pragma Assert (Ekind (Id) = E_Abstract_State);
5496 end Set_Part_Of_Constituents;
5498 procedure Set_Postcondition_Proc (Id : E; V : E) is
5500 pragma Assert (Ekind (Id) = E_Procedure);
5502 end Set_Postcondition_Proc;
5504 procedure Set_PPC_Wrapper (Id : E; V : E) is
5506 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5508 end Set_PPC_Wrapper;
5510 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5512 pragma Assert (Is_Tagged_Type (Id));
5513 Set_Elist10 (Id, V);
5514 end Set_Direct_Primitive_Operations;
5516 procedure Set_Prival (Id : E; V : E) is
5518 pragma Assert (Is_Protected_Component (Id));
5522 procedure Set_Prival_Link (Id : E; V : E) is
5524 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5526 end Set_Prival_Link;
5528 procedure Set_Private_Dependents (Id : E; V : L) is
5530 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5531 Set_Elist18 (Id, V);
5532 end Set_Private_Dependents;
5534 procedure Set_Private_View (Id : E; V : N) is
5536 pragma Assert (Is_Private_Type (Id));
5538 end Set_Private_View;
5540 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5542 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5544 end Set_Protected_Body_Subprogram;
5546 procedure Set_Protected_Formal (Id : E; V : E) is
5548 pragma Assert (Is_Formal (Id));
5550 end Set_Protected_Formal;
5552 procedure Set_Protection_Object (Id : E; V : E) is
5554 pragma Assert (Ekind_In (Id, E_Entry,
5559 end Set_Protection_Object;
5561 procedure Set_Reachable (Id : E; V : B := True) is
5566 procedure Set_Referenced (Id : E; V : B := True) is
5568 Set_Flag156 (Id, V);
5571 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5574 end Set_Referenced_As_LHS;
5576 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5578 Set_Flag227 (Id, V);
5579 end Set_Referenced_As_Out_Parameter;
5581 procedure Set_Refinement_Constituents (Id : E; V : L) is
5583 pragma Assert (Ekind (Id) = E_Abstract_State);
5585 end Set_Refinement_Constituents;
5587 procedure Set_Register_Exception_Call (Id : E; V : N) is
5589 pragma Assert (Ekind (Id) = E_Exception);
5591 end Set_Register_Exception_Call;
5593 procedure Set_Related_Array_Object (Id : E; V : E) is
5595 pragma Assert (Is_Array_Type (Id));
5597 end Set_Related_Array_Object;
5599 procedure Set_Related_Expression (Id : E; V : N) is
5601 pragma Assert (Ekind (Id) in Type_Kind
5602 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5604 end Set_Related_Expression;
5606 procedure Set_Related_Instance (Id : E; V : E) is
5608 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5610 end Set_Related_Instance;
5612 procedure Set_Related_Type (Id : E; V : E) is
5614 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5616 end Set_Related_Type;
5618 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5620 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5622 end Set_Relative_Deadline_Variable;
5624 procedure Set_Renamed_Entity (Id : E; V : N) is
5627 end Set_Renamed_Entity;
5629 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5631 pragma Assert (Ekind (Id) = E_Package);
5632 Set_Flag231 (Id, V);
5633 end Set_Renamed_In_Spec;
5635 procedure Set_Renamed_Object (Id : E; V : N) is
5638 end Set_Renamed_Object;
5640 procedure Set_Renaming_Map (Id : E; V : U) is
5643 end Set_Renaming_Map;
5645 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5647 pragma Assert (Is_Overloadable (Id));
5648 Set_Flag213 (Id, V);
5649 end Set_Requires_Overriding;
5651 procedure Set_Return_Present (Id : E; V : B := True) is
5654 end Set_Return_Present;
5656 procedure Set_Return_Applies_To (Id : E; V : N) is
5659 end Set_Return_Applies_To;
5661 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5664 end Set_Returns_By_Ref;
5666 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5669 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5670 Set_Flag164 (Id, V);
5671 end Set_Reverse_Bit_Order;
5673 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5677 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5679 end Set_Reverse_Storage_Order;
5681 procedure Set_RM_Size (Id : E; V : U) is
5683 pragma Assert (Is_Type (Id));
5687 procedure Set_Scalar_Range (Id : E; V : N) is
5690 end Set_Scalar_Range;
5692 procedure Set_Scale_Value (Id : E; V : U) is
5695 end Set_Scale_Value;
5697 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5699 pragma Assert (not Is_Record_Type (Id));
5701 end Set_Scope_Depth_Value;
5703 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5705 Set_Flag167 (Id, V);
5706 end Set_Sec_Stack_Needed_For_Return;
5708 procedure Set_Shadow_Entities (Id : E; V : S) is
5710 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5712 end Set_Shadow_Entities;
5714 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5716 pragma Assert (Ekind (Id) = E_Variable);
5718 end Set_Shared_Var_Procs_Instance;
5720 procedure Set_Size_Check_Code (Id : E; V : N) is
5722 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5724 end Set_Size_Check_Code;
5726 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5728 Set_Flag177 (Id, V);
5729 end Set_Size_Depends_On_Discriminant;
5731 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5734 end Set_Size_Known_At_Compile_Time;
5736 procedure Set_Small_Value (Id : E; V : R) is
5738 pragma Assert (Is_Fixed_Point_Type (Id));
5739 Set_Ureal21 (Id, V);
5740 end Set_Small_Value;
5742 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5745 (Ekind_In (Id, E_Generic_Package, -- package variants
5750 end Set_SPARK_Aux_Pragma;
5752 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5755 (Ekind_In (Id, E_Generic_Package, -- package variants
5759 Set_Flag266 (Id, V);
5760 end Set_SPARK_Aux_Pragma_Inherited;
5762 procedure Set_SPARK_Pragma (Id : E; V : N) is
5765 (Ekind_In (Id, E_Function, -- subprogram variants
5767 E_Generic_Procedure,
5771 Ekind_In (Id, E_Generic_Package, -- package variants
5776 end Set_SPARK_Pragma;
5778 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5781 (Ekind_In (Id, E_Function, -- subprogram variants
5783 E_Generic_Procedure,
5787 Ekind_In (Id, E_Generic_Package, -- package variants
5791 Set_Flag265 (Id, V);
5792 end Set_SPARK_Pragma_Inherited;
5794 procedure Set_Spec_Entity (Id : E; V : E) is
5796 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5798 end Set_Spec_Entity;
5800 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5804 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5805 Set_Flag273 (Id, V);
5806 end Set_SSO_Set_High_By_Default;
5808 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5812 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5813 Set_Flag272 (Id, V);
5814 end Set_SSO_Set_Low_By_Default;
5816 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5818 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5820 end Set_Static_Discrete_Predicate;
5822 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5824 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5825 and then Has_Predicates (Id));
5827 end Set_Static_Real_Or_String_Predicate;
5829 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5831 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5833 end Set_Status_Flag_Or_Transient_Decl;
5835 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5837 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5838 pragma Assert (Id = Base_Type (Id));
5840 end Set_Storage_Size_Variable;
5842 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5844 pragma Assert (Ekind (Id) = E_Package);
5846 end Set_Static_Elaboration_Desired;
5848 procedure Set_Static_Initialization (Id : E; V : N) is
5851 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5853 end Set_Static_Initialization;
5855 procedure Set_Stored_Constraint (Id : E; V : L) is
5857 pragma Assert (Nkind (Id) in N_Entity);
5858 Set_Elist23 (Id, V);
5859 end Set_Stored_Constraint;
5861 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5863 pragma Assert (Ekind (Id) = E_Constant);
5864 Set_Flag270 (Id, V);
5865 end Set_Stores_Attribute_Old_Prefix;
5867 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5869 pragma Assert (Id = Base_Type (Id));
5870 Set_Flag145 (Id, V);
5871 end Set_Strict_Alignment;
5873 procedure Set_String_Literal_Length (Id : E; V : U) is
5875 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5877 end Set_String_Literal_Length;
5879 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5881 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5883 end Set_String_Literal_Low_Bound;
5885 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5887 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5889 end Set_Subprograms_For_Type;
5891 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5893 Set_Flag148 (Id, V);
5894 end Set_Suppress_Elaboration_Warnings;
5896 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5898 pragma Assert (Is_Type (Id));
5899 Set_Flag105 (Id, V);
5900 end Set_Suppress_Initialization;
5902 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5904 Set_Flag165 (Id, V);
5905 end Set_Suppress_Style_Checks;
5907 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5909 Set_Flag217 (Id, V);
5910 end Set_Suppress_Value_Tracking_On_Call;
5912 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5914 pragma Assert (Ekind (Id) in Task_Kind);
5916 end Set_Task_Body_Procedure;
5918 procedure Set_Thunk_Entity (Id : E; V : E) is
5920 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5921 and then Is_Thunk (Id));
5923 end Set_Thunk_Entity;
5925 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5928 end Set_Treat_As_Volatile;
5930 procedure Set_Underlying_Full_View (Id : E; V : E) is
5932 pragma Assert (Ekind (Id) in Private_Kind);
5934 end Set_Underlying_Full_View;
5936 procedure Set_Underlying_Record_View (Id : E; V : E) is
5938 pragma Assert (Ekind (Id) = E_Record_Type);
5940 end Set_Underlying_Record_View;
5942 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5944 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5945 Set_Flag216 (Id, V);
5946 end Set_Universal_Aliasing;
5948 procedure Set_Unset_Reference (Id : E; V : N) is
5951 end Set_Unset_Reference;
5953 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5955 Set_Flag222 (Id, V);
5956 end Set_Used_As_Generic_Actual;
5958 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5960 pragma Assert (Ekind (Id) = E_Protected_Type);
5961 Set_Flag188 (Id, V);
5962 end Set_Uses_Lock_Free;
5964 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5967 end Set_Uses_Sec_Stack;
5969 procedure Set_Warnings_Off (Id : E; V : B := True) is
5972 end Set_Warnings_Off;
5974 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5976 Set_Flag236 (Id, V);
5977 end Set_Warnings_Off_Used;
5979 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5981 Set_Flag237 (Id, V);
5982 end Set_Warnings_Off_Used_Unmodified;
5984 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5986 Set_Flag238 (Id, V);
5987 end Set_Warnings_Off_Used_Unreferenced;
5989 procedure Set_Was_Hidden (Id : E; V : B := True) is
5991 Set_Flag196 (Id, V);
5994 procedure Set_Wrapped_Entity (Id : E; V : E) is
5996 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5997 and then Is_Primitive_Wrapper (Id));
5999 end Set_Wrapped_Entity;
6001 -----------------------------------
6002 -- Field Initialization Routines --
6003 -----------------------------------
6005 procedure Init_Alignment (Id : E) is
6007 Set_Uint14 (Id, Uint_0);
6010 procedure Init_Alignment (Id : E; V : Int) is
6012 Set_Uint14 (Id, UI_From_Int (V));
6015 procedure Init_Component_Bit_Offset (Id : E) is
6017 Set_Uint11 (Id, No_Uint);
6018 end Init_Component_Bit_Offset;
6020 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6022 Set_Uint11 (Id, UI_From_Int (V));
6023 end Init_Component_Bit_Offset;
6025 procedure Init_Component_Size (Id : E) is
6027 Set_Uint22 (Id, Uint_0);
6028 end Init_Component_Size;
6030 procedure Init_Component_Size (Id : E; V : Int) is
6032 Set_Uint22 (Id, UI_From_Int (V));
6033 end Init_Component_Size;
6035 procedure Init_Digits_Value (Id : E) is
6037 Set_Uint17 (Id, Uint_0);
6038 end Init_Digits_Value;
6040 procedure Init_Digits_Value (Id : E; V : Int) is
6042 Set_Uint17 (Id, UI_From_Int (V));
6043 end Init_Digits_Value;
6045 procedure Init_Esize (Id : E) is
6047 Set_Uint12 (Id, Uint_0);
6050 procedure Init_Esize (Id : E; V : Int) is
6052 Set_Uint12 (Id, UI_From_Int (V));
6055 procedure Init_Normalized_First_Bit (Id : E) is
6057 Set_Uint8 (Id, No_Uint);
6058 end Init_Normalized_First_Bit;
6060 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6062 Set_Uint8 (Id, UI_From_Int (V));
6063 end Init_Normalized_First_Bit;
6065 procedure Init_Normalized_Position (Id : E) is
6067 Set_Uint14 (Id, No_Uint);
6068 end Init_Normalized_Position;
6070 procedure Init_Normalized_Position (Id : E; V : Int) is
6072 Set_Uint14 (Id, UI_From_Int (V));
6073 end Init_Normalized_Position;
6075 procedure Init_Normalized_Position_Max (Id : E) is
6077 Set_Uint10 (Id, No_Uint);
6078 end Init_Normalized_Position_Max;
6080 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6082 Set_Uint10 (Id, UI_From_Int (V));
6083 end Init_Normalized_Position_Max;
6085 procedure Init_RM_Size (Id : E) is
6087 Set_Uint13 (Id, Uint_0);
6090 procedure Init_RM_Size (Id : E; V : Int) is
6092 Set_Uint13 (Id, UI_From_Int (V));
6095 -----------------------------
6096 -- Init_Component_Location --
6097 -----------------------------
6099 procedure Init_Component_Location (Id : E) is
6101 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6102 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6103 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6104 Set_Uint12 (Id, Uint_0); -- Esize
6105 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6106 end Init_Component_Location;
6108 ----------------------------
6109 -- Init_Object_Size_Align --
6110 ----------------------------
6112 procedure Init_Object_Size_Align (Id : E) is
6114 Set_Uint12 (Id, Uint_0); -- Esize
6115 Set_Uint14 (Id, Uint_0); -- Alignment
6116 end Init_Object_Size_Align;
6122 procedure Init_Size (Id : E; V : Int) is
6124 pragma Assert (not Is_Object (Id));
6125 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6126 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6129 ---------------------
6130 -- Init_Size_Align --
6131 ---------------------
6133 procedure Init_Size_Align (Id : E) is
6135 pragma Assert (not Is_Object (Id));
6136 Set_Uint12 (Id, Uint_0); -- Esize
6137 Set_Uint13 (Id, Uint_0); -- RM_Size
6138 Set_Uint14 (Id, Uint_0); -- Alignment
6139 end Init_Size_Align;
6141 ----------------------------------------------
6142 -- Type Representation Attribute Predicates --
6143 ----------------------------------------------
6145 function Known_Alignment (E : Entity_Id) return B is
6147 return Uint14 (E) /= Uint_0
6148 and then Uint14 (E) /= No_Uint;
6149 end Known_Alignment;
6151 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6153 return Uint11 (E) /= No_Uint;
6154 end Known_Component_Bit_Offset;
6156 function Known_Component_Size (E : Entity_Id) return B is
6158 return Uint22 (Base_Type (E)) /= Uint_0
6159 and then Uint22 (Base_Type (E)) /= No_Uint;
6160 end Known_Component_Size;
6162 function Known_Esize (E : Entity_Id) return B is
6164 return Uint12 (E) /= Uint_0
6165 and then Uint12 (E) /= No_Uint;
6168 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6170 return Uint8 (E) /= No_Uint;
6171 end Known_Normalized_First_Bit;
6173 function Known_Normalized_Position (E : Entity_Id) return B is
6175 return Uint14 (E) /= No_Uint;
6176 end Known_Normalized_Position;
6178 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6180 return Uint10 (E) /= No_Uint;
6181 end Known_Normalized_Position_Max;
6183 function Known_RM_Size (E : Entity_Id) return B is
6185 return Uint13 (E) /= No_Uint
6186 and then (Uint13 (E) /= Uint_0
6187 or else Is_Discrete_Type (E)
6188 or else Is_Fixed_Point_Type (E));
6191 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6193 return Uint11 (E) /= No_Uint
6194 and then Uint11 (E) >= Uint_0;
6195 end Known_Static_Component_Bit_Offset;
6197 function Known_Static_Component_Size (E : Entity_Id) return B is
6199 return Uint22 (Base_Type (E)) > Uint_0;
6200 end Known_Static_Component_Size;
6202 function Known_Static_Esize (E : Entity_Id) return B is
6204 return Uint12 (E) > Uint_0
6205 and then not Is_Generic_Type (E);
6206 end Known_Static_Esize;
6208 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6210 return Uint8 (E) /= No_Uint
6211 and then Uint8 (E) >= Uint_0;
6212 end Known_Static_Normalized_First_Bit;
6214 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6216 return Uint14 (E) /= No_Uint
6217 and then Uint14 (E) >= Uint_0;
6218 end Known_Static_Normalized_Position;
6220 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6222 return Uint10 (E) /= No_Uint
6223 and then Uint10 (E) >= Uint_0;
6224 end Known_Static_Normalized_Position_Max;
6226 function Known_Static_RM_Size (E : Entity_Id) return B is
6228 return (Uint13 (E) > Uint_0
6229 or else Is_Discrete_Type (E)
6230 or else Is_Fixed_Point_Type (E))
6231 and then not Is_Generic_Type (E);
6232 end Known_Static_RM_Size;
6234 function Unknown_Alignment (E : Entity_Id) return B is
6236 return Uint14 (E) = Uint_0
6237 or else Uint14 (E) = No_Uint;
6238 end Unknown_Alignment;
6240 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6242 return Uint11 (E) = No_Uint;
6243 end Unknown_Component_Bit_Offset;
6245 function Unknown_Component_Size (E : Entity_Id) return B is
6247 return Uint22 (Base_Type (E)) = Uint_0
6249 Uint22 (Base_Type (E)) = No_Uint;
6250 end Unknown_Component_Size;
6252 function Unknown_Esize (E : Entity_Id) return B is
6254 return Uint12 (E) = No_Uint
6256 Uint12 (E) = Uint_0;
6259 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6261 return Uint8 (E) = No_Uint;
6262 end Unknown_Normalized_First_Bit;
6264 function Unknown_Normalized_Position (E : Entity_Id) return B is
6266 return Uint14 (E) = No_Uint;
6267 end Unknown_Normalized_Position;
6269 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6271 return Uint10 (E) = No_Uint;
6272 end Unknown_Normalized_Position_Max;
6274 function Unknown_RM_Size (E : Entity_Id) return B is
6276 return (Uint13 (E) = Uint_0
6277 and then not Is_Discrete_Type (E)
6278 and then not Is_Fixed_Point_Type (E))
6279 or else Uint13 (E) = No_Uint;
6280 end Unknown_RM_Size;
6282 --------------------
6283 -- Address_Clause --
6284 --------------------
6286 function Address_Clause (Id : E) return N is
6288 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6295 function Aft_Value (Id : E) return U is
6297 Delta_Val : Ureal := Delta_Value (Id);
6299 while Delta_Val < Ureal_Tenth loop
6300 Delta_Val := Delta_Val * Ureal_10;
6301 Result := Result + 1;
6304 return UI_From_Int (Result);
6307 ----------------------
6308 -- Alignment_Clause --
6309 ----------------------
6311 function Alignment_Clause (Id : E) return N is
6313 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6314 end Alignment_Clause;
6320 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6322 if Last_Entity (V) = Empty then
6323 Set_First_Entity (Id => V, V => Id);
6325 Set_Next_Entity (Last_Entity (V), Id);
6328 Set_Next_Entity (Id, Empty);
6330 Set_Last_Entity (Id => V, V => Id);
6337 function Base_Type (Id : E) return E is
6339 if Is_Base_Type (Id) then
6342 pragma Assert (Is_Type (Id));
6347 -------------------------
6348 -- Component_Alignment --
6349 -------------------------
6351 -- Component Alignment is encoded using two flags, Flag128/129 as
6352 -- follows. Note that both flags False = Align_Default, so that the
6353 -- default initialization of flags to False initializes component
6354 -- alignment to the default value as required.
6356 -- Flag128 Flag129 Value
6357 -- ------- ------- -----
6358 -- False False Calign_Default
6359 -- False True Calign_Component_Size
6360 -- True False Calign_Component_Size_4
6361 -- True True Calign_Storage_Unit
6363 function Component_Alignment (Id : E) return C is
6364 BT : constant Node_Id := Base_Type (Id);
6367 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6369 if Flag128 (BT) then
6370 if Flag129 (BT) then
6371 return Calign_Storage_Unit;
6373 return Calign_Component_Size_4;
6377 if Flag129 (BT) then
6378 return Calign_Component_Size;
6380 return Calign_Default;
6383 end Component_Alignment;
6385 ----------------------
6386 -- Declaration_Node --
6387 ----------------------
6389 function Declaration_Node (Id : E) return N is
6393 if Ekind (Id) = E_Incomplete_Type
6394 and then Present (Full_View (Id))
6396 P := Parent (Full_View (Id));
6402 if Nkind (P) /= N_Selected_Component
6403 and then Nkind (P) /= N_Expanded_Name
6405 not (Nkind (P) = N_Defining_Program_Unit_Name
6406 and then Is_Child_Unit (Id))
6413 end Declaration_Node;
6415 ---------------------
6416 -- Designated_Type --
6417 ---------------------
6419 function Designated_Type (Id : E) return E is
6423 Desig_Type := Directly_Designated_Type (Id);
6425 if Ekind (Desig_Type) = E_Incomplete_Type
6426 and then Present (Full_View (Desig_Type))
6428 return Full_View (Desig_Type);
6430 elsif Is_Class_Wide_Type (Desig_Type)
6431 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6432 and then Present (Full_View (Etype (Desig_Type)))
6433 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6435 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6440 end Designated_Type;
6442 ----------------------
6443 -- Entry_Index_Type --
6444 ----------------------
6446 function Entry_Index_Type (Id : E) return N is
6448 pragma Assert (Ekind (Id) = E_Entry_Family);
6449 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6450 end Entry_Index_Type;
6452 ---------------------
6453 -- First_Component --
6454 ---------------------
6456 function First_Component (Id : E) return E is
6461 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6463 Comp_Id := First_Entity (Id);
6464 while Present (Comp_Id) loop
6465 exit when Ekind (Comp_Id) = E_Component;
6466 Comp_Id := Next_Entity (Comp_Id);
6470 end First_Component;
6472 -------------------------------------
6473 -- First_Component_Or_Discriminant --
6474 -------------------------------------
6476 function First_Component_Or_Discriminant (Id : E) return E is
6481 (Is_Record_Type (Id)
6482 or else Is_Incomplete_Or_Private_Type (Id)
6483 or else Has_Discriminants (Id));
6485 Comp_Id := First_Entity (Id);
6486 while Present (Comp_Id) loop
6487 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6488 Comp_Id := Next_Entity (Comp_Id);
6492 end First_Component_Or_Discriminant;
6498 function First_Formal (Id : E) return E is
6503 (Is_Overloadable (Id)
6504 or else Ekind_In (Id, E_Entry_Family,
6506 E_Subprogram_Type));
6508 if Ekind (Id) = E_Enumeration_Literal then
6512 Formal := First_Entity (Id);
6514 if Present (Formal) and then Is_Formal (Formal) then
6522 ------------------------------
6523 -- First_Formal_With_Extras --
6524 ------------------------------
6526 function First_Formal_With_Extras (Id : E) return E is
6531 (Is_Overloadable (Id)
6532 or else Ekind_In (Id, E_Entry_Family,
6534 E_Subprogram_Type));
6536 if Ekind (Id) = E_Enumeration_Literal then
6540 Formal := First_Entity (Id);
6542 if Present (Formal) and then Is_Formal (Formal) then
6545 return Extra_Formals (Id); -- Empty if no extra formals
6548 end First_Formal_With_Extras;
6550 -------------------------------------
6551 -- Get_Attribute_Definition_Clause --
6552 -------------------------------------
6554 function Get_Attribute_Definition_Clause
6556 Id : Attribute_Id) return Node_Id
6561 N := First_Rep_Item (E);
6562 while Present (N) loop
6563 if Nkind (N) = N_Attribute_Definition_Clause
6564 and then Get_Attribute_Id (Chars (N)) = Id
6573 end Get_Attribute_Definition_Clause;
6579 function Get_Full_View (T : Entity_Id) return Entity_Id is
6581 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6582 return Full_View (T);
6584 elsif Is_Class_Wide_Type (T)
6585 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6586 and then Present (Full_View (Root_Type (T)))
6588 return Class_Wide_Type (Full_View (Root_Type (T)));
6599 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6600 Is_CDG : constant Boolean :=
6601 Id = Pragma_Abstract_State or else
6602 Id = Pragma_Async_Readers or else
6603 Id = Pragma_Async_Writers or else
6604 Id = Pragma_Depends or else
6605 Id = Pragma_Effective_Reads or else
6606 Id = Pragma_Effective_Writes or else
6607 Id = Pragma_Global or else
6608 Id = Pragma_Initial_Condition or else
6609 Id = Pragma_Initializes or else
6610 Id = Pragma_Part_Of or else
6611 Id = Pragma_Refined_Depends or else
6612 Id = Pragma_Refined_Global or else
6613 Id = Pragma_Refined_State;
6614 Is_CTC : constant Boolean :=
6615 Id = Pragma_Contract_Cases or else
6616 Id = Pragma_Test_Case;
6617 Is_PPC : constant Boolean :=
6618 Id = Pragma_Precondition or else
6619 Id = Pragma_Postcondition or else
6620 Id = Pragma_Refined_Post;
6622 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6628 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6629 -- extracted from their specialized list.
6632 Items := Contract (E);
6638 Item := Classifications (Items);
6641 Item := Contract_Test_Cases (Items);
6644 Item := Pre_Post_Conditions (Items);
6650 Item := First_Rep_Item (E);
6653 while Present (Item) loop
6654 if Nkind (Item) = N_Pragma
6655 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6659 -- All nodes in N_Contract are chained using Next_Pragma
6661 elsif In_Contract then
6662 Item := Next_Pragma (Item);
6667 Next_Rep_Item (Item);
6674 --------------------------------------
6675 -- Get_Record_Representation_Clause --
6676 --------------------------------------
6678 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6682 N := First_Rep_Item (E);
6683 while Present (N) loop
6684 if Nkind (N) = N_Record_Representation_Clause then
6692 end Get_Record_Representation_Clause;
6694 ------------------------
6695 -- Has_Attach_Handler --
6696 ------------------------
6698 function Has_Attach_Handler (Id : E) return B is
6702 pragma Assert (Is_Protected_Type (Id));
6704 Ritem := First_Rep_Item (Id);
6705 while Present (Ritem) loop
6706 if Nkind (Ritem) = N_Pragma
6707 and then Pragma_Name (Ritem) = Name_Attach_Handler
6711 Next_Rep_Item (Ritem);
6716 end Has_Attach_Handler;
6722 function Has_Entries (Id : E) return B is
6726 pragma Assert (Is_Concurrent_Type (Id));
6728 Ent := First_Entity (Id);
6729 while Present (Ent) loop
6730 if Is_Entry (Ent) then
6734 Ent := Next_Entity (Ent);
6740 ----------------------------
6741 -- Has_Foreign_Convention --
6742 ----------------------------
6744 function Has_Foreign_Convention (Id : E) return B is
6746 -- While regular Intrinsics such as the Standard operators fit in the
6747 -- "Ada" convention, those with an Interface_Name materialize GCC
6748 -- builtin imports for which Ada special treatments shouldn't apply.
6750 return Convention (Id) in Foreign_Convention
6751 or else (Convention (Id) = Convention_Intrinsic
6752 and then Present (Interface_Name (Id)));
6753 end Has_Foreign_Convention;
6755 ---------------------------
6756 -- Has_Interrupt_Handler --
6757 ---------------------------
6759 function Has_Interrupt_Handler (Id : E) return B is
6763 pragma Assert (Is_Protected_Type (Id));
6765 Ritem := First_Rep_Item (Id);
6766 while Present (Ritem) loop
6767 if Nkind (Ritem) = N_Pragma
6768 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6772 Next_Rep_Item (Ritem);
6777 end Has_Interrupt_Handler;
6779 -----------------------------
6780 -- Has_Non_Null_Refinement --
6781 -----------------------------
6783 function Has_Non_Null_Refinement (Id : E) return B is
6785 -- "Refinement" is a concept applicable only to abstract states
6787 pragma Assert (Ekind (Id) = E_Abstract_State);
6789 if Has_Visible_Refinement (Id) then
6790 pragma Assert (Present (Refinement_Constituents (Id)));
6792 -- For a refinement to be non-null, the first constituent must be
6793 -- anything other than null.
6796 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6800 end Has_Non_Null_Refinement;
6802 -----------------------------
6803 -- Has_Null_Abstract_State --
6804 -----------------------------
6806 function Has_Null_Abstract_State (Id : E) return B is
6808 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6811 Present (Abstract_States (Id))
6812 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6813 end Has_Null_Abstract_State;
6815 -------------------------
6816 -- Has_Null_Refinement --
6817 -------------------------
6819 function Has_Null_Refinement (Id : E) return B is
6821 -- "Refinement" is a concept applicable only to abstract states
6823 pragma Assert (Ekind (Id) = E_Abstract_State);
6825 if Has_Visible_Refinement (Id) then
6826 pragma Assert (Present (Refinement_Constituents (Id)));
6828 -- For a refinement to be null, the state's sole constituent must be
6832 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6836 end Has_Null_Refinement;
6838 --------------------
6839 -- Has_Unmodified --
6840 --------------------
6842 function Has_Unmodified (E : Entity_Id) return Boolean is
6844 if Has_Pragma_Unmodified (E) then
6846 elsif Warnings_Off (E) then
6847 Set_Warnings_Off_Used_Unmodified (E);
6854 ---------------------
6855 -- Has_Unreferenced --
6856 ---------------------
6858 function Has_Unreferenced (E : Entity_Id) return Boolean is
6860 if Has_Pragma_Unreferenced (E) then
6862 elsif Warnings_Off (E) then
6863 Set_Warnings_Off_Used_Unreferenced (E);
6868 end Has_Unreferenced;
6870 ----------------------
6871 -- Has_Warnings_Off --
6872 ----------------------
6874 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6876 if Warnings_Off (E) then
6877 Set_Warnings_Off_Used (E);
6882 end Has_Warnings_Off;
6884 ------------------------------
6885 -- Implementation_Base_Type --
6886 ------------------------------
6888 function Implementation_Base_Type (Id : E) return E is
6893 Bastyp := Base_Type (Id);
6895 if Is_Incomplete_Or_Private_Type (Bastyp) then
6896 Imptyp := Underlying_Type (Bastyp);
6898 -- If we have an implementation type, then just return it,
6899 -- otherwise we return the Base_Type anyway. This can only
6900 -- happen in error situations and should avoid some error bombs.
6902 if Present (Imptyp) then
6903 return Base_Type (Imptyp);
6911 end Implementation_Base_Type;
6913 -------------------------
6914 -- Invariant_Procedure --
6915 -------------------------
6917 function Invariant_Procedure (Id : E) return E is
6921 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6923 if No (Subprograms_For_Type (Id)) then
6927 S := Subprograms_For_Type (Id);
6928 while Present (S) loop
6929 if Is_Invariant_Procedure (S) then
6932 S := Subprograms_For_Type (S);
6938 end Invariant_Procedure;
6944 -- Global flag table allowing rapid computation of this function
6946 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6947 (E_Enumeration_Subtype |
6949 E_Signed_Integer_Subtype |
6950 E_Modular_Integer_Subtype |
6951 E_Floating_Point_Subtype |
6952 E_Ordinary_Fixed_Point_Subtype |
6953 E_Decimal_Fixed_Point_Subtype |
6958 E_Record_Subtype_With_Private |
6959 E_Limited_Private_Subtype |
6961 E_Protected_Subtype |
6963 E_String_Literal_Subtype |
6964 E_Class_Wide_Subtype => False,
6967 function Is_Base_Type (Id : E) return Boolean is
6969 return Entity_Is_Base_Type (Ekind (Id));
6972 ---------------------
6973 -- Is_Boolean_Type --
6974 ---------------------
6976 function Is_Boolean_Type (Id : E) return B is
6978 return Root_Type (Id) = Standard_Boolean;
6979 end Is_Boolean_Type;
6981 ------------------------
6982 -- Is_Constant_Object --
6983 ------------------------
6985 function Is_Constant_Object (Id : E) return B is
6986 K : constant Entity_Kind := Ekind (Id);
6989 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6990 end Is_Constant_Object;
6992 --------------------
6993 -- Is_Discriminal --
6994 --------------------
6996 function Is_Discriminal (Id : E) return B is
6998 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6999 and then Present (Discriminal_Link (Id)));
7002 ----------------------
7003 -- Is_Dynamic_Scope --
7004 ----------------------
7006 function Is_Dynamic_Scope (Id : E) return B is
7009 Ekind (Id) = E_Block
7011 Ekind (Id) = E_Function
7013 Ekind (Id) = E_Procedure
7015 Ekind (Id) = E_Subprogram_Body
7017 Ekind (Id) = E_Task_Type
7019 (Ekind (Id) = E_Limited_Private_Type
7020 and then Present (Full_View (Id))
7021 and then Ekind (Full_View (Id)) = E_Task_Type)
7023 Ekind (Id) = E_Entry
7025 Ekind (Id) = E_Entry_Family
7027 Ekind (Id) = E_Return_Statement;
7028 end Is_Dynamic_Scope;
7030 --------------------
7031 -- Is_Entity_Name --
7032 --------------------
7034 function Is_Entity_Name (N : Node_Id) return Boolean is
7035 Kind : constant Node_Kind := Nkind (N);
7038 -- Identifiers, operator symbols, expanded names are entity names
7040 return Kind = N_Identifier
7041 or else Kind = N_Operator_Symbol
7042 or else Kind = N_Expanded_Name
7044 -- Attribute references are entity names if they refer to an entity.
7045 -- Note that we don't do this by testing for the presence of the
7046 -- Entity field in the N_Attribute_Reference node, since it may not
7047 -- have been set yet.
7049 or else (Kind = N_Attribute_Reference
7050 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7053 -----------------------
7054 -- Is_External_State --
7055 -----------------------
7057 function Is_External_State (Id : E) return B is
7060 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7061 end Is_External_State;
7067 function Is_Finalizer (Id : E) return B is
7069 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7072 ---------------------
7073 -- Is_Ghost_Entity --
7074 ---------------------
7076 -- Note: coding below allows for ghost variables. They are not currently
7077 -- implemented, so we will always get False for variables, but that is
7078 -- expected to change in the future.
7080 function Is_Ghost_Entity (Id : E) return B is
7082 if Present (Id) and then Ekind (Id) = E_Variable then
7083 return Convention (Id) = Convention_Ghost;
7085 return Is_Ghost_Subprogram (Id);
7087 end Is_Ghost_Entity;
7089 -------------------------
7090 -- Is_Ghost_Subprogram --
7091 -------------------------
7093 function Is_Ghost_Subprogram (Id : E) return B is
7095 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7096 return Convention (Id) = Convention_Ghost;
7100 end Is_Ghost_Subprogram;
7106 function Is_Null_State (Id : E) return B is
7109 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7112 ---------------------
7113 -- Is_Packed_Array --
7114 ---------------------
7116 function Is_Packed_Array (Id : E) return B is
7118 return Is_Array_Type (Id) and then Is_Packed (Id);
7119 end Is_Packed_Array;
7121 -----------------------------------
7122 -- Is_Package_Or_Generic_Package --
7123 -----------------------------------
7125 function Is_Package_Or_Generic_Package (Id : E) return B is
7127 return Ekind_In (Id, E_Generic_Package, E_Package);
7128 end Is_Package_Or_Generic_Package;
7134 function Is_Prival (Id : E) return B is
7136 return (Ekind_In (Id, E_Constant, E_Variable)
7137 and then Present (Prival_Link (Id)));
7140 ----------------------------
7141 -- Is_Protected_Component --
7142 ----------------------------
7144 function Is_Protected_Component (Id : E) return B is
7146 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7147 end Is_Protected_Component;
7149 ----------------------------
7150 -- Is_Protected_Interface --
7151 ----------------------------
7153 function Is_Protected_Interface (Id : E) return B is
7154 Typ : constant Entity_Id := Base_Type (Id);
7156 if not Is_Interface (Typ) then
7158 elsif Is_Class_Wide_Type (Typ) then
7159 return Is_Protected_Interface (Etype (Typ));
7161 return Protected_Present (Type_Definition (Parent (Typ)));
7163 end Is_Protected_Interface;
7165 ------------------------------
7166 -- Is_Protected_Record_Type --
7167 ------------------------------
7169 function Is_Protected_Record_Type (Id : E) return B is
7172 Is_Concurrent_Record_Type (Id)
7173 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7174 end Is_Protected_Record_Type;
7176 --------------------------------
7177 -- Is_Standard_Character_Type --
7178 --------------------------------
7180 function Is_Standard_Character_Type (Id : E) return B is
7182 if Is_Type (Id) then
7184 R : constant Entity_Id := Root_Type (Id);
7187 R = Standard_Character
7189 R = Standard_Wide_Character
7191 R = Standard_Wide_Wide_Character;
7197 end Is_Standard_Character_Type;
7199 --------------------
7200 -- Is_String_Type --
7201 --------------------
7203 function Is_String_Type (Id : E) return B is
7205 return Is_Array_Type (Id)
7206 and then Id /= Any_Composite
7207 and then Number_Dimensions (Id) = 1
7208 and then Is_Character_Type (Component_Type (Id));
7211 -------------------------------
7212 -- Is_Synchronized_Interface --
7213 -------------------------------
7215 function Is_Synchronized_Interface (Id : E) return B is
7216 Typ : constant Entity_Id := Base_Type (Id);
7219 if not Is_Interface (Typ) then
7222 elsif Is_Class_Wide_Type (Typ) then
7223 return Is_Synchronized_Interface (Etype (Typ));
7226 return Protected_Present (Type_Definition (Parent (Typ)))
7227 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7228 or else Task_Present (Type_Definition (Parent (Typ)));
7230 end Is_Synchronized_Interface;
7232 -----------------------
7233 -- Is_Task_Interface --
7234 -----------------------
7236 function Is_Task_Interface (Id : E) return B is
7237 Typ : constant Entity_Id := Base_Type (Id);
7239 if not Is_Interface (Typ) then
7241 elsif Is_Class_Wide_Type (Typ) then
7242 return Is_Task_Interface (Etype (Typ));
7244 return Task_Present (Type_Definition (Parent (Typ)));
7246 end Is_Task_Interface;
7248 -------------------------
7249 -- Is_Task_Record_Type --
7250 -------------------------
7252 function Is_Task_Record_Type (Id : E) return B is
7255 Is_Concurrent_Record_Type (Id)
7256 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7257 end Is_Task_Record_Type;
7259 ------------------------
7260 -- Is_Wrapper_Package --
7261 ------------------------
7263 function Is_Wrapper_Package (Id : E) return B is
7265 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7266 end Is_Wrapper_Package;
7272 function Last_Formal (Id : E) return E is
7277 (Is_Overloadable (Id)
7278 or else Ekind_In (Id, E_Entry_Family,
7280 E_Subprogram_Type));
7282 if Ekind (Id) = E_Enumeration_Literal then
7286 Formal := First_Formal (Id);
7288 if Present (Formal) then
7289 while Present (Next_Formal (Formal)) loop
7290 Formal := Next_Formal (Formal);
7298 function Model_Emin_Value (Id : E) return Uint is
7300 return Machine_Emin_Value (Id);
7301 end Model_Emin_Value;
7303 -------------------------
7304 -- Model_Epsilon_Value --
7305 -------------------------
7307 function Model_Epsilon_Value (Id : E) return Ureal is
7308 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7310 return Radix ** (1 - Model_Mantissa_Value (Id));
7311 end Model_Epsilon_Value;
7313 --------------------------
7314 -- Model_Mantissa_Value --
7315 --------------------------
7317 function Model_Mantissa_Value (Id : E) return Uint is
7319 return Machine_Mantissa_Value (Id);
7320 end Model_Mantissa_Value;
7322 -----------------------
7323 -- Model_Small_Value --
7324 -----------------------
7326 function Model_Small_Value (Id : E) return Ureal is
7327 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7329 return Radix ** (Model_Emin_Value (Id) - 1);
7330 end Model_Small_Value;
7332 ------------------------
7333 -- Machine_Emax_Value --
7334 ------------------------
7336 function Machine_Emax_Value (Id : E) return Uint is
7337 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7340 case Float_Rep (Id) is
7343 when 1 .. 6 => return Uint_128;
7344 when 7 .. 15 => return 2**10;
7345 when 16 .. 33 => return 2**14;
7346 when others => return No_Uint;
7350 return Uint_2 ** Uint_7 - Uint_1;
7352 end Machine_Emax_Value;
7354 ------------------------
7355 -- Machine_Emin_Value --
7356 ------------------------
7358 function Machine_Emin_Value (Id : E) return Uint is
7360 case Float_Rep (Id) is
7361 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7362 when AAMP => return -Machine_Emax_Value (Id);
7364 end Machine_Emin_Value;
7366 ----------------------------
7367 -- Machine_Mantissa_Value --
7368 ----------------------------
7370 function Machine_Mantissa_Value (Id : E) return Uint is
7371 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7374 case Float_Rep (Id) is
7377 when 1 .. 6 => return Uint_24;
7378 when 7 .. 15 => return UI_From_Int (53);
7379 when 16 .. 18 => return Uint_64;
7380 when 19 .. 33 => return UI_From_Int (113);
7381 when others => return No_Uint;
7386 when 1 .. 6 => return Uint_24;
7387 when 7 .. 9 => return UI_From_Int (40);
7388 when others => return No_Uint;
7391 end Machine_Mantissa_Value;
7393 -------------------------
7394 -- Machine_Radix_Value --
7395 -------------------------
7397 function Machine_Radix_Value (Id : E) return U is
7399 case Float_Rep (Id) is
7400 when IEEE_Binary | AAMP =>
7403 end Machine_Radix_Value;
7405 --------------------
7406 -- Next_Component --
7407 --------------------
7409 function Next_Component (Id : E) return E is
7413 Comp_Id := Next_Entity (Id);
7414 while Present (Comp_Id) loop
7415 exit when Ekind (Comp_Id) = E_Component;
7416 Comp_Id := Next_Entity (Comp_Id);
7422 ------------------------------------
7423 -- Next_Component_Or_Discriminant --
7424 ------------------------------------
7426 function Next_Component_Or_Discriminant (Id : E) return E is
7430 Comp_Id := Next_Entity (Id);
7431 while Present (Comp_Id) loop
7432 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7433 Comp_Id := Next_Entity (Comp_Id);
7437 end Next_Component_Or_Discriminant;
7439 -----------------------
7440 -- Next_Discriminant --
7441 -----------------------
7443 -- This function actually implements both Next_Discriminant and
7444 -- Next_Stored_Discriminant by making sure that the Discriminant
7445 -- returned is of the same variety as Id.
7447 function Next_Discriminant (Id : E) return E is
7449 -- Derived Tagged types with private extensions look like this...
7451 -- E_Discriminant d1
7452 -- E_Discriminant d2
7454 -- E_Discriminant d1
7455 -- E_Discriminant d2
7458 -- so it is critical not to go past the leading discriminants
7463 pragma Assert (Ekind (Id) = E_Discriminant);
7466 D := Next_Entity (D);
7468 or else (Ekind (D) /= E_Discriminant
7469 and then not Is_Itype (D))
7474 exit when Ekind (D) = E_Discriminant
7475 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7479 end Next_Discriminant;
7485 function Next_Formal (Id : E) return E is
7489 -- Follow the chain of declared entities as long as the kind of the
7490 -- entity corresponds to a formal parameter. Skip internal entities
7491 -- that may have been created for implicit subtypes, in the process
7492 -- of analyzing default expressions.
7496 P := Next_Entity (P);
7498 if No (P) or else Is_Formal (P) then
7500 elsif not Is_Internal (P) then
7506 -----------------------------
7507 -- Next_Formal_With_Extras --
7508 -----------------------------
7510 function Next_Formal_With_Extras (Id : E) return E is
7512 if Present (Extra_Formal (Id)) then
7513 return Extra_Formal (Id);
7515 return Next_Formal (Id);
7517 end Next_Formal_With_Extras;
7523 function Next_Index (Id : Node_Id) return Node_Id is
7532 function Next_Literal (Id : E) return E is
7534 pragma Assert (Nkind (Id) in N_Entity);
7538 ------------------------------
7539 -- Next_Stored_Discriminant --
7540 ------------------------------
7542 function Next_Stored_Discriminant (Id : E) return E is
7544 -- See comment in Next_Discriminant
7546 return Next_Discriminant (Id);
7547 end Next_Stored_Discriminant;
7549 -----------------------
7550 -- Number_Dimensions --
7551 -----------------------
7553 function Number_Dimensions (Id : E) return Pos is
7558 if Ekind (Id) = E_String_Literal_Subtype then
7563 T := First_Index (Id);
7564 while Present (T) loop
7571 end Number_Dimensions;
7573 --------------------
7574 -- Number_Entries --
7575 --------------------
7577 function Number_Entries (Id : E) return Nat is
7582 pragma Assert (Is_Concurrent_Type (Id));
7585 Ent := First_Entity (Id);
7586 while Present (Ent) loop
7587 if Is_Entry (Ent) then
7591 Ent := Next_Entity (Ent);
7597 --------------------
7598 -- Number_Formals --
7599 --------------------
7601 function Number_Formals (Id : E) return Pos is
7607 Formal := First_Formal (Id);
7608 while Present (Formal) loop
7610 Formal := Next_Formal (Formal);
7616 --------------------
7617 -- Parameter_Mode --
7618 --------------------
7620 function Parameter_Mode (Id : E) return Formal_Kind is
7625 ------------------------
7626 -- Predicate_Function --
7627 ------------------------
7629 function Predicate_Function (Id : E) return E is
7634 pragma Assert (Is_Type (Id));
7636 -- If type is private and has a completion, predicate may be defined
7637 -- on the full view.
7639 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7640 T := Full_View (Id);
7645 if No (Subprograms_For_Type (T)) then
7649 S := Subprograms_For_Type (T);
7650 while Present (S) loop
7651 if Is_Predicate_Function (S) then
7654 S := Subprograms_For_Type (S);
7660 end Predicate_Function;
7662 --------------------------
7663 -- Predicate_Function_M --
7664 --------------------------
7666 function Predicate_Function_M (Id : E) return E is
7671 pragma Assert (Is_Type (Id));
7673 -- If type is private and has a completion, predicate may be defined
7674 -- on the full view.
7676 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7677 T := Full_View (Id);
7682 if No (Subprograms_For_Type (T)) then
7686 S := Subprograms_For_Type (T);
7687 while Present (S) loop
7688 if Is_Predicate_Function_M (S) then
7691 S := Subprograms_For_Type (S);
7697 end Predicate_Function_M;
7699 -------------------------
7700 -- Present_In_Rep_Item --
7701 -------------------------
7703 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7707 Ritem := First_Rep_Item (E);
7709 while Present (Ritem) loop
7714 Next_Rep_Item (Ritem);
7718 end Present_In_Rep_Item;
7720 --------------------------
7721 -- Primitive_Operations --
7722 --------------------------
7724 function Primitive_Operations (Id : E) return L is
7726 if Is_Concurrent_Type (Id) then
7727 if Present (Corresponding_Record_Type (Id)) then
7728 return Direct_Primitive_Operations
7729 (Corresponding_Record_Type (Id));
7731 -- If expansion is disabled the corresponding record type is absent,
7732 -- but if the type has ancestors it may have primitive operations.
7734 elsif Is_Tagged_Type (Id) then
7735 return Direct_Primitive_Operations (Id);
7741 return Direct_Primitive_Operations (Id);
7743 end Primitive_Operations;
7745 ---------------------
7746 -- Record_Rep_Item --
7747 ---------------------
7749 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7751 Set_Next_Rep_Item (N, First_Rep_Item (E));
7752 Set_First_Rep_Item (E, N);
7753 end Record_Rep_Item;
7759 function Root_Type (Id : E) return E is
7763 pragma Assert (Nkind (Id) in N_Entity);
7765 T := Base_Type (Id);
7767 if Ekind (T) = E_Class_Wide_Type then
7779 -- Following test catches some error cases resulting from
7782 elsif No (Etyp) then
7783 Check_Error_Detected;
7786 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7789 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7795 -- Return if there is a circularity in the inheritance chain. This
7796 -- happens in some error situations and we do not want to get
7797 -- stuck in this loop.
7799 if T = Base_Type (Id) then
7806 ---------------------
7807 -- Safe_Emax_Value --
7808 ---------------------
7810 function Safe_Emax_Value (Id : E) return Uint is
7812 return Machine_Emax_Value (Id);
7813 end Safe_Emax_Value;
7815 ----------------------
7816 -- Safe_First_Value --
7817 ----------------------
7819 function Safe_First_Value (Id : E) return Ureal is
7821 return -Safe_Last_Value (Id);
7822 end Safe_First_Value;
7824 ---------------------
7825 -- Safe_Last_Value --
7826 ---------------------
7828 function Safe_Last_Value (Id : E) return Ureal is
7829 Radix : constant Uint := Machine_Radix_Value (Id);
7830 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7831 Emax : constant Uint := Safe_Emax_Value (Id);
7832 Significand : constant Uint := Radix ** Mantissa - 1;
7833 Exponent : constant Uint := Emax - Mantissa;
7839 (Num => Significand * 2 ** (Exponent mod 4),
7840 Den => -Exponent / 4,
7846 (Num => Significand,
7850 end Safe_Last_Value;
7856 function Scope_Depth (Id : E) return Uint is
7861 while Is_Record_Type (Scop) loop
7862 Scop := Scope (Scop);
7865 return Scope_Depth_Value (Scop);
7868 ---------------------
7869 -- Scope_Depth_Set --
7870 ---------------------
7872 function Scope_Depth_Set (Id : E) return B is
7874 return not Is_Record_Type (Id)
7875 and then Field22 (Id) /= Union_Id (Empty);
7876 end Scope_Depth_Set;
7878 -----------------------------
7879 -- Set_Component_Alignment --
7880 -----------------------------
7882 -- Component Alignment is encoded using two flags, Flag128/129 as
7883 -- follows. Note that both flags False = Align_Default, so that the
7884 -- default initialization of flags to False initializes component
7885 -- alignment to the default value as required.
7887 -- Flag128 Flag129 Value
7888 -- ------- ------- -----
7889 -- False False Calign_Default
7890 -- False True Calign_Component_Size
7891 -- True False Calign_Component_Size_4
7892 -- True True Calign_Storage_Unit
7894 procedure Set_Component_Alignment (Id : E; V : C) is
7896 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7897 and then Is_Base_Type (Id));
7900 when Calign_Default =>
7901 Set_Flag128 (Id, False);
7902 Set_Flag129 (Id, False);
7904 when Calign_Component_Size =>
7905 Set_Flag128 (Id, False);
7906 Set_Flag129 (Id, True);
7908 when Calign_Component_Size_4 =>
7909 Set_Flag128 (Id, True);
7910 Set_Flag129 (Id, False);
7912 when Calign_Storage_Unit =>
7913 Set_Flag128 (Id, True);
7914 Set_Flag129 (Id, True);
7916 end Set_Component_Alignment;
7918 -----------------------------
7919 -- Set_Invariant_Procedure --
7920 -----------------------------
7922 procedure Set_Invariant_Procedure (Id : E; V : E) is
7926 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7928 S := Subprograms_For_Type (Id);
7929 Set_Subprograms_For_Type (Id, V);
7930 Set_Subprograms_For_Type (V, S);
7932 -- Check for duplicate entry
7934 while Present (S) loop
7935 if Is_Invariant_Procedure (S) then
7936 raise Program_Error;
7938 S := Subprograms_For_Type (S);
7941 end Set_Invariant_Procedure;
7943 ----------------------------
7944 -- Set_Predicate_Function --
7945 ----------------------------
7947 procedure Set_Predicate_Function (Id : E; V : E) is
7951 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7953 S := Subprograms_For_Type (Id);
7954 Set_Subprograms_For_Type (Id, V);
7955 Set_Subprograms_For_Type (V, S);
7957 while Present (S) loop
7958 if Is_Predicate_Function (S) then
7959 raise Program_Error;
7961 S := Subprograms_For_Type (S);
7964 end Set_Predicate_Function;
7966 ------------------------------
7967 -- Set_Predicate_Function_M --
7968 ------------------------------
7970 procedure Set_Predicate_Function_M (Id : E; V : E) is
7974 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7976 S := Subprograms_For_Type (Id);
7977 Set_Subprograms_For_Type (Id, V);
7978 Set_Subprograms_For_Type (V, S);
7980 -- Check for duplicates
7982 while Present (S) loop
7983 if Is_Predicate_Function_M (S) then
7984 raise Program_Error;
7986 S := Subprograms_For_Type (S);
7989 end Set_Predicate_Function_M;
7995 function Size_Clause (Id : E) return N is
7997 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8000 ------------------------
8001 -- Stream_Size_Clause --
8002 ------------------------
8004 function Stream_Size_Clause (Id : E) return N is
8006 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8007 end Stream_Size_Clause;
8013 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8019 Kind := E_Access_Subtype;
8023 Kind := E_Array_Subtype;
8025 when E_Class_Wide_Type |
8026 E_Class_Wide_Subtype =>
8027 Kind := E_Class_Wide_Subtype;
8029 when E_Decimal_Fixed_Point_Type |
8030 E_Decimal_Fixed_Point_Subtype =>
8031 Kind := E_Decimal_Fixed_Point_Subtype;
8033 when E_Ordinary_Fixed_Point_Type |
8034 E_Ordinary_Fixed_Point_Subtype =>
8035 Kind := E_Ordinary_Fixed_Point_Subtype;
8037 when E_Private_Type |
8038 E_Private_Subtype =>
8039 Kind := E_Private_Subtype;
8041 when E_Limited_Private_Type |
8042 E_Limited_Private_Subtype =>
8043 Kind := E_Limited_Private_Subtype;
8045 when E_Record_Type_With_Private |
8046 E_Record_Subtype_With_Private =>
8047 Kind := E_Record_Subtype_With_Private;
8049 when E_Record_Type |
8051 Kind := E_Record_Subtype;
8053 when Enumeration_Kind =>
8054 Kind := E_Enumeration_Subtype;
8057 Kind := E_Floating_Point_Subtype;
8059 when Signed_Integer_Kind =>
8060 Kind := E_Signed_Integer_Subtype;
8062 when Modular_Integer_Kind =>
8063 Kind := E_Modular_Integer_Subtype;
8065 when Protected_Kind =>
8066 Kind := E_Protected_Subtype;
8069 Kind := E_Task_Subtype;
8073 raise Program_Error;
8079 ---------------------
8080 -- Type_High_Bound --
8081 ---------------------
8083 function Type_High_Bound (Id : E) return Node_Id is
8084 Rng : constant Node_Id := Scalar_Range (Id);
8086 if Nkind (Rng) = N_Subtype_Indication then
8087 return High_Bound (Range_Expression (Constraint (Rng)));
8089 return High_Bound (Rng);
8091 end Type_High_Bound;
8093 --------------------
8094 -- Type_Low_Bound --
8095 --------------------
8097 function Type_Low_Bound (Id : E) return Node_Id is
8098 Rng : constant Node_Id := Scalar_Range (Id);
8100 if Nkind (Rng) = N_Subtype_Indication then
8101 return Low_Bound (Range_Expression (Constraint (Rng)));
8103 return Low_Bound (Rng);
8107 ---------------------
8108 -- Underlying_Type --
8109 ---------------------
8111 function Underlying_Type (Id : E) return E is
8113 -- For record_with_private the underlying type is always the direct
8114 -- full view. Never try to take the full view of the parent it
8115 -- doesn't make sense.
8117 if Ekind (Id) = E_Record_Type_With_Private then
8118 return Full_View (Id);
8120 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8122 -- If we have an incomplete or private type with a full view,
8123 -- then we return the Underlying_Type of this full view
8125 if Present (Full_View (Id)) then
8126 if Id = Full_View (Id) then
8128 -- Previous error in declaration
8133 return Underlying_Type (Full_View (Id));
8136 -- If we have an incomplete entity that comes from the limited
8137 -- view then we return the Underlying_Type of its non-limited
8140 elsif From_Limited_With (Id)
8141 and then Present (Non_Limited_View (Id))
8143 return Underlying_Type (Non_Limited_View (Id));
8145 -- Otherwise check for the case where we have a derived type or
8146 -- subtype, and if so get the Underlying_Type of the parent type.
8148 elsif Etype (Id) /= Id then
8149 return Underlying_Type (Etype (Id));
8151 -- Otherwise we have an incomplete or private type that has
8152 -- no full view, which means that we have not encountered the
8153 -- completion, so return Empty to indicate the underlying type
8154 -- is not yet known.
8160 -- For non-incomplete, non-private types, return the type itself Also
8161 -- for entities that are not types at all return the entity itself.
8166 end Underlying_Type;
8172 -- To be removed ???
8174 function Vax_Float (Id : E) return B is
8175 pragma Unreferenced (Id);
8180 ------------------------
8181 -- Write_Entity_Flags --
8182 ------------------------
8184 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8186 procedure W (Flag_Name : String; Flag : Boolean);
8187 -- Write out given flag if it is set
8193 procedure W (Flag_Name : String; Flag : Boolean) is
8197 Write_Str (Flag_Name);
8198 Write_Str (" = True");
8203 -- Start of processing for Write_Entity_Flags
8206 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8207 and then Is_Base_Type (Id)
8210 Write_Str ("Component_Alignment = ");
8212 case Component_Alignment (Id) is
8213 when Calign_Default =>
8214 Write_Str ("Calign_Default");
8216 when Calign_Component_Size =>
8217 Write_Str ("Calign_Component_Size");
8219 when Calign_Component_Size_4 =>
8220 Write_Str ("Calign_Component_Size_4");
8222 when Calign_Storage_Unit =>
8223 Write_Str ("Calign_Storage_Unit");
8229 W ("Address_Taken", Flag104 (Id));
8230 W ("Body_Needed_For_SAL", Flag40 (Id));
8231 W ("C_Pass_By_Copy", Flag125 (Id));
8232 W ("Can_Never_Be_Null", Flag38 (Id));
8233 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8234 W ("Debug_Info_Off", Flag166 (Id));
8235 W ("Default_Expressions_Processed", Flag108 (Id));
8236 W ("Delay_Cleanups", Flag114 (Id));
8237 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8238 W ("Depends_On_Private", Flag14 (Id));
8239 W ("Discard_Names", Flag88 (Id));
8240 W ("Elaboration_Entity_Required", Flag174 (Id));
8241 W ("Elaborate_Body_Desirable", Flag210 (Id));
8242 W ("Entry_Accepted", Flag152 (Id));
8243 W ("Can_Use_Internal_Rep", Flag229 (Id));
8244 W ("Finalize_Storage_Only", Flag158 (Id));
8245 W ("From_Limited_With", Flag159 (Id));
8246 W ("Has_Aliased_Components", Flag135 (Id));
8247 W ("Has_Alignment_Clause", Flag46 (Id));
8248 W ("Has_All_Calls_Remote", Flag79 (Id));
8249 W ("Has_Anonymous_Master", Flag253 (Id));
8250 W ("Has_Atomic_Components", Flag86 (Id));
8251 W ("Has_Biased_Representation", Flag139 (Id));
8252 W ("Has_Completion", Flag26 (Id));
8253 W ("Has_Completion_In_Body", Flag71 (Id));
8254 W ("Has_Complex_Representation", Flag140 (Id));
8255 W ("Has_Component_Size_Clause", Flag68 (Id));
8256 W ("Has_Contiguous_Rep", Flag181 (Id));
8257 W ("Has_Controlled_Component", Flag43 (Id));
8258 W ("Has_Controlling_Result", Flag98 (Id));
8259 W ("Has_Convention_Pragma", Flag119 (Id));
8260 W ("Has_Default_Aspect", Flag39 (Id));
8261 W ("Has_Delayed_Aspects", Flag200 (Id));
8262 W ("Has_Delayed_Freeze", Flag18 (Id));
8263 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8264 W ("Has_Discriminants", Flag5 (Id));
8265 W ("Has_Dispatch_Table", Flag220 (Id));
8266 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8267 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8268 W ("Has_Exit", Flag47 (Id));
8269 W ("Has_Forward_Instantiation", Flag175 (Id));
8270 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8271 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8272 W ("Has_Homonym", Flag56 (Id));
8273 W ("Has_Implicit_Dereference", Flag251 (Id));
8274 W ("Has_Independent_Components", Flag34 (Id));
8275 W ("Has_Inheritable_Invariants", Flag248 (Id));
8276 W ("Has_Initial_Value", Flag219 (Id));
8277 W ("Has_Invariants", Flag232 (Id));
8278 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8279 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8280 W ("Has_Master_Entity", Flag21 (Id));
8281 W ("Has_Missing_Return", Flag142 (Id));
8282 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8283 W ("Has_Non_Standard_Rep", Flag75 (Id));
8284 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8285 W ("Has_Object_Size_Clause", Flag172 (Id));
8286 W ("Has_Per_Object_Constraint", Flag154 (Id));
8287 W ("Has_Postconditions", Flag240 (Id));
8288 W ("Has_Pragma_Controlled", Flag27 (Id));
8289 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8290 W ("Has_Pragma_Inline", Flag157 (Id));
8291 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8292 W ("Has_Pragma_No_Inline", Flag201 (Id));
8293 W ("Has_Pragma_Ordered", Flag198 (Id));
8294 W ("Has_Pragma_Pack", Flag121 (Id));
8295 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8296 W ("Has_Pragma_Pure", Flag203 (Id));
8297 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8298 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8299 W ("Has_Pragma_Unmodified", Flag233 (Id));
8300 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8301 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8302 W ("Has_Predicates", Flag250 (Id));
8303 W ("Has_Primitive_Operations", Flag120 (Id));
8304 W ("Has_Private_Ancestor", Flag151 (Id));
8305 W ("Has_Private_Declaration", Flag155 (Id));
8306 W ("Has_Protected", Flag271 (Id));
8307 W ("Has_Qualified_Name", Flag161 (Id));
8308 W ("Has_RACW", Flag214 (Id));
8309 W ("Has_Record_Rep_Clause", Flag65 (Id));
8310 W ("Has_Recursive_Call", Flag143 (Id));
8311 W ("Has_Shift_Operator", Flag267 (Id));
8312 W ("Has_Size_Clause", Flag29 (Id));
8313 W ("Has_Small_Clause", Flag67 (Id));
8314 W ("Has_Specified_Layout", Flag100 (Id));
8315 W ("Has_Specified_Stream_Input", Flag190 (Id));
8316 W ("Has_Specified_Stream_Output", Flag191 (Id));
8317 W ("Has_Specified_Stream_Read", Flag192 (Id));
8318 W ("Has_Specified_Stream_Write", Flag193 (Id));
8319 W ("Has_Static_Discriminants", Flag211 (Id));
8320 W ("Has_Static_Predicate", Flag269 (Id));
8321 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8322 W ("Has_Storage_Size_Clause", Flag23 (Id));
8323 W ("Has_Stream_Size_Clause", Flag184 (Id));
8324 W ("Has_Task", Flag30 (Id));
8325 W ("Has_Thunks", Flag228 (Id));
8326 W ("Has_Unchecked_Union", Flag123 (Id));
8327 W ("Has_Unknown_Discriminants", Flag72 (Id));
8328 W ("Has_Up_Level_Access", Flag215 (Id));
8329 W ("Has_Visible_Refinement", Flag263 (Id));
8330 W ("Has_Volatile_Components", Flag87 (Id));
8331 W ("Has_Xref_Entry", Flag182 (Id));
8332 W ("In_Package_Body", Flag48 (Id));
8333 W ("In_Private_Part", Flag45 (Id));
8334 W ("In_Use", Flag8 (Id));
8335 W ("Is_Abstract_Subprogram", Flag19 (Id));
8336 W ("Is_Abstract_Type", Flag146 (Id));
8337 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8338 W ("Is_Access_Constant", Flag69 (Id));
8339 W ("Is_Ada_2005_Only", Flag185 (Id));
8340 W ("Is_Ada_2012_Only", Flag199 (Id));
8341 W ("Is_Aliased", Flag15 (Id));
8342 W ("Is_Asynchronous", Flag81 (Id));
8343 W ("Is_Atomic", Flag85 (Id));
8344 W ("Is_Bit_Packed_Array", Flag122 (Id));
8345 W ("Is_CPP_Class", Flag74 (Id));
8346 W ("Is_Called", Flag102 (Id));
8347 W ("Is_Character_Type", Flag63 (Id));
8348 W ("Is_Child_Unit", Flag73 (Id));
8349 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8350 W ("Is_Compilation_Unit", Flag149 (Id));
8351 W ("Is_Completely_Hidden", Flag103 (Id));
8352 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8353 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8354 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8355 W ("Is_Constrained", Flag12 (Id));
8356 W ("Is_Constructor", Flag76 (Id));
8357 W ("Is_Controlled", Flag42 (Id));
8358 W ("Is_Controlling_Formal", Flag97 (Id));
8359 W ("Is_Descendent_Of_Address", Flag223 (Id));
8360 W ("Is_Discrim_SO_Function", Flag176 (Id));
8361 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8362 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8363 W ("Is_Dispatching_Operation", Flag6 (Id));
8364 W ("Is_Eliminated", Flag124 (Id));
8365 W ("Is_Entry_Formal", Flag52 (Id));
8366 W ("Is_Exported", Flag99 (Id));
8367 W ("Is_First_Subtype", Flag70 (Id));
8368 W ("Is_For_Access_Subtype", Flag118 (Id));
8369 W ("Is_Formal_Subprogram", Flag111 (Id));
8370 W ("Is_Frozen", Flag4 (Id));
8371 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8372 W ("Is_Generic_Actual_Type", Flag94 (Id));
8373 W ("Is_Generic_Instance", Flag130 (Id));
8374 W ("Is_Generic_Type", Flag13 (Id));
8375 W ("Is_Hidden", Flag57 (Id));
8376 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8377 W ("Is_Immediately_Visible", Flag7 (Id));
8378 W ("Is_Implementation_Defined", Flag254 (Id));
8379 W ("Is_Imported", Flag24 (Id));
8380 W ("Is_Independent", Flag268 (Id));
8381 W ("Is_Inlined", Flag11 (Id));
8382 W ("Is_Inlined_Always", Flag1 (Id));
8383 W ("Is_Instantiated", Flag126 (Id));
8384 W ("Is_Interface", Flag186 (Id));
8385 W ("Is_Internal", Flag17 (Id));
8386 W ("Is_Interrupt_Handler", Flag89 (Id));
8387 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8388 W ("Is_Invariant_Procedure", Flag257 (Id));
8389 W ("Is_Itype", Flag91 (Id));
8390 W ("Is_Known_Non_Null", Flag37 (Id));
8391 W ("Is_Known_Null", Flag204 (Id));
8392 W ("Is_Known_Valid", Flag170 (Id));
8393 W ("Is_Limited_Composite", Flag106 (Id));
8394 W ("Is_Limited_Interface", Flag197 (Id));
8395 W ("Is_Limited_Record", Flag25 (Id));
8396 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8397 W ("Is_Non_Static_Subtype", Flag109 (Id));
8398 W ("Is_Null_Init_Proc", Flag178 (Id));
8399 W ("Is_Obsolescent", Flag153 (Id));
8400 W ("Is_Only_Out_Parameter", Flag226 (Id));
8401 W ("Is_Package_Body_Entity", Flag160 (Id));
8402 W ("Is_Packed", Flag51 (Id));
8403 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8404 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8405 W ("Is_Predicate_Function", Flag255 (Id));
8406 W ("Is_Predicate_Function_M", Flag256 (Id));
8407 W ("Is_Preelaborated", Flag59 (Id));
8408 W ("Is_Primitive", Flag218 (Id));
8409 W ("Is_Primitive_Wrapper", Flag195 (Id));
8410 W ("Is_Private_Composite", Flag107 (Id));
8411 W ("Is_Private_Descendant", Flag53 (Id));
8412 W ("Is_Private_Primitive", Flag245 (Id));
8413 W ("Is_Processed_Transient", Flag252 (Id));
8414 W ("Is_Public", Flag10 (Id));
8415 W ("Is_Pure", Flag44 (Id));
8416 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8417 W ("Is_RACW_Stub_Type", Flag244 (Id));
8418 W ("Is_Raised", Flag224 (Id));
8419 W ("Is_Remote_Call_Interface", Flag62 (Id));
8420 W ("Is_Remote_Types", Flag61 (Id));
8421 W ("Is_Renaming_Of_Object", Flag112 (Id));
8422 W ("Is_Return_Object", Flag209 (Id));
8423 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8424 W ("Is_Shared_Passive", Flag60 (Id));
8425 W ("Is_Statically_Allocated", Flag28 (Id));
8426 W ("Is_Tag", Flag78 (Id));
8427 W ("Is_Tagged_Type", Flag55 (Id));
8428 W ("Is_Thunk", Flag225 (Id));
8429 W ("Is_Trivial_Subprogram", Flag235 (Id));
8430 W ("Is_True_Constant", Flag163 (Id));
8431 W ("Is_Unchecked_Union", Flag117 (Id));
8432 W ("Is_Underlying_Record_View", Flag246 (Id));
8433 W ("Is_Unsigned_Type", Flag144 (Id));
8434 W ("Is_Valued_Procedure", Flag127 (Id));
8435 W ("Is_Visible_Formal", Flag206 (Id));
8436 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8437 W ("Is_Volatile", Flag16 (Id));
8438 W ("Itype_Printed", Flag202 (Id));
8439 W ("Kill_Elaboration_Checks", Flag32 (Id));
8440 W ("Kill_Range_Checks", Flag33 (Id));
8441 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8442 W ("Low_Bound_Tested", Flag205 (Id));
8443 W ("Machine_Radix_10", Flag84 (Id));
8444 W ("Materialize_Entity", Flag168 (Id));
8445 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8446 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8447 W ("Must_Have_Preelab_Init", Flag208 (Id));
8448 W ("Needs_Debug_Info", Flag147 (Id));
8449 W ("Needs_No_Actuals", Flag22 (Id));
8450 W ("Never_Set_In_Source", Flag115 (Id));
8451 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8452 W ("No_Pool_Assigned", Flag131 (Id));
8453 W ("No_Predicate_On_actual", Flag275 (Id));
8454 W ("No_Return", Flag113 (Id));
8455 W ("No_Strict_Aliasing", Flag136 (Id));
8456 W ("Non_Binary_Modulus", Flag58 (Id));
8457 W ("Nonzero_Is_True", Flag162 (Id));
8458 W ("OK_To_Rename", Flag247 (Id));
8459 W ("OK_To_Reorder_Components", Flag239 (Id));
8460 W ("Optimize_Alignment_Space", Flag241 (Id));
8461 W ("Optimize_Alignment_Time", Flag242 (Id));
8462 W ("Overlays_Constant", Flag243 (Id));
8463 W ("Reachable", Flag49 (Id));
8464 W ("Referenced", Flag156 (Id));
8465 W ("Referenced_As_LHS", Flag36 (Id));
8466 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8467 W ("Renamed_In_Spec", Flag231 (Id));
8468 W ("Requires_Overriding", Flag213 (Id));
8469 W ("Return_Present", Flag54 (Id));
8470 W ("Returns_By_Ref", Flag90 (Id));
8471 W ("Reverse_Bit_Order", Flag164 (Id));
8472 W ("Reverse_Storage_Order", Flag93 (Id));
8473 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8474 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8475 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8476 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8477 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8478 W ("SSO_Set_High_By_Default", Flag273 (Id));
8479 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8480 W ("Static_Elaboration_Desired", Flag77 (Id));
8481 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8482 W ("Strict_Alignment", Flag145 (Id));
8483 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8484 W ("Suppress_Initialization", Flag105 (Id));
8485 W ("Suppress_Style_Checks", Flag165 (Id));
8486 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8487 W ("Treat_As_Volatile", Flag41 (Id));
8488 W ("Universal_Aliasing", Flag216 (Id));
8489 W ("Used_As_Generic_Actual", Flag222 (Id));
8490 W ("Uses_Sec_Stack", Flag95 (Id));
8491 W ("Warnings_Off", Flag96 (Id));
8492 W ("Warnings_Off_Used", Flag236 (Id));
8493 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8494 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8495 W ("Was_Hidden", Flag196 (Id));
8496 end Write_Entity_Flags;
8498 -----------------------
8499 -- Write_Entity_Info --
8500 -----------------------
8502 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8504 procedure Write_Attribute (Which : String; Nam : E);
8505 -- Write attribute value with given string name
8507 procedure Write_Kind (Id : Entity_Id);
8508 -- Write Ekind field of entity
8510 ---------------------
8511 -- Write_Attribute --
8512 ---------------------
8514 procedure Write_Attribute (Which : String; Nam : E) is
8518 Write_Int (Int (Nam));
8520 Write_Name (Chars (Nam));
8522 end Write_Attribute;
8528 procedure Write_Kind (Id : Entity_Id) is
8529 K : constant String := Entity_Kind'Image (Ekind (Id));
8533 Write_Str (" Kind ");
8535 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8536 Write_Str ("TAGGED ");
8539 Write_Str (K (3 .. K'Length));
8542 if Is_Type (Id) and then Depends_On_Private (Id) then
8543 Write_Str ("Depends_On_Private ");
8547 -- Start of processing for Write_Entity_Info
8551 Write_Attribute ("Name ", Id);
8552 Write_Int (Int (Id));
8556 Write_Attribute (" Type ", Etype (Id));
8558 Write_Attribute (" Scope ", Scope (Id));
8563 when Discrete_Kind =>
8564 Write_Str ("Bounds: Id = ");
8566 if Present (Scalar_Range (Id)) then
8567 Write_Int (Int (Type_Low_Bound (Id)));
8568 Write_Str (" .. Id = ");
8569 Write_Int (Int (Type_High_Bound (Id)));
8571 Write_Str ("Empty");
8582 (" Component Type ", Component_Type (Id));
8585 Write_Str (" Indexes ");
8587 Index := First_Index (Id);
8588 while Present (Index) loop
8589 Write_Attribute (" ", Etype (Index));
8590 Index := Next_Index (Index);
8598 (" Directly Designated Type ",
8599 Directly_Designated_Type (Id));
8602 when Overloadable_Kind =>
8603 if Present (Homonym (Id)) then
8604 Write_Str (" Homonym ");
8605 Write_Name (Chars (Homonym (Id)));
8607 Write_Int (Int (Homonym (Id)));
8614 if Ekind (Scope (Id)) in Record_Kind then
8616 " Original_Record_Component ",
8617 Original_Record_Component (Id));
8618 Write_Int (Int (Original_Record_Component (Id)));
8622 when others => null;
8624 end Write_Entity_Info;
8626 -----------------------
8627 -- Write_Field6_Name --
8628 -----------------------
8630 procedure Write_Field6_Name (Id : Entity_Id) is
8631 pragma Warnings (Off, Id);
8633 Write_Str ("First_Rep_Item");
8634 end Write_Field6_Name;
8636 -----------------------
8637 -- Write_Field7_Name --
8638 -----------------------
8640 procedure Write_Field7_Name (Id : Entity_Id) is
8641 pragma Warnings (Off, Id);
8643 Write_Str ("Freeze_Node");
8644 end Write_Field7_Name;
8646 -----------------------
8647 -- Write_Field8_Name --
8648 -----------------------
8650 procedure Write_Field8_Name (Id : Entity_Id) is
8654 Write_Str ("Associated_Node_For_Itype");
8657 Write_Str ("Dependent_Instances");
8660 Write_Str ("First_Exit_Statement");
8663 Write_Str ("Hiding_Loop_Variable");
8667 E_Subprogram_Body =>
8668 Write_Str ("Mechanism");
8672 Write_Str ("Normalized_First_Bit");
8675 Write_Str ("Postcondition_Proc");
8677 when E_Abstract_State =>
8678 Write_Str ("Refinement_Constituents");
8680 when E_Return_Statement =>
8681 Write_Str ("Return_Applies_To");
8684 Write_Str ("Field8??");
8686 end Write_Field8_Name;
8688 -----------------------
8689 -- Write_Field9_Name --
8690 -----------------------
8692 procedure Write_Field9_Name (Id : Entity_Id) is
8696 Write_Str ("Class_Wide_Type");
8699 Write_Str ("Current_Value");
8701 when E_Abstract_State =>
8702 Write_Str ("Part_Of_Constituents");
8705 E_Generic_Function |
8707 E_Generic_Procedure |
8710 Write_Str ("Renaming_Map");
8713 Write_Str ("Field9??");
8715 end Write_Field9_Name;
8717 ------------------------
8718 -- Write_Field10_Name --
8719 ------------------------
8721 procedure Write_Field10_Name (Id : Entity_Id) is
8724 when E_Abstract_State |
8726 Write_Str ("Encapsulating_State");
8728 when Class_Wide_Kind |
8734 Write_Str ("Direct_Primitive_Operations");
8737 Write_Str ("Float_Rep");
8739 when E_In_Parameter |
8741 Write_Str ("Discriminal_Link");
8747 Write_Str ("Handler_Records");
8751 Write_Str ("Normalized_Position_Max");
8754 Write_Str ("Field10??");
8756 end Write_Field10_Name;
8758 ------------------------
8759 -- Write_Field11_Name --
8760 ------------------------
8762 procedure Write_Field11_Name (Id : Entity_Id) is
8766 Write_Str ("Block_Node");
8770 Write_Str ("Component_Bit_Offset");
8773 Write_Str ("Entry_Component");
8775 when E_Enumeration_Literal =>
8776 Write_Str ("Enumeration_Pos");
8780 Write_Str ("Full_View");
8782 when E_Generic_Package =>
8783 Write_Str ("Generic_Homonym");
8789 Write_Str ("Protected_Body_Subprogram");
8792 Write_Str ("Field11??");
8794 end Write_Field11_Name;
8796 ------------------------
8797 -- Write_Field12_Name --
8798 ------------------------
8800 procedure Write_Field12_Name (Id : Entity_Id) is
8804 Write_Str ("Associated_Formal_Package");
8807 Write_Str ("Barrier_Function");
8809 when E_Enumeration_Literal =>
8810 Write_Str ("Enumeration_Rep");
8818 E_In_Out_Parameter |
8822 Write_Str ("Esize");
8826 Write_Str ("Next_Inlined_Subprogram");
8829 Write_Str ("Field12??");
8831 end Write_Field12_Name;
8833 ------------------------
8834 -- Write_Field13_Name --
8835 ------------------------
8837 procedure Write_Field13_Name (Id : Entity_Id) is
8842 Write_Str ("Component_Clause");
8845 Write_Str ("Elaboration_Entity");
8849 Generic_Unit_Kind =>
8850 Write_Str ("Elaboration_Entity");
8854 Write_Str ("Extra_Accessibility");
8857 Write_Str ("RM_Size");
8860 Write_Str ("Field13??");
8862 end Write_Field13_Name;
8864 -----------------------
8865 -- Write_Field14_Name --
8866 -----------------------
8868 procedure Write_Field14_Name (Id : Entity_Id) is
8877 Write_Str ("Alignment");
8881 Write_Str ("First_Optional_Parameter");
8885 Write_Str ("Normalized_Position");
8888 E_Generic_Package =>
8889 Write_Str ("Shadow_Entities");
8892 Write_Str ("Field14??");
8894 end Write_Field14_Name;
8896 ------------------------
8897 -- Write_Field15_Name --
8898 ------------------------
8900 procedure Write_Field15_Name (Id : Entity_Id) is
8903 when E_Discriminant =>
8904 Write_Str ("Discriminant_Number");
8907 Write_Str ("DT_Entry_Count");
8911 Write_Str ("DT_Position");
8913 when E_Protected_Type =>
8914 Write_Str ("Entry_Bodies_Array");
8917 Write_Str ("Entry_Parameters_Type");
8920 Write_Str ("Extra_Formal");
8922 when Enumeration_Kind =>
8923 Write_Str ("Lit_Indexes");
8927 Write_Str ("Related_Instance");
8929 when Decimal_Fixed_Point_Kind =>
8930 Write_Str ("Scale_Value");
8934 Write_Str ("Status_Flag_Or_Transient_Decl");
8938 Write_Str ("Storage_Size_Variable");
8940 when E_String_Literal_Subtype =>
8941 Write_Str ("String_Literal_Low_Bound");
8944 Write_Str ("Field15??");
8946 end Write_Field15_Name;
8948 ------------------------
8949 -- Write_Field16_Name --
8950 ------------------------
8952 procedure Write_Field16_Name (Id : Entity_Id) is
8955 when E_Record_Type |
8956 E_Record_Type_With_Private =>
8957 Write_Str ("Access_Disp_Table");
8959 when E_Abstract_State =>
8960 Write_Str ("Body_References");
8962 when E_Record_Subtype |
8963 E_Class_Wide_Subtype =>
8964 Write_Str ("Cloned_Subtype");
8968 Write_Str ("DTC_Entity");
8971 Write_Str ("Entry_Formal");
8976 Write_Str ("First_Private_Entity");
8978 when Enumeration_Kind =>
8979 Write_Str ("Lit_Strings");
8981 when E_String_Literal_Subtype =>
8982 Write_Str ("String_Literal_Length");
8986 Write_Str ("Unset_Reference");
8989 Write_Str ("Field16??");
8991 end Write_Field16_Name;
8993 ------------------------
8994 -- Write_Field17_Name --
8995 ------------------------
8997 procedure Write_Field17_Name (Id : Entity_Id) is
9002 E_Generic_In_Out_Parameter |
9004 Write_Str ("Actual_Subtype");
9007 Write_Str ("Digits_Value");
9009 when E_Discriminant =>
9010 Write_Str ("Discriminal");
9019 E_Generic_Function |
9021 E_Generic_Procedure |
9029 E_Return_Statement |
9031 E_Subprogram_Type =>
9032 Write_Str ("First_Entity");
9035 Write_Str ("First_Index");
9037 when Enumeration_Kind =>
9038 Write_Str ("First_Literal");
9041 Write_Str ("Master_Id");
9043 when Modular_Integer_Kind =>
9044 Write_Str ("Modulus");
9046 when E_Abstract_State |
9047 E_Incomplete_Type =>
9048 Write_Str ("Non_Limited_View");
9050 when E_Incomplete_Subtype =>
9051 if From_Limited_With (Id) then
9052 Write_Str ("Non_Limited_View");
9056 Write_Str ("Prival");
9059 Write_Str ("Field17??");
9061 end Write_Field17_Name;
9063 ------------------------
9064 -- Write_Field18_Name --
9065 ------------------------
9067 procedure Write_Field18_Name (Id : Entity_Id) is
9070 when E_Enumeration_Literal |
9074 Write_Str ("Alias");
9076 when E_Record_Type =>
9077 Write_Str ("Corresponding_Concurrent_Type");
9079 when E_Subprogram_Body =>
9080 Write_Str ("Corresponding_Protected_Entry");
9082 when Concurrent_Kind =>
9083 Write_Str ("Corresponding_Record_Type");
9088 Write_Str ("Enclosing_Scope");
9090 when E_Entry_Index_Parameter =>
9091 Write_Str ("Entry_Index_Constant");
9093 when E_Class_Wide_Subtype |
9094 E_Access_Protected_Subprogram_Type |
9095 E_Anonymous_Access_Protected_Subprogram_Type |
9096 E_Access_Subprogram_Type |
9098 Write_Str ("Equivalent_Type");
9100 when Fixed_Point_Kind =>
9101 Write_Str ("Delta_Value");
9103 when Incomplete_Or_Private_Kind |
9105 Write_Str ("Private_Dependents");
9108 Write_Str ("Renamed_Object");
9112 E_Generic_Function |
9113 E_Generic_Procedure |
9114 E_Generic_Package =>
9115 Write_Str ("Renamed_Entity");
9118 Write_Str ("Field18??");
9120 end Write_Field18_Name;
9122 -----------------------
9123 -- Write_Field19_Name --
9124 -----------------------
9126 procedure Write_Field19_Name (Id : Entity_Id) is
9130 E_Generic_Package =>
9131 Write_Str ("Body_Entity");
9133 when E_Discriminant =>
9134 Write_Str ("Corresponding_Discriminant");
9137 Write_Str ("Default_Aspect_Value");
9139 when E_Array_Type =>
9140 Write_Str ("Default_Component_Value");
9142 when E_Record_Type =>
9143 Write_Str ("Parent_Subtype");
9147 Write_Str ("Size_Check_Code");
9149 when E_Package_Body |
9151 Write_Str ("Spec_Entity");
9153 when Private_Kind =>
9154 Write_Str ("Underlying_Full_View");
9156 when E_Function | E_Operator | E_Subprogram_Type =>
9157 Write_Str ("Extra_Accessibility_Of_Result");
9160 Write_Str ("Field19??");
9162 end Write_Field19_Name;
9164 -----------------------
9165 -- Write_Field20_Name --
9166 -----------------------
9168 procedure Write_Field20_Name (Id : Entity_Id) is
9172 Write_Str ("Component_Type");
9174 when E_In_Parameter |
9175 E_Generic_In_Parameter =>
9176 Write_Str ("Default_Value");
9179 Write_Str ("Directly_Designated_Type");
9182 Write_Str ("Discriminant_Checking_Func");
9184 when E_Discriminant =>
9185 Write_Str ("Discriminant_Default_Value");
9194 E_Generic_Function |
9196 E_Generic_Procedure |
9204 E_Return_Statement |
9206 E_Subprogram_Type =>
9207 Write_Str ("Last_Entity");
9211 Write_Str ("Prival_Link");
9214 Write_Str ("Scalar_Range");
9217 Write_Str ("Register_Exception_Call");
9220 Write_Str ("Field20??");
9222 end Write_Field20_Name;
9224 -----------------------
9225 -- Write_Field21_Name --
9226 -----------------------
9228 procedure Write_Field21_Name (Id : Entity_Id) is
9232 Write_Str ("Accept_Address");
9234 when E_In_Parameter =>
9235 Write_Str ("Default_Expr_Function");
9237 when Concurrent_Kind |
9238 Incomplete_Or_Private_Kind |
9242 Write_Str ("Discriminant_Constraint");
9247 E_Generic_Function |
9249 E_Generic_Procedure |
9251 Write_Str ("Interface_Name");
9254 Modular_Integer_Kind =>
9255 Write_Str ("Original_Array_Type");
9257 when Fixed_Point_Kind =>
9258 Write_Str ("Small_Value");
9261 Write_Str ("Field21??");
9263 end Write_Field21_Name;
9265 -----------------------
9266 -- Write_Field22_Name --
9267 -----------------------
9269 procedure Write_Field22_Name (Id : Entity_Id) is
9273 Write_Str ("Associated_Storage_Pool");
9276 Write_Str ("Component_Size");
9278 when E_Record_Type =>
9279 Write_Str ("Corresponding_Remote_Type");
9283 Write_Str ("Original_Record_Component");
9285 when E_Enumeration_Literal =>
9286 Write_Str ("Enumeration_Rep_Expr");
9288 when E_Record_Type_With_Private |
9289 E_Record_Subtype_With_Private |
9292 E_Limited_Private_Type |
9293 E_Limited_Private_Subtype =>
9294 Write_Str ("Private_View");
9297 Write_Str ("Protected_Formal");
9307 E_Generic_Function |
9308 E_Generic_Procedure |
9311 E_Return_Statement |
9314 Write_Str ("Scope_Depth_Value");
9317 Write_Str ("Shared_Var_Procs_Instance");
9320 Write_Str ("Field22??");
9322 end Write_Field22_Name;
9324 ------------------------
9325 -- Write_Field23_Name --
9326 ------------------------
9328 procedure Write_Field23_Name (Id : Entity_Id) is
9331 when E_Discriminant =>
9332 Write_Str ("CR_Discriminant");
9335 Write_Str ("Entry_Cancel_Parameter");
9337 when E_Enumeration_Type =>
9338 Write_Str ("Enum_Pos_To_Rep");
9342 Write_Str ("Extra_Constrained");
9345 Write_Str ("Finalization_Master");
9347 when E_Generic_Function |
9349 E_Generic_Procedure =>
9350 Write_Str ("Inner_Instances");
9353 Write_Str ("Packed_Array_Impl_Type");
9356 Write_Str ("Protection_Object");
9358 when Concurrent_Kind |
9359 Incomplete_Or_Private_Kind |
9363 Write_Str ("Stored_Constraint");
9367 if Present (Scope (Id))
9368 and then Is_Protected_Type (Scope (Id))
9370 Write_Str ("Protection_Object");
9372 Write_Str ("Generic_Renamings");
9376 if Is_Generic_Instance (Id) then
9377 Write_Str ("Generic_Renamings");
9379 Write_Str ("Limited_View");
9383 Write_Str ("Field23??");
9385 end Write_Field23_Name;
9387 ------------------------
9388 -- Write_Field24_Name --
9389 ------------------------
9391 procedure Write_Field24_Name (Id : Entity_Id) is
9397 Write_Str ("Related_Expression");
9400 Write_Str ("Field24???");
9402 end Write_Field24_Name;
9404 ------------------------
9405 -- Write_Field25_Name --
9406 ------------------------
9408 procedure Write_Field25_Name (Id : Entity_Id) is
9411 when E_Generic_Package |
9413 Write_Str ("Abstract_States");
9416 Write_Str ("Debug_Renaming_Link");
9419 Write_Str ("DT_Offset_To_Top_Func");
9423 Write_Str ("Interface_Alias");
9425 when E_Record_Type |
9427 E_Record_Type_With_Private |
9428 E_Record_Subtype_With_Private =>
9429 Write_Str ("Interfaces");
9433 Write_Str ("Related_Array_Object");
9436 Write_Str ("Task_Body_Procedure");
9440 Write_Str ("PPC_Wrapper");
9442 when Discrete_Kind =>
9443 Write_Str ("Static_Discrete_Predicate");
9446 Write_Str ("Static_Real_Or_String_Predicate");
9449 Write_Str ("Field25??");
9451 end Write_Field25_Name;
9453 ------------------------
9454 -- Write_Field26_Name --
9455 ------------------------
9457 procedure Write_Field26_Name (Id : Entity_Id) is
9460 when E_Record_Type |
9461 E_Record_Type_With_Private =>
9462 Write_Str ("Dispatch_Table_Wrappers");
9464 when E_In_Out_Parameter |
9467 Write_Str ("Last_Assignment");
9469 when E_Access_Subprogram_Type =>
9470 Write_Str ("Original_Access_Type");
9472 when E_Generic_Package |
9474 Write_Str ("Package_Instantiation");
9478 Write_Str ("Related_Type");
9481 Write_Str ("Relative_Deadline_Variable");
9485 Write_Str ("Overridden_Operation");
9488 Write_Str ("Field26??");
9490 end Write_Field26_Name;
9492 ------------------------
9493 -- Write_Field27_Name --
9494 ------------------------
9496 procedure Write_Field27_Name (Id : Entity_Id) is
9501 Write_Str ("Current_Use_Clause");
9506 Write_Str ("Related_Type");
9510 Write_Str ("Wrapped_Entity");
9513 Write_Str ("Field27??");
9515 end Write_Field27_Name;
9517 ------------------------
9518 -- Write_Field28_Name --
9519 ------------------------
9521 procedure Write_Field28_Name (Id : Entity_Id) is
9529 E_Subprogram_Type =>
9530 Write_Str ("Extra_Formals");
9534 Write_Str ("Finalizer");
9538 Write_Str ("Initialization_Statements");
9540 when E_Record_Type =>
9541 Write_Str ("Underlying_Record_View");
9544 Write_Str ("Field28??");
9546 end Write_Field28_Name;
9548 ------------------------
9549 -- Write_Field29_Name --
9550 ------------------------
9552 procedure Write_Field29_Name (Id : Entity_Id) is
9557 Write_Str ("BIP_Initialization_Call");
9560 Write_Str ("Subprograms_For_Type");
9563 Write_Str ("Field29??");
9565 end Write_Field29_Name;
9567 ------------------------
9568 -- Write_Field30_Name --
9569 ------------------------
9571 procedure Write_Field30_Name (Id : Entity_Id) is
9575 Write_Str ("Corresponding_Equality");
9579 Write_Str ("Last_Aggregate_Assignment");
9582 Write_Str ("Static_Initialization");
9585 Write_Str ("Field30??");
9587 end Write_Field30_Name;
9589 ------------------------
9590 -- Write_Field31_Name --
9591 ------------------------
9593 procedure Write_Field31_Name (Id : Entity_Id) is
9598 Write_Str ("Thunk_Entity");
9601 Write_Str ("Derived_Type_Link");
9604 Write_Str ("Field31??");
9606 end Write_Field31_Name;
9608 ------------------------
9609 -- Write_Field32_Name --
9610 ------------------------
9612 procedure Write_Field32_Name (Id : Entity_Id) is
9616 E_Generic_Function |
9618 E_Generic_Procedure |
9622 E_Subprogram_Body =>
9623 Write_Str ("SPARK_Pragma");
9626 Write_Str ("Field32??");
9628 end Write_Field32_Name;
9630 ------------------------
9631 -- Write_Field33_Name --
9632 ------------------------
9634 procedure Write_Field33_Name (Id : Entity_Id) is
9637 when E_Generic_Package |
9640 Write_Str ("SPARK_Aux_Pragma");
9646 Write_Str ("Linker_Section_Pragma");
9649 Write_Str ("Field33??");
9651 end Write_Field33_Name;
9653 ------------------------
9654 -- Write_Field34_Name --
9655 ------------------------
9657 procedure Write_Field34_Name (Id : Entity_Id) is
9667 Generic_Subprogram_Kind |
9669 Write_Str ("Contract");
9672 Write_Str ("Field34??");
9674 end Write_Field34_Name;
9676 ------------------------
9677 -- Write_Field35_Name --
9678 ------------------------
9680 procedure Write_Field35_Name (Id : Entity_Id) is
9683 when Subprogram_Kind =>
9684 Write_Str ("Import_Pragma");
9686 Write_Str ("Field35??");
9688 end Write_Field35_Name;
9690 -------------------------
9691 -- Iterator Procedures --
9692 -------------------------
9694 procedure Proc_Next_Component (N : in out Node_Id) is
9696 N := Next_Component (N);
9697 end Proc_Next_Component;
9699 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9701 N := Next_Entity (N);
9702 while Present (N) loop
9703 exit when Ekind_In (N, E_Component, E_Discriminant);
9704 N := Next_Entity (N);
9706 end Proc_Next_Component_Or_Discriminant;
9708 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9710 N := Next_Discriminant (N);
9711 end Proc_Next_Discriminant;
9713 procedure Proc_Next_Formal (N : in out Node_Id) is
9715 N := Next_Formal (N);
9716 end Proc_Next_Formal;
9718 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9720 N := Next_Formal_With_Extras (N);
9721 end Proc_Next_Formal_With_Extras;
9723 procedure Proc_Next_Index (N : in out Node_Id) is
9725 N := Next_Index (N);
9726 end Proc_Next_Index;
9728 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9730 N := Next_Inlined_Subprogram (N);
9731 end Proc_Next_Inlined_Subprogram;
9733 procedure Proc_Next_Literal (N : in out Node_Id) is
9735 N := Next_Literal (N);
9736 end Proc_Next_Literal;
9738 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9740 N := Next_Stored_Discriminant (N);
9741 end Proc_Next_Stored_Discriminant;