* g++.dg/cpp0x/constexpr-53094-2.C: Ignore non-standard ABI
[official-gcc.git] / gcc / ada / einfo.adb
blob6d87f98510b9167fd8568d9f0ef27e3bbc1fba1a
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2012, 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 Namet; use Namet;
37 with Nlists; use Nlists;
38 with Output; use Output;
39 with Sinfo; use Sinfo;
40 with Stand; use Stand;
42 package body Einfo is
44 use Atree.Unchecked_Access;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
60 -- Chars Name1
61 -- Next_Entity Node2
62 -- Scope Node3
63 -- Etype Node5
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
69 -- Homonym Node4
70 -- First_Rep_Item Node6
71 -- Freeze_Node Node7
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
79 -- Integrity_Level Uint8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Refined_State Node9
89 -- Renaming_Map Uint9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Loop_Entry_Attributes Elist10
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 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Cloned_Subtype Node16
136 -- DTC_Entity Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
149 -- Master_Id Node17
150 -- Modulus Uint17
151 -- Non_Limited_View Node17
152 -- Prival Node17
154 -- Alias Node18
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Protected_Entry Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Parent_Subtype Node19
171 -- Size_Check_Code Node19
172 -- Spec_Entity Node19
173 -- Underlying_Full_View Node19
175 -- Component_Type Node20
176 -- Default_Value Node20
177 -- Directly_Designated_Type Node20
178 -- Discriminant_Checking_Func Node20
179 -- Discriminant_Default_Value Node20
180 -- Last_Entity Node20
181 -- Prival_Link Node20
182 -- Register_Exception_Call Node20
183 -- Scalar_Range Node20
185 -- Accept_Address Elist21
186 -- Default_Expr_Function Node21
187 -- Discriminant_Constraint Elist21
188 -- Interface_Name Node21
189 -- Original_Array_Type Node21
190 -- Small_Value Ureal21
192 -- Associated_Storage_Pool Node22
193 -- Component_Size Uint22
194 -- Corresponding_Remote_Type Node22
195 -- Enumeration_Rep_Expr Node22
196 -- Exception_Code Uint22
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_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Finalizer Node24
216 -- Related_Expression Node24
217 -- Contract Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
248 -- (unused) Node31
250 -- (unused) Node32
252 -- (unused) Node33
254 -- (unused) Node34
256 -- (unused) Node35
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
267 -- Note: Flag1-Flag3 are not used, for historical reasons
269 -- Is_Frozen Flag4
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
273 -- In_Use Flag8
274 -- Is_Potentially_Use_Visible Flag9
275 -- Is_Public Flag10
277 -- Is_Inlined Flag11
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
281 -- Is_Aliased Flag15
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
297 -- Has_Task Flag30
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
313 -- Is_Pure Flag44
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
316 -- Has_Exit Flag47
317 -- In_Package_Body Flag48
318 -- Reachable Flag49
319 -- Delay_Subprogram_Descriptors Flag50
321 -- Is_Packed Flag51
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
327 -- Is_Hidden Flag57
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
350 -- Is_Tag Flag78
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
358 -- Is_Atomic Flag85
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
365 -- Is_Itype Flag91
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
377 -- Is_Called Flag102
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
389 -- No_Return Flag113
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_With_Type Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- Itype_Printed Flag202
487 -- Has_Pragma_Pure Flag203
488 -- Is_Known_Null Flag204
489 -- Low_Bound_Tested Flag205
490 -- Is_Visible_Formal Flag206
491 -- Known_To_Have_Preelab_Init Flag207
492 -- Must_Have_Preelab_Init Flag208
493 -- Is_Return_Object Flag209
494 -- Elaborate_Body_Desirable Flag210
496 -- Has_Static_Discriminants Flag211
497 -- Has_Pragma_Unreferenced_Objects Flag212
498 -- Requires_Overriding Flag213
499 -- Has_RACW Flag214
500 -- Has_Up_Level_Access Flag215
501 -- Universal_Aliasing Flag216
502 -- Suppress_Value_Tracking_On_Call Flag217
503 -- Is_Primitive Flag218
504 -- Has_Initial_Value Flag219
505 -- Has_Dispatch_Table Flag220
507 -- Has_Pragma_Preelab_Init Flag221
508 -- Used_As_Generic_Actual Flag222
509 -- Is_Descendent_Of_Address Flag223
510 -- Is_Raised Flag224
511 -- Is_Thunk Flag225
512 -- Is_Only_Out_Parameter Flag226
513 -- Referenced_As_Out_Parameter Flag227
514 -- Has_Thunks Flag228
515 -- Can_Use_Internal_Rep Flag229
516 -- Has_Pragma_Inline_Always Flag230
518 -- Renamed_In_Spec Flag231
519 -- Has_Invariants Flag232
520 -- Has_Pragma_Unmodified Flag233
521 -- Is_Dispatch_Table_Entity Flag234
522 -- Is_Trivial_Subprogram Flag235
523 -- Warnings_Off_Used Flag236
524 -- Warnings_Off_Used_Unmodified Flag237
525 -- Warnings_Off_Used_Unreferenced Flag238
526 -- OK_To_Reorder_Components Flag239
527 -- Has_Postconditions Flag240
529 -- Optimize_Alignment_Space Flag241
530 -- Optimize_Alignment_Time Flag242
531 -- Overlays_Constant Flag243
532 -- Is_RACW_Stub_Type Flag244
533 -- Is_Private_Primitive Flag245
534 -- Is_Underlying_Record_View Flag246
535 -- OK_To_Rename Flag247
536 -- Has_Inheritable_Invariants Flag248
537 -- Is_Safe_To_Reevaluate Flag249
538 -- Has_Predicates Flag250
540 -- Has_Implicit_Dereference Flag251
541 -- Is_Processed_Transient Flag252
542 -- Has_Anonymous_Master Flag253
543 -- Is_Implementation_Defined Flag254
545 -- (unused) Flag201
547 -- (unused) Flag255
548 -- (unused) Flag256
549 -- (unused) Flag257
550 -- (unused) Flag258
551 -- (unused) Flag259
552 -- (unused) Flag260
554 -- (unused) Flag261
555 -- (unused) Flag262
556 -- (unused) Flag263
557 -- (unused) Flag264
558 -- (unused) Flag265
559 -- (unused) Flag266
560 -- (unused) Flag267
561 -- (unused) Flag268
562 -- (unused) Flag269
563 -- (unused) Flag270
565 -- (unused) Flag271
566 -- (unused) Flag272
567 -- (unused) Flag273
568 -- (unused) Flag274
569 -- (unused) Flag275
570 -- (unused) Flag276
571 -- (unused) Flag277
572 -- (unused) Flag278
573 -- (unused) Flag279
574 -- (unused) Flag280
576 -- (unused) Flag281
577 -- (unused) Flag282
578 -- (unused) Flag283
579 -- (unused) Flag284
580 -- (unused) Flag285
581 -- (unused) Flag286
582 -- (unused) Flag287
583 -- (unused) Flag288
584 -- (unused) Flag289
585 -- (unused) Flag290
587 -- (unused) Flag291
588 -- (unused) Flag292
589 -- (unused) Flag293
590 -- (unused) Flag294
591 -- (unused) Flag295
592 -- (unused) Flag296
593 -- (unused) Flag297
594 -- (unused) Flag298
595 -- (unused) Flag299
596 -- (unused) Flag300
598 -- (unused) Flag301
599 -- (unused) Flag302
600 -- (unused) Flag303
601 -- (unused) Flag304
602 -- (unused) Flag305
603 -- (unused) Flag306
604 -- (unused) Flag307
605 -- (unused) Flag308
606 -- (unused) Flag309
607 -- (unused) Flag310
609 -- (unused) Flag311
610 -- (unused) Flag312
611 -- (unused) Flag313
612 -- (unused) Flag314
613 -- (unused) Flag315
614 -- (unused) Flag316
615 -- (unused) Flag317
617 -----------------------
618 -- Local subprograms --
619 -----------------------
621 function Has_Property
622 (State : Entity_Id;
623 Prop_Nam : Name_Id) return Boolean;
624 -- Determine whether abstract state State has a particular property denoted
625 -- by the name Prop_Nam.
627 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
628 -- Returns the attribute definition clause for Id whose name is Rep_Name.
629 -- Returns Empty if no matching attribute definition clause found for Id.
631 ---------------
632 -- Float_Rep --
633 ---------------
635 function Float_Rep (Id : E) return F is
636 pragma Assert (Is_Floating_Point_Type (Id));
637 begin
638 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
639 end Float_Rep;
641 ------------------
642 -- Has_Property --
643 ------------------
645 function Has_Property
646 (State : Entity_Id;
647 Prop_Nam : Name_Id) return Boolean
649 Par : constant Node_Id := Parent (State);
650 Prop : Node_Id;
652 begin
653 pragma Assert (Ekind (State) = E_Abstract_State);
655 -- States with properties appear as extension aggregates in the tree
657 if Nkind (Par) = N_Extension_Aggregate then
658 if Prop_Nam = Name_Integrity then
659 return Present (Component_Associations (Par));
661 else
662 Prop := First (Expressions (Par));
663 while Present (Prop) loop
664 if Chars (Prop) = Prop_Nam then
665 return True;
666 end if;
668 Next (Prop);
669 end loop;
670 end if;
671 end if;
673 return False;
674 end Has_Property;
676 ----------------
677 -- Rep_Clause --
678 ----------------
680 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
681 Ritem : Node_Id;
683 begin
684 Ritem := First_Rep_Item (Id);
685 while Present (Ritem) loop
686 if Nkind (Ritem) = N_Attribute_Definition_Clause
687 and then Chars (Ritem) = Rep_Name
688 then
689 return Ritem;
690 else
691 Next_Rep_Item (Ritem);
692 end if;
693 end loop;
695 return Empty;
696 end Rep_Clause;
698 --------------------------------
699 -- Attribute Access Functions --
700 --------------------------------
702 function Abstract_States (Id : E) return L is
703 begin
704 pragma Assert (Ekind (Id) = E_Package);
705 return Elist25 (Id);
706 end Abstract_States;
708 function Accept_Address (Id : E) return L is
709 begin
710 return Elist21 (Id);
711 end Accept_Address;
713 function Access_Disp_Table (Id : E) return L is
714 begin
715 pragma Assert (Ekind_In (Id, E_Record_Type,
716 E_Record_Subtype));
717 return Elist16 (Implementation_Base_Type (Id));
718 end Access_Disp_Table;
720 function Actual_Subtype (Id : E) return E is
721 begin
722 pragma Assert
723 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
724 or else Is_Formal (Id));
725 return Node17 (Id);
726 end Actual_Subtype;
728 function Address_Taken (Id : E) return B is
729 begin
730 return Flag104 (Id);
731 end Address_Taken;
733 function Alias (Id : E) return E is
734 begin
735 pragma Assert
736 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
737 return Node18 (Id);
738 end Alias;
740 function Alignment (Id : E) return U is
741 begin
742 pragma Assert (Is_Type (Id)
743 or else Is_Formal (Id)
744 or else Ekind_In (Id, E_Loop_Parameter,
745 E_Constant,
746 E_Exception,
747 E_Variable));
748 return Uint14 (Id);
749 end Alignment;
751 function Associated_Formal_Package (Id : E) return E is
752 begin
753 pragma Assert (Ekind (Id) = E_Package);
754 return Node12 (Id);
755 end Associated_Formal_Package;
757 function Associated_Node_For_Itype (Id : E) return N is
758 begin
759 return Node8 (Id);
760 end Associated_Node_For_Itype;
762 function Associated_Storage_Pool (Id : E) return E is
763 begin
764 pragma Assert (Is_Access_Type (Id));
765 return Node22 (Root_Type (Id));
766 end Associated_Storage_Pool;
768 function Barrier_Function (Id : E) return N is
769 begin
770 pragma Assert (Is_Entry (Id));
771 return Node12 (Id);
772 end Barrier_Function;
774 function Block_Node (Id : E) return N is
775 begin
776 pragma Assert (Ekind (Id) = E_Block);
777 return Node11 (Id);
778 end Block_Node;
780 function Body_Entity (Id : E) return E is
781 begin
782 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
783 return Node19 (Id);
784 end Body_Entity;
786 function Body_Needed_For_SAL (Id : E) return B is
787 begin
788 pragma Assert
789 (Ekind (Id) = E_Package
790 or else Is_Subprogram (Id)
791 or else Is_Generic_Unit (Id));
792 return Flag40 (Id);
793 end Body_Needed_For_SAL;
795 function C_Pass_By_Copy (Id : E) return B is
796 begin
797 pragma Assert (Is_Record_Type (Id));
798 return Flag125 (Implementation_Base_Type (Id));
799 end C_Pass_By_Copy;
801 function Can_Never_Be_Null (Id : E) return B is
802 begin
803 return Flag38 (Id);
804 end Can_Never_Be_Null;
806 function Checks_May_Be_Suppressed (Id : E) return B is
807 begin
808 return Flag31 (Id);
809 end Checks_May_Be_Suppressed;
811 function Class_Wide_Type (Id : E) return E is
812 begin
813 pragma Assert (Is_Type (Id));
814 return Node9 (Id);
815 end Class_Wide_Type;
817 function Cloned_Subtype (Id : E) return E is
818 begin
819 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
820 return Node16 (Id);
821 end Cloned_Subtype;
823 function Component_Bit_Offset (Id : E) return U is
824 begin
825 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
826 return Uint11 (Id);
827 end Component_Bit_Offset;
829 function Component_Clause (Id : E) return N is
830 begin
831 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
832 return Node13 (Id);
833 end Component_Clause;
835 function Component_Size (Id : E) return U is
836 begin
837 pragma Assert (Is_Array_Type (Id));
838 return Uint22 (Implementation_Base_Type (Id));
839 end Component_Size;
841 function Component_Type (Id : E) return E is
842 begin
843 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
844 return Node20 (Implementation_Base_Type (Id));
845 end Component_Type;
847 function Corresponding_Concurrent_Type (Id : E) return E is
848 begin
849 pragma Assert (Ekind (Id) = E_Record_Type);
850 return Node18 (Id);
851 end Corresponding_Concurrent_Type;
853 function Corresponding_Discriminant (Id : E) return E is
854 begin
855 pragma Assert (Ekind (Id) = E_Discriminant);
856 return Node19 (Id);
857 end Corresponding_Discriminant;
859 function Corresponding_Equality (Id : E) return E is
860 begin
861 pragma Assert
862 (Ekind (Id) = E_Function
863 and then not Comes_From_Source (Id)
864 and then Chars (Id) = Name_Op_Ne);
865 return Node30 (Id);
866 end Corresponding_Equality;
868 function Corresponding_Protected_Entry (Id : E) return E is
869 begin
870 pragma Assert (Ekind (Id) = E_Subprogram_Body);
871 return Node18 (Id);
872 end Corresponding_Protected_Entry;
874 function Corresponding_Record_Type (Id : E) return E is
875 begin
876 pragma Assert (Is_Concurrent_Type (Id));
877 return Node18 (Id);
878 end Corresponding_Record_Type;
880 function Corresponding_Remote_Type (Id : E) return E is
881 begin
882 return Node22 (Id);
883 end Corresponding_Remote_Type;
885 function Current_Use_Clause (Id : E) return E is
886 begin
887 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
888 return Node27 (Id);
889 end Current_Use_Clause;
891 function Current_Value (Id : E) return N is
892 begin
893 pragma Assert (Ekind (Id) in Object_Kind);
894 return Node9 (Id);
895 end Current_Value;
897 function CR_Discriminant (Id : E) return E is
898 begin
899 return Node23 (Id);
900 end CR_Discriminant;
902 function Debug_Info_Off (Id : E) return B is
903 begin
904 return Flag166 (Id);
905 end Debug_Info_Off;
907 function Debug_Renaming_Link (Id : E) return E is
908 begin
909 return Node25 (Id);
910 end Debug_Renaming_Link;
912 function Default_Aspect_Component_Value (Id : E) return N is
913 begin
914 pragma Assert (Is_Array_Type (Id));
915 return Node19 (Id);
916 end Default_Aspect_Component_Value;
918 function Default_Aspect_Value (Id : E) return N is
919 begin
920 pragma Assert (Is_Scalar_Type (Id));
921 return Node19 (Id);
922 end Default_Aspect_Value;
924 function Default_Expr_Function (Id : E) return E is
925 begin
926 pragma Assert (Is_Formal (Id));
927 return Node21 (Id);
928 end Default_Expr_Function;
930 function Default_Expressions_Processed (Id : E) return B is
931 begin
932 return Flag108 (Id);
933 end Default_Expressions_Processed;
935 function Default_Value (Id : E) return N is
936 begin
937 pragma Assert (Is_Formal (Id));
938 return Node20 (Id);
939 end Default_Value;
941 function Delay_Cleanups (Id : E) return B is
942 begin
943 return Flag114 (Id);
944 end Delay_Cleanups;
946 function Delay_Subprogram_Descriptors (Id : E) return B is
947 begin
948 return Flag50 (Id);
949 end Delay_Subprogram_Descriptors;
951 function Delta_Value (Id : E) return R is
952 begin
953 pragma Assert (Is_Fixed_Point_Type (Id));
954 return Ureal18 (Id);
955 end Delta_Value;
957 function Dependent_Instances (Id : E) return L is
958 begin
959 pragma Assert (Is_Generic_Instance (Id));
960 return Elist8 (Id);
961 end Dependent_Instances;
963 function Depends_On_Private (Id : E) return B is
964 begin
965 pragma Assert (Nkind (Id) in N_Entity);
966 return Flag14 (Id);
967 end Depends_On_Private;
969 function Digits_Value (Id : E) return U is
970 begin
971 pragma Assert
972 (Is_Floating_Point_Type (Id)
973 or else Is_Decimal_Fixed_Point_Type (Id));
974 return Uint17 (Id);
975 end Digits_Value;
977 function Direct_Primitive_Operations (Id : E) return L is
978 begin
979 pragma Assert (Is_Tagged_Type (Id));
980 return Elist10 (Id);
981 end Direct_Primitive_Operations;
983 function Directly_Designated_Type (Id : E) return E is
984 begin
985 pragma Assert (Is_Access_Type (Id));
986 return Node20 (Id);
987 end Directly_Designated_Type;
989 function Discard_Names (Id : E) return B is
990 begin
991 return Flag88 (Id);
992 end Discard_Names;
994 function Discriminal (Id : E) return E is
995 begin
996 pragma Assert (Ekind (Id) = E_Discriminant);
997 return Node17 (Id);
998 end Discriminal;
1000 function Discriminal_Link (Id : E) return N is
1001 begin
1002 return Node10 (Id);
1003 end Discriminal_Link;
1005 function Discriminant_Checking_Func (Id : E) return E is
1006 begin
1007 pragma Assert (Ekind (Id) = E_Component);
1008 return Node20 (Id);
1009 end Discriminant_Checking_Func;
1011 function Discriminant_Constraint (Id : E) return L is
1012 begin
1013 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1014 return Elist21 (Id);
1015 end Discriminant_Constraint;
1017 function Discriminant_Default_Value (Id : E) return N is
1018 begin
1019 pragma Assert (Ekind (Id) = E_Discriminant);
1020 return Node20 (Id);
1021 end Discriminant_Default_Value;
1023 function Discriminant_Number (Id : E) return U is
1024 begin
1025 pragma Assert (Ekind (Id) = E_Discriminant);
1026 return Uint15 (Id);
1027 end Discriminant_Number;
1029 function Dispatch_Table_Wrappers (Id : E) return L is
1030 begin
1031 pragma Assert (Ekind_In (Id, E_Record_Type,
1032 E_Record_Subtype));
1033 return Elist26 (Implementation_Base_Type (Id));
1034 end Dispatch_Table_Wrappers;
1036 function DT_Entry_Count (Id : E) return U is
1037 begin
1038 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1039 return Uint15 (Id);
1040 end DT_Entry_Count;
1042 function DT_Offset_To_Top_Func (Id : E) return E is
1043 begin
1044 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1045 return Node25 (Id);
1046 end DT_Offset_To_Top_Func;
1048 function DT_Position (Id : E) return U is
1049 begin
1050 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1051 and then Present (DTC_Entity (Id)));
1052 return Uint15 (Id);
1053 end DT_Position;
1055 function DTC_Entity (Id : E) return E is
1056 begin
1057 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1058 return Node16 (Id);
1059 end DTC_Entity;
1061 function Elaborate_Body_Desirable (Id : E) return B is
1062 begin
1063 pragma Assert (Ekind (Id) = E_Package);
1064 return Flag210 (Id);
1065 end Elaborate_Body_Desirable;
1067 function Elaboration_Entity (Id : E) return E is
1068 begin
1069 pragma Assert
1070 (Is_Subprogram (Id)
1071 or else
1072 Ekind (Id) = E_Package
1073 or else
1074 Is_Generic_Unit (Id));
1075 return Node13 (Id);
1076 end Elaboration_Entity;
1078 function Elaboration_Entity_Required (Id : E) return B is
1079 begin
1080 pragma Assert
1081 (Is_Subprogram (Id)
1082 or else
1083 Ekind (Id) = E_Package
1084 or else
1085 Is_Generic_Unit (Id));
1086 return Flag174 (Id);
1087 end Elaboration_Entity_Required;
1089 function Enclosing_Scope (Id : E) return E is
1090 begin
1091 return Node18 (Id);
1092 end Enclosing_Scope;
1094 function Entry_Accepted (Id : E) return B is
1095 begin
1096 pragma Assert (Is_Entry (Id));
1097 return Flag152 (Id);
1098 end Entry_Accepted;
1100 function Entry_Bodies_Array (Id : E) return E is
1101 begin
1102 return Node15 (Id);
1103 end Entry_Bodies_Array;
1105 function Entry_Cancel_Parameter (Id : E) return E is
1106 begin
1107 return Node23 (Id);
1108 end Entry_Cancel_Parameter;
1110 function Entry_Component (Id : E) return E is
1111 begin
1112 return Node11 (Id);
1113 end Entry_Component;
1115 function Entry_Formal (Id : E) return E is
1116 begin
1117 return Node16 (Id);
1118 end Entry_Formal;
1120 function Entry_Index_Constant (Id : E) return N is
1121 begin
1122 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1123 return Node18 (Id);
1124 end Entry_Index_Constant;
1126 function Contract (Id : E) return N is
1127 begin
1128 pragma Assert
1129 (Ekind_In (Id, E_Entry, E_Entry_Family)
1130 or else Is_Subprogram (Id)
1131 or else Is_Generic_Subprogram (Id));
1132 return Node24 (Id);
1133 end Contract;
1135 function Entry_Parameters_Type (Id : E) return E is
1136 begin
1137 return Node15 (Id);
1138 end Entry_Parameters_Type;
1140 function Enum_Pos_To_Rep (Id : E) return E is
1141 begin
1142 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1143 return Node23 (Id);
1144 end Enum_Pos_To_Rep;
1146 function Enumeration_Pos (Id : E) return Uint is
1147 begin
1148 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1149 return Uint11 (Id);
1150 end Enumeration_Pos;
1152 function Enumeration_Rep (Id : E) return U is
1153 begin
1154 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1155 return Uint12 (Id);
1156 end Enumeration_Rep;
1158 function Enumeration_Rep_Expr (Id : E) return N is
1159 begin
1160 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1161 return Node22 (Id);
1162 end Enumeration_Rep_Expr;
1164 function Equivalent_Type (Id : E) return E is
1165 begin
1166 pragma Assert
1167 (Ekind_In (Id, E_Class_Wide_Type,
1168 E_Class_Wide_Subtype,
1169 E_Access_Protected_Subprogram_Type,
1170 E_Anonymous_Access_Protected_Subprogram_Type,
1171 E_Access_Subprogram_Type,
1172 E_Exception_Type));
1173 return Node18 (Id);
1174 end Equivalent_Type;
1176 function Esize (Id : E) return Uint is
1177 begin
1178 return Uint12 (Id);
1179 end Esize;
1181 function Exception_Code (Id : E) return Uint is
1182 begin
1183 pragma Assert (Ekind (Id) = E_Exception);
1184 return Uint22 (Id);
1185 end Exception_Code;
1187 function Extra_Accessibility (Id : E) return E is
1188 begin
1189 pragma Assert
1190 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1191 return Node13 (Id);
1192 end Extra_Accessibility;
1194 function Extra_Accessibility_Of_Result (Id : E) return E is
1195 begin
1196 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1197 return Node19 (Id);
1198 end Extra_Accessibility_Of_Result;
1200 function Extra_Constrained (Id : E) return E is
1201 begin
1202 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1203 return Node23 (Id);
1204 end Extra_Constrained;
1206 function Extra_Formal (Id : E) return E is
1207 begin
1208 return Node15 (Id);
1209 end Extra_Formal;
1211 function Extra_Formals (Id : E) return E is
1212 begin
1213 pragma Assert
1214 (Is_Overloadable (Id)
1215 or else Ekind_In (Id, E_Entry_Family,
1216 E_Subprogram_Body,
1217 E_Subprogram_Type));
1218 return Node28 (Id);
1219 end Extra_Formals;
1221 function Can_Use_Internal_Rep (Id : E) return B is
1222 begin
1223 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1224 return Flag229 (Base_Type (Id));
1225 end Can_Use_Internal_Rep;
1227 function Finalization_Master (Id : E) return E is
1228 begin
1229 pragma Assert (Is_Access_Type (Id));
1230 return Node23 (Root_Type (Id));
1231 end Finalization_Master;
1233 function Finalize_Storage_Only (Id : E) return B is
1234 begin
1235 pragma Assert (Is_Type (Id));
1236 return Flag158 (Base_Type (Id));
1237 end Finalize_Storage_Only;
1239 function Finalizer (Id : E) return E is
1240 begin
1241 pragma Assert
1242 (Ekind (Id) = E_Package
1243 or else Ekind (Id) = E_Package_Body);
1244 return Node24 (Id);
1245 end Finalizer;
1247 function First_Entity (Id : E) return E is
1248 begin
1249 return Node17 (Id);
1250 end First_Entity;
1252 function First_Exit_Statement (Id : E) return N is
1253 begin
1254 pragma Assert (Ekind (Id) = E_Loop);
1255 return Node8 (Id);
1256 end First_Exit_Statement;
1258 function First_Index (Id : E) return N is
1259 begin
1260 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1261 return Node17 (Id);
1262 end First_Index;
1264 function First_Literal (Id : E) return E is
1265 begin
1266 pragma Assert (Is_Enumeration_Type (Id));
1267 return Node17 (Id);
1268 end First_Literal;
1270 function First_Optional_Parameter (Id : E) return E is
1271 begin
1272 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1273 return Node14 (Id);
1274 end First_Optional_Parameter;
1276 function First_Private_Entity (Id : E) return E is
1277 begin
1278 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1279 or else Ekind (Id) in Concurrent_Kind);
1280 return Node16 (Id);
1281 end First_Private_Entity;
1283 function First_Rep_Item (Id : E) return E is
1284 begin
1285 return Node6 (Id);
1286 end First_Rep_Item;
1288 function Freeze_Node (Id : E) return N is
1289 begin
1290 return Node7 (Id);
1291 end Freeze_Node;
1293 function From_With_Type (Id : E) return B is
1294 begin
1295 return Flag159 (Id);
1296 end From_With_Type;
1298 function Full_View (Id : E) return E is
1299 begin
1300 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1301 return Node11 (Id);
1302 end Full_View;
1304 function Generic_Homonym (Id : E) return E is
1305 begin
1306 pragma Assert (Ekind (Id) = E_Generic_Package);
1307 return Node11 (Id);
1308 end Generic_Homonym;
1310 function Generic_Renamings (Id : E) return L is
1311 begin
1312 return Elist23 (Id);
1313 end Generic_Renamings;
1315 function Handler_Records (Id : E) return S is
1316 begin
1317 return List10 (Id);
1318 end Handler_Records;
1320 function Has_Aliased_Components (Id : E) return B is
1321 begin
1322 return Flag135 (Implementation_Base_Type (Id));
1323 end Has_Aliased_Components;
1325 function Has_Alignment_Clause (Id : E) return B is
1326 begin
1327 return Flag46 (Id);
1328 end Has_Alignment_Clause;
1330 function Has_All_Calls_Remote (Id : E) return B is
1331 begin
1332 return Flag79 (Id);
1333 end Has_All_Calls_Remote;
1335 function Has_Anonymous_Master (Id : E) return B is
1336 begin
1337 pragma Assert
1338 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1339 return Flag253 (Id);
1340 end Has_Anonymous_Master;
1342 function Has_Atomic_Components (Id : E) return B is
1343 begin
1344 return Flag86 (Implementation_Base_Type (Id));
1345 end Has_Atomic_Components;
1347 function Has_Biased_Representation (Id : E) return B is
1348 begin
1349 return Flag139 (Id);
1350 end Has_Biased_Representation;
1352 function Has_Completion (Id : E) return B is
1353 begin
1354 return Flag26 (Id);
1355 end Has_Completion;
1357 function Has_Completion_In_Body (Id : E) return B is
1358 begin
1359 pragma Assert (Is_Type (Id));
1360 return Flag71 (Id);
1361 end Has_Completion_In_Body;
1363 function Has_Complex_Representation (Id : E) return B is
1364 begin
1365 pragma Assert (Is_Type (Id));
1366 return Flag140 (Implementation_Base_Type (Id));
1367 end Has_Complex_Representation;
1369 function Has_Component_Size_Clause (Id : E) return B is
1370 begin
1371 pragma Assert (Is_Array_Type (Id));
1372 return Flag68 (Implementation_Base_Type (Id));
1373 end Has_Component_Size_Clause;
1375 function Has_Constrained_Partial_View (Id : E) return B is
1376 begin
1377 pragma Assert (Is_Type (Id));
1378 return Flag187 (Id);
1379 end Has_Constrained_Partial_View;
1381 function Has_Controlled_Component (Id : E) return B is
1382 begin
1383 return Flag43 (Base_Type (Id));
1384 end Has_Controlled_Component;
1386 function Has_Contiguous_Rep (Id : E) return B is
1387 begin
1388 return Flag181 (Id);
1389 end Has_Contiguous_Rep;
1391 function Has_Controlling_Result (Id : E) return B is
1392 begin
1393 return Flag98 (Id);
1394 end Has_Controlling_Result;
1396 function Has_Convention_Pragma (Id : E) return B is
1397 begin
1398 return Flag119 (Id);
1399 end Has_Convention_Pragma;
1401 function Has_Default_Aspect (Id : E) return B is
1402 begin
1403 return Flag39 (Base_Type (Id));
1404 end Has_Default_Aspect;
1406 function Has_Delayed_Aspects (Id : E) return B is
1407 begin
1408 pragma Assert (Nkind (Id) in N_Entity);
1409 return Flag200 (Id);
1410 end Has_Delayed_Aspects;
1412 function Has_Delayed_Freeze (Id : E) return B is
1413 begin
1414 pragma Assert (Nkind (Id) in N_Entity);
1415 return Flag18 (Id);
1416 end Has_Delayed_Freeze;
1418 function Has_Discriminants (Id : E) return B is
1419 begin
1420 pragma Assert (Nkind (Id) in N_Entity);
1421 return Flag5 (Id);
1422 end Has_Discriminants;
1424 function Has_Dispatch_Table (Id : E) return B is
1425 begin
1426 pragma Assert (Is_Tagged_Type (Id));
1427 return Flag220 (Id);
1428 end Has_Dispatch_Table;
1430 function Has_Enumeration_Rep_Clause (Id : E) return B is
1431 begin
1432 pragma Assert (Is_Enumeration_Type (Id));
1433 return Flag66 (Id);
1434 end Has_Enumeration_Rep_Clause;
1436 function Has_Exit (Id : E) return B is
1437 begin
1438 return Flag47 (Id);
1439 end Has_Exit;
1441 function Has_External_Tag_Rep_Clause (Id : E) return B is
1442 begin
1443 pragma Assert (Is_Tagged_Type (Id));
1444 return Flag110 (Id);
1445 end Has_External_Tag_Rep_Clause;
1447 function Has_Forward_Instantiation (Id : E) return B is
1448 begin
1449 return Flag175 (Id);
1450 end Has_Forward_Instantiation;
1452 function Has_Fully_Qualified_Name (Id : E) return B is
1453 begin
1454 return Flag173 (Id);
1455 end Has_Fully_Qualified_Name;
1457 function Has_Gigi_Rep_Item (Id : E) return B is
1458 begin
1459 return Flag82 (Id);
1460 end Has_Gigi_Rep_Item;
1462 function Has_Homonym (Id : E) return B is
1463 begin
1464 return Flag56 (Id);
1465 end Has_Homonym;
1467 function Has_Implicit_Dereference (Id : E) return B is
1468 begin
1469 return Flag251 (Id);
1470 end Has_Implicit_Dereference;
1472 function Has_Independent_Components (Id : E) return B is
1473 begin
1474 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1475 return Flag34 (Id);
1476 end Has_Independent_Components;
1478 function Has_Inheritable_Invariants (Id : E) return B is
1479 begin
1480 pragma Assert (Is_Type (Id));
1481 return Flag248 (Id);
1482 end Has_Inheritable_Invariants;
1484 function Has_Initial_Value (Id : E) return B is
1485 begin
1486 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1487 return Flag219 (Id);
1488 end Has_Initial_Value;
1490 function Has_Invariants (Id : E) return B is
1491 begin
1492 pragma Assert (Is_Type (Id)
1493 or else Ekind (Id) = E_Procedure
1494 or else Ekind (Id) = E_Generic_Procedure);
1495 return Flag232 (Id);
1496 end Has_Invariants;
1498 function Has_Machine_Radix_Clause (Id : E) return B is
1499 begin
1500 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1501 return Flag83 (Id);
1502 end Has_Machine_Radix_Clause;
1504 function Has_Master_Entity (Id : E) return B is
1505 begin
1506 return Flag21 (Id);
1507 end Has_Master_Entity;
1509 function Has_Missing_Return (Id : E) return B is
1510 begin
1511 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1512 return Flag142 (Id);
1513 end Has_Missing_Return;
1515 function Has_Nested_Block_With_Handler (Id : E) return B is
1516 begin
1517 return Flag101 (Id);
1518 end Has_Nested_Block_With_Handler;
1520 function Has_Non_Standard_Rep (Id : E) return B is
1521 begin
1522 return Flag75 (Implementation_Base_Type (Id));
1523 end Has_Non_Standard_Rep;
1525 function Has_Object_Size_Clause (Id : E) return B is
1526 begin
1527 pragma Assert (Is_Type (Id));
1528 return Flag172 (Id);
1529 end Has_Object_Size_Clause;
1531 function Has_Per_Object_Constraint (Id : E) return B is
1532 begin
1533 return Flag154 (Id);
1534 end Has_Per_Object_Constraint;
1536 function Has_Postconditions (Id : E) return B is
1537 begin
1538 pragma Assert (Is_Subprogram (Id));
1539 return Flag240 (Id);
1540 end Has_Postconditions;
1542 function Has_Pragma_Controlled (Id : E) return B is
1543 begin
1544 pragma Assert (Is_Access_Type (Id));
1545 return Flag27 (Implementation_Base_Type (Id));
1546 end Has_Pragma_Controlled;
1548 function Has_Pragma_Elaborate_Body (Id : E) return B is
1549 begin
1550 return Flag150 (Id);
1551 end Has_Pragma_Elaborate_Body;
1553 function Has_Pragma_Inline (Id : E) return B is
1554 begin
1555 return Flag157 (Id);
1556 end Has_Pragma_Inline;
1558 function Has_Pragma_Inline_Always (Id : E) return B is
1559 begin
1560 return Flag230 (Id);
1561 end Has_Pragma_Inline_Always;
1563 function Has_Pragma_Ordered (Id : E) return B is
1564 begin
1565 pragma Assert (Is_Enumeration_Type (Id));
1566 return Flag198 (Implementation_Base_Type (Id));
1567 end Has_Pragma_Ordered;
1569 function Has_Pragma_Pack (Id : E) return B is
1570 begin
1571 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1572 return Flag121 (Implementation_Base_Type (Id));
1573 end Has_Pragma_Pack;
1575 function Has_Pragma_Preelab_Init (Id : E) return B is
1576 begin
1577 return Flag221 (Id);
1578 end Has_Pragma_Preelab_Init;
1580 function Has_Pragma_Pure (Id : E) return B is
1581 begin
1582 return Flag203 (Id);
1583 end Has_Pragma_Pure;
1585 function Has_Pragma_Pure_Function (Id : E) return B is
1586 begin
1587 return Flag179 (Id);
1588 end Has_Pragma_Pure_Function;
1590 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1591 begin
1592 return Flag169 (Id);
1593 end Has_Pragma_Thread_Local_Storage;
1595 function Has_Pragma_Unmodified (Id : E) return B is
1596 begin
1597 return Flag233 (Id);
1598 end Has_Pragma_Unmodified;
1600 function Has_Pragma_Unreferenced (Id : E) return B is
1601 begin
1602 return Flag180 (Id);
1603 end Has_Pragma_Unreferenced;
1605 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1606 begin
1607 pragma Assert (Is_Type (Id));
1608 return Flag212 (Id);
1609 end Has_Pragma_Unreferenced_Objects;
1611 function Has_Predicates (Id : E) return B is
1612 begin
1613 return Flag250 (Id);
1614 end Has_Predicates;
1616 function Has_Primitive_Operations (Id : E) return B is
1617 begin
1618 pragma Assert (Is_Type (Id));
1619 return Flag120 (Base_Type (Id));
1620 end Has_Primitive_Operations;
1622 function Has_Private_Ancestor (Id : E) return B is
1623 begin
1624 return Flag151 (Id);
1625 end Has_Private_Ancestor;
1627 function Has_Private_Declaration (Id : E) return B is
1628 begin
1629 return Flag155 (Id);
1630 end Has_Private_Declaration;
1632 function Has_Qualified_Name (Id : E) return B is
1633 begin
1634 return Flag161 (Id);
1635 end Has_Qualified_Name;
1637 function Has_RACW (Id : E) return B is
1638 begin
1639 pragma Assert (Ekind (Id) = E_Package);
1640 return Flag214 (Id);
1641 end Has_RACW;
1643 function Has_Record_Rep_Clause (Id : E) return B is
1644 begin
1645 pragma Assert (Is_Record_Type (Id));
1646 return Flag65 (Implementation_Base_Type (Id));
1647 end Has_Record_Rep_Clause;
1649 function Has_Recursive_Call (Id : E) return B is
1650 begin
1651 pragma Assert (Is_Subprogram (Id));
1652 return Flag143 (Id);
1653 end Has_Recursive_Call;
1655 function Has_Size_Clause (Id : E) return B is
1656 begin
1657 return Flag29 (Id);
1658 end Has_Size_Clause;
1660 function Has_Small_Clause (Id : E) return B is
1661 begin
1662 return Flag67 (Id);
1663 end Has_Small_Clause;
1665 function Has_Specified_Layout (Id : E) return B is
1666 begin
1667 pragma Assert (Is_Type (Id));
1668 return Flag100 (Implementation_Base_Type (Id));
1669 end Has_Specified_Layout;
1671 function Has_Specified_Stream_Input (Id : E) return B is
1672 begin
1673 pragma Assert (Is_Type (Id));
1674 return Flag190 (Id);
1675 end Has_Specified_Stream_Input;
1677 function Has_Specified_Stream_Output (Id : E) return B is
1678 begin
1679 pragma Assert (Is_Type (Id));
1680 return Flag191 (Id);
1681 end Has_Specified_Stream_Output;
1683 function Has_Specified_Stream_Read (Id : E) return B is
1684 begin
1685 pragma Assert (Is_Type (Id));
1686 return Flag192 (Id);
1687 end Has_Specified_Stream_Read;
1689 function Has_Specified_Stream_Write (Id : E) return B is
1690 begin
1691 pragma Assert (Is_Type (Id));
1692 return Flag193 (Id);
1693 end Has_Specified_Stream_Write;
1695 function Has_Static_Discriminants (Id : E) return B is
1696 begin
1697 pragma Assert (Is_Type (Id));
1698 return Flag211 (Id);
1699 end Has_Static_Discriminants;
1701 function Has_Storage_Size_Clause (Id : E) return B is
1702 begin
1703 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1704 return Flag23 (Implementation_Base_Type (Id));
1705 end Has_Storage_Size_Clause;
1707 function Has_Stream_Size_Clause (Id : E) return B is
1708 begin
1709 return Flag184 (Id);
1710 end Has_Stream_Size_Clause;
1712 function Has_Task (Id : E) return B is
1713 begin
1714 return Flag30 (Base_Type (Id));
1715 end Has_Task;
1717 function Has_Thunks (Id : E) return B is
1718 begin
1719 return Flag228 (Id);
1720 end Has_Thunks;
1722 function Has_Unchecked_Union (Id : E) return B is
1723 begin
1724 return Flag123 (Base_Type (Id));
1725 end Has_Unchecked_Union;
1727 function Has_Unknown_Discriminants (Id : E) return B is
1728 begin
1729 pragma Assert (Is_Type (Id));
1730 return Flag72 (Id);
1731 end Has_Unknown_Discriminants;
1733 function Has_Up_Level_Access (Id : E) return B is
1734 begin
1735 pragma Assert
1736 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1737 return Flag215 (Id);
1738 end Has_Up_Level_Access;
1740 function Has_Volatile_Components (Id : E) return B is
1741 begin
1742 return Flag87 (Implementation_Base_Type (Id));
1743 end Has_Volatile_Components;
1745 function Has_Xref_Entry (Id : E) return B is
1746 begin
1747 return Flag182 (Id);
1748 end Has_Xref_Entry;
1750 function Hiding_Loop_Variable (Id : E) return E is
1751 begin
1752 pragma Assert (Ekind (Id) = E_Variable);
1753 return Node8 (Id);
1754 end Hiding_Loop_Variable;
1756 function Homonym (Id : E) return E is
1757 begin
1758 return Node4 (Id);
1759 end Homonym;
1761 function Interface_Alias (Id : E) return E is
1762 begin
1763 pragma Assert (Is_Subprogram (Id));
1764 return Node25 (Id);
1765 end Interface_Alias;
1767 function Interfaces (Id : E) return L is
1768 begin
1769 pragma Assert (Is_Record_Type (Id));
1770 return Elist25 (Id);
1771 end Interfaces;
1773 function In_Package_Body (Id : E) return B is
1774 begin
1775 return Flag48 (Id);
1776 end In_Package_Body;
1778 function In_Private_Part (Id : E) return B is
1779 begin
1780 return Flag45 (Id);
1781 end In_Private_Part;
1783 function In_Use (Id : E) return B is
1784 begin
1785 pragma Assert (Nkind (Id) in N_Entity);
1786 return Flag8 (Id);
1787 end In_Use;
1789 function Initialization_Statements (Id : E) return N is
1790 begin
1791 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1792 return Node28 (Id);
1793 end Initialization_Statements;
1795 function Integrity_Level (Id : E) return U is
1796 begin
1797 pragma Assert (Ekind (Id) = E_Abstract_State);
1798 return Uint8 (Id);
1799 end Integrity_Level;
1801 function Inner_Instances (Id : E) return L is
1802 begin
1803 return Elist23 (Id);
1804 end Inner_Instances;
1806 function Interface_Name (Id : E) return N is
1807 begin
1808 return Node21 (Id);
1809 end Interface_Name;
1811 function Is_Abstract_Subprogram (Id : E) return B is
1812 begin
1813 pragma Assert (Is_Overloadable (Id));
1814 return Flag19 (Id);
1815 end Is_Abstract_Subprogram;
1817 function Is_Abstract_Type (Id : E) return B is
1818 begin
1819 pragma Assert (Is_Type (Id));
1820 return Flag146 (Id);
1821 end Is_Abstract_Type;
1823 function Is_Local_Anonymous_Access (Id : E) return B is
1824 begin
1825 pragma Assert (Is_Access_Type (Id));
1826 return Flag194 (Id);
1827 end Is_Local_Anonymous_Access;
1829 function Is_Access_Constant (Id : E) return B is
1830 begin
1831 pragma Assert (Is_Access_Type (Id));
1832 return Flag69 (Id);
1833 end Is_Access_Constant;
1835 function Is_Ada_2005_Only (Id : E) return B is
1836 begin
1837 return Flag185 (Id);
1838 end Is_Ada_2005_Only;
1840 function Is_Ada_2012_Only (Id : E) return B is
1841 begin
1842 return Flag199 (Id);
1843 end Is_Ada_2012_Only;
1845 function Is_Aliased (Id : E) return B is
1846 begin
1847 pragma Assert (Nkind (Id) in N_Entity);
1848 return Flag15 (Id);
1849 end Is_Aliased;
1851 function Is_AST_Entry (Id : E) return B is
1852 begin
1853 pragma Assert (Is_Entry (Id));
1854 return Flag132 (Id);
1855 end Is_AST_Entry;
1857 function Is_Asynchronous (Id : E) return B is
1858 begin
1859 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1860 return Flag81 (Id);
1861 end Is_Asynchronous;
1863 function Is_Atomic (Id : E) return B is
1864 begin
1865 return Flag85 (Id);
1866 end Is_Atomic;
1868 function Is_Bit_Packed_Array (Id : E) return B is
1869 begin
1870 return Flag122 (Implementation_Base_Type (Id));
1871 end Is_Bit_Packed_Array;
1873 function Is_Called (Id : E) return B is
1874 begin
1875 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1876 return Flag102 (Id);
1877 end Is_Called;
1879 function Is_Character_Type (Id : E) return B is
1880 begin
1881 return Flag63 (Id);
1882 end Is_Character_Type;
1884 function Is_Child_Unit (Id : E) return B is
1885 begin
1886 return Flag73 (Id);
1887 end Is_Child_Unit;
1889 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1890 begin
1891 return Flag35 (Id);
1892 end Is_Class_Wide_Equivalent_Type;
1894 function Is_Compilation_Unit (Id : E) return B is
1895 begin
1896 return Flag149 (Id);
1897 end Is_Compilation_Unit;
1899 function Is_Completely_Hidden (Id : E) return B is
1900 begin
1901 pragma Assert (Ekind (Id) = E_Discriminant);
1902 return Flag103 (Id);
1903 end Is_Completely_Hidden;
1905 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1906 begin
1907 return Flag80 (Id);
1908 end Is_Constr_Subt_For_U_Nominal;
1910 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1911 begin
1912 return Flag141 (Id);
1913 end Is_Constr_Subt_For_UN_Aliased;
1915 function Is_Constrained (Id : E) return B is
1916 begin
1917 pragma Assert (Nkind (Id) in N_Entity);
1918 return Flag12 (Id);
1919 end Is_Constrained;
1921 function Is_Constructor (Id : E) return B is
1922 begin
1923 return Flag76 (Id);
1924 end Is_Constructor;
1926 function Is_Controlled (Id : E) return B is
1927 begin
1928 return Flag42 (Base_Type (Id));
1929 end Is_Controlled;
1931 function Is_Controlling_Formal (Id : E) return B is
1932 begin
1933 pragma Assert (Is_Formal (Id));
1934 return Flag97 (Id);
1935 end Is_Controlling_Formal;
1937 function Is_CPP_Class (Id : E) return B is
1938 begin
1939 return Flag74 (Id);
1940 end Is_CPP_Class;
1942 function Is_Descendent_Of_Address (Id : E) return B is
1943 begin
1944 pragma Assert (Is_Type (Id));
1945 return Flag223 (Id);
1946 end Is_Descendent_Of_Address;
1948 function Is_Discrim_SO_Function (Id : E) return B is
1949 begin
1950 return Flag176 (Id);
1951 end Is_Discrim_SO_Function;
1953 function Is_Dispatch_Table_Entity (Id : E) return B is
1954 begin
1955 return Flag234 (Id);
1956 end Is_Dispatch_Table_Entity;
1958 function Is_Dispatching_Operation (Id : E) return B is
1959 begin
1960 pragma Assert (Nkind (Id) in N_Entity);
1961 return Flag6 (Id);
1962 end Is_Dispatching_Operation;
1964 function Is_Eliminated (Id : E) return B is
1965 begin
1966 return Flag124 (Id);
1967 end Is_Eliminated;
1969 function Is_Entry_Formal (Id : E) return B is
1970 begin
1971 return Flag52 (Id);
1972 end Is_Entry_Formal;
1974 function Is_Exported (Id : E) return B is
1975 begin
1976 return Flag99 (Id);
1977 end Is_Exported;
1979 function Is_First_Subtype (Id : E) return B is
1980 begin
1981 return Flag70 (Id);
1982 end Is_First_Subtype;
1984 function Is_For_Access_Subtype (Id : E) return B is
1985 begin
1986 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1987 return Flag118 (Id);
1988 end Is_For_Access_Subtype;
1990 function Is_Formal_Subprogram (Id : E) return B is
1991 begin
1992 return Flag111 (Id);
1993 end Is_Formal_Subprogram;
1995 function Is_Frozen (Id : E) return B is
1996 begin
1997 return Flag4 (Id);
1998 end Is_Frozen;
2000 function Is_Generic_Actual_Type (Id : E) return B is
2001 begin
2002 pragma Assert (Is_Type (Id));
2003 return Flag94 (Id);
2004 end Is_Generic_Actual_Type;
2006 function Is_Generic_Instance (Id : E) return B is
2007 begin
2008 return Flag130 (Id);
2009 end Is_Generic_Instance;
2011 function Is_Generic_Type (Id : E) return B is
2012 begin
2013 pragma Assert (Nkind (Id) in N_Entity);
2014 return Flag13 (Id);
2015 end Is_Generic_Type;
2017 function Is_Hidden (Id : E) return B is
2018 begin
2019 return Flag57 (Id);
2020 end Is_Hidden;
2022 function Is_Hidden_Open_Scope (Id : E) return B is
2023 begin
2024 return Flag171 (Id);
2025 end Is_Hidden_Open_Scope;
2027 function Is_Immediately_Visible (Id : E) return B is
2028 begin
2029 pragma Assert (Nkind (Id) in N_Entity);
2030 return Flag7 (Id);
2031 end Is_Immediately_Visible;
2033 function Is_Implementation_Defined (Id : E) return B is
2034 begin
2035 return Flag254 (Id);
2036 end Is_Implementation_Defined;
2038 function Is_Imported (Id : E) return B is
2039 begin
2040 return Flag24 (Id);
2041 end Is_Imported;
2043 function Is_Inlined (Id : E) return B is
2044 begin
2045 return Flag11 (Id);
2046 end Is_Inlined;
2048 function Is_Interface (Id : E) return B is
2049 begin
2050 return Flag186 (Id);
2051 end Is_Interface;
2053 function Is_Instantiated (Id : E) return B is
2054 begin
2055 return Flag126 (Id);
2056 end Is_Instantiated;
2058 function Is_Internal (Id : E) return B is
2059 begin
2060 pragma Assert (Nkind (Id) in N_Entity);
2061 return Flag17 (Id);
2062 end Is_Internal;
2064 function Is_Interrupt_Handler (Id : E) return B is
2065 begin
2066 pragma Assert (Nkind (Id) in N_Entity);
2067 return Flag89 (Id);
2068 end Is_Interrupt_Handler;
2070 function Is_Intrinsic_Subprogram (Id : E) return B is
2071 begin
2072 return Flag64 (Id);
2073 end Is_Intrinsic_Subprogram;
2075 function Is_Itype (Id : E) return B is
2076 begin
2077 return Flag91 (Id);
2078 end Is_Itype;
2080 function Is_Known_Non_Null (Id : E) return B is
2081 begin
2082 return Flag37 (Id);
2083 end Is_Known_Non_Null;
2085 function Is_Known_Null (Id : E) return B is
2086 begin
2087 return Flag204 (Id);
2088 end Is_Known_Null;
2090 function Is_Known_Valid (Id : E) return B is
2091 begin
2092 return Flag170 (Id);
2093 end Is_Known_Valid;
2095 function Is_Limited_Composite (Id : E) return B is
2096 begin
2097 return Flag106 (Id);
2098 end Is_Limited_Composite;
2100 function Is_Limited_Interface (Id : E) return B is
2101 begin
2102 return Flag197 (Id);
2103 end Is_Limited_Interface;
2105 function Is_Limited_Record (Id : E) return B is
2106 begin
2107 return Flag25 (Id);
2108 end Is_Limited_Record;
2110 function Is_Machine_Code_Subprogram (Id : E) return B is
2111 begin
2112 pragma Assert (Is_Subprogram (Id));
2113 return Flag137 (Id);
2114 end Is_Machine_Code_Subprogram;
2116 function Is_Non_Static_Subtype (Id : E) return B is
2117 begin
2118 pragma Assert (Is_Type (Id));
2119 return Flag109 (Id);
2120 end Is_Non_Static_Subtype;
2122 function Is_Null_Init_Proc (Id : E) return B is
2123 begin
2124 pragma Assert (Ekind (Id) = E_Procedure);
2125 return Flag178 (Id);
2126 end Is_Null_Init_Proc;
2128 function Is_Obsolescent (Id : E) return B is
2129 begin
2130 return Flag153 (Id);
2131 end Is_Obsolescent;
2133 function Is_Only_Out_Parameter (Id : E) return B is
2134 begin
2135 pragma Assert (Is_Formal (Id));
2136 return Flag226 (Id);
2137 end Is_Only_Out_Parameter;
2139 function Is_Optional_Parameter (Id : E) return B is
2140 begin
2141 pragma Assert (Is_Formal (Id));
2142 return Flag134 (Id);
2143 end Is_Optional_Parameter;
2145 function Is_Package_Body_Entity (Id : E) return B is
2146 begin
2147 return Flag160 (Id);
2148 end Is_Package_Body_Entity;
2150 function Is_Packed (Id : E) return B is
2151 begin
2152 return Flag51 (Implementation_Base_Type (Id));
2153 end Is_Packed;
2155 function Is_Packed_Array_Type (Id : E) return B is
2156 begin
2157 return Flag138 (Id);
2158 end Is_Packed_Array_Type;
2160 function Is_Potentially_Use_Visible (Id : E) return B is
2161 begin
2162 pragma Assert (Nkind (Id) in N_Entity);
2163 return Flag9 (Id);
2164 end Is_Potentially_Use_Visible;
2166 function Is_Preelaborated (Id : E) return B is
2167 begin
2168 return Flag59 (Id);
2169 end Is_Preelaborated;
2171 function Is_Primitive (Id : E) return B is
2172 begin
2173 pragma Assert
2174 (Is_Overloadable (Id)
2175 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2176 return Flag218 (Id);
2177 end Is_Primitive;
2179 function Is_Primitive_Wrapper (Id : E) return B is
2180 begin
2181 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2182 return Flag195 (Id);
2183 end Is_Primitive_Wrapper;
2185 function Is_Private_Composite (Id : E) return B is
2186 begin
2187 pragma Assert (Is_Type (Id));
2188 return Flag107 (Id);
2189 end Is_Private_Composite;
2191 function Is_Private_Descendant (Id : E) return B is
2192 begin
2193 return Flag53 (Id);
2194 end Is_Private_Descendant;
2196 function Is_Private_Primitive (Id : E) return B is
2197 begin
2198 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2199 return Flag245 (Id);
2200 end Is_Private_Primitive;
2202 function Is_Processed_Transient (Id : E) return B is
2203 begin
2204 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2205 return Flag252 (Id);
2206 end Is_Processed_Transient;
2208 function Is_Public (Id : E) return B is
2209 begin
2210 pragma Assert (Nkind (Id) in N_Entity);
2211 return Flag10 (Id);
2212 end Is_Public;
2214 function Is_Pure (Id : E) return B is
2215 begin
2216 return Flag44 (Id);
2217 end Is_Pure;
2219 function Is_Pure_Unit_Access_Type (Id : E) return B is
2220 begin
2221 pragma Assert (Is_Access_Type (Id));
2222 return Flag189 (Id);
2223 end Is_Pure_Unit_Access_Type;
2225 function Is_RACW_Stub_Type (Id : E) return B is
2226 begin
2227 pragma Assert (Is_Type (Id));
2228 return Flag244 (Id);
2229 end Is_RACW_Stub_Type;
2231 function Is_Raised (Id : E) return B is
2232 begin
2233 pragma Assert (Ekind (Id) = E_Exception);
2234 return Flag224 (Id);
2235 end Is_Raised;
2237 function Is_Remote_Call_Interface (Id : E) return B is
2238 begin
2239 return Flag62 (Id);
2240 end Is_Remote_Call_Interface;
2242 function Is_Remote_Types (Id : E) return B is
2243 begin
2244 return Flag61 (Id);
2245 end Is_Remote_Types;
2247 function Is_Renaming_Of_Object (Id : E) return B is
2248 begin
2249 return Flag112 (Id);
2250 end Is_Renaming_Of_Object;
2252 function Is_Return_Object (Id : E) return B is
2253 begin
2254 return Flag209 (Id);
2255 end Is_Return_Object;
2257 function Is_Safe_To_Reevaluate (Id : E) return B is
2258 begin
2259 return Flag249 (Id);
2260 end Is_Safe_To_Reevaluate;
2262 function Is_Shared_Passive (Id : E) return B is
2263 begin
2264 return Flag60 (Id);
2265 end Is_Shared_Passive;
2267 function Is_Statically_Allocated (Id : E) return B is
2268 begin
2269 return Flag28 (Id);
2270 end Is_Statically_Allocated;
2272 function Is_Tag (Id : E) return B is
2273 begin
2274 pragma Assert (Nkind (Id) in N_Entity);
2275 return Flag78 (Id);
2276 end Is_Tag;
2278 function Is_Tagged_Type (Id : E) return B is
2279 begin
2280 return Flag55 (Id);
2281 end Is_Tagged_Type;
2283 function Is_Thunk (Id : E) return B is
2284 begin
2285 pragma Assert (Is_Subprogram (Id));
2286 return Flag225 (Id);
2287 end Is_Thunk;
2289 function Is_Trivial_Subprogram (Id : E) return B is
2290 begin
2291 return Flag235 (Id);
2292 end Is_Trivial_Subprogram;
2294 function Is_True_Constant (Id : E) return B is
2295 begin
2296 return Flag163 (Id);
2297 end Is_True_Constant;
2299 function Is_Unchecked_Union (Id : E) return B is
2300 begin
2301 return Flag117 (Implementation_Base_Type (Id));
2302 end Is_Unchecked_Union;
2304 function Is_Underlying_Record_View (Id : E) return B is
2305 begin
2306 return Flag246 (Id);
2307 end Is_Underlying_Record_View;
2309 function Is_Unsigned_Type (Id : E) return B is
2310 begin
2311 pragma Assert (Is_Type (Id));
2312 return Flag144 (Id);
2313 end Is_Unsigned_Type;
2315 function Is_Valued_Procedure (Id : E) return B is
2316 begin
2317 pragma Assert (Ekind (Id) = E_Procedure);
2318 return Flag127 (Id);
2319 end Is_Valued_Procedure;
2321 function Is_Visible_Formal (Id : E) return B is
2322 begin
2323 return Flag206 (Id);
2324 end Is_Visible_Formal;
2326 function Is_Visible_Lib_Unit (Id : E) return B is
2327 begin
2328 return Flag116 (Id);
2329 end Is_Visible_Lib_Unit;
2331 function Is_VMS_Exception (Id : E) return B is
2332 begin
2333 return Flag133 (Id);
2334 end Is_VMS_Exception;
2336 function Is_Volatile (Id : E) return B is
2337 begin
2338 pragma Assert (Nkind (Id) in N_Entity);
2340 if Is_Type (Id) then
2341 return Flag16 (Base_Type (Id));
2342 else
2343 return Flag16 (Id);
2344 end if;
2345 end Is_Volatile;
2347 function Itype_Printed (Id : E) return B is
2348 begin
2349 pragma Assert (Is_Itype (Id));
2350 return Flag202 (Id);
2351 end Itype_Printed;
2353 function Kill_Elaboration_Checks (Id : E) return B is
2354 begin
2355 return Flag32 (Id);
2356 end Kill_Elaboration_Checks;
2358 function Kill_Range_Checks (Id : E) return B is
2359 begin
2360 return Flag33 (Id);
2361 end Kill_Range_Checks;
2363 function Known_To_Have_Preelab_Init (Id : E) return B is
2364 begin
2365 pragma Assert (Is_Type (Id));
2366 return Flag207 (Id);
2367 end Known_To_Have_Preelab_Init;
2369 function Last_Assignment (Id : E) return N is
2370 begin
2371 pragma Assert (Is_Assignable (Id));
2372 return Node26 (Id);
2373 end Last_Assignment;
2375 function Last_Entity (Id : E) return E is
2376 begin
2377 return Node20 (Id);
2378 end Last_Entity;
2380 function Limited_View (Id : E) return E is
2381 begin
2382 pragma Assert (Ekind (Id) = E_Package);
2383 return Node23 (Id);
2384 end Limited_View;
2386 function Lit_Indexes (Id : E) return E is
2387 begin
2388 pragma Assert (Is_Enumeration_Type (Id));
2389 return Node15 (Id);
2390 end Lit_Indexes;
2392 function Lit_Strings (Id : E) return E is
2393 begin
2394 pragma Assert (Is_Enumeration_Type (Id));
2395 return Node16 (Id);
2396 end Lit_Strings;
2398 function Loop_Entry_Attributes (Id : E) return L is
2399 begin
2400 pragma Assert (Ekind (Id) = E_Loop);
2401 return Elist10 (Id);
2402 end Loop_Entry_Attributes;
2404 function Low_Bound_Tested (Id : E) return B is
2405 begin
2406 return Flag205 (Id);
2407 end Low_Bound_Tested;
2409 function Machine_Radix_10 (Id : E) return B is
2410 begin
2411 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2412 return Flag84 (Id);
2413 end Machine_Radix_10;
2415 function Master_Id (Id : E) return E is
2416 begin
2417 pragma Assert (Is_Access_Type (Id));
2418 return Node17 (Id);
2419 end Master_Id;
2421 function Materialize_Entity (Id : E) return B is
2422 begin
2423 return Flag168 (Id);
2424 end Materialize_Entity;
2426 function Mechanism (Id : E) return M is
2427 begin
2428 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2429 return UI_To_Int (Uint8 (Id));
2430 end Mechanism;
2432 function Modulus (Id : E) return Uint is
2433 begin
2434 pragma Assert (Is_Modular_Integer_Type (Id));
2435 return Uint17 (Base_Type (Id));
2436 end Modulus;
2438 function Must_Be_On_Byte_Boundary (Id : E) return B is
2439 begin
2440 pragma Assert (Is_Type (Id));
2441 return Flag183 (Id);
2442 end Must_Be_On_Byte_Boundary;
2444 function Must_Have_Preelab_Init (Id : E) return B is
2445 begin
2446 pragma Assert (Is_Type (Id));
2447 return Flag208 (Id);
2448 end Must_Have_Preelab_Init;
2450 function Needs_Debug_Info (Id : E) return B is
2451 begin
2452 return Flag147 (Id);
2453 end Needs_Debug_Info;
2455 function Needs_No_Actuals (Id : E) return B is
2456 begin
2457 pragma Assert
2458 (Is_Overloadable (Id)
2459 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2460 return Flag22 (Id);
2461 end Needs_No_Actuals;
2463 function Never_Set_In_Source (Id : E) return B is
2464 begin
2465 return Flag115 (Id);
2466 end Never_Set_In_Source;
2468 function Next_Inlined_Subprogram (Id : E) return E is
2469 begin
2470 return Node12 (Id);
2471 end Next_Inlined_Subprogram;
2473 function No_Pool_Assigned (Id : E) return B is
2474 begin
2475 pragma Assert (Is_Access_Type (Id));
2476 return Flag131 (Root_Type (Id));
2477 end No_Pool_Assigned;
2479 function No_Return (Id : E) return B is
2480 begin
2481 return Flag113 (Id);
2482 end No_Return;
2484 function No_Strict_Aliasing (Id : E) return B is
2485 begin
2486 pragma Assert (Is_Access_Type (Id));
2487 return Flag136 (Base_Type (Id));
2488 end No_Strict_Aliasing;
2490 function Non_Binary_Modulus (Id : E) return B is
2491 begin
2492 pragma Assert (Is_Type (Id));
2493 return Flag58 (Base_Type (Id));
2494 end Non_Binary_Modulus;
2496 function Non_Limited_View (Id : E) return E is
2497 begin
2498 pragma Assert (Ekind (Id) in Incomplete_Kind);
2499 return Node17 (Id);
2500 end Non_Limited_View;
2502 function Nonzero_Is_True (Id : E) return B is
2503 begin
2504 pragma Assert (Root_Type (Id) = Standard_Boolean);
2505 return Flag162 (Base_Type (Id));
2506 end Nonzero_Is_True;
2508 function Normalized_First_Bit (Id : E) return U is
2509 begin
2510 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2511 return Uint8 (Id);
2512 end Normalized_First_Bit;
2514 function Normalized_Position (Id : E) return U is
2515 begin
2516 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2517 return Uint14 (Id);
2518 end Normalized_Position;
2520 function Normalized_Position_Max (Id : E) return U is
2521 begin
2522 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2523 return Uint10 (Id);
2524 end Normalized_Position_Max;
2526 function OK_To_Rename (Id : E) return B is
2527 begin
2528 pragma Assert (Ekind (Id) = E_Variable);
2529 return Flag247 (Id);
2530 end OK_To_Rename;
2532 function OK_To_Reorder_Components (Id : E) return B is
2533 begin
2534 pragma Assert (Is_Record_Type (Id));
2535 return Flag239 (Base_Type (Id));
2536 end OK_To_Reorder_Components;
2538 function Optimize_Alignment_Space (Id : E) return B is
2539 begin
2540 pragma Assert
2541 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2542 return Flag241 (Id);
2543 end Optimize_Alignment_Space;
2545 function Optimize_Alignment_Time (Id : E) return B is
2546 begin
2547 pragma Assert
2548 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2549 return Flag242 (Id);
2550 end Optimize_Alignment_Time;
2552 function Original_Access_Type (Id : E) return E is
2553 begin
2554 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2555 return Node26 (Id);
2556 end Original_Access_Type;
2558 function Original_Array_Type (Id : E) return E is
2559 begin
2560 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2561 return Node21 (Id);
2562 end Original_Array_Type;
2564 function Original_Record_Component (Id : E) return E is
2565 begin
2566 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2567 return Node22 (Id);
2568 end Original_Record_Component;
2570 function Overlays_Constant (Id : E) return B is
2571 begin
2572 return Flag243 (Id);
2573 end Overlays_Constant;
2575 function Overridden_Operation (Id : E) return E is
2576 begin
2577 return Node26 (Id);
2578 end Overridden_Operation;
2580 function Package_Instantiation (Id : E) return N is
2581 begin
2582 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2583 return Node26 (Id);
2584 end Package_Instantiation;
2586 function Packed_Array_Type (Id : E) return E is
2587 begin
2588 pragma Assert (Is_Array_Type (Id));
2589 return Node23 (Id);
2590 end Packed_Array_Type;
2592 function Parent_Subtype (Id : E) return E is
2593 begin
2594 pragma Assert (Is_Record_Type (Id));
2595 return Node19 (Base_Type (Id));
2596 end Parent_Subtype;
2598 function Postcondition_Proc (Id : E) return E is
2599 begin
2600 pragma Assert (Ekind (Id) = E_Procedure);
2601 return Node8 (Id);
2602 end Postcondition_Proc;
2604 function PPC_Wrapper (Id : E) return E is
2605 begin
2606 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2607 return Node25 (Id);
2608 end PPC_Wrapper;
2610 function Prival (Id : E) return E is
2611 begin
2612 pragma Assert (Is_Protected_Component (Id));
2613 return Node17 (Id);
2614 end Prival;
2616 function Prival_Link (Id : E) return E is
2617 begin
2618 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2619 return Node20 (Id);
2620 end Prival_Link;
2622 function Private_Dependents (Id : E) return L is
2623 begin
2624 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2625 return Elist18 (Id);
2626 end Private_Dependents;
2628 function Private_View (Id : E) return N is
2629 begin
2630 pragma Assert (Is_Private_Type (Id));
2631 return Node22 (Id);
2632 end Private_View;
2634 function Protected_Body_Subprogram (Id : E) return E is
2635 begin
2636 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2637 return Node11 (Id);
2638 end Protected_Body_Subprogram;
2640 function Protected_Formal (Id : E) return E is
2641 begin
2642 pragma Assert (Is_Formal (Id));
2643 return Node22 (Id);
2644 end Protected_Formal;
2646 function Protection_Object (Id : E) return E is
2647 begin
2648 pragma Assert
2649 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2650 return Node23 (Id);
2651 end Protection_Object;
2653 function Reachable (Id : E) return B is
2654 begin
2655 return Flag49 (Id);
2656 end Reachable;
2658 function Referenced (Id : E) return B is
2659 begin
2660 return Flag156 (Id);
2661 end Referenced;
2663 function Referenced_As_LHS (Id : E) return B is
2664 begin
2665 return Flag36 (Id);
2666 end Referenced_As_LHS;
2668 function Referenced_As_Out_Parameter (Id : E) return B is
2669 begin
2670 return Flag227 (Id);
2671 end Referenced_As_Out_Parameter;
2673 function Refined_State (Id : E) return E is
2674 begin
2675 pragma Assert (Ekind (Id) = E_Abstract_State);
2676 return Node9 (Id);
2677 end Refined_State;
2679 function Register_Exception_Call (Id : E) return N is
2680 begin
2681 pragma Assert (Ekind (Id) = E_Exception);
2682 return Node20 (Id);
2683 end Register_Exception_Call;
2685 function Related_Array_Object (Id : E) return E is
2686 begin
2687 pragma Assert (Is_Array_Type (Id));
2688 return Node25 (Id);
2689 end Related_Array_Object;
2691 function Related_Expression (Id : E) return N is
2692 begin
2693 pragma Assert (Ekind (Id) in Type_Kind
2694 or else Ekind_In (Id, E_Constant, E_Variable));
2695 return Node24 (Id);
2696 end Related_Expression;
2698 function Related_Instance (Id : E) return E is
2699 begin
2700 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2701 return Node15 (Id);
2702 end Related_Instance;
2704 function Related_Type (Id : E) return E is
2705 begin
2706 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2707 return Node27 (Id);
2708 end Related_Type;
2710 function Relative_Deadline_Variable (Id : E) return E is
2711 begin
2712 pragma Assert (Is_Task_Type (Id));
2713 return Node26 (Implementation_Base_Type (Id));
2714 end Relative_Deadline_Variable;
2716 function Renamed_Entity (Id : E) return N is
2717 begin
2718 return Node18 (Id);
2719 end Renamed_Entity;
2721 function Renamed_In_Spec (Id : E) return B is
2722 begin
2723 pragma Assert (Ekind (Id) = E_Package);
2724 return Flag231 (Id);
2725 end Renamed_In_Spec;
2727 function Renamed_Object (Id : E) return N is
2728 begin
2729 return Node18 (Id);
2730 end Renamed_Object;
2732 function Renaming_Map (Id : E) return U is
2733 begin
2734 return Uint9 (Id);
2735 end Renaming_Map;
2737 function Requires_Overriding (Id : E) return B is
2738 begin
2739 pragma Assert (Is_Overloadable (Id));
2740 return Flag213 (Id);
2741 end Requires_Overriding;
2743 function Return_Present (Id : E) return B is
2744 begin
2745 return Flag54 (Id);
2746 end Return_Present;
2748 function Return_Applies_To (Id : E) return N is
2749 begin
2750 return Node8 (Id);
2751 end Return_Applies_To;
2753 function Returns_By_Ref (Id : E) return B is
2754 begin
2755 return Flag90 (Id);
2756 end Returns_By_Ref;
2758 function Reverse_Bit_Order (Id : E) return B is
2759 begin
2760 pragma Assert (Is_Record_Type (Id));
2761 return Flag164 (Base_Type (Id));
2762 end Reverse_Bit_Order;
2764 function Reverse_Storage_Order (Id : E) return B is
2765 begin
2766 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2767 return Flag93 (Base_Type (Id));
2768 end Reverse_Storage_Order;
2770 function RM_Size (Id : E) return U is
2771 begin
2772 pragma Assert (Is_Type (Id));
2773 return Uint13 (Id);
2774 end RM_Size;
2776 function Scalar_Range (Id : E) return N is
2777 begin
2778 return Node20 (Id);
2779 end Scalar_Range;
2781 function Scale_Value (Id : E) return U is
2782 begin
2783 return Uint15 (Id);
2784 end Scale_Value;
2786 function Scope_Depth_Value (Id : E) return U is
2787 begin
2788 return Uint22 (Id);
2789 end Scope_Depth_Value;
2791 function Sec_Stack_Needed_For_Return (Id : E) return B is
2792 begin
2793 return Flag167 (Id);
2794 end Sec_Stack_Needed_For_Return;
2796 function Shadow_Entities (Id : E) return S is
2797 begin
2798 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2799 return List14 (Id);
2800 end Shadow_Entities;
2802 function Shared_Var_Procs_Instance (Id : E) return E is
2803 begin
2804 pragma Assert (Ekind (Id) = E_Variable);
2805 return Node22 (Id);
2806 end Shared_Var_Procs_Instance;
2808 function Size_Check_Code (Id : E) return N is
2809 begin
2810 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2811 return Node19 (Id);
2812 end Size_Check_Code;
2814 function Size_Depends_On_Discriminant (Id : E) return B is
2815 begin
2816 return Flag177 (Id);
2817 end Size_Depends_On_Discriminant;
2819 function Size_Known_At_Compile_Time (Id : E) return B is
2820 begin
2821 return Flag92 (Id);
2822 end Size_Known_At_Compile_Time;
2824 function Small_Value (Id : E) return R is
2825 begin
2826 pragma Assert (Is_Fixed_Point_Type (Id));
2827 return Ureal21 (Id);
2828 end Small_Value;
2830 function Spec_Entity (Id : E) return E is
2831 begin
2832 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2833 return Node19 (Id);
2834 end Spec_Entity;
2836 function Static_Predicate (Id : E) return S is
2837 begin
2838 pragma Assert (Is_Discrete_Type (Id));
2839 return List25 (Id);
2840 end Static_Predicate;
2842 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2843 begin
2844 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2845 return Node15 (Id);
2846 end Status_Flag_Or_Transient_Decl;
2848 function Storage_Size_Variable (Id : E) return E is
2849 begin
2850 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2851 return Node15 (Implementation_Base_Type (Id));
2852 end Storage_Size_Variable;
2854 function Static_Elaboration_Desired (Id : E) return B is
2855 begin
2856 pragma Assert (Ekind (Id) = E_Package);
2857 return Flag77 (Id);
2858 end Static_Elaboration_Desired;
2860 function Static_Initialization (Id : E) return N is
2861 begin
2862 pragma Assert
2863 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2864 return Node30 (Id);
2865 end Static_Initialization;
2867 function Stored_Constraint (Id : E) return L is
2868 begin
2869 pragma Assert
2870 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2871 return Elist23 (Id);
2872 end Stored_Constraint;
2874 function Strict_Alignment (Id : E) return B is
2875 begin
2876 return Flag145 (Implementation_Base_Type (Id));
2877 end Strict_Alignment;
2879 function String_Literal_Length (Id : E) return U is
2880 begin
2881 return Uint16 (Id);
2882 end String_Literal_Length;
2884 function String_Literal_Low_Bound (Id : E) return N is
2885 begin
2886 return Node15 (Id);
2887 end String_Literal_Low_Bound;
2889 function Subprograms_For_Type (Id : E) return E is
2890 begin
2891 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2892 return Node29 (Id);
2893 end Subprograms_For_Type;
2895 function Suppress_Elaboration_Warnings (Id : E) return B is
2896 begin
2897 return Flag148 (Id);
2898 end Suppress_Elaboration_Warnings;
2900 function Suppress_Initialization (Id : E) return B is
2901 begin
2902 pragma Assert (Is_Type (Id));
2903 return Flag105 (Id);
2904 end Suppress_Initialization;
2906 function Suppress_Style_Checks (Id : E) return B is
2907 begin
2908 return Flag165 (Id);
2909 end Suppress_Style_Checks;
2911 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2912 begin
2913 return Flag217 (Id);
2914 end Suppress_Value_Tracking_On_Call;
2916 function Task_Body_Procedure (Id : E) return N is
2917 begin
2918 pragma Assert (Ekind (Id) in Task_Kind);
2919 return Node25 (Id);
2920 end Task_Body_Procedure;
2922 function Treat_As_Volatile (Id : E) return B is
2923 begin
2924 return Flag41 (Id);
2925 end Treat_As_Volatile;
2927 function Underlying_Full_View (Id : E) return E is
2928 begin
2929 pragma Assert (Ekind (Id) in Private_Kind);
2930 return Node19 (Id);
2931 end Underlying_Full_View;
2933 function Underlying_Record_View (Id : E) return E is
2934 begin
2935 return Node28 (Id);
2936 end Underlying_Record_View;
2938 function Universal_Aliasing (Id : E) return B is
2939 begin
2940 pragma Assert (Is_Type (Id));
2941 return Flag216 (Implementation_Base_Type (Id));
2942 end Universal_Aliasing;
2944 function Unset_Reference (Id : E) return N is
2945 begin
2946 return Node16 (Id);
2947 end Unset_Reference;
2949 function Used_As_Generic_Actual (Id : E) return B is
2950 begin
2951 return Flag222 (Id);
2952 end Used_As_Generic_Actual;
2954 function Uses_Lock_Free (Id : E) return B is
2955 begin
2956 pragma Assert (Is_Protected_Type (Id));
2957 return Flag188 (Id);
2958 end Uses_Lock_Free;
2960 function Uses_Sec_Stack (Id : E) return B is
2961 begin
2962 return Flag95 (Id);
2963 end Uses_Sec_Stack;
2965 function Warnings_Off (Id : E) return B is
2966 begin
2967 return Flag96 (Id);
2968 end Warnings_Off;
2970 function Warnings_Off_Used (Id : E) return B is
2971 begin
2972 return Flag236 (Id);
2973 end Warnings_Off_Used;
2975 function Warnings_Off_Used_Unmodified (Id : E) return B is
2976 begin
2977 return Flag237 (Id);
2978 end Warnings_Off_Used_Unmodified;
2980 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2981 begin
2982 return Flag238 (Id);
2983 end Warnings_Off_Used_Unreferenced;
2985 function Wrapped_Entity (Id : E) return E is
2986 begin
2987 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2988 and then Is_Primitive_Wrapper (Id));
2989 return Node27 (Id);
2990 end Wrapped_Entity;
2992 function Was_Hidden (Id : E) return B is
2993 begin
2994 return Flag196 (Id);
2995 end Was_Hidden;
2997 ------------------------------
2998 -- Classification Functions --
2999 ------------------------------
3001 function Is_Access_Type (Id : E) return B is
3002 begin
3003 return Ekind (Id) in Access_Kind;
3004 end Is_Access_Type;
3006 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3007 begin
3008 return Ekind (Id) in Access_Protected_Kind;
3009 end Is_Access_Protected_Subprogram_Type;
3011 function Is_Access_Subprogram_Type (Id : E) return B is
3012 begin
3013 return Ekind (Id) in Access_Subprogram_Kind;
3014 end Is_Access_Subprogram_Type;
3016 function Is_Aggregate_Type (Id : E) return B is
3017 begin
3018 return Ekind (Id) in Aggregate_Kind;
3019 end Is_Aggregate_Type;
3021 function Is_Array_Type (Id : E) return B is
3022 begin
3023 return Ekind (Id) in Array_Kind;
3024 end Is_Array_Type;
3026 function Is_Assignable (Id : E) return B is
3027 begin
3028 return Ekind (Id) in Assignable_Kind;
3029 end Is_Assignable;
3031 function Is_Class_Wide_Type (Id : E) return B is
3032 begin
3033 return Ekind (Id) in Class_Wide_Kind;
3034 end Is_Class_Wide_Type;
3036 function Is_Composite_Type (Id : E) return B is
3037 begin
3038 return Ekind (Id) in Composite_Kind;
3039 end Is_Composite_Type;
3041 function Is_Concurrent_Body (Id : E) return B is
3042 begin
3043 return Ekind (Id) in
3044 Concurrent_Body_Kind;
3045 end Is_Concurrent_Body;
3047 function Is_Concurrent_Record_Type (Id : E) return B is
3048 begin
3049 return Flag20 (Id);
3050 end Is_Concurrent_Record_Type;
3052 function Is_Concurrent_Type (Id : E) return B is
3053 begin
3054 return Ekind (Id) in Concurrent_Kind;
3055 end Is_Concurrent_Type;
3057 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3058 begin
3059 return Ekind (Id) in
3060 Decimal_Fixed_Point_Kind;
3061 end Is_Decimal_Fixed_Point_Type;
3063 function Is_Digits_Type (Id : E) return B is
3064 begin
3065 return Ekind (Id) in Digits_Kind;
3066 end Is_Digits_Type;
3068 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3069 begin
3070 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3071 end Is_Discrete_Or_Fixed_Point_Type;
3073 function Is_Discrete_Type (Id : E) return B is
3074 begin
3075 return Ekind (Id) in Discrete_Kind;
3076 end Is_Discrete_Type;
3078 function Is_Elementary_Type (Id : E) return B is
3079 begin
3080 return Ekind (Id) in Elementary_Kind;
3081 end Is_Elementary_Type;
3083 function Is_Entry (Id : E) return B is
3084 begin
3085 return Ekind (Id) in Entry_Kind;
3086 end Is_Entry;
3088 function Is_Enumeration_Type (Id : E) return B is
3089 begin
3090 return Ekind (Id) in
3091 Enumeration_Kind;
3092 end Is_Enumeration_Type;
3094 function Is_Fixed_Point_Type (Id : E) return B is
3095 begin
3096 return Ekind (Id) in
3097 Fixed_Point_Kind;
3098 end Is_Fixed_Point_Type;
3100 function Is_Floating_Point_Type (Id : E) return B is
3101 begin
3102 return Ekind (Id) in Float_Kind;
3103 end Is_Floating_Point_Type;
3105 function Is_Formal (Id : E) return B is
3106 begin
3107 return Ekind (Id) in Formal_Kind;
3108 end Is_Formal;
3110 function Is_Formal_Object (Id : E) return B is
3111 begin
3112 return Ekind (Id) in Formal_Object_Kind;
3113 end Is_Formal_Object;
3115 function Is_Generic_Subprogram (Id : E) return B is
3116 begin
3117 return Ekind (Id) in Generic_Subprogram_Kind;
3118 end Is_Generic_Subprogram;
3120 function Is_Generic_Unit (Id : E) return B is
3121 begin
3122 return Ekind (Id) in Generic_Unit_Kind;
3123 end Is_Generic_Unit;
3125 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3126 begin
3127 return Ekind (Id) in
3128 Incomplete_Or_Private_Kind;
3129 end Is_Incomplete_Or_Private_Type;
3131 function Is_Incomplete_Type (Id : E) return B is
3132 begin
3133 return Ekind (Id) in
3134 Incomplete_Kind;
3135 end Is_Incomplete_Type;
3137 function Is_Integer_Type (Id : E) return B is
3138 begin
3139 return Ekind (Id) in Integer_Kind;
3140 end Is_Integer_Type;
3142 function Is_Modular_Integer_Type (Id : E) return B is
3143 begin
3144 return Ekind (Id) in
3145 Modular_Integer_Kind;
3146 end Is_Modular_Integer_Type;
3148 function Is_Named_Number (Id : E) return B is
3149 begin
3150 return Ekind (Id) in Named_Kind;
3151 end Is_Named_Number;
3153 function Is_Numeric_Type (Id : E) return B is
3154 begin
3155 return Ekind (Id) in Numeric_Kind;
3156 end Is_Numeric_Type;
3158 function Is_Object (Id : E) return B is
3159 begin
3160 return Ekind (Id) in Object_Kind;
3161 end Is_Object;
3163 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3164 begin
3165 return Ekind (Id) in
3166 Ordinary_Fixed_Point_Kind;
3167 end Is_Ordinary_Fixed_Point_Type;
3169 function Is_Overloadable (Id : E) return B is
3170 begin
3171 return Ekind (Id) in Overloadable_Kind;
3172 end Is_Overloadable;
3174 function Is_Private_Type (Id : E) return B is
3175 begin
3176 return Ekind (Id) in Private_Kind;
3177 end Is_Private_Type;
3179 function Is_Protected_Type (Id : E) return B is
3180 begin
3181 return Ekind (Id) in Protected_Kind;
3182 end Is_Protected_Type;
3184 function Is_Real_Type (Id : E) return B is
3185 begin
3186 return Ekind (Id) in Real_Kind;
3187 end Is_Real_Type;
3189 function Is_Record_Type (Id : E) return B is
3190 begin
3191 return Ekind (Id) in Record_Kind;
3192 end Is_Record_Type;
3194 function Is_Scalar_Type (Id : E) return B is
3195 begin
3196 return Ekind (Id) in Scalar_Kind;
3197 end Is_Scalar_Type;
3199 function Is_Signed_Integer_Type (Id : E) return B is
3200 begin
3201 return Ekind (Id) in Signed_Integer_Kind;
3202 end Is_Signed_Integer_Type;
3204 function Is_Subprogram (Id : E) return B is
3205 begin
3206 return Ekind (Id) in Subprogram_Kind;
3207 end Is_Subprogram;
3209 function Is_Task_Type (Id : E) return B is
3210 begin
3211 return Ekind (Id) in Task_Kind;
3212 end Is_Task_Type;
3214 function Is_Type (Id : E) return B is
3215 begin
3216 return Ekind (Id) in Type_Kind;
3217 end Is_Type;
3219 ------------------------------
3220 -- Attribute Set Procedures --
3221 ------------------------------
3223 -- Note: in many of these set procedures an "obvious" assertion is missing.
3224 -- The reason for this is that in many cases, a field is set before the
3225 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3226 -- it is possible to add assertions that specifically include the E_Void
3227 -- possibility, but in some cases, we just omit the assertions.
3229 procedure Set_Abstract_States (Id : E; V : L) is
3230 begin
3231 pragma Assert (Ekind (Id) = E_Package);
3232 Set_Elist25 (Id, V);
3233 end Set_Abstract_States;
3235 procedure Set_Accept_Address (Id : E; V : L) is
3236 begin
3237 Set_Elist21 (Id, V);
3238 end Set_Accept_Address;
3240 procedure Set_Access_Disp_Table (Id : E; V : L) is
3241 begin
3242 pragma Assert (Ekind (Id) = E_Record_Type
3243 and then Id = Implementation_Base_Type (Id));
3244 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3245 Set_Elist16 (Id, V);
3246 end Set_Access_Disp_Table;
3248 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3249 begin
3250 Set_Node12 (Id, V);
3251 end Set_Associated_Formal_Package;
3253 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3254 begin
3255 Set_Node8 (Id, V);
3256 end Set_Associated_Node_For_Itype;
3258 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3259 begin
3260 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3261 Set_Node22 (Id, V);
3262 end Set_Associated_Storage_Pool;
3264 procedure Set_Actual_Subtype (Id : E; V : E) is
3265 begin
3266 pragma Assert
3267 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3268 or else Is_Formal (Id));
3269 Set_Node17 (Id, V);
3270 end Set_Actual_Subtype;
3272 procedure Set_Address_Taken (Id : E; V : B := True) is
3273 begin
3274 Set_Flag104 (Id, V);
3275 end Set_Address_Taken;
3277 procedure Set_Alias (Id : E; V : E) is
3278 begin
3279 pragma Assert
3280 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3281 Set_Node18 (Id, V);
3282 end Set_Alias;
3284 procedure Set_Alignment (Id : E; V : U) is
3285 begin
3286 pragma Assert (Is_Type (Id)
3287 or else Is_Formal (Id)
3288 or else Ekind_In (Id, E_Loop_Parameter,
3289 E_Constant,
3290 E_Exception,
3291 E_Variable));
3292 Set_Uint14 (Id, V);
3293 end Set_Alignment;
3295 procedure Set_Barrier_Function (Id : E; V : N) is
3296 begin
3297 pragma Assert (Is_Entry (Id));
3298 Set_Node12 (Id, V);
3299 end Set_Barrier_Function;
3301 procedure Set_Block_Node (Id : E; V : N) is
3302 begin
3303 pragma Assert (Ekind (Id) = E_Block);
3304 Set_Node11 (Id, V);
3305 end Set_Block_Node;
3307 procedure Set_Body_Entity (Id : E; V : E) is
3308 begin
3309 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3310 Set_Node19 (Id, V);
3311 end Set_Body_Entity;
3313 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3314 begin
3315 pragma Assert
3316 (Ekind (Id) = E_Package
3317 or else Is_Subprogram (Id)
3318 or else Is_Generic_Unit (Id));
3319 Set_Flag40 (Id, V);
3320 end Set_Body_Needed_For_SAL;
3322 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3323 begin
3324 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3325 Set_Flag125 (Id, V);
3326 end Set_C_Pass_By_Copy;
3328 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3329 begin
3330 Set_Flag38 (Id, V);
3331 end Set_Can_Never_Be_Null;
3333 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3334 begin
3335 Set_Flag31 (Id, V);
3336 end Set_Checks_May_Be_Suppressed;
3338 procedure Set_Class_Wide_Type (Id : E; V : E) is
3339 begin
3340 pragma Assert (Is_Type (Id));
3341 Set_Node9 (Id, V);
3342 end Set_Class_Wide_Type;
3344 procedure Set_Cloned_Subtype (Id : E; V : E) is
3345 begin
3346 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3347 Set_Node16 (Id, V);
3348 end Set_Cloned_Subtype;
3350 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3351 begin
3352 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3353 Set_Uint11 (Id, V);
3354 end Set_Component_Bit_Offset;
3356 procedure Set_Component_Clause (Id : E; V : N) is
3357 begin
3358 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3359 Set_Node13 (Id, V);
3360 end Set_Component_Clause;
3362 procedure Set_Component_Size (Id : E; V : U) is
3363 begin
3364 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3365 Set_Uint22 (Id, V);
3366 end Set_Component_Size;
3368 procedure Set_Component_Type (Id : E; V : E) is
3369 begin
3370 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3371 Set_Node20 (Id, V);
3372 end Set_Component_Type;
3374 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3375 begin
3376 pragma Assert
3377 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3378 Set_Node18 (Id, V);
3379 end Set_Corresponding_Concurrent_Type;
3381 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3382 begin
3383 pragma Assert (Ekind (Id) = E_Discriminant);
3384 Set_Node19 (Id, V);
3385 end Set_Corresponding_Discriminant;
3387 procedure Set_Corresponding_Equality (Id : E; V : E) is
3388 begin
3389 pragma Assert
3390 (Ekind (Id) = E_Function
3391 and then not Comes_From_Source (Id)
3392 and then Chars (Id) = Name_Op_Ne);
3393 Set_Node30 (Id, V);
3394 end Set_Corresponding_Equality;
3396 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3397 begin
3398 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3399 Set_Node18 (Id, V);
3400 end Set_Corresponding_Protected_Entry;
3402 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3403 begin
3404 pragma Assert (Is_Concurrent_Type (Id));
3405 Set_Node18 (Id, V);
3406 end Set_Corresponding_Record_Type;
3408 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3409 begin
3410 Set_Node22 (Id, V);
3411 end Set_Corresponding_Remote_Type;
3413 procedure Set_Current_Use_Clause (Id : E; V : E) is
3414 begin
3415 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3416 Set_Node27 (Id, V);
3417 end Set_Current_Use_Clause;
3419 procedure Set_Current_Value (Id : E; V : N) is
3420 begin
3421 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3422 Set_Node9 (Id, V);
3423 end Set_Current_Value;
3425 procedure Set_CR_Discriminant (Id : E; V : E) is
3426 begin
3427 Set_Node23 (Id, V);
3428 end Set_CR_Discriminant;
3430 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3431 begin
3432 Set_Flag166 (Id, V);
3433 end Set_Debug_Info_Off;
3435 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3436 begin
3437 Set_Node25 (Id, V);
3438 end Set_Debug_Renaming_Link;
3440 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3441 begin
3442 pragma Assert (Is_Array_Type (Id));
3443 Set_Node19 (Id, V);
3444 end Set_Default_Aspect_Component_Value;
3446 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3447 begin
3448 pragma Assert (Is_Scalar_Type (Id));
3449 Set_Node19 (Id, V);
3450 end Set_Default_Aspect_Value;
3452 procedure Set_Default_Expr_Function (Id : E; V : E) is
3453 begin
3454 pragma Assert (Is_Formal (Id));
3455 Set_Node21 (Id, V);
3456 end Set_Default_Expr_Function;
3458 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3459 begin
3460 Set_Flag108 (Id, V);
3461 end Set_Default_Expressions_Processed;
3463 procedure Set_Default_Value (Id : E; V : N) is
3464 begin
3465 pragma Assert (Is_Formal (Id));
3466 Set_Node20 (Id, V);
3467 end Set_Default_Value;
3469 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3470 begin
3471 pragma Assert
3472 (Is_Subprogram (Id)
3473 or else Is_Task_Type (Id)
3474 or else Ekind (Id) = E_Block);
3475 Set_Flag114 (Id, V);
3476 end Set_Delay_Cleanups;
3478 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3479 begin
3480 pragma Assert
3481 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3483 Set_Flag50 (Id, V);
3484 end Set_Delay_Subprogram_Descriptors;
3486 procedure Set_Delta_Value (Id : E; V : R) is
3487 begin
3488 pragma Assert (Is_Fixed_Point_Type (Id));
3489 Set_Ureal18 (Id, V);
3490 end Set_Delta_Value;
3492 procedure Set_Dependent_Instances (Id : E; V : L) is
3493 begin
3494 pragma Assert (Is_Generic_Instance (Id));
3495 Set_Elist8 (Id, V);
3496 end Set_Dependent_Instances;
3498 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3499 begin
3500 pragma Assert (Nkind (Id) in N_Entity);
3501 Set_Flag14 (Id, V);
3502 end Set_Depends_On_Private;
3504 procedure Set_Digits_Value (Id : E; V : U) is
3505 begin
3506 pragma Assert
3507 (Is_Floating_Point_Type (Id)
3508 or else Is_Decimal_Fixed_Point_Type (Id));
3509 Set_Uint17 (Id, V);
3510 end Set_Digits_Value;
3512 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3513 begin
3514 Set_Node20 (Id, V);
3515 end Set_Directly_Designated_Type;
3517 procedure Set_Discard_Names (Id : E; V : B := True) is
3518 begin
3519 Set_Flag88 (Id, V);
3520 end Set_Discard_Names;
3522 procedure Set_Discriminal (Id : E; V : E) is
3523 begin
3524 pragma Assert (Ekind (Id) = E_Discriminant);
3525 Set_Node17 (Id, V);
3526 end Set_Discriminal;
3528 procedure Set_Discriminal_Link (Id : E; V : E) is
3529 begin
3530 Set_Node10 (Id, V);
3531 end Set_Discriminal_Link;
3533 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3534 begin
3535 pragma Assert (Ekind (Id) = E_Component);
3536 Set_Node20 (Id, V);
3537 end Set_Discriminant_Checking_Func;
3539 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3540 begin
3541 pragma Assert (Nkind (Id) in N_Entity);
3542 Set_Elist21 (Id, V);
3543 end Set_Discriminant_Constraint;
3545 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3546 begin
3547 Set_Node20 (Id, V);
3548 end Set_Discriminant_Default_Value;
3550 procedure Set_Discriminant_Number (Id : E; V : U) is
3551 begin
3552 Set_Uint15 (Id, V);
3553 end Set_Discriminant_Number;
3555 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3556 begin
3557 pragma Assert (Ekind (Id) = E_Record_Type
3558 and then Id = Implementation_Base_Type (Id));
3559 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3560 Set_Elist26 (Id, V);
3561 end Set_Dispatch_Table_Wrappers;
3563 procedure Set_DT_Entry_Count (Id : E; V : U) is
3564 begin
3565 pragma Assert (Ekind (Id) = E_Component);
3566 Set_Uint15 (Id, V);
3567 end Set_DT_Entry_Count;
3569 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3570 begin
3571 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3572 Set_Node25 (Id, V);
3573 end Set_DT_Offset_To_Top_Func;
3575 procedure Set_DT_Position (Id : E; V : U) is
3576 begin
3577 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3578 Set_Uint15 (Id, V);
3579 end Set_DT_Position;
3581 procedure Set_DTC_Entity (Id : E; V : E) is
3582 begin
3583 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3584 Set_Node16 (Id, V);
3585 end Set_DTC_Entity;
3587 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3588 begin
3589 pragma Assert (Ekind (Id) = E_Package);
3590 Set_Flag210 (Id, V);
3591 end Set_Elaborate_Body_Desirable;
3593 procedure Set_Elaboration_Entity (Id : E; V : E) is
3594 begin
3595 pragma Assert
3596 (Is_Subprogram (Id)
3597 or else
3598 Ekind (Id) = E_Package
3599 or else
3600 Is_Generic_Unit (Id));
3601 Set_Node13 (Id, V);
3602 end Set_Elaboration_Entity;
3604 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3605 begin
3606 pragma Assert
3607 (Is_Subprogram (Id)
3608 or else
3609 Ekind (Id) = E_Package
3610 or else
3611 Is_Generic_Unit (Id));
3612 Set_Flag174 (Id, V);
3613 end Set_Elaboration_Entity_Required;
3615 procedure Set_Enclosing_Scope (Id : E; V : E) is
3616 begin
3617 Set_Node18 (Id, V);
3618 end Set_Enclosing_Scope;
3620 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3621 begin
3622 pragma Assert (Is_Entry (Id));
3623 Set_Flag152 (Id, V);
3624 end Set_Entry_Accepted;
3626 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3627 begin
3628 Set_Node15 (Id, V);
3629 end Set_Entry_Bodies_Array;
3631 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3632 begin
3633 Set_Node23 (Id, V);
3634 end Set_Entry_Cancel_Parameter;
3636 procedure Set_Entry_Component (Id : E; V : E) is
3637 begin
3638 Set_Node11 (Id, V);
3639 end Set_Entry_Component;
3641 procedure Set_Entry_Formal (Id : E; V : E) is
3642 begin
3643 Set_Node16 (Id, V);
3644 end Set_Entry_Formal;
3646 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3647 begin
3648 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3649 Set_Node18 (Id, V);
3650 end Set_Entry_Index_Constant;
3652 procedure Set_Contract (Id : E; V : N) is
3653 begin
3654 pragma Assert
3655 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3656 or else Is_Subprogram (Id)
3657 or else Is_Generic_Subprogram (Id));
3658 Set_Node24 (Id, V);
3659 end Set_Contract;
3661 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3662 begin
3663 Set_Node15 (Id, V);
3664 end Set_Entry_Parameters_Type;
3666 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3667 begin
3668 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3669 Set_Node23 (Id, V);
3670 end Set_Enum_Pos_To_Rep;
3672 procedure Set_Enumeration_Pos (Id : E; V : U) is
3673 begin
3674 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3675 Set_Uint11 (Id, V);
3676 end Set_Enumeration_Pos;
3678 procedure Set_Enumeration_Rep (Id : E; V : U) is
3679 begin
3680 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3681 Set_Uint12 (Id, V);
3682 end Set_Enumeration_Rep;
3684 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3685 begin
3686 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3687 Set_Node22 (Id, V);
3688 end Set_Enumeration_Rep_Expr;
3690 procedure Set_Equivalent_Type (Id : E; V : E) is
3691 begin
3692 pragma Assert
3693 (Ekind_In (Id, E_Class_Wide_Type,
3694 E_Class_Wide_Subtype,
3695 E_Access_Protected_Subprogram_Type,
3696 E_Anonymous_Access_Protected_Subprogram_Type,
3697 E_Access_Subprogram_Type,
3698 E_Exception_Type));
3699 Set_Node18 (Id, V);
3700 end Set_Equivalent_Type;
3702 procedure Set_Esize (Id : E; V : U) is
3703 begin
3704 Set_Uint12 (Id, V);
3705 end Set_Esize;
3707 procedure Set_Exception_Code (Id : E; V : U) is
3708 begin
3709 pragma Assert (Ekind (Id) = E_Exception);
3710 Set_Uint22 (Id, V);
3711 end Set_Exception_Code;
3713 procedure Set_Extra_Accessibility (Id : E; V : E) is
3714 begin
3715 pragma Assert
3716 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3717 Set_Node13 (Id, V);
3718 end Set_Extra_Accessibility;
3720 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3721 begin
3722 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3723 Set_Node19 (Id, V);
3724 end Set_Extra_Accessibility_Of_Result;
3726 procedure Set_Extra_Constrained (Id : E; V : E) is
3727 begin
3728 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3729 Set_Node23 (Id, V);
3730 end Set_Extra_Constrained;
3732 procedure Set_Extra_Formal (Id : E; V : E) is
3733 begin
3734 Set_Node15 (Id, V);
3735 end Set_Extra_Formal;
3737 procedure Set_Extra_Formals (Id : E; V : E) is
3738 begin
3739 pragma Assert
3740 (Is_Overloadable (Id)
3741 or else Ekind_In (Id, E_Entry_Family,
3742 E_Subprogram_Body,
3743 E_Subprogram_Type));
3744 Set_Node28 (Id, V);
3745 end Set_Extra_Formals;
3747 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3748 begin
3749 pragma Assert
3750 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3751 Set_Flag229 (Id, V);
3752 end Set_Can_Use_Internal_Rep;
3754 procedure Set_Finalization_Master (Id : E; V : E) is
3755 begin
3756 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3757 Set_Node23 (Id, V);
3758 end Set_Finalization_Master;
3760 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3761 begin
3762 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3763 Set_Flag158 (Id, V);
3764 end Set_Finalize_Storage_Only;
3766 procedure Set_Finalizer (Id : E; V : E) is
3767 begin
3768 pragma Assert
3769 (Ekind (Id) = E_Package
3770 or else Ekind (Id) = E_Package_Body);
3771 Set_Node24 (Id, V);
3772 end Set_Finalizer;
3774 procedure Set_First_Entity (Id : E; V : E) is
3775 begin
3776 Set_Node17 (Id, V);
3777 end Set_First_Entity;
3779 procedure Set_First_Exit_Statement (Id : E; V : N) is
3780 begin
3781 pragma Assert (Ekind (Id) = E_Loop);
3782 Set_Node8 (Id, V);
3783 end Set_First_Exit_Statement;
3785 procedure Set_First_Index (Id : E; V : N) is
3786 begin
3787 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3788 Set_Node17 (Id, V);
3789 end Set_First_Index;
3791 procedure Set_First_Literal (Id : E; V : E) is
3792 begin
3793 pragma Assert (Is_Enumeration_Type (Id));
3794 Set_Node17 (Id, V);
3795 end Set_First_Literal;
3797 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3798 begin
3799 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3800 Set_Node14 (Id, V);
3801 end Set_First_Optional_Parameter;
3803 procedure Set_First_Private_Entity (Id : E; V : E) is
3804 begin
3805 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3806 or else Ekind (Id) in Concurrent_Kind);
3807 Set_Node16 (Id, V);
3808 end Set_First_Private_Entity;
3810 procedure Set_First_Rep_Item (Id : E; V : N) is
3811 begin
3812 Set_Node6 (Id, V);
3813 end Set_First_Rep_Item;
3815 procedure Set_Float_Rep (Id : E; V : F) is
3816 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3817 begin
3818 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3819 end Set_Float_Rep;
3821 procedure Set_Freeze_Node (Id : E; V : N) is
3822 begin
3823 Set_Node7 (Id, V);
3824 end Set_Freeze_Node;
3826 procedure Set_From_With_Type (Id : E; V : B := True) is
3827 begin
3828 pragma Assert
3829 (Is_Type (Id)
3830 or else Ekind (Id) = E_Package);
3831 Set_Flag159 (Id, V);
3832 end Set_From_With_Type;
3834 procedure Set_Full_View (Id : E; V : E) is
3835 begin
3836 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3837 Set_Node11 (Id, V);
3838 end Set_Full_View;
3840 procedure Set_Generic_Homonym (Id : E; V : E) is
3841 begin
3842 Set_Node11 (Id, V);
3843 end Set_Generic_Homonym;
3845 procedure Set_Generic_Renamings (Id : E; V : L) is
3846 begin
3847 Set_Elist23 (Id, V);
3848 end Set_Generic_Renamings;
3850 procedure Set_Handler_Records (Id : E; V : S) is
3851 begin
3852 Set_List10 (Id, V);
3853 end Set_Handler_Records;
3855 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3856 begin
3857 pragma Assert (Id = Base_Type (Id));
3858 Set_Flag135 (Id, V);
3859 end Set_Has_Aliased_Components;
3861 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3862 begin
3863 Set_Flag46 (Id, V);
3864 end Set_Has_Alignment_Clause;
3866 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3867 begin
3868 Set_Flag79 (Id, V);
3869 end Set_Has_All_Calls_Remote;
3871 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3872 begin
3873 pragma Assert
3874 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3875 Set_Flag253 (Id, V);
3876 end Set_Has_Anonymous_Master;
3878 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3879 begin
3880 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3881 Set_Flag86 (Id, V);
3882 end Set_Has_Atomic_Components;
3884 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3885 begin
3886 pragma Assert
3887 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3888 Set_Flag139 (Id, V);
3889 end Set_Has_Biased_Representation;
3891 procedure Set_Has_Completion (Id : E; V : B := True) is
3892 begin
3893 Set_Flag26 (Id, V);
3894 end Set_Has_Completion;
3896 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3897 begin
3898 pragma Assert (Is_Type (Id));
3899 Set_Flag71 (Id, V);
3900 end Set_Has_Completion_In_Body;
3902 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3903 begin
3904 pragma Assert (Ekind (Id) = E_Record_Type);
3905 Set_Flag140 (Id, V);
3906 end Set_Has_Complex_Representation;
3908 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3909 begin
3910 pragma Assert (Ekind (Id) = E_Array_Type);
3911 Set_Flag68 (Id, V);
3912 end Set_Has_Component_Size_Clause;
3914 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3915 begin
3916 pragma Assert (Is_Type (Id));
3917 Set_Flag187 (Id, V);
3918 end Set_Has_Constrained_Partial_View;
3920 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3921 begin
3922 Set_Flag181 (Id, V);
3923 end Set_Has_Contiguous_Rep;
3925 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3926 begin
3927 pragma Assert (Id = Base_Type (Id));
3928 Set_Flag43 (Id, V);
3929 end Set_Has_Controlled_Component;
3931 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3932 begin
3933 Set_Flag98 (Id, V);
3934 end Set_Has_Controlling_Result;
3936 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3937 begin
3938 Set_Flag119 (Id, V);
3939 end Set_Has_Convention_Pragma;
3941 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3942 begin
3943 pragma Assert
3944 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3945 and then Is_Base_Type (Id));
3946 Set_Flag39 (Id, V);
3947 end Set_Has_Default_Aspect;
3949 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3950 begin
3951 pragma Assert (Nkind (Id) in N_Entity);
3952 Set_Flag200 (Id, V);
3953 end Set_Has_Delayed_Aspects;
3955 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3956 begin
3957 pragma Assert (Nkind (Id) in N_Entity);
3958 Set_Flag18 (Id, V);
3959 end Set_Has_Delayed_Freeze;
3961 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3962 begin
3963 pragma Assert (Nkind (Id) in N_Entity);
3964 Set_Flag5 (Id, V);
3965 end Set_Has_Discriminants;
3967 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3968 begin
3969 pragma Assert (Ekind (Id) = E_Record_Type
3970 and then Is_Tagged_Type (Id));
3971 Set_Flag220 (Id, V);
3972 end Set_Has_Dispatch_Table;
3974 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3975 begin
3976 pragma Assert (Is_Enumeration_Type (Id));
3977 Set_Flag66 (Id, V);
3978 end Set_Has_Enumeration_Rep_Clause;
3980 procedure Set_Has_Exit (Id : E; V : B := True) is
3981 begin
3982 Set_Flag47 (Id, V);
3983 end Set_Has_Exit;
3985 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3986 begin
3987 pragma Assert (Is_Tagged_Type (Id));
3988 Set_Flag110 (Id, V);
3989 end Set_Has_External_Tag_Rep_Clause;
3991 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3992 begin
3993 Set_Flag175 (Id, V);
3994 end Set_Has_Forward_Instantiation;
3996 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3997 begin
3998 Set_Flag173 (Id, V);
3999 end Set_Has_Fully_Qualified_Name;
4001 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4002 begin
4003 Set_Flag82 (Id, V);
4004 end Set_Has_Gigi_Rep_Item;
4006 procedure Set_Has_Homonym (Id : E; V : B := True) is
4007 begin
4008 Set_Flag56 (Id, V);
4009 end Set_Has_Homonym;
4011 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4012 begin
4013 Set_Flag251 (Id, V);
4014 end Set_Has_Implicit_Dereference;
4016 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4017 begin
4018 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4019 Set_Flag34 (Id, V);
4020 end Set_Has_Independent_Components;
4022 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4023 begin
4024 pragma Assert (Is_Type (Id));
4025 Set_Flag248 (Id, V);
4026 end Set_Has_Inheritable_Invariants;
4028 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4029 begin
4030 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4031 Set_Flag219 (Id, V);
4032 end Set_Has_Initial_Value;
4034 procedure Set_Has_Invariants (Id : E; V : B := True) is
4035 begin
4036 pragma Assert (Is_Type (Id)
4037 or else Ekind (Id) = E_Procedure
4038 or else Ekind (Id) = E_Void);
4039 Set_Flag232 (Id, V);
4040 end Set_Has_Invariants;
4042 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4043 begin
4044 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4045 Set_Flag83 (Id, V);
4046 end Set_Has_Machine_Radix_Clause;
4048 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4049 begin
4050 Set_Flag21 (Id, V);
4051 end Set_Has_Master_Entity;
4053 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4054 begin
4055 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4056 Set_Flag142 (Id, V);
4057 end Set_Has_Missing_Return;
4059 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4060 begin
4061 Set_Flag101 (Id, V);
4062 end Set_Has_Nested_Block_With_Handler;
4064 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4065 begin
4066 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4067 Set_Flag215 (Id, V);
4068 end Set_Has_Up_Level_Access;
4070 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4071 begin
4072 pragma Assert (Id = Base_Type (Id));
4073 Set_Flag75 (Id, V);
4074 end Set_Has_Non_Standard_Rep;
4076 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4077 begin
4078 pragma Assert (Is_Type (Id));
4079 Set_Flag172 (Id, V);
4080 end Set_Has_Object_Size_Clause;
4082 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4083 begin
4084 Set_Flag154 (Id, V);
4085 end Set_Has_Per_Object_Constraint;
4087 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4088 begin
4089 pragma Assert (Is_Subprogram (Id));
4090 Set_Flag240 (Id, V);
4091 end Set_Has_Postconditions;
4093 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4094 begin
4095 pragma Assert (Is_Access_Type (Id));
4096 Set_Flag27 (Base_Type (Id), V);
4097 end Set_Has_Pragma_Controlled;
4099 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4100 begin
4101 Set_Flag150 (Id, V);
4102 end Set_Has_Pragma_Elaborate_Body;
4104 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4105 begin
4106 Set_Flag157 (Id, V);
4107 end Set_Has_Pragma_Inline;
4109 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4110 begin
4111 Set_Flag230 (Id, V);
4112 end Set_Has_Pragma_Inline_Always;
4114 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4115 begin
4116 pragma Assert (Is_Enumeration_Type (Id));
4117 pragma Assert (Id = Base_Type (Id));
4118 Set_Flag198 (Id, V);
4119 end Set_Has_Pragma_Ordered;
4121 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4122 begin
4123 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4124 pragma Assert (Id = Base_Type (Id));
4125 Set_Flag121 (Id, V);
4126 end Set_Has_Pragma_Pack;
4128 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4129 begin
4130 Set_Flag221 (Id, V);
4131 end Set_Has_Pragma_Preelab_Init;
4133 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4134 begin
4135 Set_Flag203 (Id, V);
4136 end Set_Has_Pragma_Pure;
4138 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4139 begin
4140 Set_Flag179 (Id, V);
4141 end Set_Has_Pragma_Pure_Function;
4143 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4144 begin
4145 Set_Flag169 (Id, V);
4146 end Set_Has_Pragma_Thread_Local_Storage;
4148 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4149 begin
4150 Set_Flag233 (Id, V);
4151 end Set_Has_Pragma_Unmodified;
4153 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4154 begin
4155 Set_Flag180 (Id, V);
4156 end Set_Has_Pragma_Unreferenced;
4158 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4159 begin
4160 pragma Assert (Is_Type (Id));
4161 Set_Flag212 (Id, V);
4162 end Set_Has_Pragma_Unreferenced_Objects;
4164 procedure Set_Has_Predicates (Id : E; V : B := True) is
4165 begin
4166 Set_Flag250 (Id, V);
4167 end Set_Has_Predicates;
4169 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4170 begin
4171 pragma Assert (Id = Base_Type (Id));
4172 Set_Flag120 (Id, V);
4173 end Set_Has_Primitive_Operations;
4175 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4176 begin
4177 pragma Assert (Is_Type (Id));
4178 Set_Flag151 (Id, V);
4179 end Set_Has_Private_Ancestor;
4181 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4182 begin
4183 Set_Flag155 (Id, V);
4184 end Set_Has_Private_Declaration;
4186 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4187 begin
4188 Set_Flag161 (Id, V);
4189 end Set_Has_Qualified_Name;
4191 procedure Set_Has_RACW (Id : E; V : B := True) is
4192 begin
4193 pragma Assert (Ekind (Id) = E_Package);
4194 Set_Flag214 (Id, V);
4195 end Set_Has_RACW;
4197 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4198 begin
4199 pragma Assert (Id = Base_Type (Id));
4200 Set_Flag65 (Id, V);
4201 end Set_Has_Record_Rep_Clause;
4203 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4204 begin
4205 pragma Assert (Is_Subprogram (Id));
4206 Set_Flag143 (Id, V);
4207 end Set_Has_Recursive_Call;
4209 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4210 begin
4211 Set_Flag29 (Id, V);
4212 end Set_Has_Size_Clause;
4214 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4215 begin
4216 Set_Flag67 (Id, V);
4217 end Set_Has_Small_Clause;
4219 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4220 begin
4221 pragma Assert (Id = Base_Type (Id));
4222 Set_Flag100 (Id, V);
4223 end Set_Has_Specified_Layout;
4225 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4226 begin
4227 pragma Assert (Is_Type (Id));
4228 Set_Flag190 (Id, V);
4229 end Set_Has_Specified_Stream_Input;
4231 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4232 begin
4233 pragma Assert (Is_Type (Id));
4234 Set_Flag191 (Id, V);
4235 end Set_Has_Specified_Stream_Output;
4237 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4238 begin
4239 pragma Assert (Is_Type (Id));
4240 Set_Flag192 (Id, V);
4241 end Set_Has_Specified_Stream_Read;
4243 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4244 begin
4245 pragma Assert (Is_Type (Id));
4246 Set_Flag193 (Id, V);
4247 end Set_Has_Specified_Stream_Write;
4249 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4250 begin
4251 Set_Flag211 (Id, V);
4252 end Set_Has_Static_Discriminants;
4254 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4255 begin
4256 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4257 pragma Assert (Id = Base_Type (Id));
4258 Set_Flag23 (Id, V);
4259 end Set_Has_Storage_Size_Clause;
4261 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4262 begin
4263 pragma Assert (Is_Elementary_Type (Id));
4264 Set_Flag184 (Id, V);
4265 end Set_Has_Stream_Size_Clause;
4267 procedure Set_Has_Task (Id : E; V : B := True) is
4268 begin
4269 pragma Assert (Id = Base_Type (Id));
4270 Set_Flag30 (Id, V);
4271 end Set_Has_Task;
4273 procedure Set_Has_Thunks (Id : E; V : B := True) is
4274 begin
4275 pragma Assert (Is_Tag (Id));
4276 Set_Flag228 (Id, V);
4277 end Set_Has_Thunks;
4279 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4280 begin
4281 pragma Assert (Id = Base_Type (Id));
4282 Set_Flag123 (Id, V);
4283 end Set_Has_Unchecked_Union;
4285 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4286 begin
4287 pragma Assert (Is_Type (Id));
4288 Set_Flag72 (Id, V);
4289 end Set_Has_Unknown_Discriminants;
4291 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4292 begin
4293 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4294 Set_Flag87 (Id, V);
4295 end Set_Has_Volatile_Components;
4297 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4298 begin
4299 Set_Flag182 (Id, V);
4300 end Set_Has_Xref_Entry;
4302 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4303 begin
4304 pragma Assert (Ekind (Id) = E_Variable);
4305 Set_Node8 (Id, V);
4306 end Set_Hiding_Loop_Variable;
4308 procedure Set_Homonym (Id : E; V : E) is
4309 begin
4310 pragma Assert (Id /= V);
4311 Set_Node4 (Id, V);
4312 end Set_Homonym;
4314 procedure Set_Interface_Alias (Id : E; V : E) is
4315 begin
4316 pragma Assert
4317 (Is_Internal (Id)
4318 and then Is_Hidden (Id)
4319 and then (Ekind_In (Id, E_Procedure, E_Function)));
4320 Set_Node25 (Id, V);
4321 end Set_Interface_Alias;
4323 procedure Set_Interfaces (Id : E; V : L) is
4324 begin
4325 pragma Assert (Is_Record_Type (Id));
4326 Set_Elist25 (Id, V);
4327 end Set_Interfaces;
4329 procedure Set_In_Package_Body (Id : E; V : B := True) is
4330 begin
4331 Set_Flag48 (Id, V);
4332 end Set_In_Package_Body;
4334 procedure Set_In_Private_Part (Id : E; V : B := True) is
4335 begin
4336 Set_Flag45 (Id, V);
4337 end Set_In_Private_Part;
4339 procedure Set_In_Use (Id : E; V : B := True) is
4340 begin
4341 pragma Assert (Nkind (Id) in N_Entity);
4342 Set_Flag8 (Id, V);
4343 end Set_In_Use;
4345 procedure Set_Initialization_Statements (Id : E; V : N) is
4346 begin
4347 -- Tolerate an E_Void entity since this can be called while resolving
4348 -- an aggregate used as the initialization expression for an object
4349 -- declaration, and this occurs before the Ekind for the object is set.
4351 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4352 Set_Node28 (Id, V);
4353 end Set_Initialization_Statements;
4355 procedure Set_Integrity_Level (Id : E; V : Uint) is
4356 begin
4357 pragma Assert (Ekind (Id) = E_Abstract_State);
4358 Set_Uint8 (Id, V);
4359 end Set_Integrity_Level;
4361 procedure Set_Inner_Instances (Id : E; V : L) is
4362 begin
4363 Set_Elist23 (Id, V);
4364 end Set_Inner_Instances;
4366 procedure Set_Interface_Name (Id : E; V : N) is
4367 begin
4368 Set_Node21 (Id, V);
4369 end Set_Interface_Name;
4371 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4372 begin
4373 pragma Assert (Is_Overloadable (Id));
4374 Set_Flag19 (Id, V);
4375 end Set_Is_Abstract_Subprogram;
4377 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4378 begin
4379 pragma Assert (Is_Type (Id));
4380 Set_Flag146 (Id, V);
4381 end Set_Is_Abstract_Type;
4383 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4384 begin
4385 pragma Assert (Is_Access_Type (Id));
4386 Set_Flag194 (Id, V);
4387 end Set_Is_Local_Anonymous_Access;
4389 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4390 begin
4391 pragma Assert (Is_Access_Type (Id));
4392 Set_Flag69 (Id, V);
4393 end Set_Is_Access_Constant;
4395 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4396 begin
4397 Set_Flag185 (Id, V);
4398 end Set_Is_Ada_2005_Only;
4400 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4401 begin
4402 Set_Flag199 (Id, V);
4403 end Set_Is_Ada_2012_Only;
4405 procedure Set_Is_Aliased (Id : E; V : B := True) is
4406 begin
4407 pragma Assert (Nkind (Id) in N_Entity);
4408 Set_Flag15 (Id, V);
4409 end Set_Is_Aliased;
4411 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4412 begin
4413 pragma Assert (Is_Entry (Id));
4414 Set_Flag132 (Id, V);
4415 end Set_Is_AST_Entry;
4417 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4418 begin
4419 pragma Assert
4420 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4421 Set_Flag81 (Id, V);
4422 end Set_Is_Asynchronous;
4424 procedure Set_Is_Atomic (Id : E; V : B := True) is
4425 begin
4426 Set_Flag85 (Id, V);
4427 end Set_Is_Atomic;
4429 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4430 begin
4431 pragma Assert ((not V)
4432 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4433 Set_Flag122 (Id, V);
4434 end Set_Is_Bit_Packed_Array;
4436 procedure Set_Is_Called (Id : E; V : B := True) is
4437 begin
4438 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4439 Set_Flag102 (Id, V);
4440 end Set_Is_Called;
4442 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4443 begin
4444 Set_Flag63 (Id, V);
4445 end Set_Is_Character_Type;
4447 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4448 begin
4449 Set_Flag73 (Id, V);
4450 end Set_Is_Child_Unit;
4452 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4453 begin
4454 Set_Flag35 (Id, V);
4455 end Set_Is_Class_Wide_Equivalent_Type;
4457 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4458 begin
4459 Set_Flag149 (Id, V);
4460 end Set_Is_Compilation_Unit;
4462 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4463 begin
4464 pragma Assert (Ekind (Id) = E_Discriminant);
4465 Set_Flag103 (Id, V);
4466 end Set_Is_Completely_Hidden;
4468 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4469 begin
4470 Set_Flag20 (Id, V);
4471 end Set_Is_Concurrent_Record_Type;
4473 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4474 begin
4475 Set_Flag80 (Id, V);
4476 end Set_Is_Constr_Subt_For_U_Nominal;
4478 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4479 begin
4480 Set_Flag141 (Id, V);
4481 end Set_Is_Constr_Subt_For_UN_Aliased;
4483 procedure Set_Is_Constrained (Id : E; V : B := True) is
4484 begin
4485 pragma Assert (Nkind (Id) in N_Entity);
4486 Set_Flag12 (Id, V);
4487 end Set_Is_Constrained;
4489 procedure Set_Is_Constructor (Id : E; V : B := True) is
4490 begin
4491 Set_Flag76 (Id, V);
4492 end Set_Is_Constructor;
4494 procedure Set_Is_Controlled (Id : E; V : B := True) is
4495 begin
4496 pragma Assert (Id = Base_Type (Id));
4497 Set_Flag42 (Id, V);
4498 end Set_Is_Controlled;
4500 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4501 begin
4502 pragma Assert (Is_Formal (Id));
4503 Set_Flag97 (Id, V);
4504 end Set_Is_Controlling_Formal;
4506 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4507 begin
4508 Set_Flag74 (Id, V);
4509 end Set_Is_CPP_Class;
4511 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4512 begin
4513 pragma Assert (Is_Type (Id));
4514 Set_Flag223 (Id, V);
4515 end Set_Is_Descendent_Of_Address;
4517 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4518 begin
4519 Set_Flag176 (Id, V);
4520 end Set_Is_Discrim_SO_Function;
4522 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4523 begin
4524 Set_Flag234 (Id, V);
4525 end Set_Is_Dispatch_Table_Entity;
4527 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4528 begin
4529 pragma Assert
4530 (V = False
4531 or else
4532 Is_Overloadable (Id)
4533 or else
4534 Ekind (Id) = E_Subprogram_Type);
4536 Set_Flag6 (Id, V);
4537 end Set_Is_Dispatching_Operation;
4539 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4540 begin
4541 Set_Flag124 (Id, V);
4542 end Set_Is_Eliminated;
4544 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4545 begin
4546 Set_Flag52 (Id, V);
4547 end Set_Is_Entry_Formal;
4549 procedure Set_Is_Exported (Id : E; V : B := True) is
4550 begin
4551 Set_Flag99 (Id, V);
4552 end Set_Is_Exported;
4554 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4555 begin
4556 Set_Flag70 (Id, V);
4557 end Set_Is_First_Subtype;
4559 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4560 begin
4561 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4562 Set_Flag118 (Id, V);
4563 end Set_Is_For_Access_Subtype;
4565 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4566 begin
4567 Set_Flag111 (Id, V);
4568 end Set_Is_Formal_Subprogram;
4570 procedure Set_Is_Frozen (Id : E; V : B := True) is
4571 begin
4572 pragma Assert (Nkind (Id) in N_Entity);
4573 Set_Flag4 (Id, V);
4574 end Set_Is_Frozen;
4576 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4577 begin
4578 pragma Assert (Is_Type (Id));
4579 Set_Flag94 (Id, V);
4580 end Set_Is_Generic_Actual_Type;
4582 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4583 begin
4584 Set_Flag130 (Id, V);
4585 end Set_Is_Generic_Instance;
4587 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4588 begin
4589 pragma Assert (Nkind (Id) in N_Entity);
4590 Set_Flag13 (Id, V);
4591 end Set_Is_Generic_Type;
4593 procedure Set_Is_Hidden (Id : E; V : B := True) is
4594 begin
4595 Set_Flag57 (Id, V);
4596 end Set_Is_Hidden;
4598 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4599 begin
4600 Set_Flag171 (Id, V);
4601 end Set_Is_Hidden_Open_Scope;
4603 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4604 begin
4605 pragma Assert (Nkind (Id) in N_Entity);
4606 Set_Flag7 (Id, V);
4607 end Set_Is_Immediately_Visible;
4609 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4610 begin
4611 Set_Flag254 (Id, V);
4612 end Set_Is_Implementation_Defined;
4614 procedure Set_Is_Imported (Id : E; V : B := True) is
4615 begin
4616 Set_Flag24 (Id, V);
4617 end Set_Is_Imported;
4619 procedure Set_Is_Inlined (Id : E; V : B := True) is
4620 begin
4621 Set_Flag11 (Id, V);
4622 end Set_Is_Inlined;
4624 procedure Set_Is_Interface (Id : E; V : B := True) is
4625 begin
4626 pragma Assert (Is_Record_Type (Id));
4627 Set_Flag186 (Id, V);
4628 end Set_Is_Interface;
4630 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4631 begin
4632 Set_Flag126 (Id, V);
4633 end Set_Is_Instantiated;
4635 procedure Set_Is_Internal (Id : E; V : B := True) is
4636 begin
4637 pragma Assert (Nkind (Id) in N_Entity);
4638 Set_Flag17 (Id, V);
4639 end Set_Is_Internal;
4641 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4642 begin
4643 pragma Assert (Nkind (Id) in N_Entity);
4644 Set_Flag89 (Id, V);
4645 end Set_Is_Interrupt_Handler;
4647 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4648 begin
4649 Set_Flag64 (Id, V);
4650 end Set_Is_Intrinsic_Subprogram;
4652 procedure Set_Is_Itype (Id : E; V : B := True) is
4653 begin
4654 Set_Flag91 (Id, V);
4655 end Set_Is_Itype;
4657 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4658 begin
4659 Set_Flag37 (Id, V);
4660 end Set_Is_Known_Non_Null;
4662 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4663 begin
4664 Set_Flag204 (Id, V);
4665 end Set_Is_Known_Null;
4667 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4668 begin
4669 Set_Flag170 (Id, V);
4670 end Set_Is_Known_Valid;
4672 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4673 begin
4674 pragma Assert (Is_Type (Id));
4675 Set_Flag106 (Id, V);
4676 end Set_Is_Limited_Composite;
4678 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4679 begin
4680 pragma Assert (Is_Interface (Id));
4681 Set_Flag197 (Id, V);
4682 end Set_Is_Limited_Interface;
4684 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4685 begin
4686 Set_Flag25 (Id, V);
4687 end Set_Is_Limited_Record;
4689 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4690 begin
4691 pragma Assert (Is_Subprogram (Id));
4692 Set_Flag137 (Id, V);
4693 end Set_Is_Machine_Code_Subprogram;
4695 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4696 begin
4697 pragma Assert (Is_Type (Id));
4698 Set_Flag109 (Id, V);
4699 end Set_Is_Non_Static_Subtype;
4701 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4702 begin
4703 pragma Assert (Ekind (Id) = E_Procedure);
4704 Set_Flag178 (Id, V);
4705 end Set_Is_Null_Init_Proc;
4707 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4708 begin
4709 Set_Flag153 (Id, V);
4710 end Set_Is_Obsolescent;
4712 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4713 begin
4714 pragma Assert (Ekind (Id) = E_Out_Parameter);
4715 Set_Flag226 (Id, V);
4716 end Set_Is_Only_Out_Parameter;
4718 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4719 begin
4720 pragma Assert (Is_Formal (Id));
4721 Set_Flag134 (Id, V);
4722 end Set_Is_Optional_Parameter;
4724 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4725 begin
4726 Set_Flag160 (Id, V);
4727 end Set_Is_Package_Body_Entity;
4729 procedure Set_Is_Packed (Id : E; V : B := True) is
4730 begin
4731 pragma Assert (Id = Base_Type (Id));
4732 Set_Flag51 (Id, V);
4733 end Set_Is_Packed;
4735 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4736 begin
4737 Set_Flag138 (Id, V);
4738 end Set_Is_Packed_Array_Type;
4740 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4741 begin
4742 pragma Assert (Nkind (Id) in N_Entity);
4743 Set_Flag9 (Id, V);
4744 end Set_Is_Potentially_Use_Visible;
4746 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4747 begin
4748 Set_Flag59 (Id, V);
4749 end Set_Is_Preelaborated;
4751 procedure Set_Is_Primitive (Id : E; V : B := True) is
4752 begin
4753 pragma Assert
4754 (Is_Overloadable (Id)
4755 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4756 Set_Flag218 (Id, V);
4757 end Set_Is_Primitive;
4759 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4760 begin
4761 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4762 Set_Flag195 (Id, V);
4763 end Set_Is_Primitive_Wrapper;
4765 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4766 begin
4767 pragma Assert (Is_Type (Id));
4768 Set_Flag107 (Id, V);
4769 end Set_Is_Private_Composite;
4771 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4772 begin
4773 Set_Flag53 (Id, V);
4774 end Set_Is_Private_Descendant;
4776 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4777 begin
4778 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4779 Set_Flag245 (Id, V);
4780 end Set_Is_Private_Primitive;
4782 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4783 begin
4784 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4785 Set_Flag252 (Id, V);
4786 end Set_Is_Processed_Transient;
4788 procedure Set_Is_Public (Id : E; V : B := True) is
4789 begin
4790 pragma Assert (Nkind (Id) in N_Entity);
4791 Set_Flag10 (Id, V);
4792 end Set_Is_Public;
4794 procedure Set_Is_Pure (Id : E; V : B := True) is
4795 begin
4796 Set_Flag44 (Id, V);
4797 end Set_Is_Pure;
4799 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4800 begin
4801 pragma Assert (Is_Access_Type (Id));
4802 Set_Flag189 (Id, V);
4803 end Set_Is_Pure_Unit_Access_Type;
4805 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4806 begin
4807 pragma Assert (Is_Type (Id));
4808 Set_Flag244 (Id, V);
4809 end Set_Is_RACW_Stub_Type;
4811 procedure Set_Is_Raised (Id : E; V : B := True) is
4812 begin
4813 pragma Assert (Ekind (Id) = E_Exception);
4814 Set_Flag224 (Id, V);
4815 end Set_Is_Raised;
4817 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4818 begin
4819 Set_Flag62 (Id, V);
4820 end Set_Is_Remote_Call_Interface;
4822 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4823 begin
4824 Set_Flag61 (Id, V);
4825 end Set_Is_Remote_Types;
4827 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4828 begin
4829 Set_Flag112 (Id, V);
4830 end Set_Is_Renaming_Of_Object;
4832 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4833 begin
4834 Set_Flag209 (Id, V);
4835 end Set_Is_Return_Object;
4837 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4838 begin
4839 pragma Assert (Ekind (Id) = E_Variable);
4840 Set_Flag249 (Id, V);
4841 end Set_Is_Safe_To_Reevaluate;
4843 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4844 begin
4845 Set_Flag60 (Id, V);
4846 end Set_Is_Shared_Passive;
4848 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4849 begin
4850 pragma Assert
4851 (Is_Type (Id)
4852 or else Ekind_In (Id, E_Exception,
4853 E_Variable,
4854 E_Constant,
4855 E_Void));
4856 Set_Flag28 (Id, V);
4857 end Set_Is_Statically_Allocated;
4859 procedure Set_Is_Tag (Id : E; V : B := True) is
4860 begin
4861 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4862 Set_Flag78 (Id, V);
4863 end Set_Is_Tag;
4865 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4866 begin
4867 Set_Flag55 (Id, V);
4868 end Set_Is_Tagged_Type;
4870 procedure Set_Is_Thunk (Id : E; V : B := True) is
4871 begin
4872 Set_Flag225 (Id, V);
4873 end Set_Is_Thunk;
4875 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4876 begin
4877 Set_Flag235 (Id, V);
4878 end Set_Is_Trivial_Subprogram;
4880 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4881 begin
4882 Set_Flag163 (Id, V);
4883 end Set_Is_True_Constant;
4885 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4886 begin
4887 pragma Assert (Id = Base_Type (Id));
4888 Set_Flag117 (Id, V);
4889 end Set_Is_Unchecked_Union;
4891 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4892 begin
4893 pragma Assert (Ekind (Id) = E_Record_Type);
4894 Set_Flag246 (Id, V);
4895 end Set_Is_Underlying_Record_View;
4897 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4898 begin
4899 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4900 Set_Flag144 (Id, V);
4901 end Set_Is_Unsigned_Type;
4903 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4904 begin
4905 pragma Assert (Ekind (Id) = E_Procedure);
4906 Set_Flag127 (Id, V);
4907 end Set_Is_Valued_Procedure;
4909 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4910 begin
4911 Set_Flag206 (Id, V);
4912 end Set_Is_Visible_Formal;
4914 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4915 begin
4916 Set_Flag116 (Id, V);
4917 end Set_Is_Visible_Lib_Unit;
4919 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4920 begin
4921 pragma Assert (Ekind (Id) = E_Exception);
4922 Set_Flag133 (Id, V);
4923 end Set_Is_VMS_Exception;
4925 procedure Set_Is_Volatile (Id : E; V : B := True) is
4926 begin
4927 pragma Assert (Nkind (Id) in N_Entity);
4928 Set_Flag16 (Id, V);
4929 end Set_Is_Volatile;
4931 procedure Set_Itype_Printed (Id : E; V : B := True) is
4932 begin
4933 pragma Assert (Is_Itype (Id));
4934 Set_Flag202 (Id, V);
4935 end Set_Itype_Printed;
4937 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4938 begin
4939 Set_Flag32 (Id, V);
4940 end Set_Kill_Elaboration_Checks;
4942 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4943 begin
4944 Set_Flag33 (Id, V);
4945 end Set_Kill_Range_Checks;
4947 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4948 begin
4949 pragma Assert (Is_Type (Id));
4950 Set_Flag207 (Id, V);
4951 end Set_Known_To_Have_Preelab_Init;
4953 procedure Set_Last_Assignment (Id : E; V : N) is
4954 begin
4955 pragma Assert (Is_Assignable (Id));
4956 Set_Node26 (Id, V);
4957 end Set_Last_Assignment;
4959 procedure Set_Last_Entity (Id : E; V : E) is
4960 begin
4961 Set_Node20 (Id, V);
4962 end Set_Last_Entity;
4964 procedure Set_Limited_View (Id : E; V : E) is
4965 begin
4966 pragma Assert (Ekind (Id) = E_Package);
4967 Set_Node23 (Id, V);
4968 end Set_Limited_View;
4970 procedure Set_Lit_Indexes (Id : E; V : E) is
4971 begin
4972 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4973 Set_Node15 (Id, V);
4974 end Set_Lit_Indexes;
4976 procedure Set_Lit_Strings (Id : E; V : E) is
4977 begin
4978 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4979 Set_Node16 (Id, V);
4980 end Set_Lit_Strings;
4982 procedure Set_Loop_Entry_Attributes (Id : E; V : L) is
4983 begin
4984 pragma Assert (Ekind (Id) = E_Loop);
4985 Set_Elist10 (Id, V);
4986 end Set_Loop_Entry_Attributes;
4988 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4989 begin
4990 pragma Assert (Is_Formal (Id));
4991 Set_Flag205 (Id, V);
4992 end Set_Low_Bound_Tested;
4994 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4995 begin
4996 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4997 Set_Flag84 (Id, V);
4998 end Set_Machine_Radix_10;
5000 procedure Set_Master_Id (Id : E; V : E) is
5001 begin
5002 pragma Assert (Is_Access_Type (Id));
5003 Set_Node17 (Id, V);
5004 end Set_Master_Id;
5006 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5007 begin
5008 Set_Flag168 (Id, V);
5009 end Set_Materialize_Entity;
5011 procedure Set_Mechanism (Id : E; V : M) is
5012 begin
5013 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5014 Set_Uint8 (Id, UI_From_Int (V));
5015 end Set_Mechanism;
5017 procedure Set_Modulus (Id : E; V : U) is
5018 begin
5019 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5020 Set_Uint17 (Id, V);
5021 end Set_Modulus;
5023 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5024 begin
5025 pragma Assert (Is_Type (Id));
5026 Set_Flag183 (Id, V);
5027 end Set_Must_Be_On_Byte_Boundary;
5029 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5030 begin
5031 pragma Assert (Is_Type (Id));
5032 Set_Flag208 (Id, V);
5033 end Set_Must_Have_Preelab_Init;
5035 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5036 begin
5037 Set_Flag147 (Id, V);
5038 end Set_Needs_Debug_Info;
5040 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5041 begin
5042 pragma Assert
5043 (Is_Overloadable (Id)
5044 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5045 Set_Flag22 (Id, V);
5046 end Set_Needs_No_Actuals;
5048 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5049 begin
5050 Set_Flag115 (Id, V);
5051 end Set_Never_Set_In_Source;
5053 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5054 begin
5055 Set_Node12 (Id, V);
5056 end Set_Next_Inlined_Subprogram;
5058 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5059 begin
5060 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5061 Set_Flag131 (Id, V);
5062 end Set_No_Pool_Assigned;
5064 procedure Set_No_Return (Id : E; V : B := True) is
5065 begin
5066 pragma Assert
5067 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5068 Set_Flag113 (Id, V);
5069 end Set_No_Return;
5071 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5072 begin
5073 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5074 Set_Flag136 (Id, V);
5075 end Set_No_Strict_Aliasing;
5077 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5078 begin
5079 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5080 Set_Flag58 (Id, V);
5081 end Set_Non_Binary_Modulus;
5083 procedure Set_Non_Limited_View (Id : E; V : E) is
5084 begin
5085 pragma Assert (Ekind (Id) in Incomplete_Kind);
5086 Set_Node17 (Id, V);
5087 end Set_Non_Limited_View;
5089 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5090 begin
5091 pragma Assert
5092 (Root_Type (Id) = Standard_Boolean
5093 and then Ekind (Id) = E_Enumeration_Type);
5094 Set_Flag162 (Id, V);
5095 end Set_Nonzero_Is_True;
5097 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5098 begin
5099 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5100 Set_Uint8 (Id, V);
5101 end Set_Normalized_First_Bit;
5103 procedure Set_Normalized_Position (Id : E; V : U) is
5104 begin
5105 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5106 Set_Uint14 (Id, V);
5107 end Set_Normalized_Position;
5109 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5110 begin
5111 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5112 Set_Uint10 (Id, V);
5113 end Set_Normalized_Position_Max;
5115 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5116 begin
5117 pragma Assert (Ekind (Id) = E_Variable);
5118 Set_Flag247 (Id, V);
5119 end Set_OK_To_Rename;
5121 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5122 begin
5123 pragma Assert
5124 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5125 Set_Flag239 (Id, V);
5126 end Set_OK_To_Reorder_Components;
5128 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5129 begin
5130 pragma Assert
5131 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5132 Set_Flag241 (Id, V);
5133 end Set_Optimize_Alignment_Space;
5135 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5136 begin
5137 pragma Assert
5138 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5139 Set_Flag242 (Id, V);
5140 end Set_Optimize_Alignment_Time;
5142 procedure Set_Original_Access_Type (Id : E; V : E) is
5143 begin
5144 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5145 Set_Node26 (Id, V);
5146 end Set_Original_Access_Type;
5148 procedure Set_Original_Array_Type (Id : E; V : E) is
5149 begin
5150 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5151 Set_Node21 (Id, V);
5152 end Set_Original_Array_Type;
5154 procedure Set_Original_Record_Component (Id : E; V : E) is
5155 begin
5156 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5157 Set_Node22 (Id, V);
5158 end Set_Original_Record_Component;
5160 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5161 begin
5162 Set_Flag243 (Id, V);
5163 end Set_Overlays_Constant;
5165 procedure Set_Overridden_Operation (Id : E; V : E) is
5166 begin
5167 Set_Node26 (Id, V);
5168 end Set_Overridden_Operation;
5170 procedure Set_Package_Instantiation (Id : E; V : N) is
5171 begin
5172 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5173 Set_Node26 (Id, V);
5174 end Set_Package_Instantiation;
5176 procedure Set_Packed_Array_Type (Id : E; V : E) is
5177 begin
5178 pragma Assert (Is_Array_Type (Id));
5179 Set_Node23 (Id, V);
5180 end Set_Packed_Array_Type;
5182 procedure Set_Parent_Subtype (Id : E; V : E) is
5183 begin
5184 pragma Assert (Ekind (Id) = E_Record_Type);
5185 Set_Node19 (Id, V);
5186 end Set_Parent_Subtype;
5188 procedure Set_Postcondition_Proc (Id : E; V : E) is
5189 begin
5190 pragma Assert (Ekind (Id) = E_Procedure);
5191 Set_Node8 (Id, V);
5192 end Set_Postcondition_Proc;
5194 procedure Set_PPC_Wrapper (Id : E; V : E) is
5195 begin
5196 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5197 Set_Node25 (Id, V);
5198 end Set_PPC_Wrapper;
5200 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5201 begin
5202 pragma Assert (Is_Tagged_Type (Id));
5203 Set_Elist10 (Id, V);
5204 end Set_Direct_Primitive_Operations;
5206 procedure Set_Prival (Id : E; V : E) is
5207 begin
5208 pragma Assert (Is_Protected_Component (Id));
5209 Set_Node17 (Id, V);
5210 end Set_Prival;
5212 procedure Set_Prival_Link (Id : E; V : E) is
5213 begin
5214 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5215 Set_Node20 (Id, V);
5216 end Set_Prival_Link;
5218 procedure Set_Private_Dependents (Id : E; V : L) is
5219 begin
5220 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5221 Set_Elist18 (Id, V);
5222 end Set_Private_Dependents;
5224 procedure Set_Private_View (Id : E; V : N) is
5225 begin
5226 pragma Assert (Is_Private_Type (Id));
5227 Set_Node22 (Id, V);
5228 end Set_Private_View;
5230 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5231 begin
5232 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5233 Set_Node11 (Id, V);
5234 end Set_Protected_Body_Subprogram;
5236 procedure Set_Protected_Formal (Id : E; V : E) is
5237 begin
5238 pragma Assert (Is_Formal (Id));
5239 Set_Node22 (Id, V);
5240 end Set_Protected_Formal;
5242 procedure Set_Protection_Object (Id : E; V : E) is
5243 begin
5244 pragma Assert (Ekind_In (Id, E_Entry,
5245 E_Entry_Family,
5246 E_Function,
5247 E_Procedure));
5248 Set_Node23 (Id, V);
5249 end Set_Protection_Object;
5251 procedure Set_Reachable (Id : E; V : B := True) is
5252 begin
5253 Set_Flag49 (Id, V);
5254 end Set_Reachable;
5256 procedure Set_Referenced (Id : E; V : B := True) is
5257 begin
5258 Set_Flag156 (Id, V);
5259 end Set_Referenced;
5261 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5262 begin
5263 Set_Flag36 (Id, V);
5264 end Set_Referenced_As_LHS;
5266 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5267 begin
5268 Set_Flag227 (Id, V);
5269 end Set_Referenced_As_Out_Parameter;
5271 procedure Set_Refined_State (Id : E; V : E) is
5272 begin
5273 pragma Assert (Ekind (Id) = E_Abstract_State);
5274 Set_Node9 (Id, V);
5275 end Set_Refined_State;
5277 procedure Set_Register_Exception_Call (Id : E; V : N) is
5278 begin
5279 pragma Assert (Ekind (Id) = E_Exception);
5280 Set_Node20 (Id, V);
5281 end Set_Register_Exception_Call;
5283 procedure Set_Related_Array_Object (Id : E; V : E) is
5284 begin
5285 pragma Assert (Is_Array_Type (Id));
5286 Set_Node25 (Id, V);
5287 end Set_Related_Array_Object;
5289 procedure Set_Related_Expression (Id : E; V : N) is
5290 begin
5291 pragma Assert (Ekind (Id) in Type_Kind
5292 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5293 Set_Node24 (Id, V);
5294 end Set_Related_Expression;
5296 procedure Set_Related_Instance (Id : E; V : E) is
5297 begin
5298 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5299 Set_Node15 (Id, V);
5300 end Set_Related_Instance;
5302 procedure Set_Related_Type (Id : E; V : E) is
5303 begin
5304 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5305 Set_Node27 (Id, V);
5306 end Set_Related_Type;
5308 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5309 begin
5310 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5311 Set_Node26 (Id, V);
5312 end Set_Relative_Deadline_Variable;
5314 procedure Set_Renamed_Entity (Id : E; V : N) is
5315 begin
5316 Set_Node18 (Id, V);
5317 end Set_Renamed_Entity;
5319 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5320 begin
5321 pragma Assert (Ekind (Id) = E_Package);
5322 Set_Flag231 (Id, V);
5323 end Set_Renamed_In_Spec;
5325 procedure Set_Renamed_Object (Id : E; V : N) is
5326 begin
5327 Set_Node18 (Id, V);
5328 end Set_Renamed_Object;
5330 procedure Set_Renaming_Map (Id : E; V : U) is
5331 begin
5332 Set_Uint9 (Id, V);
5333 end Set_Renaming_Map;
5335 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5336 begin
5337 pragma Assert (Is_Overloadable (Id));
5338 Set_Flag213 (Id, V);
5339 end Set_Requires_Overriding;
5341 procedure Set_Return_Present (Id : E; V : B := True) is
5342 begin
5343 Set_Flag54 (Id, V);
5344 end Set_Return_Present;
5346 procedure Set_Return_Applies_To (Id : E; V : N) is
5347 begin
5348 Set_Node8 (Id, V);
5349 end Set_Return_Applies_To;
5351 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5352 begin
5353 Set_Flag90 (Id, V);
5354 end Set_Returns_By_Ref;
5356 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5357 begin
5358 pragma Assert
5359 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5360 Set_Flag164 (Id, V);
5361 end Set_Reverse_Bit_Order;
5363 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5364 begin
5365 pragma Assert
5366 (Is_Base_Type (Id)
5367 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5368 Set_Flag93 (Id, V);
5369 end Set_Reverse_Storage_Order;
5371 procedure Set_RM_Size (Id : E; V : U) is
5372 begin
5373 pragma Assert (Is_Type (Id));
5374 Set_Uint13 (Id, V);
5375 end Set_RM_Size;
5377 procedure Set_Scalar_Range (Id : E; V : N) is
5378 begin
5379 Set_Node20 (Id, V);
5380 end Set_Scalar_Range;
5382 procedure Set_Scale_Value (Id : E; V : U) is
5383 begin
5384 Set_Uint15 (Id, V);
5385 end Set_Scale_Value;
5387 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5388 begin
5389 pragma Assert (not Is_Record_Type (Id));
5390 Set_Uint22 (Id, V);
5391 end Set_Scope_Depth_Value;
5393 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5394 begin
5395 Set_Flag167 (Id, V);
5396 end Set_Sec_Stack_Needed_For_Return;
5398 procedure Set_Shadow_Entities (Id : E; V : S) is
5399 begin
5400 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5401 Set_List14 (Id, V);
5402 end Set_Shadow_Entities;
5404 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5405 begin
5406 pragma Assert (Ekind (Id) = E_Variable);
5407 Set_Node22 (Id, V);
5408 end Set_Shared_Var_Procs_Instance;
5410 procedure Set_Size_Check_Code (Id : E; V : N) is
5411 begin
5412 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5413 Set_Node19 (Id, V);
5414 end Set_Size_Check_Code;
5416 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5417 begin
5418 Set_Flag177 (Id, V);
5419 end Set_Size_Depends_On_Discriminant;
5421 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5422 begin
5423 Set_Flag92 (Id, V);
5424 end Set_Size_Known_At_Compile_Time;
5426 procedure Set_Small_Value (Id : E; V : R) is
5427 begin
5428 pragma Assert (Is_Fixed_Point_Type (Id));
5429 Set_Ureal21 (Id, V);
5430 end Set_Small_Value;
5432 procedure Set_Spec_Entity (Id : E; V : E) is
5433 begin
5434 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5435 Set_Node19 (Id, V);
5436 end Set_Spec_Entity;
5438 procedure Set_Static_Predicate (Id : E; V : S) is
5439 begin
5440 pragma Assert
5441 (Ekind_In (Id, E_Enumeration_Subtype,
5442 E_Modular_Integer_Subtype,
5443 E_Signed_Integer_Subtype)
5444 and then Has_Predicates (Id));
5445 Set_List25 (Id, V);
5446 end Set_Static_Predicate;
5448 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5449 begin
5450 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5451 Set_Node15 (Id, V);
5452 end Set_Status_Flag_Or_Transient_Decl;
5454 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5455 begin
5456 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5457 pragma Assert (Id = Base_Type (Id));
5458 Set_Node15 (Id, V);
5459 end Set_Storage_Size_Variable;
5461 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5462 begin
5463 pragma Assert (Ekind (Id) = E_Package);
5464 Set_Flag77 (Id, V);
5465 end Set_Static_Elaboration_Desired;
5467 procedure Set_Static_Initialization (Id : E; V : N) is
5468 begin
5469 pragma Assert
5470 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5471 Set_Node30 (Id, V);
5472 end Set_Static_Initialization;
5474 procedure Set_Stored_Constraint (Id : E; V : L) is
5475 begin
5476 pragma Assert (Nkind (Id) in N_Entity);
5477 Set_Elist23 (Id, V);
5478 end Set_Stored_Constraint;
5480 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5481 begin
5482 pragma Assert (Id = Base_Type (Id));
5483 Set_Flag145 (Id, V);
5484 end Set_Strict_Alignment;
5486 procedure Set_String_Literal_Length (Id : E; V : U) is
5487 begin
5488 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5489 Set_Uint16 (Id, V);
5490 end Set_String_Literal_Length;
5492 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5493 begin
5494 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5495 Set_Node15 (Id, V);
5496 end Set_String_Literal_Low_Bound;
5498 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5499 begin
5500 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5501 Set_Node29 (Id, V);
5502 end Set_Subprograms_For_Type;
5504 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5505 begin
5506 Set_Flag148 (Id, V);
5507 end Set_Suppress_Elaboration_Warnings;
5509 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5510 begin
5511 pragma Assert (Is_Type (Id));
5512 Set_Flag105 (Id, V);
5513 end Set_Suppress_Initialization;
5515 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5516 begin
5517 Set_Flag165 (Id, V);
5518 end Set_Suppress_Style_Checks;
5520 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5521 begin
5522 Set_Flag217 (Id, V);
5523 end Set_Suppress_Value_Tracking_On_Call;
5525 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5526 begin
5527 pragma Assert (Ekind (Id) in Task_Kind);
5528 Set_Node25 (Id, V);
5529 end Set_Task_Body_Procedure;
5531 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5532 begin
5533 Set_Flag41 (Id, V);
5534 end Set_Treat_As_Volatile;
5536 procedure Set_Underlying_Full_View (Id : E; V : E) is
5537 begin
5538 pragma Assert (Ekind (Id) in Private_Kind);
5539 Set_Node19 (Id, V);
5540 end Set_Underlying_Full_View;
5542 procedure Set_Underlying_Record_View (Id : E; V : E) is
5543 begin
5544 pragma Assert (Ekind (Id) = E_Record_Type);
5545 Set_Node28 (Id, V);
5546 end Set_Underlying_Record_View;
5548 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5549 begin
5550 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5551 Set_Flag216 (Id, V);
5552 end Set_Universal_Aliasing;
5554 procedure Set_Unset_Reference (Id : E; V : N) is
5555 begin
5556 Set_Node16 (Id, V);
5557 end Set_Unset_Reference;
5559 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5560 begin
5561 Set_Flag222 (Id, V);
5562 end Set_Used_As_Generic_Actual;
5564 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5565 begin
5566 pragma Assert (Ekind (Id) = E_Protected_Type);
5567 Set_Flag188 (Id, V);
5568 end Set_Uses_Lock_Free;
5570 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5571 begin
5572 Set_Flag95 (Id, V);
5573 end Set_Uses_Sec_Stack;
5575 procedure Set_Warnings_Off (Id : E; V : B := True) is
5576 begin
5577 Set_Flag96 (Id, V);
5578 end Set_Warnings_Off;
5580 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5581 begin
5582 Set_Flag236 (Id, V);
5583 end Set_Warnings_Off_Used;
5585 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5586 begin
5587 Set_Flag237 (Id, V);
5588 end Set_Warnings_Off_Used_Unmodified;
5590 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5591 begin
5592 Set_Flag238 (Id, V);
5593 end Set_Warnings_Off_Used_Unreferenced;
5595 procedure Set_Was_Hidden (Id : E; V : B := True) is
5596 begin
5597 Set_Flag196 (Id, V);
5598 end Set_Was_Hidden;
5600 procedure Set_Wrapped_Entity (Id : E; V : E) is
5601 begin
5602 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5603 and then Is_Primitive_Wrapper (Id));
5604 Set_Node27 (Id, V);
5605 end Set_Wrapped_Entity;
5607 -----------------------------------
5608 -- Field Initialization Routines --
5609 -----------------------------------
5611 procedure Init_Alignment (Id : E) is
5612 begin
5613 Set_Uint14 (Id, Uint_0);
5614 end Init_Alignment;
5616 procedure Init_Alignment (Id : E; V : Int) is
5617 begin
5618 Set_Uint14 (Id, UI_From_Int (V));
5619 end Init_Alignment;
5621 procedure Init_Component_Bit_Offset (Id : E) is
5622 begin
5623 Set_Uint11 (Id, No_Uint);
5624 end Init_Component_Bit_Offset;
5626 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5627 begin
5628 Set_Uint11 (Id, UI_From_Int (V));
5629 end Init_Component_Bit_Offset;
5631 procedure Init_Component_Size (Id : E) is
5632 begin
5633 Set_Uint22 (Id, Uint_0);
5634 end Init_Component_Size;
5636 procedure Init_Component_Size (Id : E; V : Int) is
5637 begin
5638 Set_Uint22 (Id, UI_From_Int (V));
5639 end Init_Component_Size;
5641 procedure Init_Digits_Value (Id : E) is
5642 begin
5643 Set_Uint17 (Id, Uint_0);
5644 end Init_Digits_Value;
5646 procedure Init_Digits_Value (Id : E; V : Int) is
5647 begin
5648 Set_Uint17 (Id, UI_From_Int (V));
5649 end Init_Digits_Value;
5651 procedure Init_Esize (Id : E) is
5652 begin
5653 Set_Uint12 (Id, Uint_0);
5654 end Init_Esize;
5656 procedure Init_Esize (Id : E; V : Int) is
5657 begin
5658 Set_Uint12 (Id, UI_From_Int (V));
5659 end Init_Esize;
5661 procedure Init_Normalized_First_Bit (Id : E) is
5662 begin
5663 Set_Uint8 (Id, No_Uint);
5664 end Init_Normalized_First_Bit;
5666 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5667 begin
5668 Set_Uint8 (Id, UI_From_Int (V));
5669 end Init_Normalized_First_Bit;
5671 procedure Init_Normalized_Position (Id : E) is
5672 begin
5673 Set_Uint14 (Id, No_Uint);
5674 end Init_Normalized_Position;
5676 procedure Init_Normalized_Position (Id : E; V : Int) is
5677 begin
5678 Set_Uint14 (Id, UI_From_Int (V));
5679 end Init_Normalized_Position;
5681 procedure Init_Normalized_Position_Max (Id : E) is
5682 begin
5683 Set_Uint10 (Id, No_Uint);
5684 end Init_Normalized_Position_Max;
5686 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5687 begin
5688 Set_Uint10 (Id, UI_From_Int (V));
5689 end Init_Normalized_Position_Max;
5691 procedure Init_RM_Size (Id : E) is
5692 begin
5693 Set_Uint13 (Id, Uint_0);
5694 end Init_RM_Size;
5696 procedure Init_RM_Size (Id : E; V : Int) is
5697 begin
5698 Set_Uint13 (Id, UI_From_Int (V));
5699 end Init_RM_Size;
5701 -----------------------------
5702 -- Init_Component_Location --
5703 -----------------------------
5705 procedure Init_Component_Location (Id : E) is
5706 begin
5707 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5708 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5709 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5710 Set_Uint12 (Id, Uint_0); -- Esize
5711 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5712 end Init_Component_Location;
5714 ----------------------------
5715 -- Init_Object_Size_Align --
5716 ----------------------------
5718 procedure Init_Object_Size_Align (Id : E) is
5719 begin
5720 Set_Uint12 (Id, Uint_0); -- Esize
5721 Set_Uint14 (Id, Uint_0); -- Alignment
5722 end Init_Object_Size_Align;
5724 ---------------
5725 -- Init_Size --
5726 ---------------
5728 procedure Init_Size (Id : E; V : Int) is
5729 begin
5730 pragma Assert (not Is_Object (Id));
5731 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5732 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5733 end Init_Size;
5735 ---------------------
5736 -- Init_Size_Align --
5737 ---------------------
5739 procedure Init_Size_Align (Id : E) is
5740 begin
5741 pragma Assert (not Is_Object (Id));
5742 Set_Uint12 (Id, Uint_0); -- Esize
5743 Set_Uint13 (Id, Uint_0); -- RM_Size
5744 Set_Uint14 (Id, Uint_0); -- Alignment
5745 end Init_Size_Align;
5747 ----------------------------------------------
5748 -- Type Representation Attribute Predicates --
5749 ----------------------------------------------
5751 function Known_Alignment (E : Entity_Id) return B is
5752 begin
5753 return Uint14 (E) /= Uint_0
5754 and then Uint14 (E) /= No_Uint;
5755 end Known_Alignment;
5757 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5758 begin
5759 return Uint11 (E) /= No_Uint;
5760 end Known_Component_Bit_Offset;
5762 function Known_Component_Size (E : Entity_Id) return B is
5763 begin
5764 return Uint22 (Base_Type (E)) /= Uint_0
5765 and then Uint22 (Base_Type (E)) /= No_Uint;
5766 end Known_Component_Size;
5768 function Known_Esize (E : Entity_Id) return B is
5769 begin
5770 return Uint12 (E) /= Uint_0
5771 and then Uint12 (E) /= No_Uint;
5772 end Known_Esize;
5774 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5775 begin
5776 return Uint8 (E) /= No_Uint;
5777 end Known_Normalized_First_Bit;
5779 function Known_Normalized_Position (E : Entity_Id) return B is
5780 begin
5781 return Uint14 (E) /= No_Uint;
5782 end Known_Normalized_Position;
5784 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5785 begin
5786 return Uint10 (E) /= No_Uint;
5787 end Known_Normalized_Position_Max;
5789 function Known_RM_Size (E : Entity_Id) return B is
5790 begin
5791 return Uint13 (E) /= No_Uint
5792 and then (Uint13 (E) /= Uint_0
5793 or else Is_Discrete_Type (E)
5794 or else Is_Fixed_Point_Type (E));
5795 end Known_RM_Size;
5797 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5798 begin
5799 return Uint11 (E) /= No_Uint
5800 and then Uint11 (E) >= Uint_0;
5801 end Known_Static_Component_Bit_Offset;
5803 function Known_Static_Component_Size (E : Entity_Id) return B is
5804 begin
5805 return Uint22 (Base_Type (E)) > Uint_0;
5806 end Known_Static_Component_Size;
5808 function Known_Static_Esize (E : Entity_Id) return B is
5809 begin
5810 return Uint12 (E) > Uint_0
5811 and then not Is_Generic_Type (E);
5812 end Known_Static_Esize;
5814 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5815 begin
5816 return Uint8 (E) /= No_Uint
5817 and then Uint8 (E) >= Uint_0;
5818 end Known_Static_Normalized_First_Bit;
5820 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5821 begin
5822 return Uint14 (E) /= No_Uint
5823 and then Uint14 (E) >= Uint_0;
5824 end Known_Static_Normalized_Position;
5826 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5827 begin
5828 return Uint10 (E) /= No_Uint
5829 and then Uint10 (E) >= Uint_0;
5830 end Known_Static_Normalized_Position_Max;
5832 function Known_Static_RM_Size (E : Entity_Id) return B is
5833 begin
5834 return (Uint13 (E) > Uint_0
5835 or else Is_Discrete_Type (E)
5836 or else Is_Fixed_Point_Type (E))
5837 and then not Is_Generic_Type (E);
5838 end Known_Static_RM_Size;
5840 function Unknown_Alignment (E : Entity_Id) return B is
5841 begin
5842 return Uint14 (E) = Uint_0
5843 or else Uint14 (E) = No_Uint;
5844 end Unknown_Alignment;
5846 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5847 begin
5848 return Uint11 (E) = No_Uint;
5849 end Unknown_Component_Bit_Offset;
5851 function Unknown_Component_Size (E : Entity_Id) return B is
5852 begin
5853 return Uint22 (Base_Type (E)) = Uint_0
5854 or else
5855 Uint22 (Base_Type (E)) = No_Uint;
5856 end Unknown_Component_Size;
5858 function Unknown_Esize (E : Entity_Id) return B is
5859 begin
5860 return Uint12 (E) = No_Uint
5861 or else
5862 Uint12 (E) = Uint_0;
5863 end Unknown_Esize;
5865 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5866 begin
5867 return Uint8 (E) = No_Uint;
5868 end Unknown_Normalized_First_Bit;
5870 function Unknown_Normalized_Position (E : Entity_Id) return B is
5871 begin
5872 return Uint14 (E) = No_Uint;
5873 end Unknown_Normalized_Position;
5875 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5876 begin
5877 return Uint10 (E) = No_Uint;
5878 end Unknown_Normalized_Position_Max;
5880 function Unknown_RM_Size (E : Entity_Id) return B is
5881 begin
5882 return (Uint13 (E) = Uint_0
5883 and then not Is_Discrete_Type (E)
5884 and then not Is_Fixed_Point_Type (E))
5885 or else Uint13 (E) = No_Uint;
5886 end Unknown_RM_Size;
5888 --------------------
5889 -- Address_Clause --
5890 --------------------
5892 function Address_Clause (Id : E) return N is
5893 begin
5894 return Rep_Clause (Id, Name_Address);
5895 end Address_Clause;
5897 ---------------
5898 -- Aft_Value --
5899 ---------------
5901 function Aft_Value (Id : E) return U is
5902 Result : Nat := 1;
5903 Delta_Val : Ureal := Delta_Value (Id);
5904 begin
5905 while Delta_Val < Ureal_Tenth loop
5906 Delta_Val := Delta_Val * Ureal_10;
5907 Result := Result + 1;
5908 end loop;
5910 return UI_From_Int (Result);
5911 end Aft_Value;
5913 ----------------------
5914 -- Alignment_Clause --
5915 ----------------------
5917 function Alignment_Clause (Id : E) return N is
5918 begin
5919 return Rep_Clause (Id, Name_Alignment);
5920 end Alignment_Clause;
5922 -------------------
5923 -- Append_Entity --
5924 -------------------
5926 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5927 begin
5928 if Last_Entity (V) = Empty then
5929 Set_First_Entity (Id => V, V => Id);
5930 else
5931 Set_Next_Entity (Last_Entity (V), Id);
5932 end if;
5934 Set_Next_Entity (Id, Empty);
5935 Set_Scope (Id, V);
5936 Set_Last_Entity (Id => V, V => Id);
5937 end Append_Entity;
5939 ---------------
5940 -- Base_Type --
5941 ---------------
5943 function Base_Type (Id : E) return E is
5944 begin
5945 if Is_Base_Type (Id) then
5946 return Id;
5947 else
5948 pragma Assert (Is_Type (Id));
5949 return Etype (Id);
5950 end if;
5951 end Base_Type;
5953 -------------------------
5954 -- Component_Alignment --
5955 -------------------------
5957 -- Component Alignment is encoded using two flags, Flag128/129 as
5958 -- follows. Note that both flags False = Align_Default, so that the
5959 -- default initialization of flags to False initializes component
5960 -- alignment to the default value as required.
5962 -- Flag128 Flag129 Value
5963 -- ------- ------- -----
5964 -- False False Calign_Default
5965 -- False True Calign_Component_Size
5966 -- True False Calign_Component_Size_4
5967 -- True True Calign_Storage_Unit
5969 function Component_Alignment (Id : E) return C is
5970 BT : constant Node_Id := Base_Type (Id);
5972 begin
5973 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5975 if Flag128 (BT) then
5976 if Flag129 (BT) then
5977 return Calign_Storage_Unit;
5978 else
5979 return Calign_Component_Size_4;
5980 end if;
5982 else
5983 if Flag129 (BT) then
5984 return Calign_Component_Size;
5985 else
5986 return Calign_Default;
5987 end if;
5988 end if;
5989 end Component_Alignment;
5991 ----------------------
5992 -- Declaration_Node --
5993 ----------------------
5995 function Declaration_Node (Id : E) return N is
5996 P : Node_Id;
5998 begin
5999 if Ekind (Id) = E_Incomplete_Type
6000 and then Present (Full_View (Id))
6001 then
6002 P := Parent (Full_View (Id));
6003 else
6004 P := Parent (Id);
6005 end if;
6007 loop
6008 if Nkind (P) /= N_Selected_Component
6009 and then Nkind (P) /= N_Expanded_Name
6010 and then
6011 not (Nkind (P) = N_Defining_Program_Unit_Name
6012 and then Is_Child_Unit (Id))
6013 then
6014 return P;
6015 else
6016 P := Parent (P);
6017 end if;
6018 end loop;
6019 end Declaration_Node;
6021 ---------------------
6022 -- Designated_Type --
6023 ---------------------
6025 function Designated_Type (Id : E) return E is
6026 Desig_Type : E;
6028 begin
6029 Desig_Type := Directly_Designated_Type (Id);
6031 if Ekind (Desig_Type) = E_Incomplete_Type
6032 and then Present (Full_View (Desig_Type))
6033 then
6034 return Full_View (Desig_Type);
6036 elsif Is_Class_Wide_Type (Desig_Type)
6037 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6038 and then Present (Full_View (Etype (Desig_Type)))
6039 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6040 then
6041 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6043 else
6044 return Desig_Type;
6045 end if;
6046 end Designated_Type;
6048 ----------------------
6049 -- Entry_Index_Type --
6050 ----------------------
6052 function Entry_Index_Type (Id : E) return N is
6053 begin
6054 pragma Assert (Ekind (Id) = E_Entry_Family);
6055 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6056 end Entry_Index_Type;
6058 ---------------------
6059 -- First_Component --
6060 ---------------------
6062 function First_Component (Id : E) return E is
6063 Comp_Id : E;
6065 begin
6066 pragma Assert
6067 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6069 Comp_Id := First_Entity (Id);
6070 while Present (Comp_Id) loop
6071 exit when Ekind (Comp_Id) = E_Component;
6072 Comp_Id := Next_Entity (Comp_Id);
6073 end loop;
6075 return Comp_Id;
6076 end First_Component;
6078 -------------------------------------
6079 -- First_Component_Or_Discriminant --
6080 -------------------------------------
6082 function First_Component_Or_Discriminant (Id : E) return E is
6083 Comp_Id : E;
6085 begin
6086 pragma Assert
6087 (Is_Record_Type (Id)
6088 or else Is_Incomplete_Or_Private_Type (Id)
6089 or else Has_Discriminants (Id));
6091 Comp_Id := First_Entity (Id);
6092 while Present (Comp_Id) loop
6093 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6094 Comp_Id := Next_Entity (Comp_Id);
6095 end loop;
6097 return Comp_Id;
6098 end First_Component_Or_Discriminant;
6100 ------------------
6101 -- First_Formal --
6102 ------------------
6104 function First_Formal (Id : E) return E is
6105 Formal : E;
6107 begin
6108 pragma Assert
6109 (Is_Overloadable (Id)
6110 or else Ekind_In (Id, E_Entry_Family,
6111 E_Subprogram_Body,
6112 E_Subprogram_Type));
6114 if Ekind (Id) = E_Enumeration_Literal then
6115 return Empty;
6117 else
6118 Formal := First_Entity (Id);
6120 if Present (Formal) and then Is_Formal (Formal) then
6121 return Formal;
6122 else
6123 return Empty;
6124 end if;
6125 end if;
6126 end First_Formal;
6128 ------------------------------
6129 -- First_Formal_With_Extras --
6130 ------------------------------
6132 function First_Formal_With_Extras (Id : E) return E is
6133 Formal : E;
6135 begin
6136 pragma Assert
6137 (Is_Overloadable (Id)
6138 or else Ekind_In (Id, E_Entry_Family,
6139 E_Subprogram_Body,
6140 E_Subprogram_Type));
6142 if Ekind (Id) = E_Enumeration_Literal then
6143 return Empty;
6145 else
6146 Formal := First_Entity (Id);
6148 if Present (Formal) and then Is_Formal (Formal) then
6149 return Formal;
6150 else
6151 return Extra_Formals (Id); -- Empty if no extra formals
6152 end if;
6153 end if;
6154 end First_Formal_With_Extras;
6156 -------------------------------------
6157 -- Get_Attribute_Definition_Clause --
6158 -------------------------------------
6160 function Get_Attribute_Definition_Clause
6161 (E : Entity_Id;
6162 Id : Attribute_Id) return Node_Id
6164 N : Node_Id;
6166 begin
6167 N := First_Rep_Item (E);
6168 while Present (N) loop
6169 if Nkind (N) = N_Attribute_Definition_Clause
6170 and then Get_Attribute_Id (Chars (N)) = Id
6171 then
6172 return N;
6173 else
6174 Next_Rep_Item (N);
6175 end if;
6176 end loop;
6178 return Empty;
6179 end Get_Attribute_Definition_Clause;
6181 -------------------
6182 -- Get_Full_View --
6183 -------------------
6185 function Get_Full_View (T : Entity_Id) return Entity_Id is
6186 begin
6187 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6188 return Full_View (T);
6190 elsif Is_Class_Wide_Type (T)
6191 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6192 and then Present (Full_View (Root_Type (T)))
6193 then
6194 return Class_Wide_Type (Full_View (Root_Type (T)));
6196 else
6197 return T;
6198 end if;
6199 end Get_Full_View;
6201 --------------------------------------
6202 -- Get_Record_Representation_Clause --
6203 --------------------------------------
6205 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6206 N : Node_Id;
6208 begin
6209 N := First_Rep_Item (E);
6210 while Present (N) loop
6211 if Nkind (N) = N_Record_Representation_Clause then
6212 return N;
6213 end if;
6215 Next_Rep_Item (N);
6216 end loop;
6218 return Empty;
6219 end Get_Record_Representation_Clause;
6221 ------------------------
6222 -- Has_Attach_Handler --
6223 ------------------------
6225 function Has_Attach_Handler (Id : E) return B is
6226 Ritem : Node_Id;
6228 begin
6229 pragma Assert (Is_Protected_Type (Id));
6231 Ritem := First_Rep_Item (Id);
6232 while Present (Ritem) loop
6233 if Nkind (Ritem) = N_Pragma
6234 and then Pragma_Name (Ritem) = Name_Attach_Handler
6235 then
6236 return True;
6237 else
6238 Next_Rep_Item (Ritem);
6239 end if;
6240 end loop;
6242 return False;
6243 end Has_Attach_Handler;
6245 -----------------
6246 -- Has_Entries --
6247 -----------------
6249 function Has_Entries (Id : E) return B is
6250 Ent : Entity_Id;
6252 begin
6253 pragma Assert (Is_Concurrent_Type (Id));
6255 Ent := First_Entity (Id);
6256 while Present (Ent) loop
6257 if Is_Entry (Ent) then
6258 return True;
6259 end if;
6261 Ent := Next_Entity (Ent);
6262 end loop;
6264 return False;
6265 end Has_Entries;
6267 ----------------------------
6268 -- Has_Foreign_Convention --
6269 ----------------------------
6271 function Has_Foreign_Convention (Id : E) return B is
6272 begin
6273 -- While regular Intrinsics such as the Standard operators fit in the
6274 -- "Ada" convention, those with an Interface_Name materialize GCC
6275 -- builtin imports for which Ada special treatments shouldn't apply.
6277 return Convention (Id) in Foreign_Convention
6278 or else (Convention (Id) = Convention_Intrinsic
6279 and then Present (Interface_Name (Id)));
6280 end Has_Foreign_Convention;
6282 ---------------------------
6283 -- Has_Interrupt_Handler --
6284 ---------------------------
6286 function Has_Interrupt_Handler (Id : E) return B is
6287 Ritem : Node_Id;
6289 begin
6290 pragma Assert (Is_Protected_Type (Id));
6292 Ritem := First_Rep_Item (Id);
6293 while Present (Ritem) loop
6294 if Nkind (Ritem) = N_Pragma
6295 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6296 then
6297 return True;
6298 else
6299 Next_Rep_Item (Ritem);
6300 end if;
6301 end loop;
6303 return False;
6304 end Has_Interrupt_Handler;
6306 --------------------
6307 -- Has_Unmodified --
6308 --------------------
6310 function Has_Unmodified (E : Entity_Id) return Boolean is
6311 begin
6312 if Has_Pragma_Unmodified (E) then
6313 return True;
6314 elsif Warnings_Off (E) then
6315 Set_Warnings_Off_Used_Unmodified (E);
6316 return True;
6317 else
6318 return False;
6319 end if;
6320 end Has_Unmodified;
6322 ---------------------
6323 -- Has_Unreferenced --
6324 ---------------------
6326 function Has_Unreferenced (E : Entity_Id) return Boolean is
6327 begin
6328 if Has_Pragma_Unreferenced (E) then
6329 return True;
6330 elsif Warnings_Off (E) then
6331 Set_Warnings_Off_Used_Unreferenced (E);
6332 return True;
6333 else
6334 return False;
6335 end if;
6336 end Has_Unreferenced;
6338 ----------------------
6339 -- Has_Warnings_Off --
6340 ----------------------
6342 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6343 begin
6344 if Warnings_Off (E) then
6345 Set_Warnings_Off_Used (E);
6346 return True;
6347 else
6348 return False;
6349 end if;
6350 end Has_Warnings_Off;
6352 ------------------------------
6353 -- Implementation_Base_Type --
6354 ------------------------------
6356 function Implementation_Base_Type (Id : E) return E is
6357 Bastyp : Entity_Id;
6358 Imptyp : Entity_Id;
6360 begin
6361 Bastyp := Base_Type (Id);
6363 if Is_Incomplete_Or_Private_Type (Bastyp) then
6364 Imptyp := Underlying_Type (Bastyp);
6366 -- If we have an implementation type, then just return it,
6367 -- otherwise we return the Base_Type anyway. This can only
6368 -- happen in error situations and should avoid some error bombs.
6370 if Present (Imptyp) then
6371 return Base_Type (Imptyp);
6372 else
6373 return Bastyp;
6374 end if;
6376 else
6377 return Bastyp;
6378 end if;
6379 end Implementation_Base_Type;
6381 -------------------------
6382 -- Invariant_Procedure --
6383 -------------------------
6385 function Invariant_Procedure (Id : E) return E is
6386 S : Entity_Id;
6388 begin
6389 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6391 if No (Subprograms_For_Type (Id)) then
6392 return Empty;
6394 else
6395 S := Subprograms_For_Type (Id);
6396 while Present (S) loop
6397 if Has_Invariants (S) then
6398 return S;
6399 else
6400 S := Subprograms_For_Type (S);
6401 end if;
6402 end loop;
6404 return Empty;
6405 end if;
6406 end Invariant_Procedure;
6408 ------------------
6409 -- Is_Base_Type --
6410 ------------------
6412 -- Global flag table allowing rapid computation of this function
6414 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6415 (E_Enumeration_Subtype |
6416 E_Incomplete_Type |
6417 E_Signed_Integer_Subtype |
6418 E_Modular_Integer_Subtype |
6419 E_Floating_Point_Subtype |
6420 E_Ordinary_Fixed_Point_Subtype |
6421 E_Decimal_Fixed_Point_Subtype |
6422 E_Array_Subtype |
6423 E_String_Subtype |
6424 E_Record_Subtype |
6425 E_Private_Subtype |
6426 E_Record_Subtype_With_Private |
6427 E_Limited_Private_Subtype |
6428 E_Access_Subtype |
6429 E_Protected_Subtype |
6430 E_Task_Subtype |
6431 E_String_Literal_Subtype |
6432 E_Class_Wide_Subtype => False,
6433 others => True);
6435 function Is_Base_Type (Id : E) return Boolean is
6436 begin
6437 return Entity_Is_Base_Type (Ekind (Id));
6438 end Is_Base_Type;
6440 ---------------------
6441 -- Is_Boolean_Type --
6442 ---------------------
6444 function Is_Boolean_Type (Id : E) return B is
6445 begin
6446 return Root_Type (Id) = Standard_Boolean;
6447 end Is_Boolean_Type;
6449 ------------------------
6450 -- Is_Constant_Object --
6451 ------------------------
6453 function Is_Constant_Object (Id : E) return B is
6454 K : constant Entity_Kind := Ekind (Id);
6455 begin
6456 return
6457 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6458 end Is_Constant_Object;
6460 --------------------
6461 -- Is_Discriminal --
6462 --------------------
6464 function Is_Discriminal (Id : E) return B is
6465 begin
6466 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6467 and then Present (Discriminal_Link (Id)));
6468 end Is_Discriminal;
6470 ----------------------
6471 -- Is_Dynamic_Scope --
6472 ----------------------
6474 function Is_Dynamic_Scope (Id : E) return B is
6475 begin
6476 return
6477 Ekind (Id) = E_Block
6478 or else
6479 Ekind (Id) = E_Function
6480 or else
6481 Ekind (Id) = E_Procedure
6482 or else
6483 Ekind (Id) = E_Subprogram_Body
6484 or else
6485 Ekind (Id) = E_Task_Type
6486 or else
6487 (Ekind (Id) = E_Limited_Private_Type
6488 and then Present (Full_View (Id))
6489 and then Ekind (Full_View (Id)) = E_Task_Type)
6490 or else
6491 Ekind (Id) = E_Entry
6492 or else
6493 Ekind (Id) = E_Entry_Family
6494 or else
6495 Ekind (Id) = E_Return_Statement;
6496 end Is_Dynamic_Scope;
6498 --------------------
6499 -- Is_Entity_Name --
6500 --------------------
6502 function Is_Entity_Name (N : Node_Id) return Boolean is
6503 Kind : constant Node_Kind := Nkind (N);
6505 begin
6506 -- Identifiers, operator symbols, expanded names are entity names
6508 return Kind = N_Identifier
6509 or else Kind = N_Operator_Symbol
6510 or else Kind = N_Expanded_Name
6512 -- Attribute references are entity names if they refer to an entity.
6513 -- Note that we don't do this by testing for the presence of the
6514 -- Entity field in the N_Attribute_Reference node, since it may not
6515 -- have been set yet.
6517 or else (Kind = N_Attribute_Reference
6518 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6519 end Is_Entity_Name;
6521 ------------------
6522 -- Is_Finalizer --
6523 ------------------
6525 function Is_Finalizer (Id : E) return B is
6526 begin
6527 return Ekind (Id) = E_Procedure
6528 and then Chars (Id) = Name_uFinalizer;
6529 end Is_Finalizer;
6531 --------------------
6532 -- Is_Input_State --
6533 --------------------
6535 function Is_Input_State (Id : E) return B is
6536 begin
6537 return
6538 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Input);
6539 end Is_Input_State;
6541 -------------------
6542 -- Is_Null_State --
6543 -------------------
6545 function Is_Null_State (Id : E) return B is
6546 begin
6547 return
6548 Ekind (Id) = E_Abstract_State
6549 and then Nkind (Parent (Id)) = N_Null;
6550 end Is_Null_State;
6552 ---------------------
6553 -- Is_Output_State --
6554 ---------------------
6556 function Is_Output_State (Id : E) return B is
6557 begin
6558 return
6559 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Output);
6560 end Is_Output_State;
6562 -----------------------------------
6563 -- Is_Package_Or_Generic_Package --
6564 -----------------------------------
6566 function Is_Package_Or_Generic_Package (Id : E) return B is
6567 begin
6568 return
6569 Ekind (Id) = E_Package
6570 or else
6571 Ekind (Id) = E_Generic_Package;
6572 end Is_Package_Or_Generic_Package;
6574 ---------------
6575 -- Is_Prival --
6576 ---------------
6578 function Is_Prival (Id : E) return B is
6579 begin
6580 return (Ekind_In (Id, E_Constant, E_Variable)
6581 and then Present (Prival_Link (Id)));
6582 end Is_Prival;
6584 ----------------------------
6585 -- Is_Protected_Component --
6586 ----------------------------
6588 function Is_Protected_Component (Id : E) return B is
6589 begin
6590 return Ekind (Id) = E_Component
6591 and then Is_Protected_Type (Scope (Id));
6592 end Is_Protected_Component;
6594 ----------------------------
6595 -- Is_Protected_Interface --
6596 ----------------------------
6598 function Is_Protected_Interface (Id : E) return B is
6599 Typ : constant Entity_Id := Base_Type (Id);
6600 begin
6601 if not Is_Interface (Typ) then
6602 return False;
6603 elsif Is_Class_Wide_Type (Typ) then
6604 return Is_Protected_Interface (Etype (Typ));
6605 else
6606 return Protected_Present (Type_Definition (Parent (Typ)));
6607 end if;
6608 end Is_Protected_Interface;
6610 ------------------------------
6611 -- Is_Protected_Record_Type --
6612 ------------------------------
6614 function Is_Protected_Record_Type (Id : E) return B is
6615 begin
6616 return
6617 Is_Concurrent_Record_Type (Id)
6618 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6619 end Is_Protected_Record_Type;
6621 --------------------------------
6622 -- Is_Standard_Character_Type --
6623 --------------------------------
6625 function Is_Standard_Character_Type (Id : E) return B is
6626 begin
6627 if Is_Type (Id) then
6628 declare
6629 R : constant Entity_Id := Root_Type (Id);
6630 begin
6631 return
6632 R = Standard_Character
6633 or else
6634 R = Standard_Wide_Character
6635 or else
6636 R = Standard_Wide_Wide_Character;
6637 end;
6639 else
6640 return False;
6641 end if;
6642 end Is_Standard_Character_Type;
6644 --------------------
6645 -- Is_String_Type --
6646 --------------------
6648 function Is_String_Type (Id : E) return B is
6649 begin
6650 return Ekind (Id) in String_Kind
6651 or else (Is_Array_Type (Id)
6652 and then Id /= Any_Composite
6653 and then Number_Dimensions (Id) = 1
6654 and then Is_Character_Type (Component_Type (Id)));
6655 end Is_String_Type;
6657 -------------------------------
6658 -- Is_Synchronized_Interface --
6659 -------------------------------
6661 function Is_Synchronized_Interface (Id : E) return B is
6662 Typ : constant Entity_Id := Base_Type (Id);
6664 begin
6665 if not Is_Interface (Typ) then
6666 return False;
6668 elsif Is_Class_Wide_Type (Typ) then
6669 return Is_Synchronized_Interface (Etype (Typ));
6671 else
6672 return Protected_Present (Type_Definition (Parent (Typ)))
6673 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6674 or else Task_Present (Type_Definition (Parent (Typ)));
6675 end if;
6676 end Is_Synchronized_Interface;
6678 -----------------------
6679 -- Is_Task_Interface --
6680 -----------------------
6682 function Is_Task_Interface (Id : E) return B is
6683 Typ : constant Entity_Id := Base_Type (Id);
6684 begin
6685 if not Is_Interface (Typ) then
6686 return False;
6687 elsif Is_Class_Wide_Type (Typ) then
6688 return Is_Task_Interface (Etype (Typ));
6689 else
6690 return Task_Present (Type_Definition (Parent (Typ)));
6691 end if;
6692 end Is_Task_Interface;
6694 -------------------------
6695 -- Is_Task_Record_Type --
6696 -------------------------
6698 function Is_Task_Record_Type (Id : E) return B is
6699 begin
6700 return
6701 Is_Concurrent_Record_Type (Id)
6702 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6703 end Is_Task_Record_Type;
6705 -----------------------
6706 -- Is_Volatile_State --
6707 -----------------------
6709 function Is_Volatile_State (Id : E) return B is
6710 begin
6711 return
6712 Ekind (Id) = E_Abstract_State
6713 and then Has_Property (Id, Name_Volatile);
6714 end Is_Volatile_State;
6716 ------------------------
6717 -- Is_Wrapper_Package --
6718 ------------------------
6720 function Is_Wrapper_Package (Id : E) return B is
6721 begin
6722 return (Ekind (Id) = E_Package
6723 and then Present (Related_Instance (Id)));
6724 end Is_Wrapper_Package;
6726 -----------------
6727 -- Last_Formal --
6728 -----------------
6730 function Last_Formal (Id : E) return E is
6731 Formal : E;
6733 begin
6734 pragma Assert
6735 (Is_Overloadable (Id)
6736 or else Ekind_In (Id, E_Entry_Family,
6737 E_Subprogram_Body,
6738 E_Subprogram_Type));
6740 if Ekind (Id) = E_Enumeration_Literal then
6741 return Empty;
6743 else
6744 Formal := First_Formal (Id);
6746 if Present (Formal) then
6747 while Present (Next_Formal (Formal)) loop
6748 Formal := Next_Formal (Formal);
6749 end loop;
6750 end if;
6752 return Formal;
6753 end if;
6754 end Last_Formal;
6756 function Model_Emin_Value (Id : E) return Uint is
6757 begin
6758 return Machine_Emin_Value (Id);
6759 end Model_Emin_Value;
6761 -------------------------
6762 -- Model_Epsilon_Value --
6763 -------------------------
6765 function Model_Epsilon_Value (Id : E) return Ureal is
6766 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6767 begin
6768 return Radix ** (1 - Model_Mantissa_Value (Id));
6769 end Model_Epsilon_Value;
6771 --------------------------
6772 -- Model_Mantissa_Value --
6773 --------------------------
6775 function Model_Mantissa_Value (Id : E) return Uint is
6776 begin
6777 return Machine_Mantissa_Value (Id);
6778 end Model_Mantissa_Value;
6780 -----------------------
6781 -- Model_Small_Value --
6782 -----------------------
6784 function Model_Small_Value (Id : E) return Ureal is
6785 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6786 begin
6787 return Radix ** (Model_Emin_Value (Id) - 1);
6788 end Model_Small_Value;
6790 ------------------------
6791 -- Machine_Emax_Value --
6792 ------------------------
6794 function Machine_Emax_Value (Id : E) return Uint is
6795 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6797 begin
6798 case Float_Rep (Id) is
6799 when IEEE_Binary =>
6800 case Digs is
6801 when 1 .. 6 => return Uint_128;
6802 when 7 .. 15 => return 2**10;
6803 when 16 .. 33 => return 2**14;
6804 when others => return No_Uint;
6805 end case;
6807 when VAX_Native =>
6808 case Digs is
6809 when 1 .. 9 => return 2**7 - 1;
6810 when 10 .. 15 => return 2**10 - 1;
6811 when others => return No_Uint;
6812 end case;
6814 when AAMP =>
6815 return Uint_2 ** Uint_7 - Uint_1;
6816 end case;
6817 end Machine_Emax_Value;
6819 ------------------------
6820 -- Machine_Emin_Value --
6821 ------------------------
6823 function Machine_Emin_Value (Id : E) return Uint is
6824 begin
6825 case Float_Rep (Id) is
6826 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6827 when VAX_Native => return -Machine_Emax_Value (Id);
6828 when AAMP => return -Machine_Emax_Value (Id);
6829 end case;
6830 end Machine_Emin_Value;
6832 ----------------------------
6833 -- Machine_Mantissa_Value --
6834 ----------------------------
6836 function Machine_Mantissa_Value (Id : E) return Uint is
6837 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6839 begin
6840 case Float_Rep (Id) is
6841 when IEEE_Binary =>
6842 case Digs is
6843 when 1 .. 6 => return Uint_24;
6844 when 7 .. 15 => return UI_From_Int (53);
6845 when 16 .. 18 => return Uint_64;
6846 when 19 .. 33 => return UI_From_Int (113);
6847 when others => return No_Uint;
6848 end case;
6850 when VAX_Native =>
6851 case Digs is
6852 when 1 .. 6 => return Uint_24;
6853 when 7 .. 9 => return UI_From_Int (56);
6854 when 10 .. 15 => return UI_From_Int (53);
6855 when others => return No_Uint;
6856 end case;
6858 when AAMP =>
6859 case Digs is
6860 when 1 .. 6 => return Uint_24;
6861 when 7 .. 9 => return UI_From_Int (40);
6862 when others => return No_Uint;
6863 end case;
6864 end case;
6865 end Machine_Mantissa_Value;
6867 -------------------------
6868 -- Machine_Radix_Value --
6869 -------------------------
6871 function Machine_Radix_Value (Id : E) return U is
6872 begin
6873 case Float_Rep (Id) is
6874 when IEEE_Binary | VAX_Native | AAMP =>
6875 return Uint_2;
6876 end case;
6877 end Machine_Radix_Value;
6879 --------------------
6880 -- Next_Component --
6881 --------------------
6883 function Next_Component (Id : E) return E is
6884 Comp_Id : E;
6886 begin
6887 Comp_Id := Next_Entity (Id);
6888 while Present (Comp_Id) loop
6889 exit when Ekind (Comp_Id) = E_Component;
6890 Comp_Id := Next_Entity (Comp_Id);
6891 end loop;
6893 return Comp_Id;
6894 end Next_Component;
6896 ------------------------------------
6897 -- Next_Component_Or_Discriminant --
6898 ------------------------------------
6900 function Next_Component_Or_Discriminant (Id : E) return E is
6901 Comp_Id : E;
6903 begin
6904 Comp_Id := Next_Entity (Id);
6905 while Present (Comp_Id) loop
6906 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6907 Comp_Id := Next_Entity (Comp_Id);
6908 end loop;
6910 return Comp_Id;
6911 end Next_Component_Or_Discriminant;
6913 -----------------------
6914 -- Next_Discriminant --
6915 -----------------------
6917 -- This function actually implements both Next_Discriminant and
6918 -- Next_Stored_Discriminant by making sure that the Discriminant
6919 -- returned is of the same variety as Id.
6921 function Next_Discriminant (Id : E) return E is
6923 -- Derived Tagged types with private extensions look like this...
6925 -- E_Discriminant d1
6926 -- E_Discriminant d2
6927 -- E_Component _tag
6928 -- E_Discriminant d1
6929 -- E_Discriminant d2
6930 -- ...
6932 -- so it is critical not to go past the leading discriminants
6934 D : E := Id;
6936 begin
6937 pragma Assert (Ekind (Id) = E_Discriminant);
6939 loop
6940 D := Next_Entity (D);
6941 if No (D)
6942 or else (Ekind (D) /= E_Discriminant
6943 and then not Is_Itype (D))
6944 then
6945 return Empty;
6946 end if;
6948 exit when Ekind (D) = E_Discriminant
6949 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6950 end loop;
6952 return D;
6953 end Next_Discriminant;
6955 -----------------
6956 -- Next_Formal --
6957 -----------------
6959 function Next_Formal (Id : E) return E is
6960 P : E;
6962 begin
6963 -- Follow the chain of declared entities as long as the kind of the
6964 -- entity corresponds to a formal parameter. Skip internal entities
6965 -- that may have been created for implicit subtypes, in the process
6966 -- of analyzing default expressions.
6968 P := Id;
6969 loop
6970 P := Next_Entity (P);
6972 if No (P) or else Is_Formal (P) then
6973 return P;
6974 elsif not Is_Internal (P) then
6975 return Empty;
6976 end if;
6977 end loop;
6978 end Next_Formal;
6980 -----------------------------
6981 -- Next_Formal_With_Extras --
6982 -----------------------------
6984 function Next_Formal_With_Extras (Id : E) return E is
6985 begin
6986 if Present (Extra_Formal (Id)) then
6987 return Extra_Formal (Id);
6988 else
6989 return Next_Formal (Id);
6990 end if;
6991 end Next_Formal_With_Extras;
6993 ----------------
6994 -- Next_Index --
6995 ----------------
6997 function Next_Index (Id : Node_Id) return Node_Id is
6998 begin
6999 return Next (Id);
7000 end Next_Index;
7002 ------------------
7003 -- Next_Literal --
7004 ------------------
7006 function Next_Literal (Id : E) return E is
7007 begin
7008 pragma Assert (Nkind (Id) in N_Entity);
7009 return Next (Id);
7010 end Next_Literal;
7012 ------------------------------
7013 -- Next_Stored_Discriminant --
7014 ------------------------------
7016 function Next_Stored_Discriminant (Id : E) return E is
7017 begin
7018 -- See comment in Next_Discriminant
7020 return Next_Discriminant (Id);
7021 end Next_Stored_Discriminant;
7023 -----------------------
7024 -- Number_Dimensions --
7025 -----------------------
7027 function Number_Dimensions (Id : E) return Pos is
7028 N : Int;
7029 T : Node_Id;
7031 begin
7032 if Ekind (Id) in String_Kind then
7033 return 1;
7035 else
7036 N := 0;
7037 T := First_Index (Id);
7038 while Present (T) loop
7039 N := N + 1;
7040 T := Next (T);
7041 end loop;
7043 return N;
7044 end if;
7045 end Number_Dimensions;
7047 --------------------
7048 -- Number_Entries --
7049 --------------------
7051 function Number_Entries (Id : E) return Nat is
7052 N : Int;
7053 Ent : Entity_Id;
7055 begin
7056 pragma Assert (Is_Concurrent_Type (Id));
7058 N := 0;
7059 Ent := First_Entity (Id);
7060 while Present (Ent) loop
7061 if Is_Entry (Ent) then
7062 N := N + 1;
7063 end if;
7065 Ent := Next_Entity (Ent);
7066 end loop;
7068 return N;
7069 end Number_Entries;
7071 --------------------
7072 -- Number_Formals --
7073 --------------------
7075 function Number_Formals (Id : E) return Pos is
7076 N : Int;
7077 Formal : Entity_Id;
7079 begin
7080 N := 0;
7081 Formal := First_Formal (Id);
7082 while Present (Formal) loop
7083 N := N + 1;
7084 Formal := Next_Formal (Formal);
7085 end loop;
7087 return N;
7088 end Number_Formals;
7090 --------------------
7091 -- Parameter_Mode --
7092 --------------------
7094 function Parameter_Mode (Id : E) return Formal_Kind is
7095 begin
7096 return Ekind (Id);
7097 end Parameter_Mode;
7099 ------------------------
7100 -- Predicate_Function --
7101 ------------------------
7103 function Predicate_Function (Id : E) return E is
7104 S : Entity_Id;
7106 begin
7107 pragma Assert (Is_Type (Id));
7109 if No (Subprograms_For_Type (Id)) then
7110 return Empty;
7112 else
7113 S := Subprograms_For_Type (Id);
7114 while Present (S) loop
7115 if Has_Predicates (S) then
7116 return S;
7117 else
7118 S := Subprograms_For_Type (S);
7119 end if;
7120 end loop;
7122 return Empty;
7123 end if;
7124 end Predicate_Function;
7126 -------------------------
7127 -- Present_In_Rep_Item --
7128 -------------------------
7130 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7131 Ritem : Node_Id;
7133 begin
7134 Ritem := First_Rep_Item (E);
7136 while Present (Ritem) loop
7137 if Ritem = N then
7138 return True;
7139 end if;
7141 Next_Rep_Item (Ritem);
7142 end loop;
7144 return False;
7145 end Present_In_Rep_Item;
7147 --------------------------
7148 -- Primitive_Operations --
7149 --------------------------
7151 function Primitive_Operations (Id : E) return L is
7152 begin
7153 if Is_Concurrent_Type (Id) then
7154 if Present (Corresponding_Record_Type (Id)) then
7155 return Direct_Primitive_Operations
7156 (Corresponding_Record_Type (Id));
7158 -- If expansion is disabled the corresponding record type is absent,
7159 -- but if the type has ancestors it may have primitive operations.
7161 elsif Is_Tagged_Type (Id) then
7162 return Direct_Primitive_Operations (Id);
7164 else
7165 return No_Elist;
7166 end if;
7167 else
7168 return Direct_Primitive_Operations (Id);
7169 end if;
7170 end Primitive_Operations;
7172 ---------------------
7173 -- Record_Rep_Item --
7174 ---------------------
7176 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7177 begin
7178 Set_Next_Rep_Item (N, First_Rep_Item (E));
7179 Set_First_Rep_Item (E, N);
7180 end Record_Rep_Item;
7182 ---------------
7183 -- Root_Type --
7184 ---------------
7186 function Root_Type (Id : E) return E is
7187 T, Etyp : E;
7189 begin
7190 pragma Assert (Nkind (Id) in N_Entity);
7192 T := Base_Type (Id);
7194 if Ekind (T) = E_Class_Wide_Type then
7195 return Etype (T);
7197 -- Other cases
7199 else
7200 loop
7201 Etyp := Etype (T);
7203 if T = Etyp then
7204 return T;
7206 -- Following test catches some error cases resulting from
7207 -- previous errors.
7209 elsif No (Etyp) then
7210 Check_Error_Detected;
7211 return T;
7213 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7214 return T;
7216 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7217 return T;
7218 end if;
7220 T := Etyp;
7222 -- Return if there is a circularity in the inheritance chain. This
7223 -- happens in some error situations and we do not want to get
7224 -- stuck in this loop.
7226 if T = Base_Type (Id) then
7227 return T;
7228 end if;
7229 end loop;
7230 end if;
7231 end Root_Type;
7233 ---------------------
7234 -- Safe_Emax_Value --
7235 ---------------------
7237 function Safe_Emax_Value (Id : E) return Uint is
7238 begin
7239 return Machine_Emax_Value (Id);
7240 end Safe_Emax_Value;
7242 ----------------------
7243 -- Safe_First_Value --
7244 ----------------------
7246 function Safe_First_Value (Id : E) return Ureal is
7247 begin
7248 return -Safe_Last_Value (Id);
7249 end Safe_First_Value;
7251 ---------------------
7252 -- Safe_Last_Value --
7253 ---------------------
7255 function Safe_Last_Value (Id : E) return Ureal is
7256 Radix : constant Uint := Machine_Radix_Value (Id);
7257 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7258 Emax : constant Uint := Safe_Emax_Value (Id);
7259 Significand : constant Uint := Radix ** Mantissa - 1;
7260 Exponent : constant Uint := Emax - Mantissa;
7262 begin
7263 if Radix = 2 then
7264 return
7265 UR_From_Components
7266 (Num => Significand * 2 ** (Exponent mod 4),
7267 Den => -Exponent / 4,
7268 Rbase => 16);
7270 else
7271 return
7272 UR_From_Components
7273 (Num => Significand,
7274 Den => -Exponent,
7275 Rbase => 16);
7276 end if;
7277 end Safe_Last_Value;
7279 -----------------
7280 -- Scope_Depth --
7281 -----------------
7283 function Scope_Depth (Id : E) return Uint is
7284 Scop : Entity_Id;
7286 begin
7287 Scop := Id;
7288 while Is_Record_Type (Scop) loop
7289 Scop := Scope (Scop);
7290 end loop;
7292 return Scope_Depth_Value (Scop);
7293 end Scope_Depth;
7295 ---------------------
7296 -- Scope_Depth_Set --
7297 ---------------------
7299 function Scope_Depth_Set (Id : E) return B is
7300 begin
7301 return not Is_Record_Type (Id)
7302 and then Field22 (Id) /= Union_Id (Empty);
7303 end Scope_Depth_Set;
7305 -----------------------------
7306 -- Set_Component_Alignment --
7307 -----------------------------
7309 -- Component Alignment is encoded using two flags, Flag128/129 as
7310 -- follows. Note that both flags False = Align_Default, so that the
7311 -- default initialization of flags to False initializes component
7312 -- alignment to the default value as required.
7314 -- Flag128 Flag129 Value
7315 -- ------- ------- -----
7316 -- False False Calign_Default
7317 -- False True Calign_Component_Size
7318 -- True False Calign_Component_Size_4
7319 -- True True Calign_Storage_Unit
7321 procedure Set_Component_Alignment (Id : E; V : C) is
7322 begin
7323 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7324 and then Is_Base_Type (Id));
7326 case V is
7327 when Calign_Default =>
7328 Set_Flag128 (Id, False);
7329 Set_Flag129 (Id, False);
7331 when Calign_Component_Size =>
7332 Set_Flag128 (Id, False);
7333 Set_Flag129 (Id, True);
7335 when Calign_Component_Size_4 =>
7336 Set_Flag128 (Id, True);
7337 Set_Flag129 (Id, False);
7339 when Calign_Storage_Unit =>
7340 Set_Flag128 (Id, True);
7341 Set_Flag129 (Id, True);
7342 end case;
7343 end Set_Component_Alignment;
7345 -----------------------------
7346 -- Set_Invariant_Procedure --
7347 -----------------------------
7349 procedure Set_Invariant_Procedure (Id : E; V : E) is
7350 S : Entity_Id;
7352 begin
7353 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7355 S := Subprograms_For_Type (Id);
7356 Set_Subprograms_For_Type (Id, V);
7357 Set_Subprograms_For_Type (V, S);
7359 while Present (S) loop
7360 if Has_Invariants (S) then
7361 raise Program_Error;
7362 else
7363 S := Subprograms_For_Type (S);
7364 end if;
7365 end loop;
7366 end Set_Invariant_Procedure;
7368 ----------------------------
7369 -- Set_Predicate_Function --
7370 ----------------------------
7372 procedure Set_Predicate_Function (Id : E; V : E) is
7373 S : Entity_Id;
7375 begin
7376 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7378 S := Subprograms_For_Type (Id);
7379 Set_Subprograms_For_Type (Id, V);
7380 Set_Subprograms_For_Type (V, S);
7382 while Present (S) loop
7383 if Has_Predicates (S) then
7384 raise Program_Error;
7385 else
7386 S := Subprograms_For_Type (S);
7387 end if;
7388 end loop;
7389 end Set_Predicate_Function;
7391 -----------------
7392 -- Size_Clause --
7393 -----------------
7395 function Size_Clause (Id : E) return N is
7396 begin
7397 return Rep_Clause (Id, Name_Size);
7398 end Size_Clause;
7400 ------------------------
7401 -- Stream_Size_Clause --
7402 ------------------------
7404 function Stream_Size_Clause (Id : E) return N is
7405 begin
7406 return Rep_Clause (Id, Name_Stream_Size);
7407 end Stream_Size_Clause;
7409 ------------------
7410 -- Subtype_Kind --
7411 ------------------
7413 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7414 Kind : Entity_Kind;
7416 begin
7417 case K is
7418 when Access_Kind =>
7419 Kind := E_Access_Subtype;
7421 when E_Array_Type |
7422 E_Array_Subtype =>
7423 Kind := E_Array_Subtype;
7425 when E_Class_Wide_Type |
7426 E_Class_Wide_Subtype =>
7427 Kind := E_Class_Wide_Subtype;
7429 when E_Decimal_Fixed_Point_Type |
7430 E_Decimal_Fixed_Point_Subtype =>
7431 Kind := E_Decimal_Fixed_Point_Subtype;
7433 when E_Ordinary_Fixed_Point_Type |
7434 E_Ordinary_Fixed_Point_Subtype =>
7435 Kind := E_Ordinary_Fixed_Point_Subtype;
7437 when E_Private_Type |
7438 E_Private_Subtype =>
7439 Kind := E_Private_Subtype;
7441 when E_Limited_Private_Type |
7442 E_Limited_Private_Subtype =>
7443 Kind := E_Limited_Private_Subtype;
7445 when E_Record_Type_With_Private |
7446 E_Record_Subtype_With_Private =>
7447 Kind := E_Record_Subtype_With_Private;
7449 when E_Record_Type |
7450 E_Record_Subtype =>
7451 Kind := E_Record_Subtype;
7453 when E_String_Type |
7454 E_String_Subtype =>
7455 Kind := E_String_Subtype;
7457 when Enumeration_Kind =>
7458 Kind := E_Enumeration_Subtype;
7460 when Float_Kind =>
7461 Kind := E_Floating_Point_Subtype;
7463 when Signed_Integer_Kind =>
7464 Kind := E_Signed_Integer_Subtype;
7466 when Modular_Integer_Kind =>
7467 Kind := E_Modular_Integer_Subtype;
7469 when Protected_Kind =>
7470 Kind := E_Protected_Subtype;
7472 when Task_Kind =>
7473 Kind := E_Task_Subtype;
7475 when others =>
7476 Kind := E_Void;
7477 raise Program_Error;
7478 end case;
7480 return Kind;
7481 end Subtype_Kind;
7483 ---------------------
7484 -- Type_High_Bound --
7485 ---------------------
7487 function Type_High_Bound (Id : E) return Node_Id is
7488 Rng : constant Node_Id := Scalar_Range (Id);
7489 begin
7490 if Nkind (Rng) = N_Subtype_Indication then
7491 return High_Bound (Range_Expression (Constraint (Rng)));
7492 else
7493 return High_Bound (Rng);
7494 end if;
7495 end Type_High_Bound;
7497 --------------------
7498 -- Type_Low_Bound --
7499 --------------------
7501 function Type_Low_Bound (Id : E) return Node_Id is
7502 Rng : constant Node_Id := Scalar_Range (Id);
7503 begin
7504 if Nkind (Rng) = N_Subtype_Indication then
7505 return Low_Bound (Range_Expression (Constraint (Rng)));
7506 else
7507 return Low_Bound (Rng);
7508 end if;
7509 end Type_Low_Bound;
7511 ---------------------
7512 -- Underlying_Type --
7513 ---------------------
7515 function Underlying_Type (Id : E) return E is
7516 begin
7517 -- For record_with_private the underlying type is always the direct
7518 -- full view. Never try to take the full view of the parent it
7519 -- doesn't make sense.
7521 if Ekind (Id) = E_Record_Type_With_Private then
7522 return Full_View (Id);
7524 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7526 -- If we have an incomplete or private type with a full view,
7527 -- then we return the Underlying_Type of this full view
7529 if Present (Full_View (Id)) then
7530 if Id = Full_View (Id) then
7532 -- Previous error in declaration
7534 return Empty;
7536 else
7537 return Underlying_Type (Full_View (Id));
7538 end if;
7540 -- If we have an incomplete entity that comes from the limited
7541 -- view then we return the Underlying_Type of its non-limited
7542 -- view.
7544 elsif From_With_Type (Id)
7545 and then Present (Non_Limited_View (Id))
7546 then
7547 return Underlying_Type (Non_Limited_View (Id));
7549 -- Otherwise check for the case where we have a derived type or
7550 -- subtype, and if so get the Underlying_Type of the parent type.
7552 elsif Etype (Id) /= Id then
7553 return Underlying_Type (Etype (Id));
7555 -- Otherwise we have an incomplete or private type that has
7556 -- no full view, which means that we have not encountered the
7557 -- completion, so return Empty to indicate the underlying type
7558 -- is not yet known.
7560 else
7561 return Empty;
7562 end if;
7564 -- For non-incomplete, non-private types, return the type itself
7565 -- Also for entities that are not types at all return the entity
7566 -- itself.
7568 else
7569 return Id;
7570 end if;
7571 end Underlying_Type;
7573 ---------------
7574 -- Vax_Float --
7575 ---------------
7577 function Vax_Float (Id : E) return B is
7578 begin
7579 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7580 end Vax_Float;
7582 ------------------------
7583 -- Write_Entity_Flags --
7584 ------------------------
7586 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7588 procedure W (Flag_Name : String; Flag : Boolean);
7589 -- Write out given flag if it is set
7591 -------
7592 -- W --
7593 -------
7595 procedure W (Flag_Name : String; Flag : Boolean) is
7596 begin
7597 if Flag then
7598 Write_Str (Prefix);
7599 Write_Str (Flag_Name);
7600 Write_Str (" = True");
7601 Write_Eol;
7602 end if;
7603 end W;
7605 -- Start of processing for Write_Entity_Flags
7607 begin
7608 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7609 and then Is_Base_Type (Id)
7610 then
7611 Write_Str (Prefix);
7612 Write_Str ("Component_Alignment = ");
7614 case Component_Alignment (Id) is
7615 when Calign_Default =>
7616 Write_Str ("Calign_Default");
7618 when Calign_Component_Size =>
7619 Write_Str ("Calign_Component_Size");
7621 when Calign_Component_Size_4 =>
7622 Write_Str ("Calign_Component_Size_4");
7624 when Calign_Storage_Unit =>
7625 Write_Str ("Calign_Storage_Unit");
7626 end case;
7628 Write_Eol;
7629 end if;
7631 W ("Address_Taken", Flag104 (Id));
7632 W ("Body_Needed_For_SAL", Flag40 (Id));
7633 W ("C_Pass_By_Copy", Flag125 (Id));
7634 W ("Can_Never_Be_Null", Flag38 (Id));
7635 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7636 W ("Debug_Info_Off", Flag166 (Id));
7637 W ("Default_Expressions_Processed", Flag108 (Id));
7638 W ("Delay_Cleanups", Flag114 (Id));
7639 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7640 W ("Depends_On_Private", Flag14 (Id));
7641 W ("Discard_Names", Flag88 (Id));
7642 W ("Elaboration_Entity_Required", Flag174 (Id));
7643 W ("Elaborate_Body_Desirable", Flag210 (Id));
7644 W ("Entry_Accepted", Flag152 (Id));
7645 W ("Can_Use_Internal_Rep", Flag229 (Id));
7646 W ("Finalize_Storage_Only", Flag158 (Id));
7647 W ("From_With_Type", Flag159 (Id));
7648 W ("Has_Aliased_Components", Flag135 (Id));
7649 W ("Has_Alignment_Clause", Flag46 (Id));
7650 W ("Has_All_Calls_Remote", Flag79 (Id));
7651 W ("Has_Anonymous_Master", Flag253 (Id));
7652 W ("Has_Atomic_Components", Flag86 (Id));
7653 W ("Has_Biased_Representation", Flag139 (Id));
7654 W ("Has_Completion", Flag26 (Id));
7655 W ("Has_Completion_In_Body", Flag71 (Id));
7656 W ("Has_Complex_Representation", Flag140 (Id));
7657 W ("Has_Component_Size_Clause", Flag68 (Id));
7658 W ("Has_Contiguous_Rep", Flag181 (Id));
7659 W ("Has_Controlled_Component", Flag43 (Id));
7660 W ("Has_Controlling_Result", Flag98 (Id));
7661 W ("Has_Convention_Pragma", Flag119 (Id));
7662 W ("Has_Default_Aspect", Flag39 (Id));
7663 W ("Has_Delayed_Aspects", Flag200 (Id));
7664 W ("Has_Delayed_Freeze", Flag18 (Id));
7665 W ("Has_Discriminants", Flag5 (Id));
7666 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7667 W ("Has_Exit", Flag47 (Id));
7668 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7669 W ("Has_Forward_Instantiation", Flag175 (Id));
7670 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7671 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7672 W ("Has_Homonym", Flag56 (Id));
7673 W ("Has_Implicit_Dereference", Flag251 (Id));
7674 W ("Has_Inheritable_Invariants", Flag248 (Id));
7675 W ("Has_Initial_Value", Flag219 (Id));
7676 W ("Has_Invariants", Flag232 (Id));
7677 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7678 W ("Has_Master_Entity", Flag21 (Id));
7679 W ("Has_Missing_Return", Flag142 (Id));
7680 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7681 W ("Has_Non_Standard_Rep", Flag75 (Id));
7682 W ("Has_Object_Size_Clause", Flag172 (Id));
7683 W ("Has_Per_Object_Constraint", Flag154 (Id));
7684 W ("Has_Postconditions", Flag240 (Id));
7685 W ("Has_Pragma_Controlled", Flag27 (Id));
7686 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7687 W ("Has_Pragma_Inline", Flag157 (Id));
7688 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7689 W ("Has_Pragma_Ordered", Flag198 (Id));
7690 W ("Has_Pragma_Pack", Flag121 (Id));
7691 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7692 W ("Has_Pragma_Pure", Flag203 (Id));
7693 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7694 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7695 W ("Has_Pragma_Unmodified", Flag233 (Id));
7696 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7697 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7698 W ("Has_Predicates", Flag250 (Id));
7699 W ("Has_Primitive_Operations", Flag120 (Id));
7700 W ("Has_Private_Ancestor", Flag151 (Id));
7701 W ("Has_Private_Declaration", Flag155 (Id));
7702 W ("Has_Qualified_Name", Flag161 (Id));
7703 W ("Has_RACW", Flag214 (Id));
7704 W ("Has_Record_Rep_Clause", Flag65 (Id));
7705 W ("Has_Recursive_Call", Flag143 (Id));
7706 W ("Has_Size_Clause", Flag29 (Id));
7707 W ("Has_Small_Clause", Flag67 (Id));
7708 W ("Has_Specified_Layout", Flag100 (Id));
7709 W ("Has_Specified_Stream_Input", Flag190 (Id));
7710 W ("Has_Specified_Stream_Output", Flag191 (Id));
7711 W ("Has_Specified_Stream_Read", Flag192 (Id));
7712 W ("Has_Specified_Stream_Write", Flag193 (Id));
7713 W ("Has_Static_Discriminants", Flag211 (Id));
7714 W ("Has_Storage_Size_Clause", Flag23 (Id));
7715 W ("Has_Stream_Size_Clause", Flag184 (Id));
7716 W ("Has_Task", Flag30 (Id));
7717 W ("Has_Thunks", Flag228 (Id));
7718 W ("Has_Unchecked_Union", Flag123 (Id));
7719 W ("Has_Unknown_Discriminants", Flag72 (Id));
7720 W ("Has_Up_Level_Access", Flag215 (Id));
7721 W ("Has_Volatile_Components", Flag87 (Id));
7722 W ("Has_Xref_Entry", Flag182 (Id));
7723 W ("In_Package_Body", Flag48 (Id));
7724 W ("In_Private_Part", Flag45 (Id));
7725 W ("In_Use", Flag8 (Id));
7726 W ("Is_AST_Entry", Flag132 (Id));
7727 W ("Is_Abstract_Subprogram", Flag19 (Id));
7728 W ("Is_Abstract_Type", Flag146 (Id));
7729 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7730 W ("Is_Access_Constant", Flag69 (Id));
7731 W ("Is_Ada_2005_Only", Flag185 (Id));
7732 W ("Is_Ada_2012_Only", Flag199 (Id));
7733 W ("Is_Aliased", Flag15 (Id));
7734 W ("Is_Asynchronous", Flag81 (Id));
7735 W ("Is_Atomic", Flag85 (Id));
7736 W ("Is_Bit_Packed_Array", Flag122 (Id));
7737 W ("Is_CPP_Class", Flag74 (Id));
7738 W ("Is_Called", Flag102 (Id));
7739 W ("Is_Character_Type", Flag63 (Id));
7740 W ("Is_Child_Unit", Flag73 (Id));
7741 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7742 W ("Is_Compilation_Unit", Flag149 (Id));
7743 W ("Is_Completely_Hidden", Flag103 (Id));
7744 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7745 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7746 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7747 W ("Is_Constrained", Flag12 (Id));
7748 W ("Is_Constructor", Flag76 (Id));
7749 W ("Is_Controlled", Flag42 (Id));
7750 W ("Is_Controlling_Formal", Flag97 (Id));
7751 W ("Is_Descendent_Of_Address", Flag223 (Id));
7752 W ("Is_Discrim_SO_Function", Flag176 (Id));
7753 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7754 W ("Is_Dispatching_Operation", Flag6 (Id));
7755 W ("Is_Eliminated", Flag124 (Id));
7756 W ("Is_Entry_Formal", Flag52 (Id));
7757 W ("Is_Exported", Flag99 (Id));
7758 W ("Is_First_Subtype", Flag70 (Id));
7759 W ("Is_For_Access_Subtype", Flag118 (Id));
7760 W ("Is_Formal_Subprogram", Flag111 (Id));
7761 W ("Is_Frozen", Flag4 (Id));
7762 W ("Is_Generic_Actual_Type", Flag94 (Id));
7763 W ("Is_Generic_Instance", Flag130 (Id));
7764 W ("Is_Generic_Type", Flag13 (Id));
7765 W ("Is_Hidden", Flag57 (Id));
7766 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7767 W ("Is_Immediately_Visible", Flag7 (Id));
7768 W ("Is_Implementation_Defined", Flag254 (Id));
7769 W ("Is_Imported", Flag24 (Id));
7770 W ("Is_Inlined", Flag11 (Id));
7771 W ("Is_Instantiated", Flag126 (Id));
7772 W ("Is_Interface", Flag186 (Id));
7773 W ("Is_Internal", Flag17 (Id));
7774 W ("Is_Interrupt_Handler", Flag89 (Id));
7775 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7776 W ("Is_Itype", Flag91 (Id));
7777 W ("Is_Known_Non_Null", Flag37 (Id));
7778 W ("Is_Known_Null", Flag204 (Id));
7779 W ("Is_Known_Valid", Flag170 (Id));
7780 W ("Is_Limited_Composite", Flag106 (Id));
7781 W ("Is_Limited_Interface", Flag197 (Id));
7782 W ("Is_Limited_Record", Flag25 (Id));
7783 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7784 W ("Is_Non_Static_Subtype", Flag109 (Id));
7785 W ("Is_Null_Init_Proc", Flag178 (Id));
7786 W ("Is_Obsolescent", Flag153 (Id));
7787 W ("Is_Only_Out_Parameter", Flag226 (Id));
7788 W ("Is_Optional_Parameter", Flag134 (Id));
7789 W ("Is_Package_Body_Entity", Flag160 (Id));
7790 W ("Is_Packed", Flag51 (Id));
7791 W ("Is_Packed_Array_Type", Flag138 (Id));
7792 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7793 W ("Is_Preelaborated", Flag59 (Id));
7794 W ("Is_Primitive", Flag218 (Id));
7795 W ("Is_Primitive_Wrapper", Flag195 (Id));
7796 W ("Is_Private_Composite", Flag107 (Id));
7797 W ("Is_Private_Descendant", Flag53 (Id));
7798 W ("Is_Private_Primitive", Flag245 (Id));
7799 W ("Is_Processed_Transient", Flag252 (Id));
7800 W ("Is_Public", Flag10 (Id));
7801 W ("Is_Pure", Flag44 (Id));
7802 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7803 W ("Is_RACW_Stub_Type", Flag244 (Id));
7804 W ("Is_Raised", Flag224 (Id));
7805 W ("Is_Remote_Call_Interface", Flag62 (Id));
7806 W ("Is_Remote_Types", Flag61 (Id));
7807 W ("Is_Renaming_Of_Object", Flag112 (Id));
7808 W ("Is_Return_Object", Flag209 (Id));
7809 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7810 W ("Is_Shared_Passive", Flag60 (Id));
7811 W ("Is_Statically_Allocated", Flag28 (Id));
7812 W ("Is_Tag", Flag78 (Id));
7813 W ("Is_Tagged_Type", Flag55 (Id));
7814 W ("Is_Thunk", Flag225 (Id));
7815 W ("Is_Trivial_Subprogram", Flag235 (Id));
7816 W ("Is_True_Constant", Flag163 (Id));
7817 W ("Is_Unchecked_Union", Flag117 (Id));
7818 W ("Is_Underlying_Record_View", Flag246 (Id));
7819 W ("Is_Unsigned_Type", Flag144 (Id));
7820 W ("Is_VMS_Exception", Flag133 (Id));
7821 W ("Is_Valued_Procedure", Flag127 (Id));
7822 W ("Is_Visible_Formal", Flag206 (Id));
7823 W ("Is_Visible_Lib_Unit", Flag116 (Id));
7824 W ("Is_Volatile", Flag16 (Id));
7825 W ("Itype_Printed", Flag202 (Id));
7826 W ("Kill_Elaboration_Checks", Flag32 (Id));
7827 W ("Kill_Range_Checks", Flag33 (Id));
7828 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7829 W ("Low_Bound_Tested", Flag205 (Id));
7830 W ("Machine_Radix_10", Flag84 (Id));
7831 W ("Materialize_Entity", Flag168 (Id));
7832 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7833 W ("Must_Have_Preelab_Init", Flag208 (Id));
7834 W ("Needs_Debug_Info", Flag147 (Id));
7835 W ("Needs_No_Actuals", Flag22 (Id));
7836 W ("Never_Set_In_Source", Flag115 (Id));
7837 W ("No_Pool_Assigned", Flag131 (Id));
7838 W ("No_Return", Flag113 (Id));
7839 W ("No_Strict_Aliasing", Flag136 (Id));
7840 W ("Non_Binary_Modulus", Flag58 (Id));
7841 W ("Nonzero_Is_True", Flag162 (Id));
7842 W ("OK_To_Rename", Flag247 (Id));
7843 W ("OK_To_Reorder_Components", Flag239 (Id));
7844 W ("Optimize_Alignment_Space", Flag241 (Id));
7845 W ("Optimize_Alignment_Time", Flag242 (Id));
7846 W ("Overlays_Constant", Flag243 (Id));
7847 W ("Reachable", Flag49 (Id));
7848 W ("Referenced", Flag156 (Id));
7849 W ("Referenced_As_LHS", Flag36 (Id));
7850 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7851 W ("Renamed_In_Spec", Flag231 (Id));
7852 W ("Requires_Overriding", Flag213 (Id));
7853 W ("Return_Present", Flag54 (Id));
7854 W ("Returns_By_Ref", Flag90 (Id));
7855 W ("Reverse_Bit_Order", Flag164 (Id));
7856 W ("Reverse_Storage_Order", Flag93 (Id));
7857 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7858 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7859 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7860 W ("Static_Elaboration_Desired", Flag77 (Id));
7861 W ("Strict_Alignment", Flag145 (Id));
7862 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7863 W ("Suppress_Initialization", Flag105 (Id));
7864 W ("Suppress_Style_Checks", Flag165 (Id));
7865 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7866 W ("Treat_As_Volatile", Flag41 (Id));
7867 W ("Universal_Aliasing", Flag216 (Id));
7868 W ("Used_As_Generic_Actual", Flag222 (Id));
7869 W ("Uses_Sec_Stack", Flag95 (Id));
7870 W ("Warnings_Off", Flag96 (Id));
7871 W ("Warnings_Off_Used", Flag236 (Id));
7872 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7873 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7874 W ("Was_Hidden", Flag196 (Id));
7875 end Write_Entity_Flags;
7877 -----------------------
7878 -- Write_Entity_Info --
7879 -----------------------
7881 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7883 procedure Write_Attribute (Which : String; Nam : E);
7884 -- Write attribute value with given string name
7886 procedure Write_Kind (Id : Entity_Id);
7887 -- Write Ekind field of entity
7889 ---------------------
7890 -- Write_Attribute --
7891 ---------------------
7893 procedure Write_Attribute (Which : String; Nam : E) is
7894 begin
7895 Write_Str (Prefix);
7896 Write_Str (Which);
7897 Write_Int (Int (Nam));
7898 Write_Str (" ");
7899 Write_Name (Chars (Nam));
7900 Write_Str (" ");
7901 end Write_Attribute;
7903 ----------------
7904 -- Write_Kind --
7905 ----------------
7907 procedure Write_Kind (Id : Entity_Id) is
7908 K : constant String := Entity_Kind'Image (Ekind (Id));
7910 begin
7911 Write_Str (Prefix);
7912 Write_Str (" Kind ");
7914 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7915 Write_Str ("TAGGED ");
7916 end if;
7918 Write_Str (K (3 .. K'Length));
7919 Write_Str (" ");
7921 if Is_Type (Id) and then Depends_On_Private (Id) then
7922 Write_Str ("Depends_On_Private ");
7923 end if;
7924 end Write_Kind;
7926 -- Start of processing for Write_Entity_Info
7928 begin
7929 Write_Eol;
7930 Write_Attribute ("Name ", Id);
7931 Write_Int (Int (Id));
7932 Write_Eol;
7933 Write_Kind (Id);
7934 Write_Eol;
7935 Write_Attribute (" Type ", Etype (Id));
7936 Write_Eol;
7937 Write_Attribute (" Scope ", Scope (Id));
7938 Write_Eol;
7940 case Ekind (Id) is
7942 when Discrete_Kind =>
7943 Write_Str ("Bounds: Id = ");
7945 if Present (Scalar_Range (Id)) then
7946 Write_Int (Int (Type_Low_Bound (Id)));
7947 Write_Str (" .. Id = ");
7948 Write_Int (Int (Type_High_Bound (Id)));
7949 else
7950 Write_Str ("Empty");
7951 end if;
7953 Write_Eol;
7955 when Array_Kind =>
7956 declare
7957 Index : E;
7959 begin
7960 Write_Attribute
7961 (" Component Type ", Component_Type (Id));
7962 Write_Eol;
7963 Write_Str (Prefix);
7964 Write_Str (" Indexes ");
7966 Index := First_Index (Id);
7967 while Present (Index) loop
7968 Write_Attribute (" ", Etype (Index));
7969 Index := Next_Index (Index);
7970 end loop;
7972 Write_Eol;
7973 end;
7975 when Access_Kind =>
7976 Write_Attribute
7977 (" Directly Designated Type ",
7978 Directly_Designated_Type (Id));
7979 Write_Eol;
7981 when Overloadable_Kind =>
7982 if Present (Homonym (Id)) then
7983 Write_Str (" Homonym ");
7984 Write_Name (Chars (Homonym (Id)));
7985 Write_Str (" ");
7986 Write_Int (Int (Homonym (Id)));
7987 Write_Eol;
7988 end if;
7990 Write_Eol;
7992 when E_Component =>
7993 if Ekind (Scope (Id)) in Record_Kind then
7994 Write_Attribute (
7995 " Original_Record_Component ",
7996 Original_Record_Component (Id));
7997 Write_Int (Int (Original_Record_Component (Id)));
7998 Write_Eol;
7999 end if;
8001 when others => null;
8002 end case;
8003 end Write_Entity_Info;
8005 -----------------------
8006 -- Write_Field6_Name --
8007 -----------------------
8009 procedure Write_Field6_Name (Id : Entity_Id) is
8010 pragma Warnings (Off, Id);
8011 begin
8012 Write_Str ("First_Rep_Item");
8013 end Write_Field6_Name;
8015 -----------------------
8016 -- Write_Field7_Name --
8017 -----------------------
8019 procedure Write_Field7_Name (Id : Entity_Id) is
8020 pragma Warnings (Off, Id);
8021 begin
8022 Write_Str ("Freeze_Node");
8023 end Write_Field7_Name;
8025 -----------------------
8026 -- Write_Field8_Name --
8027 -----------------------
8029 procedure Write_Field8_Name (Id : Entity_Id) is
8030 begin
8031 case Ekind (Id) is
8032 when Type_Kind =>
8033 Write_Str ("Associated_Node_For_Itype");
8035 when E_Package =>
8036 Write_Str ("Dependent_Instances");
8038 when E_Loop =>
8039 Write_Str ("First_Exit_Statement");
8041 when E_Variable =>
8042 Write_Str ("Hiding_Loop_Variable");
8044 when E_Abstract_State =>
8045 Write_Str ("Integrity_Level");
8047 when Formal_Kind |
8048 E_Function |
8049 E_Subprogram_Body =>
8050 Write_Str ("Mechanism");
8052 when E_Component |
8053 E_Discriminant =>
8054 Write_Str ("Normalized_First_Bit");
8056 when E_Procedure =>
8057 Write_Str ("Postcondition_Proc");
8059 when E_Return_Statement =>
8060 Write_Str ("Return_Applies_To");
8062 when others =>
8063 Write_Str ("Field8??");
8064 end case;
8065 end Write_Field8_Name;
8067 -----------------------
8068 -- Write_Field9_Name --
8069 -----------------------
8071 procedure Write_Field9_Name (Id : Entity_Id) is
8072 begin
8073 case Ekind (Id) is
8074 when Type_Kind =>
8075 Write_Str ("Class_Wide_Type");
8077 when Object_Kind =>
8078 Write_Str ("Current_Value");
8080 when E_Abstract_State =>
8081 Write_Str ("Refined_State");
8083 when E_Function |
8084 E_Generic_Function |
8085 E_Generic_Package |
8086 E_Generic_Procedure |
8087 E_Package |
8088 E_Procedure =>
8089 Write_Str ("Renaming_Map");
8091 when others =>
8092 Write_Str ("Field9??");
8093 end case;
8094 end Write_Field9_Name;
8096 ------------------------
8097 -- Write_Field10_Name --
8098 ------------------------
8100 procedure Write_Field10_Name (Id : Entity_Id) is
8101 begin
8102 case Ekind (Id) is
8103 when Class_Wide_Kind |
8104 Incomplete_Kind |
8105 E_Record_Type |
8106 E_Record_Subtype |
8107 Private_Kind |
8108 Concurrent_Kind =>
8109 Write_Str ("Direct_Primitive_Operations");
8111 when Float_Kind =>
8112 Write_Str ("Float_Rep");
8114 when E_In_Parameter |
8115 E_Constant =>
8116 Write_Str ("Discriminal_Link");
8118 when E_Function |
8119 E_Package |
8120 E_Package_Body |
8121 E_Procedure =>
8122 Write_Str ("Handler_Records");
8124 when E_Loop =>
8125 Write_Str ("Loop_Entry_Attributes");
8127 when E_Component |
8128 E_Discriminant =>
8129 Write_Str ("Normalized_Position_Max");
8131 when others =>
8132 Write_Str ("Field10??");
8133 end case;
8134 end Write_Field10_Name;
8136 ------------------------
8137 -- Write_Field11_Name --
8138 ------------------------
8140 procedure Write_Field11_Name (Id : Entity_Id) is
8141 begin
8142 case Ekind (Id) is
8143 when E_Block =>
8144 Write_Str ("Block_Node");
8146 when E_Component |
8147 E_Discriminant =>
8148 Write_Str ("Component_Bit_Offset");
8150 when Formal_Kind =>
8151 Write_Str ("Entry_Component");
8153 when E_Enumeration_Literal =>
8154 Write_Str ("Enumeration_Pos");
8156 when Type_Kind |
8157 E_Constant =>
8158 Write_Str ("Full_View");
8160 when E_Generic_Package =>
8161 Write_Str ("Generic_Homonym");
8163 when E_Function |
8164 E_Procedure |
8165 E_Entry |
8166 E_Entry_Family =>
8167 Write_Str ("Protected_Body_Subprogram");
8169 when others =>
8170 Write_Str ("Field11??");
8171 end case;
8172 end Write_Field11_Name;
8174 ------------------------
8175 -- Write_Field12_Name --
8176 ------------------------
8178 procedure Write_Field12_Name (Id : Entity_Id) is
8179 begin
8180 case Ekind (Id) is
8181 when E_Package =>
8182 Write_Str ("Associated_Formal_Package");
8184 when Entry_Kind =>
8185 Write_Str ("Barrier_Function");
8187 when E_Enumeration_Literal =>
8188 Write_Str ("Enumeration_Rep");
8190 when Type_Kind |
8191 E_Component |
8192 E_Constant |
8193 E_Discriminant |
8194 E_Exception |
8195 E_In_Parameter |
8196 E_In_Out_Parameter |
8197 E_Out_Parameter |
8198 E_Loop_Parameter |
8199 E_Variable =>
8200 Write_Str ("Esize");
8202 when E_Function |
8203 E_Procedure =>
8204 Write_Str ("Next_Inlined_Subprogram");
8206 when others =>
8207 Write_Str ("Field12??");
8208 end case;
8209 end Write_Field12_Name;
8211 ------------------------
8212 -- Write_Field13_Name --
8213 ------------------------
8215 procedure Write_Field13_Name (Id : Entity_Id) is
8216 begin
8217 case Ekind (Id) is
8218 when E_Component |
8219 E_Discriminant =>
8220 Write_Str ("Component_Clause");
8222 when E_Function =>
8223 Write_Str ("Elaboration_Entity");
8225 when E_Procedure |
8226 E_Package |
8227 Generic_Unit_Kind =>
8228 Write_Str ("Elaboration_Entity");
8230 when Formal_Kind |
8231 E_Variable =>
8232 Write_Str ("Extra_Accessibility");
8234 when Type_Kind =>
8235 Write_Str ("RM_Size");
8237 when others =>
8238 Write_Str ("Field13??");
8239 end case;
8240 end Write_Field13_Name;
8242 -----------------------
8243 -- Write_Field14_Name --
8244 -----------------------
8246 procedure Write_Field14_Name (Id : Entity_Id) is
8247 begin
8248 case Ekind (Id) is
8249 when Type_Kind |
8250 Formal_Kind |
8251 E_Constant |
8252 E_Exception |
8253 E_Variable |
8254 E_Loop_Parameter =>
8255 Write_Str ("Alignment");
8257 when E_Function |
8258 E_Procedure =>
8259 Write_Str ("First_Optional_Parameter");
8261 when E_Component |
8262 E_Discriminant =>
8263 Write_Str ("Normalized_Position");
8265 when E_Package |
8266 E_Generic_Package =>
8267 Write_Str ("Shadow_Entities");
8269 when others =>
8270 Write_Str ("Field14??");
8271 end case;
8272 end Write_Field14_Name;
8274 ------------------------
8275 -- Write_Field15_Name --
8276 ------------------------
8278 procedure Write_Field15_Name (Id : Entity_Id) is
8279 begin
8280 case Ekind (Id) is
8281 when E_Discriminant =>
8282 Write_Str ("Discriminant_Number");
8284 when E_Component =>
8285 Write_Str ("DT_Entry_Count");
8287 when E_Function |
8288 E_Procedure =>
8289 Write_Str ("DT_Position");
8291 when E_Protected_Type =>
8292 Write_Str ("Entry_Bodies_Array");
8294 when Entry_Kind =>
8295 Write_Str ("Entry_Parameters_Type");
8297 when Formal_Kind =>
8298 Write_Str ("Extra_Formal");
8300 when Enumeration_Kind =>
8301 Write_Str ("Lit_Indexes");
8303 when E_Package |
8304 E_Package_Body =>
8305 Write_Str ("Related_Instance");
8307 when Decimal_Fixed_Point_Kind =>
8308 Write_Str ("Scale_Value");
8310 when E_Constant |
8311 E_Variable =>
8312 Write_Str ("Status_Flag_Or_Transient_Decl");
8314 when Access_Kind |
8315 Task_Kind =>
8316 Write_Str ("Storage_Size_Variable");
8318 when E_String_Literal_Subtype =>
8319 Write_Str ("String_Literal_Low_Bound");
8321 when others =>
8322 Write_Str ("Field15??");
8323 end case;
8324 end Write_Field15_Name;
8326 ------------------------
8327 -- Write_Field16_Name --
8328 ------------------------
8330 procedure Write_Field16_Name (Id : Entity_Id) is
8331 begin
8332 case Ekind (Id) is
8333 when E_Record_Type |
8334 E_Record_Type_With_Private =>
8335 Write_Str ("Access_Disp_Table");
8337 when E_Record_Subtype |
8338 E_Class_Wide_Subtype =>
8339 Write_Str ("Cloned_Subtype");
8341 when E_Function |
8342 E_Procedure =>
8343 Write_Str ("DTC_Entity");
8345 when E_Component =>
8346 Write_Str ("Entry_Formal");
8348 when E_Package |
8349 E_Generic_Package |
8350 Concurrent_Kind =>
8351 Write_Str ("First_Private_Entity");
8353 when Enumeration_Kind =>
8354 Write_Str ("Lit_Strings");
8356 when E_String_Literal_Subtype =>
8357 Write_Str ("String_Literal_Length");
8359 when E_Variable |
8360 E_Out_Parameter =>
8361 Write_Str ("Unset_Reference");
8363 when others =>
8364 Write_Str ("Field16??");
8365 end case;
8366 end Write_Field16_Name;
8368 ------------------------
8369 -- Write_Field17_Name --
8370 ------------------------
8372 procedure Write_Field17_Name (Id : Entity_Id) is
8373 begin
8374 case Ekind (Id) is
8375 when Formal_Kind |
8376 E_Constant |
8377 E_Generic_In_Out_Parameter |
8378 E_Variable =>
8379 Write_Str ("Actual_Subtype");
8381 when Digits_Kind =>
8382 Write_Str ("Digits_Value");
8384 when E_Discriminant =>
8385 Write_Str ("Discriminal");
8387 when E_Block |
8388 Class_Wide_Kind |
8389 Concurrent_Kind |
8390 Private_Kind |
8391 E_Entry |
8392 E_Entry_Family |
8393 E_Function |
8394 E_Generic_Function |
8395 E_Generic_Package |
8396 E_Generic_Procedure |
8397 E_Loop |
8398 E_Operator |
8399 E_Package |
8400 E_Package_Body |
8401 E_Procedure |
8402 E_Record_Type |
8403 E_Record_Subtype |
8404 E_Return_Statement |
8405 E_Subprogram_Body |
8406 E_Subprogram_Type =>
8407 Write_Str ("First_Entity");
8409 when Array_Kind =>
8410 Write_Str ("First_Index");
8412 when Enumeration_Kind =>
8413 Write_Str ("First_Literal");
8415 when Access_Kind =>
8416 Write_Str ("Master_Id");
8418 when Modular_Integer_Kind =>
8419 Write_Str ("Modulus");
8421 when E_Incomplete_Type =>
8422 Write_Str ("Non_Limited_View");
8424 when E_Incomplete_Subtype =>
8425 if From_With_Type (Id) then
8426 Write_Str ("Non_Limited_View");
8427 end if;
8429 when E_Component =>
8430 Write_Str ("Prival");
8432 when others =>
8433 Write_Str ("Field17??");
8434 end case;
8435 end Write_Field17_Name;
8437 ------------------------
8438 -- Write_Field18_Name --
8439 ------------------------
8441 procedure Write_Field18_Name (Id : Entity_Id) is
8442 begin
8443 case Ekind (Id) is
8444 when E_Enumeration_Literal |
8445 E_Function |
8446 E_Operator |
8447 E_Procedure =>
8448 Write_Str ("Alias");
8450 when E_Record_Type =>
8451 Write_Str ("Corresponding_Concurrent_Type");
8453 when E_Subprogram_Body =>
8454 Write_Str ("Corresponding_Protected_Entry");
8456 when Concurrent_Kind =>
8457 Write_Str ("Corresponding_Record_Type");
8459 when E_Label |
8460 E_Loop |
8461 E_Block =>
8462 Write_Str ("Enclosing_Scope");
8464 when E_Entry_Index_Parameter =>
8465 Write_Str ("Entry_Index_Constant");
8467 when E_Class_Wide_Subtype |
8468 E_Access_Protected_Subprogram_Type |
8469 E_Anonymous_Access_Protected_Subprogram_Type |
8470 E_Access_Subprogram_Type |
8471 E_Exception_Type =>
8472 Write_Str ("Equivalent_Type");
8474 when Fixed_Point_Kind =>
8475 Write_Str ("Delta_Value");
8477 when Incomplete_Or_Private_Kind |
8478 E_Record_Subtype =>
8479 Write_Str ("Private_Dependents");
8481 when Object_Kind =>
8482 Write_Str ("Renamed_Object");
8484 when E_Exception |
8485 E_Package |
8486 E_Generic_Function |
8487 E_Generic_Procedure |
8488 E_Generic_Package =>
8489 Write_Str ("Renamed_Entity");
8491 when others =>
8492 Write_Str ("Field18??");
8493 end case;
8494 end Write_Field18_Name;
8496 -----------------------
8497 -- Write_Field19_Name --
8498 -----------------------
8500 procedure Write_Field19_Name (Id : Entity_Id) is
8501 begin
8502 case Ekind (Id) is
8503 when E_Package |
8504 E_Generic_Package =>
8505 Write_Str ("Body_Entity");
8507 when E_Discriminant =>
8508 Write_Str ("Corresponding_Discriminant");
8510 when Scalar_Kind =>
8511 Write_Str ("Default_Value");
8513 when E_Array_Type =>
8514 Write_Str ("Default_Component_Value");
8516 when E_Record_Type =>
8517 Write_Str ("Parent_Subtype");
8519 when E_Constant |
8520 E_Variable =>
8521 Write_Str ("Size_Check_Code");
8523 when E_Package_Body |
8524 Formal_Kind =>
8525 Write_Str ("Spec_Entity");
8527 when Private_Kind =>
8528 Write_Str ("Underlying_Full_View");
8530 when E_Function | E_Operator | E_Subprogram_Type =>
8531 Write_Str ("Extra_Accessibility_Of_Result");
8533 when others =>
8534 Write_Str ("Field19??");
8535 end case;
8536 end Write_Field19_Name;
8538 -----------------------
8539 -- Write_Field20_Name --
8540 -----------------------
8542 procedure Write_Field20_Name (Id : Entity_Id) is
8543 begin
8544 case Ekind (Id) is
8545 when Array_Kind =>
8546 Write_Str ("Component_Type");
8548 when E_In_Parameter |
8549 E_Generic_In_Parameter =>
8550 Write_Str ("Default_Value");
8552 when Access_Kind =>
8553 Write_Str ("Directly_Designated_Type");
8555 when E_Component =>
8556 Write_Str ("Discriminant_Checking_Func");
8558 when E_Discriminant =>
8559 Write_Str ("Discriminant_Default_Value");
8561 when E_Block |
8562 Class_Wide_Kind |
8563 Concurrent_Kind |
8564 Private_Kind |
8565 E_Entry |
8566 E_Entry_Family |
8567 E_Function |
8568 E_Generic_Function |
8569 E_Generic_Package |
8570 E_Generic_Procedure |
8571 E_Loop |
8572 E_Operator |
8573 E_Package |
8574 E_Package_Body |
8575 E_Procedure |
8576 E_Record_Type |
8577 E_Record_Subtype |
8578 E_Return_Statement |
8579 E_Subprogram_Body |
8580 E_Subprogram_Type =>
8581 Write_Str ("Last_Entity");
8583 when E_Constant |
8584 E_Variable =>
8585 Write_Str ("Prival_Link");
8587 when Scalar_Kind =>
8588 Write_Str ("Scalar_Range");
8590 when E_Exception =>
8591 Write_Str ("Register_Exception_Call");
8593 when others =>
8594 Write_Str ("Field20??");
8595 end case;
8596 end Write_Field20_Name;
8598 -----------------------
8599 -- Write_Field21_Name --
8600 -----------------------
8602 procedure Write_Field21_Name (Id : Entity_Id) is
8603 begin
8604 case Ekind (Id) is
8605 when Entry_Kind =>
8606 Write_Str ("Accept_Address");
8608 when E_In_Parameter =>
8609 Write_Str ("Default_Expr_Function");
8611 when Concurrent_Kind |
8612 Incomplete_Or_Private_Kind |
8613 Class_Wide_Kind |
8614 E_Record_Type |
8615 E_Record_Subtype =>
8616 Write_Str ("Discriminant_Constraint");
8618 when E_Constant |
8619 E_Exception |
8620 E_Function |
8621 E_Generic_Function |
8622 E_Procedure |
8623 E_Generic_Procedure |
8624 E_Variable =>
8625 Write_Str ("Interface_Name");
8627 when Array_Kind |
8628 Modular_Integer_Kind =>
8629 Write_Str ("Original_Array_Type");
8631 when Fixed_Point_Kind =>
8632 Write_Str ("Small_Value");
8634 when others =>
8635 Write_Str ("Field21??");
8636 end case;
8637 end Write_Field21_Name;
8639 -----------------------
8640 -- Write_Field22_Name --
8641 -----------------------
8643 procedure Write_Field22_Name (Id : Entity_Id) is
8644 begin
8645 case Ekind (Id) is
8646 when Access_Kind =>
8647 Write_Str ("Associated_Storage_Pool");
8649 when Array_Kind =>
8650 Write_Str ("Component_Size");
8652 when E_Record_Type =>
8653 Write_Str ("Corresponding_Remote_Type");
8655 when E_Component |
8656 E_Discriminant =>
8657 Write_Str ("Original_Record_Component");
8659 when E_Enumeration_Literal =>
8660 Write_Str ("Enumeration_Rep_Expr");
8662 when E_Exception =>
8663 Write_Str ("Exception_Code");
8665 when E_Record_Type_With_Private |
8666 E_Record_Subtype_With_Private |
8667 E_Private_Type |
8668 E_Private_Subtype |
8669 E_Limited_Private_Type |
8670 E_Limited_Private_Subtype =>
8671 Write_Str ("Private_View");
8673 when Formal_Kind =>
8674 Write_Str ("Protected_Formal");
8676 when E_Block |
8677 E_Entry |
8678 E_Entry_Family |
8679 E_Function |
8680 E_Loop |
8681 E_Package |
8682 E_Package_Body |
8683 E_Generic_Package |
8684 E_Generic_Function |
8685 E_Generic_Procedure |
8686 E_Procedure |
8687 E_Protected_Type |
8688 E_Return_Statement |
8689 E_Subprogram_Body |
8690 E_Task_Type =>
8691 Write_Str ("Scope_Depth_Value");
8693 when E_Variable =>
8694 Write_Str ("Shared_Var_Procs_Instance");
8696 when others =>
8697 Write_Str ("Field22??");
8698 end case;
8699 end Write_Field22_Name;
8701 ------------------------
8702 -- Write_Field23_Name --
8703 ------------------------
8705 procedure Write_Field23_Name (Id : Entity_Id) is
8706 begin
8707 case Ekind (Id) is
8708 when E_Discriminant =>
8709 Write_Str ("CR_Discriminant");
8711 when E_Block =>
8712 Write_Str ("Entry_Cancel_Parameter");
8714 when E_Enumeration_Type =>
8715 Write_Str ("Enum_Pos_To_Rep");
8717 when Formal_Kind |
8718 E_Variable =>
8719 Write_Str ("Extra_Constrained");
8721 when Access_Kind =>
8722 Write_Str ("Finalization_Master");
8724 when E_Generic_Function |
8725 E_Generic_Package |
8726 E_Generic_Procedure =>
8727 Write_Str ("Inner_Instances");
8729 when Array_Kind =>
8730 Write_Str ("Packed_Array_Type");
8732 when Entry_Kind =>
8733 Write_Str ("Protection_Object");
8735 when Concurrent_Kind |
8736 Incomplete_Or_Private_Kind |
8737 Class_Wide_Kind |
8738 E_Record_Type |
8739 E_Record_Subtype =>
8740 Write_Str ("Stored_Constraint");
8742 when E_Function |
8743 E_Procedure =>
8744 if Present (Scope (Id))
8745 and then Is_Protected_Type (Scope (Id))
8746 then
8747 Write_Str ("Protection_Object");
8748 else
8749 Write_Str ("Generic_Renamings");
8750 end if;
8752 when E_Package =>
8753 if Is_Generic_Instance (Id) then
8754 Write_Str ("Generic_Renamings");
8755 else
8756 Write_Str ("Limited_View");
8757 end if;
8759 when others =>
8760 Write_Str ("Field23??");
8761 end case;
8762 end Write_Field23_Name;
8764 ------------------------
8765 -- Write_Field24_Name --
8766 ------------------------
8768 procedure Write_Field24_Name (Id : Entity_Id) is
8769 begin
8770 case Ekind (Id) is
8771 when E_Package |
8772 E_Package_Body =>
8773 Write_Str ("Finalizer");
8775 when E_Constant |
8776 E_Variable |
8777 Type_Kind =>
8778 Write_Str ("Related_Expression");
8780 when E_Entry |
8781 E_Entry_Family |
8782 Subprogram_Kind |
8783 Generic_Subprogram_Kind =>
8784 Write_Str ("Contract");
8786 when others =>
8787 Write_Str ("Field24???");
8788 end case;
8789 end Write_Field24_Name;
8791 ------------------------
8792 -- Write_Field25_Name --
8793 ------------------------
8795 procedure Write_Field25_Name (Id : Entity_Id) is
8796 begin
8797 case Ekind (Id) is
8798 when E_Package =>
8799 Write_Str ("Abstract_States");
8801 when E_Variable =>
8802 Write_Str ("Debug_Renaming_Link");
8804 when E_Component =>
8805 Write_Str ("DT_Offset_To_Top_Func");
8807 when E_Procedure |
8808 E_Function =>
8809 Write_Str ("Interface_Alias");
8811 when E_Record_Type |
8812 E_Record_Subtype |
8813 E_Record_Type_With_Private |
8814 E_Record_Subtype_With_Private =>
8815 Write_Str ("Interfaces");
8817 when E_Array_Type |
8818 E_Array_Subtype =>
8819 Write_Str ("Related_Array_Object");
8821 when Task_Kind =>
8822 Write_Str ("Task_Body_Procedure");
8824 when E_Entry |
8825 E_Entry_Family =>
8826 Write_Str ("PPC_Wrapper");
8828 when E_Enumeration_Subtype |
8829 E_Modular_Integer_Subtype |
8830 E_Signed_Integer_Subtype =>
8831 Write_Str ("Static_Predicate");
8833 when others =>
8834 Write_Str ("Field25??");
8835 end case;
8836 end Write_Field25_Name;
8838 ------------------------
8839 -- Write_Field26_Name --
8840 ------------------------
8842 procedure Write_Field26_Name (Id : Entity_Id) is
8843 begin
8844 case Ekind (Id) is
8845 when E_Record_Type |
8846 E_Record_Type_With_Private =>
8847 Write_Str ("Dispatch_Table_Wrappers");
8849 when E_In_Out_Parameter |
8850 E_Out_Parameter |
8851 E_Variable =>
8852 Write_Str ("Last_Assignment");
8854 when E_Access_Subprogram_Type =>
8855 Write_Str ("Original_Access_Type");
8857 when E_Generic_Package |
8858 E_Package =>
8859 Write_Str ("Package_Instantiation");
8861 when E_Component |
8862 E_Constant =>
8863 Write_Str ("Related_Type");
8865 when Task_Kind =>
8866 Write_Str ("Relative_Deadline_Variable");
8868 when E_Procedure |
8869 E_Function =>
8870 Write_Str ("Overridden_Operation");
8872 when others =>
8873 Write_Str ("Field26??");
8874 end case;
8875 end Write_Field26_Name;
8877 ------------------------
8878 -- Write_Field27_Name --
8879 ------------------------
8881 procedure Write_Field27_Name (Id : Entity_Id) is
8882 begin
8883 case Ekind (Id) is
8884 when E_Package |
8885 Type_Kind =>
8886 Write_Str ("Current_Use_Clause");
8888 when E_Component |
8889 E_Constant |
8890 E_Variable =>
8891 Write_Str ("Related_Type");
8893 when E_Procedure =>
8894 Write_Str ("Wrapped_Entity");
8896 when others =>
8897 Write_Str ("Field27??");
8898 end case;
8899 end Write_Field27_Name;
8901 ------------------------
8902 -- Write_Field28_Name --
8903 ------------------------
8905 procedure Write_Field28_Name (Id : Entity_Id) is
8906 begin
8907 case Ekind (Id) is
8908 when E_Entry |
8909 E_Entry_Family |
8910 E_Function |
8911 E_Procedure |
8912 E_Subprogram_Body |
8913 E_Subprogram_Type =>
8914 Write_Str ("Extra_Formals");
8916 when E_Constant | E_Variable =>
8917 Write_Str ("Initialization_Statements");
8919 when E_Record_Type =>
8920 Write_Str ("Underlying_Record_View");
8922 when others =>
8923 Write_Str ("Field28??");
8924 end case;
8925 end Write_Field28_Name;
8927 ------------------------
8928 -- Write_Field29_Name --
8929 ------------------------
8931 procedure Write_Field29_Name (Id : Entity_Id) is
8932 begin
8933 case Ekind (Id) is
8934 when Type_Kind =>
8935 Write_Str ("Subprograms_For_Type");
8937 when others =>
8938 Write_Str ("Field29??");
8939 end case;
8940 end Write_Field29_Name;
8942 ------------------------
8943 -- Write_Field30_Name --
8944 ------------------------
8946 procedure Write_Field30_Name (Id : Entity_Id) is
8947 begin
8948 case Ekind (Id) is
8949 when E_Function =>
8950 Write_Str ("Corresponding_Equality");
8952 when E_Procedure =>
8953 Write_Str ("Static_Initialization");
8955 when others =>
8956 Write_Str ("Field30??");
8957 end case;
8958 end Write_Field30_Name;
8960 ------------------------
8961 -- Write_Field31_Name --
8962 ------------------------
8964 procedure Write_Field31_Name (Id : Entity_Id) is
8965 begin
8966 case Ekind (Id) is
8967 when others =>
8968 Write_Str ("Field31??");
8969 end case;
8970 end Write_Field31_Name;
8972 ------------------------
8973 -- Write_Field32_Name --
8974 ------------------------
8976 procedure Write_Field32_Name (Id : Entity_Id) is
8977 begin
8978 case Ekind (Id) is
8979 when others =>
8980 Write_Str ("Field32??");
8981 end case;
8982 end Write_Field32_Name;
8984 ------------------------
8985 -- Write_Field33_Name --
8986 ------------------------
8988 procedure Write_Field33_Name (Id : Entity_Id) is
8989 begin
8990 case Ekind (Id) is
8991 when others =>
8992 Write_Str ("Field33??");
8993 end case;
8994 end Write_Field33_Name;
8996 ------------------------
8997 -- Write_Field34_Name --
8998 ------------------------
9000 procedure Write_Field34_Name (Id : Entity_Id) is
9001 begin
9002 case Ekind (Id) is
9003 when others =>
9004 Write_Str ("Field34??");
9005 end case;
9006 end Write_Field34_Name;
9008 ------------------------
9009 -- Write_Field35_Name --
9010 ------------------------
9012 procedure Write_Field35_Name (Id : Entity_Id) is
9013 begin
9014 case Ekind (Id) is
9015 when others =>
9016 Write_Str ("Field35??");
9017 end case;
9018 end Write_Field35_Name;
9020 -------------------------
9021 -- Iterator Procedures --
9022 -------------------------
9024 procedure Proc_Next_Component (N : in out Node_Id) is
9025 begin
9026 N := Next_Component (N);
9027 end Proc_Next_Component;
9029 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9030 begin
9031 N := Next_Entity (N);
9032 while Present (N) loop
9033 exit when Ekind_In (N, E_Component, E_Discriminant);
9034 N := Next_Entity (N);
9035 end loop;
9036 end Proc_Next_Component_Or_Discriminant;
9038 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9039 begin
9040 N := Next_Discriminant (N);
9041 end Proc_Next_Discriminant;
9043 procedure Proc_Next_Formal (N : in out Node_Id) is
9044 begin
9045 N := Next_Formal (N);
9046 end Proc_Next_Formal;
9048 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9049 begin
9050 N := Next_Formal_With_Extras (N);
9051 end Proc_Next_Formal_With_Extras;
9053 procedure Proc_Next_Index (N : in out Node_Id) is
9054 begin
9055 N := Next_Index (N);
9056 end Proc_Next_Index;
9058 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9059 begin
9060 N := Next_Inlined_Subprogram (N);
9061 end Proc_Next_Inlined_Subprogram;
9063 procedure Proc_Next_Literal (N : in out Node_Id) is
9064 begin
9065 N := Next_Literal (N);
9066 end Proc_Next_Literal;
9068 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9069 begin
9070 N := Next_Stored_Discriminant (N);
9071 end Proc_Next_Stored_Discriminant;
9073 end Einfo;