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 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Body_References Elist16
136 -- Cloned_Subtype Node16
138 -- Entry_Formal Node16
139 -- First_Private_Entity Node16
140 -- Lit_Strings Node16
141 -- String_Literal_Length Uint16
142 -- Unset_Reference Node16
144 -- Actual_Subtype Node17
145 -- Digits_Value Uint17
146 -- Discriminal Node17
147 -- First_Entity Node17
148 -- First_Index Node17
149 -- First_Literal Node17
152 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Protected_Entry Node18
158 -- Corresponding_Record_Type Node18
159 -- Delta_Value Ureal18
160 -- Enclosing_Scope Node18
161 -- Equivalent_Type Node18
162 -- Private_Dependents Elist18
163 -- Renamed_Entity Node18
164 -- Renamed_Object Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Impl_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
217 -- Interface_Alias Node25
218 -- Interfaces Elist25
219 -- Debug_Renaming_Link Node25
220 -- DT_Offset_To_Top_Func Node25
221 -- PPC_Wrapper Node25
222 -- Related_Array_Object Node25
223 -- Static_Discrete_Predicate List25
224 -- Static_Real_Or_String_Predicate Node25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- BIP_Initialization_Call Node29
244 -- Subprograms_For_Type Node29
246 -- Corresponding_Equality Node30
247 -- Last_Aggregate_Assignment Node30
248 -- Static_Initialization Node30
250 -- Derived_Type_Link Node31
251 -- Thunk_Entity Node31
253 -- SPARK_Pragma Node32
255 -- Linker_Section_Pragma Node33
256 -- SPARK_Aux_Pragma Node33
260 -- Import_Pragma Node35
262 ---------------------------------------------
263 -- Usage of Flags in Defining Entity Nodes --
264 ---------------------------------------------
266 -- All flags are unique, there is no overlaying, so each flag is physically
267 -- present in every entity. However, for many of the flags, it only makes
268 -- sense for them to be set true for certain subsets of entity kinds. See
269 -- the spec of Einfo for further details.
271 -- Is_Inlined_Always Flag1
272 -- Is_Hidden_Non_Overridden_Subpgm Flag2
273 -- Has_Default_Init_Cond Flag3
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_Default_Init_Cond_Procedure Flag132
416 -- Has_Inherited_Default_Init_Cond Flag133
417 -- Returns_Limited_View 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_High_By_Default) Flag273
572 -- Is_Generic_Actual_Subprogram Flag274
573 -- No_Predicate_On_Actual Flag275
574 -- No_Dynamic_Predicate_On_Actual Flag276
590 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
592 -----------------------
593 -- Local subprograms --
594 -----------------------
597 (State_Id : Entity_Id;
598 Option_Nam : Name_Id) return Boolean;
599 -- Determine whether abstract state State_Id has particular option denoted
600 -- by the name Option_Nam.
606 function Float_Rep (Id : E) return F is
607 pragma Assert (Is_Floating_Point_Type (Id));
609 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
617 (State_Id : Entity_Id;
618 Option_Nam : Name_Id) return Boolean
620 Decl : constant Node_Id := Parent (State_Id);
625 pragma Assert (Ekind (State_Id) = E_Abstract_State);
627 -- The declaration of abstract states with options appear as an
628 -- extension aggregate. If this is not the case, the option is not
631 if Nkind (Decl) /= N_Extension_Aggregate then
637 Opt := First (Expressions (Decl));
638 while Present (Opt) loop
640 -- Currently the only simple option allowed is External
642 if Nkind (Opt) = N_Identifier
643 and then Chars (Opt) = Name_External
644 and then Chars (Opt) = Option_Nam
652 -- Complex options with various specifiers
654 Opt := First (Component_Associations (Decl));
655 while Present (Opt) loop
656 Opt_Nam := First (Choices (Opt));
658 if Nkind (Opt_Nam) = N_Identifier
659 and then Chars (Opt_Nam) = Option_Nam
670 --------------------------------
671 -- Attribute Access Functions --
672 --------------------------------
674 function Abstract_States (Id : E) return L is
676 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
680 function Accept_Address (Id : E) return L is
685 function Access_Disp_Table (Id : E) return L is
687 pragma Assert (Ekind_In (Id, E_Record_Type,
689 return Elist16 (Implementation_Base_Type (Id));
690 end Access_Disp_Table;
692 function Actual_Subtype (Id : E) return E is
695 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
696 or else Is_Formal (Id));
700 function Address_Taken (Id : E) return B is
705 function Alias (Id : E) return E is
708 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
712 function Alignment (Id : E) return U is
714 pragma Assert (Is_Type (Id)
715 or else Is_Formal (Id)
716 or else Ekind_In (Id, E_Loop_Parameter,
723 function Associated_Formal_Package (Id : E) return E is
725 pragma Assert (Ekind (Id) = E_Package);
727 end Associated_Formal_Package;
729 function Associated_Node_For_Itype (Id : E) return N is
732 end Associated_Node_For_Itype;
734 function Associated_Storage_Pool (Id : E) return E is
736 pragma Assert (Is_Access_Type (Id));
737 return Node22 (Root_Type (Id));
738 end Associated_Storage_Pool;
740 function Barrier_Function (Id : E) return N is
742 pragma Assert (Is_Entry (Id));
744 end Barrier_Function;
746 function Block_Node (Id : E) return N is
748 pragma Assert (Ekind (Id) = E_Block);
752 function Body_Entity (Id : E) return E is
754 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
758 function Body_Needed_For_SAL (Id : E) return B is
761 (Ekind (Id) = E_Package
762 or else Is_Subprogram (Id)
763 or else Is_Generic_Unit (Id));
765 end Body_Needed_For_SAL;
767 function Body_References (Id : E) return L is
769 pragma Assert (Ekind (Id) = E_Abstract_State);
773 function BIP_Initialization_Call (Id : E) return N is
775 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
777 end BIP_Initialization_Call;
779 function C_Pass_By_Copy (Id : E) return B is
781 pragma Assert (Is_Record_Type (Id));
782 return Flag125 (Implementation_Base_Type (Id));
785 function Can_Never_Be_Null (Id : E) return B is
788 end Can_Never_Be_Null;
790 function Checks_May_Be_Suppressed (Id : E) return B is
793 end Checks_May_Be_Suppressed;
795 function Class_Wide_Type (Id : E) return E is
797 pragma Assert (Is_Type (Id));
801 function Cloned_Subtype (Id : E) return E is
803 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
807 function Component_Bit_Offset (Id : E) return U is
809 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
811 end Component_Bit_Offset;
813 function Component_Clause (Id : E) return N is
815 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
817 end Component_Clause;
819 function Component_Size (Id : E) return U is
821 pragma Assert (Is_Array_Type (Id));
822 return Uint22 (Implementation_Base_Type (Id));
825 function Component_Type (Id : E) return E is
827 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
828 return Node20 (Implementation_Base_Type (Id));
831 function Corresponding_Concurrent_Type (Id : E) return E is
833 pragma Assert (Ekind (Id) = E_Record_Type);
835 end Corresponding_Concurrent_Type;
837 function Corresponding_Discriminant (Id : E) return E is
839 pragma Assert (Ekind (Id) = E_Discriminant);
841 end Corresponding_Discriminant;
843 function Corresponding_Equality (Id : E) return E is
846 (Ekind (Id) = E_Function
847 and then not Comes_From_Source (Id)
848 and then Chars (Id) = Name_Op_Ne);
850 end Corresponding_Equality;
852 function Corresponding_Protected_Entry (Id : E) return E is
854 pragma Assert (Ekind (Id) = E_Subprogram_Body);
856 end Corresponding_Protected_Entry;
858 function Corresponding_Record_Type (Id : E) return E is
860 pragma Assert (Is_Concurrent_Type (Id));
862 end Corresponding_Record_Type;
864 function Corresponding_Remote_Type (Id : E) return E is
867 end Corresponding_Remote_Type;
869 function Current_Use_Clause (Id : E) return E is
871 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
873 end Current_Use_Clause;
875 function Current_Value (Id : E) return N is
877 pragma Assert (Ekind (Id) in Object_Kind);
881 function CR_Discriminant (Id : E) return E is
886 function Debug_Info_Off (Id : E) return B is
891 function Debug_Renaming_Link (Id : E) return E is
894 end Debug_Renaming_Link;
896 function Default_Aspect_Component_Value (Id : E) return N is
898 pragma Assert (Is_Array_Type (Id));
899 return Node19 (Base_Type (Id));
900 end Default_Aspect_Component_Value;
902 function Default_Aspect_Value (Id : E) return N is
904 pragma Assert (Is_Scalar_Type (Id));
905 return Node19 (Base_Type (Id));
906 end Default_Aspect_Value;
908 function Default_Expr_Function (Id : E) return E is
910 pragma Assert (Is_Formal (Id));
912 end Default_Expr_Function;
914 function Default_Expressions_Processed (Id : E) return B is
917 end Default_Expressions_Processed;
919 function Default_Value (Id : E) return N is
921 pragma Assert (Is_Formal (Id));
925 function Delay_Cleanups (Id : E) return B is
930 function Delay_Subprogram_Descriptors (Id : E) return B is
933 end Delay_Subprogram_Descriptors;
935 function Delta_Value (Id : E) return R is
937 pragma Assert (Is_Fixed_Point_Type (Id));
941 function Dependent_Instances (Id : E) return L is
943 pragma Assert (Is_Generic_Instance (Id));
945 end Dependent_Instances;
947 function Depends_On_Private (Id : E) return B is
949 pragma Assert (Nkind (Id) in N_Entity);
951 end Depends_On_Private;
953 function Derived_Type_Link (Id : E) return E is
955 pragma Assert (Is_Type (Id));
956 return Node31 (Base_Type (Id));
957 end Derived_Type_Link;
959 function Digits_Value (Id : E) return U is
962 (Is_Floating_Point_Type (Id)
963 or else Is_Decimal_Fixed_Point_Type (Id));
967 function Direct_Primitive_Operations (Id : E) return L is
969 pragma Assert (Is_Tagged_Type (Id));
971 end Direct_Primitive_Operations;
973 function Directly_Designated_Type (Id : E) return E is
975 pragma Assert (Is_Access_Type (Id));
977 end Directly_Designated_Type;
979 function Discard_Names (Id : E) return B is
984 function Discriminal (Id : E) return E is
986 pragma Assert (Ekind (Id) = E_Discriminant);
990 function Discriminal_Link (Id : E) return N is
993 end Discriminal_Link;
995 function Discriminant_Checking_Func (Id : E) return E is
997 pragma Assert (Ekind (Id) = E_Component);
999 end Discriminant_Checking_Func;
1001 function Discriminant_Constraint (Id : E) return L is
1003 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1004 return Elist21 (Id);
1005 end Discriminant_Constraint;
1007 function Discriminant_Default_Value (Id : E) return N is
1009 pragma Assert (Ekind (Id) = E_Discriminant);
1011 end Discriminant_Default_Value;
1013 function Discriminant_Number (Id : E) return U is
1015 pragma Assert (Ekind (Id) = E_Discriminant);
1017 end Discriminant_Number;
1019 function Dispatch_Table_Wrappers (Id : E) return L is
1021 pragma Assert (Ekind_In (Id, E_Record_Type,
1023 return Elist26 (Implementation_Base_Type (Id));
1024 end Dispatch_Table_Wrappers;
1026 function DT_Entry_Count (Id : E) return U is
1028 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1032 function DT_Offset_To_Top_Func (Id : E) return E is
1034 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1036 end DT_Offset_To_Top_Func;
1038 function DT_Position (Id : E) return U is
1040 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1041 and then Present (DTC_Entity (Id)));
1045 function DTC_Entity (Id : E) return E is
1047 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1051 function Elaborate_Body_Desirable (Id : E) return B is
1053 pragma Assert (Ekind (Id) = E_Package);
1054 return Flag210 (Id);
1055 end Elaborate_Body_Desirable;
1057 function Elaboration_Entity (Id : E) return E is
1062 Ekind (Id) = E_Package
1064 Is_Generic_Unit (Id));
1066 end Elaboration_Entity;
1068 function Elaboration_Entity_Required (Id : E) return B is
1073 Ekind (Id) = E_Package
1075 Is_Generic_Unit (Id));
1076 return Flag174 (Id);
1077 end Elaboration_Entity_Required;
1079 function Encapsulating_State (Id : E) return N is
1081 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1083 end Encapsulating_State;
1085 function Enclosing_Scope (Id : E) return E is
1088 end Enclosing_Scope;
1090 function Entry_Accepted (Id : E) return B is
1092 pragma Assert (Is_Entry (Id));
1093 return Flag152 (Id);
1096 function Entry_Bodies_Array (Id : E) return E is
1099 end Entry_Bodies_Array;
1101 function Entry_Cancel_Parameter (Id : E) return E is
1104 end Entry_Cancel_Parameter;
1106 function Entry_Component (Id : E) return E is
1109 end Entry_Component;
1111 function Entry_Formal (Id : E) return E is
1116 function Entry_Index_Constant (Id : E) return N is
1118 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1120 end Entry_Index_Constant;
1122 function Contract (Id : E) return N is
1125 (Ekind_In (Id, E_Entry,
1132 or else Is_Generic_Subprogram (Id)
1133 or else Is_Subprogram (Id));
1137 function Entry_Parameters_Type (Id : E) return E is
1140 end Entry_Parameters_Type;
1142 function Enum_Pos_To_Rep (Id : E) return E is
1144 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1146 end Enum_Pos_To_Rep;
1148 function Enumeration_Pos (Id : E) return Uint is
1150 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1152 end Enumeration_Pos;
1154 function Enumeration_Rep (Id : E) return U is
1156 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1158 end Enumeration_Rep;
1160 function Enumeration_Rep_Expr (Id : E) return N is
1162 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1164 end Enumeration_Rep_Expr;
1166 function Equivalent_Type (Id : E) return E is
1169 (Ekind_In (Id, E_Class_Wide_Type,
1170 E_Class_Wide_Subtype,
1171 E_Access_Subprogram_Type,
1172 E_Access_Protected_Subprogram_Type,
1173 E_Anonymous_Access_Protected_Subprogram_Type,
1174 E_Access_Subprogram_Type,
1177 end Equivalent_Type;
1179 function Esize (Id : E) return Uint is
1184 function Extra_Accessibility (Id : E) return E is
1187 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1189 end Extra_Accessibility;
1191 function Extra_Accessibility_Of_Result (Id : E) return E is
1193 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1195 end Extra_Accessibility_Of_Result;
1197 function Extra_Constrained (Id : E) return E is
1199 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1201 end Extra_Constrained;
1203 function Extra_Formal (Id : E) return E is
1208 function Extra_Formals (Id : E) return E is
1211 (Is_Overloadable (Id)
1212 or else Ekind_In (Id, E_Entry_Family,
1214 E_Subprogram_Type));
1218 function Can_Use_Internal_Rep (Id : E) return B is
1220 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1221 return Flag229 (Base_Type (Id));
1222 end Can_Use_Internal_Rep;
1224 function Finalization_Master (Id : E) return E is
1226 pragma Assert (Is_Access_Type (Id));
1227 return Node23 (Root_Type (Id));
1228 end Finalization_Master;
1230 function Finalize_Storage_Only (Id : E) return B is
1232 pragma Assert (Is_Type (Id));
1233 return Flag158 (Base_Type (Id));
1234 end Finalize_Storage_Only;
1236 function Finalizer (Id : E) return E is
1238 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1242 function First_Entity (Id : E) return E is
1247 function First_Exit_Statement (Id : E) return N is
1249 pragma Assert (Ekind (Id) = E_Loop);
1251 end First_Exit_Statement;
1253 function First_Index (Id : E) return N is
1255 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1259 function First_Literal (Id : E) return E is
1261 pragma Assert (Is_Enumeration_Type (Id));
1265 function First_Private_Entity (Id : E) return E is
1267 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1268 or else Ekind (Id) in Concurrent_Kind);
1270 end First_Private_Entity;
1272 function First_Rep_Item (Id : E) return E is
1277 function Freeze_Node (Id : E) return N is
1282 function From_Limited_With (Id : E) return B is
1284 return Flag159 (Id);
1285 end From_Limited_With;
1287 function Full_View (Id : E) return E is
1289 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1293 function Generic_Homonym (Id : E) return E is
1295 pragma Assert (Ekind (Id) = E_Generic_Package);
1297 end Generic_Homonym;
1299 function Generic_Renamings (Id : E) return L is
1301 return Elist23 (Id);
1302 end Generic_Renamings;
1304 function Handler_Records (Id : E) return S is
1307 end Handler_Records;
1309 function Has_Aliased_Components (Id : E) return B is
1311 return Flag135 (Implementation_Base_Type (Id));
1312 end Has_Aliased_Components;
1314 function Has_Alignment_Clause (Id : E) return B is
1317 end Has_Alignment_Clause;
1319 function Has_All_Calls_Remote (Id : E) return B is
1322 end Has_All_Calls_Remote;
1324 function Has_Anonymous_Master (Id : E) return B is
1327 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1328 return Flag253 (Id);
1329 end Has_Anonymous_Master;
1331 function Has_Atomic_Components (Id : E) return B is
1333 return Flag86 (Implementation_Base_Type (Id));
1334 end Has_Atomic_Components;
1336 function Has_Biased_Representation (Id : E) return B is
1338 return Flag139 (Id);
1339 end Has_Biased_Representation;
1341 function Has_Completion (Id : E) return B is
1346 function Has_Completion_In_Body (Id : E) return B is
1348 pragma Assert (Is_Type (Id));
1350 end Has_Completion_In_Body;
1352 function Has_Complex_Representation (Id : E) return B is
1354 pragma Assert (Is_Type (Id));
1355 return Flag140 (Implementation_Base_Type (Id));
1356 end Has_Complex_Representation;
1358 function Has_Component_Size_Clause (Id : E) return B is
1360 pragma Assert (Is_Array_Type (Id));
1361 return Flag68 (Implementation_Base_Type (Id));
1362 end Has_Component_Size_Clause;
1364 function Has_Constrained_Partial_View (Id : E) return B is
1366 pragma Assert (Is_Type (Id));
1367 return Flag187 (Id);
1368 end Has_Constrained_Partial_View;
1370 function Has_Controlled_Component (Id : E) return B is
1372 return Flag43 (Base_Type (Id));
1373 end Has_Controlled_Component;
1375 function Has_Contiguous_Rep (Id : E) return B is
1377 return Flag181 (Id);
1378 end Has_Contiguous_Rep;
1380 function Has_Controlling_Result (Id : E) return B is
1383 end Has_Controlling_Result;
1385 function Has_Convention_Pragma (Id : E) return B is
1387 return Flag119 (Id);
1388 end Has_Convention_Pragma;
1390 function Has_Default_Aspect (Id : E) return B is
1392 return Flag39 (Base_Type (Id));
1393 end Has_Default_Aspect;
1395 function Has_Default_Init_Cond (Id : E) return B is
1398 end Has_Default_Init_Cond;
1400 function Has_Delayed_Aspects (Id : E) return B is
1402 pragma Assert (Nkind (Id) in N_Entity);
1403 return Flag200 (Id);
1404 end Has_Delayed_Aspects;
1406 function Has_Delayed_Freeze (Id : E) return B is
1408 pragma Assert (Nkind (Id) in N_Entity);
1410 end Has_Delayed_Freeze;
1412 function Has_Delayed_Rep_Aspects (Id : E) return B is
1414 pragma Assert (Nkind (Id) in N_Entity);
1415 return Flag261 (Id);
1416 end Has_Delayed_Rep_Aspects;
1418 function Has_Discriminants (Id : E) return B is
1420 pragma Assert (Nkind (Id) in N_Entity);
1422 end Has_Discriminants;
1424 function Has_Dispatch_Table (Id : E) return B is
1426 pragma Assert (Is_Tagged_Type (Id));
1427 return Flag220 (Id);
1428 end Has_Dispatch_Table;
1430 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1432 pragma Assert (Is_Type (Id));
1433 return Flag258 (Id);
1434 end Has_Dynamic_Predicate_Aspect;
1436 function Has_Enumeration_Rep_Clause (Id : E) return B is
1438 pragma Assert (Is_Enumeration_Type (Id));
1440 end Has_Enumeration_Rep_Clause;
1442 function Has_Exit (Id : E) return B is
1447 function Has_Forward_Instantiation (Id : E) return B is
1449 return Flag175 (Id);
1450 end Has_Forward_Instantiation;
1452 function Has_Fully_Qualified_Name (Id : E) return B is
1454 return Flag173 (Id);
1455 end Has_Fully_Qualified_Name;
1457 function Has_Gigi_Rep_Item (Id : E) return B is
1460 end Has_Gigi_Rep_Item;
1462 function Has_Homonym (Id : E) return B is
1467 function Has_Implicit_Dereference (Id : E) return B is
1469 return Flag251 (Id);
1470 end Has_Implicit_Dereference;
1472 function Has_Independent_Components (Id : E) return B is
1474 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1475 return Flag34 (Base_Type (Id));
1476 end Has_Independent_Components;
1478 function Has_Inheritable_Invariants (Id : E) return B is
1480 pragma Assert (Is_Type (Id));
1481 return Flag248 (Id);
1482 end Has_Inheritable_Invariants;
1484 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1486 pragma Assert (Is_Type (Id));
1487 return Flag133 (Id);
1488 end Has_Inherited_Default_Init_Cond;
1490 function Has_Initial_Value (Id : E) return B is
1492 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1493 return Flag219 (Id);
1494 end Has_Initial_Value;
1496 function Has_Invariants (Id : E) return B is
1498 pragma Assert (Is_Type (Id));
1499 return Flag232 (Id);
1502 function Has_Loop_Entry_Attributes (Id : E) return B is
1504 pragma Assert (Ekind (Id) = E_Loop);
1505 return Flag260 (Id);
1506 end Has_Loop_Entry_Attributes;
1508 function Has_Machine_Radix_Clause (Id : E) return B is
1510 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1512 end Has_Machine_Radix_Clause;
1514 function Has_Master_Entity (Id : E) return B is
1517 end Has_Master_Entity;
1519 function Has_Missing_Return (Id : E) return B is
1521 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1522 return Flag142 (Id);
1523 end Has_Missing_Return;
1525 function Has_Nested_Block_With_Handler (Id : E) return B is
1527 return Flag101 (Id);
1528 end Has_Nested_Block_With_Handler;
1530 function Has_Non_Standard_Rep (Id : E) return B is
1532 return Flag75 (Implementation_Base_Type (Id));
1533 end Has_Non_Standard_Rep;
1535 function Has_Object_Size_Clause (Id : E) return B is
1537 pragma Assert (Is_Type (Id));
1538 return Flag172 (Id);
1539 end Has_Object_Size_Clause;
1541 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1543 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1544 return Flag110 (Id);
1545 end Has_Out_Or_In_Out_Parameter;
1547 function Has_Per_Object_Constraint (Id : E) return B is
1549 return Flag154 (Id);
1550 end Has_Per_Object_Constraint;
1552 function Has_Postconditions (Id : E) return B is
1554 pragma Assert (Is_Subprogram (Id));
1555 return Flag240 (Id);
1556 end Has_Postconditions;
1558 function Has_Pragma_Controlled (Id : E) return B is
1560 pragma Assert (Is_Access_Type (Id));
1561 return Flag27 (Implementation_Base_Type (Id));
1562 end Has_Pragma_Controlled;
1564 function Has_Pragma_Elaborate_Body (Id : E) return B is
1566 return Flag150 (Id);
1567 end Has_Pragma_Elaborate_Body;
1569 function Has_Pragma_Inline (Id : E) return B is
1571 return Flag157 (Id);
1572 end Has_Pragma_Inline;
1574 function Has_Pragma_Inline_Always (Id : E) return B is
1576 return Flag230 (Id);
1577 end Has_Pragma_Inline_Always;
1579 function Has_Pragma_No_Inline (Id : E) return B is
1581 return Flag201 (Id);
1582 end Has_Pragma_No_Inline;
1584 function Has_Pragma_Ordered (Id : E) return B is
1586 pragma Assert (Is_Enumeration_Type (Id));
1587 return Flag198 (Implementation_Base_Type (Id));
1588 end Has_Pragma_Ordered;
1590 function Has_Pragma_Pack (Id : E) return B is
1592 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1593 return Flag121 (Implementation_Base_Type (Id));
1594 end Has_Pragma_Pack;
1596 function Has_Pragma_Preelab_Init (Id : E) return B is
1598 return Flag221 (Id);
1599 end Has_Pragma_Preelab_Init;
1601 function Has_Pragma_Pure (Id : E) return B is
1603 return Flag203 (Id);
1604 end Has_Pragma_Pure;
1606 function Has_Pragma_Pure_Function (Id : E) return B is
1608 return Flag179 (Id);
1609 end Has_Pragma_Pure_Function;
1611 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1613 return Flag169 (Id);
1614 end Has_Pragma_Thread_Local_Storage;
1616 function Has_Pragma_Unmodified (Id : E) return B is
1618 return Flag233 (Id);
1619 end Has_Pragma_Unmodified;
1621 function Has_Pragma_Unreferenced (Id : E) return B is
1623 return Flag180 (Id);
1624 end Has_Pragma_Unreferenced;
1626 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1628 pragma Assert (Is_Type (Id));
1629 return Flag212 (Id);
1630 end Has_Pragma_Unreferenced_Objects;
1632 function Has_Predicates (Id : E) return B is
1634 pragma Assert (Is_Type (Id));
1635 return Flag250 (Id);
1638 function Has_Primitive_Operations (Id : E) return B is
1640 pragma Assert (Is_Type (Id));
1641 return Flag120 (Base_Type (Id));
1642 end Has_Primitive_Operations;
1644 function Has_Private_Ancestor (Id : E) return B is
1646 return Flag151 (Id);
1647 end Has_Private_Ancestor;
1649 function Has_Private_Declaration (Id : E) return B is
1651 return Flag155 (Id);
1652 end Has_Private_Declaration;
1654 function Has_Protected (Id : E) return B is
1656 return Flag271 (Base_Type (Id));
1659 function Has_Qualified_Name (Id : E) return B is
1661 return Flag161 (Id);
1662 end Has_Qualified_Name;
1664 function Has_RACW (Id : E) return B is
1666 pragma Assert (Ekind (Id) = E_Package);
1667 return Flag214 (Id);
1670 function Has_Record_Rep_Clause (Id : E) return B is
1672 pragma Assert (Is_Record_Type (Id));
1673 return Flag65 (Implementation_Base_Type (Id));
1674 end Has_Record_Rep_Clause;
1676 function Has_Recursive_Call (Id : E) return B is
1678 pragma Assert (Is_Subprogram (Id));
1679 return Flag143 (Id);
1680 end Has_Recursive_Call;
1682 function Has_Shift_Operator (Id : E) return B is
1684 pragma Assert (Is_Integer_Type (Id));
1685 return Flag267 (Base_Type (Id));
1686 end Has_Shift_Operator;
1688 function Has_Size_Clause (Id : E) return B is
1691 end Has_Size_Clause;
1693 function Has_Small_Clause (Id : E) return B is
1696 end Has_Small_Clause;
1698 function Has_Specified_Layout (Id : E) return B is
1700 pragma Assert (Is_Type (Id));
1701 return Flag100 (Implementation_Base_Type (Id));
1702 end Has_Specified_Layout;
1704 function Has_Specified_Stream_Input (Id : E) return B is
1706 pragma Assert (Is_Type (Id));
1707 return Flag190 (Id);
1708 end Has_Specified_Stream_Input;
1710 function Has_Specified_Stream_Output (Id : E) return B is
1712 pragma Assert (Is_Type (Id));
1713 return Flag191 (Id);
1714 end Has_Specified_Stream_Output;
1716 function Has_Specified_Stream_Read (Id : E) return B is
1718 pragma Assert (Is_Type (Id));
1719 return Flag192 (Id);
1720 end Has_Specified_Stream_Read;
1722 function Has_Specified_Stream_Write (Id : E) return B is
1724 pragma Assert (Is_Type (Id));
1725 return Flag193 (Id);
1726 end Has_Specified_Stream_Write;
1728 function Has_Static_Discriminants (Id : E) return B is
1730 pragma Assert (Is_Type (Id));
1731 return Flag211 (Id);
1732 end Has_Static_Discriminants;
1734 function Has_Static_Predicate (Id : E) return B is
1736 pragma Assert (Is_Type (Id));
1737 return Flag269 (Id);
1738 end Has_Static_Predicate;
1740 function Has_Static_Predicate_Aspect (Id : E) return B is
1742 pragma Assert (Is_Type (Id));
1743 return Flag259 (Id);
1744 end Has_Static_Predicate_Aspect;
1746 function Has_Storage_Size_Clause (Id : E) return B is
1748 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1749 return Flag23 (Implementation_Base_Type (Id));
1750 end Has_Storage_Size_Clause;
1752 function Has_Stream_Size_Clause (Id : E) return B is
1754 return Flag184 (Id);
1755 end Has_Stream_Size_Clause;
1757 function Has_Task (Id : E) return B is
1759 return Flag30 (Base_Type (Id));
1762 function Has_Thunks (Id : E) return B is
1764 return Flag228 (Id);
1767 function Has_Unchecked_Union (Id : E) return B is
1769 return Flag123 (Base_Type (Id));
1770 end Has_Unchecked_Union;
1772 function Has_Unknown_Discriminants (Id : E) return B is
1774 pragma Assert (Is_Type (Id));
1776 end Has_Unknown_Discriminants;
1778 function Has_Up_Level_Access (Id : E) return B is
1781 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1782 return Flag215 (Id);
1783 end Has_Up_Level_Access;
1785 function Has_Visible_Refinement (Id : E) return B is
1787 pragma Assert (Ekind (Id) = E_Abstract_State);
1788 return Flag263 (Id);
1789 end Has_Visible_Refinement;
1791 function Has_Volatile_Components (Id : E) return B is
1793 return Flag87 (Implementation_Base_Type (Id));
1794 end Has_Volatile_Components;
1796 function Has_Xref_Entry (Id : E) return B is
1798 return Flag182 (Id);
1801 function Hiding_Loop_Variable (Id : E) return E is
1803 pragma Assert (Ekind (Id) = E_Variable);
1805 end Hiding_Loop_Variable;
1807 function Homonym (Id : E) return E is
1812 function Import_Pragma (Id : E) return E is
1814 pragma Assert (Is_Subprogram (Id));
1818 function Interface_Alias (Id : E) return E is
1820 pragma Assert (Is_Subprogram (Id));
1822 end Interface_Alias;
1824 function Interfaces (Id : E) return L is
1826 pragma Assert (Is_Record_Type (Id));
1827 return Elist25 (Id);
1830 function In_Package_Body (Id : E) return B is
1833 end In_Package_Body;
1835 function In_Private_Part (Id : E) return B is
1838 end In_Private_Part;
1840 function In_Use (Id : E) return B is
1842 pragma Assert (Nkind (Id) in N_Entity);
1846 function Initialization_Statements (Id : E) return N is
1848 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1850 end Initialization_Statements;
1852 function Inner_Instances (Id : E) return L is
1854 return Elist23 (Id);
1855 end Inner_Instances;
1857 function Interface_Name (Id : E) return N is
1862 function Is_Abstract_Subprogram (Id : E) return B is
1864 pragma Assert (Is_Overloadable (Id));
1866 end Is_Abstract_Subprogram;
1868 function Is_Abstract_Type (Id : E) return B is
1870 pragma Assert (Is_Type (Id));
1871 return Flag146 (Id);
1872 end Is_Abstract_Type;
1874 function Is_Local_Anonymous_Access (Id : E) return B is
1876 pragma Assert (Is_Access_Type (Id));
1877 return Flag194 (Id);
1878 end Is_Local_Anonymous_Access;
1880 function Is_Access_Constant (Id : E) return B is
1882 pragma Assert (Is_Access_Type (Id));
1884 end Is_Access_Constant;
1886 function Is_Ada_2005_Only (Id : E) return B is
1888 return Flag185 (Id);
1889 end Is_Ada_2005_Only;
1891 function Is_Ada_2012_Only (Id : E) return B is
1893 return Flag199 (Id);
1894 end Is_Ada_2012_Only;
1896 function Is_Aliased (Id : E) return B is
1898 pragma Assert (Nkind (Id) in N_Entity);
1902 function Is_Asynchronous (Id : E) return B is
1904 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1906 end Is_Asynchronous;
1908 function Is_Atomic (Id : E) return B is
1913 function Is_Bit_Packed_Array (Id : E) return B is
1915 return Flag122 (Implementation_Base_Type (Id));
1916 end Is_Bit_Packed_Array;
1918 function Is_Called (Id : E) return B is
1920 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1921 return Flag102 (Id);
1924 function Is_Character_Type (Id : E) return B is
1927 end Is_Character_Type;
1929 function Is_Child_Unit (Id : E) return B is
1934 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1937 end Is_Class_Wide_Equivalent_Type;
1939 function Is_Compilation_Unit (Id : E) return B is
1941 return Flag149 (Id);
1942 end Is_Compilation_Unit;
1944 function Is_Completely_Hidden (Id : E) return B is
1946 pragma Assert (Ekind (Id) = E_Discriminant);
1947 return Flag103 (Id);
1948 end Is_Completely_Hidden;
1950 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1953 end Is_Constr_Subt_For_U_Nominal;
1955 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1957 return Flag141 (Id);
1958 end Is_Constr_Subt_For_UN_Aliased;
1960 function Is_Constrained (Id : E) return B is
1962 pragma Assert (Nkind (Id) in N_Entity);
1966 function Is_Constructor (Id : E) return B is
1971 function Is_Controlled (Id : E) return B is
1973 return Flag42 (Base_Type (Id));
1976 function Is_Controlling_Formal (Id : E) return B is
1978 pragma Assert (Is_Formal (Id));
1980 end Is_Controlling_Formal;
1982 function Is_CPP_Class (Id : E) return B is
1987 function Is_Default_Init_Cond_Procedure (Id : E) return B is
1989 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1990 return Flag132 (Id);
1991 end Is_Default_Init_Cond_Procedure;
1993 function Is_Descendent_Of_Address (Id : E) return B is
1995 return Flag223 (Id);
1996 end Is_Descendent_Of_Address;
1998 function Is_Discrim_SO_Function (Id : E) return B is
2000 return Flag176 (Id);
2001 end Is_Discrim_SO_Function;
2003 function Is_Discriminant_Check_Function (Id : E) return B is
2005 return Flag264 (Id);
2006 end Is_Discriminant_Check_Function;
2008 function Is_Dispatch_Table_Entity (Id : E) return B is
2010 return Flag234 (Id);
2011 end Is_Dispatch_Table_Entity;
2013 function Is_Dispatching_Operation (Id : E) return B is
2015 pragma Assert (Nkind (Id) in N_Entity);
2017 end Is_Dispatching_Operation;
2019 function Is_Eliminated (Id : E) return B is
2021 return Flag124 (Id);
2024 function Is_Entry_Formal (Id : E) return B is
2027 end Is_Entry_Formal;
2029 function Is_Exported (Id : E) return B is
2034 function Is_First_Subtype (Id : E) return B is
2037 end Is_First_Subtype;
2039 function Is_For_Access_Subtype (Id : E) return B is
2041 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2042 return Flag118 (Id);
2043 end Is_For_Access_Subtype;
2045 function Is_Formal_Subprogram (Id : E) return B is
2047 return Flag111 (Id);
2048 end Is_Formal_Subprogram;
2050 function Is_Frozen (Id : E) return B is
2055 function Is_Generic_Actual_Subprogram (Id : E) return B is
2057 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2058 return Flag274 (Id);
2059 end Is_Generic_Actual_Subprogram;
2061 function Is_Generic_Actual_Type (Id : E) return B is
2063 pragma Assert (Is_Type (Id));
2065 end Is_Generic_Actual_Type;
2067 function Is_Generic_Instance (Id : E) return B is
2069 return Flag130 (Id);
2070 end Is_Generic_Instance;
2072 function Is_Generic_Type (Id : E) return B is
2074 pragma Assert (Nkind (Id) in N_Entity);
2076 end Is_Generic_Type;
2078 function Is_Hidden (Id : E) return B is
2083 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2086 end Is_Hidden_Non_Overridden_Subpgm;
2088 function Is_Hidden_Open_Scope (Id : E) return B is
2090 return Flag171 (Id);
2091 end Is_Hidden_Open_Scope;
2093 function Is_Immediately_Visible (Id : E) return B is
2095 pragma Assert (Nkind (Id) in N_Entity);
2097 end Is_Immediately_Visible;
2099 function Is_Implementation_Defined (Id : E) return B is
2101 return Flag254 (Id);
2102 end Is_Implementation_Defined;
2104 function Is_Imported (Id : E) return B is
2109 function Is_Independent (Id : E) return B is
2111 pragma Assert (Ekind (Id) = E_Component);
2112 return Flag268 (Id);
2115 function Is_Inlined (Id : E) return B is
2120 function Is_Inlined_Always (Id : E) return B is
2122 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2124 end Is_Inlined_Always;
2126 function Is_Interface (Id : E) return B is
2128 return Flag186 (Id);
2131 function Is_Instantiated (Id : E) return B is
2133 return Flag126 (Id);
2134 end Is_Instantiated;
2136 function Is_Internal (Id : E) return B is
2138 pragma Assert (Nkind (Id) in N_Entity);
2142 function Is_Interrupt_Handler (Id : E) return B is
2144 pragma Assert (Nkind (Id) in N_Entity);
2146 end Is_Interrupt_Handler;
2148 function Is_Intrinsic_Subprogram (Id : E) return B is
2151 end Is_Intrinsic_Subprogram;
2153 function Is_Invariant_Procedure (Id : E) return B is
2155 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2156 return Flag257 (Id);
2157 end Is_Invariant_Procedure;
2159 function Is_Itype (Id : E) return B is
2164 function Is_Known_Non_Null (Id : E) return B is
2167 end Is_Known_Non_Null;
2169 function Is_Known_Null (Id : E) return B is
2171 return Flag204 (Id);
2174 function Is_Known_Valid (Id : E) return B is
2176 return Flag170 (Id);
2179 function Is_Limited_Composite (Id : E) return B is
2181 return Flag106 (Id);
2182 end Is_Limited_Composite;
2184 function Is_Limited_Interface (Id : E) return B is
2186 return Flag197 (Id);
2187 end Is_Limited_Interface;
2189 function Is_Limited_Record (Id : E) return B is
2192 end Is_Limited_Record;
2194 function Is_Machine_Code_Subprogram (Id : E) return B is
2196 pragma Assert (Is_Subprogram (Id));
2197 return Flag137 (Id);
2198 end Is_Machine_Code_Subprogram;
2200 function Is_Non_Static_Subtype (Id : E) return B is
2202 pragma Assert (Is_Type (Id));
2203 return Flag109 (Id);
2204 end Is_Non_Static_Subtype;
2206 function Is_Null_Init_Proc (Id : E) return B is
2208 pragma Assert (Ekind (Id) = E_Procedure);
2209 return Flag178 (Id);
2210 end Is_Null_Init_Proc;
2212 function Is_Obsolescent (Id : E) return B is
2214 return Flag153 (Id);
2217 function Is_Only_Out_Parameter (Id : E) return B is
2219 pragma Assert (Is_Formal (Id));
2220 return Flag226 (Id);
2221 end Is_Only_Out_Parameter;
2223 function Is_Package_Body_Entity (Id : E) return B is
2225 return Flag160 (Id);
2226 end Is_Package_Body_Entity;
2228 function Is_Packed (Id : E) return B is
2230 return Flag51 (Implementation_Base_Type (Id));
2233 function Is_Packed_Array_Impl_Type (Id : E) return B is
2235 return Flag138 (Id);
2236 end Is_Packed_Array_Impl_Type;
2238 function Is_Potentially_Use_Visible (Id : E) return B is
2240 pragma Assert (Nkind (Id) in N_Entity);
2242 end Is_Potentially_Use_Visible;
2244 function Is_Predicate_Function (Id : E) return B is
2246 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2247 return Flag255 (Id);
2248 end Is_Predicate_Function;
2250 function Is_Predicate_Function_M (Id : E) return B is
2252 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2253 return Flag256 (Id);
2254 end Is_Predicate_Function_M;
2256 function Is_Preelaborated (Id : E) return B is
2259 end Is_Preelaborated;
2261 function Is_Primitive (Id : E) return B is
2264 (Is_Overloadable (Id)
2265 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2266 return Flag218 (Id);
2269 function Is_Primitive_Wrapper (Id : E) return B is
2271 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2272 return Flag195 (Id);
2273 end Is_Primitive_Wrapper;
2275 function Is_Private_Composite (Id : E) return B is
2277 pragma Assert (Is_Type (Id));
2278 return Flag107 (Id);
2279 end Is_Private_Composite;
2281 function Is_Private_Descendant (Id : E) return B is
2284 end Is_Private_Descendant;
2286 function Is_Private_Primitive (Id : E) return B is
2288 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2289 return Flag245 (Id);
2290 end Is_Private_Primitive;
2292 function Is_Processed_Transient (Id : E) return B is
2294 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2295 return Flag252 (Id);
2296 end Is_Processed_Transient;
2298 function Is_Public (Id : E) return B is
2300 pragma Assert (Nkind (Id) in N_Entity);
2304 function Is_Pure (Id : E) return B is
2309 function Is_Pure_Unit_Access_Type (Id : E) return B is
2311 pragma Assert (Is_Access_Type (Id));
2312 return Flag189 (Id);
2313 end Is_Pure_Unit_Access_Type;
2315 function Is_RACW_Stub_Type (Id : E) return B is
2317 pragma Assert (Is_Type (Id));
2318 return Flag244 (Id);
2319 end Is_RACW_Stub_Type;
2321 function Is_Raised (Id : E) return B is
2323 pragma Assert (Ekind (Id) = E_Exception);
2324 return Flag224 (Id);
2327 function Is_Remote_Call_Interface (Id : E) return B is
2330 end Is_Remote_Call_Interface;
2332 function Is_Remote_Types (Id : E) return B is
2335 end Is_Remote_Types;
2337 function Is_Renaming_Of_Object (Id : E) return B is
2339 return Flag112 (Id);
2340 end Is_Renaming_Of_Object;
2342 function Is_Return_Object (Id : E) return B is
2344 return Flag209 (Id);
2345 end Is_Return_Object;
2347 function Is_Safe_To_Reevaluate (Id : E) return B is
2349 return Flag249 (Id);
2350 end Is_Safe_To_Reevaluate;
2352 function Is_Shared_Passive (Id : E) return B is
2355 end Is_Shared_Passive;
2357 function Is_Statically_Allocated (Id : E) return B is
2360 end Is_Statically_Allocated;
2362 function Is_Tag (Id : E) return B is
2364 pragma Assert (Nkind (Id) in N_Entity);
2368 function Is_Tagged_Type (Id : E) return B is
2373 function Is_Thunk (Id : E) return B is
2375 return Flag225 (Id);
2378 function Is_Trivial_Subprogram (Id : E) return B is
2380 return Flag235 (Id);
2381 end Is_Trivial_Subprogram;
2383 function Is_True_Constant (Id : E) return B is
2385 return Flag163 (Id);
2386 end Is_True_Constant;
2388 function Is_Unchecked_Union (Id : E) return B is
2390 return Flag117 (Implementation_Base_Type (Id));
2391 end Is_Unchecked_Union;
2393 function Is_Underlying_Record_View (Id : E) return B is
2395 return Flag246 (Id);
2396 end Is_Underlying_Record_View;
2398 function Is_Unsigned_Type (Id : E) return B is
2400 pragma Assert (Is_Type (Id));
2401 return Flag144 (Id);
2402 end Is_Unsigned_Type;
2404 function Is_Valued_Procedure (Id : E) return B is
2406 pragma Assert (Ekind (Id) = E_Procedure);
2407 return Flag127 (Id);
2408 end Is_Valued_Procedure;
2410 function Is_Visible_Formal (Id : E) return B is
2412 return Flag206 (Id);
2413 end Is_Visible_Formal;
2415 function Is_Visible_Lib_Unit (Id : E) return B is
2417 return Flag116 (Id);
2418 end Is_Visible_Lib_Unit;
2420 function Is_Volatile (Id : E) return B is
2422 pragma Assert (Nkind (Id) in N_Entity);
2424 if Is_Type (Id) then
2425 return Flag16 (Base_Type (Id));
2431 function Itype_Printed (Id : E) return B is
2433 pragma Assert (Is_Itype (Id));
2434 return Flag202 (Id);
2437 function Kill_Elaboration_Checks (Id : E) return B is
2440 end Kill_Elaboration_Checks;
2442 function Kill_Range_Checks (Id : E) return B is
2445 end Kill_Range_Checks;
2447 function Known_To_Have_Preelab_Init (Id : E) return B is
2449 pragma Assert (Is_Type (Id));
2450 return Flag207 (Id);
2451 end Known_To_Have_Preelab_Init;
2453 function Last_Aggregate_Assignment (Id : E) return N is
2455 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2457 end Last_Aggregate_Assignment;
2459 function Last_Assignment (Id : E) return N is
2461 pragma Assert (Is_Assignable (Id));
2463 end Last_Assignment;
2465 function Last_Entity (Id : E) return E is
2470 function Limited_View (Id : E) return E is
2472 pragma Assert (Ekind (Id) = E_Package);
2476 function Linker_Section_Pragma (Id : E) return N is
2479 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2481 end Linker_Section_Pragma;
2483 function Lit_Indexes (Id : E) return E is
2485 pragma Assert (Is_Enumeration_Type (Id));
2489 function Lit_Strings (Id : E) return E is
2491 pragma Assert (Is_Enumeration_Type (Id));
2495 function Low_Bound_Tested (Id : E) return B is
2497 return Flag205 (Id);
2498 end Low_Bound_Tested;
2500 function Machine_Radix_10 (Id : E) return B is
2502 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2504 end Machine_Radix_10;
2506 function Master_Id (Id : E) return E is
2508 pragma Assert (Is_Access_Type (Id));
2512 function Materialize_Entity (Id : E) return B is
2514 return Flag168 (Id);
2515 end Materialize_Entity;
2517 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2519 return Flag262 (Id);
2520 end May_Inherit_Delayed_Rep_Aspects;
2522 function Mechanism (Id : E) return M is
2524 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2525 return UI_To_Int (Uint8 (Id));
2528 function Modulus (Id : E) return Uint is
2530 pragma Assert (Is_Modular_Integer_Type (Id));
2531 return Uint17 (Base_Type (Id));
2534 function Must_Be_On_Byte_Boundary (Id : E) return B is
2536 pragma Assert (Is_Type (Id));
2537 return Flag183 (Id);
2538 end Must_Be_On_Byte_Boundary;
2540 function Must_Have_Preelab_Init (Id : E) return B is
2542 pragma Assert (Is_Type (Id));
2543 return Flag208 (Id);
2544 end Must_Have_Preelab_Init;
2546 function Needs_Debug_Info (Id : E) return B is
2548 return Flag147 (Id);
2549 end Needs_Debug_Info;
2551 function Needs_No_Actuals (Id : E) return B is
2554 (Is_Overloadable (Id)
2555 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2557 end Needs_No_Actuals;
2559 function Never_Set_In_Source (Id : E) return B is
2561 return Flag115 (Id);
2562 end Never_Set_In_Source;
2564 function Next_Inlined_Subprogram (Id : E) return E is
2567 end Next_Inlined_Subprogram;
2569 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2571 pragma Assert (Is_Discrete_Type (Id));
2572 return Flag276 (Id);
2573 end No_Dynamic_Predicate_On_Actual;
2575 function No_Pool_Assigned (Id : E) return B is
2577 pragma Assert (Is_Access_Type (Id));
2578 return Flag131 (Root_Type (Id));
2579 end No_Pool_Assigned;
2581 function No_Predicate_On_Actual (Id : E) return Boolean is
2583 pragma Assert (Is_Discrete_Type (Id));
2584 return Flag275 (Id);
2585 end No_Predicate_On_Actual;
2587 function No_Return (Id : E) return B is
2589 return Flag113 (Id);
2592 function No_Strict_Aliasing (Id : E) return B is
2594 pragma Assert (Is_Access_Type (Id));
2595 return Flag136 (Base_Type (Id));
2596 end No_Strict_Aliasing;
2598 function Non_Binary_Modulus (Id : E) return B is
2600 pragma Assert (Is_Type (Id));
2601 return Flag58 (Base_Type (Id));
2602 end Non_Binary_Modulus;
2604 function Non_Limited_View (Id : E) return E is
2607 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2609 end Non_Limited_View;
2611 function Nonzero_Is_True (Id : E) return B is
2613 pragma Assert (Root_Type (Id) = Standard_Boolean);
2614 return Flag162 (Base_Type (Id));
2615 end Nonzero_Is_True;
2617 function Normalized_First_Bit (Id : E) return U is
2619 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2621 end Normalized_First_Bit;
2623 function Normalized_Position (Id : E) return U is
2625 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2627 end Normalized_Position;
2629 function Normalized_Position_Max (Id : E) return U is
2631 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2633 end Normalized_Position_Max;
2635 function OK_To_Rename (Id : E) return B is
2637 pragma Assert (Ekind (Id) = E_Variable);
2638 return Flag247 (Id);
2641 function OK_To_Reorder_Components (Id : E) return B is
2643 pragma Assert (Is_Record_Type (Id));
2644 return Flag239 (Base_Type (Id));
2645 end OK_To_Reorder_Components;
2647 function Optimize_Alignment_Space (Id : E) return B is
2650 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2651 return Flag241 (Id);
2652 end Optimize_Alignment_Space;
2654 function Optimize_Alignment_Time (Id : E) return B is
2657 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2658 return Flag242 (Id);
2659 end Optimize_Alignment_Time;
2661 function Original_Access_Type (Id : E) return E is
2663 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2665 end Original_Access_Type;
2667 function Original_Array_Type (Id : E) return E is
2669 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2671 end Original_Array_Type;
2673 function Original_Record_Component (Id : E) return E is
2675 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2677 end Original_Record_Component;
2679 function Overlays_Constant (Id : E) return B is
2681 return Flag243 (Id);
2682 end Overlays_Constant;
2684 function Overridden_Operation (Id : E) return E is
2687 end Overridden_Operation;
2689 function Package_Instantiation (Id : E) return N is
2691 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2693 end Package_Instantiation;
2695 function Packed_Array_Impl_Type (Id : E) return E is
2697 pragma Assert (Is_Array_Type (Id));
2699 end Packed_Array_Impl_Type;
2701 function Parent_Subtype (Id : E) return E is
2703 pragma Assert (Is_Record_Type (Id));
2704 return Node19 (Base_Type (Id));
2707 function Part_Of_Constituents (Id : E) return L is
2709 pragma Assert (Ekind (Id) = E_Abstract_State);
2711 end Part_Of_Constituents;
2713 function Postcondition_Proc (Id : E) return E is
2715 pragma Assert (Ekind (Id) = E_Procedure);
2717 end Postcondition_Proc;
2719 function PPC_Wrapper (Id : E) return E is
2721 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2725 function Prival (Id : E) return E is
2727 pragma Assert (Is_Protected_Component (Id));
2731 function Prival_Link (Id : E) return E is
2733 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2737 function Private_Dependents (Id : E) return L is
2739 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2740 return Elist18 (Id);
2741 end Private_Dependents;
2743 function Private_View (Id : E) return N is
2745 pragma Assert (Is_Private_Type (Id));
2749 function Protected_Body_Subprogram (Id : E) return E is
2751 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2753 end Protected_Body_Subprogram;
2755 function Protected_Formal (Id : E) return E is
2757 pragma Assert (Is_Formal (Id));
2759 end Protected_Formal;
2761 function Protection_Object (Id : E) return E is
2764 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2766 end Protection_Object;
2768 function Reachable (Id : E) return B is
2773 function Referenced (Id : E) return B is
2775 return Flag156 (Id);
2778 function Referenced_As_LHS (Id : E) return B is
2781 end Referenced_As_LHS;
2783 function Referenced_As_Out_Parameter (Id : E) return B is
2785 return Flag227 (Id);
2786 end Referenced_As_Out_Parameter;
2788 function Refinement_Constituents (Id : E) return L is
2790 pragma Assert (Ekind (Id) = E_Abstract_State);
2792 end Refinement_Constituents;
2794 function Register_Exception_Call (Id : E) return N is
2796 pragma Assert (Ekind (Id) = E_Exception);
2798 end Register_Exception_Call;
2800 function Related_Array_Object (Id : E) return E is
2802 pragma Assert (Is_Array_Type (Id));
2804 end Related_Array_Object;
2806 function Related_Expression (Id : E) return N is
2808 pragma Assert (Ekind (Id) in Type_Kind
2809 or else Ekind_In (Id, E_Constant, E_Variable));
2811 end Related_Expression;
2813 function Related_Instance (Id : E) return E is
2815 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2817 end Related_Instance;
2819 function Related_Type (Id : E) return E is
2821 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2825 function Relative_Deadline_Variable (Id : E) return E is
2827 pragma Assert (Is_Task_Type (Id));
2828 return Node26 (Implementation_Base_Type (Id));
2829 end Relative_Deadline_Variable;
2831 function Renamed_Entity (Id : E) return N is
2836 function Renamed_In_Spec (Id : E) return B is
2838 pragma Assert (Ekind (Id) = E_Package);
2839 return Flag231 (Id);
2840 end Renamed_In_Spec;
2842 function Renamed_Object (Id : E) return N is
2847 function Renaming_Map (Id : E) return U is
2852 function Requires_Overriding (Id : E) return B is
2854 pragma Assert (Is_Overloadable (Id));
2855 return Flag213 (Id);
2856 end Requires_Overriding;
2858 function Return_Present (Id : E) return B is
2863 function Return_Applies_To (Id : E) return N is
2866 end Return_Applies_To;
2868 function Returns_By_Ref (Id : E) return B is
2873 function Returns_Limited_View (Id : E) return B is
2875 return Flag134 (Id);
2876 end Returns_Limited_View;
2878 function Reverse_Bit_Order (Id : E) return B is
2880 pragma Assert (Is_Record_Type (Id));
2881 return Flag164 (Base_Type (Id));
2882 end Reverse_Bit_Order;
2884 function Reverse_Storage_Order (Id : E) return B is
2886 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2887 return Flag93 (Base_Type (Id));
2888 end Reverse_Storage_Order;
2890 function RM_Size (Id : E) return U is
2892 pragma Assert (Is_Type (Id));
2896 function Scalar_Range (Id : E) return N is
2901 function Scale_Value (Id : E) return U is
2906 function Scope_Depth_Value (Id : E) return U is
2909 end Scope_Depth_Value;
2911 function Sec_Stack_Needed_For_Return (Id : E) return B is
2913 return Flag167 (Id);
2914 end Sec_Stack_Needed_For_Return;
2916 function Shadow_Entities (Id : E) return S is
2918 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2920 end Shadow_Entities;
2922 function Shared_Var_Procs_Instance (Id : E) return E is
2924 pragma Assert (Ekind (Id) = E_Variable);
2926 end Shared_Var_Procs_Instance;
2928 function Size_Check_Code (Id : E) return N is
2930 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2932 end Size_Check_Code;
2934 function Size_Depends_On_Discriminant (Id : E) return B is
2936 return Flag177 (Id);
2937 end Size_Depends_On_Discriminant;
2939 function Size_Known_At_Compile_Time (Id : E) return B is
2942 end Size_Known_At_Compile_Time;
2944 function Small_Value (Id : E) return R is
2946 pragma Assert (Is_Fixed_Point_Type (Id));
2947 return Ureal21 (Id);
2950 function SPARK_Aux_Pragma (Id : E) return N is
2953 (Ekind_In (Id, E_Generic_Package, -- package variants
2957 end SPARK_Aux_Pragma;
2959 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2962 (Ekind_In (Id, E_Generic_Package, -- package variants
2965 return Flag266 (Id);
2966 end SPARK_Aux_Pragma_Inherited;
2968 function SPARK_Pragma (Id : E) return N is
2971 (Ekind_In (Id, E_Function, -- subprogram variants
2973 E_Generic_Procedure,
2977 Ekind_In (Id, E_Generic_Package, -- package variants
2983 function SPARK_Pragma_Inherited (Id : E) return B is
2986 (Ekind_In (Id, E_Function, -- subprogram variants
2988 E_Generic_Procedure,
2992 Ekind_In (Id, E_Generic_Package, -- package variants
2995 return Flag265 (Id);
2996 end SPARK_Pragma_Inherited;
2998 function Spec_Entity (Id : E) return E is
3000 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3004 function SSO_Set_High_By_Default (Id : E) return B is
3006 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3007 return Flag273 (Base_Type (Id));
3008 end SSO_Set_High_By_Default;
3010 function SSO_Set_Low_By_Default (Id : E) return B is
3012 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3013 return Flag272 (Base_Type (Id));
3014 end SSO_Set_Low_By_Default;
3016 function Static_Discrete_Predicate (Id : E) return S is
3018 pragma Assert (Is_Discrete_Type (Id));
3020 end Static_Discrete_Predicate;
3022 function Static_Real_Or_String_Predicate (Id : E) return N is
3024 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3026 end Static_Real_Or_String_Predicate;
3028 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3030 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3032 end Status_Flag_Or_Transient_Decl;
3034 function Storage_Size_Variable (Id : E) return E is
3036 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3037 return Node15 (Implementation_Base_Type (Id));
3038 end Storage_Size_Variable;
3040 function Static_Elaboration_Desired (Id : E) return B is
3042 pragma Assert (Ekind (Id) = E_Package);
3044 end Static_Elaboration_Desired;
3046 function Static_Initialization (Id : E) return N is
3049 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3051 end Static_Initialization;
3053 function Stored_Constraint (Id : E) return L is
3056 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3057 return Elist23 (Id);
3058 end Stored_Constraint;
3060 function Stores_Attribute_Old_Prefix (Id : E) return B is
3062 return Flag270 (Id);
3063 end Stores_Attribute_Old_Prefix;
3065 function Strict_Alignment (Id : E) return B is
3067 return Flag145 (Implementation_Base_Type (Id));
3068 end Strict_Alignment;
3070 function String_Literal_Length (Id : E) return U is
3073 end String_Literal_Length;
3075 function String_Literal_Low_Bound (Id : E) return N is
3078 end String_Literal_Low_Bound;
3080 function Subprograms_For_Type (Id : E) return E is
3082 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3084 end Subprograms_For_Type;
3086 function Suppress_Elaboration_Warnings (Id : E) return B is
3088 return Flag148 (Id);
3089 end Suppress_Elaboration_Warnings;
3091 function Suppress_Initialization (Id : E) return B is
3093 pragma Assert (Is_Type (Id));
3094 return Flag105 (Id);
3095 end Suppress_Initialization;
3097 function Suppress_Style_Checks (Id : E) return B is
3099 return Flag165 (Id);
3100 end Suppress_Style_Checks;
3102 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3104 return Flag217 (Id);
3105 end Suppress_Value_Tracking_On_Call;
3107 function Task_Body_Procedure (Id : E) return N is
3109 pragma Assert (Ekind (Id) in Task_Kind);
3111 end Task_Body_Procedure;
3113 function Thunk_Entity (Id : E) return E is
3115 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3116 and then Is_Thunk (Id));
3120 function Treat_As_Volatile (Id : E) return B is
3123 end Treat_As_Volatile;
3125 function Underlying_Full_View (Id : E) return E is
3127 pragma Assert (Ekind (Id) in Private_Kind);
3129 end Underlying_Full_View;
3131 function Underlying_Record_View (Id : E) return E is
3134 end Underlying_Record_View;
3136 function Universal_Aliasing (Id : E) return B is
3138 pragma Assert (Is_Type (Id));
3139 return Flag216 (Implementation_Base_Type (Id));
3140 end Universal_Aliasing;
3142 function Unset_Reference (Id : E) return N is
3145 end Unset_Reference;
3147 function Used_As_Generic_Actual (Id : E) return B is
3149 return Flag222 (Id);
3150 end Used_As_Generic_Actual;
3152 function Uses_Lock_Free (Id : E) return B is
3154 pragma Assert (Is_Protected_Type (Id));
3155 return Flag188 (Id);
3158 function Uses_Sec_Stack (Id : E) return B is
3163 function Warnings_Off (Id : E) return B is
3168 function Warnings_Off_Used (Id : E) return B is
3170 return Flag236 (Id);
3171 end Warnings_Off_Used;
3173 function Warnings_Off_Used_Unmodified (Id : E) return B is
3175 return Flag237 (Id);
3176 end Warnings_Off_Used_Unmodified;
3178 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3180 return Flag238 (Id);
3181 end Warnings_Off_Used_Unreferenced;
3183 function Wrapped_Entity (Id : E) return E is
3185 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3186 and then Is_Primitive_Wrapper (Id));
3190 function Was_Hidden (Id : E) return B is
3192 return Flag196 (Id);
3195 ------------------------------
3196 -- Classification Functions --
3197 ------------------------------
3199 function Is_Access_Type (Id : E) return B is
3201 return Ekind (Id) in Access_Kind;
3204 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3206 return Ekind (Id) in Access_Protected_Kind;
3207 end Is_Access_Protected_Subprogram_Type;
3209 function Is_Access_Subprogram_Type (Id : E) return B is
3211 return Ekind (Id) in Access_Subprogram_Kind;
3212 end Is_Access_Subprogram_Type;
3214 function Is_Aggregate_Type (Id : E) return B is
3216 return Ekind (Id) in Aggregate_Kind;
3217 end Is_Aggregate_Type;
3219 function Is_Array_Type (Id : E) return B is
3221 return Ekind (Id) in Array_Kind;
3224 function Is_Assignable (Id : E) return B is
3226 return Ekind (Id) in Assignable_Kind;
3229 function Is_Class_Wide_Type (Id : E) return B is
3231 return Ekind (Id) in Class_Wide_Kind;
3232 end Is_Class_Wide_Type;
3234 function Is_Composite_Type (Id : E) return B is
3236 return Ekind (Id) in Composite_Kind;
3237 end Is_Composite_Type;
3239 function Is_Concurrent_Body (Id : E) return B is
3241 return Ekind (Id) in
3242 Concurrent_Body_Kind;
3243 end Is_Concurrent_Body;
3245 function Is_Concurrent_Record_Type (Id : E) return B is
3248 end Is_Concurrent_Record_Type;
3250 function Is_Concurrent_Type (Id : E) return B is
3252 return Ekind (Id) in Concurrent_Kind;
3253 end Is_Concurrent_Type;
3255 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3257 return Ekind (Id) in
3258 Decimal_Fixed_Point_Kind;
3259 end Is_Decimal_Fixed_Point_Type;
3261 function Is_Digits_Type (Id : E) return B is
3263 return Ekind (Id) in Digits_Kind;
3266 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3268 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3269 end Is_Discrete_Or_Fixed_Point_Type;
3271 function Is_Discrete_Type (Id : E) return B is
3273 return Ekind (Id) in Discrete_Kind;
3274 end Is_Discrete_Type;
3276 function Is_Elementary_Type (Id : E) return B is
3278 return Ekind (Id) in Elementary_Kind;
3279 end Is_Elementary_Type;
3281 function Is_Entry (Id : E) return B is
3283 return Ekind (Id) in Entry_Kind;
3286 function Is_Enumeration_Type (Id : E) return B is
3288 return Ekind (Id) in
3290 end Is_Enumeration_Type;
3292 function Is_Fixed_Point_Type (Id : E) return B is
3294 return Ekind (Id) in
3296 end Is_Fixed_Point_Type;
3298 function Is_Floating_Point_Type (Id : E) return B is
3300 return Ekind (Id) in Float_Kind;
3301 end Is_Floating_Point_Type;
3303 function Is_Formal (Id : E) return B is
3305 return Ekind (Id) in Formal_Kind;
3308 function Is_Formal_Object (Id : E) return B is
3310 return Ekind (Id) in Formal_Object_Kind;
3311 end Is_Formal_Object;
3313 function Is_Generic_Subprogram (Id : E) return B is
3315 return Ekind (Id) in Generic_Subprogram_Kind;
3316 end Is_Generic_Subprogram;
3318 function Is_Generic_Unit (Id : E) return B is
3320 return Ekind (Id) in Generic_Unit_Kind;
3321 end Is_Generic_Unit;
3323 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3325 return Ekind (Id) in
3326 Incomplete_Or_Private_Kind;
3327 end Is_Incomplete_Or_Private_Type;
3329 function Is_Incomplete_Type (Id : E) return B is
3331 return Ekind (Id) in
3333 end Is_Incomplete_Type;
3335 function Is_Integer_Type (Id : E) return B is
3337 return Ekind (Id) in Integer_Kind;
3338 end Is_Integer_Type;
3340 function Is_Modular_Integer_Type (Id : E) return B is
3342 return Ekind (Id) in
3343 Modular_Integer_Kind;
3344 end Is_Modular_Integer_Type;
3346 function Is_Named_Number (Id : E) return B is
3348 return Ekind (Id) in Named_Kind;
3349 end Is_Named_Number;
3351 function Is_Numeric_Type (Id : E) return B is
3353 return Ekind (Id) in Numeric_Kind;
3354 end Is_Numeric_Type;
3356 function Is_Object (Id : E) return B is
3358 return Ekind (Id) in Object_Kind;
3361 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3363 return Ekind (Id) in
3364 Ordinary_Fixed_Point_Kind;
3365 end Is_Ordinary_Fixed_Point_Type;
3367 function Is_Overloadable (Id : E) return B is
3369 return Ekind (Id) in Overloadable_Kind;
3370 end Is_Overloadable;
3372 function Is_Private_Type (Id : E) return B is
3374 return Ekind (Id) in Private_Kind;
3375 end Is_Private_Type;
3377 function Is_Protected_Type (Id : E) return B is
3379 return Ekind (Id) in Protected_Kind;
3380 end Is_Protected_Type;
3382 function Is_Real_Type (Id : E) return B is
3384 return Ekind (Id) in Real_Kind;
3387 function Is_Record_Type (Id : E) return B is
3389 return Ekind (Id) in Record_Kind;
3392 function Is_Scalar_Type (Id : E) return B is
3394 return Ekind (Id) in Scalar_Kind;
3397 function Is_Signed_Integer_Type (Id : E) return B is
3399 return Ekind (Id) in Signed_Integer_Kind;
3400 end Is_Signed_Integer_Type;
3402 function Is_Subprogram (Id : E) return B is
3404 return Ekind (Id) in Subprogram_Kind;
3407 function Is_Task_Type (Id : E) return B is
3409 return Ekind (Id) in Task_Kind;
3412 function Is_Type (Id : E) return B is
3414 return Ekind (Id) in Type_Kind;
3417 ------------------------------
3418 -- Attribute Set Procedures --
3419 ------------------------------
3421 -- Note: in many of these set procedures an "obvious" assertion is missing.
3422 -- The reason for this is that in many cases, a field is set before the
3423 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3424 -- it is possible to add assertions that specifically include the E_Void
3425 -- possibility, but in some cases, we just omit the assertions.
3427 procedure Set_Abstract_States (Id : E; V : L) is
3429 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3430 Set_Elist25 (Id, V);
3431 end Set_Abstract_States;
3433 procedure Set_Accept_Address (Id : E; V : L) is
3435 Set_Elist21 (Id, V);
3436 end Set_Accept_Address;
3438 procedure Set_Access_Disp_Table (Id : E; V : L) is
3440 pragma Assert (Ekind (Id) = E_Record_Type
3441 and then Id = Implementation_Base_Type (Id));
3442 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3443 Set_Elist16 (Id, V);
3444 end Set_Access_Disp_Table;
3446 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3449 end Set_Associated_Formal_Package;
3451 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3454 end Set_Associated_Node_For_Itype;
3456 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3458 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3460 end Set_Associated_Storage_Pool;
3462 procedure Set_Actual_Subtype (Id : E; V : E) is
3465 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3466 or else Is_Formal (Id));
3468 end Set_Actual_Subtype;
3470 procedure Set_Address_Taken (Id : E; V : B := True) is
3472 Set_Flag104 (Id, V);
3473 end Set_Address_Taken;
3475 procedure Set_Alias (Id : E; V : E) is
3478 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3482 procedure Set_Alignment (Id : E; V : U) is
3484 pragma Assert (Is_Type (Id)
3485 or else Is_Formal (Id)
3486 or else Ekind_In (Id, E_Loop_Parameter,
3493 procedure Set_Barrier_Function (Id : E; V : N) is
3495 pragma Assert (Is_Entry (Id));
3497 end Set_Barrier_Function;
3499 procedure Set_Block_Node (Id : E; V : N) is
3501 pragma Assert (Ekind (Id) = E_Block);
3505 procedure Set_Body_Entity (Id : E; V : E) is
3507 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3509 end Set_Body_Entity;
3511 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3514 (Ekind (Id) = E_Package
3515 or else Is_Subprogram (Id)
3516 or else Is_Generic_Unit (Id));
3518 end Set_Body_Needed_For_SAL;
3520 procedure Set_Body_References (Id : E; V : L) is
3522 pragma Assert (Ekind (Id) = E_Abstract_State);
3523 Set_Elist16 (Id, V);
3524 end Set_Body_References;
3526 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3528 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3530 end Set_BIP_Initialization_Call;
3532 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3534 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3535 Set_Flag125 (Id, V);
3536 end Set_C_Pass_By_Copy;
3538 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3541 end Set_Can_Never_Be_Null;
3543 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3546 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3547 Set_Flag229 (Id, V);
3548 end Set_Can_Use_Internal_Rep;
3550 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3553 end Set_Checks_May_Be_Suppressed;
3555 procedure Set_Class_Wide_Type (Id : E; V : E) is
3557 pragma Assert (Is_Type (Id));
3559 end Set_Class_Wide_Type;
3561 procedure Set_Cloned_Subtype (Id : E; V : E) is
3563 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3565 end Set_Cloned_Subtype;
3567 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3569 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3571 end Set_Component_Bit_Offset;
3573 procedure Set_Component_Clause (Id : E; V : N) is
3575 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3577 end Set_Component_Clause;
3579 procedure Set_Component_Size (Id : E; V : U) is
3581 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3583 end Set_Component_Size;
3585 procedure Set_Component_Type (Id : E; V : E) is
3587 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3589 end Set_Component_Type;
3591 procedure Set_Contract (Id : E; V : N) is
3594 (Ekind_In (Id, E_Entry,
3602 or else Is_Generic_Subprogram (Id)
3603 or else Is_Subprogram (Id));
3607 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3610 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3612 end Set_Corresponding_Concurrent_Type;
3614 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3616 pragma Assert (Ekind (Id) = E_Discriminant);
3618 end Set_Corresponding_Discriminant;
3620 procedure Set_Corresponding_Equality (Id : E; V : E) is
3623 (Ekind (Id) = E_Function
3624 and then not Comes_From_Source (Id)
3625 and then Chars (Id) = Name_Op_Ne);
3627 end Set_Corresponding_Equality;
3629 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3631 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3633 end Set_Corresponding_Protected_Entry;
3635 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3637 pragma Assert (Is_Concurrent_Type (Id));
3639 end Set_Corresponding_Record_Type;
3641 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3644 end Set_Corresponding_Remote_Type;
3646 procedure Set_Current_Use_Clause (Id : E; V : E) is
3648 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3650 end Set_Current_Use_Clause;
3652 procedure Set_Current_Value (Id : E; V : N) is
3654 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3656 end Set_Current_Value;
3658 procedure Set_CR_Discriminant (Id : E; V : E) is
3661 end Set_CR_Discriminant;
3663 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3665 Set_Flag166 (Id, V);
3666 end Set_Debug_Info_Off;
3668 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3671 end Set_Debug_Renaming_Link;
3673 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3675 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3677 end Set_Default_Aspect_Component_Value;
3679 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3681 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3683 end Set_Default_Aspect_Value;
3685 procedure Set_Default_Expr_Function (Id : E; V : E) is
3687 pragma Assert (Is_Formal (Id));
3689 end Set_Default_Expr_Function;
3691 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3693 Set_Flag108 (Id, V);
3694 end Set_Default_Expressions_Processed;
3696 procedure Set_Default_Value (Id : E; V : N) is
3698 pragma Assert (Is_Formal (Id));
3700 end Set_Default_Value;
3702 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3706 or else Is_Task_Type (Id)
3707 or else Ekind (Id) = E_Block);
3708 Set_Flag114 (Id, V);
3709 end Set_Delay_Cleanups;
3711 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3714 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3717 end Set_Delay_Subprogram_Descriptors;
3719 procedure Set_Delta_Value (Id : E; V : R) is
3721 pragma Assert (Is_Fixed_Point_Type (Id));
3722 Set_Ureal18 (Id, V);
3723 end Set_Delta_Value;
3725 procedure Set_Dependent_Instances (Id : E; V : L) is
3727 pragma Assert (Is_Generic_Instance (Id));
3729 end Set_Dependent_Instances;
3731 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3733 pragma Assert (Nkind (Id) in N_Entity);
3735 end Set_Depends_On_Private;
3737 procedure Set_Derived_Type_Link (Id : E; V : E) is
3739 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3741 end Set_Derived_Type_Link;
3743 procedure Set_Digits_Value (Id : E; V : U) is
3746 (Is_Floating_Point_Type (Id)
3747 or else Is_Decimal_Fixed_Point_Type (Id));
3749 end Set_Digits_Value;
3751 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3754 end Set_Directly_Designated_Type;
3756 procedure Set_Discard_Names (Id : E; V : B := True) is
3759 end Set_Discard_Names;
3761 procedure Set_Discriminal (Id : E; V : E) is
3763 pragma Assert (Ekind (Id) = E_Discriminant);
3765 end Set_Discriminal;
3767 procedure Set_Discriminal_Link (Id : E; V : E) is
3770 end Set_Discriminal_Link;
3772 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3774 pragma Assert (Ekind (Id) = E_Component);
3776 end Set_Discriminant_Checking_Func;
3778 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3780 pragma Assert (Nkind (Id) in N_Entity);
3781 Set_Elist21 (Id, V);
3782 end Set_Discriminant_Constraint;
3784 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3787 end Set_Discriminant_Default_Value;
3789 procedure Set_Discriminant_Number (Id : E; V : U) is
3792 end Set_Discriminant_Number;
3794 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3796 pragma Assert (Ekind (Id) = E_Record_Type
3797 and then Id = Implementation_Base_Type (Id));
3798 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3799 Set_Elist26 (Id, V);
3800 end Set_Dispatch_Table_Wrappers;
3802 procedure Set_DT_Entry_Count (Id : E; V : U) is
3804 pragma Assert (Ekind (Id) = E_Component);
3806 end Set_DT_Entry_Count;
3808 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3810 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3812 end Set_DT_Offset_To_Top_Func;
3814 procedure Set_DT_Position (Id : E; V : U) is
3816 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3818 end Set_DT_Position;
3820 procedure Set_DTC_Entity (Id : E; V : E) is
3822 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3826 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3828 pragma Assert (Ekind (Id) = E_Package);
3829 Set_Flag210 (Id, V);
3830 end Set_Elaborate_Body_Desirable;
3832 procedure Set_Elaboration_Entity (Id : E; V : E) is
3837 Ekind (Id) = E_Package
3839 Is_Generic_Unit (Id));
3841 end Set_Elaboration_Entity;
3843 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3848 Ekind (Id) = E_Package
3850 Is_Generic_Unit (Id));
3851 Set_Flag174 (Id, V);
3852 end Set_Elaboration_Entity_Required;
3854 procedure Set_Encapsulating_State (Id : E; V : E) is
3856 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3858 end Set_Encapsulating_State;
3860 procedure Set_Enclosing_Scope (Id : E; V : E) is
3863 end Set_Enclosing_Scope;
3865 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3867 pragma Assert (Is_Entry (Id));
3868 Set_Flag152 (Id, V);
3869 end Set_Entry_Accepted;
3871 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3874 end Set_Entry_Bodies_Array;
3876 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3879 end Set_Entry_Cancel_Parameter;
3881 procedure Set_Entry_Component (Id : E; V : E) is
3884 end Set_Entry_Component;
3886 procedure Set_Entry_Formal (Id : E; V : E) is
3889 end Set_Entry_Formal;
3891 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3893 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3895 end Set_Entry_Index_Constant;
3897 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3900 end Set_Entry_Parameters_Type;
3902 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3904 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3906 end Set_Enum_Pos_To_Rep;
3908 procedure Set_Enumeration_Pos (Id : E; V : U) is
3910 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3912 end Set_Enumeration_Pos;
3914 procedure Set_Enumeration_Rep (Id : E; V : U) is
3916 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3918 end Set_Enumeration_Rep;
3920 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3922 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3924 end Set_Enumeration_Rep_Expr;
3926 procedure Set_Equivalent_Type (Id : E; V : E) is
3929 (Ekind_In (Id, E_Class_Wide_Type,
3930 E_Class_Wide_Subtype,
3931 E_Access_Protected_Subprogram_Type,
3932 E_Anonymous_Access_Protected_Subprogram_Type,
3933 E_Access_Subprogram_Type,
3936 end Set_Equivalent_Type;
3938 procedure Set_Esize (Id : E; V : U) is
3943 procedure Set_Extra_Accessibility (Id : E; V : E) is
3946 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3948 end Set_Extra_Accessibility;
3950 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3952 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3954 end Set_Extra_Accessibility_Of_Result;
3956 procedure Set_Extra_Constrained (Id : E; V : E) is
3958 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3960 end Set_Extra_Constrained;
3962 procedure Set_Extra_Formal (Id : E; V : E) is
3965 end Set_Extra_Formal;
3967 procedure Set_Extra_Formals (Id : E; V : E) is
3970 (Is_Overloadable (Id)
3971 or else Ekind_In (Id, E_Entry_Family,
3973 E_Subprogram_Type));
3975 end Set_Extra_Formals;
3977 procedure Set_Finalization_Master (Id : E; V : E) is
3979 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3981 end Set_Finalization_Master;
3983 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3985 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3986 Set_Flag158 (Id, V);
3987 end Set_Finalize_Storage_Only;
3989 procedure Set_Finalizer (Id : E; V : E) is
3991 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3995 procedure Set_First_Entity (Id : E; V : E) is
3998 end Set_First_Entity;
4000 procedure Set_First_Exit_Statement (Id : E; V : N) is
4002 pragma Assert (Ekind (Id) = E_Loop);
4004 end Set_First_Exit_Statement;
4006 procedure Set_First_Index (Id : E; V : N) is
4008 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4010 end Set_First_Index;
4012 procedure Set_First_Literal (Id : E; V : E) is
4014 pragma Assert (Is_Enumeration_Type (Id));
4016 end Set_First_Literal;
4018 procedure Set_First_Private_Entity (Id : E; V : E) is
4020 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4021 or else Ekind (Id) in Concurrent_Kind);
4023 end Set_First_Private_Entity;
4025 procedure Set_First_Rep_Item (Id : E; V : N) is
4028 end Set_First_Rep_Item;
4030 procedure Set_Float_Rep (Id : E; V : F) is
4031 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4033 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4036 procedure Set_Freeze_Node (Id : E; V : N) is
4039 end Set_Freeze_Node;
4041 procedure Set_From_Limited_With (Id : E; V : B := True) is
4044 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4045 Set_Flag159 (Id, V);
4046 end Set_From_Limited_With;
4048 procedure Set_Full_View (Id : E; V : E) is
4050 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4054 procedure Set_Generic_Homonym (Id : E; V : E) is
4057 end Set_Generic_Homonym;
4059 procedure Set_Generic_Renamings (Id : E; V : L) is
4061 Set_Elist23 (Id, V);
4062 end Set_Generic_Renamings;
4064 procedure Set_Handler_Records (Id : E; V : S) is
4067 end Set_Handler_Records;
4069 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4071 pragma Assert (Id = Base_Type (Id));
4072 Set_Flag135 (Id, V);
4073 end Set_Has_Aliased_Components;
4075 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4078 end Set_Has_Alignment_Clause;
4080 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4083 end Set_Has_All_Calls_Remote;
4085 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4088 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4089 Set_Flag253 (Id, V);
4090 end Set_Has_Anonymous_Master;
4092 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4094 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4096 end Set_Has_Atomic_Components;
4098 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4101 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4102 Set_Flag139 (Id, V);
4103 end Set_Has_Biased_Representation;
4105 procedure Set_Has_Completion (Id : E; V : B := True) is
4108 end Set_Has_Completion;
4110 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4112 pragma Assert (Is_Type (Id));
4114 end Set_Has_Completion_In_Body;
4116 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4118 pragma Assert (Ekind (Id) = E_Record_Type);
4119 Set_Flag140 (Id, V);
4120 end Set_Has_Complex_Representation;
4122 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4124 pragma Assert (Ekind (Id) = E_Array_Type);
4126 end Set_Has_Component_Size_Clause;
4128 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4130 pragma Assert (Is_Type (Id));
4131 Set_Flag187 (Id, V);
4132 end Set_Has_Constrained_Partial_View;
4134 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4136 Set_Flag181 (Id, V);
4137 end Set_Has_Contiguous_Rep;
4139 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4141 pragma Assert (Id = Base_Type (Id));
4143 end Set_Has_Controlled_Component;
4145 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4148 end Set_Has_Controlling_Result;
4150 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4152 Set_Flag119 (Id, V);
4153 end Set_Has_Convention_Pragma;
4155 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4158 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4159 and then Is_Base_Type (Id));
4161 end Set_Has_Default_Aspect;
4163 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4165 pragma Assert (Is_Type (Id));
4167 end Set_Has_Default_Init_Cond;
4169 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4171 pragma Assert (Nkind (Id) in N_Entity);
4172 Set_Flag200 (Id, V);
4173 end Set_Has_Delayed_Aspects;
4175 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4177 pragma Assert (Nkind (Id) in N_Entity);
4179 end Set_Has_Delayed_Freeze;
4181 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4183 pragma Assert (Nkind (Id) in N_Entity);
4184 Set_Flag261 (Id, V);
4185 end Set_Has_Delayed_Rep_Aspects;
4187 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4189 pragma Assert (Nkind (Id) in N_Entity);
4191 end Set_Has_Discriminants;
4193 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4195 pragma Assert (Ekind (Id) = E_Record_Type
4196 and then Is_Tagged_Type (Id));
4197 Set_Flag220 (Id, V);
4198 end Set_Has_Dispatch_Table;
4200 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4202 pragma Assert (Is_Type (Id));
4203 Set_Flag258 (Id, V);
4204 end Set_Has_Dynamic_Predicate_Aspect;
4206 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4208 pragma Assert (Is_Enumeration_Type (Id));
4210 end Set_Has_Enumeration_Rep_Clause;
4212 procedure Set_Has_Exit (Id : E; V : B := True) is
4217 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4219 Set_Flag175 (Id, V);
4220 end Set_Has_Forward_Instantiation;
4222 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4224 Set_Flag173 (Id, V);
4225 end Set_Has_Fully_Qualified_Name;
4227 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4230 end Set_Has_Gigi_Rep_Item;
4232 procedure Set_Has_Homonym (Id : E; V : B := True) is
4235 end Set_Has_Homonym;
4237 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4239 Set_Flag251 (Id, V);
4240 end Set_Has_Implicit_Dereference;
4242 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4244 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4245 and then Is_Base_Type (Id));
4247 end Set_Has_Independent_Components;
4249 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4251 pragma Assert (Is_Type (Id));
4252 Set_Flag248 (Id, V);
4253 end Set_Has_Inheritable_Invariants;
4255 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4257 pragma Assert (Is_Type (Id));
4258 Set_Flag133 (Id, V);
4259 end Set_Has_Inherited_Default_Init_Cond;
4261 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4263 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4264 Set_Flag219 (Id, V);
4265 end Set_Has_Initial_Value;
4267 procedure Set_Has_Invariants (Id : E; V : B := True) is
4269 pragma Assert (Is_Type (Id));
4270 Set_Flag232 (Id, V);
4271 end Set_Has_Invariants;
4273 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4275 pragma Assert (Ekind (Id) = E_Loop);
4276 Set_Flag260 (Id, V);
4277 end Set_Has_Loop_Entry_Attributes;
4279 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4281 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4283 end Set_Has_Machine_Radix_Clause;
4285 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4288 end Set_Has_Master_Entity;
4290 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4292 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4293 Set_Flag142 (Id, V);
4294 end Set_Has_Missing_Return;
4296 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4298 Set_Flag101 (Id, V);
4299 end Set_Has_Nested_Block_With_Handler;
4301 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4303 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4304 Set_Flag215 (Id, V);
4305 end Set_Has_Up_Level_Access;
4307 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4309 pragma Assert (Id = Base_Type (Id));
4311 end Set_Has_Non_Standard_Rep;
4313 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4315 pragma Assert (Is_Type (Id));
4316 Set_Flag172 (Id, V);
4317 end Set_Has_Object_Size_Clause;
4319 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4321 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4322 Set_Flag110 (Id, V);
4323 end Set_Has_Out_Or_In_Out_Parameter;
4325 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4327 Set_Flag154 (Id, V);
4328 end Set_Has_Per_Object_Constraint;
4330 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4332 pragma Assert (Is_Subprogram (Id));
4333 Set_Flag240 (Id, V);
4334 end Set_Has_Postconditions;
4336 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4338 pragma Assert (Is_Access_Type (Id));
4339 Set_Flag27 (Base_Type (Id), V);
4340 end Set_Has_Pragma_Controlled;
4342 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4344 Set_Flag150 (Id, V);
4345 end Set_Has_Pragma_Elaborate_Body;
4347 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4349 Set_Flag157 (Id, V);
4350 end Set_Has_Pragma_Inline;
4352 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4354 Set_Flag230 (Id, V);
4355 end Set_Has_Pragma_Inline_Always;
4357 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4359 Set_Flag201 (Id, V);
4360 end Set_Has_Pragma_No_Inline;
4362 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4364 pragma Assert (Is_Enumeration_Type (Id));
4365 pragma Assert (Id = Base_Type (Id));
4366 Set_Flag198 (Id, V);
4367 end Set_Has_Pragma_Ordered;
4369 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4371 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4372 pragma Assert (Id = Base_Type (Id));
4373 Set_Flag121 (Id, V);
4374 end Set_Has_Pragma_Pack;
4376 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4378 Set_Flag221 (Id, V);
4379 end Set_Has_Pragma_Preelab_Init;
4381 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4383 Set_Flag203 (Id, V);
4384 end Set_Has_Pragma_Pure;
4386 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4388 Set_Flag179 (Id, V);
4389 end Set_Has_Pragma_Pure_Function;
4391 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4393 Set_Flag169 (Id, V);
4394 end Set_Has_Pragma_Thread_Local_Storage;
4396 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4398 Set_Flag233 (Id, V);
4399 end Set_Has_Pragma_Unmodified;
4401 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4403 Set_Flag180 (Id, V);
4404 end Set_Has_Pragma_Unreferenced;
4406 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4408 pragma Assert (Is_Type (Id));
4409 Set_Flag212 (Id, V);
4410 end Set_Has_Pragma_Unreferenced_Objects;
4412 procedure Set_Has_Predicates (Id : E; V : B := True) is
4414 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4415 Set_Flag250 (Id, V);
4416 end Set_Has_Predicates;
4418 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4420 pragma Assert (Id = Base_Type (Id));
4421 Set_Flag120 (Id, V);
4422 end Set_Has_Primitive_Operations;
4424 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4426 pragma Assert (Is_Type (Id));
4427 Set_Flag151 (Id, V);
4428 end Set_Has_Private_Ancestor;
4430 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4432 Set_Flag155 (Id, V);
4433 end Set_Has_Private_Declaration;
4435 procedure Set_Has_Protected (Id : E; V : B := True) is
4437 Set_Flag271 (Id, V);
4438 end Set_Has_Protected;
4440 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4442 Set_Flag161 (Id, V);
4443 end Set_Has_Qualified_Name;
4445 procedure Set_Has_RACW (Id : E; V : B := True) is
4447 pragma Assert (Ekind (Id) = E_Package);
4448 Set_Flag214 (Id, V);
4451 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4453 pragma Assert (Id = Base_Type (Id));
4455 end Set_Has_Record_Rep_Clause;
4457 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4459 pragma Assert (Is_Subprogram (Id));
4460 Set_Flag143 (Id, V);
4461 end Set_Has_Recursive_Call;
4463 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4465 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4466 Set_Flag267 (Id, V);
4467 end Set_Has_Shift_Operator;
4469 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4472 end Set_Has_Size_Clause;
4474 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4477 end Set_Has_Small_Clause;
4479 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4481 pragma Assert (Id = Base_Type (Id));
4482 Set_Flag100 (Id, V);
4483 end Set_Has_Specified_Layout;
4485 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4487 pragma Assert (Is_Type (Id));
4488 Set_Flag190 (Id, V);
4489 end Set_Has_Specified_Stream_Input;
4491 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4493 pragma Assert (Is_Type (Id));
4494 Set_Flag191 (Id, V);
4495 end Set_Has_Specified_Stream_Output;
4497 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4499 pragma Assert (Is_Type (Id));
4500 Set_Flag192 (Id, V);
4501 end Set_Has_Specified_Stream_Read;
4503 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4505 pragma Assert (Is_Type (Id));
4506 Set_Flag193 (Id, V);
4507 end Set_Has_Specified_Stream_Write;
4509 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4511 Set_Flag211 (Id, V);
4512 end Set_Has_Static_Discriminants;
4514 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4516 pragma Assert (Is_Type (Id));
4517 Set_Flag269 (Id, V);
4518 end Set_Has_Static_Predicate;
4520 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4522 pragma Assert (Is_Type (Id));
4523 Set_Flag259 (Id, V);
4524 end Set_Has_Static_Predicate_Aspect;
4526 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4528 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4529 pragma Assert (Id = Base_Type (Id));
4531 end Set_Has_Storage_Size_Clause;
4533 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4535 pragma Assert (Is_Elementary_Type (Id));
4536 Set_Flag184 (Id, V);
4537 end Set_Has_Stream_Size_Clause;
4539 procedure Set_Has_Task (Id : E; V : B := True) is
4541 pragma Assert (Id = Base_Type (Id));
4545 procedure Set_Has_Thunks (Id : E; V : B := True) is
4547 pragma Assert (Is_Tag (Id));
4548 Set_Flag228 (Id, V);
4551 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4553 pragma Assert (Id = Base_Type (Id));
4554 Set_Flag123 (Id, V);
4555 end Set_Has_Unchecked_Union;
4557 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4559 pragma Assert (Is_Type (Id));
4561 end Set_Has_Unknown_Discriminants;
4563 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4565 pragma Assert (Ekind (Id) = E_Abstract_State);
4566 Set_Flag263 (Id, V);
4567 end Set_Has_Visible_Refinement;
4569 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4571 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4573 end Set_Has_Volatile_Components;
4575 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4577 Set_Flag182 (Id, V);
4578 end Set_Has_Xref_Entry;
4580 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4582 pragma Assert (Ekind (Id) = E_Variable);
4584 end Set_Hiding_Loop_Variable;
4586 procedure Set_Homonym (Id : E; V : E) is
4588 pragma Assert (Id /= V);
4592 procedure Set_Import_Pragma (Id : E; V : E) is
4594 pragma Assert (Is_Subprogram (Id));
4596 end Set_Import_Pragma;
4598 procedure Set_Interface_Alias (Id : E; V : E) is
4602 and then Is_Hidden (Id)
4603 and then (Ekind_In (Id, E_Procedure, E_Function)));
4605 end Set_Interface_Alias;
4607 procedure Set_Interfaces (Id : E; V : L) is
4609 pragma Assert (Is_Record_Type (Id));
4610 Set_Elist25 (Id, V);
4613 procedure Set_In_Package_Body (Id : E; V : B := True) is
4616 end Set_In_Package_Body;
4618 procedure Set_In_Private_Part (Id : E; V : B := True) is
4621 end Set_In_Private_Part;
4623 procedure Set_In_Use (Id : E; V : B := True) is
4625 pragma Assert (Nkind (Id) in N_Entity);
4629 procedure Set_Initialization_Statements (Id : E; V : N) is
4631 -- Tolerate an E_Void entity since this can be called while resolving
4632 -- an aggregate used as the initialization expression for an object
4633 -- declaration, and this occurs before the Ekind for the object is set.
4635 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4637 end Set_Initialization_Statements;
4639 procedure Set_Inner_Instances (Id : E; V : L) is
4641 Set_Elist23 (Id, V);
4642 end Set_Inner_Instances;
4644 procedure Set_Interface_Name (Id : E; V : N) is
4647 end Set_Interface_Name;
4649 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4651 pragma Assert (Is_Overloadable (Id));
4653 end Set_Is_Abstract_Subprogram;
4655 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4657 pragma Assert (Is_Type (Id));
4658 Set_Flag146 (Id, V);
4659 end Set_Is_Abstract_Type;
4661 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4663 pragma Assert (Is_Access_Type (Id));
4664 Set_Flag194 (Id, V);
4665 end Set_Is_Local_Anonymous_Access;
4667 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4669 pragma Assert (Is_Access_Type (Id));
4671 end Set_Is_Access_Constant;
4673 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4675 Set_Flag185 (Id, V);
4676 end Set_Is_Ada_2005_Only;
4678 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4680 Set_Flag199 (Id, V);
4681 end Set_Is_Ada_2012_Only;
4683 procedure Set_Is_Aliased (Id : E; V : B := True) is
4685 pragma Assert (Nkind (Id) in N_Entity);
4689 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4692 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4694 end Set_Is_Asynchronous;
4696 procedure Set_Is_Atomic (Id : E; V : B := True) is
4701 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4703 pragma Assert ((not V)
4704 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4705 Set_Flag122 (Id, V);
4706 end Set_Is_Bit_Packed_Array;
4708 procedure Set_Is_Called (Id : E; V : B := True) is
4710 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4711 Set_Flag102 (Id, V);
4714 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4717 end Set_Is_Character_Type;
4719 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4722 end Set_Is_Child_Unit;
4724 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4727 end Set_Is_Class_Wide_Equivalent_Type;
4729 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4731 Set_Flag149 (Id, V);
4732 end Set_Is_Compilation_Unit;
4734 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4736 pragma Assert (Ekind (Id) = E_Discriminant);
4737 Set_Flag103 (Id, V);
4738 end Set_Is_Completely_Hidden;
4740 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4743 end Set_Is_Concurrent_Record_Type;
4745 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4748 end Set_Is_Constr_Subt_For_U_Nominal;
4750 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4752 Set_Flag141 (Id, V);
4753 end Set_Is_Constr_Subt_For_UN_Aliased;
4755 procedure Set_Is_Constrained (Id : E; V : B := True) is
4757 pragma Assert (Nkind (Id) in N_Entity);
4759 end Set_Is_Constrained;
4761 procedure Set_Is_Constructor (Id : E; V : B := True) is
4764 end Set_Is_Constructor;
4766 procedure Set_Is_Controlled (Id : E; V : B := True) is
4768 pragma Assert (Id = Base_Type (Id));
4770 end Set_Is_Controlled;
4772 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4774 pragma Assert (Is_Formal (Id));
4776 end Set_Is_Controlling_Formal;
4778 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4781 end Set_Is_CPP_Class;
4783 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4785 pragma Assert (Ekind (Id) = E_Procedure);
4786 Set_Flag132 (Id, V);
4787 end Set_Is_Default_Init_Cond_Procedure;
4789 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4791 pragma Assert (Is_Type (Id));
4792 Set_Flag223 (Id, V);
4793 end Set_Is_Descendent_Of_Address;
4795 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4797 Set_Flag176 (Id, V);
4798 end Set_Is_Discrim_SO_Function;
4800 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4802 Set_Flag264 (Id, V);
4803 end Set_Is_Discriminant_Check_Function;
4805 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4807 Set_Flag234 (Id, V);
4808 end Set_Is_Dispatch_Table_Entity;
4810 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4815 Is_Overloadable (Id)
4817 Ekind (Id) = E_Subprogram_Type);
4820 end Set_Is_Dispatching_Operation;
4822 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4824 Set_Flag124 (Id, V);
4825 end Set_Is_Eliminated;
4827 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4830 end Set_Is_Entry_Formal;
4832 procedure Set_Is_Exported (Id : E; V : B := True) is
4835 end Set_Is_Exported;
4837 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4840 end Set_Is_First_Subtype;
4842 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4844 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4845 Set_Flag118 (Id, V);
4846 end Set_Is_For_Access_Subtype;
4848 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4850 Set_Flag111 (Id, V);
4851 end Set_Is_Formal_Subprogram;
4853 procedure Set_Is_Frozen (Id : E; V : B := True) is
4855 pragma Assert (Nkind (Id) in N_Entity);
4859 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4861 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4862 Set_Flag274 (Id, V);
4863 end Set_Is_Generic_Actual_Subprogram;
4865 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4867 pragma Assert (Is_Type (Id));
4869 end Set_Is_Generic_Actual_Type;
4871 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4873 Set_Flag130 (Id, V);
4874 end Set_Is_Generic_Instance;
4876 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4878 pragma Assert (Nkind (Id) in N_Entity);
4880 end Set_Is_Generic_Type;
4882 procedure Set_Is_Hidden (Id : E; V : B := True) is
4887 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
4889 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4891 end Set_Is_Hidden_Non_Overridden_Subpgm;
4893 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4895 Set_Flag171 (Id, V);
4896 end Set_Is_Hidden_Open_Scope;
4898 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4900 pragma Assert (Nkind (Id) in N_Entity);
4902 end Set_Is_Immediately_Visible;
4904 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4906 Set_Flag254 (Id, V);
4907 end Set_Is_Implementation_Defined;
4909 procedure Set_Is_Imported (Id : E; V : B := True) is
4912 end Set_Is_Imported;
4914 procedure Set_Is_Independent (Id : E; V : B := True) is
4916 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4917 Set_Flag268 (Id, V);
4918 end Set_Is_Independent;
4920 procedure Set_Is_Inlined (Id : E; V : B := True) is
4925 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4927 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4929 end Set_Is_Inlined_Always;
4931 procedure Set_Is_Interface (Id : E; V : B := True) is
4933 pragma Assert (Is_Record_Type (Id));
4934 Set_Flag186 (Id, V);
4935 end Set_Is_Interface;
4937 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4939 Set_Flag126 (Id, V);
4940 end Set_Is_Instantiated;
4942 procedure Set_Is_Internal (Id : E; V : B := True) is
4944 pragma Assert (Nkind (Id) in N_Entity);
4946 end Set_Is_Internal;
4948 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4950 pragma Assert (Nkind (Id) in N_Entity);
4952 end Set_Is_Interrupt_Handler;
4954 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4957 end Set_Is_Intrinsic_Subprogram;
4959 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4961 pragma Assert (Ekind (Id) = E_Procedure);
4962 Set_Flag257 (Id, V);
4963 end Set_Is_Invariant_Procedure;
4965 procedure Set_Is_Itype (Id : E; V : B := True) is
4970 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4973 end Set_Is_Known_Non_Null;
4975 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4977 Set_Flag204 (Id, V);
4978 end Set_Is_Known_Null;
4980 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4982 Set_Flag170 (Id, V);
4983 end Set_Is_Known_Valid;
4985 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4987 pragma Assert (Is_Type (Id));
4988 Set_Flag106 (Id, V);
4989 end Set_Is_Limited_Composite;
4991 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4993 pragma Assert (Is_Interface (Id));
4994 Set_Flag197 (Id, V);
4995 end Set_Is_Limited_Interface;
4997 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5000 end Set_Is_Limited_Record;
5002 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5004 pragma Assert (Is_Subprogram (Id));
5005 Set_Flag137 (Id, V);
5006 end Set_Is_Machine_Code_Subprogram;
5008 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5010 pragma Assert (Is_Type (Id));
5011 Set_Flag109 (Id, V);
5012 end Set_Is_Non_Static_Subtype;
5014 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5016 pragma Assert (Ekind (Id) = E_Procedure);
5017 Set_Flag178 (Id, V);
5018 end Set_Is_Null_Init_Proc;
5020 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5022 Set_Flag153 (Id, V);
5023 end Set_Is_Obsolescent;
5025 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5027 pragma Assert (Ekind (Id) = E_Out_Parameter);
5028 Set_Flag226 (Id, V);
5029 end Set_Is_Only_Out_Parameter;
5031 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5033 Set_Flag160 (Id, V);
5034 end Set_Is_Package_Body_Entity;
5036 procedure Set_Is_Packed (Id : E; V : B := True) is
5038 pragma Assert (Id = Base_Type (Id));
5042 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5044 Set_Flag138 (Id, V);
5045 end Set_Is_Packed_Array_Impl_Type;
5047 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5049 pragma Assert (Nkind (Id) in N_Entity);
5051 end Set_Is_Potentially_Use_Visible;
5053 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5055 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5056 Set_Flag255 (Id, V);
5057 end Set_Is_Predicate_Function;
5059 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5061 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5062 Set_Flag256 (Id, V);
5063 end Set_Is_Predicate_Function_M;
5065 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5068 end Set_Is_Preelaborated;
5070 procedure Set_Is_Primitive (Id : E; V : B := True) is
5073 (Is_Overloadable (Id)
5074 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5075 Set_Flag218 (Id, V);
5076 end Set_Is_Primitive;
5078 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5080 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5081 Set_Flag195 (Id, V);
5082 end Set_Is_Primitive_Wrapper;
5084 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5086 pragma Assert (Is_Type (Id));
5087 Set_Flag107 (Id, V);
5088 end Set_Is_Private_Composite;
5090 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5093 end Set_Is_Private_Descendant;
5095 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5097 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5098 Set_Flag245 (Id, V);
5099 end Set_Is_Private_Primitive;
5101 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5103 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5104 Set_Flag252 (Id, V);
5105 end Set_Is_Processed_Transient;
5107 procedure Set_Is_Public (Id : E; V : B := True) is
5109 pragma Assert (Nkind (Id) in N_Entity);
5113 procedure Set_Is_Pure (Id : E; V : B := True) is
5118 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5120 pragma Assert (Is_Access_Type (Id));
5121 Set_Flag189 (Id, V);
5122 end Set_Is_Pure_Unit_Access_Type;
5124 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5126 pragma Assert (Is_Type (Id));
5127 Set_Flag244 (Id, V);
5128 end Set_Is_RACW_Stub_Type;
5130 procedure Set_Is_Raised (Id : E; V : B := True) is
5132 pragma Assert (Ekind (Id) = E_Exception);
5133 Set_Flag224 (Id, V);
5136 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5139 end Set_Is_Remote_Call_Interface;
5141 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5144 end Set_Is_Remote_Types;
5146 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5148 Set_Flag112 (Id, V);
5149 end Set_Is_Renaming_Of_Object;
5151 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5153 Set_Flag209 (Id, V);
5154 end Set_Is_Return_Object;
5156 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5158 pragma Assert (Ekind (Id) = E_Variable);
5159 Set_Flag249 (Id, V);
5160 end Set_Is_Safe_To_Reevaluate;
5162 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5165 end Set_Is_Shared_Passive;
5167 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5171 or else Ekind_In (Id, E_Exception,
5176 end Set_Is_Statically_Allocated;
5178 procedure Set_Is_Tag (Id : E; V : B := True) is
5180 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5184 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5187 end Set_Is_Tagged_Type;
5189 procedure Set_Is_Thunk (Id : E; V : B := True) is
5191 pragma Assert (Is_Subprogram (Id));
5192 Set_Flag225 (Id, V);
5195 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5197 Set_Flag235 (Id, V);
5198 end Set_Is_Trivial_Subprogram;
5200 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5202 Set_Flag163 (Id, V);
5203 end Set_Is_True_Constant;
5205 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5207 pragma Assert (Id = Base_Type (Id));
5208 Set_Flag117 (Id, V);
5209 end Set_Is_Unchecked_Union;
5211 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5213 pragma Assert (Ekind (Id) = E_Record_Type);
5214 Set_Flag246 (Id, V);
5215 end Set_Is_Underlying_Record_View;
5217 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5219 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5220 Set_Flag144 (Id, V);
5221 end Set_Is_Unsigned_Type;
5223 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5225 pragma Assert (Ekind (Id) = E_Procedure);
5226 Set_Flag127 (Id, V);
5227 end Set_Is_Valued_Procedure;
5229 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5231 Set_Flag206 (Id, V);
5232 end Set_Is_Visible_Formal;
5234 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5236 Set_Flag116 (Id, V);
5237 end Set_Is_Visible_Lib_Unit;
5239 procedure Set_Is_Volatile (Id : E; V : B := True) is
5241 pragma Assert (Nkind (Id) in N_Entity);
5243 end Set_Is_Volatile;
5245 procedure Set_Itype_Printed (Id : E; V : B := True) is
5247 pragma Assert (Is_Itype (Id));
5248 Set_Flag202 (Id, V);
5249 end Set_Itype_Printed;
5251 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5254 end Set_Kill_Elaboration_Checks;
5256 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5259 end Set_Kill_Range_Checks;
5261 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5263 pragma Assert (Is_Type (Id));
5264 Set_Flag207 (Id, V);
5265 end Set_Known_To_Have_Preelab_Init;
5267 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5269 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5271 end Set_Last_Aggregate_Assignment;
5273 procedure Set_Last_Assignment (Id : E; V : N) is
5275 pragma Assert (Is_Assignable (Id));
5277 end Set_Last_Assignment;
5279 procedure Set_Last_Entity (Id : E; V : E) is
5282 end Set_Last_Entity;
5284 procedure Set_Limited_View (Id : E; V : E) is
5286 pragma Assert (Ekind (Id) = E_Package);
5288 end Set_Limited_View;
5290 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5292 pragma Assert (Is_Type (Id)
5293 or else Ekind_In (Id, E_Constant, E_Variable)
5294 or else Is_Subprogram (Id));
5296 end Set_Linker_Section_Pragma;
5298 procedure Set_Lit_Indexes (Id : E; V : E) is
5300 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5302 end Set_Lit_Indexes;
5304 procedure Set_Lit_Strings (Id : E; V : E) is
5306 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5308 end Set_Lit_Strings;
5310 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5312 pragma Assert (Is_Formal (Id));
5313 Set_Flag205 (Id, V);
5314 end Set_Low_Bound_Tested;
5316 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5318 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5320 end Set_Machine_Radix_10;
5322 procedure Set_Master_Id (Id : E; V : E) is
5324 pragma Assert (Is_Access_Type (Id));
5328 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5330 Set_Flag168 (Id, V);
5331 end Set_Materialize_Entity;
5333 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5335 Set_Flag262 (Id, V);
5336 end Set_May_Inherit_Delayed_Rep_Aspects;
5338 procedure Set_Mechanism (Id : E; V : M) is
5340 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5341 Set_Uint8 (Id, UI_From_Int (V));
5344 procedure Set_Modulus (Id : E; V : U) is
5346 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5350 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5352 pragma Assert (Is_Type (Id));
5353 Set_Flag183 (Id, V);
5354 end Set_Must_Be_On_Byte_Boundary;
5356 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5358 pragma Assert (Is_Type (Id));
5359 Set_Flag208 (Id, V);
5360 end Set_Must_Have_Preelab_Init;
5362 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5364 Set_Flag147 (Id, V);
5365 end Set_Needs_Debug_Info;
5367 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5370 (Is_Overloadable (Id)
5371 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5373 end Set_Needs_No_Actuals;
5375 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5377 Set_Flag115 (Id, V);
5378 end Set_Never_Set_In_Source;
5380 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5383 end Set_Next_Inlined_Subprogram;
5385 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5387 pragma Assert (Is_Discrete_Type (Id));
5388 Set_Flag276 (Id, V);
5389 end Set_No_Dynamic_Predicate_On_Actual;
5391 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5393 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5394 Set_Flag131 (Id, V);
5395 end Set_No_Pool_Assigned;
5397 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5399 pragma Assert (Is_Discrete_Type (Id));
5400 Set_Flag275 (Id, V);
5401 end Set_No_Predicate_On_Actual;
5403 procedure Set_No_Return (Id : E; V : B := True) is
5406 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5407 Set_Flag113 (Id, V);
5410 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5412 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5413 Set_Flag136 (Id, V);
5414 end Set_No_Strict_Aliasing;
5416 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5418 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5420 end Set_Non_Binary_Modulus;
5422 procedure Set_Non_Limited_View (Id : E; V : E) is
5425 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5427 end Set_Non_Limited_View;
5429 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5432 (Root_Type (Id) = Standard_Boolean
5433 and then Ekind (Id) = E_Enumeration_Type);
5434 Set_Flag162 (Id, V);
5435 end Set_Nonzero_Is_True;
5437 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5439 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5441 end Set_Normalized_First_Bit;
5443 procedure Set_Normalized_Position (Id : E; V : U) is
5445 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5447 end Set_Normalized_Position;
5449 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5451 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5453 end Set_Normalized_Position_Max;
5455 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5457 pragma Assert (Ekind (Id) = E_Variable);
5458 Set_Flag247 (Id, V);
5459 end Set_OK_To_Rename;
5461 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5464 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5465 Set_Flag239 (Id, V);
5466 end Set_OK_To_Reorder_Components;
5468 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5471 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5472 Set_Flag241 (Id, V);
5473 end Set_Optimize_Alignment_Space;
5475 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5478 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5479 Set_Flag242 (Id, V);
5480 end Set_Optimize_Alignment_Time;
5482 procedure Set_Original_Access_Type (Id : E; V : E) is
5484 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5486 end Set_Original_Access_Type;
5488 procedure Set_Original_Array_Type (Id : E; V : E) is
5490 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5492 end Set_Original_Array_Type;
5494 procedure Set_Original_Record_Component (Id : E; V : E) is
5496 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5498 end Set_Original_Record_Component;
5500 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5502 Set_Flag243 (Id, V);
5503 end Set_Overlays_Constant;
5505 procedure Set_Overridden_Operation (Id : E; V : E) is
5508 end Set_Overridden_Operation;
5510 procedure Set_Package_Instantiation (Id : E; V : N) is
5512 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5514 end Set_Package_Instantiation;
5516 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5518 pragma Assert (Is_Array_Type (Id));
5520 end Set_Packed_Array_Impl_Type;
5522 procedure Set_Parent_Subtype (Id : E; V : E) is
5524 pragma Assert (Ekind (Id) = E_Record_Type);
5526 end Set_Parent_Subtype;
5528 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5530 pragma Assert (Ekind (Id) = E_Abstract_State);
5532 end Set_Part_Of_Constituents;
5534 procedure Set_Postcondition_Proc (Id : E; V : E) is
5536 pragma Assert (Ekind (Id) = E_Procedure);
5538 end Set_Postcondition_Proc;
5540 procedure Set_PPC_Wrapper (Id : E; V : E) is
5542 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5544 end Set_PPC_Wrapper;
5546 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5548 pragma Assert (Is_Tagged_Type (Id));
5549 Set_Elist10 (Id, V);
5550 end Set_Direct_Primitive_Operations;
5552 procedure Set_Prival (Id : E; V : E) is
5554 pragma Assert (Is_Protected_Component (Id));
5558 procedure Set_Prival_Link (Id : E; V : E) is
5560 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5562 end Set_Prival_Link;
5564 procedure Set_Private_Dependents (Id : E; V : L) is
5566 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5567 Set_Elist18 (Id, V);
5568 end Set_Private_Dependents;
5570 procedure Set_Private_View (Id : E; V : N) is
5572 pragma Assert (Is_Private_Type (Id));
5574 end Set_Private_View;
5576 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5578 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5580 end Set_Protected_Body_Subprogram;
5582 procedure Set_Protected_Formal (Id : E; V : E) is
5584 pragma Assert (Is_Formal (Id));
5586 end Set_Protected_Formal;
5588 procedure Set_Protection_Object (Id : E; V : E) is
5590 pragma Assert (Ekind_In (Id, E_Entry,
5595 end Set_Protection_Object;
5597 procedure Set_Reachable (Id : E; V : B := True) is
5602 procedure Set_Referenced (Id : E; V : B := True) is
5604 Set_Flag156 (Id, V);
5607 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5610 end Set_Referenced_As_LHS;
5612 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5614 Set_Flag227 (Id, V);
5615 end Set_Referenced_As_Out_Parameter;
5617 procedure Set_Refinement_Constituents (Id : E; V : L) is
5619 pragma Assert (Ekind (Id) = E_Abstract_State);
5621 end Set_Refinement_Constituents;
5623 procedure Set_Register_Exception_Call (Id : E; V : N) is
5625 pragma Assert (Ekind (Id) = E_Exception);
5627 end Set_Register_Exception_Call;
5629 procedure Set_Related_Array_Object (Id : E; V : E) is
5631 pragma Assert (Is_Array_Type (Id));
5633 end Set_Related_Array_Object;
5635 procedure Set_Related_Expression (Id : E; V : N) is
5637 pragma Assert (Ekind (Id) in Type_Kind
5638 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5640 end Set_Related_Expression;
5642 procedure Set_Related_Instance (Id : E; V : E) is
5644 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5646 end Set_Related_Instance;
5648 procedure Set_Related_Type (Id : E; V : E) is
5650 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5652 end Set_Related_Type;
5654 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5656 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5658 end Set_Relative_Deadline_Variable;
5660 procedure Set_Renamed_Entity (Id : E; V : N) is
5663 end Set_Renamed_Entity;
5665 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5667 pragma Assert (Ekind (Id) = E_Package);
5668 Set_Flag231 (Id, V);
5669 end Set_Renamed_In_Spec;
5671 procedure Set_Renamed_Object (Id : E; V : N) is
5674 end Set_Renamed_Object;
5676 procedure Set_Renaming_Map (Id : E; V : U) is
5679 end Set_Renaming_Map;
5681 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5683 pragma Assert (Is_Overloadable (Id));
5684 Set_Flag213 (Id, V);
5685 end Set_Requires_Overriding;
5687 procedure Set_Return_Present (Id : E; V : B := True) is
5690 end Set_Return_Present;
5692 procedure Set_Return_Applies_To (Id : E; V : N) is
5695 end Set_Return_Applies_To;
5697 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5700 end Set_Returns_By_Ref;
5702 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5704 Set_Flag134 (Id, V);
5705 end Set_Returns_Limited_View;
5707 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5710 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5711 Set_Flag164 (Id, V);
5712 end Set_Reverse_Bit_Order;
5714 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5718 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5720 end Set_Reverse_Storage_Order;
5722 procedure Set_RM_Size (Id : E; V : U) is
5724 pragma Assert (Is_Type (Id));
5728 procedure Set_Scalar_Range (Id : E; V : N) is
5731 end Set_Scalar_Range;
5733 procedure Set_Scale_Value (Id : E; V : U) is
5736 end Set_Scale_Value;
5738 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5740 pragma Assert (not Is_Record_Type (Id));
5742 end Set_Scope_Depth_Value;
5744 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5746 Set_Flag167 (Id, V);
5747 end Set_Sec_Stack_Needed_For_Return;
5749 procedure Set_Shadow_Entities (Id : E; V : S) is
5751 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5753 end Set_Shadow_Entities;
5755 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5757 pragma Assert (Ekind (Id) = E_Variable);
5759 end Set_Shared_Var_Procs_Instance;
5761 procedure Set_Size_Check_Code (Id : E; V : N) is
5763 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5765 end Set_Size_Check_Code;
5767 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5769 Set_Flag177 (Id, V);
5770 end Set_Size_Depends_On_Discriminant;
5772 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5775 end Set_Size_Known_At_Compile_Time;
5777 procedure Set_Small_Value (Id : E; V : R) is
5779 pragma Assert (Is_Fixed_Point_Type (Id));
5780 Set_Ureal21 (Id, V);
5781 end Set_Small_Value;
5783 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5786 (Ekind_In (Id, E_Generic_Package, -- package variants
5791 end Set_SPARK_Aux_Pragma;
5793 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5796 (Ekind_In (Id, E_Generic_Package, -- package variants
5800 Set_Flag266 (Id, V);
5801 end Set_SPARK_Aux_Pragma_Inherited;
5803 procedure Set_SPARK_Pragma (Id : E; V : N) is
5806 (Ekind_In (Id, E_Function, -- subprogram variants
5808 E_Generic_Procedure,
5812 Ekind_In (Id, E_Generic_Package, -- package variants
5817 end Set_SPARK_Pragma;
5819 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5822 (Ekind_In (Id, E_Function, -- subprogram variants
5824 E_Generic_Procedure,
5828 Ekind_In (Id, E_Generic_Package, -- package variants
5832 Set_Flag265 (Id, V);
5833 end Set_SPARK_Pragma_Inherited;
5835 procedure Set_Spec_Entity (Id : E; V : E) is
5837 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5839 end Set_Spec_Entity;
5841 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5845 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5846 Set_Flag273 (Id, V);
5847 end Set_SSO_Set_High_By_Default;
5849 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5853 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5854 Set_Flag272 (Id, V);
5855 end Set_SSO_Set_Low_By_Default;
5857 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5859 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5861 end Set_Static_Discrete_Predicate;
5863 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5865 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5866 and then Has_Predicates (Id));
5868 end Set_Static_Real_Or_String_Predicate;
5870 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5872 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5874 end Set_Status_Flag_Or_Transient_Decl;
5876 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5878 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5879 pragma Assert (Id = Base_Type (Id));
5881 end Set_Storage_Size_Variable;
5883 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5885 pragma Assert (Ekind (Id) = E_Package);
5887 end Set_Static_Elaboration_Desired;
5889 procedure Set_Static_Initialization (Id : E; V : N) is
5892 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5894 end Set_Static_Initialization;
5896 procedure Set_Stored_Constraint (Id : E; V : L) is
5898 pragma Assert (Nkind (Id) in N_Entity);
5899 Set_Elist23 (Id, V);
5900 end Set_Stored_Constraint;
5902 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5904 pragma Assert (Ekind (Id) = E_Constant);
5905 Set_Flag270 (Id, V);
5906 end Set_Stores_Attribute_Old_Prefix;
5908 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5910 pragma Assert (Id = Base_Type (Id));
5911 Set_Flag145 (Id, V);
5912 end Set_Strict_Alignment;
5914 procedure Set_String_Literal_Length (Id : E; V : U) is
5916 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5918 end Set_String_Literal_Length;
5920 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5922 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5924 end Set_String_Literal_Low_Bound;
5926 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5928 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5930 end Set_Subprograms_For_Type;
5932 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5934 Set_Flag148 (Id, V);
5935 end Set_Suppress_Elaboration_Warnings;
5937 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5939 pragma Assert (Is_Type (Id));
5940 Set_Flag105 (Id, V);
5941 end Set_Suppress_Initialization;
5943 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5945 Set_Flag165 (Id, V);
5946 end Set_Suppress_Style_Checks;
5948 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5950 Set_Flag217 (Id, V);
5951 end Set_Suppress_Value_Tracking_On_Call;
5953 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5955 pragma Assert (Ekind (Id) in Task_Kind);
5957 end Set_Task_Body_Procedure;
5959 procedure Set_Thunk_Entity (Id : E; V : E) is
5961 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5962 and then Is_Thunk (Id));
5964 end Set_Thunk_Entity;
5966 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5969 end Set_Treat_As_Volatile;
5971 procedure Set_Underlying_Full_View (Id : E; V : E) is
5973 pragma Assert (Ekind (Id) in Private_Kind);
5975 end Set_Underlying_Full_View;
5977 procedure Set_Underlying_Record_View (Id : E; V : E) is
5979 pragma Assert (Ekind (Id) = E_Record_Type);
5981 end Set_Underlying_Record_View;
5983 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5985 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5986 Set_Flag216 (Id, V);
5987 end Set_Universal_Aliasing;
5989 procedure Set_Unset_Reference (Id : E; V : N) is
5992 end Set_Unset_Reference;
5994 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5996 Set_Flag222 (Id, V);
5997 end Set_Used_As_Generic_Actual;
5999 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6001 pragma Assert (Ekind (Id) = E_Protected_Type);
6002 Set_Flag188 (Id, V);
6003 end Set_Uses_Lock_Free;
6005 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6008 end Set_Uses_Sec_Stack;
6010 procedure Set_Warnings_Off (Id : E; V : B := True) is
6013 end Set_Warnings_Off;
6015 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6017 Set_Flag236 (Id, V);
6018 end Set_Warnings_Off_Used;
6020 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6022 Set_Flag237 (Id, V);
6023 end Set_Warnings_Off_Used_Unmodified;
6025 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6027 Set_Flag238 (Id, V);
6028 end Set_Warnings_Off_Used_Unreferenced;
6030 procedure Set_Was_Hidden (Id : E; V : B := True) is
6032 Set_Flag196 (Id, V);
6035 procedure Set_Wrapped_Entity (Id : E; V : E) is
6037 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6038 and then Is_Primitive_Wrapper (Id));
6040 end Set_Wrapped_Entity;
6042 -----------------------------------
6043 -- Field Initialization Routines --
6044 -----------------------------------
6046 procedure Init_Alignment (Id : E) is
6048 Set_Uint14 (Id, Uint_0);
6051 procedure Init_Alignment (Id : E; V : Int) is
6053 Set_Uint14 (Id, UI_From_Int (V));
6056 procedure Init_Component_Bit_Offset (Id : E) is
6058 Set_Uint11 (Id, No_Uint);
6059 end Init_Component_Bit_Offset;
6061 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6063 Set_Uint11 (Id, UI_From_Int (V));
6064 end Init_Component_Bit_Offset;
6066 procedure Init_Component_Size (Id : E) is
6068 Set_Uint22 (Id, Uint_0);
6069 end Init_Component_Size;
6071 procedure Init_Component_Size (Id : E; V : Int) is
6073 Set_Uint22 (Id, UI_From_Int (V));
6074 end Init_Component_Size;
6076 procedure Init_Digits_Value (Id : E) is
6078 Set_Uint17 (Id, Uint_0);
6079 end Init_Digits_Value;
6081 procedure Init_Digits_Value (Id : E; V : Int) is
6083 Set_Uint17 (Id, UI_From_Int (V));
6084 end Init_Digits_Value;
6086 procedure Init_Esize (Id : E) is
6088 Set_Uint12 (Id, Uint_0);
6091 procedure Init_Esize (Id : E; V : Int) is
6093 Set_Uint12 (Id, UI_From_Int (V));
6096 procedure Init_Normalized_First_Bit (Id : E) is
6098 Set_Uint8 (Id, No_Uint);
6099 end Init_Normalized_First_Bit;
6101 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6103 Set_Uint8 (Id, UI_From_Int (V));
6104 end Init_Normalized_First_Bit;
6106 procedure Init_Normalized_Position (Id : E) is
6108 Set_Uint14 (Id, No_Uint);
6109 end Init_Normalized_Position;
6111 procedure Init_Normalized_Position (Id : E; V : Int) is
6113 Set_Uint14 (Id, UI_From_Int (V));
6114 end Init_Normalized_Position;
6116 procedure Init_Normalized_Position_Max (Id : E) is
6118 Set_Uint10 (Id, No_Uint);
6119 end Init_Normalized_Position_Max;
6121 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6123 Set_Uint10 (Id, UI_From_Int (V));
6124 end Init_Normalized_Position_Max;
6126 procedure Init_RM_Size (Id : E) is
6128 Set_Uint13 (Id, Uint_0);
6131 procedure Init_RM_Size (Id : E; V : Int) is
6133 Set_Uint13 (Id, UI_From_Int (V));
6136 -----------------------------
6137 -- Init_Component_Location --
6138 -----------------------------
6140 procedure Init_Component_Location (Id : E) is
6142 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6143 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6144 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6145 Set_Uint12 (Id, Uint_0); -- Esize
6146 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6147 end Init_Component_Location;
6149 ----------------------------
6150 -- Init_Object_Size_Align --
6151 ----------------------------
6153 procedure Init_Object_Size_Align (Id : E) is
6155 Set_Uint12 (Id, Uint_0); -- Esize
6156 Set_Uint14 (Id, Uint_0); -- Alignment
6157 end Init_Object_Size_Align;
6163 procedure Init_Size (Id : E; V : Int) is
6165 pragma Assert (not Is_Object (Id));
6166 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6167 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6170 ---------------------
6171 -- Init_Size_Align --
6172 ---------------------
6174 procedure Init_Size_Align (Id : E) is
6176 pragma Assert (not Is_Object (Id));
6177 Set_Uint12 (Id, Uint_0); -- Esize
6178 Set_Uint13 (Id, Uint_0); -- RM_Size
6179 Set_Uint14 (Id, Uint_0); -- Alignment
6180 end Init_Size_Align;
6182 ----------------------------------------------
6183 -- Type Representation Attribute Predicates --
6184 ----------------------------------------------
6186 function Known_Alignment (E : Entity_Id) return B is
6188 return Uint14 (E) /= Uint_0
6189 and then Uint14 (E) /= No_Uint;
6190 end Known_Alignment;
6192 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6194 return Uint11 (E) /= No_Uint;
6195 end Known_Component_Bit_Offset;
6197 function Known_Component_Size (E : Entity_Id) return B is
6199 return Uint22 (Base_Type (E)) /= Uint_0
6200 and then Uint22 (Base_Type (E)) /= No_Uint;
6201 end Known_Component_Size;
6203 function Known_Esize (E : Entity_Id) return B is
6205 return Uint12 (E) /= Uint_0
6206 and then Uint12 (E) /= No_Uint;
6209 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6211 return Uint8 (E) /= No_Uint;
6212 end Known_Normalized_First_Bit;
6214 function Known_Normalized_Position (E : Entity_Id) return B is
6216 return Uint14 (E) /= No_Uint;
6217 end Known_Normalized_Position;
6219 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6221 return Uint10 (E) /= No_Uint;
6222 end Known_Normalized_Position_Max;
6224 function Known_RM_Size (E : Entity_Id) return B is
6226 return Uint13 (E) /= No_Uint
6227 and then (Uint13 (E) /= Uint_0
6228 or else Is_Discrete_Type (E)
6229 or else Is_Fixed_Point_Type (E));
6232 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6234 return Uint11 (E) /= No_Uint
6235 and then Uint11 (E) >= Uint_0;
6236 end Known_Static_Component_Bit_Offset;
6238 function Known_Static_Component_Size (E : Entity_Id) return B is
6240 return Uint22 (Base_Type (E)) > Uint_0;
6241 end Known_Static_Component_Size;
6243 function Known_Static_Esize (E : Entity_Id) return B is
6245 return Uint12 (E) > Uint_0
6246 and then not Is_Generic_Type (E);
6247 end Known_Static_Esize;
6249 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6251 return Uint8 (E) /= No_Uint
6252 and then Uint8 (E) >= Uint_0;
6253 end Known_Static_Normalized_First_Bit;
6255 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6257 return Uint14 (E) /= No_Uint
6258 and then Uint14 (E) >= Uint_0;
6259 end Known_Static_Normalized_Position;
6261 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6263 return Uint10 (E) /= No_Uint
6264 and then Uint10 (E) >= Uint_0;
6265 end Known_Static_Normalized_Position_Max;
6267 function Known_Static_RM_Size (E : Entity_Id) return B is
6269 return (Uint13 (E) > Uint_0
6270 or else Is_Discrete_Type (E)
6271 or else Is_Fixed_Point_Type (E))
6272 and then not Is_Generic_Type (E);
6273 end Known_Static_RM_Size;
6275 function Unknown_Alignment (E : Entity_Id) return B is
6277 return Uint14 (E) = Uint_0
6278 or else Uint14 (E) = No_Uint;
6279 end Unknown_Alignment;
6281 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6283 return Uint11 (E) = No_Uint;
6284 end Unknown_Component_Bit_Offset;
6286 function Unknown_Component_Size (E : Entity_Id) return B is
6288 return Uint22 (Base_Type (E)) = Uint_0
6290 Uint22 (Base_Type (E)) = No_Uint;
6291 end Unknown_Component_Size;
6293 function Unknown_Esize (E : Entity_Id) return B is
6295 return Uint12 (E) = No_Uint
6297 Uint12 (E) = Uint_0;
6300 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6302 return Uint8 (E) = No_Uint;
6303 end Unknown_Normalized_First_Bit;
6305 function Unknown_Normalized_Position (E : Entity_Id) return B is
6307 return Uint14 (E) = No_Uint;
6308 end Unknown_Normalized_Position;
6310 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6312 return Uint10 (E) = No_Uint;
6313 end Unknown_Normalized_Position_Max;
6315 function Unknown_RM_Size (E : Entity_Id) return B is
6317 return (Uint13 (E) = Uint_0
6318 and then not Is_Discrete_Type (E)
6319 and then not Is_Fixed_Point_Type (E))
6320 or else Uint13 (E) = No_Uint;
6321 end Unknown_RM_Size;
6323 --------------------
6324 -- Address_Clause --
6325 --------------------
6327 function Address_Clause (Id : E) return N is
6329 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6336 function Aft_Value (Id : E) return U is
6338 Delta_Val : Ureal := Delta_Value (Id);
6340 while Delta_Val < Ureal_Tenth loop
6341 Delta_Val := Delta_Val * Ureal_10;
6342 Result := Result + 1;
6345 return UI_From_Int (Result);
6348 ----------------------
6349 -- Alignment_Clause --
6350 ----------------------
6352 function Alignment_Clause (Id : E) return N is
6354 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6355 end Alignment_Clause;
6361 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6363 if Last_Entity (V) = Empty then
6364 Set_First_Entity (Id => V, V => Id);
6366 Set_Next_Entity (Last_Entity (V), Id);
6369 Set_Next_Entity (Id, Empty);
6371 Set_Last_Entity (Id => V, V => Id);
6378 function Base_Type (Id : E) return E is
6380 if Is_Base_Type (Id) then
6383 pragma Assert (Is_Type (Id));
6388 -------------------------
6389 -- Component_Alignment --
6390 -------------------------
6392 -- Component Alignment is encoded using two flags, Flag128/129 as
6393 -- follows. Note that both flags False = Align_Default, so that the
6394 -- default initialization of flags to False initializes component
6395 -- alignment to the default value as required.
6397 -- Flag128 Flag129 Value
6398 -- ------- ------- -----
6399 -- False False Calign_Default
6400 -- False True Calign_Component_Size
6401 -- True False Calign_Component_Size_4
6402 -- True True Calign_Storage_Unit
6404 function Component_Alignment (Id : E) return C is
6405 BT : constant Node_Id := Base_Type (Id);
6408 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6410 if Flag128 (BT) then
6411 if Flag129 (BT) then
6412 return Calign_Storage_Unit;
6414 return Calign_Component_Size_4;
6418 if Flag129 (BT) then
6419 return Calign_Component_Size;
6421 return Calign_Default;
6424 end Component_Alignment;
6426 ----------------------
6427 -- Declaration_Node --
6428 ----------------------
6430 function Declaration_Node (Id : E) return N is
6434 if Ekind (Id) = E_Incomplete_Type
6435 and then Present (Full_View (Id))
6437 P := Parent (Full_View (Id));
6443 if Nkind (P) /= N_Selected_Component
6444 and then Nkind (P) /= N_Expanded_Name
6446 not (Nkind (P) = N_Defining_Program_Unit_Name
6447 and then Is_Child_Unit (Id))
6454 end Declaration_Node;
6456 ---------------------------------
6457 -- Default_Init_Cond_Procedure --
6458 ---------------------------------
6460 function Default_Init_Cond_Procedure (Id : E) return E is
6466 and then (Has_Default_Init_Cond (Id)
6467 or Has_Inherited_Default_Init_Cond (Id)));
6469 S := Subprograms_For_Type (Id);
6470 while Present (S) loop
6471 if Is_Default_Init_Cond_Procedure (S) then
6475 S := Subprograms_For_Type (S);
6479 end Default_Init_Cond_Procedure;
6481 ---------------------
6482 -- Designated_Type --
6483 ---------------------
6485 function Designated_Type (Id : E) return E is
6489 Desig_Type := Directly_Designated_Type (Id);
6491 if Ekind (Desig_Type) = E_Incomplete_Type
6492 and then Present (Full_View (Desig_Type))
6494 return Full_View (Desig_Type);
6496 elsif Is_Class_Wide_Type (Desig_Type)
6497 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6498 and then Present (Full_View (Etype (Desig_Type)))
6499 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6501 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6506 end Designated_Type;
6508 ----------------------
6509 -- Entry_Index_Type --
6510 ----------------------
6512 function Entry_Index_Type (Id : E) return N is
6514 pragma Assert (Ekind (Id) = E_Entry_Family);
6515 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6516 end Entry_Index_Type;
6518 ---------------------
6519 -- First_Component --
6520 ---------------------
6522 function First_Component (Id : E) return E is
6527 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6529 Comp_Id := First_Entity (Id);
6530 while Present (Comp_Id) loop
6531 exit when Ekind (Comp_Id) = E_Component;
6532 Comp_Id := Next_Entity (Comp_Id);
6536 end First_Component;
6538 -------------------------------------
6539 -- First_Component_Or_Discriminant --
6540 -------------------------------------
6542 function First_Component_Or_Discriminant (Id : E) return E is
6547 (Is_Record_Type (Id)
6548 or else Is_Incomplete_Or_Private_Type (Id)
6549 or else Has_Discriminants (Id));
6551 Comp_Id := First_Entity (Id);
6552 while Present (Comp_Id) loop
6553 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6554 Comp_Id := Next_Entity (Comp_Id);
6558 end First_Component_Or_Discriminant;
6564 function First_Formal (Id : E) return E is
6569 (Is_Overloadable (Id)
6570 or else Ekind_In (Id, E_Entry_Family,
6572 E_Subprogram_Type));
6574 if Ekind (Id) = E_Enumeration_Literal then
6578 Formal := First_Entity (Id);
6580 if Present (Formal) and then Is_Formal (Formal) then
6588 ------------------------------
6589 -- First_Formal_With_Extras --
6590 ------------------------------
6592 function First_Formal_With_Extras (Id : E) return E is
6597 (Is_Overloadable (Id)
6598 or else Ekind_In (Id, E_Entry_Family,
6600 E_Subprogram_Type));
6602 if Ekind (Id) = E_Enumeration_Literal then
6606 Formal := First_Entity (Id);
6608 if Present (Formal) and then Is_Formal (Formal) then
6611 return Extra_Formals (Id); -- Empty if no extra formals
6614 end First_Formal_With_Extras;
6616 -------------------------------------
6617 -- Get_Attribute_Definition_Clause --
6618 -------------------------------------
6620 function Get_Attribute_Definition_Clause
6622 Id : Attribute_Id) return Node_Id
6627 N := First_Rep_Item (E);
6628 while Present (N) loop
6629 if Nkind (N) = N_Attribute_Definition_Clause
6630 and then Get_Attribute_Id (Chars (N)) = Id
6639 end Get_Attribute_Definition_Clause;
6645 function Get_Full_View (T : Entity_Id) return Entity_Id is
6647 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6648 return Full_View (T);
6650 elsif Is_Class_Wide_Type (T)
6651 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6652 and then Present (Full_View (Root_Type (T)))
6654 return Class_Wide_Type (Full_View (Root_Type (T)));
6665 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6666 Is_CDG : constant Boolean :=
6667 Id = Pragma_Abstract_State or else
6668 Id = Pragma_Async_Readers or else
6669 Id = Pragma_Async_Writers or else
6670 Id = Pragma_Depends or else
6671 Id = Pragma_Effective_Reads or else
6672 Id = Pragma_Effective_Writes or else
6673 Id = Pragma_Global or else
6674 Id = Pragma_Initial_Condition or else
6675 Id = Pragma_Initializes or else
6676 Id = Pragma_Part_Of or else
6677 Id = Pragma_Refined_Depends or else
6678 Id = Pragma_Refined_Global or else
6679 Id = Pragma_Refined_State;
6680 Is_CTC : constant Boolean :=
6681 Id = Pragma_Contract_Cases or else
6682 Id = Pragma_Test_Case;
6683 Is_PPC : constant Boolean :=
6684 Id = Pragma_Precondition or else
6685 Id = Pragma_Postcondition or else
6686 Id = Pragma_Refined_Post;
6688 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6694 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6695 -- extracted from their specialized list.
6698 Items := Contract (E);
6704 Item := Classifications (Items);
6707 Item := Contract_Test_Cases (Items);
6710 Item := Pre_Post_Conditions (Items);
6716 Item := First_Rep_Item (E);
6719 while Present (Item) loop
6720 if Nkind (Item) = N_Pragma
6721 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6725 -- All nodes in N_Contract are chained using Next_Pragma
6727 elsif In_Contract then
6728 Item := Next_Pragma (Item);
6733 Next_Rep_Item (Item);
6740 --------------------------------------
6741 -- Get_Record_Representation_Clause --
6742 --------------------------------------
6744 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6748 N := First_Rep_Item (E);
6749 while Present (N) loop
6750 if Nkind (N) = N_Record_Representation_Clause then
6758 end Get_Record_Representation_Clause;
6760 ------------------------
6761 -- Has_Attach_Handler --
6762 ------------------------
6764 function Has_Attach_Handler (Id : E) return B is
6768 pragma Assert (Is_Protected_Type (Id));
6770 Ritem := First_Rep_Item (Id);
6771 while Present (Ritem) loop
6772 if Nkind (Ritem) = N_Pragma
6773 and then Pragma_Name (Ritem) = Name_Attach_Handler
6777 Next_Rep_Item (Ritem);
6782 end Has_Attach_Handler;
6788 function Has_Entries (Id : E) return B is
6792 pragma Assert (Is_Concurrent_Type (Id));
6794 Ent := First_Entity (Id);
6795 while Present (Ent) loop
6796 if Is_Entry (Ent) then
6800 Ent := Next_Entity (Ent);
6806 ----------------------------
6807 -- Has_Foreign_Convention --
6808 ----------------------------
6810 function Has_Foreign_Convention (Id : E) return B is
6812 -- While regular Intrinsics such as the Standard operators fit in the
6813 -- "Ada" convention, those with an Interface_Name materialize GCC
6814 -- builtin imports for which Ada special treatments shouldn't apply.
6816 return Convention (Id) in Foreign_Convention
6817 or else (Convention (Id) = Convention_Intrinsic
6818 and then Present (Interface_Name (Id)));
6819 end Has_Foreign_Convention;
6821 ---------------------------
6822 -- Has_Interrupt_Handler --
6823 ---------------------------
6825 function Has_Interrupt_Handler (Id : E) return B is
6829 pragma Assert (Is_Protected_Type (Id));
6831 Ritem := First_Rep_Item (Id);
6832 while Present (Ritem) loop
6833 if Nkind (Ritem) = N_Pragma
6834 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6838 Next_Rep_Item (Ritem);
6843 end Has_Interrupt_Handler;
6845 -----------------------------
6846 -- Has_Non_Null_Refinement --
6847 -----------------------------
6849 function Has_Non_Null_Refinement (Id : E) return B is
6851 -- "Refinement" is a concept applicable only to abstract states
6853 pragma Assert (Ekind (Id) = E_Abstract_State);
6855 if Has_Visible_Refinement (Id) then
6856 pragma Assert (Present (Refinement_Constituents (Id)));
6858 -- For a refinement to be non-null, the first constituent must be
6859 -- anything other than null.
6862 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6866 end Has_Non_Null_Refinement;
6868 -----------------------------
6869 -- Has_Null_Abstract_State --
6870 -----------------------------
6872 function Has_Null_Abstract_State (Id : E) return B is
6874 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6877 Present (Abstract_States (Id))
6878 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6879 end Has_Null_Abstract_State;
6881 -------------------------
6882 -- Has_Null_Refinement --
6883 -------------------------
6885 function Has_Null_Refinement (Id : E) return B is
6887 -- "Refinement" is a concept applicable only to abstract states
6889 pragma Assert (Ekind (Id) = E_Abstract_State);
6891 if Has_Visible_Refinement (Id) then
6892 pragma Assert (Present (Refinement_Constituents (Id)));
6894 -- For a refinement to be null, the state's sole constituent must be
6898 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6902 end Has_Null_Refinement;
6904 --------------------
6905 -- Has_Unmodified --
6906 --------------------
6908 function Has_Unmodified (E : Entity_Id) return Boolean is
6910 if Has_Pragma_Unmodified (E) then
6912 elsif Warnings_Off (E) then
6913 Set_Warnings_Off_Used_Unmodified (E);
6920 ---------------------
6921 -- Has_Unreferenced --
6922 ---------------------
6924 function Has_Unreferenced (E : Entity_Id) return Boolean is
6926 if Has_Pragma_Unreferenced (E) then
6928 elsif Warnings_Off (E) then
6929 Set_Warnings_Off_Used_Unreferenced (E);
6934 end Has_Unreferenced;
6936 ----------------------
6937 -- Has_Warnings_Off --
6938 ----------------------
6940 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6942 if Warnings_Off (E) then
6943 Set_Warnings_Off_Used (E);
6948 end Has_Warnings_Off;
6950 ------------------------------
6951 -- Implementation_Base_Type --
6952 ------------------------------
6954 function Implementation_Base_Type (Id : E) return E is
6959 Bastyp := Base_Type (Id);
6961 if Is_Incomplete_Or_Private_Type (Bastyp) then
6962 Imptyp := Underlying_Type (Bastyp);
6964 -- If we have an implementation type, then just return it,
6965 -- otherwise we return the Base_Type anyway. This can only
6966 -- happen in error situations and should avoid some error bombs.
6968 if Present (Imptyp) then
6969 return Base_Type (Imptyp);
6977 end Implementation_Base_Type;
6979 -------------------------
6980 -- Invariant_Procedure --
6981 -------------------------
6983 function Invariant_Procedure (Id : E) return E is
6987 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6989 if No (Subprograms_For_Type (Id)) then
6993 S := Subprograms_For_Type (Id);
6994 while Present (S) loop
6995 if Is_Invariant_Procedure (S) then
6998 S := Subprograms_For_Type (S);
7004 end Invariant_Procedure;
7010 -- Global flag table allowing rapid computation of this function
7012 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7013 (E_Enumeration_Subtype |
7015 E_Signed_Integer_Subtype |
7016 E_Modular_Integer_Subtype |
7017 E_Floating_Point_Subtype |
7018 E_Ordinary_Fixed_Point_Subtype |
7019 E_Decimal_Fixed_Point_Subtype |
7024 E_Record_Subtype_With_Private |
7025 E_Limited_Private_Subtype |
7027 E_Protected_Subtype |
7029 E_String_Literal_Subtype |
7030 E_Class_Wide_Subtype => False,
7033 function Is_Base_Type (Id : E) return Boolean is
7035 return Entity_Is_Base_Type (Ekind (Id));
7038 ---------------------
7039 -- Is_Boolean_Type --
7040 ---------------------
7042 function Is_Boolean_Type (Id : E) return B is
7044 return Root_Type (Id) = Standard_Boolean;
7045 end Is_Boolean_Type;
7047 ------------------------
7048 -- Is_Constant_Object --
7049 ------------------------
7051 function Is_Constant_Object (Id : E) return B is
7052 K : constant Entity_Kind := Ekind (Id);
7055 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7056 end Is_Constant_Object;
7058 --------------------
7059 -- Is_Discriminal --
7060 --------------------
7062 function Is_Discriminal (Id : E) return B is
7064 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7065 and then Present (Discriminal_Link (Id)));
7068 ----------------------
7069 -- Is_Dynamic_Scope --
7070 ----------------------
7072 function Is_Dynamic_Scope (Id : E) return B is
7075 Ekind (Id) = E_Block
7077 Ekind (Id) = E_Function
7079 Ekind (Id) = E_Procedure
7081 Ekind (Id) = E_Subprogram_Body
7083 Ekind (Id) = E_Task_Type
7085 (Ekind (Id) = E_Limited_Private_Type
7086 and then Present (Full_View (Id))
7087 and then Ekind (Full_View (Id)) = E_Task_Type)
7089 Ekind (Id) = E_Entry
7091 Ekind (Id) = E_Entry_Family
7093 Ekind (Id) = E_Return_Statement;
7094 end Is_Dynamic_Scope;
7096 --------------------
7097 -- Is_Entity_Name --
7098 --------------------
7100 function Is_Entity_Name (N : Node_Id) return Boolean is
7101 Kind : constant Node_Kind := Nkind (N);
7104 -- Identifiers, operator symbols, expanded names are entity names
7106 return Kind = N_Identifier
7107 or else Kind = N_Operator_Symbol
7108 or else Kind = N_Expanded_Name
7110 -- Attribute references are entity names if they refer to an entity.
7111 -- Note that we don't do this by testing for the presence of the
7112 -- Entity field in the N_Attribute_Reference node, since it may not
7113 -- have been set yet.
7115 or else (Kind = N_Attribute_Reference
7116 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7119 -----------------------
7120 -- Is_External_State --
7121 -----------------------
7123 function Is_External_State (Id : E) return B is
7126 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7127 end Is_External_State;
7133 function Is_Finalizer (Id : E) return B is
7135 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7138 ---------------------
7139 -- Is_Ghost_Entity --
7140 ---------------------
7142 -- Note: coding below allows for ghost variables. They are not currently
7143 -- implemented, so we will always get False for variables, but that is
7144 -- expected to change in the future.
7146 function Is_Ghost_Entity (Id : E) return B is
7148 if Present (Id) and then Ekind (Id) = E_Variable then
7149 return Convention (Id) = Convention_Ghost;
7151 return Is_Ghost_Subprogram (Id);
7153 end Is_Ghost_Entity;
7155 -------------------------
7156 -- Is_Ghost_Subprogram --
7157 -------------------------
7159 function Is_Ghost_Subprogram (Id : E) return B is
7161 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7162 return Convention (Id) = Convention_Ghost;
7166 end Is_Ghost_Subprogram;
7172 function Is_Null_State (Id : E) return B is
7175 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7178 ---------------------
7179 -- Is_Packed_Array --
7180 ---------------------
7182 function Is_Packed_Array (Id : E) return B is
7184 return Is_Array_Type (Id) and then Is_Packed (Id);
7185 end Is_Packed_Array;
7187 -----------------------------------
7188 -- Is_Package_Or_Generic_Package --
7189 -----------------------------------
7191 function Is_Package_Or_Generic_Package (Id : E) return B is
7193 return Ekind_In (Id, E_Generic_Package, E_Package);
7194 end Is_Package_Or_Generic_Package;
7200 function Is_Prival (Id : E) return B is
7202 return (Ekind_In (Id, E_Constant, E_Variable)
7203 and then Present (Prival_Link (Id)));
7206 ----------------------------
7207 -- Is_Protected_Component --
7208 ----------------------------
7210 function Is_Protected_Component (Id : E) return B is
7212 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7213 end Is_Protected_Component;
7215 ----------------------------
7216 -- Is_Protected_Interface --
7217 ----------------------------
7219 function Is_Protected_Interface (Id : E) return B is
7220 Typ : constant Entity_Id := Base_Type (Id);
7222 if not Is_Interface (Typ) then
7224 elsif Is_Class_Wide_Type (Typ) then
7225 return Is_Protected_Interface (Etype (Typ));
7227 return Protected_Present (Type_Definition (Parent (Typ)));
7229 end Is_Protected_Interface;
7231 ------------------------------
7232 -- Is_Protected_Record_Type --
7233 ------------------------------
7235 function Is_Protected_Record_Type (Id : E) return B is
7238 Is_Concurrent_Record_Type (Id)
7239 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7240 end Is_Protected_Record_Type;
7242 --------------------------------
7243 -- Is_Standard_Character_Type --
7244 --------------------------------
7246 function Is_Standard_Character_Type (Id : E) return B is
7248 if Is_Type (Id) then
7250 R : constant Entity_Id := Root_Type (Id);
7253 R = Standard_Character
7255 R = Standard_Wide_Character
7257 R = Standard_Wide_Wide_Character;
7263 end Is_Standard_Character_Type;
7265 --------------------
7266 -- Is_String_Type --
7267 --------------------
7269 function Is_String_Type (Id : E) return B is
7271 return Is_Array_Type (Id)
7272 and then Id /= Any_Composite
7273 and then Number_Dimensions (Id) = 1
7274 and then Is_Character_Type (Component_Type (Id));
7277 -------------------------------
7278 -- Is_Synchronized_Interface --
7279 -------------------------------
7281 function Is_Synchronized_Interface (Id : E) return B is
7282 Typ : constant Entity_Id := Base_Type (Id);
7285 if not Is_Interface (Typ) then
7288 elsif Is_Class_Wide_Type (Typ) then
7289 return Is_Synchronized_Interface (Etype (Typ));
7292 return Protected_Present (Type_Definition (Parent (Typ)))
7293 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7294 or else Task_Present (Type_Definition (Parent (Typ)));
7296 end Is_Synchronized_Interface;
7298 -----------------------
7299 -- Is_Task_Interface --
7300 -----------------------
7302 function Is_Task_Interface (Id : E) return B is
7303 Typ : constant Entity_Id := Base_Type (Id);
7305 if not Is_Interface (Typ) then
7307 elsif Is_Class_Wide_Type (Typ) then
7308 return Is_Task_Interface (Etype (Typ));
7310 return Task_Present (Type_Definition (Parent (Typ)));
7312 end Is_Task_Interface;
7314 -------------------------
7315 -- Is_Task_Record_Type --
7316 -------------------------
7318 function Is_Task_Record_Type (Id : E) return B is
7321 Is_Concurrent_Record_Type (Id)
7322 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7323 end Is_Task_Record_Type;
7325 ------------------------
7326 -- Is_Wrapper_Package --
7327 ------------------------
7329 function Is_Wrapper_Package (Id : E) return B is
7331 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7332 end Is_Wrapper_Package;
7338 function Last_Formal (Id : E) return E is
7343 (Is_Overloadable (Id)
7344 or else Ekind_In (Id, E_Entry_Family,
7346 E_Subprogram_Type));
7348 if Ekind (Id) = E_Enumeration_Literal then
7352 Formal := First_Formal (Id);
7354 if Present (Formal) then
7355 while Present (Next_Formal (Formal)) loop
7356 Formal := Next_Formal (Formal);
7364 function Model_Emin_Value (Id : E) return Uint is
7366 return Machine_Emin_Value (Id);
7367 end Model_Emin_Value;
7369 -------------------------
7370 -- Model_Epsilon_Value --
7371 -------------------------
7373 function Model_Epsilon_Value (Id : E) return Ureal is
7374 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7376 return Radix ** (1 - Model_Mantissa_Value (Id));
7377 end Model_Epsilon_Value;
7379 --------------------------
7380 -- Model_Mantissa_Value --
7381 --------------------------
7383 function Model_Mantissa_Value (Id : E) return Uint is
7385 return Machine_Mantissa_Value (Id);
7386 end Model_Mantissa_Value;
7388 -----------------------
7389 -- Model_Small_Value --
7390 -----------------------
7392 function Model_Small_Value (Id : E) return Ureal is
7393 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7395 return Radix ** (Model_Emin_Value (Id) - 1);
7396 end Model_Small_Value;
7398 ------------------------
7399 -- Machine_Emax_Value --
7400 ------------------------
7402 function Machine_Emax_Value (Id : E) return Uint is
7403 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7406 case Float_Rep (Id) is
7409 when 1 .. 6 => return Uint_128;
7410 when 7 .. 15 => return 2**10;
7411 when 16 .. 33 => return 2**14;
7412 when others => return No_Uint;
7416 return Uint_2 ** Uint_7 - Uint_1;
7418 end Machine_Emax_Value;
7420 ------------------------
7421 -- Machine_Emin_Value --
7422 ------------------------
7424 function Machine_Emin_Value (Id : E) return Uint is
7426 case Float_Rep (Id) is
7427 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7428 when AAMP => return -Machine_Emax_Value (Id);
7430 end Machine_Emin_Value;
7432 ----------------------------
7433 -- Machine_Mantissa_Value --
7434 ----------------------------
7436 function Machine_Mantissa_Value (Id : E) return Uint is
7437 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7440 case Float_Rep (Id) is
7443 when 1 .. 6 => return Uint_24;
7444 when 7 .. 15 => return UI_From_Int (53);
7445 when 16 .. 18 => return Uint_64;
7446 when 19 .. 33 => return UI_From_Int (113);
7447 when others => return No_Uint;
7452 when 1 .. 6 => return Uint_24;
7453 when 7 .. 9 => return UI_From_Int (40);
7454 when others => return No_Uint;
7457 end Machine_Mantissa_Value;
7459 -------------------------
7460 -- Machine_Radix_Value --
7461 -------------------------
7463 function Machine_Radix_Value (Id : E) return U is
7465 case Float_Rep (Id) is
7466 when IEEE_Binary | AAMP =>
7469 end Machine_Radix_Value;
7471 --------------------
7472 -- Next_Component --
7473 --------------------
7475 function Next_Component (Id : E) return E is
7479 Comp_Id := Next_Entity (Id);
7480 while Present (Comp_Id) loop
7481 exit when Ekind (Comp_Id) = E_Component;
7482 Comp_Id := Next_Entity (Comp_Id);
7488 ------------------------------------
7489 -- Next_Component_Or_Discriminant --
7490 ------------------------------------
7492 function Next_Component_Or_Discriminant (Id : E) return E is
7496 Comp_Id := Next_Entity (Id);
7497 while Present (Comp_Id) loop
7498 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7499 Comp_Id := Next_Entity (Comp_Id);
7503 end Next_Component_Or_Discriminant;
7505 -----------------------
7506 -- Next_Discriminant --
7507 -----------------------
7509 -- This function actually implements both Next_Discriminant and
7510 -- Next_Stored_Discriminant by making sure that the Discriminant
7511 -- returned is of the same variety as Id.
7513 function Next_Discriminant (Id : E) return E is
7515 -- Derived Tagged types with private extensions look like this...
7517 -- E_Discriminant d1
7518 -- E_Discriminant d2
7520 -- E_Discriminant d1
7521 -- E_Discriminant d2
7524 -- so it is critical not to go past the leading discriminants
7529 pragma Assert (Ekind (Id) = E_Discriminant);
7532 D := Next_Entity (D);
7534 or else (Ekind (D) /= E_Discriminant
7535 and then not Is_Itype (D))
7540 exit when Ekind (D) = E_Discriminant
7541 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7545 end Next_Discriminant;
7551 function Next_Formal (Id : E) return E is
7555 -- Follow the chain of declared entities as long as the kind of the
7556 -- entity corresponds to a formal parameter. Skip internal entities
7557 -- that may have been created for implicit subtypes, in the process
7558 -- of analyzing default expressions.
7562 P := Next_Entity (P);
7564 if No (P) or else Is_Formal (P) then
7566 elsif not Is_Internal (P) then
7572 -----------------------------
7573 -- Next_Formal_With_Extras --
7574 -----------------------------
7576 function Next_Formal_With_Extras (Id : E) return E is
7578 if Present (Extra_Formal (Id)) then
7579 return Extra_Formal (Id);
7581 return Next_Formal (Id);
7583 end Next_Formal_With_Extras;
7589 function Next_Index (Id : Node_Id) return Node_Id is
7598 function Next_Literal (Id : E) return E is
7600 pragma Assert (Nkind (Id) in N_Entity);
7604 ------------------------------
7605 -- Next_Stored_Discriminant --
7606 ------------------------------
7608 function Next_Stored_Discriminant (Id : E) return E is
7610 -- See comment in Next_Discriminant
7612 return Next_Discriminant (Id);
7613 end Next_Stored_Discriminant;
7615 -----------------------
7616 -- Number_Dimensions --
7617 -----------------------
7619 function Number_Dimensions (Id : E) return Pos is
7624 if Ekind (Id) = E_String_Literal_Subtype then
7629 T := First_Index (Id);
7630 while Present (T) loop
7637 end Number_Dimensions;
7639 --------------------
7640 -- Number_Entries --
7641 --------------------
7643 function Number_Entries (Id : E) return Nat is
7648 pragma Assert (Is_Concurrent_Type (Id));
7651 Ent := First_Entity (Id);
7652 while Present (Ent) loop
7653 if Is_Entry (Ent) then
7657 Ent := Next_Entity (Ent);
7663 --------------------
7664 -- Number_Formals --
7665 --------------------
7667 function Number_Formals (Id : E) return Pos is
7673 Formal := First_Formal (Id);
7674 while Present (Formal) loop
7676 Formal := Next_Formal (Formal);
7682 --------------------
7683 -- Parameter_Mode --
7684 --------------------
7686 function Parameter_Mode (Id : E) return Formal_Kind is
7691 ------------------------
7692 -- Predicate_Function --
7693 ------------------------
7695 function Predicate_Function (Id : E) return E is
7700 pragma Assert (Is_Type (Id));
7702 -- If type is private and has a completion, predicate may be defined
7703 -- on the full view.
7705 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7706 T := Full_View (Id);
7711 if No (Subprograms_For_Type (T)) then
7715 S := Subprograms_For_Type (T);
7716 while Present (S) loop
7717 if Is_Predicate_Function (S) then
7720 S := Subprograms_For_Type (S);
7726 end Predicate_Function;
7728 --------------------------
7729 -- Predicate_Function_M --
7730 --------------------------
7732 function Predicate_Function_M (Id : E) return E is
7737 pragma Assert (Is_Type (Id));
7739 -- If type is private and has a completion, predicate may be defined
7740 -- on the full view.
7742 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7743 T := Full_View (Id);
7748 if No (Subprograms_For_Type (T)) then
7752 S := Subprograms_For_Type (T);
7753 while Present (S) loop
7754 if Is_Predicate_Function_M (S) then
7757 S := Subprograms_For_Type (S);
7763 end Predicate_Function_M;
7765 -------------------------
7766 -- Present_In_Rep_Item --
7767 -------------------------
7769 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7773 Ritem := First_Rep_Item (E);
7775 while Present (Ritem) loop
7780 Next_Rep_Item (Ritem);
7784 end Present_In_Rep_Item;
7786 --------------------------
7787 -- Primitive_Operations --
7788 --------------------------
7790 function Primitive_Operations (Id : E) return L is
7792 if Is_Concurrent_Type (Id) then
7793 if Present (Corresponding_Record_Type (Id)) then
7794 return Direct_Primitive_Operations
7795 (Corresponding_Record_Type (Id));
7797 -- If expansion is disabled the corresponding record type is absent,
7798 -- but if the type has ancestors it may have primitive operations.
7800 elsif Is_Tagged_Type (Id) then
7801 return Direct_Primitive_Operations (Id);
7807 return Direct_Primitive_Operations (Id);
7809 end Primitive_Operations;
7811 ---------------------
7812 -- Record_Rep_Item --
7813 ---------------------
7815 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7817 Set_Next_Rep_Item (N, First_Rep_Item (E));
7818 Set_First_Rep_Item (E, N);
7819 end Record_Rep_Item;
7825 function Root_Type (Id : E) return E is
7829 pragma Assert (Nkind (Id) in N_Entity);
7831 T := Base_Type (Id);
7833 if Ekind (T) = E_Class_Wide_Type then
7845 -- Following test catches some error cases resulting from
7848 elsif No (Etyp) then
7849 Check_Error_Detected;
7852 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7855 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7861 -- Return if there is a circularity in the inheritance chain. This
7862 -- happens in some error situations and we do not want to get
7863 -- stuck in this loop.
7865 if T = Base_Type (Id) then
7872 ---------------------
7873 -- Safe_Emax_Value --
7874 ---------------------
7876 function Safe_Emax_Value (Id : E) return Uint is
7878 return Machine_Emax_Value (Id);
7879 end Safe_Emax_Value;
7881 ----------------------
7882 -- Safe_First_Value --
7883 ----------------------
7885 function Safe_First_Value (Id : E) return Ureal is
7887 return -Safe_Last_Value (Id);
7888 end Safe_First_Value;
7890 ---------------------
7891 -- Safe_Last_Value --
7892 ---------------------
7894 function Safe_Last_Value (Id : E) return Ureal is
7895 Radix : constant Uint := Machine_Radix_Value (Id);
7896 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7897 Emax : constant Uint := Safe_Emax_Value (Id);
7898 Significand : constant Uint := Radix ** Mantissa - 1;
7899 Exponent : constant Uint := Emax - Mantissa;
7905 (Num => Significand * 2 ** (Exponent mod 4),
7906 Den => -Exponent / 4,
7911 (Num => Significand,
7915 end Safe_Last_Value;
7921 function Scope_Depth (Id : E) return Uint is
7926 while Is_Record_Type (Scop) loop
7927 Scop := Scope (Scop);
7930 return Scope_Depth_Value (Scop);
7933 ---------------------
7934 -- Scope_Depth_Set --
7935 ---------------------
7937 function Scope_Depth_Set (Id : E) return B is
7939 return not Is_Record_Type (Id)
7940 and then Field22 (Id) /= Union_Id (Empty);
7941 end Scope_Depth_Set;
7943 -----------------------------
7944 -- Set_Component_Alignment --
7945 -----------------------------
7947 -- Component Alignment is encoded using two flags, Flag128/129 as
7948 -- follows. Note that both flags False = Align_Default, so that the
7949 -- default initialization of flags to False initializes component
7950 -- alignment to the default value as required.
7952 -- Flag128 Flag129 Value
7953 -- ------- ------- -----
7954 -- False False Calign_Default
7955 -- False True Calign_Component_Size
7956 -- True False Calign_Component_Size_4
7957 -- True True Calign_Storage_Unit
7959 procedure Set_Component_Alignment (Id : E; V : C) is
7961 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7962 and then Is_Base_Type (Id));
7965 when Calign_Default =>
7966 Set_Flag128 (Id, False);
7967 Set_Flag129 (Id, False);
7969 when Calign_Component_Size =>
7970 Set_Flag128 (Id, False);
7971 Set_Flag129 (Id, True);
7973 when Calign_Component_Size_4 =>
7974 Set_Flag128 (Id, True);
7975 Set_Flag129 (Id, False);
7977 when Calign_Storage_Unit =>
7978 Set_Flag128 (Id, True);
7979 Set_Flag129 (Id, True);
7981 end Set_Component_Alignment;
7983 -------------------------------------
7984 -- Set_Default_Init_Cond_Procedure --
7985 -------------------------------------
7987 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
7992 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
7994 Has_Inherited_Default_Init_Cond (Id)));
7996 S := Subprograms_For_Type (Id);
7997 Set_Subprograms_For_Type (Id, V);
7998 Set_Subprograms_For_Type (V, S);
8000 -- Check for a duplicate procedure
8002 while Present (S) loop
8003 if Is_Default_Init_Cond_Procedure (S) then
8004 raise Program_Error;
8007 S := Subprograms_For_Type (S);
8009 end Set_Default_Init_Cond_Procedure;
8011 -----------------------------
8012 -- Set_Invariant_Procedure --
8013 -----------------------------
8015 procedure Set_Invariant_Procedure (Id : E; V : E) is
8019 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8021 S := Subprograms_For_Type (Id);
8022 Set_Subprograms_For_Type (Id, V);
8023 Set_Subprograms_For_Type (V, S);
8025 -- Check for duplicate entry
8027 while Present (S) loop
8028 if Is_Invariant_Procedure (S) then
8029 raise Program_Error;
8031 S := Subprograms_For_Type (S);
8034 end Set_Invariant_Procedure;
8036 ----------------------------
8037 -- Set_Predicate_Function --
8038 ----------------------------
8040 procedure Set_Predicate_Function (Id : E; V : E) is
8044 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8046 S := Subprograms_For_Type (Id);
8047 Set_Subprograms_For_Type (Id, V);
8048 Set_Subprograms_For_Type (V, S);
8050 while Present (S) loop
8051 if Is_Predicate_Function (S) then
8052 raise Program_Error;
8054 S := Subprograms_For_Type (S);
8057 end Set_Predicate_Function;
8059 ------------------------------
8060 -- Set_Predicate_Function_M --
8061 ------------------------------
8063 procedure Set_Predicate_Function_M (Id : E; V : E) is
8067 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8069 S := Subprograms_For_Type (Id);
8070 Set_Subprograms_For_Type (Id, V);
8071 Set_Subprograms_For_Type (V, S);
8073 -- Check for duplicates
8075 while Present (S) loop
8076 if Is_Predicate_Function_M (S) then
8077 raise Program_Error;
8079 S := Subprograms_For_Type (S);
8082 end Set_Predicate_Function_M;
8088 function Size_Clause (Id : E) return N is
8090 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8093 ------------------------
8094 -- Stream_Size_Clause --
8095 ------------------------
8097 function Stream_Size_Clause (Id : E) return N is
8099 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8100 end Stream_Size_Clause;
8106 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8112 Kind := E_Access_Subtype;
8116 Kind := E_Array_Subtype;
8118 when E_Class_Wide_Type |
8119 E_Class_Wide_Subtype =>
8120 Kind := E_Class_Wide_Subtype;
8122 when E_Decimal_Fixed_Point_Type |
8123 E_Decimal_Fixed_Point_Subtype =>
8124 Kind := E_Decimal_Fixed_Point_Subtype;
8126 when E_Ordinary_Fixed_Point_Type |
8127 E_Ordinary_Fixed_Point_Subtype =>
8128 Kind := E_Ordinary_Fixed_Point_Subtype;
8130 when E_Private_Type |
8131 E_Private_Subtype =>
8132 Kind := E_Private_Subtype;
8134 when E_Limited_Private_Type |
8135 E_Limited_Private_Subtype =>
8136 Kind := E_Limited_Private_Subtype;
8138 when E_Record_Type_With_Private |
8139 E_Record_Subtype_With_Private =>
8140 Kind := E_Record_Subtype_With_Private;
8142 when E_Record_Type |
8144 Kind := E_Record_Subtype;
8146 when Enumeration_Kind =>
8147 Kind := E_Enumeration_Subtype;
8150 Kind := E_Floating_Point_Subtype;
8152 when Signed_Integer_Kind =>
8153 Kind := E_Signed_Integer_Subtype;
8155 when Modular_Integer_Kind =>
8156 Kind := E_Modular_Integer_Subtype;
8158 when Protected_Kind =>
8159 Kind := E_Protected_Subtype;
8162 Kind := E_Task_Subtype;
8166 raise Program_Error;
8172 ---------------------
8173 -- Type_High_Bound --
8174 ---------------------
8176 function Type_High_Bound (Id : E) return Node_Id is
8177 Rng : constant Node_Id := Scalar_Range (Id);
8179 if Nkind (Rng) = N_Subtype_Indication then
8180 return High_Bound (Range_Expression (Constraint (Rng)));
8182 return High_Bound (Rng);
8184 end Type_High_Bound;
8186 --------------------
8187 -- Type_Low_Bound --
8188 --------------------
8190 function Type_Low_Bound (Id : E) return Node_Id is
8191 Rng : constant Node_Id := Scalar_Range (Id);
8193 if Nkind (Rng) = N_Subtype_Indication then
8194 return Low_Bound (Range_Expression (Constraint (Rng)));
8196 return Low_Bound (Rng);
8200 ---------------------
8201 -- Underlying_Type --
8202 ---------------------
8204 function Underlying_Type (Id : E) return E is
8206 -- For record_with_private the underlying type is always the direct
8207 -- full view. Never try to take the full view of the parent it
8208 -- doesn't make sense.
8210 if Ekind (Id) = E_Record_Type_With_Private then
8211 return Full_View (Id);
8213 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8215 -- If we have an incomplete or private type with a full view,
8216 -- then we return the Underlying_Type of this full view.
8218 if Present (Full_View (Id)) then
8219 if Id = Full_View (Id) then
8221 -- Previous error in declaration
8226 return Underlying_Type (Full_View (Id));
8229 -- If we have a private type with an underlying full view, then we
8230 -- return the Underlying_Type of this underlying full view.
8232 elsif Ekind (Id) in Private_Kind
8233 and then Present (Underlying_Full_View (Id))
8235 return Underlying_Type (Underlying_Full_View (Id));
8237 -- If we have an incomplete entity that comes from the limited
8238 -- view then we return the Underlying_Type of its non-limited
8241 elsif From_Limited_With (Id)
8242 and then Present (Non_Limited_View (Id))
8244 return Underlying_Type (Non_Limited_View (Id));
8246 -- Otherwise check for the case where we have a derived type or
8247 -- subtype, and if so get the Underlying_Type of the parent type.
8249 elsif Etype (Id) /= Id then
8250 return Underlying_Type (Etype (Id));
8252 -- Otherwise we have an incomplete or private type that has
8253 -- no full view, which means that we have not encountered the
8254 -- completion, so return Empty to indicate the underlying type
8255 -- is not yet known.
8261 -- For non-incomplete, non-private types, return the type itself Also
8262 -- for entities that are not types at all return the entity itself.
8267 end Underlying_Type;
8269 ------------------------
8270 -- Write_Entity_Flags --
8271 ------------------------
8273 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8275 procedure W (Flag_Name : String; Flag : Boolean);
8276 -- Write out given flag if it is set
8282 procedure W (Flag_Name : String; Flag : Boolean) is
8286 Write_Str (Flag_Name);
8287 Write_Str (" = True");
8292 -- Start of processing for Write_Entity_Flags
8295 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8296 and then Is_Base_Type (Id)
8299 Write_Str ("Component_Alignment = ");
8301 case Component_Alignment (Id) is
8302 when Calign_Default =>
8303 Write_Str ("Calign_Default");
8305 when Calign_Component_Size =>
8306 Write_Str ("Calign_Component_Size");
8308 when Calign_Component_Size_4 =>
8309 Write_Str ("Calign_Component_Size_4");
8311 when Calign_Storage_Unit =>
8312 Write_Str ("Calign_Storage_Unit");
8318 W ("Address_Taken", Flag104 (Id));
8319 W ("Body_Needed_For_SAL", Flag40 (Id));
8320 W ("C_Pass_By_Copy", Flag125 (Id));
8321 W ("Can_Never_Be_Null", Flag38 (Id));
8322 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8323 W ("Debug_Info_Off", Flag166 (Id));
8324 W ("Default_Expressions_Processed", Flag108 (Id));
8325 W ("Delay_Cleanups", Flag114 (Id));
8326 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8327 W ("Depends_On_Private", Flag14 (Id));
8328 W ("Discard_Names", Flag88 (Id));
8329 W ("Elaboration_Entity_Required", Flag174 (Id));
8330 W ("Elaborate_Body_Desirable", Flag210 (Id));
8331 W ("Entry_Accepted", Flag152 (Id));
8332 W ("Can_Use_Internal_Rep", Flag229 (Id));
8333 W ("Finalize_Storage_Only", Flag158 (Id));
8334 W ("From_Limited_With", Flag159 (Id));
8335 W ("Has_Aliased_Components", Flag135 (Id));
8336 W ("Has_Alignment_Clause", Flag46 (Id));
8337 W ("Has_All_Calls_Remote", Flag79 (Id));
8338 W ("Has_Anonymous_Master", Flag253 (Id));
8339 W ("Has_Atomic_Components", Flag86 (Id));
8340 W ("Has_Biased_Representation", Flag139 (Id));
8341 W ("Has_Completion", Flag26 (Id));
8342 W ("Has_Completion_In_Body", Flag71 (Id));
8343 W ("Has_Complex_Representation", Flag140 (Id));
8344 W ("Has_Component_Size_Clause", Flag68 (Id));
8345 W ("Has_Contiguous_Rep", Flag181 (Id));
8346 W ("Has_Controlled_Component", Flag43 (Id));
8347 W ("Has_Controlling_Result", Flag98 (Id));
8348 W ("Has_Convention_Pragma", Flag119 (Id));
8349 W ("Has_Default_Aspect", Flag39 (Id));
8350 W ("Has_Default_Init_Cond", Flag3 (Id));
8351 W ("Has_Delayed_Aspects", Flag200 (Id));
8352 W ("Has_Delayed_Freeze", Flag18 (Id));
8353 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8354 W ("Has_Discriminants", Flag5 (Id));
8355 W ("Has_Dispatch_Table", Flag220 (Id));
8356 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8357 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8358 W ("Has_Exit", Flag47 (Id));
8359 W ("Has_Forward_Instantiation", Flag175 (Id));
8360 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8361 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8362 W ("Has_Homonym", Flag56 (Id));
8363 W ("Has_Implicit_Dereference", Flag251 (Id));
8364 W ("Has_Independent_Components", Flag34 (Id));
8365 W ("Has_Inheritable_Invariants", Flag248 (Id));
8366 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8367 W ("Has_Initial_Value", Flag219 (Id));
8368 W ("Has_Invariants", Flag232 (Id));
8369 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8370 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8371 W ("Has_Master_Entity", Flag21 (Id));
8372 W ("Has_Missing_Return", Flag142 (Id));
8373 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8374 W ("Has_Non_Standard_Rep", Flag75 (Id));
8375 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8376 W ("Has_Object_Size_Clause", Flag172 (Id));
8377 W ("Has_Per_Object_Constraint", Flag154 (Id));
8378 W ("Has_Postconditions", Flag240 (Id));
8379 W ("Has_Pragma_Controlled", Flag27 (Id));
8380 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8381 W ("Has_Pragma_Inline", Flag157 (Id));
8382 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8383 W ("Has_Pragma_No_Inline", Flag201 (Id));
8384 W ("Has_Pragma_Ordered", Flag198 (Id));
8385 W ("Has_Pragma_Pack", Flag121 (Id));
8386 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8387 W ("Has_Pragma_Pure", Flag203 (Id));
8388 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8389 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8390 W ("Has_Pragma_Unmodified", Flag233 (Id));
8391 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8392 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8393 W ("Has_Predicates", Flag250 (Id));
8394 W ("Has_Primitive_Operations", Flag120 (Id));
8395 W ("Has_Private_Ancestor", Flag151 (Id));
8396 W ("Has_Private_Declaration", Flag155 (Id));
8397 W ("Has_Protected", Flag271 (Id));
8398 W ("Has_Qualified_Name", Flag161 (Id));
8399 W ("Has_RACW", Flag214 (Id));
8400 W ("Has_Record_Rep_Clause", Flag65 (Id));
8401 W ("Has_Recursive_Call", Flag143 (Id));
8402 W ("Has_Shift_Operator", Flag267 (Id));
8403 W ("Has_Size_Clause", Flag29 (Id));
8404 W ("Has_Small_Clause", Flag67 (Id));
8405 W ("Has_Specified_Layout", Flag100 (Id));
8406 W ("Has_Specified_Stream_Input", Flag190 (Id));
8407 W ("Has_Specified_Stream_Output", Flag191 (Id));
8408 W ("Has_Specified_Stream_Read", Flag192 (Id));
8409 W ("Has_Specified_Stream_Write", Flag193 (Id));
8410 W ("Has_Static_Discriminants", Flag211 (Id));
8411 W ("Has_Static_Predicate", Flag269 (Id));
8412 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8413 W ("Has_Storage_Size_Clause", Flag23 (Id));
8414 W ("Has_Stream_Size_Clause", Flag184 (Id));
8415 W ("Has_Task", Flag30 (Id));
8416 W ("Has_Thunks", Flag228 (Id));
8417 W ("Has_Unchecked_Union", Flag123 (Id));
8418 W ("Has_Unknown_Discriminants", Flag72 (Id));
8419 W ("Has_Up_Level_Access", Flag215 (Id));
8420 W ("Has_Visible_Refinement", Flag263 (Id));
8421 W ("Has_Volatile_Components", Flag87 (Id));
8422 W ("Has_Xref_Entry", Flag182 (Id));
8423 W ("In_Package_Body", Flag48 (Id));
8424 W ("In_Private_Part", Flag45 (Id));
8425 W ("In_Use", Flag8 (Id));
8426 W ("Is_Abstract_Subprogram", Flag19 (Id));
8427 W ("Is_Abstract_Type", Flag146 (Id));
8428 W ("Is_Access_Constant", Flag69 (Id));
8429 W ("Is_Ada_2005_Only", Flag185 (Id));
8430 W ("Is_Ada_2012_Only", Flag199 (Id));
8431 W ("Is_Aliased", Flag15 (Id));
8432 W ("Is_Asynchronous", Flag81 (Id));
8433 W ("Is_Atomic", Flag85 (Id));
8434 W ("Is_Bit_Packed_Array", Flag122 (Id));
8435 W ("Is_CPP_Class", Flag74 (Id));
8436 W ("Is_Called", Flag102 (Id));
8437 W ("Is_Character_Type", Flag63 (Id));
8438 W ("Is_Child_Unit", Flag73 (Id));
8439 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8440 W ("Is_Compilation_Unit", Flag149 (Id));
8441 W ("Is_Completely_Hidden", Flag103 (Id));
8442 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8443 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8444 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8445 W ("Is_Constrained", Flag12 (Id));
8446 W ("Is_Constructor", Flag76 (Id));
8447 W ("Is_Controlled", Flag42 (Id));
8448 W ("Is_Controlling_Formal", Flag97 (Id));
8449 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8450 W ("Is_Descendent_Of_Address", Flag223 (Id));
8451 W ("Is_Discrim_SO_Function", Flag176 (Id));
8452 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8453 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8454 W ("Is_Dispatching_Operation", Flag6 (Id));
8455 W ("Is_Eliminated", Flag124 (Id));
8456 W ("Is_Entry_Formal", Flag52 (Id));
8457 W ("Is_Exported", Flag99 (Id));
8458 W ("Is_First_Subtype", Flag70 (Id));
8459 W ("Is_For_Access_Subtype", Flag118 (Id));
8460 W ("Is_Formal_Subprogram", Flag111 (Id));
8461 W ("Is_Frozen", Flag4 (Id));
8462 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8463 W ("Is_Generic_Actual_Type", Flag94 (Id));
8464 W ("Is_Generic_Instance", Flag130 (Id));
8465 W ("Is_Generic_Type", Flag13 (Id));
8466 W ("Is_Hidden", Flag57 (Id));
8467 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8468 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8469 W ("Is_Immediately_Visible", Flag7 (Id));
8470 W ("Is_Implementation_Defined", Flag254 (Id));
8471 W ("Is_Imported", Flag24 (Id));
8472 W ("Is_Independent", Flag268 (Id));
8473 W ("Is_Inlined", Flag11 (Id));
8474 W ("Is_Inlined_Always", Flag1 (Id));
8475 W ("Is_Instantiated", Flag126 (Id));
8476 W ("Is_Interface", Flag186 (Id));
8477 W ("Is_Internal", Flag17 (Id));
8478 W ("Is_Interrupt_Handler", Flag89 (Id));
8479 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8480 W ("Is_Invariant_Procedure", Flag257 (Id));
8481 W ("Is_Itype", Flag91 (Id));
8482 W ("Is_Known_Non_Null", Flag37 (Id));
8483 W ("Is_Known_Null", Flag204 (Id));
8484 W ("Is_Known_Valid", Flag170 (Id));
8485 W ("Is_Limited_Composite", Flag106 (Id));
8486 W ("Is_Limited_Interface", Flag197 (Id));
8487 W ("Is_Limited_Record", Flag25 (Id));
8488 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8489 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8490 W ("Is_Non_Static_Subtype", Flag109 (Id));
8491 W ("Is_Null_Init_Proc", Flag178 (Id));
8492 W ("Is_Obsolescent", Flag153 (Id));
8493 W ("Is_Only_Out_Parameter", Flag226 (Id));
8494 W ("Is_Package_Body_Entity", Flag160 (Id));
8495 W ("Is_Packed", Flag51 (Id));
8496 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8497 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8498 W ("Is_Predicate_Function", Flag255 (Id));
8499 W ("Is_Predicate_Function_M", Flag256 (Id));
8500 W ("Is_Preelaborated", Flag59 (Id));
8501 W ("Is_Primitive", Flag218 (Id));
8502 W ("Is_Primitive_Wrapper", Flag195 (Id));
8503 W ("Is_Private_Composite", Flag107 (Id));
8504 W ("Is_Private_Descendant", Flag53 (Id));
8505 W ("Is_Private_Primitive", Flag245 (Id));
8506 W ("Is_Processed_Transient", Flag252 (Id));
8507 W ("Is_Public", Flag10 (Id));
8508 W ("Is_Pure", Flag44 (Id));
8509 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8510 W ("Is_RACW_Stub_Type", Flag244 (Id));
8511 W ("Is_Raised", Flag224 (Id));
8512 W ("Is_Remote_Call_Interface", Flag62 (Id));
8513 W ("Is_Remote_Types", Flag61 (Id));
8514 W ("Is_Renaming_Of_Object", Flag112 (Id));
8515 W ("Is_Return_Object", Flag209 (Id));
8516 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8517 W ("Is_Shared_Passive", Flag60 (Id));
8518 W ("Is_Statically_Allocated", Flag28 (Id));
8519 W ("Is_Tag", Flag78 (Id));
8520 W ("Is_Tagged_Type", Flag55 (Id));
8521 W ("Is_Thunk", Flag225 (Id));
8522 W ("Is_Trivial_Subprogram", Flag235 (Id));
8523 W ("Is_True_Constant", Flag163 (Id));
8524 W ("Is_Unchecked_Union", Flag117 (Id));
8525 W ("Is_Underlying_Record_View", Flag246 (Id));
8526 W ("Is_Unsigned_Type", Flag144 (Id));
8527 W ("Is_Valued_Procedure", Flag127 (Id));
8528 W ("Is_Visible_Formal", Flag206 (Id));
8529 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8530 W ("Is_Volatile", Flag16 (Id));
8531 W ("Itype_Printed", Flag202 (Id));
8532 W ("Kill_Elaboration_Checks", Flag32 (Id));
8533 W ("Kill_Range_Checks", Flag33 (Id));
8534 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8535 W ("Low_Bound_Tested", Flag205 (Id));
8536 W ("Machine_Radix_10", Flag84 (Id));
8537 W ("Materialize_Entity", Flag168 (Id));
8538 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8539 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8540 W ("Must_Have_Preelab_Init", Flag208 (Id));
8541 W ("Needs_Debug_Info", Flag147 (Id));
8542 W ("Needs_No_Actuals", Flag22 (Id));
8543 W ("Never_Set_In_Source", Flag115 (Id));
8544 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8545 W ("No_Pool_Assigned", Flag131 (Id));
8546 W ("No_Predicate_On_actual", Flag275 (Id));
8547 W ("No_Return", Flag113 (Id));
8548 W ("No_Strict_Aliasing", Flag136 (Id));
8549 W ("Non_Binary_Modulus", Flag58 (Id));
8550 W ("Nonzero_Is_True", Flag162 (Id));
8551 W ("OK_To_Rename", Flag247 (Id));
8552 W ("OK_To_Reorder_Components", Flag239 (Id));
8553 W ("Optimize_Alignment_Space", Flag241 (Id));
8554 W ("Optimize_Alignment_Time", Flag242 (Id));
8555 W ("Overlays_Constant", Flag243 (Id));
8556 W ("Reachable", Flag49 (Id));
8557 W ("Referenced", Flag156 (Id));
8558 W ("Referenced_As_LHS", Flag36 (Id));
8559 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8560 W ("Renamed_In_Spec", Flag231 (Id));
8561 W ("Requires_Overriding", Flag213 (Id));
8562 W ("Return_Present", Flag54 (Id));
8563 W ("Returns_By_Ref", Flag90 (Id));
8564 W ("Returns_Limited_View", Flag134 (Id));
8565 W ("Reverse_Bit_Order", Flag164 (Id));
8566 W ("Reverse_Storage_Order", Flag93 (Id));
8567 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8568 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8569 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8570 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8571 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8572 W ("SSO_Set_High_By_Default", Flag273 (Id));
8573 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8574 W ("Static_Elaboration_Desired", Flag77 (Id));
8575 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8576 W ("Strict_Alignment", Flag145 (Id));
8577 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8578 W ("Suppress_Initialization", Flag105 (Id));
8579 W ("Suppress_Style_Checks", Flag165 (Id));
8580 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8581 W ("Treat_As_Volatile", Flag41 (Id));
8582 W ("Universal_Aliasing", Flag216 (Id));
8583 W ("Used_As_Generic_Actual", Flag222 (Id));
8584 W ("Uses_Sec_Stack", Flag95 (Id));
8585 W ("Warnings_Off", Flag96 (Id));
8586 W ("Warnings_Off_Used", Flag236 (Id));
8587 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8588 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8589 W ("Was_Hidden", Flag196 (Id));
8590 end Write_Entity_Flags;
8592 -----------------------
8593 -- Write_Entity_Info --
8594 -----------------------
8596 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8598 procedure Write_Attribute (Which : String; Nam : E);
8599 -- Write attribute value with given string name
8601 procedure Write_Kind (Id : Entity_Id);
8602 -- Write Ekind field of entity
8604 ---------------------
8605 -- Write_Attribute --
8606 ---------------------
8608 procedure Write_Attribute (Which : String; Nam : E) is
8612 Write_Int (Int (Nam));
8614 Write_Name (Chars (Nam));
8616 end Write_Attribute;
8622 procedure Write_Kind (Id : Entity_Id) is
8623 K : constant String := Entity_Kind'Image (Ekind (Id));
8627 Write_Str (" Kind ");
8629 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8630 Write_Str ("TAGGED ");
8633 Write_Str (K (3 .. K'Length));
8636 if Is_Type (Id) and then Depends_On_Private (Id) then
8637 Write_Str ("Depends_On_Private ");
8641 -- Start of processing for Write_Entity_Info
8645 Write_Attribute ("Name ", Id);
8646 Write_Int (Int (Id));
8650 Write_Attribute (" Type ", Etype (Id));
8652 Write_Attribute (" Scope ", Scope (Id));
8657 when Discrete_Kind =>
8658 Write_Str ("Bounds: Id = ");
8660 if Present (Scalar_Range (Id)) then
8661 Write_Int (Int (Type_Low_Bound (Id)));
8662 Write_Str (" .. Id = ");
8663 Write_Int (Int (Type_High_Bound (Id)));
8665 Write_Str ("Empty");
8676 (" Component Type ", Component_Type (Id));
8679 Write_Str (" Indexes ");
8681 Index := First_Index (Id);
8682 while Present (Index) loop
8683 Write_Attribute (" ", Etype (Index));
8684 Index := Next_Index (Index);
8692 (" Directly Designated Type ",
8693 Directly_Designated_Type (Id));
8696 when Overloadable_Kind =>
8697 if Present (Homonym (Id)) then
8698 Write_Str (" Homonym ");
8699 Write_Name (Chars (Homonym (Id)));
8701 Write_Int (Int (Homonym (Id)));
8708 if Ekind (Scope (Id)) in Record_Kind then
8710 " Original_Record_Component ",
8711 Original_Record_Component (Id));
8712 Write_Int (Int (Original_Record_Component (Id)));
8716 when others => null;
8718 end Write_Entity_Info;
8720 -----------------------
8721 -- Write_Field6_Name --
8722 -----------------------
8724 procedure Write_Field6_Name (Id : Entity_Id) is
8725 pragma Warnings (Off, Id);
8727 Write_Str ("First_Rep_Item");
8728 end Write_Field6_Name;
8730 -----------------------
8731 -- Write_Field7_Name --
8732 -----------------------
8734 procedure Write_Field7_Name (Id : Entity_Id) is
8735 pragma Warnings (Off, Id);
8737 Write_Str ("Freeze_Node");
8738 end Write_Field7_Name;
8740 -----------------------
8741 -- Write_Field8_Name --
8742 -----------------------
8744 procedure Write_Field8_Name (Id : Entity_Id) is
8748 Write_Str ("Associated_Node_For_Itype");
8751 Write_Str ("Dependent_Instances");
8754 Write_Str ("First_Exit_Statement");
8757 Write_Str ("Hiding_Loop_Variable");
8761 E_Subprogram_Body =>
8762 Write_Str ("Mechanism");
8766 Write_Str ("Normalized_First_Bit");
8769 Write_Str ("Postcondition_Proc");
8771 when E_Abstract_State =>
8772 Write_Str ("Refinement_Constituents");
8774 when E_Return_Statement =>
8775 Write_Str ("Return_Applies_To");
8778 Write_Str ("Field8??");
8780 end Write_Field8_Name;
8782 -----------------------
8783 -- Write_Field9_Name --
8784 -----------------------
8786 procedure Write_Field9_Name (Id : Entity_Id) is
8790 Write_Str ("Class_Wide_Type");
8793 Write_Str ("Current_Value");
8795 when E_Abstract_State =>
8796 Write_Str ("Part_Of_Constituents");
8799 E_Generic_Function |
8801 E_Generic_Procedure |
8804 Write_Str ("Renaming_Map");
8807 Write_Str ("Field9??");
8809 end Write_Field9_Name;
8811 ------------------------
8812 -- Write_Field10_Name --
8813 ------------------------
8815 procedure Write_Field10_Name (Id : Entity_Id) is
8818 when E_Abstract_State |
8820 Write_Str ("Encapsulating_State");
8822 when Class_Wide_Kind |
8828 Write_Str ("Direct_Primitive_Operations");
8831 Write_Str ("Float_Rep");
8833 when E_In_Parameter |
8835 Write_Str ("Discriminal_Link");
8841 Write_Str ("Handler_Records");
8845 Write_Str ("Normalized_Position_Max");
8848 Write_Str ("Field10??");
8850 end Write_Field10_Name;
8852 ------------------------
8853 -- Write_Field11_Name --
8854 ------------------------
8856 procedure Write_Field11_Name (Id : Entity_Id) is
8860 Write_Str ("Block_Node");
8864 Write_Str ("Component_Bit_Offset");
8867 Write_Str ("Entry_Component");
8869 when E_Enumeration_Literal =>
8870 Write_Str ("Enumeration_Pos");
8874 Write_Str ("Full_View");
8876 when E_Generic_Package =>
8877 Write_Str ("Generic_Homonym");
8883 Write_Str ("Protected_Body_Subprogram");
8886 Write_Str ("Field11??");
8888 end Write_Field11_Name;
8890 ------------------------
8891 -- Write_Field12_Name --
8892 ------------------------
8894 procedure Write_Field12_Name (Id : Entity_Id) is
8898 Write_Str ("Associated_Formal_Package");
8901 Write_Str ("Barrier_Function");
8903 when E_Enumeration_Literal =>
8904 Write_Str ("Enumeration_Rep");
8912 E_In_Out_Parameter |
8916 Write_Str ("Esize");
8920 Write_Str ("Next_Inlined_Subprogram");
8923 Write_Str ("Field12??");
8925 end Write_Field12_Name;
8927 ------------------------
8928 -- Write_Field13_Name --
8929 ------------------------
8931 procedure Write_Field13_Name (Id : Entity_Id) is
8936 Write_Str ("Component_Clause");
8939 Write_Str ("Elaboration_Entity");
8943 Generic_Unit_Kind =>
8944 Write_Str ("Elaboration_Entity");
8948 Write_Str ("Extra_Accessibility");
8951 Write_Str ("RM_Size");
8954 Write_Str ("Field13??");
8956 end Write_Field13_Name;
8958 -----------------------
8959 -- Write_Field14_Name --
8960 -----------------------
8962 procedure Write_Field14_Name (Id : Entity_Id) is
8971 Write_Str ("Alignment");
8975 Write_Str ("Normalized_Position");
8978 E_Generic_Package =>
8979 Write_Str ("Shadow_Entities");
8982 Write_Str ("Field14??");
8984 end Write_Field14_Name;
8986 ------------------------
8987 -- Write_Field15_Name --
8988 ------------------------
8990 procedure Write_Field15_Name (Id : Entity_Id) is
8993 when E_Discriminant =>
8994 Write_Str ("Discriminant_Number");
8997 Write_Str ("DT_Entry_Count");
9001 Write_Str ("DT_Position");
9003 when E_Protected_Type =>
9004 Write_Str ("Entry_Bodies_Array");
9007 Write_Str ("Entry_Parameters_Type");
9010 Write_Str ("Extra_Formal");
9012 when Enumeration_Kind =>
9013 Write_Str ("Lit_Indexes");
9017 Write_Str ("Related_Instance");
9019 when Decimal_Fixed_Point_Kind =>
9020 Write_Str ("Scale_Value");
9024 Write_Str ("Status_Flag_Or_Transient_Decl");
9028 Write_Str ("Storage_Size_Variable");
9030 when E_String_Literal_Subtype =>
9031 Write_Str ("String_Literal_Low_Bound");
9034 Write_Str ("Field15??");
9036 end Write_Field15_Name;
9038 ------------------------
9039 -- Write_Field16_Name --
9040 ------------------------
9042 procedure Write_Field16_Name (Id : Entity_Id) is
9045 when E_Record_Type |
9046 E_Record_Type_With_Private =>
9047 Write_Str ("Access_Disp_Table");
9049 when E_Abstract_State =>
9050 Write_Str ("Body_References");
9052 when E_Record_Subtype |
9053 E_Class_Wide_Subtype =>
9054 Write_Str ("Cloned_Subtype");
9058 Write_Str ("DTC_Entity");
9061 Write_Str ("Entry_Formal");
9066 Write_Str ("First_Private_Entity");
9068 when Enumeration_Kind =>
9069 Write_Str ("Lit_Strings");
9071 when E_String_Literal_Subtype =>
9072 Write_Str ("String_Literal_Length");
9076 Write_Str ("Unset_Reference");
9079 Write_Str ("Field16??");
9081 end Write_Field16_Name;
9083 ------------------------
9084 -- Write_Field17_Name --
9085 ------------------------
9087 procedure Write_Field17_Name (Id : Entity_Id) is
9092 E_Generic_In_Out_Parameter |
9094 Write_Str ("Actual_Subtype");
9097 Write_Str ("Digits_Value");
9099 when E_Discriminant =>
9100 Write_Str ("Discriminal");
9109 E_Generic_Function |
9111 E_Generic_Procedure |
9119 E_Return_Statement |
9121 E_Subprogram_Type =>
9122 Write_Str ("First_Entity");
9125 Write_Str ("First_Index");
9127 when Enumeration_Kind =>
9128 Write_Str ("First_Literal");
9131 Write_Str ("Master_Id");
9133 when Modular_Integer_Kind =>
9134 Write_Str ("Modulus");
9136 when E_Abstract_State |
9137 E_Incomplete_Type =>
9138 Write_Str ("Non_Limited_View");
9140 when E_Incomplete_Subtype =>
9141 if From_Limited_With (Id) then
9142 Write_Str ("Non_Limited_View");
9146 Write_Str ("Prival");
9149 Write_Str ("Field17??");
9151 end Write_Field17_Name;
9153 ------------------------
9154 -- Write_Field18_Name --
9155 ------------------------
9157 procedure Write_Field18_Name (Id : Entity_Id) is
9160 when E_Enumeration_Literal |
9164 Write_Str ("Alias");
9166 when E_Record_Type =>
9167 Write_Str ("Corresponding_Concurrent_Type");
9169 when E_Subprogram_Body =>
9170 Write_Str ("Corresponding_Protected_Entry");
9172 when Concurrent_Kind =>
9173 Write_Str ("Corresponding_Record_Type");
9178 Write_Str ("Enclosing_Scope");
9180 when E_Entry_Index_Parameter =>
9181 Write_Str ("Entry_Index_Constant");
9183 when E_Class_Wide_Subtype |
9184 E_Access_Protected_Subprogram_Type |
9185 E_Anonymous_Access_Protected_Subprogram_Type |
9186 E_Access_Subprogram_Type |
9188 Write_Str ("Equivalent_Type");
9190 when Fixed_Point_Kind =>
9191 Write_Str ("Delta_Value");
9193 when Incomplete_Or_Private_Kind |
9195 Write_Str ("Private_Dependents");
9198 Write_Str ("Renamed_Object");
9202 E_Generic_Function |
9203 E_Generic_Procedure |
9204 E_Generic_Package =>
9205 Write_Str ("Renamed_Entity");
9208 Write_Str ("Field18??");
9210 end Write_Field18_Name;
9212 -----------------------
9213 -- Write_Field19_Name --
9214 -----------------------
9216 procedure Write_Field19_Name (Id : Entity_Id) is
9220 E_Generic_Package =>
9221 Write_Str ("Body_Entity");
9223 when E_Discriminant =>
9224 Write_Str ("Corresponding_Discriminant");
9227 Write_Str ("Default_Aspect_Value");
9229 when E_Array_Type =>
9230 Write_Str ("Default_Component_Value");
9232 when E_Record_Type =>
9233 Write_Str ("Parent_Subtype");
9237 Write_Str ("Size_Check_Code");
9239 when E_Package_Body |
9241 Write_Str ("Spec_Entity");
9243 when Private_Kind =>
9244 Write_Str ("Underlying_Full_View");
9246 when E_Function | E_Operator | E_Subprogram_Type =>
9247 Write_Str ("Extra_Accessibility_Of_Result");
9250 Write_Str ("Field19??");
9252 end Write_Field19_Name;
9254 -----------------------
9255 -- Write_Field20_Name --
9256 -----------------------
9258 procedure Write_Field20_Name (Id : Entity_Id) is
9262 Write_Str ("Component_Type");
9264 when E_In_Parameter |
9265 E_Generic_In_Parameter =>
9266 Write_Str ("Default_Value");
9269 Write_Str ("Directly_Designated_Type");
9272 Write_Str ("Discriminant_Checking_Func");
9274 when E_Discriminant =>
9275 Write_Str ("Discriminant_Default_Value");
9284 E_Generic_Function |
9286 E_Generic_Procedure |
9294 E_Return_Statement |
9296 E_Subprogram_Type =>
9297 Write_Str ("Last_Entity");
9301 Write_Str ("Prival_Link");
9304 Write_Str ("Scalar_Range");
9307 Write_Str ("Register_Exception_Call");
9310 Write_Str ("Field20??");
9312 end Write_Field20_Name;
9314 -----------------------
9315 -- Write_Field21_Name --
9316 -----------------------
9318 procedure Write_Field21_Name (Id : Entity_Id) is
9322 Write_Str ("Accept_Address");
9324 when E_In_Parameter =>
9325 Write_Str ("Default_Expr_Function");
9327 when Concurrent_Kind |
9328 Incomplete_Or_Private_Kind |
9332 Write_Str ("Discriminant_Constraint");
9337 E_Generic_Function |
9339 E_Generic_Procedure |
9341 Write_Str ("Interface_Name");
9344 Modular_Integer_Kind =>
9345 Write_Str ("Original_Array_Type");
9347 when Fixed_Point_Kind =>
9348 Write_Str ("Small_Value");
9351 Write_Str ("Field21??");
9353 end Write_Field21_Name;
9355 -----------------------
9356 -- Write_Field22_Name --
9357 -----------------------
9359 procedure Write_Field22_Name (Id : Entity_Id) is
9363 Write_Str ("Associated_Storage_Pool");
9366 Write_Str ("Component_Size");
9368 when E_Record_Type =>
9369 Write_Str ("Corresponding_Remote_Type");
9373 Write_Str ("Original_Record_Component");
9375 when E_Enumeration_Literal =>
9376 Write_Str ("Enumeration_Rep_Expr");
9378 when E_Record_Type_With_Private |
9379 E_Record_Subtype_With_Private |
9382 E_Limited_Private_Type |
9383 E_Limited_Private_Subtype =>
9384 Write_Str ("Private_View");
9387 Write_Str ("Protected_Formal");
9397 E_Generic_Function |
9398 E_Generic_Procedure |
9401 E_Return_Statement |
9404 Write_Str ("Scope_Depth_Value");
9407 Write_Str ("Shared_Var_Procs_Instance");
9410 Write_Str ("Field22??");
9412 end Write_Field22_Name;
9414 ------------------------
9415 -- Write_Field23_Name --
9416 ------------------------
9418 procedure Write_Field23_Name (Id : Entity_Id) is
9421 when E_Discriminant =>
9422 Write_Str ("CR_Discriminant");
9425 Write_Str ("Entry_Cancel_Parameter");
9427 when E_Enumeration_Type =>
9428 Write_Str ("Enum_Pos_To_Rep");
9432 Write_Str ("Extra_Constrained");
9435 Write_Str ("Finalization_Master");
9437 when E_Generic_Function |
9439 E_Generic_Procedure =>
9440 Write_Str ("Inner_Instances");
9443 Write_Str ("Packed_Array_Impl_Type");
9446 Write_Str ("Protection_Object");
9448 when Concurrent_Kind |
9449 Incomplete_Or_Private_Kind |
9453 Write_Str ("Stored_Constraint");
9457 if Present (Scope (Id))
9458 and then Is_Protected_Type (Scope (Id))
9460 Write_Str ("Protection_Object");
9462 Write_Str ("Generic_Renamings");
9466 if Is_Generic_Instance (Id) then
9467 Write_Str ("Generic_Renamings");
9469 Write_Str ("Limited_View");
9473 Write_Str ("Field23??");
9475 end Write_Field23_Name;
9477 ------------------------
9478 -- Write_Field24_Name --
9479 ------------------------
9481 procedure Write_Field24_Name (Id : Entity_Id) is
9487 Write_Str ("Related_Expression");
9490 Write_Str ("Field24???");
9492 end Write_Field24_Name;
9494 ------------------------
9495 -- Write_Field25_Name --
9496 ------------------------
9498 procedure Write_Field25_Name (Id : Entity_Id) is
9501 when E_Generic_Package |
9503 Write_Str ("Abstract_States");
9506 Write_Str ("Debug_Renaming_Link");
9509 Write_Str ("DT_Offset_To_Top_Func");
9513 Write_Str ("Interface_Alias");
9515 when E_Record_Type |
9517 E_Record_Type_With_Private |
9518 E_Record_Subtype_With_Private =>
9519 Write_Str ("Interfaces");
9523 Write_Str ("Related_Array_Object");
9526 Write_Str ("Task_Body_Procedure");
9530 Write_Str ("PPC_Wrapper");
9532 when Discrete_Kind =>
9533 Write_Str ("Static_Discrete_Predicate");
9536 Write_Str ("Static_Real_Or_String_Predicate");
9539 Write_Str ("Field25??");
9541 end Write_Field25_Name;
9543 ------------------------
9544 -- Write_Field26_Name --
9545 ------------------------
9547 procedure Write_Field26_Name (Id : Entity_Id) is
9550 when E_Record_Type |
9551 E_Record_Type_With_Private =>
9552 Write_Str ("Dispatch_Table_Wrappers");
9554 when E_In_Out_Parameter |
9557 Write_Str ("Last_Assignment");
9559 when E_Access_Subprogram_Type =>
9560 Write_Str ("Original_Access_Type");
9562 when E_Generic_Package |
9564 Write_Str ("Package_Instantiation");
9568 Write_Str ("Related_Type");
9571 Write_Str ("Relative_Deadline_Variable");
9575 Write_Str ("Overridden_Operation");
9578 Write_Str ("Field26??");
9580 end Write_Field26_Name;
9582 ------------------------
9583 -- Write_Field27_Name --
9584 ------------------------
9586 procedure Write_Field27_Name (Id : Entity_Id) is
9591 Write_Str ("Current_Use_Clause");
9596 Write_Str ("Related_Type");
9600 Write_Str ("Wrapped_Entity");
9603 Write_Str ("Field27??");
9605 end Write_Field27_Name;
9607 ------------------------
9608 -- Write_Field28_Name --
9609 ------------------------
9611 procedure Write_Field28_Name (Id : Entity_Id) is
9619 E_Subprogram_Type =>
9620 Write_Str ("Extra_Formals");
9624 Write_Str ("Finalizer");
9628 Write_Str ("Initialization_Statements");
9630 when E_Record_Type =>
9631 Write_Str ("Underlying_Record_View");
9634 Write_Str ("Field28??");
9636 end Write_Field28_Name;
9638 ------------------------
9639 -- Write_Field29_Name --
9640 ------------------------
9642 procedure Write_Field29_Name (Id : Entity_Id) is
9647 Write_Str ("BIP_Initialization_Call");
9650 Write_Str ("Subprograms_For_Type");
9653 Write_Str ("Field29??");
9655 end Write_Field29_Name;
9657 ------------------------
9658 -- Write_Field30_Name --
9659 ------------------------
9661 procedure Write_Field30_Name (Id : Entity_Id) is
9665 Write_Str ("Corresponding_Equality");
9669 Write_Str ("Last_Aggregate_Assignment");
9672 Write_Str ("Static_Initialization");
9675 Write_Str ("Field30??");
9677 end Write_Field30_Name;
9679 ------------------------
9680 -- Write_Field31_Name --
9681 ------------------------
9683 procedure Write_Field31_Name (Id : Entity_Id) is
9688 Write_Str ("Thunk_Entity");
9691 Write_Str ("Derived_Type_Link");
9694 Write_Str ("Field31??");
9696 end Write_Field31_Name;
9698 ------------------------
9699 -- Write_Field32_Name --
9700 ------------------------
9702 procedure Write_Field32_Name (Id : Entity_Id) is
9706 E_Generic_Function |
9708 E_Generic_Procedure |
9712 E_Subprogram_Body =>
9713 Write_Str ("SPARK_Pragma");
9716 Write_Str ("Field32??");
9718 end Write_Field32_Name;
9720 ------------------------
9721 -- Write_Field33_Name --
9722 ------------------------
9724 procedure Write_Field33_Name (Id : Entity_Id) is
9727 when E_Generic_Package |
9730 Write_Str ("SPARK_Aux_Pragma");
9736 Write_Str ("Linker_Section_Pragma");
9739 Write_Str ("Field33??");
9741 end Write_Field33_Name;
9743 ------------------------
9744 -- Write_Field34_Name --
9745 ------------------------
9747 procedure Write_Field34_Name (Id : Entity_Id) is
9757 Generic_Subprogram_Kind |
9759 Write_Str ("Contract");
9762 Write_Str ("Field34??");
9764 end Write_Field34_Name;
9766 ------------------------
9767 -- Write_Field35_Name --
9768 ------------------------
9770 procedure Write_Field35_Name (Id : Entity_Id) is
9773 when Subprogram_Kind =>
9774 Write_Str ("Import_Pragma");
9776 Write_Str ("Field35??");
9778 end Write_Field35_Name;
9780 -------------------------
9781 -- Iterator Procedures --
9782 -------------------------
9784 procedure Proc_Next_Component (N : in out Node_Id) is
9786 N := Next_Component (N);
9787 end Proc_Next_Component;
9789 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9791 N := Next_Entity (N);
9792 while Present (N) loop
9793 exit when Ekind_In (N, E_Component, E_Discriminant);
9794 N := Next_Entity (N);
9796 end Proc_Next_Component_Or_Discriminant;
9798 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9800 N := Next_Discriminant (N);
9801 end Proc_Next_Discriminant;
9803 procedure Proc_Next_Formal (N : in out Node_Id) is
9805 N := Next_Formal (N);
9806 end Proc_Next_Formal;
9808 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9810 N := Next_Formal_With_Extras (N);
9811 end Proc_Next_Formal_With_Extras;
9813 procedure Proc_Next_Index (N : in out Node_Id) is
9815 N := Next_Index (N);
9816 end Proc_Next_Index;
9818 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9820 N := Next_Inlined_Subprogram (N);
9821 end Proc_Next_Inlined_Subprogram;
9823 procedure Proc_Next_Literal (N : in out Node_Id) is
9825 N := Next_Literal (N);
9826 end Proc_Next_Literal;
9828 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9830 N := Next_Stored_Discriminant (N);
9831 end Proc_Next_Stored_Discriminant;