[AArch64][14/14] Reuse target_option_current_node when passing pragma string to targe...
[official-gcc.git] / gcc / ada / einfo.adb
blobeb57b6996d8b98b0a7b970629755b5b3a83647a2
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
10 -- --
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. --
17 -- --
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. --
21 -- --
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/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
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;
43 package body Einfo is
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.
61 -- Chars Name1
62 -- Next_Entity Node2
63 -- Scope Node3
64 -- Etype Node5
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
70 -- Homonym Node4
71 -- First_Rep_Item Node6
72 -- Freeze_Node Node7
73 -- Associated_Entity Node37
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
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
90 -- Renaming_Map Uint9
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
96 -- Normalized_Position_Max Uint10
98 -- Component_Bit_Offset Uint11
99 -- Full_View Node11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
104 -- Block_Node Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
108 -- Esize Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
114 -- RM_Size Uint13
116 -- Alignment Uint14
117 -- Normalized_Position Uint14
118 -- Postconditions_Proc Node14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Pending_Access_Types Elist15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
130 -- Access_Disp_Table Elist16
131 -- Body_References Elist16
132 -- Cloned_Subtype Node16
133 -- DTC_Entity Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- Scale_Value Uint16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
147 -- Master_Id Node17
148 -- Modulus Uint17
149 -- Prival Node17
151 -- Alias Node18
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Lit_Indexes Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
162 -- String_Literal_Low_Bound Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Default_Aspect_Component_Value Node19
167 -- Default_Aspect_Value Node19
168 -- Entry_Bodies_Array Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Non_Limited_View 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 -- Incomplete_Actuals Elist24
216 -- Related_Expression Node24
217 -- Subps_Index Uint24
219 -- Debug_Renaming_Link Node25
220 -- DT_Offset_To_Top_Func Node25
221 -- Interface_Alias Node25
222 -- Interfaces Elist25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Discrete_Predicate List25
226 -- Static_Real_Or_String_Predicate Node25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Storage_Size_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
240 -- Finalizer Node28
241 -- Initialization_Statements Node28
242 -- Original_Access_Type Node28
243 -- Relative_Deadline_Variable Node28
244 -- Underlying_Record_View Node28
246 -- BIP_Initialization_Call Node29
247 -- Subprograms_For_Type Node29
249 -- Corresponding_Equality Node30
250 -- Last_Aggregate_Assignment Node30
251 -- Static_Initialization Node30
253 -- Derived_Type_Link Node31
254 -- Thunk_Entity Node31
255 -- Activation_Record_Component Node31
257 -- Encapsulating_State Node32
258 -- SPARK_Pragma Node32
259 -- No_Tagged_Streams_Pragma Node32
261 -- Linker_Section_Pragma Node33
262 -- SPARK_Aux_Pragma Node33
264 -- Contract Node34
266 -- Import_Pragma Node35
268 -- Anonymous_Master Node36
270 -- (unused) Node38
271 -- (unused) Node39
272 -- (unused) Node40
273 -- (unused) Node41
275 ---------------------------------------------
276 -- Usage of Flags in Defining Entity Nodes --
277 ---------------------------------------------
279 -- All flags are unique, there is no overlaying, so each flag is physically
280 -- present in every entity. However, for many of the flags, it only makes
281 -- sense for them to be set true for certain subsets of entity kinds. See
282 -- the spec of Einfo for further details.
284 -- Is_Inlined_Always Flag1
285 -- Is_Hidden_Non_Overridden_Subpgm Flag2
286 -- Has_Default_Init_Cond Flag3
287 -- Is_Frozen Flag4
288 -- Has_Discriminants Flag5
289 -- Is_Dispatching_Operation Flag6
290 -- Is_Immediately_Visible Flag7
291 -- In_Use Flag8
292 -- Is_Potentially_Use_Visible Flag9
293 -- Is_Public Flag10
295 -- Is_Inlined Flag11
296 -- Is_Constrained Flag12
297 -- Is_Generic_Type Flag13
298 -- Depends_On_Private Flag14
299 -- Is_Aliased Flag15
300 -- Is_Volatile Flag16
301 -- Is_Internal Flag17
302 -- Has_Delayed_Freeze Flag18
303 -- Is_Abstract_Subprogram Flag19
304 -- Is_Concurrent_Record_Type Flag20
306 -- Has_Master_Entity Flag21
307 -- Needs_No_Actuals Flag22
308 -- Has_Storage_Size_Clause Flag23
309 -- Is_Imported Flag24
310 -- Is_Limited_Record Flag25
311 -- Has_Completion Flag26
312 -- Has_Pragma_Controlled Flag27
313 -- Is_Statically_Allocated Flag28
314 -- Has_Size_Clause Flag29
315 -- Has_Task Flag30
317 -- Checks_May_Be_Suppressed Flag31
318 -- Kill_Elaboration_Checks Flag32
319 -- Kill_Range_Checks Flag33
320 -- Has_Independent_Components Flag34
321 -- Is_Class_Wide_Equivalent_Type Flag35
322 -- Referenced_As_LHS Flag36
323 -- Is_Known_Non_Null Flag37
324 -- Can_Never_Be_Null Flag38
325 -- Has_Default_Aspect Flag39
326 -- Body_Needed_For_SAL Flag40
328 -- Treat_As_Volatile Flag41
329 -- Is_Controlled Flag42
330 -- Has_Controlled_Component Flag43
331 -- Is_Pure Flag44
332 -- In_Private_Part Flag45
333 -- Has_Alignment_Clause Flag46
334 -- Has_Exit Flag47
335 -- In_Package_Body Flag48
336 -- Reachable Flag49
337 -- Delay_Subprogram_Descriptors Flag50
339 -- Is_Packed Flag51
340 -- Is_Entry_Formal Flag52
341 -- Is_Private_Descendant Flag53
342 -- Return_Present Flag54
343 -- Is_Tagged_Type Flag55
344 -- Has_Homonym Flag56
345 -- Is_Hidden Flag57
346 -- Non_Binary_Modulus Flag58
347 -- Is_Preelaborated Flag59
348 -- Is_Shared_Passive Flag60
350 -- Is_Remote_Types Flag61
351 -- Is_Remote_Call_Interface Flag62
352 -- Is_Character_Type Flag63
353 -- Is_Intrinsic_Subprogram Flag64
354 -- Has_Record_Rep_Clause Flag65
355 -- Has_Enumeration_Rep_Clause Flag66
356 -- Has_Small_Clause Flag67
357 -- Has_Component_Size_Clause Flag68
358 -- Is_Access_Constant Flag69
359 -- Is_First_Subtype Flag70
361 -- Has_Completion_In_Body Flag71
362 -- Has_Unknown_Discriminants Flag72
363 -- Is_Child_Unit Flag73
364 -- Is_CPP_Class Flag74
365 -- Has_Non_Standard_Rep Flag75
366 -- Is_Constructor Flag76
367 -- Static_Elaboration_Desired Flag77
368 -- Is_Tag Flag78
369 -- Has_All_Calls_Remote Flag79
370 -- Is_Constr_Subt_For_U_Nominal Flag80
372 -- Is_Asynchronous Flag81
373 -- Has_Gigi_Rep_Item Flag82
374 -- Has_Machine_Radix_Clause Flag83
375 -- Machine_Radix_10 Flag84
376 -- Is_Atomic Flag85
377 -- Has_Atomic_Components Flag86
378 -- Has_Volatile_Components Flag87
379 -- Discard_Names Flag88
380 -- Is_Interrupt_Handler Flag89
381 -- Returns_By_Ref Flag90
383 -- Is_Itype Flag91
384 -- Size_Known_At_Compile_Time Flag92
385 -- Reverse_Storage_Order Flag93
386 -- Is_Generic_Actual_Type Flag94
387 -- Uses_Sec_Stack Flag95
388 -- Warnings_Off Flag96
389 -- Is_Controlling_Formal Flag97
390 -- Has_Controlling_Result Flag98
391 -- Is_Exported Flag99
392 -- Has_Specified_Layout Flag100
394 -- Has_Nested_Block_With_Handler Flag101
395 -- Is_Called Flag102
396 -- Is_Completely_Hidden Flag103
397 -- Address_Taken Flag104
398 -- Suppress_Initialization Flag105
399 -- Is_Limited_Composite Flag106
400 -- Is_Private_Composite Flag107
401 -- Default_Expressions_Processed Flag108
402 -- Is_Non_Static_Subtype Flag109
403 -- Has_Out_Or_In_Out_Parameter Flag110
405 -- Is_Formal_Subprogram Flag111
406 -- Is_Renaming_Of_Object Flag112
407 -- No_Return Flag113
408 -- Delay_Cleanups Flag114
409 -- Never_Set_In_Source Flag115
410 -- Is_Visible_Lib_Unit Flag116
411 -- Is_Unchecked_Union Flag117
412 -- Is_For_Access_Subtype Flag118
413 -- Has_Convention_Pragma Flag119
414 -- Has_Primitive_Operations Flag120
416 -- Has_Pragma_Pack Flag121
417 -- Is_Bit_Packed_Array Flag122
418 -- Has_Unchecked_Union Flag123
419 -- Is_Eliminated Flag124
420 -- C_Pass_By_Copy Flag125
421 -- Is_Instantiated Flag126
422 -- Is_Valued_Procedure Flag127
423 -- (used for Component_Alignment) Flag128
424 -- (used for Component_Alignment) Flag129
425 -- Is_Generic_Instance Flag130
427 -- No_Pool_Assigned Flag131
428 -- Is_Default_Init_Cond_Procedure Flag132
429 -- Has_Inherited_Default_Init_Cond Flag133
430 -- Returns_Limited_View Flag134
431 -- Has_Aliased_Components Flag135
432 -- No_Strict_Aliasing Flag136
433 -- Is_Machine_Code_Subprogram Flag137
434 -- Is_Packed_Array_Impl_Type Flag138
435 -- Has_Biased_Representation Flag139
436 -- Has_Complex_Representation Flag140
438 -- Is_Constr_Subt_For_UN_Aliased Flag141
439 -- Has_Missing_Return Flag142
440 -- Has_Recursive_Call Flag143
441 -- Is_Unsigned_Type Flag144
442 -- Strict_Alignment Flag145
443 -- Is_Abstract_Type Flag146
444 -- Needs_Debug_Info Flag147
445 -- Suppress_Elaboration_Warnings Flag148
446 -- Is_Compilation_Unit Flag149
447 -- Has_Pragma_Elaborate_Body Flag150
449 -- Has_Private_Ancestor Flag151
450 -- Entry_Accepted Flag152
451 -- Is_Obsolescent Flag153
452 -- Has_Per_Object_Constraint Flag154
453 -- Has_Private_Declaration Flag155
454 -- Referenced Flag156
455 -- Has_Pragma_Inline Flag157
456 -- Finalize_Storage_Only Flag158
457 -- From_Limited_With Flag159
458 -- Is_Package_Body_Entity Flag160
460 -- Has_Qualified_Name Flag161
461 -- Nonzero_Is_True Flag162
462 -- Is_True_Constant Flag163
463 -- Reverse_Bit_Order Flag164
464 -- Suppress_Style_Checks Flag165
465 -- Debug_Info_Off Flag166
466 -- Sec_Stack_Needed_For_Return Flag167
467 -- Materialize_Entity Flag168
468 -- Has_Pragma_Thread_Local_Storage Flag169
469 -- Is_Known_Valid Flag170
471 -- Is_Hidden_Open_Scope Flag171
472 -- Has_Object_Size_Clause Flag172
473 -- Has_Fully_Qualified_Name Flag173
474 -- Elaboration_Entity_Required Flag174
475 -- Has_Forward_Instantiation Flag175
476 -- Is_Discrim_SO_Function Flag176
477 -- Size_Depends_On_Discriminant Flag177
478 -- Is_Null_Init_Proc Flag178
479 -- Has_Pragma_Pure_Function Flag179
480 -- Has_Pragma_Unreferenced Flag180
482 -- Has_Contiguous_Rep Flag181
483 -- Has_Xref_Entry Flag182
484 -- Must_Be_On_Byte_Boundary Flag183
485 -- Has_Stream_Size_Clause Flag184
486 -- Is_Ada_2005_Only Flag185
487 -- Is_Interface Flag186
488 -- Has_Constrained_Partial_View Flag187
489 -- Uses_Lock_Free Flag188
490 -- Is_Pure_Unit_Access_Type Flag189
491 -- Has_Specified_Stream_Input Flag190
493 -- Has_Specified_Stream_Output Flag191
494 -- Has_Specified_Stream_Read Flag192
495 -- Has_Specified_Stream_Write Flag193
496 -- Is_Local_Anonymous_Access Flag194
497 -- Is_Primitive_Wrapper Flag195
498 -- Was_Hidden Flag196
499 -- Is_Limited_Interface Flag197
500 -- Has_Pragma_Ordered Flag198
501 -- Is_Ada_2012_Only Flag199
503 -- Has_Delayed_Aspects Flag200
504 -- Has_Pragma_No_Inline Flag201
505 -- Itype_Printed Flag202
506 -- Has_Pragma_Pure Flag203
507 -- Is_Known_Null Flag204
508 -- Low_Bound_Tested Flag205
509 -- Is_Visible_Formal Flag206
510 -- Known_To_Have_Preelab_Init Flag207
511 -- Must_Have_Preelab_Init Flag208
512 -- Is_Return_Object Flag209
513 -- Elaborate_Body_Desirable Flag210
515 -- Has_Static_Discriminants Flag211
516 -- Has_Pragma_Unreferenced_Objects Flag212
517 -- Requires_Overriding Flag213
518 -- Has_RACW Flag214
519 -- Has_Uplevel_Reference Flag215
520 -- Universal_Aliasing Flag216
521 -- Suppress_Value_Tracking_On_Call Flag217
522 -- Is_Primitive Flag218
523 -- Has_Initial_Value Flag219
524 -- Has_Dispatch_Table Flag220
526 -- Has_Pragma_Preelab_Init Flag221
527 -- Used_As_Generic_Actual Flag222
528 -- Is_Descendent_Of_Address Flag223
529 -- Is_Raised Flag224
530 -- Is_Thunk Flag225
531 -- Is_Only_Out_Parameter Flag226
532 -- Referenced_As_Out_Parameter Flag227
533 -- Has_Thunks Flag228
534 -- Can_Use_Internal_Rep Flag229
535 -- Has_Pragma_Inline_Always Flag230
537 -- Renamed_In_Spec Flag231
538 -- Has_Invariants Flag232
539 -- Has_Pragma_Unmodified Flag233
540 -- Is_Dispatch_Table_Entity Flag234
541 -- Is_Trivial_Subprogram Flag235
542 -- Warnings_Off_Used Flag236
543 -- Warnings_Off_Used_Unmodified Flag237
544 -- Warnings_Off_Used_Unreferenced Flag238
545 -- OK_To_Reorder_Components Flag239
546 -- Has_Expanded_Contract Flag240
548 -- Optimize_Alignment_Space Flag241
549 -- Optimize_Alignment_Time Flag242
550 -- Overlays_Constant Flag243
551 -- Is_RACW_Stub_Type Flag244
552 -- Is_Private_Primitive Flag245
553 -- Is_Underlying_Record_View Flag246
554 -- OK_To_Rename Flag247
555 -- Has_Inheritable_Invariants Flag248
556 -- Is_Safe_To_Reevaluate Flag249
557 -- Has_Predicates Flag250
559 -- Has_Implicit_Dereference Flag251
560 -- Is_Processed_Transient Flag252
561 -- Disable_Controlled Flag253
562 -- Is_Implementation_Defined Flag254
563 -- Is_Predicate_Function Flag255
564 -- Is_Predicate_Function_M Flag256
565 -- Is_Invariant_Procedure Flag257
566 -- Has_Dynamic_Predicate_Aspect Flag258
567 -- Has_Static_Predicate_Aspect Flag259
568 -- Has_Loop_Entry_Attributes Flag260
570 -- Has_Delayed_Rep_Aspects Flag261
571 -- May_Inherit_Delayed_Rep_Aspects Flag262
572 -- Has_Visible_Refinement Flag263
573 -- Is_Discriminant_Check_Function Flag264
574 -- SPARK_Pragma_Inherited Flag265
575 -- SPARK_Aux_Pragma_Inherited Flag266
576 -- Has_Shift_Operator Flag267
577 -- Is_Independent Flag268
578 -- Has_Static_Predicate Flag269
579 -- Stores_Attribute_Old_Prefix Flag270
581 -- Has_Protected Flag271
582 -- SSO_Set_Low_By_Default Flag272
583 -- SSO_Set_High_By_Default Flag273
584 -- Is_Generic_Actual_Subprogram Flag274
585 -- No_Predicate_On_Actual Flag275
586 -- No_Dynamic_Predicate_On_Actual Flag276
587 -- Is_Checked_Ghost_Entity Flag277
588 -- Is_Ignored_Ghost_Entity Flag278
589 -- Contains_Ignored_Ghost_Code Flag279
590 -- Partial_View_Has_Unknown_Discr Flag280
592 -- Is_Static_Type Flag281
593 -- Has_Nested_Subprogram Flag282
594 -- Is_Uplevel_Referenced_Entity Flag283
595 -- Is_Unimplemented Flag284
596 -- Is_Volatile_Full_Access Flag285
597 -- Needs_Typedef Flag286
599 -- (unused) Flag287
600 -- (unused) Flag288
601 -- (unused) Flag289
602 -- (unused) Flag300
604 -- (unused) Flag301
605 -- (unused) Flag302
606 -- (unused) Flag303
607 -- (unused) Flag304
608 -- (unused) Flag305
609 -- (unused) Flag306
610 -- (unused) Flag307
611 -- (unused) Flag308
612 -- (unused) Flag309
614 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
616 -----------------------
617 -- Local subprograms --
618 -----------------------
620 function Has_Option
621 (State_Id : Entity_Id;
622 Option_Nam : Name_Id) return Boolean;
623 -- Determine whether abstract state State_Id has particular option denoted
624 -- by the name Option_Nam.
626 ---------------
627 -- Float_Rep --
628 ---------------
630 function Float_Rep (Id : E) return F is
631 pragma Assert (Is_Floating_Point_Type (Id));
632 begin
633 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
634 end Float_Rep;
636 ----------------
637 -- Has_Option --
638 ----------------
640 function Has_Option
641 (State_Id : Entity_Id;
642 Option_Nam : Name_Id) return Boolean
644 Decl : constant Node_Id := Parent (State_Id);
645 Opt : Node_Id;
646 Opt_Nam : Node_Id;
648 begin
649 pragma Assert (Ekind (State_Id) = E_Abstract_State);
651 -- The declaration of abstract states with options appear as an
652 -- extension aggregate. If this is not the case, the option is not
653 -- available.
655 if Nkind (Decl) /= N_Extension_Aggregate then
656 return False;
657 end if;
659 -- Simple options
661 Opt := First (Expressions (Decl));
662 while Present (Opt) loop
664 -- Currently the only simple option allowed is External
666 if Nkind (Opt) = N_Identifier
667 and then Chars (Opt) = Name_External
668 and then Chars (Opt) = Option_Nam
669 then
670 return True;
671 end if;
673 Next (Opt);
674 end loop;
676 -- Complex options with various specifiers
678 Opt := First (Component_Associations (Decl));
679 while Present (Opt) loop
680 Opt_Nam := First (Choices (Opt));
682 if Nkind (Opt_Nam) = N_Identifier
683 and then Chars (Opt_Nam) = Option_Nam
684 then
685 return True;
686 end if;
688 Next (Opt);
689 end loop;
691 return False;
692 end Has_Option;
694 --------------------------------
695 -- Attribute Access Functions --
696 --------------------------------
698 function Abstract_States (Id : E) return L is
699 begin
700 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
701 return Elist25 (Id);
702 end Abstract_States;
704 function Accept_Address (Id : E) return L is
705 begin
706 return Elist21 (Id);
707 end Accept_Address;
709 function Access_Disp_Table (Id : E) return L is
710 begin
711 pragma Assert (Ekind_In (Id, E_Record_Type,
712 E_Record_Subtype));
713 return Elist16 (Implementation_Base_Type (Id));
714 end Access_Disp_Table;
716 function Activation_Record_Component (Id : E) return E is
717 begin
718 pragma Assert (Ekind_In (Id, E_Constant,
719 E_In_Parameter,
720 E_In_Out_Parameter,
721 E_Loop_Parameter,
722 E_Out_Parameter,
723 E_Variable));
724 return Node31 (Id);
725 end Activation_Record_Component;
727 function Actual_Subtype (Id : E) return E is
728 begin
729 pragma Assert
730 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
731 or else Is_Formal (Id));
732 return Node17 (Id);
733 end Actual_Subtype;
735 function Address_Taken (Id : E) return B is
736 begin
737 return Flag104 (Id);
738 end Address_Taken;
740 function Alias (Id : E) return E is
741 begin
742 pragma Assert
743 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
744 return Node18 (Id);
745 end Alias;
747 function Alignment (Id : E) return U is
748 begin
749 pragma Assert (Is_Type (Id)
750 or else Is_Formal (Id)
751 or else Ekind_In (Id, E_Loop_Parameter,
752 E_Constant,
753 E_Exception,
754 E_Variable));
755 return Uint14 (Id);
756 end Alignment;
758 function Anonymous_Master (Id : E) return E is
759 begin
760 pragma Assert (Ekind_In (Id, E_Function,
761 E_Package,
762 E_Package_Body,
763 E_Procedure,
764 E_Subprogram_Body));
765 return Node36 (Id);
766 end Anonymous_Master;
768 function Associated_Entity (Id : E) return E is
769 begin
770 return Node37 (Id);
771 end Associated_Entity;
773 function Associated_Formal_Package (Id : E) return E is
774 begin
775 pragma Assert (Ekind (Id) = E_Package);
776 return Node12 (Id);
777 end Associated_Formal_Package;
779 function Associated_Node_For_Itype (Id : E) return N is
780 begin
781 return Node8 (Id);
782 end Associated_Node_For_Itype;
784 function Associated_Storage_Pool (Id : E) return E is
785 begin
786 pragma Assert (Is_Access_Type (Id));
787 return Node22 (Root_Type (Id));
788 end Associated_Storage_Pool;
790 function Barrier_Function (Id : E) return N is
791 begin
792 pragma Assert (Is_Entry (Id));
793 return Node12 (Id);
794 end Barrier_Function;
796 function Block_Node (Id : E) return N is
797 begin
798 pragma Assert (Ekind (Id) = E_Block);
799 return Node11 (Id);
800 end Block_Node;
802 function Body_Entity (Id : E) return E is
803 begin
804 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
805 return Node19 (Id);
806 end Body_Entity;
808 function Body_Needed_For_SAL (Id : E) return B is
809 begin
810 pragma Assert
811 (Ekind (Id) = E_Package
812 or else Is_Subprogram (Id)
813 or else Is_Generic_Unit (Id));
814 return Flag40 (Id);
815 end Body_Needed_For_SAL;
817 function Body_References (Id : E) return L is
818 begin
819 pragma Assert (Ekind (Id) = E_Abstract_State);
820 return Elist16 (Id);
821 end Body_References;
823 function BIP_Initialization_Call (Id : E) return N is
824 begin
825 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
826 return Node29 (Id);
827 end BIP_Initialization_Call;
829 function C_Pass_By_Copy (Id : E) return B is
830 begin
831 pragma Assert (Is_Record_Type (Id));
832 return Flag125 (Implementation_Base_Type (Id));
833 end C_Pass_By_Copy;
835 function Can_Never_Be_Null (Id : E) return B is
836 begin
837 return Flag38 (Id);
838 end Can_Never_Be_Null;
840 function Checks_May_Be_Suppressed (Id : E) return B is
841 begin
842 return Flag31 (Id);
843 end Checks_May_Be_Suppressed;
845 function Class_Wide_Type (Id : E) return E is
846 begin
847 pragma Assert (Is_Type (Id));
848 return Node9 (Id);
849 end Class_Wide_Type;
851 function Cloned_Subtype (Id : E) return E is
852 begin
853 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
854 return Node16 (Id);
855 end Cloned_Subtype;
857 function Component_Bit_Offset (Id : E) return U is
858 begin
859 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
860 return Uint11 (Id);
861 end Component_Bit_Offset;
863 function Component_Clause (Id : E) return N is
864 begin
865 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
866 return Node13 (Id);
867 end Component_Clause;
869 function Component_Size (Id : E) return U is
870 begin
871 pragma Assert (Is_Array_Type (Id));
872 return Uint22 (Implementation_Base_Type (Id));
873 end Component_Size;
875 function Component_Type (Id : E) return E is
876 begin
877 pragma Assert (Is_Array_Type (Id));
878 return Node20 (Implementation_Base_Type (Id));
879 end Component_Type;
881 function Corresponding_Concurrent_Type (Id : E) return E is
882 begin
883 pragma Assert (Ekind (Id) = E_Record_Type);
884 return Node18 (Id);
885 end Corresponding_Concurrent_Type;
887 function Corresponding_Discriminant (Id : E) return E is
888 begin
889 pragma Assert (Ekind (Id) = E_Discriminant);
890 return Node19 (Id);
891 end Corresponding_Discriminant;
893 function Corresponding_Equality (Id : E) return E is
894 begin
895 pragma Assert
896 (Ekind (Id) = E_Function
897 and then not Comes_From_Source (Id)
898 and then Chars (Id) = Name_Op_Ne);
899 return Node30 (Id);
900 end Corresponding_Equality;
902 function Corresponding_Protected_Entry (Id : E) return E is
903 begin
904 pragma Assert (Ekind (Id) = E_Subprogram_Body);
905 return Node18 (Id);
906 end Corresponding_Protected_Entry;
908 function Corresponding_Record_Type (Id : E) return E is
909 begin
910 pragma Assert (Is_Concurrent_Type (Id));
911 return Node18 (Id);
912 end Corresponding_Record_Type;
914 function Corresponding_Remote_Type (Id : E) return E is
915 begin
916 return Node22 (Id);
917 end Corresponding_Remote_Type;
919 function Current_Use_Clause (Id : E) return E is
920 begin
921 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
922 return Node27 (Id);
923 end Current_Use_Clause;
925 function Current_Value (Id : E) return N is
926 begin
927 pragma Assert (Ekind (Id) in Object_Kind);
928 return Node9 (Id);
929 end Current_Value;
931 function CR_Discriminant (Id : E) return E is
932 begin
933 return Node23 (Id);
934 end CR_Discriminant;
936 function Debug_Info_Off (Id : E) return B is
937 begin
938 return Flag166 (Id);
939 end Debug_Info_Off;
941 function Debug_Renaming_Link (Id : E) return E is
942 begin
943 return Node25 (Id);
944 end Debug_Renaming_Link;
946 function Default_Aspect_Component_Value (Id : E) return N is
947 begin
948 pragma Assert (Is_Array_Type (Id));
949 return Node19 (Base_Type (Id));
950 end Default_Aspect_Component_Value;
952 function Default_Aspect_Value (Id : E) return N is
953 begin
954 pragma Assert (Is_Scalar_Type (Id));
955 return Node19 (Base_Type (Id));
956 end Default_Aspect_Value;
958 function Default_Expr_Function (Id : E) return E is
959 begin
960 pragma Assert (Is_Formal (Id));
961 return Node21 (Id);
962 end Default_Expr_Function;
964 function Default_Expressions_Processed (Id : E) return B is
965 begin
966 return Flag108 (Id);
967 end Default_Expressions_Processed;
969 function Default_Value (Id : E) return N is
970 begin
971 pragma Assert (Is_Formal (Id));
972 return Node20 (Id);
973 end Default_Value;
975 function Delay_Cleanups (Id : E) return B is
976 begin
977 return Flag114 (Id);
978 end Delay_Cleanups;
980 function Delay_Subprogram_Descriptors (Id : E) return B is
981 begin
982 return Flag50 (Id);
983 end Delay_Subprogram_Descriptors;
985 function Delta_Value (Id : E) return R is
986 begin
987 pragma Assert (Is_Fixed_Point_Type (Id));
988 return Ureal18 (Id);
989 end Delta_Value;
991 function Dependent_Instances (Id : E) return L is
992 begin
993 pragma Assert (Is_Generic_Instance (Id));
994 return Elist8 (Id);
995 end Dependent_Instances;
997 function Depends_On_Private (Id : E) return B is
998 begin
999 pragma Assert (Nkind (Id) in N_Entity);
1000 return Flag14 (Id);
1001 end Depends_On_Private;
1003 function Derived_Type_Link (Id : E) return E is
1004 begin
1005 pragma Assert (Is_Type (Id));
1006 return Node31 (Base_Type (Id));
1007 end Derived_Type_Link;
1009 function Digits_Value (Id : E) return U is
1010 begin
1011 pragma Assert
1012 (Is_Floating_Point_Type (Id)
1013 or else Is_Decimal_Fixed_Point_Type (Id));
1014 return Uint17 (Id);
1015 end Digits_Value;
1017 function Direct_Primitive_Operations (Id : E) return L is
1018 begin
1019 pragma Assert (Is_Tagged_Type (Id));
1020 return Elist10 (Id);
1021 end Direct_Primitive_Operations;
1023 function Directly_Designated_Type (Id : E) return E is
1024 begin
1025 pragma Assert (Is_Access_Type (Id));
1026 return Node20 (Id);
1027 end Directly_Designated_Type;
1029 function Disable_Controlled (Id : E) return B is
1030 begin
1031 return Flag253 (Base_Type (Id));
1032 end Disable_Controlled;
1034 function Discard_Names (Id : E) return B is
1035 begin
1036 return Flag88 (Id);
1037 end Discard_Names;
1039 function Discriminal (Id : E) return E is
1040 begin
1041 pragma Assert (Ekind (Id) = E_Discriminant);
1042 return Node17 (Id);
1043 end Discriminal;
1045 function Discriminal_Link (Id : E) return N is
1046 begin
1047 return Node10 (Id);
1048 end Discriminal_Link;
1050 function Discriminant_Checking_Func (Id : E) return E is
1051 begin
1052 pragma Assert (Ekind (Id) = E_Component);
1053 return Node20 (Id);
1054 end Discriminant_Checking_Func;
1056 function Discriminant_Constraint (Id : E) return L is
1057 begin
1058 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1059 return Elist21 (Id);
1060 end Discriminant_Constraint;
1062 function Discriminant_Default_Value (Id : E) return N is
1063 begin
1064 pragma Assert (Ekind (Id) = E_Discriminant);
1065 return Node20 (Id);
1066 end Discriminant_Default_Value;
1068 function Discriminant_Number (Id : E) return U is
1069 begin
1070 pragma Assert (Ekind (Id) = E_Discriminant);
1071 return Uint15 (Id);
1072 end Discriminant_Number;
1074 function Dispatch_Table_Wrappers (Id : E) return L is
1075 begin
1076 pragma Assert (Ekind_In (Id, E_Record_Type,
1077 E_Record_Subtype));
1078 return Elist26 (Implementation_Base_Type (Id));
1079 end Dispatch_Table_Wrappers;
1081 function DT_Entry_Count (Id : E) return U is
1082 begin
1083 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1084 return Uint15 (Id);
1085 end DT_Entry_Count;
1087 function DT_Offset_To_Top_Func (Id : E) return E is
1088 begin
1089 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1090 return Node25 (Id);
1091 end DT_Offset_To_Top_Func;
1093 function DT_Position (Id : E) return U is
1094 begin
1095 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1096 and then Present (DTC_Entity (Id)));
1097 return Uint15 (Id);
1098 end DT_Position;
1100 function DTC_Entity (Id : E) return E is
1101 begin
1102 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1103 return Node16 (Id);
1104 end DTC_Entity;
1106 function Elaborate_Body_Desirable (Id : E) return B is
1107 begin
1108 pragma Assert (Ekind (Id) = E_Package);
1109 return Flag210 (Id);
1110 end Elaborate_Body_Desirable;
1112 function Elaboration_Entity (Id : E) return E is
1113 begin
1114 pragma Assert
1115 (Is_Subprogram (Id)
1116 or else
1117 Ekind (Id) = E_Package
1118 or else
1119 Is_Generic_Unit (Id));
1120 return Node13 (Id);
1121 end Elaboration_Entity;
1123 function Elaboration_Entity_Required (Id : E) return B is
1124 begin
1125 pragma Assert
1126 (Is_Subprogram (Id)
1127 or else
1128 Ekind (Id) = E_Package
1129 or else
1130 Is_Generic_Unit (Id));
1131 return Flag174 (Id);
1132 end Elaboration_Entity_Required;
1134 function Encapsulating_State (Id : E) return N is
1135 begin
1136 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1137 return Node32 (Id);
1138 end Encapsulating_State;
1140 function Enclosing_Scope (Id : E) return E is
1141 begin
1142 return Node18 (Id);
1143 end Enclosing_Scope;
1145 function Entry_Accepted (Id : E) return B is
1146 begin
1147 pragma Assert (Is_Entry (Id));
1148 return Flag152 (Id);
1149 end Entry_Accepted;
1151 function Entry_Bodies_Array (Id : E) return E is
1152 begin
1153 return Node19 (Id);
1154 end Entry_Bodies_Array;
1156 function Entry_Cancel_Parameter (Id : E) return E is
1157 begin
1158 return Node23 (Id);
1159 end Entry_Cancel_Parameter;
1161 function Entry_Component (Id : E) return E is
1162 begin
1163 return Node11 (Id);
1164 end Entry_Component;
1166 function Entry_Formal (Id : E) return E is
1167 begin
1168 return Node16 (Id);
1169 end Entry_Formal;
1171 function Entry_Index_Constant (Id : E) return N is
1172 begin
1173 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1174 return Node18 (Id);
1175 end Entry_Index_Constant;
1177 function Contains_Ignored_Ghost_Code (Id : E) return B is
1178 begin
1179 pragma Assert
1180 (Ekind_In (Id, E_Block,
1181 E_Function,
1182 E_Generic_Function,
1183 E_Generic_Package,
1184 E_Generic_Procedure,
1185 E_Package,
1186 E_Package_Body,
1187 E_Procedure,
1188 E_Subprogram_Body));
1189 return Flag279 (Id);
1190 end Contains_Ignored_Ghost_Code;
1192 function Contract (Id : E) return N is
1193 begin
1194 pragma Assert
1195 (Ekind_In (Id, E_Constant,
1196 E_Entry,
1197 E_Entry_Family,
1198 E_Generic_Package,
1199 E_Package,
1200 E_Package_Body,
1201 E_Subprogram_Body,
1202 E_Variable,
1203 E_Void)
1204 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1205 return Node34 (Id);
1206 end Contract;
1208 function Entry_Parameters_Type (Id : E) return E is
1209 begin
1210 return Node15 (Id);
1211 end Entry_Parameters_Type;
1213 function Enum_Pos_To_Rep (Id : E) return E is
1214 begin
1215 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1216 return Node23 (Id);
1217 end Enum_Pos_To_Rep;
1219 function Enumeration_Pos (Id : E) return Uint is
1220 begin
1221 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1222 return Uint11 (Id);
1223 end Enumeration_Pos;
1225 function Enumeration_Rep (Id : E) return U is
1226 begin
1227 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1228 return Uint12 (Id);
1229 end Enumeration_Rep;
1231 function Enumeration_Rep_Expr (Id : E) return N is
1232 begin
1233 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1234 return Node22 (Id);
1235 end Enumeration_Rep_Expr;
1237 function Equivalent_Type (Id : E) return E is
1238 begin
1239 pragma Assert
1240 (Ekind_In (Id, E_Class_Wide_Type,
1241 E_Class_Wide_Subtype,
1242 E_Access_Subprogram_Type,
1243 E_Access_Protected_Subprogram_Type,
1244 E_Anonymous_Access_Protected_Subprogram_Type,
1245 E_Access_Subprogram_Type,
1246 E_Exception_Type));
1247 return Node18 (Id);
1248 end Equivalent_Type;
1250 function Esize (Id : E) return Uint is
1251 begin
1252 return Uint12 (Id);
1253 end Esize;
1255 function Extra_Accessibility (Id : E) return E is
1256 begin
1257 pragma Assert
1258 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1259 return Node13 (Id);
1260 end Extra_Accessibility;
1262 function Extra_Accessibility_Of_Result (Id : E) return E is
1263 begin
1264 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1265 return Node19 (Id);
1266 end Extra_Accessibility_Of_Result;
1268 function Extra_Constrained (Id : E) return E is
1269 begin
1270 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1271 return Node23 (Id);
1272 end Extra_Constrained;
1274 function Extra_Formal (Id : E) return E is
1275 begin
1276 return Node15 (Id);
1277 end Extra_Formal;
1279 function Extra_Formals (Id : E) return E is
1280 begin
1281 pragma Assert
1282 (Is_Overloadable (Id)
1283 or else Ekind_In (Id, E_Entry_Family,
1284 E_Subprogram_Body,
1285 E_Subprogram_Type));
1286 return Node28 (Id);
1287 end Extra_Formals;
1289 function Can_Use_Internal_Rep (Id : E) return B is
1290 begin
1291 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1292 return Flag229 (Base_Type (Id));
1293 end Can_Use_Internal_Rep;
1295 function Finalization_Master (Id : E) return E is
1296 begin
1297 pragma Assert (Is_Access_Type (Id));
1298 return Node23 (Root_Type (Id));
1299 end Finalization_Master;
1301 function Finalize_Storage_Only (Id : E) return B is
1302 begin
1303 pragma Assert (Is_Type (Id));
1304 return Flag158 (Base_Type (Id));
1305 end Finalize_Storage_Only;
1307 function Finalizer (Id : E) return E is
1308 begin
1309 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1310 return Node28 (Id);
1311 end Finalizer;
1313 function First_Entity (Id : E) return E is
1314 begin
1315 return Node17 (Id);
1316 end First_Entity;
1318 function First_Exit_Statement (Id : E) return N is
1319 begin
1320 pragma Assert (Ekind (Id) = E_Loop);
1321 return Node8 (Id);
1322 end First_Exit_Statement;
1324 function First_Index (Id : E) return N is
1325 begin
1326 pragma Assert (Is_Array_Type (Id));
1327 return Node17 (Id);
1328 end First_Index;
1330 function First_Literal (Id : E) return E is
1331 begin
1332 pragma Assert (Is_Enumeration_Type (Id));
1333 return Node17 (Id);
1334 end First_Literal;
1336 function First_Private_Entity (Id : E) return E is
1337 begin
1338 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1339 or else Ekind (Id) in Concurrent_Kind);
1340 return Node16 (Id);
1341 end First_Private_Entity;
1343 function First_Rep_Item (Id : E) return E is
1344 begin
1345 return Node6 (Id);
1346 end First_Rep_Item;
1348 function Freeze_Node (Id : E) return N is
1349 begin
1350 return Node7 (Id);
1351 end Freeze_Node;
1353 function From_Limited_With (Id : E) return B is
1354 begin
1355 return Flag159 (Id);
1356 end From_Limited_With;
1358 function Full_View (Id : E) return E is
1359 begin
1360 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1361 return Node11 (Id);
1362 end Full_View;
1364 function Generic_Homonym (Id : E) return E is
1365 begin
1366 pragma Assert (Ekind (Id) = E_Generic_Package);
1367 return Node11 (Id);
1368 end Generic_Homonym;
1370 function Generic_Renamings (Id : E) return L is
1371 begin
1372 return Elist23 (Id);
1373 end Generic_Renamings;
1375 function Handler_Records (Id : E) return S is
1376 begin
1377 return List10 (Id);
1378 end Handler_Records;
1380 function Has_Aliased_Components (Id : E) return B is
1381 begin
1382 return Flag135 (Implementation_Base_Type (Id));
1383 end Has_Aliased_Components;
1385 function Has_Alignment_Clause (Id : E) return B is
1386 begin
1387 return Flag46 (Id);
1388 end Has_Alignment_Clause;
1390 function Has_All_Calls_Remote (Id : E) return B is
1391 begin
1392 return Flag79 (Id);
1393 end Has_All_Calls_Remote;
1395 function Has_Atomic_Components (Id : E) return B is
1396 begin
1397 return Flag86 (Implementation_Base_Type (Id));
1398 end Has_Atomic_Components;
1400 function Has_Biased_Representation (Id : E) return B is
1401 begin
1402 return Flag139 (Id);
1403 end Has_Biased_Representation;
1405 function Has_Completion (Id : E) return B is
1406 begin
1407 return Flag26 (Id);
1408 end Has_Completion;
1410 function Has_Completion_In_Body (Id : E) return B is
1411 begin
1412 pragma Assert (Is_Type (Id));
1413 return Flag71 (Id);
1414 end Has_Completion_In_Body;
1416 function Has_Complex_Representation (Id : E) return B is
1417 begin
1418 pragma Assert (Is_Type (Id));
1419 return Flag140 (Implementation_Base_Type (Id));
1420 end Has_Complex_Representation;
1422 function Has_Component_Size_Clause (Id : E) return B is
1423 begin
1424 pragma Assert (Is_Array_Type (Id));
1425 return Flag68 (Implementation_Base_Type (Id));
1426 end Has_Component_Size_Clause;
1428 function Has_Constrained_Partial_View (Id : E) return B is
1429 begin
1430 pragma Assert (Is_Type (Id));
1431 return Flag187 (Id);
1432 end Has_Constrained_Partial_View;
1434 function Has_Controlled_Component (Id : E) return B is
1435 begin
1436 return Flag43 (Base_Type (Id));
1437 end Has_Controlled_Component;
1439 function Has_Contiguous_Rep (Id : E) return B is
1440 begin
1441 return Flag181 (Id);
1442 end Has_Contiguous_Rep;
1444 function Has_Controlling_Result (Id : E) return B is
1445 begin
1446 return Flag98 (Id);
1447 end Has_Controlling_Result;
1449 function Has_Convention_Pragma (Id : E) return B is
1450 begin
1451 return Flag119 (Id);
1452 end Has_Convention_Pragma;
1454 function Has_Default_Aspect (Id : E) return B is
1455 begin
1456 return Flag39 (Base_Type (Id));
1457 end Has_Default_Aspect;
1459 function Has_Default_Init_Cond (Id : E) return B is
1460 begin
1461 pragma Assert (Is_Type (Id));
1462 return Flag3 (Base_Type (Id));
1463 end Has_Default_Init_Cond;
1465 function Has_Delayed_Aspects (Id : E) return B is
1466 begin
1467 pragma Assert (Nkind (Id) in N_Entity);
1468 return Flag200 (Id);
1469 end Has_Delayed_Aspects;
1471 function Has_Delayed_Freeze (Id : E) return B is
1472 begin
1473 pragma Assert (Nkind (Id) in N_Entity);
1474 return Flag18 (Id);
1475 end Has_Delayed_Freeze;
1477 function Has_Delayed_Rep_Aspects (Id : E) return B is
1478 begin
1479 pragma Assert (Nkind (Id) in N_Entity);
1480 return Flag261 (Id);
1481 end Has_Delayed_Rep_Aspects;
1483 function Has_Discriminants (Id : E) return B is
1484 begin
1485 pragma Assert (Nkind (Id) in N_Entity);
1486 return Flag5 (Id);
1487 end Has_Discriminants;
1489 function Has_Dispatch_Table (Id : E) return B is
1490 begin
1491 pragma Assert (Is_Tagged_Type (Id));
1492 return Flag220 (Id);
1493 end Has_Dispatch_Table;
1495 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1496 begin
1497 pragma Assert (Is_Type (Id));
1498 return Flag258 (Id);
1499 end Has_Dynamic_Predicate_Aspect;
1501 function Has_Enumeration_Rep_Clause (Id : E) return B is
1502 begin
1503 pragma Assert (Is_Enumeration_Type (Id));
1504 return Flag66 (Id);
1505 end Has_Enumeration_Rep_Clause;
1507 function Has_Exit (Id : E) return B is
1508 begin
1509 return Flag47 (Id);
1510 end Has_Exit;
1512 function Has_Expanded_Contract (Id : E) return B is
1513 begin
1514 pragma Assert (Is_Subprogram (Id));
1515 return Flag240 (Id);
1516 end Has_Expanded_Contract;
1518 function Has_Forward_Instantiation (Id : E) return B is
1519 begin
1520 return Flag175 (Id);
1521 end Has_Forward_Instantiation;
1523 function Has_Fully_Qualified_Name (Id : E) return B is
1524 begin
1525 return Flag173 (Id);
1526 end Has_Fully_Qualified_Name;
1528 function Has_Gigi_Rep_Item (Id : E) return B is
1529 begin
1530 return Flag82 (Id);
1531 end Has_Gigi_Rep_Item;
1533 function Has_Homonym (Id : E) return B is
1534 begin
1535 return Flag56 (Id);
1536 end Has_Homonym;
1538 function Has_Implicit_Dereference (Id : E) return B is
1539 begin
1540 return Flag251 (Id);
1541 end Has_Implicit_Dereference;
1543 function Has_Independent_Components (Id : E) return B is
1544 begin
1545 return Flag34 (Implementation_Base_Type (Id));
1546 end Has_Independent_Components;
1548 function Has_Inheritable_Invariants (Id : E) return B is
1549 begin
1550 pragma Assert (Is_Type (Id));
1551 return Flag248 (Id);
1552 end Has_Inheritable_Invariants;
1554 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1555 begin
1556 pragma Assert (Is_Type (Id));
1557 return Flag133 (Base_Type (Id));
1558 end Has_Inherited_Default_Init_Cond;
1560 function Has_Initial_Value (Id : E) return B is
1561 begin
1562 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1563 return Flag219 (Id);
1564 end Has_Initial_Value;
1566 function Has_Invariants (Id : E) return B is
1567 begin
1568 pragma Assert (Is_Type (Id));
1569 return Flag232 (Id);
1570 end Has_Invariants;
1572 function Has_Loop_Entry_Attributes (Id : E) return B is
1573 begin
1574 pragma Assert (Ekind (Id) = E_Loop);
1575 return Flag260 (Id);
1576 end Has_Loop_Entry_Attributes;
1578 function Has_Machine_Radix_Clause (Id : E) return B is
1579 begin
1580 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1581 return Flag83 (Id);
1582 end Has_Machine_Radix_Clause;
1584 function Has_Master_Entity (Id : E) return B is
1585 begin
1586 return Flag21 (Id);
1587 end Has_Master_Entity;
1589 function Has_Missing_Return (Id : E) return B is
1590 begin
1591 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1592 return Flag142 (Id);
1593 end Has_Missing_Return;
1595 function Has_Nested_Block_With_Handler (Id : E) return B is
1596 begin
1597 return Flag101 (Id);
1598 end Has_Nested_Block_With_Handler;
1600 function Has_Nested_Subprogram (Id : E) return B is
1601 begin
1602 pragma Assert (Is_Subprogram (Id));
1603 return Flag282 (Id);
1604 end Has_Nested_Subprogram;
1606 function Has_Non_Standard_Rep (Id : E) return B is
1607 begin
1608 return Flag75 (Implementation_Base_Type (Id));
1609 end Has_Non_Standard_Rep;
1611 function Has_Object_Size_Clause (Id : E) return B is
1612 begin
1613 pragma Assert (Is_Type (Id));
1614 return Flag172 (Id);
1615 end Has_Object_Size_Clause;
1617 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1618 begin
1619 pragma Assert
1620 (Ekind_In (Id, E_Entry, E_Entry_Family)
1621 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1622 return Flag110 (Id);
1623 end Has_Out_Or_In_Out_Parameter;
1625 function Has_Per_Object_Constraint (Id : E) return B is
1626 begin
1627 return Flag154 (Id);
1628 end Has_Per_Object_Constraint;
1630 function Has_Pragma_Controlled (Id : E) return B is
1631 begin
1632 pragma Assert (Is_Access_Type (Id));
1633 return Flag27 (Implementation_Base_Type (Id));
1634 end Has_Pragma_Controlled;
1636 function Has_Pragma_Elaborate_Body (Id : E) return B is
1637 begin
1638 return Flag150 (Id);
1639 end Has_Pragma_Elaborate_Body;
1641 function Has_Pragma_Inline (Id : E) return B is
1642 begin
1643 return Flag157 (Id);
1644 end Has_Pragma_Inline;
1646 function Has_Pragma_Inline_Always (Id : E) return B is
1647 begin
1648 return Flag230 (Id);
1649 end Has_Pragma_Inline_Always;
1651 function Has_Pragma_No_Inline (Id : E) return B is
1652 begin
1653 return Flag201 (Id);
1654 end Has_Pragma_No_Inline;
1656 function Has_Pragma_Ordered (Id : E) return B is
1657 begin
1658 pragma Assert (Is_Enumeration_Type (Id));
1659 return Flag198 (Implementation_Base_Type (Id));
1660 end Has_Pragma_Ordered;
1662 function Has_Pragma_Pack (Id : E) return B is
1663 begin
1664 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1665 return Flag121 (Implementation_Base_Type (Id));
1666 end Has_Pragma_Pack;
1668 function Has_Pragma_Preelab_Init (Id : E) return B is
1669 begin
1670 return Flag221 (Id);
1671 end Has_Pragma_Preelab_Init;
1673 function Has_Pragma_Pure (Id : E) return B is
1674 begin
1675 return Flag203 (Id);
1676 end Has_Pragma_Pure;
1678 function Has_Pragma_Pure_Function (Id : E) return B is
1679 begin
1680 return Flag179 (Id);
1681 end Has_Pragma_Pure_Function;
1683 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1684 begin
1685 return Flag169 (Id);
1686 end Has_Pragma_Thread_Local_Storage;
1688 function Has_Pragma_Unmodified (Id : E) return B is
1689 begin
1690 return Flag233 (Id);
1691 end Has_Pragma_Unmodified;
1693 function Has_Pragma_Unreferenced (Id : E) return B is
1694 begin
1695 return Flag180 (Id);
1696 end Has_Pragma_Unreferenced;
1698 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1699 begin
1700 pragma Assert (Is_Type (Id));
1701 return Flag212 (Id);
1702 end Has_Pragma_Unreferenced_Objects;
1704 function Has_Predicates (Id : E) return B is
1705 begin
1706 pragma Assert (Is_Type (Id));
1707 return Flag250 (Id);
1708 end Has_Predicates;
1710 function Has_Primitive_Operations (Id : E) return B is
1711 begin
1712 pragma Assert (Is_Type (Id));
1713 return Flag120 (Base_Type (Id));
1714 end Has_Primitive_Operations;
1716 function Has_Private_Ancestor (Id : E) return B is
1717 begin
1718 return Flag151 (Id);
1719 end Has_Private_Ancestor;
1721 function Has_Private_Declaration (Id : E) return B is
1722 begin
1723 return Flag155 (Id);
1724 end Has_Private_Declaration;
1726 function Has_Protected (Id : E) return B is
1727 begin
1728 return Flag271 (Base_Type (Id));
1729 end Has_Protected;
1731 function Has_Qualified_Name (Id : E) return B is
1732 begin
1733 return Flag161 (Id);
1734 end Has_Qualified_Name;
1736 function Has_RACW (Id : E) return B is
1737 begin
1738 pragma Assert (Ekind (Id) = E_Package);
1739 return Flag214 (Id);
1740 end Has_RACW;
1742 function Has_Record_Rep_Clause (Id : E) return B is
1743 begin
1744 pragma Assert (Is_Record_Type (Id));
1745 return Flag65 (Implementation_Base_Type (Id));
1746 end Has_Record_Rep_Clause;
1748 function Has_Recursive_Call (Id : E) return B is
1749 begin
1750 pragma Assert (Is_Subprogram (Id));
1751 return Flag143 (Id);
1752 end Has_Recursive_Call;
1754 function Has_Shift_Operator (Id : E) return B is
1755 begin
1756 pragma Assert (Is_Integer_Type (Id));
1757 return Flag267 (Base_Type (Id));
1758 end Has_Shift_Operator;
1760 function Has_Size_Clause (Id : E) return B is
1761 begin
1762 return Flag29 (Id);
1763 end Has_Size_Clause;
1765 function Has_Small_Clause (Id : E) return B is
1766 begin
1767 return Flag67 (Id);
1768 end Has_Small_Clause;
1770 function Has_Specified_Layout (Id : E) return B is
1771 begin
1772 pragma Assert (Is_Type (Id));
1773 return Flag100 (Implementation_Base_Type (Id));
1774 end Has_Specified_Layout;
1776 function Has_Specified_Stream_Input (Id : E) return B is
1777 begin
1778 pragma Assert (Is_Type (Id));
1779 return Flag190 (Id);
1780 end Has_Specified_Stream_Input;
1782 function Has_Specified_Stream_Output (Id : E) return B is
1783 begin
1784 pragma Assert (Is_Type (Id));
1785 return Flag191 (Id);
1786 end Has_Specified_Stream_Output;
1788 function Has_Specified_Stream_Read (Id : E) return B is
1789 begin
1790 pragma Assert (Is_Type (Id));
1791 return Flag192 (Id);
1792 end Has_Specified_Stream_Read;
1794 function Has_Specified_Stream_Write (Id : E) return B is
1795 begin
1796 pragma Assert (Is_Type (Id));
1797 return Flag193 (Id);
1798 end Has_Specified_Stream_Write;
1800 function Has_Static_Discriminants (Id : E) return B is
1801 begin
1802 pragma Assert (Is_Type (Id));
1803 return Flag211 (Id);
1804 end Has_Static_Discriminants;
1806 function Has_Static_Predicate (Id : E) return B is
1807 begin
1808 pragma Assert (Is_Type (Id));
1809 return Flag269 (Id);
1810 end Has_Static_Predicate;
1812 function Has_Static_Predicate_Aspect (Id : E) return B is
1813 begin
1814 pragma Assert (Is_Type (Id));
1815 return Flag259 (Id);
1816 end Has_Static_Predicate_Aspect;
1818 function Has_Storage_Size_Clause (Id : E) return B is
1819 begin
1820 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1821 return Flag23 (Implementation_Base_Type (Id));
1822 end Has_Storage_Size_Clause;
1824 function Has_Stream_Size_Clause (Id : E) return B is
1825 begin
1826 return Flag184 (Id);
1827 end Has_Stream_Size_Clause;
1829 function Has_Task (Id : E) return B is
1830 begin
1831 return Flag30 (Base_Type (Id));
1832 end Has_Task;
1834 function Has_Thunks (Id : E) return B is
1835 begin
1836 return Flag228 (Id);
1837 end Has_Thunks;
1839 function Has_Unchecked_Union (Id : E) return B is
1840 begin
1841 return Flag123 (Base_Type (Id));
1842 end Has_Unchecked_Union;
1844 function Has_Unknown_Discriminants (Id : E) return B is
1845 begin
1846 pragma Assert (Is_Type (Id));
1847 return Flag72 (Id);
1848 end Has_Unknown_Discriminants;
1850 function Has_Uplevel_Reference (Id : E) return B is
1851 begin
1852 return Flag215 (Id);
1853 end Has_Uplevel_Reference;
1855 function Has_Visible_Refinement (Id : E) return B is
1856 begin
1857 pragma Assert (Ekind (Id) = E_Abstract_State);
1858 return Flag263 (Id);
1859 end Has_Visible_Refinement;
1861 function Has_Volatile_Components (Id : E) return B is
1862 begin
1863 return Flag87 (Implementation_Base_Type (Id));
1864 end Has_Volatile_Components;
1866 function Has_Xref_Entry (Id : E) return B is
1867 begin
1868 return Flag182 (Id);
1869 end Has_Xref_Entry;
1871 function Hiding_Loop_Variable (Id : E) return E is
1872 begin
1873 pragma Assert (Ekind (Id) = E_Variable);
1874 return Node8 (Id);
1875 end Hiding_Loop_Variable;
1877 function Homonym (Id : E) return E is
1878 begin
1879 return Node4 (Id);
1880 end Homonym;
1882 function Import_Pragma (Id : E) return E is
1883 begin
1884 pragma Assert (Is_Subprogram (Id));
1885 return Node35 (Id);
1886 end Import_Pragma;
1888 function Incomplete_Actuals (Id : E) return L is
1889 begin
1890 pragma Assert (Ekind (Id) = E_Package);
1891 return Elist24 (Id);
1892 end Incomplete_Actuals;
1894 function Interface_Alias (Id : E) return E is
1895 begin
1896 pragma Assert (Is_Subprogram (Id));
1897 return Node25 (Id);
1898 end Interface_Alias;
1900 function Interfaces (Id : E) return L is
1901 begin
1902 pragma Assert (Is_Record_Type (Id));
1903 return Elist25 (Id);
1904 end Interfaces;
1906 function In_Package_Body (Id : E) return B is
1907 begin
1908 return Flag48 (Id);
1909 end In_Package_Body;
1911 function In_Private_Part (Id : E) return B is
1912 begin
1913 return Flag45 (Id);
1914 end In_Private_Part;
1916 function In_Use (Id : E) return B is
1917 begin
1918 pragma Assert (Nkind (Id) in N_Entity);
1919 return Flag8 (Id);
1920 end In_Use;
1922 function Initialization_Statements (Id : E) return N is
1923 begin
1924 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1925 return Node28 (Id);
1926 end Initialization_Statements;
1928 function Inner_Instances (Id : E) return L is
1929 begin
1930 return Elist23 (Id);
1931 end Inner_Instances;
1933 function Interface_Name (Id : E) return N is
1934 begin
1935 return Node21 (Id);
1936 end Interface_Name;
1938 function Is_Abstract_Subprogram (Id : E) return B is
1939 begin
1940 pragma Assert (Is_Overloadable (Id));
1941 return Flag19 (Id);
1942 end Is_Abstract_Subprogram;
1944 function Is_Abstract_Type (Id : E) return B is
1945 begin
1946 pragma Assert (Is_Type (Id));
1947 return Flag146 (Id);
1948 end Is_Abstract_Type;
1950 function Is_Local_Anonymous_Access (Id : E) return B is
1951 begin
1952 pragma Assert (Is_Access_Type (Id));
1953 return Flag194 (Id);
1954 end Is_Local_Anonymous_Access;
1956 function Is_Access_Constant (Id : E) return B is
1957 begin
1958 pragma Assert (Is_Access_Type (Id));
1959 return Flag69 (Id);
1960 end Is_Access_Constant;
1962 function Is_Ada_2005_Only (Id : E) return B is
1963 begin
1964 return Flag185 (Id);
1965 end Is_Ada_2005_Only;
1967 function Is_Ada_2012_Only (Id : E) return B is
1968 begin
1969 return Flag199 (Id);
1970 end Is_Ada_2012_Only;
1972 function Is_Aliased (Id : E) return B is
1973 begin
1974 pragma Assert (Nkind (Id) in N_Entity);
1975 return Flag15 (Id);
1976 end Is_Aliased;
1978 function Is_Asynchronous (Id : E) return B is
1979 begin
1980 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1981 return Flag81 (Id);
1982 end Is_Asynchronous;
1984 function Is_Atomic (Id : E) return B is
1985 begin
1986 return Flag85 (Id);
1987 end Is_Atomic;
1989 function Is_Bit_Packed_Array (Id : E) return B is
1990 begin
1991 return Flag122 (Implementation_Base_Type (Id));
1992 end Is_Bit_Packed_Array;
1994 function Is_Called (Id : E) return B is
1995 begin
1996 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1997 return Flag102 (Id);
1998 end Is_Called;
2000 function Is_Character_Type (Id : E) return B is
2001 begin
2002 return Flag63 (Id);
2003 end Is_Character_Type;
2005 function Is_Checked_Ghost_Entity (Id : E) return B is
2006 begin
2007 pragma Assert (Nkind (Id) in N_Entity);
2008 return Flag277 (Id);
2009 end Is_Checked_Ghost_Entity;
2011 function Is_Child_Unit (Id : E) return B is
2012 begin
2013 return Flag73 (Id);
2014 end Is_Child_Unit;
2016 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2017 begin
2018 return Flag35 (Id);
2019 end Is_Class_Wide_Equivalent_Type;
2021 function Is_Compilation_Unit (Id : E) return B is
2022 begin
2023 return Flag149 (Id);
2024 end Is_Compilation_Unit;
2026 function Is_Completely_Hidden (Id : E) return B is
2027 begin
2028 pragma Assert (Ekind (Id) = E_Discriminant);
2029 return Flag103 (Id);
2030 end Is_Completely_Hidden;
2032 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2033 begin
2034 return Flag80 (Id);
2035 end Is_Constr_Subt_For_U_Nominal;
2037 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2038 begin
2039 return Flag141 (Id);
2040 end Is_Constr_Subt_For_UN_Aliased;
2042 function Is_Constrained (Id : E) return B is
2043 begin
2044 pragma Assert (Nkind (Id) in N_Entity);
2045 return Flag12 (Id);
2046 end Is_Constrained;
2048 function Is_Constructor (Id : E) return B is
2049 begin
2050 return Flag76 (Id);
2051 end Is_Constructor;
2053 function Is_Controlled (Id : E) return B is
2054 begin
2055 return Flag42 (Base_Type (Id));
2056 end Is_Controlled;
2058 function Is_Controlling_Formal (Id : E) return B is
2059 begin
2060 pragma Assert (Is_Formal (Id));
2061 return Flag97 (Id);
2062 end Is_Controlling_Formal;
2064 function Is_CPP_Class (Id : E) return B is
2065 begin
2066 return Flag74 (Id);
2067 end Is_CPP_Class;
2069 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2070 begin
2071 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2072 return Flag132 (Id);
2073 end Is_Default_Init_Cond_Procedure;
2075 function Is_Descendent_Of_Address (Id : E) return B is
2076 begin
2077 return Flag223 (Id);
2078 end Is_Descendent_Of_Address;
2080 function Is_Discrim_SO_Function (Id : E) return B is
2081 begin
2082 return Flag176 (Id);
2083 end Is_Discrim_SO_Function;
2085 function Is_Discriminant_Check_Function (Id : E) return B is
2086 begin
2087 return Flag264 (Id);
2088 end Is_Discriminant_Check_Function;
2090 function Is_Dispatch_Table_Entity (Id : E) return B is
2091 begin
2092 return Flag234 (Id);
2093 end Is_Dispatch_Table_Entity;
2095 function Is_Dispatching_Operation (Id : E) return B is
2096 begin
2097 pragma Assert (Nkind (Id) in N_Entity);
2098 return Flag6 (Id);
2099 end Is_Dispatching_Operation;
2101 function Is_Eliminated (Id : E) return B is
2102 begin
2103 return Flag124 (Id);
2104 end Is_Eliminated;
2106 function Is_Entry_Formal (Id : E) return B is
2107 begin
2108 return Flag52 (Id);
2109 end Is_Entry_Formal;
2111 function Is_Exported (Id : E) return B is
2112 begin
2113 return Flag99 (Id);
2114 end Is_Exported;
2116 function Is_First_Subtype (Id : E) return B is
2117 begin
2118 return Flag70 (Id);
2119 end Is_First_Subtype;
2121 function Is_For_Access_Subtype (Id : E) return B is
2122 begin
2123 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2124 return Flag118 (Id);
2125 end Is_For_Access_Subtype;
2127 function Is_Formal_Subprogram (Id : E) return B is
2128 begin
2129 return Flag111 (Id);
2130 end Is_Formal_Subprogram;
2132 function Is_Frozen (Id : E) return B is
2133 begin
2134 return Flag4 (Id);
2135 end Is_Frozen;
2137 function Is_Generic_Actual_Subprogram (Id : E) return B is
2138 begin
2139 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2140 return Flag274 (Id);
2141 end Is_Generic_Actual_Subprogram;
2143 function Is_Generic_Actual_Type (Id : E) return B is
2144 begin
2145 pragma Assert (Is_Type (Id));
2146 return Flag94 (Id);
2147 end Is_Generic_Actual_Type;
2149 function Is_Generic_Instance (Id : E) return B is
2150 begin
2151 return Flag130 (Id);
2152 end Is_Generic_Instance;
2154 function Is_Generic_Type (Id : E) return B is
2155 begin
2156 pragma Assert (Nkind (Id) in N_Entity);
2157 return Flag13 (Id);
2158 end Is_Generic_Type;
2160 function Is_Hidden (Id : E) return B is
2161 begin
2162 return Flag57 (Id);
2163 end Is_Hidden;
2165 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2166 begin
2167 return Flag2 (Id);
2168 end Is_Hidden_Non_Overridden_Subpgm;
2170 function Is_Hidden_Open_Scope (Id : E) return B is
2171 begin
2172 return Flag171 (Id);
2173 end Is_Hidden_Open_Scope;
2175 function Is_Ignored_Ghost_Entity (Id : E) return B is
2176 begin
2177 pragma Assert (Nkind (Id) in N_Entity);
2178 return Flag278 (Id);
2179 end Is_Ignored_Ghost_Entity;
2181 function Is_Immediately_Visible (Id : E) return B is
2182 begin
2183 pragma Assert (Nkind (Id) in N_Entity);
2184 return Flag7 (Id);
2185 end Is_Immediately_Visible;
2187 function Is_Implementation_Defined (Id : E) return B is
2188 begin
2189 return Flag254 (Id);
2190 end Is_Implementation_Defined;
2192 function Is_Imported (Id : E) return B is
2193 begin
2194 return Flag24 (Id);
2195 end Is_Imported;
2197 function Is_Independent (Id : E) return B is
2198 begin
2199 return Flag268 (Id);
2200 end Is_Independent;
2202 function Is_Inlined (Id : E) return B is
2203 begin
2204 return Flag11 (Id);
2205 end Is_Inlined;
2207 function Is_Inlined_Always (Id : E) return B is
2208 begin
2209 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2210 return Flag1 (Id);
2211 end Is_Inlined_Always;
2213 function Is_Interface (Id : E) return B is
2214 begin
2215 return Flag186 (Id);
2216 end Is_Interface;
2218 function Is_Instantiated (Id : E) return B is
2219 begin
2220 return Flag126 (Id);
2221 end Is_Instantiated;
2223 function Is_Internal (Id : E) return B is
2224 begin
2225 pragma Assert (Nkind (Id) in N_Entity);
2226 return Flag17 (Id);
2227 end Is_Internal;
2229 function Is_Interrupt_Handler (Id : E) return B is
2230 begin
2231 pragma Assert (Nkind (Id) in N_Entity);
2232 return Flag89 (Id);
2233 end Is_Interrupt_Handler;
2235 function Is_Intrinsic_Subprogram (Id : E) return B is
2236 begin
2237 return Flag64 (Id);
2238 end Is_Intrinsic_Subprogram;
2240 function Is_Invariant_Procedure (Id : E) return B is
2241 begin
2242 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2243 return Flag257 (Id);
2244 end Is_Invariant_Procedure;
2246 function Is_Itype (Id : E) return B is
2247 begin
2248 return Flag91 (Id);
2249 end Is_Itype;
2251 function Is_Known_Non_Null (Id : E) return B is
2252 begin
2253 return Flag37 (Id);
2254 end Is_Known_Non_Null;
2256 function Is_Known_Null (Id : E) return B is
2257 begin
2258 return Flag204 (Id);
2259 end Is_Known_Null;
2261 function Is_Known_Valid (Id : E) return B is
2262 begin
2263 return Flag170 (Id);
2264 end Is_Known_Valid;
2266 function Is_Limited_Composite (Id : E) return B is
2267 begin
2268 return Flag106 (Id);
2269 end Is_Limited_Composite;
2271 function Is_Limited_Interface (Id : E) return B is
2272 begin
2273 return Flag197 (Id);
2274 end Is_Limited_Interface;
2276 function Is_Limited_Record (Id : E) return B is
2277 begin
2278 return Flag25 (Id);
2279 end Is_Limited_Record;
2281 function Is_Machine_Code_Subprogram (Id : E) return B is
2282 begin
2283 pragma Assert (Is_Subprogram (Id));
2284 return Flag137 (Id);
2285 end Is_Machine_Code_Subprogram;
2287 function Is_Non_Static_Subtype (Id : E) return B is
2288 begin
2289 pragma Assert (Is_Type (Id));
2290 return Flag109 (Id);
2291 end Is_Non_Static_Subtype;
2293 function Is_Null_Init_Proc (Id : E) return B is
2294 begin
2295 pragma Assert (Ekind (Id) = E_Procedure);
2296 return Flag178 (Id);
2297 end Is_Null_Init_Proc;
2299 function Is_Obsolescent (Id : E) return B is
2300 begin
2301 return Flag153 (Id);
2302 end Is_Obsolescent;
2304 function Is_Only_Out_Parameter (Id : E) return B is
2305 begin
2306 pragma Assert (Is_Formal (Id));
2307 return Flag226 (Id);
2308 end Is_Only_Out_Parameter;
2310 function Is_Package_Body_Entity (Id : E) return B is
2311 begin
2312 return Flag160 (Id);
2313 end Is_Package_Body_Entity;
2315 function Is_Packed (Id : E) return B is
2316 begin
2317 return Flag51 (Implementation_Base_Type (Id));
2318 end Is_Packed;
2320 function Is_Packed_Array_Impl_Type (Id : E) return B is
2321 begin
2322 return Flag138 (Id);
2323 end Is_Packed_Array_Impl_Type;
2325 function Is_Potentially_Use_Visible (Id : E) return B is
2326 begin
2327 pragma Assert (Nkind (Id) in N_Entity);
2328 return Flag9 (Id);
2329 end Is_Potentially_Use_Visible;
2331 function Is_Predicate_Function (Id : E) return B is
2332 begin
2333 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2334 return Flag255 (Id);
2335 end Is_Predicate_Function;
2337 function Is_Predicate_Function_M (Id : E) return B is
2338 begin
2339 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2340 return Flag256 (Id);
2341 end Is_Predicate_Function_M;
2343 function Is_Preelaborated (Id : E) return B is
2344 begin
2345 return Flag59 (Id);
2346 end Is_Preelaborated;
2348 function Is_Primitive (Id : E) return B is
2349 begin
2350 pragma Assert
2351 (Is_Overloadable (Id)
2352 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2353 return Flag218 (Id);
2354 end Is_Primitive;
2356 function Is_Primitive_Wrapper (Id : E) return B is
2357 begin
2358 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2359 return Flag195 (Id);
2360 end Is_Primitive_Wrapper;
2362 function Is_Private_Composite (Id : E) return B is
2363 begin
2364 pragma Assert (Is_Type (Id));
2365 return Flag107 (Id);
2366 end Is_Private_Composite;
2368 function Is_Private_Descendant (Id : E) return B is
2369 begin
2370 return Flag53 (Id);
2371 end Is_Private_Descendant;
2373 function Is_Private_Primitive (Id : E) return B is
2374 begin
2375 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2376 return Flag245 (Id);
2377 end Is_Private_Primitive;
2379 function Is_Processed_Transient (Id : E) return B is
2380 begin
2381 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2382 return Flag252 (Id);
2383 end Is_Processed_Transient;
2385 function Is_Public (Id : E) return B is
2386 begin
2387 pragma Assert (Nkind (Id) in N_Entity);
2388 return Flag10 (Id);
2389 end Is_Public;
2391 function Is_Pure (Id : E) return B is
2392 begin
2393 return Flag44 (Id);
2394 end Is_Pure;
2396 function Is_Pure_Unit_Access_Type (Id : E) return B is
2397 begin
2398 pragma Assert (Is_Access_Type (Id));
2399 return Flag189 (Id);
2400 end Is_Pure_Unit_Access_Type;
2402 function Is_RACW_Stub_Type (Id : E) return B is
2403 begin
2404 pragma Assert (Is_Type (Id));
2405 return Flag244 (Id);
2406 end Is_RACW_Stub_Type;
2408 function Is_Raised (Id : E) return B is
2409 begin
2410 pragma Assert (Ekind (Id) = E_Exception);
2411 return Flag224 (Id);
2412 end Is_Raised;
2414 function Is_Remote_Call_Interface (Id : E) return B is
2415 begin
2416 return Flag62 (Id);
2417 end Is_Remote_Call_Interface;
2419 function Is_Remote_Types (Id : E) return B is
2420 begin
2421 return Flag61 (Id);
2422 end Is_Remote_Types;
2424 function Is_Renaming_Of_Object (Id : E) return B is
2425 begin
2426 return Flag112 (Id);
2427 end Is_Renaming_Of_Object;
2429 function Is_Return_Object (Id : E) return B is
2430 begin
2431 return Flag209 (Id);
2432 end Is_Return_Object;
2434 function Is_Safe_To_Reevaluate (Id : E) return B is
2435 begin
2436 return Flag249 (Id);
2437 end Is_Safe_To_Reevaluate;
2439 function Is_Shared_Passive (Id : E) return B is
2440 begin
2441 return Flag60 (Id);
2442 end Is_Shared_Passive;
2444 function Is_Static_Type (Id : E) return B is
2445 begin
2446 return Flag281 (Id);
2447 end Is_Static_Type;
2449 function Is_Statically_Allocated (Id : E) return B is
2450 begin
2451 return Flag28 (Id);
2452 end Is_Statically_Allocated;
2454 function Is_Tag (Id : E) return B is
2455 begin
2456 pragma Assert (Nkind (Id) in N_Entity);
2457 return Flag78 (Id);
2458 end Is_Tag;
2460 function Is_Tagged_Type (Id : E) return B is
2461 begin
2462 return Flag55 (Id);
2463 end Is_Tagged_Type;
2465 function Is_Thunk (Id : E) return B is
2466 begin
2467 return Flag225 (Id);
2468 end Is_Thunk;
2470 function Is_Trivial_Subprogram (Id : E) return B is
2471 begin
2472 return Flag235 (Id);
2473 end Is_Trivial_Subprogram;
2475 function Is_True_Constant (Id : E) return B is
2476 begin
2477 return Flag163 (Id);
2478 end Is_True_Constant;
2480 function Is_Unchecked_Union (Id : E) return B is
2481 begin
2482 return Flag117 (Implementation_Base_Type (Id));
2483 end Is_Unchecked_Union;
2485 function Is_Underlying_Record_View (Id : E) return B is
2486 begin
2487 return Flag246 (Id);
2488 end Is_Underlying_Record_View;
2490 function Is_Unimplemented (Id : E) return B is
2491 begin
2492 return Flag284 (Id);
2493 end Is_Unimplemented;
2495 function Is_Unsigned_Type (Id : E) return B is
2496 begin
2497 pragma Assert (Is_Type (Id));
2498 return Flag144 (Id);
2499 end Is_Unsigned_Type;
2501 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2502 begin
2503 return Flag283 (Id);
2504 end Is_Uplevel_Referenced_Entity;
2506 function Is_Valued_Procedure (Id : E) return B is
2507 begin
2508 pragma Assert (Ekind (Id) = E_Procedure);
2509 return Flag127 (Id);
2510 end Is_Valued_Procedure;
2512 function Is_Visible_Formal (Id : E) return B is
2513 begin
2514 return Flag206 (Id);
2515 end Is_Visible_Formal;
2517 function Is_Visible_Lib_Unit (Id : E) return B is
2518 begin
2519 return Flag116 (Id);
2520 end Is_Visible_Lib_Unit;
2522 function Is_Volatile (Id : E) return B is
2523 begin
2524 pragma Assert (Nkind (Id) in N_Entity);
2526 if Is_Type (Id) then
2527 return Flag16 (Base_Type (Id));
2528 else
2529 return Flag16 (Id);
2530 end if;
2531 end Is_Volatile;
2533 function Is_Volatile_Full_Access (Id : E) return B is
2534 begin
2535 return Flag285 (Id);
2536 end Is_Volatile_Full_Access;
2538 function Itype_Printed (Id : E) return B is
2539 begin
2540 pragma Assert (Is_Itype (Id));
2541 return Flag202 (Id);
2542 end Itype_Printed;
2544 function Kill_Elaboration_Checks (Id : E) return B is
2545 begin
2546 return Flag32 (Id);
2547 end Kill_Elaboration_Checks;
2549 function Kill_Range_Checks (Id : E) return B is
2550 begin
2551 return Flag33 (Id);
2552 end Kill_Range_Checks;
2554 function Known_To_Have_Preelab_Init (Id : E) return B is
2555 begin
2556 pragma Assert (Is_Type (Id));
2557 return Flag207 (Id);
2558 end Known_To_Have_Preelab_Init;
2560 function Last_Aggregate_Assignment (Id : E) return N is
2561 begin
2562 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2563 return Node30 (Id);
2564 end Last_Aggregate_Assignment;
2566 function Last_Assignment (Id : E) return N is
2567 begin
2568 pragma Assert (Is_Assignable (Id));
2569 return Node26 (Id);
2570 end Last_Assignment;
2572 function Last_Entity (Id : E) return E is
2573 begin
2574 return Node20 (Id);
2575 end Last_Entity;
2577 function Limited_View (Id : E) return E is
2578 begin
2579 pragma Assert (Ekind (Id) = E_Package);
2580 return Node23 (Id);
2581 end Limited_View;
2583 function Linker_Section_Pragma (Id : E) return N is
2584 begin
2585 pragma Assert
2586 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2587 return Node33 (Id);
2588 end Linker_Section_Pragma;
2590 function Lit_Indexes (Id : E) return E is
2591 begin
2592 pragma Assert (Is_Enumeration_Type (Id));
2593 return Node18 (Id);
2594 end Lit_Indexes;
2596 function Lit_Strings (Id : E) return E is
2597 begin
2598 pragma Assert (Is_Enumeration_Type (Id));
2599 return Node16 (Id);
2600 end Lit_Strings;
2602 function Low_Bound_Tested (Id : E) return B is
2603 begin
2604 return Flag205 (Id);
2605 end Low_Bound_Tested;
2607 function Machine_Radix_10 (Id : E) return B is
2608 begin
2609 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2610 return Flag84 (Id);
2611 end Machine_Radix_10;
2613 function Master_Id (Id : E) return E is
2614 begin
2615 pragma Assert (Is_Access_Type (Id));
2616 return Node17 (Id);
2617 end Master_Id;
2619 function Materialize_Entity (Id : E) return B is
2620 begin
2621 return Flag168 (Id);
2622 end Materialize_Entity;
2624 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2625 begin
2626 return Flag262 (Id);
2627 end May_Inherit_Delayed_Rep_Aspects;
2629 function Mechanism (Id : E) return M is
2630 begin
2631 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2632 return UI_To_Int (Uint8 (Id));
2633 end Mechanism;
2635 function Modulus (Id : E) return Uint is
2636 begin
2637 pragma Assert (Is_Modular_Integer_Type (Id));
2638 return Uint17 (Base_Type (Id));
2639 end Modulus;
2641 function Must_Be_On_Byte_Boundary (Id : E) return B is
2642 begin
2643 pragma Assert (Is_Type (Id));
2644 return Flag183 (Id);
2645 end Must_Be_On_Byte_Boundary;
2647 function Must_Have_Preelab_Init (Id : E) return B is
2648 begin
2649 pragma Assert (Is_Type (Id));
2650 return Flag208 (Id);
2651 end Must_Have_Preelab_Init;
2653 function Needs_Debug_Info (Id : E) return B is
2654 begin
2655 return Flag147 (Id);
2656 end Needs_Debug_Info;
2658 function Needs_No_Actuals (Id : E) return B is
2659 begin
2660 pragma Assert
2661 (Is_Overloadable (Id)
2662 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2663 return Flag22 (Id);
2664 end Needs_No_Actuals;
2666 function Needs_Typedef (Id : E) return B is
2667 begin
2668 pragma Assert (Is_Type (Id));
2669 return Flag286 (Id);
2670 end Needs_Typedef;
2672 function Never_Set_In_Source (Id : E) return B is
2673 begin
2674 return Flag115 (Id);
2675 end Never_Set_In_Source;
2677 function Next_Inlined_Subprogram (Id : E) return E is
2678 begin
2679 return Node12 (Id);
2680 end Next_Inlined_Subprogram;
2682 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2683 begin
2684 pragma Assert (Is_Discrete_Type (Id));
2685 return Flag276 (Id);
2686 end No_Dynamic_Predicate_On_Actual;
2688 function No_Pool_Assigned (Id : E) return B is
2689 begin
2690 pragma Assert (Is_Access_Type (Id));
2691 return Flag131 (Root_Type (Id));
2692 end No_Pool_Assigned;
2694 function No_Predicate_On_Actual (Id : E) return Boolean is
2695 begin
2696 pragma Assert (Is_Discrete_Type (Id));
2697 return Flag275 (Id);
2698 end No_Predicate_On_Actual;
2700 function No_Return (Id : E) return B is
2701 begin
2702 return Flag113 (Id);
2703 end No_Return;
2705 function No_Strict_Aliasing (Id : E) return B is
2706 begin
2707 pragma Assert (Is_Access_Type (Id));
2708 return Flag136 (Base_Type (Id));
2709 end No_Strict_Aliasing;
2711 function No_Tagged_Streams_Pragma (Id : E) return N is
2712 begin
2713 pragma Assert (Is_Tagged_Type (Id));
2714 return Node32 (Id);
2715 end No_Tagged_Streams_Pragma;
2717 function Non_Binary_Modulus (Id : E) return B is
2718 begin
2719 pragma Assert (Is_Type (Id));
2720 return Flag58 (Base_Type (Id));
2721 end Non_Binary_Modulus;
2723 function Non_Limited_View (Id : E) return E is
2724 begin
2725 pragma Assert
2726 (Ekind (Id) in Incomplete_Kind
2727 or else
2728 Ekind (Id) in Class_Wide_Kind
2729 or else
2730 Ekind (Id) = E_Abstract_State);
2731 return Node19 (Id);
2732 end Non_Limited_View;
2734 function Nonzero_Is_True (Id : E) return B is
2735 begin
2736 pragma Assert (Root_Type (Id) = Standard_Boolean);
2737 return Flag162 (Base_Type (Id));
2738 end Nonzero_Is_True;
2740 function Normalized_First_Bit (Id : E) return U is
2741 begin
2742 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2743 return Uint8 (Id);
2744 end Normalized_First_Bit;
2746 function Normalized_Position (Id : E) return U is
2747 begin
2748 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2749 return Uint14 (Id);
2750 end Normalized_Position;
2752 function Normalized_Position_Max (Id : E) return U is
2753 begin
2754 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2755 return Uint10 (Id);
2756 end Normalized_Position_Max;
2758 function OK_To_Rename (Id : E) return B is
2759 begin
2760 pragma Assert (Ekind (Id) = E_Variable);
2761 return Flag247 (Id);
2762 end OK_To_Rename;
2764 function OK_To_Reorder_Components (Id : E) return B is
2765 begin
2766 pragma Assert (Is_Record_Type (Id));
2767 return Flag239 (Base_Type (Id));
2768 end OK_To_Reorder_Components;
2770 function Optimize_Alignment_Space (Id : E) return B is
2771 begin
2772 pragma Assert
2773 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2774 return Flag241 (Id);
2775 end Optimize_Alignment_Space;
2777 function Optimize_Alignment_Time (Id : E) return B is
2778 begin
2779 pragma Assert
2780 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2781 return Flag242 (Id);
2782 end Optimize_Alignment_Time;
2784 function Original_Access_Type (Id : E) return E is
2785 begin
2786 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2787 return Node28 (Id);
2788 end Original_Access_Type;
2790 function Original_Array_Type (Id : E) return E is
2791 begin
2792 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2793 return Node21 (Id);
2794 end Original_Array_Type;
2796 function Original_Record_Component (Id : E) return E is
2797 begin
2798 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2799 return Node22 (Id);
2800 end Original_Record_Component;
2802 function Overlays_Constant (Id : E) return B is
2803 begin
2804 return Flag243 (Id);
2805 end Overlays_Constant;
2807 function Overridden_Operation (Id : E) return E is
2808 begin
2809 return Node26 (Id);
2810 end Overridden_Operation;
2812 function Package_Instantiation (Id : E) return N is
2813 begin
2814 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2815 return Node26 (Id);
2816 end Package_Instantiation;
2818 function Packed_Array_Impl_Type (Id : E) return E is
2819 begin
2820 pragma Assert (Is_Array_Type (Id));
2821 return Node23 (Id);
2822 end Packed_Array_Impl_Type;
2824 function Parent_Subtype (Id : E) return E is
2825 begin
2826 pragma Assert (Is_Record_Type (Id));
2827 return Node19 (Base_Type (Id));
2828 end Parent_Subtype;
2830 function Part_Of_Constituents (Id : E) return L is
2831 begin
2832 pragma Assert (Ekind (Id) = E_Abstract_State);
2833 return Elist9 (Id);
2834 end Part_Of_Constituents;
2836 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2837 begin
2838 pragma Assert (Is_Type (Id));
2839 return Flag280 (Id);
2840 end Partial_View_Has_Unknown_Discr;
2842 function Pending_Access_Types (Id : E) return L is
2843 begin
2844 pragma Assert (Is_Type (Id));
2845 return Elist15 (Id);
2846 end Pending_Access_Types;
2848 function Postconditions_Proc (Id : E) return E is
2849 begin
2850 pragma Assert (Ekind_In (Id, E_Entry,
2851 E_Entry_Family,
2852 E_Function,
2853 E_Procedure));
2854 return Node14 (Id);
2855 end Postconditions_Proc;
2857 function PPC_Wrapper (Id : E) return E is
2858 begin
2859 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2860 return Node25 (Id);
2861 end PPC_Wrapper;
2863 function Prival (Id : E) return E is
2864 begin
2865 pragma Assert (Is_Protected_Component (Id));
2866 return Node17 (Id);
2867 end Prival;
2869 function Prival_Link (Id : E) return E is
2870 begin
2871 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2872 return Node20 (Id);
2873 end Prival_Link;
2875 function Private_Dependents (Id : E) return L is
2876 begin
2877 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2878 return Elist18 (Id);
2879 end Private_Dependents;
2881 function Private_View (Id : E) return N is
2882 begin
2883 pragma Assert (Is_Private_Type (Id));
2884 return Node22 (Id);
2885 end Private_View;
2887 function Protected_Body_Subprogram (Id : E) return E is
2888 begin
2889 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2890 return Node11 (Id);
2891 end Protected_Body_Subprogram;
2893 function Protected_Formal (Id : E) return E is
2894 begin
2895 pragma Assert (Is_Formal (Id));
2896 return Node22 (Id);
2897 end Protected_Formal;
2899 function Protection_Object (Id : E) return E is
2900 begin
2901 pragma Assert
2902 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2903 return Node23 (Id);
2904 end Protection_Object;
2906 function Reachable (Id : E) return B is
2907 begin
2908 return Flag49 (Id);
2909 end Reachable;
2911 function Referenced (Id : E) return B is
2912 begin
2913 return Flag156 (Id);
2914 end Referenced;
2916 function Referenced_As_LHS (Id : E) return B is
2917 begin
2918 return Flag36 (Id);
2919 end Referenced_As_LHS;
2921 function Referenced_As_Out_Parameter (Id : E) return B is
2922 begin
2923 return Flag227 (Id);
2924 end Referenced_As_Out_Parameter;
2926 function Refinement_Constituents (Id : E) return L is
2927 begin
2928 pragma Assert (Ekind (Id) = E_Abstract_State);
2929 return Elist8 (Id);
2930 end Refinement_Constituents;
2932 function Register_Exception_Call (Id : E) return N is
2933 begin
2934 pragma Assert (Ekind (Id) = E_Exception);
2935 return Node20 (Id);
2936 end Register_Exception_Call;
2938 function Related_Array_Object (Id : E) return E is
2939 begin
2940 pragma Assert (Is_Array_Type (Id));
2941 return Node25 (Id);
2942 end Related_Array_Object;
2944 function Related_Expression (Id : E) return N is
2945 begin
2946 pragma Assert (Ekind (Id) in Type_Kind
2947 or else Ekind_In (Id, E_Constant, E_Variable));
2948 return Node24 (Id);
2949 end Related_Expression;
2951 function Related_Instance (Id : E) return E is
2952 begin
2953 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2954 return Node15 (Id);
2955 end Related_Instance;
2957 function Related_Type (Id : E) return E is
2958 begin
2959 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2960 return Node27 (Id);
2961 end Related_Type;
2963 function Relative_Deadline_Variable (Id : E) return E is
2964 begin
2965 pragma Assert (Is_Task_Type (Id));
2966 return Node28 (Implementation_Base_Type (Id));
2967 end Relative_Deadline_Variable;
2969 function Renamed_Entity (Id : E) return N is
2970 begin
2971 return Node18 (Id);
2972 end Renamed_Entity;
2974 function Renamed_In_Spec (Id : E) return B is
2975 begin
2976 pragma Assert (Ekind (Id) = E_Package);
2977 return Flag231 (Id);
2978 end Renamed_In_Spec;
2980 function Renamed_Object (Id : E) return N is
2981 begin
2982 return Node18 (Id);
2983 end Renamed_Object;
2985 function Renaming_Map (Id : E) return U is
2986 begin
2987 return Uint9 (Id);
2988 end Renaming_Map;
2990 function Requires_Overriding (Id : E) return B is
2991 begin
2992 pragma Assert (Is_Overloadable (Id));
2993 return Flag213 (Id);
2994 end Requires_Overriding;
2996 function Return_Present (Id : E) return B is
2997 begin
2998 return Flag54 (Id);
2999 end Return_Present;
3001 function Return_Applies_To (Id : E) return N is
3002 begin
3003 return Node8 (Id);
3004 end Return_Applies_To;
3006 function Returns_By_Ref (Id : E) return B is
3007 begin
3008 return Flag90 (Id);
3009 end Returns_By_Ref;
3011 function Returns_Limited_View (Id : E) return B is
3012 begin
3013 pragma Assert (Ekind (Id) = E_Function);
3014 return Flag134 (Id);
3015 end Returns_Limited_View;
3017 function Reverse_Bit_Order (Id : E) return B is
3018 begin
3019 pragma Assert (Is_Record_Type (Id));
3020 return Flag164 (Base_Type (Id));
3021 end Reverse_Bit_Order;
3023 function Reverse_Storage_Order (Id : E) return B is
3024 begin
3025 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3026 return Flag93 (Base_Type (Id));
3027 end Reverse_Storage_Order;
3029 function RM_Size (Id : E) return U is
3030 begin
3031 pragma Assert (Is_Type (Id));
3032 return Uint13 (Id);
3033 end RM_Size;
3035 function Scalar_Range (Id : E) return N is
3036 begin
3037 return Node20 (Id);
3038 end Scalar_Range;
3040 function Scale_Value (Id : E) return U is
3041 begin
3042 return Uint16 (Id);
3043 end Scale_Value;
3045 function Scope_Depth_Value (Id : E) return U is
3046 begin
3047 return Uint22 (Id);
3048 end Scope_Depth_Value;
3050 function Sec_Stack_Needed_For_Return (Id : E) return B is
3051 begin
3052 return Flag167 (Id);
3053 end Sec_Stack_Needed_For_Return;
3055 function Shadow_Entities (Id : E) return S is
3056 begin
3057 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3058 return List14 (Id);
3059 end Shadow_Entities;
3061 function Shared_Var_Procs_Instance (Id : E) return E is
3062 begin
3063 pragma Assert (Ekind (Id) = E_Variable);
3064 return Node22 (Id);
3065 end Shared_Var_Procs_Instance;
3067 function Size_Check_Code (Id : E) return N is
3068 begin
3069 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3070 return Node19 (Id);
3071 end Size_Check_Code;
3073 function Size_Depends_On_Discriminant (Id : E) return B is
3074 begin
3075 return Flag177 (Id);
3076 end Size_Depends_On_Discriminant;
3078 function Size_Known_At_Compile_Time (Id : E) return B is
3079 begin
3080 return Flag92 (Id);
3081 end Size_Known_At_Compile_Time;
3083 function Small_Value (Id : E) return R is
3084 begin
3085 pragma Assert (Is_Fixed_Point_Type (Id));
3086 return Ureal21 (Id);
3087 end Small_Value;
3089 function SPARK_Aux_Pragma (Id : E) return N is
3090 begin
3091 pragma Assert
3092 (Ekind_In (Id, E_Generic_Package, -- package variants
3093 E_Package,
3094 E_Package_Body));
3095 return Node33 (Id);
3096 end SPARK_Aux_Pragma;
3098 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3099 begin
3100 pragma Assert
3101 (Ekind_In (Id, E_Generic_Package, -- package variants
3102 E_Package,
3103 E_Package_Body));
3104 return Flag266 (Id);
3105 end SPARK_Aux_Pragma_Inherited;
3107 function SPARK_Pragma (Id : E) return N is
3108 begin
3109 pragma Assert
3110 (Ekind_In (Id, E_Function, -- subprogram variants
3111 E_Generic_Function,
3112 E_Generic_Procedure,
3113 E_Procedure,
3114 E_Subprogram_Body)
3115 or else
3116 Ekind_In (Id, E_Generic_Package, -- package variants
3117 E_Package,
3118 E_Package_Body));
3119 return Node32 (Id);
3120 end SPARK_Pragma;
3122 function SPARK_Pragma_Inherited (Id : E) return B is
3123 begin
3124 pragma Assert
3125 (Ekind_In (Id, E_Function, -- subprogram variants
3126 E_Generic_Function,
3127 E_Generic_Procedure,
3128 E_Procedure,
3129 E_Subprogram_Body)
3130 or else
3131 Ekind_In (Id, E_Generic_Package, -- package variants
3132 E_Package,
3133 E_Package_Body));
3134 return Flag265 (Id);
3135 end SPARK_Pragma_Inherited;
3137 function Spec_Entity (Id : E) return E is
3138 begin
3139 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3140 return Node19 (Id);
3141 end Spec_Entity;
3143 function SSO_Set_High_By_Default (Id : E) return B is
3144 begin
3145 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3146 return Flag273 (Base_Type (Id));
3147 end SSO_Set_High_By_Default;
3149 function SSO_Set_Low_By_Default (Id : E) return B is
3150 begin
3151 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3152 return Flag272 (Base_Type (Id));
3153 end SSO_Set_Low_By_Default;
3155 function Static_Discrete_Predicate (Id : E) return S is
3156 begin
3157 pragma Assert (Is_Discrete_Type (Id));
3158 return List25 (Id);
3159 end Static_Discrete_Predicate;
3161 function Static_Real_Or_String_Predicate (Id : E) return N is
3162 begin
3163 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3164 return Node25 (Id);
3165 end Static_Real_Or_String_Predicate;
3167 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3168 begin
3169 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3170 return Node15 (Id);
3171 end Status_Flag_Or_Transient_Decl;
3173 function Storage_Size_Variable (Id : E) return E is
3174 begin
3175 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3176 return Node26 (Implementation_Base_Type (Id));
3177 end Storage_Size_Variable;
3179 function Static_Elaboration_Desired (Id : E) return B is
3180 begin
3181 pragma Assert (Ekind (Id) = E_Package);
3182 return Flag77 (Id);
3183 end Static_Elaboration_Desired;
3185 function Static_Initialization (Id : E) return N is
3186 begin
3187 pragma Assert
3188 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3189 return Node30 (Id);
3190 end Static_Initialization;
3192 function Stored_Constraint (Id : E) return L is
3193 begin
3194 pragma Assert
3195 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3196 return Elist23 (Id);
3197 end Stored_Constraint;
3199 function Stores_Attribute_Old_Prefix (Id : E) return B is
3200 begin
3201 return Flag270 (Id);
3202 end Stores_Attribute_Old_Prefix;
3204 function Strict_Alignment (Id : E) return B is
3205 begin
3206 return Flag145 (Implementation_Base_Type (Id));
3207 end Strict_Alignment;
3209 function String_Literal_Length (Id : E) return U is
3210 begin
3211 return Uint16 (Id);
3212 end String_Literal_Length;
3214 function String_Literal_Low_Bound (Id : E) return N is
3215 begin
3216 return Node18 (Id);
3217 end String_Literal_Low_Bound;
3219 function Subprograms_For_Type (Id : E) return E is
3220 begin
3221 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3222 return Node29 (Id);
3223 end Subprograms_For_Type;
3225 function Subps_Index (Id : E) return U is
3226 begin
3227 pragma Assert (Is_Subprogram (Id));
3228 return Uint24 (Id);
3229 end Subps_Index;
3231 function Suppress_Elaboration_Warnings (Id : E) return B is
3232 begin
3233 return Flag148 (Id);
3234 end Suppress_Elaboration_Warnings;
3236 function Suppress_Initialization (Id : E) return B is
3237 begin
3238 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3239 return Flag105 (Id);
3240 end Suppress_Initialization;
3242 function Suppress_Style_Checks (Id : E) return B is
3243 begin
3244 return Flag165 (Id);
3245 end Suppress_Style_Checks;
3247 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3248 begin
3249 return Flag217 (Id);
3250 end Suppress_Value_Tracking_On_Call;
3252 function Task_Body_Procedure (Id : E) return N is
3253 begin
3254 pragma Assert (Ekind (Id) in Task_Kind);
3255 return Node25 (Id);
3256 end Task_Body_Procedure;
3258 function Thunk_Entity (Id : E) return E is
3259 begin
3260 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3261 and then Is_Thunk (Id));
3262 return Node31 (Id);
3263 end Thunk_Entity;
3265 function Treat_As_Volatile (Id : E) return B is
3266 begin
3267 return Flag41 (Id);
3268 end Treat_As_Volatile;
3270 function Underlying_Full_View (Id : E) return E is
3271 begin
3272 pragma Assert (Ekind (Id) in Private_Kind);
3273 return Node19 (Id);
3274 end Underlying_Full_View;
3276 function Underlying_Record_View (Id : E) return E is
3277 begin
3278 return Node28 (Id);
3279 end Underlying_Record_View;
3281 function Universal_Aliasing (Id : E) return B is
3282 begin
3283 pragma Assert (Is_Type (Id));
3284 return Flag216 (Implementation_Base_Type (Id));
3285 end Universal_Aliasing;
3287 function Unset_Reference (Id : E) return N is
3288 begin
3289 return Node16 (Id);
3290 end Unset_Reference;
3292 function Used_As_Generic_Actual (Id : E) return B is
3293 begin
3294 return Flag222 (Id);
3295 end Used_As_Generic_Actual;
3297 function Uses_Lock_Free (Id : E) return B is
3298 begin
3299 pragma Assert (Is_Protected_Type (Id));
3300 return Flag188 (Id);
3301 end Uses_Lock_Free;
3303 function Uses_Sec_Stack (Id : E) return B is
3304 begin
3305 return Flag95 (Id);
3306 end Uses_Sec_Stack;
3308 function Warnings_Off (Id : E) return B is
3309 begin
3310 return Flag96 (Id);
3311 end Warnings_Off;
3313 function Warnings_Off_Used (Id : E) return B is
3314 begin
3315 return Flag236 (Id);
3316 end Warnings_Off_Used;
3318 function Warnings_Off_Used_Unmodified (Id : E) return B is
3319 begin
3320 return Flag237 (Id);
3321 end Warnings_Off_Used_Unmodified;
3323 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3324 begin
3325 return Flag238 (Id);
3326 end Warnings_Off_Used_Unreferenced;
3328 function Wrapped_Entity (Id : E) return E is
3329 begin
3330 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3331 and then Is_Primitive_Wrapper (Id));
3332 return Node27 (Id);
3333 end Wrapped_Entity;
3335 function Was_Hidden (Id : E) return B is
3336 begin
3337 return Flag196 (Id);
3338 end Was_Hidden;
3340 ------------------------------
3341 -- Classification Functions --
3342 ------------------------------
3344 function Is_Access_Type (Id : E) return B is
3345 begin
3346 return Ekind (Id) in Access_Kind;
3347 end Is_Access_Type;
3349 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3350 begin
3351 return Ekind (Id) in Access_Protected_Kind;
3352 end Is_Access_Protected_Subprogram_Type;
3354 function Is_Access_Subprogram_Type (Id : E) return B is
3355 begin
3356 return Ekind (Id) in Access_Subprogram_Kind;
3357 end Is_Access_Subprogram_Type;
3359 function Is_Aggregate_Type (Id : E) return B is
3360 begin
3361 return Ekind (Id) in Aggregate_Kind;
3362 end Is_Aggregate_Type;
3364 function Is_Array_Type (Id : E) return B is
3365 begin
3366 return Ekind (Id) in Array_Kind;
3367 end Is_Array_Type;
3369 function Is_Assignable (Id : E) return B is
3370 begin
3371 return Ekind (Id) in Assignable_Kind;
3372 end Is_Assignable;
3374 function Is_Class_Wide_Type (Id : E) return B is
3375 begin
3376 return Ekind (Id) in Class_Wide_Kind;
3377 end Is_Class_Wide_Type;
3379 function Is_Composite_Type (Id : E) return B is
3380 begin
3381 return Ekind (Id) in Composite_Kind;
3382 end Is_Composite_Type;
3384 function Is_Concurrent_Body (Id : E) return B is
3385 begin
3386 return Ekind (Id) in
3387 Concurrent_Body_Kind;
3388 end Is_Concurrent_Body;
3390 function Is_Concurrent_Record_Type (Id : E) return B is
3391 begin
3392 return Flag20 (Id);
3393 end Is_Concurrent_Record_Type;
3395 function Is_Concurrent_Type (Id : E) return B is
3396 begin
3397 return Ekind (Id) in Concurrent_Kind;
3398 end Is_Concurrent_Type;
3400 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3401 begin
3402 return Ekind (Id) in
3403 Decimal_Fixed_Point_Kind;
3404 end Is_Decimal_Fixed_Point_Type;
3406 function Is_Digits_Type (Id : E) return B is
3407 begin
3408 return Ekind (Id) in Digits_Kind;
3409 end Is_Digits_Type;
3411 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3412 begin
3413 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3414 end Is_Discrete_Or_Fixed_Point_Type;
3416 function Is_Discrete_Type (Id : E) return B is
3417 begin
3418 return Ekind (Id) in Discrete_Kind;
3419 end Is_Discrete_Type;
3421 function Is_Elementary_Type (Id : E) return B is
3422 begin
3423 return Ekind (Id) in Elementary_Kind;
3424 end Is_Elementary_Type;
3426 function Is_Entry (Id : E) return B is
3427 begin
3428 return Ekind (Id) in Entry_Kind;
3429 end Is_Entry;
3431 function Is_Enumeration_Type (Id : E) return B is
3432 begin
3433 return Ekind (Id) in
3434 Enumeration_Kind;
3435 end Is_Enumeration_Type;
3437 function Is_Fixed_Point_Type (Id : E) return B is
3438 begin
3439 return Ekind (Id) in
3440 Fixed_Point_Kind;
3441 end Is_Fixed_Point_Type;
3443 function Is_Floating_Point_Type (Id : E) return B is
3444 begin
3445 return Ekind (Id) in Float_Kind;
3446 end Is_Floating_Point_Type;
3448 function Is_Formal (Id : E) return B is
3449 begin
3450 return Ekind (Id) in Formal_Kind;
3451 end Is_Formal;
3453 function Is_Formal_Object (Id : E) return B is
3454 begin
3455 return Ekind (Id) in Formal_Object_Kind;
3456 end Is_Formal_Object;
3458 function Is_Generic_Subprogram (Id : E) return B is
3459 begin
3460 return Ekind (Id) in Generic_Subprogram_Kind;
3461 end Is_Generic_Subprogram;
3463 function Is_Generic_Unit (Id : E) return B is
3464 begin
3465 return Ekind (Id) in Generic_Unit_Kind;
3466 end Is_Generic_Unit;
3468 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3469 begin
3470 return Ekind (Id) in
3471 Incomplete_Or_Private_Kind;
3472 end Is_Incomplete_Or_Private_Type;
3474 function Is_Incomplete_Type (Id : E) return B is
3475 begin
3476 return Ekind (Id) in
3477 Incomplete_Kind;
3478 end Is_Incomplete_Type;
3480 function Is_Integer_Type (Id : E) return B is
3481 begin
3482 return Ekind (Id) in Integer_Kind;
3483 end Is_Integer_Type;
3485 function Is_Modular_Integer_Type (Id : E) return B is
3486 begin
3487 return Ekind (Id) in
3488 Modular_Integer_Kind;
3489 end Is_Modular_Integer_Type;
3491 function Is_Named_Number (Id : E) return B is
3492 begin
3493 return Ekind (Id) in Named_Kind;
3494 end Is_Named_Number;
3496 function Is_Numeric_Type (Id : E) return B is
3497 begin
3498 return Ekind (Id) in Numeric_Kind;
3499 end Is_Numeric_Type;
3501 function Is_Object (Id : E) return B is
3502 begin
3503 return Ekind (Id) in Object_Kind;
3504 end Is_Object;
3506 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3507 begin
3508 return Ekind (Id) in
3509 Ordinary_Fixed_Point_Kind;
3510 end Is_Ordinary_Fixed_Point_Type;
3512 function Is_Overloadable (Id : E) return B is
3513 begin
3514 return Ekind (Id) in Overloadable_Kind;
3515 end Is_Overloadable;
3517 function Is_Private_Type (Id : E) return B is
3518 begin
3519 return Ekind (Id) in Private_Kind;
3520 end Is_Private_Type;
3522 function Is_Protected_Type (Id : E) return B is
3523 begin
3524 return Ekind (Id) in Protected_Kind;
3525 end Is_Protected_Type;
3527 function Is_Real_Type (Id : E) return B is
3528 begin
3529 return Ekind (Id) in Real_Kind;
3530 end Is_Real_Type;
3532 function Is_Record_Type (Id : E) return B is
3533 begin
3534 return Ekind (Id) in Record_Kind;
3535 end Is_Record_Type;
3537 function Is_Scalar_Type (Id : E) return B is
3538 begin
3539 return Ekind (Id) in Scalar_Kind;
3540 end Is_Scalar_Type;
3542 function Is_Signed_Integer_Type (Id : E) return B is
3543 begin
3544 return Ekind (Id) in Signed_Integer_Kind;
3545 end Is_Signed_Integer_Type;
3547 function Is_Subprogram (Id : E) return B is
3548 begin
3549 return Ekind (Id) in Subprogram_Kind;
3550 end Is_Subprogram;
3552 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3553 begin
3554 return Ekind (Id) in Subprogram_Kind
3555 or else
3556 Ekind (Id) in Generic_Subprogram_Kind;
3557 end Is_Subprogram_Or_Generic_Subprogram;
3559 function Is_Task_Type (Id : E) return B is
3560 begin
3561 return Ekind (Id) in Task_Kind;
3562 end Is_Task_Type;
3564 function Is_Type (Id : E) return B is
3565 begin
3566 return Ekind (Id) in Type_Kind;
3567 end Is_Type;
3569 ------------------------------
3570 -- Attribute Set Procedures --
3571 ------------------------------
3573 -- Note: in many of these set procedures an "obvious" assertion is missing.
3574 -- The reason for this is that in many cases, a field is set before the
3575 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3576 -- it is possible to add assertions that specifically include the E_Void
3577 -- possibility, but in some cases, we just omit the assertions.
3579 procedure Set_Abstract_States (Id : E; V : L) is
3580 begin
3581 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3582 Set_Elist25 (Id, V);
3583 end Set_Abstract_States;
3585 procedure Set_Accept_Address (Id : E; V : L) is
3586 begin
3587 Set_Elist21 (Id, V);
3588 end Set_Accept_Address;
3590 procedure Set_Access_Disp_Table (Id : E; V : L) is
3591 begin
3592 pragma Assert (Ekind (Id) = E_Record_Type
3593 and then Id = Implementation_Base_Type (Id));
3594 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3595 Set_Elist16 (Id, V);
3596 end Set_Access_Disp_Table;
3598 procedure Set_Anonymous_Master (Id : E; V : E) is
3599 begin
3600 pragma Assert (Ekind_In (Id, E_Function,
3601 E_Package,
3602 E_Package_Body,
3603 E_Procedure,
3604 E_Subprogram_Body));
3605 Set_Node36 (Id, V);
3606 end Set_Anonymous_Master;
3608 procedure Set_Associated_Entity (Id : E; V : E) is
3609 begin
3610 Set_Node37 (Id, V);
3611 end Set_Associated_Entity;
3613 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3614 begin
3615 Set_Node12 (Id, V);
3616 end Set_Associated_Formal_Package;
3618 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3619 begin
3620 Set_Node8 (Id, V);
3621 end Set_Associated_Node_For_Itype;
3623 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3624 begin
3625 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3626 Set_Node22 (Id, V);
3627 end Set_Associated_Storage_Pool;
3629 procedure Set_Activation_Record_Component (Id : E; V : E) is
3630 begin
3631 pragma Assert (Ekind_In (Id, E_Constant,
3632 E_In_Parameter,
3633 E_In_Out_Parameter,
3634 E_Loop_Parameter,
3635 E_Out_Parameter,
3636 E_Variable));
3637 Set_Node31 (Id, V);
3638 end Set_Activation_Record_Component;
3640 procedure Set_Actual_Subtype (Id : E; V : E) is
3641 begin
3642 pragma Assert
3643 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3644 or else Is_Formal (Id));
3645 Set_Node17 (Id, V);
3646 end Set_Actual_Subtype;
3648 procedure Set_Address_Taken (Id : E; V : B := True) is
3649 begin
3650 Set_Flag104 (Id, V);
3651 end Set_Address_Taken;
3653 procedure Set_Alias (Id : E; V : E) is
3654 begin
3655 pragma Assert
3656 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3657 Set_Node18 (Id, V);
3658 end Set_Alias;
3660 procedure Set_Alignment (Id : E; V : U) is
3661 begin
3662 pragma Assert (Is_Type (Id)
3663 or else Is_Formal (Id)
3664 or else Ekind_In (Id, E_Loop_Parameter,
3665 E_Constant,
3666 E_Exception,
3667 E_Variable));
3668 Set_Uint14 (Id, V);
3669 end Set_Alignment;
3671 procedure Set_Barrier_Function (Id : E; V : N) is
3672 begin
3673 pragma Assert (Is_Entry (Id));
3674 Set_Node12 (Id, V);
3675 end Set_Barrier_Function;
3677 procedure Set_Block_Node (Id : E; V : N) is
3678 begin
3679 pragma Assert (Ekind (Id) = E_Block);
3680 Set_Node11 (Id, V);
3681 end Set_Block_Node;
3683 procedure Set_Body_Entity (Id : E; V : E) is
3684 begin
3685 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3686 Set_Node19 (Id, V);
3687 end Set_Body_Entity;
3689 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3690 begin
3691 pragma Assert
3692 (Ekind (Id) = E_Package
3693 or else Is_Subprogram (Id)
3694 or else Is_Generic_Unit (Id));
3695 Set_Flag40 (Id, V);
3696 end Set_Body_Needed_For_SAL;
3698 procedure Set_Body_References (Id : E; V : L) is
3699 begin
3700 pragma Assert (Ekind (Id) = E_Abstract_State);
3701 Set_Elist16 (Id, V);
3702 end Set_Body_References;
3704 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3705 begin
3706 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3707 Set_Node29 (Id, V);
3708 end Set_BIP_Initialization_Call;
3710 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3711 begin
3712 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3713 Set_Flag125 (Id, V);
3714 end Set_C_Pass_By_Copy;
3716 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3717 begin
3718 Set_Flag38 (Id, V);
3719 end Set_Can_Never_Be_Null;
3721 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3722 begin
3723 pragma Assert
3724 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3725 Set_Flag229 (Id, V);
3726 end Set_Can_Use_Internal_Rep;
3728 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3729 begin
3730 Set_Flag31 (Id, V);
3731 end Set_Checks_May_Be_Suppressed;
3733 procedure Set_Class_Wide_Type (Id : E; V : E) is
3734 begin
3735 pragma Assert (Is_Type (Id));
3736 Set_Node9 (Id, V);
3737 end Set_Class_Wide_Type;
3739 procedure Set_Cloned_Subtype (Id : E; V : E) is
3740 begin
3741 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3742 Set_Node16 (Id, V);
3743 end Set_Cloned_Subtype;
3745 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3746 begin
3747 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3748 Set_Uint11 (Id, V);
3749 end Set_Component_Bit_Offset;
3751 procedure Set_Component_Clause (Id : E; V : N) is
3752 begin
3753 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3754 Set_Node13 (Id, V);
3755 end Set_Component_Clause;
3757 procedure Set_Component_Size (Id : E; V : U) is
3758 begin
3759 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3760 Set_Uint22 (Id, V);
3761 end Set_Component_Size;
3763 procedure Set_Component_Type (Id : E; V : E) is
3764 begin
3765 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3766 Set_Node20 (Id, V);
3767 end Set_Component_Type;
3769 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3770 begin
3771 pragma Assert
3772 (Ekind_In (Id, E_Block,
3773 E_Function,
3774 E_Generic_Function,
3775 E_Generic_Package,
3776 E_Generic_Procedure,
3777 E_Package,
3778 E_Package_Body,
3779 E_Procedure,
3780 E_Subprogram_Body));
3781 Set_Flag279 (Id, V);
3782 end Set_Contains_Ignored_Ghost_Code;
3784 procedure Set_Contract (Id : E; V : N) is
3785 begin
3786 pragma Assert
3787 (Ekind_In (Id, E_Constant,
3788 E_Entry,
3789 E_Entry_Family,
3790 E_Generic_Package,
3791 E_Package,
3792 E_Package_Body,
3793 E_Subprogram_Body,
3794 E_Variable,
3795 E_Void)
3796 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3797 Set_Node34 (Id, V);
3798 end Set_Contract;
3800 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3801 begin
3802 pragma Assert
3803 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3804 Set_Node18 (Id, V);
3805 end Set_Corresponding_Concurrent_Type;
3807 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3808 begin
3809 pragma Assert (Ekind (Id) = E_Discriminant);
3810 Set_Node19 (Id, V);
3811 end Set_Corresponding_Discriminant;
3813 procedure Set_Corresponding_Equality (Id : E; V : E) is
3814 begin
3815 pragma Assert
3816 (Ekind (Id) = E_Function
3817 and then not Comes_From_Source (Id)
3818 and then Chars (Id) = Name_Op_Ne);
3819 Set_Node30 (Id, V);
3820 end Set_Corresponding_Equality;
3822 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3823 begin
3824 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3825 Set_Node18 (Id, V);
3826 end Set_Corresponding_Protected_Entry;
3828 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3829 begin
3830 pragma Assert (Is_Concurrent_Type (Id));
3831 Set_Node18 (Id, V);
3832 end Set_Corresponding_Record_Type;
3834 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3835 begin
3836 Set_Node22 (Id, V);
3837 end Set_Corresponding_Remote_Type;
3839 procedure Set_Current_Use_Clause (Id : E; V : E) is
3840 begin
3841 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3842 Set_Node27 (Id, V);
3843 end Set_Current_Use_Clause;
3845 procedure Set_Current_Value (Id : E; V : N) is
3846 begin
3847 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3848 Set_Node9 (Id, V);
3849 end Set_Current_Value;
3851 procedure Set_CR_Discriminant (Id : E; V : E) is
3852 begin
3853 Set_Node23 (Id, V);
3854 end Set_CR_Discriminant;
3856 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3857 begin
3858 Set_Flag166 (Id, V);
3859 end Set_Debug_Info_Off;
3861 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3862 begin
3863 Set_Node25 (Id, V);
3864 end Set_Debug_Renaming_Link;
3866 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3867 begin
3868 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3869 Set_Node19 (Id, V);
3870 end Set_Default_Aspect_Component_Value;
3872 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3873 begin
3874 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3875 Set_Node19 (Id, V);
3876 end Set_Default_Aspect_Value;
3878 procedure Set_Default_Expr_Function (Id : E; V : E) is
3879 begin
3880 pragma Assert (Is_Formal (Id));
3881 Set_Node21 (Id, V);
3882 end Set_Default_Expr_Function;
3884 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3885 begin
3886 Set_Flag108 (Id, V);
3887 end Set_Default_Expressions_Processed;
3889 procedure Set_Default_Value (Id : E; V : N) is
3890 begin
3891 pragma Assert (Is_Formal (Id));
3892 Set_Node20 (Id, V);
3893 end Set_Default_Value;
3895 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3896 begin
3897 pragma Assert
3898 (Is_Subprogram (Id)
3899 or else Is_Task_Type (Id)
3900 or else Ekind (Id) = E_Block);
3901 Set_Flag114 (Id, V);
3902 end Set_Delay_Cleanups;
3904 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3905 begin
3906 pragma Assert
3907 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3909 Set_Flag50 (Id, V);
3910 end Set_Delay_Subprogram_Descriptors;
3912 procedure Set_Delta_Value (Id : E; V : R) is
3913 begin
3914 pragma Assert (Is_Fixed_Point_Type (Id));
3915 Set_Ureal18 (Id, V);
3916 end Set_Delta_Value;
3918 procedure Set_Dependent_Instances (Id : E; V : L) is
3919 begin
3920 pragma Assert (Is_Generic_Instance (Id));
3921 Set_Elist8 (Id, V);
3922 end Set_Dependent_Instances;
3924 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3925 begin
3926 pragma Assert (Nkind (Id) in N_Entity);
3927 Set_Flag14 (Id, V);
3928 end Set_Depends_On_Private;
3930 procedure Set_Derived_Type_Link (Id : E; V : E) is
3931 begin
3932 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3933 Set_Node31 (Id, V);
3934 end Set_Derived_Type_Link;
3936 procedure Set_Digits_Value (Id : E; V : U) is
3937 begin
3938 pragma Assert
3939 (Is_Floating_Point_Type (Id)
3940 or else Is_Decimal_Fixed_Point_Type (Id));
3941 Set_Uint17 (Id, V);
3942 end Set_Digits_Value;
3944 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3945 begin
3946 Set_Node20 (Id, V);
3947 end Set_Directly_Designated_Type;
3949 procedure Set_Disable_Controlled (Id : E; V : B := True) is
3950 begin
3951 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3952 Set_Flag253 (Id, V);
3953 end Set_Disable_Controlled;
3955 procedure Set_Discard_Names (Id : E; V : B := True) is
3956 begin
3957 Set_Flag88 (Id, V);
3958 end Set_Discard_Names;
3960 procedure Set_Discriminal (Id : E; V : E) is
3961 begin
3962 pragma Assert (Ekind (Id) = E_Discriminant);
3963 Set_Node17 (Id, V);
3964 end Set_Discriminal;
3966 procedure Set_Discriminal_Link (Id : E; V : E) is
3967 begin
3968 Set_Node10 (Id, V);
3969 end Set_Discriminal_Link;
3971 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3972 begin
3973 pragma Assert (Ekind (Id) = E_Component);
3974 Set_Node20 (Id, V);
3975 end Set_Discriminant_Checking_Func;
3977 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3978 begin
3979 pragma Assert (Nkind (Id) in N_Entity);
3980 Set_Elist21 (Id, V);
3981 end Set_Discriminant_Constraint;
3983 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3984 begin
3985 Set_Node20 (Id, V);
3986 end Set_Discriminant_Default_Value;
3988 procedure Set_Discriminant_Number (Id : E; V : U) is
3989 begin
3990 Set_Uint15 (Id, V);
3991 end Set_Discriminant_Number;
3993 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3994 begin
3995 pragma Assert (Ekind (Id) = E_Record_Type
3996 and then Id = Implementation_Base_Type (Id));
3997 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3998 Set_Elist26 (Id, V);
3999 end Set_Dispatch_Table_Wrappers;
4001 procedure Set_DT_Entry_Count (Id : E; V : U) is
4002 begin
4003 pragma Assert (Ekind (Id) = E_Component);
4004 Set_Uint15 (Id, V);
4005 end Set_DT_Entry_Count;
4007 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4008 begin
4009 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4010 Set_Node25 (Id, V);
4011 end Set_DT_Offset_To_Top_Func;
4013 procedure Set_DT_Position (Id : E; V : U) is
4014 begin
4015 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4016 Set_Uint15 (Id, V);
4017 end Set_DT_Position;
4019 procedure Set_DTC_Entity (Id : E; V : E) is
4020 begin
4021 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4022 Set_Node16 (Id, V);
4023 end Set_DTC_Entity;
4025 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4026 begin
4027 pragma Assert (Ekind (Id) = E_Package);
4028 Set_Flag210 (Id, V);
4029 end Set_Elaborate_Body_Desirable;
4031 procedure Set_Elaboration_Entity (Id : E; V : E) is
4032 begin
4033 pragma Assert
4034 (Is_Subprogram (Id)
4035 or else
4036 Ekind (Id) = E_Package
4037 or else
4038 Is_Generic_Unit (Id));
4039 Set_Node13 (Id, V);
4040 end Set_Elaboration_Entity;
4042 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4043 begin
4044 pragma Assert
4045 (Is_Subprogram (Id)
4046 or else
4047 Ekind (Id) = E_Package
4048 or else
4049 Is_Generic_Unit (Id));
4050 Set_Flag174 (Id, V);
4051 end Set_Elaboration_Entity_Required;
4053 procedure Set_Encapsulating_State (Id : E; V : E) is
4054 begin
4055 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4056 Set_Node32 (Id, V);
4057 end Set_Encapsulating_State;
4059 procedure Set_Enclosing_Scope (Id : E; V : E) is
4060 begin
4061 Set_Node18 (Id, V);
4062 end Set_Enclosing_Scope;
4064 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4065 begin
4066 pragma Assert (Is_Entry (Id));
4067 Set_Flag152 (Id, V);
4068 end Set_Entry_Accepted;
4070 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4071 begin
4072 Set_Node19 (Id, V);
4073 end Set_Entry_Bodies_Array;
4075 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4076 begin
4077 Set_Node23 (Id, V);
4078 end Set_Entry_Cancel_Parameter;
4080 procedure Set_Entry_Component (Id : E; V : E) is
4081 begin
4082 Set_Node11 (Id, V);
4083 end Set_Entry_Component;
4085 procedure Set_Entry_Formal (Id : E; V : E) is
4086 begin
4087 Set_Node16 (Id, V);
4088 end Set_Entry_Formal;
4090 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4091 begin
4092 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4093 Set_Node18 (Id, V);
4094 end Set_Entry_Index_Constant;
4096 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4097 begin
4098 Set_Node15 (Id, V);
4099 end Set_Entry_Parameters_Type;
4101 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4102 begin
4103 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4104 Set_Node23 (Id, V);
4105 end Set_Enum_Pos_To_Rep;
4107 procedure Set_Enumeration_Pos (Id : E; V : U) is
4108 begin
4109 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4110 Set_Uint11 (Id, V);
4111 end Set_Enumeration_Pos;
4113 procedure Set_Enumeration_Rep (Id : E; V : U) is
4114 begin
4115 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4116 Set_Uint12 (Id, V);
4117 end Set_Enumeration_Rep;
4119 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4120 begin
4121 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4122 Set_Node22 (Id, V);
4123 end Set_Enumeration_Rep_Expr;
4125 procedure Set_Equivalent_Type (Id : E; V : E) is
4126 begin
4127 pragma Assert
4128 (Ekind_In (Id, E_Class_Wide_Type,
4129 E_Class_Wide_Subtype,
4130 E_Access_Protected_Subprogram_Type,
4131 E_Anonymous_Access_Protected_Subprogram_Type,
4132 E_Access_Subprogram_Type,
4133 E_Exception_Type));
4134 Set_Node18 (Id, V);
4135 end Set_Equivalent_Type;
4137 procedure Set_Esize (Id : E; V : U) is
4138 begin
4139 Set_Uint12 (Id, V);
4140 end Set_Esize;
4142 procedure Set_Extra_Accessibility (Id : E; V : E) is
4143 begin
4144 pragma Assert
4145 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4146 Set_Node13 (Id, V);
4147 end Set_Extra_Accessibility;
4149 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4150 begin
4151 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4152 Set_Node19 (Id, V);
4153 end Set_Extra_Accessibility_Of_Result;
4155 procedure Set_Extra_Constrained (Id : E; V : E) is
4156 begin
4157 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4158 Set_Node23 (Id, V);
4159 end Set_Extra_Constrained;
4161 procedure Set_Extra_Formal (Id : E; V : E) is
4162 begin
4163 Set_Node15 (Id, V);
4164 end Set_Extra_Formal;
4166 procedure Set_Extra_Formals (Id : E; V : E) is
4167 begin
4168 pragma Assert
4169 (Is_Overloadable (Id)
4170 or else Ekind_In (Id, E_Entry_Family,
4171 E_Subprogram_Body,
4172 E_Subprogram_Type));
4173 Set_Node28 (Id, V);
4174 end Set_Extra_Formals;
4176 procedure Set_Finalization_Master (Id : E; V : E) is
4177 begin
4178 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4179 Set_Node23 (Id, V);
4180 end Set_Finalization_Master;
4182 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4183 begin
4184 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4185 Set_Flag158 (Id, V);
4186 end Set_Finalize_Storage_Only;
4188 procedure Set_Finalizer (Id : E; V : E) is
4189 begin
4190 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4191 Set_Node28 (Id, V);
4192 end Set_Finalizer;
4194 procedure Set_First_Entity (Id : E; V : E) is
4195 begin
4196 Set_Node17 (Id, V);
4197 end Set_First_Entity;
4199 procedure Set_First_Exit_Statement (Id : E; V : N) is
4200 begin
4201 pragma Assert (Ekind (Id) = E_Loop);
4202 Set_Node8 (Id, V);
4203 end Set_First_Exit_Statement;
4205 procedure Set_First_Index (Id : E; V : N) is
4206 begin
4207 pragma Assert (Is_Array_Type (Id));
4208 Set_Node17 (Id, V);
4209 end Set_First_Index;
4211 procedure Set_First_Literal (Id : E; V : E) is
4212 begin
4213 pragma Assert (Is_Enumeration_Type (Id));
4214 Set_Node17 (Id, V);
4215 end Set_First_Literal;
4217 procedure Set_First_Private_Entity (Id : E; V : E) is
4218 begin
4219 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4220 or else Ekind (Id) in Concurrent_Kind);
4221 Set_Node16 (Id, V);
4222 end Set_First_Private_Entity;
4224 procedure Set_First_Rep_Item (Id : E; V : N) is
4225 begin
4226 Set_Node6 (Id, V);
4227 end Set_First_Rep_Item;
4229 procedure Set_Float_Rep (Id : E; V : F) is
4230 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4231 begin
4232 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4233 end Set_Float_Rep;
4235 procedure Set_Freeze_Node (Id : E; V : N) is
4236 begin
4237 Set_Node7 (Id, V);
4238 end Set_Freeze_Node;
4240 procedure Set_From_Limited_With (Id : E; V : B := True) is
4241 begin
4242 pragma Assert
4243 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4244 Set_Flag159 (Id, V);
4245 end Set_From_Limited_With;
4247 procedure Set_Full_View (Id : E; V : E) is
4248 begin
4249 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4250 Set_Node11 (Id, V);
4251 end Set_Full_View;
4253 procedure Set_Generic_Homonym (Id : E; V : E) is
4254 begin
4255 Set_Node11 (Id, V);
4256 end Set_Generic_Homonym;
4258 procedure Set_Generic_Renamings (Id : E; V : L) is
4259 begin
4260 Set_Elist23 (Id, V);
4261 end Set_Generic_Renamings;
4263 procedure Set_Handler_Records (Id : E; V : S) is
4264 begin
4265 Set_List10 (Id, V);
4266 end Set_Handler_Records;
4268 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4269 begin
4270 pragma Assert (Id = Base_Type (Id));
4271 Set_Flag135 (Id, V);
4272 end Set_Has_Aliased_Components;
4274 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4275 begin
4276 Set_Flag46 (Id, V);
4277 end Set_Has_Alignment_Clause;
4279 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4280 begin
4281 Set_Flag79 (Id, V);
4282 end Set_Has_All_Calls_Remote;
4284 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4285 begin
4286 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4287 Set_Flag86 (Id, V);
4288 end Set_Has_Atomic_Components;
4290 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4291 begin
4292 pragma Assert
4293 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4294 Set_Flag139 (Id, V);
4295 end Set_Has_Biased_Representation;
4297 procedure Set_Has_Completion (Id : E; V : B := True) is
4298 begin
4299 Set_Flag26 (Id, V);
4300 end Set_Has_Completion;
4302 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4303 begin
4304 pragma Assert (Is_Type (Id));
4305 Set_Flag71 (Id, V);
4306 end Set_Has_Completion_In_Body;
4308 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4309 begin
4310 pragma Assert (Ekind (Id) = E_Record_Type);
4311 Set_Flag140 (Id, V);
4312 end Set_Has_Complex_Representation;
4314 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4315 begin
4316 pragma Assert (Ekind (Id) = E_Array_Type);
4317 Set_Flag68 (Id, V);
4318 end Set_Has_Component_Size_Clause;
4320 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4321 begin
4322 pragma Assert (Is_Type (Id));
4323 Set_Flag187 (Id, V);
4324 end Set_Has_Constrained_Partial_View;
4326 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4327 begin
4328 Set_Flag181 (Id, V);
4329 end Set_Has_Contiguous_Rep;
4331 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4332 begin
4333 pragma Assert (Id = Base_Type (Id));
4334 Set_Flag43 (Id, V);
4335 end Set_Has_Controlled_Component;
4337 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4338 begin
4339 Set_Flag98 (Id, V);
4340 end Set_Has_Controlling_Result;
4342 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4343 begin
4344 Set_Flag119 (Id, V);
4345 end Set_Has_Convention_Pragma;
4347 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4348 begin
4349 pragma Assert
4350 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4351 and then Is_Base_Type (Id));
4352 Set_Flag39 (Id, V);
4353 end Set_Has_Default_Aspect;
4355 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4356 begin
4357 pragma Assert (Is_Type (Id));
4358 Set_Flag3 (Base_Type (Id), V);
4359 end Set_Has_Default_Init_Cond;
4361 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4362 begin
4363 pragma Assert (Nkind (Id) in N_Entity);
4364 Set_Flag200 (Id, V);
4365 end Set_Has_Delayed_Aspects;
4367 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4368 begin
4369 pragma Assert (Nkind (Id) in N_Entity);
4370 Set_Flag18 (Id, V);
4371 end Set_Has_Delayed_Freeze;
4373 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4374 begin
4375 pragma Assert (Nkind (Id) in N_Entity);
4376 Set_Flag261 (Id, V);
4377 end Set_Has_Delayed_Rep_Aspects;
4379 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4380 begin
4381 pragma Assert (Nkind (Id) in N_Entity);
4382 Set_Flag5 (Id, V);
4383 end Set_Has_Discriminants;
4385 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4386 begin
4387 pragma Assert (Ekind (Id) = E_Record_Type
4388 and then Is_Tagged_Type (Id));
4389 Set_Flag220 (Id, V);
4390 end Set_Has_Dispatch_Table;
4392 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4393 begin
4394 pragma Assert (Is_Type (Id));
4395 Set_Flag258 (Id, V);
4396 end Set_Has_Dynamic_Predicate_Aspect;
4398 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4399 begin
4400 pragma Assert (Is_Enumeration_Type (Id));
4401 Set_Flag66 (Id, V);
4402 end Set_Has_Enumeration_Rep_Clause;
4404 procedure Set_Has_Exit (Id : E; V : B := True) is
4405 begin
4406 Set_Flag47 (Id, V);
4407 end Set_Has_Exit;
4409 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4410 begin
4411 pragma Assert (Ekind_In (Id, E_Entry,
4412 E_Entry_Family,
4413 E_Function,
4414 E_Procedure));
4415 Set_Flag240 (Id, V);
4416 end Set_Has_Expanded_Contract;
4418 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4419 begin
4420 Set_Flag175 (Id, V);
4421 end Set_Has_Forward_Instantiation;
4423 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4424 begin
4425 Set_Flag173 (Id, V);
4426 end Set_Has_Fully_Qualified_Name;
4428 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4429 begin
4430 Set_Flag82 (Id, V);
4431 end Set_Has_Gigi_Rep_Item;
4433 procedure Set_Has_Homonym (Id : E; V : B := True) is
4434 begin
4435 Set_Flag56 (Id, V);
4436 end Set_Has_Homonym;
4438 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4439 begin
4440 Set_Flag251 (Id, V);
4441 end Set_Has_Implicit_Dereference;
4443 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4444 begin
4445 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4446 Set_Flag34 (Id, V);
4447 end Set_Has_Independent_Components;
4449 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4450 begin
4451 pragma Assert (Is_Type (Id));
4452 Set_Flag248 (Id, V);
4453 end Set_Has_Inheritable_Invariants;
4455 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4456 begin
4457 pragma Assert (Is_Type (Id));
4458 Set_Flag133 (Base_Type (Id), V);
4459 end Set_Has_Inherited_Default_Init_Cond;
4461 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4462 begin
4463 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4464 Set_Flag219 (Id, V);
4465 end Set_Has_Initial_Value;
4467 procedure Set_Has_Invariants (Id : E; V : B := True) is
4468 begin
4469 pragma Assert (Is_Type (Id));
4470 Set_Flag232 (Id, V);
4471 end Set_Has_Invariants;
4473 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4474 begin
4475 pragma Assert (Ekind (Id) = E_Loop);
4476 Set_Flag260 (Id, V);
4477 end Set_Has_Loop_Entry_Attributes;
4479 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4480 begin
4481 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4482 Set_Flag83 (Id, V);
4483 end Set_Has_Machine_Radix_Clause;
4485 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4486 begin
4487 Set_Flag21 (Id, V);
4488 end Set_Has_Master_Entity;
4490 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4491 begin
4492 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4493 Set_Flag142 (Id, V);
4494 end Set_Has_Missing_Return;
4496 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4497 begin
4498 Set_Flag101 (Id, V);
4499 end Set_Has_Nested_Block_With_Handler;
4501 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4502 begin
4503 pragma Assert (Is_Subprogram (Id));
4504 Set_Flag282 (Id, V);
4505 end Set_Has_Nested_Subprogram;
4507 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4508 begin
4509 pragma Assert (Id = Base_Type (Id));
4510 Set_Flag75 (Id, V);
4511 end Set_Has_Non_Standard_Rep;
4513 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4514 begin
4515 pragma Assert (Is_Type (Id));
4516 Set_Flag172 (Id, V);
4517 end Set_Has_Object_Size_Clause;
4519 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4520 begin
4521 pragma Assert
4522 (Ekind_In (Id, E_Entry, E_Entry_Family)
4523 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4524 Set_Flag110 (Id, V);
4525 end Set_Has_Out_Or_In_Out_Parameter;
4527 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4528 begin
4529 Set_Flag154 (Id, V);
4530 end Set_Has_Per_Object_Constraint;
4532 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4533 begin
4534 pragma Assert (Is_Access_Type (Id));
4535 Set_Flag27 (Base_Type (Id), V);
4536 end Set_Has_Pragma_Controlled;
4538 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4539 begin
4540 Set_Flag150 (Id, V);
4541 end Set_Has_Pragma_Elaborate_Body;
4543 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4544 begin
4545 Set_Flag157 (Id, V);
4546 end Set_Has_Pragma_Inline;
4548 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4549 begin
4550 Set_Flag230 (Id, V);
4551 end Set_Has_Pragma_Inline_Always;
4553 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4554 begin
4555 Set_Flag201 (Id, V);
4556 end Set_Has_Pragma_No_Inline;
4558 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4559 begin
4560 pragma Assert (Is_Enumeration_Type (Id));
4561 pragma Assert (Id = Base_Type (Id));
4562 Set_Flag198 (Id, V);
4563 end Set_Has_Pragma_Ordered;
4565 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4566 begin
4567 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4568 pragma Assert (Id = Base_Type (Id));
4569 Set_Flag121 (Id, V);
4570 end Set_Has_Pragma_Pack;
4572 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4573 begin
4574 Set_Flag221 (Id, V);
4575 end Set_Has_Pragma_Preelab_Init;
4577 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4578 begin
4579 Set_Flag203 (Id, V);
4580 end Set_Has_Pragma_Pure;
4582 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4583 begin
4584 Set_Flag179 (Id, V);
4585 end Set_Has_Pragma_Pure_Function;
4587 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4588 begin
4589 Set_Flag169 (Id, V);
4590 end Set_Has_Pragma_Thread_Local_Storage;
4592 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4593 begin
4594 Set_Flag233 (Id, V);
4595 end Set_Has_Pragma_Unmodified;
4597 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4598 begin
4599 Set_Flag180 (Id, V);
4600 end Set_Has_Pragma_Unreferenced;
4602 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4603 begin
4604 pragma Assert (Is_Type (Id));
4605 Set_Flag212 (Id, V);
4606 end Set_Has_Pragma_Unreferenced_Objects;
4608 procedure Set_Has_Predicates (Id : E; V : B := True) is
4609 begin
4610 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4611 Set_Flag250 (Id, V);
4612 end Set_Has_Predicates;
4614 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4615 begin
4616 pragma Assert (Id = Base_Type (Id));
4617 Set_Flag120 (Id, V);
4618 end Set_Has_Primitive_Operations;
4620 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4621 begin
4622 pragma Assert (Is_Type (Id));
4623 Set_Flag151 (Id, V);
4624 end Set_Has_Private_Ancestor;
4626 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4627 begin
4628 Set_Flag155 (Id, V);
4629 end Set_Has_Private_Declaration;
4631 procedure Set_Has_Protected (Id : E; V : B := True) is
4632 begin
4633 Set_Flag271 (Id, V);
4634 end Set_Has_Protected;
4636 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4637 begin
4638 Set_Flag161 (Id, V);
4639 end Set_Has_Qualified_Name;
4641 procedure Set_Has_RACW (Id : E; V : B := True) is
4642 begin
4643 pragma Assert (Ekind (Id) = E_Package);
4644 Set_Flag214 (Id, V);
4645 end Set_Has_RACW;
4647 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4648 begin
4649 pragma Assert (Id = Base_Type (Id));
4650 Set_Flag65 (Id, V);
4651 end Set_Has_Record_Rep_Clause;
4653 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4654 begin
4655 pragma Assert (Is_Subprogram (Id));
4656 Set_Flag143 (Id, V);
4657 end Set_Has_Recursive_Call;
4659 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4660 begin
4661 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4662 Set_Flag267 (Id, V);
4663 end Set_Has_Shift_Operator;
4665 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4666 begin
4667 Set_Flag29 (Id, V);
4668 end Set_Has_Size_Clause;
4670 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4671 begin
4672 Set_Flag67 (Id, V);
4673 end Set_Has_Small_Clause;
4675 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4676 begin
4677 pragma Assert (Id = Base_Type (Id));
4678 Set_Flag100 (Id, V);
4679 end Set_Has_Specified_Layout;
4681 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4682 begin
4683 pragma Assert (Is_Type (Id));
4684 Set_Flag190 (Id, V);
4685 end Set_Has_Specified_Stream_Input;
4687 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4688 begin
4689 pragma Assert (Is_Type (Id));
4690 Set_Flag191 (Id, V);
4691 end Set_Has_Specified_Stream_Output;
4693 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4694 begin
4695 pragma Assert (Is_Type (Id));
4696 Set_Flag192 (Id, V);
4697 end Set_Has_Specified_Stream_Read;
4699 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4700 begin
4701 pragma Assert (Is_Type (Id));
4702 Set_Flag193 (Id, V);
4703 end Set_Has_Specified_Stream_Write;
4705 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4706 begin
4707 Set_Flag211 (Id, V);
4708 end Set_Has_Static_Discriminants;
4710 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4711 begin
4712 pragma Assert (Is_Type (Id));
4713 Set_Flag269 (Id, V);
4714 end Set_Has_Static_Predicate;
4716 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4717 begin
4718 pragma Assert (Is_Type (Id));
4719 Set_Flag259 (Id, V);
4720 end Set_Has_Static_Predicate_Aspect;
4722 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4723 begin
4724 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4725 pragma Assert (Id = Base_Type (Id));
4726 Set_Flag23 (Id, V);
4727 end Set_Has_Storage_Size_Clause;
4729 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4730 begin
4731 pragma Assert (Is_Elementary_Type (Id));
4732 Set_Flag184 (Id, V);
4733 end Set_Has_Stream_Size_Clause;
4735 procedure Set_Has_Task (Id : E; V : B := True) is
4736 begin
4737 pragma Assert (Id = Base_Type (Id));
4738 Set_Flag30 (Id, V);
4739 end Set_Has_Task;
4741 procedure Set_Has_Thunks (Id : E; V : B := True) is
4742 begin
4743 pragma Assert (Is_Tag (Id));
4744 Set_Flag228 (Id, V);
4745 end Set_Has_Thunks;
4747 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4748 begin
4749 pragma Assert (Id = Base_Type (Id));
4750 Set_Flag123 (Id, V);
4751 end Set_Has_Unchecked_Union;
4753 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4754 begin
4755 pragma Assert (Is_Type (Id));
4756 Set_Flag72 (Id, V);
4757 end Set_Has_Unknown_Discriminants;
4759 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4760 begin
4761 Set_Flag215 (Id, V);
4762 end Set_Has_Uplevel_Reference;
4764 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4765 begin
4766 pragma Assert (Ekind (Id) = E_Abstract_State);
4767 Set_Flag263 (Id, V);
4768 end Set_Has_Visible_Refinement;
4770 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4771 begin
4772 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4773 Set_Flag87 (Id, V);
4774 end Set_Has_Volatile_Components;
4776 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4777 begin
4778 Set_Flag182 (Id, V);
4779 end Set_Has_Xref_Entry;
4781 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4782 begin
4783 pragma Assert (Ekind (Id) = E_Variable);
4784 Set_Node8 (Id, V);
4785 end Set_Hiding_Loop_Variable;
4787 procedure Set_Homonym (Id : E; V : E) is
4788 begin
4789 pragma Assert (Id /= V);
4790 Set_Node4 (Id, V);
4791 end Set_Homonym;
4793 procedure Set_Incomplete_Actuals (Id : E; V : L) is
4794 begin
4795 pragma Assert (Ekind (Id) = E_Package);
4796 Set_Elist24 (Id, V);
4797 end Set_Incomplete_Actuals;
4799 procedure Set_Import_Pragma (Id : E; V : E) is
4800 begin
4801 pragma Assert (Is_Subprogram (Id));
4802 Set_Node35 (Id, V);
4803 end Set_Import_Pragma;
4805 procedure Set_Interface_Alias (Id : E; V : E) is
4806 begin
4807 pragma Assert
4808 (Is_Internal (Id)
4809 and then Is_Hidden (Id)
4810 and then (Ekind_In (Id, E_Procedure, E_Function)));
4811 Set_Node25 (Id, V);
4812 end Set_Interface_Alias;
4814 procedure Set_Interfaces (Id : E; V : L) is
4815 begin
4816 pragma Assert (Is_Record_Type (Id));
4817 Set_Elist25 (Id, V);
4818 end Set_Interfaces;
4820 procedure Set_In_Package_Body (Id : E; V : B := True) is
4821 begin
4822 Set_Flag48 (Id, V);
4823 end Set_In_Package_Body;
4825 procedure Set_In_Private_Part (Id : E; V : B := True) is
4826 begin
4827 Set_Flag45 (Id, V);
4828 end Set_In_Private_Part;
4830 procedure Set_In_Use (Id : E; V : B := True) is
4831 begin
4832 pragma Assert (Nkind (Id) in N_Entity);
4833 Set_Flag8 (Id, V);
4834 end Set_In_Use;
4836 procedure Set_Initialization_Statements (Id : E; V : N) is
4837 begin
4838 -- Tolerate an E_Void entity since this can be called while resolving
4839 -- an aggregate used as the initialization expression for an object
4840 -- declaration, and this occurs before the Ekind for the object is set.
4842 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4843 Set_Node28 (Id, V);
4844 end Set_Initialization_Statements;
4846 procedure Set_Inner_Instances (Id : E; V : L) is
4847 begin
4848 Set_Elist23 (Id, V);
4849 end Set_Inner_Instances;
4851 procedure Set_Interface_Name (Id : E; V : N) is
4852 begin
4853 Set_Node21 (Id, V);
4854 end Set_Interface_Name;
4856 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4857 begin
4858 pragma Assert (Is_Overloadable (Id));
4859 Set_Flag19 (Id, V);
4860 end Set_Is_Abstract_Subprogram;
4862 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4863 begin
4864 pragma Assert (Is_Type (Id));
4865 Set_Flag146 (Id, V);
4866 end Set_Is_Abstract_Type;
4868 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4869 begin
4870 pragma Assert (Is_Access_Type (Id));
4871 Set_Flag194 (Id, V);
4872 end Set_Is_Local_Anonymous_Access;
4874 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4875 begin
4876 pragma Assert (Is_Access_Type (Id));
4877 Set_Flag69 (Id, V);
4878 end Set_Is_Access_Constant;
4880 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4881 begin
4882 Set_Flag185 (Id, V);
4883 end Set_Is_Ada_2005_Only;
4885 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4886 begin
4887 Set_Flag199 (Id, V);
4888 end Set_Is_Ada_2012_Only;
4890 procedure Set_Is_Aliased (Id : E; V : B := True) is
4891 begin
4892 pragma Assert (Nkind (Id) in N_Entity);
4893 Set_Flag15 (Id, V);
4894 end Set_Is_Aliased;
4896 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4897 begin
4898 pragma Assert
4899 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4900 Set_Flag81 (Id, V);
4901 end Set_Is_Asynchronous;
4903 procedure Set_Is_Atomic (Id : E; V : B := True) is
4904 begin
4905 Set_Flag85 (Id, V);
4906 end Set_Is_Atomic;
4908 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4909 begin
4910 pragma Assert ((not V)
4911 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4912 Set_Flag122 (Id, V);
4913 end Set_Is_Bit_Packed_Array;
4915 procedure Set_Is_Called (Id : E; V : B := True) is
4916 begin
4917 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4918 Set_Flag102 (Id, V);
4919 end Set_Is_Called;
4921 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4922 begin
4923 Set_Flag63 (Id, V);
4924 end Set_Is_Character_Type;
4926 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4927 begin
4928 pragma Assert (Is_Formal (Id)
4929 or else Is_Object (Id)
4930 or else Is_Package_Or_Generic_Package (Id)
4931 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4932 or else Is_Type (Id)
4933 or else Ekind (Id) = E_Abstract_State
4934 or else Ekind (Id) = E_Component
4935 or else Ekind (Id) = E_Discriminant
4936 or else Ekind (Id) = E_Exception
4937 or else Ekind (Id) = E_Package_Body
4938 or else Ekind (Id) = E_Subprogram_Body
4940 -- Allow this attribute to appear on non-analyzed entities
4942 or else Ekind (Id) = E_Void);
4943 Set_Flag277 (Id, V);
4944 end Set_Is_Checked_Ghost_Entity;
4946 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4947 begin
4948 Set_Flag73 (Id, V);
4949 end Set_Is_Child_Unit;
4951 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4952 begin
4953 Set_Flag35 (Id, V);
4954 end Set_Is_Class_Wide_Equivalent_Type;
4956 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4957 begin
4958 Set_Flag149 (Id, V);
4959 end Set_Is_Compilation_Unit;
4961 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4962 begin
4963 pragma Assert (Ekind (Id) = E_Discriminant);
4964 Set_Flag103 (Id, V);
4965 end Set_Is_Completely_Hidden;
4967 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4968 begin
4969 Set_Flag20 (Id, V);
4970 end Set_Is_Concurrent_Record_Type;
4972 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4973 begin
4974 Set_Flag80 (Id, V);
4975 end Set_Is_Constr_Subt_For_U_Nominal;
4977 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4978 begin
4979 Set_Flag141 (Id, V);
4980 end Set_Is_Constr_Subt_For_UN_Aliased;
4982 procedure Set_Is_Constrained (Id : E; V : B := True) is
4983 begin
4984 pragma Assert (Nkind (Id) in N_Entity);
4985 Set_Flag12 (Id, V);
4986 end Set_Is_Constrained;
4988 procedure Set_Is_Constructor (Id : E; V : B := True) is
4989 begin
4990 Set_Flag76 (Id, V);
4991 end Set_Is_Constructor;
4993 procedure Set_Is_Controlled (Id : E; V : B := True) is
4994 begin
4995 pragma Assert (Id = Base_Type (Id));
4996 Set_Flag42 (Id, V);
4997 end Set_Is_Controlled;
4999 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5000 begin
5001 pragma Assert (Is_Formal (Id));
5002 Set_Flag97 (Id, V);
5003 end Set_Is_Controlling_Formal;
5005 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5006 begin
5007 Set_Flag74 (Id, V);
5008 end Set_Is_CPP_Class;
5010 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
5011 begin
5012 pragma Assert (Ekind (Id) = E_Procedure);
5013 Set_Flag132 (Id, V);
5014 end Set_Is_Default_Init_Cond_Procedure;
5016 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
5017 begin
5018 pragma Assert (Is_Type (Id));
5019 Set_Flag223 (Id, V);
5020 end Set_Is_Descendent_Of_Address;
5022 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5023 begin
5024 Set_Flag176 (Id, V);
5025 end Set_Is_Discrim_SO_Function;
5027 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5028 begin
5029 Set_Flag264 (Id, V);
5030 end Set_Is_Discriminant_Check_Function;
5032 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5033 begin
5034 Set_Flag234 (Id, V);
5035 end Set_Is_Dispatch_Table_Entity;
5037 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5038 begin
5039 pragma Assert
5040 (V = False
5041 or else
5042 Is_Overloadable (Id)
5043 or else
5044 Ekind (Id) = E_Subprogram_Type);
5046 Set_Flag6 (Id, V);
5047 end Set_Is_Dispatching_Operation;
5049 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5050 begin
5051 Set_Flag124 (Id, V);
5052 end Set_Is_Eliminated;
5054 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5055 begin
5056 Set_Flag52 (Id, V);
5057 end Set_Is_Entry_Formal;
5059 procedure Set_Is_Exported (Id : E; V : B := True) is
5060 begin
5061 Set_Flag99 (Id, V);
5062 end Set_Is_Exported;
5064 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5065 begin
5066 Set_Flag70 (Id, V);
5067 end Set_Is_First_Subtype;
5069 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5070 begin
5071 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5072 Set_Flag118 (Id, V);
5073 end Set_Is_For_Access_Subtype;
5075 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5076 begin
5077 Set_Flag111 (Id, V);
5078 end Set_Is_Formal_Subprogram;
5080 procedure Set_Is_Frozen (Id : E; V : B := True) is
5081 begin
5082 pragma Assert (Nkind (Id) in N_Entity);
5083 Set_Flag4 (Id, V);
5084 end Set_Is_Frozen;
5086 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5087 begin
5088 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5089 Set_Flag274 (Id, V);
5090 end Set_Is_Generic_Actual_Subprogram;
5092 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5093 begin
5094 pragma Assert (Is_Type (Id));
5095 Set_Flag94 (Id, V);
5096 end Set_Is_Generic_Actual_Type;
5098 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5099 begin
5100 Set_Flag130 (Id, V);
5101 end Set_Is_Generic_Instance;
5103 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5104 begin
5105 pragma Assert (Nkind (Id) in N_Entity);
5106 Set_Flag13 (Id, V);
5107 end Set_Is_Generic_Type;
5109 procedure Set_Is_Hidden (Id : E; V : B := True) is
5110 begin
5111 Set_Flag57 (Id, V);
5112 end Set_Is_Hidden;
5114 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5115 begin
5116 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5117 Set_Flag2 (Id, V);
5118 end Set_Is_Hidden_Non_Overridden_Subpgm;
5120 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5121 begin
5122 Set_Flag171 (Id, V);
5123 end Set_Is_Hidden_Open_Scope;
5125 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5126 begin
5127 pragma Assert (Is_Formal (Id)
5128 or else Is_Object (Id)
5129 or else Is_Package_Or_Generic_Package (Id)
5130 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5131 or else Is_Type (Id)
5132 or else Ekind (Id) = E_Abstract_State
5133 or else Ekind (Id) = E_Component
5134 or else Ekind (Id) = E_Discriminant
5135 or else Ekind (Id) = E_Exception
5136 or else Ekind (Id) = E_Package_Body
5137 or else Ekind (Id) = E_Subprogram_Body
5139 -- Allow this attribute to appear on non-analyzed entities
5141 or else Ekind (Id) = E_Void);
5142 Set_Flag278 (Id, V);
5143 end Set_Is_Ignored_Ghost_Entity;
5145 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5146 begin
5147 pragma Assert (Nkind (Id) in N_Entity);
5148 Set_Flag7 (Id, V);
5149 end Set_Is_Immediately_Visible;
5151 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5152 begin
5153 Set_Flag254 (Id, V);
5154 end Set_Is_Implementation_Defined;
5156 procedure Set_Is_Imported (Id : E; V : B := True) is
5157 begin
5158 Set_Flag24 (Id, V);
5159 end Set_Is_Imported;
5161 procedure Set_Is_Independent (Id : E; V : B := True) is
5162 begin
5163 Set_Flag268 (Id, V);
5164 end Set_Is_Independent;
5166 procedure Set_Is_Inlined (Id : E; V : B := True) is
5167 begin
5168 Set_Flag11 (Id, V);
5169 end Set_Is_Inlined;
5171 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5172 begin
5173 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5174 Set_Flag1 (Id, V);
5175 end Set_Is_Inlined_Always;
5177 procedure Set_Is_Interface (Id : E; V : B := True) is
5178 begin
5179 pragma Assert (Is_Record_Type (Id));
5180 Set_Flag186 (Id, V);
5181 end Set_Is_Interface;
5183 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5184 begin
5185 Set_Flag126 (Id, V);
5186 end Set_Is_Instantiated;
5188 procedure Set_Is_Internal (Id : E; V : B := True) is
5189 begin
5190 pragma Assert (Nkind (Id) in N_Entity);
5191 Set_Flag17 (Id, V);
5192 end Set_Is_Internal;
5194 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5195 begin
5196 pragma Assert (Nkind (Id) in N_Entity);
5197 Set_Flag89 (Id, V);
5198 end Set_Is_Interrupt_Handler;
5200 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5201 begin
5202 Set_Flag64 (Id, V);
5203 end Set_Is_Intrinsic_Subprogram;
5205 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5206 begin
5207 pragma Assert (Ekind (Id) = E_Procedure);
5208 Set_Flag257 (Id, V);
5209 end Set_Is_Invariant_Procedure;
5211 procedure Set_Is_Itype (Id : E; V : B := True) is
5212 begin
5213 Set_Flag91 (Id, V);
5214 end Set_Is_Itype;
5216 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5217 begin
5218 Set_Flag37 (Id, V);
5219 end Set_Is_Known_Non_Null;
5221 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5222 begin
5223 Set_Flag204 (Id, V);
5224 end Set_Is_Known_Null;
5226 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5227 begin
5228 Set_Flag170 (Id, V);
5229 end Set_Is_Known_Valid;
5231 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5232 begin
5233 pragma Assert (Is_Type (Id));
5234 Set_Flag106 (Id, V);
5235 end Set_Is_Limited_Composite;
5237 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5238 begin
5239 pragma Assert (Is_Interface (Id));
5240 Set_Flag197 (Id, V);
5241 end Set_Is_Limited_Interface;
5243 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5244 begin
5245 Set_Flag25 (Id, V);
5246 end Set_Is_Limited_Record;
5248 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5249 begin
5250 pragma Assert (Is_Subprogram (Id));
5251 Set_Flag137 (Id, V);
5252 end Set_Is_Machine_Code_Subprogram;
5254 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5255 begin
5256 pragma Assert (Is_Type (Id));
5257 Set_Flag109 (Id, V);
5258 end Set_Is_Non_Static_Subtype;
5260 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5261 begin
5262 pragma Assert (Ekind (Id) = E_Procedure);
5263 Set_Flag178 (Id, V);
5264 end Set_Is_Null_Init_Proc;
5266 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5267 begin
5268 Set_Flag153 (Id, V);
5269 end Set_Is_Obsolescent;
5271 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5272 begin
5273 pragma Assert (Ekind (Id) = E_Out_Parameter);
5274 Set_Flag226 (Id, V);
5275 end Set_Is_Only_Out_Parameter;
5277 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5278 begin
5279 Set_Flag160 (Id, V);
5280 end Set_Is_Package_Body_Entity;
5282 procedure Set_Is_Packed (Id : E; V : B := True) is
5283 begin
5284 pragma Assert (Id = Base_Type (Id));
5285 Set_Flag51 (Id, V);
5286 end Set_Is_Packed;
5288 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5289 begin
5290 Set_Flag138 (Id, V);
5291 end Set_Is_Packed_Array_Impl_Type;
5293 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5294 begin
5295 pragma Assert (Nkind (Id) in N_Entity);
5296 Set_Flag9 (Id, V);
5297 end Set_Is_Potentially_Use_Visible;
5299 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5300 begin
5301 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5302 Set_Flag255 (Id, V);
5303 end Set_Is_Predicate_Function;
5305 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5306 begin
5307 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5308 Set_Flag256 (Id, V);
5309 end Set_Is_Predicate_Function_M;
5311 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5312 begin
5313 Set_Flag59 (Id, V);
5314 end Set_Is_Preelaborated;
5316 procedure Set_Is_Primitive (Id : E; V : B := True) is
5317 begin
5318 pragma Assert
5319 (Is_Overloadable (Id)
5320 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5321 Set_Flag218 (Id, V);
5322 end Set_Is_Primitive;
5324 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5325 begin
5326 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5327 Set_Flag195 (Id, V);
5328 end Set_Is_Primitive_Wrapper;
5330 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5331 begin
5332 pragma Assert (Is_Type (Id));
5333 Set_Flag107 (Id, V);
5334 end Set_Is_Private_Composite;
5336 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5337 begin
5338 Set_Flag53 (Id, V);
5339 end Set_Is_Private_Descendant;
5341 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5342 begin
5343 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5344 Set_Flag245 (Id, V);
5345 end Set_Is_Private_Primitive;
5347 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5348 begin
5349 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5350 Set_Flag252 (Id, V);
5351 end Set_Is_Processed_Transient;
5353 procedure Set_Is_Public (Id : E; V : B := True) is
5354 begin
5355 pragma Assert (Nkind (Id) in N_Entity);
5356 Set_Flag10 (Id, V);
5357 end Set_Is_Public;
5359 procedure Set_Is_Pure (Id : E; V : B := True) is
5360 begin
5361 Set_Flag44 (Id, V);
5362 end Set_Is_Pure;
5364 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5365 begin
5366 pragma Assert (Is_Access_Type (Id));
5367 Set_Flag189 (Id, V);
5368 end Set_Is_Pure_Unit_Access_Type;
5370 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5371 begin
5372 pragma Assert (Is_Type (Id));
5373 Set_Flag244 (Id, V);
5374 end Set_Is_RACW_Stub_Type;
5376 procedure Set_Is_Raised (Id : E; V : B := True) is
5377 begin
5378 pragma Assert (Ekind (Id) = E_Exception);
5379 Set_Flag224 (Id, V);
5380 end Set_Is_Raised;
5382 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5383 begin
5384 Set_Flag62 (Id, V);
5385 end Set_Is_Remote_Call_Interface;
5387 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5388 begin
5389 Set_Flag61 (Id, V);
5390 end Set_Is_Remote_Types;
5392 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5393 begin
5394 Set_Flag112 (Id, V);
5395 end Set_Is_Renaming_Of_Object;
5397 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5398 begin
5399 Set_Flag209 (Id, V);
5400 end Set_Is_Return_Object;
5402 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5403 begin
5404 pragma Assert (Ekind (Id) = E_Variable);
5405 Set_Flag249 (Id, V);
5406 end Set_Is_Safe_To_Reevaluate;
5408 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5409 begin
5410 Set_Flag60 (Id, V);
5411 end Set_Is_Shared_Passive;
5413 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5414 begin
5415 pragma Assert (Is_Type (Id));
5416 Set_Flag281 (Id, V);
5417 end Set_Is_Static_Type;
5419 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5420 begin
5421 pragma Assert
5422 (Is_Type (Id)
5423 or else Ekind_In (Id, E_Exception,
5424 E_Variable,
5425 E_Constant,
5426 E_Void));
5427 Set_Flag28 (Id, V);
5428 end Set_Is_Statically_Allocated;
5430 procedure Set_Is_Tag (Id : E; V : B := True) is
5431 begin
5432 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5433 Set_Flag78 (Id, V);
5434 end Set_Is_Tag;
5436 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5437 begin
5438 Set_Flag55 (Id, V);
5439 end Set_Is_Tagged_Type;
5441 procedure Set_Is_Thunk (Id : E; V : B := True) is
5442 begin
5443 pragma Assert (Is_Subprogram (Id));
5444 Set_Flag225 (Id, V);
5445 end Set_Is_Thunk;
5447 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5448 begin
5449 Set_Flag235 (Id, V);
5450 end Set_Is_Trivial_Subprogram;
5452 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5453 begin
5454 Set_Flag163 (Id, V);
5455 end Set_Is_True_Constant;
5457 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5458 begin
5459 pragma Assert (Id = Base_Type (Id));
5460 Set_Flag117 (Id, V);
5461 end Set_Is_Unchecked_Union;
5463 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5464 begin
5465 pragma Assert (Ekind (Id) = E_Record_Type);
5466 Set_Flag246 (Id, V);
5467 end Set_Is_Underlying_Record_View;
5469 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5470 begin
5471 Set_Flag284 (Id, V);
5472 end Set_Is_Unimplemented;
5474 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5475 begin
5476 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5477 Set_Flag144 (Id, V);
5478 end Set_Is_Unsigned_Type;
5480 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5481 begin
5482 pragma Assert
5483 (Ekind_In (Id, E_Constant, E_Variable)
5484 or else Is_Formal (Id)
5485 or else Is_Type (Id));
5486 Set_Flag283 (Id, V);
5487 end Set_Is_Uplevel_Referenced_Entity;
5489 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5490 begin
5491 pragma Assert (Ekind (Id) = E_Procedure);
5492 Set_Flag127 (Id, V);
5493 end Set_Is_Valued_Procedure;
5495 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5496 begin
5497 Set_Flag206 (Id, V);
5498 end Set_Is_Visible_Formal;
5500 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5501 begin
5502 Set_Flag116 (Id, V);
5503 end Set_Is_Visible_Lib_Unit;
5505 procedure Set_Is_Volatile (Id : E; V : B := True) is
5506 begin
5507 pragma Assert (Nkind (Id) in N_Entity);
5508 Set_Flag16 (Id, V);
5509 end Set_Is_Volatile;
5511 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
5512 begin
5513 Set_Flag285 (Id, V);
5514 end Set_Is_Volatile_Full_Access;
5516 procedure Set_Itype_Printed (Id : E; V : B := True) is
5517 begin
5518 pragma Assert (Is_Itype (Id));
5519 Set_Flag202 (Id, V);
5520 end Set_Itype_Printed;
5522 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5523 begin
5524 Set_Flag32 (Id, V);
5525 end Set_Kill_Elaboration_Checks;
5527 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5528 begin
5529 Set_Flag33 (Id, V);
5530 end Set_Kill_Range_Checks;
5532 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5533 begin
5534 pragma Assert (Is_Type (Id));
5535 Set_Flag207 (Id, V);
5536 end Set_Known_To_Have_Preelab_Init;
5538 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5539 begin
5540 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5541 Set_Node30 (Id, V);
5542 end Set_Last_Aggregate_Assignment;
5544 procedure Set_Last_Assignment (Id : E; V : N) is
5545 begin
5546 pragma Assert (Is_Assignable (Id));
5547 Set_Node26 (Id, V);
5548 end Set_Last_Assignment;
5550 procedure Set_Last_Entity (Id : E; V : E) is
5551 begin
5552 Set_Node20 (Id, V);
5553 end Set_Last_Entity;
5555 procedure Set_Limited_View (Id : E; V : E) is
5556 begin
5557 pragma Assert (Ekind (Id) = E_Package);
5558 Set_Node23 (Id, V);
5559 end Set_Limited_View;
5561 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5562 begin
5563 pragma Assert (Is_Type (Id)
5564 or else Ekind_In (Id, E_Constant, E_Variable)
5565 or else Is_Subprogram (Id));
5566 Set_Node33 (Id, V);
5567 end Set_Linker_Section_Pragma;
5569 procedure Set_Lit_Indexes (Id : E; V : E) is
5570 begin
5571 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5572 Set_Node18 (Id, V);
5573 end Set_Lit_Indexes;
5575 procedure Set_Lit_Strings (Id : E; V : E) is
5576 begin
5577 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5578 Set_Node16 (Id, V);
5579 end Set_Lit_Strings;
5581 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5582 begin
5583 pragma Assert (Is_Formal (Id));
5584 Set_Flag205 (Id, V);
5585 end Set_Low_Bound_Tested;
5587 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5588 begin
5589 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5590 Set_Flag84 (Id, V);
5591 end Set_Machine_Radix_10;
5593 procedure Set_Master_Id (Id : E; V : E) is
5594 begin
5595 pragma Assert (Is_Access_Type (Id));
5596 Set_Node17 (Id, V);
5597 end Set_Master_Id;
5599 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5600 begin
5601 Set_Flag168 (Id, V);
5602 end Set_Materialize_Entity;
5604 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5605 begin
5606 Set_Flag262 (Id, V);
5607 end Set_May_Inherit_Delayed_Rep_Aspects;
5609 procedure Set_Mechanism (Id : E; V : M) is
5610 begin
5611 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5612 Set_Uint8 (Id, UI_From_Int (V));
5613 end Set_Mechanism;
5615 procedure Set_Modulus (Id : E; V : U) is
5616 begin
5617 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5618 Set_Uint17 (Id, V);
5619 end Set_Modulus;
5621 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5622 begin
5623 pragma Assert (Is_Type (Id));
5624 Set_Flag183 (Id, V);
5625 end Set_Must_Be_On_Byte_Boundary;
5627 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5628 begin
5629 pragma Assert (Is_Type (Id));
5630 Set_Flag208 (Id, V);
5631 end Set_Must_Have_Preelab_Init;
5633 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5634 begin
5635 Set_Flag147 (Id, V);
5636 end Set_Needs_Debug_Info;
5638 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5639 begin
5640 pragma Assert
5641 (Is_Overloadable (Id)
5642 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5643 Set_Flag22 (Id, V);
5644 end Set_Needs_No_Actuals;
5646 procedure Set_Needs_Typedef (Id : E; V : B := True) is
5647 begin
5648 pragma Assert (Is_Type (Id));
5649 Set_Flag286 (Id, V);
5650 end Set_Needs_Typedef;
5652 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5653 begin
5654 Set_Flag115 (Id, V);
5655 end Set_Never_Set_In_Source;
5657 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5658 begin
5659 Set_Node12 (Id, V);
5660 end Set_Next_Inlined_Subprogram;
5662 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5663 begin
5664 pragma Assert (Is_Discrete_Type (Id));
5665 Set_Flag276 (Id, V);
5666 end Set_No_Dynamic_Predicate_On_Actual;
5668 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5669 begin
5670 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5671 Set_Flag131 (Id, V);
5672 end Set_No_Pool_Assigned;
5674 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5675 begin
5676 pragma Assert (Is_Discrete_Type (Id));
5677 Set_Flag275 (Id, V);
5678 end Set_No_Predicate_On_Actual;
5680 procedure Set_No_Return (Id : E; V : B := True) is
5681 begin
5682 pragma Assert
5683 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5684 Set_Flag113 (Id, V);
5685 end Set_No_Return;
5687 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5688 begin
5689 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5690 Set_Flag136 (Id, V);
5691 end Set_No_Strict_Aliasing;
5693 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5694 begin
5695 pragma Assert (Is_Tagged_Type (Id));
5696 Set_Node32 (Id, V);
5697 end Set_No_Tagged_Streams_Pragma;
5699 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5700 begin
5701 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5702 Set_Flag58 (Id, V);
5703 end Set_Non_Binary_Modulus;
5705 procedure Set_Non_Limited_View (Id : E; V : E) is
5706 begin
5707 pragma Assert
5708 (Ekind (Id) in Incomplete_Kind
5709 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
5710 Set_Node19 (Id, V);
5711 end Set_Non_Limited_View;
5713 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5714 begin
5715 pragma Assert
5716 (Root_Type (Id) = Standard_Boolean
5717 and then Ekind (Id) = E_Enumeration_Type);
5718 Set_Flag162 (Id, V);
5719 end Set_Nonzero_Is_True;
5721 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5722 begin
5723 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5724 Set_Uint8 (Id, V);
5725 end Set_Normalized_First_Bit;
5727 procedure Set_Normalized_Position (Id : E; V : U) is
5728 begin
5729 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5730 Set_Uint14 (Id, V);
5731 end Set_Normalized_Position;
5733 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5734 begin
5735 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5736 Set_Uint10 (Id, V);
5737 end Set_Normalized_Position_Max;
5739 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5740 begin
5741 pragma Assert (Ekind (Id) = E_Variable);
5742 Set_Flag247 (Id, V);
5743 end Set_OK_To_Rename;
5745 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5746 begin
5747 pragma Assert
5748 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5749 Set_Flag239 (Id, V);
5750 end Set_OK_To_Reorder_Components;
5752 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5753 begin
5754 pragma Assert
5755 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5756 Set_Flag241 (Id, V);
5757 end Set_Optimize_Alignment_Space;
5759 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5760 begin
5761 pragma Assert
5762 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5763 Set_Flag242 (Id, V);
5764 end Set_Optimize_Alignment_Time;
5766 procedure Set_Original_Access_Type (Id : E; V : E) is
5767 begin
5768 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5769 Set_Node28 (Id, V);
5770 end Set_Original_Access_Type;
5772 procedure Set_Original_Array_Type (Id : E; V : E) is
5773 begin
5774 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5775 Set_Node21 (Id, V);
5776 end Set_Original_Array_Type;
5778 procedure Set_Original_Record_Component (Id : E; V : E) is
5779 begin
5780 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5781 Set_Node22 (Id, V);
5782 end Set_Original_Record_Component;
5784 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5785 begin
5786 Set_Flag243 (Id, V);
5787 end Set_Overlays_Constant;
5789 procedure Set_Overridden_Operation (Id : E; V : E) is
5790 begin
5791 Set_Node26 (Id, V);
5792 end Set_Overridden_Operation;
5794 procedure Set_Package_Instantiation (Id : E; V : N) is
5795 begin
5796 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5797 Set_Node26 (Id, V);
5798 end Set_Package_Instantiation;
5800 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5801 begin
5802 pragma Assert (Is_Array_Type (Id));
5803 Set_Node23 (Id, V);
5804 end Set_Packed_Array_Impl_Type;
5806 procedure Set_Parent_Subtype (Id : E; V : E) is
5807 begin
5808 pragma Assert (Ekind (Id) = E_Record_Type);
5809 Set_Node19 (Id, V);
5810 end Set_Parent_Subtype;
5812 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5813 begin
5814 pragma Assert (Ekind (Id) = E_Abstract_State);
5815 Set_Elist9 (Id, V);
5816 end Set_Part_Of_Constituents;
5818 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5819 begin
5820 pragma Assert (Is_Type (Id));
5821 Set_Flag280 (Id, V);
5822 end Set_Partial_View_Has_Unknown_Discr;
5824 procedure Set_Pending_Access_Types (Id : E; V : L) is
5825 begin
5826 pragma Assert (Is_Type (Id));
5827 Set_Elist15 (Id, V);
5828 end Set_Pending_Access_Types;
5830 procedure Set_Postconditions_Proc (Id : E; V : E) is
5831 begin
5832 pragma Assert (Ekind_In (Id, E_Entry,
5833 E_Entry_Family,
5834 E_Function,
5835 E_Procedure));
5836 Set_Node14 (Id, V);
5837 end Set_Postconditions_Proc;
5839 procedure Set_PPC_Wrapper (Id : E; V : E) is
5840 begin
5841 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5842 Set_Node25 (Id, V);
5843 end Set_PPC_Wrapper;
5845 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5846 begin
5847 pragma Assert (Is_Tagged_Type (Id));
5848 Set_Elist10 (Id, V);
5849 end Set_Direct_Primitive_Operations;
5851 procedure Set_Prival (Id : E; V : E) is
5852 begin
5853 pragma Assert (Is_Protected_Component (Id));
5854 Set_Node17 (Id, V);
5855 end Set_Prival;
5857 procedure Set_Prival_Link (Id : E; V : E) is
5858 begin
5859 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5860 Set_Node20 (Id, V);
5861 end Set_Prival_Link;
5863 procedure Set_Private_Dependents (Id : E; V : L) is
5864 begin
5865 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5866 Set_Elist18 (Id, V);
5867 end Set_Private_Dependents;
5869 procedure Set_Private_View (Id : E; V : N) is
5870 begin
5871 pragma Assert (Is_Private_Type (Id));
5872 Set_Node22 (Id, V);
5873 end Set_Private_View;
5875 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5876 begin
5877 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5878 Set_Node11 (Id, V);
5879 end Set_Protected_Body_Subprogram;
5881 procedure Set_Protected_Formal (Id : E; V : E) is
5882 begin
5883 pragma Assert (Is_Formal (Id));
5884 Set_Node22 (Id, V);
5885 end Set_Protected_Formal;
5887 procedure Set_Protection_Object (Id : E; V : E) is
5888 begin
5889 pragma Assert (Ekind_In (Id, E_Entry,
5890 E_Entry_Family,
5891 E_Function,
5892 E_Procedure));
5893 Set_Node23 (Id, V);
5894 end Set_Protection_Object;
5896 procedure Set_Reachable (Id : E; V : B := True) is
5897 begin
5898 Set_Flag49 (Id, V);
5899 end Set_Reachable;
5901 procedure Set_Referenced (Id : E; V : B := True) is
5902 begin
5903 Set_Flag156 (Id, V);
5904 end Set_Referenced;
5906 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5907 begin
5908 Set_Flag36 (Id, V);
5909 end Set_Referenced_As_LHS;
5911 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5912 begin
5913 Set_Flag227 (Id, V);
5914 end Set_Referenced_As_Out_Parameter;
5916 procedure Set_Refinement_Constituents (Id : E; V : L) is
5917 begin
5918 pragma Assert (Ekind (Id) = E_Abstract_State);
5919 Set_Elist8 (Id, V);
5920 end Set_Refinement_Constituents;
5922 procedure Set_Register_Exception_Call (Id : E; V : N) is
5923 begin
5924 pragma Assert (Ekind (Id) = E_Exception);
5925 Set_Node20 (Id, V);
5926 end Set_Register_Exception_Call;
5928 procedure Set_Related_Array_Object (Id : E; V : E) is
5929 begin
5930 pragma Assert (Is_Array_Type (Id));
5931 Set_Node25 (Id, V);
5932 end Set_Related_Array_Object;
5934 procedure Set_Related_Expression (Id : E; V : N) is
5935 begin
5936 pragma Assert (Ekind (Id) in Type_Kind
5937 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5938 Set_Node24 (Id, V);
5939 end Set_Related_Expression;
5941 procedure Set_Related_Instance (Id : E; V : E) is
5942 begin
5943 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5944 Set_Node15 (Id, V);
5945 end Set_Related_Instance;
5947 procedure Set_Related_Type (Id : E; V : E) is
5948 begin
5949 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5950 Set_Node27 (Id, V);
5951 end Set_Related_Type;
5953 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5954 begin
5955 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5956 Set_Node28 (Id, V);
5957 end Set_Relative_Deadline_Variable;
5959 procedure Set_Renamed_Entity (Id : E; V : N) is
5960 begin
5961 Set_Node18 (Id, V);
5962 end Set_Renamed_Entity;
5964 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5965 begin
5966 pragma Assert (Ekind (Id) = E_Package);
5967 Set_Flag231 (Id, V);
5968 end Set_Renamed_In_Spec;
5970 procedure Set_Renamed_Object (Id : E; V : N) is
5971 begin
5972 Set_Node18 (Id, V);
5973 end Set_Renamed_Object;
5975 procedure Set_Renaming_Map (Id : E; V : U) is
5976 begin
5977 Set_Uint9 (Id, V);
5978 end Set_Renaming_Map;
5980 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5981 begin
5982 pragma Assert (Is_Overloadable (Id));
5983 Set_Flag213 (Id, V);
5984 end Set_Requires_Overriding;
5986 procedure Set_Return_Present (Id : E; V : B := True) is
5987 begin
5988 Set_Flag54 (Id, V);
5989 end Set_Return_Present;
5991 procedure Set_Return_Applies_To (Id : E; V : N) is
5992 begin
5993 Set_Node8 (Id, V);
5994 end Set_Return_Applies_To;
5996 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5997 begin
5998 Set_Flag90 (Id, V);
5999 end Set_Returns_By_Ref;
6001 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
6002 begin
6003 pragma Assert (Ekind (Id) = E_Function);
6004 Set_Flag134 (Id, V);
6005 end Set_Returns_Limited_View;
6007 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6008 begin
6009 pragma Assert
6010 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6011 Set_Flag164 (Id, V);
6012 end Set_Reverse_Bit_Order;
6014 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6015 begin
6016 pragma Assert
6017 (Is_Base_Type (Id)
6018 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6019 Set_Flag93 (Id, V);
6020 end Set_Reverse_Storage_Order;
6022 procedure Set_RM_Size (Id : E; V : U) is
6023 begin
6024 pragma Assert (Is_Type (Id));
6025 Set_Uint13 (Id, V);
6026 end Set_RM_Size;
6028 procedure Set_Scalar_Range (Id : E; V : N) is
6029 begin
6030 Set_Node20 (Id, V);
6031 end Set_Scalar_Range;
6033 procedure Set_Scale_Value (Id : E; V : U) is
6034 begin
6035 Set_Uint16 (Id, V);
6036 end Set_Scale_Value;
6038 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6039 begin
6040 pragma Assert (not Is_Record_Type (Id));
6041 Set_Uint22 (Id, V);
6042 end Set_Scope_Depth_Value;
6044 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6045 begin
6046 Set_Flag167 (Id, V);
6047 end Set_Sec_Stack_Needed_For_Return;
6049 procedure Set_Shadow_Entities (Id : E; V : S) is
6050 begin
6051 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
6052 Set_List14 (Id, V);
6053 end Set_Shadow_Entities;
6055 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6056 begin
6057 pragma Assert (Ekind (Id) = E_Variable);
6058 Set_Node22 (Id, V);
6059 end Set_Shared_Var_Procs_Instance;
6061 procedure Set_Size_Check_Code (Id : E; V : N) is
6062 begin
6063 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6064 Set_Node19 (Id, V);
6065 end Set_Size_Check_Code;
6067 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6068 begin
6069 Set_Flag177 (Id, V);
6070 end Set_Size_Depends_On_Discriminant;
6072 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6073 begin
6074 Set_Flag92 (Id, V);
6075 end Set_Size_Known_At_Compile_Time;
6077 procedure Set_Small_Value (Id : E; V : R) is
6078 begin
6079 pragma Assert (Is_Fixed_Point_Type (Id));
6080 Set_Ureal21 (Id, V);
6081 end Set_Small_Value;
6083 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6084 begin
6085 pragma Assert
6086 (Ekind_In (Id, E_Generic_Package, -- package variants
6087 E_Package,
6088 E_Package_Body));
6090 Set_Node33 (Id, V);
6091 end Set_SPARK_Aux_Pragma;
6093 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6094 begin
6095 pragma Assert
6096 (Ekind_In (Id, E_Generic_Package, -- package variants
6097 E_Package,
6098 E_Package_Body));
6100 Set_Flag266 (Id, V);
6101 end Set_SPARK_Aux_Pragma_Inherited;
6103 procedure Set_SPARK_Pragma (Id : E; V : N) is
6104 begin
6105 pragma Assert
6106 (Ekind_In (Id, E_Function, -- subprogram variants
6107 E_Generic_Function,
6108 E_Generic_Procedure,
6109 E_Procedure,
6110 E_Subprogram_Body)
6111 or else
6112 Ekind_In (Id, E_Generic_Package, -- package variants
6113 E_Package,
6114 E_Package_Body));
6116 Set_Node32 (Id, V);
6117 end Set_SPARK_Pragma;
6119 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6120 begin
6121 pragma Assert
6122 (Ekind_In (Id, E_Function, -- subprogram variants
6123 E_Generic_Function,
6124 E_Generic_Procedure,
6125 E_Procedure,
6126 E_Subprogram_Body)
6127 or else
6128 Ekind_In (Id, E_Generic_Package, -- package variants
6129 E_Package,
6130 E_Package_Body));
6132 Set_Flag265 (Id, V);
6133 end Set_SPARK_Pragma_Inherited;
6135 procedure Set_Spec_Entity (Id : E; V : E) is
6136 begin
6137 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6138 Set_Node19 (Id, V);
6139 end Set_Spec_Entity;
6141 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6142 begin
6143 pragma Assert
6144 (Is_Base_Type (Id)
6145 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6146 Set_Flag273 (Id, V);
6147 end Set_SSO_Set_High_By_Default;
6149 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6150 begin
6151 pragma Assert
6152 (Is_Base_Type (Id)
6153 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6154 Set_Flag272 (Id, V);
6155 end Set_SSO_Set_Low_By_Default;
6157 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6158 begin
6159 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6160 Set_List25 (Id, V);
6161 end Set_Static_Discrete_Predicate;
6163 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6164 begin
6165 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6166 and then Has_Predicates (Id));
6167 Set_Node25 (Id, V);
6168 end Set_Static_Real_Or_String_Predicate;
6170 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6171 begin
6172 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6173 Set_Node15 (Id, V);
6174 end Set_Status_Flag_Or_Transient_Decl;
6176 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6177 begin
6178 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6179 pragma Assert (Id = Base_Type (Id));
6180 Set_Node26 (Id, V);
6181 end Set_Storage_Size_Variable;
6183 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6184 begin
6185 pragma Assert (Ekind (Id) = E_Package);
6186 Set_Flag77 (Id, V);
6187 end Set_Static_Elaboration_Desired;
6189 procedure Set_Static_Initialization (Id : E; V : N) is
6190 begin
6191 pragma Assert
6192 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6193 Set_Node30 (Id, V);
6194 end Set_Static_Initialization;
6196 procedure Set_Stored_Constraint (Id : E; V : L) is
6197 begin
6198 pragma Assert (Nkind (Id) in N_Entity);
6199 Set_Elist23 (Id, V);
6200 end Set_Stored_Constraint;
6202 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6203 begin
6204 pragma Assert (Ekind (Id) = E_Constant);
6205 Set_Flag270 (Id, V);
6206 end Set_Stores_Attribute_Old_Prefix;
6208 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6209 begin
6210 pragma Assert (Id = Base_Type (Id));
6211 Set_Flag145 (Id, V);
6212 end Set_Strict_Alignment;
6214 procedure Set_String_Literal_Length (Id : E; V : U) is
6215 begin
6216 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6217 Set_Uint16 (Id, V);
6218 end Set_String_Literal_Length;
6220 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6221 begin
6222 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6223 Set_Node18 (Id, V);
6224 end Set_String_Literal_Low_Bound;
6226 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6227 begin
6228 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6229 Set_Node29 (Id, V);
6230 end Set_Subprograms_For_Type;
6232 procedure Set_Subps_Index (Id : E; V : U) is
6233 begin
6234 pragma Assert (Is_Subprogram (Id));
6235 Set_Uint24 (Id, V);
6236 end Set_Subps_Index;
6238 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6239 begin
6240 Set_Flag148 (Id, V);
6241 end Set_Suppress_Elaboration_Warnings;
6243 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6244 begin
6245 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6246 Set_Flag105 (Id, V);
6247 end Set_Suppress_Initialization;
6249 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6250 begin
6251 Set_Flag165 (Id, V);
6252 end Set_Suppress_Style_Checks;
6254 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6255 begin
6256 Set_Flag217 (Id, V);
6257 end Set_Suppress_Value_Tracking_On_Call;
6259 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6260 begin
6261 pragma Assert (Ekind (Id) in Task_Kind);
6262 Set_Node25 (Id, V);
6263 end Set_Task_Body_Procedure;
6265 procedure Set_Thunk_Entity (Id : E; V : E) is
6266 begin
6267 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6268 and then Is_Thunk (Id));
6269 Set_Node31 (Id, V);
6270 end Set_Thunk_Entity;
6272 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6273 begin
6274 Set_Flag41 (Id, V);
6275 end Set_Treat_As_Volatile;
6277 procedure Set_Underlying_Full_View (Id : E; V : E) is
6278 begin
6279 pragma Assert (Ekind (Id) in Private_Kind);
6280 Set_Node19 (Id, V);
6281 end Set_Underlying_Full_View;
6283 procedure Set_Underlying_Record_View (Id : E; V : E) is
6284 begin
6285 pragma Assert (Ekind (Id) = E_Record_Type);
6286 Set_Node28 (Id, V);
6287 end Set_Underlying_Record_View;
6289 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6290 begin
6291 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6292 Set_Flag216 (Id, V);
6293 end Set_Universal_Aliasing;
6295 procedure Set_Unset_Reference (Id : E; V : N) is
6296 begin
6297 Set_Node16 (Id, V);
6298 end Set_Unset_Reference;
6300 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6301 begin
6302 Set_Flag222 (Id, V);
6303 end Set_Used_As_Generic_Actual;
6305 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6306 begin
6307 pragma Assert (Ekind (Id) = E_Protected_Type);
6308 Set_Flag188 (Id, V);
6309 end Set_Uses_Lock_Free;
6311 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6312 begin
6313 Set_Flag95 (Id, V);
6314 end Set_Uses_Sec_Stack;
6316 procedure Set_Warnings_Off (Id : E; V : B := True) is
6317 begin
6318 Set_Flag96 (Id, V);
6319 end Set_Warnings_Off;
6321 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6322 begin
6323 Set_Flag236 (Id, V);
6324 end Set_Warnings_Off_Used;
6326 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6327 begin
6328 Set_Flag237 (Id, V);
6329 end Set_Warnings_Off_Used_Unmodified;
6331 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6332 begin
6333 Set_Flag238 (Id, V);
6334 end Set_Warnings_Off_Used_Unreferenced;
6336 procedure Set_Was_Hidden (Id : E; V : B := True) is
6337 begin
6338 Set_Flag196 (Id, V);
6339 end Set_Was_Hidden;
6341 procedure Set_Wrapped_Entity (Id : E; V : E) is
6342 begin
6343 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6344 and then Is_Primitive_Wrapper (Id));
6345 Set_Node27 (Id, V);
6346 end Set_Wrapped_Entity;
6348 -----------------------------------
6349 -- Field Initialization Routines --
6350 -----------------------------------
6352 procedure Init_Alignment (Id : E) is
6353 begin
6354 Set_Uint14 (Id, Uint_0);
6355 end Init_Alignment;
6357 procedure Init_Alignment (Id : E; V : Int) is
6358 begin
6359 Set_Uint14 (Id, UI_From_Int (V));
6360 end Init_Alignment;
6362 procedure Init_Component_Bit_Offset (Id : E) is
6363 begin
6364 Set_Uint11 (Id, No_Uint);
6365 end Init_Component_Bit_Offset;
6367 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6368 begin
6369 Set_Uint11 (Id, UI_From_Int (V));
6370 end Init_Component_Bit_Offset;
6372 procedure Init_Component_Size (Id : E) is
6373 begin
6374 Set_Uint22 (Id, Uint_0);
6375 end Init_Component_Size;
6377 procedure Init_Component_Size (Id : E; V : Int) is
6378 begin
6379 Set_Uint22 (Id, UI_From_Int (V));
6380 end Init_Component_Size;
6382 procedure Init_Digits_Value (Id : E) is
6383 begin
6384 Set_Uint17 (Id, Uint_0);
6385 end Init_Digits_Value;
6387 procedure Init_Digits_Value (Id : E; V : Int) is
6388 begin
6389 Set_Uint17 (Id, UI_From_Int (V));
6390 end Init_Digits_Value;
6392 procedure Init_Esize (Id : E) is
6393 begin
6394 Set_Uint12 (Id, Uint_0);
6395 end Init_Esize;
6397 procedure Init_Esize (Id : E; V : Int) is
6398 begin
6399 Set_Uint12 (Id, UI_From_Int (V));
6400 end Init_Esize;
6402 procedure Init_Normalized_First_Bit (Id : E) is
6403 begin
6404 Set_Uint8 (Id, No_Uint);
6405 end Init_Normalized_First_Bit;
6407 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6408 begin
6409 Set_Uint8 (Id, UI_From_Int (V));
6410 end Init_Normalized_First_Bit;
6412 procedure Init_Normalized_Position (Id : E) is
6413 begin
6414 Set_Uint14 (Id, No_Uint);
6415 end Init_Normalized_Position;
6417 procedure Init_Normalized_Position (Id : E; V : Int) is
6418 begin
6419 Set_Uint14 (Id, UI_From_Int (V));
6420 end Init_Normalized_Position;
6422 procedure Init_Normalized_Position_Max (Id : E) is
6423 begin
6424 Set_Uint10 (Id, No_Uint);
6425 end Init_Normalized_Position_Max;
6427 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6428 begin
6429 Set_Uint10 (Id, UI_From_Int (V));
6430 end Init_Normalized_Position_Max;
6432 procedure Init_RM_Size (Id : E) is
6433 begin
6434 Set_Uint13 (Id, Uint_0);
6435 end Init_RM_Size;
6437 procedure Init_RM_Size (Id : E; V : Int) is
6438 begin
6439 Set_Uint13 (Id, UI_From_Int (V));
6440 end Init_RM_Size;
6442 -----------------------------
6443 -- Init_Component_Location --
6444 -----------------------------
6446 procedure Init_Component_Location (Id : E) is
6447 begin
6448 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6449 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6450 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6451 Set_Uint12 (Id, Uint_0); -- Esize
6452 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6453 end Init_Component_Location;
6455 ----------------------------
6456 -- Init_Object_Size_Align --
6457 ----------------------------
6459 procedure Init_Object_Size_Align (Id : E) is
6460 begin
6461 Set_Uint12 (Id, Uint_0); -- Esize
6462 Set_Uint14 (Id, Uint_0); -- Alignment
6463 end Init_Object_Size_Align;
6465 ---------------
6466 -- Init_Size --
6467 ---------------
6469 procedure Init_Size (Id : E; V : Int) is
6470 begin
6471 pragma Assert (not Is_Object (Id));
6472 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6473 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6474 end Init_Size;
6476 ---------------------
6477 -- Init_Size_Align --
6478 ---------------------
6480 procedure Init_Size_Align (Id : E) is
6481 begin
6482 pragma Assert (not Is_Object (Id));
6483 Set_Uint12 (Id, Uint_0); -- Esize
6484 Set_Uint13 (Id, Uint_0); -- RM_Size
6485 Set_Uint14 (Id, Uint_0); -- Alignment
6486 end Init_Size_Align;
6488 ----------------------------------------------
6489 -- Type Representation Attribute Predicates --
6490 ----------------------------------------------
6492 function Known_Alignment (E : Entity_Id) return B is
6493 begin
6494 return Uint14 (E) /= Uint_0
6495 and then Uint14 (E) /= No_Uint;
6496 end Known_Alignment;
6498 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6499 begin
6500 return Uint11 (E) /= No_Uint;
6501 end Known_Component_Bit_Offset;
6503 function Known_Component_Size (E : Entity_Id) return B is
6504 begin
6505 return Uint22 (Base_Type (E)) /= Uint_0
6506 and then Uint22 (Base_Type (E)) /= No_Uint;
6507 end Known_Component_Size;
6509 function Known_Esize (E : Entity_Id) return B is
6510 begin
6511 return Uint12 (E) /= Uint_0
6512 and then Uint12 (E) /= No_Uint;
6513 end Known_Esize;
6515 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6516 begin
6517 return Uint8 (E) /= No_Uint;
6518 end Known_Normalized_First_Bit;
6520 function Known_Normalized_Position (E : Entity_Id) return B is
6521 begin
6522 return Uint14 (E) /= No_Uint;
6523 end Known_Normalized_Position;
6525 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6526 begin
6527 return Uint10 (E) /= No_Uint;
6528 end Known_Normalized_Position_Max;
6530 function Known_RM_Size (E : Entity_Id) return B is
6531 begin
6532 return Uint13 (E) /= No_Uint
6533 and then (Uint13 (E) /= Uint_0
6534 or else Is_Discrete_Type (E)
6535 or else Is_Fixed_Point_Type (E));
6536 end Known_RM_Size;
6538 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6539 begin
6540 return Uint11 (E) /= No_Uint
6541 and then Uint11 (E) >= Uint_0;
6542 end Known_Static_Component_Bit_Offset;
6544 function Known_Static_Component_Size (E : Entity_Id) return B is
6545 begin
6546 return Uint22 (Base_Type (E)) > Uint_0;
6547 end Known_Static_Component_Size;
6549 function Known_Static_Esize (E : Entity_Id) return B is
6550 begin
6551 return Uint12 (E) > Uint_0
6552 and then not Is_Generic_Type (E);
6553 end Known_Static_Esize;
6555 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6556 begin
6557 return Uint8 (E) /= No_Uint
6558 and then Uint8 (E) >= Uint_0;
6559 end Known_Static_Normalized_First_Bit;
6561 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6562 begin
6563 return Uint14 (E) /= No_Uint
6564 and then Uint14 (E) >= Uint_0;
6565 end Known_Static_Normalized_Position;
6567 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6568 begin
6569 return Uint10 (E) /= No_Uint
6570 and then Uint10 (E) >= Uint_0;
6571 end Known_Static_Normalized_Position_Max;
6573 function Known_Static_RM_Size (E : Entity_Id) return B is
6574 begin
6575 return (Uint13 (E) > Uint_0
6576 or else Is_Discrete_Type (E)
6577 or else Is_Fixed_Point_Type (E))
6578 and then not Is_Generic_Type (E);
6579 end Known_Static_RM_Size;
6581 function Unknown_Alignment (E : Entity_Id) return B is
6582 begin
6583 return Uint14 (E) = Uint_0
6584 or else Uint14 (E) = No_Uint;
6585 end Unknown_Alignment;
6587 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6588 begin
6589 return Uint11 (E) = No_Uint;
6590 end Unknown_Component_Bit_Offset;
6592 function Unknown_Component_Size (E : Entity_Id) return B is
6593 begin
6594 return Uint22 (Base_Type (E)) = Uint_0
6595 or else
6596 Uint22 (Base_Type (E)) = No_Uint;
6597 end Unknown_Component_Size;
6599 function Unknown_Esize (E : Entity_Id) return B is
6600 begin
6601 return Uint12 (E) = No_Uint
6602 or else
6603 Uint12 (E) = Uint_0;
6604 end Unknown_Esize;
6606 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6607 begin
6608 return Uint8 (E) = No_Uint;
6609 end Unknown_Normalized_First_Bit;
6611 function Unknown_Normalized_Position (E : Entity_Id) return B is
6612 begin
6613 return Uint14 (E) = No_Uint;
6614 end Unknown_Normalized_Position;
6616 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6617 begin
6618 return Uint10 (E) = No_Uint;
6619 end Unknown_Normalized_Position_Max;
6621 function Unknown_RM_Size (E : Entity_Id) return B is
6622 begin
6623 return (Uint13 (E) = Uint_0
6624 and then not Is_Discrete_Type (E)
6625 and then not Is_Fixed_Point_Type (E))
6626 or else Uint13 (E) = No_Uint;
6627 end Unknown_RM_Size;
6629 --------------------
6630 -- Address_Clause --
6631 --------------------
6633 function Address_Clause (Id : E) return N is
6634 begin
6635 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6636 end Address_Clause;
6638 ---------------
6639 -- Aft_Value --
6640 ---------------
6642 function Aft_Value (Id : E) return U is
6643 Result : Nat := 1;
6644 Delta_Val : Ureal := Delta_Value (Id);
6645 begin
6646 while Delta_Val < Ureal_Tenth loop
6647 Delta_Val := Delta_Val * Ureal_10;
6648 Result := Result + 1;
6649 end loop;
6651 return UI_From_Int (Result);
6652 end Aft_Value;
6654 ----------------------
6655 -- Alignment_Clause --
6656 ----------------------
6658 function Alignment_Clause (Id : E) return N is
6659 begin
6660 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6661 end Alignment_Clause;
6663 -------------------
6664 -- Append_Entity --
6665 -------------------
6667 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6668 begin
6669 if Last_Entity (V) = Empty then
6670 Set_First_Entity (Id => V, V => Id);
6671 else
6672 Set_Next_Entity (Last_Entity (V), Id);
6673 end if;
6675 Set_Next_Entity (Id, Empty);
6676 Set_Scope (Id, V);
6677 Set_Last_Entity (Id => V, V => Id);
6678 end Append_Entity;
6680 ---------------
6681 -- Base_Type --
6682 ---------------
6684 function Base_Type (Id : E) return E is
6685 begin
6686 if Is_Base_Type (Id) then
6687 return Id;
6688 else
6689 pragma Assert (Is_Type (Id));
6690 return Etype (Id);
6691 end if;
6692 end Base_Type;
6694 -------------------------
6695 -- Component_Alignment --
6696 -------------------------
6698 -- Component Alignment is encoded using two flags, Flag128/129 as
6699 -- follows. Note that both flags False = Align_Default, so that the
6700 -- default initialization of flags to False initializes component
6701 -- alignment to the default value as required.
6703 -- Flag128 Flag129 Value
6704 -- ------- ------- -----
6705 -- False False Calign_Default
6706 -- False True Calign_Component_Size
6707 -- True False Calign_Component_Size_4
6708 -- True True Calign_Storage_Unit
6710 function Component_Alignment (Id : E) return C is
6711 BT : constant Node_Id := Base_Type (Id);
6713 begin
6714 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6716 if Flag128 (BT) then
6717 if Flag129 (BT) then
6718 return Calign_Storage_Unit;
6719 else
6720 return Calign_Component_Size_4;
6721 end if;
6723 else
6724 if Flag129 (BT) then
6725 return Calign_Component_Size;
6726 else
6727 return Calign_Default;
6728 end if;
6729 end if;
6730 end Component_Alignment;
6732 ----------------------
6733 -- Declaration_Node --
6734 ----------------------
6736 function Declaration_Node (Id : E) return N is
6737 P : Node_Id;
6739 begin
6740 if Ekind (Id) = E_Incomplete_Type
6741 and then Present (Full_View (Id))
6742 then
6743 P := Parent (Full_View (Id));
6744 else
6745 P := Parent (Id);
6746 end if;
6748 loop
6749 if Nkind (P) /= N_Selected_Component
6750 and then Nkind (P) /= N_Expanded_Name
6751 and then
6752 not (Nkind (P) = N_Defining_Program_Unit_Name
6753 and then Is_Child_Unit (Id))
6754 then
6755 return P;
6756 else
6757 P := Parent (P);
6758 end if;
6759 end loop;
6760 end Declaration_Node;
6762 ---------------------------------
6763 -- Default_Init_Cond_Procedure --
6764 ---------------------------------
6766 function Default_Init_Cond_Procedure (Id : E) return E is
6767 Subp_Id : Entity_Id;
6769 begin
6770 pragma Assert
6771 (Is_Type (Id)
6772 and then (Has_Default_Init_Cond (Id)
6773 or Has_Inherited_Default_Init_Cond (Id)));
6775 Subp_Id := Subprograms_For_Type (Base_Type (Id));
6776 while Present (Subp_Id) loop
6777 if Is_Default_Init_Cond_Procedure (Subp_Id) then
6778 return Subp_Id;
6779 end if;
6781 Subp_Id := Subprograms_For_Type (Subp_Id);
6782 end loop;
6784 return Empty;
6785 end Default_Init_Cond_Procedure;
6787 ---------------------
6788 -- Designated_Type --
6789 ---------------------
6791 function Designated_Type (Id : E) return E is
6792 Desig_Type : E;
6794 begin
6795 Desig_Type := Directly_Designated_Type (Id);
6797 if Ekind (Desig_Type) = E_Incomplete_Type
6798 and then Present (Full_View (Desig_Type))
6799 then
6800 return Full_View (Desig_Type);
6802 elsif Is_Class_Wide_Type (Desig_Type)
6803 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6804 and then Present (Full_View (Etype (Desig_Type)))
6805 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6806 then
6807 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6809 else
6810 return Desig_Type;
6811 end if;
6812 end Designated_Type;
6814 ----------------------
6815 -- Entry_Index_Type --
6816 ----------------------
6818 function Entry_Index_Type (Id : E) return N is
6819 begin
6820 pragma Assert (Ekind (Id) = E_Entry_Family);
6821 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6822 end Entry_Index_Type;
6824 ---------------------
6825 -- First_Component --
6826 ---------------------
6828 function First_Component (Id : E) return E is
6829 Comp_Id : E;
6831 begin
6832 pragma Assert
6833 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6835 Comp_Id := First_Entity (Id);
6836 while Present (Comp_Id) loop
6837 exit when Ekind (Comp_Id) = E_Component;
6838 Comp_Id := Next_Entity (Comp_Id);
6839 end loop;
6841 return Comp_Id;
6842 end First_Component;
6844 -------------------------------------
6845 -- First_Component_Or_Discriminant --
6846 -------------------------------------
6848 function First_Component_Or_Discriminant (Id : E) return E is
6849 Comp_Id : E;
6851 begin
6852 pragma Assert
6853 (Is_Record_Type (Id)
6854 or else Is_Incomplete_Or_Private_Type (Id)
6855 or else Has_Discriminants (Id));
6857 Comp_Id := First_Entity (Id);
6858 while Present (Comp_Id) loop
6859 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6860 Comp_Id := Next_Entity (Comp_Id);
6861 end loop;
6863 return Comp_Id;
6864 end First_Component_Or_Discriminant;
6866 ------------------
6867 -- First_Formal --
6868 ------------------
6870 function First_Formal (Id : E) return E is
6871 Formal : E;
6873 begin
6874 pragma Assert
6875 (Is_Generic_Subprogram (Id)
6876 or else Is_Overloadable (Id)
6877 or else Ekind_In (Id, E_Entry_Family,
6878 E_Subprogram_Body,
6879 E_Subprogram_Type));
6881 if Ekind (Id) = E_Enumeration_Literal then
6882 return Empty;
6884 else
6885 Formal := First_Entity (Id);
6887 -- The first/next entity chain of a generic subprogram contains all
6888 -- generic formal parameters, followed by the formal parameters. Go
6889 -- directly to the parameters by skipping the formal part.
6891 if Is_Generic_Subprogram (Id) then
6892 while Present (Formal) and then not Is_Formal (Formal) loop
6893 Next_Entity (Formal);
6894 end loop;
6895 end if;
6897 if Present (Formal) and then Is_Formal (Formal) then
6898 return Formal;
6899 else
6900 return Empty;
6901 end if;
6902 end if;
6903 end First_Formal;
6905 ------------------------------
6906 -- First_Formal_With_Extras --
6907 ------------------------------
6909 function First_Formal_With_Extras (Id : E) return E is
6910 Formal : E;
6912 begin
6913 pragma Assert
6914 (Is_Generic_Subprogram (Id)
6915 or else Is_Overloadable (Id)
6916 or else Ekind_In (Id, E_Entry_Family,
6917 E_Subprogram_Body,
6918 E_Subprogram_Type));
6920 if Ekind (Id) = E_Enumeration_Literal then
6921 return Empty;
6923 else
6924 Formal := First_Entity (Id);
6926 -- The first/next entity chain of a generic subprogram contains all
6927 -- generic formal parameters, followed by the formal parameters. Go
6928 -- directly to the parameters by skipping the formal part.
6930 if Is_Generic_Subprogram (Id) then
6931 while Present (Formal) and then not Is_Formal (Formal) loop
6932 Next_Entity (Formal);
6933 end loop;
6934 end if;
6936 if Present (Formal) and then Is_Formal (Formal) then
6937 return Formal;
6938 else
6939 return Extra_Formals (Id); -- Empty if no extra formals
6940 end if;
6941 end if;
6942 end First_Formal_With_Extras;
6944 -------------------------------------
6945 -- Get_Attribute_Definition_Clause --
6946 -------------------------------------
6948 function Get_Attribute_Definition_Clause
6949 (E : Entity_Id;
6950 Id : Attribute_Id) return Node_Id
6952 N : Node_Id;
6954 begin
6955 N := First_Rep_Item (E);
6956 while Present (N) loop
6957 if Nkind (N) = N_Attribute_Definition_Clause
6958 and then Get_Attribute_Id (Chars (N)) = Id
6959 then
6960 return N;
6961 else
6962 Next_Rep_Item (N);
6963 end if;
6964 end loop;
6966 return Empty;
6967 end Get_Attribute_Definition_Clause;
6969 -------------------
6970 -- Get_Full_View --
6971 -------------------
6973 function Get_Full_View (T : Entity_Id) return Entity_Id is
6974 begin
6975 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6976 return Full_View (T);
6978 elsif Is_Class_Wide_Type (T)
6979 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6980 and then Present (Full_View (Root_Type (T)))
6981 then
6982 return Class_Wide_Type (Full_View (Root_Type (T)));
6984 else
6985 return T;
6986 end if;
6987 end Get_Full_View;
6989 ----------------
6990 -- Get_Pragma --
6991 ----------------
6993 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6994 Is_CDG : constant Boolean :=
6995 Id = Pragma_Abstract_State or else
6996 Id = Pragma_Async_Readers or else
6997 Id = Pragma_Async_Writers or else
6998 Id = Pragma_Depends or else
6999 Id = Pragma_Effective_Reads or else
7000 Id = Pragma_Effective_Writes or else
7001 Id = Pragma_Extensions_Visible or else
7002 Id = Pragma_Global or else
7003 Id = Pragma_Initial_Condition or else
7004 Id = Pragma_Initializes or else
7005 Id = Pragma_Part_Of or else
7006 Id = Pragma_Refined_Depends or else
7007 Id = Pragma_Refined_Global or else
7008 Id = Pragma_Refined_State;
7009 Is_CTC : constant Boolean :=
7010 Id = Pragma_Contract_Cases or else
7011 Id = Pragma_Test_Case;
7012 Is_PPC : constant Boolean :=
7013 Id = Pragma_Precondition or else
7014 Id = Pragma_Postcondition or else
7015 Id = Pragma_Refined_Post;
7017 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
7019 Item : Node_Id;
7020 Items : Node_Id;
7022 begin
7023 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7024 -- extracted from their specialized list.
7026 if In_Contract then
7027 Items := Contract (E);
7029 if No (Items) then
7030 return Empty;
7032 elsif Is_CDG then
7033 Item := Classifications (Items);
7035 elsif Is_CTC then
7036 Item := Contract_Test_Cases (Items);
7038 else
7039 Item := Pre_Post_Conditions (Items);
7040 end if;
7042 -- Regular pragmas
7044 else
7045 Item := First_Rep_Item (E);
7046 end if;
7048 while Present (Item) loop
7049 if Nkind (Item) = N_Pragma
7050 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
7051 then
7052 return Item;
7054 -- All nodes in N_Contract are chained using Next_Pragma
7056 elsif In_Contract then
7057 Item := Next_Pragma (Item);
7059 -- Regular pragmas
7061 else
7062 Next_Rep_Item (Item);
7063 end if;
7064 end loop;
7066 return Empty;
7067 end Get_Pragma;
7069 --------------------------------------
7070 -- Get_Record_Representation_Clause --
7071 --------------------------------------
7073 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7074 N : Node_Id;
7076 begin
7077 N := First_Rep_Item (E);
7078 while Present (N) loop
7079 if Nkind (N) = N_Record_Representation_Clause then
7080 return N;
7081 end if;
7083 Next_Rep_Item (N);
7084 end loop;
7086 return Empty;
7087 end Get_Record_Representation_Clause;
7089 ------------------------
7090 -- Has_Attach_Handler --
7091 ------------------------
7093 function Has_Attach_Handler (Id : E) return B is
7094 Ritem : Node_Id;
7096 begin
7097 pragma Assert (Is_Protected_Type (Id));
7099 Ritem := First_Rep_Item (Id);
7100 while Present (Ritem) loop
7101 if Nkind (Ritem) = N_Pragma
7102 and then Pragma_Name (Ritem) = Name_Attach_Handler
7103 then
7104 return True;
7105 else
7106 Next_Rep_Item (Ritem);
7107 end if;
7108 end loop;
7110 return False;
7111 end Has_Attach_Handler;
7113 -----------------
7114 -- Has_Entries --
7115 -----------------
7117 function Has_Entries (Id : E) return B is
7118 Ent : Entity_Id;
7120 begin
7121 pragma Assert (Is_Concurrent_Type (Id));
7123 Ent := First_Entity (Id);
7124 while Present (Ent) loop
7125 if Is_Entry (Ent) then
7126 return True;
7127 end if;
7129 Ent := Next_Entity (Ent);
7130 end loop;
7132 return False;
7133 end Has_Entries;
7135 ----------------------------
7136 -- Has_Foreign_Convention --
7137 ----------------------------
7139 function Has_Foreign_Convention (Id : E) return B is
7140 begin
7141 -- While regular Intrinsics such as the Standard operators fit in the
7142 -- "Ada" convention, those with an Interface_Name materialize GCC
7143 -- builtin imports for which Ada special treatments shouldn't apply.
7145 return Convention (Id) in Foreign_Convention
7146 or else (Convention (Id) = Convention_Intrinsic
7147 and then Present (Interface_Name (Id)));
7148 end Has_Foreign_Convention;
7150 ---------------------------
7151 -- Has_Interrupt_Handler --
7152 ---------------------------
7154 function Has_Interrupt_Handler (Id : E) return B is
7155 Ritem : Node_Id;
7157 begin
7158 pragma Assert (Is_Protected_Type (Id));
7160 Ritem := First_Rep_Item (Id);
7161 while Present (Ritem) loop
7162 if Nkind (Ritem) = N_Pragma
7163 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7164 then
7165 return True;
7166 else
7167 Next_Rep_Item (Ritem);
7168 end if;
7169 end loop;
7171 return False;
7172 end Has_Interrupt_Handler;
7174 --------------------------
7175 -- Has_Non_Limited_View --
7176 --------------------------
7178 function Has_Non_Limited_View (Id : E) return B is
7179 begin
7180 return (Ekind (Id) in Incomplete_Kind
7181 or else Ekind (Id) in Class_Wide_Kind
7182 or else Ekind (Id) = E_Abstract_State)
7183 and then Present (Non_Limited_View (Id));
7184 end Has_Non_Limited_View;
7186 -----------------------------
7187 -- Has_Non_Null_Refinement --
7188 -----------------------------
7190 function Has_Non_Null_Refinement (Id : E) return B is
7191 begin
7192 -- "Refinement" is a concept applicable only to abstract states
7194 pragma Assert (Ekind (Id) = E_Abstract_State);
7196 if Has_Visible_Refinement (Id) then
7197 pragma Assert (Present (Refinement_Constituents (Id)));
7199 -- For a refinement to be non-null, the first constituent must be
7200 -- anything other than null.
7202 return
7203 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7204 end if;
7206 return False;
7207 end Has_Non_Null_Refinement;
7209 -----------------------------
7210 -- Has_Null_Abstract_State --
7211 -----------------------------
7213 function Has_Null_Abstract_State (Id : E) return B is
7214 begin
7215 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7217 return
7218 Present (Abstract_States (Id))
7219 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7220 end Has_Null_Abstract_State;
7222 -------------------------
7223 -- Has_Null_Refinement --
7224 -------------------------
7226 function Has_Null_Refinement (Id : E) return B is
7227 begin
7228 -- "Refinement" is a concept applicable only to abstract states
7230 pragma Assert (Ekind (Id) = E_Abstract_State);
7232 if Has_Visible_Refinement (Id) then
7233 pragma Assert (Present (Refinement_Constituents (Id)));
7235 -- For a refinement to be null, the state's sole constituent must be
7236 -- a null.
7238 return
7239 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7240 end if;
7242 return False;
7243 end Has_Null_Refinement;
7245 --------------------
7246 -- Has_Unmodified --
7247 --------------------
7249 function Has_Unmodified (E : Entity_Id) return Boolean is
7250 begin
7251 if Has_Pragma_Unmodified (E) then
7252 return True;
7253 elsif Warnings_Off (E) then
7254 Set_Warnings_Off_Used_Unmodified (E);
7255 return True;
7256 else
7257 return False;
7258 end if;
7259 end Has_Unmodified;
7261 ---------------------
7262 -- Has_Unreferenced --
7263 ---------------------
7265 function Has_Unreferenced (E : Entity_Id) return Boolean is
7266 begin
7267 if Has_Pragma_Unreferenced (E) then
7268 return True;
7269 elsif Warnings_Off (E) then
7270 Set_Warnings_Off_Used_Unreferenced (E);
7271 return True;
7272 else
7273 return False;
7274 end if;
7275 end Has_Unreferenced;
7277 ----------------------
7278 -- Has_Warnings_Off --
7279 ----------------------
7281 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7282 begin
7283 if Warnings_Off (E) then
7284 Set_Warnings_Off_Used (E);
7285 return True;
7286 else
7287 return False;
7288 end if;
7289 end Has_Warnings_Off;
7291 ------------------------------
7292 -- Implementation_Base_Type --
7293 ------------------------------
7295 function Implementation_Base_Type (Id : E) return E is
7296 Bastyp : Entity_Id;
7297 Imptyp : Entity_Id;
7299 begin
7300 Bastyp := Base_Type (Id);
7302 if Is_Incomplete_Or_Private_Type (Bastyp) then
7303 Imptyp := Underlying_Type (Bastyp);
7305 -- If we have an implementation type, then just return it,
7306 -- otherwise we return the Base_Type anyway. This can only
7307 -- happen in error situations and should avoid some error bombs.
7309 if Present (Imptyp) then
7310 return Base_Type (Imptyp);
7311 else
7312 return Bastyp;
7313 end if;
7315 else
7316 return Bastyp;
7317 end if;
7318 end Implementation_Base_Type;
7320 -------------------------
7321 -- Invariant_Procedure --
7322 -------------------------
7324 function Invariant_Procedure (Id : E) return E is
7325 S : Entity_Id;
7327 begin
7328 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7330 if No (Subprograms_For_Type (Id)) then
7331 return Empty;
7333 else
7334 S := Subprograms_For_Type (Id);
7335 while Present (S) loop
7336 if Is_Invariant_Procedure (S) then
7337 return S;
7338 else
7339 S := Subprograms_For_Type (S);
7340 end if;
7341 end loop;
7343 return Empty;
7344 end if;
7345 end Invariant_Procedure;
7347 ----------------------
7348 -- Is_Atomic_Or_VFA --
7349 ----------------------
7351 function Is_Atomic_Or_VFA (Id : E) return B is
7352 begin
7353 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
7354 end Is_Atomic_Or_VFA;
7356 ------------------
7357 -- Is_Base_Type --
7358 ------------------
7360 -- Global flag table allowing rapid computation of this function
7362 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7363 (E_Enumeration_Subtype |
7364 E_Incomplete_Type |
7365 E_Signed_Integer_Subtype |
7366 E_Modular_Integer_Subtype |
7367 E_Floating_Point_Subtype |
7368 E_Ordinary_Fixed_Point_Subtype |
7369 E_Decimal_Fixed_Point_Subtype |
7370 E_Array_Subtype |
7371 E_Record_Subtype |
7372 E_Private_Subtype |
7373 E_Record_Subtype_With_Private |
7374 E_Limited_Private_Subtype |
7375 E_Access_Subtype |
7376 E_Protected_Subtype |
7377 E_Task_Subtype |
7378 E_String_Literal_Subtype |
7379 E_Class_Wide_Subtype => False,
7380 others => True);
7382 function Is_Base_Type (Id : E) return Boolean is
7383 begin
7384 return Entity_Is_Base_Type (Ekind (Id));
7385 end Is_Base_Type;
7387 ---------------------
7388 -- Is_Boolean_Type --
7389 ---------------------
7391 function Is_Boolean_Type (Id : E) return B is
7392 begin
7393 return Root_Type (Id) = Standard_Boolean;
7394 end Is_Boolean_Type;
7396 ------------------------
7397 -- Is_Constant_Object --
7398 ------------------------
7400 function Is_Constant_Object (Id : E) return B is
7401 K : constant Entity_Kind := Ekind (Id);
7402 begin
7403 return
7404 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7405 end Is_Constant_Object;
7407 --------------------------
7408 -- Is_Controlled_Active --
7409 --------------------------
7411 function Is_Controlled_Active (Id : E) return B is
7412 begin
7413 return Is_Controlled (Id) and then not Disable_Controlled (Id);
7414 end Is_Controlled_Active;
7416 --------------------
7417 -- Is_Discriminal --
7418 --------------------
7420 function Is_Discriminal (Id : E) return B is
7421 begin
7422 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7423 and then Present (Discriminal_Link (Id)));
7424 end Is_Discriminal;
7426 ----------------------
7427 -- Is_Dynamic_Scope --
7428 ----------------------
7430 function Is_Dynamic_Scope (Id : E) return B is
7431 begin
7432 return
7433 Ekind (Id) = E_Block
7434 or else
7435 Ekind (Id) = E_Function
7436 or else
7437 Ekind (Id) = E_Procedure
7438 or else
7439 Ekind (Id) = E_Subprogram_Body
7440 or else
7441 Ekind (Id) = E_Task_Type
7442 or else
7443 (Ekind (Id) = E_Limited_Private_Type
7444 and then Present (Full_View (Id))
7445 and then Ekind (Full_View (Id)) = E_Task_Type)
7446 or else
7447 Ekind (Id) = E_Entry
7448 or else
7449 Ekind (Id) = E_Entry_Family
7450 or else
7451 Ekind (Id) = E_Return_Statement;
7452 end Is_Dynamic_Scope;
7454 --------------------
7455 -- Is_Entity_Name --
7456 --------------------
7458 function Is_Entity_Name (N : Node_Id) return Boolean is
7459 Kind : constant Node_Kind := Nkind (N);
7461 begin
7462 -- Identifiers, operator symbols, expanded names are entity names
7464 return Kind = N_Identifier
7465 or else Kind = N_Operator_Symbol
7466 or else Kind = N_Expanded_Name
7468 -- Attribute references are entity names if they refer to an entity.
7469 -- Note that we don't do this by testing for the presence of the
7470 -- Entity field in the N_Attribute_Reference node, since it may not
7471 -- have been set yet.
7473 or else (Kind = N_Attribute_Reference
7474 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7475 end Is_Entity_Name;
7477 -----------------------
7478 -- Is_External_State --
7479 -----------------------
7481 function Is_External_State (Id : E) return B is
7482 begin
7483 return
7484 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7485 end Is_External_State;
7487 ------------------
7488 -- Is_Finalizer --
7489 ------------------
7491 function Is_Finalizer (Id : E) return B is
7492 begin
7493 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7494 end Is_Finalizer;
7496 -------------------
7497 -- Is_Null_State --
7498 -------------------
7500 function Is_Null_State (Id : E) return B is
7501 begin
7502 return
7503 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7504 end Is_Null_State;
7506 ---------------------
7507 -- Is_Packed_Array --
7508 ---------------------
7510 function Is_Packed_Array (Id : E) return B is
7511 begin
7512 return Is_Array_Type (Id) and then Is_Packed (Id);
7513 end Is_Packed_Array;
7515 -----------------------------------
7516 -- Is_Package_Or_Generic_Package --
7517 -----------------------------------
7519 function Is_Package_Or_Generic_Package (Id : E) return B is
7520 begin
7521 return Ekind_In (Id, E_Generic_Package, E_Package);
7522 end Is_Package_Or_Generic_Package;
7524 ---------------
7525 -- Is_Prival --
7526 ---------------
7528 function Is_Prival (Id : E) return B is
7529 begin
7530 return (Ekind_In (Id, E_Constant, E_Variable)
7531 and then Present (Prival_Link (Id)));
7532 end Is_Prival;
7534 ----------------------------
7535 -- Is_Protected_Component --
7536 ----------------------------
7538 function Is_Protected_Component (Id : E) return B is
7539 begin
7540 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7541 end Is_Protected_Component;
7543 ----------------------------
7544 -- Is_Protected_Interface --
7545 ----------------------------
7547 function Is_Protected_Interface (Id : E) return B is
7548 Typ : constant Entity_Id := Base_Type (Id);
7549 begin
7550 if not Is_Interface (Typ) then
7551 return False;
7552 elsif Is_Class_Wide_Type (Typ) then
7553 return Is_Protected_Interface (Etype (Typ));
7554 else
7555 return Protected_Present (Type_Definition (Parent (Typ)));
7556 end if;
7557 end Is_Protected_Interface;
7559 ------------------------------
7560 -- Is_Protected_Record_Type --
7561 ------------------------------
7563 function Is_Protected_Record_Type (Id : E) return B is
7564 begin
7565 return
7566 Is_Concurrent_Record_Type (Id)
7567 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7568 end Is_Protected_Record_Type;
7570 --------------------------------
7571 -- Is_Standard_Character_Type --
7572 --------------------------------
7574 function Is_Standard_Character_Type (Id : E) return B is
7575 begin
7576 if Is_Type (Id) then
7577 declare
7578 R : constant Entity_Id := Root_Type (Id);
7579 begin
7580 return
7581 R = Standard_Character
7582 or else
7583 R = Standard_Wide_Character
7584 or else
7585 R = Standard_Wide_Wide_Character;
7586 end;
7588 else
7589 return False;
7590 end if;
7591 end Is_Standard_Character_Type;
7593 -----------------------------
7594 -- Is_Standard_String_Type --
7595 -----------------------------
7597 function Is_Standard_String_Type (Id : E) return B is
7598 begin
7599 if Is_Type (Id) then
7600 declare
7601 R : constant Entity_Id := Root_Type (Id);
7602 begin
7603 return
7604 R = Standard_String
7605 or else
7606 R = Standard_Wide_String
7607 or else
7608 R = Standard_Wide_Wide_String;
7609 end;
7611 else
7612 return False;
7613 end if;
7614 end Is_Standard_String_Type;
7616 --------------------
7617 -- Is_String_Type --
7618 --------------------
7620 function Is_String_Type (Id : E) return B is
7621 begin
7622 return Is_Array_Type (Id)
7623 and then Id /= Any_Composite
7624 and then Number_Dimensions (Id) = 1
7625 and then Is_Character_Type (Component_Type (Id));
7626 end Is_String_Type;
7628 -------------------------------
7629 -- Is_Synchronized_Interface --
7630 -------------------------------
7632 function Is_Synchronized_Interface (Id : E) return B is
7633 Typ : constant Entity_Id := Base_Type (Id);
7635 begin
7636 if not Is_Interface (Typ) then
7637 return False;
7639 elsif Is_Class_Wide_Type (Typ) then
7640 return Is_Synchronized_Interface (Etype (Typ));
7642 else
7643 return Protected_Present (Type_Definition (Parent (Typ)))
7644 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7645 or else Task_Present (Type_Definition (Parent (Typ)));
7646 end if;
7647 end Is_Synchronized_Interface;
7649 -----------------------
7650 -- Is_Task_Interface --
7651 -----------------------
7653 function Is_Task_Interface (Id : E) return B is
7654 Typ : constant Entity_Id := Base_Type (Id);
7655 begin
7656 if not Is_Interface (Typ) then
7657 return False;
7658 elsif Is_Class_Wide_Type (Typ) then
7659 return Is_Task_Interface (Etype (Typ));
7660 else
7661 return Task_Present (Type_Definition (Parent (Typ)));
7662 end if;
7663 end Is_Task_Interface;
7665 -------------------------
7666 -- Is_Task_Record_Type --
7667 -------------------------
7669 function Is_Task_Record_Type (Id : E) return B is
7670 begin
7671 return
7672 Is_Concurrent_Record_Type (Id)
7673 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7674 end Is_Task_Record_Type;
7676 ------------------------
7677 -- Is_Wrapper_Package --
7678 ------------------------
7680 function Is_Wrapper_Package (Id : E) return B is
7681 begin
7682 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7683 end Is_Wrapper_Package;
7685 -----------------
7686 -- Last_Formal --
7687 -----------------
7689 function Last_Formal (Id : E) return E is
7690 Formal : E;
7692 begin
7693 pragma Assert
7694 (Is_Overloadable (Id)
7695 or else Ekind_In (Id, E_Entry_Family,
7696 E_Subprogram_Body,
7697 E_Subprogram_Type));
7699 if Ekind (Id) = E_Enumeration_Literal then
7700 return Empty;
7702 else
7703 Formal := First_Formal (Id);
7705 if Present (Formal) then
7706 while Present (Next_Formal (Formal)) loop
7707 Formal := Next_Formal (Formal);
7708 end loop;
7709 end if;
7711 return Formal;
7712 end if;
7713 end Last_Formal;
7715 function Model_Emin_Value (Id : E) return Uint is
7716 begin
7717 return Machine_Emin_Value (Id);
7718 end Model_Emin_Value;
7720 -------------------------
7721 -- Model_Epsilon_Value --
7722 -------------------------
7724 function Model_Epsilon_Value (Id : E) return Ureal is
7725 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7726 begin
7727 return Radix ** (1 - Model_Mantissa_Value (Id));
7728 end Model_Epsilon_Value;
7730 --------------------------
7731 -- Model_Mantissa_Value --
7732 --------------------------
7734 function Model_Mantissa_Value (Id : E) return Uint is
7735 begin
7736 return Machine_Mantissa_Value (Id);
7737 end Model_Mantissa_Value;
7739 -----------------------
7740 -- Model_Small_Value --
7741 -----------------------
7743 function Model_Small_Value (Id : E) return Ureal is
7744 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7745 begin
7746 return Radix ** (Model_Emin_Value (Id) - 1);
7747 end Model_Small_Value;
7749 ------------------------
7750 -- Machine_Emax_Value --
7751 ------------------------
7753 function Machine_Emax_Value (Id : E) return Uint is
7754 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7756 begin
7757 case Float_Rep (Id) is
7758 when IEEE_Binary =>
7759 case Digs is
7760 when 1 .. 6 => return Uint_128;
7761 when 7 .. 15 => return 2**10;
7762 when 16 .. 33 => return 2**14;
7763 when others => return No_Uint;
7764 end case;
7766 when AAMP =>
7767 return Uint_2 ** Uint_7 - Uint_1;
7768 end case;
7769 end Machine_Emax_Value;
7771 ------------------------
7772 -- Machine_Emin_Value --
7773 ------------------------
7775 function Machine_Emin_Value (Id : E) return Uint is
7776 begin
7777 case Float_Rep (Id) is
7778 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7779 when AAMP => return -Machine_Emax_Value (Id);
7780 end case;
7781 end Machine_Emin_Value;
7783 ----------------------------
7784 -- Machine_Mantissa_Value --
7785 ----------------------------
7787 function Machine_Mantissa_Value (Id : E) return Uint is
7788 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7790 begin
7791 case Float_Rep (Id) is
7792 when IEEE_Binary =>
7793 case Digs is
7794 when 1 .. 6 => return Uint_24;
7795 when 7 .. 15 => return UI_From_Int (53);
7796 when 16 .. 18 => return Uint_64;
7797 when 19 .. 33 => return UI_From_Int (113);
7798 when others => return No_Uint;
7799 end case;
7801 when AAMP =>
7802 case Digs is
7803 when 1 .. 6 => return Uint_24;
7804 when 7 .. 9 => return UI_From_Int (40);
7805 when others => return No_Uint;
7806 end case;
7807 end case;
7808 end Machine_Mantissa_Value;
7810 -------------------------
7811 -- Machine_Radix_Value --
7812 -------------------------
7814 function Machine_Radix_Value (Id : E) return U is
7815 begin
7816 case Float_Rep (Id) is
7817 when IEEE_Binary | AAMP =>
7818 return Uint_2;
7819 end case;
7820 end Machine_Radix_Value;
7822 --------------------
7823 -- Next_Component --
7824 --------------------
7826 function Next_Component (Id : E) return E is
7827 Comp_Id : E;
7829 begin
7830 Comp_Id := Next_Entity (Id);
7831 while Present (Comp_Id) loop
7832 exit when Ekind (Comp_Id) = E_Component;
7833 Comp_Id := Next_Entity (Comp_Id);
7834 end loop;
7836 return Comp_Id;
7837 end Next_Component;
7839 ------------------------------------
7840 -- Next_Component_Or_Discriminant --
7841 ------------------------------------
7843 function Next_Component_Or_Discriminant (Id : E) return E is
7844 Comp_Id : E;
7846 begin
7847 Comp_Id := Next_Entity (Id);
7848 while Present (Comp_Id) loop
7849 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7850 Comp_Id := Next_Entity (Comp_Id);
7851 end loop;
7853 return Comp_Id;
7854 end Next_Component_Or_Discriminant;
7856 -----------------------
7857 -- Next_Discriminant --
7858 -----------------------
7860 -- This function actually implements both Next_Discriminant and
7861 -- Next_Stored_Discriminant by making sure that the Discriminant
7862 -- returned is of the same variety as Id.
7864 function Next_Discriminant (Id : E) return E is
7866 -- Derived Tagged types with private extensions look like this...
7868 -- E_Discriminant d1
7869 -- E_Discriminant d2
7870 -- E_Component _tag
7871 -- E_Discriminant d1
7872 -- E_Discriminant d2
7873 -- ...
7875 -- so it is critical not to go past the leading discriminants
7877 D : E := Id;
7879 begin
7880 pragma Assert (Ekind (Id) = E_Discriminant);
7882 loop
7883 D := Next_Entity (D);
7884 if No (D)
7885 or else (Ekind (D) /= E_Discriminant
7886 and then not Is_Itype (D))
7887 then
7888 return Empty;
7889 end if;
7891 exit when Ekind (D) = E_Discriminant
7892 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7893 end loop;
7895 return D;
7896 end Next_Discriminant;
7898 -----------------
7899 -- Next_Formal --
7900 -----------------
7902 function Next_Formal (Id : E) return E is
7903 P : E;
7905 begin
7906 -- Follow the chain of declared entities as long as the kind of the
7907 -- entity corresponds to a formal parameter. Skip internal entities
7908 -- that may have been created for implicit subtypes, in the process
7909 -- of analyzing default expressions.
7911 P := Id;
7912 loop
7913 Next_Entity (P);
7915 if No (P) or else Is_Formal (P) then
7916 return P;
7917 elsif not Is_Internal (P) then
7918 return Empty;
7919 end if;
7920 end loop;
7921 end Next_Formal;
7923 -----------------------------
7924 -- Next_Formal_With_Extras --
7925 -----------------------------
7927 function Next_Formal_With_Extras (Id : E) return E is
7928 begin
7929 if Present (Extra_Formal (Id)) then
7930 return Extra_Formal (Id);
7931 else
7932 return Next_Formal (Id);
7933 end if;
7934 end Next_Formal_With_Extras;
7936 ----------------
7937 -- Next_Index --
7938 ----------------
7940 function Next_Index (Id : Node_Id) return Node_Id is
7941 begin
7942 return Next (Id);
7943 end Next_Index;
7945 ------------------
7946 -- Next_Literal --
7947 ------------------
7949 function Next_Literal (Id : E) return E is
7950 begin
7951 pragma Assert (Nkind (Id) in N_Entity);
7952 return Next (Id);
7953 end Next_Literal;
7955 ------------------------------
7956 -- Next_Stored_Discriminant --
7957 ------------------------------
7959 function Next_Stored_Discriminant (Id : E) return E is
7960 begin
7961 -- See comment in Next_Discriminant
7963 return Next_Discriminant (Id);
7964 end Next_Stored_Discriminant;
7966 -----------------------
7967 -- Number_Dimensions --
7968 -----------------------
7970 function Number_Dimensions (Id : E) return Pos is
7971 N : Int;
7972 T : Node_Id;
7974 begin
7975 if Ekind (Id) = E_String_Literal_Subtype then
7976 return 1;
7978 else
7979 N := 0;
7980 T := First_Index (Id);
7981 while Present (T) loop
7982 N := N + 1;
7983 Next_Index (T);
7984 end loop;
7986 return N;
7987 end if;
7988 end Number_Dimensions;
7990 --------------------
7991 -- Number_Entries --
7992 --------------------
7994 function Number_Entries (Id : E) return Nat is
7995 N : Int;
7996 Ent : Entity_Id;
7998 begin
7999 pragma Assert (Is_Concurrent_Type (Id));
8001 N := 0;
8002 Ent := First_Entity (Id);
8003 while Present (Ent) loop
8004 if Is_Entry (Ent) then
8005 N := N + 1;
8006 end if;
8008 Ent := Next_Entity (Ent);
8009 end loop;
8011 return N;
8012 end Number_Entries;
8014 --------------------
8015 -- Number_Formals --
8016 --------------------
8018 function Number_Formals (Id : E) return Pos is
8019 N : Int;
8020 Formal : Entity_Id;
8022 begin
8023 N := 0;
8024 Formal := First_Formal (Id);
8025 while Present (Formal) loop
8026 N := N + 1;
8027 Formal := Next_Formal (Formal);
8028 end loop;
8030 return N;
8031 end Number_Formals;
8033 --------------------
8034 -- Parameter_Mode --
8035 --------------------
8037 function Parameter_Mode (Id : E) return Formal_Kind is
8038 begin
8039 return Ekind (Id);
8040 end Parameter_Mode;
8042 ------------------------
8043 -- Predicate_Function --
8044 ------------------------
8046 function Predicate_Function (Id : E) return E is
8047 S : Entity_Id;
8048 T : Entity_Id;
8050 begin
8051 pragma Assert (Is_Type (Id));
8053 -- If type is private and has a completion, predicate may be defined
8054 -- on the full view.
8056 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8057 T := Full_View (Id);
8058 else
8059 T := Id;
8060 end if;
8062 if No (Subprograms_For_Type (T)) then
8063 return Empty;
8065 else
8066 S := Subprograms_For_Type (T);
8067 while Present (S) loop
8068 if Is_Predicate_Function (S) then
8069 return S;
8070 else
8071 S := Subprograms_For_Type (S);
8072 end if;
8073 end loop;
8075 return Empty;
8076 end if;
8077 end Predicate_Function;
8079 --------------------------
8080 -- Predicate_Function_M --
8081 --------------------------
8083 function Predicate_Function_M (Id : E) return E is
8084 S : Entity_Id;
8085 T : Entity_Id;
8087 begin
8088 pragma Assert (Is_Type (Id));
8090 -- If type is private and has a completion, predicate may be defined
8091 -- on the full view.
8093 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8094 T := Full_View (Id);
8095 else
8096 T := Id;
8097 end if;
8099 if No (Subprograms_For_Type (T)) then
8100 return Empty;
8102 else
8103 S := Subprograms_For_Type (T);
8104 while Present (S) loop
8105 if Is_Predicate_Function_M (S) then
8106 return S;
8107 else
8108 S := Subprograms_For_Type (S);
8109 end if;
8110 end loop;
8112 return Empty;
8113 end if;
8114 end Predicate_Function_M;
8116 -------------------------
8117 -- Present_In_Rep_Item --
8118 -------------------------
8120 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8121 Ritem : Node_Id;
8123 begin
8124 Ritem := First_Rep_Item (E);
8126 while Present (Ritem) loop
8127 if Ritem = N then
8128 return True;
8129 end if;
8131 Next_Rep_Item (Ritem);
8132 end loop;
8134 return False;
8135 end Present_In_Rep_Item;
8137 --------------------------
8138 -- Primitive_Operations --
8139 --------------------------
8141 function Primitive_Operations (Id : E) return L is
8142 begin
8143 if Is_Concurrent_Type (Id) then
8144 if Present (Corresponding_Record_Type (Id)) then
8145 return Direct_Primitive_Operations
8146 (Corresponding_Record_Type (Id));
8148 -- If expansion is disabled the corresponding record type is absent,
8149 -- but if the type has ancestors it may have primitive operations.
8151 elsif Is_Tagged_Type (Id) then
8152 return Direct_Primitive_Operations (Id);
8154 else
8155 return No_Elist;
8156 end if;
8157 else
8158 return Direct_Primitive_Operations (Id);
8159 end if;
8160 end Primitive_Operations;
8162 ---------------------
8163 -- Record_Rep_Item --
8164 ---------------------
8166 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8167 begin
8168 Set_Next_Rep_Item (N, First_Rep_Item (E));
8169 Set_First_Rep_Item (E, N);
8170 end Record_Rep_Item;
8172 ---------------
8173 -- Root_Type --
8174 ---------------
8176 function Root_Type (Id : E) return E is
8177 T, Etyp : E;
8179 begin
8180 pragma Assert (Nkind (Id) in N_Entity);
8182 T := Base_Type (Id);
8184 if Ekind (T) = E_Class_Wide_Type then
8185 return Etype (T);
8187 -- Other cases
8189 else
8190 loop
8191 Etyp := Etype (T);
8193 if T = Etyp then
8194 return T;
8196 -- Following test catches some error cases resulting from
8197 -- previous errors.
8199 elsif No (Etyp) then
8200 Check_Error_Detected;
8201 return T;
8203 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8204 return T;
8206 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8207 return T;
8208 end if;
8210 T := Etyp;
8212 -- Return if there is a circularity in the inheritance chain. This
8213 -- happens in some error situations and we do not want to get
8214 -- stuck in this loop.
8216 if T = Base_Type (Id) then
8217 return T;
8218 end if;
8219 end loop;
8220 end if;
8221 end Root_Type;
8223 ---------------------
8224 -- Safe_Emax_Value --
8225 ---------------------
8227 function Safe_Emax_Value (Id : E) return Uint is
8228 begin
8229 return Machine_Emax_Value (Id);
8230 end Safe_Emax_Value;
8232 ----------------------
8233 -- Safe_First_Value --
8234 ----------------------
8236 function Safe_First_Value (Id : E) return Ureal is
8237 begin
8238 return -Safe_Last_Value (Id);
8239 end Safe_First_Value;
8241 ---------------------
8242 -- Safe_Last_Value --
8243 ---------------------
8245 function Safe_Last_Value (Id : E) return Ureal is
8246 Radix : constant Uint := Machine_Radix_Value (Id);
8247 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8248 Emax : constant Uint := Safe_Emax_Value (Id);
8249 Significand : constant Uint := Radix ** Mantissa - 1;
8250 Exponent : constant Uint := Emax - Mantissa;
8252 begin
8253 if Radix = 2 then
8254 return
8255 UR_From_Components
8256 (Num => Significand * 2 ** (Exponent mod 4),
8257 Den => -Exponent / 4,
8258 Rbase => 16);
8259 else
8260 return
8261 UR_From_Components
8262 (Num => Significand,
8263 Den => -Exponent,
8264 Rbase => 16);
8265 end if;
8266 end Safe_Last_Value;
8268 -----------------
8269 -- Scope_Depth --
8270 -----------------
8272 function Scope_Depth (Id : E) return Uint is
8273 Scop : Entity_Id;
8275 begin
8276 Scop := Id;
8277 while Is_Record_Type (Scop) loop
8278 Scop := Scope (Scop);
8279 end loop;
8281 return Scope_Depth_Value (Scop);
8282 end Scope_Depth;
8284 ---------------------
8285 -- Scope_Depth_Set --
8286 ---------------------
8288 function Scope_Depth_Set (Id : E) return B is
8289 begin
8290 return not Is_Record_Type (Id)
8291 and then Field22 (Id) /= Union_Id (Empty);
8292 end Scope_Depth_Set;
8294 -----------------------------
8295 -- Set_Component_Alignment --
8296 -----------------------------
8298 -- Component Alignment is encoded using two flags, Flag128/129 as
8299 -- follows. Note that both flags False = Align_Default, so that the
8300 -- default initialization of flags to False initializes component
8301 -- alignment to the default value as required.
8303 -- Flag128 Flag129 Value
8304 -- ------- ------- -----
8305 -- False False Calign_Default
8306 -- False True Calign_Component_Size
8307 -- True False Calign_Component_Size_4
8308 -- True True Calign_Storage_Unit
8310 procedure Set_Component_Alignment (Id : E; V : C) is
8311 begin
8312 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8313 and then Is_Base_Type (Id));
8315 case V is
8316 when Calign_Default =>
8317 Set_Flag128 (Id, False);
8318 Set_Flag129 (Id, False);
8320 when Calign_Component_Size =>
8321 Set_Flag128 (Id, False);
8322 Set_Flag129 (Id, True);
8324 when Calign_Component_Size_4 =>
8325 Set_Flag128 (Id, True);
8326 Set_Flag129 (Id, False);
8328 when Calign_Storage_Unit =>
8329 Set_Flag128 (Id, True);
8330 Set_Flag129 (Id, True);
8331 end case;
8332 end Set_Component_Alignment;
8334 -------------------------------------
8335 -- Set_Default_Init_Cond_Procedure --
8336 -------------------------------------
8338 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8339 Base_Typ : Entity_Id;
8340 Subp_Id : Entity_Id;
8342 begin
8343 pragma Assert
8344 (Is_Type (Id)
8345 and then (Has_Default_Init_Cond (Id)
8346 or Has_Inherited_Default_Init_Cond (Id)));
8347 Base_Typ := Base_Type (Id);
8349 Subp_Id := Subprograms_For_Type (Base_Typ);
8350 Set_Subprograms_For_Type (Base_Typ, V);
8351 Set_Subprograms_For_Type (V, Subp_Id);
8353 -- Check for a duplicate procedure
8355 while Present (Subp_Id) loop
8356 if Is_Default_Init_Cond_Procedure (Subp_Id) then
8357 raise Program_Error;
8358 end if;
8360 Subp_Id := Subprograms_For_Type (Subp_Id);
8361 end loop;
8362 end Set_Default_Init_Cond_Procedure;
8364 -----------------------------
8365 -- Set_Invariant_Procedure --
8366 -----------------------------
8368 procedure Set_Invariant_Procedure (Id : E; V : E) is
8369 S : Entity_Id;
8371 begin
8372 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8374 S := Subprograms_For_Type (Id);
8375 Set_Subprograms_For_Type (Id, V);
8376 Set_Subprograms_For_Type (V, S);
8378 -- Check for duplicate entry
8380 while Present (S) loop
8381 if Is_Invariant_Procedure (S) then
8382 raise Program_Error;
8383 else
8384 S := Subprograms_For_Type (S);
8385 end if;
8386 end loop;
8387 end Set_Invariant_Procedure;
8389 ----------------------------
8390 -- Set_Predicate_Function --
8391 ----------------------------
8393 procedure Set_Predicate_Function (Id : E; V : E) is
8394 S : Entity_Id;
8396 begin
8397 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8399 S := Subprograms_For_Type (Id);
8400 Set_Subprograms_For_Type (Id, V);
8401 Set_Subprograms_For_Type (V, S);
8403 while Present (S) loop
8404 if Is_Predicate_Function (S) then
8405 raise Program_Error;
8406 else
8407 S := Subprograms_For_Type (S);
8408 end if;
8409 end loop;
8410 end Set_Predicate_Function;
8412 ------------------------------
8413 -- Set_Predicate_Function_M --
8414 ------------------------------
8416 procedure Set_Predicate_Function_M (Id : E; V : E) is
8417 S : Entity_Id;
8419 begin
8420 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8422 S := Subprograms_For_Type (Id);
8423 Set_Subprograms_For_Type (Id, V);
8424 Set_Subprograms_For_Type (V, S);
8426 -- Check for duplicates
8428 while Present (S) loop
8429 if Is_Predicate_Function_M (S) then
8430 raise Program_Error;
8431 else
8432 S := Subprograms_For_Type (S);
8433 end if;
8434 end loop;
8435 end Set_Predicate_Function_M;
8437 -----------------
8438 -- Size_Clause --
8439 -----------------
8441 function Size_Clause (Id : E) return N is
8442 begin
8443 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8444 end Size_Clause;
8446 ------------------------
8447 -- Stream_Size_Clause --
8448 ------------------------
8450 function Stream_Size_Clause (Id : E) return N is
8451 begin
8452 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8453 end Stream_Size_Clause;
8455 ------------------
8456 -- Subtype_Kind --
8457 ------------------
8459 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8460 Kind : Entity_Kind;
8462 begin
8463 case K is
8464 when Access_Kind =>
8465 Kind := E_Access_Subtype;
8467 when E_Array_Type |
8468 E_Array_Subtype =>
8469 Kind := E_Array_Subtype;
8471 when E_Class_Wide_Type |
8472 E_Class_Wide_Subtype =>
8473 Kind := E_Class_Wide_Subtype;
8475 when E_Decimal_Fixed_Point_Type |
8476 E_Decimal_Fixed_Point_Subtype =>
8477 Kind := E_Decimal_Fixed_Point_Subtype;
8479 when E_Ordinary_Fixed_Point_Type |
8480 E_Ordinary_Fixed_Point_Subtype =>
8481 Kind := E_Ordinary_Fixed_Point_Subtype;
8483 when E_Private_Type |
8484 E_Private_Subtype =>
8485 Kind := E_Private_Subtype;
8487 when E_Limited_Private_Type |
8488 E_Limited_Private_Subtype =>
8489 Kind := E_Limited_Private_Subtype;
8491 when E_Record_Type_With_Private |
8492 E_Record_Subtype_With_Private =>
8493 Kind := E_Record_Subtype_With_Private;
8495 when E_Record_Type |
8496 E_Record_Subtype =>
8497 Kind := E_Record_Subtype;
8499 when Enumeration_Kind =>
8500 Kind := E_Enumeration_Subtype;
8502 when Float_Kind =>
8503 Kind := E_Floating_Point_Subtype;
8505 when Signed_Integer_Kind =>
8506 Kind := E_Signed_Integer_Subtype;
8508 when Modular_Integer_Kind =>
8509 Kind := E_Modular_Integer_Subtype;
8511 when Protected_Kind =>
8512 Kind := E_Protected_Subtype;
8514 when Task_Kind =>
8515 Kind := E_Task_Subtype;
8517 when others =>
8518 Kind := E_Void;
8519 raise Program_Error;
8520 end case;
8522 return Kind;
8523 end Subtype_Kind;
8525 ---------------------
8526 -- Type_High_Bound --
8527 ---------------------
8529 function Type_High_Bound (Id : E) return Node_Id is
8530 Rng : constant Node_Id := Scalar_Range (Id);
8531 begin
8532 if Nkind (Rng) = N_Subtype_Indication then
8533 return High_Bound (Range_Expression (Constraint (Rng)));
8534 else
8535 return High_Bound (Rng);
8536 end if;
8537 end Type_High_Bound;
8539 --------------------
8540 -- Type_Low_Bound --
8541 --------------------
8543 function Type_Low_Bound (Id : E) return Node_Id is
8544 Rng : constant Node_Id := Scalar_Range (Id);
8545 begin
8546 if Nkind (Rng) = N_Subtype_Indication then
8547 return Low_Bound (Range_Expression (Constraint (Rng)));
8548 else
8549 return Low_Bound (Rng);
8550 end if;
8551 end Type_Low_Bound;
8553 ---------------------
8554 -- Underlying_Type --
8555 ---------------------
8557 function Underlying_Type (Id : E) return E is
8558 begin
8559 -- For record_with_private the underlying type is always the direct
8560 -- full view. Never try to take the full view of the parent it
8561 -- doesn't make sense.
8563 if Ekind (Id) = E_Record_Type_With_Private then
8564 return Full_View (Id);
8566 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8568 -- If we have an incomplete or private type with a full view,
8569 -- then we return the Underlying_Type of this full view.
8571 if Present (Full_View (Id)) then
8572 if Id = Full_View (Id) then
8574 -- Previous error in declaration
8576 return Empty;
8578 else
8579 return Underlying_Type (Full_View (Id));
8580 end if;
8582 -- If we have a private type with an underlying full view, then we
8583 -- return the Underlying_Type of this underlying full view.
8585 elsif Ekind (Id) in Private_Kind
8586 and then Present (Underlying_Full_View (Id))
8587 then
8588 return Underlying_Type (Underlying_Full_View (Id));
8590 -- If we have an incomplete entity that comes from the limited
8591 -- view then we return the Underlying_Type of its non-limited
8592 -- view.
8594 elsif From_Limited_With (Id)
8595 and then Present (Non_Limited_View (Id))
8596 then
8597 return Underlying_Type (Non_Limited_View (Id));
8599 -- Otherwise check for the case where we have a derived type or
8600 -- subtype, and if so get the Underlying_Type of the parent type.
8602 elsif Etype (Id) /= Id then
8603 return Underlying_Type (Etype (Id));
8605 -- Otherwise we have an incomplete or private type that has
8606 -- no full view, which means that we have not encountered the
8607 -- completion, so return Empty to indicate the underlying type
8608 -- is not yet known.
8610 else
8611 return Empty;
8612 end if;
8614 -- For non-incomplete, non-private types, return the type itself Also
8615 -- for entities that are not types at all return the entity itself.
8617 else
8618 return Id;
8619 end if;
8620 end Underlying_Type;
8622 ------------------------
8623 -- Write_Entity_Flags --
8624 ------------------------
8626 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8628 procedure W (Flag_Name : String; Flag : Boolean);
8629 -- Write out given flag if it is set
8631 -------
8632 -- W --
8633 -------
8635 procedure W (Flag_Name : String; Flag : Boolean) is
8636 begin
8637 if Flag then
8638 Write_Str (Prefix);
8639 Write_Str (Flag_Name);
8640 Write_Str (" = True");
8641 Write_Eol;
8642 end if;
8643 end W;
8645 -- Start of processing for Write_Entity_Flags
8647 begin
8648 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8649 and then Is_Base_Type (Id)
8650 then
8651 Write_Str (Prefix);
8652 Write_Str ("Component_Alignment = ");
8654 case Component_Alignment (Id) is
8655 when Calign_Default =>
8656 Write_Str ("Calign_Default");
8658 when Calign_Component_Size =>
8659 Write_Str ("Calign_Component_Size");
8661 when Calign_Component_Size_4 =>
8662 Write_Str ("Calign_Component_Size_4");
8664 when Calign_Storage_Unit =>
8665 Write_Str ("Calign_Storage_Unit");
8666 end case;
8668 Write_Eol;
8669 end if;
8671 W ("Address_Taken", Flag104 (Id));
8672 W ("Body_Needed_For_SAL", Flag40 (Id));
8673 W ("C_Pass_By_Copy", Flag125 (Id));
8674 W ("Can_Never_Be_Null", Flag38 (Id));
8675 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8676 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8677 W ("Debug_Info_Off", Flag166 (Id));
8678 W ("Default_Expressions_Processed", Flag108 (Id));
8679 W ("Delay_Cleanups", Flag114 (Id));
8680 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8681 W ("Depends_On_Private", Flag14 (Id));
8682 W ("Discard_Names", Flag88 (Id));
8683 W ("Elaboration_Entity_Required", Flag174 (Id));
8684 W ("Elaborate_Body_Desirable", Flag210 (Id));
8685 W ("Entry_Accepted", Flag152 (Id));
8686 W ("Can_Use_Internal_Rep", Flag229 (Id));
8687 W ("Finalize_Storage_Only", Flag158 (Id));
8688 W ("From_Limited_With", Flag159 (Id));
8689 W ("Has_Aliased_Components", Flag135 (Id));
8690 W ("Has_Alignment_Clause", Flag46 (Id));
8691 W ("Has_All_Calls_Remote", Flag79 (Id));
8692 W ("Has_Atomic_Components", Flag86 (Id));
8693 W ("Has_Biased_Representation", Flag139 (Id));
8694 W ("Has_Completion", Flag26 (Id));
8695 W ("Has_Completion_In_Body", Flag71 (Id));
8696 W ("Has_Complex_Representation", Flag140 (Id));
8697 W ("Has_Component_Size_Clause", Flag68 (Id));
8698 W ("Has_Contiguous_Rep", Flag181 (Id));
8699 W ("Has_Controlled_Component", Flag43 (Id));
8700 W ("Has_Controlling_Result", Flag98 (Id));
8701 W ("Has_Convention_Pragma", Flag119 (Id));
8702 W ("Has_Default_Aspect", Flag39 (Id));
8703 W ("Has_Default_Init_Cond", Flag3 (Id));
8704 W ("Has_Delayed_Aspects", Flag200 (Id));
8705 W ("Has_Delayed_Freeze", Flag18 (Id));
8706 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8707 W ("Has_Discriminants", Flag5 (Id));
8708 W ("Has_Dispatch_Table", Flag220 (Id));
8709 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8710 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8711 W ("Has_Exit", Flag47 (Id));
8712 W ("Has_Expanded_Contract", Flag240 (Id));
8713 W ("Has_Forward_Instantiation", Flag175 (Id));
8714 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8715 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8716 W ("Has_Homonym", Flag56 (Id));
8717 W ("Has_Implicit_Dereference", Flag251 (Id));
8718 W ("Has_Independent_Components", Flag34 (Id));
8719 W ("Has_Inheritable_Invariants", Flag248 (Id));
8720 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8721 W ("Has_Initial_Value", Flag219 (Id));
8722 W ("Has_Invariants", Flag232 (Id));
8723 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8724 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8725 W ("Has_Master_Entity", Flag21 (Id));
8726 W ("Has_Missing_Return", Flag142 (Id));
8727 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8728 W ("Has_Nested_Subprogram", Flag282 (Id));
8729 W ("Has_Non_Standard_Rep", Flag75 (Id));
8730 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8731 W ("Has_Object_Size_Clause", Flag172 (Id));
8732 W ("Has_Per_Object_Constraint", Flag154 (Id));
8733 W ("Has_Pragma_Controlled", Flag27 (Id));
8734 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8735 W ("Has_Pragma_Inline", Flag157 (Id));
8736 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8737 W ("Has_Pragma_No_Inline", Flag201 (Id));
8738 W ("Has_Pragma_Ordered", Flag198 (Id));
8739 W ("Has_Pragma_Pack", Flag121 (Id));
8740 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8741 W ("Has_Pragma_Pure", Flag203 (Id));
8742 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8743 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8744 W ("Has_Pragma_Unmodified", Flag233 (Id));
8745 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8746 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8747 W ("Has_Predicates", Flag250 (Id));
8748 W ("Has_Primitive_Operations", Flag120 (Id));
8749 W ("Has_Private_Ancestor", Flag151 (Id));
8750 W ("Has_Private_Declaration", Flag155 (Id));
8751 W ("Has_Protected", Flag271 (Id));
8752 W ("Has_Qualified_Name", Flag161 (Id));
8753 W ("Has_RACW", Flag214 (Id));
8754 W ("Has_Record_Rep_Clause", Flag65 (Id));
8755 W ("Has_Recursive_Call", Flag143 (Id));
8756 W ("Has_Shift_Operator", Flag267 (Id));
8757 W ("Has_Size_Clause", Flag29 (Id));
8758 W ("Has_Small_Clause", Flag67 (Id));
8759 W ("Has_Specified_Layout", Flag100 (Id));
8760 W ("Has_Specified_Stream_Input", Flag190 (Id));
8761 W ("Has_Specified_Stream_Output", Flag191 (Id));
8762 W ("Has_Specified_Stream_Read", Flag192 (Id));
8763 W ("Has_Specified_Stream_Write", Flag193 (Id));
8764 W ("Has_Static_Discriminants", Flag211 (Id));
8765 W ("Has_Static_Predicate", Flag269 (Id));
8766 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8767 W ("Has_Storage_Size_Clause", Flag23 (Id));
8768 W ("Has_Stream_Size_Clause", Flag184 (Id));
8769 W ("Has_Task", Flag30 (Id));
8770 W ("Has_Thunks", Flag228 (Id));
8771 W ("Has_Unchecked_Union", Flag123 (Id));
8772 W ("Has_Unknown_Discriminants", Flag72 (Id));
8773 W ("Has_Uplevel_Reference", Flag215 (Id));
8774 W ("Has_Visible_Refinement", Flag263 (Id));
8775 W ("Has_Volatile_Components", Flag87 (Id));
8776 W ("Has_Xref_Entry", Flag182 (Id));
8777 W ("In_Package_Body", Flag48 (Id));
8778 W ("In_Private_Part", Flag45 (Id));
8779 W ("In_Use", Flag8 (Id));
8780 W ("Is_Abstract_Subprogram", Flag19 (Id));
8781 W ("Is_Abstract_Type", Flag146 (Id));
8782 W ("Is_Access_Constant", Flag69 (Id));
8783 W ("Is_Ada_2005_Only", Flag185 (Id));
8784 W ("Is_Ada_2012_Only", Flag199 (Id));
8785 W ("Is_Aliased", Flag15 (Id));
8786 W ("Is_Asynchronous", Flag81 (Id));
8787 W ("Is_Atomic", Flag85 (Id));
8788 W ("Is_Bit_Packed_Array", Flag122 (Id));
8789 W ("Is_CPP_Class", Flag74 (Id));
8790 W ("Is_Called", Flag102 (Id));
8791 W ("Is_Character_Type", Flag63 (Id));
8792 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8793 W ("Is_Child_Unit", Flag73 (Id));
8794 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8795 W ("Is_Compilation_Unit", Flag149 (Id));
8796 W ("Is_Completely_Hidden", Flag103 (Id));
8797 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8798 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8799 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8800 W ("Is_Constrained", Flag12 (Id));
8801 W ("Is_Constructor", Flag76 (Id));
8802 W ("Is_Controlled", Flag42 (Id));
8803 W ("Is_Controlling_Formal", Flag97 (Id));
8804 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8805 W ("Is_Descendent_Of_Address", Flag223 (Id));
8806 W ("Is_Discrim_SO_Function", Flag176 (Id));
8807 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8808 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8809 W ("Is_Dispatching_Operation", Flag6 (Id));
8810 W ("Is_Eliminated", Flag124 (Id));
8811 W ("Is_Entry_Formal", Flag52 (Id));
8812 W ("Is_Exported", Flag99 (Id));
8813 W ("Is_First_Subtype", Flag70 (Id));
8814 W ("Is_For_Access_Subtype", Flag118 (Id));
8815 W ("Is_Formal_Subprogram", Flag111 (Id));
8816 W ("Is_Frozen", Flag4 (Id));
8817 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8818 W ("Is_Generic_Actual_Type", Flag94 (Id));
8819 W ("Is_Generic_Instance", Flag130 (Id));
8820 W ("Is_Generic_Type", Flag13 (Id));
8821 W ("Is_Hidden", Flag57 (Id));
8822 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8823 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8824 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8825 W ("Is_Immediately_Visible", Flag7 (Id));
8826 W ("Is_Implementation_Defined", Flag254 (Id));
8827 W ("Is_Imported", Flag24 (Id));
8828 W ("Is_Independent", Flag268 (Id));
8829 W ("Is_Inlined", Flag11 (Id));
8830 W ("Is_Inlined_Always", Flag1 (Id));
8831 W ("Is_Instantiated", Flag126 (Id));
8832 W ("Is_Interface", Flag186 (Id));
8833 W ("Is_Internal", Flag17 (Id));
8834 W ("Is_Interrupt_Handler", Flag89 (Id));
8835 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8836 W ("Is_Invariant_Procedure", Flag257 (Id));
8837 W ("Is_Itype", Flag91 (Id));
8838 W ("Is_Known_Non_Null", Flag37 (Id));
8839 W ("Is_Known_Null", Flag204 (Id));
8840 W ("Is_Known_Valid", Flag170 (Id));
8841 W ("Is_Limited_Composite", Flag106 (Id));
8842 W ("Is_Limited_Interface", Flag197 (Id));
8843 W ("Is_Limited_Record", Flag25 (Id));
8844 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8845 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8846 W ("Is_Non_Static_Subtype", Flag109 (Id));
8847 W ("Is_Null_Init_Proc", Flag178 (Id));
8848 W ("Is_Obsolescent", Flag153 (Id));
8849 W ("Is_Only_Out_Parameter", Flag226 (Id));
8850 W ("Is_Package_Body_Entity", Flag160 (Id));
8851 W ("Is_Packed", Flag51 (Id));
8852 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8853 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8854 W ("Is_Predicate_Function", Flag255 (Id));
8855 W ("Is_Predicate_Function_M", Flag256 (Id));
8856 W ("Is_Preelaborated", Flag59 (Id));
8857 W ("Is_Primitive", Flag218 (Id));
8858 W ("Is_Primitive_Wrapper", Flag195 (Id));
8859 W ("Is_Private_Composite", Flag107 (Id));
8860 W ("Is_Private_Descendant", Flag53 (Id));
8861 W ("Is_Private_Primitive", Flag245 (Id));
8862 W ("Is_Processed_Transient", Flag252 (Id));
8863 W ("Is_Public", Flag10 (Id));
8864 W ("Is_Pure", Flag44 (Id));
8865 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8866 W ("Is_RACW_Stub_Type", Flag244 (Id));
8867 W ("Is_Raised", Flag224 (Id));
8868 W ("Is_Remote_Call_Interface", Flag62 (Id));
8869 W ("Is_Remote_Types", Flag61 (Id));
8870 W ("Is_Renaming_Of_Object", Flag112 (Id));
8871 W ("Is_Return_Object", Flag209 (Id));
8872 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8873 W ("Is_Shared_Passive", Flag60 (Id));
8874 W ("Is_Static_Type", Flag281 (Id));
8875 W ("Is_Statically_Allocated", Flag28 (Id));
8876 W ("Is_Tag", Flag78 (Id));
8877 W ("Is_Tagged_Type", Flag55 (Id));
8878 W ("Is_Thunk", Flag225 (Id));
8879 W ("Is_Trivial_Subprogram", Flag235 (Id));
8880 W ("Is_True_Constant", Flag163 (Id));
8881 W ("Is_Unchecked_Union", Flag117 (Id));
8882 W ("Is_Underlying_Record_View", Flag246 (Id));
8883 W ("Is_Unimplemented", Flag284 (Id));
8884 W ("Is_Unsigned_Type", Flag144 (Id));
8885 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
8886 W ("Is_Valued_Procedure", Flag127 (Id));
8887 W ("Is_Visible_Formal", Flag206 (Id));
8888 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8889 W ("Is_Volatile", Flag16 (Id));
8890 W ("Is_Volatile_Full_Access", Flag285 (Id));
8891 W ("Itype_Printed", Flag202 (Id));
8892 W ("Kill_Elaboration_Checks", Flag32 (Id));
8893 W ("Kill_Range_Checks", Flag33 (Id));
8894 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8895 W ("Low_Bound_Tested", Flag205 (Id));
8896 W ("Machine_Radix_10", Flag84 (Id));
8897 W ("Materialize_Entity", Flag168 (Id));
8898 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8899 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8900 W ("Must_Have_Preelab_Init", Flag208 (Id));
8901 W ("Needs_Debug_Info", Flag147 (Id));
8902 W ("Needs_No_Actuals", Flag22 (Id));
8903 W ("Needs_Typedef", Flag286 (Id));
8904 W ("Never_Set_In_Source", Flag115 (Id));
8905 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8906 W ("No_Pool_Assigned", Flag131 (Id));
8907 W ("No_Predicate_On_actual", Flag275 (Id));
8908 W ("No_Return", Flag113 (Id));
8909 W ("No_Strict_Aliasing", Flag136 (Id));
8910 W ("Non_Binary_Modulus", Flag58 (Id));
8911 W ("Nonzero_Is_True", Flag162 (Id));
8912 W ("OK_To_Rename", Flag247 (Id));
8913 W ("OK_To_Reorder_Components", Flag239 (Id));
8914 W ("Optimize_Alignment_Space", Flag241 (Id));
8915 W ("Optimize_Alignment_Time", Flag242 (Id));
8916 W ("Overlays_Constant", Flag243 (Id));
8917 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8918 W ("Reachable", Flag49 (Id));
8919 W ("Referenced", Flag156 (Id));
8920 W ("Referenced_As_LHS", Flag36 (Id));
8921 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8922 W ("Renamed_In_Spec", Flag231 (Id));
8923 W ("Requires_Overriding", Flag213 (Id));
8924 W ("Return_Present", Flag54 (Id));
8925 W ("Returns_By_Ref", Flag90 (Id));
8926 W ("Returns_Limited_View", Flag134 (Id));
8927 W ("Reverse_Bit_Order", Flag164 (Id));
8928 W ("Reverse_Storage_Order", Flag93 (Id));
8929 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8930 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8931 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8932 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8933 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8934 W ("SSO_Set_High_By_Default", Flag273 (Id));
8935 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8936 W ("Static_Elaboration_Desired", Flag77 (Id));
8937 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8938 W ("Strict_Alignment", Flag145 (Id));
8939 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8940 W ("Suppress_Initialization", Flag105 (Id));
8941 W ("Suppress_Style_Checks", Flag165 (Id));
8942 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8943 W ("Treat_As_Volatile", Flag41 (Id));
8944 W ("Universal_Aliasing", Flag216 (Id));
8945 W ("Used_As_Generic_Actual", Flag222 (Id));
8946 W ("Uses_Sec_Stack", Flag95 (Id));
8947 W ("Warnings_Off", Flag96 (Id));
8948 W ("Warnings_Off_Used", Flag236 (Id));
8949 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8950 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8951 W ("Was_Hidden", Flag196 (Id));
8952 end Write_Entity_Flags;
8954 -----------------------
8955 -- Write_Entity_Info --
8956 -----------------------
8958 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8960 procedure Write_Attribute (Which : String; Nam : E);
8961 -- Write attribute value with given string name
8963 procedure Write_Kind (Id : Entity_Id);
8964 -- Write Ekind field of entity
8966 ---------------------
8967 -- Write_Attribute --
8968 ---------------------
8970 procedure Write_Attribute (Which : String; Nam : E) is
8971 begin
8972 Write_Str (Prefix);
8973 Write_Str (Which);
8974 Write_Int (Int (Nam));
8975 Write_Str (" ");
8976 Write_Name (Chars (Nam));
8977 Write_Str (" ");
8978 end Write_Attribute;
8980 ----------------
8981 -- Write_Kind --
8982 ----------------
8984 procedure Write_Kind (Id : Entity_Id) is
8985 K : constant String := Entity_Kind'Image (Ekind (Id));
8987 begin
8988 Write_Str (Prefix);
8989 Write_Str (" Kind ");
8991 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8992 Write_Str ("TAGGED ");
8993 end if;
8995 Write_Str (K (3 .. K'Length));
8996 Write_Str (" ");
8998 if Is_Type (Id) and then Depends_On_Private (Id) then
8999 Write_Str ("Depends_On_Private ");
9000 end if;
9001 end Write_Kind;
9003 -- Start of processing for Write_Entity_Info
9005 begin
9006 Write_Eol;
9007 Write_Attribute ("Name ", Id);
9008 Write_Int (Int (Id));
9009 Write_Eol;
9010 Write_Kind (Id);
9011 Write_Eol;
9012 Write_Attribute (" Type ", Etype (Id));
9013 Write_Eol;
9014 Write_Attribute (" Scope ", Scope (Id));
9015 Write_Eol;
9017 case Ekind (Id) is
9019 when Discrete_Kind =>
9020 Write_Str ("Bounds: Id = ");
9022 if Present (Scalar_Range (Id)) then
9023 Write_Int (Int (Type_Low_Bound (Id)));
9024 Write_Str (" .. Id = ");
9025 Write_Int (Int (Type_High_Bound (Id)));
9026 else
9027 Write_Str ("Empty");
9028 end if;
9030 Write_Eol;
9032 when Array_Kind =>
9033 declare
9034 Index : E;
9036 begin
9037 Write_Attribute
9038 (" Component Type ", Component_Type (Id));
9039 Write_Eol;
9040 Write_Str (Prefix);
9041 Write_Str (" Indexes ");
9043 Index := First_Index (Id);
9044 while Present (Index) loop
9045 Write_Attribute (" ", Etype (Index));
9046 Index := Next_Index (Index);
9047 end loop;
9049 Write_Eol;
9050 end;
9052 when Access_Kind =>
9053 Write_Attribute
9054 (" Directly Designated Type ",
9055 Directly_Designated_Type (Id));
9056 Write_Eol;
9058 when Overloadable_Kind =>
9059 if Present (Homonym (Id)) then
9060 Write_Str (" Homonym ");
9061 Write_Name (Chars (Homonym (Id)));
9062 Write_Str (" ");
9063 Write_Int (Int (Homonym (Id)));
9064 Write_Eol;
9065 end if;
9067 Write_Eol;
9069 when E_Component =>
9070 if Ekind (Scope (Id)) in Record_Kind then
9071 Write_Attribute (
9072 " Original_Record_Component ",
9073 Original_Record_Component (Id));
9074 Write_Int (Int (Original_Record_Component (Id)));
9075 Write_Eol;
9076 end if;
9078 when others => null;
9079 end case;
9080 end Write_Entity_Info;
9082 -----------------------
9083 -- Write_Field6_Name --
9084 -----------------------
9086 procedure Write_Field6_Name (Id : Entity_Id) is
9087 pragma Unreferenced (Id);
9088 begin
9089 Write_Str ("First_Rep_Item");
9090 end Write_Field6_Name;
9092 -----------------------
9093 -- Write_Field7_Name --
9094 -----------------------
9096 procedure Write_Field7_Name (Id : Entity_Id) is
9097 pragma Unreferenced (Id);
9098 begin
9099 Write_Str ("Freeze_Node");
9100 end Write_Field7_Name;
9102 -----------------------
9103 -- Write_Field8_Name --
9104 -----------------------
9106 procedure Write_Field8_Name (Id : Entity_Id) is
9107 begin
9108 case Ekind (Id) is
9109 when Type_Kind =>
9110 Write_Str ("Associated_Node_For_Itype");
9112 when E_Package =>
9113 Write_Str ("Dependent_Instances");
9115 when E_Loop =>
9116 Write_Str ("First_Exit_Statement");
9118 when E_Variable =>
9119 Write_Str ("Hiding_Loop_Variable");
9121 when Formal_Kind |
9122 E_Function |
9123 E_Subprogram_Body =>
9124 Write_Str ("Mechanism");
9126 when E_Component |
9127 E_Discriminant =>
9128 Write_Str ("Normalized_First_Bit");
9130 when E_Abstract_State =>
9131 Write_Str ("Refinement_Constituents");
9133 when E_Return_Statement =>
9134 Write_Str ("Return_Applies_To");
9136 when others =>
9137 Write_Str ("Field8??");
9138 end case;
9139 end Write_Field8_Name;
9141 -----------------------
9142 -- Write_Field9_Name --
9143 -----------------------
9145 procedure Write_Field9_Name (Id : Entity_Id) is
9146 begin
9147 case Ekind (Id) is
9148 when Type_Kind =>
9149 Write_Str ("Class_Wide_Type");
9151 when Object_Kind =>
9152 Write_Str ("Current_Value");
9154 when E_Abstract_State =>
9155 Write_Str ("Part_Of_Constituents");
9157 when E_Function |
9158 E_Generic_Function |
9159 E_Generic_Package |
9160 E_Generic_Procedure |
9161 E_Package |
9162 E_Procedure =>
9163 Write_Str ("Renaming_Map");
9165 when others =>
9166 Write_Str ("Field9??");
9167 end case;
9168 end Write_Field9_Name;
9170 ------------------------
9171 -- Write_Field10_Name --
9172 ------------------------
9174 procedure Write_Field10_Name (Id : Entity_Id) is
9175 begin
9176 case Ekind (Id) is
9177 when Class_Wide_Kind |
9178 Incomplete_Kind |
9179 E_Record_Type |
9180 E_Record_Subtype |
9181 Private_Kind |
9182 Concurrent_Kind =>
9183 Write_Str ("Direct_Primitive_Operations");
9185 when E_In_Parameter |
9186 E_Constant =>
9187 Write_Str ("Discriminal_Link");
9189 when Float_Kind =>
9190 Write_Str ("Float_Rep");
9192 when E_Function |
9193 E_Package |
9194 E_Package_Body |
9195 E_Procedure =>
9196 Write_Str ("Handler_Records");
9198 when E_Component |
9199 E_Discriminant =>
9200 Write_Str ("Normalized_Position_Max");
9202 when others =>
9203 Write_Str ("Field10??");
9204 end case;
9205 end Write_Field10_Name;
9207 ------------------------
9208 -- Write_Field11_Name --
9209 ------------------------
9211 procedure Write_Field11_Name (Id : Entity_Id) is
9212 begin
9213 case Ekind (Id) is
9214 when E_Block =>
9215 Write_Str ("Block_Node");
9217 when E_Component |
9218 E_Discriminant =>
9219 Write_Str ("Component_Bit_Offset");
9221 when Formal_Kind =>
9222 Write_Str ("Entry_Component");
9224 when E_Enumeration_Literal =>
9225 Write_Str ("Enumeration_Pos");
9227 when Type_Kind |
9228 E_Constant =>
9229 Write_Str ("Full_View");
9231 when E_Generic_Package =>
9232 Write_Str ("Generic_Homonym");
9234 when E_Function |
9235 E_Procedure |
9236 E_Entry |
9237 E_Entry_Family =>
9238 Write_Str ("Protected_Body_Subprogram");
9240 when others =>
9241 Write_Str ("Field11??");
9242 end case;
9243 end Write_Field11_Name;
9245 ------------------------
9246 -- Write_Field12_Name --
9247 ------------------------
9249 procedure Write_Field12_Name (Id : Entity_Id) is
9250 begin
9251 case Ekind (Id) is
9252 when E_Package =>
9253 Write_Str ("Associated_Formal_Package");
9255 when Entry_Kind =>
9256 Write_Str ("Barrier_Function");
9258 when E_Enumeration_Literal =>
9259 Write_Str ("Enumeration_Rep");
9261 when Type_Kind |
9262 E_Component |
9263 E_Constant |
9264 E_Discriminant |
9265 E_Exception |
9266 E_In_Parameter |
9267 E_In_Out_Parameter |
9268 E_Out_Parameter |
9269 E_Loop_Parameter |
9270 E_Variable =>
9271 Write_Str ("Esize");
9273 when E_Function |
9274 E_Procedure =>
9275 Write_Str ("Next_Inlined_Subprogram");
9277 when others =>
9278 Write_Str ("Field12??");
9279 end case;
9280 end Write_Field12_Name;
9282 ------------------------
9283 -- Write_Field13_Name --
9284 ------------------------
9286 procedure Write_Field13_Name (Id : Entity_Id) is
9287 begin
9288 case Ekind (Id) is
9289 when E_Component |
9290 E_Discriminant =>
9291 Write_Str ("Component_Clause");
9293 when E_Function =>
9294 Write_Str ("Elaboration_Entity");
9296 when E_Procedure |
9297 E_Package |
9298 Generic_Unit_Kind =>
9299 Write_Str ("Elaboration_Entity");
9301 when Formal_Kind |
9302 E_Variable =>
9303 Write_Str ("Extra_Accessibility");
9305 when Type_Kind =>
9306 Write_Str ("RM_Size");
9308 when others =>
9309 Write_Str ("Field13??");
9310 end case;
9311 end Write_Field13_Name;
9313 -----------------------
9314 -- Write_Field14_Name --
9315 -----------------------
9317 procedure Write_Field14_Name (Id : Entity_Id) is
9318 begin
9319 case Ekind (Id) is
9320 when Type_Kind |
9321 Formal_Kind |
9322 E_Constant |
9323 E_Exception |
9324 E_Loop_Parameter |
9325 E_Variable =>
9326 Write_Str ("Alignment");
9328 when E_Component |
9329 E_Discriminant =>
9330 Write_Str ("Normalized_Position");
9332 when E_Entry |
9333 E_Entry_Family |
9334 E_Function |
9335 E_Procedure =>
9336 Write_Str ("Postconditions_Proc");
9338 when E_Generic_Package |
9339 E_Package =>
9340 Write_Str ("Shadow_Entities");
9342 when others =>
9343 Write_Str ("Field14??");
9344 end case;
9345 end Write_Field14_Name;
9347 ------------------------
9348 -- Write_Field15_Name --
9349 ------------------------
9351 procedure Write_Field15_Name (Id : Entity_Id) is
9352 begin
9353 case Ekind (Id) is
9354 when E_Discriminant =>
9355 Write_Str ("Discriminant_Number");
9357 when E_Component =>
9358 Write_Str ("DT_Entry_Count");
9360 when E_Function |
9361 E_Procedure =>
9362 Write_Str ("DT_Position");
9364 when Entry_Kind =>
9365 Write_Str ("Entry_Parameters_Type");
9367 when Formal_Kind =>
9368 Write_Str ("Extra_Formal");
9370 when Type_Kind =>
9371 Write_Str ("Pending_Access_Types");
9373 when E_Package |
9374 E_Package_Body =>
9375 Write_Str ("Related_Instance");
9377 when E_Constant |
9378 E_Variable =>
9379 Write_Str ("Status_Flag_Or_Transient_Decl");
9381 when others =>
9382 Write_Str ("Field15??");
9383 end case;
9384 end Write_Field15_Name;
9386 ------------------------
9387 -- Write_Field16_Name --
9388 ------------------------
9390 procedure Write_Field16_Name (Id : Entity_Id) is
9391 begin
9392 case Ekind (Id) is
9393 when E_Record_Type |
9394 E_Record_Type_With_Private =>
9395 Write_Str ("Access_Disp_Table");
9397 when E_Abstract_State =>
9398 Write_Str ("Body_References");
9400 when E_Record_Subtype |
9401 E_Class_Wide_Subtype =>
9402 Write_Str ("Cloned_Subtype");
9404 when E_Function |
9405 E_Procedure =>
9406 Write_Str ("DTC_Entity");
9408 when E_Component =>
9409 Write_Str ("Entry_Formal");
9411 when E_Package |
9412 E_Generic_Package |
9413 Concurrent_Kind =>
9414 Write_Str ("First_Private_Entity");
9416 when Enumeration_Kind =>
9417 Write_Str ("Lit_Strings");
9419 when Decimal_Fixed_Point_Kind =>
9420 Write_Str ("Scale_Value");
9422 when E_String_Literal_Subtype =>
9423 Write_Str ("String_Literal_Length");
9425 when E_Variable |
9426 E_Out_Parameter =>
9427 Write_Str ("Unset_Reference");
9429 when others =>
9430 Write_Str ("Field16??");
9431 end case;
9432 end Write_Field16_Name;
9434 ------------------------
9435 -- Write_Field17_Name --
9436 ------------------------
9438 procedure Write_Field17_Name (Id : Entity_Id) is
9439 begin
9440 case Ekind (Id) is
9441 when Formal_Kind |
9442 E_Constant |
9443 E_Generic_In_Out_Parameter |
9444 E_Variable =>
9445 Write_Str ("Actual_Subtype");
9447 when Digits_Kind =>
9448 Write_Str ("Digits_Value");
9450 when E_Discriminant =>
9451 Write_Str ("Discriminal");
9453 when E_Block |
9454 Class_Wide_Kind |
9455 Concurrent_Kind |
9456 Private_Kind |
9457 E_Entry |
9458 E_Entry_Family |
9459 E_Function |
9460 E_Generic_Function |
9461 E_Generic_Package |
9462 E_Generic_Procedure |
9463 E_Loop |
9464 E_Operator |
9465 E_Package |
9466 E_Package_Body |
9467 E_Procedure |
9468 E_Record_Type |
9469 E_Record_Subtype |
9470 E_Return_Statement |
9471 E_Subprogram_Body |
9472 E_Subprogram_Type =>
9473 Write_Str ("First_Entity");
9475 when Array_Kind =>
9476 Write_Str ("First_Index");
9478 when Enumeration_Kind =>
9479 Write_Str ("First_Literal");
9481 when Access_Kind =>
9482 Write_Str ("Master_Id");
9484 when Modular_Integer_Kind =>
9485 Write_Str ("Modulus");
9487 when E_Component =>
9488 Write_Str ("Prival");
9490 when others =>
9491 Write_Str ("Field17??");
9492 end case;
9493 end Write_Field17_Name;
9495 ------------------------
9496 -- Write_Field18_Name --
9497 ------------------------
9499 procedure Write_Field18_Name (Id : Entity_Id) is
9500 begin
9501 case Ekind (Id) is
9502 when E_Enumeration_Literal |
9503 E_Function |
9504 E_Operator |
9505 E_Procedure =>
9506 Write_Str ("Alias");
9508 when E_Record_Type =>
9509 Write_Str ("Corresponding_Concurrent_Type");
9511 when E_Subprogram_Body =>
9512 Write_Str ("Corresponding_Protected_Entry");
9514 when Concurrent_Kind =>
9515 Write_Str ("Corresponding_Record_Type");
9517 when E_Label |
9518 E_Loop |
9519 E_Block =>
9520 Write_Str ("Enclosing_Scope");
9522 when E_Entry_Index_Parameter =>
9523 Write_Str ("Entry_Index_Constant");
9525 when E_Class_Wide_Subtype |
9526 E_Access_Protected_Subprogram_Type |
9527 E_Anonymous_Access_Protected_Subprogram_Type |
9528 E_Access_Subprogram_Type |
9529 E_Exception_Type =>
9530 Write_Str ("Equivalent_Type");
9532 when Fixed_Point_Kind =>
9533 Write_Str ("Delta_Value");
9535 when Enumeration_Kind =>
9536 Write_Str ("Lit_Indexes");
9538 when Incomplete_Or_Private_Kind |
9539 E_Record_Subtype =>
9540 Write_Str ("Private_Dependents");
9542 when Object_Kind =>
9543 Write_Str ("Renamed_Object");
9545 when E_Exception |
9546 E_Package |
9547 E_Generic_Function |
9548 E_Generic_Procedure |
9549 E_Generic_Package =>
9550 Write_Str ("Renamed_Entity");
9552 when E_String_Literal_Subtype =>
9553 Write_Str ("String_Literal_Low_Bound");
9555 when others =>
9556 Write_Str ("Field18??");
9557 end case;
9558 end Write_Field18_Name;
9560 -----------------------
9561 -- Write_Field19_Name --
9562 -----------------------
9564 procedure Write_Field19_Name (Id : Entity_Id) is
9565 begin
9566 case Ekind (Id) is
9567 when E_Package |
9568 E_Generic_Package =>
9569 Write_Str ("Body_Entity");
9571 when E_Discriminant =>
9572 Write_Str ("Corresponding_Discriminant");
9574 when Scalar_Kind =>
9575 Write_Str ("Default_Aspect_Value");
9577 when E_Abstract_State |
9578 E_Class_Wide_Type |
9579 E_Incomplete_Type =>
9580 Write_Str ("Non_Limited_View");
9582 when E_Incomplete_Subtype =>
9583 if From_Limited_With (Id) then
9584 Write_Str ("Non_Limited_View");
9585 end if;
9587 when E_Array_Type =>
9588 Write_Str ("Default_Component_Value");
9590 when E_Protected_Type =>
9591 Write_Str ("Entry_Bodies_Array");
9593 when E_Function |
9594 E_Operator |
9595 E_Subprogram_Type =>
9596 Write_Str ("Extra_Accessibility_Of_Result");
9598 when E_Record_Type =>
9599 Write_Str ("Parent_Subtype");
9601 when E_Constant |
9602 E_Variable =>
9603 Write_Str ("Size_Check_Code");
9605 when E_Package_Body |
9606 Formal_Kind =>
9607 Write_Str ("Spec_Entity");
9609 when Private_Kind =>
9610 Write_Str ("Underlying_Full_View");
9612 when others =>
9613 Write_Str ("Field19??");
9614 end case;
9615 end Write_Field19_Name;
9617 -----------------------
9618 -- Write_Field20_Name --
9619 -----------------------
9621 procedure Write_Field20_Name (Id : Entity_Id) is
9622 begin
9623 case Ekind (Id) is
9624 when Array_Kind =>
9625 Write_Str ("Component_Type");
9627 when E_In_Parameter |
9628 E_Generic_In_Parameter =>
9629 Write_Str ("Default_Value");
9631 when Access_Kind =>
9632 Write_Str ("Directly_Designated_Type");
9634 when E_Component =>
9635 Write_Str ("Discriminant_Checking_Func");
9637 when E_Discriminant =>
9638 Write_Str ("Discriminant_Default_Value");
9640 when E_Block |
9641 Class_Wide_Kind |
9642 Concurrent_Kind |
9643 Private_Kind |
9644 E_Entry |
9645 E_Entry_Family |
9646 E_Function |
9647 E_Generic_Function |
9648 E_Generic_Package |
9649 E_Generic_Procedure |
9650 E_Loop |
9651 E_Operator |
9652 E_Package |
9653 E_Package_Body |
9654 E_Procedure |
9655 E_Record_Type |
9656 E_Record_Subtype |
9657 E_Return_Statement |
9658 E_Subprogram_Body |
9659 E_Subprogram_Type =>
9660 Write_Str ("Last_Entity");
9662 when E_Constant |
9663 E_Variable =>
9664 Write_Str ("Prival_Link");
9666 when Scalar_Kind =>
9667 Write_Str ("Scalar_Range");
9669 when E_Exception =>
9670 Write_Str ("Register_Exception_Call");
9672 when others =>
9673 Write_Str ("Field20??");
9674 end case;
9675 end Write_Field20_Name;
9677 -----------------------
9678 -- Write_Field21_Name --
9679 -----------------------
9681 procedure Write_Field21_Name (Id : Entity_Id) is
9682 begin
9683 case Ekind (Id) is
9684 when Entry_Kind =>
9685 Write_Str ("Accept_Address");
9687 when E_In_Parameter =>
9688 Write_Str ("Default_Expr_Function");
9690 when Concurrent_Kind |
9691 Incomplete_Or_Private_Kind |
9692 Class_Wide_Kind |
9693 E_Record_Type |
9694 E_Record_Subtype =>
9695 Write_Str ("Discriminant_Constraint");
9697 when E_Constant |
9698 E_Exception |
9699 E_Function |
9700 E_Generic_Function |
9701 E_Procedure |
9702 E_Generic_Procedure |
9703 E_Variable =>
9704 Write_Str ("Interface_Name");
9706 when Array_Kind |
9707 Modular_Integer_Kind =>
9708 Write_Str ("Original_Array_Type");
9710 when Fixed_Point_Kind =>
9711 Write_Str ("Small_Value");
9713 when others =>
9714 Write_Str ("Field21??");
9715 end case;
9716 end Write_Field21_Name;
9718 -----------------------
9719 -- Write_Field22_Name --
9720 -----------------------
9722 procedure Write_Field22_Name (Id : Entity_Id) is
9723 begin
9724 case Ekind (Id) is
9725 when Access_Kind =>
9726 Write_Str ("Associated_Storage_Pool");
9728 when Array_Kind =>
9729 Write_Str ("Component_Size");
9731 when E_Record_Type =>
9732 Write_Str ("Corresponding_Remote_Type");
9734 when E_Component |
9735 E_Discriminant =>
9736 Write_Str ("Original_Record_Component");
9738 when E_Enumeration_Literal =>
9739 Write_Str ("Enumeration_Rep_Expr");
9741 when E_Record_Type_With_Private |
9742 E_Record_Subtype_With_Private |
9743 E_Private_Type |
9744 E_Private_Subtype |
9745 E_Limited_Private_Type |
9746 E_Limited_Private_Subtype =>
9747 Write_Str ("Private_View");
9749 when Formal_Kind =>
9750 Write_Str ("Protected_Formal");
9752 when E_Block |
9753 E_Entry |
9754 E_Entry_Family |
9755 E_Function |
9756 E_Loop |
9757 E_Package |
9758 E_Package_Body |
9759 E_Generic_Package |
9760 E_Generic_Function |
9761 E_Generic_Procedure |
9762 E_Procedure |
9763 E_Protected_Type |
9764 E_Return_Statement |
9765 E_Subprogram_Body |
9766 E_Task_Type =>
9767 Write_Str ("Scope_Depth_Value");
9769 when E_Variable =>
9770 Write_Str ("Shared_Var_Procs_Instance");
9772 when others =>
9773 Write_Str ("Field22??");
9774 end case;
9775 end Write_Field22_Name;
9777 ------------------------
9778 -- Write_Field23_Name --
9779 ------------------------
9781 procedure Write_Field23_Name (Id : Entity_Id) is
9782 begin
9783 case Ekind (Id) is
9784 when E_Discriminant =>
9785 Write_Str ("CR_Discriminant");
9787 when E_Block =>
9788 Write_Str ("Entry_Cancel_Parameter");
9790 when E_Enumeration_Type =>
9791 Write_Str ("Enum_Pos_To_Rep");
9793 when Formal_Kind |
9794 E_Variable =>
9795 Write_Str ("Extra_Constrained");
9797 when Access_Kind =>
9798 Write_Str ("Finalization_Master");
9800 when E_Generic_Function |
9801 E_Generic_Package |
9802 E_Generic_Procedure =>
9803 Write_Str ("Inner_Instances");
9805 when Array_Kind =>
9806 Write_Str ("Packed_Array_Impl_Type");
9808 when Entry_Kind =>
9809 Write_Str ("Protection_Object");
9811 when Concurrent_Kind |
9812 Incomplete_Or_Private_Kind |
9813 Class_Wide_Kind |
9814 E_Record_Type |
9815 E_Record_Subtype =>
9816 Write_Str ("Stored_Constraint");
9818 when E_Function |
9819 E_Procedure =>
9820 if Present (Scope (Id))
9821 and then Is_Protected_Type (Scope (Id))
9822 then
9823 Write_Str ("Protection_Object");
9824 else
9825 Write_Str ("Generic_Renamings");
9826 end if;
9828 when E_Package =>
9829 if Is_Generic_Instance (Id) then
9830 Write_Str ("Generic_Renamings");
9831 else
9832 Write_Str ("Limited_View");
9833 end if;
9835 when others =>
9836 Write_Str ("Field23??");
9837 end case;
9838 end Write_Field23_Name;
9840 ------------------------
9841 -- Write_Field24_Name --
9842 ------------------------
9844 procedure Write_Field24_Name (Id : Entity_Id) is
9845 begin
9846 case Ekind (Id) is
9847 when E_Constant |
9848 E_Variable |
9849 Type_Kind =>
9850 Write_Str ("Related_Expression");
9852 when E_Function |
9853 E_Operator |
9854 E_Procedure =>
9855 Write_Str ("Subps_Index");
9857 when E_Package =>
9858 Write_Str ("Incomplete_Actuals");
9860 when others =>
9861 Write_Str ("Field24???");
9862 end case;
9863 end Write_Field24_Name;
9865 ------------------------
9866 -- Write_Field25_Name --
9867 ------------------------
9869 procedure Write_Field25_Name (Id : Entity_Id) is
9870 begin
9871 case Ekind (Id) is
9872 when E_Generic_Package |
9873 E_Package =>
9874 Write_Str ("Abstract_States");
9876 when E_Variable =>
9877 Write_Str ("Debug_Renaming_Link");
9879 when E_Component =>
9880 Write_Str ("DT_Offset_To_Top_Func");
9882 when E_Procedure |
9883 E_Function =>
9884 Write_Str ("Interface_Alias");
9886 when E_Record_Type |
9887 E_Record_Subtype |
9888 E_Record_Type_With_Private |
9889 E_Record_Subtype_With_Private =>
9890 Write_Str ("Interfaces");
9892 when E_Array_Type |
9893 E_Array_Subtype =>
9894 Write_Str ("Related_Array_Object");
9896 when Task_Kind =>
9897 Write_Str ("Task_Body_Procedure");
9899 when E_Entry |
9900 E_Entry_Family =>
9901 Write_Str ("PPC_Wrapper");
9903 when Discrete_Kind =>
9904 Write_Str ("Static_Discrete_Predicate");
9906 when Real_Kind =>
9907 Write_Str ("Static_Real_Or_String_Predicate");
9909 when others =>
9910 Write_Str ("Field25??");
9911 end case;
9912 end Write_Field25_Name;
9914 ------------------------
9915 -- Write_Field26_Name --
9916 ------------------------
9918 procedure Write_Field26_Name (Id : Entity_Id) is
9919 begin
9920 case Ekind (Id) is
9921 when E_Record_Type |
9922 E_Record_Type_With_Private =>
9923 Write_Str ("Dispatch_Table_Wrappers");
9925 when E_In_Out_Parameter |
9926 E_Out_Parameter |
9927 E_Variable =>
9928 Write_Str ("Last_Assignment");
9930 when E_Procedure |
9931 E_Function =>
9932 Write_Str ("Overridden_Operation");
9934 when E_Generic_Package |
9935 E_Package =>
9936 Write_Str ("Package_Instantiation");
9938 when E_Component |
9939 E_Constant =>
9940 Write_Str ("Related_Type");
9942 when Access_Kind |
9943 Task_Kind =>
9944 Write_Str ("Storage_Size_Variable");
9946 when others =>
9947 Write_Str ("Field26??");
9948 end case;
9949 end Write_Field26_Name;
9951 ------------------------
9952 -- Write_Field27_Name --
9953 ------------------------
9955 procedure Write_Field27_Name (Id : Entity_Id) is
9956 begin
9957 case Ekind (Id) is
9958 when E_Package |
9959 Type_Kind =>
9960 Write_Str ("Current_Use_Clause");
9962 when E_Component |
9963 E_Constant |
9964 E_Variable =>
9965 Write_Str ("Related_Type");
9967 when E_Procedure |
9968 E_Function =>
9969 Write_Str ("Wrapped_Entity");
9971 when others =>
9972 Write_Str ("Field27??");
9973 end case;
9974 end Write_Field27_Name;
9976 ------------------------
9977 -- Write_Field28_Name --
9978 ------------------------
9980 procedure Write_Field28_Name (Id : Entity_Id) is
9981 begin
9982 case Ekind (Id) is
9983 when E_Entry |
9984 E_Entry_Family |
9985 E_Function |
9986 E_Procedure |
9987 E_Subprogram_Body |
9988 E_Subprogram_Type =>
9989 Write_Str ("Extra_Formals");
9991 when E_Package |
9992 E_Package_Body =>
9993 Write_Str ("Finalizer");
9995 when E_Constant |
9996 E_Variable =>
9997 Write_Str ("Initialization_Statements");
9999 when E_Access_Subprogram_Type =>
10000 Write_Str ("Original_Access_Type");
10002 when Task_Kind =>
10003 Write_Str ("Relative_Deadline_Variable");
10005 when E_Record_Type =>
10006 Write_Str ("Underlying_Record_View");
10008 when others =>
10009 Write_Str ("Field28??");
10010 end case;
10011 end Write_Field28_Name;
10013 ------------------------
10014 -- Write_Field29_Name --
10015 ------------------------
10017 procedure Write_Field29_Name (Id : Entity_Id) is
10018 begin
10019 case Ekind (Id) is
10020 when E_Constant |
10021 E_Variable =>
10022 Write_Str ("BIP_Initialization_Call");
10024 when Type_Kind =>
10025 Write_Str ("Subprograms_For_Type");
10027 when others =>
10028 Write_Str ("Field29??");
10029 end case;
10030 end Write_Field29_Name;
10032 ------------------------
10033 -- Write_Field30_Name --
10034 ------------------------
10036 procedure Write_Field30_Name (Id : Entity_Id) is
10037 begin
10038 case Ekind (Id) is
10039 when E_Function =>
10040 Write_Str ("Corresponding_Equality");
10042 when E_Constant |
10043 E_Variable =>
10044 Write_Str ("Last_Aggregate_Assignment");
10046 when E_Procedure =>
10047 Write_Str ("Static_Initialization");
10049 when others =>
10050 Write_Str ("Field30??");
10051 end case;
10052 end Write_Field30_Name;
10054 ------------------------
10055 -- Write_Field31_Name --
10056 ------------------------
10058 procedure Write_Field31_Name (Id : Entity_Id) is
10059 begin
10060 case Ekind (Id) is
10061 when E_Procedure |
10062 E_Function =>
10063 Write_Str ("Thunk_Entity");
10065 when Type_Kind =>
10066 Write_Str ("Derived_Type_Link");
10068 when E_Constant |
10069 E_In_Parameter |
10070 E_In_Out_Parameter |
10071 E_Loop_Parameter |
10072 E_Out_Parameter |
10073 E_Variable =>
10074 Write_Str ("Activation_Record_Component");
10076 when others =>
10077 Write_Str ("Field31??");
10078 end case;
10079 end Write_Field31_Name;
10081 ------------------------
10082 -- Write_Field32_Name --
10083 ------------------------
10085 procedure Write_Field32_Name (Id : Entity_Id) is
10086 begin
10087 case Ekind (Id) is
10088 when E_Abstract_State |
10089 E_Constant |
10090 E_Variable =>
10091 Write_Str ("Encapsulating_State");
10093 when E_Function |
10094 E_Generic_Function |
10095 E_Generic_Package |
10096 E_Generic_Procedure |
10097 E_Package |
10098 E_Package_Body |
10099 E_Procedure |
10100 E_Subprogram_Body =>
10101 Write_Str ("SPARK_Pragma");
10103 when Type_Kind =>
10104 Write_Str ("No_Tagged_Streams_Pragma");
10106 when others =>
10107 Write_Str ("Field32??");
10108 end case;
10109 end Write_Field32_Name;
10111 ------------------------
10112 -- Write_Field33_Name --
10113 ------------------------
10115 procedure Write_Field33_Name (Id : Entity_Id) is
10116 begin
10117 case Ekind (Id) is
10118 when E_Generic_Package |
10119 E_Package |
10120 E_Package_Body =>
10121 Write_Str ("SPARK_Aux_Pragma");
10123 when E_Constant |
10124 E_Variable |
10125 Subprogram_Kind |
10126 Type_Kind =>
10127 Write_Str ("Linker_Section_Pragma");
10129 when others =>
10130 Write_Str ("Field33??");
10131 end case;
10132 end Write_Field33_Name;
10134 ------------------------
10135 -- Write_Field34_Name --
10136 ------------------------
10138 procedure Write_Field34_Name (Id : Entity_Id) is
10139 begin
10140 case Ekind (Id) is
10141 when E_Constant |
10142 E_Entry |
10143 E_Entry_Family |
10144 E_Generic_Package |
10145 E_Package |
10146 E_Package_Body |
10147 E_Subprogram_Body |
10148 E_Variable |
10149 E_Void |
10150 Generic_Subprogram_Kind |
10151 Subprogram_Kind =>
10152 Write_Str ("Contract");
10154 when others =>
10155 Write_Str ("Field34??");
10156 end case;
10157 end Write_Field34_Name;
10159 ------------------------
10160 -- Write_Field35_Name --
10161 ------------------------
10163 procedure Write_Field35_Name (Id : Entity_Id) is
10164 begin
10165 case Ekind (Id) is
10166 when Subprogram_Kind =>
10167 Write_Str ("Import_Pragma");
10169 when others =>
10170 Write_Str ("Field35??");
10171 end case;
10172 end Write_Field35_Name;
10174 ------------------------
10175 -- Write_Field36_Name --
10176 ------------------------
10178 procedure Write_Field36_Name (Id : Entity_Id) is
10179 begin
10180 case Ekind (Id) is
10181 when E_Function |
10182 E_Operator |
10183 E_Package |
10184 E_Package_Body |
10185 E_Procedure |
10186 E_Subprogram_Body =>
10187 Write_Str ("Anonymous_Master");
10189 when others =>
10190 Write_Str ("Field36??");
10191 end case;
10192 end Write_Field36_Name;
10194 ------------------------
10195 -- Write_Field37_Name --
10196 ------------------------
10198 procedure Write_Field37_Name (Id : Entity_Id) is
10199 pragma Unreferenced (Id);
10200 begin
10201 Write_Str ("Associated_Entity");
10202 end Write_Field37_Name;
10204 ------------------------
10205 -- Write_Field38_Name --
10206 ------------------------
10208 procedure Write_Field38_Name (Id : Entity_Id) is
10209 begin
10210 case Ekind (Id) is
10211 when others =>
10212 Write_Str ("Field38??");
10213 end case;
10214 end Write_Field38_Name;
10216 ------------------------
10217 -- Write_Field39_Name --
10218 ------------------------
10220 procedure Write_Field39_Name (Id : Entity_Id) is
10221 begin
10222 case Ekind (Id) is
10223 when others =>
10224 Write_Str ("Field39??");
10225 end case;
10226 end Write_Field39_Name;
10228 ------------------------
10229 -- Write_Field40_Name --
10230 ------------------------
10232 procedure Write_Field40_Name (Id : Entity_Id) is
10233 begin
10234 case Ekind (Id) is
10235 when others =>
10236 Write_Str ("Field40??");
10237 end case;
10238 end Write_Field40_Name;
10240 ------------------------
10241 -- Write_Field41_Name --
10242 ------------------------
10244 procedure Write_Field41_Name (Id : Entity_Id) is
10245 begin
10246 case Ekind (Id) is
10247 when others =>
10248 Write_Str ("Field41??");
10249 end case;
10250 end Write_Field41_Name;
10252 -------------------------
10253 -- Iterator Procedures --
10254 -------------------------
10256 procedure Proc_Next_Component (N : in out Node_Id) is
10257 begin
10258 N := Next_Component (N);
10259 end Proc_Next_Component;
10261 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10262 begin
10263 N := Next_Entity (N);
10264 while Present (N) loop
10265 exit when Ekind_In (N, E_Component, E_Discriminant);
10266 N := Next_Entity (N);
10267 end loop;
10268 end Proc_Next_Component_Or_Discriminant;
10270 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10271 begin
10272 N := Next_Discriminant (N);
10273 end Proc_Next_Discriminant;
10275 procedure Proc_Next_Formal (N : in out Node_Id) is
10276 begin
10277 N := Next_Formal (N);
10278 end Proc_Next_Formal;
10280 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10281 begin
10282 N := Next_Formal_With_Extras (N);
10283 end Proc_Next_Formal_With_Extras;
10285 procedure Proc_Next_Index (N : in out Node_Id) is
10286 begin
10287 N := Next_Index (N);
10288 end Proc_Next_Index;
10290 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10291 begin
10292 N := Next_Inlined_Subprogram (N);
10293 end Proc_Next_Inlined_Subprogram;
10295 procedure Proc_Next_Literal (N : in out Node_Id) is
10296 begin
10297 N := Next_Literal (N);
10298 end Proc_Next_Literal;
10300 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10301 begin
10302 N := Next_Stored_Discriminant (N);
10303 end Proc_Next_Stored_Discriminant;
10305 end Einfo;