1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Part_Of_Constituents Elist9
92 -- Encapsulating_State Node10
93 -- Direct_Primitive_Operations Elist10
94 -- Discriminal_Link Node10
95 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
96 -- Handler_Records List10
97 -- Normalized_Position_Max Uint10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- First_Optional_Parameter Node14
119 -- Normalized_Position Uint14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Bodies_Array Node15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Lit_Indexes Node15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
131 -- Scale_Value Uint15
132 -- Storage_Size_Variable Node15
133 -- String_Literal_Low_Bound Node15
135 -- Access_Disp_Table Elist16
136 -- Body_References Elist16
137 -- Cloned_Subtype Node16
139 -- Entry_Formal Node16
140 -- First_Private_Entity Node16
141 -- Lit_Strings Node16
142 -- String_Literal_Length Uint16
143 -- Unset_Reference Node16
145 -- Actual_Subtype Node17
146 -- Digits_Value Uint17
147 -- Discriminal Node17
148 -- First_Entity Node17
149 -- First_Index Node17
150 -- First_Literal Node17
153 -- Non_Limited_View Node17
157 -- Corresponding_Concurrent_Type Node18
158 -- Corresponding_Protected_Entry Node18
159 -- Corresponding_Record_Type Node18
160 -- Delta_Value Ureal18
161 -- Enclosing_Scope Node18
162 -- Equivalent_Type Node18
163 -- Private_Dependents Elist18
164 -- Renamed_Entity Node18
165 -- Renamed_Object Node18
167 -- Body_Entity Node19
168 -- Corresponding_Discriminant Node19
169 -- Default_Aspect_Component_Value Node19
170 -- Default_Aspect_Value Node19
171 -- Extra_Accessibility_Of_Result Node19
172 -- Parent_Subtype Node19
173 -- Size_Check_Code Node19
174 -- Spec_Entity Node19
175 -- Underlying_Full_View Node19
177 -- Component_Type Node20
178 -- Default_Value Node20
179 -- Directly_Designated_Type Node20
180 -- Discriminant_Checking_Func Node20
181 -- Discriminant_Default_Value Node20
182 -- Last_Entity Node20
183 -- Prival_Link Node20
184 -- Register_Exception_Call Node20
185 -- Scalar_Range Node20
187 -- Accept_Address Elist21
188 -- Default_Expr_Function Node21
189 -- Discriminant_Constraint Elist21
190 -- Interface_Name Node21
191 -- Original_Array_Type Node21
192 -- Small_Value Ureal21
194 -- Associated_Storage_Pool Node22
195 -- Component_Size Uint22
196 -- Corresponding_Remote_Type Node22
197 -- Enumeration_Rep_Expr Node22
198 -- Exception_Code Uint22
199 -- Original_Record_Component Node22
200 -- Private_View Node22
201 -- Protected_Formal Node22
202 -- Scope_Depth_Value Uint22
203 -- Shared_Var_Procs_Instance Node22
205 -- CR_Discriminant Node23
206 -- Entry_Cancel_Parameter Node23
207 -- Enum_Pos_To_Rep Node23
208 -- Extra_Constrained Node23
209 -- Finalization_Master Node23
210 -- Generic_Renamings Elist23
211 -- Inner_Instances Elist23
212 -- Limited_View Node23
213 -- Packed_Array_Impl_Type Node23
214 -- Protection_Object Node23
215 -- Stored_Constraint Elist23
217 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Discrete_Predicate List25
226 -- Static_Real_Or_String_Predicate Node25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Original_Access_Type Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Relative_Deadline_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
242 -- Initialization_Statements Node28
243 -- Underlying_Record_View Node28
245 -- BIP_Initialization_Call Node29
246 -- Subprograms_For_Type Node29
248 -- Corresponding_Equality Node30
249 -- Last_Aggregate_Assignment Node30
250 -- Static_Initialization Node30
252 -- Derived_Type_Link Node31
253 -- Thunk_Entity Node31
255 -- SPARK_Pragma Node32
257 -- Linker_Section_Pragma Node33
258 -- SPARK_Aux_Pragma Node33
262 -- Import_Pragma Node35
264 ---------------------------------------------
265 -- Usage of Flags in Defining Entity Nodes --
266 ---------------------------------------------
268 -- All flags are unique, there is no overlaying, so each flag is physically
269 -- present in every entity. However, for many of the flags, it only makes
270 -- sense for them to be set true for certain subsets of entity kinds. See
271 -- the spec of Einfo for further details.
273 -- Is_Inlined_Always Flag1
275 -- Has_Discriminants Flag5
276 -- Is_Dispatching_Operation Flag6
277 -- Is_Immediately_Visible Flag7
279 -- Is_Potentially_Use_Visible Flag9
283 -- Is_Constrained Flag12
284 -- Is_Generic_Type Flag13
285 -- Depends_On_Private Flag14
287 -- Is_Volatile Flag16
288 -- Is_Internal Flag17
289 -- Has_Delayed_Freeze Flag18
290 -- Is_Abstract_Subprogram Flag19
291 -- Is_Concurrent_Record_Type Flag20
293 -- Has_Master_Entity Flag21
294 -- Needs_No_Actuals Flag22
295 -- Has_Storage_Size_Clause Flag23
296 -- Is_Imported Flag24
297 -- Is_Limited_Record Flag25
298 -- Has_Completion Flag26
299 -- Has_Pragma_Controlled Flag27
300 -- Is_Statically_Allocated Flag28
301 -- Has_Size_Clause Flag29
304 -- Checks_May_Be_Suppressed Flag31
305 -- Kill_Elaboration_Checks Flag32
306 -- Kill_Range_Checks Flag33
307 -- Has_Independent_Components Flag34
308 -- Is_Class_Wide_Equivalent_Type Flag35
309 -- Referenced_As_LHS Flag36
310 -- Is_Known_Non_Null Flag37
311 -- Can_Never_Be_Null Flag38
312 -- Has_Default_Aspect Flag39
313 -- Body_Needed_For_SAL Flag40
315 -- Treat_As_Volatile Flag41
316 -- Is_Controlled Flag42
317 -- Has_Controlled_Component Flag43
319 -- In_Private_Part Flag45
320 -- Has_Alignment_Clause Flag46
322 -- In_Package_Body Flag48
324 -- Delay_Subprogram_Descriptors Flag50
327 -- Is_Entry_Formal Flag52
328 -- Is_Private_Descendant Flag53
329 -- Return_Present Flag54
330 -- Is_Tagged_Type Flag55
331 -- Has_Homonym Flag56
333 -- Non_Binary_Modulus Flag58
334 -- Is_Preelaborated Flag59
335 -- Is_Shared_Passive Flag60
337 -- Is_Remote_Types Flag61
338 -- Is_Remote_Call_Interface Flag62
339 -- Is_Character_Type Flag63
340 -- Is_Intrinsic_Subprogram Flag64
341 -- Has_Record_Rep_Clause Flag65
342 -- Has_Enumeration_Rep_Clause Flag66
343 -- Has_Small_Clause Flag67
344 -- Has_Component_Size_Clause Flag68
345 -- Is_Access_Constant Flag69
346 -- Is_First_Subtype Flag70
348 -- Has_Completion_In_Body Flag71
349 -- Has_Unknown_Discriminants Flag72
350 -- Is_Child_Unit Flag73
351 -- Is_CPP_Class Flag74
352 -- Has_Non_Standard_Rep Flag75
353 -- Is_Constructor Flag76
354 -- Static_Elaboration_Desired Flag77
356 -- Has_All_Calls_Remote Flag79
357 -- Is_Constr_Subt_For_U_Nominal Flag80
359 -- Is_Asynchronous Flag81
360 -- Has_Gigi_Rep_Item Flag82
361 -- Has_Machine_Radix_Clause Flag83
362 -- Machine_Radix_10 Flag84
364 -- Has_Atomic_Components Flag86
365 -- Has_Volatile_Components Flag87
366 -- Discard_Names Flag88
367 -- Is_Interrupt_Handler Flag89
368 -- Returns_By_Ref Flag90
371 -- Size_Known_At_Compile_Time Flag92
372 -- Reverse_Storage_Order Flag93
373 -- Is_Generic_Actual_Type Flag94
374 -- Uses_Sec_Stack Flag95
375 -- Warnings_Off Flag96
376 -- Is_Controlling_Formal Flag97
377 -- Has_Controlling_Result Flag98
378 -- Is_Exported Flag99
379 -- Has_Specified_Layout Flag100
381 -- Has_Nested_Block_With_Handler Flag101
383 -- Is_Completely_Hidden Flag103
384 -- Address_Taken Flag104
385 -- Suppress_Initialization Flag105
386 -- Is_Limited_Composite Flag106
387 -- Is_Private_Composite Flag107
388 -- Default_Expressions_Processed Flag108
389 -- Is_Non_Static_Subtype Flag109
390 -- Has_Out_Or_In_Out_Parameter Flag110
392 -- Is_Formal_Subprogram Flag111
393 -- Is_Renaming_Of_Object Flag112
395 -- Delay_Cleanups Flag114
396 -- Never_Set_In_Source Flag115
397 -- Is_Visible_Lib_Unit Flag116
398 -- Is_Unchecked_Union Flag117
399 -- Is_For_Access_Subtype Flag118
400 -- Has_Convention_Pragma Flag119
401 -- Has_Primitive_Operations Flag120
403 -- Has_Pragma_Pack Flag121
404 -- Is_Bit_Packed_Array Flag122
405 -- Has_Unchecked_Union Flag123
406 -- Is_Eliminated Flag124
407 -- C_Pass_By_Copy Flag125
408 -- Is_Instantiated Flag126
409 -- Is_Valued_Procedure Flag127
410 -- (used for Component_Alignment) Flag128
411 -- (used for Component_Alignment) Flag129
412 -- Is_Generic_Instance Flag130
414 -- No_Pool_Assigned Flag131
415 -- Is_AST_Entry Flag132
416 -- Is_VMS_Exception Flag133
417 -- Is_Optional_Parameter Flag134
418 -- Has_Aliased_Components Flag135
419 -- No_Strict_Aliasing Flag136
420 -- Is_Machine_Code_Subprogram Flag137
421 -- Is_Packed_Array_Impl_Type Flag138
422 -- Has_Biased_Representation Flag139
423 -- Has_Complex_Representation Flag140
425 -- Is_Constr_Subt_For_UN_Aliased Flag141
426 -- Has_Missing_Return Flag142
427 -- Has_Recursive_Call Flag143
428 -- Is_Unsigned_Type Flag144
429 -- Strict_Alignment Flag145
430 -- Is_Abstract_Type Flag146
431 -- Needs_Debug_Info Flag147
432 -- Suppress_Elaboration_Warnings Flag148
433 -- Is_Compilation_Unit Flag149
434 -- Has_Pragma_Elaborate_Body Flag150
436 -- Has_Private_Ancestor Flag151
437 -- Entry_Accepted Flag152
438 -- Is_Obsolescent Flag153
439 -- Has_Per_Object_Constraint Flag154
440 -- Has_Private_Declaration Flag155
441 -- Referenced Flag156
442 -- Has_Pragma_Inline Flag157
443 -- Finalize_Storage_Only Flag158
444 -- From_Limited_With Flag159
445 -- Is_Package_Body_Entity Flag160
447 -- Has_Qualified_Name Flag161
448 -- Nonzero_Is_True Flag162
449 -- Is_True_Constant Flag163
450 -- Reverse_Bit_Order Flag164
451 -- Suppress_Style_Checks Flag165
452 -- Debug_Info_Off Flag166
453 -- Sec_Stack_Needed_For_Return Flag167
454 -- Materialize_Entity Flag168
455 -- Has_Pragma_Thread_Local_Storage Flag169
456 -- Is_Known_Valid Flag170
458 -- Is_Hidden_Open_Scope Flag171
459 -- Has_Object_Size_Clause Flag172
460 -- Has_Fully_Qualified_Name Flag173
461 -- Elaboration_Entity_Required Flag174
462 -- Has_Forward_Instantiation Flag175
463 -- Is_Discrim_SO_Function Flag176
464 -- Size_Depends_On_Discriminant Flag177
465 -- Is_Null_Init_Proc Flag178
466 -- Has_Pragma_Pure_Function Flag179
467 -- Has_Pragma_Unreferenced Flag180
469 -- Has_Contiguous_Rep Flag181
470 -- Has_Xref_Entry Flag182
471 -- Must_Be_On_Byte_Boundary Flag183
472 -- Has_Stream_Size_Clause Flag184
473 -- Is_Ada_2005_Only Flag185
474 -- Is_Interface Flag186
475 -- Has_Constrained_Partial_View Flag187
476 -- Uses_Lock_Free Flag188
477 -- Is_Pure_Unit_Access_Type Flag189
478 -- Has_Specified_Stream_Input Flag190
480 -- Has_Specified_Stream_Output Flag191
481 -- Has_Specified_Stream_Read Flag192
482 -- Has_Specified_Stream_Write Flag193
483 -- Is_Local_Anonymous_Access Flag194
484 -- Is_Primitive_Wrapper Flag195
485 -- Was_Hidden Flag196
486 -- Is_Limited_Interface Flag197
487 -- Has_Pragma_Ordered Flag198
488 -- Is_Ada_2012_Only Flag199
490 -- Has_Delayed_Aspects Flag200
491 -- Has_Pragma_No_Inline Flag201
492 -- Itype_Printed Flag202
493 -- Has_Pragma_Pure Flag203
494 -- Is_Known_Null Flag204
495 -- Low_Bound_Tested Flag205
496 -- Is_Visible_Formal Flag206
497 -- Known_To_Have_Preelab_Init Flag207
498 -- Must_Have_Preelab_Init Flag208
499 -- Is_Return_Object Flag209
500 -- Elaborate_Body_Desirable Flag210
502 -- Has_Static_Discriminants Flag211
503 -- Has_Pragma_Unreferenced_Objects Flag212
504 -- Requires_Overriding Flag213
506 -- Has_Up_Level_Access Flag215
507 -- Universal_Aliasing Flag216
508 -- Suppress_Value_Tracking_On_Call Flag217
509 -- Is_Primitive Flag218
510 -- Has_Initial_Value Flag219
511 -- Has_Dispatch_Table Flag220
513 -- Has_Pragma_Preelab_Init Flag221
514 -- Used_As_Generic_Actual Flag222
515 -- Is_Descendent_Of_Address Flag223
518 -- Is_Only_Out_Parameter Flag226
519 -- Referenced_As_Out_Parameter Flag227
520 -- Has_Thunks Flag228
521 -- Can_Use_Internal_Rep Flag229
522 -- Has_Pragma_Inline_Always Flag230
524 -- Renamed_In_Spec Flag231
525 -- Has_Invariants Flag232
526 -- Has_Pragma_Unmodified Flag233
527 -- Is_Dispatch_Table_Entity Flag234
528 -- Is_Trivial_Subprogram Flag235
529 -- Warnings_Off_Used Flag236
530 -- Warnings_Off_Used_Unmodified Flag237
531 -- Warnings_Off_Used_Unreferenced Flag238
532 -- OK_To_Reorder_Components Flag239
533 -- Has_Postconditions Flag240
535 -- Optimize_Alignment_Space Flag241
536 -- Optimize_Alignment_Time Flag242
537 -- Overlays_Constant Flag243
538 -- Is_RACW_Stub_Type Flag244
539 -- Is_Private_Primitive Flag245
540 -- Is_Underlying_Record_View Flag246
541 -- OK_To_Rename Flag247
542 -- Has_Inheritable_Invariants Flag248
543 -- Is_Safe_To_Reevaluate Flag249
544 -- Has_Predicates Flag250
546 -- Has_Implicit_Dereference Flag251
547 -- Is_Processed_Transient Flag252
548 -- Has_Anonymous_Master Flag253
549 -- Is_Implementation_Defined Flag254
550 -- Is_Predicate_Function Flag255
551 -- Is_Predicate_Function_M Flag256
552 -- Is_Invariant_Procedure Flag257
553 -- Has_Dynamic_Predicate_Aspect Flag258
554 -- Has_Static_Predicate_Aspect Flag259
555 -- Has_Loop_Entry_Attributes Flag260
557 -- Has_Delayed_Rep_Aspects Flag261
558 -- May_Inherit_Delayed_Rep_Aspects Flag262
559 -- Has_Visible_Refinement Flag263
560 -- Is_Discriminant_Check_Function Flag264
561 -- SPARK_Pragma_Inherited Flag265
562 -- SPARK_Aux_Pragma_Inherited Flag266
563 -- Has_Shift_Operator Flag267
564 -- Is_Independent Flag268
565 -- Has_Static_Predicate Flag269
566 -- Stores_Attribute_Old_Prefix Flag270
568 -- (Has_Protected) Flag271
569 -- (SSO_Set_Low_By_Default) Flag272
570 -- (SSO_Set_Low_By_Default) Flag273
572 -- Is_Generic_Actual_Subprogram Flag274
591 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
593 -----------------------
594 -- Local subprograms --
595 -----------------------
598 (State_Id : Entity_Id;
599 Option_Nam : Name_Id) return Boolean;
600 -- Determine whether abstract state State_Id has particular option denoted
601 -- by the name Option_Nam.
607 function Float_Rep (Id : E) return F is
608 pragma Assert (Is_Floating_Point_Type (Id));
610 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
618 (State_Id : Entity_Id;
619 Option_Nam : Name_Id) return Boolean
621 Decl : constant Node_Id := Parent (State_Id);
626 pragma Assert (Ekind (State_Id) = E_Abstract_State);
628 -- The declaration of abstract states with options appear as an
629 -- extension aggregate. If this is not the case, the option is not
632 if Nkind (Decl) /= N_Extension_Aggregate then
638 Opt := First (Expressions (Decl));
639 while Present (Opt) loop
641 -- Currently the only simple option allowed is External
643 if Nkind (Opt) = N_Identifier
644 and then Chars (Opt) = Name_External
645 and then Chars (Opt) = Option_Nam
653 -- Complex options with various specifiers
655 Opt := First (Component_Associations (Decl));
656 while Present (Opt) loop
657 Opt_Nam := First (Choices (Opt));
659 if Nkind (Opt_Nam) = N_Identifier
660 and then Chars (Opt_Nam) = Option_Nam
671 --------------------------------
672 -- Attribute Access Functions --
673 --------------------------------
675 function Abstract_States (Id : E) return L is
677 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
681 function Accept_Address (Id : E) return L is
686 function Access_Disp_Table (Id : E) return L is
688 pragma Assert (Ekind_In (Id, E_Record_Type,
690 return Elist16 (Implementation_Base_Type (Id));
691 end Access_Disp_Table;
693 function Actual_Subtype (Id : E) return E is
696 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
697 or else Is_Formal (Id));
701 function Address_Taken (Id : E) return B is
706 function Alias (Id : E) return E is
709 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
713 function Alignment (Id : E) return U is
715 pragma Assert (Is_Type (Id)
716 or else Is_Formal (Id)
717 or else Ekind_In (Id, E_Loop_Parameter,
724 function Associated_Formal_Package (Id : E) return E is
726 pragma Assert (Ekind (Id) = E_Package);
728 end Associated_Formal_Package;
730 function Associated_Node_For_Itype (Id : E) return N is
733 end Associated_Node_For_Itype;
735 function Associated_Storage_Pool (Id : E) return E is
737 pragma Assert (Is_Access_Type (Id));
738 return Node22 (Root_Type (Id));
739 end Associated_Storage_Pool;
741 function Barrier_Function (Id : E) return N is
743 pragma Assert (Is_Entry (Id));
745 end Barrier_Function;
747 function Block_Node (Id : E) return N is
749 pragma Assert (Ekind (Id) = E_Block);
753 function Body_Entity (Id : E) return E is
755 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
759 function Body_Needed_For_SAL (Id : E) return B is
762 (Ekind (Id) = E_Package
763 or else Is_Subprogram (Id)
764 or else Is_Generic_Unit (Id));
766 end Body_Needed_For_SAL;
768 function Body_References (Id : E) return L is
770 pragma Assert (Ekind (Id) = E_Abstract_State);
774 function BIP_Initialization_Call (Id : E) return N is
776 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
778 end BIP_Initialization_Call;
780 function C_Pass_By_Copy (Id : E) return B is
782 pragma Assert (Is_Record_Type (Id));
783 return Flag125 (Implementation_Base_Type (Id));
786 function Can_Never_Be_Null (Id : E) return B is
789 end Can_Never_Be_Null;
791 function Checks_May_Be_Suppressed (Id : E) return B is
794 end Checks_May_Be_Suppressed;
796 function Class_Wide_Type (Id : E) return E is
798 pragma Assert (Is_Type (Id));
802 function Cloned_Subtype (Id : E) return E is
804 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
808 function Component_Bit_Offset (Id : E) return U is
810 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
812 end Component_Bit_Offset;
814 function Component_Clause (Id : E) return N is
816 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
818 end Component_Clause;
820 function Component_Size (Id : E) return U is
822 pragma Assert (Is_Array_Type (Id));
823 return Uint22 (Implementation_Base_Type (Id));
826 function Component_Type (Id : E) return E is
828 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
829 return Node20 (Implementation_Base_Type (Id));
832 function Corresponding_Concurrent_Type (Id : E) return E is
834 pragma Assert (Ekind (Id) = E_Record_Type);
836 end Corresponding_Concurrent_Type;
838 function Corresponding_Discriminant (Id : E) return E is
840 pragma Assert (Ekind (Id) = E_Discriminant);
842 end Corresponding_Discriminant;
844 function Corresponding_Equality (Id : E) return E is
847 (Ekind (Id) = E_Function
848 and then not Comes_From_Source (Id)
849 and then Chars (Id) = Name_Op_Ne);
851 end Corresponding_Equality;
853 function Corresponding_Protected_Entry (Id : E) return E is
855 pragma Assert (Ekind (Id) = E_Subprogram_Body);
857 end Corresponding_Protected_Entry;
859 function Corresponding_Record_Type (Id : E) return E is
861 pragma Assert (Is_Concurrent_Type (Id));
863 end Corresponding_Record_Type;
865 function Corresponding_Remote_Type (Id : E) return E is
868 end Corresponding_Remote_Type;
870 function Current_Use_Clause (Id : E) return E is
872 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
874 end Current_Use_Clause;
876 function Current_Value (Id : E) return N is
878 pragma Assert (Ekind (Id) in Object_Kind);
882 function CR_Discriminant (Id : E) return E is
887 function Debug_Info_Off (Id : E) return B is
892 function Debug_Renaming_Link (Id : E) return E is
895 end Debug_Renaming_Link;
897 function Default_Aspect_Component_Value (Id : E) return N is
899 pragma Assert (Is_Array_Type (Id));
900 return Node19 (Base_Type (Id));
901 end Default_Aspect_Component_Value;
903 function Default_Aspect_Value (Id : E) return N is
905 pragma Assert (Is_Scalar_Type (Id));
906 return Node19 (Base_Type (Id));
907 end Default_Aspect_Value;
909 function Default_Expr_Function (Id : E) return E is
911 pragma Assert (Is_Formal (Id));
913 end Default_Expr_Function;
915 function Default_Expressions_Processed (Id : E) return B is
918 end Default_Expressions_Processed;
920 function Default_Value (Id : E) return N is
922 pragma Assert (Is_Formal (Id));
926 function Delay_Cleanups (Id : E) return B is
931 function Delay_Subprogram_Descriptors (Id : E) return B is
934 end Delay_Subprogram_Descriptors;
936 function Delta_Value (Id : E) return R is
938 pragma Assert (Is_Fixed_Point_Type (Id));
942 function Dependent_Instances (Id : E) return L is
944 pragma Assert (Is_Generic_Instance (Id));
946 end Dependent_Instances;
948 function Depends_On_Private (Id : E) return B is
950 pragma Assert (Nkind (Id) in N_Entity);
952 end Depends_On_Private;
954 function Derived_Type_Link (Id : E) return E is
956 pragma Assert (Is_Type (Id));
957 return Node31 (Base_Type (Id));
958 end Derived_Type_Link;
960 function Digits_Value (Id : E) return U is
963 (Is_Floating_Point_Type (Id)
964 or else Is_Decimal_Fixed_Point_Type (Id));
968 function Direct_Primitive_Operations (Id : E) return L is
970 pragma Assert (Is_Tagged_Type (Id));
972 end Direct_Primitive_Operations;
974 function Directly_Designated_Type (Id : E) return E is
976 pragma Assert (Is_Access_Type (Id));
978 end Directly_Designated_Type;
980 function Discard_Names (Id : E) return B is
985 function Discriminal (Id : E) return E is
987 pragma Assert (Ekind (Id) = E_Discriminant);
991 function Discriminal_Link (Id : E) return N is
994 end Discriminal_Link;
996 function Discriminant_Checking_Func (Id : E) return E is
998 pragma Assert (Ekind (Id) = E_Component);
1000 end Discriminant_Checking_Func;
1002 function Discriminant_Constraint (Id : E) return L is
1004 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1005 return Elist21 (Id);
1006 end Discriminant_Constraint;
1008 function Discriminant_Default_Value (Id : E) return N is
1010 pragma Assert (Ekind (Id) = E_Discriminant);
1012 end Discriminant_Default_Value;
1014 function Discriminant_Number (Id : E) return U is
1016 pragma Assert (Ekind (Id) = E_Discriminant);
1018 end Discriminant_Number;
1020 function Dispatch_Table_Wrappers (Id : E) return L is
1022 pragma Assert (Ekind_In (Id, E_Record_Type,
1024 return Elist26 (Implementation_Base_Type (Id));
1025 end Dispatch_Table_Wrappers;
1027 function DT_Entry_Count (Id : E) return U is
1029 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1033 function DT_Offset_To_Top_Func (Id : E) return E is
1035 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1037 end DT_Offset_To_Top_Func;
1039 function DT_Position (Id : E) return U is
1041 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1042 and then Present (DTC_Entity (Id)));
1046 function DTC_Entity (Id : E) return E is
1048 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1052 function Elaborate_Body_Desirable (Id : E) return B is
1054 pragma Assert (Ekind (Id) = E_Package);
1055 return Flag210 (Id);
1056 end Elaborate_Body_Desirable;
1058 function Elaboration_Entity (Id : E) return E is
1063 Ekind (Id) = E_Package
1065 Is_Generic_Unit (Id));
1067 end Elaboration_Entity;
1069 function Elaboration_Entity_Required (Id : E) return B is
1074 Ekind (Id) = E_Package
1076 Is_Generic_Unit (Id));
1077 return Flag174 (Id);
1078 end Elaboration_Entity_Required;
1080 function Encapsulating_State (Id : E) return N is
1082 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1084 end Encapsulating_State;
1086 function Enclosing_Scope (Id : E) return E is
1089 end Enclosing_Scope;
1091 function Entry_Accepted (Id : E) return B is
1093 pragma Assert (Is_Entry (Id));
1094 return Flag152 (Id);
1097 function Entry_Bodies_Array (Id : E) return E is
1100 end Entry_Bodies_Array;
1102 function Entry_Cancel_Parameter (Id : E) return E is
1105 end Entry_Cancel_Parameter;
1107 function Entry_Component (Id : E) return E is
1110 end Entry_Component;
1112 function Entry_Formal (Id : E) return E is
1117 function Entry_Index_Constant (Id : E) return N is
1119 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1121 end Entry_Index_Constant;
1123 function Contract (Id : E) return N is
1126 (Ekind_In (Id, E_Entry,
1133 or else Is_Generic_Subprogram (Id)
1134 or else Is_Subprogram (Id));
1138 function Entry_Parameters_Type (Id : E) return E is
1141 end Entry_Parameters_Type;
1143 function Enum_Pos_To_Rep (Id : E) return E is
1145 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1147 end Enum_Pos_To_Rep;
1149 function Enumeration_Pos (Id : E) return Uint is
1151 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1153 end Enumeration_Pos;
1155 function Enumeration_Rep (Id : E) return U is
1157 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1159 end Enumeration_Rep;
1161 function Enumeration_Rep_Expr (Id : E) return N is
1163 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1165 end Enumeration_Rep_Expr;
1167 function Equivalent_Type (Id : E) return E is
1170 (Ekind_In (Id, E_Class_Wide_Type,
1171 E_Class_Wide_Subtype,
1172 E_Access_Subprogram_Type,
1173 E_Access_Protected_Subprogram_Type,
1174 E_Anonymous_Access_Protected_Subprogram_Type,
1175 E_Access_Subprogram_Type,
1178 end Equivalent_Type;
1180 function Esize (Id : E) return Uint is
1185 function Exception_Code (Id : E) return Uint is
1187 pragma Assert (Ekind (Id) = E_Exception);
1191 function Extra_Accessibility (Id : E) return E is
1194 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1196 end Extra_Accessibility;
1198 function Extra_Accessibility_Of_Result (Id : E) return E is
1200 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1202 end Extra_Accessibility_Of_Result;
1204 function Extra_Constrained (Id : E) return E is
1206 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1208 end Extra_Constrained;
1210 function Extra_Formal (Id : E) return E is
1215 function Extra_Formals (Id : E) return E is
1218 (Is_Overloadable (Id)
1219 or else Ekind_In (Id, E_Entry_Family,
1221 E_Subprogram_Type));
1225 function Can_Use_Internal_Rep (Id : E) return B is
1227 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1228 return Flag229 (Base_Type (Id));
1229 end Can_Use_Internal_Rep;
1231 function Finalization_Master (Id : E) return E is
1233 pragma Assert (Is_Access_Type (Id));
1234 return Node23 (Root_Type (Id));
1235 end Finalization_Master;
1237 function Finalize_Storage_Only (Id : E) return B is
1239 pragma Assert (Is_Type (Id));
1240 return Flag158 (Base_Type (Id));
1241 end Finalize_Storage_Only;
1243 function Finalizer (Id : E) return E is
1245 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1249 function First_Entity (Id : E) return E is
1254 function First_Exit_Statement (Id : E) return N is
1256 pragma Assert (Ekind (Id) = E_Loop);
1258 end First_Exit_Statement;
1260 function First_Index (Id : E) return N is
1262 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1266 function First_Literal (Id : E) return E is
1268 pragma Assert (Is_Enumeration_Type (Id));
1272 function First_Optional_Parameter (Id : E) return E is
1274 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1276 end First_Optional_Parameter;
1278 function First_Private_Entity (Id : E) return E is
1280 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1281 or else Ekind (Id) in Concurrent_Kind);
1283 end First_Private_Entity;
1285 function First_Rep_Item (Id : E) return E is
1290 function Freeze_Node (Id : E) return N is
1295 function From_Limited_With (Id : E) return B is
1297 return Flag159 (Id);
1298 end From_Limited_With;
1300 function Full_View (Id : E) return E is
1302 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1306 function Generic_Homonym (Id : E) return E is
1308 pragma Assert (Ekind (Id) = E_Generic_Package);
1310 end Generic_Homonym;
1312 function Generic_Renamings (Id : E) return L is
1314 return Elist23 (Id);
1315 end Generic_Renamings;
1317 function Handler_Records (Id : E) return S is
1320 end Handler_Records;
1322 function Has_Aliased_Components (Id : E) return B is
1324 return Flag135 (Implementation_Base_Type (Id));
1325 end Has_Aliased_Components;
1327 function Has_Alignment_Clause (Id : E) return B is
1330 end Has_Alignment_Clause;
1332 function Has_All_Calls_Remote (Id : E) return B is
1335 end Has_All_Calls_Remote;
1337 function Has_Anonymous_Master (Id : E) return B is
1340 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1341 return Flag253 (Id);
1342 end Has_Anonymous_Master;
1344 function Has_Atomic_Components (Id : E) return B is
1346 return Flag86 (Implementation_Base_Type (Id));
1347 end Has_Atomic_Components;
1349 function Has_Biased_Representation (Id : E) return B is
1351 return Flag139 (Id);
1352 end Has_Biased_Representation;
1354 function Has_Completion (Id : E) return B is
1359 function Has_Completion_In_Body (Id : E) return B is
1361 pragma Assert (Is_Type (Id));
1363 end Has_Completion_In_Body;
1365 function Has_Complex_Representation (Id : E) return B is
1367 pragma Assert (Is_Type (Id));
1368 return Flag140 (Implementation_Base_Type (Id));
1369 end Has_Complex_Representation;
1371 function Has_Component_Size_Clause (Id : E) return B is
1373 pragma Assert (Is_Array_Type (Id));
1374 return Flag68 (Implementation_Base_Type (Id));
1375 end Has_Component_Size_Clause;
1377 function Has_Constrained_Partial_View (Id : E) return B is
1379 pragma Assert (Is_Type (Id));
1380 return Flag187 (Id);
1381 end Has_Constrained_Partial_View;
1383 function Has_Controlled_Component (Id : E) return B is
1385 return Flag43 (Base_Type (Id));
1386 end Has_Controlled_Component;
1388 function Has_Contiguous_Rep (Id : E) return B is
1390 return Flag181 (Id);
1391 end Has_Contiguous_Rep;
1393 function Has_Controlling_Result (Id : E) return B is
1396 end Has_Controlling_Result;
1398 function Has_Convention_Pragma (Id : E) return B is
1400 return Flag119 (Id);
1401 end Has_Convention_Pragma;
1403 function Has_Default_Aspect (Id : E) return B is
1405 return Flag39 (Base_Type (Id));
1406 end Has_Default_Aspect;
1408 function Has_Delayed_Aspects (Id : E) return B is
1410 pragma Assert (Nkind (Id) in N_Entity);
1411 return Flag200 (Id);
1412 end Has_Delayed_Aspects;
1414 function Has_Delayed_Freeze (Id : E) return B is
1416 pragma Assert (Nkind (Id) in N_Entity);
1418 end Has_Delayed_Freeze;
1420 function Has_Delayed_Rep_Aspects (Id : E) return B is
1422 pragma Assert (Nkind (Id) in N_Entity);
1423 return Flag261 (Id);
1424 end Has_Delayed_Rep_Aspects;
1426 function Has_Discriminants (Id : E) return B is
1428 pragma Assert (Nkind (Id) in N_Entity);
1430 end Has_Discriminants;
1432 function Has_Dispatch_Table (Id : E) return B is
1434 pragma Assert (Is_Tagged_Type (Id));
1435 return Flag220 (Id);
1436 end Has_Dispatch_Table;
1438 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1440 pragma Assert (Is_Type (Id));
1441 return Flag258 (Id);
1442 end Has_Dynamic_Predicate_Aspect;
1444 function Has_Enumeration_Rep_Clause (Id : E) return B is
1446 pragma Assert (Is_Enumeration_Type (Id));
1448 end Has_Enumeration_Rep_Clause;
1450 function Has_Exit (Id : E) return B is
1455 function Has_Forward_Instantiation (Id : E) return B is
1457 return Flag175 (Id);
1458 end Has_Forward_Instantiation;
1460 function Has_Fully_Qualified_Name (Id : E) return B is
1462 return Flag173 (Id);
1463 end Has_Fully_Qualified_Name;
1465 function Has_Gigi_Rep_Item (Id : E) return B is
1468 end Has_Gigi_Rep_Item;
1470 function Has_Homonym (Id : E) return B is
1475 function Has_Implicit_Dereference (Id : E) return B is
1477 return Flag251 (Id);
1478 end Has_Implicit_Dereference;
1480 function Has_Independent_Components (Id : E) return B is
1482 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1483 return Flag34 (Base_Type (Id));
1484 end Has_Independent_Components;
1486 function Has_Inheritable_Invariants (Id : E) return B is
1488 pragma Assert (Is_Type (Id));
1489 return Flag248 (Id);
1490 end Has_Inheritable_Invariants;
1492 function Has_Initial_Value (Id : E) return B is
1494 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1495 return Flag219 (Id);
1496 end Has_Initial_Value;
1498 function Has_Invariants (Id : E) return B is
1500 pragma Assert (Is_Type (Id));
1501 return Flag232 (Id);
1504 function Has_Loop_Entry_Attributes (Id : E) return B is
1506 pragma Assert (Ekind (Id) = E_Loop);
1507 return Flag260 (Id);
1508 end Has_Loop_Entry_Attributes;
1510 function Has_Machine_Radix_Clause (Id : E) return B is
1512 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1514 end Has_Machine_Radix_Clause;
1516 function Has_Master_Entity (Id : E) return B is
1519 end Has_Master_Entity;
1521 function Has_Missing_Return (Id : E) return B is
1523 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1524 return Flag142 (Id);
1525 end Has_Missing_Return;
1527 function Has_Nested_Block_With_Handler (Id : E) return B is
1529 return Flag101 (Id);
1530 end Has_Nested_Block_With_Handler;
1532 function Has_Non_Standard_Rep (Id : E) return B is
1534 return Flag75 (Implementation_Base_Type (Id));
1535 end Has_Non_Standard_Rep;
1537 function Has_Object_Size_Clause (Id : E) return B is
1539 pragma Assert (Is_Type (Id));
1540 return Flag172 (Id);
1541 end Has_Object_Size_Clause;
1543 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1545 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1546 return Flag110 (Id);
1547 end Has_Out_Or_In_Out_Parameter;
1549 function Has_Per_Object_Constraint (Id : E) return B is
1551 return Flag154 (Id);
1552 end Has_Per_Object_Constraint;
1554 function Has_Postconditions (Id : E) return B is
1556 pragma Assert (Is_Subprogram (Id));
1557 return Flag240 (Id);
1558 end Has_Postconditions;
1560 function Has_Pragma_Controlled (Id : E) return B is
1562 pragma Assert (Is_Access_Type (Id));
1563 return Flag27 (Implementation_Base_Type (Id));
1564 end Has_Pragma_Controlled;
1566 function Has_Pragma_Elaborate_Body (Id : E) return B is
1568 return Flag150 (Id);
1569 end Has_Pragma_Elaborate_Body;
1571 function Has_Pragma_Inline (Id : E) return B is
1573 return Flag157 (Id);
1574 end Has_Pragma_Inline;
1576 function Has_Pragma_Inline_Always (Id : E) return B is
1578 return Flag230 (Id);
1579 end Has_Pragma_Inline_Always;
1581 function Has_Pragma_No_Inline (Id : E) return B is
1583 return Flag201 (Id);
1584 end Has_Pragma_No_Inline;
1586 function Has_Pragma_Ordered (Id : E) return B is
1588 pragma Assert (Is_Enumeration_Type (Id));
1589 return Flag198 (Implementation_Base_Type (Id));
1590 end Has_Pragma_Ordered;
1592 function Has_Pragma_Pack (Id : E) return B is
1594 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1595 return Flag121 (Implementation_Base_Type (Id));
1596 end Has_Pragma_Pack;
1598 function Has_Pragma_Preelab_Init (Id : E) return B is
1600 return Flag221 (Id);
1601 end Has_Pragma_Preelab_Init;
1603 function Has_Pragma_Pure (Id : E) return B is
1605 return Flag203 (Id);
1606 end Has_Pragma_Pure;
1608 function Has_Pragma_Pure_Function (Id : E) return B is
1610 return Flag179 (Id);
1611 end Has_Pragma_Pure_Function;
1613 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1615 return Flag169 (Id);
1616 end Has_Pragma_Thread_Local_Storage;
1618 function Has_Pragma_Unmodified (Id : E) return B is
1620 return Flag233 (Id);
1621 end Has_Pragma_Unmodified;
1623 function Has_Pragma_Unreferenced (Id : E) return B is
1625 return Flag180 (Id);
1626 end Has_Pragma_Unreferenced;
1628 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1630 pragma Assert (Is_Type (Id));
1631 return Flag212 (Id);
1632 end Has_Pragma_Unreferenced_Objects;
1634 function Has_Predicates (Id : E) return B is
1636 pragma Assert (Is_Type (Id));
1637 return Flag250 (Id);
1640 function Has_Primitive_Operations (Id : E) return B is
1642 pragma Assert (Is_Type (Id));
1643 return Flag120 (Base_Type (Id));
1644 end Has_Primitive_Operations;
1646 function Has_Private_Ancestor (Id : E) return B is
1648 return Flag151 (Id);
1649 end Has_Private_Ancestor;
1651 function Has_Private_Declaration (Id : E) return B is
1653 return Flag155 (Id);
1654 end Has_Private_Declaration;
1656 function Has_Protected (Id : E) return B is
1658 return Flag271 (Base_Type (Id));
1661 function Has_Qualified_Name (Id : E) return B is
1663 return Flag161 (Id);
1664 end Has_Qualified_Name;
1666 function Has_RACW (Id : E) return B is
1668 pragma Assert (Ekind (Id) = E_Package);
1669 return Flag214 (Id);
1672 function Has_Record_Rep_Clause (Id : E) return B is
1674 pragma Assert (Is_Record_Type (Id));
1675 return Flag65 (Implementation_Base_Type (Id));
1676 end Has_Record_Rep_Clause;
1678 function Has_Recursive_Call (Id : E) return B is
1680 pragma Assert (Is_Subprogram (Id));
1681 return Flag143 (Id);
1682 end Has_Recursive_Call;
1684 function Has_Shift_Operator (Id : E) return B is
1686 pragma Assert (Is_Integer_Type (Id));
1687 return Flag267 (Base_Type (Id));
1688 end Has_Shift_Operator;
1690 function Has_Size_Clause (Id : E) return B is
1693 end Has_Size_Clause;
1695 function Has_Small_Clause (Id : E) return B is
1698 end Has_Small_Clause;
1700 function Has_Specified_Layout (Id : E) return B is
1702 pragma Assert (Is_Type (Id));
1703 return Flag100 (Implementation_Base_Type (Id));
1704 end Has_Specified_Layout;
1706 function Has_Specified_Stream_Input (Id : E) return B is
1708 pragma Assert (Is_Type (Id));
1709 return Flag190 (Id);
1710 end Has_Specified_Stream_Input;
1712 function Has_Specified_Stream_Output (Id : E) return B is
1714 pragma Assert (Is_Type (Id));
1715 return Flag191 (Id);
1716 end Has_Specified_Stream_Output;
1718 function Has_Specified_Stream_Read (Id : E) return B is
1720 pragma Assert (Is_Type (Id));
1721 return Flag192 (Id);
1722 end Has_Specified_Stream_Read;
1724 function Has_Specified_Stream_Write (Id : E) return B is
1726 pragma Assert (Is_Type (Id));
1727 return Flag193 (Id);
1728 end Has_Specified_Stream_Write;
1730 function Has_Static_Discriminants (Id : E) return B is
1732 pragma Assert (Is_Type (Id));
1733 return Flag211 (Id);
1734 end Has_Static_Discriminants;
1736 function Has_Static_Predicate (Id : E) return B is
1738 pragma Assert (Is_Type (Id));
1739 return Flag269 (Id);
1740 end Has_Static_Predicate;
1742 function Has_Static_Predicate_Aspect (Id : E) return B is
1744 pragma Assert (Is_Type (Id));
1745 return Flag259 (Id);
1746 end Has_Static_Predicate_Aspect;
1748 function Has_Storage_Size_Clause (Id : E) return B is
1750 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1751 return Flag23 (Implementation_Base_Type (Id));
1752 end Has_Storage_Size_Clause;
1754 function Has_Stream_Size_Clause (Id : E) return B is
1756 return Flag184 (Id);
1757 end Has_Stream_Size_Clause;
1759 function Has_Task (Id : E) return B is
1761 return Flag30 (Base_Type (Id));
1764 function Has_Thunks (Id : E) return B is
1766 return Flag228 (Id);
1769 function Has_Unchecked_Union (Id : E) return B is
1771 return Flag123 (Base_Type (Id));
1772 end Has_Unchecked_Union;
1774 function Has_Unknown_Discriminants (Id : E) return B is
1776 pragma Assert (Is_Type (Id));
1778 end Has_Unknown_Discriminants;
1780 function Has_Up_Level_Access (Id : E) return B is
1783 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1784 return Flag215 (Id);
1785 end Has_Up_Level_Access;
1787 function Has_Visible_Refinement (Id : E) return B is
1789 pragma Assert (Ekind (Id) = E_Abstract_State);
1790 return Flag263 (Id);
1791 end Has_Visible_Refinement;
1793 function Has_Volatile_Components (Id : E) return B is
1795 return Flag87 (Implementation_Base_Type (Id));
1796 end Has_Volatile_Components;
1798 function Has_Xref_Entry (Id : E) return B is
1800 return Flag182 (Id);
1803 function Hiding_Loop_Variable (Id : E) return E is
1805 pragma Assert (Ekind (Id) = E_Variable);
1807 end Hiding_Loop_Variable;
1809 function Homonym (Id : E) return E is
1814 function Import_Pragma (Id : E) return E is
1816 pragma Assert (Is_Subprogram (Id));
1820 function Interface_Alias (Id : E) return E is
1822 pragma Assert (Is_Subprogram (Id));
1824 end Interface_Alias;
1826 function Interfaces (Id : E) return L is
1828 pragma Assert (Is_Record_Type (Id));
1829 return Elist25 (Id);
1832 function In_Package_Body (Id : E) return B is
1835 end In_Package_Body;
1837 function In_Private_Part (Id : E) return B is
1840 end In_Private_Part;
1842 function In_Use (Id : E) return B is
1844 pragma Assert (Nkind (Id) in N_Entity);
1848 function Initialization_Statements (Id : E) return N is
1850 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1852 end Initialization_Statements;
1854 function Inner_Instances (Id : E) return L is
1856 return Elist23 (Id);
1857 end Inner_Instances;
1859 function Interface_Name (Id : E) return N is
1864 function Is_Abstract_Subprogram (Id : E) return B is
1866 pragma Assert (Is_Overloadable (Id));
1868 end Is_Abstract_Subprogram;
1870 function Is_Abstract_Type (Id : E) return B is
1872 pragma Assert (Is_Type (Id));
1873 return Flag146 (Id);
1874 end Is_Abstract_Type;
1876 function Is_Local_Anonymous_Access (Id : E) return B is
1878 pragma Assert (Is_Access_Type (Id));
1879 return Flag194 (Id);
1880 end Is_Local_Anonymous_Access;
1882 function Is_Access_Constant (Id : E) return B is
1884 pragma Assert (Is_Access_Type (Id));
1886 end Is_Access_Constant;
1888 function Is_Ada_2005_Only (Id : E) return B is
1890 return Flag185 (Id);
1891 end Is_Ada_2005_Only;
1893 function Is_Ada_2012_Only (Id : E) return B is
1895 return Flag199 (Id);
1896 end Is_Ada_2012_Only;
1898 function Is_Aliased (Id : E) return B is
1900 pragma Assert (Nkind (Id) in N_Entity);
1904 function Is_AST_Entry (Id : E) return B is
1906 pragma Assert (Is_Entry (Id));
1907 return Flag132 (Id);
1910 function Is_Asynchronous (Id : E) return B is
1912 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1914 end Is_Asynchronous;
1916 function Is_Atomic (Id : E) return B is
1921 function Is_Bit_Packed_Array (Id : E) return B is
1923 return Flag122 (Implementation_Base_Type (Id));
1924 end Is_Bit_Packed_Array;
1926 function Is_Called (Id : E) return B is
1928 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1929 return Flag102 (Id);
1932 function Is_Character_Type (Id : E) return B is
1935 end Is_Character_Type;
1937 function Is_Child_Unit (Id : E) return B is
1942 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1945 end Is_Class_Wide_Equivalent_Type;
1947 function Is_Compilation_Unit (Id : E) return B is
1949 return Flag149 (Id);
1950 end Is_Compilation_Unit;
1952 function Is_Completely_Hidden (Id : E) return B is
1954 pragma Assert (Ekind (Id) = E_Discriminant);
1955 return Flag103 (Id);
1956 end Is_Completely_Hidden;
1958 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1961 end Is_Constr_Subt_For_U_Nominal;
1963 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1965 return Flag141 (Id);
1966 end Is_Constr_Subt_For_UN_Aliased;
1968 function Is_Constrained (Id : E) return B is
1970 pragma Assert (Nkind (Id) in N_Entity);
1974 function Is_Constructor (Id : E) return B is
1979 function Is_Controlled (Id : E) return B is
1981 return Flag42 (Base_Type (Id));
1984 function Is_Controlling_Formal (Id : E) return B is
1986 pragma Assert (Is_Formal (Id));
1988 end Is_Controlling_Formal;
1990 function Is_CPP_Class (Id : E) return B is
1995 function Is_Descendent_Of_Address (Id : E) return B is
1997 return Flag223 (Id);
1998 end Is_Descendent_Of_Address;
2000 function Is_Discrim_SO_Function (Id : E) return B is
2002 return Flag176 (Id);
2003 end Is_Discrim_SO_Function;
2005 function Is_Discriminant_Check_Function (Id : E) return B is
2007 return Flag264 (Id);
2008 end Is_Discriminant_Check_Function;
2010 function Is_Dispatch_Table_Entity (Id : E) return B is
2012 return Flag234 (Id);
2013 end Is_Dispatch_Table_Entity;
2015 function Is_Dispatching_Operation (Id : E) return B is
2017 pragma Assert (Nkind (Id) in N_Entity);
2019 end Is_Dispatching_Operation;
2021 function Is_Eliminated (Id : E) return B is
2023 return Flag124 (Id);
2026 function Is_Entry_Formal (Id : E) return B is
2029 end Is_Entry_Formal;
2031 function Is_Exported (Id : E) return B is
2036 function Is_First_Subtype (Id : E) return B is
2039 end Is_First_Subtype;
2041 function Is_For_Access_Subtype (Id : E) return B is
2043 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2044 return Flag118 (Id);
2045 end Is_For_Access_Subtype;
2047 function Is_Formal_Subprogram (Id : E) return B is
2049 return Flag111 (Id);
2050 end Is_Formal_Subprogram;
2052 function Is_Frozen (Id : E) return B is
2057 function Is_Generic_Actual_Subprogram (Id : E) return B is
2059 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2060 return Flag274 (Id);
2061 end Is_Generic_Actual_Subprogram;
2063 function Is_Generic_Actual_Type (Id : E) return B is
2065 pragma Assert (Is_Type (Id));
2067 end Is_Generic_Actual_Type;
2069 function Is_Generic_Instance (Id : E) return B is
2071 return Flag130 (Id);
2072 end Is_Generic_Instance;
2074 function Is_Generic_Type (Id : E) return B is
2076 pragma Assert (Nkind (Id) in N_Entity);
2078 end Is_Generic_Type;
2080 function Is_Hidden (Id : E) return B is
2085 function Is_Hidden_Open_Scope (Id : E) return B is
2087 return Flag171 (Id);
2088 end Is_Hidden_Open_Scope;
2090 function Is_Immediately_Visible (Id : E) return B is
2092 pragma Assert (Nkind (Id) in N_Entity);
2094 end Is_Immediately_Visible;
2096 function Is_Implementation_Defined (Id : E) return B is
2098 return Flag254 (Id);
2099 end Is_Implementation_Defined;
2101 function Is_Imported (Id : E) return B is
2106 function Is_Independent (Id : E) return B is
2108 pragma Assert (Ekind (Id) = E_Component);
2109 return Flag268 (Id);
2112 function Is_Inlined (Id : E) return B is
2117 function Is_Inlined_Always (Id : E) return B is
2119 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2121 end Is_Inlined_Always;
2123 function Is_Interface (Id : E) return B is
2125 return Flag186 (Id);
2128 function Is_Instantiated (Id : E) return B is
2130 return Flag126 (Id);
2131 end Is_Instantiated;
2133 function Is_Internal (Id : E) return B is
2135 pragma Assert (Nkind (Id) in N_Entity);
2139 function Is_Interrupt_Handler (Id : E) return B is
2141 pragma Assert (Nkind (Id) in N_Entity);
2143 end Is_Interrupt_Handler;
2145 function Is_Intrinsic_Subprogram (Id : E) return B is
2148 end Is_Intrinsic_Subprogram;
2150 function Is_Invariant_Procedure (Id : E) return B is
2152 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2153 return Flag257 (Id);
2154 end Is_Invariant_Procedure;
2156 function Is_Itype (Id : E) return B is
2161 function Is_Known_Non_Null (Id : E) return B is
2164 end Is_Known_Non_Null;
2166 function Is_Known_Null (Id : E) return B is
2168 return Flag204 (Id);
2171 function Is_Known_Valid (Id : E) return B is
2173 return Flag170 (Id);
2176 function Is_Limited_Composite (Id : E) return B is
2178 return Flag106 (Id);
2179 end Is_Limited_Composite;
2181 function Is_Limited_Interface (Id : E) return B is
2183 return Flag197 (Id);
2184 end Is_Limited_Interface;
2186 function Is_Limited_Record (Id : E) return B is
2189 end Is_Limited_Record;
2191 function Is_Machine_Code_Subprogram (Id : E) return B is
2193 pragma Assert (Is_Subprogram (Id));
2194 return Flag137 (Id);
2195 end Is_Machine_Code_Subprogram;
2197 function Is_Non_Static_Subtype (Id : E) return B is
2199 pragma Assert (Is_Type (Id));
2200 return Flag109 (Id);
2201 end Is_Non_Static_Subtype;
2203 function Is_Null_Init_Proc (Id : E) return B is
2205 pragma Assert (Ekind (Id) = E_Procedure);
2206 return Flag178 (Id);
2207 end Is_Null_Init_Proc;
2209 function Is_Obsolescent (Id : E) return B is
2211 return Flag153 (Id);
2214 function Is_Only_Out_Parameter (Id : E) return B is
2216 pragma Assert (Is_Formal (Id));
2217 return Flag226 (Id);
2218 end Is_Only_Out_Parameter;
2220 function Is_Optional_Parameter (Id : E) return B is
2222 pragma Assert (Is_Formal (Id));
2223 return Flag134 (Id);
2224 end Is_Optional_Parameter;
2226 function Is_Package_Body_Entity (Id : E) return B is
2228 return Flag160 (Id);
2229 end Is_Package_Body_Entity;
2231 function Is_Packed (Id : E) return B is
2233 return Flag51 (Implementation_Base_Type (Id));
2236 function Is_Packed_Array_Impl_Type (Id : E) return B is
2238 return Flag138 (Id);
2239 end Is_Packed_Array_Impl_Type;
2241 function Is_Potentially_Use_Visible (Id : E) return B is
2243 pragma Assert (Nkind (Id) in N_Entity);
2245 end Is_Potentially_Use_Visible;
2247 function Is_Predicate_Function (Id : E) return B is
2249 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2250 return Flag255 (Id);
2251 end Is_Predicate_Function;
2253 function Is_Predicate_Function_M (Id : E) return B is
2255 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2256 return Flag256 (Id);
2257 end Is_Predicate_Function_M;
2259 function Is_Preelaborated (Id : E) return B is
2262 end Is_Preelaborated;
2264 function Is_Primitive (Id : E) return B is
2267 (Is_Overloadable (Id)
2268 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2269 return Flag218 (Id);
2272 function Is_Primitive_Wrapper (Id : E) return B is
2274 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2275 return Flag195 (Id);
2276 end Is_Primitive_Wrapper;
2278 function Is_Private_Composite (Id : E) return B is
2280 pragma Assert (Is_Type (Id));
2281 return Flag107 (Id);
2282 end Is_Private_Composite;
2284 function Is_Private_Descendant (Id : E) return B is
2287 end Is_Private_Descendant;
2289 function Is_Private_Primitive (Id : E) return B is
2291 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2292 return Flag245 (Id);
2293 end Is_Private_Primitive;
2295 function Is_Processed_Transient (Id : E) return B is
2297 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2298 return Flag252 (Id);
2299 end Is_Processed_Transient;
2301 function Is_Public (Id : E) return B is
2303 pragma Assert (Nkind (Id) in N_Entity);
2307 function Is_Pure (Id : E) return B is
2312 function Is_Pure_Unit_Access_Type (Id : E) return B is
2314 pragma Assert (Is_Access_Type (Id));
2315 return Flag189 (Id);
2316 end Is_Pure_Unit_Access_Type;
2318 function Is_RACW_Stub_Type (Id : E) return B is
2320 pragma Assert (Is_Type (Id));
2321 return Flag244 (Id);
2322 end Is_RACW_Stub_Type;
2324 function Is_Raised (Id : E) return B is
2326 pragma Assert (Ekind (Id) = E_Exception);
2327 return Flag224 (Id);
2330 function Is_Remote_Call_Interface (Id : E) return B is
2333 end Is_Remote_Call_Interface;
2335 function Is_Remote_Types (Id : E) return B is
2338 end Is_Remote_Types;
2340 function Is_Renaming_Of_Object (Id : E) return B is
2342 return Flag112 (Id);
2343 end Is_Renaming_Of_Object;
2345 function Is_Return_Object (Id : E) return B is
2347 return Flag209 (Id);
2348 end Is_Return_Object;
2350 function Is_Safe_To_Reevaluate (Id : E) return B is
2352 return Flag249 (Id);
2353 end Is_Safe_To_Reevaluate;
2355 function Is_Shared_Passive (Id : E) return B is
2358 end Is_Shared_Passive;
2360 function Is_Statically_Allocated (Id : E) return B is
2363 end Is_Statically_Allocated;
2365 function Is_Tag (Id : E) return B is
2367 pragma Assert (Nkind (Id) in N_Entity);
2371 function Is_Tagged_Type (Id : E) return B is
2376 function Is_Thunk (Id : E) return B is
2378 return Flag225 (Id);
2381 function Is_Trivial_Subprogram (Id : E) return B is
2383 return Flag235 (Id);
2384 end Is_Trivial_Subprogram;
2386 function Is_True_Constant (Id : E) return B is
2388 return Flag163 (Id);
2389 end Is_True_Constant;
2391 function Is_Unchecked_Union (Id : E) return B is
2393 return Flag117 (Implementation_Base_Type (Id));
2394 end Is_Unchecked_Union;
2396 function Is_Underlying_Record_View (Id : E) return B is
2398 return Flag246 (Id);
2399 end Is_Underlying_Record_View;
2401 function Is_Unsigned_Type (Id : E) return B is
2403 pragma Assert (Is_Type (Id));
2404 return Flag144 (Id);
2405 end Is_Unsigned_Type;
2407 function Is_Valued_Procedure (Id : E) return B is
2409 pragma Assert (Ekind (Id) = E_Procedure);
2410 return Flag127 (Id);
2411 end Is_Valued_Procedure;
2413 function Is_Visible_Formal (Id : E) return B is
2415 return Flag206 (Id);
2416 end Is_Visible_Formal;
2418 function Is_Visible_Lib_Unit (Id : E) return B is
2420 return Flag116 (Id);
2421 end Is_Visible_Lib_Unit;
2423 function Is_VMS_Exception (Id : E) return B is
2425 return Flag133 (Id);
2426 end Is_VMS_Exception;
2428 function Is_Volatile (Id : E) return B is
2430 pragma Assert (Nkind (Id) in N_Entity);
2432 if Is_Type (Id) then
2433 return Flag16 (Base_Type (Id));
2439 function Itype_Printed (Id : E) return B is
2441 pragma Assert (Is_Itype (Id));
2442 return Flag202 (Id);
2445 function Kill_Elaboration_Checks (Id : E) return B is
2448 end Kill_Elaboration_Checks;
2450 function Kill_Range_Checks (Id : E) return B is
2453 end Kill_Range_Checks;
2455 function Known_To_Have_Preelab_Init (Id : E) return B is
2457 pragma Assert (Is_Type (Id));
2458 return Flag207 (Id);
2459 end Known_To_Have_Preelab_Init;
2461 function Last_Aggregate_Assignment (Id : E) return N is
2463 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2465 end Last_Aggregate_Assignment;
2467 function Last_Assignment (Id : E) return N is
2469 pragma Assert (Is_Assignable (Id));
2471 end Last_Assignment;
2473 function Last_Entity (Id : E) return E is
2478 function Limited_View (Id : E) return E is
2480 pragma Assert (Ekind (Id) = E_Package);
2484 function Linker_Section_Pragma (Id : E) return N is
2487 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2489 end Linker_Section_Pragma;
2491 function Lit_Indexes (Id : E) return E is
2493 pragma Assert (Is_Enumeration_Type (Id));
2497 function Lit_Strings (Id : E) return E is
2499 pragma Assert (Is_Enumeration_Type (Id));
2503 function Low_Bound_Tested (Id : E) return B is
2505 return Flag205 (Id);
2506 end Low_Bound_Tested;
2508 function Machine_Radix_10 (Id : E) return B is
2510 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2512 end Machine_Radix_10;
2514 function Master_Id (Id : E) return E is
2516 pragma Assert (Is_Access_Type (Id));
2520 function Materialize_Entity (Id : E) return B is
2522 return Flag168 (Id);
2523 end Materialize_Entity;
2525 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2527 return Flag262 (Id);
2528 end May_Inherit_Delayed_Rep_Aspects;
2530 function Mechanism (Id : E) return M is
2532 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2533 return UI_To_Int (Uint8 (Id));
2536 function Modulus (Id : E) return Uint is
2538 pragma Assert (Is_Modular_Integer_Type (Id));
2539 return Uint17 (Base_Type (Id));
2542 function Must_Be_On_Byte_Boundary (Id : E) return B is
2544 pragma Assert (Is_Type (Id));
2545 return Flag183 (Id);
2546 end Must_Be_On_Byte_Boundary;
2548 function Must_Have_Preelab_Init (Id : E) return B is
2550 pragma Assert (Is_Type (Id));
2551 return Flag208 (Id);
2552 end Must_Have_Preelab_Init;
2554 function Needs_Debug_Info (Id : E) return B is
2556 return Flag147 (Id);
2557 end Needs_Debug_Info;
2559 function Needs_No_Actuals (Id : E) return B is
2562 (Is_Overloadable (Id)
2563 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2565 end Needs_No_Actuals;
2567 function Never_Set_In_Source (Id : E) return B is
2569 return Flag115 (Id);
2570 end Never_Set_In_Source;
2572 function Next_Inlined_Subprogram (Id : E) return E is
2575 end Next_Inlined_Subprogram;
2577 function No_Pool_Assigned (Id : E) return B is
2579 pragma Assert (Is_Access_Type (Id));
2580 return Flag131 (Root_Type (Id));
2581 end No_Pool_Assigned;
2583 function No_Return (Id : E) return B is
2585 return Flag113 (Id);
2588 function No_Strict_Aliasing (Id : E) return B is
2590 pragma Assert (Is_Access_Type (Id));
2591 return Flag136 (Base_Type (Id));
2592 end No_Strict_Aliasing;
2594 function Non_Binary_Modulus (Id : E) return B is
2596 pragma Assert (Is_Type (Id));
2597 return Flag58 (Base_Type (Id));
2598 end Non_Binary_Modulus;
2600 function Non_Limited_View (Id : E) return E is
2603 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2605 end Non_Limited_View;
2607 function Nonzero_Is_True (Id : E) return B is
2609 pragma Assert (Root_Type (Id) = Standard_Boolean);
2610 return Flag162 (Base_Type (Id));
2611 end Nonzero_Is_True;
2613 function Normalized_First_Bit (Id : E) return U is
2615 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2617 end Normalized_First_Bit;
2619 function Normalized_Position (Id : E) return U is
2621 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2623 end Normalized_Position;
2625 function Normalized_Position_Max (Id : E) return U is
2627 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2629 end Normalized_Position_Max;
2631 function OK_To_Rename (Id : E) return B is
2633 pragma Assert (Ekind (Id) = E_Variable);
2634 return Flag247 (Id);
2637 function OK_To_Reorder_Components (Id : E) return B is
2639 pragma Assert (Is_Record_Type (Id));
2640 return Flag239 (Base_Type (Id));
2641 end OK_To_Reorder_Components;
2643 function Optimize_Alignment_Space (Id : E) return B is
2646 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2647 return Flag241 (Id);
2648 end Optimize_Alignment_Space;
2650 function Optimize_Alignment_Time (Id : E) return B is
2653 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2654 return Flag242 (Id);
2655 end Optimize_Alignment_Time;
2657 function Original_Access_Type (Id : E) return E is
2659 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2661 end Original_Access_Type;
2663 function Original_Array_Type (Id : E) return E is
2665 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2667 end Original_Array_Type;
2669 function Original_Record_Component (Id : E) return E is
2671 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2673 end Original_Record_Component;
2675 function Overlays_Constant (Id : E) return B is
2677 return Flag243 (Id);
2678 end Overlays_Constant;
2680 function Overridden_Operation (Id : E) return E is
2683 end Overridden_Operation;
2685 function Package_Instantiation (Id : E) return N is
2687 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2689 end Package_Instantiation;
2691 function Packed_Array_Impl_Type (Id : E) return E is
2693 pragma Assert (Is_Array_Type (Id));
2695 end Packed_Array_Impl_Type;
2697 function Parent_Subtype (Id : E) return E is
2699 pragma Assert (Is_Record_Type (Id));
2700 return Node19 (Base_Type (Id));
2703 function Part_Of_Constituents (Id : E) return L is
2705 pragma Assert (Ekind (Id) = E_Abstract_State);
2707 end Part_Of_Constituents;
2709 function Postcondition_Proc (Id : E) return E is
2711 pragma Assert (Ekind (Id) = E_Procedure);
2713 end Postcondition_Proc;
2715 function PPC_Wrapper (Id : E) return E is
2717 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2721 function Prival (Id : E) return E is
2723 pragma Assert (Is_Protected_Component (Id));
2727 function Prival_Link (Id : E) return E is
2729 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2733 function Private_Dependents (Id : E) return L is
2735 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2736 return Elist18 (Id);
2737 end Private_Dependents;
2739 function Private_View (Id : E) return N is
2741 pragma Assert (Is_Private_Type (Id));
2745 function Protected_Body_Subprogram (Id : E) return E is
2747 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2749 end Protected_Body_Subprogram;
2751 function Protected_Formal (Id : E) return E is
2753 pragma Assert (Is_Formal (Id));
2755 end Protected_Formal;
2757 function Protection_Object (Id : E) return E is
2760 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2762 end Protection_Object;
2764 function Reachable (Id : E) return B is
2769 function Referenced (Id : E) return B is
2771 return Flag156 (Id);
2774 function Referenced_As_LHS (Id : E) return B is
2777 end Referenced_As_LHS;
2779 function Referenced_As_Out_Parameter (Id : E) return B is
2781 return Flag227 (Id);
2782 end Referenced_As_Out_Parameter;
2784 function Refinement_Constituents (Id : E) return L is
2786 pragma Assert (Ekind (Id) = E_Abstract_State);
2788 end Refinement_Constituents;
2790 function Register_Exception_Call (Id : E) return N is
2792 pragma Assert (Ekind (Id) = E_Exception);
2794 end Register_Exception_Call;
2796 function Related_Array_Object (Id : E) return E is
2798 pragma Assert (Is_Array_Type (Id));
2800 end Related_Array_Object;
2802 function Related_Expression (Id : E) return N is
2804 pragma Assert (Ekind (Id) in Type_Kind
2805 or else Ekind_In (Id, E_Constant, E_Variable));
2807 end Related_Expression;
2809 function Related_Instance (Id : E) return E is
2811 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2813 end Related_Instance;
2815 function Related_Type (Id : E) return E is
2817 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2821 function Relative_Deadline_Variable (Id : E) return E is
2823 pragma Assert (Is_Task_Type (Id));
2824 return Node26 (Implementation_Base_Type (Id));
2825 end Relative_Deadline_Variable;
2827 function Renamed_Entity (Id : E) return N is
2832 function Renamed_In_Spec (Id : E) return B is
2834 pragma Assert (Ekind (Id) = E_Package);
2835 return Flag231 (Id);
2836 end Renamed_In_Spec;
2838 function Renamed_Object (Id : E) return N is
2843 function Renaming_Map (Id : E) return U is
2848 function Requires_Overriding (Id : E) return B is
2850 pragma Assert (Is_Overloadable (Id));
2851 return Flag213 (Id);
2852 end Requires_Overriding;
2854 function Return_Present (Id : E) return B is
2859 function Return_Applies_To (Id : E) return N is
2862 end Return_Applies_To;
2864 function Returns_By_Ref (Id : E) return B is
2869 function Reverse_Bit_Order (Id : E) return B is
2871 pragma Assert (Is_Record_Type (Id));
2872 return Flag164 (Base_Type (Id));
2873 end Reverse_Bit_Order;
2875 function Reverse_Storage_Order (Id : E) return B is
2877 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2878 return Flag93 (Base_Type (Id));
2879 end Reverse_Storage_Order;
2881 function RM_Size (Id : E) return U is
2883 pragma Assert (Is_Type (Id));
2887 function Scalar_Range (Id : E) return N is
2892 function Scale_Value (Id : E) return U is
2897 function Scope_Depth_Value (Id : E) return U is
2900 end Scope_Depth_Value;
2902 function Sec_Stack_Needed_For_Return (Id : E) return B is
2904 return Flag167 (Id);
2905 end Sec_Stack_Needed_For_Return;
2907 function Shadow_Entities (Id : E) return S is
2909 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2911 end Shadow_Entities;
2913 function Shared_Var_Procs_Instance (Id : E) return E is
2915 pragma Assert (Ekind (Id) = E_Variable);
2917 end Shared_Var_Procs_Instance;
2919 function Size_Check_Code (Id : E) return N is
2921 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2923 end Size_Check_Code;
2925 function Size_Depends_On_Discriminant (Id : E) return B is
2927 return Flag177 (Id);
2928 end Size_Depends_On_Discriminant;
2930 function Size_Known_At_Compile_Time (Id : E) return B is
2933 end Size_Known_At_Compile_Time;
2935 function Small_Value (Id : E) return R is
2937 pragma Assert (Is_Fixed_Point_Type (Id));
2938 return Ureal21 (Id);
2941 function SPARK_Aux_Pragma (Id : E) return N is
2944 (Ekind_In (Id, E_Generic_Package, -- package variants
2948 end SPARK_Aux_Pragma;
2950 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2953 (Ekind_In (Id, E_Generic_Package, -- package variants
2956 return Flag266 (Id);
2957 end SPARK_Aux_Pragma_Inherited;
2959 function SPARK_Pragma (Id : E) return N is
2962 (Ekind_In (Id, E_Function, -- subprogram variants
2964 E_Generic_Procedure,
2968 Ekind_In (Id, E_Generic_Package, -- package variants
2974 function SPARK_Pragma_Inherited (Id : E) return B is
2977 (Ekind_In (Id, E_Function, -- subprogram variants
2979 E_Generic_Procedure,
2983 Ekind_In (Id, E_Generic_Package, -- package variants
2986 return Flag265 (Id);
2987 end SPARK_Pragma_Inherited;
2989 function Spec_Entity (Id : E) return E is
2991 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2995 function SSO_Set_High_By_Default (Id : E) return B is
2997 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2998 return Flag273 (Base_Type (Id));
2999 end SSO_Set_High_By_Default;
3001 function SSO_Set_Low_By_Default (Id : E) return B is
3003 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3004 return Flag272 (Base_Type (Id));
3005 end SSO_Set_Low_By_Default;
3007 function Static_Discrete_Predicate (Id : E) return S is
3009 pragma Assert (Is_Discrete_Type (Id));
3011 end Static_Discrete_Predicate;
3013 function Static_Real_Or_String_Predicate (Id : E) return N is
3015 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3017 end Static_Real_Or_String_Predicate;
3019 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3021 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3023 end Status_Flag_Or_Transient_Decl;
3025 function Storage_Size_Variable (Id : E) return E is
3027 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3028 return Node15 (Implementation_Base_Type (Id));
3029 end Storage_Size_Variable;
3031 function Static_Elaboration_Desired (Id : E) return B is
3033 pragma Assert (Ekind (Id) = E_Package);
3035 end Static_Elaboration_Desired;
3037 function Static_Initialization (Id : E) return N is
3040 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3042 end Static_Initialization;
3044 function Stored_Constraint (Id : E) return L is
3047 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3048 return Elist23 (Id);
3049 end Stored_Constraint;
3051 function Stores_Attribute_Old_Prefix (Id : E) return B is
3053 return Flag270 (Id);
3054 end Stores_Attribute_Old_Prefix;
3056 function Strict_Alignment (Id : E) return B is
3058 return Flag145 (Implementation_Base_Type (Id));
3059 end Strict_Alignment;
3061 function String_Literal_Length (Id : E) return U is
3064 end String_Literal_Length;
3066 function String_Literal_Low_Bound (Id : E) return N is
3069 end String_Literal_Low_Bound;
3071 function Subprograms_For_Type (Id : E) return E is
3073 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3075 end Subprograms_For_Type;
3077 function Suppress_Elaboration_Warnings (Id : E) return B is
3079 return Flag148 (Id);
3080 end Suppress_Elaboration_Warnings;
3082 function Suppress_Initialization (Id : E) return B is
3084 pragma Assert (Is_Type (Id));
3085 return Flag105 (Id);
3086 end Suppress_Initialization;
3088 function Suppress_Style_Checks (Id : E) return B is
3090 return Flag165 (Id);
3091 end Suppress_Style_Checks;
3093 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3095 return Flag217 (Id);
3096 end Suppress_Value_Tracking_On_Call;
3098 function Task_Body_Procedure (Id : E) return N is
3100 pragma Assert (Ekind (Id) in Task_Kind);
3102 end Task_Body_Procedure;
3104 function Thunk_Entity (Id : E) return E is
3106 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3107 and then Is_Thunk (Id));
3111 function Treat_As_Volatile (Id : E) return B is
3114 end Treat_As_Volatile;
3116 function Underlying_Full_View (Id : E) return E is
3118 pragma Assert (Ekind (Id) in Private_Kind);
3120 end Underlying_Full_View;
3122 function Underlying_Record_View (Id : E) return E is
3125 end Underlying_Record_View;
3127 function Universal_Aliasing (Id : E) return B is
3129 pragma Assert (Is_Type (Id));
3130 return Flag216 (Implementation_Base_Type (Id));
3131 end Universal_Aliasing;
3133 function Unset_Reference (Id : E) return N is
3136 end Unset_Reference;
3138 function Used_As_Generic_Actual (Id : E) return B is
3140 return Flag222 (Id);
3141 end Used_As_Generic_Actual;
3143 function Uses_Lock_Free (Id : E) return B is
3145 pragma Assert (Is_Protected_Type (Id));
3146 return Flag188 (Id);
3149 function Uses_Sec_Stack (Id : E) return B is
3154 function Warnings_Off (Id : E) return B is
3159 function Warnings_Off_Used (Id : E) return B is
3161 return Flag236 (Id);
3162 end Warnings_Off_Used;
3164 function Warnings_Off_Used_Unmodified (Id : E) return B is
3166 return Flag237 (Id);
3167 end Warnings_Off_Used_Unmodified;
3169 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3171 return Flag238 (Id);
3172 end Warnings_Off_Used_Unreferenced;
3174 function Wrapped_Entity (Id : E) return E is
3176 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3177 and then Is_Primitive_Wrapper (Id));
3181 function Was_Hidden (Id : E) return B is
3183 return Flag196 (Id);
3186 ------------------------------
3187 -- Classification Functions --
3188 ------------------------------
3190 function Is_Access_Type (Id : E) return B is
3192 return Ekind (Id) in Access_Kind;
3195 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3197 return Ekind (Id) in Access_Protected_Kind;
3198 end Is_Access_Protected_Subprogram_Type;
3200 function Is_Access_Subprogram_Type (Id : E) return B is
3202 return Ekind (Id) in Access_Subprogram_Kind;
3203 end Is_Access_Subprogram_Type;
3205 function Is_Aggregate_Type (Id : E) return B is
3207 return Ekind (Id) in Aggregate_Kind;
3208 end Is_Aggregate_Type;
3210 function Is_Array_Type (Id : E) return B is
3212 return Ekind (Id) in Array_Kind;
3215 function Is_Assignable (Id : E) return B is
3217 return Ekind (Id) in Assignable_Kind;
3220 function Is_Class_Wide_Type (Id : E) return B is
3222 return Ekind (Id) in Class_Wide_Kind;
3223 end Is_Class_Wide_Type;
3225 function Is_Composite_Type (Id : E) return B is
3227 return Ekind (Id) in Composite_Kind;
3228 end Is_Composite_Type;
3230 function Is_Concurrent_Body (Id : E) return B is
3232 return Ekind (Id) in
3233 Concurrent_Body_Kind;
3234 end Is_Concurrent_Body;
3236 function Is_Concurrent_Record_Type (Id : E) return B is
3239 end Is_Concurrent_Record_Type;
3241 function Is_Concurrent_Type (Id : E) return B is
3243 return Ekind (Id) in Concurrent_Kind;
3244 end Is_Concurrent_Type;
3246 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3248 return Ekind (Id) in
3249 Decimal_Fixed_Point_Kind;
3250 end Is_Decimal_Fixed_Point_Type;
3252 function Is_Digits_Type (Id : E) return B is
3254 return Ekind (Id) in Digits_Kind;
3257 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3259 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3260 end Is_Discrete_Or_Fixed_Point_Type;
3262 function Is_Discrete_Type (Id : E) return B is
3264 return Ekind (Id) in Discrete_Kind;
3265 end Is_Discrete_Type;
3267 function Is_Elementary_Type (Id : E) return B is
3269 return Ekind (Id) in Elementary_Kind;
3270 end Is_Elementary_Type;
3272 function Is_Entry (Id : E) return B is
3274 return Ekind (Id) in Entry_Kind;
3277 function Is_Enumeration_Type (Id : E) return B is
3279 return Ekind (Id) in
3281 end Is_Enumeration_Type;
3283 function Is_Fixed_Point_Type (Id : E) return B is
3285 return Ekind (Id) in
3287 end Is_Fixed_Point_Type;
3289 function Is_Floating_Point_Type (Id : E) return B is
3291 return Ekind (Id) in Float_Kind;
3292 end Is_Floating_Point_Type;
3294 function Is_Formal (Id : E) return B is
3296 return Ekind (Id) in Formal_Kind;
3299 function Is_Formal_Object (Id : E) return B is
3301 return Ekind (Id) in Formal_Object_Kind;
3302 end Is_Formal_Object;
3304 function Is_Generic_Subprogram (Id : E) return B is
3306 return Ekind (Id) in Generic_Subprogram_Kind;
3307 end Is_Generic_Subprogram;
3309 function Is_Generic_Unit (Id : E) return B is
3311 return Ekind (Id) in Generic_Unit_Kind;
3312 end Is_Generic_Unit;
3314 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3316 return Ekind (Id) in
3317 Incomplete_Or_Private_Kind;
3318 end Is_Incomplete_Or_Private_Type;
3320 function Is_Incomplete_Type (Id : E) return B is
3322 return Ekind (Id) in
3324 end Is_Incomplete_Type;
3326 function Is_Integer_Type (Id : E) return B is
3328 return Ekind (Id) in Integer_Kind;
3329 end Is_Integer_Type;
3331 function Is_Modular_Integer_Type (Id : E) return B is
3333 return Ekind (Id) in
3334 Modular_Integer_Kind;
3335 end Is_Modular_Integer_Type;
3337 function Is_Named_Number (Id : E) return B is
3339 return Ekind (Id) in Named_Kind;
3340 end Is_Named_Number;
3342 function Is_Numeric_Type (Id : E) return B is
3344 return Ekind (Id) in Numeric_Kind;
3345 end Is_Numeric_Type;
3347 function Is_Object (Id : E) return B is
3349 return Ekind (Id) in Object_Kind;
3352 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3354 return Ekind (Id) in
3355 Ordinary_Fixed_Point_Kind;
3356 end Is_Ordinary_Fixed_Point_Type;
3358 function Is_Overloadable (Id : E) return B is
3360 return Ekind (Id) in Overloadable_Kind;
3361 end Is_Overloadable;
3363 function Is_Private_Type (Id : E) return B is
3365 return Ekind (Id) in Private_Kind;
3366 end Is_Private_Type;
3368 function Is_Protected_Type (Id : E) return B is
3370 return Ekind (Id) in Protected_Kind;
3371 end Is_Protected_Type;
3373 function Is_Real_Type (Id : E) return B is
3375 return Ekind (Id) in Real_Kind;
3378 function Is_Record_Type (Id : E) return B is
3380 return Ekind (Id) in Record_Kind;
3383 function Is_Scalar_Type (Id : E) return B is
3385 return Ekind (Id) in Scalar_Kind;
3388 function Is_Signed_Integer_Type (Id : E) return B is
3390 return Ekind (Id) in Signed_Integer_Kind;
3391 end Is_Signed_Integer_Type;
3393 function Is_Subprogram (Id : E) return B is
3395 return Ekind (Id) in Subprogram_Kind;
3398 function Is_Task_Type (Id : E) return B is
3400 return Ekind (Id) in Task_Kind;
3403 function Is_Type (Id : E) return B is
3405 return Ekind (Id) in Type_Kind;
3408 ------------------------------
3409 -- Attribute Set Procedures --
3410 ------------------------------
3412 -- Note: in many of these set procedures an "obvious" assertion is missing.
3413 -- The reason for this is that in many cases, a field is set before the
3414 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3415 -- it is possible to add assertions that specifically include the E_Void
3416 -- possibility, but in some cases, we just omit the assertions.
3418 procedure Set_Abstract_States (Id : E; V : L) is
3420 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3421 Set_Elist25 (Id, V);
3422 end Set_Abstract_States;
3424 procedure Set_Accept_Address (Id : E; V : L) is
3426 Set_Elist21 (Id, V);
3427 end Set_Accept_Address;
3429 procedure Set_Access_Disp_Table (Id : E; V : L) is
3431 pragma Assert (Ekind (Id) = E_Record_Type
3432 and then Id = Implementation_Base_Type (Id));
3433 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3434 Set_Elist16 (Id, V);
3435 end Set_Access_Disp_Table;
3437 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3440 end Set_Associated_Formal_Package;
3442 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3445 end Set_Associated_Node_For_Itype;
3447 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3449 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3451 end Set_Associated_Storage_Pool;
3453 procedure Set_Actual_Subtype (Id : E; V : E) is
3456 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3457 or else Is_Formal (Id));
3459 end Set_Actual_Subtype;
3461 procedure Set_Address_Taken (Id : E; V : B := True) is
3463 Set_Flag104 (Id, V);
3464 end Set_Address_Taken;
3466 procedure Set_Alias (Id : E; V : E) is
3469 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3473 procedure Set_Alignment (Id : E; V : U) is
3475 pragma Assert (Is_Type (Id)
3476 or else Is_Formal (Id)
3477 or else Ekind_In (Id, E_Loop_Parameter,
3484 procedure Set_Barrier_Function (Id : E; V : N) is
3486 pragma Assert (Is_Entry (Id));
3488 end Set_Barrier_Function;
3490 procedure Set_Block_Node (Id : E; V : N) is
3492 pragma Assert (Ekind (Id) = E_Block);
3496 procedure Set_Body_Entity (Id : E; V : E) is
3498 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3500 end Set_Body_Entity;
3502 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3505 (Ekind (Id) = E_Package
3506 or else Is_Subprogram (Id)
3507 or else Is_Generic_Unit (Id));
3509 end Set_Body_Needed_For_SAL;
3511 procedure Set_Body_References (Id : E; V : L) is
3513 pragma Assert (Ekind (Id) = E_Abstract_State);
3514 Set_Elist16 (Id, V);
3515 end Set_Body_References;
3517 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3519 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3521 end Set_BIP_Initialization_Call;
3523 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3525 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3526 Set_Flag125 (Id, V);
3527 end Set_C_Pass_By_Copy;
3529 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3532 end Set_Can_Never_Be_Null;
3534 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3537 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3538 Set_Flag229 (Id, V);
3539 end Set_Can_Use_Internal_Rep;
3541 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3544 end Set_Checks_May_Be_Suppressed;
3546 procedure Set_Class_Wide_Type (Id : E; V : E) is
3548 pragma Assert (Is_Type (Id));
3550 end Set_Class_Wide_Type;
3552 procedure Set_Cloned_Subtype (Id : E; V : E) is
3554 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3556 end Set_Cloned_Subtype;
3558 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3560 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3562 end Set_Component_Bit_Offset;
3564 procedure Set_Component_Clause (Id : E; V : N) is
3566 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3568 end Set_Component_Clause;
3570 procedure Set_Component_Size (Id : E; V : U) is
3572 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3574 end Set_Component_Size;
3576 procedure Set_Component_Type (Id : E; V : E) is
3578 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3580 end Set_Component_Type;
3582 procedure Set_Contract (Id : E; V : N) is
3585 (Ekind_In (Id, E_Entry,
3593 or else Is_Generic_Subprogram (Id)
3594 or else Is_Subprogram (Id));
3598 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3601 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3603 end Set_Corresponding_Concurrent_Type;
3605 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3607 pragma Assert (Ekind (Id) = E_Discriminant);
3609 end Set_Corresponding_Discriminant;
3611 procedure Set_Corresponding_Equality (Id : E; V : E) is
3614 (Ekind (Id) = E_Function
3615 and then not Comes_From_Source (Id)
3616 and then Chars (Id) = Name_Op_Ne);
3618 end Set_Corresponding_Equality;
3620 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3622 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3624 end Set_Corresponding_Protected_Entry;
3626 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3628 pragma Assert (Is_Concurrent_Type (Id));
3630 end Set_Corresponding_Record_Type;
3632 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3635 end Set_Corresponding_Remote_Type;
3637 procedure Set_Current_Use_Clause (Id : E; V : E) is
3639 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3641 end Set_Current_Use_Clause;
3643 procedure Set_Current_Value (Id : E; V : N) is
3645 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3647 end Set_Current_Value;
3649 procedure Set_CR_Discriminant (Id : E; V : E) is
3652 end Set_CR_Discriminant;
3654 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3656 Set_Flag166 (Id, V);
3657 end Set_Debug_Info_Off;
3659 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3662 end Set_Debug_Renaming_Link;
3664 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3666 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3668 end Set_Default_Aspect_Component_Value;
3670 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3672 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3674 end Set_Default_Aspect_Value;
3676 procedure Set_Default_Expr_Function (Id : E; V : E) is
3678 pragma Assert (Is_Formal (Id));
3680 end Set_Default_Expr_Function;
3682 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3684 Set_Flag108 (Id, V);
3685 end Set_Default_Expressions_Processed;
3687 procedure Set_Default_Value (Id : E; V : N) is
3689 pragma Assert (Is_Formal (Id));
3691 end Set_Default_Value;
3693 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3697 or else Is_Task_Type (Id)
3698 or else Ekind (Id) = E_Block);
3699 Set_Flag114 (Id, V);
3700 end Set_Delay_Cleanups;
3702 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3705 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3708 end Set_Delay_Subprogram_Descriptors;
3710 procedure Set_Delta_Value (Id : E; V : R) is
3712 pragma Assert (Is_Fixed_Point_Type (Id));
3713 Set_Ureal18 (Id, V);
3714 end Set_Delta_Value;
3716 procedure Set_Dependent_Instances (Id : E; V : L) is
3718 pragma Assert (Is_Generic_Instance (Id));
3720 end Set_Dependent_Instances;
3722 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3724 pragma Assert (Nkind (Id) in N_Entity);
3726 end Set_Depends_On_Private;
3728 procedure Set_Derived_Type_Link (Id : E; V : E) is
3730 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3732 end Set_Derived_Type_Link;
3734 procedure Set_Digits_Value (Id : E; V : U) is
3737 (Is_Floating_Point_Type (Id)
3738 or else Is_Decimal_Fixed_Point_Type (Id));
3740 end Set_Digits_Value;
3742 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3745 end Set_Directly_Designated_Type;
3747 procedure Set_Discard_Names (Id : E; V : B := True) is
3750 end Set_Discard_Names;
3752 procedure Set_Discriminal (Id : E; V : E) is
3754 pragma Assert (Ekind (Id) = E_Discriminant);
3756 end Set_Discriminal;
3758 procedure Set_Discriminal_Link (Id : E; V : E) is
3761 end Set_Discriminal_Link;
3763 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3765 pragma Assert (Ekind (Id) = E_Component);
3767 end Set_Discriminant_Checking_Func;
3769 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3771 pragma Assert (Nkind (Id) in N_Entity);
3772 Set_Elist21 (Id, V);
3773 end Set_Discriminant_Constraint;
3775 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3778 end Set_Discriminant_Default_Value;
3780 procedure Set_Discriminant_Number (Id : E; V : U) is
3783 end Set_Discriminant_Number;
3785 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3787 pragma Assert (Ekind (Id) = E_Record_Type
3788 and then Id = Implementation_Base_Type (Id));
3789 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3790 Set_Elist26 (Id, V);
3791 end Set_Dispatch_Table_Wrappers;
3793 procedure Set_DT_Entry_Count (Id : E; V : U) is
3795 pragma Assert (Ekind (Id) = E_Component);
3797 end Set_DT_Entry_Count;
3799 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3801 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3803 end Set_DT_Offset_To_Top_Func;
3805 procedure Set_DT_Position (Id : E; V : U) is
3807 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3809 end Set_DT_Position;
3811 procedure Set_DTC_Entity (Id : E; V : E) is
3813 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3817 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3819 pragma Assert (Ekind (Id) = E_Package);
3820 Set_Flag210 (Id, V);
3821 end Set_Elaborate_Body_Desirable;
3823 procedure Set_Elaboration_Entity (Id : E; V : E) is
3828 Ekind (Id) = E_Package
3830 Is_Generic_Unit (Id));
3832 end Set_Elaboration_Entity;
3834 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3839 Ekind (Id) = E_Package
3841 Is_Generic_Unit (Id));
3842 Set_Flag174 (Id, V);
3843 end Set_Elaboration_Entity_Required;
3845 procedure Set_Encapsulating_State (Id : E; V : E) is
3847 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3849 end Set_Encapsulating_State;
3851 procedure Set_Enclosing_Scope (Id : E; V : E) is
3854 end Set_Enclosing_Scope;
3856 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3858 pragma Assert (Is_Entry (Id));
3859 Set_Flag152 (Id, V);
3860 end Set_Entry_Accepted;
3862 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3865 end Set_Entry_Bodies_Array;
3867 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3870 end Set_Entry_Cancel_Parameter;
3872 procedure Set_Entry_Component (Id : E; V : E) is
3875 end Set_Entry_Component;
3877 procedure Set_Entry_Formal (Id : E; V : E) is
3880 end Set_Entry_Formal;
3882 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3884 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3886 end Set_Entry_Index_Constant;
3888 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3891 end Set_Entry_Parameters_Type;
3893 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3895 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3897 end Set_Enum_Pos_To_Rep;
3899 procedure Set_Enumeration_Pos (Id : E; V : U) is
3901 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3903 end Set_Enumeration_Pos;
3905 procedure Set_Enumeration_Rep (Id : E; V : U) is
3907 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3909 end Set_Enumeration_Rep;
3911 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3913 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3915 end Set_Enumeration_Rep_Expr;
3917 procedure Set_Equivalent_Type (Id : E; V : E) is
3920 (Ekind_In (Id, E_Class_Wide_Type,
3921 E_Class_Wide_Subtype,
3922 E_Access_Protected_Subprogram_Type,
3923 E_Anonymous_Access_Protected_Subprogram_Type,
3924 E_Access_Subprogram_Type,
3927 end Set_Equivalent_Type;
3929 procedure Set_Esize (Id : E; V : U) is
3934 procedure Set_Exception_Code (Id : E; V : U) is
3936 pragma Assert (Ekind (Id) = E_Exception);
3938 end Set_Exception_Code;
3940 procedure Set_Extra_Accessibility (Id : E; V : E) is
3943 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3945 end Set_Extra_Accessibility;
3947 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3949 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3951 end Set_Extra_Accessibility_Of_Result;
3953 procedure Set_Extra_Constrained (Id : E; V : E) is
3955 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3957 end Set_Extra_Constrained;
3959 procedure Set_Extra_Formal (Id : E; V : E) is
3962 end Set_Extra_Formal;
3964 procedure Set_Extra_Formals (Id : E; V : E) is
3967 (Is_Overloadable (Id)
3968 or else Ekind_In (Id, E_Entry_Family,
3970 E_Subprogram_Type));
3972 end Set_Extra_Formals;
3974 procedure Set_Finalization_Master (Id : E; V : E) is
3976 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3978 end Set_Finalization_Master;
3980 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3982 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3983 Set_Flag158 (Id, V);
3984 end Set_Finalize_Storage_Only;
3986 procedure Set_Finalizer (Id : E; V : E) is
3988 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3992 procedure Set_First_Entity (Id : E; V : E) is
3995 end Set_First_Entity;
3997 procedure Set_First_Exit_Statement (Id : E; V : N) is
3999 pragma Assert (Ekind (Id) = E_Loop);
4001 end Set_First_Exit_Statement;
4003 procedure Set_First_Index (Id : E; V : N) is
4005 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4007 end Set_First_Index;
4009 procedure Set_First_Literal (Id : E; V : E) is
4011 pragma Assert (Is_Enumeration_Type (Id));
4013 end Set_First_Literal;
4015 procedure Set_First_Optional_Parameter (Id : E; V : E) is
4017 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4019 end Set_First_Optional_Parameter;
4021 procedure Set_First_Private_Entity (Id : E; V : E) is
4023 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4024 or else Ekind (Id) in Concurrent_Kind);
4026 end Set_First_Private_Entity;
4028 procedure Set_First_Rep_Item (Id : E; V : N) is
4031 end Set_First_Rep_Item;
4033 procedure Set_Float_Rep (Id : E; V : F) is
4034 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4036 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4039 procedure Set_Freeze_Node (Id : E; V : N) is
4042 end Set_Freeze_Node;
4044 procedure Set_From_Limited_With (Id : E; V : B := True) is
4047 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4048 Set_Flag159 (Id, V);
4049 end Set_From_Limited_With;
4051 procedure Set_Full_View (Id : E; V : E) is
4053 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4057 procedure Set_Generic_Homonym (Id : E; V : E) is
4060 end Set_Generic_Homonym;
4062 procedure Set_Generic_Renamings (Id : E; V : L) is
4064 Set_Elist23 (Id, V);
4065 end Set_Generic_Renamings;
4067 procedure Set_Handler_Records (Id : E; V : S) is
4070 end Set_Handler_Records;
4072 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4074 pragma Assert (Id = Base_Type (Id));
4075 Set_Flag135 (Id, V);
4076 end Set_Has_Aliased_Components;
4078 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4081 end Set_Has_Alignment_Clause;
4083 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4086 end Set_Has_All_Calls_Remote;
4088 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4091 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4092 Set_Flag253 (Id, V);
4093 end Set_Has_Anonymous_Master;
4095 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4097 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4099 end Set_Has_Atomic_Components;
4101 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4104 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4105 Set_Flag139 (Id, V);
4106 end Set_Has_Biased_Representation;
4108 procedure Set_Has_Completion (Id : E; V : B := True) is
4111 end Set_Has_Completion;
4113 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4115 pragma Assert (Is_Type (Id));
4117 end Set_Has_Completion_In_Body;
4119 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4121 pragma Assert (Ekind (Id) = E_Record_Type);
4122 Set_Flag140 (Id, V);
4123 end Set_Has_Complex_Representation;
4125 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4127 pragma Assert (Ekind (Id) = E_Array_Type);
4129 end Set_Has_Component_Size_Clause;
4131 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4133 pragma Assert (Is_Type (Id));
4134 Set_Flag187 (Id, V);
4135 end Set_Has_Constrained_Partial_View;
4137 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4139 Set_Flag181 (Id, V);
4140 end Set_Has_Contiguous_Rep;
4142 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4144 pragma Assert (Id = Base_Type (Id));
4146 end Set_Has_Controlled_Component;
4148 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4151 end Set_Has_Controlling_Result;
4153 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4155 Set_Flag119 (Id, V);
4156 end Set_Has_Convention_Pragma;
4158 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4161 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4162 and then Is_Base_Type (Id));
4164 end Set_Has_Default_Aspect;
4166 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4168 pragma Assert (Nkind (Id) in N_Entity);
4169 Set_Flag200 (Id, V);
4170 end Set_Has_Delayed_Aspects;
4172 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4174 pragma Assert (Nkind (Id) in N_Entity);
4176 end Set_Has_Delayed_Freeze;
4178 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4180 pragma Assert (Nkind (Id) in N_Entity);
4181 Set_Flag261 (Id, V);
4182 end Set_Has_Delayed_Rep_Aspects;
4184 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4186 pragma Assert (Nkind (Id) in N_Entity);
4188 end Set_Has_Discriminants;
4190 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4192 pragma Assert (Ekind (Id) = E_Record_Type
4193 and then Is_Tagged_Type (Id));
4194 Set_Flag220 (Id, V);
4195 end Set_Has_Dispatch_Table;
4197 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4199 pragma Assert (Is_Type (Id));
4200 Set_Flag258 (Id, V);
4201 end Set_Has_Dynamic_Predicate_Aspect;
4203 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4205 pragma Assert (Is_Enumeration_Type (Id));
4207 end Set_Has_Enumeration_Rep_Clause;
4209 procedure Set_Has_Exit (Id : E; V : B := True) is
4214 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4216 Set_Flag175 (Id, V);
4217 end Set_Has_Forward_Instantiation;
4219 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4221 Set_Flag173 (Id, V);
4222 end Set_Has_Fully_Qualified_Name;
4224 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4227 end Set_Has_Gigi_Rep_Item;
4229 procedure Set_Has_Homonym (Id : E; V : B := True) is
4232 end Set_Has_Homonym;
4234 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4236 Set_Flag251 (Id, V);
4237 end Set_Has_Implicit_Dereference;
4239 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4241 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4242 and then Is_Base_Type (Id));
4244 end Set_Has_Independent_Components;
4246 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4248 pragma Assert (Is_Type (Id));
4249 Set_Flag248 (Id, V);
4250 end Set_Has_Inheritable_Invariants;
4252 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4254 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4255 Set_Flag219 (Id, V);
4256 end Set_Has_Initial_Value;
4258 procedure Set_Has_Invariants (Id : E; V : B := True) is
4260 pragma Assert (Is_Type (Id));
4261 Set_Flag232 (Id, V);
4262 end Set_Has_Invariants;
4264 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4266 pragma Assert (Ekind (Id) = E_Loop);
4267 Set_Flag260 (Id, V);
4268 end Set_Has_Loop_Entry_Attributes;
4270 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4272 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4274 end Set_Has_Machine_Radix_Clause;
4276 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4279 end Set_Has_Master_Entity;
4281 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4283 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4284 Set_Flag142 (Id, V);
4285 end Set_Has_Missing_Return;
4287 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4289 Set_Flag101 (Id, V);
4290 end Set_Has_Nested_Block_With_Handler;
4292 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4294 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4295 Set_Flag215 (Id, V);
4296 end Set_Has_Up_Level_Access;
4298 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4300 pragma Assert (Id = Base_Type (Id));
4302 end Set_Has_Non_Standard_Rep;
4304 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4306 pragma Assert (Is_Type (Id));
4307 Set_Flag172 (Id, V);
4308 end Set_Has_Object_Size_Clause;
4310 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4312 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4313 Set_Flag110 (Id, V);
4314 end Set_Has_Out_Or_In_Out_Parameter;
4316 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4318 Set_Flag154 (Id, V);
4319 end Set_Has_Per_Object_Constraint;
4321 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4323 pragma Assert (Is_Subprogram (Id));
4324 Set_Flag240 (Id, V);
4325 end Set_Has_Postconditions;
4327 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4329 pragma Assert (Is_Access_Type (Id));
4330 Set_Flag27 (Base_Type (Id), V);
4331 end Set_Has_Pragma_Controlled;
4333 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4335 Set_Flag150 (Id, V);
4336 end Set_Has_Pragma_Elaborate_Body;
4338 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4340 Set_Flag157 (Id, V);
4341 end Set_Has_Pragma_Inline;
4343 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4345 Set_Flag230 (Id, V);
4346 end Set_Has_Pragma_Inline_Always;
4348 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4350 Set_Flag201 (Id, V);
4351 end Set_Has_Pragma_No_Inline;
4353 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4355 pragma Assert (Is_Enumeration_Type (Id));
4356 pragma Assert (Id = Base_Type (Id));
4357 Set_Flag198 (Id, V);
4358 end Set_Has_Pragma_Ordered;
4360 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4362 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4363 pragma Assert (Id = Base_Type (Id));
4364 Set_Flag121 (Id, V);
4365 end Set_Has_Pragma_Pack;
4367 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4369 Set_Flag221 (Id, V);
4370 end Set_Has_Pragma_Preelab_Init;
4372 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4374 Set_Flag203 (Id, V);
4375 end Set_Has_Pragma_Pure;
4377 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4379 Set_Flag179 (Id, V);
4380 end Set_Has_Pragma_Pure_Function;
4382 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4384 Set_Flag169 (Id, V);
4385 end Set_Has_Pragma_Thread_Local_Storage;
4387 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4389 Set_Flag233 (Id, V);
4390 end Set_Has_Pragma_Unmodified;
4392 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4394 Set_Flag180 (Id, V);
4395 end Set_Has_Pragma_Unreferenced;
4397 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4399 pragma Assert (Is_Type (Id));
4400 Set_Flag212 (Id, V);
4401 end Set_Has_Pragma_Unreferenced_Objects;
4403 procedure Set_Has_Predicates (Id : E; V : B := True) is
4405 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4406 Set_Flag250 (Id, V);
4407 end Set_Has_Predicates;
4409 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4411 pragma Assert (Id = Base_Type (Id));
4412 Set_Flag120 (Id, V);
4413 end Set_Has_Primitive_Operations;
4415 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4417 pragma Assert (Is_Type (Id));
4418 Set_Flag151 (Id, V);
4419 end Set_Has_Private_Ancestor;
4421 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4423 Set_Flag155 (Id, V);
4424 end Set_Has_Private_Declaration;
4426 procedure Set_Has_Protected (Id : E; V : B := True) is
4428 Set_Flag271 (Id, V);
4429 end Set_Has_Protected;
4431 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4433 Set_Flag161 (Id, V);
4434 end Set_Has_Qualified_Name;
4436 procedure Set_Has_RACW (Id : E; V : B := True) is
4438 pragma Assert (Ekind (Id) = E_Package);
4439 Set_Flag214 (Id, V);
4442 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4444 pragma Assert (Id = Base_Type (Id));
4446 end Set_Has_Record_Rep_Clause;
4448 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4450 pragma Assert (Is_Subprogram (Id));
4451 Set_Flag143 (Id, V);
4452 end Set_Has_Recursive_Call;
4454 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4456 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4457 Set_Flag267 (Id, V);
4458 end Set_Has_Shift_Operator;
4460 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4463 end Set_Has_Size_Clause;
4465 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4468 end Set_Has_Small_Clause;
4470 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4472 pragma Assert (Id = Base_Type (Id));
4473 Set_Flag100 (Id, V);
4474 end Set_Has_Specified_Layout;
4476 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4478 pragma Assert (Is_Type (Id));
4479 Set_Flag190 (Id, V);
4480 end Set_Has_Specified_Stream_Input;
4482 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4484 pragma Assert (Is_Type (Id));
4485 Set_Flag191 (Id, V);
4486 end Set_Has_Specified_Stream_Output;
4488 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4490 pragma Assert (Is_Type (Id));
4491 Set_Flag192 (Id, V);
4492 end Set_Has_Specified_Stream_Read;
4494 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4496 pragma Assert (Is_Type (Id));
4497 Set_Flag193 (Id, V);
4498 end Set_Has_Specified_Stream_Write;
4500 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4502 Set_Flag211 (Id, V);
4503 end Set_Has_Static_Discriminants;
4505 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4507 pragma Assert (Is_Type (Id));
4508 Set_Flag269 (Id, V);
4509 end Set_Has_Static_Predicate;
4511 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4513 pragma Assert (Is_Type (Id));
4514 Set_Flag259 (Id, V);
4515 end Set_Has_Static_Predicate_Aspect;
4517 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4519 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4520 pragma Assert (Id = Base_Type (Id));
4522 end Set_Has_Storage_Size_Clause;
4524 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4526 pragma Assert (Is_Elementary_Type (Id));
4527 Set_Flag184 (Id, V);
4528 end Set_Has_Stream_Size_Clause;
4530 procedure Set_Has_Task (Id : E; V : B := True) is
4532 pragma Assert (Id = Base_Type (Id));
4536 procedure Set_Has_Thunks (Id : E; V : B := True) is
4538 pragma Assert (Is_Tag (Id));
4539 Set_Flag228 (Id, V);
4542 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4544 pragma Assert (Id = Base_Type (Id));
4545 Set_Flag123 (Id, V);
4546 end Set_Has_Unchecked_Union;
4548 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4550 pragma Assert (Is_Type (Id));
4552 end Set_Has_Unknown_Discriminants;
4554 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4556 pragma Assert (Ekind (Id) = E_Abstract_State);
4557 Set_Flag263 (Id, V);
4558 end Set_Has_Visible_Refinement;
4560 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4562 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4564 end Set_Has_Volatile_Components;
4566 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4568 Set_Flag182 (Id, V);
4569 end Set_Has_Xref_Entry;
4571 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4573 pragma Assert (Ekind (Id) = E_Variable);
4575 end Set_Hiding_Loop_Variable;
4577 procedure Set_Homonym (Id : E; V : E) is
4579 pragma Assert (Id /= V);
4583 procedure Set_Import_Pragma (Id : E; V : E) is
4585 pragma Assert (Is_Subprogram (Id));
4587 end Set_Import_Pragma;
4589 procedure Set_Interface_Alias (Id : E; V : E) is
4593 and then Is_Hidden (Id)
4594 and then (Ekind_In (Id, E_Procedure, E_Function)));
4596 end Set_Interface_Alias;
4598 procedure Set_Interfaces (Id : E; V : L) is
4600 pragma Assert (Is_Record_Type (Id));
4601 Set_Elist25 (Id, V);
4604 procedure Set_In_Package_Body (Id : E; V : B := True) is
4607 end Set_In_Package_Body;
4609 procedure Set_In_Private_Part (Id : E; V : B := True) is
4612 end Set_In_Private_Part;
4614 procedure Set_In_Use (Id : E; V : B := True) is
4616 pragma Assert (Nkind (Id) in N_Entity);
4620 procedure Set_Initialization_Statements (Id : E; V : N) is
4622 -- Tolerate an E_Void entity since this can be called while resolving
4623 -- an aggregate used as the initialization expression for an object
4624 -- declaration, and this occurs before the Ekind for the object is set.
4626 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4628 end Set_Initialization_Statements;
4630 procedure Set_Inner_Instances (Id : E; V : L) is
4632 Set_Elist23 (Id, V);
4633 end Set_Inner_Instances;
4635 procedure Set_Interface_Name (Id : E; V : N) is
4638 end Set_Interface_Name;
4640 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4642 pragma Assert (Is_Overloadable (Id));
4644 end Set_Is_Abstract_Subprogram;
4646 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4648 pragma Assert (Is_Type (Id));
4649 Set_Flag146 (Id, V);
4650 end Set_Is_Abstract_Type;
4652 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4654 pragma Assert (Is_Access_Type (Id));
4655 Set_Flag194 (Id, V);
4656 end Set_Is_Local_Anonymous_Access;
4658 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4660 pragma Assert (Is_Access_Type (Id));
4662 end Set_Is_Access_Constant;
4664 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4666 Set_Flag185 (Id, V);
4667 end Set_Is_Ada_2005_Only;
4669 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4671 Set_Flag199 (Id, V);
4672 end Set_Is_Ada_2012_Only;
4674 procedure Set_Is_Aliased (Id : E; V : B := True) is
4676 pragma Assert (Nkind (Id) in N_Entity);
4680 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4682 pragma Assert (Is_Entry (Id));
4683 Set_Flag132 (Id, V);
4684 end Set_Is_AST_Entry;
4686 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4689 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4691 end Set_Is_Asynchronous;
4693 procedure Set_Is_Atomic (Id : E; V : B := True) is
4698 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4700 pragma Assert ((not V)
4701 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4702 Set_Flag122 (Id, V);
4703 end Set_Is_Bit_Packed_Array;
4705 procedure Set_Is_Called (Id : E; V : B := True) is
4707 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4708 Set_Flag102 (Id, V);
4711 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4714 end Set_Is_Character_Type;
4716 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4719 end Set_Is_Child_Unit;
4721 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4724 end Set_Is_Class_Wide_Equivalent_Type;
4726 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4728 Set_Flag149 (Id, V);
4729 end Set_Is_Compilation_Unit;
4731 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4733 pragma Assert (Ekind (Id) = E_Discriminant);
4734 Set_Flag103 (Id, V);
4735 end Set_Is_Completely_Hidden;
4737 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4740 end Set_Is_Concurrent_Record_Type;
4742 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4745 end Set_Is_Constr_Subt_For_U_Nominal;
4747 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4749 Set_Flag141 (Id, V);
4750 end Set_Is_Constr_Subt_For_UN_Aliased;
4752 procedure Set_Is_Constrained (Id : E; V : B := True) is
4754 pragma Assert (Nkind (Id) in N_Entity);
4756 end Set_Is_Constrained;
4758 procedure Set_Is_Constructor (Id : E; V : B := True) is
4761 end Set_Is_Constructor;
4763 procedure Set_Is_Controlled (Id : E; V : B := True) is
4765 pragma Assert (Id = Base_Type (Id));
4767 end Set_Is_Controlled;
4769 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4771 pragma Assert (Is_Formal (Id));
4773 end Set_Is_Controlling_Formal;
4775 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4778 end Set_Is_CPP_Class;
4780 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4782 pragma Assert (Is_Type (Id));
4783 Set_Flag223 (Id, V);
4784 end Set_Is_Descendent_Of_Address;
4786 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4788 Set_Flag176 (Id, V);
4789 end Set_Is_Discrim_SO_Function;
4791 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4793 Set_Flag264 (Id, V);
4794 end Set_Is_Discriminant_Check_Function;
4796 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4798 Set_Flag234 (Id, V);
4799 end Set_Is_Dispatch_Table_Entity;
4801 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4806 Is_Overloadable (Id)
4808 Ekind (Id) = E_Subprogram_Type);
4811 end Set_Is_Dispatching_Operation;
4813 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4815 Set_Flag124 (Id, V);
4816 end Set_Is_Eliminated;
4818 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4821 end Set_Is_Entry_Formal;
4823 procedure Set_Is_Exported (Id : E; V : B := True) is
4826 end Set_Is_Exported;
4828 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4831 end Set_Is_First_Subtype;
4833 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4835 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4836 Set_Flag118 (Id, V);
4837 end Set_Is_For_Access_Subtype;
4839 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4841 Set_Flag111 (Id, V);
4842 end Set_Is_Formal_Subprogram;
4844 procedure Set_Is_Frozen (Id : E; V : B := True) is
4846 pragma Assert (Nkind (Id) in N_Entity);
4850 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4852 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4853 Set_Flag274 (Id, V);
4854 end Set_Is_Generic_Actual_Subprogram;
4856 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4858 pragma Assert (Is_Type (Id));
4860 end Set_Is_Generic_Actual_Type;
4862 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4864 Set_Flag130 (Id, V);
4865 end Set_Is_Generic_Instance;
4867 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4869 pragma Assert (Nkind (Id) in N_Entity);
4871 end Set_Is_Generic_Type;
4873 procedure Set_Is_Hidden (Id : E; V : B := True) is
4878 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4880 Set_Flag171 (Id, V);
4881 end Set_Is_Hidden_Open_Scope;
4883 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4885 pragma Assert (Nkind (Id) in N_Entity);
4887 end Set_Is_Immediately_Visible;
4889 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4891 Set_Flag254 (Id, V);
4892 end Set_Is_Implementation_Defined;
4894 procedure Set_Is_Imported (Id : E; V : B := True) is
4897 end Set_Is_Imported;
4899 procedure Set_Is_Independent (Id : E; V : B := True) is
4901 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4902 Set_Flag268 (Id, V);
4903 end Set_Is_Independent;
4905 procedure Set_Is_Inlined (Id : E; V : B := True) is
4910 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4912 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4914 end Set_Is_Inlined_Always;
4916 procedure Set_Is_Interface (Id : E; V : B := True) is
4918 pragma Assert (Is_Record_Type (Id));
4919 Set_Flag186 (Id, V);
4920 end Set_Is_Interface;
4922 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4924 Set_Flag126 (Id, V);
4925 end Set_Is_Instantiated;
4927 procedure Set_Is_Internal (Id : E; V : B := True) is
4929 pragma Assert (Nkind (Id) in N_Entity);
4931 end Set_Is_Internal;
4933 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4935 pragma Assert (Nkind (Id) in N_Entity);
4937 end Set_Is_Interrupt_Handler;
4939 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4942 end Set_Is_Intrinsic_Subprogram;
4944 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4946 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4947 Set_Flag257 (Id, V);
4948 end Set_Is_Invariant_Procedure;
4950 procedure Set_Is_Itype (Id : E; V : B := True) is
4955 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4958 end Set_Is_Known_Non_Null;
4960 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4962 Set_Flag204 (Id, V);
4963 end Set_Is_Known_Null;
4965 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4967 Set_Flag170 (Id, V);
4968 end Set_Is_Known_Valid;
4970 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4972 pragma Assert (Is_Type (Id));
4973 Set_Flag106 (Id, V);
4974 end Set_Is_Limited_Composite;
4976 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4978 pragma Assert (Is_Interface (Id));
4979 Set_Flag197 (Id, V);
4980 end Set_Is_Limited_Interface;
4982 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4985 end Set_Is_Limited_Record;
4987 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4989 pragma Assert (Is_Subprogram (Id));
4990 Set_Flag137 (Id, V);
4991 end Set_Is_Machine_Code_Subprogram;
4993 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4995 pragma Assert (Is_Type (Id));
4996 Set_Flag109 (Id, V);
4997 end Set_Is_Non_Static_Subtype;
4999 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5001 pragma Assert (Ekind (Id) = E_Procedure);
5002 Set_Flag178 (Id, V);
5003 end Set_Is_Null_Init_Proc;
5005 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5007 Set_Flag153 (Id, V);
5008 end Set_Is_Obsolescent;
5010 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5012 pragma Assert (Ekind (Id) = E_Out_Parameter);
5013 Set_Flag226 (Id, V);
5014 end Set_Is_Only_Out_Parameter;
5016 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
5018 pragma Assert (Is_Formal (Id));
5019 Set_Flag134 (Id, V);
5020 end Set_Is_Optional_Parameter;
5022 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5024 Set_Flag160 (Id, V);
5025 end Set_Is_Package_Body_Entity;
5027 procedure Set_Is_Packed (Id : E; V : B := True) is
5029 pragma Assert (Id = Base_Type (Id));
5033 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5035 Set_Flag138 (Id, V);
5036 end Set_Is_Packed_Array_Impl_Type;
5038 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5040 pragma Assert (Nkind (Id) in N_Entity);
5042 end Set_Is_Potentially_Use_Visible;
5044 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5046 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5047 Set_Flag255 (Id, V);
5048 end Set_Is_Predicate_Function;
5050 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5052 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5053 Set_Flag256 (Id, V);
5054 end Set_Is_Predicate_Function_M;
5056 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5059 end Set_Is_Preelaborated;
5061 procedure Set_Is_Primitive (Id : E; V : B := True) is
5064 (Is_Overloadable (Id)
5065 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5066 Set_Flag218 (Id, V);
5067 end Set_Is_Primitive;
5069 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5071 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5072 Set_Flag195 (Id, V);
5073 end Set_Is_Primitive_Wrapper;
5075 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5077 pragma Assert (Is_Type (Id));
5078 Set_Flag107 (Id, V);
5079 end Set_Is_Private_Composite;
5081 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5084 end Set_Is_Private_Descendant;
5086 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5088 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5089 Set_Flag245 (Id, V);
5090 end Set_Is_Private_Primitive;
5092 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5094 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5095 Set_Flag252 (Id, V);
5096 end Set_Is_Processed_Transient;
5098 procedure Set_Is_Public (Id : E; V : B := True) is
5100 pragma Assert (Nkind (Id) in N_Entity);
5104 procedure Set_Is_Pure (Id : E; V : B := True) is
5109 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5111 pragma Assert (Is_Access_Type (Id));
5112 Set_Flag189 (Id, V);
5113 end Set_Is_Pure_Unit_Access_Type;
5115 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5117 pragma Assert (Is_Type (Id));
5118 Set_Flag244 (Id, V);
5119 end Set_Is_RACW_Stub_Type;
5121 procedure Set_Is_Raised (Id : E; V : B := True) is
5123 pragma Assert (Ekind (Id) = E_Exception);
5124 Set_Flag224 (Id, V);
5127 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5130 end Set_Is_Remote_Call_Interface;
5132 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5135 end Set_Is_Remote_Types;
5137 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5139 Set_Flag112 (Id, V);
5140 end Set_Is_Renaming_Of_Object;
5142 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5144 Set_Flag209 (Id, V);
5145 end Set_Is_Return_Object;
5147 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5149 pragma Assert (Ekind (Id) = E_Variable);
5150 Set_Flag249 (Id, V);
5151 end Set_Is_Safe_To_Reevaluate;
5153 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5156 end Set_Is_Shared_Passive;
5158 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5162 or else Ekind_In (Id, E_Exception,
5167 end Set_Is_Statically_Allocated;
5169 procedure Set_Is_Tag (Id : E; V : B := True) is
5171 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5175 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5178 end Set_Is_Tagged_Type;
5180 procedure Set_Is_Thunk (Id : E; V : B := True) is
5182 pragma Assert (Is_Subprogram (Id));
5183 Set_Flag225 (Id, V);
5186 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5188 Set_Flag235 (Id, V);
5189 end Set_Is_Trivial_Subprogram;
5191 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5193 Set_Flag163 (Id, V);
5194 end Set_Is_True_Constant;
5196 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5198 pragma Assert (Id = Base_Type (Id));
5199 Set_Flag117 (Id, V);
5200 end Set_Is_Unchecked_Union;
5202 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5204 pragma Assert (Ekind (Id) = E_Record_Type);
5205 Set_Flag246 (Id, V);
5206 end Set_Is_Underlying_Record_View;
5208 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5210 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5211 Set_Flag144 (Id, V);
5212 end Set_Is_Unsigned_Type;
5214 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5216 pragma Assert (Ekind (Id) = E_Procedure);
5217 Set_Flag127 (Id, V);
5218 end Set_Is_Valued_Procedure;
5220 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5222 Set_Flag206 (Id, V);
5223 end Set_Is_Visible_Formal;
5225 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5227 Set_Flag116 (Id, V);
5228 end Set_Is_Visible_Lib_Unit;
5230 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5232 pragma Assert (Ekind (Id) = E_Exception);
5233 Set_Flag133 (Id, V);
5234 end Set_Is_VMS_Exception;
5236 procedure Set_Is_Volatile (Id : E; V : B := True) is
5238 pragma Assert (Nkind (Id) in N_Entity);
5240 end Set_Is_Volatile;
5242 procedure Set_Itype_Printed (Id : E; V : B := True) is
5244 pragma Assert (Is_Itype (Id));
5245 Set_Flag202 (Id, V);
5246 end Set_Itype_Printed;
5248 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5251 end Set_Kill_Elaboration_Checks;
5253 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5256 end Set_Kill_Range_Checks;
5258 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5260 pragma Assert (Is_Type (Id));
5261 Set_Flag207 (Id, V);
5262 end Set_Known_To_Have_Preelab_Init;
5264 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5266 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5268 end Set_Last_Aggregate_Assignment;
5270 procedure Set_Last_Assignment (Id : E; V : N) is
5272 pragma Assert (Is_Assignable (Id));
5274 end Set_Last_Assignment;
5276 procedure Set_Last_Entity (Id : E; V : E) is
5279 end Set_Last_Entity;
5281 procedure Set_Limited_View (Id : E; V : E) is
5283 pragma Assert (Ekind (Id) = E_Package);
5285 end Set_Limited_View;
5287 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5289 pragma Assert (Is_Type (Id)
5290 or else Ekind_In (Id, E_Constant, E_Variable)
5291 or else Is_Subprogram (Id));
5293 end Set_Linker_Section_Pragma;
5295 procedure Set_Lit_Indexes (Id : E; V : E) is
5297 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5299 end Set_Lit_Indexes;
5301 procedure Set_Lit_Strings (Id : E; V : E) is
5303 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5305 end Set_Lit_Strings;
5307 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5309 pragma Assert (Is_Formal (Id));
5310 Set_Flag205 (Id, V);
5311 end Set_Low_Bound_Tested;
5313 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5315 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5317 end Set_Machine_Radix_10;
5319 procedure Set_Master_Id (Id : E; V : E) is
5321 pragma Assert (Is_Access_Type (Id));
5325 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5327 Set_Flag168 (Id, V);
5328 end Set_Materialize_Entity;
5330 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5332 Set_Flag262 (Id, V);
5333 end Set_May_Inherit_Delayed_Rep_Aspects;
5335 procedure Set_Mechanism (Id : E; V : M) is
5337 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5338 Set_Uint8 (Id, UI_From_Int (V));
5341 procedure Set_Modulus (Id : E; V : U) is
5343 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5347 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5349 pragma Assert (Is_Type (Id));
5350 Set_Flag183 (Id, V);
5351 end Set_Must_Be_On_Byte_Boundary;
5353 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5355 pragma Assert (Is_Type (Id));
5356 Set_Flag208 (Id, V);
5357 end Set_Must_Have_Preelab_Init;
5359 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5361 Set_Flag147 (Id, V);
5362 end Set_Needs_Debug_Info;
5364 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5367 (Is_Overloadable (Id)
5368 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5370 end Set_Needs_No_Actuals;
5372 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5374 Set_Flag115 (Id, V);
5375 end Set_Never_Set_In_Source;
5377 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5380 end Set_Next_Inlined_Subprogram;
5382 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5384 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5385 Set_Flag131 (Id, V);
5386 end Set_No_Pool_Assigned;
5388 procedure Set_No_Return (Id : E; V : B := True) is
5391 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5392 Set_Flag113 (Id, V);
5395 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5397 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5398 Set_Flag136 (Id, V);
5399 end Set_No_Strict_Aliasing;
5401 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5403 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5405 end Set_Non_Binary_Modulus;
5407 procedure Set_Non_Limited_View (Id : E; V : E) is
5410 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5412 end Set_Non_Limited_View;
5414 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5417 (Root_Type (Id) = Standard_Boolean
5418 and then Ekind (Id) = E_Enumeration_Type);
5419 Set_Flag162 (Id, V);
5420 end Set_Nonzero_Is_True;
5422 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5424 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5426 end Set_Normalized_First_Bit;
5428 procedure Set_Normalized_Position (Id : E; V : U) is
5430 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5432 end Set_Normalized_Position;
5434 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5436 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5438 end Set_Normalized_Position_Max;
5440 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5442 pragma Assert (Ekind (Id) = E_Variable);
5443 Set_Flag247 (Id, V);
5444 end Set_OK_To_Rename;
5446 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5449 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5450 Set_Flag239 (Id, V);
5451 end Set_OK_To_Reorder_Components;
5453 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5456 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5457 Set_Flag241 (Id, V);
5458 end Set_Optimize_Alignment_Space;
5460 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5463 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5464 Set_Flag242 (Id, V);
5465 end Set_Optimize_Alignment_Time;
5467 procedure Set_Original_Access_Type (Id : E; V : E) is
5469 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5471 end Set_Original_Access_Type;
5473 procedure Set_Original_Array_Type (Id : E; V : E) is
5475 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5477 end Set_Original_Array_Type;
5479 procedure Set_Original_Record_Component (Id : E; V : E) is
5481 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5483 end Set_Original_Record_Component;
5485 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5487 Set_Flag243 (Id, V);
5488 end Set_Overlays_Constant;
5490 procedure Set_Overridden_Operation (Id : E; V : E) is
5493 end Set_Overridden_Operation;
5495 procedure Set_Package_Instantiation (Id : E; V : N) is
5497 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5499 end Set_Package_Instantiation;
5501 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5503 pragma Assert (Is_Array_Type (Id));
5505 end Set_Packed_Array_Impl_Type;
5507 procedure Set_Parent_Subtype (Id : E; V : E) is
5509 pragma Assert (Ekind (Id) = E_Record_Type);
5511 end Set_Parent_Subtype;
5513 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5515 pragma Assert (Ekind (Id) = E_Abstract_State);
5517 end Set_Part_Of_Constituents;
5519 procedure Set_Postcondition_Proc (Id : E; V : E) is
5521 pragma Assert (Ekind (Id) = E_Procedure);
5523 end Set_Postcondition_Proc;
5525 procedure Set_PPC_Wrapper (Id : E; V : E) is
5527 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5529 end Set_PPC_Wrapper;
5531 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5533 pragma Assert (Is_Tagged_Type (Id));
5534 Set_Elist10 (Id, V);
5535 end Set_Direct_Primitive_Operations;
5537 procedure Set_Prival (Id : E; V : E) is
5539 pragma Assert (Is_Protected_Component (Id));
5543 procedure Set_Prival_Link (Id : E; V : E) is
5545 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5547 end Set_Prival_Link;
5549 procedure Set_Private_Dependents (Id : E; V : L) is
5551 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5552 Set_Elist18 (Id, V);
5553 end Set_Private_Dependents;
5555 procedure Set_Private_View (Id : E; V : N) is
5557 pragma Assert (Is_Private_Type (Id));
5559 end Set_Private_View;
5561 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5563 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5565 end Set_Protected_Body_Subprogram;
5567 procedure Set_Protected_Formal (Id : E; V : E) is
5569 pragma Assert (Is_Formal (Id));
5571 end Set_Protected_Formal;
5573 procedure Set_Protection_Object (Id : E; V : E) is
5575 pragma Assert (Ekind_In (Id, E_Entry,
5580 end Set_Protection_Object;
5582 procedure Set_Reachable (Id : E; V : B := True) is
5587 procedure Set_Referenced (Id : E; V : B := True) is
5589 Set_Flag156 (Id, V);
5592 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5595 end Set_Referenced_As_LHS;
5597 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5599 Set_Flag227 (Id, V);
5600 end Set_Referenced_As_Out_Parameter;
5602 procedure Set_Refinement_Constituents (Id : E; V : L) is
5604 pragma Assert (Ekind (Id) = E_Abstract_State);
5606 end Set_Refinement_Constituents;
5608 procedure Set_Register_Exception_Call (Id : E; V : N) is
5610 pragma Assert (Ekind (Id) = E_Exception);
5612 end Set_Register_Exception_Call;
5614 procedure Set_Related_Array_Object (Id : E; V : E) is
5616 pragma Assert (Is_Array_Type (Id));
5618 end Set_Related_Array_Object;
5620 procedure Set_Related_Expression (Id : E; V : N) is
5622 pragma Assert (Ekind (Id) in Type_Kind
5623 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5625 end Set_Related_Expression;
5627 procedure Set_Related_Instance (Id : E; V : E) is
5629 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5631 end Set_Related_Instance;
5633 procedure Set_Related_Type (Id : E; V : E) is
5635 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5637 end Set_Related_Type;
5639 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5641 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5643 end Set_Relative_Deadline_Variable;
5645 procedure Set_Renamed_Entity (Id : E; V : N) is
5648 end Set_Renamed_Entity;
5650 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5652 pragma Assert (Ekind (Id) = E_Package);
5653 Set_Flag231 (Id, V);
5654 end Set_Renamed_In_Spec;
5656 procedure Set_Renamed_Object (Id : E; V : N) is
5659 end Set_Renamed_Object;
5661 procedure Set_Renaming_Map (Id : E; V : U) is
5664 end Set_Renaming_Map;
5666 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5668 pragma Assert (Is_Overloadable (Id));
5669 Set_Flag213 (Id, V);
5670 end Set_Requires_Overriding;
5672 procedure Set_Return_Present (Id : E; V : B := True) is
5675 end Set_Return_Present;
5677 procedure Set_Return_Applies_To (Id : E; V : N) is
5680 end Set_Return_Applies_To;
5682 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5685 end Set_Returns_By_Ref;
5687 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5690 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5691 Set_Flag164 (Id, V);
5692 end Set_Reverse_Bit_Order;
5694 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5698 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5700 end Set_Reverse_Storage_Order;
5702 procedure Set_RM_Size (Id : E; V : U) is
5704 pragma Assert (Is_Type (Id));
5708 procedure Set_Scalar_Range (Id : E; V : N) is
5711 end Set_Scalar_Range;
5713 procedure Set_Scale_Value (Id : E; V : U) is
5716 end Set_Scale_Value;
5718 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5720 pragma Assert (not Is_Record_Type (Id));
5722 end Set_Scope_Depth_Value;
5724 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5726 Set_Flag167 (Id, V);
5727 end Set_Sec_Stack_Needed_For_Return;
5729 procedure Set_Shadow_Entities (Id : E; V : S) is
5731 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5733 end Set_Shadow_Entities;
5735 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5737 pragma Assert (Ekind (Id) = E_Variable);
5739 end Set_Shared_Var_Procs_Instance;
5741 procedure Set_Size_Check_Code (Id : E; V : N) is
5743 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5745 end Set_Size_Check_Code;
5747 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5749 Set_Flag177 (Id, V);
5750 end Set_Size_Depends_On_Discriminant;
5752 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5755 end Set_Size_Known_At_Compile_Time;
5757 procedure Set_Small_Value (Id : E; V : R) is
5759 pragma Assert (Is_Fixed_Point_Type (Id));
5760 Set_Ureal21 (Id, V);
5761 end Set_Small_Value;
5763 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5766 (Ekind_In (Id, E_Generic_Package, -- package variants
5771 end Set_SPARK_Aux_Pragma;
5773 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5776 (Ekind_In (Id, E_Generic_Package, -- package variants
5780 Set_Flag266 (Id, V);
5781 end Set_SPARK_Aux_Pragma_Inherited;
5783 procedure Set_SPARK_Pragma (Id : E; V : N) is
5786 (Ekind_In (Id, E_Function, -- subprogram variants
5788 E_Generic_Procedure,
5792 Ekind_In (Id, E_Generic_Package, -- package variants
5797 end Set_SPARK_Pragma;
5799 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5802 (Ekind_In (Id, E_Function, -- subprogram variants
5804 E_Generic_Procedure,
5808 Ekind_In (Id, E_Generic_Package, -- package variants
5812 Set_Flag265 (Id, V);
5813 end Set_SPARK_Pragma_Inherited;
5815 procedure Set_Spec_Entity (Id : E; V : E) is
5817 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5819 end Set_Spec_Entity;
5821 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5825 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5826 Set_Flag273 (Id, V);
5827 end Set_SSO_Set_High_By_Default;
5829 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5833 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5834 Set_Flag272 (Id, V);
5835 end Set_SSO_Set_Low_By_Default;
5837 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5839 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5841 end Set_Static_Discrete_Predicate;
5843 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5845 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5846 and then Has_Predicates (Id));
5848 end Set_Static_Real_Or_String_Predicate;
5850 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5852 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5854 end Set_Status_Flag_Or_Transient_Decl;
5856 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5858 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5859 pragma Assert (Id = Base_Type (Id));
5861 end Set_Storage_Size_Variable;
5863 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5865 pragma Assert (Ekind (Id) = E_Package);
5867 end Set_Static_Elaboration_Desired;
5869 procedure Set_Static_Initialization (Id : E; V : N) is
5872 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5874 end Set_Static_Initialization;
5876 procedure Set_Stored_Constraint (Id : E; V : L) is
5878 pragma Assert (Nkind (Id) in N_Entity);
5879 Set_Elist23 (Id, V);
5880 end Set_Stored_Constraint;
5882 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5884 pragma Assert (Ekind (Id) = E_Constant);
5885 Set_Flag270 (Id, V);
5886 end Set_Stores_Attribute_Old_Prefix;
5888 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5890 pragma Assert (Id = Base_Type (Id));
5891 Set_Flag145 (Id, V);
5892 end Set_Strict_Alignment;
5894 procedure Set_String_Literal_Length (Id : E; V : U) is
5896 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5898 end Set_String_Literal_Length;
5900 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5902 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5904 end Set_String_Literal_Low_Bound;
5906 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5908 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5910 end Set_Subprograms_For_Type;
5912 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5914 Set_Flag148 (Id, V);
5915 end Set_Suppress_Elaboration_Warnings;
5917 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5919 pragma Assert (Is_Type (Id));
5920 Set_Flag105 (Id, V);
5921 end Set_Suppress_Initialization;
5923 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5925 Set_Flag165 (Id, V);
5926 end Set_Suppress_Style_Checks;
5928 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5930 Set_Flag217 (Id, V);
5931 end Set_Suppress_Value_Tracking_On_Call;
5933 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5935 pragma Assert (Ekind (Id) in Task_Kind);
5937 end Set_Task_Body_Procedure;
5939 procedure Set_Thunk_Entity (Id : E; V : E) is
5941 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5942 and then Is_Thunk (Id));
5944 end Set_Thunk_Entity;
5946 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5949 end Set_Treat_As_Volatile;
5951 procedure Set_Underlying_Full_View (Id : E; V : E) is
5953 pragma Assert (Ekind (Id) in Private_Kind);
5955 end Set_Underlying_Full_View;
5957 procedure Set_Underlying_Record_View (Id : E; V : E) is
5959 pragma Assert (Ekind (Id) = E_Record_Type);
5961 end Set_Underlying_Record_View;
5963 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5965 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5966 Set_Flag216 (Id, V);
5967 end Set_Universal_Aliasing;
5969 procedure Set_Unset_Reference (Id : E; V : N) is
5972 end Set_Unset_Reference;
5974 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5976 Set_Flag222 (Id, V);
5977 end Set_Used_As_Generic_Actual;
5979 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5981 pragma Assert (Ekind (Id) = E_Protected_Type);
5982 Set_Flag188 (Id, V);
5983 end Set_Uses_Lock_Free;
5985 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5988 end Set_Uses_Sec_Stack;
5990 procedure Set_Warnings_Off (Id : E; V : B := True) is
5993 end Set_Warnings_Off;
5995 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5997 Set_Flag236 (Id, V);
5998 end Set_Warnings_Off_Used;
6000 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6002 Set_Flag237 (Id, V);
6003 end Set_Warnings_Off_Used_Unmodified;
6005 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6007 Set_Flag238 (Id, V);
6008 end Set_Warnings_Off_Used_Unreferenced;
6010 procedure Set_Was_Hidden (Id : E; V : B := True) is
6012 Set_Flag196 (Id, V);
6015 procedure Set_Wrapped_Entity (Id : E; V : E) is
6017 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6018 and then Is_Primitive_Wrapper (Id));
6020 end Set_Wrapped_Entity;
6022 -----------------------------------
6023 -- Field Initialization Routines --
6024 -----------------------------------
6026 procedure Init_Alignment (Id : E) is
6028 Set_Uint14 (Id, Uint_0);
6031 procedure Init_Alignment (Id : E; V : Int) is
6033 Set_Uint14 (Id, UI_From_Int (V));
6036 procedure Init_Component_Bit_Offset (Id : E) is
6038 Set_Uint11 (Id, No_Uint);
6039 end Init_Component_Bit_Offset;
6041 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6043 Set_Uint11 (Id, UI_From_Int (V));
6044 end Init_Component_Bit_Offset;
6046 procedure Init_Component_Size (Id : E) is
6048 Set_Uint22 (Id, Uint_0);
6049 end Init_Component_Size;
6051 procedure Init_Component_Size (Id : E; V : Int) is
6053 Set_Uint22 (Id, UI_From_Int (V));
6054 end Init_Component_Size;
6056 procedure Init_Digits_Value (Id : E) is
6058 Set_Uint17 (Id, Uint_0);
6059 end Init_Digits_Value;
6061 procedure Init_Digits_Value (Id : E; V : Int) is
6063 Set_Uint17 (Id, UI_From_Int (V));
6064 end Init_Digits_Value;
6066 procedure Init_Esize (Id : E) is
6068 Set_Uint12 (Id, Uint_0);
6071 procedure Init_Esize (Id : E; V : Int) is
6073 Set_Uint12 (Id, UI_From_Int (V));
6076 procedure Init_Normalized_First_Bit (Id : E) is
6078 Set_Uint8 (Id, No_Uint);
6079 end Init_Normalized_First_Bit;
6081 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6083 Set_Uint8 (Id, UI_From_Int (V));
6084 end Init_Normalized_First_Bit;
6086 procedure Init_Normalized_Position (Id : E) is
6088 Set_Uint14 (Id, No_Uint);
6089 end Init_Normalized_Position;
6091 procedure Init_Normalized_Position (Id : E; V : Int) is
6093 Set_Uint14 (Id, UI_From_Int (V));
6094 end Init_Normalized_Position;
6096 procedure Init_Normalized_Position_Max (Id : E) is
6098 Set_Uint10 (Id, No_Uint);
6099 end Init_Normalized_Position_Max;
6101 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6103 Set_Uint10 (Id, UI_From_Int (V));
6104 end Init_Normalized_Position_Max;
6106 procedure Init_RM_Size (Id : E) is
6108 Set_Uint13 (Id, Uint_0);
6111 procedure Init_RM_Size (Id : E; V : Int) is
6113 Set_Uint13 (Id, UI_From_Int (V));
6116 -----------------------------
6117 -- Init_Component_Location --
6118 -----------------------------
6120 procedure Init_Component_Location (Id : E) is
6122 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6123 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6124 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6125 Set_Uint12 (Id, Uint_0); -- Esize
6126 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6127 end Init_Component_Location;
6129 ----------------------------
6130 -- Init_Object_Size_Align --
6131 ----------------------------
6133 procedure Init_Object_Size_Align (Id : E) is
6135 Set_Uint12 (Id, Uint_0); -- Esize
6136 Set_Uint14 (Id, Uint_0); -- Alignment
6137 end Init_Object_Size_Align;
6143 procedure Init_Size (Id : E; V : Int) is
6145 pragma Assert (not Is_Object (Id));
6146 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6147 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6150 ---------------------
6151 -- Init_Size_Align --
6152 ---------------------
6154 procedure Init_Size_Align (Id : E) is
6156 pragma Assert (not Is_Object (Id));
6157 Set_Uint12 (Id, Uint_0); -- Esize
6158 Set_Uint13 (Id, Uint_0); -- RM_Size
6159 Set_Uint14 (Id, Uint_0); -- Alignment
6160 end Init_Size_Align;
6162 ----------------------------------------------
6163 -- Type Representation Attribute Predicates --
6164 ----------------------------------------------
6166 function Known_Alignment (E : Entity_Id) return B is
6168 return Uint14 (E) /= Uint_0
6169 and then Uint14 (E) /= No_Uint;
6170 end Known_Alignment;
6172 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6174 return Uint11 (E) /= No_Uint;
6175 end Known_Component_Bit_Offset;
6177 function Known_Component_Size (E : Entity_Id) return B is
6179 return Uint22 (Base_Type (E)) /= Uint_0
6180 and then Uint22 (Base_Type (E)) /= No_Uint;
6181 end Known_Component_Size;
6183 function Known_Esize (E : Entity_Id) return B is
6185 return Uint12 (E) /= Uint_0
6186 and then Uint12 (E) /= No_Uint;
6189 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6191 return Uint8 (E) /= No_Uint;
6192 end Known_Normalized_First_Bit;
6194 function Known_Normalized_Position (E : Entity_Id) return B is
6196 return Uint14 (E) /= No_Uint;
6197 end Known_Normalized_Position;
6199 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6201 return Uint10 (E) /= No_Uint;
6202 end Known_Normalized_Position_Max;
6204 function Known_RM_Size (E : Entity_Id) return B is
6206 return Uint13 (E) /= No_Uint
6207 and then (Uint13 (E) /= Uint_0
6208 or else Is_Discrete_Type (E)
6209 or else Is_Fixed_Point_Type (E));
6212 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6214 return Uint11 (E) /= No_Uint
6215 and then Uint11 (E) >= Uint_0;
6216 end Known_Static_Component_Bit_Offset;
6218 function Known_Static_Component_Size (E : Entity_Id) return B is
6220 return Uint22 (Base_Type (E)) > Uint_0;
6221 end Known_Static_Component_Size;
6223 function Known_Static_Esize (E : Entity_Id) return B is
6225 return Uint12 (E) > Uint_0
6226 and then not Is_Generic_Type (E);
6227 end Known_Static_Esize;
6229 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6231 return Uint8 (E) /= No_Uint
6232 and then Uint8 (E) >= Uint_0;
6233 end Known_Static_Normalized_First_Bit;
6235 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6237 return Uint14 (E) /= No_Uint
6238 and then Uint14 (E) >= Uint_0;
6239 end Known_Static_Normalized_Position;
6241 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6243 return Uint10 (E) /= No_Uint
6244 and then Uint10 (E) >= Uint_0;
6245 end Known_Static_Normalized_Position_Max;
6247 function Known_Static_RM_Size (E : Entity_Id) return B is
6249 return (Uint13 (E) > Uint_0
6250 or else Is_Discrete_Type (E)
6251 or else Is_Fixed_Point_Type (E))
6252 and then not Is_Generic_Type (E);
6253 end Known_Static_RM_Size;
6255 function Unknown_Alignment (E : Entity_Id) return B is
6257 return Uint14 (E) = Uint_0
6258 or else Uint14 (E) = No_Uint;
6259 end Unknown_Alignment;
6261 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6263 return Uint11 (E) = No_Uint;
6264 end Unknown_Component_Bit_Offset;
6266 function Unknown_Component_Size (E : Entity_Id) return B is
6268 return Uint22 (Base_Type (E)) = Uint_0
6270 Uint22 (Base_Type (E)) = No_Uint;
6271 end Unknown_Component_Size;
6273 function Unknown_Esize (E : Entity_Id) return B is
6275 return Uint12 (E) = No_Uint
6277 Uint12 (E) = Uint_0;
6280 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6282 return Uint8 (E) = No_Uint;
6283 end Unknown_Normalized_First_Bit;
6285 function Unknown_Normalized_Position (E : Entity_Id) return B is
6287 return Uint14 (E) = No_Uint;
6288 end Unknown_Normalized_Position;
6290 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6292 return Uint10 (E) = No_Uint;
6293 end Unknown_Normalized_Position_Max;
6295 function Unknown_RM_Size (E : Entity_Id) return B is
6297 return (Uint13 (E) = Uint_0
6298 and then not Is_Discrete_Type (E)
6299 and then not Is_Fixed_Point_Type (E))
6300 or else Uint13 (E) = No_Uint;
6301 end Unknown_RM_Size;
6303 --------------------
6304 -- Address_Clause --
6305 --------------------
6307 function Address_Clause (Id : E) return N is
6309 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6316 function Aft_Value (Id : E) return U is
6318 Delta_Val : Ureal := Delta_Value (Id);
6320 while Delta_Val < Ureal_Tenth loop
6321 Delta_Val := Delta_Val * Ureal_10;
6322 Result := Result + 1;
6325 return UI_From_Int (Result);
6328 ----------------------
6329 -- Alignment_Clause --
6330 ----------------------
6332 function Alignment_Clause (Id : E) return N is
6334 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6335 end Alignment_Clause;
6341 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6343 if Last_Entity (V) = Empty then
6344 Set_First_Entity (Id => V, V => Id);
6346 Set_Next_Entity (Last_Entity (V), Id);
6349 Set_Next_Entity (Id, Empty);
6351 Set_Last_Entity (Id => V, V => Id);
6358 function Base_Type (Id : E) return E is
6360 if Is_Base_Type (Id) then
6363 pragma Assert (Is_Type (Id));
6368 -------------------------
6369 -- Component_Alignment --
6370 -------------------------
6372 -- Component Alignment is encoded using two flags, Flag128/129 as
6373 -- follows. Note that both flags False = Align_Default, so that the
6374 -- default initialization of flags to False initializes component
6375 -- alignment to the default value as required.
6377 -- Flag128 Flag129 Value
6378 -- ------- ------- -----
6379 -- False False Calign_Default
6380 -- False True Calign_Component_Size
6381 -- True False Calign_Component_Size_4
6382 -- True True Calign_Storage_Unit
6384 function Component_Alignment (Id : E) return C is
6385 BT : constant Node_Id := Base_Type (Id);
6388 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6390 if Flag128 (BT) then
6391 if Flag129 (BT) then
6392 return Calign_Storage_Unit;
6394 return Calign_Component_Size_4;
6398 if Flag129 (BT) then
6399 return Calign_Component_Size;
6401 return Calign_Default;
6404 end Component_Alignment;
6406 ----------------------
6407 -- Declaration_Node --
6408 ----------------------
6410 function Declaration_Node (Id : E) return N is
6414 if Ekind (Id) = E_Incomplete_Type
6415 and then Present (Full_View (Id))
6417 P := Parent (Full_View (Id));
6423 if Nkind (P) /= N_Selected_Component
6424 and then Nkind (P) /= N_Expanded_Name
6426 not (Nkind (P) = N_Defining_Program_Unit_Name
6427 and then Is_Child_Unit (Id))
6434 end Declaration_Node;
6436 ---------------------
6437 -- Designated_Type --
6438 ---------------------
6440 function Designated_Type (Id : E) return E is
6444 Desig_Type := Directly_Designated_Type (Id);
6446 if Ekind (Desig_Type) = E_Incomplete_Type
6447 and then Present (Full_View (Desig_Type))
6449 return Full_View (Desig_Type);
6451 elsif Is_Class_Wide_Type (Desig_Type)
6452 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6453 and then Present (Full_View (Etype (Desig_Type)))
6454 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6456 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6461 end Designated_Type;
6463 ----------------------
6464 -- Entry_Index_Type --
6465 ----------------------
6467 function Entry_Index_Type (Id : E) return N is
6469 pragma Assert (Ekind (Id) = E_Entry_Family);
6470 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6471 end Entry_Index_Type;
6473 ---------------------
6474 -- First_Component --
6475 ---------------------
6477 function First_Component (Id : E) return E is
6482 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6484 Comp_Id := First_Entity (Id);
6485 while Present (Comp_Id) loop
6486 exit when Ekind (Comp_Id) = E_Component;
6487 Comp_Id := Next_Entity (Comp_Id);
6491 end First_Component;
6493 -------------------------------------
6494 -- First_Component_Or_Discriminant --
6495 -------------------------------------
6497 function First_Component_Or_Discriminant (Id : E) return E is
6502 (Is_Record_Type (Id)
6503 or else Is_Incomplete_Or_Private_Type (Id)
6504 or else Has_Discriminants (Id));
6506 Comp_Id := First_Entity (Id);
6507 while Present (Comp_Id) loop
6508 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6509 Comp_Id := Next_Entity (Comp_Id);
6513 end First_Component_Or_Discriminant;
6519 function First_Formal (Id : E) return E is
6524 (Is_Overloadable (Id)
6525 or else Ekind_In (Id, E_Entry_Family,
6527 E_Subprogram_Type));
6529 if Ekind (Id) = E_Enumeration_Literal then
6533 Formal := First_Entity (Id);
6535 if Present (Formal) and then Is_Formal (Formal) then
6543 ------------------------------
6544 -- First_Formal_With_Extras --
6545 ------------------------------
6547 function First_Formal_With_Extras (Id : E) return E is
6552 (Is_Overloadable (Id)
6553 or else Ekind_In (Id, E_Entry_Family,
6555 E_Subprogram_Type));
6557 if Ekind (Id) = E_Enumeration_Literal then
6561 Formal := First_Entity (Id);
6563 if Present (Formal) and then Is_Formal (Formal) then
6566 return Extra_Formals (Id); -- Empty if no extra formals
6569 end First_Formal_With_Extras;
6571 -------------------------------------
6572 -- Get_Attribute_Definition_Clause --
6573 -------------------------------------
6575 function Get_Attribute_Definition_Clause
6577 Id : Attribute_Id) return Node_Id
6582 N := First_Rep_Item (E);
6583 while Present (N) loop
6584 if Nkind (N) = N_Attribute_Definition_Clause
6585 and then Get_Attribute_Id (Chars (N)) = Id
6594 end Get_Attribute_Definition_Clause;
6600 function Get_Full_View (T : Entity_Id) return Entity_Id is
6602 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6603 return Full_View (T);
6605 elsif Is_Class_Wide_Type (T)
6606 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6607 and then Present (Full_View (Root_Type (T)))
6609 return Class_Wide_Type (Full_View (Root_Type (T)));
6620 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6621 Is_CDG : constant Boolean :=
6622 Id = Pragma_Abstract_State or else
6623 Id = Pragma_Async_Readers or else
6624 Id = Pragma_Async_Writers or else
6625 Id = Pragma_Depends or else
6626 Id = Pragma_Effective_Reads or else
6627 Id = Pragma_Effective_Writes or else
6628 Id = Pragma_Global or else
6629 Id = Pragma_Initial_Condition or else
6630 Id = Pragma_Initializes or else
6631 Id = Pragma_Part_Of or else
6632 Id = Pragma_Refined_Depends or else
6633 Id = Pragma_Refined_Global or else
6634 Id = Pragma_Refined_State;
6635 Is_CTC : constant Boolean :=
6636 Id = Pragma_Contract_Cases or else
6637 Id = Pragma_Test_Case;
6638 Is_PPC : constant Boolean :=
6639 Id = Pragma_Precondition or else
6640 Id = Pragma_Postcondition or else
6641 Id = Pragma_Refined_Post;
6643 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6649 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6650 -- extracted from their specialized list.
6653 Items := Contract (E);
6659 Item := Classifications (Items);
6662 Item := Contract_Test_Cases (Items);
6665 Item := Pre_Post_Conditions (Items);
6671 Item := First_Rep_Item (E);
6674 while Present (Item) loop
6675 if Nkind (Item) = N_Pragma
6676 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6680 -- All nodes in N_Contract are chained using Next_Pragma
6682 elsif In_Contract then
6683 Item := Next_Pragma (Item);
6688 Next_Rep_Item (Item);
6695 --------------------------------------
6696 -- Get_Record_Representation_Clause --
6697 --------------------------------------
6699 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6703 N := First_Rep_Item (E);
6704 while Present (N) loop
6705 if Nkind (N) = N_Record_Representation_Clause then
6713 end Get_Record_Representation_Clause;
6715 ------------------------
6716 -- Has_Attach_Handler --
6717 ------------------------
6719 function Has_Attach_Handler (Id : E) return B is
6723 pragma Assert (Is_Protected_Type (Id));
6725 Ritem := First_Rep_Item (Id);
6726 while Present (Ritem) loop
6727 if Nkind (Ritem) = N_Pragma
6728 and then Pragma_Name (Ritem) = Name_Attach_Handler
6732 Next_Rep_Item (Ritem);
6737 end Has_Attach_Handler;
6743 function Has_Entries (Id : E) return B is
6747 pragma Assert (Is_Concurrent_Type (Id));
6749 Ent := First_Entity (Id);
6750 while Present (Ent) loop
6751 if Is_Entry (Ent) then
6755 Ent := Next_Entity (Ent);
6761 ----------------------------
6762 -- Has_Foreign_Convention --
6763 ----------------------------
6765 function Has_Foreign_Convention (Id : E) return B is
6767 -- While regular Intrinsics such as the Standard operators fit in the
6768 -- "Ada" convention, those with an Interface_Name materialize GCC
6769 -- builtin imports for which Ada special treatments shouldn't apply.
6771 return Convention (Id) in Foreign_Convention
6772 or else (Convention (Id) = Convention_Intrinsic
6773 and then Present (Interface_Name (Id)));
6774 end Has_Foreign_Convention;
6776 ---------------------------
6777 -- Has_Interrupt_Handler --
6778 ---------------------------
6780 function Has_Interrupt_Handler (Id : E) return B is
6784 pragma Assert (Is_Protected_Type (Id));
6786 Ritem := First_Rep_Item (Id);
6787 while Present (Ritem) loop
6788 if Nkind (Ritem) = N_Pragma
6789 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6793 Next_Rep_Item (Ritem);
6798 end Has_Interrupt_Handler;
6800 -----------------------------
6801 -- Has_Non_Null_Refinement --
6802 -----------------------------
6804 function Has_Non_Null_Refinement (Id : E) return B is
6806 -- "Refinement" is a concept applicable only to abstract states
6808 pragma Assert (Ekind (Id) = E_Abstract_State);
6810 if Has_Visible_Refinement (Id) then
6811 pragma Assert (Present (Refinement_Constituents (Id)));
6813 -- For a refinement to be non-null, the first constituent must be
6814 -- anything other than null.
6817 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6821 end Has_Non_Null_Refinement;
6823 -----------------------------
6824 -- Has_Null_Abstract_State --
6825 -----------------------------
6827 function Has_Null_Abstract_State (Id : E) return B is
6829 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6832 Present (Abstract_States (Id))
6833 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6834 end Has_Null_Abstract_State;
6836 -------------------------
6837 -- Has_Null_Refinement --
6838 -------------------------
6840 function Has_Null_Refinement (Id : E) return B is
6842 -- "Refinement" is a concept applicable only to abstract states
6844 pragma Assert (Ekind (Id) = E_Abstract_State);
6846 if Has_Visible_Refinement (Id) then
6847 pragma Assert (Present (Refinement_Constituents (Id)));
6849 -- For a refinement to be null, the state's sole constituent must be
6853 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6857 end Has_Null_Refinement;
6859 --------------------
6860 -- Has_Unmodified --
6861 --------------------
6863 function Has_Unmodified (E : Entity_Id) return Boolean is
6865 if Has_Pragma_Unmodified (E) then
6867 elsif Warnings_Off (E) then
6868 Set_Warnings_Off_Used_Unmodified (E);
6875 ---------------------
6876 -- Has_Unreferenced --
6877 ---------------------
6879 function Has_Unreferenced (E : Entity_Id) return Boolean is
6881 if Has_Pragma_Unreferenced (E) then
6883 elsif Warnings_Off (E) then
6884 Set_Warnings_Off_Used_Unreferenced (E);
6889 end Has_Unreferenced;
6891 ----------------------
6892 -- Has_Warnings_Off --
6893 ----------------------
6895 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6897 if Warnings_Off (E) then
6898 Set_Warnings_Off_Used (E);
6903 end Has_Warnings_Off;
6905 ------------------------------
6906 -- Implementation_Base_Type --
6907 ------------------------------
6909 function Implementation_Base_Type (Id : E) return E is
6914 Bastyp := Base_Type (Id);
6916 if Is_Incomplete_Or_Private_Type (Bastyp) then
6917 Imptyp := Underlying_Type (Bastyp);
6919 -- If we have an implementation type, then just return it,
6920 -- otherwise we return the Base_Type anyway. This can only
6921 -- happen in error situations and should avoid some error bombs.
6923 if Present (Imptyp) then
6924 return Base_Type (Imptyp);
6932 end Implementation_Base_Type;
6934 -------------------------
6935 -- Invariant_Procedure --
6936 -------------------------
6938 function Invariant_Procedure (Id : E) return E is
6942 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6944 if No (Subprograms_For_Type (Id)) then
6948 S := Subprograms_For_Type (Id);
6949 while Present (S) loop
6950 if Is_Invariant_Procedure (S) then
6953 S := Subprograms_For_Type (S);
6959 end Invariant_Procedure;
6965 -- Global flag table allowing rapid computation of this function
6967 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6968 (E_Enumeration_Subtype |
6970 E_Signed_Integer_Subtype |
6971 E_Modular_Integer_Subtype |
6972 E_Floating_Point_Subtype |
6973 E_Ordinary_Fixed_Point_Subtype |
6974 E_Decimal_Fixed_Point_Subtype |
6979 E_Record_Subtype_With_Private |
6980 E_Limited_Private_Subtype |
6982 E_Protected_Subtype |
6984 E_String_Literal_Subtype |
6985 E_Class_Wide_Subtype => False,
6988 function Is_Base_Type (Id : E) return Boolean is
6990 return Entity_Is_Base_Type (Ekind (Id));
6993 ---------------------
6994 -- Is_Boolean_Type --
6995 ---------------------
6997 function Is_Boolean_Type (Id : E) return B is
6999 return Root_Type (Id) = Standard_Boolean;
7000 end Is_Boolean_Type;
7002 ------------------------
7003 -- Is_Constant_Object --
7004 ------------------------
7006 function Is_Constant_Object (Id : E) return B is
7007 K : constant Entity_Kind := Ekind (Id);
7010 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7011 end Is_Constant_Object;
7013 --------------------
7014 -- Is_Discriminal --
7015 --------------------
7017 function Is_Discriminal (Id : E) return B is
7019 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7020 and then Present (Discriminal_Link (Id)));
7023 ----------------------
7024 -- Is_Dynamic_Scope --
7025 ----------------------
7027 function Is_Dynamic_Scope (Id : E) return B is
7030 Ekind (Id) = E_Block
7032 Ekind (Id) = E_Function
7034 Ekind (Id) = E_Procedure
7036 Ekind (Id) = E_Subprogram_Body
7038 Ekind (Id) = E_Task_Type
7040 (Ekind (Id) = E_Limited_Private_Type
7041 and then Present (Full_View (Id))
7042 and then Ekind (Full_View (Id)) = E_Task_Type)
7044 Ekind (Id) = E_Entry
7046 Ekind (Id) = E_Entry_Family
7048 Ekind (Id) = E_Return_Statement;
7049 end Is_Dynamic_Scope;
7051 --------------------
7052 -- Is_Entity_Name --
7053 --------------------
7055 function Is_Entity_Name (N : Node_Id) return Boolean is
7056 Kind : constant Node_Kind := Nkind (N);
7059 -- Identifiers, operator symbols, expanded names are entity names
7061 return Kind = N_Identifier
7062 or else Kind = N_Operator_Symbol
7063 or else Kind = N_Expanded_Name
7065 -- Attribute references are entity names if they refer to an entity.
7066 -- Note that we don't do this by testing for the presence of the
7067 -- Entity field in the N_Attribute_Reference node, since it may not
7068 -- have been set yet.
7070 or else (Kind = N_Attribute_Reference
7071 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7074 -----------------------
7075 -- Is_External_State --
7076 -----------------------
7078 function Is_External_State (Id : E) return B is
7081 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7082 end Is_External_State;
7088 function Is_Finalizer (Id : E) return B is
7090 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7093 ---------------------
7094 -- Is_Ghost_Entity --
7095 ---------------------
7097 -- Note: coding below allows for ghost variables. They are not currently
7098 -- implemented, so we will always get False for variables, but that is
7099 -- expected to change in the future.
7101 function Is_Ghost_Entity (Id : E) return B is
7103 if Present (Id) and then Ekind (Id) = E_Variable then
7104 return Convention (Id) = Convention_Ghost;
7106 return Is_Ghost_Subprogram (Id);
7108 end Is_Ghost_Entity;
7110 -------------------------
7111 -- Is_Ghost_Subprogram --
7112 -------------------------
7114 function Is_Ghost_Subprogram (Id : E) return B is
7116 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7117 return Convention (Id) = Convention_Ghost;
7121 end Is_Ghost_Subprogram;
7127 function Is_Null_State (Id : E) return B is
7130 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7133 ---------------------
7134 -- Is_Packed_Array --
7135 ---------------------
7137 function Is_Packed_Array (Id : E) return B is
7139 return Is_Array_Type (Id) and then Is_Packed (Id);
7140 end Is_Packed_Array;
7142 -----------------------------------
7143 -- Is_Package_Or_Generic_Package --
7144 -----------------------------------
7146 function Is_Package_Or_Generic_Package (Id : E) return B is
7148 return Ekind_In (Id, E_Generic_Package, E_Package);
7149 end Is_Package_Or_Generic_Package;
7155 function Is_Prival (Id : E) return B is
7157 return (Ekind_In (Id, E_Constant, E_Variable)
7158 and then Present (Prival_Link (Id)));
7161 ----------------------------
7162 -- Is_Protected_Component --
7163 ----------------------------
7165 function Is_Protected_Component (Id : E) return B is
7167 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7168 end Is_Protected_Component;
7170 ----------------------------
7171 -- Is_Protected_Interface --
7172 ----------------------------
7174 function Is_Protected_Interface (Id : E) return B is
7175 Typ : constant Entity_Id := Base_Type (Id);
7177 if not Is_Interface (Typ) then
7179 elsif Is_Class_Wide_Type (Typ) then
7180 return Is_Protected_Interface (Etype (Typ));
7182 return Protected_Present (Type_Definition (Parent (Typ)));
7184 end Is_Protected_Interface;
7186 ------------------------------
7187 -- Is_Protected_Record_Type --
7188 ------------------------------
7190 function Is_Protected_Record_Type (Id : E) return B is
7193 Is_Concurrent_Record_Type (Id)
7194 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7195 end Is_Protected_Record_Type;
7197 --------------------------------
7198 -- Is_Standard_Character_Type --
7199 --------------------------------
7201 function Is_Standard_Character_Type (Id : E) return B is
7203 if Is_Type (Id) then
7205 R : constant Entity_Id := Root_Type (Id);
7208 R = Standard_Character
7210 R = Standard_Wide_Character
7212 R = Standard_Wide_Wide_Character;
7218 end Is_Standard_Character_Type;
7220 --------------------
7221 -- Is_String_Type --
7222 --------------------
7224 function Is_String_Type (Id : E) return B is
7226 return Is_Array_Type (Id)
7227 and then Id /= Any_Composite
7228 and then Number_Dimensions (Id) = 1
7229 and then Is_Character_Type (Component_Type (Id));
7232 -------------------------------
7233 -- Is_Synchronized_Interface --
7234 -------------------------------
7236 function Is_Synchronized_Interface (Id : E) return B is
7237 Typ : constant Entity_Id := Base_Type (Id);
7240 if not Is_Interface (Typ) then
7243 elsif Is_Class_Wide_Type (Typ) then
7244 return Is_Synchronized_Interface (Etype (Typ));
7247 return Protected_Present (Type_Definition (Parent (Typ)))
7248 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7249 or else Task_Present (Type_Definition (Parent (Typ)));
7251 end Is_Synchronized_Interface;
7253 -----------------------
7254 -- Is_Task_Interface --
7255 -----------------------
7257 function Is_Task_Interface (Id : E) return B is
7258 Typ : constant Entity_Id := Base_Type (Id);
7260 if not Is_Interface (Typ) then
7262 elsif Is_Class_Wide_Type (Typ) then
7263 return Is_Task_Interface (Etype (Typ));
7265 return Task_Present (Type_Definition (Parent (Typ)));
7267 end Is_Task_Interface;
7269 -------------------------
7270 -- Is_Task_Record_Type --
7271 -------------------------
7273 function Is_Task_Record_Type (Id : E) return B is
7276 Is_Concurrent_Record_Type (Id)
7277 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7278 end Is_Task_Record_Type;
7280 ------------------------
7281 -- Is_Wrapper_Package --
7282 ------------------------
7284 function Is_Wrapper_Package (Id : E) return B is
7286 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7287 end Is_Wrapper_Package;
7293 function Last_Formal (Id : E) return E is
7298 (Is_Overloadable (Id)
7299 or else Ekind_In (Id, E_Entry_Family,
7301 E_Subprogram_Type));
7303 if Ekind (Id) = E_Enumeration_Literal then
7307 Formal := First_Formal (Id);
7309 if Present (Formal) then
7310 while Present (Next_Formal (Formal)) loop
7311 Formal := Next_Formal (Formal);
7319 function Model_Emin_Value (Id : E) return Uint is
7321 return Machine_Emin_Value (Id);
7322 end Model_Emin_Value;
7324 -------------------------
7325 -- Model_Epsilon_Value --
7326 -------------------------
7328 function Model_Epsilon_Value (Id : E) return Ureal is
7329 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7331 return Radix ** (1 - Model_Mantissa_Value (Id));
7332 end Model_Epsilon_Value;
7334 --------------------------
7335 -- Model_Mantissa_Value --
7336 --------------------------
7338 function Model_Mantissa_Value (Id : E) return Uint is
7340 return Machine_Mantissa_Value (Id);
7341 end Model_Mantissa_Value;
7343 -----------------------
7344 -- Model_Small_Value --
7345 -----------------------
7347 function Model_Small_Value (Id : E) return Ureal is
7348 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7350 return Radix ** (Model_Emin_Value (Id) - 1);
7351 end Model_Small_Value;
7353 ------------------------
7354 -- Machine_Emax_Value --
7355 ------------------------
7357 function Machine_Emax_Value (Id : E) return Uint is
7358 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7361 case Float_Rep (Id) is
7364 when 1 .. 6 => return Uint_128;
7365 when 7 .. 15 => return 2**10;
7366 when 16 .. 33 => return 2**14;
7367 when others => return No_Uint;
7372 when 1 .. 9 => return 2**7 - 1;
7373 when 10 .. 15 => return 2**10 - 1;
7374 when others => return No_Uint;
7378 return Uint_2 ** Uint_7 - Uint_1;
7380 end Machine_Emax_Value;
7382 ------------------------
7383 -- Machine_Emin_Value --
7384 ------------------------
7386 function Machine_Emin_Value (Id : E) return Uint is
7388 case Float_Rep (Id) is
7389 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7390 when VAX_Native => return -Machine_Emax_Value (Id);
7391 when AAMP => return -Machine_Emax_Value (Id);
7393 end Machine_Emin_Value;
7395 ----------------------------
7396 -- Machine_Mantissa_Value --
7397 ----------------------------
7399 function Machine_Mantissa_Value (Id : E) return Uint is
7400 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7403 case Float_Rep (Id) is
7406 when 1 .. 6 => return Uint_24;
7407 when 7 .. 15 => return UI_From_Int (53);
7408 when 16 .. 18 => return Uint_64;
7409 when 19 .. 33 => return UI_From_Int (113);
7410 when others => return No_Uint;
7415 when 1 .. 6 => return Uint_24;
7416 when 7 .. 9 => return UI_From_Int (56);
7417 when 10 .. 15 => return UI_From_Int (53);
7418 when others => return No_Uint;
7423 when 1 .. 6 => return Uint_24;
7424 when 7 .. 9 => return UI_From_Int (40);
7425 when others => return No_Uint;
7428 end Machine_Mantissa_Value;
7430 -------------------------
7431 -- Machine_Radix_Value --
7432 -------------------------
7434 function Machine_Radix_Value (Id : E) return U is
7436 case Float_Rep (Id) is
7437 when IEEE_Binary | VAX_Native | AAMP =>
7440 end Machine_Radix_Value;
7442 --------------------
7443 -- Next_Component --
7444 --------------------
7446 function Next_Component (Id : E) return E is
7450 Comp_Id := Next_Entity (Id);
7451 while Present (Comp_Id) loop
7452 exit when Ekind (Comp_Id) = E_Component;
7453 Comp_Id := Next_Entity (Comp_Id);
7459 ------------------------------------
7460 -- Next_Component_Or_Discriminant --
7461 ------------------------------------
7463 function Next_Component_Or_Discriminant (Id : E) return E is
7467 Comp_Id := Next_Entity (Id);
7468 while Present (Comp_Id) loop
7469 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7470 Comp_Id := Next_Entity (Comp_Id);
7474 end Next_Component_Or_Discriminant;
7476 -----------------------
7477 -- Next_Discriminant --
7478 -----------------------
7480 -- This function actually implements both Next_Discriminant and
7481 -- Next_Stored_Discriminant by making sure that the Discriminant
7482 -- returned is of the same variety as Id.
7484 function Next_Discriminant (Id : E) return E is
7486 -- Derived Tagged types with private extensions look like this...
7488 -- E_Discriminant d1
7489 -- E_Discriminant d2
7491 -- E_Discriminant d1
7492 -- E_Discriminant d2
7495 -- so it is critical not to go past the leading discriminants
7500 pragma Assert (Ekind (Id) = E_Discriminant);
7503 D := Next_Entity (D);
7505 or else (Ekind (D) /= E_Discriminant
7506 and then not Is_Itype (D))
7511 exit when Ekind (D) = E_Discriminant
7512 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7516 end Next_Discriminant;
7522 function Next_Formal (Id : E) return E is
7526 -- Follow the chain of declared entities as long as the kind of the
7527 -- entity corresponds to a formal parameter. Skip internal entities
7528 -- that may have been created for implicit subtypes, in the process
7529 -- of analyzing default expressions.
7533 P := Next_Entity (P);
7535 if No (P) or else Is_Formal (P) then
7537 elsif not Is_Internal (P) then
7543 -----------------------------
7544 -- Next_Formal_With_Extras --
7545 -----------------------------
7547 function Next_Formal_With_Extras (Id : E) return E is
7549 if Present (Extra_Formal (Id)) then
7550 return Extra_Formal (Id);
7552 return Next_Formal (Id);
7554 end Next_Formal_With_Extras;
7560 function Next_Index (Id : Node_Id) return Node_Id is
7569 function Next_Literal (Id : E) return E is
7571 pragma Assert (Nkind (Id) in N_Entity);
7575 ------------------------------
7576 -- Next_Stored_Discriminant --
7577 ------------------------------
7579 function Next_Stored_Discriminant (Id : E) return E is
7581 -- See comment in Next_Discriminant
7583 return Next_Discriminant (Id);
7584 end Next_Stored_Discriminant;
7586 -----------------------
7587 -- Number_Dimensions --
7588 -----------------------
7590 function Number_Dimensions (Id : E) return Pos is
7595 if Ekind (Id) = E_String_Literal_Subtype then
7600 T := First_Index (Id);
7601 while Present (T) loop
7608 end Number_Dimensions;
7610 --------------------
7611 -- Number_Entries --
7612 --------------------
7614 function Number_Entries (Id : E) return Nat is
7619 pragma Assert (Is_Concurrent_Type (Id));
7622 Ent := First_Entity (Id);
7623 while Present (Ent) loop
7624 if Is_Entry (Ent) then
7628 Ent := Next_Entity (Ent);
7634 --------------------
7635 -- Number_Formals --
7636 --------------------
7638 function Number_Formals (Id : E) return Pos is
7644 Formal := First_Formal (Id);
7645 while Present (Formal) loop
7647 Formal := Next_Formal (Formal);
7653 --------------------
7654 -- Parameter_Mode --
7655 --------------------
7657 function Parameter_Mode (Id : E) return Formal_Kind is
7662 ------------------------
7663 -- Predicate_Function --
7664 ------------------------
7666 function Predicate_Function (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 (S) then
7691 S := Subprograms_For_Type (S);
7697 end Predicate_Function;
7699 --------------------------
7700 -- Predicate_Function_M --
7701 --------------------------
7703 function Predicate_Function_M (Id : E) return E is
7708 pragma Assert (Is_Type (Id));
7710 -- If type is private and has a completion, predicate may be defined
7711 -- on the full view.
7713 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7714 T := Full_View (Id);
7719 if No (Subprograms_For_Type (T)) then
7723 S := Subprograms_For_Type (T);
7724 while Present (S) loop
7725 if Is_Predicate_Function_M (S) then
7728 S := Subprograms_For_Type (S);
7734 end Predicate_Function_M;
7736 -------------------------
7737 -- Present_In_Rep_Item --
7738 -------------------------
7740 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7744 Ritem := First_Rep_Item (E);
7746 while Present (Ritem) loop
7751 Next_Rep_Item (Ritem);
7755 end Present_In_Rep_Item;
7757 --------------------------
7758 -- Primitive_Operations --
7759 --------------------------
7761 function Primitive_Operations (Id : E) return L is
7763 if Is_Concurrent_Type (Id) then
7764 if Present (Corresponding_Record_Type (Id)) then
7765 return Direct_Primitive_Operations
7766 (Corresponding_Record_Type (Id));
7768 -- If expansion is disabled the corresponding record type is absent,
7769 -- but if the type has ancestors it may have primitive operations.
7771 elsif Is_Tagged_Type (Id) then
7772 return Direct_Primitive_Operations (Id);
7778 return Direct_Primitive_Operations (Id);
7780 end Primitive_Operations;
7782 ---------------------
7783 -- Record_Rep_Item --
7784 ---------------------
7786 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7788 Set_Next_Rep_Item (N, First_Rep_Item (E));
7789 Set_First_Rep_Item (E, N);
7790 end Record_Rep_Item;
7796 function Root_Type (Id : E) return E is
7800 pragma Assert (Nkind (Id) in N_Entity);
7802 T := Base_Type (Id);
7804 if Ekind (T) = E_Class_Wide_Type then
7816 -- Following test catches some error cases resulting from
7819 elsif No (Etyp) then
7820 Check_Error_Detected;
7823 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7826 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7832 -- Return if there is a circularity in the inheritance chain. This
7833 -- happens in some error situations and we do not want to get
7834 -- stuck in this loop.
7836 if T = Base_Type (Id) then
7843 ---------------------
7844 -- Safe_Emax_Value --
7845 ---------------------
7847 function Safe_Emax_Value (Id : E) return Uint is
7849 return Machine_Emax_Value (Id);
7850 end Safe_Emax_Value;
7852 ----------------------
7853 -- Safe_First_Value --
7854 ----------------------
7856 function Safe_First_Value (Id : E) return Ureal is
7858 return -Safe_Last_Value (Id);
7859 end Safe_First_Value;
7861 ---------------------
7862 -- Safe_Last_Value --
7863 ---------------------
7865 function Safe_Last_Value (Id : E) return Ureal is
7866 Radix : constant Uint := Machine_Radix_Value (Id);
7867 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7868 Emax : constant Uint := Safe_Emax_Value (Id);
7869 Significand : constant Uint := Radix ** Mantissa - 1;
7870 Exponent : constant Uint := Emax - Mantissa;
7876 (Num => Significand * 2 ** (Exponent mod 4),
7877 Den => -Exponent / 4,
7883 (Num => Significand,
7887 end Safe_Last_Value;
7893 function Scope_Depth (Id : E) return Uint is
7898 while Is_Record_Type (Scop) loop
7899 Scop := Scope (Scop);
7902 return Scope_Depth_Value (Scop);
7905 ---------------------
7906 -- Scope_Depth_Set --
7907 ---------------------
7909 function Scope_Depth_Set (Id : E) return B is
7911 return not Is_Record_Type (Id)
7912 and then Field22 (Id) /= Union_Id (Empty);
7913 end Scope_Depth_Set;
7915 -----------------------------
7916 -- Set_Component_Alignment --
7917 -----------------------------
7919 -- Component Alignment is encoded using two flags, Flag128/129 as
7920 -- follows. Note that both flags False = Align_Default, so that the
7921 -- default initialization of flags to False initializes component
7922 -- alignment to the default value as required.
7924 -- Flag128 Flag129 Value
7925 -- ------- ------- -----
7926 -- False False Calign_Default
7927 -- False True Calign_Component_Size
7928 -- True False Calign_Component_Size_4
7929 -- True True Calign_Storage_Unit
7931 procedure Set_Component_Alignment (Id : E; V : C) is
7933 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7934 and then Is_Base_Type (Id));
7937 when Calign_Default =>
7938 Set_Flag128 (Id, False);
7939 Set_Flag129 (Id, False);
7941 when Calign_Component_Size =>
7942 Set_Flag128 (Id, False);
7943 Set_Flag129 (Id, True);
7945 when Calign_Component_Size_4 =>
7946 Set_Flag128 (Id, True);
7947 Set_Flag129 (Id, False);
7949 when Calign_Storage_Unit =>
7950 Set_Flag128 (Id, True);
7951 Set_Flag129 (Id, True);
7953 end Set_Component_Alignment;
7955 -----------------------------
7956 -- Set_Invariant_Procedure --
7957 -----------------------------
7959 procedure Set_Invariant_Procedure (Id : E; V : E) is
7963 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7965 S := Subprograms_For_Type (Id);
7966 Set_Subprograms_For_Type (Id, V);
7967 Set_Subprograms_For_Type (V, S);
7969 -- Check for duplicate entry
7971 while Present (S) loop
7972 if Is_Invariant_Procedure (S) then
7973 raise Program_Error;
7975 S := Subprograms_For_Type (S);
7978 end Set_Invariant_Procedure;
7980 ----------------------------
7981 -- Set_Predicate_Function --
7982 ----------------------------
7984 procedure Set_Predicate_Function (Id : E; V : E) is
7988 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7990 S := Subprograms_For_Type (Id);
7991 Set_Subprograms_For_Type (Id, V);
7992 Set_Subprograms_For_Type (V, S);
7994 while Present (S) loop
7995 if Is_Predicate_Function (S) then
7996 raise Program_Error;
7998 S := Subprograms_For_Type (S);
8001 end Set_Predicate_Function;
8003 ------------------------------
8004 -- Set_Predicate_Function_M --
8005 ------------------------------
8007 procedure Set_Predicate_Function_M (Id : E; V : E) is
8011 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8013 S := Subprograms_For_Type (Id);
8014 Set_Subprograms_For_Type (Id, V);
8015 Set_Subprograms_For_Type (V, S);
8017 -- Check for duplicates
8019 while Present (S) loop
8020 if Is_Predicate_Function_M (S) then
8021 raise Program_Error;
8023 S := Subprograms_For_Type (S);
8026 end Set_Predicate_Function_M;
8032 function Size_Clause (Id : E) return N is
8034 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8037 ------------------------
8038 -- Stream_Size_Clause --
8039 ------------------------
8041 function Stream_Size_Clause (Id : E) return N is
8043 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8044 end Stream_Size_Clause;
8050 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8056 Kind := E_Access_Subtype;
8060 Kind := E_Array_Subtype;
8062 when E_Class_Wide_Type |
8063 E_Class_Wide_Subtype =>
8064 Kind := E_Class_Wide_Subtype;
8066 when E_Decimal_Fixed_Point_Type |
8067 E_Decimal_Fixed_Point_Subtype =>
8068 Kind := E_Decimal_Fixed_Point_Subtype;
8070 when E_Ordinary_Fixed_Point_Type |
8071 E_Ordinary_Fixed_Point_Subtype =>
8072 Kind := E_Ordinary_Fixed_Point_Subtype;
8074 when E_Private_Type |
8075 E_Private_Subtype =>
8076 Kind := E_Private_Subtype;
8078 when E_Limited_Private_Type |
8079 E_Limited_Private_Subtype =>
8080 Kind := E_Limited_Private_Subtype;
8082 when E_Record_Type_With_Private |
8083 E_Record_Subtype_With_Private =>
8084 Kind := E_Record_Subtype_With_Private;
8086 when E_Record_Type |
8088 Kind := E_Record_Subtype;
8090 when Enumeration_Kind =>
8091 Kind := E_Enumeration_Subtype;
8094 Kind := E_Floating_Point_Subtype;
8096 when Signed_Integer_Kind =>
8097 Kind := E_Signed_Integer_Subtype;
8099 when Modular_Integer_Kind =>
8100 Kind := E_Modular_Integer_Subtype;
8102 when Protected_Kind =>
8103 Kind := E_Protected_Subtype;
8106 Kind := E_Task_Subtype;
8110 raise Program_Error;
8116 ---------------------
8117 -- Type_High_Bound --
8118 ---------------------
8120 function Type_High_Bound (Id : E) return Node_Id is
8121 Rng : constant Node_Id := Scalar_Range (Id);
8123 if Nkind (Rng) = N_Subtype_Indication then
8124 return High_Bound (Range_Expression (Constraint (Rng)));
8126 return High_Bound (Rng);
8128 end Type_High_Bound;
8130 --------------------
8131 -- Type_Low_Bound --
8132 --------------------
8134 function Type_Low_Bound (Id : E) return Node_Id is
8135 Rng : constant Node_Id := Scalar_Range (Id);
8137 if Nkind (Rng) = N_Subtype_Indication then
8138 return Low_Bound (Range_Expression (Constraint (Rng)));
8140 return Low_Bound (Rng);
8144 ---------------------
8145 -- Underlying_Type --
8146 ---------------------
8148 function Underlying_Type (Id : E) return E is
8150 -- For record_with_private the underlying type is always the direct
8151 -- full view. Never try to take the full view of the parent it
8152 -- doesn't make sense.
8154 if Ekind (Id) = E_Record_Type_With_Private then
8155 return Full_View (Id);
8157 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8159 -- If we have an incomplete or private type with a full view,
8160 -- then we return the Underlying_Type of this full view
8162 if Present (Full_View (Id)) then
8163 if Id = Full_View (Id) then
8165 -- Previous error in declaration
8170 return Underlying_Type (Full_View (Id));
8173 -- If we have an incomplete entity that comes from the limited
8174 -- view then we return the Underlying_Type of its non-limited
8177 elsif From_Limited_With (Id)
8178 and then Present (Non_Limited_View (Id))
8180 return Underlying_Type (Non_Limited_View (Id));
8182 -- Otherwise check for the case where we have a derived type or
8183 -- subtype, and if so get the Underlying_Type of the parent type.
8185 elsif Etype (Id) /= Id then
8186 return Underlying_Type (Etype (Id));
8188 -- Otherwise we have an incomplete or private type that has
8189 -- no full view, which means that we have not encountered the
8190 -- completion, so return Empty to indicate the underlying type
8191 -- is not yet known.
8197 -- For non-incomplete, non-private types, return the type itself
8198 -- Also for entities that are not types at all return the entity
8204 end Underlying_Type;
8210 function Vax_Float (Id : E) return B is
8212 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8215 ------------------------
8216 -- Write_Entity_Flags --
8217 ------------------------
8219 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8221 procedure W (Flag_Name : String; Flag : Boolean);
8222 -- Write out given flag if it is set
8228 procedure W (Flag_Name : String; Flag : Boolean) is
8232 Write_Str (Flag_Name);
8233 Write_Str (" = True");
8238 -- Start of processing for Write_Entity_Flags
8241 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8242 and then Is_Base_Type (Id)
8245 Write_Str ("Component_Alignment = ");
8247 case Component_Alignment (Id) is
8248 when Calign_Default =>
8249 Write_Str ("Calign_Default");
8251 when Calign_Component_Size =>
8252 Write_Str ("Calign_Component_Size");
8254 when Calign_Component_Size_4 =>
8255 Write_Str ("Calign_Component_Size_4");
8257 when Calign_Storage_Unit =>
8258 Write_Str ("Calign_Storage_Unit");
8264 W ("Address_Taken", Flag104 (Id));
8265 W ("Body_Needed_For_SAL", Flag40 (Id));
8266 W ("C_Pass_By_Copy", Flag125 (Id));
8267 W ("Can_Never_Be_Null", Flag38 (Id));
8268 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8269 W ("Debug_Info_Off", Flag166 (Id));
8270 W ("Default_Expressions_Processed", Flag108 (Id));
8271 W ("Delay_Cleanups", Flag114 (Id));
8272 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8273 W ("Depends_On_Private", Flag14 (Id));
8274 W ("Discard_Names", Flag88 (Id));
8275 W ("Elaboration_Entity_Required", Flag174 (Id));
8276 W ("Elaborate_Body_Desirable", Flag210 (Id));
8277 W ("Entry_Accepted", Flag152 (Id));
8278 W ("Can_Use_Internal_Rep", Flag229 (Id));
8279 W ("Finalize_Storage_Only", Flag158 (Id));
8280 W ("From_Limited_With", Flag159 (Id));
8281 W ("Has_Aliased_Components", Flag135 (Id));
8282 W ("Has_Alignment_Clause", Flag46 (Id));
8283 W ("Has_All_Calls_Remote", Flag79 (Id));
8284 W ("Has_Anonymous_Master", Flag253 (Id));
8285 W ("Has_Atomic_Components", Flag86 (Id));
8286 W ("Has_Biased_Representation", Flag139 (Id));
8287 W ("Has_Completion", Flag26 (Id));
8288 W ("Has_Completion_In_Body", Flag71 (Id));
8289 W ("Has_Complex_Representation", Flag140 (Id));
8290 W ("Has_Component_Size_Clause", Flag68 (Id));
8291 W ("Has_Contiguous_Rep", Flag181 (Id));
8292 W ("Has_Controlled_Component", Flag43 (Id));
8293 W ("Has_Controlling_Result", Flag98 (Id));
8294 W ("Has_Convention_Pragma", Flag119 (Id));
8295 W ("Has_Default_Aspect", Flag39 (Id));
8296 W ("Has_Delayed_Aspects", Flag200 (Id));
8297 W ("Has_Delayed_Freeze", Flag18 (Id));
8298 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8299 W ("Has_Discriminants", Flag5 (Id));
8300 W ("Has_Dispatch_Table", Flag220 (Id));
8301 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8302 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8303 W ("Has_Exit", Flag47 (Id));
8304 W ("Has_Forward_Instantiation", Flag175 (Id));
8305 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8306 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8307 W ("Has_Homonym", Flag56 (Id));
8308 W ("Has_Implicit_Dereference", Flag251 (Id));
8309 W ("Has_Independent_Components", Flag34 (Id));
8310 W ("Has_Inheritable_Invariants", Flag248 (Id));
8311 W ("Has_Initial_Value", Flag219 (Id));
8312 W ("Has_Invariants", Flag232 (Id));
8313 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8314 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8315 W ("Has_Master_Entity", Flag21 (Id));
8316 W ("Has_Missing_Return", Flag142 (Id));
8317 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8318 W ("Has_Non_Standard_Rep", Flag75 (Id));
8319 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8320 W ("Has_Object_Size_Clause", Flag172 (Id));
8321 W ("Has_Per_Object_Constraint", Flag154 (Id));
8322 W ("Has_Postconditions", Flag240 (Id));
8323 W ("Has_Pragma_Controlled", Flag27 (Id));
8324 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8325 W ("Has_Pragma_Inline", Flag157 (Id));
8326 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8327 W ("Has_Pragma_No_Inline", Flag201 (Id));
8328 W ("Has_Pragma_Ordered", Flag198 (Id));
8329 W ("Has_Pragma_Pack", Flag121 (Id));
8330 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8331 W ("Has_Pragma_Pure", Flag203 (Id));
8332 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8333 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8334 W ("Has_Pragma_Unmodified", Flag233 (Id));
8335 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8336 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8337 W ("Has_Predicates", Flag250 (Id));
8338 W ("Has_Primitive_Operations", Flag120 (Id));
8339 W ("Has_Private_Ancestor", Flag151 (Id));
8340 W ("Has_Private_Declaration", Flag155 (Id));
8341 W ("Has_Protected", Flag271 (Id));
8342 W ("Has_Qualified_Name", Flag161 (Id));
8343 W ("Has_RACW", Flag214 (Id));
8344 W ("Has_Record_Rep_Clause", Flag65 (Id));
8345 W ("Has_Recursive_Call", Flag143 (Id));
8346 W ("Has_Shift_Operator", Flag267 (Id));
8347 W ("Has_Size_Clause", Flag29 (Id));
8348 W ("Has_Small_Clause", Flag67 (Id));
8349 W ("Has_Specified_Layout", Flag100 (Id));
8350 W ("Has_Specified_Stream_Input", Flag190 (Id));
8351 W ("Has_Specified_Stream_Output", Flag191 (Id));
8352 W ("Has_Specified_Stream_Read", Flag192 (Id));
8353 W ("Has_Specified_Stream_Write", Flag193 (Id));
8354 W ("Has_Static_Discriminants", Flag211 (Id));
8355 W ("Has_Static_Predicate", Flag269 (Id));
8356 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8357 W ("Has_Storage_Size_Clause", Flag23 (Id));
8358 W ("Has_Stream_Size_Clause", Flag184 (Id));
8359 W ("Has_Task", Flag30 (Id));
8360 W ("Has_Thunks", Flag228 (Id));
8361 W ("Has_Unchecked_Union", Flag123 (Id));
8362 W ("Has_Unknown_Discriminants", Flag72 (Id));
8363 W ("Has_Up_Level_Access", Flag215 (Id));
8364 W ("Has_Visible_Refinement", Flag263 (Id));
8365 W ("Has_Volatile_Components", Flag87 (Id));
8366 W ("Has_Xref_Entry", Flag182 (Id));
8367 W ("In_Package_Body", Flag48 (Id));
8368 W ("In_Private_Part", Flag45 (Id));
8369 W ("In_Use", Flag8 (Id));
8370 W ("Is_AST_Entry", Flag132 (Id));
8371 W ("Is_Abstract_Subprogram", Flag19 (Id));
8372 W ("Is_Abstract_Type", Flag146 (Id));
8373 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8374 W ("Is_Access_Constant", Flag69 (Id));
8375 W ("Is_Ada_2005_Only", Flag185 (Id));
8376 W ("Is_Ada_2012_Only", Flag199 (Id));
8377 W ("Is_Aliased", Flag15 (Id));
8378 W ("Is_Asynchronous", Flag81 (Id));
8379 W ("Is_Atomic", Flag85 (Id));
8380 W ("Is_Bit_Packed_Array", Flag122 (Id));
8381 W ("Is_CPP_Class", Flag74 (Id));
8382 W ("Is_Called", Flag102 (Id));
8383 W ("Is_Character_Type", Flag63 (Id));
8384 W ("Is_Child_Unit", Flag73 (Id));
8385 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8386 W ("Is_Compilation_Unit", Flag149 (Id));
8387 W ("Is_Completely_Hidden", Flag103 (Id));
8388 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8389 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8390 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8391 W ("Is_Constrained", Flag12 (Id));
8392 W ("Is_Constructor", Flag76 (Id));
8393 W ("Is_Controlled", Flag42 (Id));
8394 W ("Is_Controlling_Formal", Flag97 (Id));
8395 W ("Is_Descendent_Of_Address", Flag223 (Id));
8396 W ("Is_Discrim_SO_Function", Flag176 (Id));
8397 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8398 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8399 W ("Is_Dispatching_Operation", Flag6 (Id));
8400 W ("Is_Eliminated", Flag124 (Id));
8401 W ("Is_Entry_Formal", Flag52 (Id));
8402 W ("Is_Exported", Flag99 (Id));
8403 W ("Is_First_Subtype", Flag70 (Id));
8404 W ("Is_For_Access_Subtype", Flag118 (Id));
8405 W ("Is_Formal_Subprogram", Flag111 (Id));
8406 W ("Is_Frozen", Flag4 (Id));
8407 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8408 W ("Is_Generic_Actual_Type", Flag94 (Id));
8409 W ("Is_Generic_Instance", Flag130 (Id));
8410 W ("Is_Generic_Type", Flag13 (Id));
8411 W ("Is_Hidden", Flag57 (Id));
8412 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8413 W ("Is_Immediately_Visible", Flag7 (Id));
8414 W ("Is_Implementation_Defined", Flag254 (Id));
8415 W ("Is_Imported", Flag24 (Id));
8416 W ("Is_Independent", Flag268 (Id));
8417 W ("Is_Inlined", Flag11 (Id));
8418 W ("Is_Inlined_Always", Flag1 (Id));
8419 W ("Is_Instantiated", Flag126 (Id));
8420 W ("Is_Interface", Flag186 (Id));
8421 W ("Is_Internal", Flag17 (Id));
8422 W ("Is_Interrupt_Handler", Flag89 (Id));
8423 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8424 W ("Is_Invariant_Procedure", Flag257 (Id));
8425 W ("Is_Itype", Flag91 (Id));
8426 W ("Is_Known_Non_Null", Flag37 (Id));
8427 W ("Is_Known_Null", Flag204 (Id));
8428 W ("Is_Known_Valid", Flag170 (Id));
8429 W ("Is_Limited_Composite", Flag106 (Id));
8430 W ("Is_Limited_Interface", Flag197 (Id));
8431 W ("Is_Limited_Record", Flag25 (Id));
8432 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8433 W ("Is_Non_Static_Subtype", Flag109 (Id));
8434 W ("Is_Null_Init_Proc", Flag178 (Id));
8435 W ("Is_Obsolescent", Flag153 (Id));
8436 W ("Is_Only_Out_Parameter", Flag226 (Id));
8437 W ("Is_Optional_Parameter", Flag134 (Id));
8438 W ("Is_Package_Body_Entity", Flag160 (Id));
8439 W ("Is_Packed", Flag51 (Id));
8440 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8441 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8442 W ("Is_Predicate_Function", Flag255 (Id));
8443 W ("Is_Predicate_Function_M", Flag256 (Id));
8444 W ("Is_Preelaborated", Flag59 (Id));
8445 W ("Is_Primitive", Flag218 (Id));
8446 W ("Is_Primitive_Wrapper", Flag195 (Id));
8447 W ("Is_Private_Composite", Flag107 (Id));
8448 W ("Is_Private_Descendant", Flag53 (Id));
8449 W ("Is_Private_Primitive", Flag245 (Id));
8450 W ("Is_Processed_Transient", Flag252 (Id));
8451 W ("Is_Public", Flag10 (Id));
8452 W ("Is_Pure", Flag44 (Id));
8453 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8454 W ("Is_RACW_Stub_Type", Flag244 (Id));
8455 W ("Is_Raised", Flag224 (Id));
8456 W ("Is_Remote_Call_Interface", Flag62 (Id));
8457 W ("Is_Remote_Types", Flag61 (Id));
8458 W ("Is_Renaming_Of_Object", Flag112 (Id));
8459 W ("Is_Return_Object", Flag209 (Id));
8460 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8461 W ("Is_Shared_Passive", Flag60 (Id));
8462 W ("Is_Statically_Allocated", Flag28 (Id));
8463 W ("Is_Tag", Flag78 (Id));
8464 W ("Is_Tagged_Type", Flag55 (Id));
8465 W ("Is_Thunk", Flag225 (Id));
8466 W ("Is_Trivial_Subprogram", Flag235 (Id));
8467 W ("Is_True_Constant", Flag163 (Id));
8468 W ("Is_Unchecked_Union", Flag117 (Id));
8469 W ("Is_Underlying_Record_View", Flag246 (Id));
8470 W ("Is_Unsigned_Type", Flag144 (Id));
8471 W ("Is_VMS_Exception", Flag133 (Id));
8472 W ("Is_Valued_Procedure", Flag127 (Id));
8473 W ("Is_Visible_Formal", Flag206 (Id));
8474 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8475 W ("Is_Volatile", Flag16 (Id));
8476 W ("Itype_Printed", Flag202 (Id));
8477 W ("Kill_Elaboration_Checks", Flag32 (Id));
8478 W ("Kill_Range_Checks", Flag33 (Id));
8479 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8480 W ("Low_Bound_Tested", Flag205 (Id));
8481 W ("Machine_Radix_10", Flag84 (Id));
8482 W ("Materialize_Entity", Flag168 (Id));
8483 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8484 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8485 W ("Must_Have_Preelab_Init", Flag208 (Id));
8486 W ("Needs_Debug_Info", Flag147 (Id));
8487 W ("Needs_No_Actuals", Flag22 (Id));
8488 W ("Never_Set_In_Source", Flag115 (Id));
8489 W ("No_Pool_Assigned", Flag131 (Id));
8490 W ("No_Return", Flag113 (Id));
8491 W ("No_Strict_Aliasing", Flag136 (Id));
8492 W ("Non_Binary_Modulus", Flag58 (Id));
8493 W ("Nonzero_Is_True", Flag162 (Id));
8494 W ("OK_To_Rename", Flag247 (Id));
8495 W ("OK_To_Reorder_Components", Flag239 (Id));
8496 W ("Optimize_Alignment_Space", Flag241 (Id));
8497 W ("Optimize_Alignment_Time", Flag242 (Id));
8498 W ("Overlays_Constant", Flag243 (Id));
8499 W ("Reachable", Flag49 (Id));
8500 W ("Referenced", Flag156 (Id));
8501 W ("Referenced_As_LHS", Flag36 (Id));
8502 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8503 W ("Renamed_In_Spec", Flag231 (Id));
8504 W ("Requires_Overriding", Flag213 (Id));
8505 W ("Return_Present", Flag54 (Id));
8506 W ("Returns_By_Ref", Flag90 (Id));
8507 W ("Reverse_Bit_Order", Flag164 (Id));
8508 W ("Reverse_Storage_Order", Flag93 (Id));
8509 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8510 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8511 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8512 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8513 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8514 W ("SSO_Set_High_By_Default", Flag273 (Id));
8515 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8516 W ("Static_Elaboration_Desired", Flag77 (Id));
8517 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8518 W ("Strict_Alignment", Flag145 (Id));
8519 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8520 W ("Suppress_Initialization", Flag105 (Id));
8521 W ("Suppress_Style_Checks", Flag165 (Id));
8522 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8523 W ("Treat_As_Volatile", Flag41 (Id));
8524 W ("Universal_Aliasing", Flag216 (Id));
8525 W ("Used_As_Generic_Actual", Flag222 (Id));
8526 W ("Uses_Sec_Stack", Flag95 (Id));
8527 W ("Warnings_Off", Flag96 (Id));
8528 W ("Warnings_Off_Used", Flag236 (Id));
8529 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8530 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8531 W ("Was_Hidden", Flag196 (Id));
8532 end Write_Entity_Flags;
8534 -----------------------
8535 -- Write_Entity_Info --
8536 -----------------------
8538 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8540 procedure Write_Attribute (Which : String; Nam : E);
8541 -- Write attribute value with given string name
8543 procedure Write_Kind (Id : Entity_Id);
8544 -- Write Ekind field of entity
8546 ---------------------
8547 -- Write_Attribute --
8548 ---------------------
8550 procedure Write_Attribute (Which : String; Nam : E) is
8554 Write_Int (Int (Nam));
8556 Write_Name (Chars (Nam));
8558 end Write_Attribute;
8564 procedure Write_Kind (Id : Entity_Id) is
8565 K : constant String := Entity_Kind'Image (Ekind (Id));
8569 Write_Str (" Kind ");
8571 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8572 Write_Str ("TAGGED ");
8575 Write_Str (K (3 .. K'Length));
8578 if Is_Type (Id) and then Depends_On_Private (Id) then
8579 Write_Str ("Depends_On_Private ");
8583 -- Start of processing for Write_Entity_Info
8587 Write_Attribute ("Name ", Id);
8588 Write_Int (Int (Id));
8592 Write_Attribute (" Type ", Etype (Id));
8594 Write_Attribute (" Scope ", Scope (Id));
8599 when Discrete_Kind =>
8600 Write_Str ("Bounds: Id = ");
8602 if Present (Scalar_Range (Id)) then
8603 Write_Int (Int (Type_Low_Bound (Id)));
8604 Write_Str (" .. Id = ");
8605 Write_Int (Int (Type_High_Bound (Id)));
8607 Write_Str ("Empty");
8618 (" Component Type ", Component_Type (Id));
8621 Write_Str (" Indexes ");
8623 Index := First_Index (Id);
8624 while Present (Index) loop
8625 Write_Attribute (" ", Etype (Index));
8626 Index := Next_Index (Index);
8634 (" Directly Designated Type ",
8635 Directly_Designated_Type (Id));
8638 when Overloadable_Kind =>
8639 if Present (Homonym (Id)) then
8640 Write_Str (" Homonym ");
8641 Write_Name (Chars (Homonym (Id)));
8643 Write_Int (Int (Homonym (Id)));
8650 if Ekind (Scope (Id)) in Record_Kind then
8652 " Original_Record_Component ",
8653 Original_Record_Component (Id));
8654 Write_Int (Int (Original_Record_Component (Id)));
8658 when others => null;
8660 end Write_Entity_Info;
8662 -----------------------
8663 -- Write_Field6_Name --
8664 -----------------------
8666 procedure Write_Field6_Name (Id : Entity_Id) is
8667 pragma Warnings (Off, Id);
8669 Write_Str ("First_Rep_Item");
8670 end Write_Field6_Name;
8672 -----------------------
8673 -- Write_Field7_Name --
8674 -----------------------
8676 procedure Write_Field7_Name (Id : Entity_Id) is
8677 pragma Warnings (Off, Id);
8679 Write_Str ("Freeze_Node");
8680 end Write_Field7_Name;
8682 -----------------------
8683 -- Write_Field8_Name --
8684 -----------------------
8686 procedure Write_Field8_Name (Id : Entity_Id) is
8690 Write_Str ("Associated_Node_For_Itype");
8693 Write_Str ("Dependent_Instances");
8696 Write_Str ("First_Exit_Statement");
8699 Write_Str ("Hiding_Loop_Variable");
8703 E_Subprogram_Body =>
8704 Write_Str ("Mechanism");
8708 Write_Str ("Normalized_First_Bit");
8711 Write_Str ("Postcondition_Proc");
8713 when E_Abstract_State =>
8714 Write_Str ("Refinement_Constituents");
8716 when E_Return_Statement =>
8717 Write_Str ("Return_Applies_To");
8720 Write_Str ("Field8??");
8722 end Write_Field8_Name;
8724 -----------------------
8725 -- Write_Field9_Name --
8726 -----------------------
8728 procedure Write_Field9_Name (Id : Entity_Id) is
8732 Write_Str ("Class_Wide_Type");
8735 Write_Str ("Current_Value");
8737 when E_Abstract_State =>
8738 Write_Str ("Part_Of_Constituents");
8741 E_Generic_Function |
8743 E_Generic_Procedure |
8746 Write_Str ("Renaming_Map");
8749 Write_Str ("Field9??");
8751 end Write_Field9_Name;
8753 ------------------------
8754 -- Write_Field10_Name --
8755 ------------------------
8757 procedure Write_Field10_Name (Id : Entity_Id) is
8760 when E_Abstract_State |
8762 Write_Str ("Encapsulating_State");
8764 when Class_Wide_Kind |
8770 Write_Str ("Direct_Primitive_Operations");
8773 Write_Str ("Float_Rep");
8775 when E_In_Parameter |
8777 Write_Str ("Discriminal_Link");
8783 Write_Str ("Handler_Records");
8787 Write_Str ("Normalized_Position_Max");
8790 Write_Str ("Field10??");
8792 end Write_Field10_Name;
8794 ------------------------
8795 -- Write_Field11_Name --
8796 ------------------------
8798 procedure Write_Field11_Name (Id : Entity_Id) is
8802 Write_Str ("Block_Node");
8806 Write_Str ("Component_Bit_Offset");
8809 Write_Str ("Entry_Component");
8811 when E_Enumeration_Literal =>
8812 Write_Str ("Enumeration_Pos");
8816 Write_Str ("Full_View");
8818 when E_Generic_Package =>
8819 Write_Str ("Generic_Homonym");
8825 Write_Str ("Protected_Body_Subprogram");
8828 Write_Str ("Field11??");
8830 end Write_Field11_Name;
8832 ------------------------
8833 -- Write_Field12_Name --
8834 ------------------------
8836 procedure Write_Field12_Name (Id : Entity_Id) is
8840 Write_Str ("Associated_Formal_Package");
8843 Write_Str ("Barrier_Function");
8845 when E_Enumeration_Literal =>
8846 Write_Str ("Enumeration_Rep");
8854 E_In_Out_Parameter |
8858 Write_Str ("Esize");
8862 Write_Str ("Next_Inlined_Subprogram");
8865 Write_Str ("Field12??");
8867 end Write_Field12_Name;
8869 ------------------------
8870 -- Write_Field13_Name --
8871 ------------------------
8873 procedure Write_Field13_Name (Id : Entity_Id) is
8878 Write_Str ("Component_Clause");
8881 Write_Str ("Elaboration_Entity");
8885 Generic_Unit_Kind =>
8886 Write_Str ("Elaboration_Entity");
8890 Write_Str ("Extra_Accessibility");
8893 Write_Str ("RM_Size");
8896 Write_Str ("Field13??");
8898 end Write_Field13_Name;
8900 -----------------------
8901 -- Write_Field14_Name --
8902 -----------------------
8904 procedure Write_Field14_Name (Id : Entity_Id) is
8913 Write_Str ("Alignment");
8917 Write_Str ("First_Optional_Parameter");
8921 Write_Str ("Normalized_Position");
8924 E_Generic_Package =>
8925 Write_Str ("Shadow_Entities");
8928 Write_Str ("Field14??");
8930 end Write_Field14_Name;
8932 ------------------------
8933 -- Write_Field15_Name --
8934 ------------------------
8936 procedure Write_Field15_Name (Id : Entity_Id) is
8939 when E_Discriminant =>
8940 Write_Str ("Discriminant_Number");
8943 Write_Str ("DT_Entry_Count");
8947 Write_Str ("DT_Position");
8949 when E_Protected_Type =>
8950 Write_Str ("Entry_Bodies_Array");
8953 Write_Str ("Entry_Parameters_Type");
8956 Write_Str ("Extra_Formal");
8958 when Enumeration_Kind =>
8959 Write_Str ("Lit_Indexes");
8963 Write_Str ("Related_Instance");
8965 when Decimal_Fixed_Point_Kind =>
8966 Write_Str ("Scale_Value");
8970 Write_Str ("Status_Flag_Or_Transient_Decl");
8974 Write_Str ("Storage_Size_Variable");
8976 when E_String_Literal_Subtype =>
8977 Write_Str ("String_Literal_Low_Bound");
8980 Write_Str ("Field15??");
8982 end Write_Field15_Name;
8984 ------------------------
8985 -- Write_Field16_Name --
8986 ------------------------
8988 procedure Write_Field16_Name (Id : Entity_Id) is
8991 when E_Record_Type |
8992 E_Record_Type_With_Private =>
8993 Write_Str ("Access_Disp_Table");
8995 when E_Abstract_State =>
8996 Write_Str ("Body_References");
8998 when E_Record_Subtype |
8999 E_Class_Wide_Subtype =>
9000 Write_Str ("Cloned_Subtype");
9004 Write_Str ("DTC_Entity");
9007 Write_Str ("Entry_Formal");
9012 Write_Str ("First_Private_Entity");
9014 when Enumeration_Kind =>
9015 Write_Str ("Lit_Strings");
9017 when E_String_Literal_Subtype =>
9018 Write_Str ("String_Literal_Length");
9022 Write_Str ("Unset_Reference");
9025 Write_Str ("Field16??");
9027 end Write_Field16_Name;
9029 ------------------------
9030 -- Write_Field17_Name --
9031 ------------------------
9033 procedure Write_Field17_Name (Id : Entity_Id) is
9038 E_Generic_In_Out_Parameter |
9040 Write_Str ("Actual_Subtype");
9043 Write_Str ("Digits_Value");
9045 when E_Discriminant =>
9046 Write_Str ("Discriminal");
9055 E_Generic_Function |
9057 E_Generic_Procedure |
9065 E_Return_Statement |
9067 E_Subprogram_Type =>
9068 Write_Str ("First_Entity");
9071 Write_Str ("First_Index");
9073 when Enumeration_Kind =>
9074 Write_Str ("First_Literal");
9077 Write_Str ("Master_Id");
9079 when Modular_Integer_Kind =>
9080 Write_Str ("Modulus");
9082 when E_Abstract_State |
9083 E_Incomplete_Type =>
9084 Write_Str ("Non_Limited_View");
9086 when E_Incomplete_Subtype =>
9087 if From_Limited_With (Id) then
9088 Write_Str ("Non_Limited_View");
9092 Write_Str ("Prival");
9095 Write_Str ("Field17??");
9097 end Write_Field17_Name;
9099 ------------------------
9100 -- Write_Field18_Name --
9101 ------------------------
9103 procedure Write_Field18_Name (Id : Entity_Id) is
9106 when E_Enumeration_Literal |
9110 Write_Str ("Alias");
9112 when E_Record_Type =>
9113 Write_Str ("Corresponding_Concurrent_Type");
9115 when E_Subprogram_Body =>
9116 Write_Str ("Corresponding_Protected_Entry");
9118 when Concurrent_Kind =>
9119 Write_Str ("Corresponding_Record_Type");
9124 Write_Str ("Enclosing_Scope");
9126 when E_Entry_Index_Parameter =>
9127 Write_Str ("Entry_Index_Constant");
9129 when E_Class_Wide_Subtype |
9130 E_Access_Protected_Subprogram_Type |
9131 E_Anonymous_Access_Protected_Subprogram_Type |
9132 E_Access_Subprogram_Type |
9134 Write_Str ("Equivalent_Type");
9136 when Fixed_Point_Kind =>
9137 Write_Str ("Delta_Value");
9139 when Incomplete_Or_Private_Kind |
9141 Write_Str ("Private_Dependents");
9144 Write_Str ("Renamed_Object");
9148 E_Generic_Function |
9149 E_Generic_Procedure |
9150 E_Generic_Package =>
9151 Write_Str ("Renamed_Entity");
9154 Write_Str ("Field18??");
9156 end Write_Field18_Name;
9158 -----------------------
9159 -- Write_Field19_Name --
9160 -----------------------
9162 procedure Write_Field19_Name (Id : Entity_Id) is
9166 E_Generic_Package =>
9167 Write_Str ("Body_Entity");
9169 when E_Discriminant =>
9170 Write_Str ("Corresponding_Discriminant");
9173 Write_Str ("Default_Aspect_Value");
9175 when E_Array_Type =>
9176 Write_Str ("Default_Component_Value");
9178 when E_Record_Type =>
9179 Write_Str ("Parent_Subtype");
9183 Write_Str ("Size_Check_Code");
9185 when E_Package_Body |
9187 Write_Str ("Spec_Entity");
9189 when Private_Kind =>
9190 Write_Str ("Underlying_Full_View");
9192 when E_Function | E_Operator | E_Subprogram_Type =>
9193 Write_Str ("Extra_Accessibility_Of_Result");
9196 Write_Str ("Field19??");
9198 end Write_Field19_Name;
9200 -----------------------
9201 -- Write_Field20_Name --
9202 -----------------------
9204 procedure Write_Field20_Name (Id : Entity_Id) is
9208 Write_Str ("Component_Type");
9210 when E_In_Parameter |
9211 E_Generic_In_Parameter =>
9212 Write_Str ("Default_Value");
9215 Write_Str ("Directly_Designated_Type");
9218 Write_Str ("Discriminant_Checking_Func");
9220 when E_Discriminant =>
9221 Write_Str ("Discriminant_Default_Value");
9230 E_Generic_Function |
9232 E_Generic_Procedure |
9240 E_Return_Statement |
9242 E_Subprogram_Type =>
9243 Write_Str ("Last_Entity");
9247 Write_Str ("Prival_Link");
9250 Write_Str ("Scalar_Range");
9253 Write_Str ("Register_Exception_Call");
9256 Write_Str ("Field20??");
9258 end Write_Field20_Name;
9260 -----------------------
9261 -- Write_Field21_Name --
9262 -----------------------
9264 procedure Write_Field21_Name (Id : Entity_Id) is
9268 Write_Str ("Accept_Address");
9270 when E_In_Parameter =>
9271 Write_Str ("Default_Expr_Function");
9273 when Concurrent_Kind |
9274 Incomplete_Or_Private_Kind |
9278 Write_Str ("Discriminant_Constraint");
9283 E_Generic_Function |
9285 E_Generic_Procedure |
9287 Write_Str ("Interface_Name");
9290 Modular_Integer_Kind =>
9291 Write_Str ("Original_Array_Type");
9293 when Fixed_Point_Kind =>
9294 Write_Str ("Small_Value");
9297 Write_Str ("Field21??");
9299 end Write_Field21_Name;
9301 -----------------------
9302 -- Write_Field22_Name --
9303 -----------------------
9305 procedure Write_Field22_Name (Id : Entity_Id) is
9309 Write_Str ("Associated_Storage_Pool");
9312 Write_Str ("Component_Size");
9314 when E_Record_Type =>
9315 Write_Str ("Corresponding_Remote_Type");
9319 Write_Str ("Original_Record_Component");
9321 when E_Enumeration_Literal =>
9322 Write_Str ("Enumeration_Rep_Expr");
9325 Write_Str ("Exception_Code");
9327 when E_Record_Type_With_Private |
9328 E_Record_Subtype_With_Private |
9331 E_Limited_Private_Type |
9332 E_Limited_Private_Subtype =>
9333 Write_Str ("Private_View");
9336 Write_Str ("Protected_Formal");
9346 E_Generic_Function |
9347 E_Generic_Procedure |
9350 E_Return_Statement |
9353 Write_Str ("Scope_Depth_Value");
9356 Write_Str ("Shared_Var_Procs_Instance");
9359 Write_Str ("Field22??");
9361 end Write_Field22_Name;
9363 ------------------------
9364 -- Write_Field23_Name --
9365 ------------------------
9367 procedure Write_Field23_Name (Id : Entity_Id) is
9370 when E_Discriminant =>
9371 Write_Str ("CR_Discriminant");
9374 Write_Str ("Entry_Cancel_Parameter");
9376 when E_Enumeration_Type =>
9377 Write_Str ("Enum_Pos_To_Rep");
9381 Write_Str ("Extra_Constrained");
9384 Write_Str ("Finalization_Master");
9386 when E_Generic_Function |
9388 E_Generic_Procedure =>
9389 Write_Str ("Inner_Instances");
9392 Write_Str ("Packed_Array_Impl_Type");
9395 Write_Str ("Protection_Object");
9397 when Concurrent_Kind |
9398 Incomplete_Or_Private_Kind |
9402 Write_Str ("Stored_Constraint");
9406 if Present (Scope (Id))
9407 and then Is_Protected_Type (Scope (Id))
9409 Write_Str ("Protection_Object");
9411 Write_Str ("Generic_Renamings");
9415 if Is_Generic_Instance (Id) then
9416 Write_Str ("Generic_Renamings");
9418 Write_Str ("Limited_View");
9422 Write_Str ("Field23??");
9424 end Write_Field23_Name;
9426 ------------------------
9427 -- Write_Field24_Name --
9428 ------------------------
9430 procedure Write_Field24_Name (Id : Entity_Id) is
9436 Write_Str ("Related_Expression");
9439 Write_Str ("Field24???");
9441 end Write_Field24_Name;
9443 ------------------------
9444 -- Write_Field25_Name --
9445 ------------------------
9447 procedure Write_Field25_Name (Id : Entity_Id) is
9450 when E_Generic_Package |
9452 Write_Str ("Abstract_States");
9455 Write_Str ("Debug_Renaming_Link");
9458 Write_Str ("DT_Offset_To_Top_Func");
9462 Write_Str ("Interface_Alias");
9464 when E_Record_Type |
9466 E_Record_Type_With_Private |
9467 E_Record_Subtype_With_Private =>
9468 Write_Str ("Interfaces");
9472 Write_Str ("Related_Array_Object");
9475 Write_Str ("Task_Body_Procedure");
9479 Write_Str ("PPC_Wrapper");
9481 when Discrete_Kind =>
9482 Write_Str ("Static_Discrete_Predicate");
9485 Write_Str ("Static_Real_Or_String_Predicate");
9488 Write_Str ("Field25??");
9490 end Write_Field25_Name;
9492 ------------------------
9493 -- Write_Field26_Name --
9494 ------------------------
9496 procedure Write_Field26_Name (Id : Entity_Id) is
9499 when E_Record_Type |
9500 E_Record_Type_With_Private =>
9501 Write_Str ("Dispatch_Table_Wrappers");
9503 when E_In_Out_Parameter |
9506 Write_Str ("Last_Assignment");
9508 when E_Access_Subprogram_Type =>
9509 Write_Str ("Original_Access_Type");
9511 when E_Generic_Package |
9513 Write_Str ("Package_Instantiation");
9517 Write_Str ("Related_Type");
9520 Write_Str ("Relative_Deadline_Variable");
9524 Write_Str ("Overridden_Operation");
9527 Write_Str ("Field26??");
9529 end Write_Field26_Name;
9531 ------------------------
9532 -- Write_Field27_Name --
9533 ------------------------
9535 procedure Write_Field27_Name (Id : Entity_Id) is
9540 Write_Str ("Current_Use_Clause");
9545 Write_Str ("Related_Type");
9549 Write_Str ("Wrapped_Entity");
9552 Write_Str ("Field27??");
9554 end Write_Field27_Name;
9556 ------------------------
9557 -- Write_Field28_Name --
9558 ------------------------
9560 procedure Write_Field28_Name (Id : Entity_Id) is
9568 E_Subprogram_Type =>
9569 Write_Str ("Extra_Formals");
9573 Write_Str ("Finalizer");
9577 Write_Str ("Initialization_Statements");
9579 when E_Record_Type =>
9580 Write_Str ("Underlying_Record_View");
9583 Write_Str ("Field28??");
9585 end Write_Field28_Name;
9587 ------------------------
9588 -- Write_Field29_Name --
9589 ------------------------
9591 procedure Write_Field29_Name (Id : Entity_Id) is
9596 Write_Str ("BIP_Initialization_Call");
9599 Write_Str ("Subprograms_For_Type");
9602 Write_Str ("Field29??");
9604 end Write_Field29_Name;
9606 ------------------------
9607 -- Write_Field30_Name --
9608 ------------------------
9610 procedure Write_Field30_Name (Id : Entity_Id) is
9614 Write_Str ("Corresponding_Equality");
9618 Write_Str ("Last_Aggregate_Assignment");
9621 Write_Str ("Static_Initialization");
9624 Write_Str ("Field30??");
9626 end Write_Field30_Name;
9628 ------------------------
9629 -- Write_Field31_Name --
9630 ------------------------
9632 procedure Write_Field31_Name (Id : Entity_Id) is
9637 Write_Str ("Thunk_Entity");
9640 Write_Str ("Derived_Type_Link");
9643 Write_Str ("Field31??");
9645 end Write_Field31_Name;
9647 ------------------------
9648 -- Write_Field32_Name --
9649 ------------------------
9651 procedure Write_Field32_Name (Id : Entity_Id) is
9655 E_Generic_Function |
9657 E_Generic_Procedure |
9661 E_Subprogram_Body =>
9662 Write_Str ("SPARK_Pragma");
9665 Write_Str ("Field32??");
9667 end Write_Field32_Name;
9669 ------------------------
9670 -- Write_Field33_Name --
9671 ------------------------
9673 procedure Write_Field33_Name (Id : Entity_Id) is
9676 when E_Generic_Package |
9679 Write_Str ("SPARK_Aux_Pragma");
9685 Write_Str ("Linker_Section_Pragma");
9688 Write_Str ("Field33??");
9690 end Write_Field33_Name;
9692 ------------------------
9693 -- Write_Field34_Name --
9694 ------------------------
9696 procedure Write_Field34_Name (Id : Entity_Id) is
9706 Generic_Subprogram_Kind |
9708 Write_Str ("Contract");
9711 Write_Str ("Field34??");
9713 end Write_Field34_Name;
9715 ------------------------
9716 -- Write_Field35_Name --
9717 ------------------------
9719 procedure Write_Field35_Name (Id : Entity_Id) is
9722 when Subprogram_Kind =>
9723 Write_Str ("Import_Pragma");
9725 Write_Str ("Field35??");
9727 end Write_Field35_Name;
9729 -------------------------
9730 -- Iterator Procedures --
9731 -------------------------
9733 procedure Proc_Next_Component (N : in out Node_Id) is
9735 N := Next_Component (N);
9736 end Proc_Next_Component;
9738 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9740 N := Next_Entity (N);
9741 while Present (N) loop
9742 exit when Ekind_In (N, E_Component, E_Discriminant);
9743 N := Next_Entity (N);
9745 end Proc_Next_Component_Or_Discriminant;
9747 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9749 N := Next_Discriminant (N);
9750 end Proc_Next_Discriminant;
9752 procedure Proc_Next_Formal (N : in out Node_Id) is
9754 N := Next_Formal (N);
9755 end Proc_Next_Formal;
9757 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9759 N := Next_Formal_With_Extras (N);
9760 end Proc_Next_Formal_With_Extras;
9762 procedure Proc_Next_Index (N : in out Node_Id) is
9764 N := Next_Index (N);
9765 end Proc_Next_Index;
9767 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9769 N := Next_Inlined_Subprogram (N);
9770 end Proc_Next_Inlined_Subprogram;
9772 procedure Proc_Next_Literal (N : in out Node_Id) is
9774 N := Next_Literal (N);
9775 end Proc_Next_Literal;
9777 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9779 N := Next_Stored_Discriminant (N);
9780 end Proc_Next_Stored_Discriminant;