* lto.c (do_stream_out): Add PART parameter; open dump file.
[official-gcc.git] / gcc / ada / einfo.adb
blobc41dc30bd908f6bfc47c9697dd129c20ce485187
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
43 package body Einfo is
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
61 -- Chars Name1
62 -- Next_Entity Node2
63 -- Scope Node3
64 -- Etype Node5
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
70 -- Homonym Node4
71 -- First_Rep_Item Node6
72 -- Freeze_Node Node7
73 -- Prev_Entity Node36
74 -- Associated_Entity Node37
76 -- The usage of other fields (and the entity kinds to which it applies)
77 -- depends on the particular field (see Einfo spec for details).
79 -- Associated_Node_For_Itype Node8
80 -- Dependent_Instances Elist8
81 -- Hiding_Loop_Variable Node8
82 -- Mechanism Uint8 (but returns Mechanism_Type)
83 -- Normalized_First_Bit Uint8
84 -- Refinement_Constituents Elist8
85 -- Return_Applies_To Node8
86 -- First_Exit_Statement Node8
88 -- Class_Wide_Type Node9
89 -- Current_Value Node9
90 -- Renaming_Map Uint9
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
96 -- Normalized_Position_Max Uint10
97 -- Part_Of_Constituents Elist10
99 -- Block_Node Node11
100 -- Component_Bit_Offset Uint11
101 -- Full_View Node11
102 -- Entry_Component Node11
103 -- Enumeration_Pos Uint11
104 -- Generic_Homonym Node11
105 -- Part_Of_References Elist11
106 -- Protected_Body_Subprogram Node11
108 -- Barrier_Function Node12
109 -- Enumeration_Rep Uint12
110 -- Esize Uint12
111 -- Next_Inlined_Subprogram Node12
113 -- Component_Clause Node13
114 -- Elaboration_Entity Node13
115 -- Extra_Accessibility Node13
116 -- RM_Size Uint13
118 -- Alignment Uint14
119 -- Normalized_Position Uint14
120 -- Postconditions_Proc Node14
121 -- Shadow_Entities List14
123 -- Discriminant_Number Uint15
124 -- DT_Position Uint15
125 -- DT_Entry_Count Uint15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Pending_Access_Types Elist15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
132 -- Access_Disp_Table Elist16
133 -- Body_References Elist16
134 -- Cloned_Subtype Node16
135 -- DTC_Entity Node16
136 -- Entry_Formal Node16
137 -- First_Private_Entity Node16
138 -- Lit_Strings Node16
139 -- Scale_Value Uint16
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 -- Prival Node17
153 -- Alias Node18
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Protected_Entry Node18
156 -- Corresponding_Record_Type Node18
157 -- Delta_Value Ureal18
158 -- Enclosing_Scope Node18
159 -- Equivalent_Type Node18
160 -- Lit_Indexes Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
164 -- String_Literal_Low_Bound Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Entry_Bodies_Array Node19
171 -- Extra_Accessibility_Of_Result Node19
172 -- Non_Limited_View Node19
173 -- Parent_Subtype Node19
174 -- Receiving_Entry Node19
175 -- Size_Check_Code Node19
176 -- Spec_Entity Node19
177 -- Underlying_Full_View Node19
179 -- Component_Type Node20
180 -- Default_Value Node20
181 -- Directly_Designated_Type Node20
182 -- Discriminant_Checking_Func Node20
183 -- Discriminant_Default_Value Node20
184 -- Last_Entity Node20
185 -- Prival_Link Node20
186 -- Register_Exception_Call Node20
187 -- Scalar_Range Node20
189 -- Accept_Address Elist21
190 -- Corresponding_Record_Component Node21
191 -- Default_Expr_Function Node21
192 -- Discriminant_Constraint Elist21
193 -- Interface_Name Node21
194 -- Original_Array_Type Node21
195 -- Small_Value Ureal21
197 -- Associated_Storage_Pool Node22
198 -- Component_Size Uint22
199 -- Corresponding_Remote_Type Node22
200 -- Enumeration_Rep_Expr Node22
201 -- Original_Record_Component Node22
202 -- Private_View Node22
203 -- Protected_Formal Node22
204 -- Scope_Depth_Value Uint22
205 -- Shared_Var_Procs_Instance Node22
207 -- CR_Discriminant Node23
208 -- Entry_Cancel_Parameter Node23
209 -- Enum_Pos_To_Rep Node23
210 -- Extra_Constrained Node23
211 -- Finalization_Master Node23
212 -- Generic_Renamings Elist23
213 -- Inner_Instances Elist23
214 -- Limited_View Node23
215 -- Packed_Array_Impl_Type Node23
216 -- Protection_Object Node23
217 -- Stored_Constraint Elist23
219 -- Incomplete_Actuals Elist24
220 -- Related_Expression Node24
221 -- Subps_Index Uint24
223 -- Contract_Wrapper Node25
224 -- Debug_Renaming_Link Node25
225 -- DT_Offset_To_Top_Func Node25
226 -- Interface_Alias Node25
227 -- Interfaces Elist25
228 -- Related_Array_Object Node25
229 -- Static_Discrete_Predicate List25
230 -- Static_Real_Or_String_Predicate Node25
231 -- Task_Body_Procedure Node25
233 -- Dispatch_Table_Wrappers Elist26
234 -- Last_Assignment Node26
235 -- Overridden_Operation Node26
236 -- Package_Instantiation Node26
237 -- Storage_Size_Variable Node26
239 -- Current_Use_Clause Node27
240 -- Related_Type Node27
241 -- Wrapped_Entity Node27
243 -- Extra_Formals Node28
244 -- Finalizer Node28
245 -- Initialization_Statements Node28
246 -- Original_Access_Type Node28
247 -- Relative_Deadline_Variable Node28
248 -- Underlying_Record_View Node28
250 -- Anonymous_Masters Elist29
251 -- BIP_Initialization_Call Node29
252 -- Subprograms_For_Type Elist29
254 -- Access_Disp_Table_Elab_Flag Node30
255 -- Anonymous_Object Node30
256 -- Corresponding_Equality Node30
257 -- Hidden_In_Formal_Instance Elist30
258 -- Last_Aggregate_Assignment Node30
259 -- Static_Initialization Node30
261 -- Activation_Record_Component Node31
262 -- Derived_Type_Link Node31
263 -- Thunk_Entity Node31
265 -- Corresponding_Function Node32
266 -- Corresponding_Procedure Node32
267 -- Encapsulating_State Node32
268 -- No_Tagged_Streams_Pragma Node32
270 -- Linker_Section_Pragma Node33
272 -- Contract Node34
274 -- Anonymous_Designated_Type Node35
275 -- Entry_Max_Queue_Lengths_Array Node35
276 -- Import_Pragma Node35
278 -- Validated_Object Node38
279 -- Predicated_Parent Node38
280 -- Class_Wide_Clone Node38
282 -- Protected_Subprogram Node39
284 -- SPARK_Pragma Node40
286 -- Original_Protected_Subprogram Node41
287 -- SPARK_Aux_Pragma Node41
289 ---------------------------------------------
290 -- Usage of Flags in Defining Entity Nodes --
291 ---------------------------------------------
293 -- All flags are unique, there is no overlaying, so each flag is physically
294 -- present in every entity. However, for many of the flags, it only makes
295 -- sense for them to be set true for certain subsets of entity kinds. See
296 -- the spec of Einfo for further details.
298 -- Is_Inlined_Always Flag1
299 -- Is_Hidden_Non_Overridden_Subpgm Flag2
300 -- Has_Own_DIC Flag3
301 -- Is_Frozen Flag4
302 -- Has_Discriminants Flag5
303 -- Is_Dispatching_Operation Flag6
304 -- Is_Immediately_Visible Flag7
305 -- In_Use Flag8
306 -- Is_Potentially_Use_Visible Flag9
307 -- Is_Public Flag10
309 -- Is_Inlined Flag11
310 -- Is_Constrained Flag12
311 -- Is_Generic_Type Flag13
312 -- Depends_On_Private Flag14
313 -- Is_Aliased Flag15
314 -- Is_Volatile Flag16
315 -- Is_Internal Flag17
316 -- Has_Delayed_Freeze Flag18
317 -- Is_Abstract_Subprogram Flag19
318 -- Is_Concurrent_Record_Type Flag20
320 -- Has_Master_Entity Flag21
321 -- Needs_No_Actuals Flag22
322 -- Has_Storage_Size_Clause Flag23
323 -- Is_Imported Flag24
324 -- Is_Limited_Record Flag25
325 -- Has_Completion Flag26
326 -- Has_Pragma_Controlled Flag27
327 -- Is_Statically_Allocated Flag28
328 -- Has_Size_Clause Flag29
329 -- Has_Task Flag30
331 -- Checks_May_Be_Suppressed Flag31
332 -- Kill_Elaboration_Checks Flag32
333 -- Kill_Range_Checks Flag33
334 -- Has_Independent_Components Flag34
335 -- Is_Class_Wide_Equivalent_Type Flag35
336 -- Referenced_As_LHS Flag36
337 -- Is_Known_Non_Null Flag37
338 -- Can_Never_Be_Null Flag38
339 -- Has_Default_Aspect Flag39
340 -- Body_Needed_For_SAL Flag40
342 -- Treat_As_Volatile Flag41
343 -- Is_Controlled_Active Flag42
344 -- Has_Controlled_Component Flag43
345 -- Is_Pure Flag44
346 -- In_Private_Part Flag45
347 -- Has_Alignment_Clause Flag46
348 -- Has_Exit Flag47
349 -- In_Package_Body Flag48
350 -- Reachable Flag49
351 -- Delay_Subprogram_Descriptors Flag50
353 -- Is_Packed Flag51
354 -- Is_Entry_Formal Flag52
355 -- Is_Private_Descendant Flag53
356 -- Return_Present Flag54
357 -- Is_Tagged_Type Flag55
358 -- Has_Homonym Flag56
359 -- Is_Hidden Flag57
360 -- Non_Binary_Modulus Flag58
361 -- Is_Preelaborated Flag59
362 -- Is_Shared_Passive Flag60
364 -- Is_Remote_Types Flag61
365 -- Is_Remote_Call_Interface Flag62
366 -- Is_Character_Type Flag63
367 -- Is_Intrinsic_Subprogram Flag64
368 -- Has_Record_Rep_Clause Flag65
369 -- Has_Enumeration_Rep_Clause Flag66
370 -- Has_Small_Clause Flag67
371 -- Has_Component_Size_Clause Flag68
372 -- Is_Access_Constant Flag69
373 -- Is_First_Subtype Flag70
375 -- Has_Completion_In_Body Flag71
376 -- Has_Unknown_Discriminants Flag72
377 -- Is_Child_Unit Flag73
378 -- Is_CPP_Class Flag74
379 -- Has_Non_Standard_Rep Flag75
380 -- Is_Constructor Flag76
381 -- Static_Elaboration_Desired Flag77
382 -- Is_Tag Flag78
383 -- Has_All_Calls_Remote Flag79
384 -- Is_Constr_Subt_For_U_Nominal Flag80
386 -- Is_Asynchronous Flag81
387 -- Has_Gigi_Rep_Item Flag82
388 -- Has_Machine_Radix_Clause Flag83
389 -- Machine_Radix_10 Flag84
390 -- Is_Atomic Flag85
391 -- Has_Atomic_Components Flag86
392 -- Has_Volatile_Components Flag87
393 -- Discard_Names Flag88
394 -- Is_Interrupt_Handler Flag89
395 -- Returns_By_Ref Flag90
397 -- Is_Itype Flag91
398 -- Size_Known_At_Compile_Time Flag92
399 -- Reverse_Storage_Order Flag93
400 -- Is_Generic_Actual_Type Flag94
401 -- Uses_Sec_Stack Flag95
402 -- Warnings_Off Flag96
403 -- Is_Controlling_Formal Flag97
404 -- Has_Controlling_Result Flag98
405 -- Is_Exported Flag99
406 -- Has_Specified_Layout Flag100
408 -- Has_Nested_Block_With_Handler Flag101
409 -- Is_Called Flag102
410 -- Is_Completely_Hidden Flag103
411 -- Address_Taken Flag104
412 -- Suppress_Initialization Flag105
413 -- Is_Limited_Composite Flag106
414 -- Is_Private_Composite Flag107
415 -- Default_Expressions_Processed Flag108
416 -- Is_Non_Static_Subtype Flag109
417 -- Has_Out_Or_In_Out_Parameter Flag110
419 -- Is_Formal_Subprogram Flag111
420 -- Is_Renaming_Of_Object Flag112
421 -- No_Return Flag113
422 -- Delay_Cleanups Flag114
423 -- Never_Set_In_Source Flag115
424 -- Is_Visible_Lib_Unit Flag116
425 -- Is_Unchecked_Union Flag117
426 -- Is_For_Access_Subtype Flag118
427 -- Has_Convention_Pragma Flag119
428 -- Has_Primitive_Operations Flag120
430 -- Has_Pragma_Pack Flag121
431 -- Is_Bit_Packed_Array Flag122
432 -- Has_Unchecked_Union Flag123
433 -- Is_Eliminated Flag124
434 -- C_Pass_By_Copy Flag125
435 -- Is_Instantiated Flag126
436 -- Is_Valued_Procedure Flag127
437 -- (used for Component_Alignment) Flag128
438 -- (used for Component_Alignment) Flag129
439 -- Is_Generic_Instance Flag130
441 -- No_Pool_Assigned Flag131
442 -- Is_DIC_Procedure Flag132
443 -- Has_Inherited_DIC Flag133
444 -- Has_Aliased_Components Flag135
445 -- No_Strict_Aliasing Flag136
446 -- Is_Machine_Code_Subprogram Flag137
447 -- Is_Packed_Array_Impl_Type Flag138
448 -- Has_Biased_Representation Flag139
449 -- Has_Complex_Representation Flag140
451 -- Is_Constr_Subt_For_UN_Aliased Flag141
452 -- Has_Missing_Return Flag142
453 -- Has_Recursive_Call Flag143
454 -- Is_Unsigned_Type Flag144
455 -- Strict_Alignment Flag145
456 -- Is_Abstract_Type Flag146
457 -- Needs_Debug_Info Flag147
458 -- Is_Elaboration_Checks_OK_Id Flag148
459 -- Is_Compilation_Unit Flag149
460 -- Has_Pragma_Elaborate_Body Flag150
462 -- Has_Private_Ancestor Flag151
463 -- Entry_Accepted Flag152
464 -- Is_Obsolescent Flag153
465 -- Has_Per_Object_Constraint Flag154
466 -- Has_Private_Declaration Flag155
467 -- Referenced Flag156
468 -- Has_Pragma_Inline Flag157
469 -- Finalize_Storage_Only Flag158
470 -- From_Limited_With Flag159
471 -- Is_Package_Body_Entity Flag160
473 -- Has_Qualified_Name Flag161
474 -- Nonzero_Is_True Flag162
475 -- Is_True_Constant Flag163
476 -- Reverse_Bit_Order Flag164
477 -- Suppress_Style_Checks Flag165
478 -- Debug_Info_Off Flag166
479 -- Sec_Stack_Needed_For_Return Flag167
480 -- Materialize_Entity Flag168
481 -- Has_Pragma_Thread_Local_Storage Flag169
482 -- Is_Known_Valid Flag170
484 -- Is_Hidden_Open_Scope Flag171
485 -- Has_Object_Size_Clause Flag172
486 -- Has_Fully_Qualified_Name Flag173
487 -- Elaboration_Entity_Required Flag174
488 -- Has_Forward_Instantiation Flag175
489 -- Is_Discrim_SO_Function Flag176
490 -- Size_Depends_On_Discriminant Flag177
491 -- Is_Null_Init_Proc Flag178
492 -- Has_Pragma_Pure_Function Flag179
493 -- Has_Pragma_Unreferenced Flag180
495 -- Has_Contiguous_Rep Flag181
496 -- Has_Xref_Entry Flag182
497 -- Must_Be_On_Byte_Boundary Flag183
498 -- Has_Stream_Size_Clause Flag184
499 -- Is_Ada_2005_Only Flag185
500 -- Is_Interface Flag186
501 -- Has_Constrained_Partial_View Flag187
502 -- Uses_Lock_Free Flag188
503 -- Is_Pure_Unit_Access_Type Flag189
504 -- Has_Specified_Stream_Input Flag190
506 -- Has_Specified_Stream_Output Flag191
507 -- Has_Specified_Stream_Read Flag192
508 -- Has_Specified_Stream_Write Flag193
509 -- Is_Local_Anonymous_Access Flag194
510 -- Is_Primitive_Wrapper Flag195
511 -- Was_Hidden Flag196
512 -- Is_Limited_Interface Flag197
513 -- Has_Pragma_Ordered Flag198
514 -- Is_Ada_2012_Only Flag199
516 -- Has_Delayed_Aspects Flag200
517 -- Has_Pragma_No_Inline Flag201
518 -- Itype_Printed Flag202
519 -- Has_Pragma_Pure Flag203
520 -- Is_Known_Null Flag204
521 -- Low_Bound_Tested Flag205
522 -- Is_Visible_Formal Flag206
523 -- Known_To_Have_Preelab_Init Flag207
524 -- Must_Have_Preelab_Init Flag208
525 -- Is_Return_Object Flag209
526 -- Elaborate_Body_Desirable Flag210
528 -- Has_Static_Discriminants Flag211
529 -- Has_Pragma_Unreferenced_Objects Flag212
530 -- Requires_Overriding Flag213
531 -- Has_RACW Flag214
532 -- Is_Param_Block_Component_Type Flag215
533 -- Universal_Aliasing Flag216
534 -- Suppress_Value_Tracking_On_Call Flag217
535 -- Is_Primitive Flag218
536 -- Has_Initial_Value Flag219
537 -- Has_Dispatch_Table Flag220
539 -- Has_Pragma_Preelab_Init Flag221
540 -- Used_As_Generic_Actual Flag222
541 -- Is_Descendant_Of_Address Flag223
542 -- Is_Raised Flag224
543 -- Is_Thunk Flag225
544 -- Is_Only_Out_Parameter Flag226
545 -- Referenced_As_Out_Parameter Flag227
546 -- Has_Thunks Flag228
547 -- Can_Use_Internal_Rep Flag229
548 -- Has_Pragma_Inline_Always Flag230
550 -- Renamed_In_Spec Flag231
551 -- Has_Own_Invariants Flag232
552 -- Has_Pragma_Unmodified Flag233
553 -- Is_Dispatch_Table_Entity Flag234
554 -- Is_Trivial_Subprogram Flag235
555 -- Warnings_Off_Used Flag236
556 -- Warnings_Off_Used_Unmodified Flag237
557 -- Warnings_Off_Used_Unreferenced Flag238
558 -- No_Reordering Flag239
559 -- Has_Expanded_Contract Flag240
561 -- Optimize_Alignment_Space Flag241
562 -- Optimize_Alignment_Time Flag242
563 -- Overlays_Constant Flag243
564 -- Is_RACW_Stub_Type Flag244
565 -- Is_Private_Primitive Flag245
566 -- Is_Underlying_Record_View Flag246
567 -- OK_To_Rename Flag247
568 -- Has_Inheritable_Invariants Flag248
569 -- Is_Safe_To_Reevaluate Flag249
570 -- Has_Predicates Flag250
572 -- Has_Implicit_Dereference Flag251
573 -- Is_Finalized_Transient Flag252
574 -- Disable_Controlled Flag253
575 -- Is_Implementation_Defined Flag254
576 -- Is_Predicate_Function Flag255
577 -- Is_Predicate_Function_M Flag256
578 -- Is_Invariant_Procedure Flag257
579 -- Has_Dynamic_Predicate_Aspect Flag258
580 -- Has_Static_Predicate_Aspect Flag259
581 -- Has_Loop_Entry_Attributes Flag260
583 -- Has_Delayed_Rep_Aspects Flag261
584 -- May_Inherit_Delayed_Rep_Aspects Flag262
585 -- Has_Visible_Refinement Flag263
586 -- Is_Discriminant_Check_Function Flag264
587 -- SPARK_Pragma_Inherited Flag265
588 -- SPARK_Aux_Pragma_Inherited Flag266
589 -- Has_Shift_Operator Flag267
590 -- Is_Independent Flag268
591 -- Has_Static_Predicate Flag269
592 -- Stores_Attribute_Old_Prefix Flag270
594 -- Has_Protected Flag271
595 -- SSO_Set_Low_By_Default Flag272
596 -- SSO_Set_High_By_Default Flag273
597 -- Is_Generic_Actual_Subprogram Flag274
598 -- No_Predicate_On_Actual Flag275
599 -- No_Dynamic_Predicate_On_Actual Flag276
600 -- Is_Checked_Ghost_Entity Flag277
601 -- Is_Ignored_Ghost_Entity Flag278
602 -- Contains_Ignored_Ghost_Code Flag279
603 -- Partial_View_Has_Unknown_Discr Flag280
605 -- Is_Static_Type Flag281
606 -- Has_Nested_Subprogram Flag282
607 -- Is_Uplevel_Referenced_Entity Flag283
608 -- Is_Unimplemented Flag284
609 -- Is_Volatile_Full_Access Flag285
610 -- Is_Exception_Handler Flag286
611 -- Rewritten_For_C Flag287
612 -- Predicates_Ignored Flag288
613 -- Has_Timing_Event Flag289
614 -- Is_Class_Wide_Clone Flag290
616 -- Has_Inherited_Invariants Flag291
617 -- Is_Partial_Invariant_Procedure Flag292
618 -- Is_Actual_Subtype Flag293
619 -- Has_Pragma_Unused Flag294
620 -- Is_Ignored_Transient Flag295
621 -- Has_Partial_Visible_Refinement Flag296
622 -- Is_Entry_Wrapper Flag297
623 -- Is_Underlying_Full_View Flag298
624 -- Body_Needed_For_Inlining Flag299
625 -- Has_Private_Extension Flag300
627 -- Ignore_SPARK_Mode_Pragmas Flag301
628 -- Is_Initial_Condition_Procedure Flag302
629 -- Suppress_Elaboration_Warnings Flag303
630 -- Is_Elaboration_Warnings_OK_Id Flag304
631 -- Is_Activation_Record Flag305
632 -- Needs_Activation_Record Flag306
633 -- Is_Loop_Parameter Flag307
635 -- (unused) Flag308
636 -- (unused) Flag309
638 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
640 -----------------------
641 -- Local subprograms --
642 -----------------------
644 function Has_Option
645 (State_Id : Entity_Id;
646 Option_Nam : Name_Id) return Boolean;
647 -- Determine whether abstract state State_Id has particular option denoted
648 -- by the name Option_Nam.
650 ---------------
651 -- Float_Rep --
652 ---------------
654 function Float_Rep (Id : E) return F is
655 pragma Assert (Is_Floating_Point_Type (Id));
656 begin
657 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
658 end Float_Rep;
660 ----------------
661 -- Has_Option --
662 ----------------
664 function Has_Option
665 (State_Id : Entity_Id;
666 Option_Nam : Name_Id) return Boolean
668 Decl : constant Node_Id := Parent (State_Id);
669 Opt : Node_Id;
670 Opt_Nam : Node_Id;
672 begin
673 pragma Assert (Ekind (State_Id) = E_Abstract_State);
675 -- The declaration of abstract states with options appear as an
676 -- extension aggregate. If this is not the case, the option is not
677 -- available.
679 if Nkind (Decl) /= N_Extension_Aggregate then
680 return False;
681 end if;
683 -- Simple options
685 Opt := First (Expressions (Decl));
686 while Present (Opt) loop
687 if Nkind (Opt) = N_Identifier and then Chars (Opt) = Option_Nam then
688 return True;
689 end if;
691 Next (Opt);
692 end loop;
694 -- Complex options with various specifiers
696 Opt := First (Component_Associations (Decl));
697 while Present (Opt) loop
698 Opt_Nam := First (Choices (Opt));
700 if Nkind (Opt_Nam) = N_Identifier
701 and then Chars (Opt_Nam) = Option_Nam
702 then
703 return True;
704 end if;
706 Next (Opt);
707 end loop;
709 return False;
710 end Has_Option;
712 --------------------------------
713 -- Attribute Access Functions --
714 --------------------------------
716 function Abstract_States (Id : E) return L is
717 begin
718 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
719 return Elist25 (Id);
720 end Abstract_States;
722 function Accept_Address (Id : E) return L is
723 begin
724 return Elist21 (Id);
725 end Accept_Address;
727 function Access_Disp_Table (Id : E) return L is
728 begin
729 pragma Assert (Ekind_In (Id, E_Record_Subtype,
730 E_Record_Type,
731 E_Record_Type_With_Private));
732 return Elist16 (Implementation_Base_Type (Id));
733 end Access_Disp_Table;
735 function Access_Disp_Table_Elab_Flag (Id : E) return E is
736 begin
737 pragma Assert (Ekind_In (Id, E_Record_Subtype,
738 E_Record_Type,
739 E_Record_Type_With_Private));
740 return Node30 (Implementation_Base_Type (Id));
741 end Access_Disp_Table_Elab_Flag;
743 function Activation_Record_Component (Id : E) return E is
744 begin
745 pragma Assert (Ekind_In (Id, E_Constant,
746 E_In_Parameter,
747 E_In_Out_Parameter,
748 E_Loop_Parameter,
749 E_Out_Parameter,
750 E_Variable));
751 return Node31 (Id);
752 end Activation_Record_Component;
754 function Actual_Subtype (Id : E) return E is
755 begin
756 pragma Assert
757 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
758 or else Is_Formal (Id));
759 return Node17 (Id);
760 end Actual_Subtype;
762 function Address_Taken (Id : E) return B is
763 begin
764 return Flag104 (Id);
765 end Address_Taken;
767 function Alias (Id : E) return E is
768 begin
769 pragma Assert
770 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
771 return Node18 (Id);
772 end Alias;
774 function Alignment (Id : E) return U is
775 begin
776 pragma Assert (Is_Type (Id)
777 or else Is_Formal (Id)
778 or else Ekind_In (Id, E_Loop_Parameter,
779 E_Constant,
780 E_Exception,
781 E_Variable));
782 return Uint14 (Id);
783 end Alignment;
785 function Anonymous_Designated_Type (Id : E) return E is
786 begin
787 pragma Assert (Ekind (Id) = E_Variable);
788 return Node35 (Id);
789 end Anonymous_Designated_Type;
791 function Anonymous_Masters (Id : E) return L is
792 begin
793 pragma Assert (Ekind_In (Id, E_Function,
794 E_Package,
795 E_Procedure,
796 E_Subprogram_Body));
797 return Elist29 (Id);
798 end Anonymous_Masters;
800 function Anonymous_Object (Id : E) return E is
801 begin
802 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
803 return Node30 (Id);
804 end Anonymous_Object;
806 function Associated_Entity (Id : E) return E is
807 begin
808 return Node37 (Id);
809 end Associated_Entity;
811 function Associated_Formal_Package (Id : E) return E is
812 begin
813 pragma Assert (Ekind (Id) = E_Package);
814 return Node12 (Id);
815 end Associated_Formal_Package;
817 function Associated_Node_For_Itype (Id : E) return N is
818 begin
819 return Node8 (Id);
820 end Associated_Node_For_Itype;
822 function Associated_Storage_Pool (Id : E) return E is
823 begin
824 pragma Assert (Is_Access_Type (Id));
825 return Node22 (Root_Type (Id));
826 end Associated_Storage_Pool;
828 function Barrier_Function (Id : E) return N is
829 begin
830 pragma Assert (Is_Entry (Id));
831 return Node12 (Id);
832 end Barrier_Function;
834 function Block_Node (Id : E) return N is
835 begin
836 pragma Assert (Ekind (Id) = E_Block);
837 return Node11 (Id);
838 end Block_Node;
840 function Body_Entity (Id : E) return E is
841 begin
842 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
843 return Node19 (Id);
844 end Body_Entity;
846 function Body_Needed_For_Inlining (Id : E) return B is
847 begin
848 pragma Assert (Ekind (Id) = E_Package);
849 return Flag299 (Id);
850 end Body_Needed_For_Inlining;
852 function Body_Needed_For_SAL (Id : E) return B is
853 begin
854 pragma Assert
855 (Ekind (Id) = E_Package
856 or else Is_Subprogram (Id)
857 or else Is_Generic_Unit (Id));
858 return Flag40 (Id);
859 end Body_Needed_For_SAL;
861 function Body_References (Id : E) return L is
862 begin
863 pragma Assert (Ekind (Id) = E_Abstract_State);
864 return Elist16 (Id);
865 end Body_References;
867 function BIP_Initialization_Call (Id : E) return N is
868 begin
869 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
870 return Node29 (Id);
871 end BIP_Initialization_Call;
873 function C_Pass_By_Copy (Id : E) return B is
874 begin
875 pragma Assert (Is_Record_Type (Id));
876 return Flag125 (Implementation_Base_Type (Id));
877 end C_Pass_By_Copy;
879 function Can_Never_Be_Null (Id : E) return B is
880 begin
881 return Flag38 (Id);
882 end Can_Never_Be_Null;
884 function Checks_May_Be_Suppressed (Id : E) return B is
885 begin
886 return Flag31 (Id);
887 end Checks_May_Be_Suppressed;
889 function Class_Wide_Clone (Id : E) return E is
890 begin
891 pragma Assert (Is_Subprogram (Id));
892 return Node38 (Id);
893 end Class_Wide_Clone;
895 function Class_Wide_Type (Id : E) return E is
896 begin
897 pragma Assert (Is_Type (Id));
898 return Node9 (Id);
899 end Class_Wide_Type;
901 function Cloned_Subtype (Id : E) return E is
902 begin
903 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
904 return Node16 (Id);
905 end Cloned_Subtype;
907 function Component_Bit_Offset (Id : E) return U is
908 begin
909 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
910 return Uint11 (Id);
911 end Component_Bit_Offset;
913 function Component_Clause (Id : E) return N is
914 begin
915 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
916 return Node13 (Id);
917 end Component_Clause;
919 function Component_Size (Id : E) return U is
920 begin
921 pragma Assert (Is_Array_Type (Id));
922 return Uint22 (Implementation_Base_Type (Id));
923 end Component_Size;
925 function Component_Type (Id : E) return E is
926 begin
927 pragma Assert (Is_Array_Type (Id));
928 return Node20 (Implementation_Base_Type (Id));
929 end Component_Type;
931 function Corresponding_Concurrent_Type (Id : E) return E is
932 begin
933 pragma Assert (Ekind (Id) = E_Record_Type);
934 return Node18 (Id);
935 end Corresponding_Concurrent_Type;
937 function Corresponding_Discriminant (Id : E) return E is
938 begin
939 pragma Assert (Ekind (Id) = E_Discriminant);
940 return Node19 (Id);
941 end Corresponding_Discriminant;
943 function Corresponding_Equality (Id : E) return E is
944 begin
945 pragma Assert
946 (Ekind (Id) = E_Function
947 and then not Comes_From_Source (Id)
948 and then Chars (Id) = Name_Op_Ne);
949 return Node30 (Id);
950 end Corresponding_Equality;
952 function Corresponding_Function (Id : E) return E is
953 begin
954 pragma Assert (Ekind (Id) = E_Procedure);
955 return Node32 (Id);
956 end Corresponding_Function;
958 function Corresponding_Procedure (Id : E) return E is
959 begin
960 pragma Assert (Ekind (Id) = E_Function);
961 return Node32 (Id);
962 end Corresponding_Procedure;
964 function Corresponding_Protected_Entry (Id : E) return E is
965 begin
966 pragma Assert (Ekind (Id) = E_Subprogram_Body);
967 return Node18 (Id);
968 end Corresponding_Protected_Entry;
970 function Corresponding_Record_Component (Id : E) return E is
971 begin
972 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
973 return Node21 (Id);
974 end Corresponding_Record_Component;
976 function Corresponding_Record_Type (Id : E) return E is
977 begin
978 pragma Assert (Is_Concurrent_Type (Id));
979 return Node18 (Id);
980 end Corresponding_Record_Type;
982 function Corresponding_Remote_Type (Id : E) return E is
983 begin
984 return Node22 (Id);
985 end Corresponding_Remote_Type;
987 function Current_Use_Clause (Id : E) return E is
988 begin
989 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
990 return Node27 (Id);
991 end Current_Use_Clause;
993 function Current_Value (Id : E) return N is
994 begin
995 pragma Assert (Ekind (Id) in Object_Kind);
996 return Node9 (Id);
997 end Current_Value;
999 function CR_Discriminant (Id : E) return E is
1000 begin
1001 return Node23 (Id);
1002 end CR_Discriminant;
1004 function Debug_Info_Off (Id : E) return B is
1005 begin
1006 return Flag166 (Id);
1007 end Debug_Info_Off;
1009 function Debug_Renaming_Link (Id : E) return E is
1010 begin
1011 return Node25 (Id);
1012 end Debug_Renaming_Link;
1014 function Default_Aspect_Component_Value (Id : E) return N is
1015 begin
1016 pragma Assert (Is_Array_Type (Id));
1017 return Node19 (Base_Type (Id));
1018 end Default_Aspect_Component_Value;
1020 function Default_Aspect_Value (Id : E) return N is
1021 begin
1022 pragma Assert (Is_Scalar_Type (Id));
1023 return Node19 (Base_Type (Id));
1024 end Default_Aspect_Value;
1026 function Default_Expr_Function (Id : E) return E is
1027 begin
1028 pragma Assert (Is_Formal (Id));
1029 return Node21 (Id);
1030 end Default_Expr_Function;
1032 function Default_Expressions_Processed (Id : E) return B is
1033 begin
1034 return Flag108 (Id);
1035 end Default_Expressions_Processed;
1037 function Default_Value (Id : E) return N is
1038 begin
1039 pragma Assert (Is_Formal (Id));
1040 return Node20 (Id);
1041 end Default_Value;
1043 function Delay_Cleanups (Id : E) return B is
1044 begin
1045 return Flag114 (Id);
1046 end Delay_Cleanups;
1048 function Delay_Subprogram_Descriptors (Id : E) return B is
1049 begin
1050 return Flag50 (Id);
1051 end Delay_Subprogram_Descriptors;
1053 function Delta_Value (Id : E) return R is
1054 begin
1055 pragma Assert (Is_Fixed_Point_Type (Id));
1056 return Ureal18 (Id);
1057 end Delta_Value;
1059 function Dependent_Instances (Id : E) return L is
1060 begin
1061 pragma Assert (Is_Generic_Instance (Id));
1062 return Elist8 (Id);
1063 end Dependent_Instances;
1065 function Depends_On_Private (Id : E) return B is
1066 begin
1067 pragma Assert (Nkind (Id) in N_Entity);
1068 return Flag14 (Id);
1069 end Depends_On_Private;
1071 function Derived_Type_Link (Id : E) return E is
1072 begin
1073 pragma Assert (Is_Type (Id));
1074 return Node31 (Base_Type (Id));
1075 end Derived_Type_Link;
1077 function Digits_Value (Id : E) return U is
1078 begin
1079 pragma Assert
1080 (Is_Floating_Point_Type (Id)
1081 or else Is_Decimal_Fixed_Point_Type (Id));
1082 return Uint17 (Id);
1083 end Digits_Value;
1085 function Direct_Primitive_Operations (Id : E) return L is
1086 begin
1087 pragma Assert (Is_Tagged_Type (Id));
1088 return Elist10 (Id);
1089 end Direct_Primitive_Operations;
1091 function Directly_Designated_Type (Id : E) return E is
1092 begin
1093 pragma Assert (Is_Access_Type (Id));
1094 return Node20 (Id);
1095 end Directly_Designated_Type;
1097 function Disable_Controlled (Id : E) return B is
1098 begin
1099 return Flag253 (Base_Type (Id));
1100 end Disable_Controlled;
1102 function Discard_Names (Id : E) return B is
1103 begin
1104 return Flag88 (Id);
1105 end Discard_Names;
1107 function Discriminal (Id : E) return E is
1108 begin
1109 pragma Assert (Ekind (Id) = E_Discriminant);
1110 return Node17 (Id);
1111 end Discriminal;
1113 function Discriminal_Link (Id : E) return N is
1114 begin
1115 return Node10 (Id);
1116 end Discriminal_Link;
1118 function Discriminant_Checking_Func (Id : E) return E is
1119 begin
1120 pragma Assert (Ekind (Id) = E_Component);
1121 return Node20 (Id);
1122 end Discriminant_Checking_Func;
1124 function Discriminant_Constraint (Id : E) return L is
1125 begin
1126 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1127 return Elist21 (Id);
1128 end Discriminant_Constraint;
1130 function Discriminant_Default_Value (Id : E) return N is
1131 begin
1132 pragma Assert (Ekind (Id) = E_Discriminant);
1133 return Node20 (Id);
1134 end Discriminant_Default_Value;
1136 function Discriminant_Number (Id : E) return U is
1137 begin
1138 pragma Assert (Ekind (Id) = E_Discriminant);
1139 return Uint15 (Id);
1140 end Discriminant_Number;
1142 function Dispatch_Table_Wrappers (Id : E) return L is
1143 begin
1144 pragma Assert (Ekind_In (Id, E_Record_Type,
1145 E_Record_Subtype));
1146 return Elist26 (Implementation_Base_Type (Id));
1147 end Dispatch_Table_Wrappers;
1149 function DT_Entry_Count (Id : E) return U is
1150 begin
1151 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1152 return Uint15 (Id);
1153 end DT_Entry_Count;
1155 function DT_Offset_To_Top_Func (Id : E) return E is
1156 begin
1157 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1158 return Node25 (Id);
1159 end DT_Offset_To_Top_Func;
1161 function DT_Position (Id : E) return U is
1162 begin
1163 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1164 and then Present (DTC_Entity (Id)));
1165 return Uint15 (Id);
1166 end DT_Position;
1168 function DTC_Entity (Id : E) return E is
1169 begin
1170 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1171 return Node16 (Id);
1172 end DTC_Entity;
1174 function Elaborate_Body_Desirable (Id : E) return B is
1175 begin
1176 pragma Assert (Ekind (Id) = E_Package);
1177 return Flag210 (Id);
1178 end Elaborate_Body_Desirable;
1180 function Elaboration_Entity (Id : E) return E is
1181 begin
1182 pragma Assert
1183 (Is_Subprogram (Id)
1184 or else
1185 Ekind (Id) = E_Package
1186 or else
1187 Is_Generic_Unit (Id));
1188 return Node13 (Id);
1189 end Elaboration_Entity;
1191 function Elaboration_Entity_Required (Id : E) return B is
1192 begin
1193 pragma Assert
1194 (Is_Subprogram (Id)
1195 or else
1196 Ekind (Id) = E_Package
1197 or else
1198 Is_Generic_Unit (Id));
1199 return Flag174 (Id);
1200 end Elaboration_Entity_Required;
1202 function Encapsulating_State (Id : E) return N is
1203 begin
1204 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1205 return Node32 (Id);
1206 end Encapsulating_State;
1208 function Enclosing_Scope (Id : E) return E is
1209 begin
1210 return Node18 (Id);
1211 end Enclosing_Scope;
1213 function Entry_Accepted (Id : E) return B is
1214 begin
1215 pragma Assert (Is_Entry (Id));
1216 return Flag152 (Id);
1217 end Entry_Accepted;
1219 function Entry_Bodies_Array (Id : E) return E is
1220 begin
1221 return Node19 (Id);
1222 end Entry_Bodies_Array;
1224 function Entry_Cancel_Parameter (Id : E) return E is
1225 begin
1226 return Node23 (Id);
1227 end Entry_Cancel_Parameter;
1229 function Entry_Component (Id : E) return E is
1230 begin
1231 return Node11 (Id);
1232 end Entry_Component;
1234 function Entry_Formal (Id : E) return E is
1235 begin
1236 return Node16 (Id);
1237 end Entry_Formal;
1239 function Entry_Index_Constant (Id : E) return N is
1240 begin
1241 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1242 return Node18 (Id);
1243 end Entry_Index_Constant;
1245 function Entry_Max_Queue_Lengths_Array (Id : E) return N is
1246 begin
1247 pragma Assert (Ekind (Id) = E_Protected_Type);
1248 return Node35 (Id);
1249 end Entry_Max_Queue_Lengths_Array;
1251 function Contains_Ignored_Ghost_Code (Id : E) return B is
1252 begin
1253 pragma Assert
1254 (Ekind_In (Id, E_Block,
1255 E_Function,
1256 E_Generic_Function,
1257 E_Generic_Package,
1258 E_Generic_Procedure,
1259 E_Package,
1260 E_Package_Body,
1261 E_Procedure,
1262 E_Subprogram_Body));
1263 return Flag279 (Id);
1264 end Contains_Ignored_Ghost_Code;
1266 function Contract (Id : E) return N is
1267 begin
1268 pragma Assert
1269 (Ekind_In (Id, E_Protected_Type, -- concurrent types
1270 E_Task_Body,
1271 E_Task_Type)
1272 or else
1273 Ekind_In (Id, E_Constant, -- objects
1274 E_Variable)
1275 or else
1276 Ekind_In (Id, E_Entry, -- overloadable
1277 E_Entry_Family,
1278 E_Function,
1279 E_Generic_Function,
1280 E_Generic_Procedure,
1281 E_Operator,
1282 E_Procedure,
1283 E_Subprogram_Body)
1284 or else
1285 Ekind_In (Id, E_Generic_Package, -- packages
1286 E_Package,
1287 E_Package_Body)
1288 or else
1289 Ekind (Id) = E_Void); -- special purpose
1290 return Node34 (Id);
1291 end Contract;
1293 function Contract_Wrapper (Id : E) return E is
1294 begin
1295 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
1296 return Node25 (Id);
1297 end Contract_Wrapper;
1299 function Entry_Parameters_Type (Id : E) return E is
1300 begin
1301 return Node15 (Id);
1302 end Entry_Parameters_Type;
1304 function Enum_Pos_To_Rep (Id : E) return E is
1305 begin
1306 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1307 return Node23 (Id);
1308 end Enum_Pos_To_Rep;
1310 function Enumeration_Pos (Id : E) return Uint is
1311 begin
1312 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1313 return Uint11 (Id);
1314 end Enumeration_Pos;
1316 function Enumeration_Rep (Id : E) return U is
1317 begin
1318 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1319 return Uint12 (Id);
1320 end Enumeration_Rep;
1322 function Enumeration_Rep_Expr (Id : E) return N is
1323 begin
1324 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1325 return Node22 (Id);
1326 end Enumeration_Rep_Expr;
1328 function Equivalent_Type (Id : E) return E is
1329 begin
1330 pragma Assert
1331 (Ekind_In (Id, E_Class_Wide_Type,
1332 E_Class_Wide_Subtype,
1333 E_Access_Subprogram_Type,
1334 E_Access_Protected_Subprogram_Type,
1335 E_Anonymous_Access_Protected_Subprogram_Type,
1336 E_Access_Subprogram_Type,
1337 E_Exception_Type));
1338 return Node18 (Id);
1339 end Equivalent_Type;
1341 function Esize (Id : E) return Uint is
1342 begin
1343 return Uint12 (Id);
1344 end Esize;
1346 function Extra_Accessibility (Id : E) return E is
1347 begin
1348 pragma Assert
1349 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1350 return Node13 (Id);
1351 end Extra_Accessibility;
1353 function Extra_Accessibility_Of_Result (Id : E) return E is
1354 begin
1355 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1356 return Node19 (Id);
1357 end Extra_Accessibility_Of_Result;
1359 function Extra_Constrained (Id : E) return E is
1360 begin
1361 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1362 return Node23 (Id);
1363 end Extra_Constrained;
1365 function Extra_Formal (Id : E) return E is
1366 begin
1367 return Node15 (Id);
1368 end Extra_Formal;
1370 function Extra_Formals (Id : E) return E is
1371 begin
1372 pragma Assert
1373 (Is_Overloadable (Id)
1374 or else Ekind_In (Id, E_Entry_Family,
1375 E_Subprogram_Body,
1376 E_Subprogram_Type));
1377 return Node28 (Id);
1378 end Extra_Formals;
1380 function Can_Use_Internal_Rep (Id : E) return B is
1381 begin
1382 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1383 return Flag229 (Base_Type (Id));
1384 end Can_Use_Internal_Rep;
1386 function Finalization_Master (Id : E) return E is
1387 begin
1388 pragma Assert (Is_Access_Type (Id));
1389 return Node23 (Root_Type (Id));
1390 end Finalization_Master;
1392 function Finalize_Storage_Only (Id : E) return B is
1393 begin
1394 pragma Assert (Is_Type (Id));
1395 return Flag158 (Base_Type (Id));
1396 end Finalize_Storage_Only;
1398 function Finalizer (Id : E) return E is
1399 begin
1400 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1401 return Node28 (Id);
1402 end Finalizer;
1404 function First_Entity (Id : E) return E is
1405 begin
1406 return Node17 (Id);
1407 end First_Entity;
1409 function First_Exit_Statement (Id : E) return N is
1410 begin
1411 pragma Assert (Ekind (Id) = E_Loop);
1412 return Node8 (Id);
1413 end First_Exit_Statement;
1415 function First_Index (Id : E) return N is
1416 begin
1417 pragma Assert (Is_Array_Type (Id));
1418 return Node17 (Id);
1419 end First_Index;
1421 function First_Literal (Id : E) return E is
1422 begin
1423 pragma Assert (Is_Enumeration_Type (Id));
1424 return Node17 (Id);
1425 end First_Literal;
1427 function First_Private_Entity (Id : E) return E is
1428 begin
1429 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1430 or else Ekind (Id) in Concurrent_Kind);
1431 return Node16 (Id);
1432 end First_Private_Entity;
1434 function First_Rep_Item (Id : E) return E is
1435 begin
1436 return Node6 (Id);
1437 end First_Rep_Item;
1439 function Freeze_Node (Id : E) return N is
1440 begin
1441 return Node7 (Id);
1442 end Freeze_Node;
1444 function From_Limited_With (Id : E) return B is
1445 begin
1446 return Flag159 (Id);
1447 end From_Limited_With;
1449 function Full_View (Id : E) return E is
1450 begin
1451 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1452 return Node11 (Id);
1453 end Full_View;
1455 function Generic_Homonym (Id : E) return E is
1456 begin
1457 pragma Assert (Ekind (Id) = E_Generic_Package);
1458 return Node11 (Id);
1459 end Generic_Homonym;
1461 function Generic_Renamings (Id : E) return L is
1462 begin
1463 return Elist23 (Id);
1464 end Generic_Renamings;
1466 function Handler_Records (Id : E) return S is
1467 begin
1468 return List10 (Id);
1469 end Handler_Records;
1471 function Has_Aliased_Components (Id : E) return B is
1472 begin
1473 return Flag135 (Implementation_Base_Type (Id));
1474 end Has_Aliased_Components;
1476 function Has_Alignment_Clause (Id : E) return B is
1477 begin
1478 return Flag46 (Id);
1479 end Has_Alignment_Clause;
1481 function Has_All_Calls_Remote (Id : E) return B is
1482 begin
1483 return Flag79 (Id);
1484 end Has_All_Calls_Remote;
1486 function Has_Atomic_Components (Id : E) return B is
1487 begin
1488 return Flag86 (Implementation_Base_Type (Id));
1489 end Has_Atomic_Components;
1491 function Has_Biased_Representation (Id : E) return B is
1492 begin
1493 return Flag139 (Id);
1494 end Has_Biased_Representation;
1496 function Has_Completion (Id : E) return B is
1497 begin
1498 return Flag26 (Id);
1499 end Has_Completion;
1501 function Has_Completion_In_Body (Id : E) return B is
1502 begin
1503 pragma Assert (Is_Type (Id));
1504 return Flag71 (Id);
1505 end Has_Completion_In_Body;
1507 function Has_Complex_Representation (Id : E) return B is
1508 begin
1509 pragma Assert (Is_Record_Type (Id));
1510 return Flag140 (Implementation_Base_Type (Id));
1511 end Has_Complex_Representation;
1513 function Has_Component_Size_Clause (Id : E) return B is
1514 begin
1515 pragma Assert (Is_Array_Type (Id));
1516 return Flag68 (Implementation_Base_Type (Id));
1517 end Has_Component_Size_Clause;
1519 function Has_Constrained_Partial_View (Id : E) return B is
1520 begin
1521 pragma Assert (Is_Type (Id));
1522 return Flag187 (Id);
1523 end Has_Constrained_Partial_View;
1525 function Has_Controlled_Component (Id : E) return B is
1526 begin
1527 return Flag43 (Base_Type (Id));
1528 end Has_Controlled_Component;
1530 function Has_Contiguous_Rep (Id : E) return B is
1531 begin
1532 return Flag181 (Id);
1533 end Has_Contiguous_Rep;
1535 function Has_Controlling_Result (Id : E) return B is
1536 begin
1537 return Flag98 (Id);
1538 end Has_Controlling_Result;
1540 function Has_Convention_Pragma (Id : E) return B is
1541 begin
1542 return Flag119 (Id);
1543 end Has_Convention_Pragma;
1545 function Has_Default_Aspect (Id : E) return B is
1546 begin
1547 return Flag39 (Base_Type (Id));
1548 end Has_Default_Aspect;
1550 function Has_Delayed_Aspects (Id : E) return B is
1551 begin
1552 pragma Assert (Nkind (Id) in N_Entity);
1553 return Flag200 (Id);
1554 end Has_Delayed_Aspects;
1556 function Has_Delayed_Freeze (Id : E) return B is
1557 begin
1558 pragma Assert (Nkind (Id) in N_Entity);
1559 return Flag18 (Id);
1560 end Has_Delayed_Freeze;
1562 function Has_Delayed_Rep_Aspects (Id : E) return B is
1563 begin
1564 pragma Assert (Nkind (Id) in N_Entity);
1565 return Flag261 (Id);
1566 end Has_Delayed_Rep_Aspects;
1568 function Has_Discriminants (Id : E) return B is
1569 begin
1570 pragma Assert (Is_Type (Id));
1571 return Flag5 (Id);
1572 end Has_Discriminants;
1574 function Has_Dispatch_Table (Id : E) return B is
1575 begin
1576 pragma Assert (Is_Tagged_Type (Id));
1577 return Flag220 (Id);
1578 end Has_Dispatch_Table;
1580 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1581 begin
1582 pragma Assert (Is_Type (Id));
1583 return Flag258 (Id);
1584 end Has_Dynamic_Predicate_Aspect;
1586 function Has_Enumeration_Rep_Clause (Id : E) return B is
1587 begin
1588 pragma Assert (Is_Enumeration_Type (Id));
1589 return Flag66 (Id);
1590 end Has_Enumeration_Rep_Clause;
1592 function Has_Exit (Id : E) return B is
1593 begin
1594 return Flag47 (Id);
1595 end Has_Exit;
1597 function Has_Expanded_Contract (Id : E) return B is
1598 begin
1599 pragma Assert (Is_Subprogram (Id));
1600 return Flag240 (Id);
1601 end Has_Expanded_Contract;
1603 function Has_Forward_Instantiation (Id : E) return B is
1604 begin
1605 return Flag175 (Id);
1606 end Has_Forward_Instantiation;
1608 function Has_Fully_Qualified_Name (Id : E) return B is
1609 begin
1610 return Flag173 (Id);
1611 end Has_Fully_Qualified_Name;
1613 function Has_Gigi_Rep_Item (Id : E) return B is
1614 begin
1615 return Flag82 (Id);
1616 end Has_Gigi_Rep_Item;
1618 function Has_Homonym (Id : E) return B is
1619 begin
1620 return Flag56 (Id);
1621 end Has_Homonym;
1623 function Has_Implicit_Dereference (Id : E) return B is
1624 begin
1625 return Flag251 (Id);
1626 end Has_Implicit_Dereference;
1628 function Has_Independent_Components (Id : E) return B is
1629 begin
1630 return Flag34 (Implementation_Base_Type (Id));
1631 end Has_Independent_Components;
1633 function Has_Inheritable_Invariants (Id : E) return B is
1634 begin
1635 pragma Assert (Is_Type (Id));
1636 return Flag248 (Base_Type (Id));
1637 end Has_Inheritable_Invariants;
1639 function Has_Inherited_DIC (Id : E) return B is
1640 begin
1641 pragma Assert (Is_Type (Id));
1642 return Flag133 (Base_Type (Id));
1643 end Has_Inherited_DIC;
1645 function Has_Inherited_Invariants (Id : E) return B is
1646 begin
1647 pragma Assert (Is_Type (Id));
1648 return Flag291 (Base_Type (Id));
1649 end Has_Inherited_Invariants;
1651 function Has_Initial_Value (Id : E) return B is
1652 begin
1653 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1654 return Flag219 (Id);
1655 end Has_Initial_Value;
1657 function Has_Loop_Entry_Attributes (Id : E) return B is
1658 begin
1659 pragma Assert (Ekind (Id) = E_Loop);
1660 return Flag260 (Id);
1661 end Has_Loop_Entry_Attributes;
1663 function Has_Machine_Radix_Clause (Id : E) return B is
1664 begin
1665 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1666 return Flag83 (Id);
1667 end Has_Machine_Radix_Clause;
1669 function Has_Master_Entity (Id : E) return B is
1670 begin
1671 return Flag21 (Id);
1672 end Has_Master_Entity;
1674 function Has_Missing_Return (Id : E) return B is
1675 begin
1676 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1677 return Flag142 (Id);
1678 end Has_Missing_Return;
1680 function Has_Nested_Block_With_Handler (Id : E) return B is
1681 begin
1682 return Flag101 (Id);
1683 end Has_Nested_Block_With_Handler;
1685 function Has_Nested_Subprogram (Id : E) return B is
1686 begin
1687 pragma Assert (Is_Subprogram (Id));
1688 return Flag282 (Id);
1689 end Has_Nested_Subprogram;
1691 function Has_Non_Standard_Rep (Id : E) return B is
1692 begin
1693 return Flag75 (Implementation_Base_Type (Id));
1694 end Has_Non_Standard_Rep;
1696 function Has_Object_Size_Clause (Id : E) return B is
1697 begin
1698 pragma Assert (Is_Type (Id));
1699 return Flag172 (Id);
1700 end Has_Object_Size_Clause;
1702 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1703 begin
1704 pragma Assert
1705 (Ekind_In (Id, E_Entry, E_Entry_Family)
1706 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1707 return Flag110 (Id);
1708 end Has_Out_Or_In_Out_Parameter;
1710 function Has_Own_DIC (Id : E) return B is
1711 begin
1712 pragma Assert (Is_Type (Id));
1713 return Flag3 (Base_Type (Id));
1714 end Has_Own_DIC;
1716 function Has_Own_Invariants (Id : E) return B is
1717 begin
1718 pragma Assert (Is_Type (Id));
1719 return Flag232 (Base_Type (Id));
1720 end Has_Own_Invariants;
1722 function Has_Partial_Visible_Refinement (Id : E) return B is
1723 begin
1724 pragma Assert (Ekind (Id) = E_Abstract_State);
1725 return Flag296 (Id);
1726 end Has_Partial_Visible_Refinement;
1728 function Has_Per_Object_Constraint (Id : E) return B is
1729 begin
1730 return Flag154 (Id);
1731 end Has_Per_Object_Constraint;
1733 function Has_Pragma_Controlled (Id : E) return B is
1734 begin
1735 pragma Assert (Is_Access_Type (Id));
1736 return Flag27 (Implementation_Base_Type (Id));
1737 end Has_Pragma_Controlled;
1739 function Has_Pragma_Elaborate_Body (Id : E) return B is
1740 begin
1741 return Flag150 (Id);
1742 end Has_Pragma_Elaborate_Body;
1744 function Has_Pragma_Inline (Id : E) return B is
1745 begin
1746 return Flag157 (Id);
1747 end Has_Pragma_Inline;
1749 function Has_Pragma_Inline_Always (Id : E) return B is
1750 begin
1751 return Flag230 (Id);
1752 end Has_Pragma_Inline_Always;
1754 function Has_Pragma_No_Inline (Id : E) return B is
1755 begin
1756 return Flag201 (Id);
1757 end Has_Pragma_No_Inline;
1759 function Has_Pragma_Ordered (Id : E) return B is
1760 begin
1761 pragma Assert (Is_Enumeration_Type (Id));
1762 return Flag198 (Implementation_Base_Type (Id));
1763 end Has_Pragma_Ordered;
1765 function Has_Pragma_Pack (Id : E) return B is
1766 begin
1767 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1768 return Flag121 (Implementation_Base_Type (Id));
1769 end Has_Pragma_Pack;
1771 function Has_Pragma_Preelab_Init (Id : E) return B is
1772 begin
1773 return Flag221 (Id);
1774 end Has_Pragma_Preelab_Init;
1776 function Has_Pragma_Pure (Id : E) return B is
1777 begin
1778 return Flag203 (Id);
1779 end Has_Pragma_Pure;
1781 function Has_Pragma_Pure_Function (Id : E) return B is
1782 begin
1783 return Flag179 (Id);
1784 end Has_Pragma_Pure_Function;
1786 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1787 begin
1788 return Flag169 (Id);
1789 end Has_Pragma_Thread_Local_Storage;
1791 function Has_Pragma_Unmodified (Id : E) return B is
1792 begin
1793 return Flag233 (Id);
1794 end Has_Pragma_Unmodified;
1796 function Has_Pragma_Unreferenced (Id : E) return B is
1797 begin
1798 return Flag180 (Id);
1799 end Has_Pragma_Unreferenced;
1801 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1802 begin
1803 pragma Assert (Is_Type (Id));
1804 return Flag212 (Id);
1805 end Has_Pragma_Unreferenced_Objects;
1807 function Has_Pragma_Unused (Id : E) return B is
1808 begin
1809 return Flag294 (Id);
1810 end Has_Pragma_Unused;
1812 function Has_Predicates (Id : E) return B is
1813 begin
1814 pragma Assert (Is_Type (Id));
1815 return Flag250 (Id);
1816 end Has_Predicates;
1818 function Has_Primitive_Operations (Id : E) return B is
1819 begin
1820 pragma Assert (Is_Type (Id));
1821 return Flag120 (Base_Type (Id));
1822 end Has_Primitive_Operations;
1824 function Has_Private_Ancestor (Id : E) return B is
1825 begin
1826 return Flag151 (Id);
1827 end Has_Private_Ancestor;
1829 function Has_Private_Declaration (Id : E) return B is
1830 begin
1831 return Flag155 (Id);
1832 end Has_Private_Declaration;
1834 function Has_Private_Extension (Id : E) return B is
1835 begin
1836 pragma Assert (Is_Tagged_Type (Id));
1837 return Flag300 (Id);
1838 end Has_Private_Extension;
1840 function Has_Protected (Id : E) return B is
1841 begin
1842 return Flag271 (Base_Type (Id));
1843 end Has_Protected;
1845 function Has_Qualified_Name (Id : E) return B is
1846 begin
1847 return Flag161 (Id);
1848 end Has_Qualified_Name;
1850 function Has_RACW (Id : E) return B is
1851 begin
1852 pragma Assert (Ekind (Id) = E_Package);
1853 return Flag214 (Id);
1854 end Has_RACW;
1856 function Has_Record_Rep_Clause (Id : E) return B is
1857 begin
1858 pragma Assert (Is_Record_Type (Id));
1859 return Flag65 (Implementation_Base_Type (Id));
1860 end Has_Record_Rep_Clause;
1862 function Has_Recursive_Call (Id : E) return B is
1863 begin
1864 pragma Assert (Is_Subprogram (Id));
1865 return Flag143 (Id);
1866 end Has_Recursive_Call;
1868 function Has_Shift_Operator (Id : E) return B is
1869 begin
1870 pragma Assert (Is_Integer_Type (Id));
1871 return Flag267 (Base_Type (Id));
1872 end Has_Shift_Operator;
1874 function Has_Size_Clause (Id : E) return B is
1875 begin
1876 return Flag29 (Id);
1877 end Has_Size_Clause;
1879 function Has_Small_Clause (Id : E) return B is
1880 begin
1881 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
1882 return Flag67 (Id);
1883 end Has_Small_Clause;
1885 function Has_Specified_Layout (Id : E) return B is
1886 begin
1887 pragma Assert (Is_Type (Id));
1888 return Flag100 (Implementation_Base_Type (Id));
1889 end Has_Specified_Layout;
1891 function Has_Specified_Stream_Input (Id : E) return B is
1892 begin
1893 pragma Assert (Is_Type (Id));
1894 return Flag190 (Id);
1895 end Has_Specified_Stream_Input;
1897 function Has_Specified_Stream_Output (Id : E) return B is
1898 begin
1899 pragma Assert (Is_Type (Id));
1900 return Flag191 (Id);
1901 end Has_Specified_Stream_Output;
1903 function Has_Specified_Stream_Read (Id : E) return B is
1904 begin
1905 pragma Assert (Is_Type (Id));
1906 return Flag192 (Id);
1907 end Has_Specified_Stream_Read;
1909 function Has_Specified_Stream_Write (Id : E) return B is
1910 begin
1911 pragma Assert (Is_Type (Id));
1912 return Flag193 (Id);
1913 end Has_Specified_Stream_Write;
1915 function Has_Static_Discriminants (Id : E) return B is
1916 begin
1917 pragma Assert (Is_Type (Id));
1918 return Flag211 (Id);
1919 end Has_Static_Discriminants;
1921 function Has_Static_Predicate (Id : E) return B is
1922 begin
1923 pragma Assert (Is_Type (Id));
1924 return Flag269 (Id);
1925 end Has_Static_Predicate;
1927 function Has_Static_Predicate_Aspect (Id : E) return B is
1928 begin
1929 pragma Assert (Is_Type (Id));
1930 return Flag259 (Id);
1931 end Has_Static_Predicate_Aspect;
1933 function Has_Storage_Size_Clause (Id : E) return B is
1934 begin
1935 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1936 return Flag23 (Implementation_Base_Type (Id));
1937 end Has_Storage_Size_Clause;
1939 function Has_Stream_Size_Clause (Id : E) return B is
1940 begin
1941 return Flag184 (Id);
1942 end Has_Stream_Size_Clause;
1944 function Has_Task (Id : E) return B is
1945 begin
1946 return Flag30 (Base_Type (Id));
1947 end Has_Task;
1949 function Has_Thunks (Id : E) return B is
1950 begin
1951 return Flag228 (Id);
1952 end Has_Thunks;
1954 function Has_Timing_Event (Id : E) return B is
1955 begin
1956 return Flag289 (Base_Type (Id));
1957 end Has_Timing_Event;
1959 function Has_Unchecked_Union (Id : E) return B is
1960 begin
1961 return Flag123 (Base_Type (Id));
1962 end Has_Unchecked_Union;
1964 function Has_Unknown_Discriminants (Id : E) return B is
1965 begin
1966 pragma Assert (Is_Type (Id));
1967 return Flag72 (Id);
1968 end Has_Unknown_Discriminants;
1970 function Has_Visible_Refinement (Id : E) return B is
1971 begin
1972 pragma Assert (Ekind (Id) = E_Abstract_State);
1973 return Flag263 (Id);
1974 end Has_Visible_Refinement;
1976 function Has_Volatile_Components (Id : E) return B is
1977 begin
1978 return Flag87 (Implementation_Base_Type (Id));
1979 end Has_Volatile_Components;
1981 function Has_Xref_Entry (Id : E) return B is
1982 begin
1983 return Flag182 (Id);
1984 end Has_Xref_Entry;
1986 function Hiding_Loop_Variable (Id : E) return E is
1987 begin
1988 pragma Assert (Ekind (Id) = E_Variable);
1989 return Node8 (Id);
1990 end Hiding_Loop_Variable;
1992 function Hidden_In_Formal_Instance (Id : E) return L is
1993 begin
1994 pragma Assert (Ekind (Id) = E_Package);
1995 return Elist30 (Id);
1996 end Hidden_In_Formal_Instance;
1998 function Homonym (Id : E) return E is
1999 begin
2000 return Node4 (Id);
2001 end Homonym;
2003 function Ignore_SPARK_Mode_Pragmas (Id : E) return B is
2004 begin
2005 pragma Assert
2006 (Ekind_In (Id, E_Protected_Body, -- concurrent types
2007 E_Protected_Type,
2008 E_Task_Body,
2009 E_Task_Type)
2010 or else
2011 Ekind_In (Id, E_Entry, -- overloadable
2012 E_Entry_Family,
2013 E_Function,
2014 E_Generic_Function,
2015 E_Generic_Procedure,
2016 E_Operator,
2017 E_Procedure,
2018 E_Subprogram_Body)
2019 or else
2020 Ekind_In (Id, E_Generic_Package, -- packages
2021 E_Package,
2022 E_Package_Body));
2023 return Flag301 (Id);
2024 end Ignore_SPARK_Mode_Pragmas;
2026 function Import_Pragma (Id : E) return E is
2027 begin
2028 pragma Assert (Is_Subprogram (Id));
2029 return Node35 (Id);
2030 end Import_Pragma;
2032 function Incomplete_Actuals (Id : E) return L is
2033 begin
2034 pragma Assert (Ekind (Id) = E_Package);
2035 return Elist24 (Id);
2036 end Incomplete_Actuals;
2038 function Interface_Alias (Id : E) return E is
2039 begin
2040 pragma Assert (Is_Subprogram (Id));
2041 return Node25 (Id);
2042 end Interface_Alias;
2044 function Interfaces (Id : E) return L is
2045 begin
2046 pragma Assert (Is_Record_Type (Id));
2047 return Elist25 (Id);
2048 end Interfaces;
2050 function In_Package_Body (Id : E) return B is
2051 begin
2052 return Flag48 (Id);
2053 end In_Package_Body;
2055 function In_Private_Part (Id : E) return B is
2056 begin
2057 return Flag45 (Id);
2058 end In_Private_Part;
2060 function In_Use (Id : E) return B is
2061 begin
2062 pragma Assert (Nkind (Id) in N_Entity);
2063 return Flag8 (Id);
2064 end In_Use;
2066 function Initialization_Statements (Id : E) return N is
2067 begin
2068 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2069 return Node28 (Id);
2070 end Initialization_Statements;
2072 function Inner_Instances (Id : E) return L is
2073 begin
2074 return Elist23 (Id);
2075 end Inner_Instances;
2077 function Interface_Name (Id : E) return N is
2078 begin
2079 return Node21 (Id);
2080 end Interface_Name;
2082 function Is_Abstract_Subprogram (Id : E) return B is
2083 begin
2084 pragma Assert (Is_Overloadable (Id));
2085 return Flag19 (Id);
2086 end Is_Abstract_Subprogram;
2088 function Is_Abstract_Type (Id : E) return B is
2089 begin
2090 pragma Assert (Is_Type (Id));
2091 return Flag146 (Id);
2092 end Is_Abstract_Type;
2094 function Is_Access_Constant (Id : E) return B is
2095 begin
2096 pragma Assert (Is_Access_Type (Id));
2097 return Flag69 (Id);
2098 end Is_Access_Constant;
2100 function Is_Activation_Record (Id : E) return B is
2101 begin
2102 pragma Assert (Ekind (Id) = E_In_Parameter);
2103 return Flag305 (Id);
2104 end Is_Activation_Record;
2106 function Is_Actual_Subtype (Id : E) return B is
2107 begin
2108 pragma Assert (Is_Type (Id));
2109 return Flag293 (Id);
2110 end Is_Actual_Subtype;
2112 function Is_Ada_2005_Only (Id : E) return B is
2113 begin
2114 return Flag185 (Id);
2115 end Is_Ada_2005_Only;
2117 function Is_Ada_2012_Only (Id : E) return B is
2118 begin
2119 return Flag199 (Id);
2120 end Is_Ada_2012_Only;
2122 function Is_Aliased (Id : E) return B is
2123 begin
2124 pragma Assert (Nkind (Id) in N_Entity);
2125 return Flag15 (Id);
2126 end Is_Aliased;
2128 function Is_Asynchronous (Id : E) return B is
2129 begin
2130 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
2131 return Flag81 (Id);
2132 end Is_Asynchronous;
2134 function Is_Atomic (Id : E) return B is
2135 begin
2136 return Flag85 (Id);
2137 end Is_Atomic;
2139 function Is_Bit_Packed_Array (Id : E) return B is
2140 begin
2141 return Flag122 (Implementation_Base_Type (Id));
2142 end Is_Bit_Packed_Array;
2144 function Is_Called (Id : E) return B is
2145 begin
2146 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
2147 return Flag102 (Id);
2148 end Is_Called;
2150 function Is_Character_Type (Id : E) return B is
2151 begin
2152 return Flag63 (Id);
2153 end Is_Character_Type;
2155 function Is_Checked_Ghost_Entity (Id : E) return B is
2156 begin
2157 -- Allow this attribute to appear on unanalyzed entities
2159 pragma Assert (Nkind (Id) in N_Entity
2160 or else Ekind (Id) = E_Void);
2161 return Flag277 (Id);
2162 end Is_Checked_Ghost_Entity;
2164 function Is_Child_Unit (Id : E) return B is
2165 begin
2166 return Flag73 (Id);
2167 end Is_Child_Unit;
2169 function Is_Class_Wide_Clone (Id : E) return B is
2170 begin
2171 return Flag290 (Id);
2172 end Is_Class_Wide_Clone;
2174 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2175 begin
2176 return Flag35 (Id);
2177 end Is_Class_Wide_Equivalent_Type;
2179 function Is_Compilation_Unit (Id : E) return B is
2180 begin
2181 return Flag149 (Id);
2182 end Is_Compilation_Unit;
2184 function Is_Completely_Hidden (Id : E) return B is
2185 begin
2186 pragma Assert (Ekind (Id) = E_Discriminant);
2187 return Flag103 (Id);
2188 end Is_Completely_Hidden;
2190 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2191 begin
2192 return Flag80 (Id);
2193 end Is_Constr_Subt_For_U_Nominal;
2195 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2196 begin
2197 return Flag141 (Id);
2198 end Is_Constr_Subt_For_UN_Aliased;
2200 function Is_Constrained (Id : E) return B is
2201 begin
2202 pragma Assert (Nkind (Id) in N_Entity);
2203 return Flag12 (Id);
2204 end Is_Constrained;
2206 function Is_Constructor (Id : E) return B is
2207 begin
2208 return Flag76 (Id);
2209 end Is_Constructor;
2211 function Is_Controlled_Active (Id : E) return B is
2212 begin
2213 return Flag42 (Base_Type (Id));
2214 end Is_Controlled_Active;
2216 function Is_Controlling_Formal (Id : E) return B is
2217 begin
2218 pragma Assert (Is_Formal (Id));
2219 return Flag97 (Id);
2220 end Is_Controlling_Formal;
2222 function Is_CPP_Class (Id : E) return B is
2223 begin
2224 return Flag74 (Id);
2225 end Is_CPP_Class;
2227 function Is_DIC_Procedure (Id : E) return B is
2228 begin
2229 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2230 return Flag132 (Id);
2231 end Is_DIC_Procedure;
2233 function Is_Descendant_Of_Address (Id : E) return B is
2234 begin
2235 return Flag223 (Id);
2236 end Is_Descendant_Of_Address;
2238 function Is_Discrim_SO_Function (Id : E) return B is
2239 begin
2240 return Flag176 (Id);
2241 end Is_Discrim_SO_Function;
2243 function Is_Discriminant_Check_Function (Id : E) return B is
2244 begin
2245 return Flag264 (Id);
2246 end Is_Discriminant_Check_Function;
2248 function Is_Dispatch_Table_Entity (Id : E) return B is
2249 begin
2250 return Flag234 (Id);
2251 end Is_Dispatch_Table_Entity;
2253 function Is_Dispatching_Operation (Id : E) return B is
2254 begin
2255 pragma Assert (Nkind (Id) in N_Entity);
2256 return Flag6 (Id);
2257 end Is_Dispatching_Operation;
2259 function Is_Elaboration_Checks_OK_Id (Id : E) return B is
2260 begin
2261 pragma Assert (Is_Elaboration_Target (Id));
2262 return Flag148 (Id);
2263 end Is_Elaboration_Checks_OK_Id;
2265 function Is_Elaboration_Warnings_OK_Id (Id : E) return B is
2266 begin
2267 pragma Assert (Is_Elaboration_Target (Id) or else Ekind (Id) = E_Void);
2268 return Flag304 (Id);
2269 end Is_Elaboration_Warnings_OK_Id;
2271 function Is_Eliminated (Id : E) return B is
2272 begin
2273 return Flag124 (Id);
2274 end Is_Eliminated;
2276 function Is_Entry_Formal (Id : E) return B is
2277 begin
2278 return Flag52 (Id);
2279 end Is_Entry_Formal;
2281 function Is_Entry_Wrapper (Id : E) return B is
2282 begin
2283 return Flag297 (Id);
2284 end Is_Entry_Wrapper;
2286 function Is_Exception_Handler (Id : E) return B is
2287 begin
2288 pragma Assert (Ekind (Id) = E_Block);
2289 return Flag286 (Id);
2290 end Is_Exception_Handler;
2292 function Is_Exported (Id : E) return B is
2293 begin
2294 return Flag99 (Id);
2295 end Is_Exported;
2297 function Is_Finalized_Transient (Id : E) return B is
2298 begin
2299 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2300 return Flag252 (Id);
2301 end Is_Finalized_Transient;
2303 function Is_First_Subtype (Id : E) return B is
2304 begin
2305 return Flag70 (Id);
2306 end Is_First_Subtype;
2308 function Is_For_Access_Subtype (Id : E) return B is
2309 begin
2310 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2311 return Flag118 (Id);
2312 end Is_For_Access_Subtype;
2314 function Is_Formal_Subprogram (Id : E) return B is
2315 begin
2316 return Flag111 (Id);
2317 end Is_Formal_Subprogram;
2319 function Is_Frozen (Id : E) return B is
2320 begin
2321 return Flag4 (Id);
2322 end Is_Frozen;
2324 function Is_Generic_Actual_Subprogram (Id : E) return B is
2325 begin
2326 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2327 return Flag274 (Id);
2328 end Is_Generic_Actual_Subprogram;
2330 function Is_Generic_Actual_Type (Id : E) return B is
2331 begin
2332 pragma Assert (Is_Type (Id));
2333 return Flag94 (Id);
2334 end Is_Generic_Actual_Type;
2336 function Is_Generic_Instance (Id : E) return B is
2337 begin
2338 return Flag130 (Id);
2339 end Is_Generic_Instance;
2341 function Is_Generic_Type (Id : E) return B is
2342 begin
2343 pragma Assert (Nkind (Id) in N_Entity);
2344 return Flag13 (Id);
2345 end Is_Generic_Type;
2347 function Is_Hidden (Id : E) return B is
2348 begin
2349 return Flag57 (Id);
2350 end Is_Hidden;
2352 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2353 begin
2354 return Flag2 (Id);
2355 end Is_Hidden_Non_Overridden_Subpgm;
2357 function Is_Hidden_Open_Scope (Id : E) return B is
2358 begin
2359 return Flag171 (Id);
2360 end Is_Hidden_Open_Scope;
2362 function Is_Ignored_Ghost_Entity (Id : E) return B is
2363 begin
2364 -- Allow this attribute to appear on unanalyzed entities
2366 pragma Assert (Nkind (Id) in N_Entity
2367 or else Ekind (Id) = E_Void);
2368 return Flag278 (Id);
2369 end Is_Ignored_Ghost_Entity;
2371 function Is_Ignored_Transient (Id : E) return B is
2372 begin
2373 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2374 return Flag295 (Id);
2375 end Is_Ignored_Transient;
2377 function Is_Immediately_Visible (Id : E) return B is
2378 begin
2379 pragma Assert (Nkind (Id) in N_Entity);
2380 return Flag7 (Id);
2381 end Is_Immediately_Visible;
2383 function Is_Implementation_Defined (Id : E) return B is
2384 begin
2385 return Flag254 (Id);
2386 end Is_Implementation_Defined;
2388 function Is_Imported (Id : E) return B is
2389 begin
2390 return Flag24 (Id);
2391 end Is_Imported;
2393 function Is_Independent (Id : E) return B is
2394 begin
2395 return Flag268 (Id);
2396 end Is_Independent;
2398 function Is_Initial_Condition_Procedure (Id : E) return B is
2399 begin
2400 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2401 return Flag302 (Id);
2402 end Is_Initial_Condition_Procedure;
2404 function Is_Inlined (Id : E) return B is
2405 begin
2406 return Flag11 (Id);
2407 end Is_Inlined;
2409 function Is_Inlined_Always (Id : E) return B is
2410 begin
2411 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2412 return Flag1 (Id);
2413 end Is_Inlined_Always;
2415 function Is_Interface (Id : E) return B is
2416 begin
2417 return Flag186 (Id);
2418 end Is_Interface;
2420 function Is_Instantiated (Id : E) return B is
2421 begin
2422 return Flag126 (Id);
2423 end Is_Instantiated;
2425 function Is_Internal (Id : E) return B is
2426 begin
2427 pragma Assert (Nkind (Id) in N_Entity);
2428 return Flag17 (Id);
2429 end Is_Internal;
2431 function Is_Interrupt_Handler (Id : E) return B is
2432 begin
2433 pragma Assert (Nkind (Id) in N_Entity);
2434 return Flag89 (Id);
2435 end Is_Interrupt_Handler;
2437 function Is_Intrinsic_Subprogram (Id : E) return B is
2438 begin
2439 return Flag64 (Id);
2440 end Is_Intrinsic_Subprogram;
2442 function Is_Invariant_Procedure (Id : E) return B is
2443 begin
2444 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2445 return Flag257 (Id);
2446 end Is_Invariant_Procedure;
2448 function Is_Itype (Id : E) return B is
2449 begin
2450 return Flag91 (Id);
2451 end Is_Itype;
2453 function Is_Known_Non_Null (Id : E) return B is
2454 begin
2455 return Flag37 (Id);
2456 end Is_Known_Non_Null;
2458 function Is_Known_Null (Id : E) return B is
2459 begin
2460 return Flag204 (Id);
2461 end Is_Known_Null;
2463 function Is_Known_Valid (Id : E) return B is
2464 begin
2465 return Flag170 (Id);
2466 end Is_Known_Valid;
2468 function Is_Limited_Composite (Id : E) return B is
2469 begin
2470 return Flag106 (Id);
2471 end Is_Limited_Composite;
2473 function Is_Limited_Interface (Id : E) return B is
2474 begin
2475 return Flag197 (Id);
2476 end Is_Limited_Interface;
2478 function Is_Limited_Record (Id : E) return B is
2479 begin
2480 return Flag25 (Id);
2481 end Is_Limited_Record;
2483 function Is_Local_Anonymous_Access (Id : E) return B is
2484 begin
2485 pragma Assert (Is_Access_Type (Id));
2486 return Flag194 (Id);
2487 end Is_Local_Anonymous_Access;
2489 function Is_Loop_Parameter (Id : E) return B is
2490 begin
2491 return Flag307 (Id);
2492 end Is_Loop_Parameter;
2494 function Is_Machine_Code_Subprogram (Id : E) return B is
2495 begin
2496 pragma Assert (Is_Subprogram (Id));
2497 return Flag137 (Id);
2498 end Is_Machine_Code_Subprogram;
2500 function Is_Non_Static_Subtype (Id : E) return B is
2501 begin
2502 pragma Assert (Is_Type (Id));
2503 return Flag109 (Id);
2504 end Is_Non_Static_Subtype;
2506 function Is_Null_Init_Proc (Id : E) return B is
2507 begin
2508 pragma Assert (Ekind (Id) = E_Procedure);
2509 return Flag178 (Id);
2510 end Is_Null_Init_Proc;
2512 function Is_Obsolescent (Id : E) return B is
2513 begin
2514 return Flag153 (Id);
2515 end Is_Obsolescent;
2517 function Is_Only_Out_Parameter (Id : E) return B is
2518 begin
2519 pragma Assert (Is_Formal (Id));
2520 return Flag226 (Id);
2521 end Is_Only_Out_Parameter;
2523 function Is_Package_Body_Entity (Id : E) return B is
2524 begin
2525 return Flag160 (Id);
2526 end Is_Package_Body_Entity;
2528 function Is_Packed (Id : E) return B is
2529 begin
2530 return Flag51 (Implementation_Base_Type (Id));
2531 end Is_Packed;
2533 function Is_Packed_Array_Impl_Type (Id : E) return B is
2534 begin
2535 return Flag138 (Id);
2536 end Is_Packed_Array_Impl_Type;
2538 function Is_Param_Block_Component_Type (Id : E) return B is
2539 begin
2540 pragma Assert (Is_Access_Type (Id));
2541 return Flag215 (Base_Type (Id));
2542 end Is_Param_Block_Component_Type;
2544 function Is_Partial_Invariant_Procedure (Id : E) return B is
2545 begin
2546 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2547 return Flag292 (Id);
2548 end Is_Partial_Invariant_Procedure;
2550 function Is_Potentially_Use_Visible (Id : E) return B is
2551 begin
2552 pragma Assert (Nkind (Id) in N_Entity);
2553 return Flag9 (Id);
2554 end Is_Potentially_Use_Visible;
2556 function Is_Predicate_Function (Id : E) return B is
2557 begin
2558 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2559 return Flag255 (Id);
2560 end Is_Predicate_Function;
2562 function Is_Predicate_Function_M (Id : E) return B is
2563 begin
2564 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2565 return Flag256 (Id);
2566 end Is_Predicate_Function_M;
2568 function Is_Preelaborated (Id : E) return B is
2569 begin
2570 return Flag59 (Id);
2571 end Is_Preelaborated;
2573 function Is_Primitive (Id : E) return B is
2574 begin
2575 pragma Assert
2576 (Is_Overloadable (Id)
2577 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2578 return Flag218 (Id);
2579 end Is_Primitive;
2581 function Is_Primitive_Wrapper (Id : E) return B is
2582 begin
2583 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2584 return Flag195 (Id);
2585 end Is_Primitive_Wrapper;
2587 function Is_Private_Composite (Id : E) return B is
2588 begin
2589 pragma Assert (Is_Type (Id));
2590 return Flag107 (Id);
2591 end Is_Private_Composite;
2593 function Is_Private_Descendant (Id : E) return B is
2594 begin
2595 return Flag53 (Id);
2596 end Is_Private_Descendant;
2598 function Is_Private_Primitive (Id : E) return B is
2599 begin
2600 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2601 return Flag245 (Id);
2602 end Is_Private_Primitive;
2604 function Is_Public (Id : E) return B is
2605 begin
2606 pragma Assert (Nkind (Id) in N_Entity);
2607 return Flag10 (Id);
2608 end Is_Public;
2610 function Is_Pure (Id : E) return B is
2611 begin
2612 return Flag44 (Id);
2613 end Is_Pure;
2615 function Is_Pure_Unit_Access_Type (Id : E) return B is
2616 begin
2617 pragma Assert (Is_Access_Type (Id));
2618 return Flag189 (Id);
2619 end Is_Pure_Unit_Access_Type;
2621 function Is_RACW_Stub_Type (Id : E) return B is
2622 begin
2623 pragma Assert (Is_Type (Id));
2624 return Flag244 (Id);
2625 end Is_RACW_Stub_Type;
2627 function Is_Raised (Id : E) return B is
2628 begin
2629 pragma Assert (Ekind (Id) = E_Exception);
2630 return Flag224 (Id);
2631 end Is_Raised;
2633 function Is_Remote_Call_Interface (Id : E) return B is
2634 begin
2635 return Flag62 (Id);
2636 end Is_Remote_Call_Interface;
2638 function Is_Remote_Types (Id : E) return B is
2639 begin
2640 return Flag61 (Id);
2641 end Is_Remote_Types;
2643 function Is_Renaming_Of_Object (Id : E) return B is
2644 begin
2645 return Flag112 (Id);
2646 end Is_Renaming_Of_Object;
2648 function Is_Return_Object (Id : E) return B is
2649 begin
2650 return Flag209 (Id);
2651 end Is_Return_Object;
2653 function Is_Safe_To_Reevaluate (Id : E) return B is
2654 begin
2655 return Flag249 (Id);
2656 end Is_Safe_To_Reevaluate;
2658 function Is_Shared_Passive (Id : E) return B is
2659 begin
2660 return Flag60 (Id);
2661 end Is_Shared_Passive;
2663 function Is_Static_Type (Id : E) return B is
2664 begin
2665 return Flag281 (Id);
2666 end Is_Static_Type;
2668 function Is_Statically_Allocated (Id : E) return B is
2669 begin
2670 return Flag28 (Id);
2671 end Is_Statically_Allocated;
2673 function Is_Tag (Id : E) return B is
2674 begin
2675 pragma Assert (Nkind (Id) in N_Entity);
2676 return Flag78 (Id);
2677 end Is_Tag;
2679 function Is_Tagged_Type (Id : E) return B is
2680 begin
2681 return Flag55 (Id);
2682 end Is_Tagged_Type;
2684 function Is_Thunk (Id : E) return B is
2685 begin
2686 return Flag225 (Id);
2687 end Is_Thunk;
2689 function Is_Trivial_Subprogram (Id : E) return B is
2690 begin
2691 return Flag235 (Id);
2692 end Is_Trivial_Subprogram;
2694 function Is_True_Constant (Id : E) return B is
2695 begin
2696 return Flag163 (Id);
2697 end Is_True_Constant;
2699 function Is_Unchecked_Union (Id : E) return B is
2700 begin
2701 return Flag117 (Implementation_Base_Type (Id));
2702 end Is_Unchecked_Union;
2704 function Is_Underlying_Full_View (Id : E) return B is
2705 begin
2706 return Flag298 (Id);
2707 end Is_Underlying_Full_View;
2709 function Is_Underlying_Record_View (Id : E) return B is
2710 begin
2711 return Flag246 (Id);
2712 end Is_Underlying_Record_View;
2714 function Is_Unimplemented (Id : E) return B is
2715 begin
2716 return Flag284 (Id);
2717 end Is_Unimplemented;
2719 function Is_Unsigned_Type (Id : E) return B is
2720 begin
2721 pragma Assert (Is_Type (Id));
2722 return Flag144 (Id);
2723 end Is_Unsigned_Type;
2725 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2726 begin
2727 return Flag283 (Id);
2728 end Is_Uplevel_Referenced_Entity;
2730 function Is_Valued_Procedure (Id : E) return B is
2731 begin
2732 pragma Assert (Ekind (Id) = E_Procedure);
2733 return Flag127 (Id);
2734 end Is_Valued_Procedure;
2736 function Is_Visible_Formal (Id : E) return B is
2737 begin
2738 return Flag206 (Id);
2739 end Is_Visible_Formal;
2741 function Is_Visible_Lib_Unit (Id : E) return B is
2742 begin
2743 return Flag116 (Id);
2744 end Is_Visible_Lib_Unit;
2746 function Is_Volatile (Id : E) return B is
2747 begin
2748 pragma Assert (Nkind (Id) in N_Entity);
2750 if Is_Type (Id) then
2751 return Flag16 (Base_Type (Id));
2752 else
2753 return Flag16 (Id);
2754 end if;
2755 end Is_Volatile;
2757 function Is_Volatile_Full_Access (Id : E) return B is
2758 begin
2759 return Flag285 (Id);
2760 end Is_Volatile_Full_Access;
2762 function Itype_Printed (Id : E) return B is
2763 begin
2764 pragma Assert (Is_Itype (Id));
2765 return Flag202 (Id);
2766 end Itype_Printed;
2768 function Kill_Elaboration_Checks (Id : E) return B is
2769 begin
2770 return Flag32 (Id);
2771 end Kill_Elaboration_Checks;
2773 function Kill_Range_Checks (Id : E) return B is
2774 begin
2775 return Flag33 (Id);
2776 end Kill_Range_Checks;
2778 function Known_To_Have_Preelab_Init (Id : E) return B is
2779 begin
2780 pragma Assert (Is_Type (Id));
2781 return Flag207 (Id);
2782 end Known_To_Have_Preelab_Init;
2784 function Last_Aggregate_Assignment (Id : E) return N is
2785 begin
2786 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2787 return Node30 (Id);
2788 end Last_Aggregate_Assignment;
2790 function Last_Assignment (Id : E) return N is
2791 begin
2792 pragma Assert (Is_Assignable (Id));
2793 return Node26 (Id);
2794 end Last_Assignment;
2796 function Last_Entity (Id : E) return E is
2797 begin
2798 return Node20 (Id);
2799 end Last_Entity;
2801 function Limited_View (Id : E) return E is
2802 begin
2803 pragma Assert (Ekind (Id) = E_Package);
2804 return Node23 (Id);
2805 end Limited_View;
2807 function Linker_Section_Pragma (Id : E) return N is
2808 begin
2809 pragma Assert
2810 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
2811 return Node33 (Id);
2812 end Linker_Section_Pragma;
2814 function Lit_Indexes (Id : E) return E is
2815 begin
2816 pragma Assert (Is_Enumeration_Type (Id));
2817 return Node18 (Id);
2818 end Lit_Indexes;
2820 function Lit_Strings (Id : E) return E is
2821 begin
2822 pragma Assert (Is_Enumeration_Type (Id));
2823 return Node16 (Id);
2824 end Lit_Strings;
2826 function Low_Bound_Tested (Id : E) return B is
2827 begin
2828 return Flag205 (Id);
2829 end Low_Bound_Tested;
2831 function Machine_Radix_10 (Id : E) return B is
2832 begin
2833 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2834 return Flag84 (Id);
2835 end Machine_Radix_10;
2837 function Master_Id (Id : E) return E is
2838 begin
2839 pragma Assert (Is_Access_Type (Id));
2840 return Node17 (Id);
2841 end Master_Id;
2843 function Materialize_Entity (Id : E) return B is
2844 begin
2845 return Flag168 (Id);
2846 end Materialize_Entity;
2848 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2849 begin
2850 return Flag262 (Id);
2851 end May_Inherit_Delayed_Rep_Aspects;
2853 function Mechanism (Id : E) return M is
2854 begin
2855 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2856 return UI_To_Int (Uint8 (Id));
2857 end Mechanism;
2859 function Modulus (Id : E) return Uint is
2860 begin
2861 pragma Assert (Is_Modular_Integer_Type (Id));
2862 return Uint17 (Base_Type (Id));
2863 end Modulus;
2865 function Must_Be_On_Byte_Boundary (Id : E) return B is
2866 begin
2867 pragma Assert (Is_Type (Id));
2868 return Flag183 (Id);
2869 end Must_Be_On_Byte_Boundary;
2871 function Must_Have_Preelab_Init (Id : E) return B is
2872 begin
2873 pragma Assert (Is_Type (Id));
2874 return Flag208 (Id);
2875 end Must_Have_Preelab_Init;
2877 function Needs_Activation_Record (Id : E) return B is
2878 begin
2879 return Flag306 (Id);
2880 end Needs_Activation_Record;
2882 function Needs_Debug_Info (Id : E) return B is
2883 begin
2884 return Flag147 (Id);
2885 end Needs_Debug_Info;
2887 function Needs_No_Actuals (Id : E) return B is
2888 begin
2889 pragma Assert
2890 (Is_Overloadable (Id)
2891 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2892 return Flag22 (Id);
2893 end Needs_No_Actuals;
2895 function Never_Set_In_Source (Id : E) return B is
2896 begin
2897 return Flag115 (Id);
2898 end Never_Set_In_Source;
2900 function Next_Inlined_Subprogram (Id : E) return E is
2901 begin
2902 return Node12 (Id);
2903 end Next_Inlined_Subprogram;
2905 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2906 begin
2907 pragma Assert (Is_Discrete_Type (Id));
2908 return Flag276 (Id);
2909 end No_Dynamic_Predicate_On_Actual;
2911 function No_Pool_Assigned (Id : E) return B is
2912 begin
2913 pragma Assert (Is_Access_Type (Id));
2914 return Flag131 (Root_Type (Id));
2915 end No_Pool_Assigned;
2917 function No_Predicate_On_Actual (Id : E) return Boolean is
2918 begin
2919 pragma Assert (Is_Discrete_Type (Id));
2920 return Flag275 (Id);
2921 end No_Predicate_On_Actual;
2923 function No_Reordering (Id : E) return B is
2924 begin
2925 pragma Assert (Is_Record_Type (Id));
2926 return Flag239 (Implementation_Base_Type (Id));
2927 end No_Reordering;
2929 function No_Return (Id : E) return B is
2930 begin
2931 return Flag113 (Id);
2932 end No_Return;
2934 function No_Strict_Aliasing (Id : E) return B is
2935 begin
2936 pragma Assert (Is_Access_Type (Id));
2937 return Flag136 (Base_Type (Id));
2938 end No_Strict_Aliasing;
2940 function No_Tagged_Streams_Pragma (Id : E) return N is
2941 begin
2942 pragma Assert (Is_Tagged_Type (Id));
2943 return Node32 (Id);
2944 end No_Tagged_Streams_Pragma;
2946 function Non_Binary_Modulus (Id : E) return B is
2947 begin
2948 pragma Assert (Is_Type (Id));
2949 return Flag58 (Base_Type (Id));
2950 end Non_Binary_Modulus;
2952 function Non_Limited_View (Id : E) return E is
2953 begin
2954 pragma Assert
2955 (Ekind (Id) in Incomplete_Kind
2956 or else
2957 Ekind (Id) in Class_Wide_Kind
2958 or else
2959 Ekind (Id) = E_Abstract_State);
2960 return Node19 (Id);
2961 end Non_Limited_View;
2963 function Nonzero_Is_True (Id : E) return B is
2964 begin
2965 pragma Assert (Root_Type (Id) = Standard_Boolean);
2966 return Flag162 (Base_Type (Id));
2967 end Nonzero_Is_True;
2969 function Normalized_First_Bit (Id : E) return U is
2970 begin
2971 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2972 return Uint8 (Id);
2973 end Normalized_First_Bit;
2975 function Normalized_Position (Id : E) return U is
2976 begin
2977 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2978 return Uint14 (Id);
2979 end Normalized_Position;
2981 function Normalized_Position_Max (Id : E) return U is
2982 begin
2983 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2984 return Uint10 (Id);
2985 end Normalized_Position_Max;
2987 function OK_To_Rename (Id : E) return B is
2988 begin
2989 pragma Assert (Ekind (Id) = E_Variable);
2990 return Flag247 (Id);
2991 end OK_To_Rename;
2993 function Optimize_Alignment_Space (Id : E) return B is
2994 begin
2995 pragma Assert
2996 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2997 return Flag241 (Id);
2998 end Optimize_Alignment_Space;
3000 function Optimize_Alignment_Time (Id : E) return B is
3001 begin
3002 pragma Assert
3003 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
3004 return Flag242 (Id);
3005 end Optimize_Alignment_Time;
3007 function Original_Access_Type (Id : E) return E is
3008 begin
3009 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
3010 return Node28 (Id);
3011 end Original_Access_Type;
3013 function Original_Array_Type (Id : E) return E is
3014 begin
3015 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
3016 return Node21 (Id);
3017 end Original_Array_Type;
3019 function Original_Protected_Subprogram (Id : E) return N is
3020 begin
3021 return Node41 (Id);
3022 end Original_Protected_Subprogram;
3024 function Original_Record_Component (Id : E) return E is
3025 begin
3026 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
3027 return Node22 (Id);
3028 end Original_Record_Component;
3030 function Overlays_Constant (Id : E) return B is
3031 begin
3032 return Flag243 (Id);
3033 end Overlays_Constant;
3035 function Overridden_Operation (Id : E) return E is
3036 begin
3037 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
3038 return Node26 (Id);
3039 end Overridden_Operation;
3041 function Package_Instantiation (Id : E) return N is
3042 begin
3043 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3044 return Node26 (Id);
3045 end Package_Instantiation;
3047 function Packed_Array_Impl_Type (Id : E) return E is
3048 begin
3049 pragma Assert (Is_Array_Type (Id));
3050 return Node23 (Id);
3051 end Packed_Array_Impl_Type;
3053 function Parent_Subtype (Id : E) return E is
3054 begin
3055 pragma Assert (Is_Record_Type (Id));
3056 return Node19 (Base_Type (Id));
3057 end Parent_Subtype;
3059 function Part_Of_Constituents (Id : E) return L is
3060 begin
3061 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3062 return Elist10 (Id);
3063 end Part_Of_Constituents;
3065 function Part_Of_References (Id : E) return L is
3066 begin
3067 pragma Assert (Ekind (Id) = E_Variable);
3068 return Elist11 (Id);
3069 end Part_Of_References;
3071 function Partial_View_Has_Unknown_Discr (Id : E) return B is
3072 begin
3073 pragma Assert (Is_Type (Id));
3074 return Flag280 (Id);
3075 end Partial_View_Has_Unknown_Discr;
3077 function Pending_Access_Types (Id : E) return L is
3078 begin
3079 pragma Assert (Is_Type (Id));
3080 return Elist15 (Id);
3081 end Pending_Access_Types;
3083 function Postconditions_Proc (Id : E) return E is
3084 begin
3085 pragma Assert (Ekind_In (Id, E_Entry,
3086 E_Entry_Family,
3087 E_Function,
3088 E_Procedure));
3089 return Node14 (Id);
3090 end Postconditions_Proc;
3092 function Predicated_Parent (Id : E) return E is
3093 begin
3094 pragma Assert (Ekind_In (Id, E_Array_Subtype,
3095 E_Record_Subtype,
3096 E_Record_Subtype_With_Private));
3097 return Node38 (Id);
3098 end Predicated_Parent;
3100 function Predicates_Ignored (Id : E) return B is
3101 begin
3102 pragma Assert (Is_Type (Id));
3103 return Flag288 (Id);
3104 end Predicates_Ignored;
3106 function Prev_Entity (Id : E) return E is
3107 begin
3108 return Node36 (Id);
3109 end Prev_Entity;
3111 function Prival (Id : E) return E is
3112 begin
3113 pragma Assert (Is_Protected_Component (Id));
3114 return Node17 (Id);
3115 end Prival;
3117 function Prival_Link (Id : E) return E is
3118 begin
3119 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3120 return Node20 (Id);
3121 end Prival_Link;
3123 function Private_Dependents (Id : E) return L is
3124 begin
3125 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
3126 return Elist18 (Id);
3127 end Private_Dependents;
3129 function Private_View (Id : E) return N is
3130 begin
3131 pragma Assert (Is_Private_Type (Id));
3132 return Node22 (Id);
3133 end Private_View;
3135 function Protected_Body_Subprogram (Id : E) return E is
3136 begin
3137 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
3138 return Node11 (Id);
3139 end Protected_Body_Subprogram;
3141 function Protected_Formal (Id : E) return E is
3142 begin
3143 pragma Assert (Is_Formal (Id));
3144 return Node22 (Id);
3145 end Protected_Formal;
3147 function Protected_Subprogram (Id : E) return N is
3148 begin
3149 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3150 return Node39 (Id);
3151 end Protected_Subprogram;
3153 function Protection_Object (Id : E) return E is
3154 begin
3155 pragma Assert (Ekind_In (Id, E_Entry,
3156 E_Entry_Family,
3157 E_Function,
3158 E_Procedure));
3159 return Node23 (Id);
3160 end Protection_Object;
3162 function Reachable (Id : E) return B is
3163 begin
3164 return Flag49 (Id);
3165 end Reachable;
3167 function Receiving_Entry (Id : E) return E is
3168 begin
3169 pragma Assert (Ekind (Id) = E_Procedure);
3170 return Node19 (Id);
3171 end Receiving_Entry;
3173 function Referenced (Id : E) return B is
3174 begin
3175 return Flag156 (Id);
3176 end Referenced;
3178 function Referenced_As_LHS (Id : E) return B is
3179 begin
3180 return Flag36 (Id);
3181 end Referenced_As_LHS;
3183 function Referenced_As_Out_Parameter (Id : E) return B is
3184 begin
3185 return Flag227 (Id);
3186 end Referenced_As_Out_Parameter;
3188 function Refinement_Constituents (Id : E) return L is
3189 begin
3190 pragma Assert (Ekind (Id) = E_Abstract_State);
3191 return Elist8 (Id);
3192 end Refinement_Constituents;
3194 function Register_Exception_Call (Id : E) return N is
3195 begin
3196 pragma Assert (Ekind (Id) = E_Exception);
3197 return Node20 (Id);
3198 end Register_Exception_Call;
3200 function Related_Array_Object (Id : E) return E is
3201 begin
3202 pragma Assert (Is_Array_Type (Id));
3203 return Node25 (Id);
3204 end Related_Array_Object;
3206 function Related_Expression (Id : E) return N is
3207 begin
3208 pragma Assert (Ekind (Id) in Type_Kind
3209 or else Ekind_In (Id, E_Constant, E_Variable));
3210 return Node24 (Id);
3211 end Related_Expression;
3213 function Related_Instance (Id : E) return E is
3214 begin
3215 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3216 return Node15 (Id);
3217 end Related_Instance;
3219 function Related_Type (Id : E) return E is
3220 begin
3221 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
3222 return Node27 (Id);
3223 end Related_Type;
3225 function Relative_Deadline_Variable (Id : E) return E is
3226 begin
3227 pragma Assert (Is_Task_Type (Id));
3228 return Node28 (Implementation_Base_Type (Id));
3229 end Relative_Deadline_Variable;
3231 function Renamed_Entity (Id : E) return N is
3232 begin
3233 return Node18 (Id);
3234 end Renamed_Entity;
3236 function Renamed_In_Spec (Id : E) return B is
3237 begin
3238 pragma Assert (Ekind (Id) = E_Package);
3239 return Flag231 (Id);
3240 end Renamed_In_Spec;
3242 function Renamed_Object (Id : E) return N is
3243 begin
3244 return Node18 (Id);
3245 end Renamed_Object;
3247 function Renaming_Map (Id : E) return U is
3248 begin
3249 return Uint9 (Id);
3250 end Renaming_Map;
3252 function Requires_Overriding (Id : E) return B is
3253 begin
3254 pragma Assert (Is_Overloadable (Id));
3255 return Flag213 (Id);
3256 end Requires_Overriding;
3258 function Return_Present (Id : E) return B is
3259 begin
3260 return Flag54 (Id);
3261 end Return_Present;
3263 function Return_Applies_To (Id : E) return N is
3264 begin
3265 return Node8 (Id);
3266 end Return_Applies_To;
3268 function Returns_By_Ref (Id : E) return B is
3269 begin
3270 return Flag90 (Id);
3271 end Returns_By_Ref;
3273 function Reverse_Bit_Order (Id : E) return B is
3274 begin
3275 pragma Assert (Is_Record_Type (Id));
3276 return Flag164 (Base_Type (Id));
3277 end Reverse_Bit_Order;
3279 function Reverse_Storage_Order (Id : E) return B is
3280 begin
3281 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3282 return Flag93 (Base_Type (Id));
3283 end Reverse_Storage_Order;
3285 function Rewritten_For_C (Id : E) return B is
3286 begin
3287 pragma Assert (Ekind (Id) = E_Function);
3288 return Flag287 (Id);
3289 end Rewritten_For_C;
3291 function RM_Size (Id : E) return U is
3292 begin
3293 pragma Assert (Is_Type (Id));
3294 return Uint13 (Id);
3295 end RM_Size;
3297 function Scalar_Range (Id : E) return N is
3298 begin
3299 return Node20 (Id);
3300 end Scalar_Range;
3302 function Scale_Value (Id : E) return U is
3303 begin
3304 return Uint16 (Id);
3305 end Scale_Value;
3307 function Scope_Depth_Value (Id : E) return U is
3308 begin
3309 return Uint22 (Id);
3310 end Scope_Depth_Value;
3312 function Sec_Stack_Needed_For_Return (Id : E) return B is
3313 begin
3314 return Flag167 (Id);
3315 end Sec_Stack_Needed_For_Return;
3317 function Shadow_Entities (Id : E) return S is
3318 begin
3319 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3320 return List14 (Id);
3321 end Shadow_Entities;
3323 function Shared_Var_Procs_Instance (Id : E) return E is
3324 begin
3325 pragma Assert (Ekind (Id) = E_Variable);
3326 return Node22 (Id);
3327 end Shared_Var_Procs_Instance;
3329 function Size_Check_Code (Id : E) return N is
3330 begin
3331 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3332 return Node19 (Id);
3333 end Size_Check_Code;
3335 function Size_Depends_On_Discriminant (Id : E) return B is
3336 begin
3337 return Flag177 (Id);
3338 end Size_Depends_On_Discriminant;
3340 function Size_Known_At_Compile_Time (Id : E) return B is
3341 begin
3342 return Flag92 (Id);
3343 end Size_Known_At_Compile_Time;
3345 function Small_Value (Id : E) return R is
3346 begin
3347 pragma Assert (Is_Fixed_Point_Type (Id));
3348 return Ureal21 (Id);
3349 end Small_Value;
3351 function SPARK_Aux_Pragma (Id : E) return N is
3352 begin
3353 pragma Assert
3354 (Ekind_In (Id, E_Protected_Type, -- concurrent types
3355 E_Task_Type)
3356 or else
3357 Ekind_In (Id, E_Generic_Package, -- packages
3358 E_Package,
3359 E_Package_Body));
3360 return Node41 (Id);
3361 end SPARK_Aux_Pragma;
3363 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3364 begin
3365 pragma Assert
3366 (Ekind_In (Id, E_Protected_Type, -- concurrent types
3367 E_Task_Type)
3368 or else
3369 Ekind_In (Id, E_Generic_Package, -- packages
3370 E_Package,
3371 E_Package_Body));
3372 return Flag266 (Id);
3373 end SPARK_Aux_Pragma_Inherited;
3375 function SPARK_Pragma (Id : E) return N is
3376 begin
3377 pragma Assert
3378 (Ekind_In (Id, E_Constant, -- objects
3379 E_Variable)
3380 or else
3381 Ekind_In (Id, E_Abstract_State, -- overloadable
3382 E_Entry,
3383 E_Entry_Family,
3384 E_Function,
3385 E_Generic_Function,
3386 E_Generic_Procedure,
3387 E_Operator,
3388 E_Procedure,
3389 E_Subprogram_Body)
3390 or else
3391 Ekind_In (Id, E_Generic_Package, -- packages
3392 E_Package,
3393 E_Package_Body)
3394 or else
3395 Ekind (Id) = E_Void -- special purpose
3396 or else
3397 Ekind_In (Id, E_Protected_Body, -- types
3398 E_Task_Body)
3399 or else
3400 Is_Type (Id));
3401 return Node40 (Id);
3402 end SPARK_Pragma;
3404 function SPARK_Pragma_Inherited (Id : E) return B is
3405 begin
3406 pragma Assert
3407 (Ekind_In (Id, E_Constant, -- objects
3408 E_Variable)
3409 or else
3410 Ekind_In (Id, E_Abstract_State, -- overloadable
3411 E_Entry,
3412 E_Entry_Family,
3413 E_Function,
3414 E_Generic_Function,
3415 E_Generic_Procedure,
3416 E_Operator,
3417 E_Procedure,
3418 E_Subprogram_Body)
3419 or else
3420 Ekind_In (Id, E_Generic_Package, -- packages
3421 E_Package,
3422 E_Package_Body)
3423 or else
3424 Ekind (Id) = E_Void -- special purpose
3425 or else
3426 Ekind_In (Id, E_Protected_Body, -- types
3427 E_Task_Body)
3428 or else
3429 Is_Type (Id));
3430 return Flag265 (Id);
3431 end SPARK_Pragma_Inherited;
3433 function Spec_Entity (Id : E) return E is
3434 begin
3435 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3436 return Node19 (Id);
3437 end Spec_Entity;
3439 function SSO_Set_High_By_Default (Id : E) return B is
3440 begin
3441 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3442 return Flag273 (Base_Type (Id));
3443 end SSO_Set_High_By_Default;
3445 function SSO_Set_Low_By_Default (Id : E) return B is
3446 begin
3447 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3448 return Flag272 (Base_Type (Id));
3449 end SSO_Set_Low_By_Default;
3451 function Static_Discrete_Predicate (Id : E) return S is
3452 begin
3453 pragma Assert (Is_Discrete_Type (Id));
3454 return List25 (Id);
3455 end Static_Discrete_Predicate;
3457 function Static_Real_Or_String_Predicate (Id : E) return N is
3458 begin
3459 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3460 return Node25 (Id);
3461 end Static_Real_Or_String_Predicate;
3463 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3464 begin
3465 pragma Assert (Ekind_In (Id, E_Constant,
3466 E_Loop_Parameter,
3467 E_Variable));
3468 return Node15 (Id);
3469 end Status_Flag_Or_Transient_Decl;
3471 function Storage_Size_Variable (Id : E) return E is
3472 begin
3473 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3474 return Node26 (Implementation_Base_Type (Id));
3475 end Storage_Size_Variable;
3477 function Static_Elaboration_Desired (Id : E) return B is
3478 begin
3479 pragma Assert (Ekind (Id) = E_Package);
3480 return Flag77 (Id);
3481 end Static_Elaboration_Desired;
3483 function Static_Initialization (Id : E) return N is
3484 begin
3485 pragma Assert
3486 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3487 return Node30 (Id);
3488 end Static_Initialization;
3490 function Stored_Constraint (Id : E) return L is
3491 begin
3492 pragma Assert
3493 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3494 return Elist23 (Id);
3495 end Stored_Constraint;
3497 function Stores_Attribute_Old_Prefix (Id : E) return B is
3498 begin
3499 return Flag270 (Id);
3500 end Stores_Attribute_Old_Prefix;
3502 function Strict_Alignment (Id : E) return B is
3503 begin
3504 return Flag145 (Implementation_Base_Type (Id));
3505 end Strict_Alignment;
3507 function String_Literal_Length (Id : E) return U is
3508 begin
3509 return Uint16 (Id);
3510 end String_Literal_Length;
3512 function String_Literal_Low_Bound (Id : E) return N is
3513 begin
3514 return Node18 (Id);
3515 end String_Literal_Low_Bound;
3517 function Subprograms_For_Type (Id : E) return L is
3518 begin
3519 pragma Assert (Is_Type (Id));
3520 return Elist29 (Id);
3521 end Subprograms_For_Type;
3523 function Subps_Index (Id : E) return U is
3524 begin
3525 pragma Assert (Is_Subprogram (Id));
3526 return Uint24 (Id);
3527 end Subps_Index;
3529 function Suppress_Elaboration_Warnings (Id : E) return B is
3530 begin
3531 return Flag303 (Id);
3532 end Suppress_Elaboration_Warnings;
3534 function Suppress_Initialization (Id : E) return B is
3535 begin
3536 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3537 return Flag105 (Id);
3538 end Suppress_Initialization;
3540 function Suppress_Style_Checks (Id : E) return B is
3541 begin
3542 return Flag165 (Id);
3543 end Suppress_Style_Checks;
3545 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3546 begin
3547 return Flag217 (Id);
3548 end Suppress_Value_Tracking_On_Call;
3550 function Task_Body_Procedure (Id : E) return N is
3551 begin
3552 pragma Assert (Ekind (Id) in Task_Kind);
3553 return Node25 (Id);
3554 end Task_Body_Procedure;
3556 function Thunk_Entity (Id : E) return E is
3557 begin
3558 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3559 and then Is_Thunk (Id));
3560 return Node31 (Id);
3561 end Thunk_Entity;
3563 function Treat_As_Volatile (Id : E) return B is
3564 begin
3565 return Flag41 (Id);
3566 end Treat_As_Volatile;
3568 function Underlying_Full_View (Id : E) return E is
3569 begin
3570 pragma Assert (Ekind (Id) in Private_Kind);
3571 return Node19 (Id);
3572 end Underlying_Full_View;
3574 function Underlying_Record_View (Id : E) return E is
3575 begin
3576 return Node28 (Id);
3577 end Underlying_Record_View;
3579 function Universal_Aliasing (Id : E) return B is
3580 begin
3581 pragma Assert (Is_Type (Id));
3582 return Flag216 (Implementation_Base_Type (Id));
3583 end Universal_Aliasing;
3585 function Unset_Reference (Id : E) return N is
3586 begin
3587 return Node16 (Id);
3588 end Unset_Reference;
3590 function Used_As_Generic_Actual (Id : E) return B is
3591 begin
3592 return Flag222 (Id);
3593 end Used_As_Generic_Actual;
3595 function Uses_Lock_Free (Id : E) return B is
3596 begin
3597 pragma Assert (Is_Protected_Type (Id));
3598 return Flag188 (Id);
3599 end Uses_Lock_Free;
3601 function Uses_Sec_Stack (Id : E) return B is
3602 begin
3603 return Flag95 (Id);
3604 end Uses_Sec_Stack;
3606 function Validated_Object (Id : E) return N is
3607 begin
3608 pragma Assert (Ekind (Id) = E_Variable);
3609 return Node38 (Id);
3610 end Validated_Object;
3612 function Warnings_Off (Id : E) return B is
3613 begin
3614 return Flag96 (Id);
3615 end Warnings_Off;
3617 function Warnings_Off_Used (Id : E) return B is
3618 begin
3619 return Flag236 (Id);
3620 end Warnings_Off_Used;
3622 function Warnings_Off_Used_Unmodified (Id : E) return B is
3623 begin
3624 return Flag237 (Id);
3625 end Warnings_Off_Used_Unmodified;
3627 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3628 begin
3629 return Flag238 (Id);
3630 end Warnings_Off_Used_Unreferenced;
3632 function Wrapped_Entity (Id : E) return E is
3633 begin
3634 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3635 and then Is_Primitive_Wrapper (Id));
3636 return Node27 (Id);
3637 end Wrapped_Entity;
3639 function Was_Hidden (Id : E) return B is
3640 begin
3641 return Flag196 (Id);
3642 end Was_Hidden;
3644 ------------------------------
3645 -- Classification Functions --
3646 ------------------------------
3648 function Is_Access_Type (Id : E) return B is
3649 begin
3650 return Ekind (Id) in Access_Kind;
3651 end Is_Access_Type;
3653 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3654 begin
3655 return Ekind (Id) in Access_Protected_Kind;
3656 end Is_Access_Protected_Subprogram_Type;
3658 function Is_Access_Subprogram_Type (Id : E) return B is
3659 begin
3660 return Ekind (Id) in Access_Subprogram_Kind;
3661 end Is_Access_Subprogram_Type;
3663 function Is_Aggregate_Type (Id : E) return B is
3664 begin
3665 return Ekind (Id) in Aggregate_Kind;
3666 end Is_Aggregate_Type;
3668 function Is_Anonymous_Access_Type (Id : E) return B is
3669 begin
3670 return Ekind (Id) in Anonymous_Access_Kind;
3671 end Is_Anonymous_Access_Type;
3673 function Is_Array_Type (Id : E) return B is
3674 begin
3675 return Ekind (Id) in Array_Kind;
3676 end Is_Array_Type;
3678 function Is_Assignable (Id : E) return B is
3679 begin
3680 return Ekind (Id) in Assignable_Kind;
3681 end Is_Assignable;
3683 function Is_Class_Wide_Type (Id : E) return B is
3684 begin
3685 return Ekind (Id) in Class_Wide_Kind;
3686 end Is_Class_Wide_Type;
3688 function Is_Composite_Type (Id : E) return B is
3689 begin
3690 return Ekind (Id) in Composite_Kind;
3691 end Is_Composite_Type;
3693 function Is_Concurrent_Body (Id : E) return B is
3694 begin
3695 return Ekind (Id) in Concurrent_Body_Kind;
3696 end Is_Concurrent_Body;
3698 function Is_Concurrent_Record_Type (Id : E) return B is
3699 begin
3700 return Flag20 (Id);
3701 end Is_Concurrent_Record_Type;
3703 function Is_Concurrent_Type (Id : E) return B is
3704 begin
3705 return Ekind (Id) in Concurrent_Kind;
3706 end Is_Concurrent_Type;
3708 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3709 begin
3710 return Ekind (Id) in Decimal_Fixed_Point_Kind;
3711 end Is_Decimal_Fixed_Point_Type;
3713 function Is_Digits_Type (Id : E) return B is
3714 begin
3715 return Ekind (Id) in Digits_Kind;
3716 end Is_Digits_Type;
3718 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3719 begin
3720 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3721 end Is_Discrete_Or_Fixed_Point_Type;
3723 function Is_Discrete_Type (Id : E) return B is
3724 begin
3725 return Ekind (Id) in Discrete_Kind;
3726 end Is_Discrete_Type;
3728 function Is_Elementary_Type (Id : E) return B is
3729 begin
3730 return Ekind (Id) in Elementary_Kind;
3731 end Is_Elementary_Type;
3733 function Is_Entry (Id : E) return B is
3734 begin
3735 return Ekind (Id) in Entry_Kind;
3736 end Is_Entry;
3738 function Is_Enumeration_Type (Id : E) return B is
3739 begin
3740 return Ekind (Id) in Enumeration_Kind;
3741 end Is_Enumeration_Type;
3743 function Is_Fixed_Point_Type (Id : E) return B is
3744 begin
3745 return Ekind (Id) in Fixed_Point_Kind;
3746 end Is_Fixed_Point_Type;
3748 function Is_Floating_Point_Type (Id : E) return B is
3749 begin
3750 return Ekind (Id) in Float_Kind;
3751 end Is_Floating_Point_Type;
3753 function Is_Formal (Id : E) return B is
3754 begin
3755 return Ekind (Id) in Formal_Kind;
3756 end Is_Formal;
3758 function Is_Formal_Object (Id : E) return B is
3759 begin
3760 return Ekind (Id) in Formal_Object_Kind;
3761 end Is_Formal_Object;
3763 function Is_Generic_Subprogram (Id : E) return B is
3764 begin
3765 return Ekind (Id) in Generic_Subprogram_Kind;
3766 end Is_Generic_Subprogram;
3768 function Is_Generic_Unit (Id : E) return B is
3769 begin
3770 return Ekind (Id) in Generic_Unit_Kind;
3771 end Is_Generic_Unit;
3773 function Is_Ghost_Entity (Id : Entity_Id) return Boolean is
3774 begin
3775 return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id);
3776 end Is_Ghost_Entity;
3778 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3779 begin
3780 return Ekind (Id) in Incomplete_Or_Private_Kind;
3781 end Is_Incomplete_Or_Private_Type;
3783 function Is_Incomplete_Type (Id : E) return B is
3784 begin
3785 return Ekind (Id) in Incomplete_Kind;
3786 end Is_Incomplete_Type;
3788 function Is_Integer_Type (Id : E) return B is
3789 begin
3790 return Ekind (Id) in Integer_Kind;
3791 end Is_Integer_Type;
3793 function Is_Modular_Integer_Type (Id : E) return B is
3794 begin
3795 return Ekind (Id) in Modular_Integer_Kind;
3796 end Is_Modular_Integer_Type;
3798 function Is_Named_Number (Id : E) return B is
3799 begin
3800 return Ekind (Id) in Named_Kind;
3801 end Is_Named_Number;
3803 function Is_Numeric_Type (Id : E) return B is
3804 begin
3805 return Ekind (Id) in Numeric_Kind;
3806 end Is_Numeric_Type;
3808 function Is_Object (Id : E) return B is
3809 begin
3810 return Ekind (Id) in Object_Kind;
3811 end Is_Object;
3813 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3814 begin
3815 return Ekind (Id) in Ordinary_Fixed_Point_Kind;
3816 end Is_Ordinary_Fixed_Point_Type;
3818 function Is_Overloadable (Id : E) return B is
3819 begin
3820 return Ekind (Id) in Overloadable_Kind;
3821 end Is_Overloadable;
3823 function Is_Private_Type (Id : E) return B is
3824 begin
3825 return Ekind (Id) in Private_Kind;
3826 end Is_Private_Type;
3828 function Is_Protected_Type (Id : E) return B is
3829 begin
3830 return Ekind (Id) in Protected_Kind;
3831 end Is_Protected_Type;
3833 function Is_Real_Type (Id : E) return B is
3834 begin
3835 return Ekind (Id) in Real_Kind;
3836 end Is_Real_Type;
3838 function Is_Record_Type (Id : E) return B is
3839 begin
3840 return Ekind (Id) in Record_Kind;
3841 end Is_Record_Type;
3843 function Is_Scalar_Type (Id : E) return B is
3844 begin
3845 return Ekind (Id) in Scalar_Kind;
3846 end Is_Scalar_Type;
3848 function Is_Signed_Integer_Type (Id : E) return B is
3849 begin
3850 return Ekind (Id) in Signed_Integer_Kind;
3851 end Is_Signed_Integer_Type;
3853 function Is_Subprogram (Id : E) return B is
3854 begin
3855 return Ekind (Id) in Subprogram_Kind;
3856 end Is_Subprogram;
3858 function Is_Subprogram_Or_Entry (Id : E) return B is
3859 begin
3860 return Ekind (Id) in Subprogram_Kind
3861 or else
3862 Ekind (Id) in Entry_Kind;
3863 end Is_Subprogram_Or_Entry;
3865 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3866 begin
3867 return Ekind (Id) in Subprogram_Kind
3868 or else
3869 Ekind (Id) in Generic_Subprogram_Kind;
3870 end Is_Subprogram_Or_Generic_Subprogram;
3872 function Is_Task_Type (Id : E) return B is
3873 begin
3874 return Ekind (Id) in Task_Kind;
3875 end Is_Task_Type;
3877 function Is_Type (Id : E) return B is
3878 begin
3879 return Ekind (Id) in Type_Kind;
3880 end Is_Type;
3882 ------------------------------
3883 -- Attribute Set Procedures --
3884 ------------------------------
3886 -- Note: in many of these set procedures an "obvious" assertion is missing.
3887 -- The reason for this is that in many cases, a field is set before the
3888 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3889 -- it is possible to add assertions that specifically include the E_Void
3890 -- possibility, but in some cases, we just omit the assertions.
3892 procedure Set_Abstract_States (Id : E; V : L) is
3893 begin
3894 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3895 Set_Elist25 (Id, V);
3896 end Set_Abstract_States;
3898 procedure Set_Accept_Address (Id : E; V : L) is
3899 begin
3900 Set_Elist21 (Id, V);
3901 end Set_Accept_Address;
3903 procedure Set_Access_Disp_Table (Id : E; V : L) is
3904 begin
3905 pragma Assert (Ekind (Id) = E_Record_Type
3906 and then Id = Implementation_Base_Type (Id));
3907 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3908 Set_Elist16 (Id, V);
3909 end Set_Access_Disp_Table;
3911 procedure Set_Access_Disp_Table_Elab_Flag (Id : E; V : E) is
3912 begin
3913 pragma Assert (Ekind (Id) = E_Record_Type
3914 and then Id = Implementation_Base_Type (Id));
3915 pragma Assert (Is_Tagged_Type (Id));
3916 Set_Node30 (Id, V);
3917 end Set_Access_Disp_Table_Elab_Flag;
3919 procedure Set_Anonymous_Designated_Type (Id : E; V : E) is
3920 begin
3921 pragma Assert (Ekind (Id) = E_Variable);
3922 Set_Node35 (Id, V);
3923 end Set_Anonymous_Designated_Type;
3925 procedure Set_Anonymous_Masters (Id : E; V : L) is
3926 begin
3927 pragma Assert (Ekind_In (Id, E_Function,
3928 E_Package,
3929 E_Procedure,
3930 E_Subprogram_Body));
3931 Set_Elist29 (Id, V);
3932 end Set_Anonymous_Masters;
3934 procedure Set_Anonymous_Object (Id : E; V : E) is
3935 begin
3936 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
3937 Set_Node30 (Id, V);
3938 end Set_Anonymous_Object;
3940 procedure Set_Associated_Entity (Id : E; V : E) is
3941 begin
3942 Set_Node37 (Id, V);
3943 end Set_Associated_Entity;
3945 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3946 begin
3947 Set_Node12 (Id, V);
3948 end Set_Associated_Formal_Package;
3950 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3951 begin
3952 Set_Node8 (Id, V);
3953 end Set_Associated_Node_For_Itype;
3955 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3956 begin
3957 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3958 Set_Node22 (Id, V);
3959 end Set_Associated_Storage_Pool;
3961 procedure Set_Activation_Record_Component (Id : E; V : E) is
3962 begin
3963 pragma Assert (Ekind_In (Id, E_Constant,
3964 E_In_Parameter,
3965 E_In_Out_Parameter,
3966 E_Loop_Parameter,
3967 E_Out_Parameter,
3968 E_Variable));
3969 Set_Node31 (Id, V);
3970 end Set_Activation_Record_Component;
3972 procedure Set_Actual_Subtype (Id : E; V : E) is
3973 begin
3974 pragma Assert
3975 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3976 or else Is_Formal (Id));
3977 Set_Node17 (Id, V);
3978 end Set_Actual_Subtype;
3980 procedure Set_Address_Taken (Id : E; V : B := True) is
3981 begin
3982 Set_Flag104 (Id, V);
3983 end Set_Address_Taken;
3985 procedure Set_Alias (Id : E; V : E) is
3986 begin
3987 pragma Assert
3988 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3989 Set_Node18 (Id, V);
3990 end Set_Alias;
3992 procedure Set_Alignment (Id : E; V : U) is
3993 begin
3994 pragma Assert (Is_Type (Id)
3995 or else Is_Formal (Id)
3996 or else Ekind_In (Id, E_Loop_Parameter,
3997 E_Constant,
3998 E_Exception,
3999 E_Variable));
4000 Set_Uint14 (Id, V);
4001 end Set_Alignment;
4003 procedure Set_Barrier_Function (Id : E; V : N) is
4004 begin
4005 pragma Assert (Is_Entry (Id));
4006 Set_Node12 (Id, V);
4007 end Set_Barrier_Function;
4009 procedure Set_Block_Node (Id : E; V : N) is
4010 begin
4011 pragma Assert (Ekind (Id) = E_Block);
4012 Set_Node11 (Id, V);
4013 end Set_Block_Node;
4015 procedure Set_Body_Entity (Id : E; V : E) is
4016 begin
4017 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
4018 Set_Node19 (Id, V);
4019 end Set_Body_Entity;
4021 procedure Set_Body_Needed_For_Inlining (Id : E; V : B := True) is
4022 begin
4023 pragma Assert (Ekind (Id) = E_Package);
4024 Set_Flag299 (Id, V);
4025 end Set_Body_Needed_For_Inlining;
4027 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
4028 begin
4029 pragma Assert
4030 (Ekind (Id) = E_Package
4031 or else Is_Subprogram (Id)
4032 or else Is_Generic_Unit (Id));
4033 Set_Flag40 (Id, V);
4034 end Set_Body_Needed_For_SAL;
4036 procedure Set_Body_References (Id : E; V : L) is
4037 begin
4038 pragma Assert (Ekind (Id) = E_Abstract_State);
4039 Set_Elist16 (Id, V);
4040 end Set_Body_References;
4042 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
4043 begin
4044 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4045 Set_Node29 (Id, V);
4046 end Set_BIP_Initialization_Call;
4048 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
4049 begin
4050 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4051 Set_Flag125 (Id, V);
4052 end Set_C_Pass_By_Copy;
4054 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
4055 begin
4056 Set_Flag38 (Id, V);
4057 end Set_Can_Never_Be_Null;
4059 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
4060 begin
4061 pragma Assert
4062 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
4063 Set_Flag229 (Id, V);
4064 end Set_Can_Use_Internal_Rep;
4066 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
4067 begin
4068 Set_Flag31 (Id, V);
4069 end Set_Checks_May_Be_Suppressed;
4071 procedure Set_Class_Wide_Clone (Id : E; V : E) is
4072 begin
4073 pragma Assert (Is_Subprogram (Id));
4074 Set_Node38 (Id, V);
4075 end Set_Class_Wide_Clone;
4077 procedure Set_Class_Wide_Type (Id : E; V : E) is
4078 begin
4079 pragma Assert (Is_Type (Id));
4080 Set_Node9 (Id, V);
4081 end Set_Class_Wide_Type;
4083 procedure Set_Cloned_Subtype (Id : E; V : E) is
4084 begin
4085 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
4086 Set_Node16 (Id, V);
4087 end Set_Cloned_Subtype;
4089 procedure Set_Component_Bit_Offset (Id : E; V : U) is
4090 begin
4091 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4092 Set_Uint11 (Id, V);
4093 end Set_Component_Bit_Offset;
4095 procedure Set_Component_Clause (Id : E; V : N) is
4096 begin
4097 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4098 Set_Node13 (Id, V);
4099 end Set_Component_Clause;
4101 procedure Set_Component_Size (Id : E; V : U) is
4102 begin
4103 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4104 Set_Uint22 (Id, V);
4105 end Set_Component_Size;
4107 procedure Set_Component_Type (Id : E; V : E) is
4108 begin
4109 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4110 Set_Node20 (Id, V);
4111 end Set_Component_Type;
4113 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
4114 begin
4115 pragma Assert
4116 (Ekind_In (Id, E_Block,
4117 E_Function,
4118 E_Generic_Function,
4119 E_Generic_Package,
4120 E_Generic_Procedure,
4121 E_Package,
4122 E_Package_Body,
4123 E_Procedure,
4124 E_Subprogram_Body));
4125 Set_Flag279 (Id, V);
4126 end Set_Contains_Ignored_Ghost_Code;
4128 procedure Set_Contract (Id : E; V : N) is
4129 begin
4130 pragma Assert
4131 (Ekind_In (Id, E_Protected_Type, -- concurrent types
4132 E_Task_Body,
4133 E_Task_Type)
4134 or else
4135 Ekind_In (Id, E_Constant, -- objects
4136 E_Variable)
4137 or else
4138 Ekind_In (Id, E_Entry, -- overloadable
4139 E_Entry_Family,
4140 E_Function,
4141 E_Generic_Function,
4142 E_Generic_Procedure,
4143 E_Operator,
4144 E_Procedure,
4145 E_Subprogram_Body)
4146 or else
4147 Ekind_In (Id, E_Generic_Package, -- packages
4148 E_Package,
4149 E_Package_Body)
4150 or else
4151 Ekind (Id) = E_Void); -- special purpose
4152 Set_Node34 (Id, V);
4153 end Set_Contract;
4155 procedure Set_Contract_Wrapper (Id : E; V : E) is
4156 begin
4157 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4158 Set_Node25 (Id, V);
4159 end Set_Contract_Wrapper;
4161 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
4162 begin
4163 pragma Assert
4164 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
4165 Set_Node18 (Id, V);
4166 end Set_Corresponding_Concurrent_Type;
4168 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
4169 begin
4170 pragma Assert (Ekind (Id) = E_Discriminant);
4171 Set_Node19 (Id, V);
4172 end Set_Corresponding_Discriminant;
4174 procedure Set_Corresponding_Equality (Id : E; V : E) is
4175 begin
4176 pragma Assert
4177 (Ekind (Id) = E_Function
4178 and then not Comes_From_Source (Id)
4179 and then Chars (Id) = Name_Op_Ne);
4180 Set_Node30 (Id, V);
4181 end Set_Corresponding_Equality;
4183 procedure Set_Corresponding_Function (Id : E; V : E) is
4184 begin
4185 pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
4186 Set_Node32 (Id, V);
4187 end Set_Corresponding_Function;
4189 procedure Set_Corresponding_Procedure (Id : E; V : E) is
4190 begin
4191 pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
4192 Set_Node32 (Id, V);
4193 end Set_Corresponding_Procedure;
4195 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
4196 begin
4197 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
4198 Set_Node18 (Id, V);
4199 end Set_Corresponding_Protected_Entry;
4201 procedure Set_Corresponding_Record_Component (Id : E; V : E) is
4202 begin
4203 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4204 Set_Node21 (Id, V);
4205 end Set_Corresponding_Record_Component;
4207 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
4208 begin
4209 pragma Assert (Is_Concurrent_Type (Id));
4210 Set_Node18 (Id, V);
4211 end Set_Corresponding_Record_Type;
4213 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
4214 begin
4215 Set_Node22 (Id, V);
4216 end Set_Corresponding_Remote_Type;
4218 procedure Set_Current_Use_Clause (Id : E; V : E) is
4219 begin
4220 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
4221 Set_Node27 (Id, V);
4222 end Set_Current_Use_Clause;
4224 procedure Set_Current_Value (Id : E; V : N) is
4225 begin
4226 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
4227 Set_Node9 (Id, V);
4228 end Set_Current_Value;
4230 procedure Set_CR_Discriminant (Id : E; V : E) is
4231 begin
4232 Set_Node23 (Id, V);
4233 end Set_CR_Discriminant;
4235 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
4236 begin
4237 Set_Flag166 (Id, V);
4238 end Set_Debug_Info_Off;
4240 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
4241 begin
4242 Set_Node25 (Id, V);
4243 end Set_Debug_Renaming_Link;
4245 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
4246 begin
4247 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4248 Set_Node19 (Id, V);
4249 end Set_Default_Aspect_Component_Value;
4251 procedure Set_Default_Aspect_Value (Id : E; V : E) is
4252 begin
4253 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
4254 Set_Node19 (Id, V);
4255 end Set_Default_Aspect_Value;
4257 procedure Set_Default_Expr_Function (Id : E; V : E) is
4258 begin
4259 pragma Assert (Is_Formal (Id));
4260 Set_Node21 (Id, V);
4261 end Set_Default_Expr_Function;
4263 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
4264 begin
4265 Set_Flag108 (Id, V);
4266 end Set_Default_Expressions_Processed;
4268 procedure Set_Default_Value (Id : E; V : N) is
4269 begin
4270 pragma Assert (Is_Formal (Id));
4271 Set_Node20 (Id, V);
4272 end Set_Default_Value;
4274 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
4275 begin
4276 pragma Assert
4277 (Is_Subprogram (Id)
4278 or else Is_Task_Type (Id)
4279 or else Ekind (Id) = E_Block);
4280 Set_Flag114 (Id, V);
4281 end Set_Delay_Cleanups;
4283 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
4284 begin
4285 pragma Assert
4286 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
4288 Set_Flag50 (Id, V);
4289 end Set_Delay_Subprogram_Descriptors;
4291 procedure Set_Delta_Value (Id : E; V : R) is
4292 begin
4293 pragma Assert (Is_Fixed_Point_Type (Id));
4294 Set_Ureal18 (Id, V);
4295 end Set_Delta_Value;
4297 procedure Set_Dependent_Instances (Id : E; V : L) is
4298 begin
4299 pragma Assert (Is_Generic_Instance (Id));
4300 Set_Elist8 (Id, V);
4301 end Set_Dependent_Instances;
4303 procedure Set_Depends_On_Private (Id : E; V : B := True) is
4304 begin
4305 pragma Assert (Nkind (Id) in N_Entity);
4306 Set_Flag14 (Id, V);
4307 end Set_Depends_On_Private;
4309 procedure Set_Derived_Type_Link (Id : E; V : E) is
4310 begin
4311 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4312 Set_Node31 (Id, V);
4313 end Set_Derived_Type_Link;
4315 procedure Set_Digits_Value (Id : E; V : U) is
4316 begin
4317 pragma Assert
4318 (Is_Floating_Point_Type (Id)
4319 or else Is_Decimal_Fixed_Point_Type (Id));
4320 Set_Uint17 (Id, V);
4321 end Set_Digits_Value;
4323 procedure Set_Directly_Designated_Type (Id : E; V : E) is
4324 begin
4325 Set_Node20 (Id, V);
4326 end Set_Directly_Designated_Type;
4328 procedure Set_Disable_Controlled (Id : E; V : B := True) is
4329 begin
4330 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4331 Set_Flag253 (Id, V);
4332 end Set_Disable_Controlled;
4334 procedure Set_Discard_Names (Id : E; V : B := True) is
4335 begin
4336 Set_Flag88 (Id, V);
4337 end Set_Discard_Names;
4339 procedure Set_Discriminal (Id : E; V : E) is
4340 begin
4341 pragma Assert (Ekind (Id) = E_Discriminant);
4342 Set_Node17 (Id, V);
4343 end Set_Discriminal;
4345 procedure Set_Discriminal_Link (Id : E; V : E) is
4346 begin
4347 Set_Node10 (Id, V);
4348 end Set_Discriminal_Link;
4350 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
4351 begin
4352 pragma Assert (Ekind (Id) = E_Component);
4353 Set_Node20 (Id, V);
4354 end Set_Discriminant_Checking_Func;
4356 procedure Set_Discriminant_Constraint (Id : E; V : L) is
4357 begin
4358 pragma Assert (Nkind (Id) in N_Entity);
4359 Set_Elist21 (Id, V);
4360 end Set_Discriminant_Constraint;
4362 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
4363 begin
4364 Set_Node20 (Id, V);
4365 end Set_Discriminant_Default_Value;
4367 procedure Set_Discriminant_Number (Id : E; V : U) is
4368 begin
4369 Set_Uint15 (Id, V);
4370 end Set_Discriminant_Number;
4372 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
4373 begin
4374 pragma Assert (Ekind (Id) = E_Record_Type
4375 and then Id = Implementation_Base_Type (Id));
4376 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
4377 Set_Elist26 (Id, V);
4378 end Set_Dispatch_Table_Wrappers;
4380 procedure Set_DT_Entry_Count (Id : E; V : U) is
4381 begin
4382 pragma Assert (Ekind (Id) = E_Component);
4383 Set_Uint15 (Id, V);
4384 end Set_DT_Entry_Count;
4386 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4387 begin
4388 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4389 Set_Node25 (Id, V);
4390 end Set_DT_Offset_To_Top_Func;
4392 procedure Set_DT_Position (Id : E; V : U) is
4393 begin
4394 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4395 Set_Uint15 (Id, V);
4396 end Set_DT_Position;
4398 procedure Set_DTC_Entity (Id : E; V : E) is
4399 begin
4400 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4401 Set_Node16 (Id, V);
4402 end Set_DTC_Entity;
4404 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4405 begin
4406 pragma Assert (Ekind (Id) = E_Package);
4407 Set_Flag210 (Id, V);
4408 end Set_Elaborate_Body_Desirable;
4410 procedure Set_Elaboration_Entity (Id : E; V : E) is
4411 begin
4412 pragma Assert
4413 (Is_Subprogram (Id)
4414 or else
4415 Ekind (Id) = E_Package
4416 or else
4417 Is_Generic_Unit (Id));
4418 Set_Node13 (Id, V);
4419 end Set_Elaboration_Entity;
4421 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4422 begin
4423 pragma Assert
4424 (Is_Subprogram (Id)
4425 or else
4426 Ekind (Id) = E_Package
4427 or else
4428 Is_Generic_Unit (Id));
4429 Set_Flag174 (Id, V);
4430 end Set_Elaboration_Entity_Required;
4432 procedure Set_Encapsulating_State (Id : E; V : E) is
4433 begin
4434 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4435 Set_Node32 (Id, V);
4436 end Set_Encapsulating_State;
4438 procedure Set_Enclosing_Scope (Id : E; V : E) is
4439 begin
4440 Set_Node18 (Id, V);
4441 end Set_Enclosing_Scope;
4443 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4444 begin
4445 pragma Assert (Is_Entry (Id));
4446 Set_Flag152 (Id, V);
4447 end Set_Entry_Accepted;
4449 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4450 begin
4451 Set_Node19 (Id, V);
4452 end Set_Entry_Bodies_Array;
4454 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4455 begin
4456 Set_Node23 (Id, V);
4457 end Set_Entry_Cancel_Parameter;
4459 procedure Set_Entry_Component (Id : E; V : E) is
4460 begin
4461 Set_Node11 (Id, V);
4462 end Set_Entry_Component;
4464 procedure Set_Entry_Formal (Id : E; V : E) is
4465 begin
4466 Set_Node16 (Id, V);
4467 end Set_Entry_Formal;
4469 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4470 begin
4471 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4472 Set_Node18 (Id, V);
4473 end Set_Entry_Index_Constant;
4475 procedure Set_Entry_Max_Queue_Lengths_Array (Id : E; V : E) is
4476 begin
4477 pragma Assert (Ekind (Id) = E_Protected_Type);
4478 Set_Node35 (Id, V);
4479 end Set_Entry_Max_Queue_Lengths_Array;
4481 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4482 begin
4483 Set_Node15 (Id, V);
4484 end Set_Entry_Parameters_Type;
4486 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4487 begin
4488 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4489 Set_Node23 (Id, V);
4490 end Set_Enum_Pos_To_Rep;
4492 procedure Set_Enumeration_Pos (Id : E; V : U) is
4493 begin
4494 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4495 Set_Uint11 (Id, V);
4496 end Set_Enumeration_Pos;
4498 procedure Set_Enumeration_Rep (Id : E; V : U) is
4499 begin
4500 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4501 Set_Uint12 (Id, V);
4502 end Set_Enumeration_Rep;
4504 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4505 begin
4506 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4507 Set_Node22 (Id, V);
4508 end Set_Enumeration_Rep_Expr;
4510 procedure Set_Equivalent_Type (Id : E; V : E) is
4511 begin
4512 pragma Assert
4513 (Ekind_In (Id, E_Class_Wide_Type,
4514 E_Class_Wide_Subtype,
4515 E_Access_Protected_Subprogram_Type,
4516 E_Anonymous_Access_Protected_Subprogram_Type,
4517 E_Access_Subprogram_Type,
4518 E_Exception_Type));
4519 Set_Node18 (Id, V);
4520 end Set_Equivalent_Type;
4522 procedure Set_Esize (Id : E; V : U) is
4523 begin
4524 Set_Uint12 (Id, V);
4525 end Set_Esize;
4527 procedure Set_Extra_Accessibility (Id : E; V : E) is
4528 begin
4529 pragma Assert
4530 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4531 Set_Node13 (Id, V);
4532 end Set_Extra_Accessibility;
4534 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4535 begin
4536 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4537 Set_Node19 (Id, V);
4538 end Set_Extra_Accessibility_Of_Result;
4540 procedure Set_Extra_Constrained (Id : E; V : E) is
4541 begin
4542 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4543 Set_Node23 (Id, V);
4544 end Set_Extra_Constrained;
4546 procedure Set_Extra_Formal (Id : E; V : E) is
4547 begin
4548 Set_Node15 (Id, V);
4549 end Set_Extra_Formal;
4551 procedure Set_Extra_Formals (Id : E; V : E) is
4552 begin
4553 pragma Assert
4554 (Is_Overloadable (Id)
4555 or else Ekind_In (Id, E_Entry_Family,
4556 E_Subprogram_Body,
4557 E_Subprogram_Type));
4558 Set_Node28 (Id, V);
4559 end Set_Extra_Formals;
4561 procedure Set_Finalization_Master (Id : E; V : E) is
4562 begin
4563 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4564 Set_Node23 (Id, V);
4565 end Set_Finalization_Master;
4567 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4568 begin
4569 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4570 Set_Flag158 (Id, V);
4571 end Set_Finalize_Storage_Only;
4573 procedure Set_Finalizer (Id : E; V : E) is
4574 begin
4575 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4576 Set_Node28 (Id, V);
4577 end Set_Finalizer;
4579 procedure Set_First_Entity (Id : E; V : E) is
4580 begin
4581 Set_Node17 (Id, V);
4582 end Set_First_Entity;
4584 procedure Set_First_Exit_Statement (Id : E; V : N) is
4585 begin
4586 pragma Assert (Ekind (Id) = E_Loop);
4587 Set_Node8 (Id, V);
4588 end Set_First_Exit_Statement;
4590 procedure Set_First_Index (Id : E; V : N) is
4591 begin
4592 pragma Assert (Is_Array_Type (Id));
4593 Set_Node17 (Id, V);
4594 end Set_First_Index;
4596 procedure Set_First_Literal (Id : E; V : E) is
4597 begin
4598 pragma Assert (Is_Enumeration_Type (Id));
4599 Set_Node17 (Id, V);
4600 end Set_First_Literal;
4602 procedure Set_First_Private_Entity (Id : E; V : E) is
4603 begin
4604 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4605 or else Ekind (Id) in Concurrent_Kind);
4606 Set_Node16 (Id, V);
4607 end Set_First_Private_Entity;
4609 procedure Set_First_Rep_Item (Id : E; V : N) is
4610 begin
4611 Set_Node6 (Id, V);
4612 end Set_First_Rep_Item;
4614 procedure Set_Float_Rep (Id : E; V : F) is
4615 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4616 begin
4617 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4618 end Set_Float_Rep;
4620 procedure Set_Freeze_Node (Id : E; V : N) is
4621 begin
4622 Set_Node7 (Id, V);
4623 end Set_Freeze_Node;
4625 procedure Set_From_Limited_With (Id : E; V : B := True) is
4626 begin
4627 pragma Assert
4628 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4629 Set_Flag159 (Id, V);
4630 end Set_From_Limited_With;
4632 procedure Set_Full_View (Id : E; V : E) is
4633 begin
4634 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4635 Set_Node11 (Id, V);
4636 end Set_Full_View;
4638 procedure Set_Generic_Homonym (Id : E; V : E) is
4639 begin
4640 Set_Node11 (Id, V);
4641 end Set_Generic_Homonym;
4643 procedure Set_Generic_Renamings (Id : E; V : L) is
4644 begin
4645 Set_Elist23 (Id, V);
4646 end Set_Generic_Renamings;
4648 procedure Set_Handler_Records (Id : E; V : S) is
4649 begin
4650 Set_List10 (Id, V);
4651 end Set_Handler_Records;
4653 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4654 begin
4655 pragma Assert (Id = Base_Type (Id));
4656 Set_Flag135 (Id, V);
4657 end Set_Has_Aliased_Components;
4659 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4660 begin
4661 Set_Flag46 (Id, V);
4662 end Set_Has_Alignment_Clause;
4664 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4665 begin
4666 Set_Flag79 (Id, V);
4667 end Set_Has_All_Calls_Remote;
4669 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4670 begin
4671 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4672 Set_Flag86 (Id, V);
4673 end Set_Has_Atomic_Components;
4675 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4676 begin
4677 pragma Assert
4678 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4679 Set_Flag139 (Id, V);
4680 end Set_Has_Biased_Representation;
4682 procedure Set_Has_Completion (Id : E; V : B := True) is
4683 begin
4684 Set_Flag26 (Id, V);
4685 end Set_Has_Completion;
4687 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4688 begin
4689 pragma Assert (Is_Type (Id));
4690 Set_Flag71 (Id, V);
4691 end Set_Has_Completion_In_Body;
4693 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4694 begin
4695 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4696 Set_Flag140 (Id, V);
4697 end Set_Has_Complex_Representation;
4699 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4700 begin
4701 pragma Assert (Ekind (Id) = E_Array_Type);
4702 Set_Flag68 (Id, V);
4703 end Set_Has_Component_Size_Clause;
4705 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4706 begin
4707 pragma Assert (Is_Type (Id));
4708 Set_Flag187 (Id, V);
4709 end Set_Has_Constrained_Partial_View;
4711 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4712 begin
4713 Set_Flag181 (Id, V);
4714 end Set_Has_Contiguous_Rep;
4716 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4717 begin
4718 pragma Assert (Id = Base_Type (Id));
4719 Set_Flag43 (Id, V);
4720 end Set_Has_Controlled_Component;
4722 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4723 begin
4724 Set_Flag98 (Id, V);
4725 end Set_Has_Controlling_Result;
4727 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4728 begin
4729 Set_Flag119 (Id, V);
4730 end Set_Has_Convention_Pragma;
4732 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4733 begin
4734 pragma Assert
4735 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4736 and then Is_Base_Type (Id));
4737 Set_Flag39 (Id, V);
4738 end Set_Has_Default_Aspect;
4740 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4741 begin
4742 pragma Assert (Nkind (Id) in N_Entity);
4743 Set_Flag200 (Id, V);
4744 end Set_Has_Delayed_Aspects;
4746 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4747 begin
4748 pragma Assert (Nkind (Id) in N_Entity);
4749 Set_Flag18 (Id, V);
4750 end Set_Has_Delayed_Freeze;
4752 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4753 begin
4754 pragma Assert (Nkind (Id) in N_Entity);
4755 Set_Flag261 (Id, V);
4756 end Set_Has_Delayed_Rep_Aspects;
4758 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4759 begin
4760 pragma Assert (Is_Type (Id));
4761 Set_Flag5 (Id, V);
4762 end Set_Has_Discriminants;
4764 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4765 begin
4766 pragma Assert (Ekind (Id) = E_Record_Type
4767 and then Is_Tagged_Type (Id));
4768 Set_Flag220 (Id, V);
4769 end Set_Has_Dispatch_Table;
4771 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4772 begin
4773 pragma Assert (Is_Type (Id));
4774 Set_Flag258 (Id, V);
4775 end Set_Has_Dynamic_Predicate_Aspect;
4777 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4778 begin
4779 pragma Assert (Is_Enumeration_Type (Id));
4780 Set_Flag66 (Id, V);
4781 end Set_Has_Enumeration_Rep_Clause;
4783 procedure Set_Has_Exit (Id : E; V : B := True) is
4784 begin
4785 Set_Flag47 (Id, V);
4786 end Set_Has_Exit;
4788 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4789 begin
4790 pragma Assert (Ekind_In (Id, E_Entry,
4791 E_Entry_Family,
4792 E_Function,
4793 E_Procedure));
4794 Set_Flag240 (Id, V);
4795 end Set_Has_Expanded_Contract;
4797 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4798 begin
4799 Set_Flag175 (Id, V);
4800 end Set_Has_Forward_Instantiation;
4802 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4803 begin
4804 Set_Flag173 (Id, V);
4805 end Set_Has_Fully_Qualified_Name;
4807 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4808 begin
4809 Set_Flag82 (Id, V);
4810 end Set_Has_Gigi_Rep_Item;
4812 procedure Set_Has_Homonym (Id : E; V : B := True) is
4813 begin
4814 Set_Flag56 (Id, V);
4815 end Set_Has_Homonym;
4817 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4818 begin
4819 Set_Flag251 (Id, V);
4820 end Set_Has_Implicit_Dereference;
4822 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4823 begin
4824 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4825 Set_Flag34 (Id, V);
4826 end Set_Has_Independent_Components;
4828 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4829 begin
4830 pragma Assert (Is_Type (Id));
4831 Set_Flag248 (Base_Type (Id), V);
4832 end Set_Has_Inheritable_Invariants;
4834 procedure Set_Has_Inherited_DIC (Id : E; V : B := True) is
4835 begin
4836 pragma Assert (Is_Type (Id));
4837 Set_Flag133 (Base_Type (Id), V);
4838 end Set_Has_Inherited_DIC;
4840 procedure Set_Has_Inherited_Invariants (Id : E; V : B := True) is
4841 begin
4842 pragma Assert (Is_Type (Id));
4843 Set_Flag291 (Base_Type (Id), V);
4844 end Set_Has_Inherited_Invariants;
4846 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4847 begin
4848 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4849 Set_Flag219 (Id, V);
4850 end Set_Has_Initial_Value;
4852 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4853 begin
4854 pragma Assert (Ekind (Id) = E_Loop);
4855 Set_Flag260 (Id, V);
4856 end Set_Has_Loop_Entry_Attributes;
4858 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4859 begin
4860 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4861 Set_Flag83 (Id, V);
4862 end Set_Has_Machine_Radix_Clause;
4864 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4865 begin
4866 Set_Flag21 (Id, V);
4867 end Set_Has_Master_Entity;
4869 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4870 begin
4871 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4872 Set_Flag142 (Id, V);
4873 end Set_Has_Missing_Return;
4875 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4876 begin
4877 Set_Flag101 (Id, V);
4878 end Set_Has_Nested_Block_With_Handler;
4880 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4881 begin
4882 pragma Assert (Is_Subprogram (Id));
4883 Set_Flag282 (Id, V);
4884 end Set_Has_Nested_Subprogram;
4886 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4887 begin
4888 pragma Assert (Id = Base_Type (Id));
4889 Set_Flag75 (Id, V);
4890 end Set_Has_Non_Standard_Rep;
4892 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4893 begin
4894 pragma Assert (Is_Type (Id));
4895 Set_Flag172 (Id, V);
4896 end Set_Has_Object_Size_Clause;
4898 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4899 begin
4900 pragma Assert
4901 (Ekind_In (Id, E_Entry, E_Entry_Family)
4902 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4903 Set_Flag110 (Id, V);
4904 end Set_Has_Out_Or_In_Out_Parameter;
4906 procedure Set_Has_Own_DIC (Id : E; V : B := True) is
4907 begin
4908 pragma Assert (Is_Type (Id));
4909 Set_Flag3 (Base_Type (Id), V);
4910 end Set_Has_Own_DIC;
4912 procedure Set_Has_Own_Invariants (Id : E; V : B := True) is
4913 begin
4914 pragma Assert (Is_Type (Id));
4915 Set_Flag232 (Base_Type (Id), V);
4916 end Set_Has_Own_Invariants;
4918 procedure Set_Has_Partial_Visible_Refinement (Id : E; V : B := True) is
4919 begin
4920 pragma Assert (Ekind (Id) = E_Abstract_State);
4921 Set_Flag296 (Id, V);
4922 end Set_Has_Partial_Visible_Refinement;
4924 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4925 begin
4926 Set_Flag154 (Id, V);
4927 end Set_Has_Per_Object_Constraint;
4929 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4930 begin
4931 pragma Assert (Is_Access_Type (Id));
4932 Set_Flag27 (Base_Type (Id), V);
4933 end Set_Has_Pragma_Controlled;
4935 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4936 begin
4937 Set_Flag150 (Id, V);
4938 end Set_Has_Pragma_Elaborate_Body;
4940 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4941 begin
4942 Set_Flag157 (Id, V);
4943 end Set_Has_Pragma_Inline;
4945 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4946 begin
4947 Set_Flag230 (Id, V);
4948 end Set_Has_Pragma_Inline_Always;
4950 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4951 begin
4952 Set_Flag201 (Id, V);
4953 end Set_Has_Pragma_No_Inline;
4955 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4956 begin
4957 pragma Assert (Is_Enumeration_Type (Id));
4958 pragma Assert (Id = Base_Type (Id));
4959 Set_Flag198 (Id, V);
4960 end Set_Has_Pragma_Ordered;
4962 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4963 begin
4964 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4965 pragma Assert (Id = Base_Type (Id));
4966 Set_Flag121 (Id, V);
4967 end Set_Has_Pragma_Pack;
4969 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4970 begin
4971 Set_Flag221 (Id, V);
4972 end Set_Has_Pragma_Preelab_Init;
4974 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4975 begin
4976 Set_Flag203 (Id, V);
4977 end Set_Has_Pragma_Pure;
4979 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4980 begin
4981 Set_Flag179 (Id, V);
4982 end Set_Has_Pragma_Pure_Function;
4984 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4985 begin
4986 Set_Flag169 (Id, V);
4987 end Set_Has_Pragma_Thread_Local_Storage;
4989 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4990 begin
4991 Set_Flag233 (Id, V);
4992 end Set_Has_Pragma_Unmodified;
4994 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4995 begin
4996 Set_Flag180 (Id, V);
4997 end Set_Has_Pragma_Unreferenced;
4999 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
5000 begin
5001 pragma Assert (Is_Type (Id));
5002 Set_Flag212 (Id, V);
5003 end Set_Has_Pragma_Unreferenced_Objects;
5005 procedure Set_Has_Pragma_Unused (Id : E; V : B := True) is
5006 begin
5007 Set_Flag294 (Id, V);
5008 end Set_Has_Pragma_Unused;
5010 procedure Set_Has_Predicates (Id : E; V : B := True) is
5011 begin
5012 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
5013 Set_Flag250 (Id, V);
5014 end Set_Has_Predicates;
5016 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
5017 begin
5018 pragma Assert (Id = Base_Type (Id));
5019 Set_Flag120 (Id, V);
5020 end Set_Has_Primitive_Operations;
5022 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
5023 begin
5024 pragma Assert (Is_Type (Id));
5025 Set_Flag151 (Id, V);
5026 end Set_Has_Private_Ancestor;
5028 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
5029 begin
5030 Set_Flag155 (Id, V);
5031 end Set_Has_Private_Declaration;
5033 procedure Set_Has_Private_Extension (Id : E; V : B := True) is
5034 begin
5035 pragma Assert (Is_Tagged_Type (Id));
5036 Set_Flag300 (Id, V);
5037 end Set_Has_Private_Extension;
5039 procedure Set_Has_Protected (Id : E; V : B := True) is
5040 begin
5041 Set_Flag271 (Id, V);
5042 end Set_Has_Protected;
5044 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
5045 begin
5046 Set_Flag161 (Id, V);
5047 end Set_Has_Qualified_Name;
5049 procedure Set_Has_RACW (Id : E; V : B := True) is
5050 begin
5051 pragma Assert (Ekind (Id) = E_Package);
5052 Set_Flag214 (Id, V);
5053 end Set_Has_RACW;
5055 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
5056 begin
5057 pragma Assert (Id = Base_Type (Id));
5058 Set_Flag65 (Id, V);
5059 end Set_Has_Record_Rep_Clause;
5061 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
5062 begin
5063 pragma Assert (Is_Subprogram (Id));
5064 Set_Flag143 (Id, V);
5065 end Set_Has_Recursive_Call;
5067 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
5068 begin
5069 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
5070 Set_Flag267 (Id, V);
5071 end Set_Has_Shift_Operator;
5073 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
5074 begin
5075 Set_Flag29 (Id, V);
5076 end Set_Has_Size_Clause;
5078 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
5079 begin
5080 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
5081 Set_Flag67 (Id, V);
5082 end Set_Has_Small_Clause;
5084 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
5085 begin
5086 pragma Assert (Id = Base_Type (Id));
5087 Set_Flag100 (Id, V);
5088 end Set_Has_Specified_Layout;
5090 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
5091 begin
5092 pragma Assert (Is_Type (Id));
5093 Set_Flag190 (Id, V);
5094 end Set_Has_Specified_Stream_Input;
5096 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
5097 begin
5098 pragma Assert (Is_Type (Id));
5099 Set_Flag191 (Id, V);
5100 end Set_Has_Specified_Stream_Output;
5102 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
5103 begin
5104 pragma Assert (Is_Type (Id));
5105 Set_Flag192 (Id, V);
5106 end Set_Has_Specified_Stream_Read;
5108 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
5109 begin
5110 pragma Assert (Is_Type (Id));
5111 Set_Flag193 (Id, V);
5112 end Set_Has_Specified_Stream_Write;
5114 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
5115 begin
5116 Set_Flag211 (Id, V);
5117 end Set_Has_Static_Discriminants;
5119 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
5120 begin
5121 pragma Assert (Is_Type (Id));
5122 Set_Flag269 (Id, V);
5123 end Set_Has_Static_Predicate;
5125 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
5126 begin
5127 pragma Assert (Is_Type (Id));
5128 Set_Flag259 (Id, V);
5129 end Set_Has_Static_Predicate_Aspect;
5131 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
5132 begin
5133 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5134 pragma Assert (Id = Base_Type (Id));
5135 Set_Flag23 (Id, V);
5136 end Set_Has_Storage_Size_Clause;
5138 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
5139 begin
5140 pragma Assert (Is_Elementary_Type (Id));
5141 Set_Flag184 (Id, V);
5142 end Set_Has_Stream_Size_Clause;
5144 procedure Set_Has_Task (Id : E; V : B := True) is
5145 begin
5146 pragma Assert (Id = Base_Type (Id));
5147 Set_Flag30 (Id, V);
5148 end Set_Has_Task;
5150 procedure Set_Has_Thunks (Id : E; V : B := True) is
5151 begin
5152 pragma Assert (Is_Tag (Id));
5153 Set_Flag228 (Id, V);
5154 end Set_Has_Thunks;
5156 procedure Set_Has_Timing_Event (Id : E; V : B := True) is
5157 begin
5158 pragma Assert (Id = Base_Type (Id));
5159 Set_Flag289 (Id, V);
5160 end Set_Has_Timing_Event;
5162 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
5163 begin
5164 pragma Assert (Id = Base_Type (Id));
5165 Set_Flag123 (Id, V);
5166 end Set_Has_Unchecked_Union;
5168 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
5169 begin
5170 pragma Assert (Is_Type (Id));
5171 Set_Flag72 (Id, V);
5172 end Set_Has_Unknown_Discriminants;
5174 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
5175 begin
5176 pragma Assert (Ekind (Id) = E_Abstract_State);
5177 Set_Flag263 (Id, V);
5178 end Set_Has_Visible_Refinement;
5180 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
5181 begin
5182 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
5183 Set_Flag87 (Id, V);
5184 end Set_Has_Volatile_Components;
5186 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
5187 begin
5188 Set_Flag182 (Id, V);
5189 end Set_Has_Xref_Entry;
5191 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
5192 begin
5193 pragma Assert (Ekind (Id) = E_Variable);
5194 Set_Node8 (Id, V);
5195 end Set_Hiding_Loop_Variable;
5197 procedure Set_Hidden_In_Formal_Instance (Id : E; V : L) is
5198 begin
5199 pragma Assert (Ekind (Id) = E_Package);
5200 Set_Elist30 (Id, V);
5201 end Set_Hidden_In_Formal_Instance;
5203 procedure Set_Homonym (Id : E; V : E) is
5204 begin
5205 pragma Assert (Id /= V);
5206 Set_Node4 (Id, V);
5207 end Set_Homonym;
5209 procedure Set_Incomplete_Actuals (Id : E; V : L) is
5210 begin
5211 pragma Assert (Ekind (Id) = E_Package);
5212 Set_Elist24 (Id, V);
5213 end Set_Incomplete_Actuals;
5215 procedure Set_Ignore_SPARK_Mode_Pragmas (Id : E; V : B := True) is
5216 begin
5217 pragma Assert
5218 (Ekind_In (Id, E_Protected_Body, -- concurrent types
5219 E_Protected_Type,
5220 E_Task_Body,
5221 E_Task_Type)
5222 or else
5223 Ekind_In (Id, E_Entry, -- overloadable
5224 E_Entry_Family,
5225 E_Function,
5226 E_Generic_Function,
5227 E_Generic_Procedure,
5228 E_Operator,
5229 E_Procedure,
5230 E_Subprogram_Body)
5231 or else
5232 Ekind_In (Id, E_Generic_Package, -- packages
5233 E_Package,
5234 E_Package_Body));
5235 Set_Flag301 (Id, V);
5236 end Set_Ignore_SPARK_Mode_Pragmas;
5238 procedure Set_Import_Pragma (Id : E; V : E) is
5239 begin
5240 pragma Assert (Is_Subprogram (Id));
5241 Set_Node35 (Id, V);
5242 end Set_Import_Pragma;
5244 procedure Set_Interface_Alias (Id : E; V : E) is
5245 begin
5246 pragma Assert
5247 (Is_Internal (Id)
5248 and then Is_Hidden (Id)
5249 and then (Ekind_In (Id, E_Procedure, E_Function)));
5250 Set_Node25 (Id, V);
5251 end Set_Interface_Alias;
5253 procedure Set_Interfaces (Id : E; V : L) is
5254 begin
5255 pragma Assert (Is_Record_Type (Id));
5256 Set_Elist25 (Id, V);
5257 end Set_Interfaces;
5259 procedure Set_In_Package_Body (Id : E; V : B := True) is
5260 begin
5261 Set_Flag48 (Id, V);
5262 end Set_In_Package_Body;
5264 procedure Set_In_Private_Part (Id : E; V : B := True) is
5265 begin
5266 Set_Flag45 (Id, V);
5267 end Set_In_Private_Part;
5269 procedure Set_In_Use (Id : E; V : B := True) is
5270 begin
5271 pragma Assert (Nkind (Id) in N_Entity);
5272 Set_Flag8 (Id, V);
5273 end Set_In_Use;
5275 procedure Set_Initialization_Statements (Id : E; V : N) is
5276 begin
5277 -- Tolerate an E_Void entity since this can be called while resolving
5278 -- an aggregate used as the initialization expression for an object
5279 -- declaration, and this occurs before the Ekind for the object is set.
5281 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
5282 Set_Node28 (Id, V);
5283 end Set_Initialization_Statements;
5285 procedure Set_Inner_Instances (Id : E; V : L) is
5286 begin
5287 Set_Elist23 (Id, V);
5288 end Set_Inner_Instances;
5290 procedure Set_Interface_Name (Id : E; V : N) is
5291 begin
5292 Set_Node21 (Id, V);
5293 end Set_Interface_Name;
5295 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
5296 begin
5297 pragma Assert (Is_Overloadable (Id));
5298 Set_Flag19 (Id, V);
5299 end Set_Is_Abstract_Subprogram;
5301 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
5302 begin
5303 pragma Assert (Is_Type (Id));
5304 Set_Flag146 (Id, V);
5305 end Set_Is_Abstract_Type;
5307 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
5308 begin
5309 pragma Assert (Is_Access_Type (Id));
5310 Set_Flag194 (Id, V);
5311 end Set_Is_Local_Anonymous_Access;
5313 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
5314 begin
5315 pragma Assert (Is_Access_Type (Id));
5316 Set_Flag69 (Id, V);
5317 end Set_Is_Access_Constant;
5319 procedure Set_Is_Activation_Record (Id : E; V : B := True) is
5320 begin
5321 pragma Assert (Ekind (Id) = E_In_Parameter);
5322 Set_Flag305 (Id, V);
5323 end Set_Is_Activation_Record;
5325 procedure Set_Is_Actual_Subtype (Id : E; V : B := True) is
5326 begin
5327 pragma Assert (Is_Type (Id));
5328 Set_Flag293 (Id, V);
5329 end Set_Is_Actual_Subtype;
5331 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
5332 begin
5333 Set_Flag185 (Id, V);
5334 end Set_Is_Ada_2005_Only;
5336 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
5337 begin
5338 Set_Flag199 (Id, V);
5339 end Set_Is_Ada_2012_Only;
5341 procedure Set_Is_Aliased (Id : E; V : B := True) is
5342 begin
5343 pragma Assert (Nkind (Id) in N_Entity);
5344 Set_Flag15 (Id, V);
5345 end Set_Is_Aliased;
5347 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
5348 begin
5349 pragma Assert
5350 (Ekind (Id) = E_Procedure or else Is_Type (Id));
5351 Set_Flag81 (Id, V);
5352 end Set_Is_Asynchronous;
5354 procedure Set_Is_Atomic (Id : E; V : B := True) is
5355 begin
5356 Set_Flag85 (Id, V);
5357 end Set_Is_Atomic;
5359 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
5360 begin
5361 pragma Assert ((not V)
5362 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
5363 Set_Flag122 (Id, V);
5364 end Set_Is_Bit_Packed_Array;
5366 procedure Set_Is_Called (Id : E; V : B := True) is
5367 begin
5368 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
5369 Set_Flag102 (Id, V);
5370 end Set_Is_Called;
5372 procedure Set_Is_Character_Type (Id : E; V : B := True) is
5373 begin
5374 Set_Flag63 (Id, V);
5375 end Set_Is_Character_Type;
5377 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
5378 begin
5379 -- Allow this attribute to appear on unanalyzed entities
5381 pragma Assert (Nkind (Id) in N_Entity
5382 or else Ekind (Id) = E_Void);
5383 Set_Flag277 (Id, V);
5384 end Set_Is_Checked_Ghost_Entity;
5386 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
5387 begin
5388 Set_Flag73 (Id, V);
5389 end Set_Is_Child_Unit;
5391 procedure Set_Is_Class_Wide_Clone (Id : E; V : B := True) is
5392 begin
5393 Set_Flag290 (Id, V);
5394 end Set_Is_Class_Wide_Clone;
5396 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
5397 begin
5398 Set_Flag35 (Id, V);
5399 end Set_Is_Class_Wide_Equivalent_Type;
5401 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
5402 begin
5403 Set_Flag149 (Id, V);
5404 end Set_Is_Compilation_Unit;
5406 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
5407 begin
5408 pragma Assert (Ekind (Id) = E_Discriminant);
5409 Set_Flag103 (Id, V);
5410 end Set_Is_Completely_Hidden;
5412 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
5413 begin
5414 Set_Flag20 (Id, V);
5415 end Set_Is_Concurrent_Record_Type;
5417 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
5418 begin
5419 Set_Flag80 (Id, V);
5420 end Set_Is_Constr_Subt_For_U_Nominal;
5422 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
5423 begin
5424 Set_Flag141 (Id, V);
5425 end Set_Is_Constr_Subt_For_UN_Aliased;
5427 procedure Set_Is_Constrained (Id : E; V : B := True) is
5428 begin
5429 pragma Assert (Nkind (Id) in N_Entity);
5430 Set_Flag12 (Id, V);
5431 end Set_Is_Constrained;
5433 procedure Set_Is_Constructor (Id : E; V : B := True) is
5434 begin
5435 Set_Flag76 (Id, V);
5436 end Set_Is_Constructor;
5438 procedure Set_Is_Controlled_Active (Id : E; V : B := True) is
5439 begin
5440 pragma Assert (Id = Base_Type (Id));
5441 Set_Flag42 (Id, V);
5442 end Set_Is_Controlled_Active;
5444 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5445 begin
5446 pragma Assert (Is_Formal (Id));
5447 Set_Flag97 (Id, V);
5448 end Set_Is_Controlling_Formal;
5450 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5451 begin
5452 Set_Flag74 (Id, V);
5453 end Set_Is_CPP_Class;
5455 procedure Set_Is_DIC_Procedure (Id : E; V : B := True) is
5456 begin
5457 pragma Assert (Ekind (Id) = E_Procedure);
5458 Set_Flag132 (Id, V);
5459 end Set_Is_DIC_Procedure;
5461 procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
5462 begin
5463 pragma Assert (Is_Type (Id));
5464 Set_Flag223 (Id, V);
5465 end Set_Is_Descendant_Of_Address;
5467 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5468 begin
5469 Set_Flag176 (Id, V);
5470 end Set_Is_Discrim_SO_Function;
5472 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5473 begin
5474 Set_Flag264 (Id, V);
5475 end Set_Is_Discriminant_Check_Function;
5477 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5478 begin
5479 Set_Flag234 (Id, V);
5480 end Set_Is_Dispatch_Table_Entity;
5482 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5483 begin
5484 pragma Assert
5485 (V = False
5486 or else
5487 Is_Overloadable (Id)
5488 or else
5489 Ekind (Id) = E_Subprogram_Type);
5491 Set_Flag6 (Id, V);
5492 end Set_Is_Dispatching_Operation;
5494 procedure Set_Is_Elaboration_Checks_OK_Id (Id : E; V : B := True) is
5495 begin
5496 pragma Assert (Is_Elaboration_Target (Id));
5497 Set_Flag148 (Id, V);
5498 end Set_Is_Elaboration_Checks_OK_Id;
5500 procedure Set_Is_Elaboration_Warnings_OK_Id (Id : E; V : B := True) is
5501 begin
5502 pragma Assert (Is_Elaboration_Target (Id));
5503 Set_Flag304 (Id, V);
5504 end Set_Is_Elaboration_Warnings_OK_Id;
5506 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5507 begin
5508 Set_Flag124 (Id, V);
5509 end Set_Is_Eliminated;
5511 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5512 begin
5513 Set_Flag52 (Id, V);
5514 end Set_Is_Entry_Formal;
5516 procedure Set_Is_Entry_Wrapper (Id : E; V : B := True) is
5517 begin
5518 Set_Flag297 (Id, V);
5519 end Set_Is_Entry_Wrapper;
5521 procedure Set_Is_Exception_Handler (Id : E; V : B := True) is
5522 begin
5523 pragma Assert (Ekind (Id) = E_Block);
5524 Set_Flag286 (Id, V);
5525 end Set_Is_Exception_Handler;
5527 procedure Set_Is_Exported (Id : E; V : B := True) is
5528 begin
5529 Set_Flag99 (Id, V);
5530 end Set_Is_Exported;
5532 procedure Set_Is_Finalized_Transient (Id : E; V : B := True) is
5533 begin
5534 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5535 Set_Flag252 (Id, V);
5536 end Set_Is_Finalized_Transient;
5538 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5539 begin
5540 Set_Flag70 (Id, V);
5541 end Set_Is_First_Subtype;
5543 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5544 begin
5545 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5546 Set_Flag118 (Id, V);
5547 end Set_Is_For_Access_Subtype;
5549 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5550 begin
5551 Set_Flag111 (Id, V);
5552 end Set_Is_Formal_Subprogram;
5554 procedure Set_Is_Frozen (Id : E; V : B := True) is
5555 begin
5556 pragma Assert (Nkind (Id) in N_Entity);
5557 Set_Flag4 (Id, V);
5558 end Set_Is_Frozen;
5560 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5561 begin
5562 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5563 Set_Flag274 (Id, V);
5564 end Set_Is_Generic_Actual_Subprogram;
5566 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5567 begin
5568 pragma Assert (Is_Type (Id));
5569 Set_Flag94 (Id, V);
5570 end Set_Is_Generic_Actual_Type;
5572 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5573 begin
5574 Set_Flag130 (Id, V);
5575 end Set_Is_Generic_Instance;
5577 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5578 begin
5579 pragma Assert (Nkind (Id) in N_Entity);
5580 Set_Flag13 (Id, V);
5581 end Set_Is_Generic_Type;
5583 procedure Set_Is_Hidden (Id : E; V : B := True) is
5584 begin
5585 Set_Flag57 (Id, V);
5586 end Set_Is_Hidden;
5588 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5589 begin
5590 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5591 Set_Flag2 (Id, V);
5592 end Set_Is_Hidden_Non_Overridden_Subpgm;
5594 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5595 begin
5596 Set_Flag171 (Id, V);
5597 end Set_Is_Hidden_Open_Scope;
5599 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5600 begin
5601 -- Allow this attribute to appear on unanalyzed entities
5603 pragma Assert (Nkind (Id) in N_Entity
5604 or else Ekind (Id) = E_Void);
5605 Set_Flag278 (Id, V);
5606 end Set_Is_Ignored_Ghost_Entity;
5608 procedure Set_Is_Ignored_Transient (Id : E; V : B := True) is
5609 begin
5610 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5611 Set_Flag295 (Id, V);
5612 end Set_Is_Ignored_Transient;
5614 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5615 begin
5616 pragma Assert (Nkind (Id) in N_Entity);
5617 Set_Flag7 (Id, V);
5618 end Set_Is_Immediately_Visible;
5620 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5621 begin
5622 Set_Flag254 (Id, V);
5623 end Set_Is_Implementation_Defined;
5625 procedure Set_Is_Imported (Id : E; V : B := True) is
5626 begin
5627 Set_Flag24 (Id, V);
5628 end Set_Is_Imported;
5630 procedure Set_Is_Independent (Id : E; V : B := True) is
5631 begin
5632 Set_Flag268 (Id, V);
5633 end Set_Is_Independent;
5635 procedure Set_Is_Initial_Condition_Procedure (Id : E; V : B := True) is
5636 begin
5637 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5638 Set_Flag302 (Id, V);
5639 end Set_Is_Initial_Condition_Procedure;
5641 procedure Set_Is_Inlined (Id : E; V : B := True) is
5642 begin
5643 Set_Flag11 (Id, V);
5644 end Set_Is_Inlined;
5646 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5647 begin
5648 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5649 Set_Flag1 (Id, V);
5650 end Set_Is_Inlined_Always;
5652 procedure Set_Is_Interface (Id : E; V : B := True) is
5653 begin
5654 pragma Assert (Is_Record_Type (Id));
5655 Set_Flag186 (Id, V);
5656 end Set_Is_Interface;
5658 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5659 begin
5660 Set_Flag126 (Id, V);
5661 end Set_Is_Instantiated;
5663 procedure Set_Is_Internal (Id : E; V : B := True) is
5664 begin
5665 pragma Assert (Nkind (Id) in N_Entity);
5666 Set_Flag17 (Id, V);
5667 end Set_Is_Internal;
5669 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5670 begin
5671 pragma Assert (Nkind (Id) in N_Entity);
5672 Set_Flag89 (Id, V);
5673 end Set_Is_Interrupt_Handler;
5675 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5676 begin
5677 Set_Flag64 (Id, V);
5678 end Set_Is_Intrinsic_Subprogram;
5680 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5681 begin
5682 pragma Assert (Ekind (Id) = E_Procedure);
5683 Set_Flag257 (Id, V);
5684 end Set_Is_Invariant_Procedure;
5686 procedure Set_Is_Itype (Id : E; V : B := True) is
5687 begin
5688 Set_Flag91 (Id, V);
5689 end Set_Is_Itype;
5691 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5692 begin
5693 Set_Flag37 (Id, V);
5694 end Set_Is_Known_Non_Null;
5696 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5697 begin
5698 Set_Flag204 (Id, V);
5699 end Set_Is_Known_Null;
5701 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5702 begin
5703 Set_Flag170 (Id, V);
5704 end Set_Is_Known_Valid;
5706 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5707 begin
5708 pragma Assert (Is_Type (Id));
5709 Set_Flag106 (Id, V);
5710 end Set_Is_Limited_Composite;
5712 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5713 begin
5714 pragma Assert (Is_Interface (Id));
5715 Set_Flag197 (Id, V);
5716 end Set_Is_Limited_Interface;
5718 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5719 begin
5720 Set_Flag25 (Id, V);
5721 end Set_Is_Limited_Record;
5723 procedure Set_Is_Loop_Parameter (Id : E; V : B := True) is
5724 begin
5725 Set_Flag307 (Id, V);
5726 end Set_Is_Loop_Parameter;
5728 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5729 begin
5730 pragma Assert (Is_Subprogram (Id));
5731 Set_Flag137 (Id, V);
5732 end Set_Is_Machine_Code_Subprogram;
5734 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5735 begin
5736 pragma Assert (Is_Type (Id));
5737 Set_Flag109 (Id, V);
5738 end Set_Is_Non_Static_Subtype;
5740 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5741 begin
5742 pragma Assert (Ekind (Id) = E_Procedure);
5743 Set_Flag178 (Id, V);
5744 end Set_Is_Null_Init_Proc;
5746 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5747 begin
5748 Set_Flag153 (Id, V);
5749 end Set_Is_Obsolescent;
5751 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5752 begin
5753 pragma Assert (Ekind (Id) = E_Out_Parameter);
5754 Set_Flag226 (Id, V);
5755 end Set_Is_Only_Out_Parameter;
5757 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5758 begin
5759 Set_Flag160 (Id, V);
5760 end Set_Is_Package_Body_Entity;
5762 procedure Set_Is_Packed (Id : E; V : B := True) is
5763 begin
5764 pragma Assert (Id = Base_Type (Id));
5765 Set_Flag51 (Id, V);
5766 end Set_Is_Packed;
5768 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5769 begin
5770 Set_Flag138 (Id, V);
5771 end Set_Is_Packed_Array_Impl_Type;
5773 procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
5774 begin
5775 pragma Assert (Ekind_In (Id, E_Void, E_General_Access_Type));
5776 Set_Flag215 (Id, V);
5777 end Set_Is_Param_Block_Component_Type;
5779 procedure Set_Is_Partial_Invariant_Procedure (Id : E; V : B := True) is
5780 begin
5781 pragma Assert (Ekind (Id) = E_Procedure);
5782 Set_Flag292 (Id, V);
5783 end Set_Is_Partial_Invariant_Procedure;
5785 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5786 begin
5787 pragma Assert (Nkind (Id) in N_Entity);
5788 Set_Flag9 (Id, V);
5789 end Set_Is_Potentially_Use_Visible;
5791 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5792 begin
5793 pragma Assert (Ekind (Id) = E_Function);
5794 Set_Flag255 (Id, V);
5795 end Set_Is_Predicate_Function;
5797 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5798 begin
5799 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5800 Set_Flag256 (Id, V);
5801 end Set_Is_Predicate_Function_M;
5803 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5804 begin
5805 Set_Flag59 (Id, V);
5806 end Set_Is_Preelaborated;
5808 procedure Set_Is_Primitive (Id : E; V : B := True) is
5809 begin
5810 pragma Assert
5811 (Is_Overloadable (Id)
5812 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5813 Set_Flag218 (Id, V);
5814 end Set_Is_Primitive;
5816 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5817 begin
5818 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5819 Set_Flag195 (Id, V);
5820 end Set_Is_Primitive_Wrapper;
5822 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5823 begin
5824 pragma Assert (Is_Type (Id));
5825 Set_Flag107 (Id, V);
5826 end Set_Is_Private_Composite;
5828 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5829 begin
5830 Set_Flag53 (Id, V);
5831 end Set_Is_Private_Descendant;
5833 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5834 begin
5835 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5836 Set_Flag245 (Id, V);
5837 end Set_Is_Private_Primitive;
5839 procedure Set_Is_Public (Id : E; V : B := True) is
5840 begin
5841 pragma Assert (Nkind (Id) in N_Entity);
5842 Set_Flag10 (Id, V);
5843 end Set_Is_Public;
5845 procedure Set_Is_Pure (Id : E; V : B := True) is
5846 begin
5847 Set_Flag44 (Id, V);
5848 end Set_Is_Pure;
5850 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5851 begin
5852 pragma Assert (Is_Access_Type (Id));
5853 Set_Flag189 (Id, V);
5854 end Set_Is_Pure_Unit_Access_Type;
5856 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5857 begin
5858 pragma Assert (Is_Type (Id));
5859 Set_Flag244 (Id, V);
5860 end Set_Is_RACW_Stub_Type;
5862 procedure Set_Is_Raised (Id : E; V : B := True) is
5863 begin
5864 pragma Assert (Ekind (Id) = E_Exception);
5865 Set_Flag224 (Id, V);
5866 end Set_Is_Raised;
5868 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5869 begin
5870 Set_Flag62 (Id, V);
5871 end Set_Is_Remote_Call_Interface;
5873 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5874 begin
5875 Set_Flag61 (Id, V);
5876 end Set_Is_Remote_Types;
5878 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5879 begin
5880 Set_Flag112 (Id, V);
5881 end Set_Is_Renaming_Of_Object;
5883 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5884 begin
5885 Set_Flag209 (Id, V);
5886 end Set_Is_Return_Object;
5888 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5889 begin
5890 pragma Assert (Ekind (Id) = E_Variable);
5891 Set_Flag249 (Id, V);
5892 end Set_Is_Safe_To_Reevaluate;
5894 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5895 begin
5896 Set_Flag60 (Id, V);
5897 end Set_Is_Shared_Passive;
5899 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5900 begin
5901 pragma Assert (Is_Type (Id));
5902 Set_Flag281 (Id, V);
5903 end Set_Is_Static_Type;
5905 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5906 begin
5907 pragma Assert
5908 (Is_Type (Id)
5909 or else Ekind_In (Id, E_Exception,
5910 E_Variable,
5911 E_Constant,
5912 E_Void));
5913 Set_Flag28 (Id, V);
5914 end Set_Is_Statically_Allocated;
5916 procedure Set_Is_Tag (Id : E; V : B := True) is
5917 begin
5918 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5919 Set_Flag78 (Id, V);
5920 end Set_Is_Tag;
5922 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5923 begin
5924 Set_Flag55 (Id, V);
5925 end Set_Is_Tagged_Type;
5927 procedure Set_Is_Thunk (Id : E; V : B := True) is
5928 begin
5929 pragma Assert (Is_Subprogram (Id));
5930 Set_Flag225 (Id, V);
5931 end Set_Is_Thunk;
5933 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5934 begin
5935 Set_Flag235 (Id, V);
5936 end Set_Is_Trivial_Subprogram;
5938 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5939 begin
5940 Set_Flag163 (Id, V);
5941 end Set_Is_True_Constant;
5943 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5944 begin
5945 pragma Assert (Id = Base_Type (Id));
5946 Set_Flag117 (Id, V);
5947 end Set_Is_Unchecked_Union;
5949 procedure Set_Is_Underlying_Full_View (Id : E; V : B := True) is
5950 begin
5951 pragma Assert (Is_Type (Id));
5952 Set_Flag298 (Id, V);
5953 end Set_Is_Underlying_Full_View;
5955 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5956 begin
5957 pragma Assert (Ekind (Id) = E_Record_Type);
5958 Set_Flag246 (Id, V);
5959 end Set_Is_Underlying_Record_View;
5961 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5962 begin
5963 Set_Flag284 (Id, V);
5964 end Set_Is_Unimplemented;
5966 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5967 begin
5968 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5969 Set_Flag144 (Id, V);
5970 end Set_Is_Unsigned_Type;
5972 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5973 begin
5974 pragma Assert
5975 (Ekind_In (Id, E_Constant, E_Variable, E_Discriminant)
5976 or else Is_Formal (Id)
5977 or else Is_Type (Id));
5978 Set_Flag283 (Id, V);
5979 end Set_Is_Uplevel_Referenced_Entity;
5981 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5982 begin
5983 pragma Assert (Ekind (Id) = E_Procedure);
5984 Set_Flag127 (Id, V);
5985 end Set_Is_Valued_Procedure;
5987 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5988 begin
5989 Set_Flag206 (Id, V);
5990 end Set_Is_Visible_Formal;
5992 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5993 begin
5994 Set_Flag116 (Id, V);
5995 end Set_Is_Visible_Lib_Unit;
5997 procedure Set_Is_Volatile (Id : E; V : B := True) is
5998 begin
5999 pragma Assert (Nkind (Id) in N_Entity);
6000 Set_Flag16 (Id, V);
6001 end Set_Is_Volatile;
6003 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
6004 begin
6005 Set_Flag285 (Id, V);
6006 end Set_Is_Volatile_Full_Access;
6008 procedure Set_Itype_Printed (Id : E; V : B := True) is
6009 begin
6010 pragma Assert (Is_Itype (Id));
6011 Set_Flag202 (Id, V);
6012 end Set_Itype_Printed;
6014 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
6015 begin
6016 Set_Flag32 (Id, V);
6017 end Set_Kill_Elaboration_Checks;
6019 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
6020 begin
6021 Set_Flag33 (Id, V);
6022 end Set_Kill_Range_Checks;
6024 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
6025 begin
6026 pragma Assert (Is_Type (Id));
6027 Set_Flag207 (Id, V);
6028 end Set_Known_To_Have_Preelab_Init;
6030 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
6031 begin
6032 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6033 Set_Node30 (Id, V);
6034 end Set_Last_Aggregate_Assignment;
6036 procedure Set_Last_Assignment (Id : E; V : N) is
6037 begin
6038 pragma Assert (Is_Assignable (Id));
6039 Set_Node26 (Id, V);
6040 end Set_Last_Assignment;
6042 procedure Set_Last_Entity (Id : E; V : E) is
6043 begin
6044 Set_Node20 (Id, V);
6045 end Set_Last_Entity;
6047 procedure Set_Limited_View (Id : E; V : E) is
6048 begin
6049 pragma Assert (Ekind (Id) = E_Package);
6050 Set_Node23 (Id, V);
6051 end Set_Limited_View;
6053 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
6054 begin
6055 pragma Assert
6056 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
6057 Set_Node33 (Id, V);
6058 end Set_Linker_Section_Pragma;
6060 procedure Set_Lit_Indexes (Id : E; V : E) is
6061 begin
6062 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6063 Set_Node18 (Id, V);
6064 end Set_Lit_Indexes;
6066 procedure Set_Lit_Strings (Id : E; V : E) is
6067 begin
6068 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6069 Set_Node16 (Id, V);
6070 end Set_Lit_Strings;
6072 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
6073 begin
6074 pragma Assert (Is_Formal (Id));
6075 Set_Flag205 (Id, V);
6076 end Set_Low_Bound_Tested;
6078 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
6079 begin
6080 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
6081 Set_Flag84 (Id, V);
6082 end Set_Machine_Radix_10;
6084 procedure Set_Master_Id (Id : E; V : E) is
6085 begin
6086 pragma Assert (Is_Access_Type (Id));
6087 Set_Node17 (Id, V);
6088 end Set_Master_Id;
6090 procedure Set_Materialize_Entity (Id : E; V : B := True) is
6091 begin
6092 Set_Flag168 (Id, V);
6093 end Set_Materialize_Entity;
6095 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
6096 begin
6097 Set_Flag262 (Id, V);
6098 end Set_May_Inherit_Delayed_Rep_Aspects;
6100 procedure Set_Mechanism (Id : E; V : M) is
6101 begin
6102 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
6103 Set_Uint8 (Id, UI_From_Int (V));
6104 end Set_Mechanism;
6106 procedure Set_Modulus (Id : E; V : U) is
6107 begin
6108 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
6109 Set_Uint17 (Id, V);
6110 end Set_Modulus;
6112 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
6113 begin
6114 pragma Assert (Is_Type (Id));
6115 Set_Flag183 (Id, V);
6116 end Set_Must_Be_On_Byte_Boundary;
6118 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
6119 begin
6120 pragma Assert (Is_Type (Id));
6121 Set_Flag208 (Id, V);
6122 end Set_Must_Have_Preelab_Init;
6124 procedure Set_Needs_Activation_Record (Id : E; V : B := True) is
6125 begin
6126 Set_Flag306 (Id, V);
6127 end Set_Needs_Activation_Record;
6129 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
6130 begin
6131 Set_Flag147 (Id, V);
6132 end Set_Needs_Debug_Info;
6134 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
6135 begin
6136 pragma Assert
6137 (Is_Overloadable (Id)
6138 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
6139 Set_Flag22 (Id, V);
6140 end Set_Needs_No_Actuals;
6142 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
6143 begin
6144 Set_Flag115 (Id, V);
6145 end Set_Never_Set_In_Source;
6147 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
6148 begin
6149 Set_Node12 (Id, V);
6150 end Set_Next_Inlined_Subprogram;
6152 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
6153 begin
6154 pragma Assert (Is_Discrete_Type (Id));
6155 Set_Flag276 (Id, V);
6156 end Set_No_Dynamic_Predicate_On_Actual;
6158 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
6159 begin
6160 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6161 Set_Flag131 (Id, V);
6162 end Set_No_Pool_Assigned;
6164 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
6165 begin
6166 pragma Assert (Is_Discrete_Type (Id));
6167 Set_Flag275 (Id, V);
6168 end Set_No_Predicate_On_Actual;
6170 procedure Set_No_Reordering (Id : E; V : B := True) is
6171 begin
6172 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
6173 Set_Flag239 (Id, V);
6174 end Set_No_Reordering;
6176 procedure Set_No_Return (Id : E; V : B := True) is
6177 begin
6178 pragma Assert
6179 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
6180 Set_Flag113 (Id, V);
6181 end Set_No_Return;
6183 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
6184 begin
6185 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6186 Set_Flag136 (Id, V);
6187 end Set_No_Strict_Aliasing;
6189 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
6190 begin
6191 pragma Assert (Is_Tagged_Type (Id));
6192 Set_Node32 (Id, V);
6193 end Set_No_Tagged_Streams_Pragma;
6195 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
6196 begin
6197 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6198 Set_Flag58 (Id, V);
6199 end Set_Non_Binary_Modulus;
6201 procedure Set_Non_Limited_View (Id : E; V : E) is
6202 begin
6203 pragma Assert
6204 (Ekind (Id) in Incomplete_Kind
6205 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
6206 Set_Node19 (Id, V);
6207 end Set_Non_Limited_View;
6209 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
6210 begin
6211 pragma Assert
6212 (Root_Type (Id) = Standard_Boolean
6213 and then Ekind (Id) = E_Enumeration_Type);
6214 Set_Flag162 (Id, V);
6215 end Set_Nonzero_Is_True;
6217 procedure Set_Normalized_First_Bit (Id : E; V : U) is
6218 begin
6219 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6220 Set_Uint8 (Id, V);
6221 end Set_Normalized_First_Bit;
6223 procedure Set_Normalized_Position (Id : E; V : U) is
6224 begin
6225 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6226 Set_Uint14 (Id, V);
6227 end Set_Normalized_Position;
6229 procedure Set_Normalized_Position_Max (Id : E; V : U) is
6230 begin
6231 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6232 Set_Uint10 (Id, V);
6233 end Set_Normalized_Position_Max;
6235 procedure Set_OK_To_Rename (Id : E; V : B := True) is
6236 begin
6237 pragma Assert (Ekind (Id) = E_Variable);
6238 Set_Flag247 (Id, V);
6239 end Set_OK_To_Rename;
6241 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
6242 begin
6243 pragma Assert
6244 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
6245 Set_Flag241 (Id, V);
6246 end Set_Optimize_Alignment_Space;
6248 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
6249 begin
6250 pragma Assert
6251 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
6252 Set_Flag242 (Id, V);
6253 end Set_Optimize_Alignment_Time;
6255 procedure Set_Original_Access_Type (Id : E; V : E) is
6256 begin
6257 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
6258 Set_Node28 (Id, V);
6259 end Set_Original_Access_Type;
6261 procedure Set_Original_Array_Type (Id : E; V : E) is
6262 begin
6263 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
6264 Set_Node21 (Id, V);
6265 end Set_Original_Array_Type;
6267 procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
6268 begin
6269 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6270 Set_Node41 (Id, V);
6271 end Set_Original_Protected_Subprogram;
6273 procedure Set_Original_Record_Component (Id : E; V : E) is
6274 begin
6275 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
6276 Set_Node22 (Id, V);
6277 end Set_Original_Record_Component;
6279 procedure Set_Overlays_Constant (Id : E; V : B := True) is
6280 begin
6281 Set_Flag243 (Id, V);
6282 end Set_Overlays_Constant;
6284 procedure Set_Overridden_Operation (Id : E; V : E) is
6285 begin
6286 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
6287 Set_Node26 (Id, V);
6288 end Set_Overridden_Operation;
6290 procedure Set_Package_Instantiation (Id : E; V : N) is
6291 begin
6292 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
6293 Set_Node26 (Id, V);
6294 end Set_Package_Instantiation;
6296 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
6297 begin
6298 pragma Assert (Is_Array_Type (Id));
6299 Set_Node23 (Id, V);
6300 end Set_Packed_Array_Impl_Type;
6302 procedure Set_Parent_Subtype (Id : E; V : E) is
6303 begin
6304 pragma Assert (Ekind (Id) = E_Record_Type);
6305 Set_Node19 (Id, V);
6306 end Set_Parent_Subtype;
6308 procedure Set_Part_Of_Constituents (Id : E; V : L) is
6309 begin
6310 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
6311 Set_Elist10 (Id, V);
6312 end Set_Part_Of_Constituents;
6314 procedure Set_Part_Of_References (Id : E; V : L) is
6315 begin
6316 pragma Assert (Ekind (Id) = E_Variable);
6317 Set_Elist11 (Id, V);
6318 end Set_Part_Of_References;
6320 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
6321 begin
6322 pragma Assert (Is_Type (Id));
6323 Set_Flag280 (Id, V);
6324 end Set_Partial_View_Has_Unknown_Discr;
6326 procedure Set_Pending_Access_Types (Id : E; V : L) is
6327 begin
6328 pragma Assert (Is_Type (Id));
6329 Set_Elist15 (Id, V);
6330 end Set_Pending_Access_Types;
6332 procedure Set_Postconditions_Proc (Id : E; V : E) is
6333 begin
6334 pragma Assert (Ekind_In (Id, E_Entry,
6335 E_Entry_Family,
6336 E_Function,
6337 E_Procedure));
6338 Set_Node14 (Id, V);
6339 end Set_Postconditions_Proc;
6341 procedure Set_Predicated_Parent (Id : E; V : E) is
6342 begin
6343 pragma Assert (Ekind_In (Id, E_Array_Subtype,
6344 E_Record_Subtype,
6345 E_Record_Subtype_With_Private));
6346 Set_Node38 (Id, V);
6347 end Set_Predicated_Parent;
6349 procedure Set_Predicates_Ignored (Id : E; V : B) is
6350 begin
6351 pragma Assert (Is_Type (Id));
6352 Set_Flag288 (Id, V);
6353 end Set_Predicates_Ignored;
6355 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
6356 begin
6357 pragma Assert (Is_Tagged_Type (Id));
6358 Set_Elist10 (Id, V);
6359 end Set_Direct_Primitive_Operations;
6361 procedure Set_Prival (Id : E; V : E) is
6362 begin
6363 pragma Assert (Is_Protected_Component (Id));
6364 Set_Node17 (Id, V);
6365 end Set_Prival;
6367 procedure Set_Prival_Link (Id : E; V : E) is
6368 begin
6369 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6370 Set_Node20 (Id, V);
6371 end Set_Prival_Link;
6373 procedure Set_Private_Dependents (Id : E; V : L) is
6374 begin
6375 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
6376 Set_Elist18 (Id, V);
6377 end Set_Private_Dependents;
6379 procedure Set_Private_View (Id : E; V : N) is
6380 begin
6381 pragma Assert (Is_Private_Type (Id));
6382 Set_Node22 (Id, V);
6383 end Set_Private_View;
6385 procedure Set_Prev_Entity (Id : E; V : E) is
6386 begin
6387 Set_Node36 (Id, V);
6388 end Set_Prev_Entity;
6390 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
6391 begin
6392 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
6393 Set_Node11 (Id, V);
6394 end Set_Protected_Body_Subprogram;
6396 procedure Set_Protected_Formal (Id : E; V : E) is
6397 begin
6398 pragma Assert (Is_Formal (Id));
6399 Set_Node22 (Id, V);
6400 end Set_Protected_Formal;
6402 procedure Set_Protected_Subprogram (Id : E; V : E) is
6403 begin
6404 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6405 Set_Node39 (Id, V);
6406 end Set_Protected_Subprogram;
6408 procedure Set_Protection_Object (Id : E; V : E) is
6409 begin
6410 pragma Assert (Ekind_In (Id, E_Entry,
6411 E_Entry_Family,
6412 E_Function,
6413 E_Procedure));
6414 Set_Node23 (Id, V);
6415 end Set_Protection_Object;
6417 procedure Set_Reachable (Id : E; V : B := True) is
6418 begin
6419 Set_Flag49 (Id, V);
6420 end Set_Reachable;
6422 procedure Set_Receiving_Entry (Id : E; V : E) is
6423 begin
6424 pragma Assert (Ekind (Id) = E_Procedure);
6425 Set_Node19 (Id, V);
6426 end Set_Receiving_Entry;
6428 procedure Set_Referenced (Id : E; V : B := True) is
6429 begin
6430 Set_Flag156 (Id, V);
6431 end Set_Referenced;
6433 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
6434 begin
6435 Set_Flag36 (Id, V);
6436 end Set_Referenced_As_LHS;
6438 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
6439 begin
6440 Set_Flag227 (Id, V);
6441 end Set_Referenced_As_Out_Parameter;
6443 procedure Set_Refinement_Constituents (Id : E; V : L) is
6444 begin
6445 pragma Assert (Ekind (Id) = E_Abstract_State);
6446 Set_Elist8 (Id, V);
6447 end Set_Refinement_Constituents;
6449 procedure Set_Register_Exception_Call (Id : E; V : N) is
6450 begin
6451 pragma Assert (Ekind (Id) = E_Exception);
6452 Set_Node20 (Id, V);
6453 end Set_Register_Exception_Call;
6455 procedure Set_Related_Array_Object (Id : E; V : E) is
6456 begin
6457 pragma Assert (Is_Array_Type (Id));
6458 Set_Node25 (Id, V);
6459 end Set_Related_Array_Object;
6461 procedure Set_Related_Expression (Id : E; V : N) is
6462 begin
6463 pragma Assert (Ekind (Id) in Type_Kind
6464 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
6465 Set_Node24 (Id, V);
6466 end Set_Related_Expression;
6468 procedure Set_Related_Instance (Id : E; V : E) is
6469 begin
6470 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
6471 Set_Node15 (Id, V);
6472 end Set_Related_Instance;
6474 procedure Set_Related_Type (Id : E; V : E) is
6475 begin
6476 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
6477 Set_Node27 (Id, V);
6478 end Set_Related_Type;
6480 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
6481 begin
6482 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
6483 Set_Node28 (Id, V);
6484 end Set_Relative_Deadline_Variable;
6486 procedure Set_Renamed_Entity (Id : E; V : N) is
6487 begin
6488 Set_Node18 (Id, V);
6489 end Set_Renamed_Entity;
6491 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
6492 begin
6493 pragma Assert (Ekind (Id) = E_Package);
6494 Set_Flag231 (Id, V);
6495 end Set_Renamed_In_Spec;
6497 procedure Set_Renamed_Object (Id : E; V : N) is
6498 begin
6499 Set_Node18 (Id, V);
6500 end Set_Renamed_Object;
6502 procedure Set_Renaming_Map (Id : E; V : U) is
6503 begin
6504 Set_Uint9 (Id, V);
6505 end Set_Renaming_Map;
6507 procedure Set_Requires_Overriding (Id : E; V : B := True) is
6508 begin
6509 pragma Assert (Is_Overloadable (Id));
6510 Set_Flag213 (Id, V);
6511 end Set_Requires_Overriding;
6513 procedure Set_Return_Present (Id : E; V : B := True) is
6514 begin
6515 Set_Flag54 (Id, V);
6516 end Set_Return_Present;
6518 procedure Set_Return_Applies_To (Id : E; V : N) is
6519 begin
6520 Set_Node8 (Id, V);
6521 end Set_Return_Applies_To;
6523 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
6524 begin
6525 Set_Flag90 (Id, V);
6526 end Set_Returns_By_Ref;
6528 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6529 begin
6530 pragma Assert
6531 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6532 Set_Flag164 (Id, V);
6533 end Set_Reverse_Bit_Order;
6535 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6536 begin
6537 pragma Assert
6538 (Is_Base_Type (Id)
6539 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6540 Set_Flag93 (Id, V);
6541 end Set_Reverse_Storage_Order;
6543 procedure Set_Rewritten_For_C (Id : E; V : B := True) is
6544 begin
6545 pragma Assert (Ekind (Id) = E_Function);
6546 Set_Flag287 (Id, V);
6547 end Set_Rewritten_For_C;
6549 procedure Set_RM_Size (Id : E; V : U) is
6550 begin
6551 pragma Assert (Is_Type (Id));
6552 Set_Uint13 (Id, V);
6553 end Set_RM_Size;
6555 procedure Set_Scalar_Range (Id : E; V : N) is
6556 begin
6557 Set_Node20 (Id, V);
6558 end Set_Scalar_Range;
6560 procedure Set_Scale_Value (Id : E; V : U) is
6561 begin
6562 Set_Uint16 (Id, V);
6563 end Set_Scale_Value;
6565 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6566 begin
6567 pragma Assert (not Is_Record_Type (Id));
6568 Set_Uint22 (Id, V);
6569 end Set_Scope_Depth_Value;
6571 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6572 begin
6573 Set_Flag167 (Id, V);
6574 end Set_Sec_Stack_Needed_For_Return;
6576 procedure Set_Shadow_Entities (Id : E; V : S) is
6577 begin
6578 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
6579 Set_List14 (Id, V);
6580 end Set_Shadow_Entities;
6582 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6583 begin
6584 pragma Assert (Ekind (Id) = E_Variable);
6585 Set_Node22 (Id, V);
6586 end Set_Shared_Var_Procs_Instance;
6588 procedure Set_Size_Check_Code (Id : E; V : N) is
6589 begin
6590 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6591 Set_Node19 (Id, V);
6592 end Set_Size_Check_Code;
6594 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6595 begin
6596 Set_Flag177 (Id, V);
6597 end Set_Size_Depends_On_Discriminant;
6599 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6600 begin
6601 Set_Flag92 (Id, V);
6602 end Set_Size_Known_At_Compile_Time;
6604 procedure Set_Small_Value (Id : E; V : R) is
6605 begin
6606 pragma Assert (Is_Fixed_Point_Type (Id));
6607 Set_Ureal21 (Id, V);
6608 end Set_Small_Value;
6610 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6611 begin
6612 pragma Assert
6613 (Ekind_In (Id, E_Protected_Type, -- concurrent types
6614 E_Task_Type)
6615 or else
6616 Ekind_In (Id, E_Generic_Package, -- packages
6617 E_Package,
6618 E_Package_Body));
6619 Set_Node41 (Id, V);
6620 end Set_SPARK_Aux_Pragma;
6622 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6623 begin
6624 pragma Assert
6625 (Ekind_In (Id, E_Protected_Type, -- concurrent types
6626 E_Task_Type)
6627 or else
6628 Ekind_In (Id, E_Generic_Package, -- packages
6629 E_Package,
6630 E_Package_Body));
6631 Set_Flag266 (Id, V);
6632 end Set_SPARK_Aux_Pragma_Inherited;
6634 procedure Set_SPARK_Pragma (Id : E; V : N) is
6635 begin
6636 pragma Assert
6637 (Ekind_In (Id, E_Constant, -- objects
6638 E_Variable)
6639 or else
6640 Ekind_In (Id, E_Abstract_State, -- overloadable
6641 E_Entry,
6642 E_Entry_Family,
6643 E_Function,
6644 E_Generic_Function,
6645 E_Generic_Procedure,
6646 E_Operator,
6647 E_Procedure,
6648 E_Subprogram_Body)
6649 or else
6650 Ekind_In (Id, E_Generic_Package, -- packages
6651 E_Package,
6652 E_Package_Body)
6653 or else
6654 Ekind (Id) = E_Void -- special purpose
6655 or else
6656 Ekind_In (Id, E_Protected_Body, -- types
6657 E_Task_Body)
6658 or else
6659 Is_Type (Id));
6660 Set_Node40 (Id, V);
6661 end Set_SPARK_Pragma;
6663 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6664 begin
6665 pragma Assert
6666 (Ekind_In (Id, E_Constant, -- objects
6667 E_Variable)
6668 or else
6669 Ekind_In (Id, E_Abstract_State, -- overloadable
6670 E_Entry,
6671 E_Entry_Family,
6672 E_Function,
6673 E_Generic_Function,
6674 E_Generic_Procedure,
6675 E_Operator,
6676 E_Procedure,
6677 E_Subprogram_Body)
6678 or else
6679 Ekind_In (Id, E_Generic_Package, -- packages
6680 E_Package,
6681 E_Package_Body)
6682 or else
6683 Ekind (Id) = E_Void -- special purpose
6684 or else
6685 Ekind_In (Id, E_Protected_Body, -- types
6686 E_Task_Body)
6687 or else
6688 Is_Type (Id));
6689 Set_Flag265 (Id, V);
6690 end Set_SPARK_Pragma_Inherited;
6692 procedure Set_Spec_Entity (Id : E; V : E) is
6693 begin
6694 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6695 Set_Node19 (Id, V);
6696 end Set_Spec_Entity;
6698 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6699 begin
6700 pragma Assert
6701 (Is_Base_Type (Id)
6702 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6703 Set_Flag273 (Id, V);
6704 end Set_SSO_Set_High_By_Default;
6706 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6707 begin
6708 pragma Assert
6709 (Is_Base_Type (Id)
6710 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6711 Set_Flag272 (Id, V);
6712 end Set_SSO_Set_Low_By_Default;
6714 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6715 begin
6716 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6717 Set_List25 (Id, V);
6718 end Set_Static_Discrete_Predicate;
6720 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6721 begin
6722 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6723 and then Has_Predicates (Id));
6724 Set_Node25 (Id, V);
6725 end Set_Static_Real_Or_String_Predicate;
6727 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6728 begin
6729 pragma Assert (Ekind_In (Id, E_Constant,
6730 E_Loop_Parameter,
6731 E_Variable));
6732 Set_Node15 (Id, V);
6733 end Set_Status_Flag_Or_Transient_Decl;
6735 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6736 begin
6737 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6738 pragma Assert (Id = Base_Type (Id));
6739 Set_Node26 (Id, V);
6740 end Set_Storage_Size_Variable;
6742 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6743 begin
6744 pragma Assert (Ekind (Id) = E_Package);
6745 Set_Flag77 (Id, V);
6746 end Set_Static_Elaboration_Desired;
6748 procedure Set_Static_Initialization (Id : E; V : N) is
6749 begin
6750 pragma Assert
6751 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6752 Set_Node30 (Id, V);
6753 end Set_Static_Initialization;
6755 procedure Set_Stored_Constraint (Id : E; V : L) is
6756 begin
6757 pragma Assert (Nkind (Id) in N_Entity);
6758 Set_Elist23 (Id, V);
6759 end Set_Stored_Constraint;
6761 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6762 begin
6763 pragma Assert (Ekind (Id) = E_Constant);
6764 Set_Flag270 (Id, V);
6765 end Set_Stores_Attribute_Old_Prefix;
6767 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6768 begin
6769 pragma Assert (Id = Base_Type (Id));
6770 Set_Flag145 (Id, V);
6771 end Set_Strict_Alignment;
6773 procedure Set_String_Literal_Length (Id : E; V : U) is
6774 begin
6775 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6776 Set_Uint16 (Id, V);
6777 end Set_String_Literal_Length;
6779 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6780 begin
6781 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6782 Set_Node18 (Id, V);
6783 end Set_String_Literal_Low_Bound;
6785 procedure Set_Subprograms_For_Type (Id : E; V : L) is
6786 begin
6787 pragma Assert (Is_Type (Id));
6788 Set_Elist29 (Id, V);
6789 end Set_Subprograms_For_Type;
6791 procedure Set_Subps_Index (Id : E; V : U) is
6792 begin
6793 pragma Assert (Is_Subprogram (Id));
6794 Set_Uint24 (Id, V);
6795 end Set_Subps_Index;
6797 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6798 begin
6799 Set_Flag303 (Id, V);
6800 end Set_Suppress_Elaboration_Warnings;
6802 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6803 begin
6804 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6805 Set_Flag105 (Id, V);
6806 end Set_Suppress_Initialization;
6808 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6809 begin
6810 Set_Flag165 (Id, V);
6811 end Set_Suppress_Style_Checks;
6813 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6814 begin
6815 Set_Flag217 (Id, V);
6816 end Set_Suppress_Value_Tracking_On_Call;
6818 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6819 begin
6820 pragma Assert (Ekind (Id) in Task_Kind);
6821 Set_Node25 (Id, V);
6822 end Set_Task_Body_Procedure;
6824 procedure Set_Thunk_Entity (Id : E; V : E) is
6825 begin
6826 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6827 and then Is_Thunk (Id));
6828 Set_Node31 (Id, V);
6829 end Set_Thunk_Entity;
6831 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6832 begin
6833 Set_Flag41 (Id, V);
6834 end Set_Treat_As_Volatile;
6836 procedure Set_Underlying_Full_View (Id : E; V : E) is
6837 begin
6838 pragma Assert (Ekind (Id) in Private_Kind);
6839 Set_Node19 (Id, V);
6840 end Set_Underlying_Full_View;
6842 procedure Set_Underlying_Record_View (Id : E; V : E) is
6843 begin
6844 pragma Assert (Ekind (Id) = E_Record_Type);
6845 Set_Node28 (Id, V);
6846 end Set_Underlying_Record_View;
6848 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6849 begin
6850 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6851 Set_Flag216 (Id, V);
6852 end Set_Universal_Aliasing;
6854 procedure Set_Unset_Reference (Id : E; V : N) is
6855 begin
6856 Set_Node16 (Id, V);
6857 end Set_Unset_Reference;
6859 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6860 begin
6861 Set_Flag222 (Id, V);
6862 end Set_Used_As_Generic_Actual;
6864 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6865 begin
6866 pragma Assert (Ekind (Id) = E_Protected_Type);
6867 Set_Flag188 (Id, V);
6868 end Set_Uses_Lock_Free;
6870 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6871 begin
6872 Set_Flag95 (Id, V);
6873 end Set_Uses_Sec_Stack;
6875 procedure Set_Validated_Object (Id : E; V : N) is
6876 begin
6877 pragma Assert (Ekind (Id) = E_Variable);
6878 Set_Node38 (Id, V);
6879 end Set_Validated_Object;
6881 procedure Set_Warnings_Off (Id : E; V : B := True) is
6882 begin
6883 Set_Flag96 (Id, V);
6884 end Set_Warnings_Off;
6886 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6887 begin
6888 Set_Flag236 (Id, V);
6889 end Set_Warnings_Off_Used;
6891 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6892 begin
6893 Set_Flag237 (Id, V);
6894 end Set_Warnings_Off_Used_Unmodified;
6896 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6897 begin
6898 Set_Flag238 (Id, V);
6899 end Set_Warnings_Off_Used_Unreferenced;
6901 procedure Set_Was_Hidden (Id : E; V : B := True) is
6902 begin
6903 Set_Flag196 (Id, V);
6904 end Set_Was_Hidden;
6906 procedure Set_Wrapped_Entity (Id : E; V : E) is
6907 begin
6908 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6909 and then Is_Primitive_Wrapper (Id));
6910 Set_Node27 (Id, V);
6911 end Set_Wrapped_Entity;
6913 -----------------------------------
6914 -- Field Initialization Routines --
6915 -----------------------------------
6917 procedure Init_Alignment (Id : E) is
6918 begin
6919 Set_Uint14 (Id, Uint_0);
6920 end Init_Alignment;
6922 procedure Init_Alignment (Id : E; V : Int) is
6923 begin
6924 Set_Uint14 (Id, UI_From_Int (V));
6925 end Init_Alignment;
6927 procedure Init_Component_Bit_Offset (Id : E) is
6928 begin
6929 Set_Uint11 (Id, No_Uint);
6930 end Init_Component_Bit_Offset;
6932 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6933 begin
6934 Set_Uint11 (Id, UI_From_Int (V));
6935 end Init_Component_Bit_Offset;
6937 procedure Init_Component_Size (Id : E) is
6938 begin
6939 Set_Uint22 (Id, Uint_0);
6940 end Init_Component_Size;
6942 procedure Init_Component_Size (Id : E; V : Int) is
6943 begin
6944 Set_Uint22 (Id, UI_From_Int (V));
6945 end Init_Component_Size;
6947 procedure Init_Digits_Value (Id : E) is
6948 begin
6949 Set_Uint17 (Id, Uint_0);
6950 end Init_Digits_Value;
6952 procedure Init_Digits_Value (Id : E; V : Int) is
6953 begin
6954 Set_Uint17 (Id, UI_From_Int (V));
6955 end Init_Digits_Value;
6957 procedure Init_Esize (Id : E) is
6958 begin
6959 Set_Uint12 (Id, Uint_0);
6960 end Init_Esize;
6962 procedure Init_Esize (Id : E; V : Int) is
6963 begin
6964 Set_Uint12 (Id, UI_From_Int (V));
6965 end Init_Esize;
6967 procedure Init_Normalized_First_Bit (Id : E) is
6968 begin
6969 Set_Uint8 (Id, No_Uint);
6970 end Init_Normalized_First_Bit;
6972 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6973 begin
6974 Set_Uint8 (Id, UI_From_Int (V));
6975 end Init_Normalized_First_Bit;
6977 procedure Init_Normalized_Position (Id : E) is
6978 begin
6979 Set_Uint14 (Id, No_Uint);
6980 end Init_Normalized_Position;
6982 procedure Init_Normalized_Position (Id : E; V : Int) is
6983 begin
6984 Set_Uint14 (Id, UI_From_Int (V));
6985 end Init_Normalized_Position;
6987 procedure Init_Normalized_Position_Max (Id : E) is
6988 begin
6989 Set_Uint10 (Id, No_Uint);
6990 end Init_Normalized_Position_Max;
6992 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6993 begin
6994 Set_Uint10 (Id, UI_From_Int (V));
6995 end Init_Normalized_Position_Max;
6997 procedure Init_RM_Size (Id : E) is
6998 begin
6999 Set_Uint13 (Id, Uint_0);
7000 end Init_RM_Size;
7002 procedure Init_RM_Size (Id : E; V : Int) is
7003 begin
7004 Set_Uint13 (Id, UI_From_Int (V));
7005 end Init_RM_Size;
7007 -----------------------------
7008 -- Init_Component_Location --
7009 -----------------------------
7011 procedure Init_Component_Location (Id : E) is
7012 begin
7013 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
7014 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
7015 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
7016 Set_Uint12 (Id, Uint_0); -- Esize
7017 Set_Uint14 (Id, No_Uint); -- Normalized_Position
7018 end Init_Component_Location;
7020 ----------------------------
7021 -- Init_Object_Size_Align --
7022 ----------------------------
7024 procedure Init_Object_Size_Align (Id : E) is
7025 begin
7026 Set_Uint12 (Id, Uint_0); -- Esize
7027 Set_Uint14 (Id, Uint_0); -- Alignment
7028 end Init_Object_Size_Align;
7030 ---------------
7031 -- Init_Size --
7032 ---------------
7034 procedure Init_Size (Id : E; V : Int) is
7035 begin
7036 pragma Assert (not Is_Object (Id));
7037 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
7038 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
7039 end Init_Size;
7041 ---------------------
7042 -- Init_Size_Align --
7043 ---------------------
7045 procedure Init_Size_Align (Id : E) is
7046 begin
7047 pragma Assert (not Is_Object (Id));
7048 Set_Uint12 (Id, Uint_0); -- Esize
7049 Set_Uint13 (Id, Uint_0); -- RM_Size
7050 Set_Uint14 (Id, Uint_0); -- Alignment
7051 end Init_Size_Align;
7053 ----------------------------------------------
7054 -- Type Representation Attribute Predicates --
7055 ----------------------------------------------
7057 function Known_Alignment (E : Entity_Id) return B is
7058 begin
7059 return Uint14 (E) /= Uint_0
7060 and then Uint14 (E) /= No_Uint;
7061 end Known_Alignment;
7063 function Known_Component_Bit_Offset (E : Entity_Id) return B is
7064 begin
7065 return Uint11 (E) /= No_Uint;
7066 end Known_Component_Bit_Offset;
7068 function Known_Component_Size (E : Entity_Id) return B is
7069 begin
7070 return Uint22 (Base_Type (E)) /= Uint_0
7071 and then Uint22 (Base_Type (E)) /= No_Uint;
7072 end Known_Component_Size;
7074 function Known_Esize (E : Entity_Id) return B is
7075 begin
7076 return Uint12 (E) /= Uint_0
7077 and then Uint12 (E) /= No_Uint;
7078 end Known_Esize;
7080 function Known_Normalized_First_Bit (E : Entity_Id) return B is
7081 begin
7082 return Uint8 (E) /= No_Uint;
7083 end Known_Normalized_First_Bit;
7085 function Known_Normalized_Position (E : Entity_Id) return B is
7086 begin
7087 return Uint14 (E) /= No_Uint;
7088 end Known_Normalized_Position;
7090 function Known_Normalized_Position_Max (E : Entity_Id) return B is
7091 begin
7092 return Uint10 (E) /= No_Uint;
7093 end Known_Normalized_Position_Max;
7095 function Known_RM_Size (E : Entity_Id) return B is
7096 begin
7097 return Uint13 (E) /= No_Uint
7098 and then (Uint13 (E) /= Uint_0
7099 or else Is_Discrete_Type (E)
7100 or else Is_Fixed_Point_Type (E));
7101 end Known_RM_Size;
7103 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
7104 begin
7105 return Uint11 (E) /= No_Uint
7106 and then Uint11 (E) >= Uint_0;
7107 end Known_Static_Component_Bit_Offset;
7109 function Known_Static_Component_Size (E : Entity_Id) return B is
7110 begin
7111 return Uint22 (Base_Type (E)) > Uint_0;
7112 end Known_Static_Component_Size;
7114 function Known_Static_Esize (E : Entity_Id) return B is
7115 begin
7116 return Uint12 (E) > Uint_0
7117 and then not Is_Generic_Type (E);
7118 end Known_Static_Esize;
7120 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
7121 begin
7122 return Uint8 (E) /= No_Uint
7123 and then Uint8 (E) >= Uint_0;
7124 end Known_Static_Normalized_First_Bit;
7126 function Known_Static_Normalized_Position (E : Entity_Id) return B is
7127 begin
7128 return Uint14 (E) /= No_Uint
7129 and then Uint14 (E) >= Uint_0;
7130 end Known_Static_Normalized_Position;
7132 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
7133 begin
7134 return Uint10 (E) /= No_Uint
7135 and then Uint10 (E) >= Uint_0;
7136 end Known_Static_Normalized_Position_Max;
7138 function Known_Static_RM_Size (E : Entity_Id) return B is
7139 begin
7140 return (Uint13 (E) > Uint_0
7141 or else Is_Discrete_Type (E)
7142 or else Is_Fixed_Point_Type (E))
7143 and then not Is_Generic_Type (E);
7144 end Known_Static_RM_Size;
7146 function Unknown_Alignment (E : Entity_Id) return B is
7147 begin
7148 return Uint14 (E) = Uint_0
7149 or else Uint14 (E) = No_Uint;
7150 end Unknown_Alignment;
7152 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
7153 begin
7154 return Uint11 (E) = No_Uint;
7155 end Unknown_Component_Bit_Offset;
7157 function Unknown_Component_Size (E : Entity_Id) return B is
7158 begin
7159 return Uint22 (Base_Type (E)) = Uint_0
7160 or else
7161 Uint22 (Base_Type (E)) = No_Uint;
7162 end Unknown_Component_Size;
7164 function Unknown_Esize (E : Entity_Id) return B is
7165 begin
7166 return Uint12 (E) = No_Uint
7167 or else
7168 Uint12 (E) = Uint_0;
7169 end Unknown_Esize;
7171 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
7172 begin
7173 return Uint8 (E) = No_Uint;
7174 end Unknown_Normalized_First_Bit;
7176 function Unknown_Normalized_Position (E : Entity_Id) return B is
7177 begin
7178 return Uint14 (E) = No_Uint;
7179 end Unknown_Normalized_Position;
7181 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
7182 begin
7183 return Uint10 (E) = No_Uint;
7184 end Unknown_Normalized_Position_Max;
7186 function Unknown_RM_Size (E : Entity_Id) return B is
7187 begin
7188 return (Uint13 (E) = Uint_0
7189 and then not Is_Discrete_Type (E)
7190 and then not Is_Fixed_Point_Type (E))
7191 or else Uint13 (E) = No_Uint;
7192 end Unknown_RM_Size;
7194 --------------------
7195 -- Address_Clause --
7196 --------------------
7198 function Address_Clause (Id : E) return N is
7199 begin
7200 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
7201 end Address_Clause;
7203 ---------------
7204 -- Aft_Value --
7205 ---------------
7207 function Aft_Value (Id : E) return U is
7208 Result : Nat := 1;
7209 Delta_Val : Ureal := Delta_Value (Id);
7210 begin
7211 while Delta_Val < Ureal_Tenth loop
7212 Delta_Val := Delta_Val * Ureal_10;
7213 Result := Result + 1;
7214 end loop;
7216 return UI_From_Int (Result);
7217 end Aft_Value;
7219 ----------------------
7220 -- Alignment_Clause --
7221 ----------------------
7223 function Alignment_Clause (Id : E) return N is
7224 begin
7225 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
7226 end Alignment_Clause;
7228 -------------------
7229 -- Append_Entity --
7230 -------------------
7232 procedure Append_Entity (Id : Entity_Id; Scop : Entity_Id) is
7233 Last : constant Entity_Id := Last_Entity (Scop);
7235 begin
7236 Set_Scope (Id, Scop);
7237 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
7239 -- The entity chain is empty
7241 if No (Last) then
7242 Set_First_Entity (Scop, Id);
7244 -- Otherwise the entity chain has at least one element
7246 else
7247 Link_Entities (Last, Id); -- Last <-- Id, Last --> Id
7248 end if;
7250 -- NOTE: The setting of the Next_Entity attribute of Id must happen
7251 -- here as opposed to at the beginning of the routine because doing
7252 -- so causes the binder to hang. It is not clear why ???
7254 Set_Next_Entity (Id, Empty); -- Id --> Empty
7256 Set_Last_Entity (Scop, Id);
7257 end Append_Entity;
7259 ---------------
7260 -- Base_Type --
7261 ---------------
7263 function Base_Type (Id : E) return E is
7264 begin
7265 if Is_Base_Type (Id) then
7266 return Id;
7267 else
7268 pragma Assert (Is_Type (Id));
7269 return Etype (Id);
7270 end if;
7271 end Base_Type;
7273 -------------------------
7274 -- Component_Alignment --
7275 -------------------------
7277 -- Component Alignment is encoded using two flags, Flag128/129 as
7278 -- follows. Note that both flags False = Align_Default, so that the
7279 -- default initialization of flags to False initializes component
7280 -- alignment to the default value as required.
7282 -- Flag128 Flag129 Value
7283 -- ------- ------- -----
7284 -- False False Calign_Default
7285 -- False True Calign_Component_Size
7286 -- True False Calign_Component_Size_4
7287 -- True True Calign_Storage_Unit
7289 function Component_Alignment (Id : E) return C is
7290 BT : constant Node_Id := Base_Type (Id);
7292 begin
7293 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
7295 if Flag128 (BT) then
7296 if Flag129 (BT) then
7297 return Calign_Storage_Unit;
7298 else
7299 return Calign_Component_Size_4;
7300 end if;
7302 else
7303 if Flag129 (BT) then
7304 return Calign_Component_Size;
7305 else
7306 return Calign_Default;
7307 end if;
7308 end if;
7309 end Component_Alignment;
7311 ----------------------
7312 -- Declaration_Node --
7313 ----------------------
7315 function Declaration_Node (Id : E) return N is
7316 P : Node_Id;
7318 begin
7319 if Ekind (Id) = E_Incomplete_Type
7320 and then Present (Full_View (Id))
7321 then
7322 P := Parent (Full_View (Id));
7323 else
7324 P := Parent (Id);
7325 end if;
7327 loop
7328 if Nkind_In (P, N_Selected_Component, N_Expanded_Name)
7329 or else (Nkind (P) = N_Defining_Program_Unit_Name
7330 and then Is_Child_Unit (Id))
7331 then
7332 P := Parent (P);
7333 else
7334 return P;
7335 end if;
7336 end loop;
7337 end Declaration_Node;
7339 ---------------------
7340 -- Designated_Type --
7341 ---------------------
7343 function Designated_Type (Id : E) return E is
7344 Desig_Type : E;
7346 begin
7347 Desig_Type := Directly_Designated_Type (Id);
7349 if Is_Incomplete_Type (Desig_Type)
7350 and then Present (Full_View (Desig_Type))
7351 then
7352 return Full_View (Desig_Type);
7354 elsif Is_Class_Wide_Type (Desig_Type)
7355 and then Is_Incomplete_Type (Etype (Desig_Type))
7356 and then Present (Full_View (Etype (Desig_Type)))
7357 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
7358 then
7359 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
7361 else
7362 return Desig_Type;
7363 end if;
7364 end Designated_Type;
7366 -------------------
7367 -- DIC_Procedure --
7368 -------------------
7370 function DIC_Procedure (Id : E) return E is
7371 Subp_Elmt : Elmt_Id;
7372 Subp_Id : Entity_Id;
7373 Subps : Elist_Id;
7375 begin
7376 pragma Assert (Is_Type (Id));
7378 Subps := Subprograms_For_Type (Base_Type (Id));
7380 if Present (Subps) then
7381 Subp_Elmt := First_Elmt (Subps);
7382 while Present (Subp_Elmt) loop
7383 Subp_Id := Node (Subp_Elmt);
7385 if Is_DIC_Procedure (Subp_Id) then
7386 return Subp_Id;
7387 end if;
7389 Next_Elmt (Subp_Elmt);
7390 end loop;
7391 end if;
7393 return Empty;
7394 end DIC_Procedure;
7396 ----------------------
7397 -- Entry_Index_Type --
7398 ----------------------
7400 function Entry_Index_Type (Id : E) return N is
7401 begin
7402 pragma Assert (Ekind (Id) = E_Entry_Family);
7403 return Etype (Discrete_Subtype_Definition (Parent (Id)));
7404 end Entry_Index_Type;
7406 ---------------------
7407 -- First_Component --
7408 ---------------------
7410 function First_Component (Id : E) return E is
7411 Comp_Id : E;
7413 begin
7414 pragma Assert
7415 (Is_Concurrent_Type (Id)
7416 or else Is_Incomplete_Or_Private_Type (Id)
7417 or else Is_Record_Type (Id));
7419 Comp_Id := First_Entity (Id);
7420 while Present (Comp_Id) loop
7421 exit when Ekind (Comp_Id) = E_Component;
7422 Comp_Id := Next_Entity (Comp_Id);
7423 end loop;
7425 return Comp_Id;
7426 end First_Component;
7428 -------------------------------------
7429 -- First_Component_Or_Discriminant --
7430 -------------------------------------
7432 function First_Component_Or_Discriminant (Id : E) return E is
7433 Comp_Id : E;
7435 begin
7436 pragma Assert
7437 (Is_Concurrent_Type (Id)
7438 or else Is_Incomplete_Or_Private_Type (Id)
7439 or else Is_Record_Type (Id)
7440 or else Has_Discriminants (Id));
7442 Comp_Id := First_Entity (Id);
7443 while Present (Comp_Id) loop
7444 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7445 Comp_Id := Next_Entity (Comp_Id);
7446 end loop;
7448 return Comp_Id;
7449 end First_Component_Or_Discriminant;
7451 ------------------
7452 -- First_Formal --
7453 ------------------
7455 function First_Formal (Id : E) return E is
7456 Formal : E;
7458 begin
7459 pragma Assert
7460 (Is_Generic_Subprogram (Id)
7461 or else Is_Overloadable (Id)
7462 or else Ekind_In (Id, E_Entry_Family,
7463 E_Subprogram_Body,
7464 E_Subprogram_Type));
7466 if Ekind (Id) = E_Enumeration_Literal then
7467 return Empty;
7469 else
7470 Formal := First_Entity (Id);
7472 -- Deal with the common, non-generic case first
7474 if No (Formal) or else Is_Formal (Formal) then
7475 return Formal;
7476 end if;
7478 -- The first/next entity chain of a generic subprogram contains all
7479 -- generic formal parameters, followed by the formal parameters.
7481 if Is_Generic_Subprogram (Id) then
7482 while Present (Formal) and then not Is_Formal (Formal) loop
7483 Next_Entity (Formal);
7484 end loop;
7485 return Formal;
7486 else
7487 return Empty;
7488 end if;
7489 end if;
7490 end First_Formal;
7492 ------------------------------
7493 -- First_Formal_With_Extras --
7494 ------------------------------
7496 function First_Formal_With_Extras (Id : E) return E is
7497 Formal : E;
7499 begin
7500 pragma Assert
7501 (Is_Generic_Subprogram (Id)
7502 or else Is_Overloadable (Id)
7503 or else Ekind_In (Id, E_Entry_Family,
7504 E_Subprogram_Body,
7505 E_Subprogram_Type));
7507 if Ekind (Id) = E_Enumeration_Literal then
7508 return Empty;
7510 else
7511 Formal := First_Entity (Id);
7513 -- The first/next entity chain of a generic subprogram contains all
7514 -- generic formal parameters, followed by the formal parameters. Go
7515 -- directly to the parameters by skipping the formal part.
7517 if Is_Generic_Subprogram (Id) then
7518 while Present (Formal) and then not Is_Formal (Formal) loop
7519 Next_Entity (Formal);
7520 end loop;
7521 end if;
7523 if Present (Formal) and then Is_Formal (Formal) then
7524 return Formal;
7525 else
7526 return Extra_Formals (Id); -- Empty if no extra formals
7527 end if;
7528 end if;
7529 end First_Formal_With_Extras;
7531 -------------------------------------
7532 -- Get_Attribute_Definition_Clause --
7533 -------------------------------------
7535 function Get_Attribute_Definition_Clause
7536 (E : Entity_Id;
7537 Id : Attribute_Id) return Node_Id
7539 N : Node_Id;
7541 begin
7542 N := First_Rep_Item (E);
7543 while Present (N) loop
7544 if Nkind (N) = N_Attribute_Definition_Clause
7545 and then Get_Attribute_Id (Chars (N)) = Id
7546 then
7547 return N;
7548 else
7549 Next_Rep_Item (N);
7550 end if;
7551 end loop;
7553 return Empty;
7554 end Get_Attribute_Definition_Clause;
7556 ---------------------------
7557 -- Get_Class_Wide_Pragma --
7558 ---------------------------
7560 function Get_Class_Wide_Pragma
7561 (E : Entity_Id;
7562 Id : Pragma_Id) return Node_Id
7564 Item : Node_Id;
7565 Items : Node_Id;
7567 begin
7568 Items := Contract (E);
7570 if No (Items) then
7571 return Empty;
7572 end if;
7574 Item := Pre_Post_Conditions (Items);
7575 while Present (Item) loop
7576 if Nkind (Item) = N_Pragma
7577 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7578 and then Class_Present (Item)
7579 then
7580 return Item;
7581 end if;
7583 Item := Next_Pragma (Item);
7584 end loop;
7586 return Empty;
7587 end Get_Class_Wide_Pragma;
7589 -------------------
7590 -- Get_Full_View --
7591 -------------------
7593 function Get_Full_View (T : Entity_Id) return Entity_Id is
7594 begin
7595 if Is_Incomplete_Type (T) and then Present (Full_View (T)) then
7596 return Full_View (T);
7598 elsif Is_Class_Wide_Type (T)
7599 and then Is_Incomplete_Type (Root_Type (T))
7600 and then Present (Full_View (Root_Type (T)))
7601 then
7602 return Class_Wide_Type (Full_View (Root_Type (T)));
7604 else
7605 return T;
7606 end if;
7607 end Get_Full_View;
7609 ----------------
7610 -- Get_Pragma --
7611 ----------------
7613 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
7615 -- Classification pragmas
7617 Is_CLS : constant Boolean :=
7618 Id = Pragma_Abstract_State or else
7619 Id = Pragma_Attach_Handler or else
7620 Id = Pragma_Async_Readers or else
7621 Id = Pragma_Async_Writers or else
7622 Id = Pragma_Constant_After_Elaboration or else
7623 Id = Pragma_Depends or else
7624 Id = Pragma_Effective_Reads or else
7625 Id = Pragma_Effective_Writes or else
7626 Id = Pragma_Extensions_Visible or else
7627 Id = Pragma_Global or else
7628 Id = Pragma_Initial_Condition or else
7629 Id = Pragma_Initializes or else
7630 Id = Pragma_Interrupt_Handler or else
7631 Id = Pragma_Part_Of or else
7632 Id = Pragma_Refined_Depends or else
7633 Id = Pragma_Refined_Global or else
7634 Id = Pragma_Refined_State or else
7635 Id = Pragma_Volatile_Function;
7637 -- Contract / test case pragmas
7639 Is_CTC : constant Boolean :=
7640 Id = Pragma_Contract_Cases or else
7641 Id = Pragma_Test_Case;
7643 -- Pre / postcondition pragmas
7645 Is_PPC : constant Boolean :=
7646 Id = Pragma_Precondition or else
7647 Id = Pragma_Postcondition or else
7648 Id = Pragma_Refined_Post;
7650 In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC;
7652 Item : Node_Id;
7653 Items : Node_Id;
7655 begin
7656 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7657 -- extracted from their specialized list.
7659 if In_Contract then
7660 Items := Contract (E);
7662 if No (Items) then
7663 return Empty;
7665 elsif Is_CLS then
7666 Item := Classifications (Items);
7668 elsif Is_CTC then
7669 Item := Contract_Test_Cases (Items);
7671 else
7672 Item := Pre_Post_Conditions (Items);
7673 end if;
7675 -- Regular pragmas
7677 else
7678 Item := First_Rep_Item (E);
7679 end if;
7681 while Present (Item) loop
7682 if Nkind (Item) = N_Pragma
7683 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7684 then
7685 return Item;
7687 -- All nodes in N_Contract are chained using Next_Pragma
7689 elsif In_Contract then
7690 Item := Next_Pragma (Item);
7692 -- Regular pragmas
7694 else
7695 Next_Rep_Item (Item);
7696 end if;
7697 end loop;
7699 return Empty;
7700 end Get_Pragma;
7702 --------------------------------------
7703 -- Get_Record_Representation_Clause --
7704 --------------------------------------
7706 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7707 N : Node_Id;
7709 begin
7710 N := First_Rep_Item (E);
7711 while Present (N) loop
7712 if Nkind (N) = N_Record_Representation_Clause then
7713 return N;
7714 end if;
7716 Next_Rep_Item (N);
7717 end loop;
7719 return Empty;
7720 end Get_Record_Representation_Clause;
7722 ------------------------
7723 -- Has_Attach_Handler --
7724 ------------------------
7726 function Has_Attach_Handler (Id : E) return B is
7727 Ritem : Node_Id;
7729 begin
7730 pragma Assert (Is_Protected_Type (Id));
7732 Ritem := First_Rep_Item (Id);
7733 while Present (Ritem) loop
7734 if Nkind (Ritem) = N_Pragma
7735 and then Pragma_Name (Ritem) = Name_Attach_Handler
7736 then
7737 return True;
7738 else
7739 Next_Rep_Item (Ritem);
7740 end if;
7741 end loop;
7743 return False;
7744 end Has_Attach_Handler;
7746 -------------
7747 -- Has_DIC --
7748 -------------
7750 function Has_DIC (Id : E) return B is
7751 begin
7752 return Has_Own_DIC (Id) or else Has_Inherited_DIC (Id);
7753 end Has_DIC;
7755 -----------------
7756 -- Has_Entries --
7757 -----------------
7759 function Has_Entries (Id : E) return B is
7760 Ent : Entity_Id;
7762 begin
7763 pragma Assert (Is_Concurrent_Type (Id));
7765 Ent := First_Entity (Id);
7766 while Present (Ent) loop
7767 if Is_Entry (Ent) then
7768 return True;
7769 end if;
7771 Ent := Next_Entity (Ent);
7772 end loop;
7774 return False;
7775 end Has_Entries;
7777 ----------------------------
7778 -- Has_Foreign_Convention --
7779 ----------------------------
7781 function Has_Foreign_Convention (Id : E) return B is
7782 begin
7783 -- While regular Intrinsics such as the Standard operators fit in the
7784 -- "Ada" convention, those with an Interface_Name materialize GCC
7785 -- builtin imports for which Ada special treatments shouldn't apply.
7787 return Convention (Id) in Foreign_Convention
7788 or else (Convention (Id) = Convention_Intrinsic
7789 and then Present (Interface_Name (Id)));
7790 end Has_Foreign_Convention;
7792 ---------------------------
7793 -- Has_Interrupt_Handler --
7794 ---------------------------
7796 function Has_Interrupt_Handler (Id : E) return B is
7797 Ritem : Node_Id;
7799 begin
7800 pragma Assert (Is_Protected_Type (Id));
7802 Ritem := First_Rep_Item (Id);
7803 while Present (Ritem) loop
7804 if Nkind (Ritem) = N_Pragma
7805 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7806 then
7807 return True;
7808 else
7809 Next_Rep_Item (Ritem);
7810 end if;
7811 end loop;
7813 return False;
7814 end Has_Interrupt_Handler;
7816 --------------------
7817 -- Has_Invariants --
7818 --------------------
7820 function Has_Invariants (Id : E) return B is
7821 begin
7822 return Has_Own_Invariants (Id) or else Has_Inherited_Invariants (Id);
7823 end Has_Invariants;
7825 --------------------------
7826 -- Has_Non_Limited_View --
7827 --------------------------
7829 function Has_Non_Limited_View (Id : E) return B is
7830 begin
7831 return (Ekind (Id) in Incomplete_Kind
7832 or else Ekind (Id) in Class_Wide_Kind
7833 or else Ekind (Id) = E_Abstract_State)
7834 and then Present (Non_Limited_View (Id));
7835 end Has_Non_Limited_View;
7837 ---------------------------------
7838 -- Has_Non_Null_Abstract_State --
7839 ---------------------------------
7841 function Has_Non_Null_Abstract_State (Id : E) return B is
7842 begin
7843 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7845 return
7846 Present (Abstract_States (Id))
7847 and then
7848 not Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7849 end Has_Non_Null_Abstract_State;
7851 -------------------------------------
7852 -- Has_Non_Null_Visible_Refinement --
7853 -------------------------------------
7855 function Has_Non_Null_Visible_Refinement (Id : E) return B is
7856 Constits : Elist_Id;
7858 begin
7859 -- "Refinement" is a concept applicable only to abstract states
7861 pragma Assert (Ekind (Id) = E_Abstract_State);
7862 Constits := Refinement_Constituents (Id);
7864 -- A partial refinement is always non-null. For a full refinement to be
7865 -- non-null, the first constituent must be anything other than null.
7867 return
7868 Has_Partial_Visible_Refinement (Id)
7869 or else (Has_Visible_Refinement (Id)
7870 and then Present (Constits)
7871 and then Nkind (Node (First_Elmt (Constits))) /= N_Null);
7872 end Has_Non_Null_Visible_Refinement;
7874 -----------------------------
7875 -- Has_Null_Abstract_State --
7876 -----------------------------
7878 function Has_Null_Abstract_State (Id : E) return B is
7879 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7881 States : constant Elist_Id := Abstract_States (Id);
7883 begin
7884 -- Check first available state of related package. A null abstract
7885 -- state always appears as the sole element of the state list.
7887 return
7888 Present (States)
7889 and then Is_Null_State (Node (First_Elmt (States)));
7890 end Has_Null_Abstract_State;
7892 ---------------------------------
7893 -- Has_Null_Visible_Refinement --
7894 ---------------------------------
7896 function Has_Null_Visible_Refinement (Id : E) return B is
7897 Constits : Elist_Id;
7899 begin
7900 -- "Refinement" is a concept applicable only to abstract states
7902 pragma Assert (Ekind (Id) = E_Abstract_State);
7903 Constits := Refinement_Constituents (Id);
7905 -- For a refinement to be null, the state's sole constituent must be a
7906 -- null.
7908 return
7909 Has_Visible_Refinement (Id)
7910 and then Present (Constits)
7911 and then Nkind (Node (First_Elmt (Constits))) = N_Null;
7912 end Has_Null_Visible_Refinement;
7914 --------------------
7915 -- Has_Unmodified --
7916 --------------------
7918 function Has_Unmodified (E : Entity_Id) return Boolean is
7919 begin
7920 if Has_Pragma_Unmodified (E) then
7921 return True;
7922 elsif Warnings_Off (E) then
7923 Set_Warnings_Off_Used_Unmodified (E);
7924 return True;
7925 else
7926 return False;
7927 end if;
7928 end Has_Unmodified;
7930 ---------------------
7931 -- Has_Unreferenced --
7932 ---------------------
7934 function Has_Unreferenced (E : Entity_Id) return Boolean is
7935 begin
7936 if Has_Pragma_Unreferenced (E) then
7937 return True;
7938 elsif Warnings_Off (E) then
7939 Set_Warnings_Off_Used_Unreferenced (E);
7940 return True;
7941 else
7942 return False;
7943 end if;
7944 end Has_Unreferenced;
7946 ----------------------
7947 -- Has_Warnings_Off --
7948 ----------------------
7950 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7951 begin
7952 if Warnings_Off (E) then
7953 Set_Warnings_Off_Used (E);
7954 return True;
7955 else
7956 return False;
7957 end if;
7958 end Has_Warnings_Off;
7960 ------------------------------
7961 -- Implementation_Base_Type --
7962 ------------------------------
7964 function Implementation_Base_Type (Id : E) return E is
7965 Bastyp : Entity_Id;
7966 Imptyp : Entity_Id;
7968 begin
7969 Bastyp := Base_Type (Id);
7971 if Is_Incomplete_Or_Private_Type (Bastyp) then
7972 Imptyp := Underlying_Type (Bastyp);
7974 -- If we have an implementation type, then just return it,
7975 -- otherwise we return the Base_Type anyway. This can only
7976 -- happen in error situations and should avoid some error bombs.
7978 if Present (Imptyp) then
7979 return Base_Type (Imptyp);
7980 else
7981 return Bastyp;
7982 end if;
7984 else
7985 return Bastyp;
7986 end if;
7987 end Implementation_Base_Type;
7989 -------------------------
7990 -- Invariant_Procedure --
7991 -------------------------
7993 function Invariant_Procedure (Id : E) return E is
7994 Subp_Elmt : Elmt_Id;
7995 Subp_Id : Entity_Id;
7996 Subps : Elist_Id;
7998 begin
7999 pragma Assert (Is_Type (Id));
8001 Subps := Subprograms_For_Type (Base_Type (Id));
8003 if Present (Subps) then
8004 Subp_Elmt := First_Elmt (Subps);
8005 while Present (Subp_Elmt) loop
8006 Subp_Id := Node (Subp_Elmt);
8008 if Is_Invariant_Procedure (Subp_Id) then
8009 return Subp_Id;
8010 end if;
8012 Next_Elmt (Subp_Elmt);
8013 end loop;
8014 end if;
8016 return Empty;
8017 end Invariant_Procedure;
8019 ----------------------
8020 -- Is_Atomic_Or_VFA --
8021 ----------------------
8023 function Is_Atomic_Or_VFA (Id : E) return B is
8024 begin
8025 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
8026 end Is_Atomic_Or_VFA;
8028 ------------------
8029 -- Is_Base_Type --
8030 ------------------
8032 -- Global flag table allowing rapid computation of this function
8034 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
8035 (E_Enumeration_Subtype |
8036 E_Incomplete_Subtype |
8037 E_Signed_Integer_Subtype |
8038 E_Modular_Integer_Subtype |
8039 E_Floating_Point_Subtype |
8040 E_Ordinary_Fixed_Point_Subtype |
8041 E_Decimal_Fixed_Point_Subtype |
8042 E_Array_Subtype |
8043 E_Record_Subtype |
8044 E_Private_Subtype |
8045 E_Record_Subtype_With_Private |
8046 E_Limited_Private_Subtype |
8047 E_Access_Subtype |
8048 E_Protected_Subtype |
8049 E_Task_Subtype |
8050 E_String_Literal_Subtype |
8051 E_Class_Wide_Subtype => False,
8052 others => True);
8054 function Is_Base_Type (Id : E) return Boolean is
8055 begin
8056 return Entity_Is_Base_Type (Ekind (Id));
8057 end Is_Base_Type;
8059 ---------------------
8060 -- Is_Boolean_Type --
8061 ---------------------
8063 function Is_Boolean_Type (Id : E) return B is
8064 begin
8065 return Root_Type (Id) = Standard_Boolean;
8066 end Is_Boolean_Type;
8068 ------------------------
8069 -- Is_Constant_Object --
8070 ------------------------
8072 function Is_Constant_Object (Id : E) return B is
8073 K : constant Entity_Kind := Ekind (Id);
8074 begin
8075 return
8076 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
8077 end Is_Constant_Object;
8079 -------------------
8080 -- Is_Controlled --
8081 -------------------
8083 function Is_Controlled (Id : E) return B is
8084 begin
8085 return Is_Controlled_Active (Id) and then not Disable_Controlled (Id);
8086 end Is_Controlled;
8088 --------------------
8089 -- Is_Discriminal --
8090 --------------------
8092 function Is_Discriminal (Id : E) return B is
8093 begin
8094 return (Ekind_In (Id, E_Constant, E_In_Parameter)
8095 and then Present (Discriminal_Link (Id)));
8096 end Is_Discriminal;
8098 ----------------------
8099 -- Is_Dynamic_Scope --
8100 ----------------------
8102 function Is_Dynamic_Scope (Id : E) return B is
8103 begin
8104 return
8105 Ekind (Id) = E_Block
8106 or else
8107 Ekind (Id) = E_Function
8108 or else
8109 Ekind (Id) = E_Procedure
8110 or else
8111 Ekind (Id) = E_Subprogram_Body
8112 or else
8113 Ekind (Id) = E_Task_Type
8114 or else
8115 (Ekind (Id) = E_Limited_Private_Type
8116 and then Present (Full_View (Id))
8117 and then Ekind (Full_View (Id)) = E_Task_Type)
8118 or else
8119 Ekind (Id) = E_Entry
8120 or else
8121 Ekind (Id) = E_Entry_Family
8122 or else
8123 Ekind (Id) = E_Return_Statement;
8124 end Is_Dynamic_Scope;
8126 --------------------
8127 -- Is_Entity_Name --
8128 --------------------
8130 function Is_Entity_Name (N : Node_Id) return Boolean is
8131 Kind : constant Node_Kind := Nkind (N);
8133 begin
8134 -- Identifiers, operator symbols, expanded names are entity names
8136 return Kind = N_Identifier
8137 or else Kind = N_Operator_Symbol
8138 or else Kind = N_Expanded_Name
8140 -- Attribute references are entity names if they refer to an entity.
8141 -- Note that we don't do this by testing for the presence of the
8142 -- Entity field in the N_Attribute_Reference node, since it may not
8143 -- have been set yet.
8145 or else (Kind = N_Attribute_Reference
8146 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
8147 end Is_Entity_Name;
8149 ---------------------------
8150 -- Is_Elaboration_Target --
8151 ---------------------------
8153 function Is_Elaboration_Target (Id : Entity_Id) return Boolean is
8154 begin
8155 return
8156 Ekind_In (Id, E_Constant, E_Variable)
8157 or else Is_Entry (Id)
8158 or else Is_Generic_Unit (Id)
8159 or else Is_Subprogram (Id)
8160 or else Is_Task_Type (Id);
8161 end Is_Elaboration_Target;
8163 -----------------------
8164 -- Is_External_State --
8165 -----------------------
8167 function Is_External_State (Id : E) return B is
8168 begin
8169 -- To qualify, the abstract state must appear with option "external" or
8170 -- "synchronous" (SPARK RM 7.1.4(8) and (10)).
8172 return
8173 Ekind (Id) = E_Abstract_State
8174 and then (Has_Option (Id, Name_External)
8175 or else
8176 Has_Option (Id, Name_Synchronous));
8177 end Is_External_State;
8179 ------------------
8180 -- Is_Finalizer --
8181 ------------------
8183 function Is_Finalizer (Id : E) return B is
8184 begin
8185 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
8186 end Is_Finalizer;
8188 -------------------
8189 -- Is_Null_State --
8190 -------------------
8192 function Is_Null_State (Id : E) return B is
8193 begin
8194 return
8195 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
8196 end Is_Null_State;
8198 ---------------------
8199 -- Is_Packed_Array --
8200 ---------------------
8202 function Is_Packed_Array (Id : E) return B is
8203 begin
8204 return Is_Array_Type (Id) and then Is_Packed (Id);
8205 end Is_Packed_Array;
8207 -----------------------------------
8208 -- Is_Package_Or_Generic_Package --
8209 -----------------------------------
8211 function Is_Package_Or_Generic_Package (Id : E) return B is
8212 begin
8213 return Ekind_In (Id, E_Generic_Package, E_Package);
8214 end Is_Package_Or_Generic_Package;
8216 ---------------
8217 -- Is_Prival --
8218 ---------------
8220 function Is_Prival (Id : E) return B is
8221 begin
8222 return (Ekind_In (Id, E_Constant, E_Variable)
8223 and then Present (Prival_Link (Id)));
8224 end Is_Prival;
8226 ----------------------------
8227 -- Is_Protected_Component --
8228 ----------------------------
8230 function Is_Protected_Component (Id : E) return B is
8231 begin
8232 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
8233 end Is_Protected_Component;
8235 ----------------------------
8236 -- Is_Protected_Interface --
8237 ----------------------------
8239 function Is_Protected_Interface (Id : E) return B is
8240 Typ : constant Entity_Id := Base_Type (Id);
8241 begin
8242 if not Is_Interface (Typ) then
8243 return False;
8244 elsif Is_Class_Wide_Type (Typ) then
8245 return Is_Protected_Interface (Etype (Typ));
8246 else
8247 return Protected_Present (Type_Definition (Parent (Typ)));
8248 end if;
8249 end Is_Protected_Interface;
8251 ------------------------------
8252 -- Is_Protected_Record_Type --
8253 ------------------------------
8255 function Is_Protected_Record_Type (Id : E) return B is
8256 begin
8257 return
8258 Is_Concurrent_Record_Type (Id)
8259 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
8260 end Is_Protected_Record_Type;
8262 --------------------------------
8263 -- Is_Standard_Character_Type --
8264 --------------------------------
8266 function Is_Standard_Character_Type (Id : E) return B is
8267 begin
8268 if Is_Type (Id) then
8269 declare
8270 R : constant Entity_Id := Root_Type (Id);
8271 begin
8272 return
8273 R = Standard_Character
8274 or else
8275 R = Standard_Wide_Character
8276 or else
8277 R = Standard_Wide_Wide_Character;
8278 end;
8280 else
8281 return False;
8282 end if;
8283 end Is_Standard_Character_Type;
8285 -----------------------------
8286 -- Is_Standard_String_Type --
8287 -----------------------------
8289 function Is_Standard_String_Type (Id : E) return B is
8290 begin
8291 if Is_Type (Id) then
8292 declare
8293 R : constant Entity_Id := Root_Type (Id);
8294 begin
8295 return
8296 R = Standard_String
8297 or else
8298 R = Standard_Wide_String
8299 or else
8300 R = Standard_Wide_Wide_String;
8301 end;
8303 else
8304 return False;
8305 end if;
8306 end Is_Standard_String_Type;
8308 --------------------
8309 -- Is_String_Type --
8310 --------------------
8312 function Is_String_Type (Id : E) return B is
8313 begin
8314 return Is_Array_Type (Id)
8315 and then Id /= Any_Composite
8316 and then Number_Dimensions (Id) = 1
8317 and then Is_Character_Type (Component_Type (Id));
8318 end Is_String_Type;
8320 -------------------------------
8321 -- Is_Synchronized_Interface --
8322 -------------------------------
8324 function Is_Synchronized_Interface (Id : E) return B is
8325 Typ : constant Entity_Id := Base_Type (Id);
8327 begin
8328 if not Is_Interface (Typ) then
8329 return False;
8331 elsif Is_Class_Wide_Type (Typ) then
8332 return Is_Synchronized_Interface (Etype (Typ));
8334 else
8335 return Protected_Present (Type_Definition (Parent (Typ)))
8336 or else Synchronized_Present (Type_Definition (Parent (Typ)))
8337 or else Task_Present (Type_Definition (Parent (Typ)));
8338 end if;
8339 end Is_Synchronized_Interface;
8341 ---------------------------
8342 -- Is_Synchronized_State --
8343 ---------------------------
8345 function Is_Synchronized_State (Id : E) return B is
8346 begin
8347 -- To qualify, the abstract state must appear with simple option
8348 -- "synchronous" (SPARK RM 7.1.4(10)).
8350 return
8351 Ekind (Id) = E_Abstract_State
8352 and then Has_Option (Id, Name_Synchronous);
8353 end Is_Synchronized_State;
8355 -----------------------
8356 -- Is_Task_Interface --
8357 -----------------------
8359 function Is_Task_Interface (Id : E) return B is
8360 Typ : constant Entity_Id := Base_Type (Id);
8361 begin
8362 if not Is_Interface (Typ) then
8363 return False;
8364 elsif Is_Class_Wide_Type (Typ) then
8365 return Is_Task_Interface (Etype (Typ));
8366 else
8367 return Task_Present (Type_Definition (Parent (Typ)));
8368 end if;
8369 end Is_Task_Interface;
8371 -------------------------
8372 -- Is_Task_Record_Type --
8373 -------------------------
8375 function Is_Task_Record_Type (Id : E) return B is
8376 begin
8377 return
8378 Is_Concurrent_Record_Type (Id)
8379 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
8380 end Is_Task_Record_Type;
8382 ------------------------
8383 -- Is_Wrapper_Package --
8384 ------------------------
8386 function Is_Wrapper_Package (Id : E) return B is
8387 begin
8388 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
8389 end Is_Wrapper_Package;
8391 -----------------
8392 -- Last_Formal --
8393 -----------------
8395 function Last_Formal (Id : E) return E is
8396 Formal : E;
8398 begin
8399 pragma Assert
8400 (Is_Overloadable (Id)
8401 or else Ekind_In (Id, E_Entry_Family,
8402 E_Subprogram_Body,
8403 E_Subprogram_Type));
8405 if Ekind (Id) = E_Enumeration_Literal then
8406 return Empty;
8408 else
8409 Formal := First_Formal (Id);
8411 if Present (Formal) then
8412 while Present (Next_Formal (Formal)) loop
8413 Formal := Next_Formal (Formal);
8414 end loop;
8415 end if;
8417 return Formal;
8418 end if;
8419 end Last_Formal;
8421 -------------------
8422 -- Link_Entities --
8423 -------------------
8425 procedure Link_Entities (First : Entity_Id; Second : Node_Id) is
8426 begin
8427 if Present (Second) then
8428 Set_Prev_Entity (Second, First); -- First <-- Second
8429 end if;
8431 Set_Next_Entity (First, Second); -- First --> Second
8432 end Link_Entities;
8434 ----------------------
8435 -- Model_Emin_Value --
8436 ----------------------
8438 function Model_Emin_Value (Id : E) return Uint is
8439 begin
8440 return Machine_Emin_Value (Id);
8441 end Model_Emin_Value;
8443 -------------------------
8444 -- Model_Epsilon_Value --
8445 -------------------------
8447 function Model_Epsilon_Value (Id : E) return Ureal is
8448 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8449 begin
8450 return Radix ** (1 - Model_Mantissa_Value (Id));
8451 end Model_Epsilon_Value;
8453 --------------------------
8454 -- Model_Mantissa_Value --
8455 --------------------------
8457 function Model_Mantissa_Value (Id : E) return Uint is
8458 begin
8459 return Machine_Mantissa_Value (Id);
8460 end Model_Mantissa_Value;
8462 -----------------------
8463 -- Model_Small_Value --
8464 -----------------------
8466 function Model_Small_Value (Id : E) return Ureal is
8467 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8468 begin
8469 return Radix ** (Model_Emin_Value (Id) - 1);
8470 end Model_Small_Value;
8472 ------------------------
8473 -- Machine_Emax_Value --
8474 ------------------------
8476 function Machine_Emax_Value (Id : E) return Uint is
8477 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8479 begin
8480 case Float_Rep (Id) is
8481 when IEEE_Binary =>
8482 case Digs is
8483 when 1 .. 6 => return Uint_128;
8484 when 7 .. 15 => return 2**10;
8485 when 16 .. 33 => return 2**14;
8486 when others => return No_Uint;
8487 end case;
8489 when AAMP =>
8490 return Uint_2 ** Uint_7 - Uint_1;
8491 end case;
8492 end Machine_Emax_Value;
8494 ------------------------
8495 -- Machine_Emin_Value --
8496 ------------------------
8498 function Machine_Emin_Value (Id : E) return Uint is
8499 begin
8500 case Float_Rep (Id) is
8501 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
8502 when AAMP => return -Machine_Emax_Value (Id);
8503 end case;
8504 end Machine_Emin_Value;
8506 ----------------------------
8507 -- Machine_Mantissa_Value --
8508 ----------------------------
8510 function Machine_Mantissa_Value (Id : E) return Uint is
8511 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8513 begin
8514 case Float_Rep (Id) is
8515 when IEEE_Binary =>
8516 case Digs is
8517 when 1 .. 6 => return Uint_24;
8518 when 7 .. 15 => return UI_From_Int (53);
8519 when 16 .. 18 => return Uint_64;
8520 when 19 .. 33 => return UI_From_Int (113);
8521 when others => return No_Uint;
8522 end case;
8524 when AAMP =>
8525 case Digs is
8526 when 1 .. 6 => return Uint_24;
8527 when 7 .. 9 => return UI_From_Int (40);
8528 when others => return No_Uint;
8529 end case;
8530 end case;
8531 end Machine_Mantissa_Value;
8533 -------------------------
8534 -- Machine_Radix_Value --
8535 -------------------------
8537 function Machine_Radix_Value (Id : E) return U is
8538 begin
8539 case Float_Rep (Id) is
8540 when AAMP
8541 | IEEE_Binary
8543 return Uint_2;
8544 end case;
8545 end Machine_Radix_Value;
8547 --------------------
8548 -- Next_Component --
8549 --------------------
8551 function Next_Component (Id : E) return E is
8552 Comp_Id : E;
8554 begin
8555 Comp_Id := Next_Entity (Id);
8556 while Present (Comp_Id) loop
8557 exit when Ekind (Comp_Id) = E_Component;
8558 Comp_Id := Next_Entity (Comp_Id);
8559 end loop;
8561 return Comp_Id;
8562 end Next_Component;
8564 ------------------------------------
8565 -- Next_Component_Or_Discriminant --
8566 ------------------------------------
8568 function Next_Component_Or_Discriminant (Id : E) return E is
8569 Comp_Id : E;
8571 begin
8572 Comp_Id := Next_Entity (Id);
8573 while Present (Comp_Id) loop
8574 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
8575 Comp_Id := Next_Entity (Comp_Id);
8576 end loop;
8578 return Comp_Id;
8579 end Next_Component_Or_Discriminant;
8581 -----------------------
8582 -- Next_Discriminant --
8583 -----------------------
8585 -- This function actually implements both Next_Discriminant and
8586 -- Next_Stored_Discriminant by making sure that the Discriminant
8587 -- returned is of the same variety as Id.
8589 function Next_Discriminant (Id : E) return E is
8591 -- Derived Tagged types with private extensions look like this...
8593 -- E_Discriminant d1
8594 -- E_Discriminant d2
8595 -- E_Component _tag
8596 -- E_Discriminant d1
8597 -- E_Discriminant d2
8598 -- ...
8600 -- so it is critical not to go past the leading discriminants
8602 D : E := Id;
8604 begin
8605 pragma Assert (Ekind (Id) = E_Discriminant);
8607 loop
8608 D := Next_Entity (D);
8609 if No (D)
8610 or else (Ekind (D) /= E_Discriminant
8611 and then not Is_Itype (D))
8612 then
8613 return Empty;
8614 end if;
8616 exit when Ekind (D) = E_Discriminant
8617 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
8618 end loop;
8620 return D;
8621 end Next_Discriminant;
8623 -----------------
8624 -- Next_Formal --
8625 -----------------
8627 function Next_Formal (Id : E) return E is
8628 P : E;
8630 begin
8631 -- Follow the chain of declared entities as long as the kind of the
8632 -- entity corresponds to a formal parameter. Skip internal entities
8633 -- that may have been created for implicit subtypes, in the process
8634 -- of analyzing default expressions.
8636 P := Id;
8637 loop
8638 Next_Entity (P);
8640 if No (P) or else Is_Formal (P) then
8641 return P;
8642 elsif not Is_Internal (P) then
8643 return Empty;
8644 end if;
8645 end loop;
8646 end Next_Formal;
8648 -----------------------------
8649 -- Next_Formal_With_Extras --
8650 -----------------------------
8652 function Next_Formal_With_Extras (Id : E) return E is
8653 begin
8654 if Present (Extra_Formal (Id)) then
8655 return Extra_Formal (Id);
8656 else
8657 return Next_Formal (Id);
8658 end if;
8659 end Next_Formal_With_Extras;
8661 ----------------
8662 -- Next_Index --
8663 ----------------
8665 function Next_Index (Id : Node_Id) return Node_Id is
8666 begin
8667 return Next (Id);
8668 end Next_Index;
8670 ------------------
8671 -- Next_Literal --
8672 ------------------
8674 function Next_Literal (Id : E) return E is
8675 begin
8676 pragma Assert (Nkind (Id) in N_Entity);
8677 return Next (Id);
8678 end Next_Literal;
8680 ------------------------------
8681 -- Next_Stored_Discriminant --
8682 ------------------------------
8684 function Next_Stored_Discriminant (Id : E) return E is
8685 begin
8686 -- See comment in Next_Discriminant
8688 return Next_Discriminant (Id);
8689 end Next_Stored_Discriminant;
8691 -----------------------
8692 -- Number_Dimensions --
8693 -----------------------
8695 function Number_Dimensions (Id : E) return Pos is
8696 N : Int;
8697 T : Node_Id;
8699 begin
8700 if Ekind (Id) = E_String_Literal_Subtype then
8701 return 1;
8703 else
8704 N := 0;
8705 T := First_Index (Id);
8706 while Present (T) loop
8707 N := N + 1;
8708 Next_Index (T);
8709 end loop;
8711 return N;
8712 end if;
8713 end Number_Dimensions;
8715 --------------------
8716 -- Number_Entries --
8717 --------------------
8719 function Number_Entries (Id : E) return Nat is
8720 N : Int;
8721 Ent : Entity_Id;
8723 begin
8724 pragma Assert (Is_Concurrent_Type (Id));
8726 N := 0;
8727 Ent := First_Entity (Id);
8728 while Present (Ent) loop
8729 if Is_Entry (Ent) then
8730 N := N + 1;
8731 end if;
8733 Ent := Next_Entity (Ent);
8734 end loop;
8736 return N;
8737 end Number_Entries;
8739 --------------------
8740 -- Number_Formals --
8741 --------------------
8743 function Number_Formals (Id : E) return Pos is
8744 N : Int;
8745 Formal : Entity_Id;
8747 begin
8748 N := 0;
8749 Formal := First_Formal (Id);
8750 while Present (Formal) loop
8751 N := N + 1;
8752 Formal := Next_Formal (Formal);
8753 end loop;
8755 return N;
8756 end Number_Formals;
8758 ------------------------
8759 -- Object_Size_Clause --
8760 ------------------------
8762 function Object_Size_Clause (Id : E) return N is
8763 begin
8764 return Get_Attribute_Definition_Clause (Id, Attribute_Object_Size);
8765 end Object_Size_Clause;
8767 --------------------
8768 -- Parameter_Mode --
8769 --------------------
8771 function Parameter_Mode (Id : E) return Formal_Kind is
8772 begin
8773 return Ekind (Id);
8774 end Parameter_Mode;
8776 ---------------------------------
8777 -- Partial_Invariant_Procedure --
8778 ---------------------------------
8780 function Partial_Invariant_Procedure (Id : E) return E is
8781 Subp_Elmt : Elmt_Id;
8782 Subp_Id : Entity_Id;
8783 Subps : Elist_Id;
8785 begin
8786 pragma Assert (Is_Type (Id));
8788 Subps := Subprograms_For_Type (Base_Type (Id));
8790 if Present (Subps) then
8791 Subp_Elmt := First_Elmt (Subps);
8792 while Present (Subp_Elmt) loop
8793 Subp_Id := Node (Subp_Elmt);
8795 if Is_Partial_Invariant_Procedure (Subp_Id) then
8796 return Subp_Id;
8797 end if;
8799 Next_Elmt (Subp_Elmt);
8800 end loop;
8801 end if;
8803 return Empty;
8804 end Partial_Invariant_Procedure;
8806 -------------------------------------
8807 -- Partial_Refinement_Constituents --
8808 -------------------------------------
8810 function Partial_Refinement_Constituents (Id : E) return L is
8811 Constits : Elist_Id := No_Elist;
8813 procedure Add_Usable_Constituents (Item : E);
8814 -- Add global item Item and/or its constituents to list Constits when
8815 -- they can be used in a global refinement within the current scope. The
8816 -- criteria are:
8817 -- 1) If Item is an abstract state with full refinement visible, add
8818 -- its constituents.
8819 -- 2) If Item is an abstract state with only partial refinement
8820 -- visible, add both Item and its constituents.
8821 -- 3) If Item is an abstract state without a visible refinement, add
8822 -- it.
8823 -- 4) If Id is not an abstract state, add it.
8825 procedure Add_Usable_Constituents (List : Elist_Id);
8826 -- Apply Add_Usable_Constituents to every constituent in List
8828 -----------------------------
8829 -- Add_Usable_Constituents --
8830 -----------------------------
8832 procedure Add_Usable_Constituents (Item : E) is
8833 begin
8834 if Ekind (Item) = E_Abstract_State then
8835 if Has_Visible_Refinement (Item) then
8836 Add_Usable_Constituents (Refinement_Constituents (Item));
8838 elsif Has_Partial_Visible_Refinement (Item) then
8839 Append_New_Elmt (Item, Constits);
8840 Add_Usable_Constituents (Part_Of_Constituents (Item));
8842 else
8843 Append_New_Elmt (Item, Constits);
8844 end if;
8846 else
8847 Append_New_Elmt (Item, Constits);
8848 end if;
8849 end Add_Usable_Constituents;
8851 procedure Add_Usable_Constituents (List : Elist_Id) is
8852 Constit_Elmt : Elmt_Id;
8853 begin
8854 if Present (List) then
8855 Constit_Elmt := First_Elmt (List);
8856 while Present (Constit_Elmt) loop
8857 Add_Usable_Constituents (Node (Constit_Elmt));
8858 Next_Elmt (Constit_Elmt);
8859 end loop;
8860 end if;
8861 end Add_Usable_Constituents;
8863 -- Start of processing for Partial_Refinement_Constituents
8865 begin
8866 -- "Refinement" is a concept applicable only to abstract states
8868 pragma Assert (Ekind (Id) = E_Abstract_State);
8870 if Has_Visible_Refinement (Id) then
8871 Constits := Refinement_Constituents (Id);
8873 -- A refinement may be partially visible when objects declared in the
8874 -- private part of a package are subject to a Part_Of indicator.
8876 elsif Has_Partial_Visible_Refinement (Id) then
8877 Add_Usable_Constituents (Part_Of_Constituents (Id));
8879 -- Function should only be called when full or partial refinement is
8880 -- visible.
8882 else
8883 raise Program_Error;
8884 end if;
8886 return Constits;
8887 end Partial_Refinement_Constituents;
8889 ------------------------
8890 -- Predicate_Function --
8891 ------------------------
8893 function Predicate_Function (Id : E) return E is
8894 Subp_Elmt : Elmt_Id;
8895 Subp_Id : Entity_Id;
8896 Subps : Elist_Id;
8897 Typ : Entity_Id;
8899 begin
8900 pragma Assert (Is_Type (Id));
8902 -- If type is private and has a completion, predicate may be defined on
8903 -- the full view.
8905 if Is_Private_Type (Id)
8906 and then
8907 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8908 and then Present (Full_View (Id))
8909 then
8910 Typ := Full_View (Id);
8912 elsif Ekind_In (Id, E_Array_Subtype,
8913 E_Record_Subtype,
8914 E_Record_Subtype_With_Private)
8915 and then Present (Predicated_Parent (Id))
8916 then
8917 Typ := Predicated_Parent (Id);
8919 else
8920 Typ := Id;
8921 end if;
8923 Subps := Subprograms_For_Type (Typ);
8925 if Present (Subps) then
8926 Subp_Elmt := First_Elmt (Subps);
8927 while Present (Subp_Elmt) loop
8928 Subp_Id := Node (Subp_Elmt);
8930 if Ekind (Subp_Id) = E_Function
8931 and then Is_Predicate_Function (Subp_Id)
8932 then
8933 return Subp_Id;
8934 end if;
8936 Next_Elmt (Subp_Elmt);
8937 end loop;
8938 end if;
8940 return Empty;
8941 end Predicate_Function;
8943 --------------------------
8944 -- Predicate_Function_M --
8945 --------------------------
8947 function Predicate_Function_M (Id : E) return E is
8948 Subp_Elmt : Elmt_Id;
8949 Subp_Id : Entity_Id;
8950 Subps : Elist_Id;
8951 Typ : Entity_Id;
8953 begin
8954 pragma Assert (Is_Type (Id));
8956 -- If type is private and has a completion, predicate may be defined on
8957 -- the full view.
8959 if Is_Private_Type (Id)
8960 and then
8961 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8962 and then Present (Full_View (Id))
8963 then
8964 Typ := Full_View (Id);
8966 else
8967 Typ := Id;
8968 end if;
8970 Subps := Subprograms_For_Type (Typ);
8972 if Present (Subps) then
8973 Subp_Elmt := First_Elmt (Subps);
8974 while Present (Subp_Elmt) loop
8975 Subp_Id := Node (Subp_Elmt);
8977 if Ekind (Subp_Id) = E_Function
8978 and then Is_Predicate_Function_M (Subp_Id)
8979 then
8980 return Subp_Id;
8981 end if;
8983 Next_Elmt (Subp_Elmt);
8984 end loop;
8985 end if;
8987 return Empty;
8988 end Predicate_Function_M;
8990 -------------------------
8991 -- Present_In_Rep_Item --
8992 -------------------------
8994 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8995 Ritem : Node_Id;
8997 begin
8998 Ritem := First_Rep_Item (E);
9000 while Present (Ritem) loop
9001 if Ritem = N then
9002 return True;
9003 end if;
9005 Next_Rep_Item (Ritem);
9006 end loop;
9008 return False;
9009 end Present_In_Rep_Item;
9011 --------------------------
9012 -- Primitive_Operations --
9013 --------------------------
9015 function Primitive_Operations (Id : E) return L is
9016 begin
9017 if Is_Concurrent_Type (Id) then
9018 if Present (Corresponding_Record_Type (Id)) then
9019 return Direct_Primitive_Operations
9020 (Corresponding_Record_Type (Id));
9022 -- If expansion is disabled the corresponding record type is absent,
9023 -- but if the type has ancestors it may have primitive operations.
9025 elsif Is_Tagged_Type (Id) then
9026 return Direct_Primitive_Operations (Id);
9028 else
9029 return No_Elist;
9030 end if;
9031 else
9032 return Direct_Primitive_Operations (Id);
9033 end if;
9034 end Primitive_Operations;
9036 ---------------------
9037 -- Record_Rep_Item --
9038 ---------------------
9040 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
9041 begin
9042 Set_Next_Rep_Item (N, First_Rep_Item (E));
9043 Set_First_Rep_Item (E, N);
9044 end Record_Rep_Item;
9046 -------------------
9047 -- Remove_Entity --
9048 -------------------
9050 procedure Remove_Entity (Id : Entity_Id) is
9051 Next : constant Entity_Id := Next_Entity (Id);
9052 Prev : constant Entity_Id := Prev_Entity (Id);
9053 Scop : constant Entity_Id := Scope (Id);
9054 First : constant Entity_Id := First_Entity (Scop);
9055 Last : constant Entity_Id := Last_Entity (Scop);
9057 begin
9058 -- Eliminate any existing linkages from the entity
9060 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
9061 Set_Next_Entity (Id, Empty); -- Id --> Empty
9063 -- The eliminated entity was the only element in the entity chain
9065 if Id = First and then Id = Last then
9066 Set_First_Entity (Scop, Empty);
9067 Set_Last_Entity (Scop, Empty);
9069 -- The eliminated entity was the head of the entity chain
9071 elsif Id = First then
9072 Set_First_Entity (Scop, Next);
9074 -- The eliminated entity was the tail of the entity chain
9076 elsif Id = Last then
9077 Set_Last_Entity (Scop, Prev);
9079 -- Otherwise the eliminated entity comes from the middle of the entity
9080 -- chain.
9082 else
9083 Link_Entities (Prev, Next); -- Prev <-- Next, Prev --> Next
9084 end if;
9085 end Remove_Entity;
9087 ---------------
9088 -- Root_Type --
9089 ---------------
9091 function Root_Type (Id : E) return E is
9092 T, Etyp : E;
9094 begin
9095 pragma Assert (Nkind (Id) in N_Entity);
9097 T := Base_Type (Id);
9099 if Ekind (T) = E_Class_Wide_Type then
9100 return Etype (T);
9102 -- Other cases
9104 else
9105 loop
9106 Etyp := Etype (T);
9108 if T = Etyp then
9109 return T;
9111 -- Following test catches some error cases resulting from
9112 -- previous errors.
9114 elsif No (Etyp) then
9115 Check_Error_Detected;
9116 return T;
9118 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
9119 return T;
9121 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
9122 return T;
9123 end if;
9125 T := Etyp;
9127 -- Return if there is a circularity in the inheritance chain. This
9128 -- happens in some error situations and we do not want to get
9129 -- stuck in this loop.
9131 if T = Base_Type (Id) then
9132 return T;
9133 end if;
9134 end loop;
9135 end if;
9136 end Root_Type;
9138 ---------------------
9139 -- Safe_Emax_Value --
9140 ---------------------
9142 function Safe_Emax_Value (Id : E) return Uint is
9143 begin
9144 return Machine_Emax_Value (Id);
9145 end Safe_Emax_Value;
9147 ----------------------
9148 -- Safe_First_Value --
9149 ----------------------
9151 function Safe_First_Value (Id : E) return Ureal is
9152 begin
9153 return -Safe_Last_Value (Id);
9154 end Safe_First_Value;
9156 ---------------------
9157 -- Safe_Last_Value --
9158 ---------------------
9160 function Safe_Last_Value (Id : E) return Ureal is
9161 Radix : constant Uint := Machine_Radix_Value (Id);
9162 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
9163 Emax : constant Uint := Safe_Emax_Value (Id);
9164 Significand : constant Uint := Radix ** Mantissa - 1;
9165 Exponent : constant Uint := Emax - Mantissa;
9167 begin
9168 if Radix = 2 then
9169 return
9170 UR_From_Components
9171 (Num => Significand * 2 ** (Exponent mod 4),
9172 Den => -Exponent / 4,
9173 Rbase => 16);
9174 else
9175 return
9176 UR_From_Components
9177 (Num => Significand,
9178 Den => -Exponent,
9179 Rbase => 16);
9180 end if;
9181 end Safe_Last_Value;
9183 -----------------
9184 -- Scope_Depth --
9185 -----------------
9187 function Scope_Depth (Id : E) return Uint is
9188 Scop : Entity_Id;
9190 begin
9191 Scop := Id;
9192 while Is_Record_Type (Scop) loop
9193 Scop := Scope (Scop);
9194 end loop;
9196 return Scope_Depth_Value (Scop);
9197 end Scope_Depth;
9199 ---------------------
9200 -- Scope_Depth_Set --
9201 ---------------------
9203 function Scope_Depth_Set (Id : E) return B is
9204 begin
9205 return not Is_Record_Type (Id)
9206 and then Field22 (Id) /= Union_Id (Empty);
9207 end Scope_Depth_Set;
9209 -----------------------------
9210 -- Set_Component_Alignment --
9211 -----------------------------
9213 -- Component Alignment is encoded using two flags, Flag128/129 as
9214 -- follows. Note that both flags False = Align_Default, so that the
9215 -- default initialization of flags to False initializes component
9216 -- alignment to the default value as required.
9218 -- Flag128 Flag129 Value
9219 -- ------- ------- -----
9220 -- False False Calign_Default
9221 -- False True Calign_Component_Size
9222 -- True False Calign_Component_Size_4
9223 -- True True Calign_Storage_Unit
9225 procedure Set_Component_Alignment (Id : E; V : C) is
9226 begin
9227 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
9228 and then Is_Base_Type (Id));
9230 case V is
9231 when Calign_Default =>
9232 Set_Flag128 (Id, False);
9233 Set_Flag129 (Id, False);
9235 when Calign_Component_Size =>
9236 Set_Flag128 (Id, False);
9237 Set_Flag129 (Id, True);
9239 when Calign_Component_Size_4 =>
9240 Set_Flag128 (Id, True);
9241 Set_Flag129 (Id, False);
9243 when Calign_Storage_Unit =>
9244 Set_Flag128 (Id, True);
9245 Set_Flag129 (Id, True);
9246 end case;
9247 end Set_Component_Alignment;
9249 -----------------------
9250 -- Set_DIC_Procedure --
9251 -----------------------
9253 procedure Set_DIC_Procedure (Id : E; V : E) is
9254 Base_Typ : Entity_Id;
9255 Subp_Elmt : Elmt_Id;
9256 Subp_Id : Entity_Id;
9257 Subps : Elist_Id;
9259 begin
9260 pragma Assert (Is_Type (Id));
9262 Base_Typ := Base_Type (Id);
9263 Subps := Subprograms_For_Type (Base_Typ);
9265 if No (Subps) then
9266 Subps := New_Elmt_List;
9267 Set_Subprograms_For_Type (Base_Typ, Subps);
9268 end if;
9270 Subp_Elmt := First_Elmt (Subps);
9271 Prepend_Elmt (V, Subps);
9273 -- Check for a duplicate default initial condition procedure
9275 while Present (Subp_Elmt) loop
9276 Subp_Id := Node (Subp_Elmt);
9278 if Is_DIC_Procedure (Subp_Id) then
9279 raise Program_Error;
9280 end if;
9282 Next_Elmt (Subp_Elmt);
9283 end loop;
9284 end Set_DIC_Procedure;
9286 -----------------------------
9287 -- Set_Invariant_Procedure --
9288 -----------------------------
9290 procedure Set_Invariant_Procedure (Id : E; V : E) is
9291 Base_Typ : Entity_Id;
9292 Subp_Elmt : Elmt_Id;
9293 Subp_Id : Entity_Id;
9294 Subps : Elist_Id;
9296 begin
9297 pragma Assert (Is_Type (Id));
9299 Base_Typ := Base_Type (Id);
9300 Subps := Subprograms_For_Type (Base_Typ);
9302 if No (Subps) then
9303 Subps := New_Elmt_List;
9304 Set_Subprograms_For_Type (Base_Typ, Subps);
9305 end if;
9307 Subp_Elmt := First_Elmt (Subps);
9308 Prepend_Elmt (V, Subps);
9310 -- Check for a duplicate invariant procedure
9312 while Present (Subp_Elmt) loop
9313 Subp_Id := Node (Subp_Elmt);
9315 if Is_Invariant_Procedure (Subp_Id) then
9316 raise Program_Error;
9317 end if;
9319 Next_Elmt (Subp_Elmt);
9320 end loop;
9321 end Set_Invariant_Procedure;
9323 -------------------------------------
9324 -- Set_Partial_Invariant_Procedure --
9325 -------------------------------------
9327 procedure Set_Partial_Invariant_Procedure (Id : E; V : E) is
9328 Base_Typ : Entity_Id;
9329 Subp_Elmt : Elmt_Id;
9330 Subp_Id : Entity_Id;
9331 Subps : Elist_Id;
9333 begin
9334 pragma Assert (Is_Type (Id));
9336 Base_Typ := Base_Type (Id);
9337 Subps := Subprograms_For_Type (Base_Typ);
9339 if No (Subps) then
9340 Subps := New_Elmt_List;
9341 Set_Subprograms_For_Type (Base_Typ, Subps);
9342 end if;
9344 Subp_Elmt := First_Elmt (Subps);
9345 Prepend_Elmt (V, Subps);
9347 -- Check for a duplicate partial invariant procedure
9349 while Present (Subp_Elmt) loop
9350 Subp_Id := Node (Subp_Elmt);
9352 if Is_Partial_Invariant_Procedure (Subp_Id) then
9353 raise Program_Error;
9354 end if;
9356 Next_Elmt (Subp_Elmt);
9357 end loop;
9358 end Set_Partial_Invariant_Procedure;
9360 ----------------------------
9361 -- Set_Predicate_Function --
9362 ----------------------------
9364 procedure Set_Predicate_Function (Id : E; V : E) is
9365 Subp_Elmt : Elmt_Id;
9366 Subp_Id : Entity_Id;
9367 Subps : Elist_Id;
9369 begin
9370 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9372 Subps := Subprograms_For_Type (Id);
9374 if No (Subps) then
9375 Subps := New_Elmt_List;
9376 Set_Subprograms_For_Type (Id, Subps);
9377 end if;
9379 Subp_Elmt := First_Elmt (Subps);
9380 Prepend_Elmt (V, Subps);
9382 -- Check for a duplicate predication function
9384 while Present (Subp_Elmt) loop
9385 Subp_Id := Node (Subp_Elmt);
9387 if Ekind (Subp_Id) = E_Function
9388 and then Is_Predicate_Function (Subp_Id)
9389 then
9390 raise Program_Error;
9391 end if;
9393 Next_Elmt (Subp_Elmt);
9394 end loop;
9395 end Set_Predicate_Function;
9397 ------------------------------
9398 -- Set_Predicate_Function_M --
9399 ------------------------------
9401 procedure Set_Predicate_Function_M (Id : E; V : E) is
9402 Subp_Elmt : Elmt_Id;
9403 Subp_Id : Entity_Id;
9404 Subps : Elist_Id;
9406 begin
9407 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9409 Subps := Subprograms_For_Type (Id);
9411 if No (Subps) then
9412 Subps := New_Elmt_List;
9413 Set_Subprograms_For_Type (Id, Subps);
9414 end if;
9416 Subp_Elmt := First_Elmt (Subps);
9417 Prepend_Elmt (V, Subps);
9419 -- Check for a duplicate predication function
9421 while Present (Subp_Elmt) loop
9422 Subp_Id := Node (Subp_Elmt);
9424 if Ekind (Subp_Id) = E_Function
9425 and then Is_Predicate_Function_M (Subp_Id)
9426 then
9427 raise Program_Error;
9428 end if;
9430 Next_Elmt (Subp_Elmt);
9431 end loop;
9432 end Set_Predicate_Function_M;
9434 -----------------
9435 -- Size_Clause --
9436 -----------------
9438 function Size_Clause (Id : E) return N is
9439 begin
9440 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
9441 end Size_Clause;
9443 ------------------------
9444 -- Stream_Size_Clause --
9445 ------------------------
9447 function Stream_Size_Clause (Id : E) return N is
9448 begin
9449 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
9450 end Stream_Size_Clause;
9452 ------------------
9453 -- Subtype_Kind --
9454 ------------------
9456 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
9457 Kind : Entity_Kind;
9459 begin
9460 case K is
9461 when Access_Kind =>
9462 Kind := E_Access_Subtype;
9464 when E_Array_Subtype
9465 | E_Array_Type
9467 Kind := E_Array_Subtype;
9469 when E_Class_Wide_Subtype
9470 | E_Class_Wide_Type
9472 Kind := E_Class_Wide_Subtype;
9474 when E_Decimal_Fixed_Point_Subtype
9475 | E_Decimal_Fixed_Point_Type
9477 Kind := E_Decimal_Fixed_Point_Subtype;
9479 when E_Ordinary_Fixed_Point_Subtype
9480 | E_Ordinary_Fixed_Point_Type
9482 Kind := E_Ordinary_Fixed_Point_Subtype;
9484 when E_Private_Subtype
9485 | E_Private_Type
9487 Kind := E_Private_Subtype;
9489 when E_Limited_Private_Subtype
9490 | E_Limited_Private_Type
9492 Kind := E_Limited_Private_Subtype;
9494 when E_Record_Subtype_With_Private
9495 | E_Record_Type_With_Private
9497 Kind := E_Record_Subtype_With_Private;
9499 when E_Record_Subtype
9500 | E_Record_Type
9502 Kind := E_Record_Subtype;
9504 when Enumeration_Kind =>
9505 Kind := E_Enumeration_Subtype;
9507 when E_Incomplete_Type =>
9508 Kind := E_Incomplete_Subtype;
9510 when Float_Kind =>
9511 Kind := E_Floating_Point_Subtype;
9513 when Signed_Integer_Kind =>
9514 Kind := E_Signed_Integer_Subtype;
9516 when Modular_Integer_Kind =>
9517 Kind := E_Modular_Integer_Subtype;
9519 when Protected_Kind =>
9520 Kind := E_Protected_Subtype;
9522 when Task_Kind =>
9523 Kind := E_Task_Subtype;
9525 when others =>
9526 Kind := E_Void;
9527 raise Program_Error;
9528 end case;
9530 return Kind;
9531 end Subtype_Kind;
9533 ---------------------
9534 -- Type_High_Bound --
9535 ---------------------
9537 function Type_High_Bound (Id : E) return Node_Id is
9538 Rng : constant Node_Id := Scalar_Range (Id);
9539 begin
9540 if Nkind (Rng) = N_Subtype_Indication then
9541 return High_Bound (Range_Expression (Constraint (Rng)));
9542 else
9543 return High_Bound (Rng);
9544 end if;
9545 end Type_High_Bound;
9547 --------------------
9548 -- Type_Low_Bound --
9549 --------------------
9551 function Type_Low_Bound (Id : E) return Node_Id is
9552 Rng : constant Node_Id := Scalar_Range (Id);
9553 begin
9554 if Nkind (Rng) = N_Subtype_Indication then
9555 return Low_Bound (Range_Expression (Constraint (Rng)));
9556 else
9557 return Low_Bound (Rng);
9558 end if;
9559 end Type_Low_Bound;
9561 ---------------------
9562 -- Underlying_Type --
9563 ---------------------
9565 function Underlying_Type (Id : E) return E is
9566 begin
9567 -- For record_with_private the underlying type is always the direct full
9568 -- view. Never try to take the full view of the parent it does not make
9569 -- sense.
9571 if Ekind (Id) = E_Record_Type_With_Private then
9572 return Full_View (Id);
9574 -- If we have a class-wide type that comes from the limited view then we
9575 -- return the Underlying_Type of its nonlimited view.
9577 elsif Ekind (Id) = E_Class_Wide_Type
9578 and then From_Limited_With (Id)
9579 and then Present (Non_Limited_View (Id))
9580 then
9581 return Underlying_Type (Non_Limited_View (Id));
9583 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
9585 -- If we have an incomplete or private type with a full view, then we
9586 -- return the Underlying_Type of this full view.
9588 if Present (Full_View (Id)) then
9589 if Id = Full_View (Id) then
9591 -- Previous error in declaration
9593 return Empty;
9595 else
9596 return Underlying_Type (Full_View (Id));
9597 end if;
9599 -- If we have a private type with an underlying full view, then we
9600 -- return the Underlying_Type of this underlying full view.
9602 elsif Ekind (Id) in Private_Kind
9603 and then Present (Underlying_Full_View (Id))
9604 then
9605 return Underlying_Type (Underlying_Full_View (Id));
9607 -- If we have an incomplete entity that comes from the limited view
9608 -- then we return the Underlying_Type of its nonlimited view.
9610 elsif From_Limited_With (Id)
9611 and then Present (Non_Limited_View (Id))
9612 then
9613 return Underlying_Type (Non_Limited_View (Id));
9615 -- Otherwise check for the case where we have a derived type or
9616 -- subtype, and if so get the Underlying_Type of the parent type.
9618 elsif Etype (Id) /= Id then
9619 return Underlying_Type (Etype (Id));
9621 -- Otherwise we have an incomplete or private type that has no full
9622 -- view, which means that we have not encountered the completion, so
9623 -- return Empty to indicate the underlying type is not yet known.
9625 else
9626 return Empty;
9627 end if;
9629 -- For non-incomplete, non-private types, return the type itself Also
9630 -- for entities that are not types at all return the entity itself.
9632 else
9633 return Id;
9634 end if;
9635 end Underlying_Type;
9637 ------------------------
9638 -- Unlink_Next_Entity --
9639 ------------------------
9641 procedure Unlink_Next_Entity (Id : Entity_Id) is
9642 Next : constant Entity_Id := Next_Entity (Id);
9644 begin
9645 if Present (Next) then
9646 Set_Prev_Entity (Next, Empty); -- Empty <-- Next
9647 end if;
9649 Set_Next_Entity (Id, Empty); -- Id --> Empty
9650 end Unlink_Next_Entity;
9652 ------------------------
9653 -- Write_Entity_Flags --
9654 ------------------------
9656 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
9658 procedure W (Flag_Name : String; Flag : Boolean);
9659 -- Write out given flag if it is set
9661 -------
9662 -- W --
9663 -------
9665 procedure W (Flag_Name : String; Flag : Boolean) is
9666 begin
9667 if Flag then
9668 Write_Str (Prefix);
9669 Write_Str (Flag_Name);
9670 Write_Str (" = True");
9671 Write_Eol;
9672 end if;
9673 end W;
9675 -- Start of processing for Write_Entity_Flags
9677 begin
9678 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
9679 and then Is_Base_Type (Id)
9680 then
9681 Write_Str (Prefix);
9682 Write_Str ("Component_Alignment = ");
9684 case Component_Alignment (Id) is
9685 when Calign_Default =>
9686 Write_Str ("Calign_Default");
9688 when Calign_Component_Size =>
9689 Write_Str ("Calign_Component_Size");
9691 when Calign_Component_Size_4 =>
9692 Write_Str ("Calign_Component_Size_4");
9694 when Calign_Storage_Unit =>
9695 Write_Str ("Calign_Storage_Unit");
9696 end case;
9698 Write_Eol;
9699 end if;
9701 W ("Address_Taken", Flag104 (Id));
9702 W ("Body_Needed_For_Inlining", Flag299 (Id));
9703 W ("Body_Needed_For_SAL", Flag40 (Id));
9704 W ("C_Pass_By_Copy", Flag125 (Id));
9705 W ("Can_Never_Be_Null", Flag38 (Id));
9706 W ("Checks_May_Be_Suppressed", Flag31 (Id));
9707 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
9708 W ("Debug_Info_Off", Flag166 (Id));
9709 W ("Default_Expressions_Processed", Flag108 (Id));
9710 W ("Delay_Cleanups", Flag114 (Id));
9711 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
9712 W ("Depends_On_Private", Flag14 (Id));
9713 W ("Discard_Names", Flag88 (Id));
9714 W ("Elaboration_Entity_Required", Flag174 (Id));
9715 W ("Elaborate_Body_Desirable", Flag210 (Id));
9716 W ("Entry_Accepted", Flag152 (Id));
9717 W ("Can_Use_Internal_Rep", Flag229 (Id));
9718 W ("Finalize_Storage_Only", Flag158 (Id));
9719 W ("From_Limited_With", Flag159 (Id));
9720 W ("Has_Aliased_Components", Flag135 (Id));
9721 W ("Has_Alignment_Clause", Flag46 (Id));
9722 W ("Has_All_Calls_Remote", Flag79 (Id));
9723 W ("Has_Atomic_Components", Flag86 (Id));
9724 W ("Has_Biased_Representation", Flag139 (Id));
9725 W ("Has_Completion", Flag26 (Id));
9726 W ("Has_Completion_In_Body", Flag71 (Id));
9727 W ("Has_Complex_Representation", Flag140 (Id));
9728 W ("Has_Component_Size_Clause", Flag68 (Id));
9729 W ("Has_Contiguous_Rep", Flag181 (Id));
9730 W ("Has_Controlled_Component", Flag43 (Id));
9731 W ("Has_Controlling_Result", Flag98 (Id));
9732 W ("Has_Convention_Pragma", Flag119 (Id));
9733 W ("Has_Default_Aspect", Flag39 (Id));
9734 W ("Has_Delayed_Aspects", Flag200 (Id));
9735 W ("Has_Delayed_Freeze", Flag18 (Id));
9736 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
9737 W ("Has_Discriminants", Flag5 (Id));
9738 W ("Has_Dispatch_Table", Flag220 (Id));
9739 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
9740 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
9741 W ("Has_Exit", Flag47 (Id));
9742 W ("Has_Expanded_Contract", Flag240 (Id));
9743 W ("Has_Forward_Instantiation", Flag175 (Id));
9744 W ("Has_Fully_Qualified_Name", Flag173 (Id));
9745 W ("Has_Gigi_Rep_Item", Flag82 (Id));
9746 W ("Has_Homonym", Flag56 (Id));
9747 W ("Has_Implicit_Dereference", Flag251 (Id));
9748 W ("Has_Independent_Components", Flag34 (Id));
9749 W ("Has_Inheritable_Invariants", Flag248 (Id));
9750 W ("Has_Inherited_DIC", Flag133 (Id));
9751 W ("Has_Inherited_Invariants", Flag291 (Id));
9752 W ("Has_Initial_Value", Flag219 (Id));
9753 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
9754 W ("Has_Machine_Radix_Clause", Flag83 (Id));
9755 W ("Has_Master_Entity", Flag21 (Id));
9756 W ("Has_Missing_Return", Flag142 (Id));
9757 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
9758 W ("Has_Nested_Subprogram", Flag282 (Id));
9759 W ("Has_Non_Standard_Rep", Flag75 (Id));
9760 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
9761 W ("Has_Object_Size_Clause", Flag172 (Id));
9762 W ("Has_Own_DIC", Flag3 (Id));
9763 W ("Has_Own_Invariants", Flag232 (Id));
9764 W ("Has_Per_Object_Constraint", Flag154 (Id));
9765 W ("Has_Pragma_Controlled", Flag27 (Id));
9766 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
9767 W ("Has_Pragma_Inline", Flag157 (Id));
9768 W ("Has_Pragma_Inline_Always", Flag230 (Id));
9769 W ("Has_Pragma_No_Inline", Flag201 (Id));
9770 W ("Has_Pragma_Ordered", Flag198 (Id));
9771 W ("Has_Pragma_Pack", Flag121 (Id));
9772 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
9773 W ("Has_Pragma_Pure", Flag203 (Id));
9774 W ("Has_Pragma_Pure_Function", Flag179 (Id));
9775 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
9776 W ("Has_Pragma_Unmodified", Flag233 (Id));
9777 W ("Has_Pragma_Unreferenced", Flag180 (Id));
9778 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
9779 W ("Has_Pragma_Unused", Flag294 (Id));
9780 W ("Has_Predicates", Flag250 (Id));
9781 W ("Has_Primitive_Operations", Flag120 (Id));
9782 W ("Has_Private_Ancestor", Flag151 (Id));
9783 W ("Has_Private_Declaration", Flag155 (Id));
9784 W ("Has_Private_Extension", Flag300 (Id));
9785 W ("Has_Protected", Flag271 (Id));
9786 W ("Has_Qualified_Name", Flag161 (Id));
9787 W ("Has_RACW", Flag214 (Id));
9788 W ("Has_Record_Rep_Clause", Flag65 (Id));
9789 W ("Has_Recursive_Call", Flag143 (Id));
9790 W ("Has_Shift_Operator", Flag267 (Id));
9791 W ("Has_Size_Clause", Flag29 (Id));
9792 W ("Has_Small_Clause", Flag67 (Id));
9793 W ("Has_Specified_Layout", Flag100 (Id));
9794 W ("Has_Specified_Stream_Input", Flag190 (Id));
9795 W ("Has_Specified_Stream_Output", Flag191 (Id));
9796 W ("Has_Specified_Stream_Read", Flag192 (Id));
9797 W ("Has_Specified_Stream_Write", Flag193 (Id));
9798 W ("Has_Static_Discriminants", Flag211 (Id));
9799 W ("Has_Static_Predicate", Flag269 (Id));
9800 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
9801 W ("Has_Storage_Size_Clause", Flag23 (Id));
9802 W ("Has_Stream_Size_Clause", Flag184 (Id));
9803 W ("Has_Task", Flag30 (Id));
9804 W ("Has_Timing_Event", Flag289 (Id));
9805 W ("Has_Thunks", Flag228 (Id));
9806 W ("Has_Unchecked_Union", Flag123 (Id));
9807 W ("Has_Unknown_Discriminants", Flag72 (Id));
9808 W ("Has_Visible_Refinement", Flag263 (Id));
9809 W ("Has_Volatile_Components", Flag87 (Id));
9810 W ("Has_Xref_Entry", Flag182 (Id));
9811 W ("Ignore_SPARK_Mode_Pragmas", Flag301 (Id));
9812 W ("In_Package_Body", Flag48 (Id));
9813 W ("In_Private_Part", Flag45 (Id));
9814 W ("In_Use", Flag8 (Id));
9815 W ("Is_Abstract_Subprogram", Flag19 (Id));
9816 W ("Is_Abstract_Type", Flag146 (Id));
9817 W ("Is_Access_Constant", Flag69 (Id));
9818 W ("Is_Actual_Subtype", Flag293 (Id));
9819 W ("Is_Ada_2005_Only", Flag185 (Id));
9820 W ("Is_Ada_2012_Only", Flag199 (Id));
9821 W ("Is_Aliased", Flag15 (Id));
9822 W ("Is_Asynchronous", Flag81 (Id));
9823 W ("Is_Atomic", Flag85 (Id));
9824 W ("Is_Bit_Packed_Array", Flag122 (Id));
9825 W ("Is_CPP_Class", Flag74 (Id));
9826 W ("Is_Called", Flag102 (Id));
9827 W ("Is_Character_Type", Flag63 (Id));
9828 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
9829 W ("Is_Child_Unit", Flag73 (Id));
9830 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
9831 W ("Is_Compilation_Unit", Flag149 (Id));
9832 W ("Is_Completely_Hidden", Flag103 (Id));
9833 W ("Is_Concurrent_Record_Type", Flag20 (Id));
9834 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
9835 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
9836 W ("Is_Constrained", Flag12 (Id));
9837 W ("Is_Constructor", Flag76 (Id));
9838 W ("Is_Controlled_Active", Flag42 (Id));
9839 W ("Is_Controlling_Formal", Flag97 (Id));
9840 W ("Is_Descendant_Of_Address", Flag223 (Id));
9841 W ("Is_DIC_Procedure", Flag132 (Id));
9842 W ("Is_Discrim_SO_Function", Flag176 (Id));
9843 W ("Is_Discriminant_Check_Function", Flag264 (Id));
9844 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
9845 W ("Is_Dispatching_Operation", Flag6 (Id));
9846 W ("Is_Elaboration_Checks_OK_Id", Flag148 (Id));
9847 W ("Is_Elaboration_Warnings_OK_Id", Flag304 (Id));
9848 W ("Is_Eliminated", Flag124 (Id));
9849 W ("Is_Entry_Formal", Flag52 (Id));
9850 W ("Is_Exception_Handler", Flag286 (Id));
9851 W ("Is_Exported", Flag99 (Id));
9852 W ("Is_Finalized_Transient", Flag252 (Id));
9853 W ("Is_First_Subtype", Flag70 (Id));
9854 W ("Is_For_Access_Subtype", Flag118 (Id));
9855 W ("Is_Formal_Subprogram", Flag111 (Id));
9856 W ("Is_Frozen", Flag4 (Id));
9857 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
9858 W ("Is_Generic_Actual_Type", Flag94 (Id));
9859 W ("Is_Generic_Instance", Flag130 (Id));
9860 W ("Is_Generic_Type", Flag13 (Id));
9861 W ("Is_Hidden", Flag57 (Id));
9862 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
9863 W ("Is_Hidden_Open_Scope", Flag171 (Id));
9864 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
9865 W ("Is_Ignored_Transient", Flag295 (Id));
9866 W ("Is_Immediately_Visible", Flag7 (Id));
9867 W ("Is_Implementation_Defined", Flag254 (Id));
9868 W ("Is_Imported", Flag24 (Id));
9869 W ("Is_Independent", Flag268 (Id));
9870 W ("Is_Initial_Condition_Procedure", Flag302 (Id));
9871 W ("Is_Inlined", Flag11 (Id));
9872 W ("Is_Inlined_Always", Flag1 (Id));
9873 W ("Is_Instantiated", Flag126 (Id));
9874 W ("Is_Interface", Flag186 (Id));
9875 W ("Is_Internal", Flag17 (Id));
9876 W ("Is_Interrupt_Handler", Flag89 (Id));
9877 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
9878 W ("Is_Invariant_Procedure", Flag257 (Id));
9879 W ("Is_Itype", Flag91 (Id));
9880 W ("Is_Known_Non_Null", Flag37 (Id));
9881 W ("Is_Known_Null", Flag204 (Id));
9882 W ("Is_Known_Valid", Flag170 (Id));
9883 W ("Is_Limited_Composite", Flag106 (Id));
9884 W ("Is_Limited_Interface", Flag197 (Id));
9885 W ("Is_Limited_Record", Flag25 (Id));
9886 W ("Is_Local_Anonymous_Access", Flag194 (Id));
9887 W ("Is_Loop_Parameter", Flag307 (Id));
9888 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
9889 W ("Is_Non_Static_Subtype", Flag109 (Id));
9890 W ("Is_Null_Init_Proc", Flag178 (Id));
9891 W ("Is_Obsolescent", Flag153 (Id));
9892 W ("Is_Only_Out_Parameter", Flag226 (Id));
9893 W ("Is_Package_Body_Entity", Flag160 (Id));
9894 W ("Is_Packed", Flag51 (Id));
9895 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
9896 W ("Is_Param_Block_Component_Type", Flag215 (Id));
9897 W ("Is_Partial_Invariant_Procedure", Flag292 (Id));
9898 W ("Is_Potentially_Use_Visible", Flag9 (Id));
9899 W ("Is_Predicate_Function", Flag255 (Id));
9900 W ("Is_Predicate_Function_M", Flag256 (Id));
9901 W ("Is_Preelaborated", Flag59 (Id));
9902 W ("Is_Primitive", Flag218 (Id));
9903 W ("Is_Primitive_Wrapper", Flag195 (Id));
9904 W ("Is_Private_Composite", Flag107 (Id));
9905 W ("Is_Private_Descendant", Flag53 (Id));
9906 W ("Is_Private_Primitive", Flag245 (Id));
9907 W ("Is_Public", Flag10 (Id));
9908 W ("Is_Pure", Flag44 (Id));
9909 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
9910 W ("Is_RACW_Stub_Type", Flag244 (Id));
9911 W ("Is_Raised", Flag224 (Id));
9912 W ("Is_Remote_Call_Interface", Flag62 (Id));
9913 W ("Is_Remote_Types", Flag61 (Id));
9914 W ("Is_Renaming_Of_Object", Flag112 (Id));
9915 W ("Is_Return_Object", Flag209 (Id));
9916 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
9917 W ("Is_Shared_Passive", Flag60 (Id));
9918 W ("Is_Static_Type", Flag281 (Id));
9919 W ("Is_Statically_Allocated", Flag28 (Id));
9920 W ("Is_Tag", Flag78 (Id));
9921 W ("Is_Tagged_Type", Flag55 (Id));
9922 W ("Is_Thunk", Flag225 (Id));
9923 W ("Is_Trivial_Subprogram", Flag235 (Id));
9924 W ("Is_True_Constant", Flag163 (Id));
9925 W ("Is_Unchecked_Union", Flag117 (Id));
9926 W ("Is_Underlying_Full_View", Flag298 (Id));
9927 W ("Is_Underlying_Record_View", Flag246 (Id));
9928 W ("Is_Unimplemented", Flag284 (Id));
9929 W ("Is_Unsigned_Type", Flag144 (Id));
9930 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
9931 W ("Is_Valued_Procedure", Flag127 (Id));
9932 W ("Is_Visible_Formal", Flag206 (Id));
9933 W ("Is_Visible_Lib_Unit", Flag116 (Id));
9934 W ("Is_Volatile", Flag16 (Id));
9935 W ("Is_Volatile_Full_Access", Flag285 (Id));
9936 W ("Itype_Printed", Flag202 (Id));
9937 W ("Kill_Elaboration_Checks", Flag32 (Id));
9938 W ("Kill_Range_Checks", Flag33 (Id));
9939 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
9940 W ("Low_Bound_Tested", Flag205 (Id));
9941 W ("Machine_Radix_10", Flag84 (Id));
9942 W ("Materialize_Entity", Flag168 (Id));
9943 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
9944 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
9945 W ("Must_Have_Preelab_Init", Flag208 (Id));
9946 W ("Needs_Activation_Record", Flag306 (Id));
9947 W ("Needs_Debug_Info", Flag147 (Id));
9948 W ("Needs_No_Actuals", Flag22 (Id));
9949 W ("Never_Set_In_Source", Flag115 (Id));
9950 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
9951 W ("No_Pool_Assigned", Flag131 (Id));
9952 W ("No_Predicate_On_actual", Flag275 (Id));
9953 W ("No_Reordering", Flag239 (Id));
9954 W ("No_Return", Flag113 (Id));
9955 W ("No_Strict_Aliasing", Flag136 (Id));
9956 W ("Non_Binary_Modulus", Flag58 (Id));
9957 W ("Nonzero_Is_True", Flag162 (Id));
9958 W ("OK_To_Rename", Flag247 (Id));
9959 W ("Optimize_Alignment_Space", Flag241 (Id));
9960 W ("Optimize_Alignment_Time", Flag242 (Id));
9961 W ("Overlays_Constant", Flag243 (Id));
9962 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
9963 W ("Reachable", Flag49 (Id));
9964 W ("Referenced", Flag156 (Id));
9965 W ("Referenced_As_LHS", Flag36 (Id));
9966 W ("Referenced_As_Out_Parameter", Flag227 (Id));
9967 W ("Renamed_In_Spec", Flag231 (Id));
9968 W ("Requires_Overriding", Flag213 (Id));
9969 W ("Return_Present", Flag54 (Id));
9970 W ("Returns_By_Ref", Flag90 (Id));
9971 W ("Reverse_Bit_Order", Flag164 (Id));
9972 W ("Reverse_Storage_Order", Flag93 (Id));
9973 W ("Rewritten_For_C", Flag287 (Id));
9974 W ("Predicates_Ignored", Flag288 (Id));
9975 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
9976 W ("Size_Depends_On_Discriminant", Flag177 (Id));
9977 W ("Size_Known_At_Compile_Time", Flag92 (Id));
9978 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
9979 W ("SPARK_Pragma_Inherited", Flag265 (Id));
9980 W ("SSO_Set_High_By_Default", Flag273 (Id));
9981 W ("SSO_Set_Low_By_Default", Flag272 (Id));
9982 W ("Static_Elaboration_Desired", Flag77 (Id));
9983 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
9984 W ("Strict_Alignment", Flag145 (Id));
9985 W ("Suppress_Elaboration_Warnings", Flag303 (Id));
9986 W ("Suppress_Initialization", Flag105 (Id));
9987 W ("Suppress_Style_Checks", Flag165 (Id));
9988 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
9989 W ("Treat_As_Volatile", Flag41 (Id));
9990 W ("Universal_Aliasing", Flag216 (Id));
9991 W ("Used_As_Generic_Actual", Flag222 (Id));
9992 W ("Uses_Sec_Stack", Flag95 (Id));
9993 W ("Warnings_Off", Flag96 (Id));
9994 W ("Warnings_Off_Used", Flag236 (Id));
9995 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
9996 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
9997 W ("Was_Hidden", Flag196 (Id));
9998 end Write_Entity_Flags;
10000 -----------------------
10001 -- Write_Entity_Info --
10002 -----------------------
10004 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
10006 procedure Write_Attribute (Which : String; Nam : E);
10007 -- Write attribute value with given string name
10009 procedure Write_Kind (Id : Entity_Id);
10010 -- Write Ekind field of entity
10012 ---------------------
10013 -- Write_Attribute --
10014 ---------------------
10016 procedure Write_Attribute (Which : String; Nam : E) is
10017 begin
10018 Write_Str (Prefix);
10019 Write_Str (Which);
10020 Write_Int (Int (Nam));
10021 Write_Str (" ");
10022 Write_Name (Chars (Nam));
10023 Write_Str (" ");
10024 end Write_Attribute;
10026 ----------------
10027 -- Write_Kind --
10028 ----------------
10030 procedure Write_Kind (Id : Entity_Id) is
10031 K : constant String := Entity_Kind'Image (Ekind (Id));
10033 begin
10034 Write_Str (Prefix);
10035 Write_Str (" Kind ");
10037 if Is_Type (Id) and then Is_Tagged_Type (Id) then
10038 Write_Str ("TAGGED ");
10039 end if;
10041 Write_Str (K (3 .. K'Length));
10042 Write_Str (" ");
10044 if Is_Type (Id) and then Depends_On_Private (Id) then
10045 Write_Str ("Depends_On_Private ");
10046 end if;
10047 end Write_Kind;
10049 -- Start of processing for Write_Entity_Info
10051 begin
10052 Write_Eol;
10053 Write_Attribute ("Name ", Id);
10054 Write_Int (Int (Id));
10055 Write_Eol;
10056 Write_Kind (Id);
10057 Write_Eol;
10058 Write_Attribute (" Type ", Etype (Id));
10059 Write_Eol;
10060 Write_Attribute (" Scope ", Scope (Id));
10061 Write_Eol;
10063 case Ekind (Id) is
10064 when Discrete_Kind =>
10065 Write_Str ("Bounds: Id = ");
10067 if Present (Scalar_Range (Id)) then
10068 Write_Int (Int (Type_Low_Bound (Id)));
10069 Write_Str (" .. Id = ");
10070 Write_Int (Int (Type_High_Bound (Id)));
10071 else
10072 Write_Str ("Empty");
10073 end if;
10075 Write_Eol;
10077 when Array_Kind =>
10078 declare
10079 Index : E;
10081 begin
10082 Write_Attribute
10083 (" Component Type ", Component_Type (Id));
10084 Write_Eol;
10085 Write_Str (Prefix);
10086 Write_Str (" Indexes ");
10088 Index := First_Index (Id);
10089 while Present (Index) loop
10090 Write_Attribute (" ", Etype (Index));
10091 Index := Next_Index (Index);
10092 end loop;
10094 Write_Eol;
10095 end;
10097 when Access_Kind =>
10098 Write_Attribute
10099 (" Directly Designated Type ",
10100 Directly_Designated_Type (Id));
10101 Write_Eol;
10103 when Overloadable_Kind =>
10104 if Present (Homonym (Id)) then
10105 Write_Str (" Homonym ");
10106 Write_Name (Chars (Homonym (Id)));
10107 Write_Str (" ");
10108 Write_Int (Int (Homonym (Id)));
10109 Write_Eol;
10110 end if;
10112 Write_Eol;
10114 when E_Component =>
10115 if Ekind (Scope (Id)) in Record_Kind then
10116 Write_Attribute (
10117 " Original_Record_Component ",
10118 Original_Record_Component (Id));
10119 Write_Int (Int (Original_Record_Component (Id)));
10120 Write_Eol;
10121 end if;
10123 when others =>
10124 null;
10125 end case;
10126 end Write_Entity_Info;
10128 -----------------------
10129 -- Write_Field6_Name --
10130 -----------------------
10132 procedure Write_Field6_Name (Id : Entity_Id) is
10133 pragma Unreferenced (Id);
10134 begin
10135 Write_Str ("First_Rep_Item");
10136 end Write_Field6_Name;
10138 -----------------------
10139 -- Write_Field7_Name --
10140 -----------------------
10142 procedure Write_Field7_Name (Id : Entity_Id) is
10143 pragma Unreferenced (Id);
10144 begin
10145 Write_Str ("Freeze_Node");
10146 end Write_Field7_Name;
10148 -----------------------
10149 -- Write_Field8_Name --
10150 -----------------------
10152 procedure Write_Field8_Name (Id : Entity_Id) is
10153 begin
10154 case Ekind (Id) is
10155 when Type_Kind =>
10156 Write_Str ("Associated_Node_For_Itype");
10158 when E_Package =>
10159 Write_Str ("Dependent_Instances");
10161 when E_Loop =>
10162 Write_Str ("First_Exit_Statement");
10164 when E_Variable =>
10165 Write_Str ("Hiding_Loop_Variable");
10167 when Formal_Kind
10168 | E_Function
10169 | E_Subprogram_Body
10171 Write_Str ("Mechanism");
10173 when E_Component
10174 | E_Discriminant
10176 Write_Str ("Normalized_First_Bit");
10178 when E_Abstract_State =>
10179 Write_Str ("Refinement_Constituents");
10181 when E_Return_Statement =>
10182 Write_Str ("Return_Applies_To");
10184 when others =>
10185 Write_Str ("Field8??");
10186 end case;
10187 end Write_Field8_Name;
10189 -----------------------
10190 -- Write_Field9_Name --
10191 -----------------------
10193 procedure Write_Field9_Name (Id : Entity_Id) is
10194 begin
10195 case Ekind (Id) is
10196 when Type_Kind =>
10197 Write_Str ("Class_Wide_Type");
10199 when Object_Kind =>
10200 Write_Str ("Current_Value");
10202 when E_Function
10203 | E_Generic_Function
10204 | E_Generic_Package
10205 | E_Generic_Procedure
10206 | E_Package
10207 | E_Procedure
10209 Write_Str ("Renaming_Map");
10211 when others =>
10212 Write_Str ("Field9??");
10213 end case;
10214 end Write_Field9_Name;
10216 ------------------------
10217 -- Write_Field10_Name --
10218 ------------------------
10220 procedure Write_Field10_Name (Id : Entity_Id) is
10221 begin
10222 case Ekind (Id) is
10223 when Class_Wide_Kind
10224 | Incomplete_Kind
10225 | E_Record_Type
10226 | E_Record_Subtype
10227 | Private_Kind
10228 | Concurrent_Kind
10230 Write_Str ("Direct_Primitive_Operations");
10232 when E_Constant
10233 | E_In_Parameter
10235 Write_Str ("Discriminal_Link");
10237 when Float_Kind =>
10238 Write_Str ("Float_Rep");
10240 when E_Function
10241 | E_Package
10242 | E_Package_Body
10243 | E_Procedure
10245 Write_Str ("Handler_Records");
10247 when E_Component
10248 | E_Discriminant
10250 Write_Str ("Normalized_Position_Max");
10252 when E_Abstract_State
10253 | E_Variable
10255 Write_Str ("Part_Of_Constituents");
10257 when others =>
10258 Write_Str ("Field10??");
10259 end case;
10260 end Write_Field10_Name;
10262 ------------------------
10263 -- Write_Field11_Name --
10264 ------------------------
10266 procedure Write_Field11_Name (Id : Entity_Id) is
10267 begin
10268 case Ekind (Id) is
10269 when E_Block =>
10270 Write_Str ("Block_Node");
10272 when E_Component
10273 | E_Discriminant
10275 Write_Str ("Component_Bit_Offset");
10277 when Formal_Kind =>
10278 Write_Str ("Entry_Component");
10280 when E_Enumeration_Literal =>
10281 Write_Str ("Enumeration_Pos");
10283 when Type_Kind
10284 | E_Constant
10286 Write_Str ("Full_View");
10288 when E_Generic_Package =>
10289 Write_Str ("Generic_Homonym");
10291 when E_Variable =>
10292 Write_Str ("Part_Of_References");
10294 when E_Entry
10295 | E_Entry_Family
10296 | E_Function
10297 | E_Procedure
10299 Write_Str ("Protected_Body_Subprogram");
10301 when others =>
10302 Write_Str ("Field11??");
10303 end case;
10304 end Write_Field11_Name;
10306 ------------------------
10307 -- Write_Field12_Name --
10308 ------------------------
10310 procedure Write_Field12_Name (Id : Entity_Id) is
10311 begin
10312 case Ekind (Id) is
10313 when E_Package =>
10314 Write_Str ("Associated_Formal_Package");
10316 when Entry_Kind =>
10317 Write_Str ("Barrier_Function");
10319 when E_Enumeration_Literal =>
10320 Write_Str ("Enumeration_Rep");
10322 when Type_Kind
10323 | E_Component
10324 | E_Constant
10325 | E_Discriminant
10326 | E_Exception
10327 | E_In_Parameter
10328 | E_In_Out_Parameter
10329 | E_Out_Parameter
10330 | E_Loop_Parameter
10331 | E_Variable
10333 Write_Str ("Esize");
10335 when E_Function
10336 | E_Procedure
10338 Write_Str ("Next_Inlined_Subprogram");
10340 when others =>
10341 Write_Str ("Field12??");
10342 end case;
10343 end Write_Field12_Name;
10345 ------------------------
10346 -- Write_Field13_Name --
10347 ------------------------
10349 procedure Write_Field13_Name (Id : Entity_Id) is
10350 begin
10351 case Ekind (Id) is
10352 when E_Component
10353 | E_Discriminant
10355 Write_Str ("Component_Clause");
10357 when E_Function
10358 | E_Procedure
10359 | E_Package
10360 | Generic_Unit_Kind
10362 Write_Str ("Elaboration_Entity");
10364 when Formal_Kind
10365 | E_Variable
10367 Write_Str ("Extra_Accessibility");
10369 when Type_Kind =>
10370 Write_Str ("RM_Size");
10372 when others =>
10373 Write_Str ("Field13??");
10374 end case;
10375 end Write_Field13_Name;
10377 -----------------------
10378 -- Write_Field14_Name --
10379 -----------------------
10381 procedure Write_Field14_Name (Id : Entity_Id) is
10382 begin
10383 case Ekind (Id) is
10384 when Type_Kind
10385 | Formal_Kind
10386 | E_Constant
10387 | E_Exception
10388 | E_Loop_Parameter
10389 | E_Variable
10391 Write_Str ("Alignment");
10393 when E_Component
10394 | E_Discriminant
10396 Write_Str ("Normalized_Position");
10398 when E_Entry
10399 | E_Entry_Family
10400 | E_Function
10401 | E_Procedure
10403 Write_Str ("Postconditions_Proc");
10405 when E_Generic_Package
10406 | E_Package
10408 Write_Str ("Shadow_Entities");
10410 when others =>
10411 Write_Str ("Field14??");
10412 end case;
10413 end Write_Field14_Name;
10415 ------------------------
10416 -- Write_Field15_Name --
10417 ------------------------
10419 procedure Write_Field15_Name (Id : Entity_Id) is
10420 begin
10421 case Ekind (Id) is
10422 when E_Discriminant =>
10423 Write_Str ("Discriminant_Number");
10425 when E_Component =>
10426 Write_Str ("DT_Entry_Count");
10428 when E_Function
10429 | E_Procedure
10431 Write_Str ("DT_Position");
10433 when Entry_Kind =>
10434 Write_Str ("Entry_Parameters_Type");
10436 when Formal_Kind =>
10437 Write_Str ("Extra_Formal");
10439 when Type_Kind =>
10440 Write_Str ("Pending_Access_Types");
10442 when E_Package
10443 | E_Package_Body
10445 Write_Str ("Related_Instance");
10447 when E_Constant
10448 | E_Loop_Parameter
10449 | E_Variable
10451 Write_Str ("Status_Flag_Or_Transient_Decl");
10453 when others =>
10454 Write_Str ("Field15??");
10455 end case;
10456 end Write_Field15_Name;
10458 ------------------------
10459 -- Write_Field16_Name --
10460 ------------------------
10462 procedure Write_Field16_Name (Id : Entity_Id) is
10463 begin
10464 case Ekind (Id) is
10465 when E_Record_Type
10466 | E_Record_Type_With_Private
10468 Write_Str ("Access_Disp_Table");
10470 when E_Abstract_State =>
10471 Write_Str ("Body_References");
10473 when E_Class_Wide_Subtype
10474 | E_Record_Subtype
10476 Write_Str ("Cloned_Subtype");
10478 when E_Function
10479 | E_Procedure
10481 Write_Str ("DTC_Entity");
10483 when E_Component =>
10484 Write_Str ("Entry_Formal");
10486 when Concurrent_Kind
10487 | E_Generic_Package
10488 | E_Package
10490 Write_Str ("First_Private_Entity");
10492 when Enumeration_Kind =>
10493 Write_Str ("Lit_Strings");
10495 when Decimal_Fixed_Point_Kind =>
10496 Write_Str ("Scale_Value");
10498 when E_String_Literal_Subtype =>
10499 Write_Str ("String_Literal_Length");
10501 when E_Out_Parameter
10502 | E_Variable
10504 Write_Str ("Unset_Reference");
10506 when others =>
10507 Write_Str ("Field16??");
10508 end case;
10509 end Write_Field16_Name;
10511 ------------------------
10512 -- Write_Field17_Name --
10513 ------------------------
10515 procedure Write_Field17_Name (Id : Entity_Id) is
10516 begin
10517 case Ekind (Id) is
10518 when Formal_Kind
10519 | E_Constant
10520 | E_Generic_In_Out_Parameter
10521 | E_Variable
10523 Write_Str ("Actual_Subtype");
10525 when Digits_Kind =>
10526 Write_Str ("Digits_Value");
10528 when E_Discriminant =>
10529 Write_Str ("Discriminal");
10531 when Class_Wide_Kind
10532 | Concurrent_Kind
10533 | Private_Kind
10534 | E_Block
10535 | E_Entry
10536 | E_Entry_Family
10537 | E_Function
10538 | E_Generic_Function
10539 | E_Generic_Package
10540 | E_Generic_Procedure
10541 | E_Loop
10542 | E_Operator
10543 | E_Package
10544 | E_Package_Body
10545 | E_Procedure
10546 | E_Record_Type
10547 | E_Record_Subtype
10548 | E_Return_Statement
10549 | E_Subprogram_Body
10550 | E_Subprogram_Type
10552 Write_Str ("First_Entity");
10554 when Array_Kind =>
10555 Write_Str ("First_Index");
10557 when Enumeration_Kind =>
10558 Write_Str ("First_Literal");
10560 when Access_Kind =>
10561 Write_Str ("Master_Id");
10563 when Modular_Integer_Kind =>
10564 Write_Str ("Modulus");
10566 when E_Component =>
10567 Write_Str ("Prival");
10569 when others =>
10570 Write_Str ("Field17??");
10571 end case;
10572 end Write_Field17_Name;
10574 ------------------------
10575 -- Write_Field18_Name --
10576 ------------------------
10578 procedure Write_Field18_Name (Id : Entity_Id) is
10579 begin
10580 case Ekind (Id) is
10581 when E_Enumeration_Literal
10582 | E_Function
10583 | E_Operator
10584 | E_Procedure
10586 Write_Str ("Alias");
10588 when E_Record_Type =>
10589 Write_Str ("Corresponding_Concurrent_Type");
10591 when E_Subprogram_Body =>
10592 Write_Str ("Corresponding_Protected_Entry");
10594 when Concurrent_Kind =>
10595 Write_Str ("Corresponding_Record_Type");
10597 when E_Block
10598 | E_Label
10599 | E_Loop
10601 Write_Str ("Enclosing_Scope");
10603 when E_Entry_Index_Parameter =>
10604 Write_Str ("Entry_Index_Constant");
10606 when E_Access_Protected_Subprogram_Type
10607 | E_Access_Subprogram_Type
10608 | E_Anonymous_Access_Protected_Subprogram_Type
10609 | E_Exception_Type
10610 | E_Class_Wide_Subtype
10612 Write_Str ("Equivalent_Type");
10614 when Fixed_Point_Kind =>
10615 Write_Str ("Delta_Value");
10617 when Enumeration_Kind =>
10618 Write_Str ("Lit_Indexes");
10620 when Incomplete_Or_Private_Kind
10621 | E_Record_Subtype
10623 Write_Str ("Private_Dependents");
10625 when E_Exception
10626 | E_Generic_Function
10627 | E_Generic_Package
10628 | E_Generic_Procedure
10629 | E_Package
10631 Write_Str ("Renamed_Entity");
10633 when Object_Kind =>
10634 Write_Str ("Renamed_Object");
10636 when E_String_Literal_Subtype =>
10637 Write_Str ("String_Literal_Low_Bound");
10639 when others =>
10640 Write_Str ("Field18??");
10641 end case;
10642 end Write_Field18_Name;
10644 -----------------------
10645 -- Write_Field19_Name --
10646 -----------------------
10648 procedure Write_Field19_Name (Id : Entity_Id) is
10649 begin
10650 case Ekind (Id) is
10651 when E_Generic_Package
10652 | E_Package
10654 Write_Str ("Body_Entity");
10656 when E_Discriminant =>
10657 Write_Str ("Corresponding_Discriminant");
10659 when Scalar_Kind =>
10660 Write_Str ("Default_Aspect_Value");
10662 when E_Array_Type =>
10663 Write_Str ("Default_Component_Value");
10665 when E_Protected_Type =>
10666 Write_Str ("Entry_Bodies_Array");
10668 when E_Function
10669 | E_Operator
10670 | E_Subprogram_Type
10672 Write_Str ("Extra_Accessibility_Of_Result");
10674 when E_Abstract_State
10675 | E_Class_Wide_Type
10676 | E_Incomplete_Type
10678 Write_Str ("Non_Limited_View");
10680 when E_Incomplete_Subtype =>
10681 if From_Limited_With (Id) then
10682 Write_Str ("Non_Limited_View");
10683 end if;
10685 when E_Record_Type =>
10686 Write_Str ("Parent_Subtype");
10688 when E_Procedure =>
10689 Write_Str ("Receiving_Entry");
10691 when E_Constant
10692 | E_Variable
10694 Write_Str ("Size_Check_Code");
10696 when Formal_Kind
10697 | E_Package_Body
10699 Write_Str ("Spec_Entity");
10701 when Private_Kind =>
10702 Write_Str ("Underlying_Full_View");
10704 when others =>
10705 Write_Str ("Field19??");
10706 end case;
10707 end Write_Field19_Name;
10709 -----------------------
10710 -- Write_Field20_Name --
10711 -----------------------
10713 procedure Write_Field20_Name (Id : Entity_Id) is
10714 begin
10715 case Ekind (Id) is
10716 when Array_Kind =>
10717 Write_Str ("Component_Type");
10719 when E_Generic_In_Parameter
10720 | E_In_Parameter
10722 Write_Str ("Default_Value");
10724 when Access_Kind =>
10725 Write_Str ("Directly_Designated_Type");
10727 when E_Component =>
10728 Write_Str ("Discriminant_Checking_Func");
10730 when E_Discriminant =>
10731 Write_Str ("Discriminant_Default_Value");
10733 when Class_Wide_Kind
10734 | Concurrent_Kind
10735 | Private_Kind
10736 | E_Block
10737 | E_Entry
10738 | E_Entry_Family
10739 | E_Function
10740 | E_Generic_Function
10741 | E_Generic_Package
10742 | E_Generic_Procedure
10743 | E_Loop
10744 | E_Operator
10745 | E_Package
10746 | E_Package_Body
10747 | E_Procedure
10748 | E_Record_Type
10749 | E_Record_Subtype
10750 | E_Return_Statement
10751 | E_Subprogram_Body
10752 | E_Subprogram_Type
10754 Write_Str ("Last_Entity");
10756 when E_Constant
10757 | E_Variable
10759 Write_Str ("Prival_Link");
10761 when E_Exception =>
10762 Write_Str ("Register_Exception_Call");
10764 when Scalar_Kind =>
10765 Write_Str ("Scalar_Range");
10767 when others =>
10768 Write_Str ("Field20??");
10769 end case;
10770 end Write_Field20_Name;
10772 -----------------------
10773 -- Write_Field21_Name --
10774 -----------------------
10776 procedure Write_Field21_Name (Id : Entity_Id) is
10777 begin
10778 case Ekind (Id) is
10779 when Entry_Kind =>
10780 Write_Str ("Accept_Address");
10782 when E_Component
10783 | E_Discriminant
10785 Write_Str ("Corresponding_Record_Component");
10787 when E_In_Parameter =>
10788 Write_Str ("Default_Expr_Function");
10790 when Concurrent_Kind
10791 | Incomplete_Or_Private_Kind
10792 | Class_Wide_Kind
10793 | E_Record_Type
10794 | E_Record_Subtype
10796 Write_Str ("Discriminant_Constraint");
10798 when E_Constant
10799 | E_Exception
10800 | E_Function
10801 | E_Generic_Function
10802 | E_Generic_Procedure
10803 | E_Procedure
10804 | E_Variable
10806 Write_Str ("Interface_Name");
10808 when Array_Kind
10809 | Modular_Integer_Kind
10811 Write_Str ("Original_Array_Type");
10813 when Fixed_Point_Kind =>
10814 Write_Str ("Small_Value");
10816 when others =>
10817 Write_Str ("Field21??");
10818 end case;
10819 end Write_Field21_Name;
10821 -----------------------
10822 -- Write_Field22_Name --
10823 -----------------------
10825 procedure Write_Field22_Name (Id : Entity_Id) is
10826 begin
10827 case Ekind (Id) is
10828 when Access_Kind =>
10829 Write_Str ("Associated_Storage_Pool");
10831 when Array_Kind =>
10832 Write_Str ("Component_Size");
10834 when E_Record_Type =>
10835 Write_Str ("Corresponding_Remote_Type");
10837 when E_Component
10838 | E_Discriminant
10840 Write_Str ("Original_Record_Component");
10842 when E_Enumeration_Literal =>
10843 Write_Str ("Enumeration_Rep_Expr");
10845 when E_Limited_Private_Subtype
10846 | E_Limited_Private_Type
10847 | E_Private_Subtype
10848 | E_Private_Type
10849 | E_Record_Subtype_With_Private
10850 | E_Record_Type_With_Private
10852 Write_Str ("Private_View");
10854 when Formal_Kind =>
10855 Write_Str ("Protected_Formal");
10857 when E_Block
10858 | E_Entry
10859 | E_Entry_Family
10860 | E_Function
10861 | E_Generic_Function
10862 | E_Generic_Package
10863 | E_Generic_Procedure
10864 | E_Loop
10865 | E_Package
10866 | E_Package_Body
10867 | E_Procedure
10868 | E_Protected_Type
10869 | E_Return_Statement
10870 | E_Subprogram_Body
10871 | E_Task_Type
10873 Write_Str ("Scope_Depth_Value");
10875 when E_Variable =>
10876 Write_Str ("Shared_Var_Procs_Instance");
10878 when others =>
10879 Write_Str ("Field22??");
10880 end case;
10881 end Write_Field22_Name;
10883 ------------------------
10884 -- Write_Field23_Name --
10885 ------------------------
10887 procedure Write_Field23_Name (Id : Entity_Id) is
10888 begin
10889 case Ekind (Id) is
10890 when E_Discriminant =>
10891 Write_Str ("CR_Discriminant");
10893 when E_Block =>
10894 Write_Str ("Entry_Cancel_Parameter");
10896 when E_Enumeration_Type =>
10897 Write_Str ("Enum_Pos_To_Rep");
10899 when Formal_Kind
10900 | E_Variable
10902 Write_Str ("Extra_Constrained");
10904 when Access_Kind =>
10905 Write_Str ("Finalization_Master");
10907 when E_Generic_Function
10908 | E_Generic_Package
10909 | E_Generic_Procedure
10911 Write_Str ("Inner_Instances");
10913 when Array_Kind =>
10914 Write_Str ("Packed_Array_Impl_Type");
10916 when Entry_Kind =>
10917 Write_Str ("Protection_Object");
10919 when Class_Wide_Kind
10920 | Concurrent_Kind
10921 | Incomplete_Or_Private_Kind
10922 | E_Record_Type
10923 | E_Record_Subtype
10925 Write_Str ("Stored_Constraint");
10927 when E_Function
10928 | E_Procedure
10930 if Present (Scope (Id))
10931 and then Is_Protected_Type (Scope (Id))
10932 then
10933 Write_Str ("Protection_Object");
10934 else
10935 Write_Str ("Generic_Renamings");
10936 end if;
10938 when E_Package =>
10939 if Is_Generic_Instance (Id) then
10940 Write_Str ("Generic_Renamings");
10941 else
10942 Write_Str ("Limited_View");
10943 end if;
10945 when others =>
10946 Write_Str ("Field23??");
10947 end case;
10948 end Write_Field23_Name;
10950 ------------------------
10951 -- Write_Field24_Name --
10952 ------------------------
10954 procedure Write_Field24_Name (Id : Entity_Id) is
10955 begin
10956 case Ekind (Id) is
10957 when E_Package =>
10958 Write_Str ("Incomplete_Actuals");
10960 when Type_Kind
10961 | E_Constant
10962 | E_Variable
10964 Write_Str ("Related_Expression");
10966 when E_Function
10967 | E_Operator
10968 | E_Procedure
10970 Write_Str ("Subps_Index");
10972 when others =>
10973 Write_Str ("Field24???");
10974 end case;
10975 end Write_Field24_Name;
10977 ------------------------
10978 -- Write_Field25_Name --
10979 ------------------------
10981 procedure Write_Field25_Name (Id : Entity_Id) is
10982 begin
10983 case Ekind (Id) is
10984 when E_Generic_Package
10985 | E_Package
10987 Write_Str ("Abstract_States");
10989 when E_Entry
10990 | E_Entry_Family
10992 Write_Str ("Contract_Wrapper");
10994 when E_Variable =>
10995 Write_Str ("Debug_Renaming_Link");
10997 when E_Component =>
10998 Write_Str ("DT_Offset_To_Top_Func");
11000 when E_Function
11001 | E_Procedure
11003 Write_Str ("Interface_Alias");
11005 when E_Record_Subtype
11006 | E_Record_Subtype_With_Private
11007 | E_Record_Type
11008 | E_Record_Type_With_Private
11010 Write_Str ("Interfaces");
11012 when E_Array_Subtype
11013 | E_Array_Type
11015 Write_Str ("Related_Array_Object");
11017 when Discrete_Kind =>
11018 Write_Str ("Static_Discrete_Predicate");
11020 when Real_Kind =>
11021 Write_Str ("Static_Real_Or_String_Predicate");
11023 when Task_Kind =>
11024 Write_Str ("Task_Body_Procedure");
11026 when others =>
11027 Write_Str ("Field25??");
11028 end case;
11029 end Write_Field25_Name;
11031 ------------------------
11032 -- Write_Field26_Name --
11033 ------------------------
11035 procedure Write_Field26_Name (Id : Entity_Id) is
11036 begin
11037 case Ekind (Id) is
11038 when E_Record_Type
11039 | E_Record_Type_With_Private
11041 Write_Str ("Dispatch_Table_Wrappers");
11043 when E_In_Out_Parameter
11044 | E_Out_Parameter
11045 | E_Variable
11047 Write_Str ("Last_Assignment");
11049 when E_Function
11050 | E_Procedure
11052 Write_Str ("Overridden_Operation");
11054 when E_Generic_Package
11055 | E_Package
11057 Write_Str ("Package_Instantiation");
11059 when E_Component
11060 | E_Constant
11062 Write_Str ("Related_Type");
11064 when Access_Kind
11065 | Task_Kind
11067 Write_Str ("Storage_Size_Variable");
11069 when others =>
11070 Write_Str ("Field26??");
11071 end case;
11072 end Write_Field26_Name;
11074 ------------------------
11075 -- Write_Field27_Name --
11076 ------------------------
11078 procedure Write_Field27_Name (Id : Entity_Id) is
11079 begin
11080 case Ekind (Id) is
11081 when Type_Kind
11082 | E_Package
11084 Write_Str ("Current_Use_Clause");
11086 when E_Component
11087 | E_Constant
11088 | E_Variable
11090 Write_Str ("Related_Type");
11092 when E_Function
11093 | E_Procedure
11095 Write_Str ("Wrapped_Entity");
11097 when others =>
11098 Write_Str ("Field27??");
11099 end case;
11100 end Write_Field27_Name;
11102 ------------------------
11103 -- Write_Field28_Name --
11104 ------------------------
11106 procedure Write_Field28_Name (Id : Entity_Id) is
11107 begin
11108 case Ekind (Id) is
11109 when E_Entry
11110 | E_Entry_Family
11111 | E_Function
11112 | E_Procedure
11113 | E_Subprogram_Body
11114 | E_Subprogram_Type
11116 Write_Str ("Extra_Formals");
11118 when E_Package
11119 | E_Package_Body
11121 Write_Str ("Finalizer");
11123 when E_Constant
11124 | E_Variable
11126 Write_Str ("Initialization_Statements");
11128 when E_Access_Subprogram_Type =>
11129 Write_Str ("Original_Access_Type");
11131 when Task_Kind =>
11132 Write_Str ("Relative_Deadline_Variable");
11134 when E_Record_Type =>
11135 Write_Str ("Underlying_Record_View");
11137 when others =>
11138 Write_Str ("Field28??");
11139 end case;
11140 end Write_Field28_Name;
11142 ------------------------
11143 -- Write_Field29_Name --
11144 ------------------------
11146 procedure Write_Field29_Name (Id : Entity_Id) is
11147 begin
11148 case Ekind (Id) is
11149 when E_Function
11150 | E_Package
11151 | E_Procedure
11152 | E_Subprogram_Body
11154 Write_Str ("Anonymous_Masters");
11156 when E_Constant
11157 | E_Variable
11159 Write_Str ("BIP_Initialization_Call");
11161 when Type_Kind =>
11162 Write_Str ("Subprograms_For_Type");
11164 when others =>
11165 Write_Str ("Field29??");
11166 end case;
11167 end Write_Field29_Name;
11169 ------------------------
11170 -- Write_Field30_Name --
11171 ------------------------
11173 procedure Write_Field30_Name (Id : Entity_Id) is
11174 begin
11175 case Ekind (Id) is
11176 when E_Record_Type
11177 | E_Record_Type_With_Private
11179 Write_Str ("Access_Disp_Table_Elab_Flag");
11181 when E_Protected_Type
11182 | E_Task_Type
11184 Write_Str ("Anonymous_Object");
11186 when E_Function =>
11187 Write_Str ("Corresponding_Equality");
11189 when E_Constant
11190 | E_Variable
11192 Write_Str ("Last_Aggregate_Assignment");
11194 when E_Procedure =>
11195 Write_Str ("Static_Initialization");
11197 when others =>
11198 Write_Str ("Field30??");
11199 end case;
11200 end Write_Field30_Name;
11202 ------------------------
11203 -- Write_Field31_Name --
11204 ------------------------
11206 procedure Write_Field31_Name (Id : Entity_Id) is
11207 begin
11208 case Ekind (Id) is
11209 when E_Constant
11210 | E_In_Parameter
11211 | E_In_Out_Parameter
11212 | E_Loop_Parameter
11213 | E_Out_Parameter
11214 | E_Variable
11216 Write_Str ("Activation_Record_Component");
11218 when Type_Kind =>
11219 Write_Str ("Derived_Type_Link");
11221 when E_Function
11222 | E_Procedure
11224 Write_Str ("Thunk_Entity");
11226 when others =>
11227 Write_Str ("Field31??");
11228 end case;
11229 end Write_Field31_Name;
11231 ------------------------
11232 -- Write_Field32_Name --
11233 ------------------------
11235 procedure Write_Field32_Name (Id : Entity_Id) is
11236 begin
11237 case Ekind (Id) is
11238 when E_Procedure =>
11239 Write_Str ("Corresponding_Function");
11241 when E_Function =>
11242 Write_Str ("Corresponding_Procedure");
11244 when E_Abstract_State
11245 | E_Constant
11246 | E_Variable
11248 Write_Str ("Encapsulating_State");
11250 when Type_Kind =>
11251 Write_Str ("No_Tagged_Streams_Pragma");
11253 when others =>
11254 Write_Str ("Field32??");
11255 end case;
11256 end Write_Field32_Name;
11258 ------------------------
11259 -- Write_Field33_Name --
11260 ------------------------
11262 procedure Write_Field33_Name (Id : Entity_Id) is
11263 begin
11264 case Ekind (Id) is
11265 when Subprogram_Kind
11266 | Type_Kind
11267 | E_Constant
11268 | E_Variable
11270 Write_Str ("Linker_Section_Pragma");
11272 when others =>
11273 Write_Str ("Field33??");
11274 end case;
11275 end Write_Field33_Name;
11277 ------------------------
11278 -- Write_Field34_Name --
11279 ------------------------
11281 procedure Write_Field34_Name (Id : Entity_Id) is
11282 begin
11283 case Ekind (Id) is
11284 when E_Constant
11285 | E_Entry
11286 | E_Entry_Family
11287 | E_Function
11288 | E_Generic_Function
11289 | E_Generic_Package
11290 | E_Generic_Procedure
11291 | E_Operator
11292 | E_Package
11293 | E_Package_Body
11294 | E_Procedure
11295 | E_Protected_Type
11296 | E_Subprogram_Body
11297 | E_Task_Body
11298 | E_Task_Type
11299 | E_Variable
11300 | E_Void
11302 Write_Str ("Contract");
11304 when others =>
11305 Write_Str ("Field34??");
11306 end case;
11307 end Write_Field34_Name;
11309 ------------------------
11310 -- Write_Field35_Name --
11311 ------------------------
11313 procedure Write_Field35_Name (Id : Entity_Id) is
11314 begin
11315 case Ekind (Id) is
11316 when E_Variable =>
11317 Write_Str ("Anonymous_Designated_Type");
11319 when E_Entry
11320 | E_Entry_Family
11322 Write_Str ("Entry_Max_Queue_Lenghts_Array");
11324 when Subprogram_Kind =>
11325 Write_Str ("Import_Pragma");
11327 when others =>
11328 Write_Str ("Field35??");
11329 end case;
11330 end Write_Field35_Name;
11332 ------------------------
11333 -- Write_Field36_Name --
11334 ------------------------
11336 procedure Write_Field36_Name (Id : Entity_Id) is
11337 pragma Unreferenced (Id);
11338 begin
11339 Write_Str ("Prev_Entity");
11340 end Write_Field36_Name;
11342 ------------------------
11343 -- Write_Field37_Name --
11344 ------------------------
11346 procedure Write_Field37_Name (Id : Entity_Id) is
11347 pragma Unreferenced (Id);
11348 begin
11349 Write_Str ("Associated_Entity");
11350 end Write_Field37_Name;
11352 ------------------------
11353 -- Write_Field38_Name --
11354 ------------------------
11356 procedure Write_Field38_Name (Id : Entity_Id) is
11357 begin
11358 case Ekind (Id) is
11359 when E_Function
11360 | E_Procedure
11362 Write_Str ("Class_Wide_Clone");
11364 when E_Array_Subtype
11365 | E_Record_Subtype
11366 | E_Record_Subtype_With_Private
11368 Write_Str ("Predicated_Parent");
11370 when E_Variable =>
11371 Write_Str ("Validated_Object");
11373 when others =>
11374 Write_Str ("Field38??");
11375 end case;
11376 end Write_Field38_Name;
11378 ------------------------
11379 -- Write_Field39_Name --
11380 ------------------------
11382 procedure Write_Field39_Name (Id : Entity_Id) is
11383 begin
11384 case Ekind (Id) is
11385 when E_Function
11386 | E_Procedure
11388 Write_Str ("Protected_Subprogram");
11390 when others =>
11391 Write_Str ("Field39??");
11392 end case;
11393 end Write_Field39_Name;
11395 ------------------------
11396 -- Write_Field40_Name --
11397 ------------------------
11399 procedure Write_Field40_Name (Id : Entity_Id) is
11400 begin
11401 case Ekind (Id) is
11402 when E_Abstract_State
11403 | E_Constant
11404 | E_Entry
11405 | E_Entry_Family
11406 | E_Function
11407 | E_Generic_Function
11408 | E_Generic_Package
11409 | E_Generic_Procedure
11410 | E_Operator
11411 | E_Package
11412 | E_Package_Body
11413 | E_Procedure
11414 | E_Protected_Body
11415 | E_Subprogram_Body
11416 | E_Task_Body
11417 | E_Variable
11418 | E_Void
11419 | Type_Kind
11421 Write_Str ("SPARK_Pragma");
11423 when others =>
11424 Write_Str ("Field40??");
11425 end case;
11426 end Write_Field40_Name;
11428 ------------------------
11429 -- Write_Field41_Name --
11430 ------------------------
11432 procedure Write_Field41_Name (Id : Entity_Id) is
11433 begin
11434 case Ekind (Id) is
11435 when E_Function
11436 | E_Procedure
11438 Write_Str ("Original_Protected_Subprogram");
11440 when E_Generic_Package
11441 | E_Package
11442 | E_Package_Body
11443 | E_Protected_Type
11444 | E_Task_Type
11446 Write_Str ("SPARK_Aux_Pragma");
11448 when others =>
11449 Write_Str ("Field41??");
11450 end case;
11451 end Write_Field41_Name;
11453 -------------------------
11454 -- Iterator Procedures --
11455 -------------------------
11457 procedure Proc_Next_Component (N : in out Node_Id) is
11458 begin
11459 N := Next_Component (N);
11460 end Proc_Next_Component;
11462 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
11463 begin
11464 N := Next_Entity (N);
11465 while Present (N) loop
11466 exit when Ekind_In (N, E_Component, E_Discriminant);
11467 N := Next_Entity (N);
11468 end loop;
11469 end Proc_Next_Component_Or_Discriminant;
11471 procedure Proc_Next_Discriminant (N : in out Node_Id) is
11472 begin
11473 N := Next_Discriminant (N);
11474 end Proc_Next_Discriminant;
11476 procedure Proc_Next_Formal (N : in out Node_Id) is
11477 begin
11478 N := Next_Formal (N);
11479 end Proc_Next_Formal;
11481 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
11482 begin
11483 N := Next_Formal_With_Extras (N);
11484 end Proc_Next_Formal_With_Extras;
11486 procedure Proc_Next_Index (N : in out Node_Id) is
11487 begin
11488 N := Next_Index (N);
11489 end Proc_Next_Index;
11491 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
11492 begin
11493 N := Next_Inlined_Subprogram (N);
11494 end Proc_Next_Inlined_Subprogram;
11496 procedure Proc_Next_Literal (N : in out Node_Id) is
11497 begin
11498 N := Next_Literal (N);
11499 end Proc_Next_Literal;
11501 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
11502 begin
11503 N := Next_Stored_Discriminant (N);
11504 end Proc_Next_Stored_Discriminant;
11506 end Einfo;